/* ============================================================
   Cherry Tale — fairytale storybook theme
   Light scheme: ivory cream, cherry red, antique gold, plum ink
   External stylesheet only; no inline styles anywhere in HTML.
   ============================================================ */

:root {
  --cream: #fbf5ec;
  --cream-2: #f7ecdc;
  --paper: #fffdf8;
  --cherry: #b3273f;
  --cherry-dark: #8e1d31;
  --gold: #c9963f;
  --gold-soft: #e9d5ae;
  --plum: #46253a;
  --ink: #3d2b33;
  --muted: #7c6170;
  --pink: #f6dde3;
  --shadow: 0 10px 30px rgba(70, 37, 58, 0.10);
  --radius: 18px;
  --serif: Georgia, "Times New Roman", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
          "Noto Sans JP", "Noto Sans", Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background-color: var(--cream);
  background-image:
    radial-gradient(circle at 12% 8%, rgba(182, 39, 63, 0.05) 0, transparent 34%),
    radial-gradient(circle at 88% 22%, rgba(201, 150, 63, 0.07) 0, transparent 30%),
    radial-gradient(circle at 50% 100%, rgba(246, 221, 227, 0.5) 0, transparent 45%);
  background-attachment: fixed;
  line-height: 1.7;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

/* subtle cherry-blossom sprinkle on hero only */
.hero {
  background:
    radial-gradient(circle at 1px 1px, rgba(179, 39, 63, 0.16) 1px, transparent 1.6px) 0 0 / 46px 46px,
    linear-gradient(160deg, #fdf6ec 0%, #f9e8e6 55%, #f3e3cd 100%);
  border-bottom: 3px solid var(--gold-soft);
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  right: -120px;
  top: -120px;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(246, 221, 227, 0.85) 0%, transparent 65%);
  pointer-events: none;
}

.container {
  width: min(1120px, 92%);
  margin-inline: auto;
}

a { color: var(--cherry); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 245, 236, 0.94);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--gold-soft);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
}

.brand {
  font-family: var(--serif);
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--cherry);
  white-space: nowrap;
}
.brand span { color: var(--plum); }
.brand:hover { text-decoration: none; }

.main-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.main-nav a:not(.btn) {
  color: var(--plum);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 8px 12px;
  border-radius: 999px;
}
.main-nav a:not(.btn):hover {
  background: var(--pink);
  color: var(--cherry-dark);
  text-decoration: none;
}

.btn {
  display: inline-block;
  font-weight: 700;
  font-size: 0.98rem;
  border-radius: 999px;
  padding: 11px 26px;
  text-align: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  cursor: pointer;
}
.btn:hover { text-decoration: none; }

.btn-play {
  background: linear-gradient(180deg, #c93753 0%, var(--cherry) 100%);
  color: #fff;
  box-shadow: 0 6px 16px rgba(179, 39, 63, 0.35);
}
.btn-play:hover {
  background: linear-gradient(180deg, var(--cherry) 0%, var(--cherry-dark) 100%);
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(179, 39, 63, 0.4);
}

.btn-gold {
  background: linear-gradient(180deg, #e0b968 0%, var(--gold) 100%);
  color: #4a2c12;
  box-shadow: 0 6px 16px rgba(201, 150, 63, 0.35);
}
.btn-gold:hover {
  background: linear-gradient(180deg, var(--gold) 0%, #b07f2e 100%);
  transform: translateY(-2px);
}

.nav-toggle {
  display: none;
  background: none;
  border: 2px solid var(--cherry);
  border-radius: 10px;
  width: 46px;
  height: 42px;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--cherry);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--cherry);
  color: #fff;
  padding: 10px 18px;
  border-radius: 0 0 10px 0;
  z-index: 99;
}
.skip-link:focus { left: 0; }

/* ---------- hero (index) ---------- */
.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 44px;
  align-items: center;
  padding: 64px 0 72px;
}

.hero h1 {
  font-family: var(--serif);
  font-size: clamp(2.1rem, 4.6vw, 3.4rem);
  line-height: 1.12;
  color: var(--plum);
  margin-bottom: 18px;
}
.hero h1 em {
  font-style: normal;
  color: var(--cherry);
}

