@font-face { font-family:"Zhier Source Han"; src:url("/fonts/sourcehan.woff2") format("woff2"); font-weight:100 900; font-style:normal; font-display:swap; }
@font-face { font-family:"Zhier Harmony"; src:url("/fonts/HarmonyOS_Sans_SC_Regular.ttf") format("truetype"); font-weight:100 449; font-style:normal; font-display:swap; }
@font-face { font-family:"Zhier Harmony"; src:url("/fonts/HarmonyOS_Sans_SC_Medium.ttf") format("truetype"); font-weight:450 599; font-style:normal; font-display:swap; }
@font-face { font-family:"Zhier Harmony"; src:url("/fonts/HarmonyOS_Sans_SC_Bold.ttf") format("truetype"); font-weight:600 900; font-style:normal; font-display:swap; }
@font-face { font-family:"Zhier MiSans"; src:url("/fonts/MiSans-Regular.woff2") format("woff2"); font-weight:100 449; font-style:normal; font-display:swap; }
@font-face { font-family:"Zhier MiSans"; src:url("/fonts/MiSans-Medium.woff2") format("woff2"); font-weight:450 599; font-style:normal; font-display:swap; }
@font-face { font-family:"Zhier MiSans"; src:url("/fonts/MiSans-Semibold.woff2") format("woff2"); font-weight:600 900; font-style:normal; font-display:swap; }
@font-face { font-family:"Zhier Wenkai"; src:url("/fonts/lxgw-wenkai.ttf") format("truetype"); font-weight:100 900; font-style:normal; font-display:swap; }
@font-face { font-family:"Zhier Brush"; src:url("/fonts/ma-shan-zheng.ttf") format("truetype"); font-weight:100 900; font-style:normal; font-display:swap; }
:root {
  --ui-font:"Zhier Wenkai","Zhier Source Han",system-ui,sans-serif;
  --ui-title:"Zhier Brush",var(--ui-font);
  --study-serif:var(--ui-font);
  --sans:var(--ui-font); --display:var(--ui-font); --digits:var(--ui-font); --entry-serif:var(--ui-font);
}
:root[data-z-font="art"] { --ui-font:"Zhier Harmony","Zhier Source Han",system-ui,sans-serif; }
:root[data-z-font="wenkai"] { --ui-title:var(--ui-font); }
:root[data-z-font="sourcehan"] { --ui-font:"Zhier Source Han",system-ui,sans-serif; --ui-title:var(--ui-font); }
:root[data-z-font="harmony"] { --ui-font:"Zhier Harmony",system-ui,sans-serif; --ui-title:var(--ui-font); }
:root[data-z-font="mi"] { --ui-font:"Zhier MiSans",system-ui,sans-serif; --ui-title:var(--ui-font); }
html[data-z-font] :is(body,body *):not(code,pre,kbd,samp) { font-family:var(--ui-font)!important; }
html[data-z-font] body :is(h1,h2,h1 *,h2 *,.brand-type,#book-character,.book-seal,.palm-mobile-brand span,.entry-imprint>span,.palm-exercise-char) {font-family:var(--ui-title)!important;}
.type-preview-footer { display:flex; justify-content:center; flex-wrap:wrap; gap:.45rem 1rem; padding:1rem; text-align:center; font-size:.875rem; line-height:1.6; }
.type-preview-footer a { text-underline-offset:3px; color:inherit; }
@media(max-width:1024px) { .type-preview-footer { padding-bottom:calc(5rem + env(safe-area-inset-bottom)); } }

/* Shared reading scale. The darker support colours remain readable on the light paper
   of B/C, while A uses light ink even in the account and archive forms. */
html[data-z-pane] {
  --z-body:19px; --z-secondary:18px; --z-control:19px; --z-primary:20px;
  --z-copy:#112d23; --z-secondary-ink:#284336; --z-dark-sub:#deefe3;
  --z-button:#174832; --z-on-button:#fff; --z-disabled-ink:#45564a; --z-disabled-bg:#e9eee8;
}
html[data-z-pane="b"] {
  --book-ink:#163024; --book-strong:#10271c; --book-gray:#2b4233; --book-mark:#285038; --book-pen:#234d38;
  --signal-ink:var(--book-ink); --target-ink:var(--book-strong);
}
html[data-z-pane="c"] {
  --ink:#102e26; --sub:#2a4238; --faint:#344b40; --deep:#154d3c; --green:#175642;
  --z-button:#124936;
}
html[data-z-pane="a"] {
  --a-copy:#f7fff9; --a-dim:#dbece0; --a-quiet:#cedfd4;
  --z-copy:var(--a-copy); --z-secondary-ink:var(--a-dim);
  --z-disabled-ink:#d3e3d8; --z-disabled-bg:#2b4439; --z-button:#b2e7bb; --z-on-button:#102f20;
}
html[data-z-pane] body { color:var(--z-copy); font-size:var(--z-body)!important; font-weight:400; }
html[data-z-pane] body :is(h3,h4) { font-size:max(1.15rem,1em)!important; line-height:1.45; }
html[data-z-pane] body :is(p,dt,dd,li,legend,output,textarea,.message > div,.memory-facts,.invite-result) {
  font-size:var(--z-body)!important; line-height:1.65;
}
html[data-z-pane] body :is(small,figcaption,.privacy-note,.science-caption,.selection-note,.record-status,.recording-label,
  .root-path,.nav-label,.mobile-dock a span,.type-preview-footer,.type-preview-footer span,.type-preview-footer strong,
  #language-privacy,.entry-choice-copy > span,.entry-scene-caption > span,.entry-contours span,.entry-edit,
  .entry-preference [data-language-value],.entry-imprint > span:not(.book-seal),.a-back,.book-return,.palm-return,
  .signal-readout,.signal-source,.signal-value,.tone-trend,.unit,.account-copy,.memory-facts,.message-sources,
  .metrics em,.score-hero small,.thinking small,.thinking p,.ac-note,.ac-source,.ac-legend,.rec-field-name span,
  #composer-help,#exercise-count,#exercise-note,#record-status,#recording-label,#reference-status,#syllable-characters,
  #studio-location,#user-name,#book-tone,#conversation-status,#memory-status,#tutor-kind,#chat-mode) {
  font-size:var(--z-secondary)!important; line-height:1.5;
}
html[data-z-pane] body :is(input,select,button,label,summary,textarea,a,button > span:not(.book-seal),button > b,
  button > small,.nav-label,.signal-switch,:where(#auth-dialog) .entry-preference,.ws-copy,.rec-tool,.ev-tools input) {
  font-size:var(--z-control)!important; line-height:1.45;
}
html[data-z-pane] body :is(#record,#record-text,#analyze,#auth-submit,#guest-start,#guest-start-label,#language-continue,#play-reference,#play-reference>span,#chat-send,#new-chat) {
  font-size:var(--z-primary)!important; font-weight:600!important; line-height:1.4;
}
html[data-z-pane] body :is(.studio-heading p,.exercise-note p,.science-caption,.record-status,.privacy-note,
  .selection-note, .metrics small,.metrics em,.memory-facts,.dialog-status,.type-preview-footer,.type-preview-footer a,
  #auth-description,#language-privacy,.entry-choice-copy>span,.book-mini-figure figcaption,.status-note,
  .ac-note,#composer-help,#reference-status,#syllable-characters,#exercise-count) { color:var(--z-secondary-ink)!important; }
html[data-z-pane] body :is(.metric,.metrics,.science-metrics) :is(small,em) { color:var(--z-secondary-ink)!important; opacity:1; }
html[data-z-pane] .ws-toolbar label:has(:disabled) { opacity:1; }
html[data-z-pane="a"] :is(#memory-dialog,#teacher-dialog,.logbook) :is(p,label,.checkbox-label,small,#clear-memory,#delete-practice,#delete-chat) {color:var(--z-copy)!important;}
html[data-z-pane="c"] summary { color:var(--z-secondary-ink)!important; }
html[data-z-pane] svg text[data-min-chart] { font-size:var(--z-plot-text)!important; }
html[data-z-pane] :is(.metrics,.science-metrics) {align-items:start;}
html[data-z-pane] body :is(button,a,details summary,select,input[type=text],input[type=password]) { min-height:0; }
html[data-z-pane] body :is(button,a.studio-nav,details summary,select,input[type=text],input[type=password]) { min-height:40px; }
html[data-z-pane] body :is(.enlarge-body,.message p,.tutor-panel .messages p) { font-size:var(--z-body)!important; }
html[data-z-pane] body :is(#studio-character,.chart-legend span,.chart-foot span,.viz-legend span,.deck-caption span,.a-scope-label strong,.a-rack-title span,.a-ranges span,.a-meters span,.message .avatar,.a-storage span) {
  font-size:var(--z-secondary)!important; line-height:1.45;
}
html[data-z-pane] body #studio-acoustics .ac-note { color:#f1faf2!important; background:#173c2a; padding:6px 10px; border-radius:3px; }
html[data-z-pane] body .studio-acoustics .ac-note:empty { display:none; }
html[data-z-pane] :is(.signal-source,.signal-value,.signal-switch,.recording-label,#recording-label,#clock) {color:var(--z-copy);}
html[data-z-pane] body #record:not(:disabled) {color:var(--z-on-button);background:var(--z-button);border-color:var(--z-button);}
html[data-z-pane] #record #record-text {font-size:var(--z-primary)!important;font-weight:600!important;line-height:1.4;}
html[data-z-pane] body #record:not(:disabled):hover {filter:brightness(.94);}
html[data-z-pane] body :is(input,textarea)::placeholder {color:var(--z-secondary-ink);opacity:1;}
html[data-z-pane] body :is(button,select,input,textarea):disabled:not(.jade-core),
html[data-z-pane] body .tone:disabled :is(b,small,.tone-trend) {
  color:var(--z-disabled-ink);opacity:1;
}
html[data-z-pane] body :is(.rec-tool,.rec-example,.record-button,select,.tone):disabled {background-color:var(--z-disabled-bg);}
html[data-z-pane] body .record-layout .tone[aria-pressed="true"]:disabled {
  background:var(--z-button)!important;color:var(--z-on-button)!important;
  border-color:var(--z-button);box-shadow:none;
}
html[data-z-pane] body .record-layout .tone[aria-pressed="true"]:disabled :is(b,small,span,svg) {color:var(--z-on-button)!important;}
html[data-z-pane] body :is(.studio-heading h1,.book-masthead strong) {color:var(--z-copy);}
html[data-z-pane][data-z-font] body #memory-dialog > .dialog-heading h2 {
  color:var(--z-copy);font-family:var(--ui-font)!important;
  font-size:clamp(25px,3vw,34px);font-weight:700;line-height:1.25;
}
html[data-z-pane="b"][data-z-font] body #memory-dialog > .dialog-heading h2 {
  font-family:"Zhier Brush",var(--ui-font)!important;
}
html[data-z-pane] .signal-readout {font-variant-numeric:tabular-nums;}
/* The registered bold face keeps small action labels bold even in the brush and Wenkai themes. */
html[data-z-pane] {
  --action-face:"Zhier Harmony","Zhier Source Han",sans-serif;
  --action-fill:#164c37;--action-hover:#103e2d;--action-border:#164c37;
  --action-radius:11px;--control-radius:9px;--dock-radius:16px;
}
html[data-z-pane="a"] {--action-fill:#20563e;--action-hover:#184732;--action-border:#a1c9b3;}
html[data-z-pane] body .record-layout :is(#practice-title,#syllable-label,label[for="reference-select"],.book-leaf-title h2) {
  --ui-font:var(--action-face);--ui-title:var(--action-face);
  display:inline-flex;align-items:center;justify-self:start;width:fit-content;max-width:100%;flex:none;
  background:var(--action-fill);color:#fff!important;border:1px solid var(--action-border);border-radius:2px;
  padding:.20em .56em;margin-block:0;font-weight:700!important;line-height:1.45;
}
html[data-z-pane] body :is(#record,#play-reference,#analyze,#auth-submit,#guest-start,#language-continue,#chat-send,.ev-receipt button) {
  --ui-font:var(--action-face);--ui-title:var(--action-face);border-radius:var(--action-radius);font-weight:700!important;
}
html[data-z-pane] body :is(#record,#play-reference,#analyze,#auth-submit,#guest-start,#language-continue,#chat-send):not(:disabled) {
  background:var(--action-fill);color:#fff!important;border:1px solid var(--action-border);
}
html[data-z-pane] body :is(#record,#play-reference,#analyze,#auth-submit,#guest-start,#language-continue,#chat-send):enabled:hover {
  background:var(--action-hover);
}
html[data-z-pane] body :is(#record #record-text,#play-reference > span,#guest-start #guest-start-label) {
  font-weight:700!important;color:inherit;
}
html[data-z-pane] body .record-layout .tone[aria-pressed="true"],
html[data-z-pane] body .record-layout .tone[aria-pressed="true"]:disabled {
  --ui-font:var(--action-face);border-radius:var(--tone-radius,var(--control-radius));background:var(--action-fill)!important;
  color:white!important;border-color:var(--action-border);box-shadow:inset 0 0 0 1px var(--action-border);
}
html[data-z-pane] body .record-layout .tone[aria-pressed="true"] :is(b,small,span,svg),
html[data-z-pane] body .record-layout .tone[aria-pressed="true"]:disabled :is(b,small,span,svg) {
  color:white!important;font-weight:700!important;
}
html[data-z-pane] body .record-layout .tone[aria-pressed="true"] .tone-stroke path {stroke:currentColor;}
/* Use the very same installed bold face for the label, its nested text and marked pinyin. */
html[data-z-pane][data-z-font] body :is(
  .book-leaf-title h2,#practice-title,#syllable-label,.reference-controls label[for="reference-select"],
  #record,#play-reference,#analyze,#auth-submit,#guest-start,#language-continue,#chat-send,
  .ev-receipt button,.record-layout .tone,#exercise-count,#exercise-note,#reference-status,
  #syllable-open,#syllable-select,#reference-select,#syllable-results [role="option"]
),
html[data-z-pane][data-z-font] body :is(
  .book-leaf-title h2,#practice-title,#syllable-label,.reference-controls label[for="reference-select"],
  #record,#play-reference,#analyze,#auth-submit,#guest-start,#language-continue,#chat-send,
  .ev-receipt button,.record-layout .tone,#syllable-open,#syllable-select,#reference-select,#syllable-results [role="option"]
) :is(span,b,strong,small,em,option) {
  font-family:var(--action-face)!important;
  font-weight:700!important;
  font-style:normal;
}
html[data-z-pane] body :is(#record,#play-reference,#analyze,.tone):focus-visible {
  outline:3px solid var(--z-copy);outline-offset:3px;
}

/* Match the primary recording action across the five chapters. */
html[data-z-pane] body :is(
  #export,#generate-corrected,#new-chat,#view-principle-video,#chat-send,
  #memory-form [type="submit"],#create-invite,
  [data-view="analysis"] .page-actions [data-go="tutor"],.ev-receipt button,
  .history-item .history-open,.tutor-welcome [data-go="record"]
) {
  --ui-font:var(--action-face);--ui-title:var(--action-face);
  background:var(--action-fill);color:#fff;border:1px solid var(--action-border);border-radius:var(--action-radius);
  font-family:var(--action-face)!important;font-weight:700!important;font-style:normal;line-height:1.4;
  text-align:center;padding:.52em .82em;min-height:44px;
}
html[data-z-pane] body :is(
  #export,#generate-corrected,#new-chat,#view-principle-video,#chat-send,
  #memory-form [type="submit"],#create-invite,
  [data-view="analysis"] .page-actions [data-go="tutor"],.ev-receipt button,
  .tutor-welcome [data-go="record"]
):enabled:hover {background:var(--action-hover);}
.history-open {display:inline-flex;align-items:center;justify-content:center;white-space:nowrap;}
html[data-z-pane] body .history-item:not(:disabled):is(:hover,:focus-visible) .history-open {background:var(--action-hover);}
html[data-z-pane] body :is(#export,#generate-corrected,#science-generate):disabled {
  background:var(--z-disabled-bg);color:var(--z-disabled-ink);border-color:currentColor;
}
html[data-z-pane][data-z-font] body .mobile-dock a[aria-current="page"] {
  --ui-font:var(--action-face);
  color:#fff;background:var(--action-fill);
}
html[data-z-pane] body .mobile-dock a span {font-weight:600;}
html[data-z-pane] body .mobile-dock a[aria-current="page"] span {font-weight:700;}

/* Make actions distinguishable from prose even before hover or keyboard focus. */
html[data-z-pane] {
  --control-surface:color-mix(in srgb,var(--action-fill) 9%,var(--sheet));
  --control-border:color-mix(in srgb,var(--z-copy) 56%,var(--sheet));
  --control-hover:color-mix(in srgb,var(--action-fill) 18%,var(--sheet));
}
html[data-z-pane][data-z-font] body :is(
  .text-button,.page-actions [data-go="record"],.signal-switch,.ws-copy,
  .conversation-evidence > summary,.chat-flow > summary,.message-sources > summary,
  .palm-settings > summary,.palm-mic > summary,.palm-comparison > summary,.entry-preference,
  .ac-actions button,.ev-tools button,.ev-chart-tools button,.viz-tabs button,#memory-trend-values button,
  .a-back,.book-return,.palm-return
):not(:where(#export,#generate-corrected,#new-chat,#view-principle-video,.workbook #auth-switch,.tutor-welcome [data-go="record"])) {
  min-height:44px; padding:.45em .72em; text-decoration:none;
  background:var(--control-surface); border:1px solid var(--control-border); border-radius:var(--control-radius);
  color:var(--z-copy);font-weight:600;cursor:pointer;
}
html[data-z-pane][data-z-font] body :is(
  .text-button,.page-actions [data-go="record"],.signal-switch,.ws-copy,
  .conversation-evidence > summary,.chat-flow > summary,.message-sources > summary,
  .palm-settings > summary,.palm-mic > summary,.palm-comparison > summary,.entry-preference,
  .ac-actions button,.ev-tools button,.ev-chart-tools button,.viz-tabs button,#memory-trend-values button,
  .a-back,.book-return,.palm-return
):not(:where([disabled],#export,#generate-corrected,#new-chat,#view-principle-video,.workbook #auth-switch,.tutor-welcome [data-go="record"])):hover {
  background:var(--control-hover);border-color:var(--z-copy);
}
html[data-z-pane][data-z-font] body :is(.viz-tabs button[aria-selected="true"],#memory-trend-values button[aria-pressed="true"],.ac-actions button[aria-pressed="true"]):not(:disabled) {
  background:var(--action-fill);border-color:var(--action-border);color:#fff;
}
html[data-z-pane] body :is(.a-back,.book-return,.palm-return):not([hidden]) {display:inline-flex;align-items:center;}
html[data-z-pane] body :is(.conversation-evidence,.chat-flow,.practice-feedback .message-sources) > summary {
  width:fit-content; max-width:100%;
}
html[data-z-pane][data-z-font] body :is(.shell-icon-button,.dialog-close,.entry-close,#entry-toggle-password) {
  border:1px solid var(--control-border);border-radius:var(--control-radius);background:var(--control-surface);color:var(--z-copy);
}
html[data-z-pane][data-z-font] body :is(.shell-icon-button,.dialog-close,.entry-close,#entry-toggle-password):enabled:hover {
  background:var(--control-hover);border-color:var(--z-copy);
}
html[data-z-pane][data-z-font] body :is(#delete-practice,#delete-chat,#clear-memory):enabled {color:#7b3329;}
html[data-z-pane="a"][data-z-font] body :is(#delete-practice,#delete-chat,#clear-memory):enabled {color:#ffd6cb;}
html[data-z-pane][data-z-font] body :is(#generate-corrected,#export,#new-chat,#view-principle-video):enabled {
  background:var(--action-fill);border:1px solid var(--action-border);color:#fff;
}
html[data-z-pane][data-z-font] body :is(#generate-corrected,#export,#new-chat,#view-principle-video):enabled:hover {
  background:var(--action-hover);
}
html[data-z-pane][data-z-font] body :is(#generate-corrected,#export,#science-generate):disabled {
  background:var(--z-disabled-bg);border:1px solid var(--control-border);color:var(--z-disabled-ink);opacity:1;
}
html[data-z-pane][data-z-font] body :is(button,summary,a.book-return,a.a-back,a.palm-return,a#download):focus-visible {
  outline:2px solid var(--z-copy);outline-offset:3px;
}
html[data-z-pane][data-z-font] body .mobile-dock a {
  border:0;border-radius:var(--dock-radius);
}
html[data-z-pane][data-z-font] body .mobile-dock a:not([aria-current="page"]):is(:hover,:focus-visible) {
  background:var(--control-surface);
}
html[data-z-pane][data-z-font] body #studio-sidebar .studio-nav {
  border:1px solid var(--nav-seam);border-radius:var(--control-radius);
}
html[data-z-pane][data-z-font] body #studio-sidebar .studio-nav[aria-current="page"] {
  color:#fff;background:var(--action-fill);border-color:var(--action-border);
}
html[data-z-pane][data-z-font] body #studio-sidebar .studio-nav[aria-current="page"]::before {color:inherit;}
html[data-z-pane][data-z-font] body .dialog-close {min-width:40px;}
@media(max-width:680px) {
  html[data-z-pane] { --z-body:18px; --z-secondary:16px; --z-control:17px; --z-primary:19px; }
  html[data-z-pane] body :is(button,a.studio-nav,summary,select,input[type=text],input[type=password]) { min-height:44px; }
  html[data-z-pane][data-z-font] body .dialog-close {min-width:44px;}
}
