:root {
  /* Dark (default). theme.js switches to light and sets the accent from the chosen colour scheme. */
  --bg: #0f1216;
  --bg-2: #161a20;
  --panel: #1b2027;
  --line: #2a313b;
  --line-2: #3a4350;
  --text: #e8ecf2;
  --muted: #9aa5b4;
  --accent: #2563eb;
  --accent-ink: #ffffff;
  --accent-soft: rgba(37,99,235,.22);
  --good: #4fbf7a;
  --bad: #ef5a4f;
  --bad-soft: rgba(239,90,79,.12);
  --bad-line: #6e2f2a;
  --bad-text: #f6b0a9;
  --dot: rgba(255,255,255,.05);
  --shadow: rgba(0,0,0,.45);
  --overlay: rgba(4,6,10,.7);
  --radius: 10px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --display: "Fraunces", Georgia, serif;
  --mono: "JetBrains Mono", "Cascadia Code", Consolas, monospace;
}
:root[data-theme="light"] {
  --bg: #eef1f5;
  --bg-2: #f7f9fb;
  --panel: #ffffff;
  --line: #dde2ea;
  --line-2: #c5cdd8;
  --text: #17202b;
  --muted: #5a6574;
  --good: #22874c;
  --bad: #c9372c;
  --bad-soft: rgba(201,55,44,.08);
  --bad-line: #efb7b1;
  --bad-text: #9b241b;
  --dot: rgba(0,0,0,.07);
  --shadow: rgba(20,30,45,.18);
  --overlay: rgba(20,28,40,.45);
}


* { box-sizing: border-box; }
/* Elements with their own `display` (the picker, hint bar, toast, menu) must still hide. */
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.45 var(--font);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
button, input, select, textarea { font: inherit; color: inherit; }

/* ---- top bar ---- */
.topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
  flex-wrap: wrap;
}
.brand {
  font-family: var(--display);
  font-size: 19px;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}
.brand span { color: var(--muted); font-family: var(--font); font-size: 14px; }
.tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-left: auto; }

.btn {
  border: 1px solid var(--line-2);
  background: var(--panel);
  border-radius: 8px;
  padding: 7px 12px;
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover { border-color: var(--accent); }
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { background: transparent; }
.btn-danger { color: var(--bad); border-color: var(--bad-line); background: transparent; }
.btn:disabled { opacity: .45; cursor: default; }
.plus { font-size: 16px; line-height: 1; }

.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 8px; overflow: hidden; }
.seg-btn { border: 0; background: var(--panel); padding: 7px 11px; cursor: pointer; }
.seg-btn + .seg-btn { border-left: 1px solid var(--line-2); }
.seg-btn.is-on { background: var(--accent); color: var(--accent-ink); font-weight: 600; }

.menu { position: relative; }
.menu-pop {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 30;
  background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--radius);
  padding: 6px; min-width: 220px; box-shadow: 0 12px 30px var(--shadow);
}
.menu-pop button { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 8px 10px; border-radius: 6px; cursor: pointer; }
.menu-pop button:hover { background: var(--bg-2); }
.menu-pop hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }
.danger { color: var(--bad); }

.hint {
  background: var(--accent); color: var(--accent-ink);
  padding: 8px 16px; font-weight: 600; display: flex; gap: 12px; align-items: center;
}
.hint button { background: rgba(0,0,0,.15); border: 0; border-radius: 6px; padding: 3px 10px; cursor: pointer; color: inherit; }

/* ---- layout ---- */
.layout { flex: 1; display: grid; grid-template-columns: 1fr 360px; min-height: 0; }
.stage {
  overflow: auto;
  background:
    radial-gradient(circle at 1px 1px, var(--dot) 1px, transparent 0) 0 0 / 22px 22px,
    var(--bg);
}
.stage-inner { padding: 28px; display: flex; justify-content: center; min-width: max-content; }
.stage svg { display: block; user-select: none; -webkit-user-select: none; touch-action: none; }

