/* ======================================================================
   File: wwwroot/css/site.css

   Main stylesheet for the whole site.
   Order: colour tokens (light and dark) -> base -> header -> buttons -> dropdowns -> forms -> cards -> hero ->
   feed -> post detail -> profile -> admin -> modal/toast/confetti -> footer -> responsive -> reduced motion ->
   high-contrast. Themes switch with the data-theme attribute on <html>. No inline styles are used anywhere
   (the Content-Security-Policy forbids them).
   ====================================================================== */
/* =========================================================
   VicPicQuest styles: self-hosted, no inline styles needed (strict CSP).
   Light/dark themes via [data-theme]; AA contrast targeted.
   ========================================================= */
:root {
    /* Professional "social network" palette: clean cool greys with a confident blue and a teal accent. */
    --bg: #f3f6fb;
    --surface: #ffffff;
    --surface-2: #e8eef9;
    --text: #0f172a;
    --muted: #475569;
    --border: #d8e0ee;
    --link: #1d4ed8;
    --primary: #1d4ed8;
    --primary-2: #0e7490;
    --accent: #f59e0b;
    --danger: #b91c1c;
    --ok: #047857;
    --focus: #b45309;
    --shadow: 0 6px 24px rgba(15, 23, 42, .08);
    --radius: 16px;
    --grad: linear-gradient(135deg, #1d4ed8 0%, #0e7490 100%);
    --hero-grad: radial-gradient(1100px 520px at 10% -10%, #dbe8ff 0%, transparent 60%),
                 radial-gradient(900px 500px at 100% 0%, #d4f3f7 0%, transparent 55%);
}
[data-theme="dark"] {
    --bg: #0b1220;
    --surface: #131c2e;
    --surface-2: #1b2740;
    --text: #e8eefc;
    --muted: #a9b6d3;
    --border: #2b3a5c;
    --link: #8fb4ff;
    --primary: #5b8def;
    --primary-2: #22d3ee;
    --danger: #fca5a5;
    --ok: #6ee7b7;
    --focus: #fbbf24;
    --shadow: 0 6px 24px rgba(0, 0, 0, .45);
    --hero-grad: radial-gradient(1100px 520px at 10% -10%, #16284f 0%, transparent 60%),
                 radial-gradient(900px 500px at 100% 0%, #0c3c4a 0%, transparent 55%);
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 100%; -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Color Emoji", sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
main { flex: 1 0 auto; }
main:focus { outline: none; }
img, video { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.8rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
a { color: var(--link); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
[hidden] { display: none !important; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }

.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
    position: absolute; left: 8px; top: -60px; z-index: 1000;
    background: var(--text); color: var(--bg); padding: .7rem 1rem; border-radius: 8px; font-weight: 700;
}
.skip-link:focus { top: 8px; }

.wrap { width: min(1180px, 100% - 2rem); margin-inline: auto; }
.narrow { width: min(640px, 100% - 2rem); margin-inline: auto; padding-block: 2rem; }
.prose { max-width: 760px; padding-block: 2rem 3rem; }
.prose h2 { margin-top: 1.8em; font-size: 1.4rem; }
.prose li { margin-bottom: .4em; }
.section { padding-block: 2rem; }
.center { text-align: center; }
.left { text-align: left; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.big-emoji { font-size: 3.5rem; margin: 0; line-height: 1.1; }
.lead { font-size: 1.15rem; color: var(--muted); }
.pre { white-space: pre-wrap; }
.plain-list { list-style: none; padding: 0; margin: 0; }
.notice { background: var(--surface-2); border-left: 4px solid var(--accent); padding: .8rem 1rem; border-radius: 8px; }

/* ---------- Header ---------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}
.header-row { display: flex; align-items: center; gap: 1rem; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: .5rem; text-decoration: none; color: var(--text); font-weight: 800; font-size: 1.3rem; }
.brand-mark { font-size: 1.6rem; }
.brand-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.main-nav { display: flex; gap: .25rem; margin-left: 1rem; }
.main-nav a { color: var(--text); text-decoration: none; padding: .55rem .9rem; border-radius: 999px; font-weight: 600; min-height: 44px; display: inline-flex; align-items: center; }
.main-nav a:hover { background: var(--surface-2); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: .5rem; }
.nav-toggle { display: none; }

.icon-btn {
    width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border);
    background: var(--surface); color: var(--text); font-size: 1.2rem; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
}
.icon-btn:hover { background: var(--surface-2); }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
    min-height: 44px; padding: .6rem 1.2rem; border-radius: 999px; border: 2px solid transparent;
    font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; line-height: 1.2;
}
.btn-primary { background: var(--grad); color: #fff; }
.btn-primary:hover { filter: brightness(1.08); box-shadow: 0 6px 18px rgba(29, 78, 216, .3); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-light { background: #fff; color: #1e3a8a; }
.btn-danger { background: var(--danger); color: #fff; }
[data-theme="dark"] .btn-danger { background: #7f1d1d; color: #fff; border-color: #fca5a5; }
.btn-lg { min-height: 52px; padding: .8rem 1.6rem; font-size: 1.1rem; }
.btn-sm { min-height: 40px; padding: .4rem .9rem; font-size: .92rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: not-allowed; }
.link-btn { background: none; border: 0; padding: .25rem 0; font: inherit; color: var(--link); text-decoration: underline; cursor: pointer; min-height: 32px; }
.link-btn.danger { color: var(--danger); }
[data-theme="dark"] .link-btn.danger { color: var(--danger); }

/* ---------- Dropdowns ---------- */
.dropdown { position: relative; }
.dropdown-panel {
    position: absolute; right: 0; top: calc(100% + 10px); min-width: 230px;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow); padding: .5rem; z-index: 60;
}
.auth-panel { width: min(400px, calc(100vw - 1.5rem)); padding: 1rem; max-height: calc(100vh - 100px); overflow-y: auto; }
.menu-link {
    display: block; width: 100%; text-align: left; padding: .65rem .8rem; border-radius: 10px;
    color: var(--text); text-decoration: none; font: inherit; font-weight: 600; min-height: 44px;
}
.menu-link:hover { background: var(--surface-2); }
.menu-button { background: none; border: 0; cursor: pointer; }
.tabs { display: flex; gap: .4rem; background: var(--surface-2); padding: .3rem; border-radius: 999px; margin-bottom: 1rem; }
.tab {
    flex: 1; border: 0; background: transparent; color: var(--text); font: inherit; font-weight: 700;
    padding: .55rem; border-radius: 999px; cursor: pointer; min-height: 44px;
}
.tab[aria-selected="true"] { background: var(--surface); box-shadow: 0 1px 6px rgba(0, 0, 0, .15); color: var(--link); }

/* ---------- Forms ---------- */
.stack { display: flex; flex-direction: column; gap: .9rem; }
.field { display: flex; flex-direction: column; gap: .3rem; border: 0; padding: 0; margin: 0; min-width: 0; }
.field > label, .field > legend, legend { font-weight: 700; padding: 0; }
input:not([type=checkbox]):not([type=radio]), select, textarea {
    width: 100%; font: inherit; color: var(--text); background: var(--surface);
    border: 2px solid var(--border); border-radius: 12px; padding: .65rem .8rem; min-height: 44px;
}
input[type=file] { padding: .55rem; }
textarea { resize: vertical; }
input:not([type=checkbox]):not([type=radio]):focus, select:focus, textarea:focus { border-color: var(--focus); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 35%, transparent); }
.check { display: flex; gap: .6rem; align-items: flex-start; }
.check input { width: 22px; height: 22px; margin-top: .15rem; flex: none; accent-color: var(--primary); }
.form-card { padding: 1.5rem; margin-block: 1.25rem; }
.form-errors:empty { display: none; }
.form-errors { background: color-mix(in srgb, var(--danger) 12%, var(--surface)); border: 2px solid var(--danger); color: var(--text); border-radius: 12px; padding: .7rem 1rem; }
.form-errors ul { margin: 0; padding-left: 1.2rem; }
.validation-summary-valid { display: none; }
.flash {
    background: var(--surface-2); border: 2px solid var(--primary); border-radius: 12px;
    padding: .8rem 1rem; margin: 1rem 0 0; font-weight: 600;
}
.search-row { display: flex; gap: .6rem; margin-block: 1rem; max-width: 520px; }
.preview { border-radius: 12px; overflow: hidden; border: 1px solid var(--border); max-width: 420px; }
.preview img, .preview video { width: 100%; max-height: 320px; object-fit: contain; background: #000; }
.danger-zone { border: 2px solid var(--danger); }

/* rating + avatar radio pickers */
.rating-row, .avatar-pick { display: flex; flex-wrap: wrap; gap: .5rem; }
.rate input, .avatar-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rate label, .avatar-opt label {
    display: inline-flex; align-items: center; justify-content: center; gap: .3rem;
    min-width: 52px; min-height: 48px; padding: 0 .9rem; border-radius: 12px; cursor: pointer;
    border: 2px solid var(--border); background: var(--surface); font-weight: 700;
}
.avatar-opt label { font-size: 1.6rem; min-width: 56px; }
.rate input:checked + label, .avatar-opt input:checked + label { border-color: var(--primary); background: var(--surface-2); box-shadow: 0 0 0 2px var(--primary); }
.rate input:focus-visible + label, .avatar-opt input:focus-visible + label { outline: 3px solid var(--focus); outline-offset: 2px; }

/* ---------- Cards & grid ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.25rem; }
.post-card { overflow: hidden; display: flex; flex-direction: column; }
.media-link { position: relative; display: block; }
.media-frame { aspect-ratio: 4 / 3; background: var(--surface-2); overflow: hidden; position: relative; }
.media-frame img, .media-frame video { width: 100%; height: 100%; object-fit: cover; }
.badge { position: absolute; top: .6rem; padding: .25rem .65rem; border-radius: 999px; font-size: .8rem; font-weight: 800; color: #fff; background: rgba(10, 18, 36, .82); }
.badge-video { left: .6rem; }
.badge-quest { right: .6rem; background: #92400e; }
.card-body { padding: .9rem 1rem 1rem; }
.card-title { margin-bottom: .2rem; font-size: 1.05rem; }
.card-title a { color: var(--text); text-decoration: none; }
.card-title a:hover { text-decoration: underline; }
.byline { color: var(--muted); font-size: .92rem; margin-bottom: .6rem; }
.byline a { color: var(--muted); }

.reactions { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .6rem; }
.react-btn {
    display: inline-flex; align-items: center; gap: .3rem; min-height: 40px; padding: .2rem .65rem;
    border-radius: 999px; border: 2px solid var(--border); background: var(--surface); color: var(--text);
    font: inherit; font-weight: 700; cursor: pointer;
}
.react-btn:hover { background: var(--surface-2); }
.react-btn.is-active { border-color: var(--primary); background: var(--surface-2); }
.react-btn.pop { animation: pop .35s ease; }
@keyframes pop { 0% { transform: scale(1); } 50% { transform: scale(1.3); } 100% { transform: scale(1); } }

/* ---------- Hero / splash ---------- */
.hero { position: relative; overflow: hidden; background: var(--hero-grad); padding-block: clamp(3rem, 9vw, 6.5rem); }
.hero-inner { position: relative; z-index: 1; }
.hero-split { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(1.5rem, 5vw, 4rem); align-items: center; }
.hero-copy { max-width: 640px; }
.hero h1 { font-size: clamp(2.4rem, 7vw, 4.4rem); letter-spacing: -.02em; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
[data-theme="dark"] .grad-text { background: linear-gradient(135deg, #93c5fd, #67e8f9); -webkit-background-clip: text; background-clip: text; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-weight: 800; font-size: .85rem; color: var(--link); margin-bottom: .5rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .8rem; margin-block: 1.6rem; }
.stat-row { list-style: none; display: flex; flex-wrap: wrap; gap: 2rem; padding: 0; margin: 2rem 0 0; }
.stat-row li { display: flex; flex-direction: column; }
.stat-row strong { font-size: 1.8rem; }
.stat-row span { color: var(--muted); }
/* Decorative "example post" cards on the Home hero (aria-hidden in the markup). */
.hero-preview { position: relative; display: grid; gap: 1rem; justify-items: end; }
.mock-card { width: min(380px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: .9rem; }
.mock-card.mock-b { width: min(320px, 88%); margin-right: 2.5rem; }
.mock-head { display: flex; align-items: center; gap: .65rem; margin-bottom: .7rem; }
.mock-head small { display: block; color: var(--muted); }
.mock-media { aspect-ratio: 16 / 10; border-radius: 12px; display: grid; place-items: center; font-size: 3.4rem; background: linear-gradient(135deg, #bfdbfe, #99f6e4); }
.mock-media.alt { background: linear-gradient(135deg, #fde68a, #fecaca); }
[data-theme="dark"] .mock-media { background: linear-gradient(135deg, #1e3a8a, #115e59); }
[data-theme="dark"] .mock-media.alt { background: linear-gradient(135deg, #78350f, #7f1d1d); }
.mock-reacts { display: flex; gap: .45rem; margin-top: .7rem; flex-wrap: wrap; }
.mock-reacts span { padding: .15rem .6rem; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); font-weight: 700; font-size: .9rem; }
.mock-tag { position: absolute; top: -.7rem; right: 0; padding: .1rem .6rem; border-radius: 999px; background: var(--text); color: var(--bg); font-size: .75rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
@media (max-width: 860px) { .hero-split { grid-template-columns: 1fr; } .hero-preview { justify-items: stretch; } .mock-card, .mock-card.mock-b { width: 100%; margin-right: 0; } }
.install-btn { margin-top: .5rem; }
.store-row { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: .8rem 0 0; }

.quest-card, .quest-banner {
    display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap;
    background: var(--surface); border: 2px solid var(--primary); border-radius: var(--radius); padding: 1.2rem 1.5rem; box-shadow: var(--shadow);
}
.quest-banner { padding: .8rem 1.1rem; margin-bottom: 1.2rem; gap: .8rem; }
.quest-banner > div { flex: 1 1 240px; }
.quest-card h2 { margin-bottom: .2rem; }
.quest-card p { margin: 0; }
.quest-card > div:nth-child(2) { flex: 1 1 260px; }
.quest-emoji { font-size: 3rem; line-height: 1; }
.quest-banner .quest-emoji { font-size: 2rem; }

.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.2rem; margin-top: 1.5rem; }
.feature { padding: 1.4rem; }
.feature p { margin: 0; color: var(--muted); }
.f-emoji { font-size: 2.2rem; display: block; margin-bottom: .4rem; }
.streak-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; max-width: 460px; }
.streak-list li { display: flex; align-items: center; gap: .6rem; padding: .6rem 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.streak-list .pill { margin-left: auto; }
.pill { display: inline-block; padding: .2rem .7rem; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); font-weight: 700; font-size: .9rem; }
.pill-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.big-pill { font-size: 1.2rem; padding: .5rem 1.2rem; }
.cta-band { background: var(--grad); color: #fff; border-radius: 24px; padding: clamp(2rem, 6vw, 3.5rem); text-align: center; }
.cta-band h2, .cta-band p { color: #fff; }

/* ---------- Feed ---------- */
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1.4rem; margin-bottom: 1.2rem; }
.filters h1 { margin: 0; }
.chip-row { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip { display: inline-flex; align-items: center; min-height: 40px; padding: .3rem .95rem; border-radius: 999px; border: 2px solid var(--border); background: var(--surface); color: var(--text); text-decoration: none; font-weight: 700; }
.chip:hover { background: var(--surface-2); }
.chip.is-active { border-color: var(--primary); background: var(--surface-2); color: var(--link); }
.empty { padding: 2.5rem 1rem; text-align: center; }
.pager { display: flex; justify-content: center; align-items: center; gap: 1rem; margin-top: 2rem; }

/* ---------- Detail ---------- */
.detail { padding-block: 1.5rem 3rem; }
.detail-main { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: 1.5rem; align-items: start; }
.detail-media { background: #060b16; border-radius: var(--radius); overflow: hidden; }
.detail-media img, .detail-media video { width: 100%; max-height: 78vh; object-fit: contain; margin-inline: auto; }
.detail-info { padding: .25rem; }
.caption { font-size: 1.05rem; white-space: pre-wrap; }
.row-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.report summary { list-style: none; cursor: pointer; }
.report summary::-webkit-details-marker { display: none; }
.report-form { margin-top: .6rem; padding: .8rem; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }

.comments { margin-top: 2.5rem; max-width: 820px; }
.emoji-picker { display: flex; flex-wrap: wrap; gap: .25rem; padding: .5rem; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.emoji-btn { width: 42px; height: 42px; font-size: 1.3rem; border: 0; border-radius: 10px; background: transparent; cursor: pointer; }
.emoji-btn:hover { background: var(--surface-2); }
.comment-list { list-style: none; padding: 0; margin: 1.2rem 0 0; display: grid; gap: .9rem; }
.comment { display: flex; gap: .8rem; padding: .9rem 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; }
.avatar { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-size: 1.5rem; background: var(--surface-2); border: 1px solid var(--border); }
.avatar-lg { width: 96px; height: 96px; font-size: 3.2rem; }
.comment-body { min-width: 0; flex: 1; }
.comment-head { margin: 0 0 .2rem; display: flex; flex-wrap: wrap; gap: .5rem; align-items: baseline; }
.comment-text { margin: 0 0 .3rem; overflow-wrap: anywhere; white-space: pre-wrap; font-size: 1.05rem; }

/* ---------- Profile ---------- */
.profile-head { display: flex; gap: 1.5rem; padding: 1.5rem; flex-wrap: wrap; align-items: center; }
.profile-meta { flex: 1 1 280px; }
.badge-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .8rem; }
.badge-tile { display: flex; flex-direction: column; gap: .15rem; padding: 1rem; border-radius: 14px; border: 2px solid var(--border); background: var(--surface); }
.badge-tile.earned { border-color: var(--primary); }
.badge-tile.locked { opacity: .65; }
.badge-tile.locked .badge-emoji { filter: grayscale(1); }
.badge-emoji { font-size: 2rem; }

/* ---------- Admin ---------- */
.stat-tiles { list-style: none; padding: 0; margin: 1.2rem 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1rem; }
.stat-tiles li { padding: 1rem 1.2rem; display: flex; flex-direction: column; gap: .15rem; }
.stat-num { font-size: 2.2rem; font-weight: 800; line-height: 1; }
.stat-tiles .alert { border-color: var(--danger); border-width: 2px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.table { width: 100%; border-collapse: collapse; min-width: 640px; }
.table caption { text-align: left; padding: .8rem 1rem; font-weight: 700; }
.table th, .table td { text-align: left; padding: .7rem 1rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table thead th { background: var(--surface-2); font-size: .9rem; }
.table tbody th { font-weight: 700; }
.table tr.urgent { background: color-mix(in srgb, var(--danger) 14%, var(--surface)); }
.admin-nav { margin-block: 1rem; }
.feedback-list { display: grid; gap: .8rem; }
.feedback-list .unread { border-left: 6px solid var(--primary); }
.link-cards { list-style: none; padding: 0; margin: 1.5rem 0; display: grid; gap: .8rem; }
.link-cards a { display: flex; flex-direction: column; padding: 1rem 1.2rem; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); text-decoration: none; color: var(--text); }
.link-cards a:hover { border-color: var(--primary); box-shadow: var(--shadow); }
.link-cards span { color: var(--muted); }
.countdown { font-size: 4rem; font-weight: 800; font-variant-numeric: tabular-nums; margin: 0; }

/* ---------- Modal, toast, confetti ---------- */
.modal-backdrop { position: fixed; inset: 0; z-index: 200; background: rgba(10, 6, 25, .72); display: grid; place-items: center; padding: 1rem; }
.modal { background: var(--surface); color: var(--text); border-radius: 22px; padding: 1.8rem; max-width: 460px; width: 100%; text-align: center; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); border: 2px solid var(--primary); }
.modal-actions { display: flex; gap: .6rem; justify-content: center; flex-wrap: wrap; margin-top: 1rem; }
.toasts { position: fixed; bottom: 1rem; left: 50%; transform: translateX(-50%); z-index: 150; display: grid; gap: .5rem; width: min(440px, calc(100vw - 2rem)); }
.toast { background: var(--text); color: var(--bg); padding: .8rem 1.1rem; border-radius: 14px; font-weight: 700; box-shadow: var(--shadow); text-align: center; }
.confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 300; }

/* ---------- Footer ---------- */
.site-footer { margin-top: 3rem; background: var(--surface); border-top: 1px solid var(--border); padding-top: 2rem; flex-shrink: 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
.footer-h { font-size: 1rem; margin-bottom: .6rem; }
.site-footer li { margin-bottom: .1rem; }
.site-footer li a { display: inline-block; padding: .3rem 0; min-height: 32px; }
.brand-line { font-weight: 800; font-size: 1.2rem; margin-bottom: .3rem; }
.footer-bottom { border-top: 1px solid var(--border); margin-top: 1.5rem; padding-block: 1rem; color: var(--muted); font-size: .9rem; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
    .detail-main { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .nav-toggle { display: inline-flex; order: 3; }
    .header-actions { margin-left: auto; }
    .main-nav {
        display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; margin: 0;
        background: var(--surface); border-bottom: 1px solid var(--border); padding: .5rem 1rem 1rem;
    }
    .main-nav.is-open { display: flex; }
    .hide-sm { display: none; }
}

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

/* ---------- Windows High Contrast / forced colors ---------- */
@media (forced-colors: active) {
    .btn-primary, .badge, .cta-band { border: 2px solid ButtonText; }
    .brand-text, .grad-text { color: CanvasText; background: none; }
}
