:root {
    color-scheme: dark;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #020617;
    color: #f8fafc;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(14, 165, 233, 0.2), transparent 34rem),
        #020617;
    color: #f8fafc;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.min-h-screen {
    min-height: 100vh;
}

.site-nav {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(2, 6, 23, 0.92);
}

.nav-inner,
.page-shell {
    width: min(100% - 2rem, 64rem);
    margin: 0 auto;
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
}

.brand {
    color: #fff;
    font-size: 1.125rem;
    font-weight: 800;
}

.site-links,
.admin-nav,
.admin-toolbar,
.admin-action-row,
.filter-row,
.section-heading,
.suggestion-meta,
.admin-card-heading {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.site-links a,
.admin-nav a,
.ghost-link {
    color: #cbd5e1;
    font-size: 0.92rem;
    font-weight: 750;
}

.site-links a:hover,
.site-links a:focus-visible,
.admin-nav a:hover,
.admin-nav a:focus-visible,
.ghost-link:hover,
.ghost-link:focus-visible {
    color: #67e8f9;
}

.page-shell {
    padding: 3rem 0;
}

.narrow-shell,
.auth-shell {
    width: min(100% - 2rem, 42rem);
}

.hero {
    width: min(100%, 48rem);
    margin: 0 auto;
    text-align: center;
}

.published-section {
    margin-top: 3.5rem;
}

.section-heading,
.admin-card-heading,
.admin-toolbar {
    justify-content: space-between;
}

.suggestion-grid,
.admin-card-list {
    display: grid;
    gap: 1rem;
    margin-top: 1.25rem;
}

.suggestion-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.suggestion-card p,
.submitted-copy {
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.safe-external-link {
    color: #67e8f9;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.count-copy {
    color: #94a3b8;
    font-size: 0.85rem;
}

.featured-card {
    border-color: rgba(103, 232, 249, 0.35);
    background: linear-gradient(145deg, rgba(14, 165, 233, 0.2), rgba(255, 255, 255, 0.07));
    transition: transform 160ms ease, border-color 160ms ease;
}

.featured-card:hover,
.featured-card:focus-visible {
    transform: translateY(-2px);
    border-color: #67e8f9;
}

.card-kicker,
.card-link {
    color: #67e8f9;
    font-size: 0.84rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.card-kicker {
    display: block;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
}

.compact-copy {
    font-size: 1rem;
}

.eyebrow {
    margin: 0 0 0.75rem;
    color: #67e8f9;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.2rem;
    text-transform: uppercase;
}

h1,
h2,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 1rem;
    color: #fff;
    font-size: clamp(2.4rem, 8vw, 4rem);
    line-height: 1;
}

h2 {
    margin-bottom: 0.25rem;
    color: #fff;
    font-size: 1.25rem;
    line-height: 1.2;
}

.muted,
.meta,
.subtle,
.status-text {
    color: #cbd5e1;
}

.muted {
    font-size: 1.125rem;
    line-height: 1.7;
}

.meta,
.subtle,
.status-text {
    display: block;
    font-size: 0.9rem;
}

.subtle {
    color: #94a3b8;
}

.panel,
.list-panel,
.selected-panel {
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.09);
    box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, 0.28);
}

.panel {
    border-radius: 1.5rem;
    padding: 1.5rem;
}

.search-panel {
    width: min(100%, 48rem);
    margin: 2.5rem auto 0;
}

.search-panel label,
.auth-form label,
.stacked-form label,
.adaptive-field > label,
.filter-row label {
    display: block;
    margin-bottom: 0.5rem;
    color: #e2e8f0;
    font-size: 0.9rem;
    font-weight: 700;
}

.text-input,
.auth-form input[type="password"],
.select-input {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 1rem;
    outline: none;
    background: #0f172a;
    color: #fff;
    padding: 1rem 1.1rem;
    font-size: 1.05rem;
}

.text-input:focus,
.auth-form input[type="password"]:focus,
.select-input:focus {
    border-color: #67e8f9;
    box-shadow: 0 0 0 0.25rem rgba(103, 232, 249, 0.22);
}

.select-input {
    appearance: auto;
}

.suggestions-shell {
    width: min(100% - 2rem, 54rem);
}

.suggestion-form {
    margin-top: 2rem;
}

.category-fieldset {
    margin: 0;
    border: 0;
    padding: 0;
}

