/* /pinyin/ — board and card pages. Loaded after theme.css (same tokens). */
.wrap{max-width:1080px;margin:0 auto}

/* ---------- board ---------- */
/* jump pills: scroll to a section (ids initials / finals / whole — the old tab names, links still work) */
.jump{max-width:1080px;margin:6px auto 22px;display:flex;flex-wrap:wrap;gap:8px}
.jump a{border:2px solid var(--line);background:var(--paper);color:var(--ink);font-size:.98rem;font-weight:700;padding:9px 16px;border-radius:999px;text-decoration:none;display:inline-flex;align-items:baseline;gap:.4em}
.jump a .cjk{font-family:var(--cjk);font-weight:700}
.jump a i,.board-h i,.lt i{font-style:normal;font-family:var(--ui)}
.jump a i{color:var(--ink-soft);font-weight:600;font-size:.86em}
.jump a:hover{border-color:#9EBBD2}
.jump a:focus-visible{outline:3px solid var(--glow);outline-offset:3px}
/* sections: one table, like the 拼音表 on the classroom wall */
.board{max-width:1080px;margin:0 auto 30px;scroll-margin-top:84px}
.board-h{margin:0 0 12px;padding-bottom:8px;border-bottom:2px solid var(--line);font-size:1.35rem;font-weight:800;color:var(--ink);display:flex;gap:.5em;align-items:baseline}
.board-h .cjk{font-family:var(--cjk)}
.board-h i{color:var(--ink-soft);font-weight:600;font-size:.75em}
.board .note{max-width:none;margin:-4px 0 12px}
.fam-block{margin:0 0 14px}
.fam-block h3{margin:0 0 8px;font-size:.95rem;font-weight:700;color:var(--ink-soft);display:flex;gap:.5em;align-items:baseline}
.fam-block h3 .cjk{font-family:var(--cjk);color:var(--ink)}
.fam-block h3 i{font-style:normal;font-family:var(--ui);font-weight:600;color:#9EBBD2}
.fam-block.extra{margin-top:22px;padding-top:14px;border-top:2px dashed var(--line)}
.fam-block.extra .note{margin:0 0 10px;font-size:.9rem}
/* every card the same: one grid, one letter size — initials in the school rows (b p m f · d t n l · …) */
.letters{display:grid;gap:8px;grid-template-columns:repeat(auto-fill,minmax(72px,1fr))}
.lt{display:flex;flex-direction:column;align-items:center;justify-content:center;aspect-ratio:1/1;border:2px solid var(--line);background:var(--paper);border-radius:18px;text-decoration:none;color:var(--ink);font-weight:700;font-size:1.9rem;line-height:1;position:relative;letter-spacing:-.01em}
.lt i{position:absolute;right:7px;bottom:6px;font-size:.68rem;font-weight:700;color:#9EBBD2;line-height:1}
.lt:hover{border-color:#9EBBD2}
.lt:focus-visible{outline:3px solid var(--glow);outline-offset:3px}
.lt.soon{border-style:dashed;color:#A9BCCB;background:transparent;cursor:default}
.lt.soon::after{content:"";position:absolute;right:8px;top:8px;width:7px;height:7px;border-radius:50%;background:#CFDEEA}
@media (min-width:560px){.letters{gap:10px;grid-template-columns:repeat(auto-fill,minmax(86px,1fr))}.lt{font-size:2rem}.lt i{font-size:.72rem}}
/* wide screens: the wall-chart layout — 声母表 on the left (4 × 7, the school rows), 韵母表 on the right, 整体认读音节表 along the bottom */
@media (min-width:1180px){
  .boards{max-width:1080px;margin:0 auto;display:grid;grid-template-columns:320px 1fr;column-gap:28px;align-items:start}
  .boards .board{max-width:none;margin:0 0 26px}
  .boards #initials{grid-column:1}
  .boards #finals{grid-column:2}
  .boards #whole{grid-column:1/-1}
  .boards .letters{gap:8px;grid-template-columns:repeat(auto-fill,74px)}
  .boards #whole .letters{grid-template-columns:repeat(8,74px)}
  .boards .lt{font-size:1.65rem;letter-spacing:-.02em}
}
.note{max-width:1080px;margin:-4px auto 18px;font-size:.88rem;color:var(--ink-soft)}

/* ---------- card ---------- */
.hero{max-width:1080px;margin:0 auto 14px;background:var(--paper);border:2px solid var(--line);border-radius:24px;padding:18px 14px 16px;text-align:center}
.hero-row{display:flex;align-items:center;justify-content:center;gap:10px}
.letter{appearance:none;border:0;background:#F4F8FC;border-radius:22px;min-width:9.5rem;padding:6px 26px 10px;cursor:pointer;color:var(--ink);font-family:var(--ui);font-weight:700;font-size:6.2rem;line-height:1.05;display:inline-flex;align-items:center;gap:.12em;position:relative}
.letter.long{font-size:4.6rem}
.letter .spk{font-size:1.3rem;position:absolute;right:10px;bottom:10px;opacity:.55}
.letter.playing{background:#FFF4D2;box-shadow:0 0 0 3px var(--glow)}
.letter:focus-visible{outline:3px solid var(--glow);outline-offset:3px}
.step{display:flex;flex-direction:column;align-items:center;justify-content:center;width:3.2rem;height:3.2rem;border-radius:50%;border:2px solid var(--line);background:var(--paper);color:var(--ink);text-decoration:none;font-weight:700;font-size:1.05rem;flex:none}
.step small{font-size:.6rem;color:var(--ink-soft);font-weight:600;margin-top:-2px}
.step:hover{border-color:#9EBBD2}
.step.off{visibility:hidden}
.chips{display:flex;flex-wrap:wrap;justify-content:center;gap:6px;margin:12px 0 0}
.chips a{min-width:2.4rem;padding:4px 10px;border-radius:999px;border:2px solid var(--line);text-decoration:none;color:var(--ink-soft);font-weight:700;font-size:1rem}
.chips a[aria-current="page"]{background:var(--ink);border-color:var(--ink);color:#fff}
.tones{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin:14px auto 0;max-width:460px}
.tones.n3{grid-template-columns:repeat(3,1fr);max-width:350px}
.tone{appearance:none;border:2px solid var(--line);background:var(--paper);border-radius:16px;padding:8px 0 6px;font-family:var(--ui);font-weight:700;font-size:1.7rem;cursor:pointer;line-height:1.1}
.tone small{display:block;font-size:.66rem;color:var(--ink-soft);font-weight:600}
.tone.playing{border-color:currentColor;background:#FFFDF6}
.tone:focus-visible{outline:3px solid var(--glow);outline-offset:3px}
.hero .lede{margin:12px auto 0;font-size:.95rem}
.bar{max-width:1080px;margin:0 auto 14px;display:flex;flex-wrap:wrap;gap:10px;align-items:center}
.bar .tip{color:var(--ink-soft);font-size:.86rem;margin-left:auto}

/* practised syllable inside a longer word */
.hanzi .dim{color:#9FB2C3}
.pinyin .dim{opacity:.45}
.pinyin .hl{text-decoration:underline;text-decoration-thickness:3px;text-underline-offset:4px}

@media (max-width:520px){
  body{padding:22px 14px 56px}
  .letter{font-size:5rem;min-width:7.5rem;padding:4px 18px 8px}
  .letter.long{font-size:3.6rem}
  .step{width:2.8rem;height:2.8rem}
  .grid{grid-template-columns:repeat(2,1fr);gap:10px}
  .tile{min-height:178px}
  .opts{grid-template-columns:repeat(2,1fr)}
}

/* poster pictures are illustrations, not icons — give them room */
.tile .pic{min-height:5.6rem}
.tile .pic img{width:5.6rem;height:5.6rem}
.opt .pic img{width:5.8rem;height:5.8rem}

.wip{max-width:1080px;margin:-6px auto 16px;font-size:.9rem;color:var(--ink-soft)}

/* letters and tone marks in the pinyin font (see theme.css --py) */
.letter,.tone,.lt,.chips a,.step small{font-family:var(--py)}
/* board: link to the mixed game (pinyin/game/) */
.playall{max-width:1080px;margin:8px auto 16px;display:flex;align-items:center;gap:14px;padding:14px 18px;border-radius:18px;
  background:#FFF6DC;border:2px solid #F2B630;color:var(--ink);text-decoration:none;line-height:1.35;transition:transform .15s,box-shadow .15s}
.playall:hover{transform:translateY(-2px);box-shadow:0 6px 16px rgba(22,50,79,.08)}
.playall:focus-visible{outline:3px solid #FFD76B;outline-offset:3px}
.playall b{font-size:1.08rem}
.pa-ico{font-size:2rem;line-height:1;flex:none;font-family:"Apple Color Emoji","Segoe UI Emoji","Noto Color Emoji",sans-serif}
.pa-go{margin-left:auto;font-size:1.4rem;font-weight:700;color:#9A6A00;flex:none}
@media (prefers-reduced-motion:reduce){.playall{transition:none}.playall:hover{transform:none}}

/* ---------- cards: Learn / Read / Speak (17 Oct 2026) ----------
   The same switch as on the book lessons. The rules are a copy of assets/book.css (.wmodes … body.wm-speak), because the pinyin
   pages do not load book.css; change both together. Learn: pinyin on the card from the start. Read: only the character — the picture
   and the name are a quiet "?" until a tap. Speak: picture and name — the character is a "?" until a tap. */
.wmodes{max-width:1080px;margin:0 auto 8px;display:flex;gap:4px;padding:4px;background:var(--paper);border:2px solid var(--line);border-radius:16px}
.wmodes button{flex:1 1 0;min-width:0;appearance:none;font:inherit;font-size:.95rem;font-weight:700;color:var(--ink);background:transparent;border:0;border-radius:12px;
  min-height:48px;padding:4px 6px;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:7px;white-space:nowrap}
.wmodes button svg{width:22px;height:22px;flex:none}
.wmodes button:hover{background:#EEF4F9}
.wmodes button[aria-pressed="true"]{background:var(--ink);color:#fff}
.wmodes button:focus-visible{outline:3px solid var(--glow);outline-offset:2px}
@media (max-width:360px){.wmodes button{font-size:.86rem;gap:5px}.wmodes button svg{width:19px;height:19px}}
.wmhint{max-width:1080px;margin:0 auto 10px}
.wmhint .secnote{display:none;margin:0;font-size:.88rem;font-weight:600;color:var(--ink-soft);line-height:1.4}
body:not(.wm-read):not(.wm-speak) .wmh-learn,body.wm-read .wmh-read,body.wm-speak .wmh-speak{display:block}
body:not(.wm-read):not(.wm-speak) #grid .tile .pinyin{opacity:1;transform:none}
body.wm-read .tile:not(.on) .pic,body.wm-speak .tile:not(.on) .hanzi{position:relative}
body.wm-read .tile:not(.on) .pic > *,body.wm-read .tile:not(.on) .en{visibility:hidden}
body.wm-read .tile:not(.on) .pic::after,body.wm-speak .tile:not(.on) .hanzi::after{content:"?";position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);
  width:3.2rem;height:3.2rem;border-radius:14px;background:var(--sky);color:#A9BFD2;font:700 1.5rem/3.2rem var(--ui);text-align:center}
body.wm-speak .tile:not(.on) .hanzi{color:transparent;min-width:3.2rem;min-height:3.2rem}
body.wm-speak .tile:not(.on) .hanzi::after{width:100%;min-width:3.2rem;height:100%}
/* unlike the lessons, Speak keeps the name on the card: the poster pictures (clothes, swim) are not clear without it (Dave, 17 Oct 2026) */

/* ---------- under the cards: the game (always open) and 写字母, one under the other; side by side from ~1100 px ---------- */
.pyh2{font-size:1.15rem;margin:0 0 8px;font-weight:700;color:var(--ink-soft);display:flex;gap:.45em;align-items:baseline}
.pyh2 .cjk{font-family:var(--cjk);color:var(--ink);font-size:1.15em}
/* one hint line under each heading, the same height as the tip of 写字母 (letters.js .lw-tip), so the two white boxes start level */
.pyhint{margin:0 0 8px;color:var(--ink-soft);font-size:.92rem}
.pyduo{max-width:1080px;margin:26px auto 0}
.pyduo > section{margin:0 0 26px}
.pyduo .game{margin:0}
.pyduo .letw .lw-pad{max-width:none}
@media (min-width:1100px){
  .pyduo{display:grid;grid-template-columns:minmax(0,55fr) minmax(0,45fr);gap:0 28px;align-items:start}
  .pyduo > section{margin:0}
  .pyduo .opts.tone-opts{max-width:none}
  .pyduo .tone-opts .opt{min-height:96px}
}