.hero-tagline {
  font-size: 1.12rem;
  color: var(--muted);
  max-width: 34em;
  margin-bottom: 28px;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-figure {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 6px solid #fff;
  transform: rotate(1.2deg);
}
.hero-figure img { width: 100%; object-fit: cover; }

/* ---------- hero-subpage ---------- */
.hero-subpage {
  background:
    radial-gradient(circle at 1px 1px, rgba(179, 39, 63, 0.14) 1px, transparent 1.6px) 0 0 / 46px 46px,
    linear-gradient(160deg, #fdf6ec 0%, #f9e8e6 60%, #f3e3cd 100%);
  border-bottom: 3px solid var(--gold-soft);
  padding: 46px 0 40px;
}
.hero-subpage h1 {
  font-family: var(--serif);
  font-size: clamp(1.9rem, 4vw, 2.9rem);
  color: var(--plum);
  margin-bottom: 12px;
}
.hero-subpage .lead {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 46em;
}

/* ---------- sections ---------- */
.section { padding: 56px 0; }
.section-alt { background: rgba(255, 253, 248, 0.72); border-block: 1px solid var(--gold-soft); }

.section h2 {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  color: var(--plum);
  margin-bottom: 10px;
  position: relative;
  padding-left: 20px;
}
.section h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.32em;
  bottom: 0.32em;
  width: 6px;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--cherry), var(--gold));
}
.section h3 {
  font-family: var(--serif);
  font-size: 1.28rem;
  color: var(--cherry-dark);
  margin: 26px 0 10px;
}
.section p { margin-bottom: 16px; max-width: 68ch; }
.section ul { margin: 0 0 16px 22px; }
.section li { margin-bottom: 8px; }

.lead { font-size: 1.08rem; }

/* ---------- facts table ---------- */
.facts-wrap { overflow-x: auto; }
.facts {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  font-size: 0.98rem;
}
.facts th {
  background: linear-gradient(180deg, var(--cherry) 0%, var(--cherry-dark) 100%);
  color: #fff;
  text-align: left;
  padding: 13px 18px;
  font-family: var(--serif);
  letter-spacing: 0.04em;
  font-size: 1.02rem;
}
.facts td { padding: 13px 18px; border-top: 1px solid var(--gold-soft); vertical-align: top; }
.facts tr:nth-child(even) td { background: rgba(246, 221, 227, 0.28); }
.facts td:first-child { font-weight: 700; color: var(--plum); width: 30%; }

/* ---------- feature cards ---------- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 26px;
}
.feature-card {
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px 24px;
  border-top: 4px solid var(--gold);
  position: relative;
}
.feature-card::before {
  content: "◆";
  position: absolute;
  top: -14px;
  right: 20px;
  color: var(--cherry);
  font-size: 1.1rem;
  background: var(--paper);
  padding: 0 6px;
}
.feature-card h3 {
  font-family: var(--serif);
  color: var(--cherry-dark);
  font-size: 1.2rem;
  margin: 0 0 8px;
}
.feature-card p { color: var(--muted); font-size: 0.97rem; margin: 0; }

/* ---------- gallery ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 26px;
}
.gallery-item {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 4px solid #fff;
  background: var(--paper);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  cursor: zoom-in;
}
.gallery-item:hover {
  transform: translateY(-5px) rotate(-0.6deg);
  box-shadow: 0 16px 34px rgba(70, 37, 58, 0.18);
}
.gallery-item img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }

/* ---------- lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(30, 14, 24, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 24px;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: min(1100px, 94vw);
  max-height: 86vh;
  border-radius: 12px;
  border: 4px solid #fff;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 26px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}
.lightbox-close:hover { background: var(--cherry); border-color: var(--cherry); }

/* ---------- quotes ---------- */
.quotes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 26px;
}
blockquote.quote {
  background: var(--paper);
  border-left: 5px solid var(--gold);
  border-radius: 0 var(--radius) var(--radius) 0;
  box-shadow: var(--shadow);
  padding: 22px 22px 14px;
  font-style: italic;
  color: var(--plum);
}
blockquote.quote p { margin: 0 0 10px; }
footer.quote-author {
  font-style: normal;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--cherry);
}

