/* ==========================================================================
   DataLookup — admin
   Same tokens as the site (base.css): graphite + bone, one cobalt accent.
   Layout: fixed sidebar, sticky page header, one working column per view.
   ========================================================================== */
:root {
  --ok: #5dbd8a;
  --warn: #e3a73f;
  --bad: #ff7a6b;
  --side: 236px;
  --top-h: 74px;
  --gut: clamp(16px, 3vw, 36px);
}
body[data-page="admin"] { font-size: 14.5px; line-height: 1.5; background: var(--ink); color: var(--fg); }
body[data-page="admin"]::after { opacity: .035; }
.muted { color: var(--fg-3); }
.mono { font-family: var(--mono); font-size: .92em; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- controls ---------- */
.a-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 36px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--line-2);
  background: transparent; color: var(--fg); font-size: 13.5px; font-weight: 500; white-space: nowrap;
  transition: background-color .2s, border-color .2s, color .2s;
}
.a-btn svg { width: 15px; height: 15px; flex-shrink: 0; }
.a-btn:hover { background: rgba(236, 231, 222, .06); border-color: rgba(236, 231, 222, .34); }
.a-btn.primary { background: var(--cobalt); border-color: var(--cobalt); color: var(--bone); }
.a-btn.primary:hover { background: #4d5dff; border-color: #4d5dff; }
.a-btn.danger { color: var(--bad); border-color: rgba(255, 122, 107, .32); }
.a-btn.danger:hover, .a-btn[data-armed] { background: rgba(255, 122, 107, .12); border-color: var(--bad); color: var(--bad); }
.a-btn.quiet { border-color: transparent; color: var(--fg-2); }
.a-btn.quiet:hover { color: var(--fg); }
.a-btn.sm { height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: 7px; }
.a-btn.wide { width: 100%; }
.a-btn:disabled { opacity: .45; pointer-events: none; }

.input {
  width: 100%; height: 38px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 8px;
  background: var(--ink); color: var(--fg); font-size: 14px; outline: none;
  transition: border-color .2s, box-shadow .2s;
}
textarea.input { height: auto; padding: 9px 12px; line-height: 1.5; resize: vertical; }
.input:focus { border-color: var(--cobalt-2); box-shadow: 0 0 0 3px rgba(59, 76, 255, .22); }
.input:focus-visible { outline: none; }
.input::placeholder { color: var(--fg-3); }
select.input {
  appearance: none; padding-right: 34px; cursor: pointer;
  background: var(--ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23ece7de' stroke-opacity='.45' stroke-width='1.6'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E") no-repeat right 10px center / 15px;
}
input[type="date"].input { color-scheme: dark; }
.lbl { display: block; font-size: 12.5px; font-weight: 500; color: var(--fg-2); margin-bottom: 6px; }
.hint { margin: 6px 0 0; font-size: 12px; color: var(--fg-3); }
.hint button { border: 0; background: none; padding: 0; color: var(--cobalt-2); font-size: inherit; text-decoration: underline; text-underline-offset: 2px; }

.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--ink); border: 1px solid var(--line); border-radius: 9px; }
.seg button { height: 28px; padding: 0 12px; border: 0; border-radius: 6px; background: transparent; color: var(--fg-2); font-size: 13px; font-weight: 500; white-space: nowrap; }
.seg button:hover { color: var(--fg); }
.seg button[aria-pressed="true"] { background: var(--ink-3); color: var(--fg); box-shadow: inset 0 0 0 1px var(--line-2); }
.seg .n { margin-left: 5px; color: var(--fg-3); font-variant-numeric: tabular-nums; }
.seg.full { display: flex; }
.seg.full button { flex: 1; }

