/* glint-app.css — small app-specific layer on top of the design system (glint.css).
   Only classes the server-rendered views introduce that aren't in the component inventory.
   Everything references design tokens; no raw hex. */

.mode-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; flex-wrap: wrap; }

.empty-state { text-align: center; padding: 48px 20px; color: var(--ink-soft); }
.empty-state h2 { font-family: var(--display); color: var(--ink); margin-bottom: 8px; font-size: 1.2rem; }
.empty-state a { color: var(--accent); text-decoration: none; }
.empty-state a:hover { text-decoration: underline; }

.detail-text {
    font-size: 15px; line-height: 1.6; color: var(--ink);
    margin-bottom: 18px; white-space: pre-wrap;
}

.comment-readonly-note { font-size: 12.5px; color: var(--ink-soft); margin: 8px 0 4px; }

.c-removed em { color: var(--ink-soft); }

/* Collapsible threads (read-only Phase 1 affordance) */
.thread-collapse {
    width: 22px; height: 22px; margin-top: 6px; border-radius: 6px;
    background: var(--surface-2); border: 1px solid var(--line); cursor: pointer; flex: none;
    position: relative;
}
.thread-collapse::before {
    content: ""; position: absolute; inset: 0; margin: auto;
    width: 7px; height: 2px; background: var(--ink-soft); border-radius: 2px;
}
.thread-collapse:hover { border-color: var(--accent); }
.comment.collapsed > .c-body > [data-replies] { display: none; }
.comment.collapsed > .col > .line { opacity: .4; }
.comment.collapsed > .col > .thread-collapse::after {
    content: ""; position: absolute; inset: 0; margin: auto;
    width: 2px; height: 7px; background: var(--ink-soft); border-radius: 2px;
}

/* Anchor-based nav controls are server-rendered links — strip the default underline. */
.sort, .foot-btn, .nav-link, .ctag, .tile, .empty-state a { text-decoration: none; }

/* Tap-target floor on mobile (DESIGN §10: ≥40px). Desktop stays denser. */
@media (max-width: 980px) {
    .sort, .foot-btn { min-height: 40px; }
    .view-toggle button, .view-toggle a { height: 40px; }
}

/* ---- Auth + composer cards ---- */
.auth-card, .compose-card {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow); padding: 28px; max-width: 460px; margin: 24px auto;
}
.compose-card { max-width: 600px; }
.auth-card h1, .compose-card h1 { font-family: var(--display); font-size: 1.4rem; margin-bottom: 18px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-soft); margin-bottom: 6px; }
.field .mt { margin-top: 10px; }
.field-hint { display: block; font-size: 12px; color: var(--ink-soft); margin-top: 6px; }
.field-error, .auth-error { color: var(--accent); font-size: 13px; }
.auth-error { margin-bottom: 12px; }
.auth-error ul { margin: 0; padding-left: 18px; }
.auth-error:empty { display: none; }
.auth-submit { width: 100%; justify-content: center; margin-top: 6px; }
.auth-alt { font-size: 13.5px; color: var(--ink-soft); margin-top: 16px; text-align: center; }
.auth-alt a { color: var(--accent); text-decoration: none; }

.visually-hidden {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.type-tab { cursor: pointer; }
.type-tab:has(.type-radio:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.oc-check { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-soft); margin: 4px 0 12px; cursor: pointer; }
.oc-fields input { width: 100%; }
.oc-fields input.mt { margin-top: 10px; }
.compose-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

/* ---- Composer media uploader ---- */
.dropzone.dragging { border-color: var(--accent); background: var(--accent-soft); }
.dropzone:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.upload-status { font-size: 12.5px; color: var(--ink-soft); margin: 8px 0; min-height: 1em; }
.media-previews { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-direction: column; gap: 8px; }
.media-preview {
    display: flex; align-items: center; gap: 12px; padding: 8px;
    border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2);
}
.media-preview img { width: 56px; height: 56px; object-fit: cover; border-radius: 7px; flex: none; background: var(--surface); }
.mp-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.mp-badge {
    align-self: flex-start; font-size: 10px; font-weight: 700; letter-spacing: .04em;
    padding: 1px 6px; border-radius: 5px; background: var(--accent-soft); color: var(--accent);
}
.mp-body input { width: 100%; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); padding: 7px 10px; font-size: 13px; color: var(--ink); }
.mp-body input:focus { outline: none; border-color: var(--accent); }
.mp-repost { font-size: 12px; font-weight: 600; color: var(--down); text-decoration: none; }
.mp-repost:hover { text-decoration: underline; }
.mp-actions { display: flex; gap: 4px; flex: none; }
.mp-btn {
    width: 30px; height: 30px; border-radius: 7px; border: 1px solid var(--line);
    background: var(--surface); color: var(--ink-soft); cursor: pointer; font-size: 14px;
}
.mp-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.mp-btn:disabled { opacity: .4; cursor: default; }
.url-fallback { margin-top: 12px; }
.url-fallback summary { font-size: 13px; color: var(--ink-soft); cursor: pointer; }
.url-fallback input { width: 100%; margin-top: 8px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); padding: 11px 13px; font-size: 14px; color: var(--ink); }

