/* =============================================================
   IOLX — styles
   Street-editorial. Near-black canvas, acid-lime + hot-coral,
   characterful display type. Mobile-first, app-shell layout.
   ============================================================= */

:root {
  --bg:        #0a0a0b;
  --bg-2:      #131316;
  --surface:   #17171b;
  --surface-2: #1e1e23;
  --line:      #2a2a31;
  --ink:       #f4f4f0;
  --ink-dim:   #a3a3ad;
  --ink-faint: #6c6c78;

  --lime:      #d8ff3e;
  --lime-deep: #b6e21f;
  --coral:     #ff5c5c;
  --magenta:   #ff2e93;
  --blue:      #3d7bff;

  --radius:    22px;
  --radius-sm: 14px;
  --shell:     440px;   /* app column width on desktop */
  --text-scale: 1;      /* set by Profile → Text size */

  --font-display: "Bricolage Grotesque", "Arial Black", sans-serif;
  --font-body:    "Instrument Sans", system-ui, sans-serif;
  --font-mono:    "Space Mono", ui-monospace, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body { height: 100%; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  overflow: hidden;
  overscroll-behavior: none;
  /* atmospheric glow behind the app column */
  background-image:
    radial-gradient(60% 40% at 50% -5%, rgba(216,255,62,0.10), transparent 70%),
    radial-gradient(50% 40% at 90% 110%, rgba(255,46,147,0.10), transparent 70%);
}

/* ---------- App shell ---------- */
.app {
  position: relative;
  width: 100%;
  max-width: var(--shell);
  height: 100dvh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  overflow: hidden;
}
@media (min-width: 500px) {
  .app {
    height: min(920px, 100dvh);
    margin-top: max(0px, calc((100dvh - 920px) / 2));
    border: 1px solid var(--line);
    border-radius: 34px;
    box-shadow: 0 40px 120px -30px rgba(0,0,0,0.8);
  }
}

/* ---------- Top bar ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px 10px;
  flex: 0 0 auto;
  z-index: 20;
}
.logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 26px;
  letter-spacing: -0.03em;
  line-height: 1;
  display: flex;
  align-items: baseline;
  gap: 1px;
}
.logo .x {
  color: var(--bg);
  background: var(--lime);
  padding: 0 6px;
  border-radius: 7px;
  transform: skewX(-6deg);
  display: inline-block;
}
.topbar-actions { display: flex; gap: 14px; align-items: center; }
.icon-btn {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
  cursor: pointer;
  transition: transform .15s, background .2s;
}
.icon-btn:active { transform: scale(0.9); }
.icon-btn svg { width: 19px; height: 19px; }

/* ---------- Category rail ---------- */
.cats {
  display: flex;
  gap: 8px;
  padding: 4px 18px 12px;
  overflow-x: auto;
  scrollbar-width: none;
  flex: 0 0 auto;
}
.cats::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.02em;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink-dim);
  cursor: pointer;
  white-space: nowrap;
  transition: all .18s;
  text-transform: uppercase;
}
.chip:hover { color: var(--ink); }
.chip.active {
  background: var(--lime);
  color: #0a0a0b;
  border-color: var(--lime);
  font-weight: 700;
}

/* ---------- Screens ---------- */
.screen { flex: 1 1 auto; position: relative; min-height: 0; display: none; }
.screen.active { display: flex; flex-direction: column; }

/* =============================================================
   FEED  — Tinder card stack
   ============================================================= */
#screen-feed { padding: 6px 0 4px; }
.deck {
  position: relative;
  flex: 1 1 auto;
  margin: 0 16px;
  min-height: 0;
}
.card {
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 24px 60px -24px rgba(0,0,0,0.9);
  display: flex;
  flex-direction: column;
  will-change: transform;
  user-select: none;
  touch-action: pan-y;
}
.card__media {
  position: relative;
  height: 34%;
  flex: 0 0 auto;
  overflow: hidden;
  background: var(--surface-2);
}
.card__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  pointer-events: none;
  display: block;
}
.card__media::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,10,11,0) 40%, rgba(10,10,11,0.85) 100%);
}
.card__kicker {
  position: absolute;
  top: 14px; left: 14px;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  font-weight: 700;
  color: #0a0a0b;
  background: var(--lime);
  padding: 5px 10px;
  border-radius: 6px;
}
.card__verified {
  position: absolute;
  top: 14px; right: 14px;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--ink);
  background: rgba(10,10,11,0.55);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.14);
  padding: 5px 9px;
  border-radius: 999px;
  display: flex; align-items: center; gap: 5px;
}
.card__verified b { color: var(--lime); }

