/* ============================================================
   snapgrid — design tokens
   ============================================================ */
:root {
  --accent-h: 258; --accent-s: 90%; --accent-l: 66%;
  --accent:        hsl(var(--accent-h) var(--accent-s) var(--accent-l));
  --accent-soft:   hsl(var(--accent-h) var(--accent-s) var(--accent-l) / .14);
  --accent-line:   hsl(var(--accent-h) var(--accent-s) var(--accent-l) / .38);
  --accent-ink:    #fff;

  --radius:   14px;
  --radius-lg: 20px;
  --radius-sm: 9px;
  --header-h: 60px;

  --ease: cubic-bezier(.2, .7, .3, 1);
  --fast: .14s var(--ease);
  --med:  .26s var(--ease);

  --font: 'Inter var', Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, monospace;
}

/* dark (default) */
:root, [data-theme='dark'] {
  --bg:        #0a0a0d;
  --bg-2:      #101015;
  --surface:   #16161d;
  --surface-2: #1d1d26;
  --surface-3: #262632;
  --line:      #ffffff14;
  --line-2:    #ffffff22;
  --ink:       #f2f2f7;
  --ink-2:     #a9a9b8;
  --ink-3:     #6f6f80;
  --shadow:    0 1px 2px #0006, 0 8px 24px -8px #0009;
  --shadow-lg: 0 24px 60px -12px #000c, 0 2px 8px #0008;
  --scrim:     #05050899;
  --danger:    #ff5d6e;
  --ok:        #35d29a;
}
[data-theme='light'] {
  --bg:        #f7f7fa;
  --bg-2:      #ffffff;
  --surface:   #ffffff;
  --surface-2: #f2f2f6;
  --surface-3: #e7e7ee;
  --line:      #12121a14;
  --line-2:    #12121a24;
  --ink:       #15151c;
  --ink-2:     #5b5b6b;
  --ink-3:     #8c8c9d;
  --shadow:    0 1px 2px #0000000f, 0 8px 24px -10px #0000001f;
  --shadow-lg: 0 24px 60px -12px #00000026, 0 2px 8px #0000000f;
  --scrim:     #1a1a2299;
  --danger:    #d92c43;
  --ok:        #12996c;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14.5px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-y: scroll;
}
[data-motion='off'] * { animation-duration: 0s !important; transition-duration: 0s !important; }

a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--accent-soft); }

/* scrollbars */
* { scrollbar-width: thin; scrollbar-color: var(--surface-3) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 99px; border: 3px solid transparent; background-clip: content-box; }
*::-webkit-scrollbar-thumb:hover { background: var(--ink-3); background-clip: content-box; }

/* ============================================================
   primitives
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 36px; padding: 0 14px;
  border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  background: var(--surface-2); color: var(--ink);
  font-weight: 560; font-size: 13.5px; letter-spacing: -.01em;
  cursor: pointer; white-space: nowrap;
  transition: background var(--fast), border-color var(--fast), transform var(--fast), opacity var(--fast);
}
.btn:hover { background: var(--surface-3); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn.primary { background: var(--accent); border-color: transparent; color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn.danger { color: var(--danger); border-color: transparent; background: transparent; }
.btn.danger:hover { background: color-mix(in oklab, var(--danger) 14%, transparent); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 12.5px; }
.btn.icon { width: 36px; padding: 0; }
.btn.icon.sm { width: 30px; }

.input, .textarea, .select {
  width: 100%; padding: 9px 12px;
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  transition: border-color var(--fast), box-shadow var(--fast);
}
.input:focus, .textarea:focus, .select:focus {
  outline: none; border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-soft);
}
.textarea { resize: vertical; min-height: 76px; line-height: 1.55; }
.label { display: block; font-size: 12px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; letter-spacing: .01em; }
.hint { font-size: 12px; color: var(--ink-3); margin-top: 6px; }
.err { color: var(--danger); font-size: 13px; }

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
}

kbd {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; padding: 0 5px;
  background: var(--surface-3); border: 1px solid var(--line-2); border-bottom-width: 2px;
  border-radius: 5px; font: 600 11px/1 var(--mono); color: var(--ink-2);
}

.avatar {
  flex: none; border-radius: 50%; object-fit: cover;
  background: var(--surface-3); display: grid; place-items: center;
  font-weight: 700; color: var(--ink-2); overflow: hidden; user-select: none;
}
.avatar span { font-size: .42em; letter-spacing: .02em; }

.spinner {
  width: 15px; height: 15px; border-radius: 50%;
  border: 2px solid var(--line-2); border-top-color: var(--accent);
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   app shell
   ============================================================ */