/* ---- User menu (top-right) ---- */
.user-menu { position: relative; }
.user-menu > summary { list-style: none; cursor: pointer; }
.user-menu > summary::-webkit-details-marker { display: none; }
.user-pop {
    position: absolute; right: 0; top: 44px; z-index: 60; min-width: 160px;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
    box-shadow: var(--shadow); padding: 8px;
}
.user-handle { font-size: 12.5px; color: var(--ink-soft); padding: 6px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.menu-item {
    width: 100%; text-align: left; padding: 8px 10px; border-radius: var(--radius-sm);
    font-size: 14px; color: var(--ink); background: none; border: none; cursor: pointer;
}
.menu-item:hover { background: var(--surface-2); }
.nav-login { font-weight: 600; font-size: 14px; color: var(--accent); text-decoration: none; padding: 0 6px; }

/* ---- Comment voting + reply ---- */
.c-actions { align-items: center; }
.c-score { font-size: 12.5px; font-weight: 700; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.c-vbtn[data-vote="1"].on { color: var(--up); }
.c-vbtn[data-vote="-1"].on { color: var(--down); }

.comment-composer { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0 22px; }
.comment-composer textarea {
    flex: 1; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2);
    padding: 10px 12px; font-family: inherit; font-size: 14px; color: var(--ink); resize: vertical; min-height: 44px;
}
.comment-composer textarea:focus { outline: none; border-color: var(--accent); background: var(--surface); }
.comment-composer button { flex: none; }

.reply-form { margin: 8px 0 4px; }
.reply-form[hidden] { display: none; }
.reply-form textarea {
    width: 100%; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2);
    padding: 9px 11px; font-family: inherit; font-size: 14px; color: var(--ink); resize: vertical; min-height: 40px;
}
.reply-form textarea:focus { outline: none; border-color: var(--accent); background: var(--surface); }
.reply-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 8px; }

/* ---- Moderation pages (log + queue) ---- */
.mod-page { display: flex; flex-direction: column; gap: 14px; }
.mod-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.mod-head h1 { font-family: var(--display); font-size: 1.4rem; }
.mod-sub { font-size: 13.5px; color: var(--ink-soft); margin-top: 4px; max-width: 60ch; }
.panel-link { display: inline-block; margin-top: 12px; font-size: 13px; font-weight: 600; color: var(--accent); text-decoration: none; }

.mod-log { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.mod-log-entry {
    display: flex; gap: 12px; padding: 12px 14px; background: var(--surface);
    border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow);
}
.mle-action {
    flex: none; align-self: flex-start; font-size: 11px; font-weight: 700; letter-spacing: .03em;
    text-transform: uppercase; padding: 3px 9px; border-radius: 6px; background: var(--surface-2); color: var(--ink-soft);
}
.mle-remove, .mle-banfromcommunity { color: var(--down); background: color-mix(in srgb, var(--down) 12%, transparent); }
.mle-restore, .mle-unban, .mle-approve { color: var(--accent); background: var(--accent-soft); }
.mle-body { flex: 1; min-width: 0; }
.mle-meta { font-size: 12.5px; color: var(--ink-soft); }
.mle-reason { font-size: 14px; color: var(--ink); margin: 3px 0; }
.mle-target { font-size: 12.5px; color: var(--accent); text-decoration: none; }

