/* MoYe Portal shared tokens. One world, multiple observation vantages. */
/* Fixed drawers must not widen the document canvas. Individual content
   modules still own their explicit internal scroll/overflow behavior. */
html { overflow-x: clip; }
:root {
  color-scheme: dark;
  --void: #080706;
  --void2: #0d0b0a;
  --panel: rgba(20, 14, 12, .88);
  --panel2: rgba(29, 18, 16, .94);
  --ink: #f1ebe1;
  --dim: #c7c0b5;
  --faint: #918b82;
  --murmur: #b5a5cf;
  --acc: #d92a31;
  --red: var(--acc);
  --blood: #780d12;
  --celadon: #6faaa0;
  --seal: var(--acc);
  --hair: rgba(241, 235, 225, .16);
  --hair2: rgba(241, 235, 225, .065);
  --accline: color-mix(in srgb, var(--acc) 56%, transparent);
  --redline: var(--accline);
  --reading: rgba(8, 7, 6, .72);
  --reading-strong: rgba(8, 7, 6, .9);
  --world-sky: #0b0909;
  --world-mountain: #171110;
  --world-water: #070707;
  --shadow-soft: 0 18px 60px rgba(0, 0, 0, .24);
  --shadow-deep: 0 28px 90px rgba(0, 0, 0, .42);

  --sf: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "Hiragino Sans", "Yu Gothic UI", "PingFang SC", sans-serif;
  --mincho: "Hiragino Mincho ProN", "Yu Mincho", "Songti SC", "Noto Serif CJK JP", "Noto Serif SC", serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Consolas, monospace;

  --fs-label: clamp(.64rem, .12vw + .61rem, .72rem);
  --fs-small: clamp(.76rem, .16vw + .72rem, .86rem);
  --fs-body: clamp(.92rem, .18vw + .87rem, 1.02rem);
  --fs-lede: clamp(1.02rem, .35vw + .93rem, 1.24rem);
  --fs-h3: clamp(1.35rem, .8vw + 1.14rem, 1.95rem);
  --fs-h2: clamp(2rem, 2.4vw + 1.35rem, 4rem);
  --fs-hero: clamp(3.4rem, 7vw + 1.3rem, 8.8rem);
  --lh-body: 1.72;
  --lh-prose: 1.9;
  --tracking-label: .18em;
  --tracking-hero: 0;
  --tracking-h2: .02em;
  --tracking-title: .08em;
  --lh-hero: 1.05;
  --lh-title: 1.2;

  --sp-1: .5rem;
  --sp-2: .75rem;
  --sp-3: 1rem;
  --sp-4: 1.5rem;
  --sp-5: 2rem;
  --sp-6: 3rem;
  --sp-7: 4.5rem;
  --sp-8: 7rem;
  --page-gutter: clamp(1.1rem, 4vw, 4.5rem);
  --reading-width: 72rem;
  --data-width: 110rem;
  --nav-h: 60px;
  --focus-ring: 1px solid var(--acc);
  --ease-world: cubic-bezier(.22, .78, .2, 1);
}

:root[data-day="1"] {
  color-scheme: light;
  --void: #e8eeeb;
  --void2: #dfe7e3;
  --panel: rgba(237, 241, 237, .82);
  --panel2: rgba(228, 235, 231, .94);
  --ink: #1c211f;
  --dim: #39433f;
  --faint: #65706a;
  --murmur: #5f5872;
  --acc: #4d8d82;
  --red: var(--acc);
  --blood: #84372f;
  --celadon: #39766c;
  --seal: #b64235;
  --hair: rgba(28, 33, 31, .17);
  --hair2: rgba(28, 33, 31, .07);
  --accline: color-mix(in srgb, var(--acc) 58%, transparent);
  --redline: var(--accline);
  --reading: rgba(232, 238, 235, .72);
  --reading-strong: rgba(232, 238, 235, .91);
  --world-sky: #dfe9e5;
  --world-mountain: #a7b5af;
  --world-water: #ccd6d1;
  --shadow-soft: 0 18px 60px rgba(31, 45, 40, .12);
  --shadow-deep: 0 28px 90px rgba(31, 45, 40, .2);
}

@media (prefers-reduced-motion: reduce) {
  :root { --ease-world: linear; }
}

@media (prefers-contrast: more) {
  :root {
    --hair: color-mix(in srgb, var(--ink) 58%, transparent);
    --hair2: color-mix(in srgb, var(--ink) 34%, transparent);
    --reading: color-mix(in srgb, var(--void) 94%, var(--ink) 6%);
    --reading-strong: var(--void2);
  }
}

/* Structural display titles keep the MYW Hanzi name visible in every locale.
   Latin text is a subordinate gloss; translated prose remains available to AT. */
.mw-display-title {
  position: relative;
  min-width: 0;
  max-width: 100%;
}
.mw-display-title > .mw-display-title__cjk {
  display: block !important;
  min-width: 0;
  max-width: 100%;
  margin: 0 !important;
  color: inherit;
  font: inherit !important;
  font-size: 1em !important;
  letter-spacing: inherit !important;
  line-height: inherit !important;
}
.mw-display-title > .mw-display-title__latin {
  display: block !important;
  min-width: 0;
  max-width: 100%;
  margin: clamp(.7rem,1.4vw,1.15rem) 0 0 !important;
  color: var(--faint) !important;
  font: 600 var(--fs-label)/1.5 var(--mono) !important;
  letter-spacing: .2em !important;
  text-transform: uppercase;
  overflow-wrap: anywhere;
  word-break: normal;
}
.mw-display-title > .mw-display-title__aria {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
