/* 加油！加油！ — shared look: dark TV studio frame, reading text only on white panels (see 设计/研究_界面与配色.md).
   Colours have one job each; red only means "live", never "wrong". At most 4 text sizes: 28 / 24 / 20 / 15 (+ pinyin 13). */
@font-face { font-family: "JY Kai"; src: url("../fonts/kai-sub.woff2") format("woff2"); font-display: block; }
:root {
  --studio: #101a31; --studio2: #1d3a6e; --panel: #ffffff; --ink: #101a31;
  --ticker: #ffd23f; --live: #c1121f; --ok: #4cc9a0; --try: #ffb000;
  --feel: #8ecae6; --feel-ink: #0b2a3c; --think: #ffd166; --think-ink: #3d2c00;
  --muted: #9fb4dc; --line: #4b6aa8; --py: #1f5fd1;
  --hei: "PingFang SC", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  --kai: "JY Kai", "Kaiti SC", "STKaiti", "PingFang SC", sans-serif;
  --fast: 140ms; --slow: 260ms;
}
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--studio); color: #fff; font-family: var(--hei);
  user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; overscroll-behavior: none; }
*, *::before, *::after { box-sizing: border-box; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; padding: 0; background: none; touch-action: manipulation; }
button:focus { outline: none; } button:focus-visible { outline: 3px solid var(--ticker); outline-offset: 2px; }
.en { display: none; font-family: var(--hei); font-weight: 500; }
.show-en .en { display: block; } .show-en span.en { display: inline; }
.kai { font-family: var(--kai); }
ruby { ruby-position: over; } rt { font: 500 15px/1 var(--kai); color: var(--py); letter-spacing: 0; }
/* the studio background behind every station */
.studio { background: linear-gradient(180deg, var(--studio2), var(--studio)); }
/* the one primary button style, with every state */
.btn { min-height: 56px; padding: 0 28px; border-radius: 10px; font: 800 24px/1 var(--hei); color: var(--ink); background: var(--ticker);
  box-shadow: 0 4px 0 #b88f00; transition: transform var(--fast), box-shadow var(--fast); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #b88f00; }
.btn:disabled { opacity: .45; cursor: default; }
.btn.quiet { background: var(--studio2); color: #fff; box-shadow: 0 4px 0 #0a1224; }
/* white reading panel */
.panel { background: var(--panel); color: var(--ink); border-radius: 12px; }
/* try again: amber wobble; correct: teal */
@keyframes jyWobble { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-9px); } 40% { transform: translateX(8px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(3px); } }
.wobble { animation: jyWobble 380ms ease-out; }
@media (prefers-reduced-motion: reduce) { .wobble { animation: none; } * { transition-duration: 1ms !important; animation-duration: 1ms !important; animation-iteration-count: 1 !important; } }
.help-line { position: absolute; left: 0; right: 0; bottom: 8px; text-align: center; font: 500 15px/1.3 var(--hei); color: var(--muted); }

/* tablets and phones held upright: ask to turn sideways (the canvas would shrink to unreadable sizes) */
#jyTurn { display: none; }
@media (orientation: portrait) and (max-width: 900px) {
  #jyTurn { display: flex; position: fixed; inset: 0; z-index: 99; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
    background: var(--studio); color: #fff; text-align: center; font: 800 30px/1.4 var(--hei); }
  #jyTurn small { font: 500 17px/1.3 var(--hei); color: var(--muted); }
  #jyTurn svg { animation: jyTurn 2.2s ease-in-out infinite; }
}
@keyframes jyTurn { 0%, 25% { transform: rotate(0); } 55%, 100% { transform: rotate(-90deg); } }

/* English hints never below 17px (stations are scaled to about 0.8 on an iPad) */
#c .en, .bar .en { font-size: 17px !important; }
/* overlays cover the letterbox too */
.ov { box-shadow: 0 0 0 100vmax rgba(16, 26, 49, .9); }
/* characters stand out from the navy studio */
.fig { filter: drop-shadow(0 0 1.5px rgba(255, 255, 255, .6)); }
/* small inline play arrow instead of the ▶ character (an emoji on iPads) */
.tri { display: inline-block; width: 0; height: 0; border-left: 12px solid currentColor; border-top: 7px solid transparent; border-bottom: 7px solid transparent; margin-left: 8px; vertical-align: 1px; }

/* inside the shell the channel bar shows the count, so one meter only */
html.embedded .meter { display: none !important; }
html.embedded .tick .en { padding-right: 16px !important; }

/* English hints inside white panels: dark enough to read (AA on white) */
.panel .en { color: #4a5578 !important; }
