:root {
    color-scheme: light;
    --bitcoin-orange: #f7931a;
    --bitcoin-orange-hover: #df7f0b;
    --bitcoin-orange-soft: rgba(247, 147, 26, 0.13);
    --charcoal-950: #141414;
    --charcoal-900: #1b1b1b;
    --charcoal-800: #252525;
    --charcoal-700: #343434;
    --paper: #f3f1ed;
    --card: #ffffff;
    --card-soft: #f8f6f2;
    --input-bg: #ffffff;
    --ink: #252321;
    --heading: #171615;
    --muted: #706b64;
    --line: #ddd7ce;
    --line-strong: #bdb4a9;
    --nav-text: #bbb6ae;
    --danger: #b42318;
    --success: #067647;
    --warning: #a15c05;
    --info: #8a4c00;
    --topbar-bg: rgba(27, 27, 27, 0.96);
    --bottom-nav-bg: rgba(27, 27, 27, 0.97);
    --overlay: rgba(14, 14, 14, 0.68);
    --shadow: 0 12px 34px rgba(37, 31, 24, 0.09);
    --radius: 18px;
}

html[data-theme="dark"] {
    color-scheme: dark;
    --paper: #121212;
    --card: #1d1d1d;
    --card-soft: #242424;
    --input-bg: #282828;
    --ink: #ece9e4;
    --heading: #ffffff;
    --muted: #aaa49d;
    --line: #373737;
    --line-strong: #575757;
    --nav-text: #bdb8b0;
    --danger: #ff736a;
    --success: #5bd69c;
    --warning: #ffb04d;
    --info: #ffb04d;
    --topbar-bg: rgba(20, 20, 20, 0.97);
    --bottom-nav-bg: rgba(20, 20, 20, 0.98);
    --overlay: rgba(0, 0, 0, 0.76);
    --shadow: 0 14px 38px rgba(0, 0, 0, 0.28);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--paper); }
body {
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(circle at top right, rgba(247, 147, 26, 0.12), transparent 31rem),
        var(--paper);
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
    padding-bottom: calc(78px + env(safe-area-inset-bottom));
    transition: background-color .2s ease, color .2s ease;
}
button, input, select, textarea { font: inherit; }
a { color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: 0.65; }

.topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    background: var(--topbar-bg);
    color: white;
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(247, 147, 26, 0.22);
}
.topbar-inner {
    width: min(760px, 100%);
    min-height: 62px;
    margin: auto;
    padding: 0 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    color: white;
    font-weight: 850;
    letter-spacing: -0.03em;
    text-decoration: none;
    font-size: 1.12rem;
}
.brand-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand-mark, .hero-mark {
    display: grid;
    place-items: center;
    overflow: hidden;
    background: var(--charcoal-900);
    color: var(--charcoal-950);
    box-shadow: inset 0 0 0 1px rgba(247,147,26,.30), 0 5px 16px rgba(0,0,0,.22);
}
.brand-mark { flex: 0 0 34px; width: 34px; height: 34px; border-radius: 11px 11px 11px 3px; }
.brand-mark img, .hero-mark img { width: 100%; height: 100%; display: block; object-fit: cover; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.theme-toggle, .avatar-link {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    color: var(--bitcoin-orange);
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.1);
    text-decoration: none;
    transition: background .15s, transform .15s, border-color .15s;
}
.theme-toggle { padding: 0; font-size: 1.08rem; }
.avatar-link { font-size: 1.16rem; }
.theme-toggle:hover, .avatar-link:hover { background: rgba(247,147,26,.14); border-color: rgba(247,147,26,.4); }
.theme-toggle:active, .avatar-link:active { transform: scale(.96); }

.page-shell { width: min(760px, 100%); margin: 0 auto; padding: 18px 14px 32px; }
.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.flash, .form-error, .dev-code, .warning-box {
    border-radius: 13px;
    padding: 11px 13px;
    margin-bottom: 14px;
    font-size: .94rem;
}
.flash-success { background: rgba(6,118,71,.12); color: var(--success); border: 1px solid rgba(6,118,71,.3); }
.flash-info, .dev-code { background: var(--bitcoin-orange-soft); color: var(--info); border: 1px solid rgba(247,147,26,.38); }
.flash-error, .form-error { background: rgba(180,35,24,.12); color: var(--danger); border: 1px solid rgba(180,35,24,.32); }
.warning-box { background: rgba(247,147,26,.12); color: var(--warning); border: 1px solid rgba(247,147,26,.34); }

h1, h2, h3 { color: var(--heading); line-height: 1.15; letter-spacing: -0.035em; }
h1 { margin: 5px 0 10px; font-size: clamp(1.75rem, 7vw, 2.45rem); }
h2 { font-size: 1.22rem; margin: 0 0 10px; }
p { margin: 0 0 12px; }
.eyebrow { margin: 0; color: var(--bitcoin-orange-hover); font-size: .76rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
html[data-theme="dark"] .eyebrow { color: var(--bitcoin-orange); }
.muted, .small-print { color: var(--muted); }
.small-print { font-size: .82rem; margin-top: 16px; }

.auth-card, .compose-card, .prose-card { max-width: 600px; margin: 20px auto; padding: clamp(20px, 5vw, 34px); }
.auth-card { text-align: center; }
.auth-card .stack-form { text-align: left; }
.hero-mark { width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 21px 21px 21px 6px; font-size: 1.65rem; }
.text-link, .back-link, .load-more { color: var(--bitcoin-orange-hover); font-weight: 800; }
html[data-theme="dark"] .text-link,
html[data-theme="dark"] .back-link,
html[data-theme="dark"] .load-more { color: var(--bitcoin-orange); }

.stack-form { display: grid; gap: 9px; }
.stack-form label { font-weight: 750; font-size: .91rem; margin-top: 4px; }
input, select, textarea {
    width: 100%;
    border: 1px solid var(--line-strong);
    border-radius: 13px;
    background: var(--input-bg);
    color: var(--ink);
    padding: 12px 13px;
    outline: none;
    transition: border .15s, box-shadow .15s, background-color .2s;
}
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .8; }
textarea { resize: vertical; min-height: 110px; }
input:focus, select:focus, textarea:focus { border-color: var(--bitcoin-orange); box-shadow: 0 0 0 4px rgba(247,147,26,.16); }