.category-fieldset legend {
    margin-bottom: 0.9rem;
    color: #e2e8f0;
    font-weight: 800;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem;
}

.category-choice {
    position: relative;
    display: grid;
    gap: 0.25rem;
    min-height: 5.4rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 1rem;
    background: #0f172a;
    padding: 0.85rem;
    cursor: pointer;
}

.category-choice:has(input:checked) {
    border-color: #67e8f9;
    box-shadow: 0 0 0 0.2rem rgba(103, 232, 249, 0.14);
}

.game-fields {
    display: none;
}

.suggestion-form:has(input[name="category"][value="game"]:checked) .game-fields {
    display: block;
}

.suggestion-form:has(input[name="category"][value="game"]:checked) .non-game-fields {
    display: none;
}

.search-row {
    display: flex;
    align-items: stretch;
    gap: 0.65rem;
    margin-top: 0.5rem;
}

.search-row .ghost-button {
    flex: 0 0 auto;
}

.game-result-fieldset {
    margin: 1rem 0 0;
    border: 0;
    padding: 0;
}

.game-result-fieldset legend {
    color: #cbd5e1;
    font-size: 0.9rem;
    font-weight: 750;
}

.game-result-choice {
    cursor: pointer;
}

.game-result-choice > input {
    width: 1.1rem;
    height: 1.1rem;
    flex: 0 0 auto;
    accent-color: #67e8f9;
}

.game-result-choice:has(input:checked) {
    background: rgba(103, 232, 249, 0.13);
    box-shadow: inset 0 0 0 1px #67e8f9;
}

.game-result-fieldset:has(input:checked):not(.is-expanded) legend,
.game-result-fieldset:has(input:checked):not(.is-expanded) .game-result-choice:not(:has(input:checked)) {
    display: none;
}

.change-game-button {
    display: none;
    margin-top: 0.75rem;
}

.game-result-fieldset:has(input:checked):not(.is-expanded) .change-game-button {
    display: inline-flex;
}

.game-wording {
    display: none;
    margin-top: 1.25rem;
}

.game-fields:has(input[name="gameId"]:checked) .game-wording {
    display: block;
}

.category-choice input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.category-name {
    color: #fff;
    font-weight: 850;
}

.category-help,
.field-help,
.privacy-note {
    color: #94a3b8;
    font-size: 0.82rem;
    line-height: 1.45;
}

.adaptive-field {
    margin-top: 1.5rem;
}

.suggestion-textarea {
    display: block;
    min-height: 10rem;
    margin-top: 0.5rem;
    resize: vertical;
}

.field-help {
    display: block;
    margin-top: 0.5rem;
}

.privacy-note {
    margin-top: 1.25rem;
}

.turnstile-box {
    min-height: 65px;
    margin-top: 1rem;
}

.result-banner {
    width: min(100%, 48rem);
    margin-right: auto;
    margin-left: auto;
}

.alert,
.success-message {
    margin-top: 1rem;
    border-radius: 1rem;
    padding: 1rem;
}

.alert {
    border: 1px solid rgba(252, 211, 77, 0.35);
    background: rgba(252, 211, 77, 0.1);
    color: #fef3c7;
}

.success-message {
    border: 1px solid rgba(110, 231, 183, 0.35);
    background: rgba(110, 231, 183, 0.1);
    color: #d1fae5;
}

.status-text {
    margin-top: 1rem;
}

.result-list,
.list-panel {
    margin-top: 1rem;
    overflow: hidden;
    border-radius: 1rem;
}

.result-list {
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #0f172a;
}

.result-button,
.admin-row,
.selected-game,
.page-heading,
.tab-row,
.pill-row {
    display: flex;
    gap: 1rem;
}

.result-button,
.admin-row {
    width: 100%;
    align-items: center;
    border: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: transparent;
    color: inherit;
    padding: 1rem;
    text-align: left;
}

.result-button:hover {
    background: rgba(255, 255, 255, 0.08);
}

.game-thumb,
.selected-thumb {
    flex: 0 0 auto;
    border-radius: 0.8rem;
    object-fit: cover;
}

.game-thumb {
    width: 7rem;
    height: 5rem;
}

.selected-thumb {
    width: 9rem;
    height: 6rem;
}

.thumb-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1e293b;
    color: #94a3b8;
    font-size: 0.75rem;
}

