/* 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='tidepool'] {
  --world-font-brand: 'Chalk Bree', Georgia, serif;
  --world-font-heading: 'Chalk Bree', Georgia, serif;
  --world-font-navigation: 'Chalk Nunito', 'DM Sans', sans-serif;
  --world-brand-weight: 400;
  --world-heading-weight: 400;
  --world-brand-tracking: -.025em;
}
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; }

  /* Tidepool: a fan shell with ribs under the unaltered molecule. */
  body[data-world-family='tidepool'] .brand-mark { border-radius: 48% 48% 40% 40%; border-color: transparent; background: transparent; box-shadow: none; }
  body[data-world-family='tidepool'] .world-logo-tidepool { display: block; }
  body[data-world-family='tidepool'] .logo-sea-glass { fill: color-mix(in srgb, var(--nw-accent) 22%, var(--nw-paper)); fill-opacity: .9; stroke: color-mix(in srgb, var(--nw-accent) 45%, var(--nw-paper)); stroke-width: 1.6; }
  body[data-world-family='tidepool'] .logo-sea-glass-glint { fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; opacity: .75; }
  body[data-world-family='tidepool'] .chemistry-mark .mark-oxygen { fill: var(--world-logo-glass); stroke: var(--nw-accent); }
  body[data-world-family='tidepool'][data-world-motif='kelp-forest'] .chemistry-mark .mark-oxygen { fill: #9dad74; }
  body[data-world-family='tidepool'][data-world-motif='coral-study'] .chemistry-mark .mark-oxygen { fill: #eaa697; }
  body[data-world-family='tidepool'] .brand > span:last-child { padding-bottom: .035em; }

  /* 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='tidepool'] .brand { font-size: 21px; }
  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:'Mali Local',sans-serif;
  --hearts-heading:'Mali Local',sans-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);
  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) 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) 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) 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) 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 Nunito',sans-serif;--hearts-heading:'Chalk Bree',Georgia,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;}
body[data-visual-theme='pastel-princess']:not([data-readability='high'])[data-princess-motif='cherry-ribbon'] :is(.workspace-tab,.right-pane-tabs button) {border-radius:5px 5px 2px 2px;}
body[data-visual-theme='pastel-princess']:not([data-readability='high'])[data-princess-motif='cherry-ribbon'] .workspace-tab.active {box-shadow:inset 0 3px 0 #b66066;}

/* 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:'Mali Local',sans-serif;--hearts-heading:'Chalk Bree',Georgia,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;}
body[data-visual-theme='pastel-princess']:not([data-readability='high'])[data-princess-motif='honey-tea'] .workspace-tab.active {box-shadow:inset 0 2px 0 #b39454;border-radius:7px 7px 2px 2px;}
@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) {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-fabric:url('assets/world-rework/hearts-and-bows/strawberry/fabric.png');--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-fabric:url('assets/world-rework/hearts-and-bows/cherry-ribbon/fabric.png');--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-fabric:url('assets/world-rework/hearts-and-bows/honey-tea/fabric.png');--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);
  --ff-corner: var(--ff-corner-day);
  --ff-lamp-y: 165px;
  --ff-lamp-x: 48px;
  --ff-paper-opacity: .64;
  --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-marker-day: url('assets/world-rework/field-journal/spring/rule-marker-day.svg');
  --ff-marker-night: url('assets/world-rework/field-journal/spring/rule-marker-night.svg');
  --ff-corner-day: url('assets/world-rework/field-journal/spring/paper-corner-day.svg');
  --ff-corner-night: url('assets/world-rework/field-journal/spring/paper-corner-night.svg');
  --ff-desk-wash: .41; --ff-night-wash: .82; --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-marker-day: url('assets/world-rework/field-journal/summer/rule-marker-day.svg');
  --ff-marker-night: url('assets/world-rework/field-journal/summer/rule-marker-night.svg');
  --ff-corner-day: url('assets/world-rework/field-journal/summer/paper-corner-day.svg');
  --ff-corner-night: url('assets/world-rework/field-journal/summer/paper-corner-night.svg');
  --ff-desk-wash: .32; --ff-night-wash: .84; --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-marker-day: url('assets/world-rework/field-journal/autumn/rule-marker-day.svg');
  --ff-marker-night: url('assets/world-rework/field-journal/autumn/rule-marker-night.svg');
  --ff-corner-day: url('assets/world-rework/field-journal/autumn/paper-corner-day.svg');
  --ff-corner-night: url('assets/world-rework/field-journal/autumn/paper-corner-night.svg');
  --ff-desk-wash: .30; --ff-night-wash: .83; --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-marker-day: url('assets/world-rework/field-journal/winter/rule-marker-day.svg');
  --ff-marker-night: url('assets/world-rework/field-journal/winter/rule-marker-night.svg');
  --ff-corner-day: url('assets/world-rework/field-journal/winter/paper-corner-day.svg');
  --ff-corner-night: url('assets/world-rework/field-journal/winter/paper-corner-night.svg');
  --ff-desk-wash: .40; --ff-night-wash: .88; --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); --ff-corner: var(--ff-corner-night);
}
@media screen {
  body[data-visual-theme='field-journal'] .editor-scroll {
    background-image: linear-gradient(color-mix(in srgb, var(--field-workspace) calc(var(--ff-desk-wash) * 100%), transparent), color-mix(in srgb, var(--field-workspace) calc(var(--ff-desk-wash) * 100%), transparent)), var(--ff-desk);
    background-size: 100% 100%, 640px 640px;
    background-repeat: no-repeat, repeat;
    background-attachment: local;
  }
  body[data-visual-theme='field-journal'][data-theme='dark'] .editor-scroll {
    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);
  }
  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;
    pointer-events: none;
  }
  body[data-visual-theme='field-journal'][data-field-season='spring'][data-theme='dark'] .world-night-light {
    background: radial-gradient(ellipse 83px 230px at var(--ff-lamp-x) var(--ff-lamp-y), rgb(var(--field-lantern-glow) / .15), transparent 78%), radial-gradient(ellipse 83px 230px at calc(100% - var(--ff-lamp-x)) var(--ff-lamp-y), rgb(var(--field-lantern-glow) / .15), transparent 78%);
  }
  body[data-visual-theme='field-journal'][data-field-season='winter'][data-theme='dark'] .world-night-light {
    background: radial-gradient(ellipse 85px 160px at var(--ff-lamp-x) var(--ff-lamp-y), rgb(var(--field-lantern-glow) / .13), transparent 74%), radial-gradient(ellipse 85px 160px at calc(100% - var(--ff-lamp-x)) var(--ff-lamp-y), rgb(var(--field-lantern-glow) / .13), transparent 74%), linear-gradient(90deg, rgb(172 204 218 / .018), transparent 10%, transparent 90%, rgb(172 204 218 / .018));
  }

  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);
  }
  body[data-visual-theme='field-journal'][data-paper='ruled'] .board-decoration::before { background-image: var(--ff-marker); }
  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:.058; }
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:.058; }
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:.058; }
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:.058; }
body[data-visual-theme='field-journal'][data-theme='dark'] .theme-frame-companion::before { inset:auto; top:49%; left:0; width:100%; height:auto; aspect-ratio:1; border-radius:50%; background:radial-gradient(circle, rgb(var(--field-lantern-glow) / .5), rgb(var(--field-lantern-glow) / .15) 45%, transparent 72%); box-shadow:0 0 28px 24px rgb(var(--field-lantern-glow) / .19); filter: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'); }
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'); }
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'); }
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'); }
}

/* 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-v193.png') 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 h4, .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));
  }
  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 h3 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'] {
  /* Brass-edged instrument plates on star-chart paper. */
  --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%, #9a7437 6%), color-mix(in srgb, var(--nw-panel) 82%, #9a7437 12%));
  --wc-key-border: color-mix(in srgb, #9a7437 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, #9a7437 40%, transparent);
  --wc-box-bg: color-mix(in srgb, var(--nw-paper) 94%, #9a7437 4%);
  --wc-box-border: 1px solid color-mix(in srgb, #9a7437 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, #9a7437 30%, transparent), 0 2px 6px rgb(20 32 52 / .16);
}
body[data-world-family='tidepool'] {
  /* Frosted sea glass: rounded, translucent, softly lit from above. */
  --wc-key-bg: linear-gradient(170deg, color-mix(in srgb, #ffffff 72%, var(--nw-accent) 8%), color-mix(in srgb, var(--nw-paper) 78%, var(--nw-accent) 14%));
  --wc-key-fn: linear-gradient(170deg, color-mix(in srgb, #eaf5f1 70%, var(--nw-accent) 14%), color-mix(in srgb, var(--nw-panel) 70%, var(--nw-accent) 22%));
  --wc-key-border: color-mix(in srgb, var(--nw-accent) 30%, #ffffff);
  --wc-key-radius: 13px;
  --wc-key-shadow: inset 0 1px 0 rgb(255 255 255 / .75), 0 2px 5px color-mix(in srgb, var(--nw-accent) 18%, transparent);
  --wc-box-bg: linear-gradient(170deg, color-mix(in srgb, #ffffff 78%, var(--nw-accent) 6%), color-mix(in srgb, var(--nw-paper) 84%, var(--nw-accent) 10%));
  --wc-box-border: 1px solid color-mix(in srgb, var(--nw-accent) 32%, #ffffff);
  --wc-box-radius: 14px;
  --wc-box-shadow: inset 0 1px 0 rgb(255 255 255 / .8), 0 3px 10px color-mix(in srgb, var(--nw-accent) 16%, transparent);
}
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'] {
  /* Pillowy stationery buttons with a stitched ribbon edge. */
  --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: 14px;
  --wc-key-shadow: inset 0 0 0 2px rgb(255 255 255 / .8), inset 0 0 0 3px color-mix(in srgb, var(--princess-raspberry) 14%, transparent), 0 2px 4px color-mix(in srgb, var(--princess-raspberry) 18%, transparent);
  --wc-box-bg: #fffafc;
  --wc-box-border: 1px solid color-mix(in srgb, var(--princess-raspberry) 32%, transparent);
  --wc-box-radius: 16px;
  --wc-box-shadow: 0 0 0 4px #fffafc, 0 0 0 5px color-mix(in srgb, var(--princess-strawberry) 70%, transparent), 0 4px 10px color-mix(in srgb, var(--princess-raspberry) 14%, transparent);
}
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: #fbf6e8;
  --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 #fbf6e8, inset 0 0 0 4px color-mix(in srgb, var(--field-cedar-beige, #bda589) 60%, transparent), 0 2px 5px rgb(60 48 30 / .14);
}
/* 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]: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);
}
/* 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: color-mix(in srgb, var(--art-tape, #ece0b9) 88%, transparent); box-shadow: 0 1px 1px rgb(0 0 0 / .08);
}
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); }
/* Motif verdict marks stay decorative; a small plain mark makes the meaning unmistakable. */
body[data-visual-theme='field-journal'] .check-badge { display: inline-flex; align-items: center; gap: 1px; }
body[data-visual-theme='field-journal'] .check-badge::before { font: 700 12px/1 'DM Sans', sans-serif; color: var(--field-feedback-color); }
body[data-visual-theme='field-journal'] .check-badge::after { margin-left: 0 !important; vertical-align: 0 !important; }
body[data-visual-theme='field-journal'] .check-badge.check-ok::before { content: '✓'; }
body[data-visual-theme='field-journal'] .check-badge.check-bad::before { content: '✗'; }
body[data-visual-theme='field-journal'] .check-badge.check-narrowed::before { content: '✓'; }
body[data-visual-theme='field-journal'] .check-badge.check-unknown::before { content: '?'; }
body[data-visual-theme='field-journal'] .check-badge.check-context::before { content: '•'; color: var(--field-lake, currentColor); font-size: 16px; }

/* 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: a flat satin binding with square mitred
   corners on a 4px board radius, a wrap where it is tied at the top, and a narrow tail grip.
   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. Flat colour only; the
   desk is a quiet satin weave. The bow, bunny, pearl heart, gingham and lace are retired. */
@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: #fbe7ef; --hearts-weave: #e9b3c8;
}
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: #fbe9ed; --hearts-weave: #eab1bf;
}
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: #f9f0de; --hearts-weave: #e3cc9c;
}
body[data-visual-theme='pastel-princess'] .ink-stage { --world-board-radius: 4px; }
body[data-visual-theme='pastel-princess']:not([data-readability='high']) .editor-scroll {
  background-color: var(--hearts-desk);
  background-image:
    radial-gradient(ellipse 90% 55% at 50% 0, rgb(255 255 255 / .5), transparent 72%),
    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, 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 wrap crosses the top ribbon (frame y 25–34); the grip hangs from the bottom ribbon. */
body[data-visual-theme='pastel-princess'] .theme-frame-bow,
body[data-visual-theme='pastel-princess'][data-princess-motif] .theme-frame-bow { top: 25px; width: 8px; height: 9px; filter: none; }
body[data-visual-theme='pastel-princess'] .board-resize-handle { bottom: -23px; width: 24px; height: 20px; }
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 with one small heart every fourth line. */
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']:not([data-readability='high'])[data-paper='ruled'] .board-decoration::after {
  content: ''; position: absolute; top: 22px; bottom: 22px; left: 48px; width: 12px;
  background: color-mix(in srgb, var(--princess-rule) 72%, transparent);
  -webkit-mask: url('./assets/worlds-v207/hearts-and-bows/margin-heart.svg') center top / 12px 128px repeat-y;
  mask: url('./assets/worlds-v207/hearts-and-bows/margin-heart.svg') center top / 12px 128px repeat-y;
}
@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; }
  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; }
}
}

/* V208.5 Tidepool ------------------------------------------------------------------
   Coastal glass in three motif families (docs/world-art-v207.cjs): Sea glass (a thin,
   sandblasted bevel lit from above, whose tint is the only per-variant change, and an uneven
   matte pebble grip), Water-light (faint caustics in a band around the board, never on the paper
   or on phones) and Tide line (three fine strata below the board that bend around the grip).
   The pool border, shore, shells, kelp, coral, margin fronds and glints are retired. */
@media screen {
body[data-world-family='tidepool'][data-world-motif='sea-glass'] {
  --world-rail-top: url('./assets/worlds-v207/tidepool/sea-glass/rail-top.svg'); --world-rail-bottom: url('./assets/worlds-v207/tidepool/sea-glass/rail-bottom.svg');
  --world-rail-left: url('./assets/worlds-v207/tidepool/sea-glass/rail-left.svg'); --world-rail-right: url('./assets/worlds-v207/tidepool/sea-glass/rail-right.svg');
  --world-corner-tl: url('./assets/worlds-v207/tidepool/sea-glass/corner-tl.svg'); --world-corner-tr: url('./assets/worlds-v207/tidepool/sea-glass/corner-tr.svg');
  --world-corner-bl: url('./assets/worlds-v207/tidepool/sea-glass/corner-bl.svg'); --world-corner-br: url('./assets/worlds-v207/tidepool/sea-glass/corner-br.svg');
  --tide-lines: url('./assets/worlds-v207/tidepool/sea-glass/tide-lines.svg'); --tide-handle: url('./assets/worlds-v207/tidepool/sea-glass/handle.svg'); --wr-dots: url('./assets/worlds-v207/tidepool/sea-glass/dots.svg');
  --wr-margin: none; --wr-edge: none;
}
body[data-world-family='tidepool'][data-world-motif='kelp-forest'] {
  --world-rail-top: url('./assets/worlds-v207/tidepool/kelp-forest/rail-top.svg'); --world-rail-bottom: url('./assets/worlds-v207/tidepool/kelp-forest/rail-bottom.svg');
  --world-rail-left: url('./assets/worlds-v207/tidepool/kelp-forest/rail-left.svg'); --world-rail-right: url('./assets/worlds-v207/tidepool/kelp-forest/rail-right.svg');
  --world-corner-tl: url('./assets/worlds-v207/tidepool/kelp-forest/corner-tl.svg'); --world-corner-tr: url('./assets/worlds-v207/tidepool/kelp-forest/corner-tr.svg');
  --world-corner-bl: url('./assets/worlds-v207/tidepool/kelp-forest/corner-bl.svg'); --world-corner-br: url('./assets/worlds-v207/tidepool/kelp-forest/corner-br.svg');
  --tide-lines: url('./assets/worlds-v207/tidepool/kelp-forest/tide-lines.svg'); --tide-handle: url('./assets/worlds-v207/tidepool/kelp-forest/handle.svg'); --wr-dots: url('./assets/worlds-v207/tidepool/kelp-forest/dots.svg');
  --wr-margin: none; --wr-edge: none;
}
body[data-world-family='tidepool'][data-world-motif='coral-study'] {
  --world-rail-top: url('./assets/worlds-v207/tidepool/coral-study/rail-top.svg'); --world-rail-bottom: url('./assets/worlds-v207/tidepool/coral-study/rail-bottom.svg');
  --world-rail-left: url('./assets/worlds-v207/tidepool/coral-study/rail-left.svg'); --world-rail-right: url('./assets/worlds-v207/tidepool/coral-study/rail-right.svg');
  --world-corner-tl: url('./assets/worlds-v207/tidepool/coral-study/corner-tl.svg'); --world-corner-tr: url('./assets/worlds-v207/tidepool/coral-study/corner-tr.svg');
  --world-corner-bl: url('./assets/worlds-v207/tidepool/coral-study/corner-bl.svg'); --world-corner-br: url('./assets/worlds-v207/tidepool/coral-study/corner-br.svg');
  --tide-lines: url('./assets/worlds-v207/tidepool/coral-study/tide-lines.svg'); --tide-handle: url('./assets/worlds-v207/tidepool/coral-study/handle.svg'); --wr-dots: url('./assets/worlds-v207/tidepool/coral-study/dots.svg');
  --wr-margin: none; --wr-edge: none;
}
body[data-world-family='tidepool'] .world-surround > :is(.world-surround-left, .world-surround-right),
body[data-world-family='tidepool'] .world-night-light { display: none; }
/* The surround's clip-path already excludes the board, so the caustics only ring it. */
body[data-world-family='tidepool'][data-world-motif] .world-surround > .world-surround-upper {
  display: block; inset: -84px; width: auto; height: auto; border: 0; border-radius: 0; transform: none;
  background: url('./assets/worlds-v207/tidepool/water-light.svg') 0 0 / 320px 320px repeat; opacity: .12;
  -webkit-mask: linear-gradient(90deg, transparent, #000 56px, #000 calc(100% - 56px), transparent), linear-gradient(180deg, transparent, #000 56px, #000 calc(100% - 56px), transparent); -webkit-mask-composite: source-in;
  mask: linear-gradient(90deg, transparent, #000 56px, #000 calc(100% - 56px), transparent), linear-gradient(180deg, transparent, #000 56px, #000 calc(100% - 56px), transparent); mask-composite: intersect;
}
body[data-world-family='tidepool'][data-world-motif] .world-surround > .world-surround-upper::after { content: none; }
body[data-world-family='tidepool'][data-world-motif][data-theme='dark'] .world-surround > .world-surround-upper { opacity: .08; }
body[data-world-family='tidepool'] .world-surround > .world-surround-lower,
body[data-world-family='tidepool'][data-world-motif] .world-surround > .world-surround-lower {
  left: 50%; right: auto; width: calc(100% + 96px); max-width: calc(100cqw - 12px); bottom: -70px; height: auto; aspect-ratio: 1600 / 90;
  transform: translateX(-50%); background: var(--tide-lines) center / 100% auto no-repeat; filter: none;
  -webkit-mask: linear-gradient(90deg, transparent, #000 16%, #000 84%, transparent); mask: linear-gradient(90deg, transparent, #000 16%, #000 84%, transparent);
}
body[data-world-family='tidepool'] .ink-stage { margin-bottom: 96px; }
body[data-world-family='tidepool'][data-world-motif] .board-resize-handle { background: var(--tide-handle) center / contain no-repeat; }
body[data-world-family='tidepool'][data-world-motif] .editor-scroll {
  background-color: color-mix(in srgb, var(--nw-shell) 80%, #d8efe9);
  background-image: radial-gradient(ellipse 80% 50% at 50% 0, rgb(255 255 255 / .35), transparent 70%);
  background-size: auto; background-repeat: no-repeat; background-position: 0 0;
}
body[data-world-family='tidepool'][data-world-motif][data-theme='dark'] .editor-scroll { background-color: var(--nw-shell); background-image: none; }
body[data-world-family='tidepool'][data-theme='dark'] .world-surround > .world-surround-lower { filter: brightness(2.4) saturate(.6); opacity: .7; }
body[data-world-family='tidepool'][data-theme='dark'] .theme-frame { filter: none; opacity: .6; }
@container world-desk (max-width: 700px) {
  body[data-world-family='tidepool'] .world-surround > :is(.world-surround-upper, .world-surround-lower) { display: none; }
  body[data-world-family='tidepool'] .ink-stage { margin-bottom: 72px; }
}
}
/* Verdict marks must stay legible on every dark board (they were near-invisible on
   Tidepool/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); }

/* 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, double gilt rules and corner fleurons; 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; --lib-fleuron: oxblood-ivory; }
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/cloth-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 / .10), 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);
}
body[data-world-family='heirloom-library'][data-world-motif='forest-bookcloth'] .world-surround .world-surround-upper { background-size: auto, auto, 8px 8px, auto; }
/* Double gilt rule with a fleuron in each corner. */
body[data-world-family='heirloom-library'] .world-surround-upper::after {
  inset: 7px; border: 1px solid color-mix(in srgb, var(--lib-foil) 72%, transparent); border-radius: 5px;
  outline: 1px solid color-mix(in srgb, var(--lib-foil) 40%, transparent); outline-offset: -4px;
  box-shadow: none;
  background:
    var(--lib-fleuron-tl) left 3px top 3px / 20px 20px no-repeat, var(--lib-fleuron-tr) right 3px top 3px / 20px 20px no-repeat,
    var(--lib-fleuron-bl) left 3px bottom 3px / 20px 20px no-repeat, var(--lib-fleuron-br) right 3px bottom 3px / 20px 20px no-repeat;
}
body[data-world-family='heirloom-library'][data-world-motif='oxblood-ivory'] {--lib-fleuron-tl: url('./assets/worlds-v207/heirloom-library/fleuron-oxblood-ivory-tl.svg'); --lib-fleuron-tr: url('./assets/worlds-v207/heirloom-library/fleuron-oxblood-ivory-tr.svg'); --lib-fleuron-bl: url('./assets/worlds-v207/heirloom-library/fleuron-oxblood-ivory-bl.svg'); --lib-fleuron-br: url('./assets/worlds-v207/heirloom-library/fleuron-oxblood-ivory-br.svg'); }
body[data-world-family='heirloom-library'][data-world-motif='midnight-library'] {--lib-fleuron-tl: url('./assets/worlds-v207/heirloom-library/fleuron-midnight-library-tl.svg'); --lib-fleuron-tr: url('./assets/worlds-v207/heirloom-library/fleuron-midnight-library-tr.svg'); --lib-fleuron-bl: url('./assets/worlds-v207/heirloom-library/fleuron-midnight-library-bl.svg'); --lib-fleuron-br: url('./assets/worlds-v207/heirloom-library/fleuron-midnight-library-br.svg'); }
body[data-world-family='heirloom-library'][data-world-motif='forest-bookcloth'] {--lib-fleuron-tl: url('./assets/worlds-v207/heirloom-library/fleuron-forest-bookcloth-tl.svg'); --lib-fleuron-tr: url('./assets/worlds-v207/heirloom-library/fleuron-forest-bookcloth-tr.svg'); --lib-fleuron-bl: url('./assets/worlds-v207/heirloom-library/fleuron-forest-bookcloth-bl.svg'); --lib-fleuron-br: url('./assets/worlds-v207/heirloom-library/fleuron-forest-bookcloth-br.svg'); }
/* 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 carries a faint printed text block, so the spread reads as a book. */
body[data-world-family='heirloom-library'] .world-surround-left::after {
  content: ''; position: absolute; inset: 26px 16px 34px 18px; pointer-events: none;
  background: repeating-linear-gradient(180deg, transparent 0 8px, color-mix(in srgb, var(--lib-shadow) 16%, transparent) 8px 9.2px);
  -webkit-mask: linear-gradient(90deg, #000 70%, transparent); mask: linear-gradient(90deg, #000 70%, transparent);
}
/* Striped headband at the head of the spine, beside the gutter. */
body[data-world-family='heirloom-library'] .world-surround-left::before {
  content: ''; position: absolute; top: -3px; right: -4px; width: 12px; height: 7px; border-radius: 3px 3px 1px 1px; pointer-events: none;
  background: repeating-linear-gradient(90deg, var(--lib-ribbon) 0 2px, #f3e7cf 2px 4px); box-shadow: 0 1px 1px rgb(20 12 8 / .35);
}
body[data-world-family='heirloom-library'][data-theme='dark'] .world-surround .world-surround-upper { filter: brightness(.82); }
@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-registration: url('./assets/worlds-v207/art-room/gouache-garden/registration.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-registration: url('./assets/worlds-v207/art-room/blue-pencil/registration.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-registration: url('./assets/worlds-v207/art-room/terracotta-studio/registration.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;
}
/* 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(90deg, rgb(255 255 255 / .11) 1px, transparent 1px) 0 0 / 120px 120px, linear-gradient(180deg, rgb(255 255 255 / .11) 1px, transparent 1px) 0 0 / 120px 120px, linear-gradient(90deg, rgb(255 255 255 / .07) 1px, transparent 1px) 0 0 / 24px 24px, linear-gradient(180deg, rgb(255 255 255 / .07) 1px, transparent 1px) 0 0 / 24px 24px, var(--art-mat);
  border-color: color-mix(in srgb, var(--art-mat) 78%, #000);
}
/* One registration target above the sheet and one strip of pigment chips below it. */
body[data-world-family='art-room'][data-world-motif] .world-surround .world-surround-upper::before,
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-upper::before {
  top: 5px; left: calc(50% - 7px); width: 14px; height: 14px; background: var(--art-registration) center / contain no-repeat;
}
body[data-world-family='art-room'][data-world-motif] .world-surround .world-surround-lower::after {
  right: 72px; bottom: 7px; width: 71px; height: 10.5px; background: var(--art-swatch) center / contain no-repeat;
}
body[data-world-family='art-room'][data-world-motif] .board-resize-handle { bottom: -32px; background: var(--art-handle) center / contain no-repeat; }
body[data-world-family='art-room'][data-theme='dark'] .theme-frame { filter: brightness(.55) saturate(.8); }
body[data-world-family='art-room'] .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: .35; }
@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] .board-resize-handle { bottom: -22px; }
  body[data-world-family='art-room'][data-world-motif] .world-surround .world-surround-upper::before,
  body[data-world-family='art-room'][data-world-motif] .world-surround .world-surround-lower::after { display: none; }
}
}
