/* The Calendar maker under ?ui=2 (design overhaul, Shop S7, first pass): the maker's own palette, type and shapes replaced by the new tokens.
   Loaded after calendar/css/app.css and UNLAYERED on purpose: app.css is unlayered too, so order decides, and the tokens (css/nm-tokens.css, a layer) only supply values.
   The page preview (.paper, the SVG pages) and the accent swatches are the product and are not touched. Its sheets, task list and page strip keep their structure. */
:root { --bg: var(--ui-night); --panel: var(--ui-surface-1); --line: var(--ui-line); --ink: var(--ui-text); --muted: var(--ui-muted); --gold: var(--ui-accent); }
html, body { font: 400 var(--ui-size-body) / var(--ui-lh-body) var(--ui-font-sans); -webkit-font-smoothing: antialiased; }
a { color: var(--ui-accent); }
:focus-visible { outline: 2px solid var(--ui-focus); outline-offset: 2px; }
.top-title h1, .stage-name, .sheet-head h2, .modal-card h2 { font-family: var(--ui-font-serif); font-weight: 700; letter-spacing: -0.01em; }
.top-title h1 { font-size: var(--ui-size-display); line-height: var(--ui-lh-display); }
.stage-name, .sheet-head h2, .modal-card h2 { font-size: var(--ui-size-title); line-height: var(--ui-lh-title); }
.block h2, .small-h { font: 500 var(--ui-size-label) / var(--ui-lh-label) var(--ui-font-mono); letter-spacing: var(--ui-track-label); color: var(--ui-muted); }
.small-h { margin-top: var(--ui-space-2); }
.hint, .small, .res { color: var(--ui-muted); font-size: var(--ui-size-small); line-height: var(--ui-lh-small); }
.zoom-val { font-family: var(--ui-font-mono); }

/* buttons */
button:not([class*="ui-"]) { font: 600 var(--ui-size-body) / 1 var(--ui-font-sans); border-radius: var(--ui-radius-control); border-color: var(--ui-line-strong); background: var(--ui-surface-2); color: var(--ui-text); }
button:not([class*="ui-"]):hover { background: var(--ui-surface-3); border-color: var(--ui-muted); }
button.primary { background: var(--ui-action); border-color: var(--ui-action); color: var(--ui-on-action); }
button.primary:hover { filter: brightness(1.08); background: var(--ui-action); border-color: var(--ui-action); }
.seg button[aria-pressed=true], .tasks button[aria-expanded=true] { border-color: var(--ui-action); background: var(--ui-action); color: var(--ui-on-action); }
.pages button { border-radius: var(--ui-radius-control); color: var(--ui-text); background: none; border-color: transparent; }
.pages button:hover { background: var(--ui-surface-2); }
.pages button[aria-current=true] { border-color: var(--ui-accent); background: var(--ui-surface-2); }
.pages .dot { background: var(--ui-line-strong); } .pages .dot.on { background: var(--ui-accent); }
.swatches button[aria-pressed=true] { border-color: var(--ui-text); }

/* fields */
.field input[type=text], .field input[type=number], .field textarea, .field select, .ptile .pact select {
  background: var(--ui-surface-2); border: 1px solid var(--ui-line-strong); border-radius: var(--ui-radius-control); color: var(--ui-text); font: 400 var(--ui-size-body) / 1.2 var(--ui-font-sans);
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--ui-accent); box-shadow: 0 0 0 1px var(--ui-accent); }
.field select option { background: var(--ui-surface-1); color: var(--ui-text); }
@media (max-width: 599px) { .field input, .field textarea, .field select { font-size: 16px; } }
.field { font-weight: 500; font-size: var(--ui-size-small); color: var(--ui-text-2); }
.drop { border-color: var(--ui-line-strong); border-radius: var(--ui-radius-card); color: var(--ui-muted); }
.drop:hover, .drop.over { border-color: var(--ui-accent); color: var(--ui-text); }

/* surfaces */
.top { border-bottom-color: var(--ui-line); }
.pages, .panel { border-color: var(--ui-line); }
.sheet { background: var(--ui-surface-1); border-left-color: var(--ui-line); }
.sheet.dock { box-shadow: var(--ui-shadow-sheet); }
.sheet-back { background: var(--ui-scrim); }
.sheet-head { border-bottom-color: var(--ui-line); }
.sheet-x { border-radius: var(--ui-radius-control); }
.order, .ptile { border-color: var(--ui-line); border-radius: var(--ui-radius-card); background: var(--ui-surface-2); }
.ptile.cur { border-color: var(--ui-accent); }
.progress { border-color: var(--ui-line); border-radius: var(--ui-radius-control); } .progress .bar { background: var(--ui-accent-wash); }
.modal { background: var(--ui-scrim); }
.modal-card { background: var(--ui-surface-1); border-color: var(--ui-line-strong); border-radius: var(--ui-radius-card); }
.spinner { border-color: var(--ui-line-strong); border-top-color: var(--ui-accent); }
.guest-note { background: var(--ui-surface-2); border-bottom-color: var(--ui-line); color: var(--ui-text-2); }
.res.good, .ok { color: var(--ui-good); } .res.bad, .bad { color: var(--ui-problem); } .res.warn, .modal-card .bad { color: var(--ui-caution); }

/* S7b: the page under the flag has the shell and the kit sheet */
html.ui-shell-on body { padding-bottom: var(--ui-shell-bottom); padding-left: var(--ui-shell-left); }
.ui-sheet__body > .sheet-body { padding: 0; overflow: visible; }   /* the maker's own sheet body, lent to the kit sheet */
.ui-sheet__body .block > h2 { display: none; }
.ui-sheet .field, .ui-sheet .block, .ui-sheet button, .ui-sheet input, .ui-sheet select, .ui-sheet textarea { font-family: var(--ui-font-sans); }
