/* Elytheon: black on white. The screens are the only dark, heavy objects on the page. */

:root {
  --ink: #000000;
  --paper: #ffffff;
  --raise: #f2f2f2;
  --mute: #707070;
  --line: #e3e3e3;
  --line-strong: #c9c9c9;
  --alert: #d92d20;
  --font: Archivo, "Inter Display", "Helvetica Neue", Arial, sans-serif;
  --r-field: 12px;
  --r-sheet: 26px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --nav-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--paper); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  min-height: 100vh;
}
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; }
img, video { display: block; max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.wordmark { display: inline-flex; align-items: center; line-height: 0; text-decoration: none; flex: none; }
.logo { display: block; height: 30px; width: auto; }
.auth-main .logo { height: 40px; }
@media (min-width: 960px) { .auth-main > .wordmark + * { margin-top: auto; } .auth-main > :last-child { margin-bottom: auto; } }
.boot-logo { height: 46px; width: auto; margin: 0 auto; }
@media (min-width: 900px) { .top .logo { height: 34px; } }
.boot { min-height: 100vh; display: grid; place-items: center; }

/* ---------- type ---------- */
.h1 { font-weight: 800; font-stretch: 112%; font-size: clamp(30px, 6vw, 40px); line-height: 1.02; letter-spacing: -0.025em; }
.h2 { font-weight: 800; font-stretch: 108%; font-size: 22px; line-height: 1.1; letter-spacing: -0.015em; }
.h3 { font-weight: 700; font-size: 17px; line-height: 1.25; }
.lead { font-size: 17px; color: var(--mute); max-width: 46ch; }
.small { font-size: 14px; }
.mute { color: var(--mute); }
.num { font-variant-numeric: tabular-nums; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 999px;
  font-weight: 700; font-size: 16px; line-height: 1; text-decoration: none; white-space: nowrap;
  border: 1.5px solid var(--ink); background: var(--paper); color: var(--ink);
  transition: transform 0.08s ease, background 0.15s ease;
}
.btn:active { transform: scale(0.98); }
.btn.solid { background: var(--ink); color: var(--paper); }
.btn.quiet { border-color: transparent; padding: 0 12px; }
.btn.quiet:hover { background: var(--raise); }
.btn.danger { border-color: var(--alert); color: var(--alert); }
.btn.small { min-height: 38px; padding: 0 16px; font-size: 14.5px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: 0.35; pointer-events: none; }
.btn svg { width: 20px; height: 20px; flex: none; }
.link { font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
.icon-btn { width: 44px; height: 44px; display: inline-grid; place-items: center; border-radius: 50%; }
.icon-btn:hover { background: var(--raise); }
.icon-btn svg { width: 22px; height: 22px; }
.icon { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- forms ---------- */
.field { display: grid; gap: 8px; }
.field > label, .field > .label { font-weight: 600; font-size: 15px; }
.input, select.input, textarea.input {
  width: 100%; min-height: 52px; padding: 13px 16px; border-radius: var(--r-field);
  border: 1.5px solid var(--line-strong); background: var(--paper); font-size: 16px;
  appearance: none; -webkit-appearance: none;
}
textarea.input { min-height: 88px; resize: vertical; line-height: 1.4; }
.input:hover { border-color: #9c9c9c; }
.input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
select.input { background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 22px) 52%, calc(100% - 16px) 52%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 44px; }
input[type="time"].input, input[type="date"].input { min-height: 52px; }
.hint { font-size: 14px; color: var(--mute); }
.error { color: var(--alert); font-size: 15px; font-weight: 500; }
.error:empty { display: none; }
.form { display: grid; gap: 20px; }
.row { display: flex; align-items: center; gap: 12px; }
.row.wrap { flex-wrap: wrap; }
.times { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 10px; align-items: center; }
.times .input { min-width: 0; padding-left: 12px; padding-right: 8px; }
.row.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.code-input { font-weight: 800; font-stretch: 125%; font-size: 30px; letter-spacing: 0.22em; text-transform: uppercase; text-align: center; min-height: 68px; }

/* chips and segmented */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 40px; padding: 0 15px; border-radius: 999px; border: 1.5px solid var(--line-strong); font-weight: 600; font-size: 14.5px; display: inline-flex; align-items: center; gap: 6px; }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--raise); border-radius: 999px; padding: 4px; }
.seg button { min-height: 42px; border-radius: 999px; font-weight: 600; font-size: 15px; color: var(--mute); }
.seg button[aria-pressed="true"] { background: var(--paper); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,0.12), 0 0 0 1px rgba(0,0,0,0.06); }

