/* ------------------------------------------------------------------ tokens */
:root {
  --bg: #faf8f5;
  --surface: #ffffff;
  --surface-2: #f3efe9;
  --text: #1d1b19;
  --muted: #6f6a64;
  --border: #e6e0d8;
  --accent: #e4572e;
  --accent-ink: #ffffff;
  --accent-soft: #fde8e1;
  --gold: #b8891a;
  --gold-soft: #fbf1d6;
  --warn: #8a5a00;
  --warn-soft: #fff4d6;
  --danger: #c0392b;
  --danger-soft: #fde4e1;
  --ok: #2f8a4c;
  --radius: 14px;
  --radius-s: 9px;
  --shadow: 0 1px 2px rgb(0 0 0 / .05), 0 4px 16px rgb(0 0 0 / .06);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131211;
    --surface: #1c1a18;
    --surface-2: #26231f;
    --text: #f2eee8;
    --muted: #a59e95;
    --border: #322e29;
    --accent: #f06a43;
    --accent-ink: #1a0d08;
    --accent-soft: #3a2018;
    --gold: #e0b13b;
    --gold-soft: #3a2f12;
    --warn: #f0c050;
    --warn-soft: #362a0c;
    --danger: #ff6b5b;
    --danger-soft: #3c1814;
    --ok: #5cc27c;
    --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 4px 16px rgb(0 0 0 / .3);
    color-scheme: dark;
  }
}

