/* 所有页面按 1920×1080 设计，common.js 等比缩放。不用新 CSS 语法，老浏览器也能打开 */
:root {
  --deep: #2f7d69;
  --mid: #4fa88c;
  --mint: #8ecdc0;
  --pale: #e7f3ee;
  --coral: #f08c7a;
  --coral-deep: #d4614c;
  --cream: #fff8e8;
  --sun: #ffd166;
  --ink: #1f3a33;
  --soft: #5f7a72;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 100%; height: 100%; overflow: hidden; background: #24524a; }
body { font-family: "Segoe UI", "Microsoft YaHei", Arial, sans-serif; color: var(--ink); -webkit-user-select: none; user-select: none; }
#stage { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; transform-origin: 0 0; background: #f4faf6; overflow: hidden; }

/* 顶部课本式标题带 */
.ribbon { position: absolute; left: 0; top: 0; right: 0; height: 104px; background: var(--deep); color: #fff; display: flex; align-items: center; padding: 0 36px; }
.ribbon .tag { background: var(--coral); border-radius: 8px; padding: 6px 18px; font-size: 26px; font-weight: 700; margin-right: 22px; }
.ribbon h1 { font-size: 44px; font-weight: 800; flex: 1; white-space: nowrap; }
.ribbon .home { color: #fff; text-decoration: none; font-size: 24px; border: 2px solid rgba(255, 255, 255, 0.6); border-radius: 10px; padding: 8px 18px; }
.offline-chip { display: none; background: var(--sun); color: var(--ink); border-radius: 8px; padding: 6px 14px; font-size: 22px; font-weight: 700; margin-right: 16px; }
.is-offline .offline-chip { display: inline-block; }

.btn { display: inline-block; border: none; border-radius: 16px; font: inherit; font-size: 32px; font-weight: 700; padding: 16px 34px; cursor: pointer; background: var(--deep); color: #fff; text-decoration: none; box-shadow: 0 5px 0 #1f5a4a; touch-action: manipulation; }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 #1f5a4a; }
.btn.alt { background: #fff; color: var(--deep); box-shadow: 0 5px 0 #b9d6cc; border: 3px solid var(--mint); }
.btn.hot { background: var(--coral-deep); box-shadow: 0 5px 0 #a4422f; }
.btn[disabled] { opacity: 0.45; cursor: default; }

.card { background: #fff; border-radius: 22px; box-shadow: 0 6px 22px rgba(47, 125, 105, 0.12); }

/* Mr Liu 和对话气泡 */
.liu { position: relative; }
.liu svg { display: block; width: 100%; height: 100%; }
.liu .mouth-open { display: none; }
.liu.talking .mouth-open { display: block; }
.liu.talking .mouth-closed { display: none; }
.liu.talking svg { animation: bob 0.5s ease-in-out infinite alternate; transform-origin: 50% 100%; }
@keyframes bob { from { transform: translateY(0); } to { transform: translateY(-5px); } }
.bubble { position: relative; background: #fff; border: 4px solid var(--mint); border-radius: 24px; padding: 20px 30px; font-size: 36px; line-height: 1.32; font-weight: 600; }

/* 录音音量条 */
.meter { display: inline-flex; align-items: center; gap: 6px; height: 60px; vertical-align: middle; }
.meter i { display: block; width: 10px; height: 12%; background: var(--coral-deep); border-radius: 5px; }

.toast { position: fixed; left: 50%; bottom: 40px; transform: translate(-50%, 30px); background: rgba(31, 58, 51, 0.94); color: #fff; font-size: 22px; padding: 12px 26px; border-radius: 12px; opacity: 0; transition: all 0.2s; pointer-events: none; z-index: 99; max-width: 80%; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
