/* 布局：顶部像 Minecraft 的经验条工具栏；内容是一页一页的“说明书”，外框用主题色。 */
@font-face {
  font-family: 'Press Start 2P';
  src: url(../fonts/press-start-2p.woff2) format('woff2');
  font-weight: 400;
  font-display: swap;
}

:root {
  --bg: #cfe7f2;
  --bg-deep: #a9d2e6;
  --paper: #fffdf6;
  --panel: #f5f1e6;
  --ink: #2a2723;
  --ink-soft: #6e685d;
  --line: #ddd5c2;
  --gui: #c6c6c6;
  --gui-hi: #ffffff;
  --gui-lo: #555555;
  --slot: #8b8b8b;
  --slot-hi: #ffffff;
  --slot-lo: #373737;
  --xp: #80d92b;
  --xp-dark: #3d7410;
  --heart: #e0393b;
  --good: #3f9b2c;
  --bad: #c9372c;
  --theme: #5d9c3a;
  --font-pixel: 'Press Start 2P', ui-monospace, 'SF Mono', Menlo, monospace;
  --font-read: ui-rounded, 'SF Pro Rounded', 'Arial Rounded MT Bold', 'Nunito', system-ui, sans-serif;
  --font-zh: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans SC', system-ui, sans-serif;
  --shadow-ink: rgba(30, 24, 10, 0.18);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #12161d; --bg-deep: #0b0e13; --paper: #1f2228; --panel: #282b32; --ink: #eeebe3; --ink-soft: #a8a398;
    --line: #3b3e46; --gui: #4b4b50; --gui-hi: #77777d; --gui-lo: #1e1e21; --slot: #2e2e33; --slot-hi: #55555b;
    --slot-lo: #111114; --shadow-ink: rgba(0, 0, 0, 0.45); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #12161d; --bg-deep: #0b0e13; --paper: #1f2228; --panel: #282b32; --ink: #eeebe3; --ink-soft: #a8a398;
  --line: #3b3e46; --gui: #4b4b50; --gui-hi: #77777d; --gui-lo: #1e1e21; --slot: #2e2e33; --slot-hi: #55555b;
  --slot-lo: #111114; --shadow-ink: rgba(0, 0, 0, 0.45); color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  background-image: linear-gradient(var(--bg) 0, var(--bg-deep) 100%);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--font-zh);
  font-size: 16px;
  line-height: 1.6;
  -webkit-tap-highlight-color: transparent;
}
img.px { image-rendering: pixelated; image-rendering: crisp-edges; -webkit-user-drag: none; }
button { font: inherit; color: inherit; }
/* 触屏：去掉双击放大、长按菜单和点按高亮 */
button, a, .slot, .opt, .feat-tile { touch-action: manipulation; -webkit-touch-callout: none; }
.letters, .answer, .opts, .hero, .topbar { -webkit-user-select: none; user-select: none; }
:focus-visible { outline: 3px solid #ffd23f; outline-offset: 2px; }
.en { font-family: var(--font-pixel); font-weight: 400; letter-spacing: 0; }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding-top: max(8px, env(safe-area-inset-top, 0px)); padding-bottom: 8px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  background: #2b2b2b;
  border-bottom: 4px solid #000;
  color: #fff;
}
.brand { display: flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; font-weight: 800; font-size: 17px; }
.brand img { width: 30px; height: 30px; }
.xp { flex: 1 1 160px; min-width: 120px; max-width: 360px; position: relative; padding-top: 14px; }
.xp .lvl {
  position: absolute; left: 50%; top: -4px; transform: translateX(-50%);
  font-family: var(--font-pixel); font-size: 12px; color: var(--xp);
  text-shadow: 2px 2px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000;
}
.xpbar { height: 10px; background: #1c1c1c; border: 2px solid #000; position: relative; overflow: hidden; }
.xpbar i { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--xp); box-shadow: inset 0 -3px 0 var(--xp-dark); transition: width .5s steps(12); }
.topnav { display: flex; gap: 6px; margin-left: auto; }

