/* Dezio dashboard. Shared tokens are in /assets/tokens.css. */
a { color: var(--text); }
.ic { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.quiet { margin: 0; color: var(--text-3); font-size: 14px; }
.error { color: var(--bad); }

/* the diamond: the logo's top facet, used as the mark on every control */
.fader-thumb, .switch-knob, .pop-item[aria-selected="true"] .pop-on, .nav-row.active::before, .subnav a.on::before {
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}

/* layout */
.layout { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; display: flex; flex-direction: column; height: 100vh; padding: 16px 12px 12px; background: var(--ink); border-right: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 8px; color: var(--text); font-size: 16px; font-weight: 500; text-decoration: none; }
.side-nav { flex: 1; min-height: 0; margin-top: 8px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--raised) transparent; }
.side-nav h4 { margin: 24px 8px 8px; color: var(--text-3); font: 400 12px/16px var(--font); }
.side-nav .quiet { padding: 0 8px; }
.nav-row { position: relative; display: flex; align-items: center; gap: 8px; width: 100%; height: 36px; margin-bottom: 2px; padding: 0 8px 0 16px; border: 0; border-radius: 8px; background: none; color: var(--text-2);
  font: 400 14px/20px var(--font); text-align: left; cursor: pointer; transition: background-color var(--fast) var(--ease), color var(--fast) var(--ease); }
.nav-row:hover:not(:disabled) { background: var(--card); color: var(--text); }
.nav-row.active { background: var(--raised); color: var(--text); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05); }
.nav-row.active::before { content: ""; position: absolute; left: 5px; top: 14px; width: 8px; height: 8px; background: var(--accent); animation: pop var(--menu) var(--ease); }
.nav-row:disabled { color: var(--text-3); opacity: .6; cursor: default; }
.nav-icon { display: grid; place-items: center; width: 24px; height: 24px; flex: none; border-radius: 50%; overflow: hidden; background: var(--raised); color: var(--text-2); font: 500 10px/1 var(--font); }
.nav-icon img { width: 100%; height: 100%; }
.nav-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.subnav { display: grid; gap: 2px; margin: 4px 0 8px; animation: rise var(--enter) var(--ease) backwards; }
.subnav a { position: relative; display: flex; align-items: center; height: 28px; padding-left: 48px; border-radius: 6px; color: var(--text-3); font-size: 13px; text-decoration: none; transition: color var(--fast) var(--ease), background-color var(--fast) var(--ease); }
.subnav a:hover { color: var(--text); background: var(--card); }
.subnav a.on { color: var(--text); }
.subnav a.on::before { content: ""; position: absolute; left: 34px; top: 11px; width: 6px; height: 6px; background: var(--text-2); animation: pop var(--menu) var(--ease); }
.who { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 4px 0 8px; margin-top: 8px; border-top: 1px solid var(--line); }
.who img { width: 24px; height: 24px; border-radius: 50%; }
.who span { flex: 1; min-width: 0; overflow: hidden; color: var(--text-2); font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.who-out { display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 8px; background: none; color: var(--text-3); cursor: pointer; transition: background-color var(--fast) var(--ease), color var(--fast) var(--ease); }
.who-out:hover { background: var(--raised); color: var(--text); }

.main { width: 100%; max-width: 1200px; margin-inline: auto; padding: 40px clamp(16px, 4vw, 48px) 120px; }
.page-head { margin-bottom: 32px; }
.page-head h1 { font-size: 28px; line-height: 32px; }
.sub { margin: 4px 0 0; color: var(--text-2); font-size: 14px; }
.page-head.guild { display: flex; align-items: center; gap: 16px; }
.guild-icon { display: grid; place-items: center; width: 56px; height: 56px; flex: none; overflow: hidden; border-radius: 16px; background: var(--raised); color: var(--text-2); font-weight: 500; }
.guild-icon img { width: 100%; height: 100%; }

/* motion: one entrance, a short fade and rise */
.rise { animation: rise var(--enter) var(--ease) backwards; animation-delay: calc(var(--i, 0) * 48ms); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
@keyframes pop { from { opacity: 0; transform: scale(.4); } }
@keyframes appear { from { opacity: 0; transform: translateY(4px) scale(.98); } }

/* sections */
.section { position: relative; margin-bottom: 16px; padding: 24px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); scroll-margin-top: 24px; transition: border-color var(--menu) var(--ease); }
.section.failed { border-color: rgba(242, 119, 122, .4); }
.section-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 20px; }
.section-head > div { flex: 1; min-width: 0; }
.section-ic { display: grid; place-items: center; width: 24px; height: 24px; color: var(--text-3); }
.section-ic .ic { width: 18px; height: 18px; }
.section h2 { font-size: 16px; line-height: 24px; }
.hint { margin: 0; color: var(--text-2); font-size: 14px; line-height: 20px; }
.hint.inline { align-self: center; padding-top: 22px; }
.section-meta { color: var(--text-3); font: 400 12px/24px var(--mono); white-space: nowrap; }
.status { margin: 0; font-size: 14px; }
.status:empty { display: none; }
.status.err { margin-top: 16px; color: var(--bad); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; }

