/* ===== CURSO-UI CSS v5.2.0 | grimoire reader ===== */

:root {
  /* 書庫の闇 — 魔法の光が差す背景 */
  --c-ink: #1a1410;
  --c-ink-soft: #2a2218;
  --c-ink-deep: #120e0a;
  --c-shell: #3d3228;
  --c-vermilion: #9c3828;
  --c-vermilion-soft: #c04a38;
  --c-gold: #a07830;
  --c-gold-bright: #e8c060;
  --c-gold-dim: #7a5c28;
  --c-gold-pale: #f5e6b8;
  /* 古羊皮紙 */
  --c-paper: #f2e4c8;
  --c-paper-mid: #e8d9b8;
  --c-paper-shadow: #d4c098;
  --c-paper-edge: #b89868;
  /* インク */
  --c-ink-text: #2a1810;
  --c-ink-prose: #3d2e22;
  --c-ink-muted: #5c4838;
  --c-ink-faded: #7a6550;
  --c-chrome-text: #f0e6d0;
  --c-chrome-muted: rgba(240, 230, 208, 0.62);
  --c-magic: #6b5a9a;
  --c-magic-glow: rgba(140, 110, 200, 0.18);
  --c-glass: rgba(30, 24, 18, 0.55);
  --c-glass-border: rgba(232, 192, 96, 0.28);
  --c-glass-strong: rgba(26, 20, 16, 0.88);
  --c-glow: rgba(232, 192, 96, 0.32);
  --c-shadow: rgba(8, 4, 0, 0.45);
  --font-ui: 'Noto Sans JP', 'Noto Sans', sans-serif;
  --font-display: 'Cinzel', 'Noto Serif JP', serif;
  --font-display-decor: 'Cinzel Decorative', 'Cinzel', serif;
  --font-prose: 'EB Garamond', 'Noto Serif JP', serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --radius: 18px;
  --radius-sm: 12px;
  --paper-noise: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }

html.curso-active,
body.curso-page {
  overflow: hidden !important;
  height: 100dvh !important;
  background: var(--c-ink);
}

#curso-app {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  flex-direction: column;
  color: var(--c-chrome-text);
  font-family: var(--font-ui);
  padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
  -webkit-tap-highlight-color: transparent;
}

/* animated background — 書庫と星屑 */
.curso-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(140, 110, 200, 0.12), transparent 55%),
    radial-gradient(ellipse 55% 40% at 12% 88%, rgba(232, 192, 96, 0.08), transparent 50%),
    radial-gradient(ellipse 45% 35% at 92% 18%, rgba(192, 74, 56, 0.07), transparent 48%),
    linear-gradient(175deg, #2a2218 0%, var(--c-ink) 45%, var(--c-ink-deep) 100%);
}

.curso-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 12% 22%, rgba(255, 230, 180, 0.55), transparent),
    radial-gradient(1px 1px at 28% 68%, rgba(255, 220, 160, 0.35), transparent),
    radial-gradient(1.5px 1.5px at 44% 14%, rgba(255, 240, 200, 0.5), transparent),
    radial-gradient(1px 1px at 58% 42%, rgba(200, 180, 255, 0.4), transparent),
    radial-gradient(1px 1px at 72% 78%, rgba(255, 220, 160, 0.35), transparent),
    radial-gradient(1.5px 1.5px at 86% 32%, rgba(255, 230, 180, 0.45), transparent),
    radial-gradient(1px 1px at 94% 62%, rgba(200, 180, 255, 0.3), transparent),
    radial-gradient(1px 1px at 8% 88%, rgba(255, 220, 160, 0.3), transparent);
  animation: curso-stardust 12s ease-in-out infinite alternate;
  opacity: 0.7;
}

@keyframes curso-stardust {
  from { opacity: 0.45; transform: translateY(0); }
  to { opacity: 0.85; transform: translateY(-1.5%); }
}

.curso-bg-glow {
  position: absolute;
  width: 120%;
  height: 70%;
  left: -10%;
  top: 10%;
  background:
    radial-gradient(ellipse 50% 40% at 50% 50%, rgba(232, 192, 96, 0.09) 0%, transparent 65%),
    radial-gradient(ellipse 35% 30% at 30% 60%, var(--c-magic-glow) 0%, transparent 70%);
  animation: curso-drift 18s ease-in-out infinite alternate;
}

@keyframes curso-drift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(4%, -3%) scale(1.08); }
}

#curso-app > *:not(.curso-bg) { position: relative; z-index: 1; }

#curso-app.is-ready #curso-boot-msg { display: none; }

.curso-ver {
  position: absolute;
  top: calc(0.4rem + env(safe-area-inset-top));
  right: 0.55rem;
  left: auto;
  z-index: 2147483200;
  padding: 0.18rem 0.45rem;
  border-radius: 999px;
  background: rgba(26, 20, 16, 0.72);
  border: 1px solid rgba(232, 192, 96, 0.2);
  color: rgba(232, 192, 96, 0.55);
  font-size: 0.55rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  pointer-events: none;
}

#curso-boot-msg { margin: auto; color: var(--c-gold); }

/* progress */
.curso-progress {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem 0;
}

.curso-progress[hidden] { display: none !important; }

.curso-progress-track {
  flex: 1;
  height: 3px;
  border-radius: 999px;
  background: rgba(232, 192, 96, 0.12);
  overflow: hidden;
}

.curso-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--c-vermilion), var(--c-gold-bright));
  transition: width 0.45s var(--ease-out);
  box-shadow: 0 0 12px var(--c-glow);
}