/* switch */
.switch { position: relative; width: 52px; height: 32px; flex: none; border-radius: 999px; background: var(--line-strong); transition: background 0.15s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: var(--paper); transition: transform 0.15s; box-shadow: 0 1px 2px rgba(0,0,0,0.25); }
.switch[aria-checked="true"] { background: var(--ink); }
.switch[aria-checked="true"]::after { transform: translateX(20px); }

/* stepper */
.stepper { justify-self: start; display: inline-flex; align-items: center; border: 1.5px solid var(--line-strong); border-radius: 999px; }
.stepper button { width: 46px; height: 46px; font-size: 22px; font-weight: 500; }
.stepper output { min-width: 64px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- auth pages ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr); }
.auth-main { padding: 28px 22px 40px; display: flex; flex-direction: column; gap: 36px; max-width: 460px; width: 100%; margin: 0 auto; }
.auth-main .h1 { margin-bottom: 10px; }
.auth-foot { font-size: 15px; color: var(--mute); }
@media (min-width: 960px) {
  .auth-main { padding: 40px 48px; min-height: 100vh; }
}

/* ---------- shell ---------- */
.shell { min-height: 100vh; padding-bottom: calc(var(--nav-h) + var(--safe-b) + 24px); }
.top { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,0.94); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid transparent; }
.top.scrolled { border-bottom-color: var(--line); }
.top-in { max-width: 1080px; margin: 0 auto; height: 60px; padding: 0 18px; display: flex; align-items: center; gap: 18px; }
.top .tabs { display: none; }
.top .new-btn { display: none; }
.plan-pill { margin-left: auto; font-size: 13.5px; font-weight: 600; padding: 6px 12px; border-radius: 999px; border: 1.5px solid var(--ink); text-decoration: none; white-space: nowrap; }
.plan-pill.alert { background: var(--ink); color: var(--paper); }
.main { max-width: 1080px; margin: 0 auto; padding: 18px 18px 0; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 6px 0 22px; }
.page-head .sub { color: var(--mute); margin-top: 6px; }

.nav { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; background: var(--paper); border-top: 1px solid var(--line); padding-bottom: var(--safe-b); }
.nav-in { height: var(--nav-h); display: grid; grid-template-columns: 1fr 1fr 76px 1fr; align-items: center; max-width: 520px; margin: 0 auto; }
.nav a, .nav button { display: grid; justify-items: center; gap: 3px; font-size: 12px; font-weight: 600; color: var(--mute); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--ink); }
.nav a svg { width: 24px; height: 24px; }
.nav .plus { width: 54px; height: 54px; border-radius: 50%; background: var(--ink); color: var(--paper); display: grid; place-items: center; justify-self: center; margin-top: -2px; box-shadow: 0 6px 18px rgba(0,0,0,0.22); }
.nav .plus svg { width: 26px; height: 26px; stroke-width: 2.2; }

@media (min-width: 900px) {
  .shell { padding-bottom: 60px; }
  .nav { display: none; }
  .top-in { height: 72px; padding: 0 28px; }
  .top .tabs { display: flex; gap: 4px; margin-left: 28px; }
  .top .tabs a { padding: 9px 14px; border-radius: 999px; font-weight: 600; text-decoration: none; color: var(--mute); }
  .top .tabs a[aria-current="page"] { color: var(--ink); background: var(--raise); }
  .top .new-btn { display: inline-flex; }
  .plan-pill { margin-left: auto; }
  .main { padding: 34px 28px 0; }
}