.field { display: grid; align-content: start; gap: 8px; min-width: 0; }
.field > span { color: var(--text-2); font-size: 13px; line-height: 16px; }
.field > small { color: var(--text-3); font-size: 13px; line-height: 16px; }
.row { display: flex; flex-wrap: wrap; gap: 16px; }
.row > .field, .row > div { flex: 1 1 200px; min-width: 0; }
.row > .narrow { flex: 0 1 96px; }
.row > .grow { flex: 2 1 240px; }
.stack { display: grid; gap: 16px; max-width: 640px; }
.stack.wide { max-width: none; gap: 24px; }
.section .field + .field, .pane-form > * + * { margin-top: 0; }
.pane-form { display: grid; gap: 16px; align-content: start; min-width: 0; }
.field .off, .field.off { opacity: .4; pointer-events: none; }

input[type=text], textarea {
  width: 100%; height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--ink); color: var(--text); font: 400 14px/20px var(--font);
  transition: border-color var(--fast) var(--ease), background-color var(--fast) var(--ease);
}
textarea { display: block; height: auto; min-height: 96px; padding: 8px 12px; resize: vertical; }
input[type=text]:hover, textarea:hover { border-color: var(--line-2); }
input[type=text]:focus, textarea:focus { outline: 0; border-color: var(--accent); }
::placeholder { color: var(--text-3); }
.counted { position: relative; }
.count { position: absolute; right: 12px; bottom: 8px; color: var(--text-3); font: 400 12px/16px var(--mono); pointer-events: none; }

/* fader */
.fader { --p: 0; display: grid; gap: 8px; }
.fader-head { display: flex; justify-content: space-between; gap: 16px; color: var(--text-2); font-size: 13px; line-height: 16px; }
.fader-value { color: var(--text); font: 400 12px/16px var(--mono); font-variant-numeric: tabular-nums; }
.fader-track { position: relative; height: 24px; container-type: inline-size; cursor: pointer; touch-action: none; border-radius: 4px; }
.fader-track::before { content: ""; position: absolute; inset: 10px 0; border-radius: 2px; background: var(--raised-2); }
.fader-fill { position: absolute; left: 0; right: 0; top: 10px; height: 4px; border-radius: 2px; background: var(--accent); transform-origin: left; transform: scaleX(var(--p)); transition: transform var(--menu) var(--ease); }
.fader-thumb { position: absolute; left: -10px; top: 2px; width: 20px; height: 20px; background: var(--text); transform: translateX(calc(var(--p) * 100cqw)); transition: transform var(--menu) var(--ease), background-color var(--fast) var(--ease); }
.fader-track:hover .fader-thumb { background: #fff; }
.fader.held .fader-fill, .fader.held .fader-thumb { transition: background-color var(--fast) var(--ease); }
.fader.held .fader-thumb { background: var(--accent); }
.fader-ticks { position: relative; height: 16px; }
.tick { position: absolute; left: calc(var(--at) * 100%); padding: 0; border: 0; background: none; color: var(--text-3); font: 400 12px/16px var(--font); cursor: pointer; transform: translateX(calc(var(--at) * -100%)); transition: color var(--fast) var(--ease); }
.tick:hover { color: var(--text); }
.leds { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; height: 32px; }
.led { border-radius: 2px; background: var(--raised); transition: background-color var(--menu) var(--ease); }
.led.on.low { background: var(--cobalt); }
.led.on.mid { background: var(--violet); }
.led.on.high { background: var(--orchid); }

/* switch */
.switch { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; user-select: none; font-size: 14px; line-height: 20px; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch-track { position: relative; flex: none; width: 40px; height: 20px; border-radius: 10px; background: var(--raised-2); transition: background-color var(--menu) var(--ease); }
.switch-knob { position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; background: var(--text-2); transition: transform var(--menu) var(--ease), background-color var(--menu) var(--ease); }
.switch input:checked + .switch-track { background: var(--accent); }
.switch input:checked + .switch-track .switch-knob { background: var(--on-accent); transform: translateX(20px); }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--accent); outline-offset: 2px; }
.switch:active .switch-knob { transform: scale(.9); }
.switch:active input:checked + .switch-track .switch-knob { transform: translateX(20px) scale(.9); }
.switch-text small { display: block; color: var(--text-3); font-size: 13px; line-height: 20px; }