.curso-progress-label {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--c-gold);
  min-width: 2rem;
  text-align: right;
}

/* header */
.curso-hd {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem 0.85rem 0.65rem;
}

.curso-hd[hidden] { display: none !important; }

.curso-hd-title {
  flex: 1;
  min-width: 0;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--c-chrome-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.02em;
}

.curso-hd-sub {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.62rem;
  color: var(--c-gold);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 0.1rem;
}

.curso-hd-btn {
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  min-height: 2.75rem;
  padding: 0 0.85rem;
  border: 1px solid var(--c-glass-border);
  border-radius: 999px;
  background: var(--c-glass);
  backdrop-filter: blur(12px);
  color: var(--c-chrome-text);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s var(--ease-spring), border-color 0.2s, background 0.2s;
}

.curso-hd-btn-icon { margin-right: 0.25rem; opacity: 0.85; }

.curso-hd-btn--mini {
  min-height: 2.35rem;
  padding: 0 0.65rem;
  font-size: 0.72rem;
}

.curso-hd-actions {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  max-width: 5.5rem;
}

.curso-hd-exit {
  display: block;
  padding: 0.28rem 0.5rem;
  border-radius: 999px;
  color: var(--c-chrome-muted);
  font-size: 0.6rem;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ripple */
.curso-tap { position: relative; overflow: hidden; }

.curso-ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(250, 244, 232, 0.4);
  transform: scale(0);
  animation: curso-ripple 0.55s ease-out forwards;
  pointer-events: none;
}

@keyframes curso-ripple {
  to { transform: scale(2.5); opacity: 0; }
}

.curso-tap:active { transform: scale(0.97); }

/* start screen */
.curso-start {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.35rem;
  padding: 1.5rem 1.25rem 2rem;
}

.curso-start[hidden] { display: none !important; }

@keyframes curso-fade-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.curso-start-hero { text-align: center; max-width: 360px; }

.curso-start-emblem {
  font-size: 3.2rem;
  line-height: 1;
  margin-bottom: 0.75rem;
  filter: drop-shadow(0 0 28px rgba(232, 192, 96, 0.55)) drop-shadow(0 0 8px var(--c-magic-glow));
  animation: curso-pulse 3s ease-in-out infinite;
}

@keyframes curso-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.06); opacity: 0.9; }
}

.curso-start-title {
  margin: 0 0 0.5rem;
  font-family: var(--font-display-decor);
  font-size: clamp(1.45rem, 6vw, 2rem);
  font-weight: 700;
  background: linear-gradient(135deg, var(--c-gold-pale) 0%, var(--c-gold-bright) 45%, var(--c-gold) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1.35;
  letter-spacing: 0.06em;
  filter: drop-shadow(0 2px 12px rgba(232, 192, 96, 0.25));
}

.curso-start-tagline {
  margin: 0;
  font-size: 0.88rem;
  color: var(--c-chrome-muted);
  line-height: 1.5;
  letter-spacing: 0.04em;
}

.curso-lang {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem 0.5rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius);
  background: var(--c-glass);
  border: 1px solid var(--c-glass-border);
  backdrop-filter: blur(10px);
  font-size: 0.8rem;
}

.curso-lang-label {
  width: 100%;
  text-align: center;
  color: var(--c-chrome-muted);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.curso-lang a {
  color: var(--c-chrome-muted);
  text-decoration: none;
  font-weight: 600;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  transition: background 0.2s, color 0.2s;
}

.curso-lang a.is-active {
  color: var(--c-ink-deep);
  background: linear-gradient(135deg, var(--c-gold-bright), var(--c-gold));
  font-weight: 800;
}

.curso-track-cards {
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.curso-start-btn {
  position: relative;
  overflow: hidden;
  width: 100%;
  padding: 1.15rem 1.25rem;
  border: none;
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(242, 228, 200, 0.08) 0%, rgba(26, 20, 16, 0.4) 100%);
  border: 1px solid var(--c-glass-border);
  color: var(--c-chrome-text);
  text-align: left;
  cursor: pointer;
  box-shadow:
    0 8px 28px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 240, 210, 0.06);
  transition: transform 0.25s var(--ease-spring), box-shadow 0.25s, border-color 0.25s;
}

.curso-start-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, var(--c-gold-bright), transparent 50%, var(--c-vermilion-soft));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.curso-start-btn--alt::before {
  background: linear-gradient(135deg, var(--c-vermilion-soft), transparent 50%, var(--c-gold));
}

.curso-start-btn-kicker {
  display: block;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--c-gold);
  margin-bottom: 0.25rem;
}

.curso-start-btn--alt .curso-start-btn-kicker { color: var(--c-vermilion-soft); }

.curso-start-btn-title {
  display: block;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.3;
}

.curso-start-btn-meta {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.75rem;
  color: var(--c-chrome-muted);
}

.curso-start-exit {
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  color: var(--c-chrome-muted);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.curso-start-exit:hover { color: var(--c-gold); border-color: var(--c-glass-border); }

/* main */
.curso-main {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 0 0.85rem 0.35rem;
}

#curso-app[data-mode="reading"] {
  padding-bottom: calc(5.5rem + env(safe-area-inset-bottom));
}

#curso-app[data-mode="reading"] .curso-main {
  padding-bottom: 0.25rem;
}

.curso-main[hidden] { display: none !important; }

/* book stage — 3D page turn */
.curso-book-stage {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  perspective: 1400px;
  perspective-origin: 50% 42%;
  filter: drop-shadow(0 0 28px rgba(232, 192, 96, 0.12));
}

