/* Self-hosted, no web fonts: the system Chinese font stack works offline and inside WeChat. */
/* Picture-book look (E-D27): warm paper, dark-brown outlines, sticker buttons, one tea-orange accent. */
:root {
  --bg: #f7efe2; --fg: #3a2a1f; --muted: #7a6552; --card: #fffaf2; --line: #e2d2b8; --edge: #3a2a1f;
  --accent: #e07a3f; --ok: #4f8a5f; --no: #c4553a; --chip: #f1e4cf; --tip: #fff3d6; --tip-edge: #d9a75a; --mission: #eaf2e3;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #221a14; --fg: #f3e6d3; --muted: #bba78f; --card: #2e241c; --line: #4a3a2d; --edge: #0f0a07;
          --accent: #ea8247; --ok: #7cbf8c; --no: #f08a64; --chip: #3a2d23; --tip: #3a2e1e; --tip-edge: #8a6a3a; --mission: #263126; }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--fg); }
body { font: 17px/1.55 ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif; -webkit-text-size-adjust: 100%; }
.wrap { max-width: 520px; margin: 0 auto; padding: 16px 16px 48px; overflow-wrap: anywhere; }
h1 { font-size: 24px; margin: 8px 0 16px; }
h2 { font-size: 18px; margin: 0 0 8px; }
/* APOC English logo (design/brand/apoc): its own colours, so it never takes the text colour */
.brand { margin: 8px 0 6px; line-height: 0; }
.brand img { display: block; width: min(300px, 82%); height: auto; }
.brand.small img { width: min(170px, 50%); }
label { display: block; margin: 12px 0 4px; }
.check { display: flex; gap: 8px; align-items: flex-start; }
.check input { margin-top: 5px; width: 20px; height: 20px; flex: none; }
.field { width: 100%; font: inherit; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--fg); }
.btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; font: inherit; font-weight: 700; padding: 13px 16px; margin: 14px 0 0; border: 2px solid var(--edge); border-radius: 14px; background: var(--accent); color: #fff; cursor: pointer; box-shadow: 3px 3px 0 var(--edge); }
.btn:active:not([disabled]) { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--edge); }
.btn.ghost { background: var(--card); color: var(--fg); }
.btn.big { padding: 18px; font-size: 19px; }
.btn.small { padding: 7px 14px; width: auto; display: inline-flex; margin: 0 0 0 8px; box-shadow: 2px 2px 0 var(--edge); }
.btn.audio { background: var(--card); color: var(--fg); width: auto; display: inline-flex; padding: 8px 12px; margin: 8px 6px 0 0; font-weight: 600; box-shadow: 2px 2px 0 var(--edge); }
.btn.rec { background: var(--no); }
.btn[disabled] { opacity: .5; box-shadow: none; }
.link { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; color: var(--accent); font: inherit; font-weight: 600; padding: 12px 0; cursor: pointer; }
.link.small { padding: 0; font-size: 14px; }
.chip { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 14px; font-weight: 600; border: 1.5px solid var(--edge); background: var(--card); color: var(--fg); border-radius: 999px; padding: 6px 12px; margin: 8px 6px 0 0; cursor: pointer; }
.chip.on { background: var(--accent); color: #fff; box-shadow: 2px 2px 0 var(--edge); }
.card { background: var(--card); border: 2px solid var(--edge); border-radius: 16px; padding: 16px; margin: 14px 0; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.error { color: var(--no); }
.en { font-family: -apple-system, "Helvetica Neue", Arial, sans-serif; margin: 6px 0; }
.en.big { font-size: 30px; font-weight: 600; }
.gloss { font-size: 20px; margin: 6px 0; }
.gloss.small { font-size: 16px; }
.sentence { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 8px; }
.pic { display: block; width: 160px; height: 120px; margin: 4px auto 8px; border-radius: 10px; object-fit: cover; }
.pic.small { width: 120px; height: 90px; }
.placeholder { border: 2px dashed var(--line); display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--muted); font-size: 12px; }
.placeholder b { color: var(--fg); font-size: 15px; font-weight: 500; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.choice { font: inherit; font-size: 18px; padding: 14px 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--fg); cursor: pointer; min-height: 56px; }
.pic-choice { padding: 6px; }
.pic-choice .pic { margin: 0 auto; }
.result { border-radius: 12px; padding: 10px; margin-top: 12px; }
.result.ok { background: rgba(31, 122, 77, .12); }
.result.no { background: rgba(180, 68, 28, .12); }
.feedback { margin-top: 12px; }
.stepbar { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 14px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.row .btn { flex: 1 1 120px; }
.learner .name, .scenario .name { font-weight: 600; margin: 0 0 4px; }
.cando { margin: 6px 0; }
.cando.ok { color: var(--ok); }
.policy ul { padding-left: 20px; margin: 8px 0; }
.recorder { margin-top: 12px; }
details { margin-top: 12px; }
.radar svg { width: 100%; height: auto; max-width: 360px; display: block; margin: 0 auto; }
.radar .ring { fill: none; stroke: var(--line); stroke-width: 1; }
.radar .now { fill: rgba(36, 99, 235, .22); stroke: var(--accent); stroke-width: 2; }
.radar .earlier { fill: none; stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 4 3; }
.radar text { fill: var(--fg); font-size: 12px; }
.axes { padding-left: 18px; }

/* drawn icons (art.ts) sit in the text line */
.ic { width: 1.15em; height: 1.15em; flex: none; vertical-align: -0.2em; }