.queue-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.qi-reason { font-size: 13px; color: var(--ink-soft); margin: 6px 0 10px; }
.qi-reason-input {
    flex: 1; min-width: 160px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2);
    padding: 7px 10px; font-size: 13px; color: var(--ink); font-family: inherit;
}
.qi-reason-input:focus { outline: none; border-color: var(--accent); background: var(--surface); }
.qi-removed { font-size: 11px; font-weight: 700; color: var(--down); text-transform: uppercase; letter-spacing: .03em; }

/* ---- Admin console ---- */
.admin-ok { color: var(--accent); font-size: 13.5px; font-weight: 600; }
.admin-section { margin-top: 8px; }
.admin-section h2 { font-family: var(--display); font-size: 1.05rem; margin-bottom: 10px; }
.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 720px) { .admin-grid { grid-template-columns: 1fr; } }
.admin-section form .field input {
    width: 100%; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2);
    padding: 10px 12px; font-size: 14px; color: var(--ink); font-family: inherit;
}
.admin-section form .field input:focus { outline: none; border-color: var(--accent); background: var(--surface); }
.metric-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.metric-card {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
    box-shadow: var(--shadow); padding: 14px; display: flex; flex-direction: column; gap: 2px;
}
.metric-n { font-family: var(--display); font-size: 1.6rem; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.metric-l { font-size: 12px; color: var(--ink-soft); }

/* ---- Follows (Phase 6) ---- */
.panel-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.panel-top h3 { margin-bottom: 0; }
.follow-btn {
    flex: none; cursor: pointer; font-family: inherit; font-size: 12.5px; font-weight: 600;
    line-height: 1; padding: 7px 14px; border-radius: var(--radius-pill); text-decoration: none;
    color: var(--on-accent); background: var(--accent); border: 1px solid var(--accent);
    transition: background .14s, color .14s, border-color .14s;
}
.follow-btn:hover { background: color-mix(in srgb, var(--accent) 85%, #000); }
.follow-btn.is-following {
    color: var(--ink-soft); background: var(--surface-2); border-color: var(--line);
}
.follow-btn.is-following:hover { color: var(--down); border-color: var(--down); background: var(--surface); }
.follow-btn.is-following:hover .follow-label { visibility: hidden; }
.follow-btn.is-following:hover::after {
    content: "Unfollow"; position: absolute; color: var(--down);
}
.follow-btn.is-following { position: relative; }
.follow-btn[disabled] { opacity: .6; cursor: default; }

/* ---- Tag page (Phase 6) ---- */
.tag-head { margin-bottom: var(--sp-4); }
.tag-title { font-family: var(--display); font-size: 1.7rem; font-weight: 700; color: var(--ink); margin-bottom: 2px; }
a.tag { text-decoration: none; }

/* ==========================================================================
   Phase 7 — Comfort (couch, not studio)
   ========================================================================== */

/* ---- Feed lenses (OC only / Shuffle / muted-tags manager) ---- */
.lenses { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 var(--sp-4); align-items: center; }
.lens {
    display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
    font-family: inherit; font-size: 12.5px; font-weight: 600; color: var(--ink-soft);
    background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-pill);
    padding: 6px 13px; text-decoration: none; transition: color .14s, border-color .14s, background .14s;
}
.lens:hover { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.lens.active { color: var(--on-accent); background: var(--accent); border-color: var(--accent); }
.lens.shuffle-again { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); background: var(--accent-soft); }

/* ---- Muted-tag manager panel ---- */
.mute-panel {
    flex-basis: 100%; background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius); box-shadow: var(--shadow); padding: var(--sp-4); margin-top: 4px;
}
.mute-panel h4 { font-family: var(--display); font-size: var(--fs-ui); margin-bottom: 2px; }
.mute-help { font-size: 12px; color: var(--ink-soft); margin-bottom: 10px; }
.mute-list { display: flex; flex-wrap: wrap; gap: 7px; }
.mute-chip {
    cursor: pointer; font-family: inherit; font-size: 12px; font-weight: 600; color: var(--ink-soft);
    background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-pill); padding: 4px 10px;
}
.mute-chip:hover { color: var(--down); border-color: var(--down); }