/* segmented control */
.seg { position: relative; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); width: fit-content; max-width: 100%; height: 36px; padding: 2px; border-radius: 8px; background: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.seg-plate { position: absolute; left: 2px; top: 2px; bottom: 2px; width: calc((100% - 4px) / var(--n)); border-radius: 6px; background: var(--raised-2); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06); transform: translateX(calc(var(--i) * 100%)); transition: transform var(--menu) var(--ease); }
.seg label { position: relative; display: block; min-width: 0; cursor: pointer; }
.seg input { position: absolute; opacity: 0; }
.seg label span { display: flex; align-items: center; justify-content: center; height: 100%; padding: 0 16px; overflow: hidden; color: var(--text-3); font-size: 14px; white-space: nowrap; transition: color var(--fast) var(--ease); }
.seg label:hover span { color: var(--text-2); }
.seg input:checked + span { color: var(--text); }
.seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 6px; }

/* pickers */
.pick { position: relative; min-width: 0; }
.pick.open { z-index: 30; }
.pick-btn { display: flex; align-items: center; gap: 8px; width: 100%; height: 36px; padding: 0 8px 0 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--ink); color: var(--text); font: 400 14px/20px var(--font); text-align: left; cursor: pointer; transition: border-color var(--fast) var(--ease); }
.pick-btn:hover { border-color: var(--line-2); }
.pick-btn.unset { color: var(--text-3); }
.pick-btn > .ic { color: var(--text-3); transition: transform var(--menu) var(--ease); }
.pick.open .pick-btn { border-color: var(--accent); }
.pick.open .pick-btn > .ic { transform: rotate(180deg); }
.pick-lead { display: flex; flex: none; color: var(--text-3); }
.pick-lead:empty { display: none; }
.pick-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dot { display: block; width: 10px; height: 10px; flex: none; border-radius: 50%; background: var(--text-3); }

.pop { position: absolute; left: 0; top: calc(100% + 4px); display: none; width: 100%; min-width: 240px; max-width: calc(100vw - 32px); padding: 4px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--raised); box-shadow: 0 16px 40px rgba(0, 0, 0, .5); }
.pick.up > .pop { top: auto; bottom: calc(100% + 4px); }
.pick.end > .pop { left: auto; right: 0; }
.pick.open > .pop { display: block; animation: appear var(--menu) var(--ease); }
.pop-head { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 8px; color: var(--text-3); border-bottom: 1px solid var(--line); margin-bottom: 4px; }
input.pop-search { height: 32px; padding: 0; border: 0; background: none; }
.pop-list { max-height: 280px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--raised-2) transparent; }
.pop-group { padding: 8px 8px 4px; color: var(--text-3); font-size: 12px; line-height: 16px; }
.pop-item { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 32px; padding: 4px 8px; border: 0; border-radius: 8px; background: none; color: var(--text-2); font: 400 14px/20px var(--font); text-align: left; cursor: pointer; transition: background-color var(--fast) var(--ease), color var(--fast) var(--ease); }
.pop-item:hover, .pop-item.hl { background: var(--raised-2); color: var(--text); }
.pop-item:disabled { opacity: .5; cursor: not-allowed; }
.pop-item[aria-selected="true"] { color: var(--text); }
.pop-item > .ic { color: var(--text-3); }
.pop-item small { color: var(--text-3); font-size: 12px; white-space: nowrap; }
.pop-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pop-on { width: 8px; height: 8px; flex: none; }
.pop-item[aria-selected="true"] .pop-on { background: var(--accent); }
.pop-empty { padding: 12px 8px; color: var(--text-3); font-size: 14px; }

