/* Characters pilot v2 additions; accepted shared styles remain untouched. */
body.pilot-page .pilot-pinyin,
body.pilot-page .pilot-item-pinyin,
body.pilot-page .recall-card-pinyin,
body.pilot-page .word-pinyin,
body.pilot-page .card-pinyin { font-family:var(--song);font-variant-ligatures:none;font-weight:400; }
.pilot-index { padding:45px clamp(24px,7vw,105px) 90px;border-top:1px solid var(--line); }
.pilot-search-row label { display:block;color:var(--pine);font-size:11px;font-weight:700;letter-spacing:.14em;text-transform:uppercase; }
#pilot-query { width:min(720px,100%);margin-top:10px;padding:12px 15px;border:1px solid var(--line);background:rgba(255,255,255,.45);border-radius:2px;font:inherit; }
.pilot-search-status { margin:9px 0 0;color:var(--muted);font-size:10px; }
.pilot-category-list { margin:55px clamp(24px,7vw,105px) 75px;border-top:1px solid var(--line);padding-top:35px; }
.pilot-list-heading h2 { font-family:var(--song);font-size:32px;font-weight:400;margin:0 0 6px; }
.pilot-list-heading p { margin:0 0 20px;color:var(--muted);font-size:12px; }
.pilot-character-list { display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px; }
.pilot-character-item { display:grid;grid-template-columns:48px minmax(0,1fr);align-items:center;gap:4px 10px;min-width:0;padding:12px;border:1px solid var(--line);border-radius:2px;background:rgba(255,255,255,.22);text-decoration:none; }
.pilot-character-item:hover,.pilot-character-item:focus-visible { background:rgba(49,95,82,.06);border-color:rgba(49,95,82,.4); }
.pilot-item-glyph { font-family:var(--song);font-size:32px;line-height:1; }
.pilot-item-pinyin { grid-column:2;color:var(--pine);font-size:13px;overflow-wrap:anywhere; }
.pilot-character-item > span:nth-child(3) { grid-column:1/-1;color:var(--muted);font-size:10px;line-height:1.45; }
.pilot-item-structure { grid-column:1/-1;color:#8a918c;font-size:8px;letter-spacing:.08em;text-transform:uppercase; }
.pilot-canvas.is-split .qing-whole { display:none; }
.pilot-canvas .structure-view { display:flex;align-items:center;justify-content:center;width:100%;height:100%;min-width:0; }
.structure-root { max-width:100%; }
.structure-children.layout-multi-layer { flex-direction:row;flex-wrap:wrap;max-width:100%;gap:12px;padding:24px 12px;box-sizing:border-box; }
.pilot-canvas.is-split { align-items:center;justify-content:center;display:flex; }
.layout-left-right { display:flex;flex-direction:row;align-items:center;justify-content:center;gap:28px; }
.layout-top-bottom { display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px; }
.layout-enclosure { display:flex;flex-direction:column;align-items:center;gap:16px; }
.structure-children.layout-enclosure { position:relative;min-width:180px;max-width:100%;box-sizing:border-box;margin-top:28px;padding:0 20px 20px;border:1px solid var(--line); }
.structure-children.layout-enclosure > .structure-node:first-child { position:relative;margin-top:-28px; }
.structure-children.layout-enclosure > .structure-node:first-child > .structure-piece { background:var(--paper,#f5f1e7); }
.structure-children.layout-enclosure > .structure-node > .structure-piece { max-width:240px; }
.layout-repetition,.layout-nested-repetition { position:relative;display:grid;grid-template-columns:1fr 1fr;grid-template-rows:1fr 1fr;align-items:center;justify-items:center;width:250px;height:230px;gap:8px; }
.layout-repetition > .structure-node:first-child,.layout-nested-repetition > .structure-node:first-child { grid-column:1/-1; }
.structure-children.layout-repetition[data-child-count="2"],.structure-children.layout-nested-repetition[data-child-count="2"] { display:flex;flex-direction:row;justify-content:center;align-items:center;width:auto;height:auto;gap:20px; }
.layout-multi-layer { display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px; }
.structure-node { margin:0; }
.structure-piece { display:grid;place-items:center;min-width:74px;min-height:74px;border:1px solid var(--line);background:rgba(255,255,255,.28);color:var(--ink);font-family:var(--song);font-size:46px;line-height:1;padding:8px;cursor:pointer; }
.structure-piece small { display:block;font-family:var(--sans);font-size:8px;color:var(--muted);text-transform:uppercase;letter-spacing:.08em; }
.structure-piece[aria-pressed="true"] { color:var(--cinnabar);border-color:rgba(163,58,43,.42);background:rgba(163,58,43,.05); }
.pilot-explanations { display:grid;grid-template-columns:repeat(auto-fit,minmax(215px,1fr));gap:0;margin-top:20px;border:1px solid var(--line);background:rgba(255,255,255,.12); }
.pilot-meaning-card { min-width:0;padding:18px;border-right:1px solid var(--line); }
.pilot-meaning-card:last-child { border-right:0; }
.pilot-meaning-card > p:first-child { margin:0 0 8px;color:#818b83;font-size:8px;letter-spacing:.12em; }
.pilot-meaning-card h3 { display:flex;align-items:baseline;gap:9px;margin:0 0 8px;font-family:var(--song);font-size:34px;font-weight:400;line-height:1; }
.pilot-meaning-card h3 .pilot-pinyin { color:var(--pine);font-size:17px; }
.pilot-meaning-card p { margin:0 0 8px;color:var(--muted);font-size:10px;line-height:1.6; }
.pilot-meaning-card .pilot-role-note strong { color:var(--cinnabar);font-size:10px; }
.pilot-meaning-card .pilot-status { color:#79837c;font-size:8px;letter-spacing:.08em;text-transform:uppercase; }
.pilot-reading-groups { display:grid;gap:10px;margin-top:20px; }
.pilot-reading { border:1px solid var(--line);padding:17px;background:rgba(255,255,255,.14); }
.pilot-reading-head { display:flex;align-items:baseline;gap:9px; }
.pilot-reading .pilot-pinyin { font-family:var(--song);color:var(--pine);font-size:24px; }
.pilot-tone,.pilot-register { color:var(--muted);font-size:9px;text-transform:uppercase;letter-spacing:.08em; }
.pilot-senses { margin:9px 0;padding-left:20px;color:#52655b;font-size:12px; }
.pilot-reading-words { display:grid;gap:7px;margin:0;padding:0;list-style:none; }
.pilot-reading-words li { display:grid;grid-template-columns:minmax(64px,auto) minmax(0,1fr);gap:5px 10px;align-items:center; }
.word-hanzi { font-family:var(--song);font-size:26px; }
.word-pinyin { grid-column:2;font-family:var(--song);color:var(--pine);font-size:13px;overflow-wrap:anywhere; }
.pilot-reading-words li > span:nth-child(3) { grid-column:1/-1;color:var(--muted);font-size:10px; }
.pilot-no-words { margin:9px 0 0;color:var(--muted);font-size:10px; }
.pilot-reading-audio { margin-top:11px; }
.pilot-recall { width:min(480px,calc(100vw - 32px));padding:0;border:0;background:transparent;color:var(--ink); }
.pilot-recall::backdrop { background:var(--paper); }
body.recall-open { overflow:hidden; }
.pilot-sources code { overflow-wrap:anywhere; }
@media(max-width:900px){.pilot-character-list{grid-template-columns:repeat(3,minmax(0,1fr));}.layout-repetition,.layout-nested-repetition{width:220px;height:205px;}}
/* STRUCTURE-V2: one-level-at-a-time stage, arranged by the node's actual layout */
.structure-view:not([hidden]){display:block;width:100%}
.sv-controls{display:flex;gap:10px;margin:8px 0}
.sv-controls .button[disabled]{opacity:.45;cursor:default}
.sv-crumb{display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin:6px 0 12px;font-size:14px}
.sv-crumb button{background:none;border:1px solid var(--line,#e5dcc8);border-radius:3px;padding:3px 10px;font:inherit;cursor:pointer}
.sv-crumb button[aria-current]{border-color:var(--cinnabar,#a33a2b);color:var(--cinnabar,#a33a2b);cursor:default}
.sv-stage{--tile:110px;display:flex;gap:16px;justify-content:center;align-items:center;border:1px solid var(--line,#e5dcc8);background:var(--paper,#f5f1e7);padding:22px 14px;max-width:100%;min-height:calc(var(--tile)*.95);box-sizing:border-box}
.sv-stage.layout-top-bottom{flex-direction:column}
.sv-stage.layout-left-right{flex-direction:row}
.sv-stage.layout-enclosure{flex-direction:column}
.sv-stage .structure-piece{width:var(--tile);min-height:calc(var(--tile)*.8);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px}
.sv-stage .structure-piece .mini{display:grid;gap:3px;justify-items:center}
.sv-stage .structure-piece .mini.layout-top-bottom{grid-template-columns:auto}
.sv-stage .structure-piece .mini.layout-left-right{grid-template-columns:auto auto}
.sv-stage .structure-piece .mini span{display:block;font-size:calc(var(--tile)*.3);line-height:1.05;border:1px solid var(--line,#e5dcc8);background:#fff;border-radius:2px;padding:3px 6px}
.sv-stage .structure-piece.group{border-style:dashed;border-color:var(--green,#2f5d50)}
.sv-stage .structure-piece.group small{color:var(--green,#2f5d50)}
.sv-stage .structure-piece.slot{cursor:default;border-style:dotted;background:transparent}
.sv-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:14px;margin-top:14px}
@media(max-width:600px){.sv-stage{--tile:86px;gap:10px;padding:16px 10px}}
@media(max-width:600px){.pilot-category-list,.pilot-index{margin:35px 19px 55px;}.pilot-character-list{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;}.pilot-character-item{padding:10px;}.pilot-item-glyph{font-size:28px;}.structure-piece{min-width:58px;min-height:58px;font-size:35px;}.layout-repetition,.layout-nested-repetition{width:190px;height:180px;gap:5px;}}
@media(prefers-reduced-motion:reduce){body.pilot-page *{transition:none!important;animation:none!important;}}


.sv-cards .mini{display:inline-grid;gap:3px;justify-items:center}.sv-cards .mini.layout-left-right{grid-template-columns:auto auto}.sv-cards .mini.layout-top-bottom{grid-template-columns:auto}.sv-cards .mini span{font-size:24px;line-height:1.05}.pilot-meaning-card h3 span:first-child:not(:only-child){overflow-wrap:anywhere}

.sv-stage.layout-repetition:not([data-child-count="2"]),.sv-stage.layout-nested-repetition:not([data-child-count="2"]){display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:max-content;height:auto;justify-items:center}
.sv-stage.layout-repetition:not([data-child-count="2"])> :first-child,.sv-stage.layout-nested-repetition:not([data-child-count="2"])> :first-child{grid-column:1 / -1;justify-self:center}
.sv-stage.layout-repetition[data-child-count="2"],.sv-stage.layout-nested-repetition[data-child-count="2"]{display:flex;flex-direction:row;width:auto;height:auto}

.pilot-canvas.is-split .structure-view:not([hidden]){height:auto;box-sizing:border-box;padding:24px 20px 55px}

/* ISOLATED PATCH (research/dsh/worker/common3000/shared-css-line-break-fix/v1) - NOT production.
   Shared fix SHARED-WORD-COLUMN-WRAPS-THREE-GLYPHS: .pilot-reading-words li first track 64px -> minmax(64px,auto)
   so CJK example words size to max-content; 64px floor keeps 1-2 char pages pixel-identical. No other rule changed. */

/* PAGINATION UI POLISH (CXP-CHARACTERS-PAGINATION-UI-20261107) - characters category pages only.
   Theme: paper chips on --line borders, deep-pine fill marks the current page; the rust
   #b75a37 focus ring matches the shared focus-visible family. 44px chips keep touch
   targets >= 40px; flex-wrap plus max-width:100% prevents horizontal overflow on 390px. */
.pilot-pagination{display:flex;flex-wrap:nowrap;align-items:center;justify-content:flex-start;gap:8px;margin:24px 0 4px;padding:0;max-width:100%;}
.pilot-page-btn{display:inline-flex;align-items:center;justify-content:center;min-width:44px;min-height:44px;padding:8px 13px;border:1px solid var(--line);border-radius:2px;background:rgba(255,255,255,.35);color:var(--ink);font-size:13px;line-height:1;text-decoration:none;transition:background .15s ease,border-color .15s ease,color .15s ease;}
a.pilot-page-btn:not([aria-current="page"]):hover{background:rgba(49,95,82,.09);border-color:rgba(49,95,82,.45);color:var(--pine);}
a.pilot-page-btn:focus-visible{outline:3px solid #b75a37;outline-offset:2px;}
.pilot-page-btn.is-current[aria-current="page"]{background:var(--pine);border-color:var(--pine-dark);color:#fff8e9;font-weight:700;cursor:default;}
.pilot-page-btn.is-disabled{opacity:.45;background:transparent;border-color:transparent;color:var(--muted);cursor:default;}
.pilot-page-nums{display:flex;flex:0 1 auto;flex-wrap:wrap;align-items:center;justify-content:flex-start;gap:8px;min-width:0;}
.pilot-page-seg{display:inline-flex;align-items:center;gap:8px;flex-wrap:nowrap;}
.pilot-page-gap{display:inline-flex;align-items:center;justify-content:center;min-width:24px;min-height:44px;border:0;background:transparent;color:var(--muted);cursor:default;}
@media(max-width:600px){
.pilot-pagination{justify-content:center;gap:2px;margin:18px 0 2px;}
.pilot-page-btn{min-width:36px;padding:8px 8px;font-size:12px;}
.pilot-page-nums{flex:1 1 0;justify-content:center;gap:2px;}
.pilot-page-seg{gap:2px;}
.pilot-page-gap{min-width:12px;font-size:12px;padding:0;}
.pilot-page-prev span,.pilot-page-next span{display:none;}
.pilot-page-prev::before{content:'‹';font-size:24px;line-height:1;}
.pilot-page-next::before{content:'›';font-size:24px;line-height:1;}
}

/* PER-READING AUDIO + RHYME LINK (CXP-CHARACTERS-READING-LINKS-20261107) - detail pages only,
   rendered by characters-runtime.js. One row per reading, inserted right after
   .pilot-reading-head so the controls sit beside that reading's own pinyin. Theme matches
   the pagination chips: paper fill on --line borders, pine text, rust #b75a37 focus ring.
   44px min height keeps touch targets adequate; flex-wrap + max-width:100% prevent
   horizontal overflow on 390px; the rhyme link is dashed-bordered to read as navigation,
   not playback. Word-level .pilot-reading-audio buttons are NOT styled or moved here. */
.pilot-reading-self{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:11px 0 0;max-width:100%;}
.pilot-reading-self .reading-play{display:inline-flex;align-items:center;justify-content:center;min-height:44px;max-width:100%;padding:8px 14px;font-size:13px;line-height:1.3;}
.pilot-reading-self .reading-play[disabled]{opacity:.55;cursor:default;}
.pilot-reading-self .reading-self-none{color:var(--muted);font-size:11px;overflow-wrap:anywhere;}
.pilot-reading-self .reading-rhyme{display:inline-flex;align-items:center;min-height:44px;max-width:100%;padding:8px 12px;border:1px dashed rgba(49,95,82,.45);border-radius:2px;color:var(--pine);font-size:12px;line-height:1.3;text-decoration:none;overflow-wrap:anywhere;transition:background .15s ease,border-color .15s ease;}
.pilot-reading-self .reading-rhyme:hover{background:rgba(49,95,82,.07);border-style:solid;}
.pilot-reading-self .reading-play:focus-visible,.pilot-reading-self .reading-rhyme:focus-visible{outline:3px solid #b75a37;outline-offset:2px;}
.reading-self-status{margin:4px 0 0;color:var(--muted);font-size:11px;}
@media(max-width:600px){.pilot-reading-self{gap:6px;margin-top:10px;}}

/* FIRST-CARD CLUSTER (codex position fix, CXP-CHARACTERS-READING-LINKS-20261107) - the user's
   red box targets the WHOLE-CHARACTER card (.pilot-meaning-card h3 with big hanzi + pinyin),
   so a tight per-reading pair list (play + 查看韵母, one pair per reading in card order) sits
   DIRECTLY under that h3 inside the first card. Pairs are atomic wrap units: single chars show
   one pair beside the pinyin; quintuple chars (和/啊) wrap to a legible list without crowding.
   Same pine/rust theme; 44px targets; word-level buttons and the reading-card rows unchanged. */
.pilot-card-selfaudio{display:flex;flex-wrap:wrap;align-items:center;gap:6px 12px;margin:9px 0 2px;max-width:100%;}
.pilot-card-selfaudio .card-self-pair{display:inline-flex;align-items:center;gap:6px;max-width:100%;}
.pilot-card-selfaudio .reading-play{display:inline-flex;align-items:center;justify-content:center;min-height:44px;max-width:100%;padding:6px 12px;font-size:12px;line-height:1.3;}
.pilot-card-selfaudio .reading-play[disabled]{opacity:.55;cursor:default;}
.pilot-card-selfaudio .reading-rhyme{display:inline-flex;align-items:center;min-height:44px;max-width:100%;padding:6px 10px;border:1px dashed rgba(49,95,82,.45);border-radius:2px;color:var(--pine);font-size:12px;line-height:1.3;text-decoration:none;overflow-wrap:anywhere;transition:background .15s ease,border-color .15s ease;}
.pilot-card-selfaudio .reading-rhyme:hover{background:rgba(49,95,82,.07);border-style:solid;}
.pilot-card-selfaudio .reading-play:focus-visible,.pilot-card-selfaudio .reading-rhyme:focus-visible{outline:3px solid #b75a37;outline-offset:2px;}
.pilot-card-selfaudio .reading-self-none{color:var(--muted);font-size:11px;overflow-wrap:anywhere;}
@media(max-width:600px){.pilot-card-selfaudio{gap:5px 8px;margin:8px 0 2px;}}

/* PER-PAIR INLINE STATUS (codex error-placement fix): card-originated playback/error messages
   render inside the first-card cluster beside the buttons (role=status aria-live=polite),
   never appended to the reading-groups end. Cinnabar marks failures. */
.pilot-card-selfaudio .card-self-status{color:var(--muted);font-size:11px;line-height:1.4;overflow-wrap:anywhere;}
.pilot-card-selfaudio .card-self-status.is-error{color:var(--cinnabar);font-weight:700;}
.pilot-card-selfaudio .reading-play.play-error{border-color:rgba(163,58,43,.6);color:var(--cinnabar);background:rgba(163,58,43,.05);}

/* CXP-OVERNIGHT-SITE-20261107: at 320px the shared Characters nav measured 0.67px
   past the viewport. Reclaim 2px only on Characters pages at <=340px; no shared
   stylesheet or other module is changed, and the 390px layout remains untouched. */
@media(max-width:340px){
  body.pilot-page .site-header{padding-left:15px;padding-right:15px;}
}
