/* Reps — design tokens from the handoff (design_handoff_reps_frontend/README.md) */
:root {
  --bg: #0b0b0c; --surface: #141416; --surface-2: #1c1c1f; --border: #26262a; --border-strong: #3a3a3e;
  --text: #f2f2ee; --muted: #9a9a9c; --faint: #8c8c8e; --dim: #858589; --disabled: #5e5e60;
  --accent: #fff200; --accent-hover: #ffff66; --accent-tint: rgba(255,242,0,.12); --accent-tint-2: rgba(255,242,0,.06);
  --danger: #ff7a6b; --warning: #ffb060; --rec: #ff3b30; --rec-2: #ff4d4d; --ok: #8cf0a8;
  --safe-top: env(safe-area-inset-top, 0px); --safe-bottom: env(safe-area-inset-bottom, 0px);
  --tabbar-h: calc(72px + var(--safe-bottom));
  --page-pad: clamp(16px, 3vw, 32px);
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { background: var(--bg); }
/* App shell: the document never scrolls. Only main.content (and the auth
   page) scroll, so the tab bar, overlays and camera can never be dragged
   along by iOS rubber-banding, and a modal on top blocks the list below. */
html { height: 100%; overflow: hidden; background: var(--bg); }
body { background: var(--bg); color: var(--text); font-family: 'Archivo', system-ui, sans-serif; font-size: 16px; line-height: 1.4;
  font-stretch: 100%; -webkit-font-smoothing: antialiased; height: 100%; overflow: hidden; overscroll-behavior: none; }
button { cursor: pointer; font-family: inherit; color: inherit; background: none; border: 0; touch-action: manipulation; }
html, body { touch-action: manipulation; }
input { font-family: inherit; }
input::placeholder { color: var(--dim); }
input:focus, button:focus-visible, [role="button"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.posted button:focus-visible, .msg.mine .bubble:focus-visible { outline-color: var(--bg); }
.avatar-wrap:focus-visible, .avatar-wrap:focus-within { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.dim { color: var(--dim); }
img { display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
::-webkit-scrollbar { width: 0; height: 0; }
.hidden { display: none !important; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes pop { 0% { transform: scale(.7); opacity: 0; } 60% { transform: scale(1.06); } 100% { transform: scale(1); opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes scan { from { top: 6%; } to { top: 86%; } }
@keyframes bump { 0% { transform: scale(1.08); } 100% { transform: scale(1); } }

/* type helpers */
.display { font-stretch: 75%; font-weight: 900; text-transform: uppercase; letter-spacing: -.02em; line-height: 1; }
.label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.mono { font-family: var(--mono); }

/* avatars: initial on a hashed color, or the uploaded picture */
.av { border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 700; color: var(--bg); overflow: hidden; background: var(--accent); }
.av img { width: 100%; height: 100%; object-fit: cover; }
.av-22 { width: 22px; height: 22px; font-size: 12px; }
.av-30 { width: 30px; height: 30px; font-size: 13px; }
.av-32 { width: 32px; height: 32px; font-size: 13px; }
.av-34 { width: 34px; height: 34px; font-size: 14px; }
.av-36 { width: 36px; height: 36px; font-size: 14px; }
.av-64 { width: 64px; height: 64px; font-stretch: 75%; font-weight: 900; font-size: 28px; }

/* ============ AUTH ============ */
#authScreen { display: none; height: 100%; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); grid-template-rows: auto minmax(0, 1fr); align-items: stretch; }
#authScreen.active { display: grid; }
@media (min-width: 720px) { #authScreen { grid-template-rows: minmax(0, 1fr); } }
.auth-hero { padding: clamp(24px, 6vw, 72px) clamp(20px, 5vw, 64px); display: flex; flex-direction: column; justify-content: space-between; gap: clamp(20px, 4vw, 40px); background: var(--accent); color: var(--bg); }
.auth-hero .wordmark { display: block; font-stretch: 75%; font-weight: 900; font-size: 22px; letter-spacing: -.02em; text-transform: uppercase; }
.auth-hero h1 { font-stretch: 75%; font-weight: 900; font-size: clamp(44px, 12vw, 64px); line-height: .85; letter-spacing: -.04em; text-transform: uppercase; animation: fadeUp .5s ease both; }
.auth-hero h1 br { display: none; }
@media (min-width: 720px) { .auth-hero h1 { font-size: clamp(64px, 9vw, 168px); } .auth-hero h1 br { display: inline; } }
.auth-hero .sub { color: var(--bg); margin-top: 14px; font-size: clamp(15px, 2vw, 22px); font-weight: 500; max-width: 34ch; text-wrap: pretty; animation: fadeUp .5s .1s ease both; }
.auth-hero .foot { display: flex; gap: 24px; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; opacity: .7; }
.auth-form-wrap { display: flex; align-items: center; justify-content: center; padding: clamp(24px, 5vw, 64px) 20px; }
.auth-form { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 18px; animation: fadeUp .5s .15s ease both; }
.auth-tabs { display: flex; border-bottom: 1px solid var(--border); }
.auth-tabs button { flex: 1; min-height: 48px; font-weight: 600; font-size: 15px; margin-bottom: -1px; border-bottom: 2px solid transparent; color: var(--faint); }
.auth-tabs button.active { border-bottom-color: var(--accent); color: var(--text); }
.auth-hint { color: var(--muted); font-size: 15px; min-height: 1.4em; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.field input { font: inherit; font-size: 18px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px; min-height: 52px; width: 100%; }
.field input.code { letter-spacing: .08em; text-transform: uppercase; }
.field input[type=password] { letter-spacing: .1em; }
.auth-error { color: var(--danger); font-size: 14px; min-height: 1.2em; }
.btn-primary { min-height: 56px; border-radius: 12px; background: var(--accent); color: var(--bg); font-stretch: 75%; font-weight: 900; font-size: 20px; text-transform: uppercase; letter-spacing: .02em; width: 100%; transition: transform .08s, background .15s; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:active { transform: scale(.98); }
.btn-primary:disabled { background: var(--border); color: var(--disabled); }
.auth-foot { font-size: 13px; color: var(--faint); text-align: center; }

/* ============ APP SHELL ============ */
/* Nothing at the bottom is position:fixed any more: iOS home-screen apps
   sometimes leave fixed elements sitting where the keyboard's top edge was.
   The shell is a full-height column: scroller, then the bar, in normal flow. */
#shell { display: none; height: 100vh; height: 100dvh; flex-direction: column; }
#shell.active { display: flex; }
.sidebar { display: none; }
.scroller { flex: 1 1 auto; height: auto; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
body.modal-open .scroller { overflow: hidden; }
main.content { min-width: 0; padding: calc(var(--page-pad) + var(--safe-top)) var(--page-pad) 32px; width: 100%; max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }
.screen { display: none; flex-direction: column; gap: 16px; }
.screen.active { display: flex; }
.mobile-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mobile-head .wordmark { font-stretch: 75%; font-weight: 900; font-size: 22px; letter-spacing: -.02em; text-transform: uppercase; line-height: 1; }
.mobile-head .wordmark span { color: var(--faint); font-stretch: 100%; font-weight: 500; font-size: 13px; text-transform: none; letter-spacing: 0; margin-left: 6px; }
.mobile-head .date { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .1em; }

@media (min-width: 820px) {
  #shell.active { display: grid; grid-template-columns: 220px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; }
  .sidebar { grid-row: 1 / -1; }
  .composer { grid-column: 2; }
  .sidebar { display: flex; height: 100%; min-height: 0; overflow-y: auto; border-right: 1px solid var(--surface-2); padding: 28px 20px; flex-direction: column; gap: 28px; }
  .sidebar .wordmark { font-stretch: 75%; font-weight: 900; font-size: 26px; letter-spacing: -.02em; text-transform: uppercase; line-height: 1; padding: 0 8px; }
  .sidebar .wordmark small { display: block; margin-top: 6px; font-stretch: 100%; font-weight: 500; font-size: 13px; color: var(--muted); text-transform: none; letter-spacing: 0; }
  .sidebar nav { display: flex; flex-direction: column; gap: 4px; }
  .sidebar nav button { display: flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 12px; border-radius: 10px; text-align: left; font-weight: 600; font-size: 16px; color: var(--muted); }
  .sidebar nav button.active { background: var(--surface-2); color: var(--text); }
  .sidebar .post-btn { min-height: 52px; border-radius: 12px; background: var(--accent); color: var(--bg); font-stretch: 75%; font-weight: 900; font-size: 19px; text-transform: uppercase; }
  .sidebar .post-btn:hover { background: var(--accent-hover); }
  .sidebar .user-chip { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 8px; }
  .sidebar .user-chip .nm { min-width: 0; font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .sidebar .user-chip .out { margin-left: auto; color: var(--faint); font-size: 13px; min-height: 44px; }
  .sidebar .user-chip .out:hover { color: var(--text); }
  .mobile-head, .tabbar { display: none !important; }
  main.content { padding-bottom: 64px; }
}

/* ============ TAB BAR (phone) ============ */
.tabbar { flex: none; z-index: 5; background: var(--bg); border-top: 1px solid var(--surface-2);
  padding: 8px 10px calc(8px + var(--safe-bottom)); display: grid; grid-template-columns: 1fr 1fr auto 1fr 1fr; gap: 4px; align-items: center; }
.tabbar .tab { min-height: 48px; border-radius: 10px; font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); }
.tabbar .tab.active { color: var(--accent); }
.tabbar .post { width: 56px; height: 56px; margin: 0 6px; border-radius: 50%; background: var(--accent); color: var(--bg); font-size: 28px; font-weight: 300; line-height: 1; box-shadow: 0 6px 24px rgba(255,242,0,.25); display: grid; place-items: center; }

/* ============ SHARED BITS ============ */
.page { font-stretch: 75%; font-weight: 900; font-size: clamp(36px, 7vw, 56px); letter-spacing: -.03em; text-transform: uppercase; line-height: .9; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.sub { font-size: 14px; color: var(--muted); }
.card { background: var(--surface); border: 1px solid var(--surface-2); border-radius: 20px; }
.day { padding-bottom: 20px; border-bottom: 1px solid var(--surface-2); }
.day .label { display: block; }
.dayline { display: flex; align-items: baseline; gap: 10px; margin-top: 2px; }
.dayline .n { font-stretch: 75%; font-weight: 900; font-size: clamp(72px, 22vw, 104px); line-height: .82; letter-spacing: -.05em; color: var(--accent); font-variant-numeric: tabular-nums; }
.dayline .g { font-size: clamp(17px, 5vw, 21px); font-weight: 600; color: var(--muted); }
.dayline .flag { margin-left: auto; font-family: var(--mono); font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--bg); background: var(--accent); padding: 5px 9px; border-radius: 5px; }
.day .bar { margin-top: 14px; }
/* Hairlines, not three boxes: the supporting facts stay supporting. */
.facts { display: flex; margin-top: 14px; font-family: var(--mono); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--faint); }
.facts > div { flex: 1 1 0; min-width: 0; display: flex; gap: 5px; align-items: baseline; }
.facts > div + div { border-left: 1px solid var(--border); padding-left: 11px; }
.facts dt { margin: 0; flex: none; white-space: nowrap; }
.facts dd { margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.facts dd { color: var(--text); min-width: 0; }
.stat-card { background: var(--surface); border: 1px solid var(--surface-2); border-radius: 16px; padding: 16px; }
.stat-card .v { margin-top: 6px; font-stretch: 75%; font-weight: 900; font-size: 40px; line-height: 1; }
.stat-card .v small { font-size: 16px; color: var(--faint); font-weight: 600; margin-left: 6px; font-stretch: 100%; }
.stat-card .v.accent { color: var(--accent); }
.stat-card .s { margin-top: 10px; font-size: 13px; color: var(--muted); }
.bar { height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; margin-top: 10px; }
.bar i { display: block; height: 100%; background: var(--accent); transition: width .4s; }
.btn-ghost { min-height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.btn-ghost.dark { background: var(--bg); }
.btn-ghost:disabled { color: var(--disabled); }
.btn-back { min-width: 44px; min-height: 44px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); font-size: 18px; display: grid; place-items: center; }
.seg { display: flex; background: var(--surface); border: 1px solid var(--surface-2); border-radius: 10px; padding: 3px; }
.seg button { min-height: 40px; padding: 0 14px; border-radius: 8px; font-weight: 600; font-size: 13px; color: var(--muted); }
.seg button.on { background: var(--border); color: var(--text); }
.empty { text-align: center; padding: 34px 20px; color: var(--faint); font-size: 14px; line-height: 1.5; }
.empty .display { font-size: 48px; color: var(--dim); display: block; margin-bottom: 6px; }
.spin { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--border); border-top-color: var(--accent); animation: spin .9s linear infinite; display: inline-block; }
.spin.sm { width: 16px; height: 16px; border-width: 2px; }

/* ============ TODAY (feed) ============ */
.stat-card .s { text-wrap: pretty; }
.crew-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.crew-head .label:first-child { white-space: nowrap; }
.crew-head .label:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crew-row { display: flex; gap: 8px; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; touch-action: pan-x pan-y; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; margin: 0 calc(-1 * var(--page-pad)); padding: 2px var(--page-pad) 6px; scrollbar-width: none; }
.crew-cell { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; flex: 0 0 auto; min-width: 96px; max-width: 150px; padding: 12px 14px 10px; border-radius: 16px; background: var(--surface); border: 1px solid var(--surface-2); scroll-snap-align: start; text-align: left; color: var(--text); }
.crew-cell .n { font-stretch: 75%; font-weight: 900; font-size: 48px; line-height: .9; letter-spacing: -.04em; font-variant-numeric: tabular-nums; color: var(--text); }
.crew-cell .n span { font-size: 14px; color: var(--faint); font-weight: 600; letter-spacing: 0; margin-left: 3px; font-stretch: 100%; }
.crew-cell.done .n { color: var(--accent); }
.crew-cell.quiet .n { color: var(--dim); }
.crew-cell.done { border-color: rgba(255,242,0,.35); background: var(--accent-tint-2); }
.crew-cell.me { outline: 1px solid rgba(255,242,0,.5); outline-offset: -1px; }
.crew-cell .nm { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--muted); max-width: 100%; min-width: 0; margin-top: 6px; }
/* The row is a flex box, so the ellipsis has to live on the text itself. */
.crew-cell .nm .t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crew-cell.done .nm { color: var(--text); }
.crew-cell .rail { display: block; height: 3px; border-radius: 2px; background: var(--border); margin: 10px 0 0; overflow: hidden; width: 100%; }
.crew-cell .rail i { display: block; height: 100%; background: var(--faint); }
.crew-cell.done .rail i, .crew-cell.some .rail i { background: var(--accent); }
.crew-cell.some .rail i { background: var(--faint); }

.feed { display: flex; flex-direction: column; gap: 16px; }
.set-row { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 10px 12px; padding: 14px 16px 10px; }
.set-row .who { min-width: 0; }
.set-row .nm { font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.set-row .when { font-size: 12px; color: var(--muted); }
.set-row .n { font-stretch: 75%; font-weight: 900; font-size: clamp(48px, 16vw, 68px); line-height: .85; letter-spacing: -.03em; color: var(--accent); white-space: nowrap; font-variant-numeric: tabular-nums; }
.set-row .n span { font-size: 12px; font-weight: 600; font-stretch: 100%; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-left: 5px; }
.set-row .tail { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.set-row .tail .gone { font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.set-row .tail .sep { color: var(--dim); }
.set-row .tail .tag { font-family: 'Archivo', system-ui, sans-serif; letter-spacing: 0; border: 1px solid var(--border-strong); border-radius: 999px; padding: 2px 8px; color: var(--warning); }
.set-row .clip-retry { margin-left: auto; }
.set { background: var(--surface); border: 1px solid var(--surface-2); border-radius: 20px; overflow: hidden; animation: fadeUp .4s ease both; }
.set-media { position: relative; background: repeating-linear-gradient(135deg, #111113 0 12px, #161618 12px 24px); display: grid; place-items: center; transition: height .35s ease; aspect-ratio: 4 / 5; max-height: 70vh; cursor: pointer; width: 100%; text-align: left; color: var(--text); }
.set-media.seen, .set-media.flat { aspect-ratio: auto; height: 150px; cursor: default; }
.set-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.set-media .top { position: absolute; top: 14px; left: 14px; right: 14px; display: flex; align-items: center; gap: 10px; }
.set-media .top .nm { font-weight: 600; font-size: 15px; text-shadow: 0 1px 8px #000; }
.set-media .top .when { font-size: 12px; color: #c9c9c4; text-shadow: 0 1px 8px #000; }
.set-media .left { margin-left: auto; font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: #d6d6d2; border: 1px solid rgba(242,242,238,.35); border-radius: 999px; padding: 3px 8px; white-space: nowrap; }
.set-media .pill + .left { margin-left: 0; }
.set-media .pill { margin-left: auto; background: rgba(11,11,12,.8); border: 1px solid var(--border-strong); border-radius: 999px; padding: 5px 10px; font-size: 12px; color: var(--warning); white-space: nowrap; }
.set-media .pill.adj { color: var(--muted); }
.set-media .play { width: 64px; height: 64px; border-radius: 50%; background: rgba(11,11,12,.7); border: 1px solid var(--border-strong); display: grid; place-items: center; backdrop-filter: blur(6px); position: relative; z-index: 1; }
.set-media .play i { width: 0; height: 0; border-left: 18px solid var(--text); border-top: 11px solid transparent; border-bottom: 11px solid transparent; margin-left: 5px; display: block; }
.clip-retry { display: block; margin: 10px auto 0; min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--accent); color: var(--accent); font-weight: 600; font-size: 13px; letter-spacing: 0; text-transform: none; }
.clip-retry:disabled { border-color: var(--border); color: var(--faint); }
.set-media .gone { font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); position: relative; z-index: 1; }
.set-media .bottom { position: absolute; left: 14px; right: 14px; bottom: 10px; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.set-media .count { font-stretch: 75%; font-weight: 900; font-size: clamp(76px, 25vw, 112px); line-height: .78; letter-spacing: -.04em; color: var(--accent); text-shadow: 0 2px 24px rgba(0,0,0,.6); }
.set-media .count span { font-size: 18px; letter-spacing: .06em; margin-left: 8px; color: var(--text); text-transform: uppercase; font-stretch: 100%; }
.set-media .meta { font-family: var(--mono); font-size: 12px; color: var(--muted); text-align: right; line-height: 1.5; }
.set-media .meta b { color: var(--text); font-weight: 500; }
.set-foot { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 14px; align-items: center; }
.rx { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg); color: var(--text); }
.rx em { font-style: normal; font-size: 17px; display: flex; }
.rx svg { display: block; }
.rx svg [stroke] { stroke: var(--muted); }
.rx.on svg [stroke] { stroke: var(--accent); }
.rx b { font-weight: 600; font-size: 14px; font-variant-numeric: tabular-nums; }
.rx.on { border-color: var(--accent); background: var(--accent-tint); }
.reply-peek { margin-left: auto; min-height: 44px; padding: 0 10px; font-size: 14px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reply-peek b { color: var(--text); font-weight: 600; }
.reply-peek .cnt { font-size: 12px; font-weight: 700; color: var(--bg); background: var(--accent); border-radius: 999px; padding: 2px 7px; }
.reply-peek.none { color: var(--faint); }

.video-full { position: fixed; inset: 0; background: #000; z-index: 60; display: flex; align-items: center; justify-content: center; touch-action: none; }
.video-full video { width: 100%; max-height: 100%; }
.video-full .close { position: absolute; top: calc(14px + var(--safe-top)); right: 14px; width: 48px; height: 48px; border-radius: 50%; background: rgba(58,58,58,.78); display: grid; place-items: center; font-size: 22px; }
.video-full .vf-count { position: absolute; left: 18px; bottom: calc(24px + var(--safe-bottom)); font-stretch: 75%; font-weight: 900; font-size: 72px; line-height: .85; letter-spacing: -.04em; color: var(--accent); text-shadow: 0 2px 24px rgba(0,0,0,.6); }

/* ============ CAMERA ============ */
#captureScreen { position: fixed; inset: 0; z-index: 50; background: #0b0b0c; display: none; flex-direction: column; justify-content: flex-end; overflow: hidden; touch-action: none;
  padding: calc(12px + max(var(--safe-top), 54px)) 16px calc(16px + max(var(--safe-bottom), 34px)); }
#captureScreen.active { display: flex; }
.cam-wrap { position: absolute; inset: 0; background: linear-gradient(180deg, #4a4844 0%, #33312e 40%, #1e1d1b 100%); }
.cam-wrap video { width: 100%; height: 100%; object-fit: cover; }
.cam-wrap video.mirror, .cam-wrap canvas.mirror { transform: scaleX(-1); }
.cam-wrap canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; opacity: .9; }
.cam-glow { position: absolute; inset: 0; background: radial-gradient(ellipse 70% 50% at 50% 60%, rgba(255,255,255,.08), transparent 70%); pointer-events: none; }
.scanner { position: absolute; left: 0; right: 0; height: 140px; background: linear-gradient(180deg, transparent, rgba(255,242,0,.12) 70%, rgba(255,242,0,.9)); animation: scan 1.8s ease-in-out infinite alternate; pointer-events: none; transition: opacity .4s; }
.scanner.off { opacity: 0; }
.cam-off { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 32px; text-align: center; color: #e6e6e2; font-size: 15px; line-height: 1.5; background: rgba(11,11,12,.55); }
.cam-off h2 { font-stretch: 75%; font-weight: 900; font-size: 32px; text-transform: uppercase; letter-spacing: -.02em; }
.cam-off .fine { font-size: 13px; color: var(--muted); max-width: 320px; }
.cam-off .btn-primary { max-width: 280px; }
.hud-row { position: relative; margin-bottom: auto; display: flex; justify-content: flex-start; align-items: center; gap: 8px; flex-wrap: wrap; padding-right: 58px; }
.hud-row .hud { font-size: 12px; padding: 10px 14px; letter-spacing: .1em; }
.hud { display: flex; align-items: center; gap: 10px; background: rgba(58,58,58,.78); border-radius: 999px; padding: 12px 20px; font-family: var(--mono); font-size: 14px; letter-spacing: .14em; text-transform: uppercase; color: var(--text); white-space: nowrap; }
.hud .dot { width: 9px; height: 9px; border-radius: 50%; flex: none; background: #6e6e6e; }
.hud.rec .dot { background: var(--rec); animation: pulse 1.2s infinite; }
.hud.lit .dot { background: var(--accent); }
.hud.warn { color: var(--warning); }
.hud.ok { color: var(--accent); }
.hud.small { font-size: 12px; padding: 10px 14px; letter-spacing: .12em; }
.cam-center { position: relative; text-align: center; pointer-events: none; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.cam-center .n { font-weight: 900; font-size: clamp(120px, 32vw, 200px); line-height: .9; letter-spacing: -.02em; color: var(--accent); font-variant-numeric: tabular-nums; }
.cam-center .n.bump { animation: bump .18s ease-out; }
.cam-center .l { font-family: var(--mono); font-size: 15px; letter-spacing: .16em; text-transform: uppercase; color: var(--text); }
.cam-center .h { margin-top: 36px; font-weight: 700; font-size: clamp(24px, 6.5vw, 32px); line-height: 1.15; color: #fff; text-shadow: 0 2px 16px rgba(0,0,0,.5); }
.cam-center .s { font-size: clamp(15px, 4vw, 18px); color: #e6e6e2; text-shadow: 0 1px 10px rgba(0,0,0,.5); }
.cam-bottom { position: relative; display: flex; flex-direction: column; gap: 28px; }
.hud-chips { display: flex; gap: 10px; flex-wrap: wrap; }
.rep-bars { position: absolute; right: 16px; top: 92px; bottom: 268px; width: 46px;
  display: flex; flex-direction: column-reverse; justify-content: flex-start; align-items: flex-end;
  gap: 5px; overflow: hidden; pointer-events: none; }
.rep-bars i { flex: none; width: 100%; height: 7px; border-radius: 4px; background: rgba(255,255,255,.25); display: block; }
.rep-bars i.deep { background: var(--accent); }
.rep-bars i.shallow { background: rgba(255,242,0,.4); }
.cam-controls { display: flex; align-items: center; justify-content: space-between; }
.round { width: 64px; height: 64px; border-radius: 50%; background: rgba(58,58,58,.78); color: var(--text); font-size: 22px; line-height: 1; display: grid; place-items: center; }
.round:disabled { opacity: .35; }
.shutter { width: 100px; height: 100px; border-radius: 50%; border: 5px solid #fff; background: transparent; display: grid; place-items: center; padding: 0; transition: opacity .2s; }
.shutter i { display: block; background: var(--rec); transition: all .2s; width: 80px; height: 80px; border-radius: 50%; }
.shutter.recording i { width: 36px; height: 36px; border-radius: 8px; }
.shutter:disabled { opacity: .35; }

/* ============ VERIFY / POSTED (sheet) ============ */
/* Landscape phone: the display numbers are sized off viewport width, which
   leaves nothing for the controls when the screen is only ~390px tall. */
@media (orientation: landscape) and (max-height: 540px) {
  #captureScreen { padding-top: calc(8px + var(--safe-top)); padding-bottom: calc(8px + var(--safe-bottom)); }
  .cam-center { gap: 2px; }
  .cam-center .n { font-size: clamp(48px, 15vh, 96px); }
  .cam-center .l { font-size: 12px; }
  .cam-center .h { margin-top: 10px; font-size: 18px; }
  .cam-center .s { font-size: 14px; }
  .cam-bottom { gap: 10px; }
  .shutter { width: 72px; height: 72px; border-width: 4px; }
  .shutter i { width: 56px; height: 56px; }
  .shutter.recording i { width: 28px; height: 28px; }
  .round { width: 52px; height: 52px; }
  .hud { padding: 8px 14px; font-size: 12px; }
  .rep-bars { height: 18px; }
  /* Tight enough that Post stays reachable without scrolling the sheet. */
  .adjust .n { font-size: clamp(56px, 15vh, 84px); }
  .adjust button { width: 48px; height: 48px; font-size: 24px; }
  .verify { gap: 10px; padding-top: 14px; padding-bottom: calc(14px + var(--safe-bottom)); }
  .verify .note { font-size: 13px; min-height: 0; }
  .verify .row { padding: 8px 12px; }
  .verify .actions .btn-primary, .btn-outline { min-height: 48px; }
  .posted .n { font-size: clamp(56px, 15vh, 84px); }
  .posted { padding-top: 16px; }
}

.sheet-back { position: fixed; inset: 0; background: rgba(11,11,12,.85); z-index: 70; display: flex; align-items: flex-end; justify-content: center; padding: 0; touch-action: none; }
.verify { touch-action: pan-y; overscroll-behavior: contain; }
@media (min-width: 820px) { .sheet-back { align-items: center; padding: 24px; } }
.verify { width: 100%; max-width: 640px; background: var(--surface); border: 1px solid var(--surface-2); border-radius: 24px 24px 0 0; padding: clamp(24px, 5vw, 40px) clamp(20px, 5vw, 40px) calc(24px + var(--safe-bottom)); display: flex; flex-direction: column; gap: 18px; animation: fadeUp .4s ease both; max-height: 94vh; overflow-y: auto; }
@media (min-width: 820px) { .verify { border-radius: 24px; } }
.verify .head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.verify .head .hl { flex: 1; min-width: 0; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.sheet-x { flex: none; width: 44px; height: 44px; margin: -8px -8px 0 0; border-radius: 50%; border: 1px solid var(--border); display: grid; place-items: center; font-size: 16px; color: var(--muted); }
.sheet-x:hover { color: var(--text); border-color: var(--border-strong); }
.pending-bar { width: 100%; min-height: 52px; padding: 0 18px; border-radius: 14px; background: var(--accent); color: var(--bg); font-weight: 700; font-size: 15px; }
.pending-bar b { font-stretch: 75%; font-weight: 900; }
.verify .head .t { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.verify .head .c { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #c9c9c4; }
.verify .head .c i { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--ok); display: block; }
.verify .head .c.low i { background: var(--warning); }
.adjust { display: flex; align-items: center; justify-content: center; gap: clamp(16px, 5vw, 32px); }
.adjust button { width: 64px; height: 64px; border-radius: 50%; border: 1px solid var(--border-strong); background: var(--bg); font-size: 30px; font-weight: 300; line-height: 1; display: grid; place-items: center; }
.adjust button:hover { border-color: var(--accent); }
.adjust button:disabled { opacity: .3; }
.adjust .n { font-stretch: 75%; font-weight: 900; font-size: clamp(96px, 24vw, 180px); line-height: .85; letter-spacing: -.05em; color: var(--accent); font-variant-numeric: tabular-nums; min-width: 2ch; text-align: center; }
.verify .note { text-align: center; font-size: 14px; color: var(--muted); min-height: 1.4em; }
.verify .rows { display: flex; flex-direction: column; border: 1px solid var(--surface-2); border-radius: 14px; overflow: hidden; }
.verify .row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; font-size: 14px; border-bottom: 1px solid var(--surface-2); }
.verify .row:last-child { border-bottom: 0; }
.verify .row .v { font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--text); }
.verify .row .v.hi { color: var(--accent); }
.verify .row .s { font-size: 12px; color: var(--muted); margin-top: 2px; }
.switch { position: relative; width: 52px; height: 44px; flex: none; padding: 0; background: none; display: grid; place-items: center; }
.switch::before { content: ''; position: absolute; inset: 6px 0; border-radius: 999px; background: var(--border-strong); transition: background .2s; }
.switch i { position: relative; z-index: 1; display: block; width: 26px; height: 26px; border-radius: 50%; background: var(--text); transform: translateX(-10px); transition: transform .2s, background .2s; }
.switch.on::before { background: var(--accent); }
.switch.on i { background: var(--bg); transform: translateX(10px); }
.switch:disabled { cursor: not-allowed; }
.switch:disabled::before { background: var(--border); }
.switch:disabled i { background: var(--disabled); }
.verify .actions { display: flex; gap: 10px; flex-wrap: wrap; }
.verify .actions .btn-primary { flex: 1 1 200px; border-radius: 14px; }
.btn-outline { min-height: 56px; padding: 0 20px; border-radius: 14px; border: 1px solid var(--border-strong); background: transparent; font-weight: 600; font-size: 15px; }
.link-out { font-size: 13px; line-height: 1.5; word-break: break-all; color: var(--text); }
.processing { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 14px; min-height: 56px; }
.posted { width: 100%; max-width: 640px; background: var(--accent); color: var(--bg); border-radius: 24px 24px 0 0; padding: clamp(24px, 5vw, 40px) clamp(20px, 5vw, 40px) calc(24px + var(--safe-bottom)); display: flex; flex-direction: column; gap: 12px; animation: pop .5s cubic-bezier(.2,.8,.3,1.2) both; }
@media (min-width: 820px) { .posted { border-radius: 24px; } }
.posted .t { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; }
.posted .n { font-stretch: 75%; font-weight: 900; font-size: clamp(96px, 22vw, 180px); line-height: .85; letter-spacing: -.05em; }
.posted .kpi { margin: 14px 0 0; border-top: 1.5px solid rgba(11,11,12,.28); font-family: var(--mono); font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.posted .kpi > div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 10px 0; border-bottom: 1px solid rgba(11,11,12,.16); }
.posted .kpi > div:last-child { border-bottom: 0; }
.posted .kpi dt, .posted .kpi dd { margin: 0; }
.posted .kpi dd { text-align: right; min-width: 0; }
.posted .l { font-size: 16px; font-weight: 500; }
.posted .actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.posted .dark { min-height: 48px; padding: 0 20px; border-radius: 12px; background: var(--bg); color: var(--text); font-weight: 600; font-size: 15px; }
.posted .line { min-height: 48px; padding: 0 20px; border-radius: 12px; border: 1.5px solid var(--bg); background: transparent; font-weight: 600; font-size: 15px; }

/* ============ CREW (board) ============ */
.board { display: flex; flex-direction: column; gap: 6px; }
/* Two rows on every width: name and total on top, the week's marks and the
   summary underneath. In one line the name was squeezed to "Maxi..." at 320,
   because the total and "1/7 days - 1 streak" claimed the right half. */
.brow { position: relative; overflow: hidden; display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto auto;
  grid-template-areas: "rank av name tot nudge" "meta meta meta meta meta";
  align-items: center; column-gap: 12px; row-gap: 8px;
  padding: 14px 16px; border-radius: 16px; border: 1px solid var(--surface-2); background: var(--surface); text-align: left; color: var(--text); width: 100%; }
.brow.me { border-color: rgba(255,242,0,.35); background: var(--accent-tint-2); }
.brow > *:not(.fill) { position: relative; }
.brow .fill { position: absolute; left: 0; top: 0; bottom: 0; background: rgba(242,242,238,.04); transition: width .4s; }
.brow.r1 .fill { background: rgba(255,242,0,.08); }
.brow.me .fill { background: rgba(255,242,0,.1); }
/* Nobody home: a dashed row reads as an invitation, not as a broken one. */
.brow.zero { border-style: dashed; border-color: var(--border); }
.brow.zero .bname b, .brow.zero .btot { color: var(--muted); }
.brow .rank { width: 28px; flex: none; font-stretch: 75%; font-weight: 900; font-size: 22px; color: var(--dim); }
.brow.r1 .rank { color: var(--accent); }
.brow.r2 .rank, .brow.r3 .rank { color: #c9c9c4; }
.brow .rank { grid-area: rank; }
/* The avatar opens that person's profile: a 36px picture in a 44px button. */
.brow .brow-av { grid-area: av; width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 50%; }
.brow .bname { grid-area: name; display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.brow .bname b { font-weight: 600; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brow .bname .you { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); flex: none; }
.brow .btot { grid-area: tot; font-stretch: 75%; font-weight: 900; font-size: 30px; line-height: 1; font-variant-numeric: tabular-nums; text-align: right; }
.brow .bmeta { grid-area: meta; display: flex; align-items: center; gap: 10px; min-width: 0; }
.brow .bmeta .marks { flex: 1; min-width: 0; margin-top: 0; }
.brow .nudge { grid-area: nudge; }
.marks { display: grid; gap: 3px; }
.marks i { height: 3px; border-radius: 2px; background: var(--border); display: block; }
.marks i.hit { background: var(--accent); }
.marks i.today { outline: 1px solid rgba(255,242,0,.5); outline-offset: 1px; }
.brow .sub2 { font-size: 12px; color: var(--faint); white-space: nowrap; flex: none; }
.nudge { min-height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--accent); color: var(--accent); font-weight: 600; font-size: 13px; }
.nudge:disabled { border-color: var(--border); color: var(--faint); }
.invite { padding: 18px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.invite .lnk { margin-top: 4px; font-family: var(--mono); font-size: clamp(15px, 4vw, 22px); font-weight: 600; letter-spacing: .06em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ============ CHAT ============ */
body.chat-open .tabbar { display: none !important; }
body.chat-open .mobile-head { display: none; }
body.chat-open .composer { display: flex; }
.chat-fab { position: fixed; top: calc(12px + var(--safe-top)); left: 12px; z-index: 40; width: 48px; height: 48px; border-radius: 50%; background: rgba(28,28,31,.9); border: 1px solid var(--border-strong); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); font-size: 22px; display: grid; place-items: center; color: var(--text); }
.chat-head { padding-left: 60px; min-height: 48px; }
@media (min-width: 820px) { .chat-fab { display: none; } .chat-head { padding-left: 0; } body.chat-open main.content { padding-bottom: 64px; } }
.msg .bubble a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; word-break: break-all; }
.msg.mine .bubble a { color: var(--bg); }
.msg .bubble.theirs { border-left: 3px solid var(--who, var(--border-strong)); background: color-mix(in srgb, var(--who, #1c1c1f) 12%, var(--surface-2)); }
.msg .who { color: var(--who, var(--muted)); }
#chatScreen.active { min-height: calc(100vh - 160px); min-height: calc(100dvh - 160px); }
.chat-list { flex: 1; display: flex; flex-direction: column; gap: 10px; justify-content: flex-end; }
.msg { display: flex; gap: 8px; align-items: flex-end; }
.msg.mine { justify-content: flex-end; }
.msg.same { margin-top: -4px; }
.msg .bubble { width: max-content; max-width: 100%; padding: 10px 14px; font-size: 15px; line-height: 1.35; border-radius: 18px; background: var(--surface-2); color: var(--text); border-bottom-left-radius: 6px; word-break: break-word; }
.msg.same:not(.mine) .bubble { margin-left: 38px; }
.msg.mine .bubble { background: var(--accent); color: var(--bg); border-bottom-left-radius: 18px; border-bottom-right-radius: 6px; }
.msg .who { font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 2px; }
.msg .rxs { display: flex; gap: 4px; margin-top: 4px; flex-wrap: wrap; }
.msg .rxs button { position: relative; font-size: 12px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 999px; padding: 4px 9px; min-height: 30px; }
/* A reaction chip has to stay visually light, so the extra reach is invisible. */
.msg .rxs button::after { content: ''; position: absolute; inset: -7px -5px; }
.msg .rxs button.on { border-color: var(--accent); }
.msg.mine .rxs button { background: var(--surface); color: var(--text); }
.picker { display: flex; gap: 4px; margin-top: 4px; }
.picker button { font-size: 18px; min-width: 40px; min-height: 40px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; }
/* Phone: the composer is pinned to the bottom of the screen like the tab bar
   was, and app.js lifts it by the keyboard height (visualViewport) so it sits
   right on top of the keys. Desktop: it just sticks inside the column. */
/* Bottom slot of the shell, only while chatting. Normal flow, never fixed. */
.composer { display: none; flex: none; gap: 8px; padding: 8px var(--page-pad) calc(12px + var(--safe-bottom)); background: var(--bg); border-top: 1px solid var(--surface-2); }
@media (min-width: 820px) { .composer { padding: 8px var(--page-pad) 16px; max-width: 820px; width: 100%; margin: 0 auto; border-top: 0; } }
.composer input { flex: 1; min-width: 0; font: inherit; font-size: 16px; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 0 18px; min-height: 52px; }
.composer button { width: 52px; height: 52px; flex: none; border-radius: 50%; background: var(--accent); color: var(--bg); font-size: 20px; font-weight: 900; display: grid; place-items: center; }
.chat-note { font-size: 12px; color: var(--dim); text-align: center; padding: 6px; }

/* ============ ME ============ */
.me-head { display: flex; align-items: center; gap: 16px; }
.me-head .meta { min-width: 0; flex: 1; }
.me-head h2 { font-stretch: 75%; font-weight: 900; font-size: clamp(26px, 8vw, 48px); letter-spacing: -.03em; text-transform: uppercase; line-height: .9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-head .since { font-size: 14px; color: var(--muted); margin-top: 4px; }
.avatar-wrap { position: relative; cursor: pointer; }
.avatar-wrap .edit { position: absolute; bottom: -4px; left: 50%; transform: translateX(-50%); background: var(--bg); color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: .02em; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--border); white-space: nowrap; }
.stats3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stats3 .stat-card { padding: 14px; }
.stats3 .v { font-stretch: 75%; font-weight: 900; font-size: clamp(26px, 5vw, 36px); line-height: 1; }
.stats3 .l { margin-top: 4px; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.goal-card { padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.goal-card .top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.goal-card .top b { font-weight: 600; font-size: 15px; }
.goal-card .top button { color: var(--accent); font-size: 14px; font-weight: 600; min-height: 44px; }
.goal-card .big { display: flex; align-items: baseline; gap: 8px; }
.goal-card .big .n { font-stretch: 75%; font-weight: 900; font-size: 44px; line-height: 1; }
.goal-card .big .s { color: var(--muted); font-size: 15px; }
.goal-card .bar6 { height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; }
.goal-card .bar6 i { display: block; height: 100%; background: var(--accent); transition: width .4s; }
.hist { position: relative; display: grid; grid-template-columns: repeat(14, 1fr); gap: 4px; align-items: stretch; height: 64px; }
/* The goal, so a short bar reads as "under" instead of as no data. */
.hist::after { content: ''; position: absolute; left: 0; right: 0; bottom: var(--goal, 100%); border-top: 1px dashed var(--border-strong); pointer-events: none; }
.hist i { position: relative; display: block; height: 100%; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.hist i::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: var(--h, 0%); min-height: 2px; border-radius: 4px; background: var(--border); }
.hist i.some::after { background: var(--faint); }
.hist i.hit::after { background: var(--accent); }
.hist i.today { outline: 1px solid var(--accent); outline-offset: 1px; }
.setting { padding: 18px; display: flex; align-items: center; gap: 14px; }
.setting .t { font-weight: 600; font-size: 15px; }
.setting .s { font-size: 13px; color: var(--muted); margin-top: 2px; }
.setting .grow { flex: 1; min-width: 0; }
.link-btn { align-self: flex-start; color: var(--faint); font-size: 14px; min-height: 44px; }
.link-btn:hover { color: var(--text); }

/* ============ MANAGE ============ */
.stats4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.stats4 .stat-card { padding: 14px; }
.stats4 .v { font-stretch: 75%; font-weight: 900; font-size: 32px; line-height: 1; }
.stats4 .l { margin-top: 4px; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.rows { overflow: hidden; }
.rows .r { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-bottom: 1px solid var(--surface-2); }
.rows .r:last-child { border-bottom: 0; }
.rows .r .grow { flex: 1; min-width: 0; }
.rows .r .t { font-weight: 600; }
.rows .r .s { font-size: 13px; color: var(--muted); }
.rows .r .v { font-stretch: 75%; font-weight: 900; font-size: 24px; }
.rows .m { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--surface-2); flex-wrap: wrap; }
.m-actions { display: flex; gap: 6px; margin-left: auto; }
.reset-pw { min-height: 40px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--border); color: var(--accent); font-size: 12px; font-weight: 600; }
.reset-pw:disabled { color: var(--faint); border-color: var(--surface-2); }
.rows .m:last-child { border-bottom: 0; }
.rows .m .nm { flex: 1; min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rows .m .s { font-size: 13px; color: var(--muted); white-space: nowrap; }
.kick { min-height: 40px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--border); color: var(--danger); font-size: 12px; font-weight: 600; }
.danger-zone { border: 1px solid rgba(255,122,107,.35); border-radius: 20px; padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.danger-zone .l { font-size: 12px; color: var(--danger); text-transform: uppercase; letter-spacing: .1em; font-weight: 700; }
.danger-zone .t { font-weight: 600; }
.danger-zone .s { font-size: 14px; color: var(--muted); text-wrap: pretty; }
.danger-zone .confirm-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.danger-zone input { font: inherit; font-size: 15px; color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 0 12px; min-height: 44px; flex: 1 1 160px; }
.btn-danger-outline { align-self: flex-start; min-height: 44px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--danger); background: transparent; color: var(--danger); font-weight: 600; font-size: 14px; }
.btn-danger { min-height: 44px; padding: 0 16px; border-radius: 10px; background: var(--danger); color: var(--bg); font-weight: 700; font-size: 14px; }
.btn-cancel { min-height: 44px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--border); background: transparent; font-weight: 600; font-size: 14px; }

/* ============ TOAST ============ */
.toast { position: fixed; left: 12px; right: 12px; margin: 0 auto; width: max-content; max-width: calc(100vw - 24px); bottom: calc(var(--tabbar-h) + 12px); background: var(--surface-2); border: 1px solid var(--border-strong); color: var(--text);
  padding: 10px 16px; border-radius: 999px; font-size: 13px; z-index: 80; display: flex; align-items: center; gap: 8px; box-shadow: 0 8px 30px rgba(0,0,0,.4); animation: fadeUp .2s; word-break: break-word; }
.toast.ok { border-color: var(--accent); }
.toast.err { border-color: var(--danger); }
@media (min-width: 820px) { .toast { bottom: 24px; } }
.toast { bottom: calc(var(--tabbar-h) + 12px); }

/* The scan beam ran 1.8s forever and every feed card slid in. Honour the
   system setting; the loading spinner stays, since a frozen one says nothing. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .scanner { animation: none !important; top: 40%; opacity: .45; }
  .hud.rec .dot { animation: none !important; }
  .spin { animation-duration: 1.4s !important; animation-iteration-count: infinite !important; }
}