.panel {
  border-left: 1px solid var(--line);
  background: var(--panel);
  overflow-y: auto;
  padding: 16px 16px 40px;
}
.panel h2 { font-family: var(--display); font-weight: 600; font-size: 20px; margin: 0 0 2px; }
.panel .sub { color: var(--muted); margin: 0 0 14px; font-size: 13px; }
.panel h3 {
  font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
  margin: 20px 0 8px; font-weight: 600;
}
.field { display: grid; grid-template-columns: 1fr 1.25fr; gap: 8px; align-items: center; margin-bottom: 8px; }
.field > label { color: var(--muted); font-size: 13px; }
.field.wide { grid-template-columns: 1fr; }
.field input[type=text], .field input[type=number], .field select, .field textarea {
  width: 100%; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 7px; padding: 6px 8px;
}
.field textarea { min-height: 64px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
.with-unit { display: flex; align-items: center; gap: 6px; }
.with-unit span { color: var(--muted); font-size: 12px; min-width: 22px; }
.check { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--accent); }
.colors { display: flex; gap: 6px; flex-wrap: wrap; }
.swatch { width: 24px; height: 24px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; }
.swatch.is-on { border-color: var(--text); }
.row-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }

.meter { height: 8px; background: var(--bg-2); border-radius: 99px; overflow: hidden; border: 1px solid var(--line); }
.meter > i { display: block; height: 100%; width: 100%; transform-origin: left; background: var(--good); }
.meter.over > i { background: var(--bad); }
.stat { display: flex; justify-content: space-between; font-size: 13px; margin: 10px 0 4px; }
.stat b { font-weight: 600; }
.warn { background: var(--bad-soft); border: 1px solid var(--bad-line); color: var(--bad-text); border-radius: 8px; padding: 8px 10px; font-size: 13px; margin: 8px 0 0; }
.contents { list-style: none; margin: 0; padding: 0; }
.contents li button {
  width: 100%; display: flex; gap: 10px; align-items: baseline; text-align: left;
  background: none; border: 0; padding: 6px 4px; border-radius: 6px; cursor: pointer;
}
.contents li button:hover { background: var(--bg-2); }
.contents .u { font-family: var(--mono); color: var(--muted); font-size: 12px; min-width: 52px; }
.contents .t { color: var(--muted); font-size: 12px; margin-left: auto; }
.empty-note { color: var(--muted); font-size: 13px; }

