:root {
  color-scheme: dark;
  --void: #13161b;
  --paper: #191d24;
  --raised: #222832;
  --well: #101317;
  --line: #363f4a;
  --fine: #2b333d;
  --ink: #f5eee3;
  --muted: #b7c0c9;
  --quiet: #99a8b6;
  --gold: #e8c286;
  --gold-well: #362b1e;
  --focus: #9bceec;
  --good: #a9dcc5;
  --bad: #ffb3a9;
  font: 100%/1.45 system-ui, sans-serif;
  background: var(--void);
  color: var(--ink);
  scrollbar-color: #526273 var(--well);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100dvh; display: flex; flex-direction: column; }
main { flex: 1; min-width: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button, .button, input, select, textarea { border: 1px solid var(--line); border-radius: .375rem; background: var(--well); }
button, .button { min-height: 2.375rem; padding: .375rem .75rem; display: inline-flex; align-items: center; justify-content: center; gap: .43rem; font-size: .875rem; font-weight: 620; text-decoration: none; white-space: nowrap; }
button, select { cursor: pointer; }
button:hover, .button:hover { border-color: var(--quiet); background: var(--raised); }
button:disabled { cursor: default; opacity: .44; }
.primary { background: var(--gold); color: #20170b; border-color: var(--gold); }
.primary:hover { background: #f5d4a1; border-color: #f5d4a1; }
.quiet-button { background: transparent; border-color: transparent; }
a { color: var(--gold); text-underline-offset: .23em; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
::selection { background: var(--gold); color: var(--well); }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.16; letter-spacing: -.022em; }
h1 { font-size: 2rem; }
h2 { font-size: 1.1875rem; }
h3 { font-size: .9375rem; }
small, .muted { color: var(--muted); }
.mono, code, textarea { font-family: ui-monospace, Consolas, monospace; font-variant-numeric: tabular-nums; }
svg { width: 1.05rem; height: 1.05rem; flex: none; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.masthead { display: flex; align-items: center; gap: 1rem; min-height: 4.35rem; padding: .5rem 1.25rem; background: var(--well); border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; flex: none; }
.brand img { width: 4rem; height: 3rem; object-fit: contain; }
.mast-name { color: var(--ink); font-weight: 730; border-left: 1px solid var(--line); padding-left: 1rem; white-space: nowrap; }
.masthead nav { display: flex; gap: .25rem; margin-left: 1rem; }
.masthead nav button { background: transparent; border-color: transparent; color: var(--muted); }
.masthead nav button[aria-current="page"] { background: var(--raised); color: var(--ink); border-color: var(--fine); }
#account { margin-left: auto; color: var(--ink); }
.loading, .message { padding: 2rem; color: var(--muted); }
.site-footer { padding: .85rem 1.25rem; color: var(--quiet); background: var(--well); font-size: .75rem; border-top: 1px solid var(--fine); }
.shelf { max-width: 80rem; margin: 0 auto; padding: 3rem 1.5rem; }
.shelf-heading { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem; margin: 0 0 1.5rem; }
.shelf-heading p { color: var(--muted); margin-top: .55rem; max-width: 60ch; }
.sign-in { display: grid; grid-template-columns: minmax(17rem, .9fr) minmax(0, 1.15fr); min-height: 24rem; margin-block: 1rem 3rem; isolation: isolate; border: 1px solid var(--line); }
.sign-in-copy { padding: clamp(1.25rem, 4vw, 3.75rem); place-self: center start; }
.sign-in h1 { font-size: 2.75rem; max-width: 17ch; }
.sign-in p { color: var(--muted); margin: 1rem 0 1.5rem; max-width: 34ch; }
.sign-in-art { position: relative; min-width: 0; overflow: hidden; border-left: 1px solid var(--line); background-color: #161b23; background-image: linear-gradient(#46566a44 1px,transparent 1px),linear-gradient(90deg,#46566a44 1px,transparent 1px); background-size: 28px 28px; }
.sign-in-art img { position: absolute; width: 100%; height: 100%; inset: 0; object-fit: contain; padding: 1rem; }
.welcome-map img { transform: translateX(9%) scale(2.05); }
.sign-in-art figcaption { position: absolute; bottom: .8rem; right: .9rem; background: var(--well); padding: .3rem .55rem; font-size: .75rem; color: var(--muted); border: 1px solid var(--line); }
figure { margin: 0; }
.shelf-list { border-top: 1px solid var(--line); }
.template-library { margin-top: 2.5rem; }
.template-filters { display: grid; grid-template-columns: minmax(0, 22rem) minmax(0, 10rem); gap: .75rem; margin: .9rem 0; }
.shelf-row { display: grid; grid-template-columns: minmax(0,1fr) 8rem auto; padding: .85rem .25rem; gap: 1rem; align-items: center; border-bottom: 1px solid var(--fine); }
.shelf-row-community { grid-template-columns: minmax(0,1fr) auto 6.25rem auto; }
.shelf-info { min-width: 0; }
.shelf-row h3 { overflow-wrap: anywhere; }
.shelf-row small { display: block; margin-top: .3rem; }
.shelf-row small a { white-space: nowrap; }
.shelf-row > button { justify-self: end; }
.map-author { color: var(--muted); }
.map-author strong, .map-byline strong { color: var(--ink); font-weight: 650; }
.rating-control { display: grid; gap: .18rem; justify-items: end; }
.rating-row { display: inline-flex; align-items: center; gap: .48rem; }
.rating-stars { display: inline-flex; align-items: center; gap: .08rem; }
.star-btn { min-height: 1.75rem; min-width: 1.55rem; padding: .15rem; border: 0; border-radius: .25rem; background: transparent; color: var(--line); display: inline-flex; align-items: center; justify-content: center; transition: transform .12s ease, color .12s ease; }
.star-btn:hover:not(:disabled) { border-color: transparent; background: transparent; transform: scale(1.1); }
.star-btn:disabled { opacity: 1; cursor: default; }
.star-svg { width: 1.05rem; height: 1.05rem; display: block; overflow: visible; }
.star-base { fill: transparent; stroke: #4e5a68; stroke-width: 1.6; }
.star-fill { fill: var(--gold); stroke: var(--gold); stroke-width: 1.2; transition: fill .12s ease, stroke .12s ease; }
.rating-stars.previewing .star-fill { fill: #f5d49c; stroke: #f5d49c; }
.rating-stars.interactive .star-btn:hover .star-base { stroke: var(--gold); }
.rating-meta { display: inline-flex; align-items: baseline; gap: .26rem; font-size: .8125rem; font-variant-numeric: tabular-nums; white-space: nowrap; min-width: 4.6rem; }
.rating-score { color: var(--ink); font-weight: 680; }
.rating-count, .rating-empty { color: var(--quiet); font-size: .78rem; }
.rating-yours { color: var(--gold); font-size: .72rem; font-variant-numeric: tabular-nums; }
.rating-detail { justify-items: start; margin: -.35rem 0 1.25rem; padding: .65rem .8rem; background: var(--paper); border: 1px solid var(--fine); border-radius: .45rem; }
.rating-detail .star-svg { width: 1.22rem; height: 1.22rem; }
.rating-detail .star-btn { min-height: 2rem; min-width: 1.8rem; }
.rating-hint { color: var(--muted); font-size: .78rem; }
.project-actions { display: flex; gap: .5rem; flex-wrap: wrap; justify-content: flex-end; }
.delete-project { color: var(--muted); background: transparent; border-color: transparent; }
.delete-project:hover { color: var(--bad); }
.danger-button { color: #2a1112; background: var(--bad); border-color: var(--bad); }
.danger-button:hover { color: #2a1112; background: #ffc9c2; border-color: #ffc9c2; }
dialog .dialog-error { margin-top: .75rem; color: var(--bad); }
.status-label { color: var(--gold); font-size: .8125rem; }
.workspace { display: grid; grid-template-rows: auto minmax(0, 1fr); height: max(39rem, calc(100dvh - 6.5rem)); }
.document-bar { background: var(--paper); border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .65rem 1rem; padding: .65rem 1.1rem; }
.document-title { display: flex; align-items: center; gap: .75rem; min-width: 0; }
.document-title h1 { font-size: 1.22rem; overflow-wrap: anywhere; }
.document-title small { display: block; font-size: .75rem; margin-top: .14rem; }
.button-row { display: flex; flex-wrap: wrap; gap: .375rem; align-items: center; }
.modes { display: flex; border: 1px solid var(--line); padding: .125rem; border-radius: .45rem; background: var(--well); }
.modes button { min-height: 1.95rem; border-color: transparent; background: transparent; color: var(--muted); }
.modes button[aria-pressed="true"], .tool[aria-pressed="true"] { background: var(--gold-well); color: var(--gold); border-color: #6b5436; }
.editor-grid { display: grid; grid-template-columns: 13.25rem minmax(0,1fr) 17.25rem; min-height: 0; }
.pane { min-height: 0; min-width: 0; background: var(--paper); overflow: auto; }
.explorer { border-right: 1px solid var(--line); }
.inspector { border-left: 1px solid var(--line); }
.pane-head { position: sticky; top: 0; z-index: 1; background: var(--paper); display: flex; align-items: center; justify-content: space-between; gap: .25rem; padding: .8rem .85rem; border-bottom: 1px solid var(--fine); }
.pane-head h2 { font-size: .875rem; letter-spacing: 0; }
.pane-body { padding: .85rem; display: grid; gap: .8rem; align-content: start; }
.pane-body p, .pane-body summary { font-size: .875rem; }
.pane-body h3 { padding-top: .25rem; }
.tree-list { display: grid; gap: .15rem; }
.tree-list button { width: 100%; min-width: 0; justify-content: start; text-align: left; padding-inline: .55rem; background: none; border-color: transparent; }
.tree-list button:hover { background: var(--raised); }
.tree-list button[aria-current="true"] { background: var(--gold-well); color: var(--gold); }
.tree-list button span { text-overflow: ellipsis; overflow: hidden; }
.tree-list .folder-title { display: flex; gap: .45rem; align-items: center; color: var(--quiet); font-size: .8125rem; padding: .3rem .4rem; overflow-wrap: anywhere; }
.stage, .code-stage { display: grid; position: relative; min-width: 0; min-height: 0; grid-template-rows: auto minmax(0,1fr) auto; background: var(--well); }
.tools { background: var(--paper); display: flex; flex-wrap: wrap; gap: .25rem; padding: .45rem; align-items: center; border-bottom: 1px solid var(--line); }
.tool { background: none; border-color: transparent; min-height: 2.125rem; padding-inline: .5rem; }
.tools .fit { margin-left: auto; }
.map-viewport { position: relative; min-height: 14rem; overflow: hidden; }
canvas { display: block; position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; }
.map-viewport:has(canvas:focus-visible) { outline: 2px solid var(--focus); outline-offset: -3px; }
.map-stats { padding: .43rem .7rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: .3rem .9rem; border-top: 1px solid var(--line); background: var(--paper); color: var(--muted); font-size: .75rem; }
.map-stats span { min-width: 0; overflow-wrap: anywhere; }
.form-grid { display: grid; gap: .72rem; }
label { display: grid; gap: .25rem; color: var(--muted); font-size: .8125rem; }
.check { display: flex; align-items: center; gap: .4rem; }
input:not([type="checkbox"]), select, textarea { display: block; width: 100%; min-width: 0; min-height: 2.3rem; padding: .37rem .49rem; }
select { text-overflow: ellipsis; }
input:focus, select:focus, textarea:focus { border-color: var(--focus); }
textarea { resize: vertical; line-height: 1.5; font-size: .8125rem; }
.prop-preview { background: var(--well); border: 1px solid var(--line); border-radius: .375rem; }
.prop-preview canvas { position: static; width: 100%; height: auto; max-height: 5.75rem; object-fit: contain; }
.pair { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .5rem; }
summary { cursor: pointer; color: var(--gold); }
details > div, details > label { margin-top: .65rem; }
.code-meta { padding: .55rem .7rem; display: flex; gap: .5rem; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.code-meta .mono { overflow-wrap: anywhere; font-size: .8125rem; }
.code-stage > textarea { width: 100%; height: 100%; resize: none; border-radius: 0; border: 0; padding: 1rem; tab-size: 2; }
.code-stage > textarea:focus-visible { outline-offset: -2px; }
.empty-state { color: var(--muted); padding: 1.5rem 0; }
dialog { width: min(35rem,calc(100% - 2rem)); max-height: calc(100dvh - 2rem); border: 1px solid var(--line); border-radius: .875rem; padding: 1.25rem; color: var(--ink); background: var(--paper); }
dialog::backdrop { background: #080a0dbd; }
dialog h2 { margin-bottom: .7rem; }
dialog p { color: var(--muted); }
dialog .button-row { justify-content: end; margin-top: 1rem; }
.error { color: var(--bad); }
.test-panel { grid-template-columns: minmax(0, 1fr); }
.test-panel .map-viewport { min-height: 19rem; }
.test-actions { display: flex; flex-wrap: wrap; gap: .4rem; }
.test-actions button { touch-action: none; }
.test-note { color: var(--gold); }
.hero-head { width: 2.375rem; height: 2.375rem; object-fit: contain; background: var(--well); border: 1px solid var(--line); border-radius: .375rem; }
#notice { position: fixed; bottom: 1rem; right: 1rem; z-index: 9; max-width: min(28rem, calc(100vw - 2rem)); padding: .75rem 1rem; border: 1px solid var(--line); border-radius: .5rem; background: var(--raised); color: var(--ink); box-shadow: 0 .45rem 1.8rem #0006; }
#notice.error { color: var(--bad); }
@media (max-width: 1080px) {
  .editor-grid { grid-template-columns: 10.5rem minmax(0, 1fr) 14rem; }
  .test-panel { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 790px) {
  .workspace { height: auto; }
  .editor-grid:not(.test-panel) { grid-template-columns: minmax(0,1fr) minmax(0,1fr); grid-template-rows: auto auto; }
  .stage, .code-stage { grid-column: 1 / -1; grid-row: 1; min-height: 23rem; }
  .explorer, .inspector { max-height: 36rem; border-top: 1px solid var(--line); }
  .explorer { border-right: 0; }
  .shelf { padding: 1.5rem 1rem; }
  .sign-in { min-height: 18rem; }
  .sign-in h1 { font-size: 2rem; }
  .shelf-row-community { grid-template-columns: minmax(0,1fr) auto; row-gap: .55rem; }
  .shelf-row-community .rating-control { grid-column: 1; grid-row: 2; justify-items: start; }
  .shelf-row-community .status-label { grid-column: 2; grid-row: 2; justify-self: end; }
  .shelf-row-community > button { grid-column: 2; grid-row: 1; }
}
@media (max-width: 540px) {
  .masthead { flex-wrap: wrap; gap: .45rem .7rem; padding: .5rem .75rem; }
  .masthead nav { order: 2; flex: 1 0 100%; margin: 0; }
  .brand img { width: 3.4rem; height: 2.55rem; }
  .mast-name { padding-left: .7rem; }
  .sign-in { grid-template-columns: minmax(0,1fr); margin-top: 0; }
  .sign-in-copy { padding: 1.25rem; }
  .sign-in-art { min-height: 12.5rem; border-left: 0; border-top: 1px solid var(--line); }
  .shelf-row { grid-template-columns: minmax(0,1fr) auto; gap: .5rem; }
  .shelf-row .status-label { grid-column: 1; grid-row: 2; }
  .shelf-row > button { grid-area: 1 / 2; }
  .shelf-row-community .rating-control { grid-column: 1; grid-row: 2; justify-items: start; }
  .shelf-row-community .status-label { grid-column: 2; grid-row: 2; justify-self: end; }
  .shelf-row-community > button { grid-area: 1 / 2; }
  .shelf-row:has(.project-actions) { grid-template-columns: minmax(0,1fr) auto; }
  .shelf-row:has(.project-actions) .status-label { grid-area: 1 / 2; }
  .project-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .editor-grid:has(.stage):not(.test-panel) { grid-template-columns: minmax(0,1fr); }
  .editor-grid:has(.stage):not(.test-panel) .inspector { grid-row: 2; border-left: 0; }
  .document-bar { padding-inline: .55rem; }
  .pane-body, .pane-head { padding-inline: .55rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
}

/* Palette previews */
.palette-field { display: grid; gap: .35rem; min-width: 0; }
.palette-chooser { padding: 0; min-width: 0; }
.palette-chooser summary, .palette-list button { display: flex; align-items: center; gap: .5rem; text-align: left; min-height: 2.5rem; }
.palette-chooser summary { padding: .4rem; }
.palette-chooser summary::after { content: ''; width: .42rem; height: .42rem; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); margin: 0 .4rem 0 auto; flex: none; }
.palette-chooser[open] summary::after { transform: rotate(225deg); }
.palette-chooser input { width: calc(100% - .8rem); margin: .3rem .4rem; }
.palette-list { max-height: 19rem; overflow-y: auto; display: grid; gap: .2rem; padding: .4rem; scrollbar-gutter: stable; }
.palette-list button { justify-content: flex-start; white-space: normal; padding: .25rem .4rem; }
.palette-list button[aria-pressed="true"] { border-color: var(--gold); background: var(--gold-well); }
.palette-list button[aria-pressed="true"]::after { content: '✓'; margin-left: auto; color: var(--gold); }
.palette-thumb { width: 3rem; height: 2.6rem; flex: none; background: var(--well); color: var(--quiet); display: inline-grid; place-items: center; }
.palette-thumb canvas { position: static; width: 100%; height: 100%; object-fit: contain; touch-action: auto; }
.palette-caption { display: grid; gap: .12rem; overflow-wrap: anywhere; line-height: 1.25; min-width: 0; }
.palette-caption small { color: var(--muted); font-weight: 400; }
.line-swatch { flex: none; width: 1.5rem; height: .2rem; background: currentColor; transform: rotate(-16deg); }
.selection-title { display: flex; align-items: center; gap: .5rem; overflow-wrap: anywhere; }
.palette-map { display: inline-grid; position: relative; width: 2.8rem; height: 2.8rem; flex: none; place-items: center; color: var(--gold); border: 1px solid var(--line); border-radius: .25rem; overflow: hidden; }
.palette-map img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.template-name, .template-preview { display: flex; gap: .65rem; align-items: center; min-width: 0; }
.template-preview select { min-width: 0; flex: 1; }

/* Enemy templates, cutscene config & playtest HUD */
.preset-card { display: grid; gap: .38rem; padding: .55rem .65rem; border: 1px solid var(--line); border-radius: .375rem; background: var(--well); font-size: .78rem; }
.preset-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.preset-pill { display: inline-flex; align-items: center; gap: .35rem; font-weight: 700; font-size: .75rem; letter-spacing: .02em; text-transform: uppercase; }
.preset-dot { width: .58rem; height: .58rem; border-radius: 999px; flex: none; background: currentColor; }
.preset-meta { color: var(--muted); font-size: .75rem; line-height: 1.35; }
.cutscene-box { display: grid; gap: .55rem; padding: .6rem .65rem; border: 1px solid var(--line); border-radius: .375rem; background: var(--well); }
.boss-hud { position: absolute; top: .75rem; left: 50%; transform: translateX(-50%); width: min(28rem, calc(100% - 1.5rem)); padding: .55rem .75rem; background: #101317e8; border: 1px solid var(--line); border-radius: .5rem; z-index: 3; pointer-events: none; display: grid; gap: .35rem; box-shadow: 0 .4rem 1.4rem #0008; }
.boss-hud-head { display: flex; align-items: center; justify-content: space-between; gap: .6rem; font-size: .82rem; font-weight: 700; }
.boss-hud-bar { height: .55rem; background: var(--raised); border-radius: 999px; overflow: hidden; border: 1px solid var(--fine); }
.boss-hud-fill { height: 100%; border-radius: 999px; transition: width .12s ease-out; }
.cutscene-hud { position: absolute; left: 50%; bottom: .85rem; transform: translateX(-50%); width: min(36rem, calc(100% - 1.5rem)); padding: .85rem 1rem; background: #101317f2; border: 1px solid var(--gold); border-radius: .65rem; z-index: 4; display: grid; gap: .55rem; box-shadow: 0 .6rem 2rem #000b; }
.cutscene-hud-body { display: flex; align-items: center; gap: .8rem; min-width: 0; }
.cutscene-portrait { flex: none; }
.cutscene-portrait .palette-thumb { width: 4rem; height: 3.6rem; border: 1px solid var(--line); border-radius: .45rem; }
.cutscene-hud-copy { flex: 1; min-width: 0; display: grid; gap: .3rem; }
.cutscene-hud-head { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.cutscene-hud-speaker { font-weight: 730; font-size: .95rem; color: var(--ink); }
.cutscene-hud-line { font-size: .9375rem; line-height: 1.5; color: var(--ink); margin: 0; }
.cutscene-hud-actions { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }

/* Real Ruffle live playtest viewport */
.ruffle-viewport { position: relative; background: #08090d; min-height: 28rem; overflow: hidden; }
.ruffle-host { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.ruffle-host ruffle-player, .ruffle-host ruffle-embed, .ruffle-host ruffle-object { width: 100% !important; height: 100% !important; display: block; }
.ruffle-loader { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .75rem; background: radial-gradient(circle at 50% 42%, #181c24 0%, #090b0f 100%); padding: 1.5rem; text-align: center; transition: opacity .26s ease; }
.ruffle-loader.done { opacity: 0; pointer-events: none; }
.ruffle-loader-title { font-size: 1.25rem; font-weight: 730; color: var(--ink); letter-spacing: .01em; }
.ruffle-loader-status { font-size: .9rem; color: var(--muted); }
.ruffle-loader.error .ruffle-loader-status { color: #ff8e80; }
.ruffle-loader-bar { width: min(22rem, 80%); height: .45rem; background: #1d222c; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.ruffle-loader-fill { height: 100%; width: 8%; background: linear-gradient(90deg, #b98b2d, #ffd46b); border-radius: 999px; transition: width .22s ease; }

/* Room progression badges & art layer / flip / angle controls (7.80.0) */
.room-btn { gap: .38rem; }
.room-step { flex: none; min-width: 1.25rem; height: 1.25rem; border-radius: .25rem; background: var(--well); border: 1px solid var(--fine); color: var(--quiet); font-size: .7rem; display: inline-flex; align-items: center; justify-content: center; }
.tree-list button[aria-current="true"] .room-step { border-color: #6b5436; color: var(--gold); }
.room-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.room-badge { flex: none; padding: .08rem .32rem; border-radius: .22rem; font-size: .62rem; font-weight: 760; letter-spacing: .04em; text-transform: uppercase; line-height: 1.3; }
.room-badge.start { background: #1d3a2c; color: #96e6bd; border: 1px solid #356e52; }
.room-badge.boss { background: #3e1d23; color: #ff9c9e; border: 1px solid #7d3540; }
.room-order-hint { font-size: .72rem; color: var(--quiet); font-weight: 500; }
.art-panel-box { display: grid; gap: .55rem; padding: .6rem .65rem; border: 1px solid var(--line); border-radius: .375rem; background: var(--well); }
.art-panel-head { display: flex; align-items: center; justify-content: space-between; gap: .4rem; font-size: .78rem; font-weight: 680; color: var(--ink); }
.pill-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(2rem, 1fr)); gap: .25rem; }
.pill-row.layers-7 { grid-template-columns: 2.35rem repeat(6, minmax(0, 1fr)); }
.pill-row.layers-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.pill-row.angles-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pill-row.steps-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.pill-btn { min-height: 1.85rem; padding: .2rem .25rem; font-size: .75rem; font-weight: 680; background: var(--paper); border: 1px solid var(--line); color: var(--muted); }
.pill-btn:hover { color: var(--ink); border-color: var(--quiet); }
.pill-btn[aria-pressed="true"] { background: var(--gold-well); color: var(--gold); border-color: #8c6c3f; }
.scale-head { display: flex; align-items: center; justify-content: space-between; gap: .4rem; }
.scale-head .check { font-size: .76rem; }
.mini-btn { min-height: 1.8rem; padding: .2rem .45rem; font-size: .76rem; }
.rotate-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .35rem; align-items: end; }
.armed-banner { display: flex; align-items: center; justify-content: space-between; gap: .4rem; padding: .4rem .55rem; border-radius: .35rem; background: #162634; border: 1px solid #3c6d91; color: #c5ecff; font-size: .76rem; }
.armed-banner span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
