/* Yanai Active palette */
:root {
  --blue: #7DABD0;
  --aqua: #CFE7EA;
  --peach: #FBC1AD;
  --coral: #F56E4A;
  --yellow: #FFDF6F;
  --grey: #E5E1E0;
  --ground: #FAF8F7;
  --surface: #FFFFFF;
  --ink: #1F2A33;
  --muted: #55606B;
  --link: #B23F22;
  --line: #E5E1E0;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ground: #12181D;
    --surface: #1C242B;
    --ink: #F2EFEE;
    --muted: #A9B3BC;
    --link: #F9A58B;
    --line: #2C363F;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 18px/1.55 Nunito, system-ui, -apple-system, 'Segoe UI', sans-serif;
  padding: env(safe-area-inset-top, 0) 0 env(safe-area-inset-bottom, 0);
}
a { color: var(--link); }
main { max-width: 680px; margin: 0 auto; padding: 8px 20px 40px; }

.top {
  max-width: 680px; margin: 0 auto; padding: 18px 20px;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.brand { font-weight: 800; font-size: 22px; color: var(--coral); text-decoration: none; }
.crumbs { display: flex; gap: 8px; align-items: center; font-size: 15px; color: var(--muted); min-width: 0; }
.crumbs a { color: var(--muted); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }

.kicker { margin: 16px 0 4px; font-weight: 700; color: var(--muted); font-size: 16px; }
h1 { margin: 0 0 20px; font-size: clamp(30px, 7vw, 44px); line-height: 1.12; font-weight: 800; }
h1 span { color: var(--muted); font-weight: 700; }
h2 { font-size: 22px; line-height: 1.25; margin: 0 0 12px; }
.lead { color: var(--muted); margin: 0 0 8px; }

.answer {
  background: var(--surface); border: 3px solid var(--blue); border-radius: 24px;
  padding: 24px 20px; display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center;
}
.target { margin: 0; font-size: clamp(32px, 9vw, 52px); font-weight: 800; line-height: 1.1; overflow-wrap: anywhere; }

.play {
  min-height: 52px; padding: 0 26px; border-radius: 26px; border: 0; cursor: pointer;
  background: var(--coral); color: var(--ink); font: 800 18px Nunito, sans-serif;
  display: inline-flex; align-items: center; gap: 10px;
}
.play:hover { filter: brightness(1.05); }
.play:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.play.playing { background: var(--yellow); }

.steps { margin: 22px 0; padding: 16px 18px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.steps p { margin: 4px 0; }

.twin {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 14px 18px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); margin-bottom: 22px;
}
.twin-label { margin: 0; font-weight: 700; color: var(--muted); width: 100%; font-size: 15px; }
.twin-text { font-size: 24px; font-weight: 800; flex: 1; min-width: 0; overflow-wrap: anywhere; color: var(--ink); }
.twin .play { min-height: 44px; font-size: 16px; padding: 0 18px; }

.context { color: var(--muted); }

.related, .lesson { margin-top: 32px; }
.related ul, .phrase-list { list-style: none; margin: 0; padding: 0; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.related li + li, .phrase-list li + li { border-top: 1px solid var(--line); }
.related a, .phrase-list a {
  display: flex; justify-content: space-between; gap: 16px; padding: 14px 18px; min-height: 52px;
  text-decoration: none; color: var(--ink); align-items: center;
}
.related a:hover, .phrase-list a:hover { background: color-mix(in srgb, var(--aqua) 35%, transparent); }
.r-target { color: var(--muted); font-weight: 700; text-align: right; overflow-wrap: anywhere; min-width: 0; }
.related a > span:first-child, .phrase-list a > span:first-child { min-width: 0; }

.cta {
  margin-top: 40px; padding: 24px 20px; border-radius: 24px;
  background: color-mix(in srgb, var(--peach) 45%, var(--surface));
}
.cta p { margin: 0 0 16px; }
.cta-buttons { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.btn {
  min-height: 52px; padding: 0 24px; border-radius: 26px; display: inline-flex; align-items: center;
  font-weight: 800; text-decoration: none; color: var(--ink); background: var(--surface); border: 2px solid var(--ink);
}
.btn.primary { background: var(--ink); color: var(--ground); border-color: var(--ink); }
.soon { color: var(--muted); font-weight: 700; font-size: 15px; }

.hero { margin-bottom: 8px; }
.lang-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.lang-card {
  display: flex; flex-direction: column; gap: 4px; padding: 22px; border-radius: 22px; text-decoration: none;
  background: var(--surface); border: 2px solid var(--line); color: var(--ink);
}
.lang-card:hover { border-color: var(--coral); }
.lang-name { font-size: 26px; font-weight: 800; }
.lang-native { color: var(--muted); font-weight: 700; }
.lang-count { margin-top: 8px; font-size: 15px; color: var(--muted); }

.foot { max-width: 680px; margin: 0 auto; padding: 20px; color: var(--muted); font-size: 15px; border-top: 1px solid var(--line); }
