/* Gallery Styles */
.galally {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  scrollbar-width: none; /* Firefox */
  padding: 2rem 0;
  justify-content: flex-start;
}

.galally::-webkit-scrollbar {
  display: none; /* Hide scrollbar for Chrome, Safari and Opera */
}

.highlight {
  flex: 0 0 100vw;
  width: 100%;
  height: 100%;
  scroll-snap-align: center;
  background: #fff;
  padding: 3rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 70vh;
  box-sizing: border-box;
  position: relative;
  margin: 0;
  border: none;
  box-shadow: none;
  text-align: center;
}
/* Media container for videos and images */
.media-container {
  width: 100%;
  max-width: 800px;
  margin: 0 auto 2rem;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 200px;
}

.highlight video {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  max-width: 100%;
  max-height: 60vh;
  width: auto;
  height: auto;
  display: block;
  margin: 0 auto;
  object-fit: contain;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  overflow-y: auto;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal.active {
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 1;
}

.modal-content {
  background: white;
  border-radius: 20px;
  width: 90%;
  max-width: 900px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2.5rem;
  position: relative;
  animation: modalFadeIn 0.3s ease-out;
  box-shadow: 0 10px 60px rgba(0, 0, 0, 0.2);
}

@keyframes modalFadeIn {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.close-modal {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 300;
  color: #86868b;
  cursor: pointer;
  transition: all 0.2s ease;
  background: rgba(0, 0, 0, 0.05);
  border: none;
  border-radius: 50%;
  padding: 0;
  line-height: 1;
}

.close-modal:hover {
  color: #1d1d1f;
  background: rgba(0, 0, 0, 0.1);
  transform: rotate(90deg);
}

.modal h2 {
  font-size: 2.2rem;
  margin-bottom: 2rem;
  color: #1d1d1f;
  text-align: center;
}

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.modal-image {
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.modal-image video {
  width: 100%;
  height: auto;
  display: block;
}

.modal-text h3 {
  font-size: 1.5rem;
  color: #1d1d1f;
  margin: 1.8rem 0 1rem;
}

.modal-text p {
  color: #424245;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

/* Modal Action Buttons */
.modal-close-btn {
  display: block;
  margin: 2.5rem auto 0;
  padding: 14px 28px;
  font-size: 1.1rem;
  font-weight: 600;
  background: linear-gradient(135deg, #34c759 0%, #2ca74a 100%);
  color: white;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-shadow: 0 4px 12px rgba(52, 199, 89, 0.25);
  position: relative;
  overflow: hidden;
  z-index: 1;
  min-width: 200px;
  text-align: center;
}

.modal-close-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #30d158 0%, #2aa84a 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.modal-close-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(52, 199, 89, 0.3);
}

.modal-close-btn:hover::before {
  opacity: 1;
}

.modal-close-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(52, 199, 89, 0.3);
}

/* Open Modal Button */
.open-modal-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  background: linear-gradient(135deg, #0071e3 0%, #0040d1 100%);
  color: white;
  text-decoration: none;
  border-radius: 30px;
  font-weight: 600;
  font-size: 15px;
  line-height: 1.2;
  letter-spacing: 0.3px;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 113, 227, 0.25);
  margin: 20px 0 0;
  position: relative;
  overflow: hidden;
  z-index: 1;
  min-width: 200px;
  text-align: center;
}

.open-modal-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #0077ed 0%, #0055e6 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.open-modal-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 113, 227, 0.3);
}

.open-modal-btn:hover::before {
  opacity: 1;
}

.open-modal-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(0, 113, 227, 0.3);
}

.open-modal-btn:focus {
  outline: none;
  box-shadow: 0 0 0 4px rgba(0, 125, 250, 0.3);
}