.curso-book-stage .curso-panel {
  flex: 1;
  min-height: 0;
}

.curso-panel.curso-panel--flipping {
  backface-visibility: hidden;
  transform-style: preserve-3d;
  will-change: transform;
  position: relative;
}

.curso-panel.curso-panel--flipping::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(90deg, rgba(30, 24, 18, 0.16) 0%, transparent 28%);
  animation: curso-flip-shadow 0.44s var(--ease-out) forwards;
}

.curso-panel--flip-out-back.curso-panel--flipping::after,
.curso-panel--flip-in-back.curso-panel--flipping::after {
  background: linear-gradient(270deg, rgba(30, 24, 18, 0.16) 0%, transparent 28%);
}

.curso-panel--flip-out-forward {
  animation: curso-flip-out-fwd 0.44s var(--ease-out) forwards;
  transform-origin: left center;
  z-index: 2;
}

.curso-panel--flip-in-forward {
  animation: curso-flip-in-fwd 0.44s var(--ease-out) forwards;
  transform-origin: left center;
}

.curso-panel--flip-out-back {
  animation: curso-flip-out-back 0.44s var(--ease-out) forwards;
  transform-origin: right center;
  z-index: 2;
}

.curso-panel--flip-in-back {
  animation: curso-flip-in-back 0.44s var(--ease-out) forwards;
  transform-origin: right center;
}

@keyframes curso-flip-out-fwd {
  from { transform: rotateY(0deg); filter: brightness(1); }
  to { transform: rotateY(-86deg); filter: brightness(0.94); }
}

@keyframes curso-flip-in-fwd {
  from { transform: rotateY(86deg); filter: brightness(0.94); }
  to { transform: rotateY(0deg); filter: brightness(1); }
}

@keyframes curso-flip-out-back {
  from { transform: rotateY(0deg); filter: brightness(1); }
  to { transform: rotateY(86deg); filter: brightness(0.94); }
}

@keyframes curso-flip-in-back {
  from { transform: rotateY(-86deg); filter: brightness(0.94); }
  to { transform: rotateY(0deg); filter: brightness(1); }
}

@keyframes curso-flip-shadow {
  0%, 100% { opacity: 0; }
  45%, 55% { opacity: 1; }
}

/* panel — 羊皮紙の魔導書 */
.curso-panel {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  padding: 1.15rem 1.2rem;
  overflow: hidden;
  position: relative;
  isolation: isolate;
}

#curso-app[data-mode="reading"] .curso-panel {
  background:
    linear-gradient(125deg, rgba(255, 248, 230, 0.45) 0%, transparent 38%),
    linear-gradient(180deg, var(--c-paper) 0%, var(--c-paper-mid) 52%, var(--c-paper-shadow) 100%);
  color: var(--c-ink-text);
  box-shadow:
    0 0 0 1px var(--c-paper-edge),
    0 0 0 3px rgba(160, 120, 48, 0.22),
    inset 0 0 0 1px rgba(255, 252, 240, 0.5),
    inset 0 -24px 48px rgba(120, 90, 40, 0.06),
    inset 12px 0 32px rgba(90, 60, 30, 0.04),
    0 24px 56px rgba(0, 0, 0, 0.42),
    0 0 48px rgba(232, 192, 96, 0.1);
}

#curso-app[data-mode="reading"] .curso-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background-image: var(--paper-noise);
  background-size: 180px 180px;
  opacity: 0.35;
  mix-blend-mode: multiply;
  pointer-events: none;
  z-index: 0;
}

#curso-app[data-mode="reading"] .curso-panel::after {
  content: '';
  position: absolute;
  inset: 0.55rem;
  border-radius: calc(var(--radius) - 6px);
  border: 1px solid rgba(160, 120, 48, 0.18);
  pointer-events: none;
  z-index: 0;
  box-shadow: inset 0 0 24px rgba(90, 60, 30, 0.04);
}

#curso-app[data-mode="reading"] .curso-panel > * {
  position: relative;
  z-index: 1;
}

#curso-app[data-mode="index"] .curso-panel,
.curso-panel--index {
  background: transparent;
  box-shadow: none;
  padding: 0;
  overflow-y: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.curso-panel--index::-webkit-scrollbar { display: none; }

.curso-panel-img {
  flex-shrink: 0;
  max-height: 26vh;
  margin-bottom: 0.85rem;
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(30, 24, 18, 0.15);
}

.curso-panel-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.curso-panel-title {
  flex-shrink: 0;
  margin: 0 0 0.75rem;
  padding-bottom: 0.65rem;
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 4.5vw, 1.45rem);
  font-weight: 700;
  color: var(--c-ink-text);
  line-height: 1.4;
  letter-spacing: 0.04em;
  border-bottom: none;
  background:
    linear-gradient(90deg, transparent, rgba(160, 120, 48, 0.35), transparent) bottom / 100% 1px no-repeat;
  position: relative;
}

.curso-panel-title::after {
  content: '◆';
  display: block;
  margin-top: 0.45rem;
  text-align: center;
  font-size: 0.45rem;
  letter-spacing: 0.85em;
  color: rgba(160, 120, 48, 0.45);
  line-height: 1;
}

#curso-app[data-mode="index"] .curso-panel-title { color: var(--c-chrome-text); border-color: var(--c-gold); }

.curso-panel-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
  font-family: var(--font-prose);
  font-size: 1.08rem;
  line-height: 1.92;
  letter-spacing: 0.02em;
  color: var(--c-ink-prose);
  position: relative;
}

