/* The stage: a fixed-size canvas (1920x1080 "wide" or 1080x1920 "tall") that is
   scaled to fit the screen. Everything inside is drawn by js/stage.js. */
@font-face { font-family: Fraunces; font-weight: 100 900; font-style: normal; font-display: swap;
  src: url(../fonts/fraunces-latin-wght-normal.woff2) format("woff2"); }
@font-face { font-family: Fraunces; font-weight: 100 900; font-style: italic; font-display: swap;
  src: url(../fonts/fraunces-latin-wght-italic.woff2) format("woff2"); }

:root {
  --ink: #0a1016;
  --cream: #f6ead8;
  --amber: #ffc86b;
  --mint: #7fdcb9;
  --coral: #ff8f70;
  --ui: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", sans-serif;
  --jp: "Hiragino Sans", "Yu Gothic UI", "Yu Gothic", "Noto Sans JP", "Meiryo", sans-serif;
  --serif: Fraunces, Georgia, serif;
}

.stage { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; overflow: hidden;
  transform-origin: 0 0; background: var(--ink); color: #fff; font-family: var(--ui); --spk: #ffc86b;
  -webkit-font-smoothing: antialiased; text-rendering: geometricPrecision; user-select: none; -webkit-user-select: none; }
.stage.tall { width: 1080px; height: 1920px; }
.stage > div { position: absolute; pointer-events: none; }

.stage .lens { left: 0; top: 0; width: 100%; height: 100%; overflow: hidden; }
.stage.tall .lens { height: 1110px; }
.stage .world { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; transform-origin: 0 0; will-change: transform; }
.stage .world svg { position: absolute; left: 0; top: 0; overflow: visible; }
.stage .warm { position: absolute; inset: 0; mix-blend-mode: screen;
  background: radial-gradient(900px 620px at 68% 12%, rgba(255,168,88,.22), transparent 70%),
              radial-gradient(700px 600px at 22% 30%, rgba(255,120,110,.10), transparent 70%); }
.stage .vignette { position: absolute; inset: 0; background: radial-gradient(ellipse 75% 70% at 50% 42%, transparent 55%, rgba(3,6,10,.62) 100%); }
.stage .shade { left: 0; right: 0; bottom: 0; height: 520px;
  background: linear-gradient(to top, rgba(7,11,16,.96) 0%, rgba(7,11,16,.90) 38%, rgba(7,11,16,.55) 70%, transparent 100%); }