.primary-button, .secondary-button, .danger-button, .compact-button, .inline-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 44px;
    padding: 10px 16px;
    border-radius: 13px;
    border: 0;
    font-weight: 820;
    text-decoration: none;
}
.primary-button, .compact-button {
    background: linear-gradient(135deg, #ffa538, var(--bitcoin-orange));
    color: var(--charcoal-950);
    box-shadow: 0 7px 18px rgba(247,147,26,.18);
}
.primary-button { margin-top: 8px; }
.primary-button:hover, .compact-button:hover { background: linear-gradient(135deg, #ffb452, #f18a0b); }
.secondary-button { color: var(--ink); background: var(--card); border: 1px solid var(--line-strong); }
.secondary-button:hover { border-color: var(--bitcoin-orange); }
.danger-button { background: #b42318; color: white; width: 100%; margin-top: 8px; }
.compact-button { min-height: 39px; padding: 8px 13px; }
.inline-button { width: auto; }
.text-button { border: 0; background: none; color: var(--bitcoin-orange-hover); font-weight: 800; }
html[data-theme="dark"] .text-button { color: var(--bitcoin-orange); }

.feed-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin: 5px 2px 16px; }
.location-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: white;
    background: linear-gradient(120deg, var(--charcoal-950), var(--charcoal-700));
    border: 1px solid rgba(247,147,26,.32);
    border-radius: 16px;
    padding: 14px;
    margin-bottom: 14px;
    box-shadow: var(--shadow);
}
.location-banner span { color: #d0cbc4; font-size: .85rem; }
.location-banner.compact { margin: 14px 0; }
.location-banner .secondary-button { flex: 0 0 auto; min-height: 38px; padding: 8px 11px; background: var(--bitcoin-orange); color: var(--charcoal-950); border-color: var(--bitcoin-orange); }
.filter-bar {
    display: grid;
    grid-template-columns: auto minmax(120px, 180px) 1fr;
    align-items: center;
    gap: 10px;
    padding: 9px 11px;
    margin-bottom: 13px;
    background: color-mix(in srgb, var(--card) 88%, transparent);
    border: 1px solid var(--line);
    border-radius: 14px;
}
@supports not (background: color-mix(in srgb, white 50%, transparent)) {
    .filter-bar { background: var(--card); }
}
.filter-bar label { font-size: .84rem; font-weight: 800; }
.filter-bar select { padding: 8px 10px; border-radius: 10px; }
.filter-result { text-align: right; color: var(--muted); font-size: .82rem; }
.feed-list { display: grid; gap: 12px; }

.post-card, .reply-card { display: flex; overflow: hidden; }
.card-main { flex: 1; min-width: 0; padding: 15px 14px 13px; }
.post-meta, .reply-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; color: var(--muted); font-size: .78rem; }
.category { padding: 3px 8px; border-radius: 999px; background: rgba(247,147,26,.13); color: var(--bitcoin-orange-hover); font-weight: 800; }
html[data-theme="dark"] .category { color: #ffab43; }
.category-question { background: rgba(6,118,71,.12); color: var(--success); }
.category-news { background: rgba(192,16,72,.12); color: #c01048; }
html[data-theme="dark"] .category-news { color: #ff76a6; }
.category-event { background: rgba(247,147,26,.14); color: var(--warning); }
.category-help { background: rgba(23,92,211,.12); color: #175cd3; }
html[data-theme="dark"] .category-help { color: #77aaff; }
.post-link { text-decoration: none; }
.post-body { margin: 11px 0 12px; color: var(--ink); font-size: 1rem; overflow-wrap: anywhere; }
.post-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.post-actions a, .post-actions button {
    padding: 0;
    border: 0;
    background: none;
    color: var(--muted);
    font-size: .79rem;
    font-weight: 720;
    text-decoration: none;
}
.post-actions a:hover, .post-actions button:hover { color: var(--bitcoin-orange); }
.vote-controls {
    width: 54px;
    flex: 0 0 54px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-left: 1px solid var(--line);
    background: var(--card-soft);
}
.vote-controls strong { font-size: .88rem; }
.vote-button { width: 100%; padding: 9px 0; border: 0; background: transparent; color: var(--muted); font-size: .82rem; }
.vote-button.selected:first-child { color: var(--bitcoin-orange); }
.vote-button.selected:last-child { color: #d92d20; }
html[data-theme="dark"] .vote-button.selected:last-child { color: #ff736a; }
.empty-state { text-align: center; padding: 36px 20px; }
.empty-icon { font-size: 2.5rem; }
.load-more { display: block; margin: 16px auto 0; text-align: center; }
.character-row { display: flex; gap: 12px; justify-content: space-between; color: var(--muted); font-size: .77rem; }
.character-row strong { white-space: nowrap; }

.back-link { display: inline-block; text-decoration: none; margin: 2px 0 14px; }
.thread-header > .thread-alias { display: inline-block; margin: 0 0 7px 12px; color: var(--bitcoin-orange-hover); font-weight: 850; }
html[data-theme="dark"] .thread-header > .thread-alias { color: var(--bitcoin-orange); }
.reply-list { display: grid; gap: 10px; margin-top: 20px; }
.reply-list h2 { margin: 2px 4px; }
.reply-card.original-poster { border-left: 4px solid var(--bitcoin-orange); }
.reply-card p { margin: 9px 0 12px; overflow-wrap: anywhere; }
.reply-meta strong { color: var(--heading); }
.op-badge { background: var(--bitcoin-orange); color: var(--charcoal-950); border-radius: 5px; padding: 1px 5px; font-weight: 800; }
.replying-to, .reply-target { color: var(--bitcoin-orange-hover); font-size: .79rem; margin-top: 7px; font-weight: 720; }
html[data-theme="dark"] .replying-to,
html[data-theme="dark"] .reply-target { color: var(--bitcoin-orange); }
.reply-target { padding: 8px 10px; background: var(--bitcoin-orange-soft); border-radius: 9px; cursor: pointer; }
.empty-replies { color: var(--muted); padding: 13px 4px; }
.reply-composer { margin-top: 16px; padding: 16px; }

.profile-hero { display: flex; align-items: center; gap: 15px; padding: 20px; margin-bottom: 13px; }
.profile-bird { display: grid; place-items: center; flex: 0 0 66px; width: 66px; height: 66px; color: var(--charcoal-950); background: var(--bitcoin-orange); border-radius: 24px 24px 24px 8px; font-size: 1.4rem; }
.profile-hero h1 { font-size: 1.55rem; margin: 3px 0 6px; }
.settings-card { padding: 18px; margin-bottom: 13px; }
.setting-row, .blocked-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.blocked-row { border-top: 1px solid var(--line); padding: 11px 0; }
.profile-links { display: grid; margin-top: 13px; overflow: hidden; }
.profile-links a { padding: 14px 17px; border-bottom: 1px solid var(--line); text-decoration: none; font-weight: 750; }
.profile-links a:hover { background: var(--card-soft); }
.profile-links a:last-child { border: 0; }
.logout-link { color: var(--danger); }

.prose-card h2 { margin-top: 25px; }
.prose-card p { color: var(--ink); }
.admin-section { display: grid; gap: 11px; margin: 20px 0; }
.admin-card { padding: 15px; }
.admin-card blockquote { margin: 10px 0; padding: 10px 12px; border-left: 3px solid var(--bitcoin-orange); background: var(--card-soft); }
.admin-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.admin-actions button { padding: 7px 9px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--input-bg); color: var(--ink); }
.empty-admin { padding: 18px; color: var(--muted); }


.site-footer {
    width: min(760px, 100%);
    margin: 0 auto;
    padding: 0 14px calc(30px + env(safe-area-inset-bottom));
    display: flex;
    justify-content: center;
    gap: 9px;
    color: var(--muted);
    font-size: .8rem;
    text-align: center;
}
.site-footer.with-nav { padding-bottom: calc(94px + env(safe-area-inset-bottom)); }
.site-footer a { color: var(--bitcoin-orange-hover); font-weight: 750; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
html[data-theme="dark"] .site-footer a { color: var(--bitcoin-orange); }

.bottom-nav {
    position: fixed;
    z-index: 40;
    left: 50%;
    bottom: 0;
    width: min(760px, 100%);
    transform: translateX(-50%);
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    background: var(--bottom-nav-bg);
    backdrop-filter: blur(15px);
    border-top: 1px solid rgba(247,147,26,.2);
    box-shadow: 0 -10px 30px rgba(0,0,0,.18);
}
.bottom-nav a, .bottom-nav button {
    min-height: 52px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    color: var(--nav-text);
    border: 0;
    background: none;
    text-decoration: none;
}
.bottom-nav span { font-size: 1.25rem; line-height: 1; }
.bottom-nav small { font-size: .67rem; font-weight: 760; }
.bottom-nav .active { color: var(--bitcoin-orange); }
.bottom-nav .working span { animation: pulse 1s infinite alternate; }

.toast {
    position: fixed;
    z-index: 100;
    left: 50%;
    bottom: calc(86px + env(safe-area-inset-bottom));
    width: min(420px, calc(100% - 28px));
    transform: translate(-50%, 20px);
    opacity: 0;
    pointer-events: none;
    padding: 12px 14px;
    color: white;
    background: var(--charcoal-950);
    border: 1px solid rgba(247,147,26,.24);
    border-radius: 12px;
    box-shadow: 0 15px 40px rgba(0,0,0,.25);
    transition: .2s ease;
    text-align: center;
    font-size: .9rem;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: #7a1710; border-color: rgba(255,255,255,.12); }

.modal[hidden] { display: none; }
.modal { position: fixed; inset: 0; z-index: 90; display: grid; place-items: end center; background: var(--overlay); padding: 14px; }
.modal-card { position: relative; width: min(500px, 100%); max-height: 86vh; overflow-y: auto; padding: 22px; background: var(--card); border: 1px solid var(--line); border-radius: 22px 22px 14px 14px; }
.modal-close { position: absolute; right: 13px; top: 10px; width: 36px; height: 36px; border: 0; color: var(--ink); background: var(--card-soft); border-radius: 50%; font-size: 1.4rem; }
.modal-open { overflow: hidden; }

.phone-entry { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: stretch; }
.phone-entry .dial-prefix { display: flex; align-items: center; padding: 0 13px; border: 1px solid var(--line-strong); border-right: 0; border-radius: 12px 0 0 12px; background: var(--card-soft); color: var(--ink); font-weight: 750; white-space: nowrap; }
.phone-entry input { border-radius: 0 12px 12px 0; min-width: 0; }
.field-help { margin: 0 0 5px; color: var(--muted); font-size: .82rem; line-height: 1.45; }

@keyframes pulse { from { transform: scale(.9); } to { transform: scale(1.15); } }


.mine-summary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0 0 18px; }
.mine-summary-card { padding: 15px 16px; display: flex; flex-direction: column; gap: 2px; }
.mine-summary-card strong { font-size: 1.5rem; color: var(--bitcoin-orange); }
.mine-summary-card span { color: var(--muted); font-size: .82rem; }
.mine-section { margin: 20px 0; }
.mine-section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 2px 9px; }
.mine-section-heading h2 { margin: 0; font-size: 1.05rem; }
.mine-reply-card { display: block; padding: 14px 16px; margin-bottom: 9px; color: var(--text); text-decoration: none; }
.mine-reply-card:hover { border-color: rgba(247,147,26,.45); }
.mine-reply-card p { margin: 7px 0; }
.mine-post-card { padding: 16px; margin-bottom: 10px; }
.mine-post-topline { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-bottom: 10px; font-size: .78rem; }
.mine-post-stats { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 12px; color: var(--muted); font-size: .82rem; }
.mine-post-stats a { color: var(--bitcoin-orange-hover); font-weight: 750; text-decoration: none; }
.content-status { display: inline-flex; align-items: center; padding: 3px 7px; border-radius: 999px; background: var(--card-soft); color: var(--muted); font-weight: 750; }
.status-active { color: #1b7f44; background: rgba(55,180,95,.12); }
.status-review { color: #9c6500; background: rgba(247,147,26,.14); }
.status-hidden, .status-expired { color: var(--muted); }
@media (min-width: 680px) {
    .page-shell { padding: 26px 20px 42px; }
    .modal { place-items: center; }
    .modal-card { border-radius: 22px; }
    .post-card:hover { border-color: rgba(247,147,26,.55); }
}

@media (max-width: 520px) {
    .feed-heading { align-items: center; }
    .feed-heading h1 { font-size: 1.7rem; }
    .location-banner { align-items: flex-start; flex-direction: column; }
    .filter-bar { grid-template-columns: auto 1fr; }
    .filter-result { grid-column: 1 / -1; text-align: left; }
    .profile-hero { align-items: flex-start; }
    .setting-row { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 390px) {
    .brand { font-size: 1rem; gap: 8px; }
    .brand-mark { width: 32px; height: 32px; flex-basis: 32px; }
    .topbar-inner { padding-inline: 10px; }
    .topbar-actions { gap: 5px; }
    .theme-toggle, .avatar-link { width: 35px; height: 35px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation-duration: .01ms !important; }
}

/* Account silhouette and rank information */
.account-icon {
    display: block;
    width: 20px;
    height: 20px;
    fill: currentColor;
}
.nav-account-icon {
    display: grid;
    place-items: center;
    min-height: 24px;
}
.nav-account-icon .account-icon {
    width: 22px;
    height: 22px;
}
.profile-account-icon {
    width: 34px;
    height: 34px;
}
.site-footer { flex-wrap: wrap; }
.prose-card ul,
.prose-card ol {
    padding-left: 1.35rem;
}
.prose-card li {
    margin: .48rem 0;
}
.prose-card a {
    color: var(--bitcoin-orange-hover);
    font-weight: 700;
}
html[data-theme="dark"] .prose-card a { color: var(--bitcoin-orange); }
.rank-ladder {
    list-style: none;
    padding: 0 !important;
    margin: 16px 0 22px;
    display: grid;
    gap: 9px;
}
.rank-ladder li {
    margin: 0;
    padding: 12px 14px;
    display: grid;
    gap: 2px;
    background: var(--card-soft);
    border: 1px solid var(--line);
    border-left: 4px solid var(--bitcoin-orange);
    border-radius: 11px;
}
.rank-ladder span {
    color: var(--muted);
    font-size: .9rem;
}

/* Private badges */
.badge-heading p { margin: 6px 0 0; color: var(--muted); }
.badge-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr));
    gap: 12px;
    margin: 16px 0 24px;
}
.badge-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    min-height: 154px;
    padding: 16px;
    overflow: hidden;
}
.badge-card.badge-locked { opacity: .72; }
.badge-icon {
    flex: 0 0 54px;
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--card-soft);
    border: 2px solid var(--line);
    font-size: 1.6rem;
    filter: grayscale(1);
}
.badge-unlocked .badge-icon {
    border-color: var(--bitcoin-orange);
    background: rgba(247, 147, 26, .13);
    filter: none;
    box-shadow: 0 0 0 5px rgba(247, 147, 26, .06);
}
.badge-details { flex: 1; min-width: 0; }
.badge-title-row { display: flex; gap: 10px; justify-content: space-between; align-items: flex-start; }
.badge-title-row h2 { margin: 0; font-size: 1.05rem; }
.badge-title-row span {
    flex: 0 0 auto;
    padding: 3px 7px;
    border-radius: 99px;
    background: var(--card-soft);
    color: var(--muted);
    font-size: .7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.badge-unlocked .badge-title-row span { background: rgba(247, 147, 26, .14); color: var(--bitcoin-orange-hover); }
html[data-theme="dark"] .badge-unlocked .badge-title-row span { color: var(--bitcoin-orange); }
.badge-details p { margin: 7px 0 12px; color: var(--muted); font-size: .9rem; }
.badge-details small { color: var(--muted); }
.badge-progress { height: 7px; overflow: hidden; margin: 10px 0 6px; background: var(--card-soft); border-radius: 99px; }
.badge-progress span { display: block; height: 100%; border-radius: inherit; background: var(--bitcoin-orange); }

/* Read-only Counterparty and Bitcoin Stamp embeds */
.post-body-rich { display: grid; gap: 10px; margin: 10px 0; }
.post-text-segment { display: block; white-space: normal; }
.post-text-link { display: block; color: inherit; text-decoration: none; }
.xcp-card {
    overflow: hidden;
    margin: 2px 0;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--card-soft);
}
.xcp-media {
    min-height: 170px;
    max-height: 480px;
    display: grid;
    place-items: center;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(247,147,26,.08), transparent 45%),
        var(--charcoal-950);
}
.xcp-media img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 480px;
    object-fit: contain;
}
.xcp-fallback {
    width: 100%;
    min-height: 250px;
    display: grid;
    place-items: center;
    padding: 20px;
}
.xcp-fallback-image {
    width: min(72%, 300px) !important;
    height: auto !important;
    max-height: 300px !important;
    object-fit: contain;
    border-radius: 14px;
    filter: none;
}
.reply-card[id] { scroll-margin-top: 82px; }
.xcp-caption {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-top: 1px solid var(--line);
}
.xcp-caption strong { overflow-wrap: anywhere; }
.xcp-caption span { flex: 0 0 auto; color: var(--muted); font-size: .76rem; text-align: right; }
.xcp-status-missing .xcp-media,
.xcp-status-failed .xcp-media,
.xcp-status-blocked .xcp-media { background: var(--card-soft); }

@media (max-width: 520px) {
    .badge-card { min-height: 0; }
    .xcp-caption { align-items: flex-start; flex-direction: column; gap: 3px; }
    .xcp-caption span { text-align: left; }
    .xcp-media { min-height: 150px; }
}
.badge-summary-link {
    display: inline-block;
    margin-top: 7px;
    color: var(--bitcoin-orange-hover);
    font-weight: 800;
    text-decoration: none;
}
.badge-summary-link:hover { text-decoration: underline; }
html[data-theme="dark"] .badge-summary-link { color: var(--bitcoin-orange); }

/* Network-wide administrator announcements */
.admin-announcement {
    border: 2px solid var(--bitcoin-orange);
    background:
        linear-gradient(135deg, rgba(247,147,26,.10), transparent 55%),
        var(--card);
}
.announcement-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    border-radius: 999px;
    background: var(--bitcoin-orange);
    color: #1b1b1b;
    font-weight: 900;
    letter-spacing: .01em;
}
.admin-announcement .post-actions a {
    font-weight: 800;
}
.announcement-admin .settings-card {
    margin-bottom: 14px;
}
.admin-announcement-editor {
    border-left: 4px solid var(--bitcoin-orange);
}
.compact-admin-form {
    margin: 12px 0;
}
.compact-admin-form textarea {
    min-height: 84px;
}

/* Administrator area */
.admin-shell-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin: 4px 0 14px;
}
.admin-shell-heading h1 { margin: 2px 0 0; }
.admin-public-link {
    color: var(--bitcoin-orange-hover);
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}
html[data-theme="dark"] .admin-public-link { color: var(--bitcoin-orange); }
.admin-nav {
    display: flex;
    gap: 7px;
    overflow-x: auto;
    padding: 3px 0 12px;
    margin-bottom: 10px;
    scrollbar-width: thin;
}
.admin-nav a {
    flex: 0 0 auto;
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--card);
    color: var(--text);
    text-decoration: none;
    font-weight: 800;
    font-size: .88rem;
}
.admin-nav a.active {
    border-color: var(--bitcoin-orange);
    background: var(--bitcoin-orange);
    color: #191919;
}
.admin-section { margin: 20px 0 28px; }
.admin-section > h2,
.admin-section-title-row h2 { margin: 0 0 11px; }
.admin-section-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.admin-section-title-row a { color: var(--bitcoin-orange-hover); font-weight: 800; }
html[data-theme="dark"] .admin-section-title-row a { color: var(--bitcoin-orange); }
.admin-metric-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
    gap: 10px;
}
.admin-metric-grid.compact { grid-template-columns: repeat(auto-fit, minmax(135px, 1fr)); }
.admin-metric {
    min-height: 114px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}