/* 章概要（項目メニュー）— 画像固定なし・項目エリア単独スクロールなし */
.curso-panel--overview {
  overflow-x: hidden;
  overflow-y: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
  justify-content: flex-start;
  padding: 0.85rem 0.75rem 0.75rem;
}

.curso-panel--overview::-webkit-scrollbar { display: none; }

.curso-panel--overview .curso-panel-body {
  flex: 0 1 auto;
  overflow: visible;
  min-height: auto;
}

.curso-panel--overview .curso-panel-title {
  font-size: clamp(0.95rem, 3.8vw, 1.1rem);
  margin-bottom: 0.45rem;
  padding-bottom: 0.4rem;
  line-height: 1.35;
}

.curso-overview-thumb {
  width: 88%;
  max-width: 420px;
  margin: 0 auto 0.55rem;
  padding: 0.2rem;
  border-radius: var(--radius-sm);
  background: rgba(30, 24, 18, 0.04);
  box-shadow: inset 0 0 0 1px rgba(30, 24, 18, 0.08);
}

.curso-overview-thumb img {
  width: 100%;
  height: auto;
  max-height: min(22vh, 168px);
  object-fit: contain;
  object-position: center;
  display: block;
}

.curso-overview-intro {
  margin: 0.65rem 0 0.85rem;
  padding: 0 0.2rem;
  font-size: 0.9rem;
  line-height: 1.62;
  color: var(--c-ink-muted);
}

.curso-overview-intro .curso-article p {
  margin: 0 0 0.65rem;
  color: var(--c-ink-muted) !important;
}

.curso-panel--overview .curso-items {
  margin-bottom: 0.25rem;
}

.curso-panel--overview .curso-items li {
  margin-bottom: 0.32rem;
}

.curso-panel--overview .curso-item-btn {
  padding: 0.62rem 0.7rem;
  font-size: 0.92rem;
  font-family: var(--font-prose);
  background: linear-gradient(135deg, rgba(242, 228, 200, 0.55) 0%, rgba(232, 217, 184, 0.35) 100%);
  box-shadow:
    inset 0 0 0 1px rgba(160, 120, 48, 0.25),
    0 2px 8px rgba(40, 28, 16, 0.08);
  border-radius: 8px;
  gap: 0.5rem;
}

.curso-panel--overview .curso-item-btn .label {
  font-size: 0.92rem;
  line-height: 1.45;
  font-weight: 600;
}

.curso-panel--overview .curso-items .num {
  width: 1.75rem;
  height: 1.75rem;
  margin-top: 0.05rem;
  font-size: 0.8rem;
}

.curso-panel--overview .curso-read-nav {
  margin-top: 0.55rem;
  padding-top: 0.5rem;
  gap: 0.45rem;
}

.curso-panel--overview .curso-read-nav-btn {
  min-height: 2.65rem;
  padding: 0.55rem 0.65rem;
  font-size: 0.88rem;
}

.curso-panel--overview .curso-audio-toggle {
  margin-top: 0.45rem;
  padding: 0.4rem 0.75rem;
  font-size: 0.76rem;
}

/* 本文読み — 長文のみスクロール */
.curso-panel--content .curso-panel-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.curso-panel-body::-webkit-scrollbar { display: none; }

.curso-panel-body p,
.curso-panel-body li,
.curso-panel-body div,
.curso-panel-body span { color: var(--c-ink-prose) !important; }

.curso-panel-body .dropcap-paragraph:first-letter {
  float: left;
  font-family: var(--font-display-decor);
  font-size: 3.4em;
  line-height: 0.76;
  padding-right: 0.1em;
  margin-top: 0.04em;
  background: linear-gradient(160deg, var(--c-vermilion-soft) 0%, var(--c-gold-bright) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent !important;
  font-weight: 700;
  filter: drop-shadow(0 1px 2px rgba(160, 80, 40, 0.2));
}

/* 本文 — 画像＋文字（項目内） */
.curso-panel--content .curso-article {
  overflow: hidden;
}

.curso-panel--content .curso-article::after {
  content: '';
  display: table;
  clear: both;
}

.curso-panel--content .curso-content-heading {
  clear: both;
  font-family: var(--font-display);
  color: var(--c-ink-text) !important;
  font-weight: 600;
  font-size: 1.08rem;
  margin: 1.1rem 0 0.55rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(160, 120, 48, 0.2);
  line-height: 1.45;
  letter-spacing: 0.05em;
}

.curso-panel--content .curso-article > .curso-content-heading:first-child,
.curso-panel--content .curso-article > h3:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

/* モバイル：画像を上に小さく → 下に本文 */
.curso-panel--content .curso-float-img {
  width: 58% !important;
  max-width: 220px !important;
  height: auto !important;
  display: block !important;
  float: none !important;
  clear: both;
  margin: 0.65rem auto 0.75rem !important;
  border-radius: 4px;
  padding: 0.28rem;
  background: linear-gradient(145deg, var(--c-paper-shadow), var(--c-paper-mid));
  box-shadow:
    inset 0 0 0 1px rgba(160, 120, 48, 0.35),
    0 6px 20px rgba(40, 28, 16, 0.18);
}

.curso-panel--content .curso-article p {
  clear: none;
  margin: 0 0 0.85rem;
  text-align: left;
}

/* タブレット以上：幅50%で左右交互に回り込み */
@media (min-width: 520px) {
  .curso-panel--content .curso-float-img {
    width: 50% !important;
    max-width: 50% !important;
    margin-top: 0.15rem !important;
    margin-bottom: 0.65rem !important;
  }

  .curso-panel--content .curso-float-img--left {
    float: left !important;
    margin-right: 0.85rem !important;
    margin-left: 0 !important;
    clear: left;
  }

  .curso-panel--content .curso-float-img--right {
    float: right !important;
    margin-left: 0.85rem !important;
    margin-right: 0 !important;
    clear: right;
  }

  .curso-panel--content .curso-content-heading {
    clear: both;
  }
}

/* 画像あり項目 — 「次へ」時のヒーロー → 本文レイアウト */
.curso-reveal-hero {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.25rem 0.85rem;
  background: linear-gradient(168deg, var(--c-paper) 0%, var(--c-paper-mid) 55%, var(--c-paper-shadow) 100%);
  opacity: 0;
  pointer-events: none;
}

.curso-reveal-gradient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 85% 55% at 50% 38%, rgba(196, 146, 58, 0.14), transparent 68%),
    radial-gradient(ellipse 70% 45% at 50% 85%, rgba(184, 72, 64, 0.08), transparent 60%),
    linear-gradient(180deg, transparent 55%, rgba(250, 244, 232, 0.92) 100%);
  pointer-events: none;
}