.stage.tall .shade { top: 700px; height: 1220px;
  background: radial-gradient(900px 620px at 16% 62%, color-mix(in srgb, var(--spk) 13%, transparent), transparent 70%),
              linear-gradient(to bottom, transparent 0, rgba(8,13,19,.62) 15%, rgba(8,13,19,.97) 32%, #080d13 34%, #0a1016 100%); }
.stage .grain { inset: 0; opacity: .055; mix-blend-mode: overlay; }
.stage.low .grain, .stage.low .warm { display: none; }

/* ---------- top bar ---------- */
.stage .hud { left: 0; right: 0; top: 0; height: 130px; padding: 40px 64px 0; box-sizing: border-box;
  display: flex; align-items: flex-start; justify-content: space-between;
  background: linear-gradient(to bottom, rgba(7,11,16,.72), transparent); }
.stage .brand { display: flex; gap: 14px; align-items: center; width: 420px; }
.stage .brand b { display: block; font-size: 21px; letter-spacing: .22em; font-weight: 700; }
.stage .brand span { display: block; font-family: var(--jp); font-size: 15px; opacity: .7; letter-spacing: .12em; margin-top: 2px; }
.stage .ep { width: 420px; text-align: right; }
.stage .ep span { display: block; font-size: 14px; letter-spacing: .26em; color: var(--amber); font-weight: 700; }
.stage .ep b { display: block; font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 26px; margin-top: 2px; }
.stage .chapters { display: flex; gap: 12px; width: 700px; margin-top: 4px; }
.stage .chap { opacity: .45; min-width: 130px; }
.stage .chap.on { opacity: 1; }
.stage .chap .lab { font-size: 13px; letter-spacing: .16em; font-weight: 700; text-transform: uppercase; white-space: nowrap; }
.stage .chap .sub { font-family: var(--jp); font-size: 13px; letter-spacing: .08em; opacity: .75; margin-top: 7px; white-space: nowrap; }
.stage .chap .bar { height: 4px; border-radius: 2px; background: rgba(255,255,255,.22); margin-top: 9px; overflow: hidden; }
.stage .chap .bar i { display: block; height: 100%; width: 0; background: var(--amber); border-radius: 2px; }

.stage.tall .hud { height: 260px; padding: 54px 56px 0; flex-wrap: wrap; align-content: flex-start; }
.stage.tall .brand { width: auto; }
.stage.tall .brand b { font-size: 26px; }
.stage.tall .brand span { font-size: 19px; }
.stage.tall .ep { width: auto; }
.stage.tall .ep span { font-size: 18px; }
.stage.tall .ep b { font-size: 34px; }
.stage.tall .chapters { order: 3; width: 100%; margin-top: 26px; }
.stage.tall .chap { min-width: 0; }
.stage.tall .chap .lab { font-size: 17px; }
.stage.tall .chap .sub { display: none; }
.stage.tall .chap .bar { height: 6px; border-radius: 3px; }
.stage.tall.safe .hud { padding-top: 210px; height: 420px; }

/* ---------- captions ---------- */
.stage .caption { left: 110px; bottom: 74px; width: 1180px; }
.stage .tip { display: inline-flex; align-items: baseline; gap: 14px; margin-bottom: 18px; padding: 9px 20px; border-radius: 100px;
  background: rgba(10,16,22,.72); border: 1.5px solid var(--tipc, var(--mint)); color: var(--tipc, var(--mint)); max-width: 100%; box-sizing: border-box; }
.stage .tip b { font-size: 21px; font-weight: 700; letter-spacing: .01em; }
.stage .tip span { font-family: var(--jp); font-size: 17px; color: rgba(255,255,255,.72); }
.stage .speaker { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; height: 34px; }
.stage .speaker .dot { width: 12px; height: 12px; border-radius: 50%; background: currentColor; box-shadow: 0 0 16px currentColor; }
.stage .speaker .name { font-size: 24px; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; }
.stage .speaker .role { font-family: var(--jp); font-size: 19px; color: rgba(255,255,255,.62); }
.stage .wave { display: flex; align-items: center; gap: 4px; height: 34px; margin-left: 10px; }
.stage .wave i { width: 4px; border-radius: 2px; background: currentColor; opacity: .9; }
.stage .line { font-family: var(--serif); font-weight: 500; font-size: 60px; line-height: 1.22; letter-spacing: -.012em;
  text-shadow: 0 2px 30px rgba(0,0,0,.5); }
.stage .line .w { display: inline-block; padding-right: .25em; padding-bottom: 5px; color: transparent;
  -webkit-background-clip: text; background-clip: text; border-bottom: 4px solid transparent; }
.stage .ja { font-family: var(--jp); font-size: 30px; font-weight: 500; color: rgba(255,255,255,.74); margin-top: 16px; letter-spacing: .03em; }
/* a picked answer with a grammar mistake: crossed out, then the right way under it */
.stage .line .w { position: relative; }
.stage .line .st { position: absolute; left: -.06em; right: .14em; top: 50%; height: 6px; margin-top: -3px; border-radius: 3px;
  background: #ff6b6b; box-shadow: 0 0 12px rgba(255,107,107,.6); transform: scaleX(0); transform-origin: left center; }
.stage .line .xm { display: inline-flex; align-items: center; justify-content: center; width: 1.05em; height: 1.05em; border-radius: 50%;
  margin-left: .05em; vertical-align: .02em; font-size: .72em; font-weight: 800; line-height: 1;
  color: #fff; background: #ff6b6b; box-shadow: 0 0 18px rgba(255,107,107,.55); opacity: 0; }
.stage .fix { display: flex; align-items: center; gap: 18px; margin-top: 14px; opacity: 0; }
.stage .fix i { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 54px; height: 54px; border-radius: 50%;
  font-style: normal; font-size: 34px; font-weight: 800; color: #0a1016; background: #7fdcb9; box-shadow: 0 0 20px rgba(127,220,185,.55); }
.stage .fix b { font-family: var(--serif); font-weight: 500; font-size: 56px; line-height: 1.2; letter-spacing: -.012em; color: #7fdcb9;
  text-shadow: 0 2px 30px rgba(0,0,0,.5); }
.stage .fix span { order: 1; flex: none; white-space: nowrap; font-family: var(--jp); font-size: 22px; font-weight: 700; color: #7fdcb9; opacity: .8; }
.stage .fix b { order: 2; }
.stage.tall .fix b { font-size: 60px; }
.stage.tall .fix i { width: 58px; height: 58px; font-size: 36px; }
.stage .turn { display: flex; align-items: center; gap: 18px; margin-top: 22px; color: var(--mint); opacity: 0; }
.stage .turn b { font-size: 17px; letter-spacing: .22em; font-weight: 800; white-space: nowrap; }
.stage .turn b span { font-family: var(--jp); letter-spacing: .08em; margin-left: 8px; }
.stage .turn .meter { flex: 1; max-width: 420px; height: 7px; border-radius: 4px; background: rgba(255,255,255,.14); overflow: hidden; }
.stage .turn .meter i { display: block; height: 100%; border-radius: 4px; background: currentColor; }
.stage[data-cap="en"] .ja { visibility: hidden; }
.stage[data-cap="off"] .line, .stage[data-cap="off"] .ja { visibility: hidden; }

.stage.tall .caption { left: 64px; right: 64px; top: 1124px; bottom: auto; width: auto; }
.stage.tall.safe .caption { right: 150px; }
.stage.tall .tip { flex-direction: column; gap: 2px; border-radius: 22px; padding: 12px 22px; }
.stage.tall .tip b { font-size: 27px; }
.stage.tall .tip span { font-size: 22px; }
.stage.tall .speaker { height: 40px; margin-bottom: 18px; }
.stage.tall .speaker .name { font-size: 29px; }
.stage.tall .speaker .role { font-size: 25px; }
.stage.tall .line { font-size: 66px; line-height: 1.2; }
.stage.tall .ja { font-size: 35px; line-height: 1.45; margin-top: 20px; }
.stage.tall .turn b { font-size: 22px; }

/* ---------- key phrase card ---------- */
.stage .vocab { right: 84px; bottom: 80px; width: 470px; padding: 30px 34px 32px; box-sizing: border-box; border-radius: 22px;
  background: linear-gradient(160deg, rgba(34,44,54,.90), rgba(16,22,30,.92));
  border: 1px solid rgba(255,255,255,.14); box-shadow: 0 30px 80px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.12); }
.stage .vocab::before { content: ""; position: absolute; left: 0; top: 30px; bottom: 30px; width: 5px; border-radius: 0 4px 4px 0; background: var(--accent, var(--amber)); }
.stage .vocab .tag { font-size: 13px; letter-spacing: .24em; font-weight: 700; color: var(--accent, var(--amber)); }
.stage .vocab .tag span { font-family: var(--jp); letter-spacing: .08em; font-weight: 500; color: rgba(255,255,255,.55); margin-left: 10px; }
.stage .vocab .phrase { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 46px; line-height: 1.1; margin-top: 14px; }
.stage .vocab .mean { font-family: var(--jp); font-size: 31px; font-weight: 700; margin-top: 14px; line-height: 1.3; }
.stage .vocab .note { font-size: 20px; color: rgba(255,255,255,.62); margin-top: 12px; line-height: 1.35; }
.stage .v-save { display: none; position: absolute; right: 22px; top: 22px; font-size: 15px; font-weight: 800; letter-spacing: .14em;
  padding: 8px 14px; border-radius: 100px; background: rgba(255,255,255,.1); color: #fff; }
.stage .v-save.on { background: var(--coral); color: var(--ink); }
.stage.live .v-save { display: block; }
.stage.radio .v-save { display: none; }

.stage.tall .vocab { left: 56px; right: 56px; width: auto; bottom: 838px; padding: 30px 38px 32px; }
.stage.tall .vocab .tag { font-size: 17px; }
.stage.tall .vocab .phrase { font-size: 56px; }
.stage.tall .vocab .mean { font-size: 37px; }
.stage.tall .vocab .note { font-size: 26px; }
.stage.tall .v-save { font-size: 21px; padding: 10px 18px; }

/* ---------- overlays ---------- */
.stage .dim { inset: 0; background: rgba(6,10,15,1); opacity: 0; }
.stage .pill { display: inline-block; font-size: 15px; letter-spacing: .26em; font-weight: 700; color: var(--ink); background: var(--amber);
  padding: 9px 18px 9px 20px; border-radius: 100px; }
.stage .pill span { font-family: var(--jp); letter-spacing: .06em; font-weight: 700; margin-left: 12px; opacity: .75; }
.stage.tall .pill { font-size: 20px; padding: 11px 22px 11px 24px; }

.stage .title { left: 150px; top: 250px; width: 1500px; }
.stage .t-ep { font-size: 22px; letter-spacing: .42em; color: var(--amber); font-weight: 700; }
.stage .t-main { font-family: var(--serif); font-weight: 400; font-size: 190px; line-height: 1; letter-spacing: -.03em; margin-top: 26px; }
.stage .t-main span { display: inline-block; padding-right: .22em; }
.stage .t-main em { font-style: italic; color: var(--amber); }
.stage .t-ja { font-family: var(--jp); font-size: 46px; font-weight: 500; margin-top: 30px; letter-spacing: .1em; color: rgba(255,255,255,.85); }
.stage .t-tags { margin-top: 44px; display: flex; gap: 14px; flex-wrap: wrap; }
.stage .t-tags span { font-family: var(--jp); font-size: 22px; font-weight: 700; padding: 10px 22px; border-radius: 100px; border: 1.5px solid rgba(255,255,255,.35); }
.stage .t-tags span:first-child { background: var(--amber); color: var(--ink); border-color: var(--amber); }
.stage.tall .title { left: 72px; top: 600px; width: 940px; }
.stage.tall .t-ep { font-size: 26px; }
.stage.tall .t-main { font-size: 164px; }
.stage.tall .t-ja { font-size: 50px; }
.stage.tall .t-tags span { font-size: 28px; }

.stage .beat { inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.stage .b-en { font-family: var(--serif); font-style: italic; font-size: 104px; font-weight: 400; letter-spacing: -.01em; }
.stage .b-ja { font-family: var(--jp); font-size: 38px; margin-top: 20px; letter-spacing: .3em; color: var(--amber); }
.stage.tall .b-en { font-size: 96px; padding: 0 60px; line-height: 1.1; }
.stage.tall .b-ja { font-size: 42px; margin-top: 30px; }

/* ---------- your choice ---------- */
.stage .choice { left: 170px; top: 176px; width: 1580px; }
.stage .c-text { font-family: var(--serif); font-size: 66px; font-weight: 500; line-height: 1.12; letter-spacing: -.015em; margin-top: 26px; }
.stage .c-ja { font-family: var(--jp); font-size: 29px; color: rgba(255,255,255,.7); margin-top: 14px; }
.stage .c-opts { margin-top: 34px; display: flex; flex-direction: column; gap: 16px; max-width: 1340px; }
.stage .opt { display: flex; align-items: center; gap: 24px; padding: 18px 26px; border-radius: 18px; font-size: 36px; font-weight: 500;
  background: rgba(255,255,255,.07); border: 2px solid rgba(255,255,255,.12); box-sizing: border-box; }
.stage .opt .k { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 24px;
  background: rgba(255,255,255,.14); flex: none; }
.stage .opt .o-ja { display: block; font-family: var(--jp); font-size: 21px; font-weight: 500; color: rgba(255,255,255,.58); margin-top: 5px; }
.stage .c-opts .opt { font-family: var(--serif); font-size: 38px; line-height: 1.16; }
.stage .c-timer { height: 6px; border-radius: 3px; background: rgba(255,255,255,.14); margin-top: 26px; max-width: 1340px; overflow: hidden; }
.stage .c-timer i { display: block; height: 100%; width: 0; background: var(--amber); border-radius: 3px; }
.stage.live .c-timer { display: none; }
.stage .c-hint { font-family: var(--jp); font-size: 22px; letter-spacing: .14em; color: var(--amber); margin-top: 24px; display: none; }
.stage.live .c-hint { display: block; }
.stage.tall .choice { left: 64px; top: 330px; width: 952px; }
.stage.tall.safe .choice { top: 420px; }
.stage.tall .c-text { font-size: 68px; }
.stage.tall .c-ja { font-size: 36px; }
.stage.tall .c-opts { gap: 20px; margin-top: 44px; }
.stage.tall .c-opts .opt { font-size: 44px; padding: 26px 30px; border-radius: 26px; }
.stage.tall .opt .k { width: 64px; height: 64px; font-size: 30px; }
.stage.tall .opt .o-ja { font-size: 27px; margin-top: 8px; }
.stage.tall .c-hint { font-size: 28px; }

/* ---------- quick check ---------- */
.stage .quiz { left: 170px; top: 196px; width: 1580px; display: flex; justify-content: space-between; align-items: center; }
.stage .q-left { width: 1160px; }
.stage .q-text { font-family: var(--serif); font-size: 70px; font-weight: 500; line-height: 1.12; letter-spacing: -.015em; margin-top: 30px; }
.stage .q-ja { font-family: var(--jp); font-size: 29px; color: rgba(255,255,255,.7); margin-top: 16px; }
.stage .q-opts { margin-top: 40px; display: flex; flex-direction: column; gap: 16px; }
.stage .q-quote { font-family: var(--serif); font-style: italic; font-size: 34px; color: var(--mint); margin-top: 30px; }
.stage .q-ring { position: relative; width: 220px; text-align: center; margin-right: 40px; }
.stage .ringNum { position: absolute; left: 0; top: 0; width: 220px; height: 220px; display: grid; place-items: center;
  font-family: var(--serif); font-size: 104px; font-weight: 500; }
.stage .ring-label { font-family: var(--jp); font-size: 22px; letter-spacing: .2em; color: rgba(255,255,255,.7); margin-top: 16px; white-space: nowrap; }
.stage.tall .quiz { left: 64px; top: 320px; width: 952px; flex-direction: column; align-items: stretch; }
.stage.tall.safe .quiz { top: 400px; }
.stage.tall .q-left { width: auto; }
.stage.tall .q-text { font-size: 68px; }
.stage.tall .q-ja { font-size: 35px; }
.stage.tall .q-opts { gap: 20px; }
.stage.tall .q-opts .opt { font-size: 42px; padding: 26px 30px; border-radius: 26px; }
.stage.tall .q-quote { font-size: 42px; }
.stage.tall .q-ring { margin: 50px auto 0; }
.stage.tall .ring-label { font-size: 28px; }

/* ---------- listen & repeat ---------- */
.stage .recap { left: 170px; top: 170px; width: 1580px; }
.stage .r-head { display: flex; align-items: center; gap: 30px; flex-wrap: wrap; }
.stage .r-title { font-family: var(--serif); font-style: italic; font-size: 54px; }
.stage .r-rows { margin-top: 34px; display: flex; flex-direction: column; gap: 14px; overflow-y: auto; max-height: 800px; }
.stage .row { position: relative; display: flex; align-items: center; gap: 30px; padding: 20px 34px; border-radius: 20px;
  border: 2px solid transparent; }
.stage .row .n { font-family: var(--serif); font-style: italic; font-size: 34px; width: 46px; color: rgba(255,255,255,.5); flex: none; }
.stage .row .en { font-family: var(--serif); font-size: 50px; font-weight: 500; letter-spacing: -.01em; line-height: 1.1; }
.stage .row .jp { font-family: var(--jp); font-size: 24px; color: rgba(255,255,255,.66); margin-top: 8px; }
.stage .row .txt { flex: 1; }
.stage .row .state { width: 300px; text-align: right; flex: none; }
.stage .row .state b { display: block; font-size: 16px; letter-spacing: .22em; font-weight: 800; }
.stage .row .state b[data-v="✓"] { font-size: 40px; letter-spacing: 0; }
.stage .row .state b span { font-family: var(--jp); letter-spacing: .08em; margin-left: 8px; }
.stage .row .state .meter { height: 6px; border-radius: 3px; background: rgba(255,255,255,.14); margin-top: 12px; overflow: hidden; }
.stage .row .state .meter i { display: block; height: 100%; border-radius: 3px; background: currentColor; margin-left: auto; }
.stage .r-save { display: none; flex: none; width: 64px; height: 64px; border-radius: 50%; place-items: center; font-size: 30px;
  background: rgba(255,255,255,.08); color: #fff; }
.stage .r-save.on { background: var(--coral); color: var(--ink); }
.stage.live .r-save { display: grid; }
.stage.tall .recap { left: 48px; top: 300px; width: 984px; }
.stage.tall.safe .recap { top: 400px; }
.stage.tall .r-title { font-size: 60px; }
.stage.tall .r-rows { gap: 16px; margin-top: 40px; max-height: 1400px; }
.stage.tall .row { flex-wrap: wrap; gap: 8px 22px; padding: 22px 26px; border-radius: 24px; }
.stage.tall .row .n { width: 40px; font-size: 38px; }
.stage.tall .row .en { font-size: 52px; }
.stage.tall .row .jp { font-size: 30px; }
.stage.tall .row .state { order: 5; width: 100%; padding-left: 62px; box-sizing: border-box; text-align: left; display: flex; align-items: center; gap: 20px; min-height: 30px; }
.stage.tall .row .state b { font-size: 21px; white-space: nowrap; }
.stage.tall .row .state b[data-v="✓"] { font-size: 34px; }
.stage.tall .row .state .meter { flex: 1; margin-top: 0; height: 8px; }
.stage.tall .r-save { width: 84px; height: 84px; font-size: 40px; }

.stage .fade { inset: 0; background: #000; opacity: 0; }

/* things you can tap while the stage is live */
.stage.live .line, .stage.live .vocab, .stage.live .opt, .stage.live .row { pointer-events: auto; cursor: pointer; }
.stage.live .recap .row { -webkit-tap-highlight-color: transparent; }

/* ---------- news headline card ---------- */
.stage .b-tag:empty, .stage .b-src:empty { display: none; }
.stage .b-tag { font-size: 20px; letter-spacing: .28em; font-weight: 800; color: var(--ink); background: var(--amber); padding: 10px 22px 10px 26px; border-radius: 100px; margin-bottom: 34px; }
.stage .b-src { font-size: 22px; letter-spacing: .12em; color: rgba(255,255,255,.55); margin-top: 34px; }
.stage .beat.news .b-en { font-style: normal; font-weight: 500; font-size: 108px; line-height: 1.06; letter-spacing: -.02em; max-width: 1500px; }
.stage .beat.news .b-ja { letter-spacing: .12em; font-size: 40px; margin-top: 28px; }
.stage.tall .b-tag { font-size: 26px; }
.stage.tall .b-src { font-size: 28px; }
.stage.tall .beat.news .b-en { font-size: 104px; }
.stage.tall .beat.news .b-ja { font-size: 44px; }