.header {
  position: sticky; top: 0; z-index: 60;
  height: var(--header-h);
  display: flex; align-items: center; gap: 12px;
  padding: 0 18px;
  background: color-mix(in oklab, var(--bg) 78%, transparent);
  backdrop-filter: blur(18px) saturate(1.6);
  -webkit-backdrop-filter: blur(18px) saturate(1.6);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 9px; font-weight: 760; letter-spacing: -.03em; font-size: 16px; }
.brand-mark {
  width: 26px; height: 26px; border-radius: 8px; flex: none;
  background: linear-gradient(135deg, var(--accent), color-mix(in oklab, var(--accent) 40%, #12d8c4));
  display: grid; place-items: center; color: #fff; font-size: 14px;
  box-shadow: 0 2px 10px -2px var(--accent-line);
}
.header-spacer { flex: 1; }

.search-wrap { position: relative; flex: 1; max-width: 420px; }
.search-wrap .ico { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; display: flex; }
.search {
  width: 100%; height: 36px; padding: 0 62px 0 34px;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 99px;
  transition: border-color var(--fast), box-shadow var(--fast), background var(--fast);
}
.search:focus { outline: none; border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-soft); background: var(--bg-2); }
.search::placeholder { color: var(--ink-3); }
.search-hint { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); pointer-events: none; opacity: .75; }
.search:focus ~ .search-hint { opacity: 0; }

.nav-tabs { display: flex; gap: 2px; background: var(--surface-2); padding: 3px; border-radius: 99px; border: 1px solid var(--line); }
.nav-tab {
  padding: 5px 13px; border-radius: 99px; font-size: 13px; font-weight: 560; color: var(--ink-2);
  cursor: pointer; border: none; background: transparent; transition: color var(--fast), background var(--fast);
}
.nav-tab:hover { color: var(--ink); }
.nav-tab.on { background: var(--bg-2); color: var(--ink); box-shadow: var(--shadow); }

/* tag chip rail */
.chips-bar {
  position: sticky; top: var(--header-h); z-index: 55;
  background: color-mix(in oklab, var(--bg) 82%, transparent);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}
.chips-scroll {
  display: flex; align-items: center; gap: 7px;
  padding: 10px 18px; overflow-x: auto; scrollbar-width: none;
}
.chips-scroll::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  height: 30px; padding: 0 12px;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 99px;
  font-size: 12.8px; font-weight: 540; color: var(--ink-2); cursor: pointer;
  transition: all var(--fast); white-space: nowrap;
}
.chip:hover { color: var(--ink); border-color: var(--ink-3); transform: translateY(-1px); }
.chip.on {
  background: var(--accent); border-color: transparent; color: var(--accent-ink);
  box-shadow: 0 3px 12px -3px var(--accent-line);
}
.chip.on .chip-n { background: #ffffff2e; color: inherit; }
.chip-n {
  font: 600 11px/1 var(--mono); padding: 3px 5px; border-radius: 5px;
  background: var(--surface-3); color: var(--ink-3);
}
.chip.ai::before { content: '✦'; font-size: 10px; opacity: .75; }
.chips-fade { position: absolute; right: 0; top: 0; bottom: 0; width: 48px; pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--bg)); }

/* ============================================================
   grid
   ============================================================ */
.page { max-width: 1560px; margin: 0 auto; padding: 20px 18px 90px; }
.page.narrow { max-width: 720px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--col, 260px), 1fr));
  grid-auto-rows: 6px;
  gap: 0 16px;
}
[data-density='cozy']  { --col: 320px; }
[data-density='dense'] { --col: 190px; }

/* The feed is a wall of photographs, not a set of cards: square corners, no
   border, no shadow, nothing drawn around the edge of an image. */
.tile {
  position: relative; grid-row-end: span 40;
  overflow: hidden; border: none; border-radius: 0;
  background: var(--surface-2); cursor: zoom-in;
}
.tile:focus, .tile:focus-visible { outline: none; }
/* Keyboard navigation still needs a visible cursor. It appears only while
   arrow-keying, and sits inside the frame so it never adds an outline to the
   silhouette of the photo. */