.chips { display: flex; flex-wrap: wrap; gap: 4px; min-height: 36px; padding: 4px; border: 1px solid var(--line); border-radius: 8px; background: var(--ink); }
.chip { display: inline-flex; align-items: center; gap: 8px; height: 26px; padding: 0 2px 0 8px; border-radius: 6px; background: var(--raised); font-size: 13px; animation: appear var(--menu) var(--ease); }
.chip-x { display: grid; place-items: center; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 4px; background: none; color: var(--text-3); cursor: pointer; transition: color var(--fast) var(--ease), background-color var(--fast) var(--ease); }
.chip-x:hover { background: var(--raised-2); color: var(--text); }
.chip-x .ic { width: 12px; height: 12px; }
.chip-add { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 8px; border: 0; border-radius: 6px; background: none; color: var(--text-3); font: 400 13px/20px var(--font); cursor: pointer; transition: color var(--fast) var(--ease); }
.chip-add:hover { color: var(--text); }
.chip-add .ic { width: 14px; height: 14px; }

/* colour picker */
.cp-btn { display: flex; align-items: center; gap: 8px; width: 100%; height: 36px; padding: 0 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--ink); color: var(--text-2); cursor: pointer; transition: border-color var(--fast) var(--ease); }
.cp-btn:hover { border-color: var(--line-2); }
.pick.open .cp-btn { border-color: var(--accent); }
.cp-swatch { width: 20px; height: 20px; flex: none; border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16); }
.cp-code { font: 400 12px/16px var(--mono); }
.cp-pop { width: 248px; padding: 8px; }
.cp-sv { position: relative; height: 144px; overflow: hidden; border-radius: 8px; background-image: linear-gradient(to top, #000, transparent), linear-gradient(to right, #fff, transparent); cursor: crosshair; touch-action: none; }
.cp-dot { position: absolute; left: calc(var(--x) * 100% - 8px); top: calc(var(--y) * 100% - 8px); width: 16px; height: 16px; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px rgba(0, 0, 0, .4); pointer-events: none; }
.cp-hue { position: relative; height: 12px; margin-top: 12px; border-radius: 6px; background: linear-gradient(to right, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00); cursor: pointer; touch-action: none; }
.cp-hue-thumb { position: absolute; left: calc(var(--x) * 100% - 8px); top: -2px; width: 16px; height: 16px; border-radius: 50%; border: 2px solid #fff; background: none; box-shadow: 0 0 0 1px rgba(0, 0, 0, .4); pointer-events: none; }
.cp-row { display: flex; gap: 8px; margin-top: 12px; }
input.cp-hex { flex: 1; min-width: 0; font: 400 13px/20px var(--mono); }
.cp-drop { width: 36px; padding: 0; }
.cp-swatches { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; margin-top: 12px; }
.cp-swatches button { aspect-ratio: 1; padding: 0; border: 0; border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16); cursor: pointer; transition: transform var(--fast) var(--ease); }
.cp-swatches button:hover { transform: scale(1.12); }

/* quote desk */
.quote-desk { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.quote-controls { display: grid; gap: 20px; min-width: 0; }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tile { position: relative; height: 52px; padding: 0 8px; border: 1px solid var(--line-2); border-radius: 8px; font: 500 13px/16px var(--font); cursor: pointer; transition: transform var(--fast) var(--ease), border-color var(--fast) var(--ease); }
.tile:hover { border-color: rgba(237, 237, 237, .3); }
.tile:active { transform: scale(.97); }
.tile[aria-checked="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.switches { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.colours { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.monitor { position: sticky; top: 24px; display: grid; gap: 8px; }
.monitor-top { display: flex; justify-content: space-between; gap: 16px; color: var(--text-2); font-size: 13px; line-height: 16px; }
.monitor-note { color: var(--text-3); font: 400 12px/16px var(--mono); }
.monitor-note.err { color: var(--bad); }
.monitor-screen { position: relative; aspect-ratio: 1200 / 630; overflow: hidden; border-radius: 12px; background: var(--ink); box-shadow: 0 0 0 1px var(--line), 0 24px 48px rgba(0, 0, 0, .4); transition: aspect-ratio var(--enter) var(--ease); }
.monitor-screen.tall { aspect-ratio: 630 / 790; }
.monitor-screen img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity 300ms var(--ease); }
.monitor-screen img.in { opacity: 1; }

/* logging */
.log-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 32px; }
.log-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: center; gap: 16px; font-size: 14px; }
.log-row.all { max-width: calc(50% - 16px); margin-bottom: 16px; padding-bottom: 16px; color: var(--text-2); border-bottom: 1px solid var(--line); }

/* welcome */
.pane { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .9fr); gap: 32px; animation: rise var(--enter) var(--ease); }
.pane-preview { position: sticky; top: 24px; display: grid; gap: 8px; align-content: start; }
.pane.muted-out .embed { opacity: .4; }
.embed { padding: 12px 16px; border-left: 4px solid var(--violet); border-radius: 4px; background: var(--raised); font-size: 14px; line-height: 20px; transition: opacity var(--menu) var(--ease); }
.embed-top { display: flex; gap: 16px; }
.embed-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.embed-text strong { display: block; font-weight: 500; }
.embed-text p { margin: 4px 0 0; color: var(--text-2); white-space: pre-wrap; }
.embed-thumb { width: 64px; height: 64px; flex: none; border-radius: 4px; object-fit: cover; }
.embed-image { display: block; width: 100%; margin-top: 12px; border-radius: 4px; }
.embed-image.slot { height: 120px; }
.slot { background: var(--raised-2); }
.embed > small { display: block; margin-top: 8px; color: var(--text-3); font-size: 12px; line-height: 16px; }
.tokens { display: flex; flex-wrap: wrap; gap: 4px; margin-top: -8px; }
.token { padding: 0 6px; border: 1px solid var(--line); border-radius: 4px; background: none; color: var(--text-3); font: 400 12px/20px var(--mono); cursor: pointer; transition: color var(--fast) var(--ease), border-color var(--fast) var(--ease), transform var(--fast) var(--ease); }
.token:hover { border-color: var(--line-2); color: var(--text); }
.token:active { transform: scale(.97); }