.curso-reveal-hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
  max-width: 26rem;
}

.curso-reveal-hero.is-active .curso-reveal-hero-inner {
  animation: curso-hero-pop 0.9s var(--ease-out) forwards;
}

.curso-reveal-hero.is-active {
  animation: curso-hero-in 0.55s var(--ease-out) forwards;
}

.curso-reveal-hero.is-settling {
  animation: curso-hero-out 0.78s var(--ease-out) forwards;
}

.curso-reveal-hero-title {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 5.2vw, 1.5rem);
  font-weight: 700;
  color: var(--c-ink-text);
  text-align: center;
  line-height: 1.42;
  padding: 0 0.35rem;
}

.curso-reveal-hero-img {
  width: min(90%, 380px);
  height: auto;
  border-radius: var(--radius-sm);
  box-shadow: 0 14px 44px rgba(30, 24, 18, 0.2);
}

@keyframes curso-hero-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes curso-hero-pop {
  0% {
    opacity: 0;
    transform: scale(1.14) translateY(18px);
    filter: blur(10px);
  }
  55% {
    opacity: 1;
    filter: blur(0);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
    filter: blur(0);
  }
}

@keyframes curso-hero-out {
  from {
    opacity: 1;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(0.94);
  }
}

.curso-panel-title--await {
  visibility: hidden;
}

.curso-panel-title--revealed {
  animation: curso-title-settle 0.65s var(--ease-out) 0.08s both;
}

@keyframes curso-title-settle {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.curso-article--await {
  opacity: 0;
  pointer-events: none;
}

.curso-article--revealed {
  animation: curso-article-in 0.75s var(--ease-out) forwards;
}

@keyframes curso-article-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.curso-article--revealed .curso-reveal-target--left {
  animation: curso-img-settle-left 0.95s var(--ease-out) forwards;
}

.curso-article--revealed .curso-reveal-target--right {
  animation: curso-img-settle-right 0.95s var(--ease-out) forwards;
}

@keyframes curso-img-settle-left {
  0% {
    opacity: 0;
    transform: scale(1.12) translateX(12%);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateX(0);
  }
}

@keyframes curso-img-settle-right {
  0% {
    opacity: 0;
    transform: scale(1.12) translateX(-12%);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateX(0);
  }
}

.curso-article--revealed p {
  animation: curso-text-in 0.55s var(--ease-out) both;
  animation-delay: calc(0.12s + var(--i, 0) * 0.05s);
}

.curso-article--revealed .curso-content-heading {
  animation: curso-text-in 0.55s var(--ease-out) 0.06s both;
}

@keyframes curso-text-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 章切り替え — フルスクリーン・スプラッシュ */
.curso-chapter-splash {
  position: fixed;
  inset: 0;
  z-index: 2147483100;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  padding: env(safe-area-inset-top) 1rem env(safe-area-inset-bottom);
}

.curso-chapter-splash-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(148deg, #2a1810 0%, #4a2418 28%, #7a3828 52%, #a84838 72%, #c9bba8 100%);
  transform: scale(1.15);
  opacity: 0;
}

.curso-chapter-splash-rays {
  position: absolute;
  width: 220%;
  height: 220%;
  left: -60%;
  top: -60%;
  background: conic-gradient(
    from 0deg,
    transparent 0deg,
    rgba(196, 146, 58, 0.18) 40deg,
    transparent 80deg,
    rgba(255, 220, 160, 0.12) 120deg,
    transparent 160deg,
    rgba(184, 72, 64, 0.14) 200deg,
    transparent 240deg,
    rgba(196, 146, 58, 0.16) 300deg,
    transparent 360deg
  );
  opacity: 0;
}

.curso-chapter-splash-ring {
  position: absolute;
  width: min(92vw, 420px);
  height: min(92vw, 420px);
  border-radius: 50%;
  border: 2px solid rgba(196, 146, 58, 0.35);
  box-shadow:
    0 0 60px rgba(196, 146, 58, 0.25),
    inset 0 0 40px rgba(255, 220, 160, 0.08);
  opacity: 0;
  transform: scale(0.4);
}

.curso-chapter-splash-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  padding: 1.5rem 1.25rem;
  max-width: 22rem;
  text-align: center;
}

.curso-chapter-splash.is-active {
  animation: curso-splash-wrap-in 0.45s var(--ease-out) forwards;
}