.card__body {
  flex: 1 1 auto;
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.card__headline {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(20px, 5.4vw, 25px);
  line-height: 1.06;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
  max-height: 2.2em;          /* cap long real-world headlines at 2 lines */
  overflow: hidden;
}
.card__points {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 7px;
  overflow: hidden;
}
.card__points li {
  display: flex;
  gap: 10px;
  font-size: calc(13.5px * var(--text-scale));
  line-height: 1.3;
  color: var(--ink-dim);
}
.card__points li span {
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card__points li::before {
  content: counter(pt);
  counter-increment: pt;
  flex: 0 0 auto;
  width: 20px; height: 20px;
  margin-top: 1px;
  display: grid; place-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--lime);
  border: 1px solid var(--line);
  border-radius: 6px;
}
.card__points { counter-reset: pt; }
.card__meta {
  margin-top: auto;
  padding-top: 12px;
  display: flex; align-items: center; gap: 8px;
  font-size: 12px;
  color: var(--ink-faint);
  font-family: var(--font-mono);
}
.card__meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--ink-faint); }
.card__readmore {
  margin-top: 10px;
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink);
  background: none;
  border: none;
  border-bottom: 1.5px solid var(--lime);
  padding: 2px 0;
  cursor: pointer;
}

/* swipe stamps */
.stamp {
  position: absolute;
  top: 22px;
  z-index: 5;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 30px;
  letter-spacing: 0.02em;
  padding: 6px 14px;
  border-radius: 10px;
  border: 3px solid;
  opacity: 0;
  transform: rotate(-14deg);
  transition: opacity .1s;
  text-transform: uppercase;
}
.stamp--save { right: 20px; color: var(--lime); border-color: var(--lime); }
.stamp--skip { left: 20px; color: var(--coral); border-color: var(--coral); }

/* stacked depth for cards behind the top one */
.card[data-pos="1"] { transform: scale(0.955) translateY(14px); filter: brightness(0.8); }
.card[data-pos="2"] { transform: scale(0.91) translateY(28px);  filter: brightness(0.6); }
.card[data-pos="hidden"] { opacity: 0; pointer-events: none; }

/* action buttons */
.actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 16px 0 8px;
}
.act {
  border-radius: 50%;
  display: grid; place-items: center;
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--surface);
  transition: transform .15s, background .2s, border-color .2s;
}
.act:active { transform: scale(0.88); }
.act svg { width: 24px; height: 24px; }
.act--skip { width: 58px; height: 58px; color: var(--coral); }
.act--skip:hover { border-color: var(--coral); }
.act--read { width: 50px; height: 50px; color: var(--ink); }
.act--read:hover { border-color: var(--ink); }
.act--save { width: 58px; height: 58px; color: var(--lime); }
.act--save:hover { border-color: var(--lime); }

.deck-empty {
  position: absolute; inset: 0;
  display: none;
  flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  gap: 14px;
  padding: 30px;
}
.deck-empty.show { display: flex; }
.deck-empty h3 { font-family: var(--font-display); font-size: 24px; letter-spacing: -0.02em; }
.deck-empty p { color: var(--ink-dim); font-size: 14px; }
.deck-empty button {
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 13px;
  background: var(--lime); color: #0a0a0b;
  border: none; padding: 12px 22px; border-radius: 999px;
  cursor: pointer; font-weight: 700;
}

/* =============================================================
   WATCH  — vertical video feed
   ============================================================= */