/* Secondary Button Variant */
.btn-secondary {
  background: linear-gradient(135deg, #f5f5f7 0%, #e5e5ea 100%);
  color: #1d1d1f;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-secondary::before {
  background: linear-gradient(135deg, #ffffff 0%, #f5f5f7 100%);
}

.btn-secondary:hover {
  color: #1d1d1f;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

@media (min-width: 768px) {
  .modal-body {
    flex-direction: row;
    align-items: flex-start;
  }
  
  .modal-image {
    flex: 0 0 50%;
  }
  
  .modal-text {
    flex: 1;
    padding-left: 2.5rem;
  }
}

/* Removed duplicate .highlight styles */

.highlight h2 {
  color: #1d1d1f;
  font-size: 3.8rem;
  font-weight: 600;
  margin: 0 0 1.2rem 0;
  line-height: 1.3;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 1rem;
}

.highlight p {
  color: #424245;
  font-size: 1.2rem;
  line-height: 1.6;
  margin-top: 1.5rem;
}

.video-container {
  position: relative;
  width: 100%;
  max-width: 1000px; /* Limit video container width */
  margin: 2rem auto;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.video-container video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Hero Section */
.hero-section {
  padding: 6rem 2rem 4rem;
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.hero-section h2 {
  font-size: 2.0rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin: 0 0 1.2rem;
  background: linear-gradient(90deg, #1d1d1f, #424245);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.1;
}

.section-intro {
  font-size: 2rem;
  color: #86868b;
  font-weight: 400;
  margin: 0 auto 4rem;
  max-width: 800px;
  line-height: 1.3;
}

/* Buttons */
.open-client-btn {
  background: #0071e3;
  color: white;
  border: none;
  border-radius: 980px;
  padding: 14px 32px;
  font-size: 1.2rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
  margin-top: 2.5rem;
  box-shadow: 0 4px 14px rgba(0, 113, 227, 0.2);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.open-client-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #0077ed 0%, #0055e6 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.open-client-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 113, 227, 0.3);
}

.open-client-btn:hover::before {
  opacity: 1;
}

.open-client-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0, 113, 227, 0.2);
  transition: none;
}

.open-client-btn:focus {
  outline: none;
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.3);
}

/* Footer/Hutter */
hutter {
  display: block;
  background: #f5f5f7;
  padding: 3rem 2rem;
  text-align: center;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  margin-top: 4rem;
}

hutter p {
  color: #86868b;
  font-size: 1.0rem;
  line-height: 1.5;
  margin: 0.5rem 0;
}

hutter a {
  color: #0071e3;
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.2s ease;
}

hutter a:hover {
  text-decoration: underline;
  opacity: 0.8;
}

/* Base styles */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Icons', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  margin: 0;
  padding: 0;
  background: #f5f5f7;
  color: #1d1d1f;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Header Section */
.ds-header {
  text-align: center;
  padding: 6rem 2rem 4rem;
  background: linear-gradient(180deg, #f5f5f7 0%, #fff 100%);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
}

.ds-hero-logo {
  width: 100%;
  height: 200%;
  margin-bottom: 1.5rem;
  border-radius: 22%;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

ds-header h1 {
  font-size: 3.5rem;
  font-weight: 700;
  margin: 0.5rem 0;
  letter-spacing: -1px;
}

.ds-tagline {
  font-size: 1.8rem;
  color: #86868b;
  margin: 0.5rem 0 1rem;
  font-weight: 500;
}

.ds-release {
  color: #86868b;
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
}

/* Responsive Design */
@media (min-width: 768px) {
  .galally {
    padding: 2rem;
  }
  
  .highlight {
    flex: 0 0 60%;
    max-width: 60%;
  }
}

@media (min-width: 1024px) {
  .highlight {
    flex: 0 0 45%;
    max-width: 45%;
  }
}

/* Pickramu Content Styles (from Pickramu/viewer/script.js) */
.pickramu-content {
  background: #173c2b;
  border-radius: 12px;
  min-height: 300px;
  max-height: 80vh;
  padding: 24px;
  color: #fff;
  width: 100%;
  box-sizing: border-box;
  word-break: break-word;
  line-height: 1.6;
  overflow-y: auto;
  font-size: 1.6em;
  font-family: "Noto Sans JP", sans-serif;
}

.pickramu-content div {
  margin-bottom: 16px;
}

.pickramu-content .unit-title {
  font-weight: bold;
  font-size: 1.5em;
}

.pickramu-content .chapter-title {
  font-size: 2em;
}

.pickramu-content .question {
  font-size: 1.7em;
  margin: 0.5em 0;
}

.pickramu-content .input-container {
  display: flex;
  margin-top: 2em;
  gap: 1em;
}

.pickramu-content .input-box {
  background-color: #a3b1a6;
  border-radius: 25px;
  padding: 0.8em 2em;
  font-size: 1.6em;
  color: white;
  border: none;
  width: 300px;
}

.pickramu-content .button-next {
  background-color: #33aaff;
  border: none;
  border-radius: 25px;
  padding: 0.5em 0.8em;
  font-size: 1.0em;
  color: white;
  cursor: pointer;
}

.pickramu-content .footer-bar {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 20px;
  background: linear-gradient(to right, #dca10d, #8c5d00);
}

.pickramu-content #n2 {
  display: none;
}

/* Fullscreen support */
.pickramu-content:fullscreen {
  max-width: 100vw;
  max-height: 100vh;
  min-height: 100vh;
  font-size: 2em;
  background: #173c2b;
  overflow-y: auto;
}

.fullscreen-btn {
  position: absolute;
  top: 24px;
  right: 32px;
  background: #222a;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 2em;
  padding: 8px 18px;
  cursor: pointer;
  z-index: 1000;
  box-shadow: 0 2px 8px #0004;
  transition: background 0.2s, box-shadow 0.2s, transform 0.1s;
  outline: none;
}
.fullscreen-btn:hover, .fullscreen-btn:focus {
  background: #444a;
  box-shadow: 0 4px 16px #0006;
  transform: scale(1.08);
}
.fullscreen-btn:active {
  background: #111a;
  box-shadow: 0 1px 4px #0002;
  transform: scale(0.97);
}
.page-container {
  position: relative;
}

/* MathJax styling */
.pickramu-content .MathJax {
  color: #ffd700;
}

/* Responsive design */
@media (max-width: 700px) {
  .pickramu-content {
    padding: 16px;
    font-size: 0.95rem;
  }
  
  .pickramu-content .unit-title {
    font-size: 1.3rem;
  }
  
  .pickramu-content .chapter-title {
    font-size: 1.1rem;
  }
  
  .pickramu-content button {
    padding: 8px 16px;
    font-size: 0.9rem;
  }
} 
/* Apple風のデザイン */
:root {
  --color-bg: #f8f8fa;
  --color-surface: #fff;
  --color-primary: #0071e3;
  --color-secondary: #86868b;
  --color-accent: #34c759;
  --color-text: #1d1d1f;
  --color-muted: #e5e5ea;
  --color-shadow: rgba(60, 60, 67, 0.15);
  --radius-lg: 32px;
  --radius-md: 20px;
  --radius-sm: 12px;
  --shadow-lg: 0 12px 36px var(--color-shadow);
  --shadow-md: 0 6px 18px var(--color-shadow);
  --shadow-sm: 0 2px 8px var(--color-shadow);
  --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-main);
  font-size: 18px;
  line-height: 1.7;
  letter-spacing: 0.01em;
  min-height: 100vh;
}

.header-container {
  background: var(--color-surface);
  box-shadow: var(--shadow-md);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  padding: 48px 24px 32px 24px;
  text-align: center;
  margin-bottom: 32px;
  position: relative;
}

.hero-logo {
  width: 420px;
  height: 420px;
  object-fit: contain;
  margin-bottom: 16px;
}

.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.highlight-container {
  margin-bottom: 32px;
}

.highlight {
  background: var(--color-surface);
  padding: 24px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
  min-width:90%;
}

.highlight h3 {
  font-weight: bold;
  margin-bottom: 8px;
}

.galally {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.galally > div {
  margin: 16px;
}

.video-container {
  margin-bottom: 32px;
}

.video-container video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.footer-container {
  background: var(--color-surface);
  padding: 24px;
  text-align: center;
  margin-top: 32px;
}

.footer-container p {
  margin-bottom: 16px;
}

.footer-container a {
  text-decoration: none;
  color: var(--color-primary);
}

.ds-header {
  background: var(--color-surface);
  box-shadow: var(--shadow-md);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  padding: 48px 24px 32px 24px;
  text-align: center;
  margin-bottom: 32px;
  position: relative;
}

.ds-hero-logo {
  width: 420px;
  height: 420px;
  object-fit: contain;
  margin-bottom: 16px;
}

.mainv {
  object-fit: contain;
  margin-bottom: 16px;
  width: 800px;
}

.ds-header h1 {
  font-size: 2.8rem;
  font-weight: 700;
  margin: 0 0 8px 0;
  letter-spacing: -0.02em;
  color: #0a3a7e;
  text-shadow: 0 2px 8px rgba(0, 113, 227, 0.08);
  background: linear-gradient(90deg, #0071e3 30%, #0a3a7e 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-fill-color: transparent;
}

.ds-tagline {
  font-size: 1.3rem;
  color: var(--color-primary);
  margin: 0 0 8px 0;
  font-weight: 500;
}

.ds-release {
  font-size: 1rem;
  color: var(--color-secondary);
  margin: 0;
}

.ds-main {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 16px 48px 16px;
}

.ds-section {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  margin-bottom: 40px;
  padding: 32px 24px;
  transition: box-shadow 0.2s;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 32px;
}

.ds-section:hover {
  box-shadow: var(--shadow-lg);
}

.ds-section h2,
.ds-section h3,
.ds-section h4 {
  margin-top: 0;
  font-weight: 700;
  color: var(--color-primary);
}

.ds-section h2 {
  font-size: 1.3rem;
}
.ds-section h3 {
  font-size: 1.3rem;
}
.ds-section h4 {
  font-size: 1.1rem;
  color: var(--color-accent);
}

.ds-section p {
  margin: 16px 0 0 0;
  color: var(--color-text);
}

.ds-hero-section {
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: linear-gradient(120deg, #f8f8fa 60%, #e5e5ea 100%);
  box-shadow: var(--shadow-lg);
  padding-top: 48px;
  padding-bottom: 48px;
}

.ds-hero-image {
  width: 220px;
  max-width: 90vw;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  margin-bottom: 32px;
  background: var(--color-bg);
}

.ds-hero-text {
  max-width: 600px;
  margin: 0 auto;
}

.ds-image-section {
  flex-direction: row;
  align-items: center;
  gap: 32px;
}

.ds-section-image {
  width: 180px;
  height: 180px;
  object-fit: cover;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  background: var(--color-bg);
  flex-shrink: 0;
}

.ds-image-section > div {
  flex: 1;
}

.ds-footer {
  text-align: center;
  color: var(--color-secondary);
  font-size: 1rem;
  margin-top: 48px;
  padding: 24px 0 8px 0;
  position: relative;
  padding-top: 48px;
}

.ds-footer small {
  display: block;
  margin-top: 8px;
  color: #444;
  font-weight: 600;
  position: absolute;
  top: -32px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-surface);
  padding: 4px 16px;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  z-index: 2;
}

/* Accessibility: Focus outline */
:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Responsive */
@media (max-width: 900px) {
  .ds-main {
    max-width: 100vw;
  }
  .ds-section {
    flex-direction: column;
    text-align: center;
    gap: 20px;
    padding: 24px 8px;
  }
  .ds-section-image {
    width: 120px;
    height: 120px;
  }
}

@media (max-width: 600px) {
  .ds-header {
    padding: 32px 8px 20px 8px;
  }
  .ds-main {
    padding: 0 2px 32px 2px;
  }
  .ds-section {
    padding: 16px 2px;
  }
  .ds-hero-image {
    width: 90vw;
    max-width: 100vw;
  }
}
.galally {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
}

.galally > .highlight {
  scroll-snap-align: start;
  margin-right: 16px;
}