/* banner */
.banner { display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 16px 18px; border-radius: 16px; background: var(--ink); color: var(--paper); margin-bottom: 22px; }
.banner p { font-weight: 500; max-width: 60ch; }
.banner .btn { border-color: var(--paper); background: var(--paper); color: var(--ink); min-height: 40px; }
.banner.soft { background: var(--raise); color: var(--ink); }
.banner.soft .btn { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.managing { background: var(--ink); color: var(--paper); font-size: 14px; }
.managing .top-in { height: 44px; }
.managing a, .managing button { color: var(--paper); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- screens: the Nexus slabs ---------- */
.slabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 16px; }
@media (min-width: 640px) { .slabs { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 960px) { .slabs { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 34px 26px; } }
.unit { text-align: left; display: grid; gap: 12px; width: 100%; align-content: start; }
.slab { position: relative; padding: 0 0 12px; }
.slab-face { position: relative; aspect-ratio: 10 / 15; background: var(--ink); border-radius: 16px; padding: 7px; box-shadow: 0 1px 0 rgba(255,255,255,0.1) inset; }
.slab-face::before { content: ""; position: absolute; left: 50%; top: 3px; width: 14%; height: 2px; margin-left: -7%; border-radius: 2px; background: #2a2a2a; }
.slab::after { content: ""; position: absolute; left: 22%; right: 22%; bottom: 0; height: 13px; background: var(--ink); border-radius: 0 0 10px 10px; clip-path: polygon(6% 0, 94% 0, 100% 100%, 0 100%); }
.glass { position: relative; width: 100%; height: 100%; border-radius: 10px; overflow: hidden; background: #0d0d0d; }
.glass img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity 0.7s ease; }
.glass img.on { opacity: 1; }
.glass.fit-cover img { object-fit: cover; }
.glass .empty-glass { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: #8a8a8a; font-size: 12.5px; padding: 10px; line-height: 1.3; }
.slab.offline .glass img { filter: grayscale(1) brightness(0.45); }
.unit:hover .slab-face { transform: translateY(-2px); }
.slab-face { transition: transform 0.2s ease; }
.unit-name { font-weight: 700; font-size: 16px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.unit-meta { display: flex; align-items: center; gap: 7px; font-size: 13.5px; color: var(--mute); margin-top: 2px; }
.dot { width: 9px; height: 9px; border-radius: 50%; border: 1.8px solid var(--ink); flex: none; }
.dot.on { background: var(--ink); }
.dot.off { border-color: var(--mute); }
.unit.add .slab-face { background: var(--paper); border: 2px dashed var(--line-strong); display: grid; place-items: center; }
.unit.add .slab-face::before { display: none; }
.unit.add .slab::after { background: var(--line-strong); }
.unit.add .plus-big { width: 52px; height: 52px; border-radius: 50%; background: var(--ink); color: var(--paper); display: grid; place-items: center; }

/* empty states */
.empty { display: grid; justify-items: start; gap: 14px; padding: 8px 0 20px; max-width: 520px; }
.empty .h2 { margin-top: 8px; }
.empty ol { display: grid; gap: 10px; margin: 6px 0 8px; counter-reset: step; }
.empty ol li { display: grid; grid-template-columns: 30px 1fr; gap: 10px; align-items: start; counter-increment: step; }
.empty ol li::before { content: counter(step); width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: var(--paper); font-size: 13px; font-weight: 700; display: grid; place-items: center; margin-top: 1px; }
.hero-slab { width: 150px; margin-bottom: 6px; }
.hero-slab .glass { display: grid; place-items: center; }
.hero-slab .glass span { color: #fff; font-weight: 800; font-stretch: 125%; font-size: 15px; letter-spacing: 0.08em; }

/* ---------- promos ---------- */
.section-label { font-weight: 700; font-size: 15px; margin: 26px 0 6px; display: flex; align-items: baseline; gap: 8px; }
.section-label span { color: var(--mute); font-weight: 500; }
.promos { border-top: 1px solid var(--line); }
.promo { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.promo .open { grid-column: 1 / 3; display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 14px; align-items: center; text-align: left; min-width: 0; border-radius: 12px; }
.thumb { position: relative; width: 64px; height: 64px; border-radius: 12px; overflow: hidden; background: var(--raise); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .vid { position: absolute; left: 5px; bottom: 5px; background: rgba(0,0,0,0.78); color: #fff; font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: 6px; display: flex; align-items: center; gap: 3px; }
.thumb .vid svg { width: 9px; height: 9px; fill: #fff; stroke: none; }
.vid-tile { position: absolute; inset: 0; background: var(--ink); display: grid; place-items: center; }
.vid-tile svg { width: 22%; height: 22%; fill: #fff; }
.promo-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.promo-when { font-size: 14px; color: var(--mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.promo.is-off .thumb img { opacity: 0.4; filter: grayscale(1); }
.promo .order { display: flex; gap: 2px; }
.live-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; }
.live-tag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ink); }

/* ---------- account ---------- */
.stack { display: grid; gap: 34px; max-width: 620px; }
.block-title { font-weight: 700; font-size: 15px; margin-bottom: 12px; }
.plan { border: 1.5px solid var(--ink); border-radius: 20px; padding: 22px; display: grid; gap: 16px; }
.plan.dark { background: var(--ink); color: var(--paper); }
.plan.dark .mute { color: #a9a9a9; }
.plan.dark .btn.solid { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.plan.dark .btn { border-color: var(--paper); color: var(--paper); background: transparent; }
.plan-status { font-weight: 800; font-stretch: 110%; font-size: 24px; line-height: 1.1; letter-spacing: -0.015em; }
.sum { display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; font-size: 15px; }
.sum dt { color: inherit; opacity: 0.7; }
.sum dd { margin: 0; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.sum dd.total { font-weight: 800; font-size: 18px; }
.list { border-top: 1px solid var(--line); }
.list > li, .list > .item { display: flex; align-items: center; gap: 12px; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid var(--line); min-height: 58px; }
.list .item-main { min-width: 0; }
.list .item-main b { display: block; font-weight: 600; }
.list .item-main span { color: var(--mute); font-size: 14px; }
.meter { height: 8px; border-radius: 999px; background: var(--raise); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--ink); border-radius: 999px; }

/* ---------- sheets ---------- */
.scrim { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,0.42); display: flex; align-items: flex-end; justify-content: center; animation: fade 0.18s ease; }
.sheet { width: 100%; max-width: 560px; max-height: calc(100vh - 28px); max-height: calc(100dvh - 28px); background: var(--paper); border-radius: var(--r-sheet) var(--r-sheet) 0 0; display: flex; flex-direction: column; animation: up 0.24s cubic-bezier(0.2, 0.8, 0.2, 1); }
.sheet-head { display: flex; align-items: center; gap: 8px; padding: 14px 14px 6px 22px; }
.sheet-head .h2 { flex: 1; min-width: 0; }
.sheet-grip { width: 40px; height: 5px; border-radius: 3px; background: var(--line-strong); margin: 8px auto 0; }
.sheet-body { overflow: auto; padding: 10px 22px 22px; display: grid; gap: 22px; overscroll-behavior: contain; }
.sheet-foot { padding: 14px 22px calc(14px + var(--safe-b)); border-top: 1px solid var(--line); display: flex; gap: 10px; }
.sheet-foot .btn { flex: 1; }
@media (min-width: 700px) {
  .scrim { align-items: center; padding: 24px; }
  .sheet { border-radius: var(--r-sheet); max-height: calc(100vh - 48px); }
  .sheet.wide { max-width: 860px; }
  .sheet-grip { display: none; }
  .sheet-head { padding-top: 18px; }
}
@keyframes up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } }

/* source chooser */
.sources { display: grid; gap: 12px; }
.source { display: grid; grid-template-columns: 56px 1fr; gap: 16px; align-items: center; text-align: left; padding: 18px; border-radius: 18px; border: 1.5px solid var(--line-strong); }
.source:hover { border-color: var(--ink); }
.source .glyph { width: 56px; height: 56px; border-radius: 14px; background: var(--ink); color: var(--paper); display: grid; place-items: center; }
.source .glyph svg { width: 26px; height: 26px; }
.source b { display: block; font-size: 17px; }
.source span { color: var(--mute); font-size: 14.5px; }

/* upload previews */
.picks { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.pick { position: relative; flex: none; width: 92px; height: 92px; border-radius: 14px; overflow: hidden; background: var(--raise); }
.pick img { width: 100%; height: 100%; object-fit: cover; }
.pick .bar { position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: rgba(255,255,255,0.6); }
.pick .bar i { display: block; height: 100%; background: var(--ink); transition: width 0.2s; }
.pick .state { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0,0,0,0.45); color: #fff; font-size: 12px; font-weight: 700; text-align: center; padding: 6px; }
.pick.done .state { display: none; }
.pick.failed .state { background: rgba(217,45,32,0.85); }
.pick .x { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 50%; background: rgba(0,0,0,0.7); color: #fff; display: grid; place-items: center; }
.pick .x svg { width: 14px; height: 14px; stroke-width: 2.4; }
.single-preview { border-radius: 18px; overflow: hidden; background: var(--ink); display: grid; place-items: center; max-height: 46vh; }
.single-preview img, .single-preview video { max-height: 46vh; width: auto; margin: 0 auto; }

/* text promo maker */
.maker { display: grid; gap: 20px; }
@media (min-width: 700px) { .maker { grid-template-columns: 260px minmax(0, 1fr); align-items: start; } }
.maker-preview { background: var(--raise); border-radius: 18px; padding: 14px; display: grid; place-items: center; }
.maker-preview canvas { width: auto; height: auto; max-width: 100%; max-height: 34vh; border-radius: 6px; box-shadow: 0 8px 26px rgba(0,0,0,0.18); }
@media (min-width: 700px) { .maker-preview { position: sticky; top: 0; } .maker-preview canvas { max-height: 52vh; } }
.maker-preview.landscape canvas { max-height: none; }
.styles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.style-opt { aspect-ratio: 3 / 4; border-radius: 10px; border: 1.5px solid var(--line-strong); overflow: hidden; display: grid; padding: 0; position: relative; }
.style-opt[aria-pressed="true"] { outline: 2.5px solid var(--ink); outline-offset: 2px; }
.style-opt span { position: absolute; left: 0; right: 0; bottom: 6px; font-size: 11px; font-weight: 700; text-align: center; }
.style-opt.s-black { background: #000; color: #fff; }
.style-opt.s-white { background: #fff; color: #000; }
.style-opt.s-split { background: linear-gradient(#000 0 55%, #fff 55% 100%); color: #000; }
.style-opt.s-photo { background: linear-gradient(160deg, #8a8a8a, #222); color: #fff; }

/* ---------- admin ---------- */
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; margin-bottom: 30px; }
@media (min-width: 760px) { .stats { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.stat { background: var(--paper); padding: 18px; }
.stat b { display: block; font-weight: 800; font-stretch: 110%; font-size: 26px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat span { font-size: 13.5px; color: var(--mute); }
.cust { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; padding: 16px 0; border-bottom: 1px solid var(--line); align-items: center; }
.cust .who b { display: block; font-weight: 700; }
.cust .who span { font-size: 14px; color: var(--mute); overflow-wrap: anywhere; }
.cust .facts { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 14px; color: var(--mute); }
.tag { display: inline-block; font-size: 12.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px; border: 1.5px solid var(--ink); white-space: nowrap; }
.tag.fill { background: var(--ink); color: var(--paper); }
.tag.ghost { border-color: var(--line-strong); color: var(--mute); }
.note { padding: 14px 16px; border-radius: 14px; background: var(--raise); font-size: 14.5px; }

/* ---------- toasts ---------- */
#toasts { position: fixed; z-index: 80; left: 0; right: 0; bottom: calc(var(--nav-h) + var(--safe-b) + 14px); display: grid; justify-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
@media (min-width: 900px) { #toasts { bottom: 28px; } }
.toast { background: var(--ink); color: var(--paper); padding: 13px 18px; border-radius: 14px; font-weight: 600; font-size: 15px; max-width: 440px; box-shadow: 0 10px 30px rgba(0,0,0,0.25); animation: up 0.2s ease; pointer-events: auto; }
.toast.err { background: var(--alert); }

/* scanner */
.scanner { position: relative; border-radius: 18px; overflow: hidden; background: #000; aspect-ratio: 1; }
.scanner video { width: 100%; height: 100%; object-fit: cover; }
.scanner::after { content: ""; position: absolute; inset: 18%; border: 3px solid #fff; border-radius: 18px; box-shadow: 0 0 0 999px rgba(0,0,0,0.35); }

.center-page { max-width: 460px; margin: 0 auto; padding: 8px 0 40px; display: grid; gap: 22px; }
.done-mark { width: 64px; height: 64px; border-radius: 50%; background: var(--ink); color: var(--paper); display: grid; place-items: center; }
.done-mark svg { width: 32px; height: 32px; stroke-width: 2.4; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--ink); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- time picker ---------- */
.time-btn { display: grid; gap: 0; text-align: left; font-weight: 700; font-size: 17px; padding-top: 7px; padding-bottom: 7px; line-height: 1.25; }
.time-btn .small { font-weight: 500; font-size: 12.5px; }
.time-btn[aria-expanded="true"] { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.tp { display: grid; gap: 10px; padding: 16px; border-radius: 18px; background: var(--raise); }
.tp-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tp-head b { font-size: 17px; }
.tp-ampm { width: 128px; background: var(--paper); }
.tp-ampm button { min-height: 36px; }
.tp-ampm button[aria-pressed="true"] { background: var(--ink); color: var(--paper); box-shadow: none; }
.tp-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.tp-grid button { min-height: 44px; border-radius: 12px; background: var(--paper); font-weight: 600; font-variant-numeric: tabular-nums; }
.tp-grid button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

/* double-sided Nexus: a second panel peeks out behind */
.slab.double .slab-face { box-shadow: 7px -7px 0 -1px #3b3b3b; }
.glass video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity 0.7s ease; }
.glass video.on { opacity: 1; }
.glass.fit-cover video { object-fit: cover; }

/* ---------- name lockup: logo | Studio ---------- */
.lockup { display: inline-flex; align-items: center; gap: 12px; }
.lockup-name { font-weight: 600; font-stretch: 125%; font-size: 13px; letter-spacing: 0.32em; text-transform: uppercase; padding-left: 12px; border-left: 1.5px solid var(--ink); line-height: 22px; }
.auth-main .lockup-name { font-size: 14px; line-height: 26px; }
@media (max-width: 380px) { .top .lockup-name { display: none; } }

/* which side of a double-sided Nexus */
.side-pick { display: grid; gap: 8px; padding: 12px; border-radius: 14px; background: var(--raise); }
.side-pick .side-name { font-weight: 600; font-size: 14.5px; }
.side-pick .seg { background: var(--paper); }
.side-pick .seg button { min-height: 38px; font-size: 14px; }

/* Card frames: one picture, video or note at a time; double-sided cards label each side. */
.glass .fr { position: absolute; inset: 0; opacity: 0; transition: opacity 0.7s ease; }
.glass .fr.on { opacity: 1; }
.glass .fr img, .glass .fr video { opacity: 1; }
.side-tag { position: absolute; left: 6px; bottom: 6px; background: #fff; color: #000; font-size: 10.5px; font-weight: 700; letter-spacing: 0.02em; padding: 2px 6px; border-radius: 6px; }

/* The Nexus itself in a Nexus's settings: brightness, sound, Find */
.dev { display: grid; gap: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
select.input { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 36px; }
.range { width: 100%; accent-color: var(--ink); height: 28px; }

/* Two-step sign-in setup */
.steps-2fa { display: grid; gap: 10px; margin: 0; }
.steps-2fa p { margin: 0; }
.qr-2fa { width: 200px; height: 200px; margin: 6px auto; background: #fff; padding: 8px; border-radius: 12px; border: 1px solid var(--line); }
.qr-2fa svg { width: 100%; height: 100%; display: block; }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: 0.06em; }