/* role menus */
.menus { display: grid; gap: 8px; }
.menu { border: 1px solid var(--line); border-radius: 12px; transition: border-color var(--fast) var(--ease), background-color var(--fast) var(--ease); }
.menu:hover { border-color: var(--line-2); }
.menu[open] { background: var(--bg); }
.menu summary { display: flex; align-items: center; gap: 12px; height: 48px; padding: 0 16px; cursor: pointer; list-style: none; font-size: 14px; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary > .ic { color: var(--text-3); transition: transform var(--menu) var(--ease); }
.menu[open] summary > .ic { transform: rotate(180deg); }
.menu-emoji { display: grid; place-items: center; width: 24px; color: var(--text-3); }
.menu-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu small { color: var(--text-3); font: 400 12px/16px var(--mono); }
.menu-body { display: grid; gap: 16px; padding: 4px 16px 16px; animation: rise var(--enter) var(--ease); }
.menu-body .actions { margin-top: 0; }
.publish { display: flex; align-items: flex-end; gap: 8px; padding-top: 16px; border-top: 1px solid var(--line); }
.publish .field { flex: 1; max-width: 360px; }
.publish .field > small { order: 3; }
.publish .btn { margin-bottom: 24px; }

.afk-list { margin-bottom: 16px; }
.afk-item { display: flex; justify-content: space-between; gap: 16px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; margin-bottom: 4px; }
.afk-item strong { font-weight: 500; }
.afk-item small { color: var(--text-3); font: 400 12px/20px var(--mono); }

.suggest-wrap { position: relative; }
.suggest { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 20; display: none; max-height: 260px; padding: 4px; overflow-y: auto; border: 1px solid var(--line-2); border-radius: 12px; background: var(--raised); box-shadow: 0 16px 40px rgba(0, 0, 0, .5); }
.suggest.open { display: grid; animation: appear var(--menu) var(--ease); }

/* save bar */
.savebar { position: fixed; left: calc(50% + 132px); bottom: 24px; z-index: 40; display: flex; align-items: center; gap: 8px; height: 56px; padding: 0 12px 0 20px; visibility: hidden; opacity: 0; transform: translate(-50%, 16px); border: 1px solid var(--line-2); border-radius: 14px; background: var(--raised); box-shadow: 0 16px 40px rgba(0, 0, 0, .5); font-size: 14px; white-space: nowrap;
  transition: opacity var(--menu) var(--ease), transform var(--enter) var(--ease), visibility var(--menu); }
.savebar.show { visibility: visible; opacity: 1; transform: translate(-50%, 0); }
.savebar > span { margin-right: 16px; color: var(--text-2); font-variant-numeric: tabular-nums; }

.toast { position: fixed; left: 50%; bottom: 92px; z-index: 50; max-width: calc(100% - 32px); padding: 8px 16px; visibility: hidden; opacity: 0; transform: translate(-50%, 8px); border: 1px solid var(--line-2); border-radius: 10px; background: var(--raised-2); font-size: 14px;
  transition: opacity var(--menu) var(--ease), transform var(--menu) var(--ease), visibility var(--menu); }
.toast.show { visibility: visible; opacity: 1; transform: translate(-50%, 0); }
.toast.bad { color: var(--bad); }

dialog.ask { width: min(400px, calc(100% - 32px)); padding: 24px; border: 1px solid var(--line-2); border-radius: 16px; background: var(--card); color: var(--text); box-shadow: 0 24px 64px rgba(0, 0, 0, .6); animation: appear var(--menu) var(--ease); }
dialog.ask::backdrop { background: rgba(0, 0, 0, .6); }
dialog.ask h2 { font-size: 16px; line-height: 24px; }
dialog.ask p { margin: 4px 0 0; color: var(--text-2); font-size: 14px; }

/* sign-in gate */
.gate { display: grid; place-items: center; min-height: 100vh; padding: 16px; }
.gate-card { display: grid; justify-items: center; gap: 8px; max-width: 400px; text-align: center; animation: rise var(--enter) var(--ease); }
.gate-mark { margin-bottom: 16px; }
.gate-card h1 { font-size: 28px; line-height: 32px; }
.gate-card p { margin: 0 0 16px; color: var(--text-2); }
.gate-card .error { color: var(--bad); }

.skeleton { display: grid; gap: 8px; animation: rise var(--enter) var(--ease) 120ms backwards; }
.skeleton span { border-radius: 8px; background: var(--card); }
.sk-title { width: 240px; height: 32px; }
.sk-sub { width: 320px; height: 20px; margin-bottom: 24px; }
.sk-card { height: 180px; border-radius: 16px !important; }

@media (max-width: 1080px) {
  .quote-desk, .pane { grid-template-columns: minmax(0, 1fr); }
  .monitor, .pane-preview { position: static; order: -1; }
}

@media (max-width: 800px) {
  .layout { display: block; }
  .side { position: sticky; z-index: 20; height: auto; padding: 8px 16px; border-right: 0; border-bottom: 1px solid var(--line); flex-direction: row; flex-wrap: wrap; align-items: center; }
  .who { margin: 0 0 0 auto; border: 0; height: 32px; }
  .who span { display: none; }
  .side-nav { flex: none; order: 3; width: calc(100% + 32px); margin: 8px -16px 0; padding: 0 16px; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
  .side-nav h4, .subnav, .side-nav .quiet { display: none; }
  .nav-row { width: auto; flex: none; max-width: 200px; padding: 0 12px 0 8px; }
  .nav-row.active::before { display: none; }
  .main { padding: 24px 16px 120px; }
  .section { padding: 16px; }
  .log-grid, .switches { grid-template-columns: minmax(0, 1fr); }
  .log-row.all { max-width: none; }
  .savebar { left: 50%; width: calc(100% - 32px); bottom: 16px; }
  .savebar > span { margin-right: auto; }
  .seg { width: 100%; }
  .seg label span { padding: 0 8px; font-size: 13px; }
}