#screen-watch { padding: 0; }
.reels {
  height: 100%;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
}
.reels::-webkit-scrollbar { display: none; }
.reel {
  position: relative;
  height: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.reel video {
  width: 100%; height: 100%;
  object-fit: cover;
}
.reel__tiktok { width: 100%; height: 100%; display: grid; place-items: center; }
.reel__tiktok iframe, .reel__tiktok blockquote { max-width: 100%; }
.reel__overlay {
  position: absolute; inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0,0,0,0.3) 0%, transparent 22%, transparent 62%, rgba(0,0,0,0.8) 100%);
}
.reel__info {
  position: absolute;
  left: 16px; bottom: 24px; right: 80px;
  z-index: 3;
}
.reel__handle {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  display: flex; align-items: center; gap: 7px;
}
.reel__handle .badge {
  font-family: var(--font-mono);
  font-size: 9px;
  color: #0a0a0b; background: var(--lime);
  padding: 2px 6px; border-radius: 4px;
  letter-spacing: 0.04em;
}
.reel__caption { margin-top: 7px; font-size: 14px; color: #eee; line-height: 1.3; }
.reel__rail {
  position: absolute;
  right: 14px; bottom: 30px;
  z-index: 3;
  display: flex; flex-direction: column; gap: 20px; align-items: center;
}
.reel__rail button {
  background: none; border: none; color: #fff; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  font-family: var(--font-mono); font-size: 11px;
}
.reel__rail svg { width: 30px; height: 30px; filter: drop-shadow(0 2px 6px rgba(0,0,0,.6)); }
.reel__rail button:active svg { transform: scale(0.85); }
.reel__mute {
  position: absolute; top: 16px; right: 16px; z-index: 4;
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(0,0,0,0.45); border: 1px solid rgba(255,255,255,0.2);
  color: #fff; display: grid; place-items: center; cursor: pointer;
}
.reel__mute svg { width: 18px; height: 18px; }
.reel__play {
  position: absolute; inset: 0; z-index: 2; cursor: pointer;
  display: grid; place-items: center;
}
.reel__play .play-ic {
  width: 72px; height: 72px; opacity: 0; transition: opacity .2s;
  color: rgba(255,255,255,0.9);
}
.reel.paused .reel__play .play-ic { opacity: 1; }
.watch-hint {
  position: absolute; top: 14px; left: 50%; transform: translateX(-50%);
  z-index: 5; font-family: var(--font-mono); font-size: 11px;
  color: var(--ink); background: rgba(0,0,0,0.5); backdrop-filter: blur(6px);
  padding: 6px 12px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.15);
  animation: fadeOut 3.5s forwards;
}
@keyframes fadeOut { 0%,70% { opacity: 1; } 100% { opacity: 0; visibility: hidden; } }

/* =============================================================
   DISCOVER
   ============================================================= */
#screen-discover { padding: 4px 18px 18px; overflow-y: auto; scrollbar-width: none; }
#screen-discover::-webkit-scrollbar { display: none; }
.discover-title {
  font-family: var(--font-display);
  font-size: 30px; letter-spacing: -0.03em; font-weight: 700;
  margin: 6px 0 4px;
}
.discover-sub { color: var(--ink-dim); font-size: 14px; margin-bottom: 18px; }
.tile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile {
  position: relative;
  aspect-ratio: 1 / 1.05;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--surface);
  display: flex; align-items: flex-end;
  transition: transform .15s;
}
.tile:active { transform: scale(0.96); }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.tile::after { content:""; position:absolute; inset:0; background: linear-gradient(180deg, transparent 30%, rgba(10,10,11,.9)); }
.tile__label {
  position: relative; z-index: 2; padding: 14px;
  font-family: var(--font-display); font-weight: 700; font-size: 20px;
  letter-spacing: -0.02em; line-height: 1;
}
.tile__emoji {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  font-size: 18px; width: 34px; height: 34px; border-radius: 9px;
  display: grid; place-items: center;
  background: rgba(10,10,11,0.5); border: 1px solid rgba(255,255,255,0.12);
}
.tile__count {
  position: absolute; top: 14px; right: 12px; z-index: 2;
  font-family: var(--font-mono); font-size: 11px; color: var(--lime);
}