/* ---- Seen-already dimming (subtle; restored on hover/focus) ---- */
.card.seen { opacity: .58; transition: opacity .2s; }
.card.seen:hover, .card.seen:focus-within { opacity: 1; }
.tile.seen { opacity: .55; transition: opacity .2s; }
.tile.seen:hover, .tile.seen:focus-within { opacity: 1; }

/* ---- Command palette (⌘K) ---- */
.cmdk {
    position: fixed; inset: 0; z-index: 200; display: grid; justify-items: center; align-items: start;
    padding-top: 14vh; background: color-mix(in srgb, #000 38%, transparent); backdrop-filter: blur(2px);
}
.cmdk-box {
    width: min(560px, 92vw); background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius); box-shadow: 0 24px 60px rgba(0,0,0,.32); overflow: hidden;
}
.cmdk-input {
    width: 100%; border: none; border-bottom: 1px solid var(--line); background: var(--surface);
    padding: 16px 18px; font-size: 15px; font-family: inherit; color: var(--ink); outline: none;
}
.cmdk-list { list-style: none; margin: 0; padding: 6px; max-height: 46vh; overflow-y: auto; }
.cmdk-item {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 10px 12px; border-radius: var(--radius-sm); cursor: pointer; color: var(--ink);
}
.cmdk-item.active { background: var(--accent-soft); color: var(--accent); }
.cmdk-label { font-size: 14px; font-weight: 500; }
.cmdk-hint { font-size: 11px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .04em; }
.cmdk-item.active .cmdk-hint { color: var(--accent); }
.cmdk-foot { padding: 8px 14px; border-top: 1px solid var(--line); font-size: 11px; color: var(--ink-soft); display: flex; gap: 6px; align-items: center; }
.cmdk-foot kbd {
    font: inherit; font-size: 10px; background: var(--surface-2); border: 1px solid var(--line);
    border-radius: 4px; padding: 1px 5px;
}

@media (prefers-reduced-motion: reduce) {
    .card.seen, .tile.seen { transition: none; }
}

/* ---- "Our promise" page (no dark patterns, SPEC §6.3) ---- */
.promise { max-width: 760px; }
.promise-h { font-family: var(--display); font-size: 2rem; font-weight: 800; color: var(--ink); margin-bottom: 10px; }
.promise-lede { font-size: 1.02rem; color: var(--ink-soft); line-height: 1.6; margin-bottom: var(--sp-6); }
.promise-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: var(--sp-6); }
@media (max-width: 640px) { .promise-grid { grid-template-columns: 1fr; } }
.promise-card {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow); padding: var(--sp-4);
}
.promise-card h2 { font-family: var(--display); font-size: 1rem; margin-bottom: 6px; color: var(--ink); }
.promise-card p { font-size: 13.5px; color: var(--ink-soft); line-height: 1.55; }
.promise-session {
    background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line));
    border-radius: var(--radius); padding: var(--sp-5); margin-bottom: var(--sp-5);
}
.promise-session h2 { font-family: var(--display); font-size: 1.05rem; margin-bottom: 6px; }
.promise-session p { font-size: 13.5px; color: var(--ink-soft); }
.session-row { display: flex; align-items: center; gap: 10px; margin: 12px 0 6px; }
.session-row label { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.session-row select {
    font-family: inherit; font-size: 13.5px; padding: 7px 10px; border-radius: var(--radius-sm);
    border: 1px solid var(--line); background: var(--surface); color: var(--ink);
}
.session-note { font-size: 12px !important; }
.promise-foot { font-size: 13.5px; color: var(--ink-soft); margin-top: var(--sp-4); }
.promise-foot kbd, .session-note kbd {
    font: inherit; font-size: 11px; background: var(--surface-2); border: 1px solid var(--line);
    border-radius: 4px; padding: 1px 6px;
}
.nav-promise { color: var(--ink-soft); }

/* ==========================================================================
   User profiles (/u/{handle}) + search
   ========================================================================== */

/* ---- Profile header ---- */
.profile-head {
    display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow); padding: var(--sp-5); margin-bottom: var(--sp-5);
}
.profile-avatar {
    width: 64px; height: 64px; border-radius: 50%; flex: none; display: grid; place-items: center;
    color: #fff; font-family: var(--display); font-size: 1.7rem; font-weight: 700;
    box-shadow: inset 0 0 0 2px rgba(255,255,255,.18);
}
.profile-id { min-width: 0; }
.profile-handle { font-family: var(--display); font-size: 1.5rem; font-weight: 700; color: var(--ink); margin: 0 0 4px; }
.profile-meta { display: flex; flex-wrap: wrap; gap: 7px; font-size: 13px; color: var(--ink-soft); }
.profile-banned { color: var(--down); font-weight: 600; }
.profile-actions { margin-left: auto; }
.profile-you { font-size: 13px; color: var(--ink-soft); font-weight: 600; }