.curso-chapter-splash.is-active .curso-chapter-splash-bg {
  animation: curso-splash-bg-in 1.15s var(--ease-out) forwards;
}

.curso-chapter-splash.is-active .curso-chapter-splash-rays {
  animation: curso-splash-rays-in 1.1s var(--ease-out) forwards, curso-splash-spin 14s linear 0.8s infinite;
}

.curso-chapter-splash.is-active .curso-chapter-splash-ring {
  animation: curso-splash-ring-in 1.25s var(--ease-out) 0.15s forwards, curso-splash-ring-pulse 2.4s ease-in-out 1.4s infinite;
}

.curso-chapter-splash.is-active .curso-chapter-splash-badge {
  animation: curso-splash-badge-in 0.85s var(--ease-out) 0.35s both;
}

.curso-chapter-splash.is-active .curso-chapter-splash-num {
  animation: curso-splash-num-in 1.05s var(--ease-out) 0.2s both;
}

.curso-chapter-splash.is-active .curso-chapter-splash-title {
  animation: curso-splash-title-in 0.95s var(--ease-out) 0.55s both;
}

.curso-chapter-splash.is-active .curso-chapter-splash-img {
  animation: curso-splash-img-in 1.1s var(--ease-out) 0.75s both;
}

.curso-chapter-splash.is-exiting {
  animation: curso-splash-wrap-out 0.92s var(--ease-out) forwards;
}

.curso-chapter-splash-badge {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--c-gold-bright);
  background: rgba(20, 12, 8, 0.45);
  border: 1px solid rgba(196, 146, 58, 0.55);
  padding: 0.38rem 0.95rem;
  border-radius: 999px;
  box-shadow: 0 0 24px rgba(196, 146, 58, 0.35);
}

.curso-chapter-splash-num {
  font-family: var(--font-display);
  font-size: clamp(4.5rem, 24vw, 7.5rem);
  font-weight: 700;
  line-height: 0.95;
  color: rgba(255, 250, 242, 0.98);
  text-shadow:
    0 4px 0 rgba(196, 146, 58, 0.35),
    0 12px 40px rgba(0, 0, 0, 0.45);
  letter-spacing: -0.02em;
}

.curso-chapter-splash-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 5.5vw, 1.75rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.38;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  max-width: 16em;
}

.curso-chapter-splash-img {
  width: min(94%, 400px);
  height: auto;
  max-height: min(46vh, 360px);
  object-fit: cover;
  margin-top: 0.5rem;
  border-radius: var(--radius-sm);
  border: 3px solid rgba(196, 146, 58, 0.5);
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.45),
    0 0 0 6px rgba(196, 146, 58, 0.12);
}

.curso-panel--chapter-await {
  opacity: 0;
  pointer-events: none;
}

.curso-panel--chapter-revealed {
  animation: curso-panel-chapter-in 0.85s var(--ease-out) forwards;
}

@keyframes curso-splash-wrap-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes curso-splash-wrap-out {
  from {
    opacity: 1;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(1.06);
  }
}

