/* ==========================================================================
   Kanji symbol pages — shared stylesheet
   ========================================================================== */

.kanji-hero {
  background: linear-gradient(145deg, #1a1410 0%, #0a0806 100%);
  color: #fff;
  padding: 3.5rem 0 3rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.kanji-hero-bg {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(14rem, 35vw, 22rem);
  color: rgba(255,255,255,0.03);
  font-weight: 400;
  pointer-events: none;
  user-select: none;
  line-height: 1;
}
.kanji-hero .container { position: relative; }
.kanji-eyebrow {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(255,255,255,0.45);
  margin-bottom: 1.25rem;
}
.kanji-hero-char {
  font-size: clamp(5.5rem, 16vw, 9.5rem);
  line-height: 1;
  color: #fff;
  font-weight: 400;
  margin: 0.15rem 0 0.6rem;
  text-shadow: 0 6px 30px rgba(0,0,0,0.35);
  display: block;
}
.kanji-hero-romaji {
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  font-weight: 800;
  color: #e8c49a;
  letter-spacing: 0.07em;
}
.kanji-hero-tagline {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.5);
  font-weight: 600;
  letter-spacing: 0.07em;
  margin-top: 0.4rem;
  text-transform: uppercase;
}

/* Body */
.kanji-body {
  padding: 3.5rem 0 5rem;
  background: var(--color-bg);
}
.kanji-body .inner { max-width: 760px; }

/* ── Reference layout: stacked rows with dividers ── */
.kanji-info-grid {
  display: block;
  margin-bottom: 0;
}

.k-card {
  padding: 1.5rem 0;
  background: none;
  border: none;
  border-bottom: 1px solid var(--color-border);
  border-radius: 0;
}

.k-card-label {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-text-muted);
  margin-bottom: 0.8rem;
  line-height: 1;
}

.readings-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.readings-list li {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  flex-wrap: wrap;
}
.r-type {
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: 0.1rem 0.45rem;
  white-space: nowrap;
  flex-shrink: 0;
}
.r-val {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-primary);
}
.r-kana {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  font-weight: 500;
}

.meaning-text {
  font-size: 1rem;
  color: var(--color-text-muted);
  line-height: 1.85;
  font-weight: 500;
}

/* ── Example words: flat rows ── */
.kanji-examples {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 0;
}
.section-label {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-text-muted);
  margin-bottom: 0.75rem;
  line-height: 1;
}
.examples-grid {
  display: flex;
  flex-direction: column;
}
.ex-card {
  display: grid;
  grid-template-columns: minmax(70px, auto) minmax(80px, auto) 1fr;
  align-items: baseline;
  column-gap: 1.5rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--color-border);
  background: none;
  border-radius: 0;
  transition: none;
}
.ex-card:last-child { border-bottom: none; }
.ex-card:hover { background: none; }
.ex-kanji {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 0;
}
.ex-reading {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--color-accent);
  letter-spacing: 0.03em;
}
.ex-meaning {
  font-size: 0.88rem;
  color: var(--color-text-muted);
  font-weight: 500;
  margin-top: 0;
}
@media (max-width: 480px) {
  .ex-card {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    row-gap: 0.15rem;
  }
  .ex-meaning { grid-column: 1 / -1; }
}

/* ── Stroke order ────────────────────────────────────────────────────────── */
.kanji-stroke-section {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--color-border);
}
.stroke-figures {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}
.stroke-figure {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.stroke-figure img {
  width: 160px;
  height: 160px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: #fff;
  padding: 10px;
  display: block;
}

/* ── Animate button & stage ──────────────────────────────────────────────── */
.stroke-anim-wrap {
  display: block;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
  clear: both;
}
.stroke-anim-wrap .stroke-anim-stage {
  margin-top: 1rem;
}
.stroke-play-btn {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.42rem 1.1rem;
  background: var(--color-bg);
  border: 1.5px solid var(--color-accent);
  border-radius: 20px;
  color: var(--color-accent);
  font-family: var(--font);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.stroke-play-btn:hover { background: var(--color-accent); color: #fff; }
.stroke-play-btn:disabled { opacity: 0.55; cursor: default; }
.stroke-anim-stage {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}
.stroke-anim-stage svg {
  width: 160px;
  height: 160px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: #fff;
  padding: 10px;
  box-sizing: border-box;
}

/* Note */
.kanji-note {
  background: #f5ead8;
  border: 1.5px solid var(--color-border);
  border-left: 4px solid var(--color-accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.1rem 1.4rem;
  margin-top: 1.5rem;
  margin-bottom: 2rem;
}
.kanji-note p {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.75;
  font-weight: 500;
}

/* CTA */
.kanji-cta {
  background: linear-gradient(135deg, #8c2020 0%, #6a1818 100%);
  border-radius: var(--radius);
  padding: 2.25rem;
  text-align: center;
  color: #fff;
}
.kanji-cta h2 {
  font-size: 1.25rem;
  font-weight: 900;
  margin-bottom: 0.5rem;
}
.kanji-cta p {
  color: rgba(255,255,255,0.72);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
  font-weight: 500;
}
.kcta-btns {
  display: flex;
  gap: 0.65rem;
  justify-content: center;
  flex-wrap: wrap;
}
.kcta-btn {
  display: inline-block;
  padding: 0.6rem 1.3rem;
  border-radius: 30px;
  font-size: 0.875rem;
  font-weight: 800;
  transition: opacity 0.15s, transform 0.15s;
}
.kcta-btn:hover { opacity: 0.9; transform: translateY(-2px); }
.kcta-btn--hira { background: #fff; color: #6a1818; }
.kcta-btn--kata { background: rgba(255,255,255,0.15); color: #fff; border: 2px solid rgba(255,255,255,0.35); }
.kcta-btn--kata:hover { color: #fff; }