/* ---------- CTA banner ---------- */
.cta-banner {
  background:
    radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.5) 1px, transparent 1.6px) 0 0 / 34px 34px,
    linear-gradient(135deg, var(--cherry) 0%, #a4253f 55%, var(--plum) 130%);
  border-radius: var(--radius);
  padding: 44px 40px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
  flex-wrap: wrap;
  box-shadow: 0 18px 40px rgba(143, 29, 49, 0.35);
}
.cta-banner h2 {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
  color: #fff;
  margin-bottom: 6px;
}
.cta-banner p { color: #ffe9ee; margin: 0; }

/* ---------- story/character/guide prose images ---------- */
.figure-img {
  margin: 26px 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 5px solid #fff;
  transform: rotate(-0.6deg);
}
.figure-img.right { float: right; width: min(420px, 48%); margin: 6px 0 18px 26px; transform: rotate(0.8deg); }
.figure-img.left { float: left; width: min(420px, 48%); margin: 6px 26px 18px 0; transform: rotate(-0.8deg); }
.figure-img figcaption {
  font-size: 0.88rem;
  color: var(--muted);
  padding: 10px 14px;
  background: var(--paper);
  font-style: italic;
}

/* ---------- FAQ ---------- */
.faq-list { margin-top: 26px; display: grid; gap: 14px; }
.faq-item {
  background: var(--paper);
  border-radius: 14px;
  box-shadow: var(--shadow);
  border: 1px solid var(--gold-soft);
  overflow: hidden;
}
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 20px;
  font-weight: 700;
  color: var(--plum);
  font-size: 1.02rem;
  position: relative;
  padding-right: 44px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--cherry);
  font-size: 1.5rem;
  line-height: 1;
  font-weight: 400;
  transition: transform 0.2s ease;
}
.faq-item[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq-item[open] summary { color: var(--cherry-dark); }
.faq-body { padding: 0 20px 18px; color: var(--muted); }
.faq-body p { margin-bottom: 10px; }
.faq-body p:last-child { margin-bottom: 0; }

/* ---------- footer ---------- */
.site-footer {
  background: linear-gradient(180deg, #4a2035 0%, #331524 100%);
  color: #e8d5dd;
  padding: 34px 0 30px;
  margin-top: 30px;
  text-align: center;
}
.site-footer .copyright { font-size: 0.9rem; margin-bottom: 14px; opacity: 0.9; }
.lang-switch {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.lang-switch a {
  color: #f4e3ea;
  border: 1px solid rgba(244, 227, 234, 0.35);
  border-radius: 999px;
  padding: 5px 14px;
  font-size: 0.88rem;
}
.lang-switch a:hover { background: rgba(255, 255, 255, 0.12); text-decoration: none; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .features-grid, .quotes-grid, .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-inner { grid-template-columns: 1fr; padding: 44px 0 52px; }
  .hero-figure { transform: none; order: -1; }
}

@media (max-width: 768px) {
  body { font-size: 16px; }
  .nav-toggle { display: flex; }
  .main-nav {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    background: var(--paper);
    border-bottom: 2px solid var(--gold-soft);
    box-shadow: 0 24px 40px rgba(70, 37, 58, 0.16);
    padding: 14px 6% 20px;
    display: none;
  }
  .main-nav.open { display: flex; }
  .main-nav a:not(.btn) { padding: 11px 14px; }
  .main-nav .btn { text-align: center; margin-top: 8px; }
  .section { padding: 42px 0; }
  .cta-banner { padding: 34px 26px; }
  .figure-img.right, .figure-img.left { float: none; width: 100%; margin: 18px 0; }
}

@media (max-width: 480px) {
  .features-grid, .quotes-grid, .gallery-grid { grid-template-columns: 1fr; }
  .hero-actions .btn { width: 100%; }
  .facts td:first-child { width: 42%; }
  .cta-banner .btn { width: 100%; }
  .hero-subpage { padding: 34px 0 30px; }
}

/* ---------- a11y ---------- */
:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
  border-radius: 6px;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