body.kbnav .tile.sel::after {
  content: ''; position: absolute; inset: 0; z-index: 3; pointer-events: none;
  box-shadow: inset 0 0 0 2px var(--accent);
}
.tile-img { position: relative; z-index: 1; display: block; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .4s var(--ease); }
.tile-img.in { opacity: 1; }
.tile-blur { position: absolute; z-index: 0; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(18px); transform: scale(1.1); }
.tile-meta {
  position: absolute; inset: auto 0 0 0; padding: 30px 12px 11px;
  display: flex; align-items: center; gap: 8px;
  background: linear-gradient(transparent, #000000cc);
  color: #fff; opacity: 0; transition: opacity var(--med); z-index: 2;
  font-size: 12.5px;
}
.tile:hover .tile-meta, .tile.sel .tile-meta { opacity: 1; }
.tile-meta .avatar { width: 22px; height: 22px; font-size: 22px; }
.tile-user { font-weight: 600; text-shadow: 0 1px 3px #0009; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile-stats { margin-left: auto; display: flex; gap: 10px; align-items: center; text-shadow: 0 1px 3px #0009; }
.tile-stats span { display: inline-flex; align-items: center; gap: 3px; }
.tile-like {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  width: 30px; height: 30px; border-radius: 50%; border: none;
  background: #0b0b0fa8; backdrop-filter: blur(8px); color: #fff;
  display: grid; place-items: center; cursor: pointer; opacity: 0;
  transition: opacity var(--med), transform var(--fast), background var(--fast);
}
.tile:hover .tile-like, .tile.sel .tile-like, .tile-like.on { opacity: 1; }
.tile-like:hover { transform: scale(1.1); }
.tile-like.on { color: var(--danger); background: #0b0b0fcc; }

@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.32); } 100% { transform: scale(1); } }
.pop { animation: pop .34s var(--ease); }