.uhandle { color: inherit; text-decoration: none; }
.uhandle:hover { color: var(--accent); }

/* ---- Search ---- */
.search-head { margin-bottom: var(--sp-5); }
.search-title { font-family: var(--display); font-size: 1.6rem; font-weight: 700; color: var(--ink); margin-bottom: 12px; }
.search-page-form { display: flex; gap: 8px; align-items: center; }
.search-page-form svg { color: var(--ink-soft); flex: none; }
.search-page-form input {
    flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: var(--radius-sm);
    background: var(--surface-2); padding: 10px 12px; font-size: 14px; font-family: inherit; color: var(--ink);
}
.search-page-form input:focus { outline: none; border-color: var(--accent); background: var(--surface); }
.search-section { margin-bottom: var(--sp-6); }
.search-section-h {
    font-family: var(--display); font-size: 13px; font-weight: 600; text-transform: uppercase;
    letter-spacing: .04em; color: var(--ink-soft); margin-bottom: 10px;
}
.search-communities { display: flex; flex-direction: column; gap: 6px; }
.search-comm {
    display: flex; align-items: center; gap: 11px; text-decoration: none; padding: 10px 12px;
    border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface);
    transition: border-color .14s;
}
.search-comm:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.search-comm-id { display: flex; flex-direction: column; min-width: 0; }
.search-comm-id b { font-size: 14px; color: var(--ink); }
.search-comm-id span { font-size: 12.5px; color: var(--ink-soft); }

/* ---- Comment image attach ---- */
.composer-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.composer-row .btn-primary { margin-left: auto; }
.c-attach { display: inline-flex; align-items: center; gap: 8px; }
.c-attach-btn {
    display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-family: inherit;
    font-size: 12.5px; font-weight: 600; color: var(--ink-soft); background: var(--surface-2);
    border: 1px solid var(--line); border-radius: var(--radius-pill); padding: 6px 12px;
}
.c-attach-btn:hover { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.c-attach-btn.is-busy { opacity: .6; cursor: default; }
.c-attach-preview { position: relative; display: inline-flex; }
.c-attach-preview img {
    width: 44px; height: 44px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--line);
}
.c-attach-remove {
    position: absolute; top: -7px; right: -7px; width: 19px; height: 19px; border-radius: 50%;
    background: var(--down); color: #fff; border: 2px solid var(--surface); cursor: pointer;
    font-size: 10px; line-height: 1; display: grid; place-items: center;
}
.c-img { max-width: 280px; max-height: 280px; border-radius: var(--radius-sm); margin-top: 8px; display: block; }

/* ==========================================================================
   Deck / multi-column (/deck)
   ========================================================================== */
.deck-head { margin-bottom: var(--sp-3); }
.deck-h1 { font-family: var(--display); font-size: 1.6rem; font-weight: 700; color: var(--ink); margin-bottom: 2px; }