.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 13.5px; font-weight: 500; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch span { position: relative; width: 36px; height: 21px; border-radius: 999px; background: var(--ink-3); border: 1px solid var(--line-2); transition: background-color .2s, border-color .2s; }
.switch span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 15px; height: 15px; border-radius: 50%; background: var(--fg-2); transition: transform .2s, background-color .2s; }
.switch input:checked + span { background: var(--cobalt); border-color: var(--cobalt); }
.switch input:checked + span::after { transform: translateX(15px); background: #fff; }
.switch input:focus-visible + span { outline: 2px solid var(--cobalt-2); outline-offset: 2px; }

.chip { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 12px; font-weight: 500; white-space: nowrap; }
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip.ok { color: var(--ok); background: rgba(93, 189, 138, .12); }
.chip.warn { color: var(--warn); background: rgba(227, 167, 63, .12); }
.chip.bad { color: var(--bad); background: rgba(255, 122, 107, .12); }
.chip.off { color: var(--fg-3); background: rgba(236, 231, 222, .06); }
.chip.live { color: var(--cobalt-2); background: rgba(59, 76, 255, .15); }
.chip.cat-news { color: #ff9a8c; background: rgba(255, 122, 107, .1); }
.chip.cat-guide { color: var(--cobalt-2); background: rgba(59, 76, 255, .14); }
.chip.cat-update { color: var(--ok); background: rgba(93, 189, 138, .1); }
.chip.cat-tips { color: #b4bdff; background: rgba(116, 132, 255, .12); }

.spin { display: inline-block; width: 20px; height: 20px; border: 2px solid var(--line-2); border-top-color: var(--cobalt-2); border-radius: 50%; animation: a-spin .7s linear infinite; }
@keyframes a-spin { to { rotate: 360deg; } }

/* ---------- boot + login ---------- */
.boot { min-height: 100vh; display: grid; place-items: center; }
.login { min-height: 100vh; display: grid; place-items: center; padding: 120px 16px 40px; }
.login-card { position: relative; width: min(400px, 100%); padding: 30px 30px 28px; background: var(--ink-2); border: 1px solid var(--line); border-radius: 16px; }
.login-dee { position: absolute; right: 26px; top: -98px; width: 96px; }
.login-card h1 { margin: 22px 0 4px; font-size: 24px; font-weight: 700; letter-spacing: -.035em; }
.login-card > p { margin: 0 0 22px; color: var(--fg-3); font-size: 13.5px; }
.login-card .err { min-height: 1.5em; margin: 8px 0 14px; font-size: 13px; color: var(--bad); }

/* ---------- app shell ---------- */
.app { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 22px; padding: 18px 12px 14px; border-right: 1px solid var(--line); background: var(--ink); }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px; font-weight: 700; font-size: 16px; letter-spacing: -.04em; color: var(--fg); }
.brand .mark { width: 24px; height: 24px; }
.brand .m-d { fill: var(--cobalt); }
.brand-tag { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--cobalt-2); background: rgba(59, 76, 255, .14); padding: 2px 6px; border-radius: 5px; }
.nav { display: grid; gap: 2px; }
.nav a, .side-foot a, .side-foot button {
  display: flex; align-items: center; gap: 11px; width: 100%; height: 36px; padding: 0 10px; border: 0; border-radius: 8px;
  background: transparent; color: var(--fg-2); font-size: 14px; font-weight: 500; text-align: left; white-space: nowrap;
  transition: background-color .15s, color .15s;
}
.nav svg, .side-foot svg { width: 17px; height: 17px; flex-shrink: 0; opacity: .75; }
.nav a:hover, .side-foot a:hover, .side-foot button:hover { background: rgba(236, 231, 222, .05); color: var(--fg); }
.nav a[aria-current="page"] { background: rgba(236, 231, 222, .08); color: var(--fg); }
.nav a[aria-current="page"] svg { color: var(--cobalt-2); opacity: 1; }
.nav .count { margin-left: auto; font-size: 12px; color: var(--fg-3); font-variant-numeric: tabular-nums; }
.side-foot { margin-top: auto; display: grid; gap: 2px; padding-top: 12px; border-top: 1px solid var(--line); }

.main { min-width: 0; }
.top {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap;
  min-height: var(--top-h); padding: 14px var(--gut); border-bottom: 1px solid var(--line);
  background: rgba(12, 12, 14, .88); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.top h1 { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -.03em; line-height: 1.25; }
.top p { margin: 2px 0 0; font-size: 13px; color: var(--fg-3); }
.back { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 2px; font-size: 12.5px; color: var(--fg-3); }
.back:hover { color: var(--fg); }
.back svg { width: 13px; height: 13px; }
.top-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.save-state { font-size: 12.5px; color: var(--fg-3); }
.save-state.dirty { color: var(--warn); }
.view { display: grid; gap: 16px; align-content: start; padding: 24px var(--gut) 72px; max-width: 1320px; }

@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .side { position: sticky; z-index: 30; height: auto; flex-direction: row; align-items: center; gap: 6px; padding: 8px 12px; border-right: 0; border-bottom: 1px solid var(--line); overflow-x: auto; }
  .brand { padding: 4px 6px; }
  .brand > span:not(.brand-tag) { display: none; }
  .nav { display: flex; }
  .nav a { height: 34px; padding: 0 9px; }
  .nav a .count { margin-left: 2px; }
  .side-foot { display: flex; margin: 0 0 0 auto; padding: 0; border: 0; }
  .side-foot a { display: none; }
  .top { position: static; }
}

/* ---------- panels ---------- */
.panel { min-width: 0; background: var(--ink-2); border: 1px solid var(--line); border-radius: 12px; }
.panel-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; min-height: 52px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.panel-h h2 { margin: 0; font-size: 14px; font-weight: 600; letter-spacing: -.01em; }
.panel-h .muted, .panel-h a { font-size: 12.5px; }
.panel-h a { color: var(--cobalt-2); }
.panel-b { padding: 16px 18px; }
.stack { display: grid; gap: 16px; align-content: start; min-width: 0; }
.cols { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 1100px) { .cols { grid-template-columns: 1fr; } }

/* overview tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.tile { display: flex; flex-direction: column; gap: 2px; min-height: 148px; padding: 16px 18px; background: var(--ink-2); border: 1px solid var(--line); border-radius: 12px; transition: border-color .2s; }
.tile:hover { border-color: var(--line-2); }
.tile-l { font-size: 12.5px; font-weight: 500; color: var(--fg-2); }
.tile-n { margin-top: 6px; font-size: 34px; font-weight: 700; letter-spacing: -.045em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.tile-n.ok { color: var(--ok); }
.tile-n.warn { color: var(--warn); }
.tile-s { font-size: 12.5px; color: var(--fg-3); }
@media (max-width: 560px) { .tiles { grid-template-columns: 1fr 1fr; } .tile { min-height: 0; padding: 14px; } .tile-n { font-size: 28px; } .cols { gap: 12px; } }
.spark { display: block; width: 100%; height: 34px; margin-top: auto; padding-top: 10px; overflow: visible; }

/* checklist */
.checks { list-style: none; margin: 0; padding: 0; }
.checks li { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 13px 18px; border-top: 1px solid var(--line); }
.checks li:first-child { border-top: 0; }
.checks .ic { width: 20px; height: 20px; margin-top: 1px; border-radius: 50%; display: grid; place-items: center; }
.checks .ic svg { width: 12px; height: 12px; }
.checks .done .ic { background: rgba(93, 189, 138, .16); color: var(--ok); }
.checks .todo .ic { box-shadow: inset 0 0 0 1.5px rgba(227, 167, 63, .7); }
.checks b { display: block; font-size: 14px; font-weight: 500; }
.checks small { display: block; margin-top: 2px; font-size: 12.5px; color: var(--fg-3); }
.checks a { color: var(--cobalt-2); }

/* lists */
.rows { list-style: none; margin: 0; padding: 0; }
.rows li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 18px; border-top: 1px solid var(--line); font-size: 13.5px; }
.rows li:first-child { border-top: 0; }
.rows .muted { font-size: 12.5px; white-space: nowrap; }
.rows .clip { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* tables */
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { padding: 10px 18px; border-bottom: 1px solid var(--line); text-align: left; font-size: 12px; font-weight: 500; color: var(--fg-3); white-space: nowrap; }
.tbl td { padding: 12px 18px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr.click { cursor: pointer; }
.tbl tr.click:hover td { background: rgba(236, 231, 222, .025); }
.tbl .r { text-align: right; }
.tbl .t-title { font-weight: 500; color: var(--fg); }
.tbl .t-sub { display: block; margin-top: 1px; font-family: var(--mono); font-size: 11.5px; color: var(--fg-3); }
.tbl td.nowrap { white-space: nowrap; }

/* sign-up chart */
.kv { display: flex; flex-wrap: wrap; gap: 14px 40px; padding: 16px 18px 4px; }
.kv div { display: grid; gap: 1px; }
.kv b { font-size: 24px; font-weight: 700; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.kv span { font-size: 12.5px; color: var(--fg-3); }
.chart { padding: 34px 18px 16px; }
.bars { position: relative; display: grid; grid-template-columns: repeat(30, minmax(0, 1fr)); gap: 3px; align-items: end; grid-template-rows: 100%; height: 132px; border-bottom: 1px solid var(--line-2); background: linear-gradient(var(--line), var(--line)) 0 0 / 100% 1px no-repeat, linear-gradient(var(--line), var(--line)) 0 50% / 100% 1px no-repeat; }
.bars i { display: block; min-height: 2px; border-radius: 3px 3px 0 0; background: var(--cobalt); }
.bars i.zero { background: var(--line-2); }
.bars i.today { background: var(--cobalt-2); }
.bars .ymax { position: absolute; left: 0; top: -2px; transform: translateY(-100%); font-size: 11px; color: var(--fg-3); font-variant-numeric: tabular-nums; }
.axis { display: flex; justify-content: space-between; margin-top: 7px; font-size: 11.5px; color: var(--fg-3); font-variant-numeric: tabular-nums; }
.search { width: min(260px, 100%); height: 32px; font-size: 13px; }

/* empty states */
.empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 44px 24px 48px; text-align: center; }
.empty .mascot { width: 92px; margin-bottom: 4px; }
.empty h3 { margin: 0; font-size: 16px; font-weight: 600; letter-spacing: -.02em; }
.empty p { margin: 0 0 8px; max-width: 42ch; color: var(--fg-3); font-size: 13.5px; }

/* ---------- settings ---------- */
.dl-list { margin: 0; }
.dl-list > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 12px 18px; border-top: 1px solid var(--line); }
.dl-list > div:first-child { border-top: 0; }
.dl-list dt { font-size: 14px; font-weight: 500; }
.dl-list dt small { display: block; font-size: 12.5px; font-weight: 400; color: var(--fg-3); }
.dl-list dd { margin: 0; font-size: 13.5px; text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- blog editor ---------- */
.editor { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
@media (max-width: 1060px) { .editor { grid-template-columns: 1fr; } }
.ed-title { width: 100%; padding: 2px 0 12px; border: 0; border-bottom: 1px solid var(--line); background: transparent; outline: none; color: var(--fg); font-size: clamp(22px, 2.6vw, 30px); font-weight: 700; letter-spacing: -.035em; }
.ed-title::placeholder { color: var(--fg-3); }
.ed-title:focus-visible { outline: none; border-bottom-color: var(--cobalt-2); }
.ed-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 12px 0; }
.ed-tools { display: flex; flex-wrap: wrap; gap: 2px; }
.ed-tools button { display: grid; place-items: center; width: 32px; height: 30px; border: 0; border-radius: 6px; background: transparent; color: var(--fg-2); }
.ed-tools button:hover { background: rgba(236, 231, 222, .07); color: var(--fg); }
.ed-tools svg { width: 16px; height: 16px; }
.ed-tools[hidden] { display: none; }
.ed-body {
  display: block; width: 100%; min-height: 540px; padding: 18px 20px; border: 1px solid var(--line-2); border-radius: 12px;
  background: var(--ink-2); color: var(--fg); font-family: var(--mono); font-size: 13.5px; line-height: 1.75; outline: none; resize: vertical; tab-size: 2;
}
.ed-body:focus { border-color: var(--cobalt-2); box-shadow: 0 0 0 3px rgba(59, 76, 255, .18); }
.ed-preview { min-height: 540px; padding: 28px 32px; border: 1px solid var(--line); border-radius: 12px; background: var(--ink-2); }
.ed-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 10px; font-size: 12.5px; color: var(--fg-3); }
.ed-side { position: sticky; top: calc(var(--top-h) + 16px); display: grid; gap: 18px; padding: 18px; }
@media (max-width: 1060px) { .ed-side { position: static; } }
.ed-side hr { margin: 0; border: 0; border-top: 1px solid var(--line); }
.ed-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.slug { display: flex; align-items: center; height: 38px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--ink); overflow: hidden; transition: border-color .2s, box-shadow .2s; }
.slug:focus-within { border-color: var(--cobalt-2); box-shadow: 0 0 0 3px rgba(59, 76, 255, .22); }
.slug span { padding-left: 12px; font-family: var(--mono); font-size: 12.5px; color: var(--fg-3); }
.slug input { flex: 1; min-width: 0; height: 100%; padding: 0 12px 0 1px; border: 0; background: transparent; outline: none; color: var(--fg); font-family: var(--mono); font-size: 12.5px; }
.count-l { float: right; font-weight: 400; color: var(--fg-3); font-variant-numeric: tabular-nums; }