/* ---- picker ---- */
.modal { position: fixed; inset: 0; background: var(--overlay); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal-card { background: var(--panel); border: 1px solid var(--line-2); border-radius: 14px; width: min(760px, 100%); max-height: 90vh; overflow: auto; padding: 18px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.modal-head h2 { font-family: var(--display); font-weight: 600; margin: 0; font-size: 22px; }
.icon-btn { background: none; border: 0; font-size: 26px; line-height: 1; cursor: pointer; color: var(--muted); }
.picker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.pick {
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 10px; padding: 12px; text-align: left; cursor: pointer;
  display: flex; flex-direction: column; gap: 4px;
}
.pick:hover, .pick:focus-visible { border-color: var(--accent); outline: none; }
.pick b { font-weight: 600; }
.pick small { color: var(--muted); font-size: 12px; }
.pick svg { width: 100%; height: auto; margin-bottom: 4px; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 60;
  background: var(--panel); border: 1px solid var(--line-2); padding: 10px 16px; border-radius: 10px; box-shadow: 0 10px 30px var(--shadow);
}

/* ---- rack svg bits ---- */
.slot { fill: transparent; }
.placing .slot:hover, .slot.is-target { fill: var(--accent-soft); }
.placing .slot { cursor: copy; }
.dev { cursor: grab; }
.dev.is-sel .dev-outline { stroke: var(--accent); stroke-width: 2.5; }
.dev:hover .dev-outline { stroke: var(--accent); stroke-opacity: .7; stroke-width: 2; }
.note { cursor: pointer; }
.note.is-sel rect.paper { stroke: var(--accent); stroke-width: 2; }

@media (max-width: 860px) {
  body { overflow: auto; }
  .layout { grid-template-columns: 1fr; grid-template-rows: minmax(55vh, auto) auto; }
  .panel { border-left: 0; border-top: 1px solid var(--line); overflow: visible; }
  .stage-inner { padding: 16px; justify-content: flex-start; }
  .topbar { padding: 8px 12px; }
  .tools { margin-left: 0; }
}

@media print {
  .topbar, .panel, .hint, .toast { display: none !important; }
  body { background: #fff; overflow: visible; }
  .layout { display: block; }
  .stage { background: #fff; overflow: visible; }
}

/* ---- simple / advanced ---- */
.detail-toggle { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; flex-wrap: wrap; }
.detail-toggle span { color: var(--muted); font-size: 12.5px; }

/* ---- fill from a link ---- */
.fill-link { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; margin: 0 0 6px; }
.fill-link label { display: block; font-size: 12px; font-weight: 600; letter-spacing: .04em; color: var(--accent); margin-bottom: 6px; }
.fill-row { display: flex; gap: 6px; }
.fill-row input { flex: 1; min-width: 0; background: var(--panel); border: 1px solid var(--line-2); border-radius: 7px; padding: 6px 8px; }
.logo-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.logo-row .logo-prev { max-height: 32px; max-width: 120px; background: repeating-conic-gradient(var(--line) 0 25%, transparent 0 50%) 0 0 / 10px 10px; border-radius: 4px; padding: 2px; }
.logo-row label.btn { cursor: pointer; }
.fill-row input:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
.fill-msg { color: var(--muted); font-size: 12.5px; margin: 8px 0 0; }
.fill-msg .src { color: var(--text); opacity: .7; }
.fill-link .warn { margin-top: 8px; }

/* ---- library / share / sign-in ---- */
.modal-wide { width: min(1000px, 100%); }
.modal-narrow { width: min(460px, 100%); }
.modal-narrow .field input, .modal-narrow .field textarea {
  width: 100%; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 7px; padding: 7px 9px;
}
.modal-narrow .field textarea { min-height: 70px; resize: vertical; }
.lib-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; }
.lib-bar input { flex: 1; min-width: 140px; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 8px; padding: 7px 10px; }
.lib-account { color: var(--muted); font-size: 13px; margin: 6px 0 12px; }
.linkish { background: none; border: 0; color: var(--accent); cursor: pointer; padding: 0; text-decoration: underline; }
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.lib-card { background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 4px; }
.lib-card svg { width: 100%; height: auto; margin-bottom: 4px; }
.lib-card b { font-weight: 600; }
.lib-card small { color: var(--muted); font-size: 12px; }
.lib-card p { margin: 2px 0 0; font-size: 13px; color: var(--text); opacity: .85; }
.lib-btns { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; padding-top: 8px; }
.lib-btns .btn { padding: 5px 10px; font-size: 13px; }
.cab-preview { height: 54px; border-radius: 6px; background: repeating-linear-gradient(180deg, #232427 0 8px, #1a1b1e 8px 9px); display: grid; place-items: center; margin-bottom: 4px; border: 2px solid #3b3d42; }
.cab-preview span { background: var(--panel); padding: 2px 8px; border-radius: 99px; font-size: 12px; }
.btn-wide { width: 100%; padding: 10px; }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; margin: 14px 0 8px; }
.or::before, .or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }

/* ---- left sidebar: devices palette, racks hub, profile ---- */
.layout { grid-template-columns: 270px 1fr 360px; }
body.side-collapsed .layout { grid-template-columns: 0 1fr 360px; }
body.side-collapsed .side { visibility: hidden; }
.side { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--line); background: var(--panel); overflow: hidden; }
.side-tabs { margin: 12px 12px 0; display: flex; }
.side-tabs .seg-btn { flex: 1; }
.side-body { flex: 1; overflow-y: auto; padding: 4px 12px 16px; }
.side-body h3 { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 16px 0 8px; font-weight: 600; display: flex; justify-content: space-between; align-items: baseline; }
.side-body h3 .linkish { text-transform: none; letter-spacing: 0; font-weight: 500; font-size: 12px; }
.side-search { width: 100%; margin-top: 12px; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 8px; padding: 7px 10px; }
.side-hint { color: var(--muted); font-size: 12px; margin: 8px 0 0; }
.pal-grid { display: grid; grid-template-columns: 1fr; gap: 6px; }
.pal { display: grid; grid-template-columns: 1fr; gap: 2px; text-align: left; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 8px; padding: 7px 8px; cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.pal:hover, .pal:focus-visible { border-color: var(--accent); outline: none; }
.pal svg { width: 100%; height: auto; pointer-events: none; }
.pal-name { font-weight: 600; font-size: 13px; }
.pal-sub { color: var(--muted); font-size: 11.5px; }
.drag-ghost { position: fixed; z-index: 70; width: 170px; height: auto; pointer-events: none; opacity: .85; filter: drop-shadow(0 6px 14px rgba(0,0,0,.5)); }
body.is-dragging, body.is-dragging * { cursor: grabbing !important; }
.side-new { width: 100%; margin-top: 12px; }
.rack-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.rack-row { display: flex; align-items: center; border-radius: 8px; border: 1px solid transparent; }
.rack-row.is-on { border-color: var(--accent); background: var(--bg-2); }
.rack-open { flex: 1; min-width: 0; text-align: left; background: none; border: 0; padding: 8px; cursor: pointer; display: flex; flex-direction: column; border-radius: 8px; }
button.rack-open:hover { background: var(--bg-2); }
.rack-open b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rack-open small { color: var(--muted); font-size: 12px; }
.rack-more { font-size: 18px; padding: 4px 8px; }
.profile { border-top: 1px solid var(--line); padding: 10px; }
.profile-btn { width: 100%; display: flex; align-items: center; gap: 10px; background: none; border: 0; padding: 6px; border-radius: 8px; cursor: pointer; text-align: left; }
.profile-btn:hover { background: var(--bg-2); }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-weight: 700; flex: none; }
.who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.who b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chev { color: var(--muted); }
.side-toggle { font-size: 20px; color: var(--text); padding: 2px 6px; }
.sync { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.sync[data-kind="offline"], .sync[data-kind="limit"] { color: var(--bad); }
.viewbar { background: #2d4c7c; color: #fff; padding: 8px 16px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }

/* ---- right-click menu ---- */
.ctx { position: fixed; z-index: 80; min-width: 220px; background: var(--panel); border: 1px solid var(--line-2); border-radius: 10px; padding: 5px; box-shadow: 0 14px 34px var(--shadow); }
.ctx button { display: flex; width: 100%; justify-content: space-between; gap: 18px; background: none; border: 0; padding: 7px 10px; border-radius: 6px; cursor: pointer; text-align: left; }
.ctx button:hover:not([disabled]), .ctx button:focus-visible { background: var(--bg-2); outline: none; }
.ctx button[disabled] { opacity: .4; cursor: default; }
.ctx button.danger { color: var(--bad); }
.ctx kbd { color: var(--muted); font: 11.5px var(--mono); }
.ctx hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }

/* ---- custom colour swatch ---- */
.swatch-custom { position: relative; overflow: hidden; background: conic-gradient(#e2675b, #e8b04a, #6fbf73, #4c86d9, #a06fd6, #e2675b); }
.swatch-custom input { position: absolute; inset: -6px; width: calc(100% + 12px); height: calc(100% + 12px); opacity: 0; cursor: pointer; border: 0; padding: 0; }

@media (max-width: 1100px) {
  .layout, body.side-collapsed .layout { grid-template-columns: 1fr 340px; }
  .side { position: fixed; z-index: 45; top: 0; bottom: 0; left: 0; width: min(300px, 86vw); transform: translateX(-100%); transition: transform .18s ease; box-shadow: 0 0 40px rgba(0,0,0,.5); visibility: visible !important; }
  body.side-open .side { transform: none; }
}
@media (max-width: 860px) {
  .layout, body.side-collapsed .layout { grid-template-columns: 1fr; }
}
@media print { .side, .viewbar, .ctx { display: none !important; } }
.pal-group { border: 1px solid var(--line); border-radius: 8px; margin-bottom: 6px; }
.pal-group summary { cursor: pointer; padding: 7px 10px; font-weight: 600; font-size: 13px; display: flex; justify-content: space-between; }
.pal-group summary span, .side-body h3 .count { color: var(--muted); font-weight: 500; }
.pal-group .pal-grid { padding: 0 6px 6px; }
.pal-row { grid-template-columns: 1fr auto; align-items: baseline; padding: 6px 8px; }
.drag-label { position: fixed; z-index: 70; pointer-events: none; background: var(--accent); color: var(--accent-ink); font-weight: 600; padding: 6px 10px; border-radius: 6px; box-shadow: 0 6px 14px rgba(0,0,0,.5); }
.pal-row.has-art { grid-template-columns: 1fr auto; }
.pal-row.has-art svg { grid-column: 1 / -1; }
.shelf-item { display: flex; gap: 10px; align-items: baseline; padding: 4px; }
.shelf-item .t { margin-left: auto; }
.dev.far { cursor: grab; }

/* ---- settings: theme picker ---- */
.theme-modes { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.theme-modes .seg { flex: 1; }
.theme-modes .seg-btn { flex: 1; }
.scheme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.scheme { display: flex; align-items: center; gap: 8px; background: var(--bg-2); border: 2px solid var(--line); border-radius: 10px; padding: 8px 10px; cursor: pointer; text-align: left; }
.scheme:hover { border-color: var(--line-2); }
.scheme.is-on { border-color: var(--text); }
.scheme i { width: 22px; height: 22px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 2px rgba(255,255,255,.25); }
.scheme span { font-size: 13px; font-weight: 500; }
.settings-section h3 { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 18px 0 8px; font-weight: 600; }
.dev.is-measured .dev-outline { stroke: var(--accent); stroke-width: 2.5; stroke-dasharray: 6 4; }

/* ---- compatibility warnings ---- */
.warn-caution { background: rgba(245,179,1,.12); border-color: rgba(245,179,1,.45); color: var(--text); }
.warn-bad { font-weight: 500; }
.issue { cursor: help; }
.tip {
  position: fixed; z-index: 90; max-width: 340px; white-space: pre-line; pointer-events: none;
  background: var(--panel); color: var(--text); border: 1px solid var(--line-2); border-radius: 8px;
  padding: 8px 10px; font-size: 12.5px; line-height: 1.45; box-shadow: 0 10px 26px var(--shadow);
}

/* ---- motion: quick, gentle, and off for people who ask for less ---- */
.btn, .seg-btn, .pal, .scheme, .swatch, .rack-open, .profile-btn, .ctx button, .menu-pop button, .lib-card, .pick {
  transition: background-color .14s ease, border-color .14s ease, color .14s ease, transform .12s ease, box-shadow .14s ease;
}
.btn:active, .seg-btn:active, .pal:active, .scheme:active, .pick:active { transform: scale(.97); }
.pal:hover, .pick:hover, .lib-card:hover { transform: translateY(-1px); }
body, .topbar, .panel, .side, .modal-card, .stage { transition: background-color .2s ease, color .2s ease, border-color .2s ease; }
.meter > i { transition: transform .35s cubic-bezier(.2,.8,.2,1); }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes riseIn { from { opacity: 0; transform: translateY(8px) scale(.98); } }
@keyframes popIn { from { opacity: 0; transform: scale(.96); } }
@keyframes slideDown { from { opacity: 0; transform: translateY(-6px); } }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 10px); } }
@keyframes settle { from { opacity: 0; transform: translateY(-10px); } }
.modal:not([hidden]) { animation: fadeIn .16s ease-out; }
.modal:not([hidden]) .modal-card { animation: riseIn .2s cubic-bezier(.2,.8,.2,1); }
.ctx:not([hidden]), .menu-pop:not([hidden]) { animation: popIn .12s ease-out; transform-origin: top left; }
.hint:not([hidden]), .viewbar:not([hidden]) { animation: slideDown .16s ease-out; }
.toast:not([hidden]) { animation: toastIn .18s cubic-bezier(.2,.8,.2,1); }
.tip:not([hidden]) { animation: fadeIn .1s ease-out; }
.panel.panel-in > * { animation: fadeIn .18s ease-out; }
.dev.just-added { animation: settle .32s cubic-bezier(.2,.8,.2,1); transform-box: fill-box; }
.issue { animation: popIn .2s ease-out; transform-box: fill-box; transform-origin: center; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---- focus mode, placing bar, what's new ---- */
body.focus .side, body.focus .panel { display: none !important; }
body.focus .layout, body.focus.side-collapsed .layout { grid-template-columns: 1fr !important; }
.place-at { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.place-at label { display: inline-flex; align-items: center; gap: 6px; }
.place-at input { width: 64px; min-height: 36px; padding: 4px 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg-2); color: inherit; font: inherit; }
.place-at button { min-height: 36px; }
.whatsnew { margin: 0 0 12px; padding-left: 20px; line-height: 1.5; }
.whatsnew li { margin: 3px 0; }
@media (pointer: coarse) {
  .btn, .seg-btn, .icon-btn, .pal, .linkish { min-height: 44px; }
  .contents button { min-height: 44px; }
}
.sync[data-kind="saved"] { color: var(--good); }
.sync[data-kind="offline"], .sync[data-kind="limit"] { color: var(--bad); font-weight: 600; }