.deck-picker { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: var(--sp-4); }
.deck-chip {
    display: inline-flex; align-items: center; gap: 6px; text-decoration: none; font-size: 12.5px;
    font-weight: 600; color: var(--ink-soft); background: var(--surface-2); border: 1px solid var(--line);
    border-radius: var(--radius-pill); padding: 5px 11px; transition: border-color .14s, color .14s;
}
.deck-chip:hover { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.deck-chip.on { color: var(--ink); background: var(--surface); border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.deck-chip .cdot { width: 9px; height: 9px; border-radius: 50%; }
.deck-chip-x { color: var(--ink-soft); font-size: 11px; }

/* The wall scrolls horizontally; each column scrolls vertically on its own. */
.deck-wall {
    display: flex; gap: 14px; overflow-x: auto; padding-bottom: 8px;
    scroll-snap-type: x proximity;
}
.deck-col {
    flex: 0 0 300px; max-width: 300px; scroll-snap-align: start;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow); display: flex; flex-direction: column; overflow: hidden;
}
.deck-col-head {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    padding: 10px 12px; border-bottom: 1px solid var(--line); position: sticky; top: 0;
    background: var(--surface); z-index: 1;
}
.deck-col-head a { text-decoration: none; color: var(--ink); font-weight: 600; font-size: 13.5px; display: inline-flex; align-items: center; gap: 7px; }
.deck-col-head a:hover { color: var(--accent); }
.deck-col-head .cdot { width: 10px; height: 10px; border-radius: 50%; }
.deck-col-x { color: var(--ink-soft) !important; font-weight: 400 !important; font-size: 13px; }
.deck-col-x:hover { color: var(--down) !important; }
.deck-col-body { overflow-y: auto; max-height: calc(100vh - 240px); padding: 8px; display: flex; flex-direction: column; gap: 8px; }
.deck-empty { color: var(--ink-soft); font-size: 13px; padding: 10px; }

.deck-card {
    display: block; background: var(--surface-2); border: 1px solid var(--line);
    border-radius: var(--radius-sm); padding: 10px; text-decoration: none;
}
.deck-thumb { display: block; margin: -10px -10px 8px; }
.deck-thumb img { width: 100%; height: 120px; object-fit: cover; border-radius: var(--radius-sm) var(--radius-sm) 0 0; display: block; }
.deck-title { display: block; color: var(--ink); font-weight: 600; font-size: 13.5px; line-height: 1.35; text-decoration: none; }
a.deck-title:hover { color: var(--accent); }
.deck-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 7px; font-size: 11.5px; color: var(--ink-soft); }
.deck-meta a { color: var(--ink-soft); text-decoration: none; }
.deck-meta a:hover { color: var(--accent); }
.deck-removed { opacity: .7; }
.deck-removed-tag { font-size: 10.5px; font-weight: 700; color: var(--down); text-transform: uppercase; letter-spacing: .03em; display: block; margin-bottom: 4px; }

/* ==========================================================================
   Notifications (bell + inbox)
   ========================================================================== */
.notif-bell { position: relative; }
.notif-badge {
    position: absolute; top: -3px; right: -3px; min-width: 16px; height: 16px; padding: 0 4px;
    border-radius: 999px; background: var(--accent); color: #fff; font-size: 10px; font-weight: 700;
    line-height: 16px; text-align: center; border: 2px solid var(--surface); box-sizing: content-box;
}

.notif-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: var(--sp-4); }
.notif-h1 { font-family: var(--display); font-size: 1.6rem; font-weight: 700; color: var(--ink); }

.notif-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.notif {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.notif.unread { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); background: var(--accent-soft); }
.notif-link {
    display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; text-decoration: none; color: inherit;
}
.notif-icon {
    flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
    background: var(--surface-2); color: var(--ink-soft);
}
.notif-icon.n-mod { color: var(--down); }
.notif-icon.n-appeal { color: var(--accent); }
.notif-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.notif-title { font-size: 14px; font-weight: 600; color: var(--ink); }
.notif-text { font-size: 13px; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notif-time { font-size: 11.5px; color: var(--ink-soft); }
.notif-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-top: 6px; }

/* ==========================================================================
   Account settings (/settings)
   ========================================================================== */