/* Post typography, matching the public post page */
.prose { max-width: 68ch; color: var(--fg-2); font-size: 15.5px; line-height: 1.75; }
.prose > :first-child { margin-top: 0; }
.prose p { margin: 0 0 1.2em; }
.prose h2 { margin: 1.8em 0 .6em; color: var(--fg); font-size: 1.4rem; font-weight: 700; letter-spacing: -.03em; line-height: 1.25; }
.prose h3 { margin: 1.6em 0 .5em; color: var(--fg); font-size: 1.15rem; font-weight: 700; letter-spacing: -.02em; }
.prose h4 { margin: 1.4em 0 .4em; color: var(--fg); font-size: 1rem; font-weight: 700; }
.prose ul, .prose ol { margin: 0 0 1.2em; padding-left: 1.3em; }
.prose li { margin-bottom: .35em; }
.prose a { color: var(--cobalt-2); text-decoration: underline; text-underline-offset: 3px; }
.prose strong { color: var(--fg); font-weight: 600; }
.prose blockquote { margin: 1.4em 0; padding-left: 1em; border-left: 3px solid var(--cobalt); font-style: italic; }
.prose blockquote p { margin: 0; }
.prose code { padding: .1em .35em; border-radius: 4px; background: rgba(59, 76, 255, .12); color: #c3caff; font-family: var(--mono); font-size: .88em; }
.prose pre { margin: 0 0 1.4em; padding: 14px 16px; overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--ink); }
.prose pre code { padding: 0; background: none; color: var(--fg-2); }
.prose hr { margin: 2em 0; border: 0; border-top: 1px solid var(--line); }