/* skeleton */
.sk { grid-row-end: span 46; border-radius: 0; background: var(--surface-2); position: relative; overflow: hidden; }
.sk::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, #ffffff0d, transparent);
  animation: sweep 1.4s infinite;
}
[data-theme='light'] .sk::after { background: linear-gradient(90deg, transparent, #00000008, transparent); }
@keyframes sweep { to { transform: translateX(100%); } }

.empty { text-align: center; padding: 90px 20px; color: var(--ink-3); }
.empty-icon { font-size: 40px; margin-bottom: 14px; opacity: .5; }
.empty h3 { color: var(--ink); margin: 0 0 6px; font-size: 17px; letter-spacing: -.02em; }
.empty p { margin: 0 auto; max-width: 380px; font-size: 13.5px; }

/* ============================================================
   lightbox
   ============================================================ */
.lb {
  position: fixed; inset: 0; z-index: 200;
  background: var(--scrim); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  display: grid; place-items: center; padding: 26px;
  animation: fade .18s var(--ease);
}
@keyframes fade { from { opacity: 0; } }
.lb-box {
  display: grid; grid-template-columns: minmax(0, 1fr) 372px;
  width: min(1360px, 100%); max-height: calc(100vh - 52px);
  background: var(--surface); border: 1px solid var(--line-2);
  border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg);
  animation: rise .24s var(--ease);
}
@keyframes rise { from { transform: translateY(14px) scale(.985); opacity: 0; } }
.lb-stage { background: #050508; display: grid; place-items: center; min-height: 0; position: relative; }
.lb-stage img { max-width: 100%; max-height: calc(100vh - 52px); object-fit: contain; display: block; }
.lb-side { display: flex; flex-direction: column; min-height: 0; background: var(--surface); border-left: 1px solid var(--line); }
.lb-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.lb-head .avatar { width: 36px; height: 36px; font-size: 36px; }
.lb-name { font-weight: 640; letter-spacing: -.01em; }
.lb-sub { font-size: 12px; color: var(--ink-3); }
.lb-body { flex: 1; overflow-y: auto; padding: 15px 16px; min-height: 0; }
.lb-caption { margin: 0 0 14px; white-space: pre-wrap; word-break: break-word; }
.lb-actions { display: flex; align-items: center; gap: 6px; padding: 10px 12px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.lb-foot { padding: 11px 12px; border-top: 1px solid var(--line); display: flex; gap: 8px; }
.lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 42px; height: 42px; border-radius: 50%;
  background: #0b0b0fb3; border: 1px solid #ffffff20; color: #fff;
  display: grid; place-items: center; cursor: pointer;
  backdrop-filter: blur(8px); transition: background var(--fast), transform var(--fast);
}
.lb-nav:hover { background: #0b0b0f; transform: translateY(-50%) scale(1.06); }
.lb-nav.prev { left: 14px; } .lb-nav.next { right: 14px; }
.lb-nav.hide { display: none; }
.lb-close { position: absolute; top: 14px; right: 14px; z-index: 3; }

.taglist { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.tag-pill {
  display: inline-flex; align-items: center; gap: 5px;
  height: 26px; padding: 0 9px; border-radius: 7px;
  background: var(--surface-2); border: 1px solid var(--line);
  font-size: 12px; color: var(--ink-2); cursor: pointer; transition: all var(--fast);
}
.tag-pill:hover { color: var(--ink); border-color: var(--accent-line); background: var(--accent-soft); }
.tag-pill .x { color: var(--ink-3); font-size: 13px; line-height: 1; }
.tag-pill .x:hover { color: var(--danger); }
.tag-score { font: 600 10px/1 var(--mono); color: var(--ink-3); }
.tag-pill[data-kind='category'] { border-style: dashed; }

.comment { display: flex; gap: 9px; padding: 9px 0; border-top: 1px solid var(--line); }
.comment .avatar { width: 28px; height: 28px; font-size: 28px; }
.comment-body { flex: 1; min-width: 0; }
.comment-who { font-size: 12.5px; font-weight: 620; }
.comment-when { font-size: 11px; color: var(--ink-3); margin-left: 6px; font-weight: 400; }
.comment-text { font-size: 13.2px; word-break: break-word; white-space: pre-wrap; }

.section-title {
  font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  color: var(--ink-3); margin: 16px 0 8px;
}

/* ============================================================
   modal / sheet
   ============================================================ */
.modal {
  position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 24px;
  background: var(--scrim); backdrop-filter: blur(10px); animation: fade .16s var(--ease);
}
.modal-box {
  width: min(480px, 100%); max-height: calc(100vh - 60px); overflow-y: auto;
  background: var(--surface); border: 1px solid var(--line-2);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  animation: rise .22s var(--ease);
}
.modal-box.wide { width: min(680px, 100%); }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; font-size: 16px; letter-spacing: -.02em; }
.modal-content { padding: 18px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 18px; border-top: 1px solid var(--line); }
.field + .field { margin-top: 14px; }

.drop {
  border: 1.5px dashed var(--line-2); border-radius: var(--radius);
  padding: 26px; text-align: center; cursor: pointer;
  transition: border-color var(--fast), background var(--fast); color: var(--ink-3);
}
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-soft); color: var(--ink-2); }
.drop-preview { max-height: 260px; border-radius: var(--radius-sm); display: block; margin: 0 auto; }

/* ============================================================
   profile
   ============================================================ */
.profile-head { display: flex; gap: 22px; align-items: center; padding: 26px 0 22px; flex-wrap: wrap; }
.profile-head .avatar { width: 96px; height: 96px; font-size: 96px; box-shadow: var(--shadow); }
.profile-id { flex: 1; min-width: 220px; }
.profile-id h1 { margin: 0; font-size: 25px; letter-spacing: -.035em; }
.profile-at { color: var(--ink-3); font-size: 14px; }
.profile-bio { margin: 9px 0 0; color: var(--ink-2); max-width: 60ch; font-size: 13.6px; }
.stats { display: flex; gap: 24px; margin-top: 14px; }
.stat b { display: block; font-size: 17px; letter-spacing: -.02em; }
.stat span { font-size: 11.5px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .05em; }

/* settings */
.settings-grid { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 26px; align-items: start; }
.settings-nav { position: sticky; top: calc(var(--header-h) + 20px); display: flex; flex-direction: column; gap: 2px; }
.settings-nav button {
  text-align: left; padding: 8px 11px; border-radius: var(--radius-sm); border: none;
  background: transparent; color: var(--ink-2); cursor: pointer; font-size: 13.4px; font-weight: 540;
  transition: background var(--fast), color var(--fast);
}
.settings-nav button:hover { background: var(--surface-2); color: var(--ink); }
.settings-nav button.on { background: var(--accent-soft); color: var(--accent); }
.panel { padding: 20px; }
.panel h3 { margin: 0 0 4px; font-size: 15.5px; letter-spacing: -.02em; }
.panel > p.hint { margin: 0 0 16px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 0; border-top: 1px solid var(--line); }
.row:first-of-type { border-top: none; }
.row-label b { display: block; font-weight: 580; font-size: 13.6px; }
.row-label span { font-size: 12.2px; color: var(--ink-3); }
.row-control { flex: none; }

.seg { display: flex; gap: 2px; background: var(--surface-2); padding: 3px; border-radius: var(--radius-sm); border: 1px solid var(--line); }
.seg button {
  border: none; background: transparent; color: var(--ink-2); cursor: pointer;
  padding: 5px 11px; border-radius: 6px; font-size: 12.6px; font-weight: 560; transition: all var(--fast);
}
.seg button.on { background: var(--bg-2); color: var(--ink); box-shadow: var(--shadow); }

.swatches { display: flex; gap: 8px; }
.swatch { width: 26px; height: 26px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; transition: transform var(--fast); }
.swatch:hover { transform: scale(1.12); }
.swatch.on { border-color: var(--ink); }

input[type='range'] { -webkit-appearance: none; appearance: none; width: 180px; height: 4px; border-radius: 99px; background: var(--surface-3); }
input[type='range']::-webkit-slider-thumb {
  -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%;
  background: var(--accent); cursor: pointer; border: 2px solid var(--bg);
  box-shadow: 0 1px 4px #0006;
}
input[type='range']::-moz-range-thumb { width: 16px; height: 16px; border: 2px solid var(--bg); border-radius: 50%; background: var(--accent); cursor: pointer; }

.switch { position: relative; display: inline-block; width: 40px; height: 23px; flex: none; }
.switch input { opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch .track {
  position: absolute; inset: 0; border-radius: 99px; background: var(--surface-3);
  transition: background var(--fast); pointer-events: none;
}
.switch .knob {
  position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%;
  background: #fff; transition: transform var(--med); pointer-events: none; box-shadow: 0 1px 3px #0006;
}
.switch input:checked ~ .track { background: var(--accent); }
.switch input:checked ~ .knob { transform: translateX(17px); }

/* ============================================================
   menus, toasts, shortcuts
   ============================================================ */
.menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 90;
  min-width: 208px; padding: 5px;
  background: var(--surface); border: 1px solid var(--line-2);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  animation: rise .14s var(--ease);
}
.menu button, .menu a {
  display: flex; align-items: center; gap: 9px; width: 100%;
  padding: 8px 10px; border: none; background: transparent; color: var(--ink);
  border-radius: 7px; cursor: pointer; font-size: 13.4px; text-align: left;
}
.menu button:hover, .menu a:hover { background: var(--surface-2); }
.menu .sep { height: 1px; background: var(--line); margin: 5px 0; }
.menu .k { margin-left: auto; }

.toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 500; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  display: flex; align-items: center; gap: 9px;
  padding: 10px 15px; border-radius: 99px;
  background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow-lg);
  font-size: 13.2px; animation: toastin .24s var(--ease);
}
@keyframes toastin { from { transform: translateY(12px); opacity: 0; } }
.toast.err { border-color: var(--danger); color: var(--danger); }
.toast.ok .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }

.keys-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 26px; }
.keys-grid dl { margin: 0; }
.keys-grid dt { font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 7px; }
.keys-grid dd { margin: 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 5px 0; font-size: 13px; color: var(--ink-2); }
.keys-grid dd .kb { display: flex; gap: 3px; }

/* auth screen */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-card { width: min(400px, 100%); padding: 30px; }
.auth-card .brand { justify-content: center; margin-bottom: 6px; font-size: 19px; }
.auth-tag { text-align: center; color: var(--ink-3); font-size: 13.4px; margin-bottom: 22px; }
.auth-switch { text-align: center; margin-top: 16px; font-size: 13px; color: var(--ink-3); }
.auth-switch button { background: none; border: none; color: var(--accent); cursor: pointer; font-weight: 600; padding: 0; }

.upload-fab {
  position: fixed; right: 22px; bottom: 22px; z-index: 70;
  height: 46px; padding: 0 18px; border-radius: 99px;
  background: var(--accent); color: var(--accent-ink); border: none;
  font-weight: 640; font-size: 14px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  box-shadow: 0 8px 28px -6px var(--accent-line), var(--shadow);
  transition: transform var(--fast), filter var(--fast);
}
.upload-fab:hover { transform: translateY(-2px); filter: brightness(1.08); }

.progress { height: 3px; background: var(--surface-3); border-radius: 99px; overflow: hidden; margin-top: 12px; }
.progress i { display: block; height: 100%; background: var(--accent); transition: width .2s var(--ease); }

@media (max-width: 900px) {
  .lb-box { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; }
  .lb-side { border-left: none; border-top: 1px solid var(--line); max-height: 46vh; }
  .lb-stage img { max-height: 50vh; }
  .settings-grid { grid-template-columns: 1fr; }
  .settings-nav { position: static; flex-direction: row; overflow-x: auto; }
  .keys-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .header { padding: 0 12px; gap: 8px; }
  .brand span { display: none; }
  .nav-tabs { display: none; }
  .page { padding: 14px 12px 90px; }
  :root { --col: 150px; }
}