@keyframes curso-splash-bg-in {
  0% {
    opacity: 0;
    transform: scale(1.2);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes curso-splash-rays-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes curso-splash-spin {
  to { transform: rotate(360deg); }
}

@keyframes curso-splash-ring-in {
  0% {
    opacity: 0;
    transform: scale(0.35);
  }
  70% {
    opacity: 1;
    transform: scale(1.08);
  }
  100% {
    opacity: 0.75;
    transform: scale(1);
  }
}

@keyframes curso-splash-ring-pulse {
  0%, 100% {
    opacity: 0.55;
    transform: scale(1);
  }
  50% {
    opacity: 0.85;
    transform: scale(1.04);
  }
}

@keyframes curso-splash-badge-in {
  0% {
    opacity: 0;
    transform: translateY(-20px) scale(0.8);
    letter-spacing: 0.6em;
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    letter-spacing: 0.32em;
  }
}

@keyframes curso-splash-num-in {
  0% {
    opacity: 0;
    transform: scale(2.4) translateY(30px);
    filter: blur(16px);
  }
  55% {
    opacity: 1;
    filter: blur(0);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
    filter: blur(0);
  }
}

@keyframes curso-splash-title-in {
  0% {
    opacity: 0;
    transform: translateY(28px);
    filter: blur(8px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@keyframes curso-splash-img-in {
  0% {
    opacity: 0;
    transform: scale(1.35) rotate(-3deg);
    filter: blur(10px) brightness(1.3);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0);
    filter: blur(0) brightness(1);
  }
}

@keyframes curso-panel-chapter-in {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.curso-content-img,
.curso-panel-body img {
  border-radius: var(--radius-sm);
}

.curso-panel-body h3,
.curso-panel-body h4 {
  font-family: var(--font-display);
  color: var(--c-ink-text) !important;
  font-weight: 700;
}

/* chapter index */
.curso-chapter-index { padding: 0.25rem 0 1.5rem; }

.curso-index-heading {
  margin: 0 0 1.25rem;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 5vw, 1.6rem);
  font-weight: 700;
  color: var(--c-vermilion);
  text-align: center;
  line-height: 1.4;
}

.curso-chapter-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.curso-chapter-list li {
  animation: none;
}

@keyframes curso-stagger {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.curso-chapter-btn {
  display: flex;
  gap: 0.85rem;
  align-items: center;
  width: 100%;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(143, 115, 64, 0.18);
  border-radius: var(--radius);
  background: var(--c-glass);
  backdrop-filter: blur(8px);
  color: var(--c-chrome-text);
  font-size: 0.92rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 3px 14px var(--c-shadow);
  transition: transform 0.22s var(--ease-spring), border-color 0.2s, background 0.2s;
}

.curso-chapter-btn.is-current {
  border-color: var(--c-gold);
  background: rgba(212, 168, 83, 0.12);
  box-shadow: 0 0 24px rgba(212, 168, 83, 0.15);
}

.curso-chapter-num {
  flex-shrink: 0;
  width: 2.35rem;
  height: 2.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, var(--c-gold-bright), var(--c-gold-dim));
  color: var(--c-ink-deep);
  font-weight: 800;
  border-radius: 50%;
  font-family: var(--font-display);
  font-size: 0.95rem;
  box-shadow:
    0 0 0 1px rgba(255, 240, 200, 0.35),
    0 4px 14px rgba(232, 192, 96, 0.35);
}

.curso-chapter-label {
  flex: 1;
  line-height: 1.45;
  font-family: var(--font-display);
  font-size: 1rem;
}

.curso-chapter-arrow {
  flex-shrink: 0;
  font-size: 1.4rem;
  color: var(--c-gold);
  opacity: 0.7;
  transition: transform 0.2s var(--ease-spring);
}

.curso-chapter-btn:active .curso-chapter-arrow { transform: translateX(4px); }

/* items */
.curso-items {
  list-style: none;
  padding: 0;
  margin: 0 0 0.75rem;
}

.curso-items li {
  margin-bottom: 0.45rem;
  animation: none;
}

.curso-item-btn {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  width: 100%;
  padding: 0.85rem 0.9rem;
  border: none;
  border-radius: var(--radius-sm);
  background: rgba(30, 24, 18, 0.06);
  color: var(--c-ink-text);
  font-size: 0.98rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(30, 24, 18, 0.08);
  transition: transform 0.2s var(--ease-spring), background 0.2s, box-shadow 0.2s;
}

.curso-item-btn:active {
  background: rgba(194, 58, 58, 0.08);
  box-shadow: inset 0 0 0 2px rgba(194, 58, 58, 0.25);
}

.curso-item-btn .label {
  flex: 1;
  min-width: 0;
  line-height: 1.55;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.curso-items .num {
  flex-shrink: 0;
  width: 1.85rem;
  height: 1.85rem;
  margin-top: 0.05rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #3d2818 0%, #2a1810 100%);
  color: #f5e6b8;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.82rem;
  line-height: 1;
  border-radius: 50%;
  border: 1.5px solid var(--c-gold-bright);
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 240, 210, 0.15);
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.35);
}

.curso-panel--overview .curso-items .num {
  width: 1.75rem;
  height: 1.75rem;
  font-size: 0.8rem;
}

.curso-item-arrow {
  flex-shrink: 0;
  align-self: center;
  color: var(--c-vermilion);
  font-size: 1.15rem;
  opacity: 0.55;
  padding-left: 0.15rem;
}

.curso-items-hint {
  font-size: 0.75rem;
  color: var(--c-ink-muted);
  margin: 0 0 0.65rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.curso-empty-hint { color: var(--c-ink-muted); font-size: 0.9rem; }

.curso-video-link--intro {
  display: block;
  text-align: center;
  padding: 1rem;
  margin: 0 0 1.25rem;
  border-radius: var(--radius);
  background: var(--c-glass);
  border: 1px solid var(--c-glass-border);
  font-weight: 700;
  text-decoration: none;
  color: var(--c-gold-bright);
  backdrop-filter: blur(10px);
}

.curso-continue-btn {
  display: block;
  width: 100%;
  margin: 1.25rem 0 0;
  padding: 1rem;
  border: none;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--c-vermilion), #9a2828);
  color: #fff;
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
  text-align: center;
  letter-spacing: 0.04em;
  box-shadow: 0 8px 24px rgba(194, 58, 58, 0.35);
  transition: transform 0.2s var(--ease-spring), box-shadow 0.2s;
}

.curso-continue-btn:active {
  transform: scale(0.98);
  box-shadow: 0 4px 12px rgba(194, 58, 58, 0.3);
}

/* in-panel nav — always visible after scrolling content */
.curso-read-nav {
  flex-shrink: 0;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 0.65rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 2px solid rgba(194, 58, 58, 0.2);
}

.curso-read-nav-btn {
  min-height: 3.25rem;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: transform 0.2s var(--ease-spring), opacity 0.2s;
}

.curso-read-nav-btn--prev {
  background: rgba(30, 24, 18, 0.08);
  color: var(--c-ink-muted);
  box-shadow: inset 0 0 0 1px rgba(30, 24, 18, 0.12);
}

.curso-read-nav-btn--next {
  background: linear-gradient(135deg, var(--c-vermilion), #9a2828);
  color: #fff;
  box-shadow: 0 6px 20px rgba(194, 58, 58, 0.4);
}

.curso-read-nav-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none;
}

.curso-read-nav-btn--next:disabled {
  background: rgba(30, 24, 18, 0.1);
  color: var(--c-ink-muted);
}

.curso-audio-toggle {
  flex-shrink: 0;
  margin-top: 0.65rem;
  padding: 0.55rem 1rem;
  border: none;
  border-radius: 999px;
  background: rgba(30, 24, 18, 0.08);
  color: var(--c-ink-muted);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.curso-audio-wrap { margin-top: 0.4rem; }
.curso-audio-wrap[hidden] { display: none !important; }
.curso-audio-wrap audio { width: 100%; }

/* footer — fixed so always on screen */
.curso-ft {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  flex-shrink: 0;
  padding: 0.55rem 0.85rem calc(0.75rem + env(safe-area-inset-bottom));
  z-index: 2147483050;
  pointer-events: none;
}

.curso-ft[hidden] { display: none !important; }

.curso-ft-pill {
  pointer-events: auto;
  display: grid;
  grid-template-columns: 1fr auto 1.2fr;
  gap: 0.45rem;
  align-items: center;
  padding: 0.4rem;
  border-radius: 999px;
  background: var(--c-glass-strong);
  backdrop-filter: blur(20px);
  border: 1px solid var(--c-glass-border);
  box-shadow: 0 -4px 28px var(--c-shadow), 0 0 0 1px rgba(201, 164, 92, 0.12);
}

.curso-ft-btn {
  min-height: 3.25rem;
  padding: 0 1rem;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--c-chrome-text);
  font-size: 0.92rem;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s var(--ease-spring);
}

.curso-ft-btn--next {
  justify-self: stretch;
  background: linear-gradient(135deg, var(--c-gold-bright), var(--c-gold));
  color: var(--c-ink-deep);
  padding: 0 1.35rem;
  font-size: 1rem;
  box-shadow: 0 4px 20px var(--c-glow);
}

.curso-ft-btn--prev { justify-self: start; color: var(--c-chrome-muted); }

.curso-ft-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none !important;
}

.curso-ft-btn--next:disabled {
  background: rgba(58, 50, 41, 0.08);
  color: var(--c-chrome-muted);
  box-shadow: none;
}

.curso-ft-count {
  text-align: center;
  font-weight: 700;
  color: var(--c-gold);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

/* mobile — wider item list, panel flush to bottom */
@media (max-width: 768px) {
  /* 固定フッター分の余白をやめ、パネル内ナビだけ使う */
  #curso-app[data-mode="reading"] {
    padding-bottom: 0;
  }

  #curso-app[data-mode="reading"] .curso-ft {
    display: none !important;
  }

  #curso-app[data-mode="reading"] .curso-main {
    padding-left: 0;
    padding-right: 0;
    padding-bottom: 0;
  }

  #curso-app[data-mode="reading"] .curso-panel {
    padding: 0.75rem 0.55rem calc(0.25rem + env(safe-area-inset-bottom));
    border-radius: 12px 12px 0 0;
  }

  .curso-read-nav {
    margin-top: 0.65rem;
    padding-top: 0.55rem;
    margin-bottom: 0;
  }

  .curso-read-nav-btn {
    min-height: 2.85rem;
    padding: 0.6rem 0.75rem;
    font-size: 0.92rem;
  }

  .curso-panel-title {
    font-size: 1.05rem;
    padding-left: 0.15rem;
    padding-right: 0.15rem;
    word-break: break-word;
  }

  .curso-panel-body {
    padding-left: 0.1rem;
    padding-right: 0.1rem;
  }

  .curso-items {
    margin-left: 0;
    margin-right: 0;
  }

  .curso-item-btn {
    padding: 0.9rem 0.65rem;
    gap: 0.5rem;
    border-radius: 10px;
  }

  .curso-item-btn .label {
    font-size: 1rem;
    line-height: 1.6;
  }

  .curso-panel--overview .curso-overview-thumb {
    width: 92%;
  }

  .curso-panel--overview .curso-overview-thumb img {
    max-height: min(20vh, 150px);
  }

  .curso-overview-intro {
    font-size: 0.88rem;
    margin: 0.5rem 0 0.75rem;
  }

  .curso-chapter-splash {
    padding:
      calc(env(safe-area-inset-top) + 6vh)
      1rem
      calc(20vh + env(safe-area-inset-bottom))
      1rem;
  }

  .curso-chapter-splash-inner {
    max-width: 20rem;
    gap: 0.55rem;
    transform: translateY(-4vh);
  }

  .curso-chapter-splash-img {
    width: min(92%, 340px);
    max-height: min(40vh, 320px);
    object-fit: cover;
  }

  .curso-chapter-splash-ring {
    width: min(88vw, 360px);
    height: min(88vw, 360px);
  }

  .curso-chapter-splash-title {
    font-size: clamp(1.05rem, 4.8vw, 1.45rem);
  }

  .curso-panel--overview .curso-item-btn {
    padding: 0.58rem 0.6rem;
  }

  .curso-panel--overview .curso-item-btn .label {
    font-size: 0.88rem;
    line-height: 1.42;
  }

  .curso-panel--overview .curso-items .num {
    width: 1.45rem;
    height: 1.45rem;
    font-size: 0.72rem;
  }

  .curso-items .num {
    width: 1.65rem;
    height: 1.65rem;
    font-size: 0.78rem;
  }

  .curso-item-arrow {
    display: none;
  }

  .curso-read-nav {
    margin-left: 0;
    margin-right: 0;
    gap: 0.5rem;
  }

  .curso-chapter-btn {
    padding: 0.9rem 0.75rem;
  }

  .curso-chapter-label {
    min-width: 0;
    word-break: break-word;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .curso-reveal-hero { display: none !important; }
  .curso-chapter-splash { display: none !important; }
  .curso-article--await { opacity: 1 !important; pointer-events: auto !important; }
  .curso-panel-title--await { visibility: visible !important; }
  .curso-panel--chapter-await { opacity: 1 !important; pointer-events: auto !important; }
  .curso-panel--flipping,
  .curso-panel--flip-out-forward,
  .curso-panel--flip-out-back,
  .curso-panel--flip-in-forward,
  .curso-panel--flip-in-back {
    animation: none !important;
    transform: none !important;
  }
}