/* ------------------------------------------------------------------ base */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 var(--font); padding-bottom: env(safe-area-inset-bottom); }
a { color: inherit; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 2px; }
a:hover { color: var(--accent); }
h1, h2, h3 { line-height: 1.2; margin: 0; }
h1 { font-family: var(--display); font-size: clamp(1.7rem, 4vw, 2.4rem); font-weight: 600; letter-spacing: -.01em; }
h2 { font-size: 1.15rem; font-weight: 650; }
p { margin: 0; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
input[type=text], input[type=email], input[type=password], input[type=search], select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-s); background: var(--surface); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea { resize: vertical; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; z-index: 100; background: var(--surface); padding: 8px 12px; border-radius: 8px; }
.icon { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ------------------------------------------------------------------ layout helpers */
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.row.between { justify-content: space-between; }
.row.wrap { flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 18px; }
.stack-s { display: flex; flex-direction: column; gap: 6px; }
.muted { color: var(--muted); }
.center { text-align: center; }
.hint { font-size: .85rem; color: var(--muted); }
.hint.ok { color: var(--ok); }
.label, label > span:first-child { font-size: .9rem; font-weight: 600; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------------ top bar and navigation */
.topbar { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--border); }
.topbar-inner { max-width: 1240px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 16px; }
.logo { font-family: var(--display); font-size: 1.55rem; font-weight: 700; text-decoration: none; letter-spacing: -.02em; }
.logo span { color: var(--accent); }
.search { flex: 1; max-width: 460px; }
.search input { border-radius: 999px; background: var(--surface-2); border-color: transparent; padding: 8px 16px; }
.nav { display: flex; gap: 2px; margin-left: auto; }
.nav-link { position: relative; display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: 999px; text-decoration: none; color: var(--muted); font-weight: 550; font-size: .92rem; }
.nav-link:hover, .nav-link.active { color: var(--text); background: var(--surface-2); }
.nav-link.primary { background: var(--text); color: var(--bg); padding: 8px 14px; }
.nav-link.primary:hover { background: var(--accent); color: var(--accent-ink); }
.dot-badge { position: absolute; top: 2px; left: 22px; background: var(--accent); color: var(--accent-ink); border-radius: 999px; font-size: .68rem; font-weight: 700; padding: 0 5px; line-height: 16px; }
.bottom-nav { display: none; }
@media (max-width: 900px) { .nav-label { display: none; } .nav-link.primary .nav-label { display: inline; } }
@media (max-width: 720px) {
  .topbar-inner { gap: 10px; padding: 8px 16px; }
  .logo { font-size: 1.3rem; }
  .nav { display: none; }
  .bottom-nav { display: flex; position: fixed; z-index: 20; bottom: 0; left: 0; right: 0; justify-content: space-around; background: var(--surface); border-top: 1px solid var(--border); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .bottom-nav .nav-link { flex-direction: column; gap: 0; padding: 6px 10px; font-size: .7rem; border-radius: 12px; }
  .bottom-nav .nav-label { display: block; }
  .bottom-nav .nav-link.primary { background: var(--accent); color: var(--accent-ink); }
  .bottom-nav .dot-badge { left: auto; right: 6px; }
  main { padding-bottom: 76px; }
}

/* ------------------------------------------------------------------ pages */
.page { max-width: 780px; margin: 0 auto; padding: 28px 16px 64px; display: flex; flex-direction: column; gap: 20px; }
.page.wide { max-width: 1240px; }
.page.narrow { max-width: 440px; }
.page-head { display: flex; flex-direction: column; gap: 8px; }
.kicker { text-transform: uppercase; letter-spacing: .08em; font-size: .75rem; font-weight: 700; color: var(--accent); }
.stats { font-size: 1.05rem; }
.section { display: flex; flex-direction: column; gap: 14px; margin-top: 12px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.card-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.danger-zone { border-color: color-mix(in srgb, var(--danger) 40%, var(--border)); }
.empty { text-align: center; padding: 48px 16px; display: flex; flex-direction: column; align-items: center; gap: 10px; border: 1px dashed var(--border); border-radius: var(--radius); }
.empty-title { font-weight: 650; font-size: 1.1rem; }
.notice { padding: 10px 14px; border-radius: var(--radius-s); background: var(--surface-2); }
.notice.warn { background: var(--warn-soft); color: var(--warn); }
.notice.danger { background: var(--danger-soft); color: var(--danger); }

.hero { background: var(--surface); border: 1px solid var(--border); border-radius: calc(var(--radius) * 1.4); padding: clamp(22px, 5vw, 48px); display: grid; gap: 16px; }
.hero h1 { font-size: clamp(1.8rem, 5vw, 3rem); max-width: 18ch; }
.hero p { max-width: 62ch; color: var(--muted); font-size: 1.05rem; margin: 12px 0 18px; }

/* ------------------------------------------------------------------ buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; font-weight: 600; text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s, transform .05s; }
.btn:hover { border-color: var(--text); color: var(--text); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: progress; }
.btn.primary { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn.primary:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.ghost { background: transparent; }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.sm { padding: 5px 12px; font-size: .88rem; }
.btn.big { padding: 12px 24px; font-size: 1.05rem; }
.btn.wide-btn { width: 100%; }
.btn.react[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.btn.react[aria-pressed="true"] .icon { fill: currentColor; }
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 999px; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.link-btn { display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; padding: 0; color: var(--muted); font-size: .88rem; font-weight: 550; cursor: pointer; text-decoration: none; }
.link-btn:hover { color: var(--accent); }

/* ------------------------------------------------------------------ chips, tabs, badges */
.chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chips.scroll-x { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; mask-image: linear-gradient(90deg, #000 92%, transparent); }
.chips.scroll-x::-webkit-scrollbar { display: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font-size: .9rem; text-decoration: none; cursor: pointer; white-space: nowrap; }
.chip:hover { border-color: var(--text); color: var(--text); }
.chip.active { background: var(--text); color: var(--bg); border-color: var(--text); }
.chip.style { background: var(--accent-soft); border-color: transparent; color: var(--accent); font-weight: 600; }
.chip.static { cursor: default; }
.chip-count { font-size: .78rem; opacity: .65; font-variant-numeric: tabular-nums; }
.chip-x { border: 0; background: none; padding: 0 0 0 2px; cursor: pointer; font-size: 1.1rem; line-height: 1; color: inherit; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--border); }
.tab { padding: 8px 12px; text-decoration: none; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab.active { color: var(--text); border-bottom-color: var(--accent); }
.tabs.small { border: 0; }
.tabs.small .tab { padding: 4px 10px; font-size: .9rem; }
.feed-head { display: flex; justify-content: space-between; align-items: end; gap: 12px; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; background: var(--surface-2); font-size: .78rem; font-weight: 650; color: var(--muted); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.gold { background: var(--gold-soft); color: var(--gold); }
.badge.gold .icon { fill: currentColor; }

/* ------------------------------------------------------------------ people */
.avatar { display: inline-grid; place-items: center; border-radius: 999px; color: #fff; font-weight: 700; flex: none; user-select: none; }
.avatar.sys { width: 36px; height: 36px; background: var(--surface-2); color: var(--muted); }
.user-link { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; }
.user-names { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.user-names strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-names .muted { font-size: .82rem; }
.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.person { padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.people-list { display: flex; flex-direction: column; gap: 8px; max-height: 60vh; overflow: auto; }
.profile-head { display: flex; gap: 24px; align-items: flex-start; }
.profile-head h1 { font-size: 2rem; }
.bio { max-width: 60ch; white-space: pre-wrap; }
.counts { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--muted); }
.counts strong { color: var(--text); }
@media (max-width: 560px) { .profile-head { flex-direction: column; gap: 12px; } }

/* ------------------------------------------------------------------ outfit grid (masonry) */
.grid { columns: 236px; column-gap: 16px; }
.card { display: block; break-inside: avoid; margin-bottom: 16px; text-decoration: none; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); overflow: hidden; transition: transform .15s, box-shadow .15s; }
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow); color: inherit; }
.card-photo { position: relative; background: var(--surface-2); }
.card-photo img { width: 100%; height: 100%; object-fit: cover; }
.card-badge { position: absolute; left: 8px; top: 8px; }
.card-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 10px 4px; font-size: .88rem; }
.card-author { display: flex; align-items: center; gap: 7px; min-width: 0; font-weight: 600; }
.card-author span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-stats { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.stat { display: inline-flex; align-items: center; gap: 3px; }
.card-like { display: inline-flex; align-items: center; gap: 3px; border: 0; background: none; color: var(--muted); cursor: pointer; padding: 2px; font-size: .88rem; }
.card-like:hover { color: var(--accent); }
.card-like[aria-pressed="true"] { color: var(--accent); }
.card-like[aria-pressed="true"] .icon { fill: currentColor; }
.card-brands { padding: 0 10px 9px; font-size: .78rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sentinel { height: 1px; }
.sentinel.loading { height: 60px; background: radial-gradient(circle, var(--muted) 3px, transparent 4px) center / 18px 18px no-repeat; opacity: .5; animation: pulse 1s infinite alternate; }
@keyframes pulse { to { opacity: .15; } }

/* ------------------------------------------------------------------ outfit page */
.outfit-layout { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.outfit-media { position: sticky; top: 76px; display: flex; flex-direction: column; gap: 10px; }
.outfit-side { display: flex; flex-direction: column; gap: 16px; }
.caption { white-space: pre-wrap; font-size: 1.05rem; }
.actions { gap: 6px; }
@media (max-width: 900px) {
  .outfit-layout { grid-template-columns: 1fr; gap: 20px; }
  .outfit-media { position: static; }
}

.pin-photo { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--surface-2); max-height: 82vh; margin: 0 auto; width: 100%; }
.pin-photo img { width: 100%; height: 100%; object-fit: contain; }
.pin-photo.placing { cursor: crosshair; outline: 3px dashed var(--accent); outline-offset: -3px; }
.pins { position: absolute; inset: 0; pointer-events: none; }
.pin { position: absolute; transform: translate(-50%, -50%); pointer-events: auto; width: 28px; height: 28px; border-radius: 999px; border: 2px solid #fff; background: rgb(20 18 16 / .85); color: #fff; font-weight: 700; font-size: .8rem; cursor: pointer; box-shadow: 0 2px 8px rgb(0 0 0 / .35); transition: transform .15s, background .15s; }
.pin:hover, .pin.hot { transform: translate(-50%, -50%) scale(1.25); background: var(--accent); }
.pin.suggested { border-style: dashed; background: rgb(20 18 16 / .55); }
.placing-hint { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 12px; border-radius: var(--radius-s); background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.photo-hint { color: var(--muted); font-size: .9rem; text-align: center; }

.pieces { display: flex; flex-direction: column; gap: 10px; }
.piece { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); transition: border-color .2s, background .2s; }
.piece:hover { border-color: color-mix(in srgb, var(--text) 30%, var(--border)); }
.piece.is-suggested { border-style: dashed; }
.piece.flash { border-color: var(--accent); background: var(--accent-soft); }
.piece-num { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 999px; background: var(--text); color: var(--bg); font-weight: 700; font-size: .8rem; }
.piece-num.unpinned { background: var(--surface-2); color: var(--muted); }
.piece-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.piece-title { display: flex; align-items: center; gap: 8px; }
.piece-meta { font-size: .88rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.piece-note { font-size: .9rem; }
.piece-links { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 2px; }
.piece-tools { display: flex; flex: none; }
.suggest { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; }
.color-dot { display: inline-block; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--text) 25%, transparent); flex: none; }

.vote-pair { display: inline-flex; align-items: center; gap: 2px; }
.vote { display: inline-flex; align-items: center; gap: 3px; border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: 3px 9px; cursor: pointer; font-size: .85rem; font-weight: 600; color: var(--muted); }
.vote:hover:not(:disabled) { color: var(--text); border-color: var(--text); }
.vote[aria-pressed="true"] { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.vote:disabled { opacity: .4; cursor: default; }
.comment-foot .vote { border: 0; background: none; padding: 3px 4px; }
.score { min-width: 2ch; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.score.pos { color: var(--ok); }
.score.neg { color: var(--danger); }

/* ------------------------------------------------------------------ discussion */
.discussion { max-width: 820px; }
.composer { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; }
.composer-head { gap: 12px; }
.toggle { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 600; font-size: .92rem; }
.toggle input { width: 18px; height: 18px; accent-color: var(--accent); }
.swap-fields { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: var(--radius-s); background: var(--surface-2); }
.comments { display: flex; flex-direction: column; gap: 12px; }
.comment { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.comment.is-swap { border-left: 4px solid var(--accent); }
.comment.picked { border-left-color: var(--gold); background: color-mix(in srgb, var(--gold-soft) 45%, var(--surface)); }
.comment.held { opacity: .7; }
.comment-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.comment-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.comment-foot { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.comment-foot .btn.ghost.sm { border: 0; padding: 0; color: var(--muted); }
.replies { display: flex; flex-direction: column; gap: 8px; margin-left: 14px; padding-left: 14px; border-left: 2px solid var(--border); }
.replies .comment { padding: 10px 0 4px; border: 0; background: none; }
.swap-box { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; border-radius: var(--radius-s); background: var(--surface-2); }
.swap-arrow { font-size: 1.2rem; color: var(--accent); font-weight: 700; }
.swap-to strong { color: var(--accent); }
.reply-box:empty { display: none; }

/* ------------------------------------------------------------------ publish */
.dropzone { border: 2px dashed var(--border); border-radius: calc(var(--radius) * 1.4); padding: 56px 20px; text-align: center; background: var(--surface); transition: border-color .15s, background .15s; }
.dropzone.over { border-color: var(--accent); background: var(--accent-soft); }
.drop-inner { display: flex; flex-direction: column; align-items: center; gap: 12px; color: var(--muted); }
.drop-inner h2 { color: var(--text); font-size: 1.4rem; }
.tips { color: var(--muted); font-size: .9rem; margin: 0; padding-left: 20px; }
.new-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.new-photo { position: sticky; top: 76px; display: flex; flex-direction: column; gap: 8px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; cursor: pointer; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--accent); flex: none; }
.check span { font-weight: 400 !important; }
@media (max-width: 900px) { .new-layout { grid-template-columns: 1fr; } .new-photo { position: static; } }

.color-pick { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.swatch { width: 28px; height: 28px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--text) 25%, transparent); cursor: pointer; padding: 0; }
.swatch[aria-checked="true"] { outline: 3px solid var(--accent); outline-offset: 2px; }
.style-list { max-height: 190px; overflow: auto; padding: 2px; }

/* ------------------------------------------------------------------ typeahead */
.ta { position: relative; }
.ta-list { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 4px; list-style: none; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-s); box-shadow: var(--shadow); max-height: 280px; overflow: auto; }
.ta-list li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 10px; border-radius: 6px; cursor: pointer; }
.ta-list li .muted { font-size: .82rem; text-align: right; }
.ta-list li.active, .ta-list li:hover { background: var(--surface-2); }

/* ------------------------------------------------------------------ lists */
.item-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.item-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); text-decoration: none; }
.item-row:hover { border-color: var(--text); color: inherit; }
.item-name { display: flex; flex-direction: column; min-width: 0; }
.item-name .muted { font-size: .85rem; }
.big-search { display: flex; align-items: center; gap: 10px; padding: 4px 16px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--muted); }
.big-search input { border: 0; box-shadow: none !important; padding: 10px 0; font-size: 1.05rem; background: transparent; }
.notifs { display: flex; flex-direction: column; }
.notif { display: flex; gap: 12px; align-items: center; padding: 12px 8px; border-bottom: 1px solid var(--border); text-decoration: none; }
.notif.unread { background: var(--accent-soft); border-radius: var(--radius-s); }
.notif-text { flex: 1; display: block; }
.notif-text .quote, .notif-text .time { display: block; margin-top: 2px; }
.notif-text .quote { font-size: .9rem; }
.notif-text .time { font-size: .8rem; }
.notif-thumb { width: 44px; height: 56px; object-fit: cover; border-radius: 6px; }
.mod-list { display: flex; flex-direction: column; gap: 12px; }
.mod-item { display: flex; gap: 16px; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.mod-thumb { width: 140px; border-radius: var(--radius-s); }
.mod-item blockquote { margin: 0; padding-left: 12px; border-left: 3px solid var(--border); white-space: pre-wrap; }
.reports { margin: 0; padding-left: 18px; color: var(--danger); }
.mod-tools { padding: 8px 12px; border-radius: var(--radius-s); background: var(--surface-2); }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th, .table td { text-align: left; padding: 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
@media (max-width: 720px) { .table { display: block; overflow-x: auto; } .mod-item { flex-direction: column; } }

/* ------------------------------------------------------------------ dialogs and toasts */
dialog.modal { border: 0; padding: 0; border-radius: calc(var(--radius) * 1.2); background: var(--surface); color: var(--text); width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 32px); box-shadow: 0 20px 60px rgb(0 0 0 / .3); }
dialog.modal.wide { width: min(720px, calc(100vw - 24px)); }
dialog.modal::backdrop { background: rgb(10 8 6 / .5); backdrop-filter: blur(2px); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px 0 20px; }
.modal-body { padding: 14px 20px 20px; overflow: visible; }
#toasts { position: fixed; z-index: 100; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: min(480px, calc(100vw - 32px)); }
.toast { background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 12px; box-shadow: var(--shadow); font-weight: 550; animation: toast-in .2s ease-out; transition: opacity .4s, transform .4s; text-align: center; }
.toast.error { background: var(--danger); color: #fff; }
.toast.out { opacity: 0; transform: translateY(8px); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
@media (max-width: 720px) { #toasts { bottom: 88px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------------------------------------------------------------- sign in with Google / Apple */
.oauth-list { display: grid; gap: 10px; }
.oauth-btn { width: 100%; gap: 10px; padding: 11px 18px; font-size: 1rem; }
.oauth-btn svg { flex: none; }
.oauth-btn.google { background: #fff; color: #1f1f1f; border-color: #dadce0; }
.oauth-btn.google:hover { border-color: #1f1f1f; color: #1f1f1f; }
.oauth-btn.apple { background: #000; color: #fff; border-color: #000; }
.oauth-btn.apple:hover { background: #262626; color: #fff; border-color: #262626; }
@media (prefers-color-scheme: dark) {
  .oauth-btn.apple { background: #fff; color: #000; border-color: #fff; }
  .oauth-btn.apple:hover { background: #e8e8e8; color: #000; }
}
details.fallback { border-top: 1px solid var(--border); padding-top: 14px; }
details.fallback > summary { cursor: pointer; color: var(--muted); font-weight: 600; font-size: .95rem; list-style-position: inside; }
details.fallback > summary:hover { color: var(--text); }
details.fallback[open] > summary { margin-bottom: 14px; }
.logins { display: grid; gap: 10px; }
.login-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius-s); }
.login-row .oauth-btn { width: auto; padding: 7px 14px; font-size: .9rem; }
.login-name { display: flex; flex-direction: column; min-width: 0; }
.login-name .muted { font-size: .88rem; overflow-wrap: anywhere; }
.login-password { border-top: 1px solid var(--border); padding-top: 14px; }
.login-password h3 { margin: 0; font-size: 1.02rem; }
.oauth-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.oauth-grid .oauth-btn { padding: 10px 12px; font-size: .95rem; }
.oauth-btn.passkey { background: var(--text); color: var(--bg); border-color: var(--text); }
.oauth-btn.passkey:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.oauth-btn.x, .oauth-btn.tiktok { color: var(--text); }
.login-name strong { display: inline-flex; align-items: center; gap: 6px; }
.card-box h3 { margin: 6px 0 0; font-size: 1.02rem; }
@media (max-width: 360px) { .oauth-grid { grid-template-columns: 1fr; } }
.oauth-grid > :last-child:nth-child(odd) { grid-column: 1 / -1; }

/* ---------------------------------------------------------------- legal pages */
.legal { max-width: 760px; gap: 12px; }
.legal h2 { margin-top: 14px; }
.legal p, .legal li { line-height: 1.6; }
.legal ul, .legal ol { margin: 0; padding-left: 1.3em; display: grid; gap: 6px; }
.legal-top { max-width: 1240px; margin: 0 auto; padding: 12px 16px; }
.legal-logo { font-family: var(--display); font-weight: 700; font-size: 1.4rem; text-decoration: none; color: var(--text); }
.legal-logo span { color: var(--accent); }
.legal-links, .site-footer { font-size: .9rem; color: var(--muted); }
.site-footer { max-width: 1240px; margin: 0 auto; padding: 24px 16px 96px; text-align: center; }
.site-footer a { color: var(--muted); }