/* =============================================================
   SAVED
   ============================================================= */
#screen-saved { padding: 4px 18px 18px; overflow-y: auto; scrollbar-width: none; }
#screen-saved::-webkit-scrollbar { display: none; }
.saved-list { display: flex; flex-direction: column; gap: 12px; }
.saved-item {
  display: flex; gap: 12px; align-items: center;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 10px; cursor: pointer;
  transition: border-color .2s;
}
.saved-item:hover { border-color: var(--ink-faint); }
.saved-item img { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; flex: 0 0 auto; }
.saved-item .st { flex: 1 1 auto; min-width: 0; }
.saved-item .st h4 { font-family: var(--font-display); font-size: 15px; line-height: 1.1; letter-spacing: -0.01em; margin-bottom: 4px; }
.saved-item .st span { font-family: var(--font-mono); font-size: 11px; color: var(--ink-faint); }
.saved-item .rm { background: none; border: none; color: var(--ink-faint); cursor: pointer; padding: 8px; }
.saved-item .rm:hover { color: var(--coral); }
.empty-state { text-align: center; padding: 60px 20px; color: var(--ink-dim); }
.empty-state .big { font-family: var(--font-display); font-size: 22px; color: var(--ink); margin-bottom: 8px; letter-spacing: -0.02em; }
.empty-state .em { font-size: 40px; margin-bottom: 14px; }

/* =============================================================
   READER overlay
   ============================================================= */
.reader {
  position: absolute; inset: 0; z-index: 60;
  background: var(--bg);
  display: none;
  flex-direction: column;
}
.reader.open {
  display: flex;
  animation: readerUp .34s cubic-bezier(.22,1,.36,1);
}
@keyframes readerUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.reader__hero { position: relative; height: 34%; flex: 0 0 auto; }
.reader__hero img { width: 100%; height: 100%; object-fit: cover; }
.reader__hero::after { content:""; position:absolute; inset:0; background: linear-gradient(180deg, transparent 40%, var(--bg)); }
.reader__close {
  position: absolute; top: 14px; left: 14px; z-index: 3;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(10,10,11,0.5); backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.16); color: #fff;
  display: grid; place-items: center; cursor: pointer;
}
.reader__body { flex: 1 1 auto; overflow-y: auto; padding: 4px 22px 40px; scrollbar-width: none; }
.reader__body::-webkit-scrollbar { display: none; }
.reader__kicker { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.1em; color: var(--lime); text-transform: uppercase; }
.reader__title { font-family: var(--font-display); font-weight: 700; font-size: 30px; line-height: 1.04; letter-spacing: -0.025em; margin: 10px 0 12px; }
.reader__meta { font-family: var(--font-mono); font-size: 12px; color: var(--ink-faint); margin-bottom: 18px; display:flex; gap:8px; align-items:center; }
.reader__meta .dot { width:3px;height:3px;border-radius:50%;background:var(--ink-faint);}
.reader__keys {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 16px 18px; margin-bottom: 22px;
}
.reader__keys h5 { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; color: var(--ink-dim); text-transform: uppercase; margin-bottom: 12px; }
.reader__keys ul { list-style: none; counter-reset: pt; display: flex; flex-direction: column; gap: 10px; }
.reader__keys li { display: flex; gap: 10px; font-size: 14px; line-height: 1.35; color: var(--ink); }
.reader__keys li::before {
  content: counter(pt); counter-increment: pt;
  flex: 0 0 auto; width: 20px; height: 20px; margin-top: 1px;
  display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 11px; font-weight: 700;
  color: #0a0a0b; background: var(--lime); border-radius: 6px;
}
.reader__text p { font-size: calc(15.5px * var(--text-scale)); line-height: 1.6; color: var(--ink-dim); margin-bottom: 16px; }
.reader__keys li { font-size: calc(14px * var(--text-scale)); }
.reader__text p:first-of-type::first-letter {
  font-family: var(--font-display); font-size: 46px; float: left;
  line-height: 0.8; padding: 4px 10px 0 0; color: var(--lime);
}