.game-copy {
    min-width: 0;
    flex: 1;
}

.game-title,
.game-copy h2 {
    display: block;
    overflow: hidden;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.selected-panel {
    margin-top: 1.5rem;
    border-color: rgba(103, 232, 249, 0.3);
    border-radius: 1.5rem;
    background: rgba(103, 232, 249, 0.1);
    padding: 1.25rem;
}

.selected-game {
    align-items: center;
}

.primary-button,
.success-button,
.danger-button,
.ghost-button,
.tab-button,
.auth-form button {
    border-radius: 0.8rem;
    border: 1px solid transparent;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    font-weight: 800;
}

.primary-button,
.auth-form button {
    margin-top: 1.25rem;
    background: #67e8f9;
    color: #020617;
}

.success-button {
    border-color: rgba(110, 231, 183, 0.35);
    background: rgba(110, 231, 183, 0.13);
    color: #d1fae5;
}

.danger-button {
    border-color: rgba(252, 165, 165, 0.35);
    background: rgba(239, 68, 68, 0.12);
    color: #fecaca;
}

.ghost-button,
.tab-button {
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
}

.tab-button.active {
    border-color: #67e8f9;
    background: #67e8f9;
    color: #020617;
}

.tab-button.danger.active {
    border-color: #fca5a5;
    background: #fca5a5;
    color: #450a0a;
}

.page-heading {
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.page-heading h1 {
    font-size: clamp(2rem, 6vw, 3rem);
}

.tab-row {
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.admin-tabs {
    align-items: center;
    justify-content: space-between;
}

.primary-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.list-panel {
    margin-top: 0;
}

.count-badge {
    display: flex;
    width: 3rem;
    height: 3rem;
    flex: 0 0 3rem;
    align-items: center;
    justify-content: center;
    border-radius: 0.9rem;
    background: #67e8f9;
    color: #020617;
    font-size: 1.2rem;
    font-weight: 900;
}

.row-actions {
    flex: 0 0 auto;
}

.action-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
}

.action-stack form,
.admin-action-row form {
    margin: 0;
}

.admin-toolbar {
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 1rem;
}

.admin-nav {
    flex-wrap: wrap;
}

.admin-nav a {
    border-radius: 0.65rem;
    background: rgba(255, 255, 255, 0.06);
    padding: 0.6rem 0.8rem;
}

.filter-row {
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.filter-row label {
    margin: 0;
}

.admin-suggestion-card,
.link-admin-card {
    min-width: 0;
}

.admin-suggestion-card .count-badge {
    width: 2.5rem;
    height: 2.5rem;
    flex-basis: 2.5rem;
}

.admin-action-row {
    flex-wrap: wrap;
    justify-content: flex-end;
    margin-top: 1.25rem;
}

.edit-details {
    margin-top: 1rem;
}

.edit-details summary {
    color: #cbd5e1;
    cursor: pointer;
    font-weight: 750;
}

.stacked-form {
    display: grid;
    gap: 0.85rem;
    margin-top: 1rem;
}

.stacked-form label {
    margin: 0;
}

.stacked-form label .text-input,
.stacked-form label .select-input {
    display: block;
    margin-top: 0.45rem;
}

.create-link-form {
    margin-bottom: 1.5rem;
}

.pill-row {
    flex-wrap: wrap;
    margin-top: 0.75rem;
}

.pill {
    border-radius: 999px;
    padding: 0.35rem 0.75rem;
    font-size: 0.85rem;
    font-weight: 700;
}

.pill.success {
    background: rgba(52, 211, 153, 0.12);
    color: #a7f3d0;
}

.pill.info {
    background: rgba(34, 211, 238, 0.12);
    color: #a5f3fc;
}

.pill.subtle-pill {
    background: rgba(148, 163, 184, 0.12);
    color: #cbd5e1;
}

.pill.danger {
    background: rgba(239, 68, 68, 0.14);
    color: #fecaca;
}

.empty-state {
    color: #cbd5e1;
}

.error-panel {
    border-color: rgba(252, 165, 165, 0.35);
    background: rgba(239, 68, 68, 0.1);
    color: #fee2e2;
}

.auth-shell {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 2rem 0;
}

.auth-panel {
    width: 100%;
}

.auth-form {
    margin-top: 1.5rem;
}

@media (max-width: 640px) {
    .suggestion-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }
    .page-heading,
    .admin-row,
    .result-button,
    .selected-game {
        align-items: stretch;
        flex-direction: column;
    }

    .game-thumb,
    .selected-thumb {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }

    .row-actions,
    .row-actions button {
        width: 100%;
    }

    .admin-tabs,
    .primary-tabs {
        align-items: stretch;
        flex-direction: column;
    }

    .site-links {
        gap: 0.6rem;
    }

    .site-links a {
        font-size: 0.85rem;
    }

    .admin-toolbar,
    .admin-card-heading,
    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* Personal front door */
.profile-page {
    min-height: 100svh;
    background: radial-gradient(ellipse at 50% 0%, rgba(14, 165, 233, 0.22), transparent 42rem), #020617;
}
.profile-shell {
    width: min(100% - 2.5rem, 34rem);
    min-height: 100svh;
    margin: 0 auto;
    padding: clamp(3rem, 9vh, 6rem) 0 1.5rem;
    display: flex;
    flex-direction: column;
    text-align: center;
}
.profile-avatar {
    display: grid;
    place-items: center;
    width: 6.5rem;
    height: 6.5rem;
    margin: 0 auto 1.5rem;
    border: 1px solid rgba(103, 232, 249, 0.35);
    border-radius: 50%;
    background: #12334a;
    color: #a5f3fc;
    font-size: 3rem;
    font-weight: 750;
}
.profile-header h1 { margin: 0; font-size: 2rem; letter-spacing: -0.04em; }
.profile-header p { margin: 0.75rem 0 0; color: #b8c9db; font-size: 1rem; line-height: 1.6; }
.profile-links { display: grid; gap: 1rem; margin: 2.5rem 0; }
.profile-link {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 4.5rem;
    padding: 1.1rem 1.75rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 2.5rem;
    background: #e2e8f0;
    color: #0f172a;
    overflow-wrap: anywhere;
    transition: background 160ms ease, transform 160ms ease;
}
.profile-link strong { font-size: 1.125rem; font-weight: 650; line-height: 1.4; }
.profile-link span { margin-top: 0.25rem; color: #475569; font-size: 0.875rem; line-height: 1.5; }
.profile-link:hover { background: #cffafe; transform: translateY(-2px); }
.profile-link:focus-visible, .profile-footer a:focus-visible { outline: 3px solid #67e8f9; outline-offset: 5px; }
.profile-empty { margin: 3rem 0; color: #b8c9db; }
.profile-footer { margin-top: auto; padding-top: 2rem; }
.profile-footer a {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
    padding: 0.5rem;
    color: #94a3b8;
    font-size: 0.875rem;
    text-decoration: underline;
    text-underline-offset: 0.25rem;
}
.profile-footer a:hover { color: #e2e8f0; }
@media (prefers-reduced-motion: reduce) {
    .profile-link { transition: none; }
    .profile-link:hover { transform: none; }
}

.game-open { display: flex; align-items: center; gap: 1rem; flex: 1; min-width: 0; border-radius: 0.75rem; padding: 0.5rem; }
.game-open:hover { background: rgba(103,232,249,0.08); }
.game-open:focus-visible { outline: 3px solid #67e8f9; outline-offset: 3px; }
.game-open .game-copy { overflow-wrap: anywhere; }
.game-dialog { width: min(44rem, calc(100% - 2rem)); max-height: 88svh; overflow-y: auto; background: #0f172a; color: #f8fafc; border: 1px solid #475569; border-radius: 1.25rem; padding: 0 1.5rem 1.5rem; }
.game-dialog::backdrop { background: rgba(2,6,23,0.8); }
.dialog-header { position: sticky; top: 0; z-index: 1; background: #0f172a; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.25rem 0; }
.dialog-header h2 { margin: 0; overflow-wrap: anywhere; }
.dialog-header .ghost-button { white-space: nowrap; }
.dialog-footer { padding-top: 1.5rem; display: flex; justify-content: flex-end; }
.dialog-open { overflow: hidden; }
.star-button[aria-pressed="true"] { color: #fde68a; border-color: #b58a2a; }
.admin-nav { flex-wrap: wrap; }
@media (max-width: 640px) {
    .game-open { flex-wrap: wrap; }
    .game-open .game-copy { flex-basis: 100%; }
    .game-dialog { padding: 0 1rem 1rem; }
}

/* Full-size form with label-only options and compact game results. */
.suggestions-shell { width: min(100% - 2rem, 54rem); padding: 2rem 0; }
.suggestions-shell .hero h1 { font-size: clamp(1.5rem, 5vw, 2rem); line-height: 1.2; margin: 0; }
.suggestions-shell .suggestion-form { margin-top: 2rem; padding: 1.5rem; border-radius: 1.5rem; }
.suggestions-shell .category-fieldset legend { font-size: 0.875rem; margin-bottom: 0.5rem; }
.suggestions-shell .category-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.65rem; }
.suggestions-shell .category-choice { min-height: 3.25rem; padding: 0.75rem 0.25rem; border-radius: 1rem; place-items: center; text-align: center; }
.suggestions-shell .category-name { font-size: 0.875rem; font-weight: 650; line-height: 1.25; overflow-wrap: anywhere; }
.suggestions-shell .category-choice:has(input:focus-visible) { outline: 2px solid #67e8f9; outline-offset: 2px; }
.suggestions-shell .adaptive-field, .suggestions-shell .game-wording { margin-top: 1.5rem; }
.suggestions-shell .text-input { padding: 1rem 1.1rem; font-size: 1.05rem; border-radius: 1rem; }
.suggestions-shell .suggestion-textarea { min-height: 10rem; margin-top: 0.5rem; }
.suggestions-shell .game-wording > label { display: block; font-size: 0.9rem; font-weight: 700; }
.suggestions-shell .turnstile-box { margin-top: 1rem; }
.suggestions-shell .primary-button { width: 100%; min-height: 3rem; margin-top: 1rem; padding: 0.9rem 1.25rem; }
.suggestions-shell .game-result-fieldset { margin-top: 0.65rem; }
.suggestions-shell .result-list { max-height: 12rem; overflow-y: auto; margin-top: 0.4rem; }
.suggestions-shell .game-result-choice { flex-direction: row; align-items: center; gap: 0.65rem; padding: 0.5rem; }
.suggestions-shell .game-thumb { width: 3.75rem; height: 2.5rem; flex: 0 0 3.75rem; object-fit: cover; border-radius: 0.35rem; }
.suggestions-shell .game-title { font-size: 1rem; }
.suggestions-shell .change-game-button { margin-top: 0.4rem; min-height: 2.75rem; padding: 0.5rem 0.75rem; }
.suggestions-shell .result-banner { padding: 0.65rem 0.75rem; font-size: 0.875rem; }
@media (max-width: 399px) {
    .suggestions-shell { width: calc(100% - 1rem); }
    .suggestions-shell .suggestion-form { padding: 0; border: 0; background: transparent; box-shadow: none; }
}

.profile-photo { object-fit: cover; }
.profile-header p { white-space: pre-line; overflow-wrap: anywhere; }

.profile-link.with-image { display: grid; grid-template-columns: 3rem minmax(0, 1fr) 3rem; gap: 0.75rem; align-items: center; padding: 0.7rem 1rem; }
.link-image { width: 3rem; height: 3rem; border-radius: 0.65rem; object-fit: cover; }
.profile-link-text span { display: block; }
.upload-preview { display: block; width: 6.5rem; height: 6.5rem; object-fit: cover; border-radius: 0.75rem; margin-bottom: 0.75rem; }
.round-preview { border-radius: 50%; }
.image-upload [hidden] { display: none; }
.image-crop-dialog { width: min(100% - 1rem, 30rem); max-height: 92svh; overflow-y: auto; background: #0f172a; color: #f8fafc; border: 1px solid #475569; border-radius: 1rem; padding: 1rem; }
.image-crop-dialog::backdrop { background: rgba(2,6,23,0.8); }
.image-crop-dialog .crop-canvas { display: block; width: min(100%, 36svh); height: auto; aspect-ratio: 1; margin: 1rem auto; background: #334155; touch-action: none; cursor: grab; }
.image-crop-dialog input[type="range"] { display: block; width: 100%; min-height: 2.75rem; accent-color: #67e8f9; }
.image-crop-dialog button { min-height: 2.75rem; }
.image-crop-dialog p { font-size: 0.875rem; margin: 0.5rem 0; }
.image-upload input[type="file"] { max-width: 100%; }