/* ---------- promo cards ---------- */
.cards { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 20px; align-items: start; }
@media (max-width: 1120px) { .cards { grid-template-columns: 1fr; } }
.tpl-strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(104px, 1fr); gap: 10px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: thin; }
.tpl { display: flex; flex-direction: column; gap: 7px; padding: 6px 6px 9px; border: 1px solid var(--line); border-radius: 10px; background: var(--ink-2); color: var(--fg-2); font-size: 12.5px; font-weight: 500; text-align: left; transition: border-color .2s, color .2s; }
.tpl:hover { border-color: var(--line-2); color: var(--fg); }
.tpl[aria-pressed="true"] { border-color: var(--cobalt); color: var(--fg); box-shadow: 0 0 0 1px var(--cobalt); }
.tpl canvas { width: 100%; height: 76px; object-fit: contain; border-radius: 6px; background: var(--ink-3); }
.tpl span { padding: 0 3px; }
.stage {
  display: grid; place-items: center; padding: clamp(14px, 3vw, 36px); border: 1px solid var(--line); border-radius: 14px;
  background: var(--ink-2) radial-gradient(rgba(236, 231, 222, .06) 1px, transparent 1px) 0 0 / 16px 16px;
}
.stage canvas { width: auto; height: auto; max-width: 100%; max-height: 64vh; border-radius: 6px; box-shadow: 0 24px 60px -24px rgba(0, 0, 0, .9); }
.stage-meta { display: flex; justify-content: space-between; gap: 6px 16px; flex-wrap: wrap; padding: 10px 2px 0; font-size: 12.5px; color: var(--fg-3); }
.stage-meta code { color: var(--fg-2); font-family: var(--mono); }
.cards-side { position: sticky; top: calc(var(--top-h) + 16px); max-height: calc(100vh - var(--top-h) - 32px); overflow-y: auto; }
@media (max-width: 1120px) { .cards-side { position: static; max-height: none; } }
.sec { display: grid; gap: 10px; padding: 16px 18px; border-top: 1px solid var(--line); }
.sec:first-child { border-top: 0; }
.sec h3 { margin: 0; font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--fg-3); }
.sec-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.fmts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.fmt { display: grid; gap: 1px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: transparent; text-align: left; }
.fmt b { font-size: 13px; font-weight: 500; }
.fmt span { font-size: 11.5px; color: var(--fg-3); font-variant-numeric: tabular-nums; }
.fmt:hover { border-color: var(--line-2); }
.fmt[aria-pressed="true"] { border-color: var(--cobalt); background: rgba(59, 76, 255, .1); }
.themes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.theme { display: grid; gap: 6px; padding: 6px 6px 7px; border: 1px solid var(--line); border-radius: 8px; background: transparent; font-size: 12px; font-weight: 500; color: var(--fg-2); }
.theme i { position: relative; display: block; height: 30px; border-radius: 5px; background: var(--sw-bg); box-shadow: inset 0 0 0 1px rgba(236, 231, 222, .1); }
.theme i::after { content: ""; position: absolute; left: 7px; bottom: 7px; width: 14px; height: 14px; border-radius: 50%; background: var(--sw-ac); }
.theme i::before { content: ""; position: absolute; left: 26px; right: 8px; bottom: 11px; height: 6px; border-radius: 3px; background: var(--sw-fg); opacity: .8; }
.theme:hover { border-color: var(--line-2); }
.theme[aria-pressed="true"] { border-color: var(--cobalt); color: var(--fg); }
.poses-g { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.pose { display: grid; justify-items: center; gap: 1px; padding: 6px 2px 5px; border: 1px solid var(--line); border-radius: 8px; background: transparent; font-size: 11px; color: var(--fg-2); --dee: #3b4cff; }
.pose .dee { width: 38px; height: 44px; color: #3b4cff; }
.pose .none { display: grid; place-items: center; width: 38px; height: 44px; color: var(--fg-3); }
.pose .none svg { width: 20px; height: 20px; }
.pose:hover { border-color: var(--line-2); }
.pose[aria-pressed="true"] { border-color: var(--cobalt); background: rgba(59, 76, 255, .1); color: var(--fg); }
.fld { display: grid; gap: 0; }
.fld .lbl { display: flex; justify-content: space-between; gap: 8px; }

/* ---------- toasts ---------- */
.toasts { position: fixed; right: 20px; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); z-index: 300; display: grid; gap: 8px; justify-items: end; pointer-events: none; }
.toast { max-width: min(420px, calc(100vw - 40px)); padding: 10px 14px; border: 1px solid var(--line-2); border-radius: 9px; background: var(--ink-3); font-size: 13.5px; box-shadow: 0 14px 30px -12px rgba(0, 0, 0, .7); opacity: 0; transform: translateY(8px); transition: opacity .25s, transform .25s; }
.toast.in { opacity: 1; transform: none; }
.toast.ok::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 9px; border-radius: 50%; background: var(--ok); vertical-align: 1px; }
.toast.bad { border-color: rgba(255, 122, 107, .45); color: #ffb3a9; }

@media (prefers-reduced-motion: reduce) { .spin { animation-duration: 2s; } }