/* =============================================================
   Bottom nav
   ============================================================= */
.nav {
  flex: 0 0 auto;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 8px 6px calc(8px + env(safe-area-inset-bottom, 0px));
  background: rgba(19,19,22,0.85);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
  z-index: 30;
}
.nav button {
  background: none; border: none; cursor: pointer;
  color: var(--ink-faint);
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.02em;
  padding: 6px 8px; border-radius: 12px;
  transition: color .2s;
}
.nav button svg { width: 23px; height: 23px; }
.nav button.active { color: var(--lime); }
.nav button.active .navlbl { color: var(--ink); }
.nav button { position: relative; }
.saved-count {
  position: absolute; top: 2px; right: 6px;
  min-width: 16px; height: 16px; padding: 0 4px;
  display: none; place-items: center;
  background: var(--coral); color: #0a0a0b;
  font-family: var(--font-mono); font-size: 9px; font-weight: 700;
  border-radius: 999px;
}

/* toast */
.toast {
  position: absolute; bottom: 88px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: #0a0a0b;
  font-family: var(--font-mono); font-size: 12px; font-weight: 700;
  padding: 10px 18px; border-radius: 999px; z-index: 50;
  opacity: 0; pointer-events: none; transition: all .25s;
  white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* live/demo badge */
.mode-badge {
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.08em;
  color: var(--ink-faint); border: 1px solid var(--line);
  padding: 3px 7px; border-radius: 999px; text-transform: uppercase;
}

/* =============================================================
   WEATHER strip
   ============================================================= */
.weatherbar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 18px 8px;
  padding: 9px 14px;
  background: linear-gradient(100deg, rgba(61,123,255,0.16), rgba(216,255,62,0.08));
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  cursor: pointer;
  font-family: var(--font-body);
  text-align: left;
  min-height: 44px;
  transition: border-color .2s;
}
.weatherbar:hover { border-color: var(--ink-faint); }
.wx-now { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.wx-ic { font-size: 22px; line-height: 1; }
.wx-temp { font-family: var(--font-display); font-weight: 700; font-size: 22px; letter-spacing: -0.02em; }
.wx-meta { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.wx-city { font-family: var(--font-display); font-weight: 700; font-size: 13.5px; line-height: 1.1; }
.wx-cond { font-size: 11px; color: var(--ink-dim); font-family: var(--font-mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wx-forecast { display: flex; gap: 8px; flex: 0 0 auto; }
.wx-fc { font-family: var(--font-mono); font-size: 10px; color: var(--ink-dim); white-space: nowrap; }
.wx-fc b { color: var(--ink); font-weight: 700; }
.wx-dim { color: var(--ink-faint); font-family: var(--font-mono); font-size: 12px; }
.wx-sep { flex: 1; }
@media (max-width: 360px) { .wx-forecast { display: none; } }

/* avatar button in topbar */
.avatar-btn {
  background: var(--lime);
  color: #0a0a0b;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 16px;
  border-color: var(--lime);
}
.avatar-btn:hover { filter: brightness(1.05); }

/* =============================================================
   PROFILE / PREFERENCES
   ============================================================= */
#screen-profile { padding: 6px 18px 24px; overflow-y: auto; scrollbar-width: none; }
#screen-profile::-webkit-scrollbar { display: none; }
.profile-head { display: flex; align-items: center; gap: 14px; margin: 8px 0 20px; }
.avatar {
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--lime); color: #0a0a0b;
  display: grid; place-items: center; flex: 0 0 auto;
  font-family: var(--font-display); font-weight: 800; font-size: 28px;
}
.profile-id { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.name-input {
  background: none; border: none; color: var(--ink);
  font-family: var(--font-display); font-weight: 700; font-size: 24px;
  letter-spacing: -0.02em; padding: 0; width: 100%;
  border-bottom: 1.5px dashed transparent;
}
.name-input:focus { outline: none; border-bottom-color: var(--lime); }
.name-input::placeholder { color: var(--ink-faint); }
.profile-sub { font-family: var(--font-mono); font-size: 11px; color: var(--ink-faint); }

.pref-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 16px; margin-bottom: 14px;
}
.pref-card h5 {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ink-dim); margin-bottom: 12px;
}
.pref-hint { font-size: 12.5px; color: var(--ink-dim); line-height: 1.4; margin: -4px 0 14px; }
.pref-hint code { font-family: var(--font-mono); color: var(--lime); font-size: 11px; }

.pref-city { display: flex; gap: 10px; }
.city-select {
  flex: 1 1 auto;
  background: var(--surface-2); color: var(--ink);
  border: 1px solid var(--line); border-radius: 10px;
  padding: 11px 12px; font-family: var(--font-body); font-size: 14px;
  -webkit-appearance: none; appearance: none; cursor: pointer;
}
.loc-btn {
  flex: 0 0 auto;
  background: none; border: 1px solid var(--line); color: var(--ink);
  border-radius: 10px; padding: 0 14px; font-family: var(--font-mono);
  font-size: 12px; cursor: pointer; transition: border-color .2s;
}
.loc-btn:hover { border-color: var(--lime); color: var(--lime); }

.pref-list { display: flex; flex-direction: column; }
.pref-row {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 0; border-bottom: 1px solid var(--line); cursor: pointer;
}
.pref-row:last-child { border-bottom: none; }
.pref-emoji { width: 26px; text-align: center; font-size: 17px; flex: 0 0 auto; }
.pref-name { flex: 1 1 auto; font-size: 15px; font-weight: 500; }
.toggle {
  flex: 0 0 auto; width: 46px; height: 26px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line);
  position: relative; transition: background .2s, border-color .2s;
}
.toggle .knob {
  position: absolute; top: 2px; left: 2px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--ink-faint); transition: transform .2s, background .2s;
}
.toggle.on { background: var(--lime); border-color: var(--lime); }
.toggle.on .knob { transform: translateX(20px); background: #0a0a0b; }

.pref-reset {
  width: 100%; margin-top: 6px;
  background: none; border: 1px solid var(--line); color: var(--ink-dim);
  border-radius: 12px; padding: 13px; font-family: var(--font-mono);
  font-size: 12px; cursor: pointer; transition: all .2s;
}
.pref-reset:hover { border-color: var(--coral); color: var(--coral); }

/* =============================================================
   FOLLOW pill (cards, reader, creators)
   ============================================================= */
.card__foot { margin-top: 10px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.follow-pill {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 11.5px; letter-spacing: 0.02em;
  padding: 7px 13px; border-radius: 999px;
  background: none; border: 1px solid var(--lime); color: var(--lime);
  cursor: pointer; white-space: nowrap; transition: all .18s;
}
.follow-pill:hover { background: rgba(216,255,62,0.1); }
.follow-pill.on { background: var(--lime); color: #0a0a0b; font-weight: 700; }
.reader__follow { margin-bottom: 18px; }

/* notifications badge on the bell */
.notif-count {
  position: absolute; top: 4px; right: 4px;
  min-width: 16px; height: 16px; padding: 0 4px;
  display: none; place-items: center;
  background: var(--coral); color: #0a0a0b;
  font-family: var(--font-mono); font-size: 9px; font-weight: 700; border-radius: 999px;
}
.icon-btn { position: relative; }

/* =============================================================
   SPEAKER (UGC / Substack-style)
   ============================================================= */
#screen-speaker { padding: 0; }
.spk-scroll { height: 100%; overflow-y: auto; scrollbar-width: none; padding: 6px 18px 24px; }
.spk-scroll::-webkit-scrollbar { display: none; }
.spk-hero {
  text-align: center; padding: 18px 8px 22px;
  border-bottom: 1px solid var(--line); margin-bottom: 18px;
}
.spk-badge {
  width: 56px; height: 56px; margin: 0 auto 12px;
  display: grid; place-items: center; border-radius: 16px;
  background: var(--lime); color: #0a0a0b;
}
.spk-badge svg { width: 30px; height: 30px; }
.spk-title { font-family: var(--font-display); font-weight: 800; font-size: 34px; letter-spacing: -0.03em; }
.spk-tag { color: var(--ink-dim); font-size: 13.5px; line-height: 1.45; max-width: 320px; margin: 8px auto 18px; }
.spk-submit {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 13px; font-weight: 700;
  background: var(--lime); color: #0a0a0b; border: none;
  padding: 13px 22px; border-radius: 999px; cursor: pointer;
  transition: transform .15s;
}
.spk-submit svg { width: 17px; height: 17px; }
.spk-submit:active { transform: scale(0.96); }

.spk-section { margin-bottom: 24px; }
.spk-h {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink-dim); margin-bottom: 14px;
}

/* creators row */
.cr-row { display: flex; gap: 12px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; margin: 0 -18px; padding-left: 18px; padding-right: 18px; }
.cr-row::-webkit-scrollbar { display: none; }
.cr-card {
  flex: 0 0 200px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 16px;
  display: flex; flex-direction: column; gap: 6px;
}
.cr-avatar {
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center; color: #0a0a0b;
  font-family: var(--font-display); font-weight: 800; font-size: 19px; margin-bottom: 4px;
}
.cr-pub { font-family: var(--font-display); font-weight: 700; font-size: 16px; letter-spacing: -0.01em; }
.cr-handle { font-family: var(--font-mono); font-size: 11px; color: var(--ink-faint); }
.cr-bio { font-size: 12.5px; color: var(--ink-dim); line-height: 1.4; flex: 1 1 auto; margin: 4px 0 10px; }
.cr-card .follow-pill { align-self: flex-start; }

/* UGC feed (Substack entries) */
.ugc-feed { display: flex; flex-direction: column; }
.ugc-item {
  padding: 16px 0; border-bottom: 1px solid var(--line); cursor: pointer;
}
.ugc-item:first-child { padding-top: 0; }
.ugc-item:hover .ugc-title { color: var(--lime); }
.ugc-publine { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.ugc-dot { width: 16px; height: 16px; border-radius: 5px; flex: 0 0 auto; }
.ugc-pub { font-family: var(--font-display); font-weight: 700; font-size: 13px; }
.ugc-by { font-size: 12px; color: var(--ink-faint); }
.ugc-title { font-family: var(--font-display); font-weight: 700; font-size: 20px; line-height: 1.12; letter-spacing: -0.02em; margin-bottom: 6px; transition: color .18s; }
.ugc-excerpt { font-size: 14px; color: var(--ink-dim); line-height: 1.4; margin-bottom: 8px; }
.ugc-meta { font-family: var(--font-mono); font-size: 11px; color: var(--ink-faint); }

/* your submissions */
.sub-item { display: flex; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px; margin-bottom: 10px; }
.sub-status { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.04em; color: #0a0a0b; background: var(--lime); padding: 5px 9px; border-radius: 999px; flex: 0 0 auto; }
.sub-body h5 { font-family: var(--font-display); font-size: 15px; letter-spacing: -0.01em; margin-bottom: 3px; }
.sub-body span { font-family: var(--font-mono); font-size: 11px; color: var(--ink-faint); }

/* =============================================================
   SUBMIT form (inside reader overlay)
   ============================================================= */
.submit-wrap { display: flex; flex-direction: column; height: 100%; }
.submit-top { position: relative; padding: 16px 18px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: center; }
.submit-top .reader__close { position: absolute; left: 14px; top: 12px; }
.submit-eyebrow { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em; color: var(--lime); display: flex; align-items: center; gap: 7px; text-transform: uppercase; }
.submit-eyebrow svg { width: 15px; height: 15px; }
.submit-body { flex: 1 1 auto; overflow-y: auto; scrollbar-width: none; padding: 18px; }
.submit-body::-webkit-scrollbar { display: none; }
.submit-intro { color: var(--ink-dim); font-size: 13.5px; line-height: 1.45; margin-bottom: 18px; }
.fld { display: block; margin-bottom: 16px; }
.fld > span { display: block; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-dim); margin-bottom: 7px; }
.fld > span em { color: var(--ink-faint); text-transform: none; font-style: normal; letter-spacing: 0; }
.fld input, .fld select, .fld textarea {
  width: 100%; background: var(--surface-2); color: var(--ink);
  border: 1px solid var(--line); border-radius: 10px; padding: 12px;
  font-family: var(--font-body); font-size: 14.5px; resize: vertical;
}
.fld input:focus, .fld select:focus, .fld textarea:focus { outline: none; border-color: var(--lime); }
.submit-body .spk-submit { width: 100%; justify-content: center; margin-top: 4px; }
.submit-fine { font-size: 11px; color: var(--ink-faint); line-height: 1.4; margin-top: 12px; text-align: center; }

/* =============================================================
   NOTIFICATIONS panel
   ============================================================= */
.notif-panel {
  position: absolute; inset: 0; z-index: 70;
  background: var(--bg); display: none; flex-direction: column;
}
.notif-panel.open { display: flex; animation: readerUp .3s cubic-bezier(.22,1,.36,1); }
.notif-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.notif-head h3 { font-family: var(--font-display); font-size: 22px; letter-spacing: -0.02em; }
.notif-list { flex: 1 1 auto; overflow-y: auto; scrollbar-width: none; padding: 8px 14px; }
.notif-list::-webkit-scrollbar { display: none; }
.notif-item { width: 100%; display: flex; align-items: center; gap: 12px; text-align: left; background: none; border: none; border-bottom: 1px solid var(--line); padding: 14px 4px; cursor: pointer; }
.notif-item:hover { background: var(--surface); }
.notif-ic { width: 34px; height: 34px; border-radius: 10px; flex: 0 0 auto; display: grid; place-items: center; background: var(--surface-2); color: #0a0a0b; font-size: 16px; }
.notif-ic:not([style*="background"]) { color: var(--lime); }
.notif-txt { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.notif-txt b { font-family: var(--font-display); font-size: 14.5px; letter-spacing: -0.01em; }
.notif-txt span { font-size: 12.5px; color: var(--ink-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notif-time { font-family: var(--font-mono); font-size: 10px; color: var(--ink-faint); flex: 0 0 auto; }

/* =============================================================
   PROFILE additions
   ============================================================= */
.swatches { display: flex; gap: 12px; }
.swatch { width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--line); cursor: pointer; transition: transform .15s; }
.swatch.on { border-color: var(--ink); transform: scale(1.12); box-shadow: 0 0 0 3px var(--bg), 0 0 0 4px currentColor; }
.seg { display: flex; gap: 8px; }
.seg.wrap { flex-wrap: wrap; }
.seg-btn { flex: 1 1 auto; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-dim); border-radius: 10px; padding: 11px; font-family: var(--font-mono); font-size: 12.5px; cursor: pointer; transition: all .18s; }
.seg-btn.on { background: var(--lime); color: #0a0a0b; border-color: var(--lime); font-weight: 700; }
.pref-count { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; background: var(--lime); color: #0a0a0b; border-radius: 999px; font-size: 10px; margin-left: 6px; }
.follow-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.follow-row:last-child { border-bottom: none; }
.follow-dot { width: 14px; height: 14px; border-radius: 5px; background: var(--ink-faint); flex: 0 0 auto; }
.unfollow { background: none; border: 1px solid var(--line); color: var(--ink-dim); border-radius: 999px; padding: 6px 12px; font-family: var(--font-mono); font-size: 11px; cursor: pointer; }
.unfollow:hover { border-color: var(--coral); color: var(--coral); }
.pref-actions { display: flex; gap: 10px; }
.pref-actions .pref-reset { margin-top: 0; }

body.reduce-motion * { animation: none !important; transition: none !important; }

/* deck loader */
.loader {
  width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid var(--line); border-top-color: var(--lime);
  animation: spin .8s linear infinite; margin-bottom: 4px;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  .loader { animation: spin .8s linear infinite !important; }
}