.admin-metric > span { color: var(--muted); font-size: .84rem; font-weight: 800; }
.admin-metric > strong { font-size: 1.75rem; line-height: 1.05; }
.admin-metric > small { color: var(--muted); }
.admin-two-column {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr);
    gap: 18px;
    align-items: start;
}
.admin-activity-card { padding: 14px; }
.admin-activity-row {
    display: grid;
    grid-template-columns: 82px minmax(70px, 1fr) minmax(145px, auto);
    align-items: center;
    gap: 10px;
    padding: 7px 0;
    border-bottom: 1px solid var(--line);
}
.admin-activity-row:last-child { border-bottom: 0; }
.admin-activity-row time,
.admin-activity-row small { color: var(--muted); font-size: .78rem; }
.admin-bar-track {
    height: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: var(--card-soft);
}
.admin-bar-track span {
    display: block;
    height: 100%;
    min-width: 2px;
    border-radius: inherit;
    background: var(--bitcoin-orange);
}
.admin-table-card { overflow-x: auto; }
.admin-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 520px;
}
.admin-table-wide { min-width: 850px; }
.admin-table th,
.admin-table td {
    padding: 11px 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}
.admin-table th {
    color: var(--muted);
    font-size: .76rem;
    letter-spacing: .03em;
    text-transform: uppercase;
}
.admin-table tbody tr:last-child td { border-bottom: 0; }
.admin-table a { color: var(--bitcoin-orange-hover); font-weight: 800; text-decoration: none; }
html[data-theme="dark"] .admin-table a { color: var(--bitcoin-orange); }
.admin-table code {
    padding: 2px 6px;
    border-radius: 6px;
    background: var(--card-soft);
    color: var(--text);
}
.admin-list { display: grid; gap: 9px; }
.admin-list-row {
    display: block;
    padding: 12px 14px;
    color: var(--text);
    text-decoration: none;
}
.admin-list-row small { display: block; margin-top: 5px; color: var(--muted); }
a.admin-list-row:hover { border-color: var(--bitcoin-orange); }
.admin-filter-form {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(150px, 220px) auto;
    gap: 12px;
    align-items: end;
    padding: 14px;
}
.admin-filter-form label { display: grid; gap: 6px; font-weight: 800; }
.admin-filter-form input,
.admin-filter-form select { width: 100%; }
.admin-filter-form button { min-height: 42px; }
.admin-note {
    margin: 9px 2px 0;
    color: var(--muted);
    font-size: .82rem;
}
.admin-privacy-callout {
    padding: 15px 17px;
    margin-bottom: 12px;
    border-left: 4px solid var(--bitcoin-orange);
}
.admin-privacy-callout p { margin: 6px 0 0; color: var(--muted); }
.admin-status {
    display: inline-flex;
    align-items: center;
    padding: 3px 7px;
    border-radius: 999px;
    background: var(--card-soft);
    color: var(--muted);
    font-size: .74rem;
    font-weight: 900;
}
.admin-status-active { background: rgba(55, 160, 90, .14); color: #238245; }
.admin-status-shadow,
.admin-status-review { background: rgba(247, 147, 26, .15); color: var(--bitcoin-orange-hover); }
.admin-status-suspended,
.admin-status-deleted,
.admin-status-blocked { background: rgba(190, 55, 55, .14); color: #b43636; }
.admin-status-hidden,
.admin-status-expired,
.admin-status-disabled { opacity: .78; }
html[data-theme="dark"] .admin-status-active { color: #6ed692; }
html[data-theme="dark"] .admin-status-shadow,
html[data-theme="dark"] .admin-status-review { color: var(--bitcoin-orange); }
html[data-theme="dark"] .admin-status-suspended,
html[data-theme="dark"] .admin-status-deleted,
html[data-theme="dark"] .admin-status-blocked { color: #ff8b8b; }
.admin-card { padding: 15px; margin-bottom: 10px; }
.admin-card p { margin: 9px 0; }
.admin-card blockquote {
    margin: 9px 0;
    padding: 9px 12px;
    border-left: 3px solid var(--bitcoin-orange);
    background: var(--card-soft);
}
.admin-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.admin-actions form { margin: 0; }
.empty-admin { padding: 15px; color: var(--muted); }

@media (max-width: 760px) {
    .admin-two-column { grid-template-columns: 1fr; }
    .admin-activity-row { grid-template-columns: 72px 1fr; }
    .admin-activity-row small { grid-column: 1 / -1; }
    .admin-filter-form { grid-template-columns: 1fr; }
    .admin-shell-heading { align-items: flex-start; }
}
@media (max-width: 460px) {
    .admin-shell-heading { flex-direction: column; gap: 5px; }
    .admin-metric-grid,
    .admin-metric-grid.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .admin-metric { min-height: 100px; padding: 12px; }
    .admin-metric > strong { font-size: 1.45rem; }
}

.diagnostic-table { display: grid; gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; }
.diagnostic-table > div { display: flex; justify-content: space-between; gap: 15px; padding: 9px 11px; background: var(--card-soft); }
.diagnostic-post { padding: 10px 0; border-bottom: 1px solid var(--line); }
.diagnostic-post:last-child { border-bottom: 0; }
.diagnostic-post span { display: block; margin-top: 2px; color: var(--muted); font-size: .78rem; }
.diagnostic-post p { margin: 6px 0 0; }
.diagnostic-link { display: inline-block; margin-top: 10px; }

/* r5: centred bird mark, reply notifications and crisp Stamp artwork */
.brand-mark img {
    width: 88%;
    height: 88%;
    object-fit: contain;
    object-position: center;
}
.hero-mark img {
    object-fit: contain;
    object-position: center;
}
.xcp-source-stamp .xcp-media img,
.xcp-pixel-art .xcp-media img {
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}
.xcp-asset-link {
    color: var(--bitcoin-orange-hover);
    text-decoration: none;
    overflow-wrap: anywhere;
}
.xcp-asset-link:hover { text-decoration: underline; }
html[data-theme="dark"] .xcp-asset-link { color: var(--bitcoin-orange); }
.nav-icon-wrap {
    position: relative;
    display: grid;
    place-items: center;
    min-width: 28px;
    min-height: 24px;
}
.bottom-nav .nav-icon-wrap > span {
    font-size: 1.25rem;
    line-height: 1;
}
.nav-unread-badge {
    position: absolute;
    top: -7px;
    right: -14px;
    min-width: 24px;
    padding: 2px 5px;
    border: 2px solid var(--charcoal-900);
    border-radius: 999px;
    background: var(--bitcoin-orange);
    color: var(--charcoal-950);
    font-size: .62rem;
    line-height: 1.1;
    font-weight: 900;
    text-align: center;
}

/* r6 MVP polish: feed views, clearer OP marker, mobile art picker */
.feed-heading-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.reply-alert {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 7px 10px;
    border-radius: 999px;
    background: var(--bitcoin-orange-soft);
    color: var(--bitcoin-orange-hover);
    text-decoration: none;
    font-weight: 850;
    font-size: .82rem;
}
html[data-theme="dark"] .reply-alert { color: var(--bitcoin-orange); }

.feed-tabs {
    display: flex;
    gap: 7px;
    overflow-x: auto;
    scrollbar-width: none;
    margin: -3px 0 12px;
    padding: 2px 1px 5px;
    -webkit-overflow-scrolling: touch;
}
.feed-tabs::-webkit-scrollbar { display: none; }
.feed-tabs a {
    flex: 0 0 auto;
    padding: 8px 11px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--card);
    color: var(--muted);
    text-decoration: none;
    font-size: .82rem;
    font-weight: 800;
}
.feed-tabs a.active {
    border-color: var(--bitcoin-orange);
    background: var(--bitcoin-orange-soft);
    color: var(--bitcoin-orange-hover);
}
html[data-theme="dark"] .feed-tabs a.active { color: var(--bitcoin-orange); }

.category-bitcoin { background: rgba(247,147,26,.16); color: var(--bitcoin-orange-hover); }
.category-xcp { background: rgba(118,67,190,.13); color: #6941c6; }
html[data-theme="dark"] .category-bitcoin { color: var(--bitcoin-orange); }
html[data-theme="dark"] .category-xcp { color: #b692f6; }

.thread-alias .op-badge,
.reply-meta .op-badge { margin-right: 5px; vertical-align: .08em; }
.op-badge {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    padding: 2px 6px;
    border-radius: 999px;
    font-size: .66rem;
    line-height: 1;
    letter-spacing: .05em;
    text-transform: uppercase;
}
.announcement-op { background: var(--charcoal-900); color: var(--bitcoin-orange); border: 1px solid rgba(247,147,26,.35); }

.art-picker { margin: 2px 0 3px; }
.art-picker-toggle { width: 100%; }
.art-picker-panel {
    margin-top: 9px;
    padding: 11px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--card-soft);
}
.art-picker-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; align-items: center; }
.art-picker-row input { min-width: 0; width: 100%; }
.art-attachment-list { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 9px; }
.art-attachment-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    max-width: 100%;
    padding: 5px 6px 5px 9px;
    border: 1px solid rgba(247,147,26,.35);
    border-radius: 999px;
    background: var(--bitcoin-orange-soft);
    color: var(--heading);
    font-size: .8rem;
    font-weight: 800;
}
.art-attachment-chip > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.art-attachment-chip button {
    width: 24px;
    height: 24px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--muted);
    line-height: 1;
    font-size: 1rem;
}

/* Preserve nearest-neighbour pixels for Stamp/pixel-art sources. The server
   supplies an integer-multiple display width where the source is small. */
.xcp-source-stamp .xcp-media img,
.xcp-pixel-art .xcp-media img {
    width: min(var(--pixel-display-width, 256px), 100%);
    max-width: 100%;
    height: auto;
    image-rendering: pixelated !important;
    image-rendering: -moz-crisp-edges;
}

/* The source bird artwork is pre-centred; keep it centred within the SQWK bubble. */
.brand-mark img,
.hero-mark img {
    width: 94%;
    height: 94%;
    object-fit: contain;
    object-position: 50% 50%;
}

@media (max-width: 520px) {
    .feed-heading-actions { gap: 6px; }
    .reply-alert { min-height: 34px; padding: 6px 9px; }
    .art-picker-row { grid-template-columns: 1fr; }
    .art-picker-row .secondary-button { width: 100%; }
}

/* Lightning LNURL-pay tip flow */
.zap-card { max-width: 680px; margin-left: auto; margin-right: auto; }
.zap-presets { display: flex; flex-wrap: wrap; gap: .65rem; margin: 1rem 0 1.25rem; }
.zap-presets form { margin: 0; }
.zap-custom-form { margin-top: 1rem; }
.wallet-open-button { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; margin: .85rem 0; }
.invoice-details { margin-top: 1rem; }
.invoice-details code { display: block; margin-top: .6rem; overflow-wrap: anywhere; word-break: break-all; font-size: .78rem; }

/* r7 Canary beta gate */
.canary-gate-card { max-width: 560px; margin-inline: auto; }
.canary-new-card { border: 2px solid rgba(247,147,26,.65); background: linear-gradient(145deg, rgba(247,147,26,.12), var(--card)); }
.copy-row { display: flex; gap: 8px; align-items: stretch; margin: 6px 0 14px; }
.copy-row code { flex: 1; overflow-wrap: anywhere; padding: 11px 12px; border-radius: 10px; background: var(--surface-muted); border: 1px solid var(--line); }
.copy-row button { flex: 0 0 auto; }
.canary-admin-heading { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.canary-admin-heading > div { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.canary-activity-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 14px 0; }
.canary-activity-grid span { padding: 9px; border-radius: 10px; background: var(--surface-muted); border: 1px solid var(--line); font-size: .8rem; }
.canary-activity-grid b { display: block; font-size: 1.05rem; color: var(--bitcoin-orange-hover); }
html[data-theme="dark"] .canary-activity-grid b { color: var(--bitcoin-orange); }
@media (max-width: 720px) {
    .canary-activity-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .copy-row { flex-direction: column; }
    .copy-row button { width: 100%; }
}

/* r7.5 compact XCP/Stamp admin workflow */
.asset-metrics .admin-metric { min-height: 92px; padding: 12px; }
.asset-metrics .admin-metric > strong { font-size: 1.45rem; }
.resolver-health-section { gap: 7px; margin-top: 10px; }
.resolver-health-strip { display: flex; flex-wrap: wrap; gap: 7px; }
.health-chip {
    display: inline-flex; align-items: center; gap: 5px;
    border: 1px solid var(--line); border-radius: 999px;
    padding: 6px 9px; background: var(--card); font-size: .78rem; font-weight: 800;
}
.health-ok { color: #187545; border-color: rgba(24,117,69,.28); }
.health-bad { color: #b42318; border-color: rgba(180,35,24,.35); }
.health-warn { color: #9a6700; border-color: rgba(154,103,0,.35); }
html[data-theme="dark"] .health-ok { color: #75d8a7; }
html[data-theme="dark"] .health-bad { color: #ff8b82; }
html[data-theme="dark"] .health-warn { color: #ffd36a; }
.admin-subtabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 2px 0 10px; }
.admin-subtabs a {
    display: inline-flex; gap: 7px; align-items: center; text-decoration: none;
    border: 1px solid var(--line); background: var(--card); color: var(--text);
    border-radius: 999px; padding: 8px 12px; font-weight: 850; font-size: .86rem;
}
.admin-subtabs a span { color: var(--muted); }
.admin-subtabs a.active { background: var(--bitcoin-orange); border-color: var(--bitcoin-orange); color: #191919; }
.admin-subtabs a.active span { color: #191919; }
.asset-admin-list { display: grid; gap: 8px; }
.asset-admin-row { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 12px 13px; }
.asset-admin-issue { border-left: 3px solid var(--bitcoin-orange); }
.asset-admin-main { min-width: 0; flex: 1 1 auto; }
.asset-admin-title { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; }
.asset-admin-meta { color: var(--muted); font-size: .78rem; margin-top: 4px; }
.asset-admin-error { color: var(--muted); font-size: .79rem; margin-top: 5px; overflow-wrap: anywhere; }
.asset-admin-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.asset-admin-actions form { margin: 0; }
.asset-admin-actions button, .admin-mini-link { min-height: 32px; padding: 6px 9px; font-size: .78rem; }
.admin-mini-link { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 9px; color: var(--text); text-decoration: none; font-weight: 800; background: var(--card-soft); }
@media (max-width: 680px) {
    .asset-admin-row { align-items: flex-start; flex-direction: column; }
    .asset-admin-actions { justify-content: flex-start; width: 100%; }
}

.admin-metric-link { color: var(--text); text-decoration: none; transition: border-color .15s ease, transform .15s ease; }
.admin-metric-link:hover { border-color: var(--bitcoin-orange); transform: translateY(-1px); }

/* r7.6 beta stability / safety */
.about-hero { text-align:center; padding:34px 24px; margin-bottom:18px; }
.about-hero .hero-mark { margin:0 auto 12px; }
.about-lead { max-width:760px; margin:12px auto 20px; font-size:1.08rem; color:var(--muted); }
.about-actions { display:flex; justify-content:center; flex-wrap:wrap; gap:10px; }
.about-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; margin:16px 0; }
.about-grid article strong { display:block; font-size:1.04rem; margin-bottom:8px; }
.about-grid article p { margin:0; color:var(--muted); }
.about-callout { margin-bottom:24px; }
.checkbox-row { display:flex!important; align-items:center; gap:9px; font-weight:600; }
.checkbox-row input { width:auto; }
.inline-admin-form { display:inline-flex; margin:0; }
.inline-admin-form button, .admin-remove-link { border:0; background:none; padding:0; color:#c23838; cursor:pointer; font:inherit; }
.reported-content-preview, .report-thread-context { margin:10px 0; padding:12px; border-radius:10px; background:var(--card-soft); border:1px solid var(--line); }
.reported-content-preview small, .report-thread-context small { color:var(--muted); text-transform:uppercase; letter-spacing:.05em; font-size:.7rem; font-weight:800; }
.reported-content-preview p, .report-thread-context p { margin:5px 0 0; }
.manual-art-form { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px; width:100%; margin-top:10px; }
.manual-art-form input { min-width:0; }
.art-favorite-button { border:0; background:transparent; color:var(--bitcoin-orange); font-size:1.15rem; cursor:pointer; padding:2px 6px; }
.art-favorites { display:flex; gap:6px; flex-wrap:wrap; margin:8px 0; }
.art-favorites button { border:1px solid var(--line); background:var(--card); color:var(--heading); border-radius:999px; padding:5px 9px; cursor:pointer; font-size:.78rem; }
.reply-meta .edited-marker { color:var(--muted); font-size:.78rem; }
.device-row { display:flex; justify-content:space-between; gap:12px; align-items:center; padding:10px 0; border-top:1px solid var(--line); }
@media(max-width:640px){ .about-grid{grid-template-columns:1fr}.manual-art-form{grid-template-columns:1fr}.manual-art-form button{width:100%} }

/* r7.7 beta: public pages, art picker, paid events and donations */
.about-page { width: 100%; margin: 0; display: grid; gap: 14px; padding: 2px 0 22px; }
.donate-page { max-width: 700px; margin: 0 auto; display: grid; gap: 14px; padding: 2px 0 22px; }
.about-page .about-hero { margin: 0; padding: clamp(22px, 5vw, 34px); }
.about-page .about-grid { margin: 0; gap: 12px; }
.about-page .about-grid .card { padding: 18px; box-shadow: var(--shadow); }
.about-page .about-callout { margin: 0; padding: 20px; }
.about-page .about-actions .primary-button { margin-top: 0; }

.event-post-callout { display:flex; gap:12px; align-items:center; justify-content:space-between; padding:12px; border:1px solid rgba(247,147,26,.38); background:var(--bitcoin-orange-soft); border-radius:13px; margin:4px 0 8px; }
.event-post-callout div { min-width:0; }
.event-post-callout strong, .event-post-callout span { display:block; }
.event-post-callout span { color:var(--muted); font-size:.8rem; margin-top:2px; }
.event-post-callout .secondary-button { min-height:38px; padding:7px 10px; flex:0 0 auto; }
.event-price-intro { margin:8px 0 4px; font-size:1.02rem; }
.event-time-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.event-time-grid > div { display:grid; gap:6px; }
.event-details-card { display:grid; grid-template-columns:auto minmax(0,1fr); gap:12px; margin:11px 0 5px; padding:11px; border:1px solid rgba(247,147,26,.32); border-radius:14px; background:var(--bitcoin-orange-soft); }
.event-flyer { width:88px; height:88px; border-radius:11px; object-fit:cover; background:var(--card); border:1px solid var(--line); }
.event-details-copy { min-width:0; }
.event-details-copy h3 { margin:5px 0 6px; font-size:1.05rem; }
.event-paid-badge { display:inline-flex; border-radius:999px; padding:3px 7px; background:var(--charcoal-900); color:var(--bitcoin-orange); font-size:.67rem; font-weight:850; letter-spacing:.03em; text-transform:uppercase; }
.event-facts { display:flex; flex-wrap:wrap; gap:5px 10px; color:var(--muted); font-size:.78rem; margin-bottom:5px; }
.fixed-field { padding:12px 13px; border:1px solid var(--line); border-radius:13px; background:var(--card-soft); font-weight:800; }
.fixed-field span { color:var(--muted); font-weight:500; font-size:.8rem; margin-left:6px; }

.art-suggestions { position:relative; z-index:8; display:grid; gap:4px; max-height:290px; overflow:auto; margin:5px 0 8px; padding:5px; border:1px solid var(--line); border-radius:12px; background:var(--card); box-shadow:var(--shadow); }
.art-suggestions[hidden] { display:none; }
.art-suggestion-row { width:100%; display:grid; grid-template-columns:38px minmax(0,1fr); gap:9px; align-items:center; text-align:left; padding:7px; border:1px solid transparent; border-radius:9px; background:transparent; color:var(--ink); }
.art-suggestion-row:hover, .art-suggestion-row.active { background:var(--bitcoin-orange-soft); border-color:rgba(247,147,26,.3); }
.art-suggestion-row img, .art-suggestion-placeholder { width:38px; height:38px; border-radius:8px; object-fit:cover; display:grid; place-items:center; background:var(--card-soft); }
.art-suggestion-copy { min-width:0; display:grid; }
.art-suggestion-copy strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.art-suggestion-copy small { color:var(--muted); font-size:.72rem; }
.art-favorites-label { width:100%; color:var(--muted); font-size:.72rem; font-weight:850; text-transform:uppercase; letter-spacing:.05em; }
.art-favorite-form { display:inline-flex; margin:0; }
.art-favorite-button { line-height:1; min-width:28px; min-height:28px; }

/* Keep asset issue controls aligned even when resolver diagnostics are enormous. */
.asset-admin-row { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:start; gap:9px 12px; }
.asset-admin-actions { min-width:max-content; align-self:start; }
.asset-admin-error { margin-top:6px; max-width:100%; color:var(--muted); font-size:.78rem; }
.asset-admin-error summary { cursor:pointer; color:var(--warning); font-weight:800; list-style-position:inside; }
.asset-admin-error div { margin-top:6px; padding:8px 9px; max-height:130px; overflow:auto; border:1px solid var(--line); border-radius:9px; background:var(--card-soft); overflow-wrap:anywhere; }
.manual-art-form { grid-column:1 / -1; margin-top:0; }

.payment-card { text-align:left; }
.payment-amount { display:inline-flex; margin:5px 0 14px; padding:7px 11px; border-radius:999px; background:var(--bitcoin-orange-soft); color:var(--heading); font-weight:900; font-size:1.1rem; }
.invoice-copy-box { display:grid; gap:8px; margin:12px 0; }
.invoice-copy-box code { display:block; max-height:130px; overflow:auto; padding:10px; border-radius:10px; border:1px solid var(--line); background:var(--card-soft); overflow-wrap:anywhere; word-break:break-all; font-size:.72rem; }
.invoice-copy-box .secondary-button { width:100%; }
.payment-status-line { display:flex; align-items:center; gap:9px; margin-top:13px; padding:10px 11px; border-radius:11px; background:var(--card-soft); border:1px solid var(--line); }
.payment-spinner { width:14px; height:14px; border:2px solid var(--line-strong); border-top-color:var(--bitcoin-orange); border-radius:50%; animation:sqwk-spin .9s linear infinite; }
@keyframes sqwk-spin { to { transform:rotate(360deg); } }

.donate-hero { padding:clamp(22px,5vw,32px); text-align:center; }
.donate-hero h1 { margin-top:6px; }
.donation-total { display:flex; flex-direction:column; align-items:center; gap:2px; margin:15px auto 0; padding:12px 16px; width:max-content; max-width:100%; border-radius:14px; background:var(--bitcoin-orange-soft); }
.donation-total strong { color:var(--heading); font-size:1.25rem; }
.donation-total span { color:var(--muted); font-size:.78rem; }
.donate-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.donate-form-card, .supporter-board { padding:18px; }
.donation-presets { display:flex; flex-wrap:wrap; gap:6px; }
.donation-presets button { border:1px solid var(--line); border-radius:999px; background:var(--card-soft); color:var(--ink); padding:6px 10px; font-weight:800; }
.donation-presets button:hover { border-color:var(--bitcoin-orange); }
.supporter-board ol { list-style:none; margin:0; padding:0; display:grid; }
.supporter-board li { display:flex; justify-content:space-between; gap:12px; align-items:flex-start; padding:10px 0; border-top:1px solid var(--line); }
.supporter-board li:first-child { border-top:0; }
.supporter-board li div { min-width:0; }
.supporter-board li strong, .supporter-board li small { display:block; }
.supporter-board li small { color:var(--muted); margin-top:2px; overflow-wrap:anywhere; }
.supporter-board li b { white-space:nowrap; color:var(--bitcoin-orange-hover); }
html[data-theme="dark"] .supporter-board li b { color:var(--bitcoin-orange); }

@media (max-width:680px) {
    .asset-admin-row { grid-template-columns:1fr; }
    .asset-admin-actions { min-width:0; width:100%; justify-content:flex-start; }
    .manual-art-form { grid-column:1; }
    .donate-grid { grid-template-columns:1fr; }
}
@media (max-width:520px) {
    .about-page { gap:11px; }
    .about-page .about-grid { gap:10px; }
    .about-page .about-grid .card, .about-page .about-callout { padding:16px; }
    .event-post-callout { align-items:stretch; flex-direction:column; }
    .event-post-callout .secondary-button { width:100%; }
    .event-time-grid { grid-template-columns:1fr; }
    .event-details-card { grid-template-columns:1fr; }
    .event-flyer { width:100%; height:auto; max-height:280px; object-fit:contain; }
}


/* r7.7.4 BitPay-style Lightning checkout */
.payment-checkout { max-width: 620px; margin-inline: auto; }
.payment-intro { color: var(--muted); line-height: 1.55; }
.payment-qr-wrap { margin: 1rem 0 1.15rem; display: grid; gap: .55rem; justify-items: center; }
.payment-qr-card { position: relative; display: inline-flex; align-items: center; justify-content: center; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 12px; box-shadow: 0 6px 20px rgba(0,0,0,.08); }
.payment-qr-image { display: block; width: min(100%, 340px); height: auto; border-radius: 8px; background: #fff; }
.payment-qr-logo { position: absolute; z-index: 2; width: 38px; height: 38px; object-fit: contain; border-radius: 11px; background: #fff; padding: 5px; border: 4px solid #fff; box-shadow: 0 2px 7px rgba(0,0,0,.18); }
.payment-qr-help { text-align: center; margin: 0; }
.payment-action-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin: 12px 0; }
.payment-action-grid .primary-button, .payment-action-grid .secondary-button { width: 100%; min-height: 46px; margin: 0; justify-content: center; }
.payment-invoice-panel { margin-top: 12px; }
.payment-invoice-panel label { display: block; margin-bottom: 6px; font-size: .82rem; font-weight: 850; color: var(--muted); }
.payment-invoice-text { width: 100%; min-height: 92px; resize: vertical; padding: 10px 11px; border: 1px solid var(--line); border-radius: 11px; background: var(--card-soft); color: var(--ink); font: 700 .72rem/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; overflow-wrap: anywhere; word-break: break-all; }
.payment-invoice-text:focus { outline: 2px solid rgba(247,147,26,.24); border-color: var(--bitcoin-orange); }
@media (max-width: 520px) {
    .payment-checkout { padding-inline: 14px; }
    .payment-qr-card { width: 100%; max-width: 350px; padding: 10px; }
    .payment-qr-image { width: 100%; max-width: 330px; }
    .payment-qr-logo { width: 34px; height: 34px; padding: 4px; border-width: 3px; }
    .payment-action-grid { grid-template-columns: 1fr; }
    .payment-invoice-text { min-height: 104px; font-size: .68rem; }
}

/* r7.7.2 mobile polish: About + donations */
.about-page { max-width: 760px; margin-inline: auto; }
.about-page .about-hero { overflow: hidden; }
.about-page .about-hero .hero-mark { width: 72px; height: 72px; border-radius: 24px 24px 24px 8px; }
.about-page .about-lead { line-height: 1.62; }
.about-page .about-grid article { min-width: 0; }
.about-page .about-grid article strong { line-height: 1.3; }
.about-page .about-grid article p { line-height: 1.55; }
.about-page .about-callout p { line-height: 1.55; }

.donate-page { max-width: 760px; }
.donate-hero > p:not(.eyebrow) { max-width: 570px; margin-inline: auto; line-height: 1.55; }
.donate-grid { align-items: start; }
.donate-form-card, .supporter-board { min-width: 0; }
.donate-section-heading { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 15px; }
.donate-section-heading > div { min-width: 0; }
.donate-section-heading h2 { margin: 1px 0 3px; }
.donate-section-heading p { margin: 0; color: var(--muted); font-size: .8rem; line-height: 1.4; }
.donate-section-icon { display: grid; place-items: center; flex: 0 0 38px; width: 38px; height: 38px; border-radius: 12px; background: var(--bitcoin-orange-soft); font-size: 1.05rem; }

.donation-presets { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; margin: 2px 0 4px; }
.donation-presets button { width: 100%; min-width: 0; min-height: 58px; display: grid; place-items: center; align-content: center; gap: 1px; border: 1px solid var(--line-strong); border-radius: 13px; background: var(--card-soft); color: var(--ink); padding: 8px 6px; font-weight: 800; cursor: pointer; transition: border-color .15s ease, background .15s ease, transform .12s ease; }
.donation-presets button strong { display: block; font-size: .98rem; line-height: 1.05; }
.donation-presets button span { display: block; color: var(--muted); font-size: .68rem; font-weight: 750; }
.donation-presets button:hover { border-color: var(--bitcoin-orange); }
.donation-presets button:active { transform: scale(.98); }
.donation-presets button.selected { border-color: var(--bitcoin-orange); background: var(--bitcoin-orange-soft); box-shadow: inset 0 0 0 1px rgba(247,147,26,.16); }
.donation-presets button.selected strong { color: var(--heading); }
.donation-presets button.selected span { color: var(--bitcoin-orange-hover); }
html[data-theme="dark"] .donation-presets button.selected span { color: var(--bitcoin-orange); }
.donation-custom-amount { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 8px; border: 1px solid var(--line-strong); border-radius: 13px; background: var(--input-bg); padding: 0 12px; }
.donation-custom-amount:focus-within { border-color: var(--bitcoin-orange); box-shadow: 0 0 0 3px rgba(247,147,26,.10); }
.donation-custom-amount input { border: 0; border-radius: 0; background: transparent; box-shadow: none; padding-inline: 0; }
.donation-custom-amount input:focus { outline: 0; box-shadow: none; }
.donation-custom-amount > span { color: var(--bitcoin-orange); }
.donation-custom-amount small { color: var(--muted); font-weight: 750; }
.donation-leaderboard-optin { margin-top: 5px; padding: 11px 12px; border-radius: 12px; background: var(--card-soft); border: 1px solid var(--line); }
.donation-leaderboard-optin span { line-height: 1.35; }
.donation-submit { width: 100%; justify-content: center; }

.supporter-board { overflow: hidden; }
.supporter-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.supporter-board .supporter-list li { display: grid; grid-template-columns: 36px minmax(0,1fr) auto; gap: 10px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--card-soft); }
.supporter-board .supporter-list li:first-child { border-top: 1px solid rgba(247,147,26,.45); background: var(--bitcoin-orange-soft); }
.supporter-rank { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); color: var(--muted); font-weight: 900; font-size: .75rem; }
.supporter-board .supporter-list li:first-child .supporter-rank { border-color: rgba(247,147,26,.5); color: var(--bitcoin-orange-hover); }
html[data-theme="dark"] .supporter-board .supporter-list li:first-child .supporter-rank { color: var(--bitcoin-orange); }
.supporter-copy { min-width: 0; }
.supporter-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.supporter-copy small { line-height: 1.35; }
.supporter-sats { display: inline-flex; align-items: baseline; white-space: nowrap; padding: 6px 8px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-size: .82rem; }
.supporter-sats span { font-size: .65rem; color: var(--muted); margin-left: 2px; }
.supporter-empty { min-height: 145px; display: grid; place-items: center; align-content: center; gap: 8px; text-align: center; padding: 20px; border: 1px dashed var(--line-strong); border-radius: 13px; background: var(--card-soft); }
.supporter-empty > span { font-size: 2rem; }
.supporter-empty p { margin: 0; color: var(--muted); }

@media (max-width: 600px) {
    .about-page { gap: 10px; padding-top: 0; }
    .about-page .about-hero { padding: 20px 16px 18px; }
    .about-page .about-hero .hero-mark { width: 62px; height: 62px; margin-bottom: 10px; border-radius: 20px 20px 20px 7px; }
    .about-page .about-hero h1 { font-size: clamp(1.65rem, 9vw, 2rem); margin-top: 7px; }
    .about-page .about-hero .eyebrow { font-size: .68rem; line-height: 1.45; }
    .about-page .about-lead { font-size: .96rem; line-height: 1.55; margin: 10px auto 16px; }
    .about-page .about-actions { display: grid; grid-template-columns: 1fr; width: 100%; gap: 8px; }
    .about-page .about-actions a { width: 100%; min-height: 44px; justify-content: center; margin: 0; }
    .about-page .about-grid { grid-template-columns: 1fr; gap: 9px; }
    .about-page .about-grid .card, .about-page .about-callout { padding: 14px; border-radius: 14px; }
    .about-page .about-grid article strong { font-size: .98rem; margin-bottom: 5px; }
    .about-page .about-grid article p, .about-page .about-callout p { font-size: .9rem; line-height: 1.48; }
    .about-page .about-callout h2 { font-size: 1.08rem; }

    .donate-page { gap: 10px; padding-top: 0; }
    .donate-hero { padding: 20px 16px; }
    .donate-hero h1 { font-size: clamp(1.65rem, 9vw, 2rem); }
    .donate-hero > p:not(.eyebrow) { font-size: .92rem; line-height: 1.5; }
    .donation-total { width: 100%; padding: 10px 12px; }
    .donation-total strong { font-size: 1.12rem; }
    .donate-form-card, .supporter-board { padding: 14px; border-radius: 14px; }
    .donation-presets { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 7px; }
    .donation-presets button { min-height: 56px; }
    .donation-presets button:last-child:nth-child(odd) { grid-column: 1 / -1; }
    .donation-custom-amount { min-height: 46px; }
    .supporter-board .supporter-list li { grid-template-columns: 32px minmax(0,1fr); padding: 9px; gap: 8px; }
    .supporter-rank { width: 30px; height: 30px; border-radius: 9px; font-size: .7rem; }
    .supporter-sats { grid-column: 2; justify-self: start; margin-top: 2px; padding: 4px 7px; }
}

@media (max-width: 360px) {
    .about-page .about-hero, .donate-hero { padding-inline: 13px; }
    .about-page .about-grid .card, .about-page .about-callout, .donate-form-card, .supporter-board { padding: 12px; }
    .donation-presets button strong { font-size: .92rem; }
}

/* v8 staged engagement features */
.poll-compose { margin: 4px 0 8px; border: 1px solid var(--line); border-radius: 14px; background: var(--card-soft); overflow: hidden; }
.poll-toggle { padding: 12px 13px; margin: 0; cursor: pointer; }
.poll-toggle > span { min-width: 0; display: grid; gap: 2px; }
.poll-toggle strong { color: var(--heading); }
.poll-toggle small { color: var(--muted); font-weight: 500; line-height: 1.35; }
.poll-compose-fields { display: grid; gap: 7px; padding: 0 13px 13px; border-top: 1px solid var(--line); }
.poll-compose-fields[hidden] { display: none; }
.poll-compose-fields label:first-child { margin-top: 11px; }

.sqwk-poll { margin: 12px 0 4px; padding: 11px; border: 1px solid var(--line); border-radius: 14px; background: var(--card-soft); }
.poll-options { display: grid; gap: 7px; }
.poll-option { position: relative; isolation: isolate; overflow: hidden; width: 100%; min-height: 46px; padding: 9px 11px; text-align: left; border: 1px solid var(--line-strong); border-radius: 11px; background: var(--card); color: var(--ink); }
.poll-option:hover:not(:disabled) { border-color: var(--bitcoin-orange); }
.poll-option.selected { border-color: var(--bitcoin-orange); box-shadow: inset 0 0 0 1px rgba(247,147,26,.18); }
.poll-option-bar { position: absolute; inset: 0 auto 0 0; z-index: -1; width: 0; background: var(--bitcoin-orange-soft); transition: width .2s ease; }
.poll-option-copy { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.poll-option-copy strong { min-width: 0; overflow-wrap: anywhere; }
.poll-option-copy small { white-space: nowrap; color: var(--muted); font-size: .72rem; }
.poll-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 8px; color: var(--muted); font-size: .72rem; }
.save-post-button.selected { color: var(--bitcoin-orange-hover); font-weight: 800; }
html[data-theme="dark"] .save-post-button.selected { color: var(--bitcoin-orange); }

.event-rsvp { margin-top: 9px; padding-top: 9px; border-top: 1px solid rgba(247,147,26,.24); }
.event-rsvp-buttons { display: flex; flex-wrap: wrap; gap: 7px; }
.event-rsvp-buttons .secondary-button { min-height: 36px; padding: 6px 9px; }
.event-rsvp-buttons .secondary-button.selected { border-color: var(--bitcoin-orange); background: var(--bitcoin-orange-soft); color: var(--heading); }
.event-rsvp .field-help { display: block; margin-top: 5px; }
.profile-private-stat { margin-top: 5px; color: var(--muted); font-size: .8rem; }
.saved-feed-list { margin-top: 8px; }

.admin-feature-switches { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 8px; }
.admin-feature-switch { display: grid; gap: 3px; padding: 10px; border: 1px solid var(--line); border-radius: 11px; background: var(--card-soft); }
.admin-feature-switch strong { font-size: .8rem; }
.admin-feature-switch span { width: fit-content; border-radius: 999px; padding: 2px 7px; font-size: .67rem; font-weight: 850; }
.admin-feature-switch .is-on { background: rgba(6,118,71,.12); color: var(--success); }
.admin-feature-switch .is-off { background: rgba(112,107,100,.12); color: var(--muted); }

@media (max-width: 680px) {
    .admin-feature-switches { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 520px) {
    .poll-option-copy { align-items: flex-start; }
    .event-rsvp-buttons { display: grid; grid-template-columns: 1fr 1fr; }
    .event-rsvp-buttons .secondary-button { width: 100%; justify-content: center; }
}