.settings { max-width: 560px; }
.settings-h1 { font-family: var(--display); font-size: 1.6rem; font-weight: 700; color: var(--ink); margin-bottom: var(--sp-4); }
.settings-banner { border-radius: var(--radius-sm); padding: 10px 14px; font-size: 13.5px; font-weight: 600; margin-bottom: var(--sp-4); }
.settings-banner.ok { background: color-mix(in srgb, var(--up, #3A9B6E) 16%, var(--surface)); color: var(--up, #3A9B6E); border: 1px solid color-mix(in srgb, var(--up, #3A9B6E) 35%, var(--line)); }
.settings-banner.err { background: var(--accent-soft); color: var(--down); border: 1px solid color-mix(in srgb, var(--down) 35%, var(--line)); }

.settings-card {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow); padding: var(--sp-5); margin-bottom: var(--sp-4);
}
.settings-card h2 { font-family: var(--display); font-size: 1.05rem; margin-bottom: 12px; color: var(--ink); }
.settings-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; }
.settings-row + .settings-row { border-top: 1px solid var(--line); }
.settings-label { font-size: 14px; color: var(--ink); }
.settings-val { font-size: 14px; color: var(--ink-soft); }
.settings-muted { font-size: 12.5px; color: var(--ink-soft); }
.settings-link { background: none; border: none; cursor: pointer; font: inherit; color: var(--accent); text-decoration: none; padding: 0; }
.settings-link:hover { text-decoration: underline; }

.settings-form { display: flex; flex-direction: column; gap: 12px; }
.settings-form .field { display: flex; flex-direction: column; gap: 5px; }
.settings-form .field span { font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.settings-form .field input, .settings-row select {
    border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2);
    padding: 9px 11px; font-size: 14px; font-family: inherit; color: var(--ink);
}
.settings-form .field input:focus, .settings-row select:focus { outline: none; border-color: var(--accent); background: var(--surface); }
.settings-card .btn-primary { align-self: flex-start; margin-top: 4px; }

/* Avatar swatches */
.swatches { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.swatch { cursor: pointer; }
.swatch input { position: absolute; opacity: 0; pointer-events: none; }
.swatch-dot {
    display: block; width: 34px; height: 34px; border-radius: 50%; background: var(--sw);
    box-shadow: inset 0 0 0 2px rgba(255,255,255,.18); outline: 2px solid transparent; outline-offset: 2px;
    transition: outline-color .12s;
}
.swatch input:checked + .swatch-dot { outline-color: var(--ink); }
.swatch input:focus-visible + .swatch-dot { outline-color: var(--accent); }

/* Toggle switch */
.switch { position: relative; display: inline-block; width: 42px; height: 24px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span {
    position: absolute; inset: 0; cursor: pointer; background: var(--line); border-radius: 999px; transition: background .15s;
}
.switch span::before {
    content: ""; position: absolute; height: 18px; width: 18px; left: 3px; top: 3px; background: #fff;
    border-radius: 50%; transition: transform .15s;
}
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::before { transform: translateX(18px); }
.switch input:focus-visible + span { box-shadow: 0 0 0 3px var(--accent-soft); }

/* ==========================================================================
   Latest Updates / changelog (/updates)
   ========================================================================== */
.updates { max-width: 760px; }
.updates-head { margin-bottom: var(--sp-3); }
.updates .eyebrow {
    font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
    color: var(--accent); margin-bottom: 4px;
}
.updates-h1 { font-family: var(--display); font-size: 1.7rem; font-weight: 700; color: var(--ink); margin-bottom: 2px; }

.changelog { margin-top: var(--sp-3); }
.cl-entry { display: flex; gap: 24px; padding: 20px 0; border-top: 1px solid var(--line); }
.cl-entry:first-child { border-top: 0; padding-top: 6px; }
.cl-date { flex: 0 0 116px; color: var(--ink-soft); font-size: 13px; padding-top: 3px; font-variant-numeric: tabular-nums; }
.cl-body { min-width: 0; }
.cl-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cl-head h2 { margin: 0; font-family: var(--display); font-size: 1.05rem; font-weight: 600; color: var(--ink); }
.cl-tag {
    font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
    color: var(--on-accent); background: var(--accent); border-radius: var(--radius-pill); padding: 2px 9px;
}
.cl-body ul { margin: 9px 0 0; padding-left: 18px; }
.cl-body li { margin: 5px 0; font-size: 13.5px; line-height: 1.5; color: var(--ink-soft); }
@media (max-width: 700px) {
    .cl-entry { flex-direction: column; gap: 4px; }
    .cl-date { flex-basis: auto; }
}