/* ---------- MC 风格按钮 / 面板 ---------- */
.mc-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 40px; padding: 4px 14px;
  background: var(--gui); color: var(--ink);
  border: 3px solid; border-color: var(--gui-hi) var(--gui-lo) var(--gui-lo) var(--gui-hi);
  outline: 2px solid #000; outline-offset: 0;
  font-weight: 700; font-size: 15px; cursor: pointer; text-decoration: none; user-select: none;
}
@media (hover: hover) { .mc-btn:hover { filter: brightness(1.08); } }
.mc-btn:active { border-color: var(--gui-lo) var(--gui-hi) var(--gui-hi) var(--gui-lo); }
.mc-btn:focus-visible { outline: 3px solid #ffd23f; }
.mc-btn.primary {
  background: var(--theme); color: #fff; text-shadow: 2px 2px 0 rgba(0,0,0,.35);
  border-color: color-mix(in srgb, var(--theme) 55%, #fff) color-mix(in srgb, var(--theme) 55%, #000) color-mix(in srgb, var(--theme) 55%, #000) color-mix(in srgb, var(--theme) 55%, #fff);
}
.mc-btn.big { min-height: 52px; font-size: 18px; padding: 6px 22px; }
.topnav .mc-btn { min-height: 34px; padding: 2px 10px; font-size: 14px; background: #6b6b6b; color: #fff; border-color: #9a9a9a #3a3a3a #3a3a3a #9a9a9a; }
.topnav .mc-btn[aria-current="page"] { background: var(--xp-dark); border-color: #6fb63a #22420a #22420a #6fb63a; }

.wrap {
  max-width: 1180px; margin: 0 auto;
  padding-block: 20px 48px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

/* ---------- 封面 ---------- */
.cover {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px; align-items: center;
  padding: 28px; margin-bottom: 26px;
  background: #1d2433; color: #fff;
  border: 4px solid #000; box-shadow: 0 6px 0 var(--shadow-ink);
}
.cover::after { /* 地面 */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 32px;
  background-image: var(--ground); background-size: 32px 32px; image-rendering: pixelated;
}
.cover .eyebrow { font-family: var(--font-pixel); color: #8fdc7a; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 8px; }
.cover h1 { margin: 4px 0 6px; font-size: clamp(30px, 6vw, 52px); line-height: 1.15; font-weight: 900; text-wrap: balance; text-shadow: 3px 3px 0 #000; }
.cover h1 .en { display: block; margin-top: 12px; font-size: clamp(13px, 2.2vw, 20px); line-height: 1.5; color: #ffd23f; }
.cover p { margin: 0 0 18px; color: #d6dbe6; max-width: 32em; }
.cover .actions { display: flex; flex-wrap: wrap; gap: 12px; padding-bottom: 36px; }
.cover-art { position: relative; height: 240px; z-index: 1; }
.cover-art img { position: absolute; width: 112px; animation: bob 3.2s ease-in-out infinite; }
.cover-art img:nth-child(1) { left: 6%; bottom: 20px; width: 128px; }
.cover-art img:nth-child(2) { left: 40%; bottom: 46px; width: 116px; animation-delay: -1s; }
.cover-art img:nth-child(3) { right: 4%; bottom: 14px; width: 120px; animation-delay: -2s; }
.cover-art img:nth-child(4) { left: 26%; top: 0; width: 64px; animation-delay: -.5s; }
.cover-art img:nth-child(5) { right: 16%; top: 6px; width: 56px; animation-delay: -1.6s; }
@keyframes bob { 50% { transform: translateY(-8px); } }

.progress-line { display: flex; gap: 16px; flex-wrap: wrap; font-size: 14px; color: #c7cede; }
.progress-line b { color: #fff; font-family: var(--font-pixel); font-weight: 400; font-size: 14px; }

/* ---------- 主题“箱子” ---------- */
.chests { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 18px; }
.chest {
  background: var(--gui); padding: 12px 12px 14px;
  border: 3px solid; border-color: var(--gui-hi) var(--gui-lo) var(--gui-lo) var(--gui-hi);
  outline: 3px solid #000;
}
.chest-head { display: flex; align-items: baseline; gap: 8px; margin: 0 2px 10px; }
.chest-head h2 { margin: 0; font-size: 20px; font-weight: 900; }
.chest-head .en { color: var(--ink-soft); font-size: 10px; }
.chest-head .count { margin-left: auto; font-family: var(--font-pixel); font-size: 11px; color: var(--ink-soft); }
.chest-head::before { content: ""; width: 14px; height: 14px; background: var(--theme); border: 2px solid #000; align-self: center; }

.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 6px; }
.slot {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  aspect-ratio: 1 / 1.12; max-width: 100%; padding: 6px 2px 4px;
  background: var(--slot);
  border: 3px solid; border-color: var(--slot-lo) var(--slot-hi) var(--slot-hi) var(--slot-lo);
  color: #fff; text-decoration: none; cursor: pointer;
}
.slot img { width: 70%; max-width: 64px; filter: drop-shadow(2px 2px 0 rgba(0,0,0,.3)); }
.slot .lbl { font-family: var(--font-pixel); font-size: 9px; line-height: 1.2; text-shadow: 1px 1px 0 #000; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
@media (hover: hover) { .slot:hover { background: color-mix(in srgb, var(--slot) 75%, #fff); } }
.slot.got::after {
  content: ""; position: absolute; right: 3px; top: 3px; width: 10px; height: 10px; background: var(--xp); border: 2px solid #000;
}
.slot.locked img { filter: brightness(0) opacity(.35); }
.slot.locked .lbl { opacity: .55; }

/* ---------- 单词说明书页 ---------- */
.page {
  background: var(--paper);
  border: 6px solid var(--theme);
  outline: 3px solid #000;
  box-shadow: 0 8px 0 var(--shadow-ink);
  padding: 20px;
  position: relative;
}
.page::before { /* 角上的像素点，像打印的说明书边框 */
  content: ""; position: absolute; inset: 6px; pointer-events: none;
  border: 2px dashed color-mix(in srgb, var(--theme) 35%, transparent);
}
.page-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; position: relative; }
.badge {
  flex: none; display: grid; place-items: center; width: 72px; height: 72px;
  background: color-mix(in srgb, var(--theme) 22%, var(--paper)); color: var(--ink);
  border: 5px solid var(--theme); outline: 3px solid #000;
  font-family: var(--font-pixel); font-size: 24px;
}
.titles { min-width: 0; flex: 1; }
.word-title {
  margin: 0; font-family: var(--font-pixel); font-weight: 400; line-height: 1.1;
  font-size: clamp(28px, 6.5vw, 60px); color: var(--theme); text-transform: capitalize;
  text-shadow: 3px 3px 0 color-mix(in srgb, var(--theme) 45%, #000), 6px 6px 0 rgba(0,0,0,.15);
  overflow-wrap: anywhere;
}
.zh-line { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.zh-line .zh { font-size: 26px; font-weight: 900; }
.ipa-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 2px 10px 2px 12px; min-height: 40px;
  background: var(--panel); border: 2px solid var(--line); border-radius: 999px; cursor: pointer;
  font-family: 'Lucida Sans Unicode', 'Arial Unicode MS', var(--font-zh); font-size: 20px;
}
.ipa-btn svg, .say svg { width: 24px; height: 24px; color: var(--theme); flex: none; }
.head-nav { display: flex; gap: 8px; margin-left: auto; }

.card-grid {
  display: grid; gap: 14px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  grid-template-areas: "sent hero" "mean hero" "feat feat" "tip rel" "chal chal";
}
.box {
  min-width: 0; background: var(--paper); padding: 14px 16px;
  border: 2px solid color-mix(in srgb, var(--theme) 45%, var(--line)); border-radius: 10px;
}
.box h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 18px; font-weight: 900; }
.box h3 img { width: 26px; height: 26px; }
.box h3 .tag { background: #2b2b2b; color: #fff; padding: 2px 10px; border-radius: 4px; font-size: 16px; }
.box p { margin: 0; }
.sent { grid-area: sent; display: flex; gap: 14px; align-items: center; }
.sent .thumb { width: 72px; flex: none; }
.sent .en-s { font-size: 24px; line-height: 1.35; font-family: var(--font-read); font-weight: 600; }
.sent .en-s mark { background: none; color: var(--theme); font-weight: 800; }
.sent .zh-s { color: var(--ink-soft); margin-top: 6px; }
.mean { grid-area: mean; background: var(--panel); }
.feat { grid-area: feat; }
.tip { grid-area: tip; background: color-mix(in srgb, #ffd23f 14%, var(--paper)); }
.rel { grid-area: rel; }
.chal { grid-area: chal; background: color-mix(in srgb, var(--theme) 8%, var(--paper)); }

.say { display: inline-grid; place-items: center; width: 44px; height: 44px; flex: none; background: var(--panel); border: 2px solid var(--line); border-radius: 50%; cursor: pointer; }

/* 大图场景 */
.hero {
  grid-area: hero; position: relative; overflow: hidden; min-height: 300px;
  border: 3px solid #000; border-radius: 10px; cursor: pointer;
  display: grid; place-items: center;
  background: linear-gradient(#7fc8f8, #cbeaff);
}
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 48px; background-image: var(--ground); background-size: 48px 48px; image-rendering: pixelated; }
.hero img.main { position: relative; z-index: 1; width: min(62%, 240px); margin-top: 10px; margin-bottom: 30px; filter: drop-shadow(6px 8px 0 rgba(0,0,0,.25)); transition: transform .15s; }
.hero:active img.main { transform: scale(.95); }
.hero .deco { position: absolute; width: 44px; z-index: 0; }
.hero .bubble {
  position: absolute; top: 14px; right: 14px; z-index: 2; max-width: 62%;
  background: #fff; color: #2a2723; padding: 8px 14px; border: 3px solid #000; border-radius: 14px;
  font-weight: 800; font-size: 16px; line-height: 1.35;
}
.hero .bubble::after { content: ""; position: absolute; left: 22px; bottom: -13px; width: 14px; height: 14px; background: #fff; border-right: 3px solid #000; border-bottom: 3px solid #000; transform: skewY(40deg) rotate(10deg); }
.hero .tap-hint { position: absolute; left: 12px; bottom: 56px; z-index: 2; font-size: 13px; color: #fff; background: rgba(0,0,0,.45); padding: 2px 8px; border-radius: 4px; }
.scene-night { background: linear-gradient(#0b1433, #2a3f74); }
.scene-cave { background: linear-gradient(rgba(10,10,14,.55), rgba(10,10,14,.35)), var(--stone) 0 0 / 48px 48px; }
.scene-farm { background: linear-gradient(#ffd8a1, #ffeccc); }
.scene-mine { background: linear-gradient(rgba(8,10,20,.65), rgba(8,10,20,.45)), var(--stone) 0 0 / 48px 48px; }
.scene-sky { background: linear-gradient(#4fa4ef, #b9e1ff); }

/* 特点 */
.feat-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.feat-tile {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px;
  background: var(--panel); border: 2px solid var(--line); border-radius: 8px; cursor: pointer; text-align: center;
}
@media (hover: hover) { .feat-tile:hover { border-color: var(--theme); } }
.feat-tile .ic { width: 52px; height: 52px; display: grid; place-items: center; }
.feat-tile .ic img { width: 52px; }
.feat-tile .swatch { width: 40px; height: 40px; border: 3px solid #000; box-shadow: inset -6px -6px 0 rgba(0,0,0,.18), inset 6px 6px 0 rgba(255,255,255,.22); }
.feat-tile .letter { width: 44px; height: 44px; display: grid; place-items: center; background: var(--theme); color: #fff; border: 3px solid #000; font-family: var(--font-pixel); font-size: 18px; text-shadow: 2px 2px 0 rgba(0,0,0,.35); }
.feat-tile .fe { font-family: var(--font-read); font-size: 21px; font-weight: 800; }
.feat-tile .fz { font-size: 14px; color: var(--ink-soft); }

.rel-row { display: flex; gap: 8px; flex-wrap: wrap; }
.rel-row .slot { width: 84px; }

/* 拼写挑战 */
.spell { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.spell-q { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.answer { display: flex; gap: 6px; flex-wrap: wrap; }
.answer .cell {
  width: 46px; height: 52px; display: grid; place-items: center;
  background: var(--slot); border: 3px solid; border-color: var(--slot-lo) var(--slot-hi) var(--slot-hi) var(--slot-lo);
  font-family: var(--font-pixel); font-size: 20px; color: #fff; text-shadow: 2px 2px 0 #000; cursor: pointer;
}
.answer.ok .cell { background: var(--good); }
.answer.shake { animation: shake .4s; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.letters { display: flex; gap: 8px; flex-wrap: wrap; }
.letters .mc-btn { width: 50px; min-height: 50px; padding: 0; font-family: var(--font-pixel); font-size: 20px; font-weight: 400; text-transform: lowercase; }
.letters .mc-btn[disabled] { opacity: .3; pointer-events: none; }
.spell-done { font-weight: 800; color: var(--good); }

.page-foot { display: flex; justify-content: space-between; gap: 10px; margin-top: 18px; flex-wrap: wrap; }

/* ---------- 闯关 ---------- */
.quiz { max-width: 760px; margin: 0 auto; }
.quiz-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.hearts { display: flex; gap: 4px; }
.hearts i { width: 22px; height: 20px; background: var(--heart); clip-path: polygon(0 20%, 20% 0, 40% 0, 50% 15%, 60% 0, 80% 0, 100% 20%, 100% 50%, 50% 100%, 0 50%); }
.hearts i.lost { background: #555; }
.quiz-count { font-family: var(--font-pixel); font-size: 13px; margin-left: auto; }
.q-panel { text-align: center; }
.q-prompt { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 18px; }
.q-prompt .big-zh { font-size: 40px; font-weight: 900; }
.q-prompt img { width: 150px; }
.q-prompt .q-say { width: 96px; height: 96px; }
.q-prompt .q-say svg { width: 52px; height: 52px; }
.q-hint { color: var(--ink-soft); font-size: 15px; }
.opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.opt {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 76px; padding: 10px;
  background: var(--gui); border: 3px solid; border-color: var(--gui-hi) var(--gui-lo) var(--gui-lo) var(--gui-hi); outline: 2px solid #000;
  font-family: var(--font-pixel); font-size: 18px; cursor: pointer; color: var(--ink);
}
.opt img { width: 72px; }
.opt.right { background: var(--good); color: #fff; }
.opt.wrong { background: var(--bad); color: #fff; }
.theme-chips { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin: 10px 0 18px; }
.theme-chips .mc-btn[aria-pressed="true"] { background: var(--xp-dark); color: #fff; }
.result { text-align: center; }
.result .stars { display: flex; justify-content: center; gap: 10px; margin: 10px 0; }
.result .stars img { width: 64px; }
.result .stars img.off { filter: grayscale(1) opacity(.3); }
.result h2 { font-size: 30px; margin: 6px 0; }

/* ---------- 背包 ---------- */
.bag-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 6px; }
.section-title { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 0 0 14px; }
.section-title h2 { margin: 0; font-size: 26px; font-weight: 900; }
.section-title .sub { color: var(--ink-soft); }

/* ---------- 提示 ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 140%);
  z-index: 50; padding: 10px 18px; max-width: calc(100% - 32px);
  background: #1e1e1e; color: #fff; border: 3px solid #000; outline: 2px solid #6b6b6b;
  font-weight: 800; transition: transform .25s, visibility .25s; visibility: hidden;
}
.toast.show { transform: translate(-50%, 0); visibility: visible; }
.toast b { color: var(--xp); font-family: var(--font-pixel); font-weight: 400; font-size: .8em; }
.orb { position: fixed; z-index: 60; width: 14px; height: 14px; background: #b8ff3d; border: 2px solid #3d7410; border-radius: 3px; pointer-events: none; }

/* ---------- 短句卡 ---------- */
.scene-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: 18px; }
.phrase-grid { display: grid; gap: 6px; }
.phrase-card {
  display: flex; align-items: center; gap: 12px; padding: 8px 12px; min-height: 60px;
  background: var(--slot); border: 3px solid; border-color: var(--slot-lo) var(--slot-hi) var(--slot-hi) var(--slot-lo);
  color: #fff; text-decoration: none; position: relative;
}
.phrase-card img { width: 40px; flex: none; }
.pc-text { display: flex; flex-direction: column; min-width: 0; }
.pc-en { font-family: var(--font-read); font-weight: 800; font-size: 18px; line-height: 1.25; text-shadow: 1px 1px 0 #000; }
.pc-zh { font-size: 13px; color: #e6e6e6; }
.phrase-card.got::after { content: ""; position: absolute; right: 6px; top: 6px; width: 10px; height: 10px; background: var(--xp); border: 2px solid #000; }
@media (hover: hover) { .phrase-card:hover { background: color-mix(in srgb, var(--slot) 75%, #fff); } }
.scene-tag { display: inline-block; margin-bottom: 6px; padding: 2px 10px; background: var(--theme); color: #fff; border: 2px solid #000; font-size: 14px; font-weight: 800; }
.phrase-title { margin: 0; font-family: var(--font-read); font-weight: 900; font-size: clamp(28px, 5vw, 46px); line-height: 1.15; color: var(--theme); text-wrap: balance; }
.phrase-grid-layout { grid-template-areas: "hero talk" "chal chal"; }
.phrase-page .hero { min-height: 280px; }
.phrase-page .hero .bubble { font-family: var(--font-read); }
.talk { grid-area: talk; }
.chat { display: flex; flex-direction: column; gap: 14px; }
.chat-row { display: flex; align-items: center; gap: 10px; }
.chat-row > img { width: 48px; flex: none; }
.chat-row.reply { justify-content: flex-end; }
.chat-bubble { min-width: 0; padding: 10px 14px; background: var(--panel); border: 2px solid var(--line); border-radius: 14px; }
.chat-row.reply .chat-bubble { background: color-mix(in srgb, var(--theme) 14%, var(--paper)); text-align: right; }
.chat-en { font-family: var(--font-read); font-weight: 800; font-size: 21px; line-height: 1.3; }
.chat-zh { color: var(--ink-soft); font-size: 14px; }
.answer.words .cell { width: auto; min-width: 64px; padding: 0 10px; font-family: var(--font-read); font-size: 20px; font-weight: 800; }
.letters.words .mc-btn { width: auto; padding: 0 14px; font-family: var(--font-read); font-size: 20px; font-weight: 800; text-transform: none; }
.opt.opt-text { font-family: var(--font-read); font-size: 19px; font-weight: 800; line-height: 1.3; }

/* ---------- iPad ---------- */
@media (min-width: 761px) and (max-width: 1100px) {
  .wrap { padding-block: 18px 40px; }
  .card-grid { gap: 12px; }
  .hero { min-height: 280px; }
  .letters .mc-btn { width: 56px; min-height: 56px; font-size: 22px; }
  .answer .cell { width: 52px; height: 58px; }
  .say { width: 52px; height: 52px; }
  .opt { min-height: 96px; }
  .opt img { width: 88px; }
}
@media (pointer: coarse) {
  .mc-btn { min-height: 46px; }
  .feat-tile { padding: 14px 6px; }
}

@media (max-width: 760px) {
  .cover { grid-template-columns: 1fr; padding: 20px; }
  .cover-art { height: 170px; order: -1; }
  .cover-art img:nth-child(1) { width: 96px; } .cover-art img:nth-child(2) { width: 88px; } .cover-art img:nth-child(3) { width: 92px; }
  .card-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "hero" "sent" "mean" "feat" "tip" "rel" "chal"; }
  .phrase-grid-layout { grid-template-areas: "hero" "talk" "chal"; }
  .slots { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }
  .hero { min-height: 250px; }
  .page { padding: 14px; border-width: 5px; }
  .badge { width: 56px; height: 56px; font-size: 26px; }
  .head-nav { display: none; }
  .brand span { display: none; }
  .sent .thumb { display: none; }
  .sent .en-s { font-size: 22px; }
  .topbar { gap: 8px 10px; padding-block: 6px; }
  .topnav { margin-left: 0; width: 100%; }
  .topnav .mc-btn { flex: 1; min-height: 32px; font-size: 13px; padding: 0 4px; }
}
@media (max-width: 420px) {
  .feat-row { gap: 6px; }
  .feat-tile .fe { font-size: 17px; }
  .answer .cell { width: 38px; height: 46px; font-size: 17px; }
  .letters .mc-btn { width: 44px; min-height: 44px; }
  .opt { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
