/* Japanese Slang Phrasebook v1.01 (JU): en / vi / ko. Header/footer rules copied from /learn/field-notes/field-notes.css so the
   folder stands alone; phrasebook rules below. */
:root {
  --ink: #101820;
  --paper: #f4eddf;
  --paper-deep: #e7dcc7;
  --signal: #ff5638;
  --red: #b72c20;
  --blue: #2c5ccd;
  --mint: #9bc5ad;
  --line: rgba(16, 24, 32, 0.2);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(rgba(16, 24, 32, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 24, 32, 0.035) 1px, transparent 1px),
    var(--paper);
  background-size: 44px 44px;
  font-family: "DM Sans", sans-serif;
}
a { color: inherit; }
.note-header { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 18px clamp(22px, 5vw, 72px); color: var(--paper); background: var(--ink); border-bottom: 5px solid var(--signal); }
.note-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; }
.note-brand img { border-radius: 50%; }
.yt-ico { flex: none; }
.note-yt { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 999px; background: #b72c20; color: #fff !important; text-decoration: none !important; font: 700 12px/1 "DM Sans", system-ui, sans-serif; letter-spacing: .07em; text-transform: uppercase; --yt-tri: #b72c20; }
.note-yt:hover { background: #7d1b15; --yt-tri: #7d1b15; }
.note-yt .yt-ico { color: #fff; }
.note-nav { display: flex; gap: 20px; align-items: center; }
.note-nav a { color: var(--paper); text-decoration-color: var(--signal); text-underline-offset: 5px; }
.note-shell { width: min(1180px, calc(100% - 36px)); margin: 0 auto; }
.note-hero { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr); gap: clamp(36px, 7vw, 96px); padding: clamp(58px, 9vw, 118px) 0 48px; align-items: end; }
.eyebrow { margin: 0 0 20px; color: var(--signal); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; }
h1 { max-width: 850px; margin: 0; font-family: "Instrument Serif", serif; font-size: clamp(3.4rem, 8vw, 7.4rem); font-weight: 400; line-height: 0.86; letter-spacing: -0.045em; }
.note-deck { margin: 0; padding: 26px 0 4px 26px; border-left: 2px solid var(--ink); font-size: clamp(1.05rem, 2vw, 1.32rem); line-height: 1.55; }
.note-meta { display: flex; flex-wrap: wrap; gap: 12px 26px; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: rgba(16, 24, 32, 0.7); font-family: monospace; font-size: 0.82rem; letter-spacing: 0.08em; text-transform: uppercase; }
.note-footer { margin-top: 80px; padding: 28px; color: var(--paper); background: var(--ink); text-align: center; }

/* How it sounds */
.sound-notes { margin: 44px 0 0; padding: clamp(20px, 3vw, 34px); background: var(--ink); color: var(--paper); box-shadow: 12px 12px 0 var(--signal); }
.sound-notes h2 { margin: 0 0 14px; font: 400 clamp(2rem, 4vw, 3rem)/1 "Instrument Serif", serif; }
.sound-notes ol { margin: 0 0 18px; padding-left: 1.3em; display: grid; gap: 6px; font-size: 1.02rem; line-height: 1.5; }
.legend { margin: 10px 0 0; font-size: .92rem; line-height: 1.6; opacity: .92; }
.lg { display: inline-block; margin-right: 8px; padding: 2px 8px; border-radius: 4px; font: 700 .72rem/1.6 "DM Sans", sans-serif; letter-spacing: .08em; text-transform: uppercase; }
.lg.b-stop { background: var(--signal); color: var(--ink); }
.lg.b-hold { background: var(--mint); color: var(--ink); }
.lg.b-n { background: var(--paper-deep); color: var(--ink); }

/* Group nav */
.group-nav { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 46px 0 0; padding: 12px 0; background: var(--paper); border-bottom: 1px solid var(--line); }
.group-nav a, .ro-toggle { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1.5px solid var(--ink); border-radius: 999px; text-decoration: none; font: 700 1rem/1 "DM Sans", sans-serif; background: transparent; color: var(--ink); cursor: pointer; }
.group-nav a:hover, .ro-toggle:hover { background: var(--ink); color: var(--paper); }
.ro-toggle { margin-left: auto; }
.ro-toggle[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

/* Groups and cards */
.group { padding-top: 56px; scroll-margin-top: 70px; }
.group-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 8px 40px; align-items: end; margin-bottom: 24px; padding-bottom: 14px; border-bottom: 2px solid var(--ink); }
.group-head .eyebrow { grid-column: 1 / -1; margin: 0; }
.group-head h2 { margin: 0; font: 400 clamp(2.4rem, 5vw, 4rem)/.95 "Instrument Serif", serif; letter-spacing: -.02em; }
.group-head p:last-child { margin: 0; font-size: 1.02rem; line-height: 1.5; color: rgba(16, 24, 32, .78); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 18px; }
.phrase { position: relative; display: flex; flex-direction: column; padding: 22px 22px 18px; background: #fffaf0; border: 1.5px solid var(--ink); border-radius: 4px; box-shadow: 5px 5px 0 rgba(16, 24, 32, .12); scroll-margin-top: 80px; }
.phrase:target { box-shadow: 6px 6px 0 var(--signal); }
.ph-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.jp { margin: 0; font: 700 clamp(2rem, 4.6vw, 2.6rem)/1.15 "Noto Sans JP", sans-serif; letter-spacing: .02em; word-break: keep-all; overflow-wrap: anywhere; }
.reading { margin: 4px 0 0; font: 500 1rem/1.4 "Noto Sans JP", sans-serif; color: rgba(16, 24, 32, .7); }
.romaji { margin: 6px 0 0; font: 500 1.05rem/1.4 monospace; color: var(--red); }
.meaning { margin: 12px 0 0; font: 400 1.5rem/1.2 "Instrument Serif", serif; }
.note { margin: 8px 0 0; font-size: .93rem; line-height: 1.5; color: rgba(16, 24, 32, .8); }
.close-tag { flex: none; display: inline-block; margin: 6px 0 0; padding: 4px 9px; border-radius: 999px; background: var(--signal); color: var(--ink); font: 700 .78rem/1.3 "DM Sans", "Be Vietnam Pro", "Noto Sans KR", sans-serif; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.legend .close-tag { margin: 0 8px 0 0; }

/* Beat strip */
.beats { display: flex; flex-wrap: wrap; gap: 4px; margin: 16px 0 0; padding: 0; list-style: none; }
.beats li { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 40px; height: 48px; padding: 0 4px; border: 1px solid var(--line); border-radius: 3px; background: var(--paper); font: 500 1.1rem/1 "Noto Sans JP", sans-serif; }
.beats li small { margin-top: 3px; font: 700 .55rem/1 "DM Sans", sans-serif; letter-spacing: .06em; text-transform: uppercase; }
.beats .b-stop { background: var(--signal); border-color: var(--signal); }
.beats .b-hold { background: var(--mint); border-color: var(--mint); }
.beats .b-n { background: var(--paper-deep); }
.beat-count { margin: 6px 0 0; font: 500 .75rem/1 monospace; letter-spacing: .08em; text-transform: uppercase; color: rgba(16, 24, 32, .55); }

/* Example sentence */
.ex { margin: 16px 0 0; padding: 14px 0 0; border-top: 1px dashed var(--line); }
.ex-jp { margin: 0; font: 500 1.12rem/1.55 "Noto Sans JP", sans-serif; }
.ex-ro { margin: 4px 0 0; font: .9rem/1.45 monospace; color: var(--red); }
.ex-en { margin: 4px 0 0; font-size: .98rem; line-height: 1.45; }
.ex-who { margin: 6px 0 0; font-size: .8rem; letter-spacing: .04em; color: rgba(16, 24, 32, .6); }


body.no-romaji .romaji, body.no-romaji .ex-ro { visibility: hidden; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media (max-width: 760px) {
  .note-header { align-items: flex-start; }
  .note-brand span { display: none; }
  .note-hero { grid-template-columns: 1fr; padding-top: 54px; }
  h1 { font-size: clamp(3rem, 15vw, 5.4rem); }
  .note-deck { padding-left: 18px; }
  .group-head { grid-template-columns: 1fr; }
  .sound-notes { box-shadow: 8px 8px 0 var(--signal); margin-right: 8px; }
}
@media (max-width: 660px) {
  .note-yt span { display: none; }
  .note-yt { padding: 9px 11px; min-height: 44px; min-width: 44px; justify-content: center; }
  .note-header { flex-wrap: wrap; }
  .note-nav { order: 3; width: 100%; gap: 22px; }
  .note-nav a { display: inline-flex; align-items: center; min-height: 44px; }
  .group-nav { gap: 8px; }
  .group-nav a, .ro-toggle { padding: 0 12px; font-size: 1rem; }
  .ro-toggle { margin-left: 0; }
}
.beats li.gap { margin-right: 14px; }

/* v1.01: language switch, heat labels, phone sizes, Vietnamese and Korean type */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.lang-switch { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; padding: 10px 16px; background: var(--ink); border-bottom: 1px solid rgba(244, 237, 223, .15); }
.lang-switch a { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; min-width: 96px; padding: 0 16px; border: 1.5px solid rgba(244, 237, 223, .5); border-radius: 999px; color: var(--paper); text-decoration: none; font: 700 1rem/1 "DM Sans", "Be Vietnam Pro", "Noto Sans KR", sans-serif; }
.lang-switch a[aria-current="page"] { background: var(--signal); border-color: var(--signal); color: var(--ink); }
.heat { flex: none; margin: 6px 0 0; padding: 5px 10px; border-radius: 999px; font: 700 .78rem/1.2 "DM Sans", "Be Vietnam Pro", "Noto Sans KR", sans-serif; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; border: 1.5px solid var(--ink); }
.heat-safe { background: var(--mint); }
.heat-casual { background: var(--paper-deep); }
.heat-rude { background: var(--ink); color: var(--paper); }
.heat-spicy { background: var(--signal); border-color: var(--signal); }
.lg-heat { background: var(--paper); color: var(--ink); }
.note, .ex-ro, .ex-en, .legend, .group-head p:last-child { font-size: 1rem; }
.eyebrow { font-size: .85rem; }
.beat-count { font-size: .85rem; }
.note-meta { font-size: .9rem; }
html[lang="vi"] body, html[lang="vi"] .group-nav a, html[lang="vi"] .ro-toggle { font-family: "Be Vietnam Pro", "DM Sans", sans-serif; }
html[lang="vi"] h1, html[lang="vi"] h2, html[lang="vi"] .meaning { font-family: "Noto Serif", Georgia, serif; letter-spacing: -.01em; }
html[lang="vi"] h1 { font-size: clamp(2.8rem, 7vw, 6rem); line-height: 1; }
html[lang="ko"] body, html[lang="ko"] .group-nav a, html[lang="ko"] .ro-toggle, html[lang="ko"] .meaning { font-family: "Noto Sans KR", "DM Sans", sans-serif; }
html[lang="ko"] h1, html[lang="ko"] h2 { font-family: "Noto Sans KR", sans-serif; font-weight: 700; letter-spacing: -.03em; }
html[lang="ko"] h1 { font-size: clamp(2.6rem, 7vw, 5.6rem); line-height: 1.05; word-break: keep-all; }
html[lang="ko"] .meaning { font-size: 1.3rem; font-weight: 500; }
html[lang="ko"] p, html[lang="ko"] li { word-break: keep-all; overflow-wrap: anywhere; }
@media (max-width: 660px) {
  .lang-switch a { min-width: 0; flex: 1; padding: 0 8px; font-size: 1rem; }
  .phrase { padding: 18px 16px 16px; }
  .note-meta { font-size: .85rem; }
  html { -webkit-text-size-adjust: 100%; }
  .group-nav { position: static; }
  .ph-head { flex-direction: column-reverse; align-items: flex-start; gap: 4px; }
  .jp { font-size: clamp(1.9rem, 9vw, 2.3rem); word-break: normal; }
  .group { scroll-margin-top: 12px; }
}
html[lang="ko"] .beat-count, html[lang="ko"] .eyebrow, html[lang="ko"] .heat, html[lang="ko"] .note-meta { letter-spacing: 0; }
.tags { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; margin: 6px 0 0; }
.tags .heat { margin: 0; }
.tags .close-tag { margin: 0; background: var(--paper); border: 1.5px solid var(--signal); color: var(--ink); }
.ex-who { font-size: 1rem; color: rgba(16, 24, 32, .72); }
.ex-who b { font-weight: 700; }
@media (max-width: 660px) { .tags { justify-content: flex-start; } }

/* v1.02: Play buttons (one sound at a time) */
.romaji-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; margin: 6px 0 0; }
.romaji-row .romaji { margin: 0; }
.play { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px 0 12px; border: 1.5px solid var(--ink); border-radius: 999px; background: var(--ink); color: var(--paper); font: 700 1rem/1 "DM Sans", "Be Vietnam Pro", "Noto Sans KR", sans-serif; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.play:hover { background: var(--red); border-color: var(--red); }
.play-ico { width: 0; height: 0; border-left: 11px solid currentColor; border-top: 7px solid transparent; border-bottom: 7px solid transparent; }
.play.is-playing { background: var(--signal); border-color: var(--signal); color: var(--ink); }
.play.is-playing .play-ico { width: 10px; height: 12px; border: 0; border-left: 3px solid currentColor; border-right: 3px solid currentColor; }
.play-s { margin: 8px 0 2px; }

/* v1.03: five languages. Switch wraps to two rows on phones; every button stays >= 48 px tall. */
.lang-switch { flex-wrap: wrap; }
@media (max-width: 660px) {
  .lang-switch { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .lang-switch a { min-width: 0; padding: 0 6px; }
}
html[lang="zh-Hant"] body, html[lang="zh-Hant"] .group-nav a, html[lang="zh-Hant"] .ro-toggle, html[lang="zh-Hant"] .meaning { font-family: "Noto Sans TC", "DM Sans", sans-serif; }
html[lang="zh-Hant"] h1, html[lang="zh-Hant"] h2 { font-family: "Noto Sans TC", sans-serif; font-weight: 700; letter-spacing: 0; }
html[lang="zh-Hant"] h1 { font-size: clamp(2.6rem, 7vw, 5.6rem); line-height: 1.1; }
html[lang="zh-Hant"] .meaning { font-size: 1.3rem; font-weight: 500; }
html[lang="zh-Hant"] .beat-count, html[lang="zh-Hant"] .eyebrow, html[lang="zh-Hant"] .heat, html[lang="zh-Hant"] .note-meta { letter-spacing: 0; }
html[lang="ru"] body, html[lang="ru"] .group-nav a, html[lang="ru"] .ro-toggle { font-family: "Noto Sans", "DM Sans", sans-serif; }
html[lang="ru"] h1, html[lang="ru"] h2, html[lang="ru"] .meaning { font-family: "Noto Serif", Georgia, serif; letter-spacing: -.01em; }
html[lang="ru"] h1 { font-size: clamp(2.6rem, 6.5vw, 5.6rem); line-height: 1; overflow-wrap: anywhere; }
.lang-switch a, .heat, .close-tag, .play { font-family: "DM Sans", "Be Vietnam Pro", "Noto Sans KR", "Noto Sans TC", "Noto Sans", sans-serif; }

/* v1.04: "Try one phrase" jump in the first screen */
.try-one { display: inline-flex; align-items: center; gap: 10px; margin-top: 22px; min-height: 48px; padding: 0 20px; border-radius: 999px; background: var(--signal); color: var(--ink); text-decoration: none; font: 700 1.05rem/1 "DM Sans", "Be Vietnam Pro", "Noto Sans KR", "Noto Sans TC", "Noto Sans", sans-serif; box-shadow: 4px 4px 0 var(--ink); }
.try-one::after { content: ""; width: 0; height: 0; border-top: 7px solid currentColor; border-left: 6px solid transparent; border-right: 6px solid transparent; }
.try-one:hover { background: var(--ink); color: var(--paper); box-shadow: 4px 4px 0 var(--signal); }
@media (max-width: 760px) { .note-hero { padding-top: 32px; gap: 20px; } }

/* ===================== Travel section (First Trip) v1.00 =====================
   Everything above is the phrasebook stylesheet, copied so /travel/ stands alone. Rules below are new. */
.note-nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 3px; text-decoration-color: var(--signal); }
.eyebrow, .note-meta, .beat-count, .legend { font-size: 1rem; }
.note-meta { letter-spacing: .04em; }
html[lang="id"] body { font-family: "DM Sans", sans-serif; }

/* write-in: the key phrase draws itself once. Reduced motion: static. */
.write .wc { display: inline-block; opacity: 0; transform: translateY(.18em); animation: wc-in .42s cubic-bezier(.2, .8, .3, 1) forwards; animation-delay: calc(var(--i) * 85ms + .25s); }
@keyframes wc-in { to { opacity: 1; transform: none; } }

/* who chips */
.who-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; padding: 4px 12px; border-radius: 999px; font: 700 1rem/1.2 "DM Sans", "Be Vietnam Pro", "Noto Sans KR", "Noto Sans TC", "Noto Sans", sans-serif; letter-spacing: .03em; }
.who-chip::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: currentColor; }
.who-chip.hear { background: var(--blue); color: #fff; }
.who-chip.say { background: var(--signal); color: var(--ink); }
.who-chip.say::before { border-radius: 2px; }

/* ---------- hub ---------- */
.hub-hero { position: relative; isolation: isolate; grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr); align-items: center; }
.hero-glow { position: absolute; z-index: -1; inset: -10% 0 -10% 0; pointer-events: none; background: radial-gradient(520px circle at var(--mx, 70%) var(--my, 30%), rgba(255, 86, 56, .22), rgba(255, 86, 56, 0) 62%); transition: background-position .2s; }
.hub-hero h1 { font-size: clamp(3.6rem, 9vw, 8rem); }
.idea { margin: 26px 0 0; max-width: 560px; padding-left: 20px; border-left: 3px solid var(--signal); font-size: clamp(1.1rem, 2vw, 1.3rem); line-height: 1.55; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px 16px; margin: 26px 0 0; align-items: center; }
.hero-cta .try-one { margin-top: 0; }
.btn-ghost { display: inline-flex; align-items: center; min-height: 48px; padding: 0 20px; border: 1.5px solid var(--ink); border-radius: 999px; text-decoration: none; font: 700 1.05rem/1 "DM Sans", "Be Vietnam Pro", "Noto Sans KR", "Noto Sans TC", "Noto Sans", sans-serif; background: transparent; color: var(--ink); cursor: pointer; }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.hero-card { position: relative; padding: 26px 26px 24px; background: #fffaf0; border: 2px solid var(--ink); border-radius: 6px; box-shadow: 10px 10px 0 var(--signal); transform: perspective(900px) rotateX(var(--ry, 0deg)) rotateY(var(--rx, 0deg)); transition: transform .25s ease-out; will-change: transform; }
.hero-card .jp.big { margin-top: 14px; font-size: clamp(3.2rem, 8.5vw, 5.4rem); line-height: 1.05; }
.hero-card .reading { font-size: 1.15rem; margin-top: 6px; }
.hero-card .romaji { font-size: 1.2rem; }
.hero-card .meaning { font-size: 1.7rem; }
.hero-card .tap { margin: 12px 0 0; font-size: 1rem; line-height: 1.5; color: rgba(16, 24, 32, .8); }
.play-big { min-height: 56px; padding: 0 22px 0 18px; font-size: 1.1rem; }
.continue-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin: 28px 0 0; padding: 16px 20px; background: var(--ink); color: var(--paper); border-radius: 4px; box-shadow: 8px 8px 0 var(--signal); }
.continue-strip[hidden] { display: none; }
.continue-strip p { margin: 0; flex: 1 1 260px; font-size: 1.05rem; line-height: 1.45; }
.continue-strip .btn-ghost { border-color: var(--paper); color: var(--paper); }
.continue-strip .btn-ghost:hover { background: var(--paper); color: var(--ink); }
.continue-strip .btn-go { display: inline-flex; align-items: center; min-height: 48px; padding: 0 20px; border-radius: 999px; background: var(--signal); color: var(--ink); text-decoration: none; font: 700 1.05rem/1 "DM Sans", "Be Vietnam Pro", "Noto Sans KR", "Noto Sans TC", "Noto Sans", sans-serif; }
.linkbtn { background: none; border: 0; padding: 12px 4px; min-height: 44px; font: 500 1rem/1.2 "DM Sans", "Be Vietnam Pro", "Noto Sans KR", "Noto Sans TC", "Noto Sans", sans-serif; color: inherit; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.what { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 1fr); gap: 18px; margin: 44px 0 0; align-items: stretch; }
.what-intro h2, .lessons-head h2 { margin: 0 0 10px; font: 400 clamp(2.2rem, 4.4vw, 3.4rem)/1 "Instrument Serif", serif; letter-spacing: -.02em; }
.what-intro p { margin: 0; font-size: 1.1rem; line-height: 1.55; }
.what-card { padding: 20px 22px; background: #fffaf0; border: 1.5px solid var(--ink); border-radius: 4px; box-shadow: 5px 5px 0 rgba(16, 24, 32, .12); }
.what-card.hear { border-left: 8px solid var(--blue); }
.what-card.say { border-left: 8px solid var(--signal); }
.what-card h3 { margin: 0 0 8px; font: 700 1.25rem/1.2 "DM Sans", sans-serif; }
.what-card p { margin: 0; font-size: 1.05rem; line-height: 1.5; }
.lessons-head { margin: 56px 0 22px; padding-bottom: 14px; border-bottom: 2px solid var(--ink); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 8px 40px; align-items: end; }
.lessons-head p { margin: 0; font-size: 1.05rem; line-height: 1.5; color: rgba(16, 24, 32, .78); }
.lcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 18px; padding: 0; margin: 0; list-style: none; }
.lcards > li { display: flex; }
.lcard { position: relative; display: flex; flex-direction: column; flex: 1; min-height: 200px; padding: 22px 22px 20px; background: #fffaf0; border: 1.5px solid var(--ink); border-radius: 4px; box-shadow: 5px 5px 0 rgba(16, 24, 32, .12); text-decoration: none; color: var(--ink); }
.lcard .l-num { margin: 0; font: 700 1rem/1.2 "DM Sans", sans-serif; letter-spacing: .12em; text-transform: uppercase; color: var(--red); }
.lcard h3 { margin: 6px 0 0; font: 400 2.1rem/1.05 "Instrument Serif", serif; letter-spacing: -.01em; }
.lcard .l-promise { margin: 10px 0 0; font-size: 1.05rem; line-height: 1.5; flex: 1; }
.lcard .l-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 16px 0 0; }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; padding: 4px 12px; border-radius: 999px; font: 700 1rem/1.2 "DM Sans", "Be Vietnam Pro", "Noto Sans KR", "Noto Sans TC", "Noto Sans", sans-serif; border: 1.5px solid var(--ink); background: var(--mint); }
.chip.soon { background: transparent; border-style: dashed; color: rgba(16, 24, 32, .72); border-color: rgba(16, 24, 32, .5); }
.chip.tick { background: var(--ink); color: var(--paper); }
.chip.tick::before { content: ""; width: 12px; height: 7px; margin-top: -3px; border-left: 3px solid currentColor; border-bottom: 3px solid currentColor; transform: rotate(-45deg); }
.chip.go { background: var(--signal); border-color: var(--signal); }
.lcard .l-arrow { width: 44px; height: 44px; border-radius: 50%; background: var(--ink); color: var(--paper); display: inline-flex; align-items: center; justify-content: center; font-size: 1.3rem; line-height: 1; transition: transform .15s; }
a.lcard { cursor: pointer; }
a.lcard:hover, a.lcard:focus-visible { transform: translate(-3px, -3px); box-shadow: 8px 8px 0 var(--signal); }
a.lcard:hover .l-arrow, a.lcard:focus-visible .l-arrow { background: var(--signal); color: var(--ink); transform: translateX(3px); }
.lcard.is-soon { background: transparent; border-style: dashed; border-color: rgba(16, 24, 32, .45); box-shadow: none; color: rgba(16, 24, 32, .82); }
.lcard.is-soon h3 { color: rgba(16, 24, 32, .72); }
.lcard.is-soon .l-num { color: rgba(16, 24, 32, .62); }
.hub-end { margin: 36px 0 0; display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; }

/* ---------- lesson ---------- */
.crumb { display: inline-flex; align-items: center; min-height: 44px; margin: 22px 0 0; font: 700 1rem/1 "DM Sans", "Be Vietnam Pro", "Noto Sans KR", "Noto Sans TC", "Noto Sans", sans-serif; text-decoration: none; letter-spacing: .02em; }
.crumb:hover { text-decoration: underline; }
.lesson-hero { padding: clamp(18px, 4vw, 48px) 0 28px; }
.lesson-hero h1 { font-size: clamp(3.6rem, 11vw, 8.6rem); }
.lesson-hero .promise { margin: 22px 0 0; max-width: 700px; font-size: clamp(1.15rem, 2.2vw, 1.45rem); line-height: 1.5; }
.lesson-hero .scene-line { margin: 10px 0 0; font-size: 1.05rem; color: rgba(16, 24, 32, .75); }
.hero-phrase { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin: 26px 0 0; padding: 18px 22px; background: var(--ink); color: var(--paper); border-radius: 6px; box-shadow: 8px 8px 0 var(--signal); max-width: 820px; }
.hero-phrase .jp { font-size: clamp(1.7rem, 5vw, 3rem); }
.hero-phrase .romaji { color: var(--signal); }
.hero-phrase .hp-text { flex: 1 1 280px; }
.hero-phrase .play { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.hero-phrase .play:hover { background: var(--signal); border-color: var(--signal); }
.hero-phrase .play.is-playing { background: var(--signal); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px 16px; align-items: center; margin: 26px 0 0; }
.btn-scene { display: inline-flex; align-items: center; gap: 12px; min-height: 56px; padding: 0 26px 0 20px; border: 0; border-radius: 999px; background: var(--signal); color: var(--ink); font: 700 1.15rem/1 "DM Sans", "Be Vietnam Pro", "Noto Sans KR", "Noto Sans TC", "Noto Sans", sans-serif; cursor: pointer; box-shadow: 4px 4px 0 var(--ink); }
.btn-scene:hover { background: var(--ink); color: var(--paper); box-shadow: 4px 4px 0 var(--signal); }
.btn-scene .play-ico { border-left-width: 13px; border-top-width: 8px; border-bottom-width: 8px; }
.btn-scene.is-playing { background: var(--ink); color: var(--paper); box-shadow: 4px 4px 0 var(--signal); }
.btn-scene.is-playing .play-ico { width: 12px; height: 14px; border: 0; border-left: 4px solid currentColor; border-right: 4px solid currentColor; }
.done-chip { margin: 14px 0 0; }
.done-chip[hidden] { display: none; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin: 8px 0 0; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.toolbar .ro-toggle { margin-left: auto; }
.view-toggle { display: inline-flex; border: 2px solid var(--ink); border-radius: 999px; overflow: hidden; background: transparent; }
.view-toggle .vt-label { display: inline-flex; align-items: center; padding: 0 14px; font: 700 1rem/1 "DM Sans", sans-serif; background: var(--ink); color: var(--paper); }
.view-toggle button { min-height: 44px; min-width: 84px; padding: 0 18px; border: 0; background: transparent; color: var(--ink); font: 700 1rem/1 "DM Sans", "Be Vietnam Pro", "Noto Sans KR", "Noto Sans TC", "Noto Sans", sans-serif; cursor: pointer; }
.view-toggle button[aria-pressed="true"] { background: var(--signal); }
.view-toggle button:hover { background: var(--paper-deep); }
.view-toggle button[aria-pressed="true"]:hover { background: var(--signal); }
body[data-view="manga"] #view-text { display: none; }
body[data-view="text"] #view-manga { display: none; }

/* conversation (text view) */
.conv { display: flex; flex-direction: column; gap: 18px; margin: 34px 0 0; max-width: 900px; margin-left: auto; margin-right: auto; }
.line { position: relative; width: min(100%, 780px); padding: 18px 22px 16px; border: 2px solid var(--ink); border-radius: 6px; scroll-margin-top: 90px; }
.line.hear { align-self: flex-start; background: #fffaf0; border-left: 10px solid var(--blue); box-shadow: 5px 5px 0 rgba(16, 24, 32, .12); }
.line.say { align-self: flex-end; background: #dcefe3; border-right: 10px solid var(--signal); box-shadow: -5px 5px 0 rgba(16, 24, 32, .12); }
.line .l-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.line .l-n { font: 500 1rem/1 monospace; color: rgba(16, 24, 32, .65); }
.line .jp { margin: 10px 0 0; font-size: clamp(1.9rem, 6vw, 2.8rem); }
.line .reading { font-size: 1.1rem; }
.line .meaning { margin-top: 8px; font-size: 1.6rem; }
.line.is-playing { outline: 5px solid var(--signal); outline-offset: 3px; background-image: linear-gradient(rgba(255, 86, 56, .1), rgba(255, 86, 56, .1)); }
.scene-break { display: flex; align-items: center; gap: 14px; margin: 8px 0; font: 700 1rem/1.3 "DM Sans", "Be Vietnam Pro", "Noto Sans KR", "Noto Sans TC", "Noto Sans", sans-serif; letter-spacing: .06em; text-transform: uppercase; color: rgba(16, 24, 32, .75); }
.scene-break::before, .scene-break::after { content: ""; flex: 1; border-top: 2px dashed rgba(16, 24, 32, .4); }
html[lang="ko"] .scene-break, html[lang="zh-Hant"] .scene-break { letter-spacing: 0; text-transform: none; }

/* manga view */
.panels { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; margin: 34px 0 0; padding: 0; list-style: none; }
@media (min-width: 1100px) { .panels { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 34px; } }
.panels > li { min-width: 0; }
.panel { margin: 0; border: 3px solid var(--ink); border-radius: 4px; background: #fffaf0; box-shadow: 7px 7px 0 var(--ink); overflow: hidden; }
.panel-art { position: relative; width: 100%; min-width: 0; aspect-ratio: 1600 / 1000; overflow: hidden; background: var(--paper-deep); }
.panel-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.panel-no { position: absolute; left: 0; bottom: 0; z-index: 2; margin: 0; padding: 4px 12px; background: var(--ink); color: var(--paper); font: 700 1rem/1.3 "DM Sans", sans-serif; letter-spacing: .06em; }
.bubble { position: absolute; z-index: 3; box-sizing: border-box; min-height: 44px; margin: 0; padding: 8px 14px 9px; text-align: left; border: 2.5px solid var(--ink); border-radius: 18px; color: var(--ink); font: 700 clamp(1.1rem, 2.4vw, 1.45rem)/1.5 "Noto Sans JP", sans-serif; word-break: keep-all; overflow-wrap: anywhere; cursor: pointer; -webkit-tap-highlight-color: transparent; box-shadow: 3px 3px 0 rgba(16, 24, 32, .35); }
.bubble.hear { background: #fffaf0; }
.bubble.say { background: #b9e2c9; border-radius: 26px; border-color: var(--ink); box-shadow: 3px 3px 0 var(--signal); }
.bubble ruby { ruby-position: over; }
.bubble rt { font-size: .5em; font-weight: 500; letter-spacing: 0; }
.bubble:hover { filter: brightness(.97); }
.bubble.is-playing { background: var(--signal); animation: none; }
.bubble::after { content: ""; position: absolute; width: 0; height: 0; border: 11px solid transparent; }
.bubble[data-tail="bottom"]::after { left: 26px; top: 100%; border-top-color: var(--ink); border-bottom-width: 0; margin-top: -1px; }
.bubble[data-tail="top"]::after { right: 26px; bottom: 100%; border-bottom-color: var(--ink); border-top-width: 0; margin-bottom: -1px; }
.bubble[data-tail="left"]::after { right: 100%; top: 18px; border-right-color: var(--ink); border-left-width: 0; margin-right: -1px; }
.bubble[data-tail="right"]::after { left: 100%; top: 18px; border-left-color: var(--ink); border-right-width: 0; margin-left: -1px; }
@media (max-width: 700px) {
  .bubble rt { display: none; }
  .bubble.show-ruby rt { display: ruby-text; }
  .bubble { padding: 6px 12px 7px; }
}
.cap { display: grid; gap: 4px; padding: 14px 18px 16px; background: var(--ink); color: var(--paper); min-height: 112px; align-content: start; }
.cap-hint { margin: 0; font-size: 1.05rem; color: rgba(244, 237, 223, .85); }
.cap-row { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
.cap .cap-meaning { margin: 0; font: 400 1.7rem/1.15 "Instrument Serif", serif; }
.cap .cap-reading { margin: 0; font: 500 1.05rem/1.4 "Noto Sans JP", sans-serif; color: rgba(244, 237, 223, .85); }
.cap .cap-romaji { margin: 0; font: 500 1.05rem/1.4 monospace; color: var(--signal); }
body.no-romaji .cap .cap-romaji { visibility: hidden; }
html[lang="ko"] .cap .cap-meaning, html[lang="vi"] .cap .cap-meaning, html[lang="zh-Hant"] .cap .cap-meaning, html[lang="ru"] .cap .cap-meaning { font-family: inherit; font-size: 1.35rem; font-weight: 500; }

/* practice */
.sect { padding-top: 56px; scroll-margin-top: 70px; }
.sect-head { margin-bottom: 22px; padding-bottom: 14px; border-bottom: 2px solid var(--ink); }
.sect-head h2 { margin: 0; font: 400 clamp(2.4rem, 5vw, 4rem)/.95 "Instrument Serif", serif; letter-spacing: -.02em; }
.sect-head p { margin: 10px 0 0; font-size: 1.08rem; line-height: 1.5; max-width: 700px; color: rgba(16, 24, 32, .82); }
html[lang="ko"] .sect-head h2, html[lang="ko"] .what-intro h2, html[lang="ko"] .lessons-head h2, html[lang="ko"] .lcard h3 { font-family: "Noto Sans KR", sans-serif; font-weight: 700; letter-spacing: -.03em; }
html[lang="zh-Hant"] .sect-head h2, html[lang="zh-Hant"] .what-intro h2, html[lang="zh-Hant"] .lessons-head h2, html[lang="zh-Hant"] .lcard h3 { font-family: "Noto Sans TC", sans-serif; font-weight: 700; letter-spacing: 0; }
html[lang="vi"] .sect-head h2, html[lang="vi"] .what-intro h2, html[lang="vi"] .lessons-head h2, html[lang="vi"] .lcard h3, html[lang="ru"] .sect-head h2, html[lang="ru"] .what-intro h2, html[lang="ru"] .lessons-head h2, html[lang="ru"] .lcard h3 { font-family: "Noto Serif", Georgia, serif; letter-spacing: -.01em; }
html[lang="vi"] .lesson-hero h1, html[lang="ru"] .lesson-hero h1 { font-size: clamp(2.8rem, 9vw, 6.4rem); line-height: 1; }
html[lang="ko"] .lesson-hero h1, html[lang="zh-Hant"] .lesson-hero h1 { font-size: clamp(2.8rem, 9vw, 6.4rem); line-height: 1.1; }
html[lang="vi"] .hub-hero h1, html[lang="ru"] .hub-hero h1, html[lang="ko"] .hub-hero h1, html[lang="zh-Hant"] .hub-hero h1 { font-size: clamp(2.8rem, 8vw, 6rem); line-height: 1.05; }
.q-counter { margin: 0 0 14px; font: 700 1.05rem/1.3 "DM Sans", "Be Vietnam Pro", "Noto Sans KR", "Noto Sans TC", "Noto Sans", sans-serif; }
.q { padding: 22px; background: #fffaf0; border: 2px solid var(--ink); border-radius: 6px; box-shadow: 6px 6px 0 rgba(16, 24, 32, .12); }
.q[hidden] { display: none; }
.q-label { margin: 0 0 10px; font: 700 1rem/1.2 "DM Sans", "Be Vietnam Pro", "Noto Sans KR", "Noto Sans TC", "Noto Sans", sans-serif; letter-spacing: .08em; text-transform: uppercase; color: var(--blue); }
html[lang="ko"] .q-label, html[lang="zh-Hant"] .q-label { letter-spacing: 0; }
.q-prompt { padding: 14px 16px; background: #fff; border-left: 8px solid var(--blue); border-radius: 4px; }
.q-prompt .jp { font-size: clamp(1.6rem, 5vw, 2.3rem); }
.q-prompt .meaning { font-size: 1.4rem; }
.q-situation { margin: 0; padding: 14px 16px; font-size: 1.2rem; line-height: 1.45; background: #fff; border-left: 8px solid var(--blue); border-radius: 4px; }
.q-pick { margin: 18px 0 10px; font: 700 1.1rem/1.3 "DM Sans", "Be Vietnam Pro", "Noto Sans KR", "Noto Sans TC", "Noto Sans", sans-serif; }
.opts { display: grid; gap: 12px; }
.opt-wrap { display: grid; gap: 6px; }
.opt { display: grid; gap: 4px; width: 100%; min-height: 64px; padding: 12px 16px; text-align: left; border: 2px solid var(--ink); border-radius: 6px; background: #fffaf0; color: var(--ink); cursor: pointer; font-family: "Noto Sans JP", sans-serif; }
.opt:hover:not(:disabled) { background: #f1e7d3; }
.opt .jp { font-size: clamp(1.5rem, 5vw, 2rem); }
.opt .romaji { margin: 0; font-size: 1.05rem; }
.opt:disabled { cursor: default; }
.opt.is-right { background: #9bd3b3; border-width: 4px; }
.opt.is-wrong { background: #f6d1c9; border-width: 4px; border-style: dashed; }
.reason { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; margin: 0; padding: 4px 4px 8px 12px; border-left: 4px solid var(--line); font-size: 1.05rem; line-height: 1.5; }
.reason[hidden] { display: none; }
.reason .chip { min-height: 28px; padding: 2px 10px; }
.reason.fits { border-left-color: #3d8b63; }
.reason.off { border-left-color: var(--signal); }
.chip.fits-c { background: #9bd3b3; }
.chip.off-c { background: #f6d1c9; }
.q-msg { margin: 14px 0 0; font: 700 1.15rem/1.4 "DM Sans", "Be Vietnam Pro", "Noto Sans KR", "Noto Sans TC", "Noto Sans", sans-serif; min-height: 1.4em; }
.q-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 0; }
.q-actions[hidden], .q-actions button[hidden] { display: none; }
.practice-done { margin: 22px 0 0; padding: 18px 22px; background: var(--ink); color: var(--paper); border-radius: 6px; box-shadow: 8px 8px 0 var(--signal); font-size: 1.2rem; line-height: 1.45; }
.practice-done[hidden] { display: none; }

/* swap + rescue */
.swap-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 18px; }
.swap-card, .rescue-card { padding: 20px 22px; background: #fffaf0; border: 1.5px solid var(--ink); border-radius: 4px; box-shadow: 5px 5px 0 rgba(16, 24, 32, .12); }
.swap-card h3 { margin: 0 0 12px; font: 700 1.1rem/1.35 "DM Sans", "Be Vietnam Pro", "Noto Sans KR", "Noto Sans TC", "Noto Sans", sans-serif; }
.swap-item { padding: 12px 0; border-top: 1px dashed var(--line); }
.swap-item .jp { font-size: 1.9rem; }
.swap-item .meaning { font-size: 1.3rem; margin-top: 8px; }
.rescue-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); gap: 18px; }
.rescue-card { border-width: 2px; box-shadow: 6px 6px 0 var(--signal); }
.rescue-card .jp { font-size: clamp(1.7rem, 5vw, 2.3rem); }
.next-up { margin: 56px 0 0; padding: 24px; background: var(--ink); color: var(--paper); border-radius: 6px; box-shadow: 10px 10px 0 var(--signal); }
.next-up h2 { margin: 0 0 8px; font: 400 2.4rem/1 "Instrument Serif", serif; }
.next-up p { margin: 0; font-size: 1.1rem; line-height: 1.5; max-width: 640px; }
.next-up .links { display: flex; flex-wrap: wrap; gap: 12px 16px; margin: 18px 0 0; align-items: center; }
.next-up .btn-ghost { border-color: var(--paper); color: var(--paper); }
.next-up .btn-ghost:hover { background: var(--paper); color: var(--ink); }
.next-up .btn-go { display: inline-flex; align-items: center; min-height: 48px; padding: 0 20px; border-radius: 999px; background: var(--signal); color: var(--ink); text-decoration: none; font: 700 1.05rem/1 "DM Sans", "Be Vietnam Pro", "Noto Sans KR", "Noto Sans TC", "Noto Sans", sans-serif; }
html[lang="ko"] .next-up h2, html[lang="zh-Hant"] .next-up h2 { font-family: "Noto Sans KR", "Noto Sans TC", sans-serif; font-weight: 700; }
html[lang="vi"] .next-up h2, html[lang="ru"] .next-up h2 { font-family: "Noto Serif", Georgia, serif; }
.reset-row { margin: 18px 0 0; }
.lang-switch a { font-size: 1rem; }

@media (max-width: 900px) {
  .what { grid-template-columns: 1fr; }
  .lessons-head { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .hub-hero { grid-template-columns: 1fr; padding-top: 28px; gap: 28px; }
  .hero-card { box-shadow: 7px 7px 0 var(--signal); margin-right: 7px; }
  .line.hear, .line.say { width: 100%; }
  .toolbar .ro-toggle { margin-left: 0; }
}
@media (max-width: 660px) {
  .lesson-hero h1 { font-size: clamp(3.2rem, 17vw, 5rem); }
  .hub-hero h1 { font-size: clamp(3.2rem, 17vw, 5rem); }
  .btn-scene { width: 100%; justify-content: center; }
  .group-nav, .toolbar { position: static; }
  .view-toggle { width: 100%; }
  .view-toggle button { flex: 1; }
  .view-toggle .vt-label { display: none; }
  .q { padding: 16px; }
  .panel { box-shadow: 5px 5px 0 var(--ink); margin-right: 5px; }
  .cap .cap-meaning { font-size: 1.5rem; }
  .what-card, .swap-card, .rescue-card { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .write .wc { opacity: 1; transform: none; animation: none; }
  .hero-card { transform: none !important; transition: none; }
  a.lcard, a.lcard .l-arrow { transition: none; }
  a.lcard:hover, a.lcard:focus-visible { transform: none; }
  .hero-glow { transition: none; }
}
.hero-cta .ro-toggle { margin-left: 0; }
.hero-card .jp.big { font-size: clamp(2.8rem, 4.6vw, 4.2rem); }
.hero-cta .try-one::after { border-top: 7px solid transparent; border-bottom: 7px solid transparent; border-left: 9px solid currentColor; border-right: 0; }
.hero-phrase .jp { text-wrap: balance; }
.lesson-hero { position: relative; }
.stamp { position: absolute; right: clamp(0px, 4vw, 60px); top: 46px; width: 150px; height: 150px; border: 5px double var(--red); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--red); font: 400 4.2rem/1 "Instrument Serif", serif; transform: rotate(-9deg); opacity: .78; pointer-events: none; mix-blend-mode: multiply; }
.stamp::before { content: ""; position: absolute; inset: 9px; border: 2px solid var(--red); border-radius: 50%; }
@media (max-width: 900px) { .stamp { display: none; } }
@media (max-width: 760px) { .hero-card .jp.big { font-size: 3.4rem; } .hero-phrase .jp { font-size: 1.75rem; } }
@media (max-width: 700px) { .bubble { font-size: 1rem; line-height: 1.45; } .bubble::after { border-width: 9px; } }
@media (max-width: 660px) { .note-nav { gap: 14px; } .note-nav a { white-space: nowrap; } }

/* ---- v1.03: saved progress pills, story line, listening question ---- */
.q-steps { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; padding: 0; list-style: none; }
.q-step { position: relative; min-width: 44px; min-height: 44px; padding: 0 12px; border: 2px solid var(--ink); border-radius: 999px; background: transparent; color: var(--ink); font: 700 1.05rem/1 "DM Sans", sans-serif; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.q-step:disabled { cursor: default; opacity: .5; border-style: dashed; }
.q-step.is-done { background: var(--mint); opacity: 1; }
.q-step.is-done::after { content: ""; width: 11px; height: 6px; margin-top: -3px; border-left: 3px solid currentColor; border-bottom: 3px solid currentColor; transform: rotate(-45deg); }
.q-step.is-current { background: var(--signal); border-width: 3px; opacity: 1; }
.q-step.is-current.is-done { background: var(--signal); }
.q-story { margin: 0 0 16px; padding: 12px 16px; border: 2px dashed var(--ink); border-radius: 6px; background: var(--paper); font-size: 1.15rem; line-height: 1.5; }
.q-story-tag { display: inline-block; margin-right: 8px; padding: 2px 10px; border-radius: 999px; background: var(--ink); color: var(--paper); font: 700 1rem/1.4 "DM Sans", "Be Vietnam Pro", "Noto Sans KR", "Noto Sans TC", "Noto Sans", sans-serif; }
.q-hint { margin: 0 0 12px; font-size: 1.15rem; line-height: 1.45; }
.q-prompt-listen p { margin: 0; }
.q-listen .q-label { color: var(--red); }
.opt.opt-meaning { min-height: 64px; align-content: center; }
.opt.opt-meaning .meaning { margin: 0; font: 600 1.15rem/1.4 "DM Sans", "Be Vietnam Pro", "Noto Sans KR", "Noto Sans TC", "Noto Sans", sans-serif; }
html[lang="ko"] .opt.opt-meaning .meaning, html[lang="zh-Hant"] .opt.opt-meaning .meaning { font-size: 1.15rem; font-weight: 600; }
.q-reveal { margin: 16px 0 0; padding: 14px 16px; background: #fff; border-left: 8px solid var(--blue); border-radius: 4px; }
.q-reveal[hidden] { display: none; }
.q-reveal .q-label { margin-bottom: 6px; color: var(--blue); }
.q-reveal .jp { font-size: clamp(1.6rem, 5vw, 2.3rem); }

/* ---- v1.03: real panels. Desktop: bubbles sit on the picture at their data boxes. Phone (700 px and below): the bubbles stack in a strip ABOVE the
   picture (hear left, say right, tail down), so a bubble can never cover a face, the joke or the mark. ---- */
.bubble[data-tail="bottom-right"]::after { right: 26px; left: auto; top: 100%; border-top-color: var(--ink); border-bottom-width: 0; margin-top: -1px; }
@media (max-width: 700px) {
  .panel-art { aspect-ratio: auto; display: flex; flex-direction: column; padding: 14px 12px 0; background: #fffaf0; min-height: 0 !important; }
  .panel-art img { position: static; order: 2; width: calc(100% + 24px); max-width: none; height: auto; margin: 4px -12px 0; aspect-ratio: 1600 / 1000; }
  .panel-art .bubble { position: static !important; order: 1; width: auto !important; max-width: 90%; margin: 0 0 16px; }
  .panel-art .bubble.hear { align-self: flex-start; }
  .panel-art .bubble.say { align-self: flex-end; }
  .panel-art .bubble.say::after { left: auto; right: 26px; top: 100%; bottom: auto; border: 9px solid transparent; border-top-color: var(--ink); border-bottom-width: 0; margin-top: -1px; }
  .panel-art .bubble.hear::after { left: 26px; right: auto; top: 100%; bottom: auto; border: 9px solid transparent; border-top-color: var(--ink); border-bottom-width: 0; margin-top: -1px; }
  .panel-no { z-index: 4; }
}
.panel-art { container-type: inline-size; }
.bubble { font-size: clamp(1rem, 3.1cqw, 1.45rem); text-wrap: balance; }
@media (max-width: 700px) { .bubble { font-size: 1.2rem !important; } }
/* 14 Nov: the hub lists only open lessons; one line under the list says the trip continues (e4, architect order) */
.l-more { margin: 18px 0 0; font-size: 1.05rem; line-height: 1.5; color: rgba(16, 24, 32, .78); }

/* v1.75 (17 Nov 2026): the planned lessons are back on the hub, marked as coming, each with its own moving picture */
.lcard.is-soon { background: #fffaf0; border-style: solid; border-color: var(--ink); box-shadow: 5px 5px 0 rgba(16, 24, 32, .12); color: var(--ink); overflow: hidden; }
.lcard.is-soon h3 { color: var(--ink); }
.lcard.is-soon .l-num { color: var(--red); }
.lcard.is-soon:hover { box-shadow: 8px 8px 0 rgba(16, 24, 32, .18); }
.l-art { display: block; margin: 0 0 12px; height: 74px; border-radius: 3px; background: linear-gradient(135deg, rgba(16, 24, 32, .05), rgba(16, 24, 32, .015)); border: 1px dashed rgba(16, 24, 32, .25); }
.l-art svg { display: block; width: 100%; height: 100%; fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.l-art .r { stroke: var(--red); }
.l-art .f { fill: var(--signal, #f2c94c); stroke-width: 1.6; }
.l-art .rail { stroke-dasharray: 6 6; opacity: .55; }
.mv-train { animation: mvTrain 5s linear infinite; }
.mv-coin { animation: mvCoin 2.4s ease-in infinite; }
.mv-key { transform-origin: 80px 10px; animation: mvSwing 3s ease-in-out infinite; }
.mv-steam path, .mv-steam { animation: mvSteam 2.8s ease-in-out infinite; }
.mv-steam path:nth-child(2) { animation-delay: .5s; } .mv-steam path:nth-child(3) { animation-delay: 1s; }
.mv-sign { transform-origin: 80px 28px; animation: mvNudge 2.2s ease-in-out infinite; }
.mv-bag { transform-origin: 80px 20px; animation: mvSwing 3.4s ease-in-out infinite; }
.mv-pulse { transform-origin: 80px 47px; animation: mvPulse 1.8s ease-in-out infinite; }
.mv-wave { animation: mvWave 3s linear infinite; }
.mv-glass-l { transform-origin: 66px 66px; animation: mvClinkL 2.6s ease-in-out infinite; }
.mv-glass-r { transform-origin: 94px 66px; animation: mvClinkR 2.6s ease-in-out infinite; }
.mv-spark { stroke: var(--red); animation: mvSpark 2.6s ease-in-out infinite; }
@keyframes mvTrain { from { transform: translateX(-120px); } to { transform: translateX(160px); } }
@keyframes mvCoin { 0% { transform: translateY(-14px); opacity: 0; } 25% { opacity: 1; } 70% { transform: translateY(22px); opacity: 1; } 100% { transform: translateY(22px); opacity: 0; } }
@keyframes mvSwing { 0%, 100% { transform: rotate(-7deg); } 50% { transform: rotate(7deg); } }
@keyframes mvSteam { 0% { transform: translateY(4px); opacity: 0; } 40% { opacity: .9; } 100% { transform: translateY(-8px); opacity: 0; } }
@keyframes mvNudge { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(6px); } }
@keyframes mvPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.18); } }
@keyframes mvWave { from { transform: translateX(0); } to { transform: translateX(-20px); } }
@keyframes mvClinkL { 0%, 30%, 100% { transform: rotate(0); } 45% { transform: rotate(9deg); } 60% { transform: rotate(0); } }
@keyframes mvClinkR { 0%, 30%, 100% { transform: rotate(0); } 45% { transform: rotate(-9deg); } 60% { transform: rotate(0); } }
@keyframes mvSpark { 0%, 38%, 70%, 100% { opacity: 0; } 48% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .l-art * { animation: none !important; } }
