/* Late world layers in cascade order: V192 type and logo dressing, Hearts and Bows and
   Field Journal refinements, printed corner signatures, chalk residue, then V194 tab polish. */

/* V192 identity: local OFL type and authored molecular-logo dressing.
   UI selectors intentionally exclude authored content, mathematics and plot labels. */
@font-face { font-family: 'Chalk Cinzel'; src: url('assets/fonts/worlds-v192/Cinzel-Variable.ttf') format('truetype'); font-weight: 400 900; font-display: swap; }
@font-face { font-family: 'Chalk Bree'; src: url('assets/fonts/worlds-v192/BreeSerif-Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Chalk Bodoni'; src: url('assets/fonts/worlds-v192/BodoniModa-Variable.ttf') format('truetype'); font-weight: 400 900; font-display: swap; }
@font-face { font-family: 'Chalk Bricolage'; src: url('assets/fonts/worlds-v192/BricolageGrotesque-Variable.ttf') format('truetype'); font-weight: 200 800; font-display: swap; }
@font-face { font-family: 'Chalk Michroma'; src: url('assets/fonts/worlds-v192/Michroma-Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Chalk Silkscreen'; src: url('assets/fonts/worlds-v192/Silkscreen-Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Chalk Nunito'; src: url('assets/fonts/worlds-v192/Nunito-Variable.ttf') format('truetype'); font-weight: 200 1000; font-display: swap; }
@font-face { font-family: 'Chalk Chakra'; src: url('assets/fonts/worlds-v192/ChakraPetch-Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Chalk Chakra'; src: url('assets/fonts/worlds-v192/ChakraPetch-SemiBold.ttf') format('truetype'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Chalk Barlow'; src: url('assets/fonts/worlds-v192/Barlow-Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Chalk Barlow'; src: url('assets/fonts/worlds-v192/Barlow-SemiBold.ttf') format('truetype'); font-weight: 600; font-display: swap; }

.world-logo-dressing { display: none; pointer-events: none; }
.world-logo-underlay, .world-logo-overlay { pointer-events: none; }
/* Classic default: the family faces below override this for their own body attribute. */
body {
  --world-font-heading: Newsreader, Georgia, serif;
  --world-font-navigation: 'DM Sans', system-ui, sans-serif;
}
body[data-world-family='observatory'] {
  --world-font-brand: 'Chalk Cinzel', Georgia, serif;
  --world-font-heading: 'Chalk Cinzel', Georgia, serif;
  --world-font-navigation: 'Chalk Barlow', 'DM Sans', sans-serif;
  --world-brand-weight: 600;
  --world-heading-weight: 600;
  --world-brand-tracking: -.045em;
  --world-logo-metal: #9a7437;
}
body[data-world-family='heirloom-library'] {
  --world-font-brand: 'Chalk Bodoni', Georgia, serif;
  --world-font-heading: 'Chalk Bodoni', Georgia, serif;
  --world-font-navigation: Newsreader, Georgia, serif;
  --world-brand-weight: 650;
  --world-heading-weight: 600;
  --world-brand-tracking: -.015em;
  --world-logo-metal: #a47a37;
}
body[data-world-family='art-room'] {
  --world-font-brand: 'Chalk Bricolage', 'DM Sans', sans-serif;
  --world-font-heading: 'Chalk Bricolage', 'DM Sans', sans-serif;
  --world-font-navigation: 'Chalk Bricolage', 'DM Sans', sans-serif;
  --world-brand-weight: 750;
  --world-heading-weight: 650;
  --world-brand-tracking: -.055em;
}
body[data-world-family='personal-web'] {
  --world-font-brand: 'Chalk Michroma', 'DM Sans', sans-serif;
  --world-font-heading: 'Chalk Chakra', 'DM Sans', sans-serif;
  --world-font-navigation: 'Chalk Chakra', 'DM Sans', sans-serif;
  --world-brand-weight: 400;
  --world-heading-weight: 600;
  --world-brand-tracking: -.065em;
}
body[data-world-family='personal-web'][data-world-motif='pixel-diary'] {
  --world-font-brand: 'Chalk Silkscreen', monospace;
  --world-brand-tracking: -.09em;
}

@media screen {
  body[data-world-family] .brand { display: inline-flex; align-items: center; color: var(--nw-ink); font-family: var(--world-font-brand); font-weight: var(--world-brand-weight); letter-spacing: var(--world-brand-tracking); }
  body[data-world-family] .brand > span:last-child { font-family: var(--world-font-brand); font-weight: var(--world-brand-weight); font-optical-sizing: auto; }
  body[data-world-family] .brand sup { font-family: var(--world-font-navigation); color: var(--accent-text); letter-spacing: -.03em; }
  body[data-world-family] :is(.modal-header h2, .pane-heading h1, .pane-heading h2, .biology-studio-header h2, .science-studio-header h2, .help-content > h2, .help-content > section > h3, .onboarding-title, .tour-title, .help-panel h3) {
    font-family: var(--world-font-heading); font-weight: var(--world-heading-weight); font-optical-sizing: auto; letter-spacing: -.025em;
  }
  body[data-world-family] :is(.toolbar > .tool-button, .toolbar .document-actions > button, .workspace-toolbar > button, .workspace-tab, .right-pane-tab, .tool-library-tabs > button, .help-tab, .help-subject-tabs > button, .help-tool-subject-tab, .science-tab, .biology-mode-tab, .biology-reference-tab, .statistics-tabs > button, .theme-preview-copy > strong, .world-motif-button, .settings-tabs > button) {
    font-family: var(--world-font-navigation); font-weight: 600; letter-spacing: 0;
  }
  body[data-world-family] .brand-mark {
    color: var(--nw-accent); background: var(--nw-panel); border-color: color-mix(in srgb, var(--nw-accent) 55%, var(--nw-panel));
    width: 44px; height: 44px; overflow: hidden; isolation: isolate;
  }
  body[data-world-family] .chemistry-mark { width: 94%; height: 94%; max-width: none; max-height: none; }
  body[data-world-family] .brand-mark::after { color: var(--nw-ink); }
  body[data-world-family] .chemistry-mark :is(.mark-carbon, .mark-oxygen, .mark-calcium) { stroke-width: 2.2; }
  body[data-world-family] .chemistry-mark .mark-bond { stroke: var(--nw-ink); stroke-width: 4.5; }
  body[data-world-family] .chemistry-mark .mark-bond-highlight { stroke: var(--nw-paper); opacity: .7; }
  body[data-world-family] .chemistry-mark .mark-carbon { fill: var(--nw-ink); stroke: var(--nw-panel); }
  body[data-world-family] .chemistry-mark .mark-calcium { fill: var(--nw-paper); stroke: var(--nw-accent); }
  body[data-world-family] .chemistry-mark .mark-oxygen { fill: var(--nw-accent); stroke: var(--nw-ink); }

  /* Observatory: an engraved celestial plate; the perimeter is an instrument,
     not a second set of chemical bonds. The four-point marks are decorative stars. */
  body[data-world-family='observatory'] .brand-mark { border-radius: 50%; border: 1px solid var(--world-logo-metal); background: radial-gradient(circle at 35% 25%, var(--nw-paper), var(--nw-shell)); box-shadow: inset 0 0 0 2px var(--nw-panel); }
  body[data-world-family='observatory'] .world-logo-observatory { display: block; }
  body[data-world-family='observatory'] :is(.logo-orbit, .logo-orbit-sweep, .logo-graduations) { fill: none; stroke: var(--world-logo-metal); stroke-width: 1.8; stroke-linecap: round; }
  body[data-world-family='observatory'] .logo-orbit-sweep { stroke-width: 2.2; }
  body[data-world-family='observatory'] :is(.logo-star, .logo-star-small) { fill: var(--world-logo-metal); }
  body[data-world-family='observatory'][data-world-motif='constellation-study'] { --world-logo-metal: #796391; }
  body[data-world-family='observatory'][data-world-motif='solar-observatory'] { --world-logo-metal: #ac652e; }
  body[data-world-family='observatory'][data-theme='dark'] { --world-logo-metal: #e2c790; }
  body[data-world-family='observatory'][data-theme='dark'] :is(.logo-star, .logo-star-small) { fill: #fff6ce; filter: drop-shadow(0 0 2px #ead9ae); }
  body[data-world-family='observatory'] :is(.tool-library-tabs > button, .help-tab, .right-pane-tab) { letter-spacing: .025em; }

  /* Library: the molecule becomes a publisher's foil stamp on bookcloth. */
  body[data-world-family='heirloom-library'] .brand-mark { border-radius: 3px; border-color: var(--world-logo-metal); background: var(--nw-ink); box-shadow: 1px 2px 2px #0002, inset 0 0 0 2px var(--nw-ink); }
  body[data-world-family='heirloom-library'] .world-logo-library { display: block; }
  body[data-world-family='heirloom-library'] :is(.logo-bookplate, .logo-foil-rule, .logo-foil-corners) { fill: none; stroke: var(--world-logo-metal); stroke-width: 1.7; stroke-linejoin: round; }
  body[data-world-family='heirloom-library'] .chemistry-mark .mark-bond { stroke: #d5b478; }
  body[data-world-family='heirloom-library'] .chemistry-mark :is(.mark-carbon, .mark-oxygen) { fill: #d5b478; stroke: var(--nw-ink); }
  body[data-world-family='heirloom-library'] .chemistry-mark .mark-calcium { fill: var(--nw-ink); stroke: #d5b478; }
  body[data-world-family='heirloom-library'] .brand-mark::after { color: #e6ce9c; }
  body[data-world-family='heirloom-library'][data-world-motif='midnight-library'] { --world-logo-metal: #b6c1d1; }
  body[data-world-family='heirloom-library'][data-theme='dark'] .brand-mark { background: var(--nw-shell); }
  body[data-world-family='heirloom-library'][data-theme='dark'] .chemistry-mark :is(.mark-carbon, .mark-oxygen, .mark-calcium) { stroke: var(--nw-shell); }
  body[data-world-family='heirloom-library'][data-theme='dark'] .chemistry-mark .mark-calcium { fill: var(--nw-shell); stroke: #d5b478; }
  body[data-world-family='heirloom-library'] :is(.tool-library-tabs > button, .help-tab, .right-pane-tab, .workspace-tab) { font-size: max(13px, 1em); }
  body[data-world-family='heirloom-library'] .brand > span:last-child { font-variation-settings: 'opsz' 36; }

  /* Art Room: painted edge swatches, registration marks and a graphite pencil. */
  body[data-world-family='art-room'] .brand-mark { border-radius: 4px 9px 5px 3px; border-color: color-mix(in srgb, var(--nw-ink) 35%, var(--nw-panel)); background: var(--nw-paper); box-shadow: 1px 2px 0 color-mix(in srgb, var(--nw-ink) 15%, transparent); }
  body[data-world-family='art-room'] .world-logo-art-room { display: block; }
  body[data-world-family='art-room'] .logo-pigment-one { fill: #d8ab54; }
  body[data-world-family='art-room'] .logo-pigment-two { fill: #8fbaa2; }
  body[data-world-family='art-room'] .logo-pigment-three { fill: #dd967e; }
  body[data-world-family='art-room'] .logo-registration { fill: none; stroke: var(--nw-muted); stroke-width: 1.4; }
  body[data-world-family='art-room'] .chemistry-mark .mark-oxygen { fill: #d37f6b; stroke: #7a4a45; }
  body[data-world-family='art-room'][data-world-motif='blue-pencil'] :is(.logo-pigment-one, .logo-pigment-two, .logo-pigment-three) { fill: #a0bed7; }
  body[data-world-family='art-room'][data-world-motif='blue-pencil'] .chemistry-mark .mark-oxygen { fill: #6395bb; stroke: #315574; }
  body[data-world-family='art-room'][data-world-motif='terracotta-studio'] .logo-pigment-two { fill: #c5886d; }
  body[data-world-family='art-room'] .brand > span:last-child { font-variation-settings: 'wdth' 96, 'opsz' 48; }

  /* Personal Web keeps three different eras/details, rather than one object. */
  body[data-world-family='personal-web'] .brand { font-size: 20px; }
  body[data-world-family='personal-web'] .brand-mark { border-radius: 10px; background: linear-gradient(135deg, #fff, #cfd8ef 43%, #e9d1ed 75%, #f8f9ff); border-color: #8693ba; box-shadow: inset 0 1px 0 #fff, 0 1px 2px #4f4f7830; }
  body[data-world-family='personal-web'] .chemistry-mark :is(.mark-carbon, .mark-oxygen, .mark-calcium) { fill: var(--world-logo-chrome); stroke: #566585; }
  body[data-world-family='personal-web'] .chemistry-mark .mark-bond { stroke: #7383a2; }
  body[data-world-family='personal-web'][data-world-motif='chrome-candy'] .world-logo-chrome { display: block; }
  body[data-world-family='personal-web'] :is(.logo-chrome-rim, .logo-chrome-orbit) { fill: none; stroke: #7885aa; stroke-width: 2; }
  body[data-world-family='personal-web'] .logo-chrome-orbit { stroke: #a16994; stroke-width: 2.6; }
  body[data-world-family='personal-web'] .logo-chrome-star { fill: #fff; stroke: #9b7ea6; stroke-width: 1.2; }
  body[data-world-family='personal-web'][data-world-motif='pixel-diary'] .brand { font-size: 23px; }
  body[data-world-family='personal-web'][data-world-motif='pixel-diary'] .brand-mark { border-radius: 2px; border: 1px solid #9c7db3; background: #f5e9fb; box-shadow: 2px 2px 0 #b695c8, inset 1px 1px 0 #fff; }
  body[data-world-family='personal-web'][data-world-motif='pixel-diary'] .world-logo-pixel { display: block; }
  body[data-world-family='personal-web'] .logo-pixel-rim { fill: none; stroke: #9f7fba; stroke-width: 2; shape-rendering: crispEdges; }
  body[data-world-family='personal-web'] .logo-pixel-spark { fill: #b68fbe; shape-rendering: crispEdges; }
  body[data-world-family='personal-web'][data-world-motif='pixel-diary'] .chemistry-mark :is(.mark-carbon, .mark-oxygen, .mark-calcium) { fill: #eab6de; stroke: #80639d; }
  body[data-world-family='personal-web'][data-world-motif='pixel-diary'] .chemistry-mark .mark-carbon { fill: #8466a4; }
  body[data-world-family='personal-web'][data-world-motif='midnight-profile'] .world-logo-profile { display: block; }
  body[data-world-family='personal-web'][data-world-motif='midnight-profile'] .brand-mark { border-radius: 3px; background: #17233b; border-color: #7f9ec3; box-shadow: inset 1px 1px 0 #b7d2f66e, 1px 2px 0 #122c4c44; }
  body[data-world-family='personal-web'] .logo-profile-rim { fill: none; stroke: #6f99c9; stroke-width: 2; }
  body[data-world-family='personal-web'] .logo-profile-grid { fill: none; stroke: #416a9b; stroke-width: 1; }
  body[data-world-family='personal-web'] .logo-profile-glint { fill: none; stroke: #b5ddff; stroke-width: 2.5; }
  body[data-world-family='personal-web'] .logo-profile-star { fill: none; stroke: #d0ebff; stroke-width: 2; }
  body[data-world-family='personal-web'][data-world-motif='midnight-profile'] .brand-mark::after { color: #d3e8ff; }
  body[data-world-family='personal-web'][data-theme='dark'][data-world-motif='midnight-profile'] .logo-profile-star { filter: drop-shadow(0 0 2px #b3dfff); }
  body[data-world-family='personal-web'] :is(.tool-library-tabs > button, .help-tab, .right-pane-tab) { letter-spacing: .02em; }
}

@media screen and (max-width: 600px) {
  body[data-world-family] .brand-mark { width: 32px; height: 32px; margin-right: 5px; }
  body[data-world-family='observatory'] .brand { font-size: 18px; }
  body[data-world-family='heirloom-library'] .brand { font-size: 23px; }
  body[data-world-family='art-room'] .brand { font-size: 22px; }
  body[data-world-family='personal-web'] .brand { font-size: 16px; }
  body[data-world-family='personal-web'][data-world-motif='pixel-diary'] .brand { font-size: 21px; }
}

/* High readability forces the Classic pair everywhere, regardless of family. */
body[data-readability='high'] {
  --world-font-heading: Newsreader, Georgia, serif;
  --world-font-navigation: 'DM Sans', system-ui, sans-serif;
}

@media (forced-colors: active) {
  body[data-world-family] .brand-mark { background: Canvas !important; border-color: CanvasText !important; box-shadow: none !important; }
  body[data-world-family] .chemistry-mark :is(.mark-carbon, .mark-oxygen, .mark-calcium) { fill: Canvas !important; stroke: CanvasText !important; }
  body[data-world-family] .chemistry-mark .mark-bond { stroke: CanvasText !important; }
  body[data-world-family] .chemistry-mark .world-logo-dressing { display: none !important; }
}

/* V192: seven related stationery worlds. Approved lace, focal art and their
   mounting are untouched. Cloth, lining and printed paper extend their identity. */
@media screen {
body[data-visual-theme='pastel-princess']:not([data-readability='high']) {
  --hearts-nav:'Chalk Bodoni','Didot',serif;
  --hearts-heading:'Chalk Bodoni','Didot',serif;
  --hearts-desk-wash:rgb(255 249 243 / .60);
  --hearts-material-scale:360px;
  --hearts-edge-stock:#fff8e9;
}
body[data-visual-theme='pastel-princess']:not([data-readability='high']) .editor-scroll {
  background-image:linear-gradient(var(--hearts-desk-wash),var(--hearts-desk-wash)),var(--hearts-fabric, none);
  background-size:100% 100%,calc(var(--hearts-material-scale) * 2) calc(var(--hearts-material-scale) * 2);
  background-repeat:no-repeat,repeat;
  background-color:var(--princess-workspace);
}
body[data-visual-theme='pastel-princess']:not([data-readability='high']) :is(.workspace-tab-label,.right-pane-tabs button,.tool-library-tabs button,.help-tabs button) {
  font-family:var(--hearts-nav);font-weight:600;
}
body[data-visual-theme='pastel-princess']:not([data-readability='high']) :is(.modal-header h2,.help-panel h2,.help-panel h3,.tool-library-heading) {
  font-family:var(--hearts-heading);
}
/* This under-lace textile edge is integrated into the existing frame, never a
   loose sticker. The clear central writing area has no new foreground paint. */
body[data-visual-theme='pastel-princess']:not([data-readability='high']) .world-surround {
  display:block;position:absolute;inset:0;z-index:1;overflow:visible;pointer-events:none;user-select:none;
}
body[data-visual-theme='pastel-princess']:not([data-readability='high']) .world-surround > span {position:absolute;display:block;pointer-events:none;}
body[data-visual-theme='pastel-princess']:not([data-readability='high']) .world-surround-left {
  left:-43px;top:-18px;bottom:-22px;width:25px;
  background:var(--hearts-fabric, none) left center / 620px 620px repeat;
  border-radius:9px 0 0 9px;box-shadow:-1px 1px 2px rgb(91 56 67 / .09);
}
body[data-visual-theme='pastel-princess']:not([data-readability='high']) .world-surround-right {
  right:-42px;top:-22px;bottom:-18px;width:24px;
  background:var(--hearts-fabric, none) right center / 620px 620px repeat;
  border-radius:0 9px 9px 0;box-shadow:1px 1px 2px rgb(91 56 67 / .09);
}
body[data-visual-theme='pastel-princess']:not([data-readability='high']) .world-surround-upper {
  left:-27px;right:-25px;top:-37px;height:21px;
  background:var(--hearts-fabric, none) center top / 620px 620px repeat;
  border-radius:9px 9px 0 0;
}
body[data-visual-theme='pastel-princess']:not([data-readability='high']) .world-surround-lower {
  left:-25px;right:-27px;bottom:-39px;height:23px;
  background:var(--hearts-fabric, none) center bottom / 620px 620px repeat;
  border-radius:0 0 9px 9px;
}
body[data-visual-theme='pastel-princess']:not([data-readability='high']) :is(.world-surround-left,.world-surround-right)::after {
  content:"";position:absolute;inset:8px auto 8px 3px;width:16px;background:var(--hearts-edge) left top / 16px 64px repeat-y;pointer-events:none;
}
body[data-visual-theme='pastel-princess']:not([data-readability='high']) .world-surround-right::after {left:auto;right:3px;transform:scaleX(-1);}
body[data-visual-theme='pastel-princess']:not([data-readability='high']) .world-night-light {display:none;}
body[data-visual-theme='pastel-princess']:not([data-readability='high'])[data-paper='dots'] .note-editor {
  background-image:var(--princess-dot-grid);background-size:120px 120px;background-position:0 0;background-repeat:repeat;
}
body[data-visual-theme='pastel-princess']:not([data-readability='high'])[data-paper='grid'] .note-editor {
  background-image:linear-gradient(180deg,color-mix(in srgb,var(--world-rule) 22%,transparent) 0 1px,transparent 1px),linear-gradient(90deg,color-mix(in srgb,var(--world-rule) 22%,transparent) 0 1px,transparent 1px),linear-gradient(180deg,color-mix(in srgb,var(--world-rule) 42%,transparent) 0 1px,transparent 1px),linear-gradient(90deg,color-mix(in srgb,var(--world-rule) 42%,transparent) 0 1px,transparent 1px);
  background-size:24px 24px,24px 24px,120px 120px,120px 120px;background-position:0 0;
}
/* Strawberry: cotton picnic runner with small stitched selvedges. */
body[data-visual-theme='pastel-princess']:not([data-readability='high'])[data-princess-motif='strawberry'] {
  --hearts-material-scale:320px;--hearts-desk-wash:rgb(255 249 239 / .40);
}
body[data-visual-theme='pastel-princess']:not([data-readability='high'])[data-princess-motif='strawberry'] .world-surround-upper {left:-31px;right:-22px;}
body[data-visual-theme='pastel-princess']:not([data-readability='high'])[data-princess-motif='strawberry'] .world-surround-lower {left:-22px;right:-31px;}

/* Cherry Ribbon: crisper striped stationery and a scalloped printed seam. */
body[data-visual-theme='pastel-princess']:not([data-readability='high'])[data-princess-motif='cherry-ribbon'] {
  --hearts-nav:'Chalk Bodoni','Didot',serif;--hearts-heading:'Chalk Bodoni','Didot',serif;
  --hearts-material-scale:280px;--hearts-desk-wash:rgb(255 248 233 / .28);
}
body[data-visual-theme='pastel-princess']:not([data-readability='high'])[data-princess-motif='cherry-ribbon'] .world-surround-left,
body[data-visual-theme='pastel-princess']:not([data-readability='high'])[data-princess-motif='cherry-ribbon'] .world-surround-right {background:var(--hearts-edge-stock);border-radius:3px;}
/* The paired stripes belong to one continuous desk textile. Repainting the
   short top/foot strips at their own 620px scale shifted every stripe seam. */
body[data-visual-theme='pastel-princess']:not([data-readability='high'])[data-princess-motif='cherry-ribbon'] :is(.world-surround-upper,.world-surround-lower) {background:transparent;}

/* Honey Tea: warm woven napkin with a double hem and honey-drop punctuation. */
body[data-visual-theme='pastel-princess']:not([data-readability='high'])[data-princess-motif='honey-tea'] {
  --hearts-nav:'Chalk Bodoni','Didot',serif;--hearts-heading:'Chalk Bodoni','Didot',serif;
  --hearts-material-scale:340px;--hearts-desk-wash:rgb(255 249 231 / .36);
}
body[data-visual-theme='pastel-princess']:not([data-readability='high'])[data-princess-motif='honey-tea'] .world-surround-left {left:-45px;width:27px;}
body[data-visual-theme='pastel-princess']:not([data-readability='high'])[data-princess-motif='honey-tea'] .world-surround-lower {bottom:-42px;height:26px;}
@media(max-width:600px) {
  body[data-visual-theme='pastel-princess']:not([data-readability='high']) {--hearts-material-scale:290px;}
  body[data-visual-theme='pastel-princess']:not([data-readability='high']) .world-surround-left,
  body[data-visual-theme='pastel-princess']:not([data-readability='high'])[data-princess-motif='honey-tea'] .world-surround-left {left:-28px;top:-12px;bottom:-14px;width:16px;}
  body[data-visual-theme='pastel-princess']:not([data-readability='high']) .world-surround-right {right:-28px;top:-14px;bottom:-12px;width:16px;}
  body[data-visual-theme='pastel-princess']:not([data-readability='high']) .world-surround-upper {left:-17px;right:-17px;top:-25px;height:14px;}
  body[data-visual-theme='pastel-princess']:not([data-readability='high']) .world-surround-lower {left:-17px;right:-17px;bottom:-26px;height:15px;}
  body[data-visual-theme='pastel-princess']:not([data-readability='high']) :is(.world-surround-left,.world-surround-right)::after {inset:7px auto 7px 1px;width:11px;background-size:11px 48px;}
  body[data-visual-theme='pastel-princess']:not([data-readability='high']) .world-surround-right::after {left:auto;right:1px;}

  body[data-visual-theme='pastel-princess']:not([data-readability='high']):is([data-princess-motif='honey-tea']) .world-surround-lower {bottom:-26px;height:15px;}
}
}
@media print {
  body[data-visual-theme='pastel-princess'] .world-surround {display:none !important;}
}
@media (forced-colors:active) {
  body[data-visual-theme='pastel-princess'] :is(.world-surround,.theme-material-grain,.theme-frame) {display:none !important;}
  body[data-visual-theme='pastel-princess'] :is(.editor-scroll,.note-editor) {background-image:none !important;}
}
/* Generated Hearts material bindings. */
@media screen {
body[data-visual-theme='pastel-princess']:not([data-readability='high'])[data-princess-motif='strawberry'] {--hearts-edge:url('assets/world-rework/hearts-and-bows/strawberry/selvedge.svg');}

body[data-visual-theme='pastel-princess']:not([data-readability='high'])[data-princess-motif='cherry-ribbon'] {--hearts-edge:url('assets/world-rework/hearts-and-bows/cherry-ribbon/selvedge.svg');}

body[data-visual-theme='pastel-princess']:not([data-readability='high'])[data-princess-motif='honey-tea'] {--hearts-edge:url('assets/world-rework/hearts-and-bows/honey-tea/selvedge.svg');}
}

/* V192 Field Journal differentiation. Approved lattice, vines, lantern art,
   attachment points, molecule, writing geometry and student content are intact. */
body[data-visual-theme='field-journal'] {
  --ff-dots: var(--ff-dots-day);
  --ff-marker: var(--ff-marker-day, none);
  /* The writing plane carries no printed corner mark (owner taste contract, rule 3). */
  --ff-corner: linear-gradient(transparent, transparent);
  --ff-lamp-y: 165px;
  --ff-lamp-x: 48px;
  --ff-paper-opacity: .34;
  --ff-desk-wash: .36;
  --ff-night-wash: .86;
  --ff-rule-weight: 44%;
  --ff-tab-radius: 6px 6px 2px 2px;
  --ff-light-wide: 112px;
  --ff-light-tall: 175px;
  --ff-light-strength: .13;
}
body[data-visual-theme='field-journal'][data-field-season='spring'] {
  --ff-desk: url('assets/world-rework/field-journal/spring/desk.webp');
  --ff-paper: url('assets/world-rework/field-journal/spring/paper.webp');
  --ff-dots-day: url('assets/world-rework/field-journal/spring/dots-day.svg');
  --ff-dots-night: url('assets/world-rework/field-journal/spring/dots-night.svg');
  --ff-desk-wash: .24; --ff-night-wash: .72; --ff-rule-weight: 40%;
  --ff-tab-radius: 11px 11px 3px 3px;
  --ff-light-wide: 95px; --ff-light-tall: 230px; --ff-light-strength: .14;
}
body[data-visual-theme='field-journal'][data-field-season='summer'] {
  --ff-desk: url('assets/world-rework/field-journal/summer/desk.webp');
  --ff-paper: url('assets/world-rework/field-journal/summer/paper.webp');
  --ff-dots-day: url('assets/world-rework/field-journal/summer/dots-day.svg');
  --ff-dots-night: url('assets/world-rework/field-journal/summer/dots-night.svg');
  --ff-desk-wash: .20; --ff-night-wash: .74; --ff-rule-weight: 44%;
  --ff-tab-radius: 3px 3px 1px 1px;
  --ff-light-wide: 155px; --ff-light-tall: 190px; --ff-light-strength: .12;
}
body[data-visual-theme='field-journal'][data-field-season='autumn'] {
  --ff-desk: url('assets/world-rework/field-journal/autumn/desk.webp');
  --ff-paper: url('assets/world-rework/field-journal/autumn/paper.webp');
  --ff-dots-day: url('assets/world-rework/field-journal/autumn/dots-day.svg');
  --ff-dots-night: url('assets/world-rework/field-journal/autumn/dots-night.svg');
  --ff-desk-wash: .22; --ff-night-wash: .73; --ff-rule-weight: 49%;
  --ff-tab-radius: 2px 7px 2px 2px;
  --ff-light-wide: 125px; --ff-light-tall: 145px; --ff-light-strength: .17;
}
body[data-visual-theme='field-journal'][data-field-season='winter'] {
  --ff-desk: url('assets/world-rework/field-journal/winter/desk.webp');
  --ff-paper: url('assets/world-rework/field-journal/winter/paper.webp');
  --ff-dots-day: url('assets/world-rework/field-journal/winter/dots-day.svg');
  --ff-dots-night: url('assets/world-rework/field-journal/winter/dots-night.svg');
  --ff-desk-wash: .28; --ff-night-wash: .80; --ff-rule-weight: 36%;
  --ff-paper-opacity: .42; --ff-tab-radius: 1px;
  --ff-light-wide: 85px; --ff-light-tall: 168px; --ff-light-strength: .12;
}
body[data-visual-theme='field-journal'][data-theme='dark'] {
  --ff-dots: var(--ff-dots-night); --ff-marker: var(--ff-marker-night, none);
}
@media screen {
  body[data-visual-theme='field-journal'] .editor-scroll {
    background-color: #d9c7a5;
    background-image: linear-gradient(112deg, rgb(255 247 219 / .32), rgb(246 233 204 / var(--ff-desk-wash)) 48%, rgb(88 103 66 / .08)), var(--ff-desk);
    background-size: 100% 100%, 640px 640px;
    background-repeat: no-repeat, repeat;
    background-blend-mode: soft-light, luminosity;
    background-attachment: local;
  }
  body[data-visual-theme='field-journal'][data-theme='dark'] .editor-scroll {
    background-color: #353026;
    background-image: linear-gradient(color-mix(in srgb, var(--field-dark-workspace) calc(var(--ff-night-wash) * 100%), transparent), color-mix(in srgb, var(--field-dark-workspace) calc(var(--ff-night-wash) * 100%), transparent)), var(--ff-desk);
    background-blend-mode: normal, luminosity;
  }
  body[data-visual-theme='field-journal'] .theme-frame { filter: drop-shadow(0 2px 1.5px rgb(36 39 24 / .18)); }
  body[data-visual-theme='field-journal']:not([data-paper='chalkboard']) .theme-material-grain {
    background: var(--ff-paper) 0 0 / 640px 640px repeat;
    opacity: var(--ff-paper-opacity);
    mix-blend-mode: multiply;
  }
  body[data-visual-theme='field-journal'][data-theme='dark']:not([data-paper='chalkboard']) .theme-material-grain { opacity: .24; }
  body[data-visual-theme='field-journal'][data-field-season='autumn'][data-paper='chalkboard'] .theme-material-grain { opacity: .40; }
  body[data-visual-theme='field-journal'][data-field-season='winter'][data-paper='chalkboard'] .theme-material-grain { opacity: .29; }

  /* Environmental reflected light shares the mounted lanterns' attachment row.
     Its structural cutout cannot fall across equations or written content. */
  body[data-visual-theme='field-journal'] .world-surround {
    position: absolute; z-index: 1; inset: 0; display: block; overflow: visible;
    pointer-events: none; user-select: none;
    clip-path: polygon(evenodd, -300px -300px, calc(100% + 300px) -300px, calc(100% + 300px) calc(100% + 300px), -300px calc(100% + 300px), -300px -300px, 0 0, 0 100%, 100% 100%, 100% 0, 0 0);
  }
  body[data-visual-theme='field-journal'] .world-surround > span { display: none; pointer-events: none; }
  body[data-visual-theme='field-journal'][data-theme='dark'] .world-night-light {
    position: absolute; display: block; top: 0; bottom: 0; left: 0; right: 0;
    pointer-events: none;
    background: radial-gradient(ellipse 260px 380px at var(--ff-lamp-x) var(--ff-lamp-y), rgb(var(--field-lantern-glow) / .22), transparent 75%),
                radial-gradient(ellipse 260px 380px at calc(100% - var(--ff-lamp-x)) var(--ff-lamp-y), rgb(var(--field-lantern-glow) / .22), transparent 75%);
  }
  body[data-visual-theme='field-journal'][data-field-season='spring'][data-theme='dark'] .world-night-light {
    background: radial-gradient(ellipse 260px 380px at var(--ff-lamp-x) var(--ff-lamp-y), rgb(var(--field-lantern-glow) / .22), transparent 75%),
                radial-gradient(ellipse 260px 380px at calc(100% - var(--ff-lamp-x)) var(--ff-lamp-y), rgb(var(--field-lantern-glow) / .22), transparent 75%);
  }
  body[data-visual-theme='field-journal'][data-field-season='summer'][data-theme='dark'] .world-night-light {
    background: radial-gradient(ellipse 270px 390px at var(--ff-lamp-x) var(--ff-lamp-y), rgb(var(--field-lantern-glow) / .24), transparent 76%),
                radial-gradient(ellipse 270px 390px at calc(100% - var(--ff-lamp-x)) var(--ff-lamp-y), rgb(var(--field-lantern-glow) / .24), transparent 76%);
  }
  body[data-visual-theme='field-journal'][data-field-season='autumn'][data-theme='dark'] .world-night-light {
    background: radial-gradient(ellipse 280px 400px at var(--ff-lamp-x) var(--ff-lamp-y), rgb(var(--field-lantern-glow) / .26), transparent 78%),
                radial-gradient(ellipse 280px 400px at calc(100% - var(--ff-lamp-x)) var(--ff-lamp-y), rgb(var(--field-lantern-glow) / .26), transparent 78%);
  }
  body[data-visual-theme='field-journal'][data-field-season='winter'][data-theme='dark'] .world-night-light {
    background: radial-gradient(ellipse 250px 360px at var(--ff-lamp-x) var(--ff-lamp-y), rgb(var(--field-lantern-glow) / .20), transparent 74%),
                radial-gradient(ellipse 250px 360px at calc(100% - var(--ff-lamp-x)) var(--ff-lamp-y), rgb(var(--field-lantern-glow) / .20), transparent 74%),
                linear-gradient(90deg, rgb(172 204 218 / .025), transparent 12%, transparent 88%, rgb(172 204 218 / .025));
  }

  body[data-visual-theme='field-journal'][data-paper='blank'] .note-editor {
    background-image: var(--ff-corner); background-size: 88px 88px; background-position: 0 0; background-repeat: no-repeat;
  }
  body[data-visual-theme='field-journal'][data-paper='ruled'] .note-editor {
    background-image: linear-gradient(90deg, transparent 0 var(--field-margin-x), var(--field-margin-ink) var(--field-margin-x) calc(var(--field-margin-x) + 1px), transparent calc(var(--field-margin-x) + 1px)), repeating-linear-gradient(180deg, transparent 0 31px, color-mix(in srgb, var(--world-rule) var(--ff-rule-weight), transparent) 31px 32px);
  }
  /* R5: no sprout stamped beside every rule; the margin rule alone marks the margin. */
  body[data-visual-theme='field-journal'][data-paper='ruled'] .board-decoration::before { content: none; }
  body[data-visual-theme='field-journal'][data-paper='dots'] .note-editor {
    background-image: var(--ff-dots); background-size: 116px 116px; background-repeat: repeat; background-position: 0 0;
  }
  body[data-visual-theme='field-journal'][data-paper='grid'] .note-editor {
    background-image: var(--ff-corner), linear-gradient(180deg, color-mix(in srgb, var(--world-rule) 23%, transparent) 1px, transparent 1px), linear-gradient(90deg, color-mix(in srgb, var(--world-rule) 23%, transparent) 1px, transparent 1px), linear-gradient(180deg, color-mix(in srgb, var(--world-rule) 42%, transparent) 1px, transparent 1px), linear-gradient(90deg, color-mix(in srgb, var(--world-rule) 42%, transparent) 1px, transparent 1px);
    background-size: 88px 88px, 30px 30px, 30px 30px, 150px 150px, 150px 150px; background-repeat: no-repeat, repeat, repeat, repeat, repeat;
  }
  body[data-visual-theme='field-journal'][data-field-season='autumn'][data-paper='grid'] .note-editor {
    background-image: var(--ff-corner), linear-gradient(180deg, color-mix(in srgb, var(--world-rule) 23%, transparent) 1px, transparent 1px), linear-gradient(90deg, color-mix(in srgb, var(--world-rule) 23%, transparent) 1px, transparent 1px), linear-gradient(180deg, color-mix(in srgb, var(--world-rule) 45%, transparent) 1px, transparent 1px 3px, color-mix(in srgb, var(--world-rule) 23%, transparent) 3px 4px, transparent 4px), linear-gradient(90deg, color-mix(in srgb, var(--world-rule) 42%, transparent) 1px, transparent 1px);
  }
  body[data-visual-theme='field-journal'][data-field-season='winter'][data-paper='grid'] .note-editor {
    background-image: var(--ff-corner), linear-gradient(180deg, color-mix(in srgb, var(--world-rule) 19%, transparent) 1px, transparent 1px), linear-gradient(90deg, color-mix(in srgb, var(--world-rule) 19%, transparent) 1px, transparent 1px), linear-gradient(180deg, color-mix(in srgb, var(--world-rule) 34%, transparent) 1px, transparent 1px), linear-gradient(90deg, color-mix(in srgb, var(--world-rule) 34%, transparent) 1px, transparent 1px);
  }
  body[data-visual-theme='field-journal'][data-paper='chalkboard'] .note-editor {
    background-image: var(--ff-corner); background-size: 80px 80px; background-position: 0 0; background-repeat: no-repeat;
  }

  /* Quiet stationery changes in navigation; all button dimensions and focus
     treatments remain the shared accessible controls. Student fonts are intact. */
  body[data-visual-theme='field-journal'][data-theme] :is(.tool-library-tabs > button,.help-subject-tabs > button,.help-tab,.right-pane-tab,.workspace-tab) { border-radius: var(--ff-tab-radius); }
  body[data-visual-theme='field-journal'][data-field-season='spring'] :is(.tool-library-tabs > button,.help-tab,.right-pane-tab):is([aria-selected='true'],.active) { box-shadow: inset 0 -2px 0 color-mix(in srgb, var(--ui-control-ink) 46%, transparent); }
  body[data-visual-theme='field-journal'][data-field-season='summer'] :is(.tool-library-tabs > button,.help-tab,.right-pane-tab):is([aria-selected='true'],.active) { box-shadow: inset 0 -3px 0 color-mix(in srgb, var(--ui-control-ink) 35%, transparent); }
  body[data-visual-theme='field-journal'][data-field-season='autumn'] :is(.tool-library-tabs > button,.help-tab,.right-pane-tab):is([aria-selected='true'],.active) { box-shadow: inset 3px 0 0 color-mix(in srgb, var(--ui-control-ink) 40%, transparent); }
  body[data-visual-theme='field-journal'][data-field-season='winter'] :is(.tool-library-tabs > button,.help-tab,.right-pane-tab):is([aria-selected='true'],.active) { box-shadow: inset 0 -1px 0 color-mix(in srgb, var(--ui-control-ink) 68%, transparent); }
  body[data-visual-theme='field-journal'][data-field-season='autumn'] :is(.formula-heading,.help-panel h3,.tool-library-heading) { font-variant-caps: small-caps; letter-spacing: .02em; }
  body[data-visual-theme='field-journal'][data-field-season='winter'] :is(.formula-heading,.help-panel h3,.tool-library-heading) { font-weight: 600; letter-spacing: .035em; }
}
@container world-desk (max-width: 700px) {
  body[data-visual-theme='field-journal'] .world-surround { --ff-lamp-y: 117px; --ff-lamp-x: 27px; }
  body[data-visual-theme='field-journal'][data-theme='dark'] .world-night-light { left: -27px; right: -27px; opacity: .65; }
}
@media print {
  body[data-visual-theme='field-journal'] .world-surround { display: none !important; }
  body[data-visual-theme='field-journal'] .note-editor { background-image: none !important; }
}

/* V200: matched drawn metalwork; the loop stays pinned to the lattice. */
@media screen {
body[data-visual-theme='field-journal'][data-field-season='spring'] { --field-lantern-art:url('assets/world-rework/v200/lantern-spring.svg'); --field-lantern-image-ratio:1.9; --field-lantern-hook-x:.48; --field-lantern-hook-y:.13; }
body[data-visual-theme='field-journal'][data-field-season='summer'] { --field-lantern-art:url('assets/world-rework/v200/lantern-summer.svg'); --field-lantern-image-ratio:1.9; --field-lantern-hook-x:.48; --field-lantern-hook-y:.13; }
body[data-visual-theme='field-journal'][data-field-season='autumn'] { --field-lantern-art:url('assets/world-rework/v200/lantern-autumn.svg'); --field-lantern-image-ratio:1.9; --field-lantern-hook-x:.48; --field-lantern-hook-y:.13; }
body[data-visual-theme='field-journal'][data-field-season='winter'] { --field-lantern-art:url('assets/world-rework/v200/lantern-winter.svg'); --field-lantern-image-ratio:1.9; --field-lantern-hook-x:.48; --field-lantern-hook-y:.13; }
/* R5: the lantern's own drop-shadow darkened its halo into a hard grey disc; the feathered
   desk-wide night light below carries the glow instead. */
body[data-visual-theme='field-journal'][data-theme='dark'] .theme-frame-companion::before { content:none; }
body[data-visual-theme='field-journal'][data-theme='dark'] .theme-frame-companion-right::before { animation-delay:-1.3s; }
/* The previous narrow environmental layer cut a straight edge through the halo. */
body[data-visual-theme='field-journal'][data-theme='dark'] .world-night-light { left:-200px; right:-200px; background:radial-gradient(circle 140px at 200px var(--ff-lamp-y),rgb(var(--field-lantern-glow) / .13),transparent 100%),radial-gradient(circle 140px at calc(100% - 200px) var(--ff-lamp-y),rgb(var(--field-lantern-glow) / .13),transparent 100%); }
body[data-visual-theme='field-journal'][data-field-season][data-theme='dark'] .world-night-light { background:radial-gradient(circle 140px at 200px var(--ff-lamp-y),rgb(var(--field-lantern-glow) / .13),transparent 100%),radial-gradient(circle 140px at calc(100% - 200px) var(--ff-lamp-y),rgb(var(--field-lantern-glow) / .13),transparent 100%); }
}
@media screen and (prefers-reduced-motion:no-preference) and (forced-colors:none) {
body[data-visual-theme='field-journal'][data-theme='dark']:not([data-readability='high']) .world-night-light { animation:field-lantern-breathe 3.7s ease-in-out infinite; }
}
@media (max-width:600px) {
  /* The lamp's own paint-only round halo supplies compact-screen lighting;
     a wide desktop environment layer must not enlarge the scroll area. */
  body[data-visual-theme='field-journal'][data-theme='dark'] .world-night-light { display:none; }
}

@media screen and (prefers-reduced-motion:no-preference) and (forced-colors:none) {
body[data-visual-theme='field-journal'][data-field-season='spring']:not([data-readability='high']) { --field-lantern-art:url('assets/world-rework/v2003/lantern-spring.svg'); --field-lantern-hook-y:.13; }
body[data-visual-theme='field-journal'][data-field-season='summer']:not([data-readability='high']) { --field-lantern-art:url('assets/world-rework/v2003/lantern-summer.svg'); --field-lantern-hook-y:.13; }
body[data-visual-theme='field-journal'][data-field-season='autumn']:not([data-readability='high']) { --field-lantern-art:url('assets/world-rework/v2003/lantern-autumn.svg'); --field-lantern-hook-y:.13; }
body[data-visual-theme='field-journal'][data-field-season='winter']:not([data-readability='high']) { --field-lantern-art:url('assets/world-rework/v2003/lantern-winter.svg'); --field-lantern-hook-y:.13; }
}

/* Printed corner identities are separate from translucent paper grain. They
   remain quiet surface details when the environment is hidden, on every stock. */
.world-surface-signature { display:none; pointer-events:none; user-select:none; }
@media screen {
  body:is([data-world-family='personal-web']) .world-surface-signature {
    display:block; position:absolute; inset:0; z-index:1; overflow:hidden;
  }
  body:is([data-world-family='heirloom-library'],[data-world-family='art-room']) .theme-material-grain::after { display:none; }
  .world-surface-signature::before {
    content:""; position:absolute; width:92px; height:92px; bottom:1px;
    background-color:color-mix(in srgb,var(--world-writing-ink) 48%,transparent);
    mask:var(--surface-signature) center / contain no-repeat;
    pointer-events:none;
  }
  body[data-world-family='personal-web'] { --surface-signature:var(--web-corner-mark); }
  body[data-world-family='personal-web'] .world-surface-signature::before {
    width:104px;height:104px;right:1px;top:0;bottom:auto;
    background-color:var(--world-writing-ink);
  }
  body[data-world-family='personal-web'][data-paper='blank'] .note-editor {background-image:none;}
  body[data-world-family='personal-web'][data-paper='chalkboard'] .note-editor {
    background-image:radial-gradient(ellipse at 2% 100%,rgb(118 163 223 / .06),transparent 55%);
    background-size:100% 100%;background-position:0 0;
  }
  @container world-desk (max-width:600px) {
    .world-surface-signature::before {width:66px;height:66px;}
    body[data-world-family='personal-web'] .world-surface-signature::before {width:84px;height:84px;right:0;}
  }
}
@media print, (forced-colors:active) {.world-surface-signature {display:none !important;}}

/* Erased residue is a surface layer, never document content or drawing ink. */
@media screen {
  /* Leave the paper at the base while placing authored content above residue.
     Raising the opaque editor itself would also cover the surface material. */
  body[data-paper='chalkboard'] .ink-stage > #note-editor {z-index:auto;}
  body[data-paper='chalkboard'] #note-editor > :is(.board-object, .inline-math, .ruled-writing-layer) {z-index:2;}
  body[data-paper='chalkboard'] #note-editor > :where(p, div, ul, ol, blockquote, pre, h1, h2, h3, h4, h5, h6, table):not(.board-object):not(.ruled-writing-layer) {
    position:relative; z-index:2;
  }
  body[data-paper='chalkboard'] .ink-stage .chalk-dust-layer {
    display:block;opacity:.24;
    background:url('assets/materials/chalk-wipe-v217.webp') 0 0 / 1200px 800px repeat;
    pointer-events:none;
  }
  body[data-paper='chalkboard'] .ink-stage .chalk-dust-layer::after {content:none;}
}
@media print, (forced-colors:active) {.chalk-dust-layer {display:none !important;}}

/* Individual chalkboard tabs sit directly on the selected world's backdrop. */
@media screen {
  body #settings-dialog :is(.setting-note, .setting-row > span, .pen-custom,
    .key-toggle, .key-toggle-group h3, .modal-footer > span),
  body #settings-dialog small,
  body :is(#help-dialog, #glossary-dialog) :is(.help-panel p,.modal-footer > span) { color: var(--ink); }
  body[data-visual-theme][data-theme] .toolbar :is(.tool-button,.icon-button),
  body[data-visual-theme][data-theme] .save-state { color: var(--ink); }
  body[data-world-family='art-room'] .brand sup { color: var(--ink); }
  body[data-visual-theme] .notebook-tabs {
    background: transparent;
    border-bottom-color: transparent;
    box-shadow: none;
  }
  body[data-visual-theme] .notebook-tabs > .new-tab {
    background: color-mix(in srgb, var(--ui-control-paper, var(--paper)) 88%, transparent);
    color: var(--ui-control-ink, var(--ink));
  }
  @media (hover: hover) { body[data-visual-theme] .notebook-tabs > .new-tab:hover {
    background: var(--ui-active-surface, var(--c93));
  } }
  body[data-visual-theme] .workspace-tab:not(.active) {
    background: color-mix(in srgb, var(--ui-control-paper, var(--paper)) 82%, transparent);
    color: var(--ui-control-ink, var(--ink));
  }
}

/* Crisp family emblems stay legible at the actual 62px chooser size. */
#visual-theme-options .theme-preview-paper {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}
#visual-theme-options .theme-preview-paper::before,
#visual-theme-options .theme-preview-paper::after { content: none; }
#visual-theme-options svg.world-family-icon {
  display: block;
  width: 62px;
  height: 62px;
  max-width: 100%;
  overflow: visible;
}

/* Reference text must remain readable in the standard illustrated modes too.
   Use each surface's primary ink rather than midtone decorative palette steps. */
@media screen {
  body #reference-tools :is(.formula-intro, .formula-category-tab,
    .calc-index, .calc-send, .calc-remove, .formula-tab-section h2 small,
    .formula-section > summary small, .chem-mode-button:not(.active),
    .biology-reference-count, .biology-reference-card ul,
    #dimensional-factors label, #dimensional-factors p) { color: var(--ink); }
  body[data-visual-theme='field-journal'] #reference-tools .formula-section > summary small { color: #293c32 !important; }
  body #reference-tools .chem-ref-table :is(th,td) { color: var(--ink); }
  body #reference-tools .formula-category-tab[aria-selected='true'] {
    color: var(--ink); background: var(--paper);
    box-shadow: inset 0 -2px var(--ink);
  }
  body #reference-tools .formula-search::placeholder { color: var(--ink); opacity: .8; }
  body[data-visual-theme='field-journal'] #reference-tools .formula-category-tab[aria-selected='true'] { color: #293c32 !important; background-color: #dce5ce; }
}
@media (hover: none) {
  body #reference-tools :is(.calc-send,.calc-remove) { opacity: 1; }
}
@media (forced-colors: active) {
  #visual-theme-options .theme-preview-paper { forced-color-adjust: none; }
  body[data-visual-theme] .notebook-tabs > .new-tab,
  body[data-visual-theme] .workspace-tab { background: Canvas; color: CanvasText; }
}

/* V207 world control materials ------------------------------------------------------
   The companion pane, keypad, Calculator rows and floating Math boxes belonged to Classic
   in every world. Each family now supplies a small material vocabulary (--wc-*); the rules
   below consume it. Classic and High readability (which clears these attributes) are
   untouched. Mathematics, results and verdict meaning keep their existing colors.
   Defaults sit in :where() so each family block below overrides them. */
:where(body[data-visual-theme]:not([data-visual-theme=''])) {
  accent-color: var(--accent-ui);
  --wc-font: var(--world-font-navigation, 'DM Sans', sans-serif);
  --wc-key-bg: color-mix(in srgb, var(--paper) 82%, var(--accent-ui) 4%);
  --wc-key-fn: color-mix(in srgb, var(--paper) 70%, var(--accent-ui) 10%);
  --wc-key-border: color-mix(in srgb, var(--accent-ui) 22%, var(--line, #ccc));
  --wc-key-radius: var(--ui-control-radius, 8px);
  --wc-key-shadow: 0 1px 0 color-mix(in srgb, var(--accent-ui) 18%, transparent);
  --wc-box-bg: color-mix(in srgb, var(--paper) 90%, var(--accent-ui) 6%);
  --wc-box-border: 1px solid color-mix(in srgb, var(--accent-ui) 26%, transparent);
  --wc-box-radius: 8px;
  --wc-box-shadow: 0 2px 6px rgb(var(--shade, 0 0 0) / .12);
  --wc-pane-bg: var(--panel);
}
body[data-world-family='observatory'] {
  /* Precision astronomical instrument plates. */
  --wc-key-bg: linear-gradient(180deg, color-mix(in srgb, var(--nw-paper) 94%, #fff), color-mix(in srgb, var(--nw-paper) 88%, var(--nw-rule)));
  --wc-key-fn: linear-gradient(180deg, color-mix(in srgb, var(--nw-panel) 90%, #6a8599 6%), color-mix(in srgb, var(--nw-panel) 82%, #6a8599 12%));
  --wc-key-border: color-mix(in srgb, #6a8599 46%, var(--nw-rule));
  --wc-key-radius: 3px;
  --wc-key-shadow: inset 0 0 0 1px color-mix(in srgb, #fff 55%, transparent), 0 1px 0 color-mix(in srgb, #4a687d 40%, transparent);
  --wc-box-bg: color-mix(in srgb, var(--nw-paper) 94%, #6a8599 4%);
  --wc-box-border: 1px solid color-mix(in srgb, #6a8599 48%, transparent);
  --wc-box-radius: 3px;
  --wc-box-shadow: inset 0 0 0 3px color-mix(in srgb, var(--nw-paper) 92%, transparent), inset 0 0 0 4px color-mix(in srgb, #6a8599 30%, transparent), 0 2px 6px rgb(20 32 52 / .16);
}
body[data-world-family='observatory'][data-world-motif='lunar-atlas'] {
  --wc-key-bg: linear-gradient(180deg, #f5f8fa, #e2eaf0);
  --wc-key-fn: linear-gradient(180deg, #e8f0f5, #d0dde6);
  --wc-key-border: #6a8599;
  --wc-key-shadow: inset 0 1px 0 #ffffff, 0 1px 0 #4d677a;
  --wc-box-border: 1px solid #6a8599;
  --wc-box-shadow: inset 0 0 0 2px #f5f8fa, inset 0 0 0 3px #8aa4b8, 0 2px 6px rgb(15 28 42 / .18);
}
body[data-world-family='observatory'][data-world-motif='constellation-study'] {
  --wc-key-bg: linear-gradient(180deg, #f7f7fc, #e5e6f0);
  --wc-key-fn: linear-gradient(180deg, #eaeaf5, #d4d5e8);
  --wc-key-border: #4a4d6b;
  --wc-key-shadow: inset 0 1px 0 #ffffff, 0 1px 0 #2e3047;
  --wc-box-border: 1px solid #4a4d6b;
}
body[data-world-family='observatory'][data-world-motif='solar-observatory'] {
  --wc-key-bg: linear-gradient(180deg, #fcf6ee, #f0e1cd);
  --wc-key-fn: linear-gradient(180deg, #f5e7d3, #e2caa8);
  --wc-key-border: #a46d3e;
  --wc-key-shadow: inset 0 1px 0 #fff8f0, 0 1px 0 #734520;
  --wc-box-border: 1px solid #a46d3e;
  --wc-box-shadow: inset 0 0 0 2px #fcf6ee, inset 0 0 0 3px #c48b55, 0 2px 6px rgb(45 25 12 / .18);
}
body[data-world-family='heirloom-library'] {
  /* Letterpress: ivory card stock, hairline rules, square corners. */
  --wc-key-bg: color-mix(in srgb, var(--nw-paper) 96%, #fff);
  --wc-key-fn: color-mix(in srgb, var(--nw-paper) 86%, var(--nw-accent) 8%);
  --wc-key-border: color-mix(in srgb, var(--nw-accent) 40%, var(--nw-rule));
  --wc-key-radius: 1px;
  --wc-key-shadow: 0 1px 0 color-mix(in srgb, var(--nw-accent) 22%, transparent), 0 2px 0 color-mix(in srgb, var(--nw-rule) 18%, transparent);
  --wc-box-bg: color-mix(in srgb, var(--nw-paper) 97%, #fff);
  --wc-box-border: 1px solid color-mix(in srgb, var(--nw-rule) 55%, transparent);
  --wc-box-radius: 1px;
  --wc-box-shadow: inset 0 3px 0 color-mix(in srgb, var(--nw-accent) 55%, transparent), 0 2px 5px rgb(40 18 12 / .14);
}
body[data-world-family='art-room'] {
  /* Cut paper chips with a painted edge; tape-joined scraps for Math. */
  --wc-key-bg: color-mix(in srgb, var(--nw-paper) 94%, #fff);
  --wc-key-fn: color-mix(in srgb, var(--nw-paper) 80%, var(--nw-accent) 14%);
  --wc-key-border: color-mix(in srgb, var(--nw-ink) 26%, transparent);
  --wc-key-radius: 4px 7px 5px 6px;
  --wc-key-shadow: 2px 2px 0 color-mix(in srgb, var(--nw-accent) 28%, transparent);
  --wc-box-bg: color-mix(in srgb, #fffdf7 90%, var(--nw-paper));
  --wc-box-border: 1px solid color-mix(in srgb, var(--nw-ink) 16%, transparent);
  --wc-box-radius: 3px 6px 4px 5px;
  --wc-box-shadow: 3px 3px 0 color-mix(in srgb, var(--nw-accent) 22%, transparent), 0 1px 3px rgb(40 30 20 / .12);
}
body[data-world-family='personal-web'] {
  /* Glossy candy chrome buttons. */
  --wc-key-bg: linear-gradient(180deg, #ffffff 0%, color-mix(in srgb, var(--nw-paper) 80%, var(--nw-accent) 10%) 52%, color-mix(in srgb, var(--nw-paper) 70%, var(--nw-accent) 18%) 100%);
  --wc-key-fn: linear-gradient(180deg, #ffffff 0%, color-mix(in srgb, var(--nw-panel) 72%, var(--nw-accent) 22%) 55%, color-mix(in srgb, var(--nw-panel) 60%, var(--nw-accent) 30%) 100%);
  --wc-key-border: color-mix(in srgb, var(--nw-accent) 42%, #ffffff);
  --wc-key-radius: 999px;
  --wc-key-shadow: inset 0 1px 0 #ffffff, 0 1px 3px color-mix(in srgb, var(--nw-accent) 30%, transparent);
}
body[data-visual-theme='pastel-princess'] {
  /* Pressed stationery controls and a fine inset rule on the writing card. */
  --wc-font: 'Chalk Nunito', 'DM Sans', sans-serif;
  --wc-key-bg: linear-gradient(180deg, #fffafc, color-mix(in srgb, var(--princess-strawberry) 26%, #fffafc));
  --wc-key-fn: linear-gradient(180deg, #fff7fb, color-mix(in srgb, var(--princess-strawberry) 46%, #fff7fb));
  --wc-key-border: color-mix(in srgb, var(--princess-raspberry) 30%, #ffffff);
  --wc-key-radius: 8px;
  --wc-key-shadow: inset 0 1px 0 rgb(255 255 255 / .8), 0 1px 2px color-mix(in srgb, var(--princess-raspberry) 14%, transparent);
  --wc-box-bg: #fffafc;
  --wc-box-border: 1px solid color-mix(in srgb, var(--princess-raspberry) 32%, transparent);
  --wc-box-radius: 8px;
  --wc-box-shadow: inset 0 0 0 2px var(--wc-box-bg), inset 0 0 0 3px color-mix(in srgb, var(--princess-raspberry) 18%, transparent), 0 2px 4px rgb(57 35 37 / .14);
}
body[data-visual-theme='field-journal'] {
  /* Kraft specimen labels with a double hairline. Keys keep a sturdy sans face. */
  --wc-key-bg: color-mix(in srgb, #fbf6e8 88%, var(--field-flax, #deddc9));
  --wc-key-fn: color-mix(in srgb, #efe6cf 80%, var(--field-soft-sage, #bbbba3));
  --wc-key-border: color-mix(in srgb, var(--field-cedar-beige, #bda589) 80%, #6b5b45);
  --wc-key-radius: 3px;
  --wc-key-shadow: inset 0 0 0 2px rgb(255 252 240 / .7), 0 1px 0 rgb(94 78 56 / .25);
  --wc-box-bg: var(--field-paper-base);
  --wc-box-border: 1px solid color-mix(in srgb, var(--field-cedar-beige, #bda589) 85%, #6b5b45);
  --wc-box-radius: 2px;
  --wc-box-shadow: inset 0 0 0 3px var(--wc-box-bg), inset 0 0 0 4px color-mix(in srgb, var(--field-cedar-beige, #bda589) 60%, transparent), 0 2px 5px rgb(60 48 30 / .14);
}
body[data-visual-theme='field-journal'][data-field-season='spring'] { --wc-key-border: #6b8258; }
body[data-visual-theme='field-journal'][data-field-season='summer'] { --wc-key-border: #9b7e4f; }
body[data-visual-theme='field-journal'][data-field-season='autumn'] { --wc-key-border: #8f5030; }
body[data-visual-theme='field-journal'][data-field-season='winter'] { --wc-key-border: #627b7e; }
/* Dark rooms keep the same construction on their night materials. */
body[data-world-family][data-theme='dark'] {
  --wc-key-bg: color-mix(in srgb, var(--nw-panel) 88%, var(--nw-accent) 6%);
  --wc-key-fn: color-mix(in srgb, var(--nw-panel) 76%, var(--nw-accent) 14%);
  --wc-key-border: color-mix(in srgb, var(--nw-accent) 34%, transparent);
  --wc-key-shadow: inset 0 1px 0 rgb(255 255 255 / .06), 0 1px 0 rgb(0 0 0 / .3);
  --wc-box-bg: color-mix(in srgb, var(--nw-paper) 86%, var(--nw-accent) 8%);
  --wc-box-border: 1px solid color-mix(in srgb, var(--nw-accent) 34%, transparent);
  --wc-box-shadow: 0 2px 8px rgb(0 0 0 / .32);
}
body[data-visual-theme='field-journal'][data-theme='dark'] {
  --wc-key-bg: #2b3129; --wc-key-fn: #343b30; --wc-key-border: #6f6a55;
  --wc-key-shadow: inset 0 1px 0 rgb(255 240 200 / .06); --wc-box-bg: #2d332a; --wc-box-border: 1px solid #6f6a55;
  --wc-box-shadow: 0 2px 8px rgb(0 0 0 / .35);
}
body[data-visual-theme='field-journal'][data-field-season='spring'][data-theme='dark'] { --wc-key-border: #4d6842; }
body[data-visual-theme='field-journal'][data-field-season='summer'][data-theme='dark'] { --wc-key-border: #7d6335; }
body[data-visual-theme='field-journal'][data-field-season='autumn'][data-theme='dark'] { --wc-key-border: #754428; }
body[data-visual-theme='field-journal'][data-field-season='winter'][data-theme='dark'] { --wc-key-border: #4d686c; }

body[data-visual-theme]:not([data-visual-theme='']) #reference-tools #calculator-keypad .key {
  font-family: var(--wc-font); font-weight: 600;
  border-color: var(--wc-key-border); border-radius: var(--wc-key-radius);
  background: var(--wc-key-bg); box-shadow: var(--wc-key-shadow);
}
body[data-visual-theme]:not([data-visual-theme='']) #reference-tools #calculator-keypad :is(.key-function, .key-utility, .key-operator) { background: var(--wc-key-fn); }
body[data-visual-theme]:not([data-visual-theme='']) #reference-tools #calculator-keypad .key:hover { filter: brightness(1.03); transform: translateY(-1px); }
body[data-visual-theme]:not([data-visual-theme='']) #reference-tools #calculator-keypad .key-equals { color: var(--on-accent-ui); background: var(--accent-ui); border-color: var(--accent-ui); }
body[data-visual-theme]:not([data-visual-theme='']) #reference-tools .calc-row math-field {
  border-color: var(--wc-key-border); border-radius: min(var(--wc-box-radius), 10px); background: var(--wc-box-bg);
}
body[data-visual-theme]:not([data-visual-theme='']) :is(.calc-index, .calc-toolbar .calc-mini, .angle-mode) { font-family: var(--wc-font); }
body[data-visual-theme]:not([data-visual-theme='']) #note-editor .inline-math.floating {
  background: var(--wc-box-bg); border: var(--wc-box-border); border-radius: var(--wc-box-radius); box-shadow: var(--wc-box-shadow);
}
/* Chalkboard paper: the light box material hid pale chalk math (V207). A translucent slate
   keeps each world's box shape and lets chalk ink read, Y2K included (V208.6). */
/* Night accents already read at 6:1 or better on dark panels; mixing them toward ink only washed them out. */
body[data-world-family][data-theme='dark'] { --accent-text: var(--nw-accent); }
body[data-visual-theme]:not([data-visual-theme=''])[data-paper='chalkboard'] #note-editor .inline-math.floating {
  background: rgb(255 255 255 / .07); border: 1px solid rgb(255 255 255 / .24); box-shadow: 0 2px 6px rgb(0 0 0 / .22);
}
/* Flashcards follow the same chalkboard rule: the light-scheme sheet/ink pair made their text
   vanish (dark on slate, or chalk on white). They take the slate and the board's chalk pen. */
body[data-visual-theme]:not([data-visual-theme=''])[data-paper='chalkboard'] #note-editor .board-object[data-kind='flashcard'] > .object-body {
  background: rgb(255 255 255 / .07); color: inherit; border-color: rgb(255 255 255 / .24); box-shadow: 0 2px 6px rgb(0 0 0 / .22);
}
/* Art Room: two strips of tape hold each Math scrap to the page. */
body[data-world-family='art-room'] #note-editor .inline-math.floating::before,
body[data-world-family='art-room'] #note-editor .inline-math.floating::after {
  content: ''; position: absolute; top: -7px; width: 30px; height: 13px; pointer-events: none;
  background: repeating-linear-gradient(90deg, rgb(255 255 255 / .13) 0 .5px, transparent .5px 3px), linear-gradient(180deg, rgb(255 255 255 / .2), transparent 40%, rgb(55 45 30 / .08)), color-mix(in srgb, var(--art-tape, #ece0b9) 88%, transparent);
  box-shadow: 0 1px 2px rgb(0 0 0 / .16);
  clip-path: polygon(1% 0, 99% 0, 97% 19%, 100% 41%, 98% 64%, 100% 87%, 98% 100%, 0 100%, 2% 76%, 0 53%, 3% 28%);
}
body[data-world-family='art-room'] #note-editor .inline-math.floating::before { left: 8px; transform: rotate(-6deg); }
body[data-world-family='art-room'] #note-editor .inline-math.floating::after { right: 8px; transform: rotate(5deg); }


/* V208.5 Hearts and Bows ------------------------------------------------------------
   Boutique stationery: three variants (Strawberry, Cherry Ribbon, Honey Tea) and three motif
   families, drawn by docs/world-art-v207.cjs. Ribbon: satin binding with square mitred
   corners on a 4px board radius and a narrow tail grip (no bow: owner, V216.1).
   Scallop: the paper's edge (dropped on phones, where the ribbon also halves). Heart: one
   margin heart every fourth rule, image-frame and study-card corners. The 2026-09-30 owner
   refinement warms the ivory textile. */
@media screen {
body[data-visual-theme='pastel-princess'][data-princess-motif='strawberry'] {
  --world-rail-top: url('./assets/worlds-v207/hearts-and-bows/strawberry/rail-top.svg'); --world-rail-bottom: url('./assets/worlds-v207/hearts-and-bows/strawberry/rail-bottom.svg');
  --world-rail-left: url('./assets/worlds-v207/hearts-and-bows/strawberry/rail-left.svg'); --world-rail-right: url('./assets/worlds-v207/hearts-and-bows/strawberry/rail-right.svg');
  --world-corner-tl: url('./assets/worlds-v207/hearts-and-bows/strawberry/corner-tl.svg'); --world-corner-tr: url('./assets/worlds-v207/hearts-and-bows/strawberry/corner-tr.svg');
  --world-corner-bl: url('./assets/worlds-v207/hearts-and-bows/strawberry/corner-bl.svg'); --world-corner-br: url('./assets/worlds-v207/hearts-and-bows/strawberry/corner-br.svg');
  --world-focal: url('./assets/worlds-v207/hearts-and-bows/strawberry/knot.svg'); --hearts-handle: url('./assets/worlds-v207/hearts-and-bows/strawberry/handle.svg');
  --princess-primary-motif: url('./assets/worlds-v207/hearts-and-bows/strawberry/accent-heart.svg'); --princess-secondary-motif: none;
  --princess-dot-grid: url('./assets/worlds-v207/hearts-and-bows/strawberry/dots.svg');
  --hearts-desk: #f3e9e3; --hearts-weave: #dcb9bf;
}
body[data-visual-theme='pastel-princess'][data-princess-motif='cherry-ribbon'] {
  --world-rail-top: url('./assets/worlds-v207/hearts-and-bows/cherry-ribbon/rail-top.svg'); --world-rail-bottom: url('./assets/worlds-v207/hearts-and-bows/cherry-ribbon/rail-bottom.svg');
  --world-rail-left: url('./assets/worlds-v207/hearts-and-bows/cherry-ribbon/rail-left.svg'); --world-rail-right: url('./assets/worlds-v207/hearts-and-bows/cherry-ribbon/rail-right.svg');
  --world-corner-tl: url('./assets/worlds-v207/hearts-and-bows/cherry-ribbon/corner-tl.svg'); --world-corner-tr: url('./assets/worlds-v207/hearts-and-bows/cherry-ribbon/corner-tr.svg');
  --world-corner-bl: url('./assets/worlds-v207/hearts-and-bows/cherry-ribbon/corner-bl.svg'); --world-corner-br: url('./assets/worlds-v207/hearts-and-bows/cherry-ribbon/corner-br.svg');
  --world-focal: url('./assets/worlds-v207/hearts-and-bows/cherry-ribbon/knot.svg'); --hearts-handle: url('./assets/worlds-v207/hearts-and-bows/cherry-ribbon/handle.svg');
  --princess-primary-motif: url('./assets/worlds-v207/hearts-and-bows/cherry-ribbon/accent-heart.svg'); --princess-secondary-motif: none;
  --princess-dot-grid: url('./assets/worlds-v207/hearts-and-bows/cherry-ribbon/dots.svg');
  --hearts-desk: #f3e6e3; --hearts-weave: #d9a6b0;
}
body[data-visual-theme='pastel-princess'][data-princess-motif='honey-tea'] {
  --world-rail-top: url('./assets/worlds-v207/hearts-and-bows/honey-tea/rail-top.svg'); --world-rail-bottom: url('./assets/worlds-v207/hearts-and-bows/honey-tea/rail-bottom.svg');
  --world-rail-left: url('./assets/worlds-v207/hearts-and-bows/honey-tea/rail-left.svg'); --world-rail-right: url('./assets/worlds-v207/hearts-and-bows/honey-tea/rail-right.svg');
  --world-corner-tl: url('./assets/worlds-v207/hearts-and-bows/honey-tea/corner-tl.svg'); --world-corner-tr: url('./assets/worlds-v207/hearts-and-bows/honey-tea/corner-tr.svg');
  --world-corner-bl: url('./assets/worlds-v207/hearts-and-bows/honey-tea/corner-bl.svg'); --world-corner-br: url('./assets/worlds-v207/hearts-and-bows/honey-tea/corner-br.svg');
  --world-focal: url('./assets/worlds-v207/hearts-and-bows/honey-tea/knot.svg'); --hearts-handle: url('./assets/worlds-v207/hearts-and-bows/honey-tea/handle.svg');
  --princess-primary-motif: url('./assets/worlds-v207/hearts-and-bows/honey-tea/accent-heart.svg'); --princess-secondary-motif: none;
  --princess-dot-grid: url('./assets/worlds-v207/hearts-and-bows/honey-tea/dots.svg');
  --hearts-desk: #f2eada; --hearts-weave: #d7bc8d;
}
body[data-visual-theme='pastel-princess'] .ink-stage { --world-board-radius: 0; }
body[data-visual-theme='pastel-princess']:not([data-readability='high']) .editor-scroll {
  background-color: var(--hearts-desk);
  background-image:
    radial-gradient(ellipse 90% 75% at 12% 0, rgb(255 253 241 / .72), transparent 72%),
    linear-gradient(125deg, transparent 45%, color-mix(in srgb, var(--hearts-weave) 20%, transparent) 85%),
    repeating-linear-gradient(0deg, rgb(255 255 255 / .16) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, color-mix(in srgb, var(--hearts-weave) 14%, transparent) 0 1px, transparent 1px 3px);
  background-size: auto;
  background-position: 0 0;
  background-repeat: no-repeat, no-repeat, repeat, repeat;
}
body[data-visual-theme='pastel-princess']:not([data-readability='high']) .world-surround > :is(.world-surround-left, .world-surround-right, .world-surround-upper, .world-surround-lower) { display: none; }
/* The ugly top knot and odd side strip are completely removed; Hearts and Bows is styled through boutique cardstock, tailored ribbon framing and editorial typography. */
body[data-visual-theme='pastel-princess'] .theme-frame-bow,
body[data-visual-theme='pastel-princess'][data-princess-motif] .theme-frame-bow { display: none !important; }
body[data-visual-theme='pastel-princess'] .board-resize-handle {
  bottom: -23px; width: 26px; height: 22px;
  background: var(--hearts-handle, url('./assets/worlds-v207/hearts-and-bows/strawberry/handle.svg')) center / contain no-repeat;
  filter: drop-shadow(0 2px 3px rgb(95 35 50 / .2));
}
body[data-visual-theme='pastel-princess'] .divider { background: color-mix(in srgb, var(--accent) 16%, #fff); }
body[data-visual-theme='pastel-princess'] .divider span { background: color-mix(in srgb, var(--accent) 55%, #fff); }
/* Ruled paper: a faint margin rule only (R5: the margin hearts repeated down the writing plane). */
body[data-visual-theme='pastel-princess'][data-paper='ruled'] .board-decoration::before {
  background: linear-gradient(90deg, transparent 5px, color-mix(in srgb, var(--princess-rule) 24%, transparent) 5px 7px, transparent 7px);
}
body[data-visual-theme='pastel-princess'][data-paper='ruled'] .board-decoration::after { content: none; }
@media (max-width: 600px) {
  body[data-visual-theme='pastel-princess'][data-princess-motif='strawberry'] {
    --world-rail-top: url('./assets/worlds-v207/hearts-and-bows/strawberry/rail-top-compact.svg'); --world-rail-bottom: url('./assets/worlds-v207/hearts-and-bows/strawberry/rail-bottom-compact.svg');
    --world-rail-left: url('./assets/worlds-v207/hearts-and-bows/strawberry/rail-left-compact.svg'); --world-rail-right: url('./assets/worlds-v207/hearts-and-bows/strawberry/rail-right-compact.svg');
    --world-corner-tl: url('./assets/worlds-v207/hearts-and-bows/strawberry/corner-tl-compact.svg'); --world-corner-tr: url('./assets/worlds-v207/hearts-and-bows/strawberry/corner-tr-compact.svg');
    --world-corner-bl: url('./assets/worlds-v207/hearts-and-bows/strawberry/corner-bl-compact.svg'); --world-corner-br: url('./assets/worlds-v207/hearts-and-bows/strawberry/corner-br-compact.svg');
  }
  body[data-visual-theme='pastel-princess'][data-princess-motif='cherry-ribbon'] {
    --world-rail-top: url('./assets/worlds-v207/hearts-and-bows/cherry-ribbon/rail-top-compact.svg'); --world-rail-bottom: url('./assets/worlds-v207/hearts-and-bows/cherry-ribbon/rail-bottom-compact.svg');
    --world-rail-left: url('./assets/worlds-v207/hearts-and-bows/cherry-ribbon/rail-left-compact.svg'); --world-rail-right: url('./assets/worlds-v207/hearts-and-bows/cherry-ribbon/rail-right-compact.svg');
    --world-corner-tl: url('./assets/worlds-v207/hearts-and-bows/cherry-ribbon/corner-tl-compact.svg'); --world-corner-tr: url('./assets/worlds-v207/hearts-and-bows/cherry-ribbon/corner-tr-compact.svg');
    --world-corner-bl: url('./assets/worlds-v207/hearts-and-bows/cherry-ribbon/corner-bl-compact.svg'); --world-corner-br: url('./assets/worlds-v207/hearts-and-bows/cherry-ribbon/corner-br-compact.svg');
  }
  body[data-visual-theme='pastel-princess'][data-princess-motif='honey-tea'] {
    --world-rail-top: url('./assets/worlds-v207/hearts-and-bows/honey-tea/rail-top-compact.svg'); --world-rail-bottom: url('./assets/worlds-v207/hearts-and-bows/honey-tea/rail-bottom-compact.svg');
    --world-rail-left: url('./assets/worlds-v207/hearts-and-bows/honey-tea/rail-left-compact.svg'); --world-rail-right: url('./assets/worlds-v207/hearts-and-bows/honey-tea/rail-right-compact.svg');
    --world-corner-tl: url('./assets/worlds-v207/hearts-and-bows/honey-tea/corner-tl-compact.svg'); --world-corner-tr: url('./assets/worlds-v207/hearts-and-bows/honey-tea/corner-tr-compact.svg');
    --world-corner-bl: url('./assets/worlds-v207/hearts-and-bows/honey-tea/corner-bl-compact.svg'); --world-corner-br: url('./assets/worlds-v207/hearts-and-bows/honey-tea/corner-br-compact.svg');
  }
  body[data-visual-theme='pastel-princess'] .theme-frame-bow,
  body[data-visual-theme='pastel-princess'][data-princess-motif] .theme-frame-bow { display: none !important; }
  body[data-visual-theme='pastel-princess'] .board-resize-handle { bottom: -21px; }
  body[data-visual-theme='pastel-princess']:not([data-readability='high'])[data-paper='ruled'] .board-decoration::after { left: 34px; }
}
}

/* Hearts night: a coquette study desk, warm stationery light on dusky rose linen.
   The appearance preference and all papers remain owned by ChalkThemes. */
@media screen {
body[data-visual-theme='pastel-princess'][data-princess-motif][data-theme='dark'] {
  color-scheme: dark;
  --princess-deep-berry: #f3dce5; --princess-control-ink: #f3dce5;
  --princess-control-line: #775965; --princess-control-line-strong: #d8a6ba; --princess-control-hover: #4b3842;
  --princess-pearl: #392d34; --princess-paper: #342b30; --princess-paper-alt: #372d32; --princess-chalk-surface: #30282d;
  --princess-shell: #2b2228; --princess-toolbar: #30262d; --princess-toolbar-end: #392d31;
  --princess-pane: #332930; --princess-workspace: #33272e; --princess-rule: #b38698;
  --princess-raspberry: #eda6c1; --princess-aqua: #34534e; --princess-candy-purple: #d0b7e8;
  --hearts-desk: #392d31; --hearts-weave: #845c6a;
  --paper: var(--princess-pearl); --panel: var(--princess-pane); --canvas: var(--princess-workspace);
  --depth: var(--princess-deep-berry); --sheet: var(--princess-paper); --panel-2: var(--princess-paper-alt); --shade: 0 0 0;
  --princess-buttercream: #514332; --princess-pistachio: #3b4a38; --princess-lavender: #483953;
  --flag-bad: #f6a9bf; --flag-warn: #d0b7e8; --flag-warn-deep: #d8c0ec;
  --ink: var(--princess-deep-berry); --muted: #cdb3c0; --line: var(--princess-control-line);
  --accent-ui: #e7abc3; --accent: var(--accent-ui); --accent-text: #efc4d4;
  --focus: #f1c0d3; --on-accent-ui: #31232b;
  --ui-action-paper: #9b536f; --ui-action-ink: #fff3df;
  --wc-key-bg: linear-gradient(180deg, #4a3641, #3d2d36); --wc-key-fn: linear-gradient(180deg, #543e47, #45313b);
  --wc-key-border: #916575; --wc-key-shadow: inset 0 1px 0 rgb(255 225 204 / .14), 0 2px 3px rgb(16 9 13 / .25);
  --wc-box-bg: #3c2e36; --wc-box-border: 1px solid #906675;
  color: var(--ink);
}
/* R3: each night desk has its own stock. Strawberry keeps a dusky blush card; Cherry a
   deeper wine card beneath tailored satin; Honey (below) a tea-brown linen paper. */
body[data-visual-theme='pastel-princess'][data-princess-motif='strawberry'][data-theme='dark'] {
  --princess-pearl: #40283a; --princess-paper: #3c2636; --princess-paper-alt: #402a39; --princess-chalk-surface: #33222e;
}
body[data-visual-theme='pastel-princess'][data-princess-motif='cherry-ribbon'][data-theme='dark'] {
  --hearts-desk: #35272d; --hearts-weave: #965b68; --princess-rule: #c38b9b;
  --princess-pearl: #2f1a20; --princess-paper: #2c171e; --princess-paper-alt: #301b22; --princess-chalk-surface: #28161c;
  --princess-pane: #2f2329; --princess-workspace: #2e2127; --princess-shell: #271c21;
  --princess-control-line: #74505c; --wc-box-bg: #3a2630; --wc-box-border: 1px solid #8a5466;
}
body[data-visual-theme='pastel-princess'][data-princess-motif='honey-tea'][data-theme='dark'] {
  --princess-deep-berry: #f4e5ce; --princess-control-ink: #f4e5ce; --princess-control-hover: #514231;
  --princess-pearl: #3d2f22; --princess-paper: #3a2c1f; --princess-paper-alt: #3e3023; --princess-chalk-surface: #33281d;
  --princess-shell: #29251f; --princess-toolbar: #302b25; --princess-toolbar-end: #393026;
  --princess-pane: #332d27; --princess-workspace: #302a23; --princess-rule: #bc9d6e;
  --hearts-desk: #393127; --hearts-weave: #92794d; --muted: #d1bea2; --accent-ui: #e9c98e; --accent-text: #f0d6aa;
  --princess-raspberry: #e2c38b; --princess-control-line: #7e6a4e; --princess-control-line-strong: #ccb07c;
  --ui-action-paper: #805d31; --ui-action-ink: #fff4dc;
  --wc-key-bg: linear-gradient(180deg, #4d4030, #3d3329); --wc-key-fn: linear-gradient(180deg, #574830, #45382b);
  --wc-key-border: #927b55; --wc-box-bg: #3c332b; --wc-box-border: 1px solid #927b55;
}
body[data-visual-theme='pastel-princess'][data-theme='dark'][data-paper='grid'] { --world-surface: var(--princess-paper-alt); }
/* Night stationery needs the same chalk lifts as the dark writing board. Keep
   these presentation inks local to the board, without changing saved pens. */
body[data-visual-theme='pastel-princess'][data-theme='dark'] #note-editor {
  --flag-warn-deep: color-mix(in srgb, var(--flag-warn) 40%, #fff3df);
  --princess-graph-0: color-mix(in oklab, var(--princess-candy-pink) 55%, #fff7e9);
  --princess-graph-1: color-mix(in oklab, var(--princess-candy-blue) 70%, #fff7e9);
  --princess-graph-2: color-mix(in oklab, var(--princess-candy-green) 70%, #fff7e9);
  --princess-graph-3: color-mix(in oklab, var(--princess-candy-purple) 55%, #fff7e9);
}
body[data-visual-theme='pastel-princess'][data-theme='dark'] .editor-scroll {
  background-image: radial-gradient(ellipse at 0 32%, rgb(255 204 124 / .18), transparent 58%), linear-gradient(120deg, #49383b, #2e282f 78%);
}
body[data-visual-theme='pastel-princess'][data-theme='dark'] :is(input:not([type='range']):not([type='color']):not([type='checkbox']):not([type='radio']), select, textarea, .workspace-tab, .ink-custom, .course-card-sheet) {
  color: var(--ink); background: var(--paper); border-color: var(--line);
}
body[data-visual-theme='pastel-princess'][data-theme='dark'] :is(.calc-index, .key) { color: var(--ink); }
body[data-visual-theme='pastel-princess'][data-theme='dark'] :is(.tool-library, .command-palette, .formula-guides, .modal) {
  background: linear-gradient(145deg, var(--paper), var(--panel));
  box-shadow: 0 12px 28px rgb(17 10 13 / .3), inset 0 0 0 1px var(--line);
}
body[data-visual-theme='pastel-princess'][data-theme='dark'] :is(.course-card-eyebrow, .course-card-label) { color: var(--muted); }
body[data-visual-theme='pastel-princess'][data-theme='dark'] :is(.lewis-palette, .skeletal-palette, .geo-palette, .chem-palette) button {
  color: var(--ink); background: var(--paper); border-color: var(--line);
}
body[data-visual-theme='pastel-princess'][data-theme='dark'] .dimensional-board button:disabled { color: var(--muted); background: var(--paper); }
body[data-visual-theme='pastel-princess'][data-theme='dark'] .formula-section > summary { background: var(--panel-2); }
/* Category chips remain pastel reference swatches, paired with their own dark
   ink rather than inheriting the surrounding night workspace's pale text. */
body[data-visual-theme='pastel-princess'][data-theme='dark'] :is(.ptable-cell, .ptable-key-chip) {
  --princess-buttercream: #fffcdf; --princess-pistachio: #edfde0; --princess-aqua: #defef9; --princess-lavender: #efe0fd;
  --muted: #684153; color: #4b1833;
}
body[data-visual-theme='pastel-princess'][data-theme='dark'] .brand-mark { background: var(--paper); box-shadow: inset 0 0 0 2px rgb(255 230 192 / .08), 0 2px 5px rgb(17 10 13 / .24); }
body[data-visual-theme='pastel-princess'][data-theme='dark'] .divider { background: var(--princess-pane); }
}

/* Verdict marks must stay legible on every dark board (they were near-invisible on
   Observatory night paper); hue keeps its meaning, lightness rises. */
body[data-theme='dark'] .check-badge.check-ok { color: color-mix(in srgb, var(--flag-ok) 55%, #ffffff); }
body[data-theme='dark'] .check-badge.check-bad { color: color-mix(in srgb, var(--flag-bad) 60%, #ffffff); }
body[data-theme='dark'] .check-badge.check-unknown { color: color-mix(in srgb, var(--n75, #999) 40%, #ffffff); }
body[data-theme='dark'] .check-badge:is(.check-narrowed, .check-oneway) { color: color-mix(in srgb, var(--flag-warn) 55%, #ffffff); }

/* V207 Heirloom Library -------------------------------------------------------------
   Owner direction (V207): the board reads as the right-hand page of an open leather-bound
   book. The cover becomes tooled leather (woven cloth for Forest Bookcloth) with a bevelled
   edge and double gilt rules (corner fleurons retired in R5); a silk bookmark hangs from the foot and a
   striped headband caps the spine. Page block, facing pages and writing plane unchanged. */
@media screen {
body[data-world-family='heirloom-library'] { --lib-grain: url('./assets/worlds-v207/heirloom-library/leather-grain.svg'); --lib-ribbon: #c9a45c; --lib-ribbon-dark: #8f6c2c; }
body[data-world-family='heirloom-library'][data-world-motif='midnight-library'] { --lib-ribbon: #9a3342; --lib-ribbon-dark: #5f1b26; }
body[data-world-family='heirloom-library'][data-world-motif='forest-bookcloth'] { --lib-grain: url('./assets/worlds-v207/heirloom-library/linen-weave.svg'); --lib-ribbon: #c9953c; --lib-ribbon-dark: #8a5f1d; }
body[data-world-family='heirloom-library'] .world-surround .world-surround-upper {
  background:
    radial-gradient(ellipse at 28% 18%, rgb(255 236 200 / .18), transparent 58%),
    linear-gradient(90deg, rgb(0 0 0 / .30), transparent 9%, transparent 95%, rgb(0 0 0 / .22)),
    var(--lib-grain) 0 0 / 220px 220px repeat,
    var(--lib-cloth);
  box-shadow: 1px 8px 14px rgb(26 18 17 / .30), inset 1px 1px 0 rgb(255 232 190 / .22), inset -1px -2px 0 rgb(0 0 0 / .28), inset 0 0 18px rgb(0 0 0 / .22);
}
/* Double gilt rule (R5: no corner fleurons). */
body[data-world-family='heirloom-library'] .world-surround-upper::after {
  inset: 7px; border: 1px solid color-mix(in srgb, var(--lib-foil) 86%, transparent); border-radius: 5px;
  outline: 1px solid color-mix(in srgb, var(--lib-foil) 60%, transparent); outline-offset: -4px;
  box-shadow: none;
}
/* Silk bookmark hanging from the foot of the book. */
body[data-world-family='heirloom-library'] .world-surround-upper::before {
  content: ''; position: absolute; right: 23%; bottom: -50px; width: 18px; height: 78px; pointer-events: none; transform: rotate(3deg); transform-origin: top center;
  background: linear-gradient(90deg, var(--lib-ribbon-dark), var(--lib-ribbon) 35%, color-mix(in srgb, var(--lib-ribbon) 70%, #fff) 50%, var(--lib-ribbon) 65%, var(--lib-ribbon-dark));
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 80%, 0 100%); filter: drop-shadow(1px 2px 1px rgb(20 12 8 / .3));
}
/* The facing page is one smooth curl into the gutter (no printed lines); the page block is a
   smooth fore-edge of fine graded page lines with one soft shadow, not stacked bevels. */
body[data-world-family='heirloom-library'] .world-surround .world-surround-lower {
  inset: -3px -6px -6px -3px; border: 0; border-radius: 3px 22px 22px 3px / 3px 19px 22px 3px; box-shadow: 1px 2px 4px rgb(22 17 13 / .2);
  background:
    linear-gradient(90deg, transparent calc(100% - 7px), rgb(40 28 18 / .1)),
    linear-gradient(180deg, transparent calc(100% - 7px), rgb(40 28 18 / .1)),
    /* R6: leaf lines at the faintest visible step, so the block reads as one smooth paper edge
       (straight stripes cannot follow the rounded corner and read there as stacked trays). */
    repeating-linear-gradient(90deg, var(--lib-leaf-line, color-mix(in srgb, var(--lib-page) 96%, var(--lib-shadow))) 0 .35px, transparent .35px 1.1px) right top / 6px 100% no-repeat,
    repeating-linear-gradient(180deg, var(--lib-leaf-line, color-mix(in srgb, var(--lib-page) 96%, var(--lib-shadow))) 0 .35px, transparent .35px 1.1px) left bottom / 100% 6px no-repeat,
    var(--lib-page);
}
body[data-world-family='heirloom-library'][data-theme='dark'] .world-surround .world-surround-upper { filter: brightness(.93); }
@media (max-width: 600px) {
  body[data-world-family='heirloom-library'] .world-surround-upper::after { inset: 5px; background-size: 14px 14px; }
  body[data-world-family='heirloom-library'] .world-surround-upper::before { bottom: -34px; height: 52px; width: 10px; }
}
}

/* V208.5 Art Room ------------------------------------------------------------------
   A designer's studio in three motif families (docs/world-art-v207.cjs): Masking tape (one
   short piece across each sheet corner, the Math-box strips and the grip), Drafting marks
   (crop marks, one registration target, a self-healing cutting mat in every variant, and the
   Blue Pencil ruler) and Pigment swatch (one strip of the variant's own muted pigments). The
   palette, brushes, pencil, paint tube, splatter, lino print and paper stamps are retired. */
@media screen {
body[data-world-family='art-room'][data-world-motif='gouache-garden'] {
  --world-rail-top: url('./assets/worlds-v207/art-room/gouache-garden/rail-top.svg'); --world-rail-bottom: url('./assets/worlds-v207/art-room/gouache-garden/rail-bottom.svg');
  --world-rail-left: url('./assets/worlds-v207/art-room/gouache-garden/rail-left.svg'); --world-rail-right: url('./assets/worlds-v207/art-room/gouache-garden/rail-right.svg');
  --world-corner-tl: url('./assets/worlds-v207/art-room/gouache-garden/corner-tl.svg'); --world-corner-tr: url('./assets/worlds-v207/art-room/gouache-garden/corner-tr.svg');
  --world-corner-bl: url('./assets/worlds-v207/art-room/gouache-garden/corner-bl.svg'); --world-corner-br: url('./assets/worlds-v207/art-room/gouache-garden/corner-br.svg');
  --art-swatch: url('./assets/worlds-v207/art-room/gouache-garden/swatch.svg'); --art-handle: url('./assets/worlds-v207/art-room/gouache-garden/handle.svg');
  --art-mat: #65806c; --art-tape: #ece0b9;
}
body[data-world-family='art-room'][data-world-motif='blue-pencil'] {
  --world-rail-top: url('./assets/worlds-v207/art-room/blue-pencil/rail-top.svg'); --world-rail-bottom: url('./assets/worlds-v207/art-room/blue-pencil/rail-bottom.svg');
  --world-rail-left: url('./assets/worlds-v207/art-room/blue-pencil/rail-left.svg'); --world-rail-right: url('./assets/worlds-v207/art-room/blue-pencil/rail-right.svg');
  --world-corner-tl: url('./assets/worlds-v207/art-room/blue-pencil/corner-tl.svg'); --world-corner-tr: url('./assets/worlds-v207/art-room/blue-pencil/corner-tr.svg');
  --world-corner-bl: url('./assets/worlds-v207/art-room/blue-pencil/corner-bl.svg'); --world-corner-br: url('./assets/worlds-v207/art-room/blue-pencil/corner-br.svg');
  --art-swatch: url('./assets/worlds-v207/art-room/blue-pencil/swatch.svg'); --art-handle: url('./assets/worlds-v207/art-room/blue-pencil/handle.svg');
  --art-mat: #4f6f86; --art-tape: #dde6e4;
}
body[data-world-family='art-room'][data-world-motif='terracotta-studio'] {
  --world-rail-top: url('./assets/worlds-v207/art-room/terracotta-studio/rail-top.svg'); --world-rail-bottom: url('./assets/worlds-v207/art-room/terracotta-studio/rail-bottom.svg');
  --world-rail-left: url('./assets/worlds-v207/art-room/terracotta-studio/rail-left.svg'); --world-rail-right: url('./assets/worlds-v207/art-room/terracotta-studio/rail-right.svg');
  --world-corner-tl: url('./assets/worlds-v207/art-room/terracotta-studio/corner-tl.svg'); --world-corner-tr: url('./assets/worlds-v207/art-room/terracotta-studio/corner-tr.svg');
  --world-corner-bl: url('./assets/worlds-v207/art-room/terracotta-studio/corner-bl.svg'); --world-corner-br: url('./assets/worlds-v207/art-room/terracotta-studio/corner-br.svg');
  --art-swatch: url('./assets/worlds-v207/art-room/terracotta-studio/swatch.svg'); --art-handle: url('./assets/worlds-v207/art-room/terracotta-studio/handle.svg');
  --art-mat: #b3806b; --art-tape: #ead3ae;
}
/* Owner material refinement, 2026-09-30: studio light, matte cutting surfaces,
   visible registration and pigment detail. The fitted sheet geometry stays fixed. */
body[data-world-family='art-room'] .editor-scroll {
  background-image: linear-gradient(125deg, rgb(255 253 239 / .32), transparent 58%), repeating-linear-gradient(90deg, transparent 0 141px, rgb(75 59 40 / .035) 142px 143px);
}
body[data-world-family='art-room'][data-theme='dark'] .editor-scroll {
  background-image: radial-gradient(ellipse at 0 0, rgb(245 216 167 / .13), transparent 65%), linear-gradient(135deg, rgb(10 19 29 / .3), transparent 72%, rgb(245 216 167 / .06));
}
body[data-world-family='art-room'][data-world-motif='gouache-garden'][data-theme='dark'] { --art-mat: #3f4b3e;
  --world-rail-top: url('./assets/worlds-v207/art-room/gouache-garden/rail-top-night.svg'); --world-rail-right: url('./assets/worlds-v207/art-room/gouache-garden/rail-right-night.svg'); --world-rail-bottom: url('./assets/worlds-v207/art-room/gouache-garden/rail-bottom-night.svg'); --world-rail-left: url('./assets/worlds-v207/art-room/gouache-garden/rail-left-night.svg'); --world-corner-tl: url('./assets/worlds-v207/art-room/gouache-garden/corner-tl-night.svg'); --world-corner-tr: url('./assets/worlds-v207/art-room/gouache-garden/corner-tr-night.svg'); --world-corner-bl: url('./assets/worlds-v207/art-room/gouache-garden/corner-bl-night.svg'); --world-corner-br: url('./assets/worlds-v207/art-room/gouache-garden/corner-br-night.svg'); }
body[data-world-family='art-room'][data-world-motif='gouache-garden'][data-paper='chalkboard'] {
  --world-rail-top: url('./assets/worlds-v207/art-room/gouache-garden/rail-top-chalk.svg'); --world-rail-right: url('./assets/worlds-v207/art-room/gouache-garden/rail-right-chalk.svg'); --world-rail-bottom: url('./assets/worlds-v207/art-room/gouache-garden/rail-bottom-chalk.svg'); --world-rail-left: url('./assets/worlds-v207/art-room/gouache-garden/rail-left-chalk.svg'); --world-corner-tl: url('./assets/worlds-v207/art-room/gouache-garden/corner-tl-chalk.svg'); --world-corner-tr: url('./assets/worlds-v207/art-room/gouache-garden/corner-tr-chalk.svg'); --world-corner-bl: url('./assets/worlds-v207/art-room/gouache-garden/corner-bl-chalk.svg'); --world-corner-br: url('./assets/worlds-v207/art-room/gouache-garden/corner-br-chalk.svg'); }
body[data-world-family='art-room'][data-world-motif='blue-pencil'][data-theme='dark'] { --art-mat: #324b5d; }
body[data-world-family='art-room'][data-world-motif='terracotta-studio'][data-theme='dark'] { --art-mat: #6c3e2b; }
/* A 24px mat (12px on phones); the ruler narrows with it and leaves narrow desks. */
body[data-world-family='art-room'][data-world-motif] { --art-outer-top: 24px; --art-outer-right: 24px; --art-outer-bottom: 24px; --art-outer-left: 24px; }
body[data-world-family='art-room'][data-world-motif='blue-pencil'] .world-surround-left { left: calc(3px - var(--art-outer-left)); width: 16px; }
body[data-world-family='art-room'][data-world-motif] .world-surround .world-surround-upper {
  background: linear-gradient(125deg, rgb(255 255 255 / .09), transparent 55%, rgb(0 0 0 / .1)), linear-gradient(90deg, rgb(255 255 255 / .22) 1px, transparent 1px) 0 0 / 120px 120px, linear-gradient(180deg, rgb(255 255 255 / .22) 1px, transparent 1px) 0 0 / 120px 120px, linear-gradient(90deg, rgb(255 255 255 / .12) 1px, transparent 1px) 0 0 / 24px 24px, linear-gradient(180deg, rgb(255 255 255 / .12) 1px, transparent 1px) 0 0 / 24px 24px, var(--art-mat);
  border-color: color-mix(in srgb, var(--art-mat) 78%, #000);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .22), 1px 6px 10px rgb(30 32 28 / .24);
}
/* Paired night materials replace the old blanket filter that hid studio details. */
body[data-world-family='art-room'][data-theme='dark'] :is(.world-surround-upper, .world-surround-lower, .world-surround-left) { filter: none; }
/* One strip of pigment chips below the sheet. Registration lives in the sheet's crop marks;
   the floating registration icon above the sheet was removed (owner review). */
body[data-world-family='art-room'][data-world-motif] .world-surround .world-surround-upper::before { content: none; }
body[data-world-family='art-room'][data-world-motif] .world-surround .world-surround-lower::after {
  content: ''; position: absolute; inset: auto; border: 0; box-shadow: none; clip-path: none; transform: none; pointer-events: none;
}
body[data-world-family='art-room'][data-world-motif] .world-surround .world-surround-lower::after {
  right: 56px; bottom: 3px; width: 125px; height: 19px; background: var(--art-swatch) center / contain no-repeat;
  box-shadow: 0 1px 2px rgb(20 25 20 / .24);
}
/* R6: the resize grip is a strip of tape across the sheet's bottom edge, holding it to the mat
   like the corner tapes (on the mat alone it held nothing). */
body[data-world-family='art-room'][data-world-motif] .board-resize-handle { bottom: -8px; background: var(--art-handle) center / contain no-repeat; }
body[data-world-family='art-room'][data-theme='dark'] .theme-frame { filter: brightness(.88) saturate(.85); }
body[data-world-family='art-room'] .world-night-light { display: none; }
/* R3c: the pre-R2 lamp strip no longer meets the widened mats and showed as a stray box; the
   studio light now lives in each night desk. */
body[data-world-family='art-room'][data-theme='dark'] .world-night-light { display: none; }
body[data-world-family='art-room'][data-theme='dark'] #note-editor .inline-math.floating::before,
body[data-world-family='art-room'][data-theme='dark'] #note-editor .inline-math.floating::after { opacity: .65; }
@container world-desk (max-width: 700px) {
  body[data-world-family='art-room'][data-world-motif='blue-pencil'] .world-surround-left { display: none; }
}
@media (max-width: 600px) {
  body[data-world-family='art-room'][data-world-motif] { --art-outer-top: 12px; --art-outer-right: 12px; --art-outer-bottom: 12px; --art-outer-left: 12px; }
  body[data-world-family='art-room'][data-world-motif] .world-surround .world-surround-lower::after { right: 28px; bottom: 1px; width: 76px; height: 11px; }
}
}

/* Owner motif distinction, 2026-09-30. Each variant has its own construction,
   material rhythm and light; the shared writing rectangle and controls stay fixed. */
@media screen {
/* Coquette boutique stationery: high-editorial typography, French cardstock folio, tailored satin & chamomile study desks. */
body[data-visual-theme='pastel-princess'] {
  --world-font-heading: 'Chalk Bodoni', 'Didot', 'Bodoni MT', serif;
  --world-font-navigation: 'Chalk Bodoni', 'Didot', 'Bodoni MT', serif;
}
body[data-visual-theme='pastel-princess'] .brand-heading a.brand {
  font-family: 'Chalk Bodoni', 'Didot', serif;
  letter-spacing: 0.08em;
  font-weight: 600;
}
body[data-visual-theme='pastel-princess'] .panel-title,
body[data-visual-theme='pastel-princess'] .dialog-title {
  font-family: 'Chalk Bodoni', 'Didot', serif;
  letter-spacing: 0.04em;
}
body[data-visual-theme='pastel-princess'] .workspace-tab {
  font-family: 'Chalk Bodoni', 'Didot', serif;
  letter-spacing: 0.03em;
  font-size: 14px;
  border-radius: 8px 8px 0 0;
  border: 1px solid rgb(215 165 180 / .35);
  border-bottom: none;
  background: linear-gradient(180deg, var(--paper), var(--panel));
  color: var(--ink); box-shadow: inset 0 1px 0 rgb(255 255 255 / .55), 2px 2px 0 color-mix(in srgb, var(--line) 45%, transparent);
}
body[data-visual-theme='pastel-princess'] .workspace-tab.active {
  background: var(--paper);
  border-color: rgb(195 110 135 / .45);
  box-shadow: 0 -2px 6px rgb(160 50 80 / .12);
}

/* Cardstock folio elevation */
body[data-visual-theme='pastel-princess'] .theme-frame {
  filter: drop-shadow(1px 4px 3px rgb(95 35 50 / .18)) drop-shadow(0 1px 1px rgb(95 35 50 / .12));
}
body[data-visual-theme='pastel-princess'][data-princess-motif='strawberry'] .theme-frame {
  filter: drop-shadow(1px 4px 3px rgb(110 40 60 / .19)) drop-shadow(0 1px 1px rgb(110 40 60 / .12));
}
body[data-visual-theme='pastel-princess'][data-princess-motif='cherry-ribbon'] .theme-frame {
  filter: drop-shadow(1px 4px 3px rgb(55 12 22 / .42)) drop-shadow(0 1px 1px rgb(55 12 22 / .26));
}
body[data-visual-theme='pastel-princess'][data-princess-motif='honey-tea'] .theme-frame {
  filter: drop-shadow(1px 4px 3px rgb(95 65 25 / .22)) drop-shadow(0 1px 1px rgb(95 65 25 / .14));
}

/* Strawberry Cream: French painted ivory writing desk with soft rose ambient illumination */
body[data-visual-theme='pastel-princess'][data-princess-motif='strawberry']:not([data-theme='dark']) .editor-scroll {
  background-color: #f6eee9;
  background-image:
    radial-gradient(ellipse at 50% 12%, rgb(255 253 250 / .96), transparent 64%),
    repeating-linear-gradient(0deg, rgb(218 185 195 / .06) 0 2px, transparent 2px 8px),
    repeating-linear-gradient(90deg, rgb(218 185 195 / .06) 0 2px, transparent 2px 8px),
    linear-gradient(130deg, #faf3ee, #edd7ce);
  background-size: 100% 100%, 100% 100%, 100% 100%, 100% 100%;
}
/* Night: a blush painted bureau dressed in dotted swiss under pearl lights and moonlight. */
body[data-visual-theme='pastel-princess'][data-princess-motif='strawberry'][data-theme='dark'] .editor-scroll {
  background-color: #2a1b23;
  background-image:
    radial-gradient(ellipse 900px 420px at 50% 4%, rgb(255 218 196 / .17), transparent 70%),
    radial-gradient(ellipse 55% 70% at 0 0, rgb(214 198 236 / .10), transparent 72%),
    radial-gradient(circle at 25% 25%, rgb(255 224 238 / .13) 0 .9px, transparent 1.4px),
    radial-gradient(circle at 75% 75%, rgb(255 224 238 / .13) 0 .9px, transparent 1.4px),
    linear-gradient(125deg, #3a2330, #1d1018);
  background-size: 100% 100%, 100% 100%, 14px 14px, 14px 14px, 100% 100%;
  background-repeat: no-repeat, no-repeat, repeat, repeat, no-repeat;
}

/* R6: Cherry's light panel is blush stock a step deeper than its paper, so it sits with the
   cherrywood bureau instead of floating pale beside it. */
body[data-visual-theme='pastel-princess'][data-princess-motif='cherry-ribbon']:not([data-theme='dark']) { --panel: #f5e1e5; --panel-2: #efd3d9; }
/* Cherry Ribbon: Lana Del Rey dark cherrywood study desk with rich mahogany grain & candlelight warmth */
body[data-visual-theme='pastel-princess'][data-princess-motif='cherry-ribbon']:not([data-theme='dark']) .editor-scroll {
  /* Owner (2026-10-04): a pale polished cherrywood, so the light desk agrees with the blush
     panel instead of a near-black mahogany beside it. */
  background-color: #d8b6b2;
  background-image: radial-gradient(ellipse 900px 520px at 50% 16%, rgb(255 244 236 / .5), transparent 70%), url('./assets/worlds-v207/wood-grain.svg'), linear-gradient(120deg, #e4c6c1, #c79d9b);
  background-size: 100% 100%, 576px 240px, 100% 100%;
}
/* Night: polished mahogany; a low candle pool and a lacquer sheen catch the grain. */
body[data-visual-theme='pastel-princess'][data-princess-motif='cherry-ribbon'][data-theme='dark'] .editor-scroll {
  background-color: #1f0b13;
  background-image:
    radial-gradient(ellipse 620px 360px at 96% 100%, rgb(255 168 104 / .22), transparent 72%),
    radial-gradient(ellipse 900px 460px at 50% 6%, rgb(255 190 140 / .15), transparent 70%),
    linear-gradient(104deg, transparent 30%, rgb(255 214 190 / .05) 38%, transparent 46%),
    url('./assets/worlds-v207/wood-grain.svg'),
    linear-gradient(120deg, #3a1120, #13040a);
  background-size: 100% 100%, 100% 100%, 100% 100%, 576px 240px, 100% 100%;
  background-repeat: no-repeat, no-repeat, no-repeat, repeat, no-repeat;
}

/* Honey Tea: Sunlit golden chamomile writing table with honey oak warmth & amber rays */
body[data-visual-theme='pastel-princess'][data-princess-motif='honey-tea']:not([data-theme='dark']) .editor-scroll {
  background-color: #f1e1be;
  background-image: radial-gradient(ellipse 900px 520px at 50% 16%, rgb(255 205 110 / .5), transparent 72%), url('./assets/worlds-v207/wood-grain.svg'), linear-gradient(125deg, #faefd5, #e3c99e);
  background-size: 100% 100%, 384px 160px, 100% 100%;
}
body[data-visual-theme='pastel-princess'][data-princess-motif='honey-tea'][data-theme='dark'] .editor-scroll {
  background-color: #23160b;
  background-image: radial-gradient(ellipse 900px 520px at 50% 16%, rgb(255 205 110 / .25), transparent 72%), url('./assets/worlds-v207/wood-grain.svg'), linear-gradient(125deg, #341f0f, #140c06);
  background-size: 100% 100%, 384px 160px, 100% 100%;
}

body[data-visual-theme='pastel-princess'][data-princess-motif='cherry-ribbon'] { --wc-key-radius: 5px; }
body[data-visual-theme='pastel-princess'][data-princess-motif='honey-tea'] { --wc-key-radius: 8px; }

/* The ugly bow and the odd strip of gingham on the right are permanently removed */
body[data-visual-theme='pastel-princess'] .theme-frame-bow,
body[data-visual-theme='pastel-princess'][data-princess-motif] .theme-frame-bow { display: none !important; }
body[data-visual-theme='pastel-princess'] .world-surround > .world-surround-right,
body[data-visual-theme='pastel-princess'][data-princess-motif] .world-surround > .world-surround-right { display: none !important; }

/* Dyed night bindings retain every motif and the same fitted geometry. */
body[data-visual-theme='pastel-princess'][data-princess-motif='strawberry'][data-theme='dark'] {
  --world-rail-top: url('./assets/worlds-v207/hearts-and-bows/strawberry/rail-top-night.svg');
  --world-rail-bottom: url('./assets/worlds-v207/hearts-and-bows/strawberry/rail-bottom-night.svg');
  --world-rail-left: url('./assets/worlds-v207/hearts-and-bows/strawberry/rail-left-night.svg');
  --world-rail-right: url('./assets/worlds-v207/hearts-and-bows/strawberry/rail-right-night.svg');
  --world-corner-tl: url('./assets/worlds-v207/hearts-and-bows/strawberry/corner-tl-night.svg');
  --world-corner-tr: url('./assets/worlds-v207/hearts-and-bows/strawberry/corner-tr-night.svg');
  --world-corner-bl: url('./assets/worlds-v207/hearts-and-bows/strawberry/corner-bl-night.svg');
  --world-corner-br: url('./assets/worlds-v207/hearts-and-bows/strawberry/corner-br-night.svg');
}
body[data-visual-theme='pastel-princess'][data-princess-motif='cherry-ribbon'][data-theme='dark'] {
  --world-rail-top: url('./assets/worlds-v207/hearts-and-bows/cherry-ribbon/rail-top-night.svg');
  --world-rail-bottom: url('./assets/worlds-v207/hearts-and-bows/cherry-ribbon/rail-bottom-night.svg');
  --world-rail-left: url('./assets/worlds-v207/hearts-and-bows/cherry-ribbon/rail-left-night.svg');
  --world-rail-right: url('./assets/worlds-v207/hearts-and-bows/cherry-ribbon/rail-right-night.svg');
  --world-corner-tl: url('./assets/worlds-v207/hearts-and-bows/cherry-ribbon/corner-tl-night.svg');
  --world-corner-tr: url('./assets/worlds-v207/hearts-and-bows/cherry-ribbon/corner-tr-night.svg');
  --world-corner-bl: url('./assets/worlds-v207/hearts-and-bows/cherry-ribbon/corner-bl-night.svg');
  --world-corner-br: url('./assets/worlds-v207/hearts-and-bows/cherry-ribbon/corner-br-night.svg');
}
body[data-visual-theme='pastel-princess'][data-princess-motif='honey-tea'][data-theme='dark'] {
  --world-rail-top: url('./assets/worlds-v207/hearts-and-bows/honey-tea/rail-top-night.svg');
  --world-rail-bottom: url('./assets/worlds-v207/hearts-and-bows/honey-tea/rail-bottom-night.svg');
  --world-rail-left: url('./assets/worlds-v207/hearts-and-bows/honey-tea/rail-left-night.svg');
  --world-rail-right: url('./assets/worlds-v207/hearts-and-bows/honey-tea/rail-right-night.svg');
  --world-corner-tl: url('./assets/worlds-v207/hearts-and-bows/honey-tea/corner-tl-night.svg');
  --world-corner-tr: url('./assets/worlds-v207/hearts-and-bows/honey-tea/corner-tr-night.svg');
  --world-corner-bl: url('./assets/worlds-v207/hearts-and-bows/honey-tea/corner-bl-night.svg');
  --world-corner-br: url('./assets/worlds-v207/hearts-and-bows/honey-tea/corner-br-night.svg');
}
@media (max-width: 600px) {
body[data-visual-theme='pastel-princess'][data-princess-motif='strawberry'][data-theme='dark'] {
  --world-rail-top: url('./assets/worlds-v207/hearts-and-bows/strawberry/rail-top-night-compact.svg');
  --world-rail-bottom: url('./assets/worlds-v207/hearts-and-bows/strawberry/rail-bottom-night-compact.svg');
  --world-rail-left: url('./assets/worlds-v207/hearts-and-bows/strawberry/rail-left-night-compact.svg');
  --world-rail-right: url('./assets/worlds-v207/hearts-and-bows/strawberry/rail-right-night-compact.svg');
  --world-corner-tl: url('./assets/worlds-v207/hearts-and-bows/strawberry/corner-tl-night-compact.svg');
  --world-corner-tr: url('./assets/worlds-v207/hearts-and-bows/strawberry/corner-tr-night-compact.svg');
  --world-corner-bl: url('./assets/worlds-v207/hearts-and-bows/strawberry/corner-bl-night-compact.svg');
  --world-corner-br: url('./assets/worlds-v207/hearts-and-bows/strawberry/corner-br-night-compact.svg');
}
body[data-visual-theme='pastel-princess'][data-princess-motif='cherry-ribbon'][data-theme='dark'] {
  --world-rail-top: url('./assets/worlds-v207/hearts-and-bows/cherry-ribbon/rail-top-night-compact.svg');
  --world-rail-bottom: url('./assets/worlds-v207/hearts-and-bows/cherry-ribbon/rail-bottom-night-compact.svg');
  --world-rail-left: url('./assets/worlds-v207/hearts-and-bows/cherry-ribbon/rail-left-night-compact.svg');
  --world-rail-right: url('./assets/worlds-v207/hearts-and-bows/cherry-ribbon/rail-right-night-compact.svg');
  --world-corner-tl: url('./assets/worlds-v207/hearts-and-bows/cherry-ribbon/corner-tl-night-compact.svg');
  --world-corner-tr: url('./assets/worlds-v207/hearts-and-bows/cherry-ribbon/corner-tr-night-compact.svg');
  --world-corner-bl: url('./assets/worlds-v207/hearts-and-bows/cherry-ribbon/corner-bl-night-compact.svg');
  --world-corner-br: url('./assets/worlds-v207/hearts-and-bows/cherry-ribbon/corner-br-night-compact.svg');
}
body[data-visual-theme='pastel-princess'][data-princess-motif='honey-tea'][data-theme='dark'] {
  --world-rail-top: url('./assets/worlds-v207/hearts-and-bows/honey-tea/rail-top-night-compact.svg');
  --world-rail-bottom: url('./assets/worlds-v207/hearts-and-bows/honey-tea/rail-bottom-night-compact.svg');
  --world-rail-left: url('./assets/worlds-v207/hearts-and-bows/honey-tea/rail-left-night-compact.svg');
  --world-rail-right: url('./assets/worlds-v207/hearts-and-bows/honey-tea/rail-right-night-compact.svg');
  --world-corner-tl: url('./assets/worlds-v207/hearts-and-bows/honey-tea/corner-tl-night-compact.svg');
  --world-corner-tr: url('./assets/worlds-v207/hearts-and-bows/honey-tea/corner-tr-night-compact.svg');
  --world-corner-bl: url('./assets/worlds-v207/hearts-and-bows/honey-tea/corner-bl-night-compact.svg');
  --world-corner-br: url('./assets/worlds-v207/hearts-and-bows/honey-tea/corner-br-night-compact.svg');
}
}

/* Seasonal ecology desks: fresh linen, sunlit oak, warm walnut, bleached wood. The twig
   lattice keeps the one crisp contact shadow set in the screen block above, day and night. */
body[data-visual-theme='field-journal'][data-field-season='spring']:not([data-theme='dark']) .editor-scroll {
  background-color: #d6d1bf;
  background-image: linear-gradient(115deg, rgb(255 255 242 / .28), rgb(235 240 220 / .14) 48%, rgb(95 125 80 / .14)), var(--ff-desk);
  background-size: auto, 560px 560px; background-blend-mode: multiply, normal;
}
body[data-visual-theme='field-journal'][data-field-season='summer']:not([data-theme='dark']) .editor-scroll {
  background-color: #b9a480;
  background-image: linear-gradient(130deg, rgb(255 248 226 / .38), rgb(222 205 170 / .2) 55%, rgb(96 78 46 / .18)), var(--ff-desk);
  background-size: auto, 760px 760px; background-blend-mode: multiply, normal;
}
body[data-visual-theme='field-journal'][data-field-season='autumn']:not([data-theme='dark']) .editor-scroll {
  background-color: #553723;
  background-image: linear-gradient(115deg, rgb(165 110 65 / .24), rgb(80 48 28 / .3) 60%, rgb(42 24 14 / .4)), var(--ff-desk);
  background-size: auto, 500px 500px; background-blend-mode: overlay, normal;
}
body[data-visual-theme='field-journal'][data-field-season='winter']:not([data-theme='dark']) .editor-scroll {
  background-color: #5c6c70;
  background-image: linear-gradient(115deg, rgb(220 234 235 / .22), rgb(125 148 152 / .15) 55%, rgb(35 52 58 / .3)), var(--ff-desk);
  background-size: auto, 680px 680px; background-blend-mode: overlay, normal;
}
body[data-visual-theme='field-journal'][data-field-season='spring'][data-theme='dark'] .editor-scroll {
  background-color: #1a2e24;
  background-image: radial-gradient(circle at 48px 148px, rgb(247 207 126 / .16), transparent 380px), radial-gradient(circle at calc(100% - 48px) 148px, rgb(247 207 126 / .16), transparent 380px), linear-gradient(rgb(22 42 32 / .80), rgb(22 42 32 / .80)), var(--ff-desk);
  background-blend-mode: screen, screen, normal, normal;
  background-size: auto, auto, auto, 760px 760px;
}
body[data-visual-theme='field-journal'][data-field-season='summer'][data-theme='dark'] .editor-scroll {
  background-color: #2b2216;
  background-image: radial-gradient(circle at 48px 148px, rgb(249 190 100 / .18), transparent 420px), radial-gradient(circle at calc(100% - 48px) 148px, rgb(249 190 100 / .18), transparent 420px), linear-gradient(rgb(40 32 20 / .78), rgb(40 32 20 / .78)), var(--ff-desk);
  background-blend-mode: screen, screen, normal, normal;
  background-size: auto, auto, auto, 700px 700px;
}
body[data-visual-theme='field-journal'][data-field-season='autumn'][data-theme='dark'] .editor-scroll {
  background-color: #2a1c13;
  background-image: radial-gradient(circle at 48px 148px, rgb(255 177 84 / .20), transparent 420px), radial-gradient(circle at calc(100% - 48px) 148px, rgb(255 177 84 / .20), transparent 420px), linear-gradient(rgb(42 26 16 / .80), rgb(42 26 16 / .80)), var(--ff-desk);
  background-blend-mode: screen, screen, normal, normal;
  background-size: auto, auto, auto, 500px 500px;
}
body[data-visual-theme='field-journal'][data-field-season='winter'][data-theme='dark'] .editor-scroll {
  background-color: #18262a;
  background-image: radial-gradient(circle at 48px 148px, rgb(246 211 151 / .16), transparent 380px), radial-gradient(circle at calc(100% - 48px) 148px, rgb(246 211 151 / .16), transparent 380px), linear-gradient(rgb(20 34 38 / .83), rgb(20 34 38 / .83)), var(--ff-desk);
  background-blend-mode: screen, screen, normal, normal;
  background-size: auto, auto, auto, 680px 680px;
}

/* Field's twig lattice uses the shared 64px rail; its paper keeps square corners under the laths. */
body[data-visual-theme='field-journal'] .ink-stage { --world-board-radius: 0; }
/* The desk texture repeats as a seamless tile; an earlier four-layer rule had left it
   no-repeat, so each tile ended in a visible rectangle beside the frame. */
body[data-visual-theme='field-journal'][data-field-season]:not([data-theme='dark']) .editor-scroll { background-repeat: no-repeat, repeat; }
body[data-visual-theme='field-journal'][data-field-season][data-theme='dark'] .editor-scroll { background-repeat: no-repeat, no-repeat, no-repeat, repeat; }

/* Three bindings: gilt leather tooling, silver geometric tooling, woven laurels. The page rim
   casts no drop shadow: shadowing a thin ring painted offset copies that read as stacked boards. */
body[data-world-family='heirloom-library'] .theme-frame { filter: none; }

body[data-world-family='heirloom-library'][data-world-motif='oxblood-ivory'] .world-surround-upper::after { border-width: 2px; outline-offset: -6px; background-size: 18px 18px; }
body[data-world-family='heirloom-library'][data-world-motif='midnight-library'] .world-surround-upper::after { border-radius: 0; outline-offset: -7px; background-size: 28px 28px; }
body[data-world-family='heirloom-library'][data-world-motif='midnight-library'] .world-surround-upper::before { right: auto; left: 18%; width: 14px; transform: rotate(-3deg); }
body[data-world-family='heirloom-library'][data-world-motif='forest-bookcloth'] .world-surround .world-surround-upper {
  background: linear-gradient(90deg, rgb(0 0 0 / .25), transparent 8%, transparent 94%, rgb(0 0 0 / .2)), var(--lib-grain) 0 0 / 64px 64px repeat, var(--lib-cloth);
}
body[data-world-family='heirloom-library'][data-world-motif='forest-bookcloth'] .world-surround-upper::after { border-style: dashed; outline: none; background-size: 28px 28px; }
body[data-world-family='heirloom-library'][data-world-motif='forest-bookcloth'] .world-surround-upper::before { right: 42%; width: 16px; background: repeating-linear-gradient(0deg, rgb(255 235 180 / .26) 0 1px, transparent 1px 3px), var(--lib-ribbon); }

body[data-world-family='heirloom-library'][data-world-motif='oxblood-ivory'] .editor-scroll {
  background-color: #493327;
  background-image: radial-gradient(ellipse 860px 520px at 24% 12%, rgb(255 218 140 / .3), transparent 72%), url('./assets/worlds-v207/wood-grain.svg'), linear-gradient(115deg, #76553d, #32231e);
  background-size: 100% 100%, 576px 240px, 100% 100%;
}
body[data-world-family='heirloom-library'][data-world-motif='oxblood-ivory'][data-theme='dark'] .editor-scroll {
  background-color: #1b1411;
  background-image: radial-gradient(ellipse 860px 520px at 24% 12%, rgb(255 218 140 / .24), transparent 72%), url('./assets/worlds-v207/wood-grain.svg'), linear-gradient(115deg, #2c1c17, #100e0d);
  background-size: 100% 100%, 576px 240px, 100% 100%;
}
body[data-world-family='heirloom-library'][data-world-motif='midnight-library'] .editor-scroll {
  background-color: #493327;
  background-image: radial-gradient(ellipse 860px 520px at 24% 12%, rgb(255 238 214 / .26), transparent 72%), url('./assets/worlds-v207/wood-grain.svg'), linear-gradient(115deg, #76553d, #32231e);
  background-size: 100% 100%, 576px 240px, 100% 100%;
}
body[data-world-family='heirloom-library'][data-world-motif='midnight-library'][data-theme='dark'] .editor-scroll {
  background-color: #1b1411;
  background-image: radial-gradient(ellipse 860px 520px at 24% 12%, rgb(190 220 255 / .24), transparent 72%), url('./assets/worlds-v207/wood-grain.svg'), linear-gradient(115deg, #2c1c17, #100e0d);
  background-size: 100% 100%, 576px 240px, 100% 100%;
}
body[data-world-family='heirloom-library'][data-world-motif='forest-bookcloth'] .editor-scroll {
  background-color: #493327;
  background-image: radial-gradient(ellipse 860px 520px at 24% 12%, rgb(255 218 140 / .3), transparent 72%), url('./assets/worlds-v207/wood-grain.svg'), linear-gradient(115deg, #76553d, #32231e);
  background-size: 100% 100%, 576px 240px, 100% 100%;
}
body[data-world-family='heirloom-library'][data-world-motif='forest-bookcloth'][data-theme='dark'] .editor-scroll {
  background-color: #1b1411;
  background-image: radial-gradient(ellipse 860px 520px at 24% 12%, rgb(255 218 140 / .24), transparent 72%), url('./assets/worlds-v207/wood-grain.svg'), linear-gradient(115deg, #2c1c17, #100e0d);
  background-size: 100% 100%, 576px 240px, 100% 100%;
}
body[data-world-family='heirloom-library'][data-world-motif='oxblood-ivory'] .world-surround .world-surround-upper { border-radius: 13px 9px 9px 13px; }
body[data-world-family='heirloom-library'][data-world-motif='midnight-library'] .world-surround .world-surround-upper { border-radius: 5px; }
body[data-world-family='heirloom-library'][data-world-motif='forest-bookcloth'] .world-surround .world-surround-upper { border-radius: 8px 4px 4px 8px; }
/* Warm reading light catches the cover edge, leaving the page and its ink alone. */
body[data-world-family='heirloom-library'][data-theme='dark'] .world-surround .world-surround-upper { box-shadow: 2px 8px 16px rgb(10 8 8 / .4), inset 2px 1px 1px rgb(255 219 155 / .4), inset -1px -2px 1px rgb(0 0 0 / .3); }

/* Instrument, chart folio and copper rim: distinct desks beneath the same charts. */
body[data-world-family='observatory'] .theme-frame { filter: drop-shadow(1px 4px 3px rgb(12 20 32 / .40)) drop-shadow(0 1px 1px rgb(12 20 32 / .25)); }
body[data-world-family='observatory'][data-world-motif='lunar-atlas'] .theme-frame { filter: drop-shadow(1px 4px 3px rgb(12 25 38 / .42)) drop-shadow(0 1px 1px rgb(12 25 38 / .25)); }
body[data-world-family='observatory'][data-world-motif='constellation-study'] .theme-frame { filter: drop-shadow(1px 4px 3px rgb(10 12 24 / .38)) drop-shadow(0 1px 1px rgb(10 12 24 / .24)); }
body[data-world-family='observatory'][data-world-motif='solar-observatory'] .theme-frame { filter: drop-shadow(1px 4px 3px rgb(40 20 8 / .42)) drop-shadow(0 1px 1px rgb(40 20 8 / .26)); }

body[data-world-family='observatory'][data-world-motif='lunar-atlas'] .editor-scroll {
  background-color: #252e3a;
  background-image: radial-gradient(ellipse at 12% 8%, rgb(210 232 244 / .17), transparent 62%), repeating-radial-gradient(circle at 20% 260px, transparent 0 69px, rgb(186 211 226 / .09) 70px 70.8px, transparent 71.5px 105px);
  background-size: 100% 100%;
}
body[data-world-family='observatory'][data-world-motif='lunar-atlas'][data-theme='dark'] .editor-scroll {
  background-color: #121822;
  background-image: radial-gradient(ellipse at 12% 8%, rgb(160 195 220 / .12), transparent 62%), repeating-radial-gradient(circle at 20% 260px, transparent 0 69px, rgb(150 185 215 / .08) 70px 70.8px, transparent 71.5px 105px);
  background-size: 100% 100%;
}
body[data-world-family='observatory'][data-world-motif='constellation-study'] .editor-scroll {
  background-color: #1a1b2e;
  background-image: radial-gradient(circle at 18% 12%, rgb(150 170 235 / .18), transparent 48%),
                    radial-gradient(circle at 82% 82%, rgb(130 150 215 / .14), transparent 45%),
                    linear-gradient(135deg, transparent 49.5%, rgb(180 200 245 / .09) 50%, transparent 50.5%),
                    linear-gradient(45deg, transparent 49.5%, rgb(180 200 245 / .09) 50%, transparent 50.5%),
                    radial-gradient(circle, rgb(190 210 250 / .10) 1px, transparent 1.5px);
  background-size: 100% 100%, 100% 100%, 192px 192px, 192px 192px, 48px 48px;
}
body[data-world-family='observatory'][data-world-motif='constellation-study'][data-theme='dark'] .editor-scroll {
  background-color: #0c0e18;
  background-image: radial-gradient(circle at 18% 12%, rgb(130 150 220 / .14), transparent 48%),
                    radial-gradient(circle at 82% 82%, rgb(110 130 200 / .10), transparent 45%),
                    linear-gradient(135deg, transparent 49.5%, rgb(160 185 235 / .07) 50%, transparent 50.5%),
                    linear-gradient(45deg, transparent 49.5%, rgb(160 185 235 / .07) 50%, transparent 50.5%),
                    radial-gradient(circle, rgb(170 195 240 / .08) 1px, transparent 1.5px);
  background-size: 100% 100%, 100% 100%, 192px 192px, 192px 192px, 48px 48px;
}
body[data-world-family='observatory'][data-world-motif='solar-observatory'] .editor-scroll {
  background-color: #2b1d14;
  background-image: radial-gradient(ellipse at 88% 6%, rgb(245 170 85 / .26), transparent 58%),
                    radial-gradient(circle at 50% 50%, transparent 120px, rgb(225 155 85 / .10) 121px, transparent 122px),
                    linear-gradient(90deg, rgb(225 155 85 / .11) 1px, transparent 1px),
                    linear-gradient(180deg, rgb(225 155 85 / .11) 1px, transparent 1px);
  background-size: 100% 100%, 360px 360px, 72px 72px, 72px 72px;
}
body[data-world-family='observatory'][data-world-motif='solar-observatory'][data-theme='dark'] .editor-scroll {
  background-color: #19100a;
  background-image: radial-gradient(ellipse at 88% 6%, rgb(235 150 65 / .20), transparent 58%),
                    radial-gradient(circle at 50% 50%, transparent 120px, rgb(215 140 70 / .08) 121px, transparent 122px),
                    linear-gradient(90deg, rgb(215 140 70 / .08) 1px, transparent 1px),
                    linear-gradient(180deg, rgb(215 140 70 / .08) 1px, transparent 1px);
  background-size: 100% 100%, 360px 360px, 72px 72px, 72px 72px;
}

/* Art Room: precision drafting, print registration, pigment-led paper craft. */
body[data-world-family='art-room'] .theme-frame { filter: drop-shadow(1px 4px 3px rgb(20 25 30 / .30)) drop-shadow(0 1px 1px rgb(20 25 30 / .18)); }
body[data-world-family='art-room'][data-world-motif='blue-pencil'] .theme-frame { filter: drop-shadow(1px 4px 3px rgb(15 28 40 / .38)) drop-shadow(0 1px 1px rgb(15 28 40 / .24)); }
body[data-world-family='art-room'][data-world-motif='terracotta-studio'] .theme-frame { filter: drop-shadow(1px 4px 3px rgb(45 25 16 / .36)) drop-shadow(0 1px 1px rgb(45 25 16 / .22)); }
body[data-world-family='art-room'][data-world-motif='gouache-garden'] .theme-frame { filter: drop-shadow(1px 4px 3px rgb(20 38 25 / .32)) drop-shadow(0 1px 1px rgb(20 38 25 / .20)); }

body[data-world-family='art-room'][data-world-motif='blue-pencil']:not([data-theme='dark']) .editor-scroll {
  /* R6: a grey-blue drafting table, so the desk agrees with the cool chrome and panel. */
  background-color: #d2d9db;
  background-image: radial-gradient(ellipse at 10% 0, rgb(250 253 255 / .6), transparent 65%), url('./assets/worlds-v207/wood-grain.svg'), linear-gradient(115deg, #e3e8e9, #bcc6c9);
  background-size: 100% 100%, 576px 240px, 100% 100%;
}
body[data-world-family='art-room'][data-world-motif='blue-pencil'][data-theme='dark'] .editor-scroll {
  background-color: #0d161e;
  background-image:
    radial-gradient(ellipse 900px 520px at 50% 16%, rgb(255 240 200 / .20), rgb(120 170 220 / .08) 45%, transparent 75%),
    url('./assets/worlds-v207/wood-grain.svg'),
    linear-gradient(125deg, #162432, #081016);
  background-size: 100% 100%, 576px 240px, 100% 100%;
}
body[data-world-family='art-room'][data-world-motif='terracotta-studio']:not([data-theme='dark']) .editor-scroll {
  background-color: #b5a291;
  background-image: radial-gradient(ellipse at 10% 0, rgb(255 238 212 / .35), transparent 65%), url('./assets/worlds-v207/wood-grain.svg'), linear-gradient(115deg, #c7b5a2, #8b7769);
  background-size: 100% 100%, 576px 240px, 100% 100%;
}
body[data-world-family='art-room'][data-world-motif='terracotta-studio'][data-theme='dark'] .editor-scroll {
  background-color: #1c110a;
  background-image:
    radial-gradient(ellipse 900px 520px at 50% 16%, rgb(255 210 160 / .22), rgb(170 90 40 / .08) 45%, transparent 75%),
    linear-gradient(125deg, #2e1b12, #120905);
  background-size: 100% 100%, 100% 100%;
}
body[data-world-family='art-room'][data-world-motif='gouache-garden']:not([data-theme='dark']) .editor-scroll {
  background-color: #e2dac2;
  background-image: radial-gradient(ellipse at 10% 0, rgb(255 252 235 / .6), transparent 65%), url('./assets/worlds-v207/wood-grain.svg'), linear-gradient(115deg, #eee5cc, #cfc4a8);
  background-size: 100% 100%, 384px 160px, 100% 100%;
}
/* Gouache night is a warm graphite studio; the pigment swatches carry the colour. Night desks are
   plain workbench timber: a desk-wide grid showed as stray lines beside the frame. */
body[data-world-family='art-room'][data-world-motif='gouache-garden'][data-theme='dark'] .editor-scroll {
  background-color: #191816;
  background-image:
    radial-gradient(ellipse 900px 520px at 50% 16%, rgb(255 236 196 / .18), rgb(160 140 110 / .06) 45%, transparent 75%),
    url('./assets/worlds-v207/wood-grain.svg'),
    linear-gradient(125deg, #2a2824, #0f0e0c);
  background-size: 100% 100%, 576px 240px, 100% 100%;
}

body[data-world-family='art-room'][data-world-motif='gouache-garden'] .world-surround .world-surround-lower::after { width: 120px; height: 17px; right: 40px; bottom: 3px; }
body[data-world-family='art-room'][data-world-motif='terracotta-studio'] .world-surround .world-surround-lower::after { width: 100px; height: 15px; right: 44px; bottom: 7px; }
body[data-world-family='art-room'][data-world-motif='blue-pencil'] .world-surround .world-surround-upper { box-shadow: inset 0 1px 0 rgb(255 255 255 / .35), 1px 5px 8px rgb(20 35 47 / .32); }
body[data-world-family='art-room'][data-world-motif='terracotta-studio'] .world-surround .world-surround-upper { box-shadow: inset 0 1px 0 rgb(255 237 212 / .3), 1px 5px 8px rgb(66 37 24 / .32); }
body[data-world-family='art-room'][data-world-motif='gouache-garden'] .world-surround .world-surround-upper { box-shadow: inset 0 1px 0 rgb(242 247 217 / .3), 1px 5px 8px rgb(27 47 34 / .32); }
body[data-world-family='art-room'][data-world-motif='terracotta-studio'] .world-surround .world-surround-upper::before { left: 22%; }

@media (max-width: 600px) {
  body[data-visual-theme='pastel-princess'][data-princess-motif] .world-surround > .world-surround-right { right: -28px; top: -10px; bottom: -14px; width: 16px; }
  body[data-visual-theme='pastel-princess'][data-princess-motif='cherry-ribbon'] .world-surround > .world-surround-right { right: -23px; width: 10px; }
  body[data-world-family='heirloom-library'][data-world-motif] .world-surround-upper::after { background-size: 17px 17px; }
  body[data-world-family='heirloom-library'][data-world-motif='midnight-library'] .world-surround-upper::before { width: 9px; }
  body[data-world-family='heirloom-library'][data-world-motif='forest-bookcloth'] .world-surround-upper::before { width: 11px; }
  body[data-world-family='art-room'][data-world-motif='gouache-garden'] .world-surround .world-surround-lower::after { width: 76px; height: 11px; right: 28px; bottom: 1px; }
}
/* R2: material joins and motif construction. The editor rectangle is unchanged. */
body[data-visual-theme='pastel-princess'] .theme-board-underlay {
  box-shadow: 3px 3px 0 var(--paper), 4px 4px 0 var(--line), 7px 7px 0 color-mix(in srgb, var(--paper) 85%, var(--line)), 8px 8px 0 color-mix(in srgb, var(--line) 65%, transparent), 10px 12px 8px rgb(42 18 25 / .18);
}
body[data-visual-theme='pastel-princess'][data-princess-motif='cherry-ribbon'] .workspace-tab { border-radius: 2px 2px 0 0; border-top: 3px double var(--accent-ui); }
body[data-visual-theme='pastel-princess'][data-princess-motif='honey-tea'] .workspace-tab { border-radius: 12px 2px 0 0; border-top: 3px double var(--line); }
body[data-visual-theme='pastel-princess'] :is(.right-pane-tab, .formula-tab-section h2) { font-family: 'Chalk Bodoni', 'Didot', serif; font-weight: 600; font-size: 15px; }
body[data-visual-theme='pastel-princess'][data-princess-motif='cherry-ribbon'] { --wc-box-radius: 3px; }
body[data-visual-theme='pastel-princess'][data-princess-motif='honey-tea'] { --wc-box-radius: 2px 10px 2px 2px; }

/* Field labels echo specimen mounts; the trellis/twine/timber difference is in SVG. */
body[data-visual-theme='field-journal'] .workspace-tab { border-radius: 3px 3px 8px 0; border-bottom: 1px solid var(--line); box-shadow: 1px 2px 2px rgb(55 47 29 / .16); }
body[data-visual-theme='field-journal'][data-field-season='summer'] .workspace-tab { border-radius: 3px; }
body[data-visual-theme='field-journal'][data-field-season='autumn'] .workspace-tab { border-radius: 2px 8px 2px 2px; }
body[data-visual-theme='field-journal'][data-field-season='winter'] .workspace-tab { border-radius: 0; border-bottom-style: solid; border-top: 3px double var(--line); }
body[data-visual-theme='field-journal'][data-field-season='autumn'] { --wc-box-radius: 1px; --wc-box-border: 2px solid color-mix(in srgb, var(--field-cedar-beige) 85%, #6b5b45); }
body[data-visual-theme='field-journal'][data-field-season='winter'] { --wc-box-radius: 0; --wc-key-radius: 0; }

/* Cased books: rounded calfskin, square silver buckram, stitched woven linen. */
body[data-world-family='heirloom-library'] .workspace-tab { border-radius: 2px 2px 0 0; border: 1px solid var(--lib-foil); border-top: 3px double var(--lib-foil); box-shadow: inset 0 0 0 2px var(--paper), 2px 2px 0 color-mix(in srgb, var(--lib-cloth) 70%, transparent); }
body[data-world-family='heirloom-library'][data-world-motif='midnight-library'] { --lib-grain: url('./assets/worlds-v207/heirloom-library/buckram-weave.svg'); }
/* R5: the facing page is sized from --lib-cover-left, so the narrower Navy and Forest covers
   declare their own left width and the page tucks inside the cover instead of overhanging it. */
@media (min-width: 601px) {
  body[data-world-family='heirloom-library'][data-world-motif='midnight-library'] { --lib-cover-left: 48px; }
  body[data-world-family='heirloom-library'][data-world-motif='forest-bookcloth'] { --lib-cover-left: 44px; }
}
body[data-world-family='heirloom-library'][data-world-motif='midnight-library'] .world-surround .world-surround-upper { top: -32px; left: -48px; right: -28px; bottom: -31px; border-radius: 2px; background-size: auto, auto, 64px 64px, auto; }
body[data-world-family='heirloom-library'][data-world-motif='midnight-library'] .world-surround-upper::after { border-width: 1px; outline-offset: -4px; background-size: 22px 22px; }
body[data-world-family='heirloom-library'][data-world-motif='forest-bookcloth'] .world-surround .world-surround-upper { top: -39px; left: -44px; right: -43px; bottom: -38px; box-shadow: 2px 4px 4px rgb(15 22 13 / .3), inset 1px 1px 0 rgb(255 238 188 / .22); }
body[data-world-family='heirloom-library'][data-world-motif='forest-bookcloth'] .world-surround-upper::after { inset: 8px; border-width: 1px; background-size: 18px 18px; }
body[data-world-family='heirloom-library'][data-world-motif='forest-bookcloth'] .workspace-tab { border-style: solid; border-top: 3px double var(--lib-foil); }

/* Optical glass, linear reeding and mineral strata have different silhouettes. */

/* Instrument plates, atlas pockets and a copper vernier. */
body[data-world-family='observatory'] .workspace-tab { border-radius: 2px; border: 1px solid var(--line); box-shadow: inset 0 0 0 2px var(--paper), inset 0 0 0 3px var(--line), 0 2px 0 rgb(12 25 38 / .3); }
body[data-world-family='observatory'][data-world-motif='constellation-study'] .workspace-tab { border-radius: 0; border-top: 4px double var(--line); box-shadow: 2px 2px 0 rgb(12 15 30 / .25); }
body[data-world-family='observatory'][data-world-motif='solar-observatory'] .workspace-tab { border-radius: 10px 2px 2px 2px; border-left: 5px double var(--accent-ui); }
body[data-world-family='observatory'][data-theme='dark'] .theme-frame { filter: brightness(.82) drop-shadow(1px 4px 3px rgb(0 0 0 / .4)); }

/* Art practice is legible in the mount: metric drafting, print bed, rag-paper gouache. */
body[data-world-family='art-room'] .workspace-tab { border-radius: 1px; border-top: 3px solid var(--accent-ui); box-shadow: 2px 2px 0 color-mix(in srgb, var(--accent-ui) 25%, transparent); }
body[data-world-family='art-room'][data-world-motif='blue-pencil'] .world-surround .world-surround-upper {
  background: linear-gradient(90deg, rgb(228 239 246 / .19) 1px, transparent 1px), linear-gradient(0deg, rgb(228 239 246 / .19) 1px, transparent 1px), linear-gradient(90deg, rgb(228 239 246 / .07) .5px, transparent .5px), linear-gradient(0deg, rgb(228 239 246 / .07) .5px, transparent .5px), var(--art-mat);
  background-size: 60px 60px, 60px 60px, 12px 12px, 12px 12px, auto;
  border-radius: 3px; border: 1px solid #45616c;
}
body[data-world-family='art-room'][data-world-motif='terracotta-studio'] .world-surround .world-surround-upper {
  top: -33px; left: -29px; right: -29px; bottom: -29px; border-radius: 0;
  /* A print bed, not a cutting mat: plain clay inside its inset rule (R5: the grid's lines read as stray strokes). */
  background: linear-gradient(125deg, rgb(255 255 255 / .08), transparent 55%, rgb(0 0 0 / .08)), var(--art-mat);
  border: 2px solid color-mix(in srgb, var(--art-mat) 70%, #30251c); outline: 1px solid color-mix(in srgb, var(--art-mat) 60%, #eac495); outline-offset: -7px;
}
body[data-world-family='art-room'][data-world-motif='gouache-garden'] .world-surround .world-surround-upper {
  top: -28px; left: -21px; right: -21px; bottom: -27px; border-radius: 4px 7px 3px 6px;
  background: url('./assets/worlds-v207/heirloom-library/cloth-weave.svg') 0 0 / 7px 7px, var(--art-mat); border: 1px solid color-mix(in srgb, var(--art-mat) 75%, #403e26);
}
body[data-world-family='art-room'][data-world-motif='gouache-garden'] .workspace-tab { border-radius: 3px 8px 1px 3px; border-top: 3px double var(--accent-ui); }
body[data-world-family='art-room'][data-world-motif='terracotta-studio'] .workspace-tab { border: 3px double var(--line); box-shadow: 3px 3px 0 color-mix(in srgb, var(--accent-ui) 35%, transparent); }
body[data-world-family='art-room'][data-world-motif='gouache-garden'] .world-surround .world-surround-lower::after { width: 125px; height: 19px; bottom: 2px; }
body[data-world-family='art-room'][data-world-motif='terracotta-studio'] #note-editor .inline-math.floating::before { transform: none; width: 42px; }
body[data-world-family='art-room'][data-world-motif='terracotta-studio'] #note-editor .inline-math.floating::after { transform: none; width: 42px; }
@media (max-width: 600px) {
  body[data-visual-theme='pastel-princess'] .theme-board-underlay { box-shadow: 2px 2px 0 var(--paper), 3px 3px 0 var(--line), 5px 6px 4px rgb(42 18 25 / .2); }
  body[data-world-family='heirloom-library'][data-world-motif] .world-surround .world-surround-upper { top: -20px; left: -27px; right: -19px; bottom: -20px; }
  body[data-world-family='heirloom-library'][data-world-motif='forest-bookcloth'] .world-surround .world-surround-upper { top: -26px; right: -24px; bottom: -25px; }
  body[data-world-family='art-room'][data-world-motif] .world-surround .world-surround-upper { top: -15px; left: -14px; right: -14px; bottom: -15px; }
  body[data-world-family='art-room'][data-world-motif='gouache-garden'] .world-surround .world-surround-lower::after { width: 64px; height: 10px; }
  body[data-visual-theme='field-journal']:is([data-field-season='spring'], [data-field-season='summer']) .theme-frame { opacity: .84; }
}

}

/* R3b companion materials. The companion panel is part of each desk but quieter than the
   board: its stock, section rules and tab rail change per World; formula cards, results and
   controls keep their neutral high-contrast surfaces. Classic and Y2K are untouched. */
@media screen {
  body:is([data-visual-theme='pastel-princess'], [data-visual-theme='field-journal'], [data-world-family='observatory'], [data-world-family='heirloom-library'], [data-world-family='art-room']):not([data-readability='high']) #reference-tools :is(.formula-view, .scientific-calculator, .periodic-view) {
    background-image: var(--companion-stock, none);
    box-shadow: var(--companion-edge, none);
  }
  /* The section wrapper is transparent so the stock covers the whole panel evenly (a solid
     section fill had left the pattern visible only in the gaps). Cards keep their surfaces. */
  body:is([data-visual-theme='pastel-princess'], [data-visual-theme='field-journal'], [data-world-family='observatory'], [data-world-family='heirloom-library'], [data-world-family='art-room']):not([data-readability='high']) #reference-tools .formula-tab-section { background-color: transparent; border-color: transparent; }
  body:is([data-visual-theme='pastel-princess'], [data-visual-theme='field-journal'], [data-world-family='observatory'], [data-world-family='heirloom-library'], [data-world-family='art-room']):not([data-readability='high']) #reference-tools .formula-section h2 {
    padding-bottom: 4px; border-bottom: var(--companion-rule, none); font-family: var(--companion-heading, inherit);
    letter-spacing: var(--companion-tracking, .8px); text-transform: var(--companion-case, uppercase);
  }
  /* Hearts: an inset double rule like a stationery card, Bodoni headings over a hairline. */
  body[data-visual-theme='pastel-princess'] {
    --companion-stock: linear-gradient(180deg, color-mix(in srgb, var(--princess-raspberry) 10%, transparent), transparent 160px);
    --companion-edge: inset 0 0 0 5px color-mix(in srgb, var(--princess-paper) 70%, transparent), inset 0 0 0 6px color-mix(in srgb, var(--princess-rule) 55%, transparent), inset 0 0 0 8px transparent, inset 0 0 0 9px color-mix(in srgb, var(--princess-rule) 30%, transparent);
    --companion-rule: 1px solid color-mix(in srgb, var(--princess-rule) 55%, transparent); --companion-heading: 'Chalk Bodoni', 'Didot', serif;
    --companion-tracking: .06em; --companion-case: none;
  }
  /* Field Journal: the notebook's own fibred paper and a dashed field-note rule. */
  body[data-visual-theme='field-journal'] {
    --companion-stock: var(--world-paper-grain);
    --companion-edge: inset 3px 0 0 color-mix(in srgb, var(--line) 45%, transparent);
    --companion-rule: 1px dashed color-mix(in srgb, var(--line) 85%, transparent); --companion-tracking: .05em; --companion-case: none;
    --companion-heading: var(--world-font-heading, inherit);
  }
  /* Observatory: a graduated scale runs down the panel's edge; headings sit on a ruled line. */
  body[data-world-family='observatory'] {
    --companion-stock: repeating-linear-gradient(180deg, color-mix(in srgb, var(--nw-rule) 75%, transparent) 0 1px, transparent 1px 8px), repeating-linear-gradient(180deg, var(--nw-rule) 0 1px, transparent 1px 40px);
    --companion-edge: inset 1px 0 0 color-mix(in srgb, var(--nw-rule) 50%, transparent);
    --companion-rule: 1px solid color-mix(in srgb, var(--nw-rule) 75%, transparent);
  }
  body[data-world-family='observatory'] #reference-tools :is(.formula-view, .scientific-calculator, .periodic-view) { background-size: 7px 100%, 13px 100%; background-repeat: no-repeat; background-position: 0 0, 0 0; }
  /* Library: laid paper (fine laid lines, wide chain lines) and a gilt hairline under small-cap headings. */
  body[data-world-family='heirloom-library'] {
    --companion-stock: repeating-linear-gradient(0deg, color-mix(in srgb, var(--lib-foil) 13%, transparent) 0 1px, transparent 1px 3px), repeating-linear-gradient(90deg, color-mix(in srgb, var(--lib-foil) 22%, transparent) 0 1px, transparent 1px 28px);
    --companion-rule: 1px solid color-mix(in srgb, var(--lib-foil) 80%, transparent); --companion-heading: var(--world-font-heading, serif);
    --companion-tracking: .12em;
  }
  /* Art Room tools share the motif's own stock: drafting grid, rag fibre or print paper. */
  body[data-world-family='art-room'] {
    --companion-stock: linear-gradient(90deg, color-mix(in srgb, var(--nw-rule) 28%, transparent) 1px, transparent 1px), linear-gradient(0deg, color-mix(in srgb, var(--nw-rule) 28%, transparent) 1px, transparent 1px);
    --companion-rule: 1px solid color-mix(in srgb, var(--accent-ui) 45%, transparent);
  }
  body[data-world-family='art-room'] #reference-tools :is(.formula-view, .scientific-calculator, .periodic-view) { background-size: 24px 24px; }
  body[data-world-family='art-room']:is([data-world-motif='gouache-garden'], [data-world-motif='terracotta-studio']) {
    --companion-stock: linear-gradient(color-mix(in srgb, var(--nw-panel) 94%, transparent), color-mix(in srgb, var(--nw-panel) 94%, transparent)), var(--art-tooth);
  }
  body[data-world-family='art-room']:is([data-world-motif='gouache-garden'], [data-world-motif='terracotta-studio']) #reference-tools :is(.formula-view, .scientific-calculator, .periodic-view) { background-size: 100% 100%, 256px 256px; }
  body[data-world-family='art-room']:not([data-readability='high']) #reference-tools .formula-section h2 { position: relative; padding-left: 15px; }
  body[data-world-family='art-room']:not([data-readability='high']) #reference-tools .formula-section h2::before {
    content: ''; position: absolute; left: 0; top: 3px; width: 8px; height: 10px;
    background: var(--accent-ui); opacity: .65;
    clip-path: polygon(0 5%, 74% 0, 100% 12%, 90% 70%, 96% 93%, 15% 100%, 0 83%, 7% 42%);
  }
}
/* Formula cards share the board's box construction per World (the same --wc-box-radius as
   floating Math boxes) plus one World-specific edge; surfaces and inks stay neutral. */
@media screen {
  body:is([data-visual-theme='pastel-princess'], [data-visual-theme='field-journal'], [data-world-family='observatory'], [data-world-family='heirloom-library'], [data-world-family='art-room']):not([data-readability='high']) #reference-tools .formula-item {
    border-radius: var(--wc-box-radius, var(--r-soft)); box-shadow: var(--companion-card, none);
  }
  body[data-visual-theme='pastel-princess'] { --companion-card: inset 0 0 0 3px var(--ui-control-paper, var(--paper)), inset 0 0 0 4px color-mix(in srgb, var(--princess-rule) 45%, transparent); }
  body[data-visual-theme='field-journal'] { --companion-card: 2px 2px 0 color-mix(in srgb, var(--line) 35%, transparent); }
  body[data-world-family='observatory'] { --companion-card: inset 0 0 0 2px var(--nw-panel), inset 0 0 0 3px color-mix(in srgb, var(--nw-rule) 45%, transparent); }
  body[data-world-family='heirloom-library'] { --companion-card: inset 0 0 0 2px var(--nw-panel), inset 0 0 0 3px color-mix(in srgb, var(--lib-foil) 55%, transparent); }
  body[data-world-family='art-room'] { --companion-card: 3px 3px 0 color-mix(in srgb, var(--accent-ui) 22%, transparent); }
}
@media (forced-colors: active) { #reference-tools :is(.formula-view, .scientific-calculator, .periodic-view, .formula-item) { background-image: none !important; box-shadow: none !important; } }
/* Copper Sun on phones: the narrower machined band and sun-disc corner plate (generated -compact art). */
@media screen and (max-width: 600px) {
  body[data-world-family='observatory'][data-world-motif='solar-observatory'] {
    --world-rail-top: url('./assets/world-rework/observatory/solar-observatory/rail-top-compact.svg'); --world-rail-bottom: url('./assets/world-rework/observatory/solar-observatory/rail-bottom-compact.svg');
    --world-rail-left: url('./assets/world-rework/observatory/solar-observatory/rail-left-compact.svg'); --world-rail-right: url('./assets/world-rework/observatory/solar-observatory/rail-right-compact.svg');
    --world-corner-tl: url('./assets/world-rework/observatory/solar-observatory/corner-tl-compact.svg'); --world-corner-tr: url('./assets/world-rework/observatory/solar-observatory/corner-tr-compact.svg');
    --world-corner-bl: url('./assets/world-rework/observatory/solar-observatory/corner-bl-compact.svg'); --world-corner-br: url('./assets/world-rework/observatory/solar-observatory/corner-br-compact.svg');
  }
}

/* Hearts frames are drawn on a 128px tile so lace, ribbon and check repeat half as often.
   The writing paper carries no perforations, hems or page markers (owner review). */
body[data-visual-theme='pastel-princess'] .ink-stage { --world-rail-length: calc(var(--world-frame-size) * 8 / 3); }

/* Field Journal Winter: the companion panel and control stock take Winter's cool frost
   paper, so the panel agrees with the silver desk instead of glowing warm beside it. */
@media screen {
  body[data-visual-theme='field-journal'][data-field-season='winter']:not([data-theme='dark']):not([data-readability='high']) {
    --panel: #eef2ef; --paper: var(--field-paper-base); --ui-control-paper: var(--field-paper-base); --panel-2: #e7ece9;
    --companion-stock: linear-gradient(180deg, rgb(255 255 255 / .45), transparent 220px);
  }
  body[data-visual-theme='field-journal'][data-field-season='winter']:not([data-theme='dark']):not([data-readability='high']) .graph-pane {
    background-color: #e9efed; background-image: linear-gradient(180deg, #f2f6f4, #e3eae7 58%, #edf2f0); box-shadow: inset 1px 0 #a9b8b5;
  }
  body[data-visual-theme='field-journal'][data-field-season='winter']:not([data-theme='dark']):not([data-readability='high']) :is(.calc-row math-field, .key, .formula-item, .formula-section, .formula-guides, .chem-reference-group) {
    background-color: var(--field-paper-base); border-color: #b3c0bd;
  }
  body[data-visual-theme='field-journal'][data-field-season='winter']:not([data-theme='dark']):not([data-readability='high']) #calculator-keypad .key { background-color: var(--field-paper-base); }
  body[data-visual-theme='field-journal'][data-field-season='winter']:not([data-theme='dark']):not([data-readability='high']) .graph-pane input { background-color: var(--field-paper-base); border-color: #b3c0bd; }
  /* Spring: the panel takes a pale sage stock beside the weathered sage desk (R5). */
  body[data-visual-theme='field-journal'][data-field-season='spring']:not([data-theme='dark']):not([data-readability='high']) .graph-pane {
    background-color: #edf0e4; background-image: linear-gradient(180deg, #f3f5ec, #e7ebdd 58%, #eef1e6); box-shadow: inset 1px 0 #b4bfa6;
  }
  body[data-visual-theme='field-journal'][data-field-season='spring']:not([data-theme='dark']):not([data-readability='high']) .graph-pane :is(.calc-row math-field, .key, .formula-item, .formula-section, .formula-guides, .chem-reference-group, input) {
    background-color: var(--field-paper-base); border-color: #bdc6ad;
  }
}


/* Field Journal Summer, Autumn and Winter nights: the companion panel takes the season's night
   stock (olive oak, cedar brown, slate) instead of Spring's green, so it agrees with the lantern-lit desk. */
@media screen {
  body[data-visual-theme='field-journal'][data-field-season='autumn'][data-theme='dark']:not([data-readability='high']) { --ffn-pane: #30261d; --ffn-pane-end: #271f18; --ffn-card: #2c231b; --ffn-raised: #3b2f24; --ffn-line: #6b5642; }
  body[data-visual-theme='field-journal'][data-field-season='summer'][data-theme='dark']:not([data-readability='high']) { --ffn-pane: #2a2d1f; --ffn-pane-end: #22251a; --ffn-card: #26291c; --ffn-raised: #333726; --ffn-line: #5f6446; }
  body[data-visual-theme='field-journal'][data-field-season='winter'][data-theme='dark']:not([data-readability='high']) { --ffn-pane: #20333a; --ffn-pane-end: #1a2a30; --ffn-card: #1e3136; --ffn-raised: #29404a; --ffn-line: #4f676c; }
  body[data-visual-theme='field-journal']:is([data-field-season='summer'], [data-field-season='autumn'], [data-field-season='winter'])[data-theme='dark']:not([data-readability='high']) .graph-pane {
    background-color: var(--ffn-pane); background-image: radial-gradient(ellipse at 50% 0, rgb(var(--field-lantern-glow) / .06), transparent 35%), linear-gradient(var(--ffn-pane), var(--ffn-pane-end)); box-shadow: inset 1px 0 var(--ffn-line);
  }
  body[data-visual-theme='field-journal']:is([data-field-season='summer'], [data-field-season='autumn'], [data-field-season='winter'])[data-theme='dark']:not([data-readability='high']) .right-pane-tabs {
    border-color: var(--ffn-line); background-color: var(--ffn-raised); background-image: none;
  }
  body[data-visual-theme='field-journal']:is([data-field-season='summer'], [data-field-season='autumn'], [data-field-season='winter'])[data-theme='dark']:not([data-readability='high']) .graph-pane :is(.calc-row math-field, .key, .formula-item, .formula-section, .formula-guides, .chem-reference-group, .chip, .segment, .secondary-button, .icon-button, input) {
    border-color: var(--ffn-line); background-color: var(--ffn-card);
  }
  body[data-visual-theme='field-journal']:is([data-field-season='summer'], [data-field-season='autumn'], [data-field-season='winter'])[data-theme='dark']:not([data-readability='high']) .graph-pane :is(.chip, .icon-button)[aria-pressed='true'],
  body[data-visual-theme='field-journal']:is([data-field-season='summer'], [data-field-season='autumn'], [data-field-season='winter'])[data-theme='dark']:not([data-readability='high']) .graph-pane :is(.chip, .segment).active { border-color: var(--accent); background-color: color-mix(in oklab, var(--accent) 34%, #e8ead9); }
}

/* Hearts nights: board cards carry each motif's own edge colour (Cherry a tailored double rule).
   R6: solid hairlines; a dotted or dashed row in the writing plane read as identical marks. */
@media screen {
  body[data-visual-theme='pastel-princess'][data-princess-motif='strawberry'][data-theme='dark'] { --wc-box-border: 1px solid #b98aa0; }
  body[data-visual-theme='pastel-princess'][data-princess-motif='cherry-ribbon'][data-theme='dark'] { --wc-box-border: 3px double #9a4a62; --wc-box-radius: 2px; }
  body[data-visual-theme='pastel-princess'][data-princess-motif='honey-tea'][data-theme='dark'] { --wc-box-border: 1px solid #a68a5c; }
}

/* =====================================================================================
   App frame (owner redesign, 2026-10-04: the upper half was "flat with bad transitions and
   a lack of definition"). The header and the tool rail form one chrome block over the desk
   and the companion panel: one surface, a hairline between header and rail, and one defined
   lower edge with a soft drop. The rail runs unbroken across the workspace toolbar, the
   divider and the Reference pane bar. Worlds set the tokens; horizontal gradients are fixed
   to the viewport so they continue across both panes instead of restarting at the divider.
   Layout here never depends on the body attributes app.js applies late in boot.
   ===================================================================================== */
/* The chrome hairline is drawn from each World's ink, so it reads on every header surface, light
   or dark, and on phones as well as desktop (owner, 2026-10-04: the Library line had vanished). */
body { --frame-line: color-mix(in oklab, var(--ink) 16%, transparent); }
@media screen and (min-width: 821px) and (hover: hover) {
  body {
    --rail-height: 54px;
    --frame-surface: var(--n99);
    --frame-rail: var(--frame-surface);
    --frame-edge: color-mix(in oklab, var(--ink) 22%, var(--paper));
    --frame-edge-width: 1px;
    --frame-drop: 30 45 70;
    /* Light falls from above across the whole chrome block, so header and rail read as one lit surface. */
    --frame-light: linear-gradient(180deg, rgb(255 255 255 / .38), rgb(255 255 255 / 0) 116px) fixed;
  }
  body[data-theme='dark'] { --frame-light: linear-gradient(180deg, rgb(255 255 255 / .045), rgb(255 255 255 / 0) 116px) fixed; }
  body .workspace-toolbar { position: relative; z-index: 4; box-sizing: border-box; min-height: calc(var(--rail-height) + var(--frame-edge-width)); }
  body:not([data-dock='bottom']) .graph-pane > .pane-bar { position: relative; z-index: 3; box-sizing: border-box; min-height: calc(var(--rail-height) + var(--frame-edge-width)); padding-block: 0; }
  body:not([data-dock='bottom']) .divider::before {
    content: ''; position: absolute; inset: 0 0 auto; box-sizing: border-box; height: calc(var(--rail-height) + var(--frame-edge-width));
    background: var(--frame-light), var(--frame-rail); border-bottom: var(--frame-edge-width) solid var(--frame-edge); pointer-events: none;
  }

  body[data-world-family] { --frame-surface: var(--nw-shell); --frame-edge: var(--ui-control-line); --frame-drop: 18 14 10; }
  body[data-world-family='personal-web'] {
    --frame-rail: linear-gradient(180deg, color-mix(in srgb, var(--nw-panel) 82%, #fff) 0%, var(--nw-shell) 48%, color-mix(in srgb, var(--nw-shell) 88%, var(--nw-accent)) 100%) var(--nw-shell);
    --frame-edge: color-mix(in srgb, var(--nw-ink) 35%, var(--nw-panel));
  }
  body[data-world-family='personal-web'] { --frame-light: none; }
  body[data-world-motif='pixel-diary'] { --frame-rail: var(--nw-shell); }
  body[data-visual-theme='pastel-princess'] {
    --frame-surface: linear-gradient(90deg, var(--princess-toolbar), var(--princess-toolbar-end)) fixed var(--princess-toolbar);
    --frame-edge: color-mix(in oklab, var(--accent) 38%, var(--princess-toolbar)); --frame-drop: 104 24 61;
  }
  body[data-visual-theme='field-journal'] {
    --frame-surface: linear-gradient(90deg, var(--field-toolbar-surface), var(--field-toolbar-end)) fixed var(--field-toolbar-surface);
    --frame-edge: #9b7a5e; --frame-edge-width: 3px; --frame-drop: 47 70 56;
  }
  body[data-visual-theme='field-journal'][data-theme='dark'] {
    --frame-surface: linear-gradient(90deg, var(--field-dark-toolbar), var(--field-dark-pane)) fixed var(--field-dark-toolbar);
    --frame-edge: #8a704f; --frame-drop: 0 0 0;
  }

  body[data-visual-theme][data-theme] .toolbar { background: var(--frame-light), var(--frame-surface); border-bottom: 1px solid var(--frame-line); box-shadow: none; }
  body[data-visual-theme][data-theme] :is(.workspace-toolbar, .graph-pane > .pane-bar) {
    background: var(--frame-light), var(--frame-rail); border-bottom: var(--frame-edge-width) solid var(--frame-edge);
    box-shadow: 0 4px 10px -6px rgb(var(--frame-drop) / .32);
  }
  /* The title and tags read as text until pointed at or focused, in every World. */
  /* By id: the Hearts night input rule is more specific than any class chain. */
  body[data-visual-theme][data-theme] .toolbar :is(#document-title, #workspace-tags):not(:hover, :focus) { border-color: transparent; background-color: transparent; box-shadow: none; }
  /* Library tabs in the rail sit at the rail's own size rather than the page's. */
  body[data-world-family='heirloom-library'] .pane-bar .right-pane-tab { font-size: 14px; }
}
