@import url('https://fonts.googleapis.com/css2?family=Newsreader:opsz,wght@6..72,500;6..72,700&family=Space+Grotesk:wght@400;500;700&display=swap');

:root {
    --bg: #f6efe5;
    --surface: rgba(255, 249, 241, 0.88);
    --ink: #1f1d1a;
    --muted: #5f5a53;
    --accent: #cf5f32;
    --accent-deep: #9f3f1c;
    --line: rgba(31, 29, 26, 0.12);
    --success: #1b7f47;
    --danger: #9b3026;
    --shadow: 0 20px 50px rgba(85, 48, 30, 0.12);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    background:
        radial-gradient(circle at top right, rgba(207, 95, 50, 0.16), transparent 30%),
        linear-gradient(180deg, #f7f0e7 0%, #f2e5d5 45%, #f6efe5 100%);
    color: var(--ink);
    font-family: "Space Grotesk", "Segoe UI Variable", sans-serif;
}

body {
    min-height: 100vh;
}

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

img {
    display: block;
    max-width: 100%;
}

h1,
h2,
h3 {
    font-family: "Newsreader", Georgia, serif;
    line-height: 1;
    margin: 0;
}

p {
    margin: 0;
    line-height: 1.5;
}

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

button {
    cursor: pointer;
    border: 0;
}

input,
select,
textarea {
    width: 100%;
    padding: 0.85rem 1rem;
    border-radius: 1rem;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.78);
    color: var(--ink);
}

textarea {
    min-height: 7rem;
    resize: vertical;
}

.password-field {
    position: relative;
}

.password-field input {
    padding-right: 3.6rem;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 0.55rem;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
}

.password-toggle:hover {
    color: var(--ink);
    background: rgba(255, 255, 255, 0.72);
}

.password-toggle svg {
    width: 1.2rem;
    height: 1.2rem;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.app-shell {
    width: min(1100px, calc(100vw - 1.5rem));
    margin: 0 auto;
    padding: 1rem 0 3rem;
}

.app-header,
.app-nav,
.panel,
.hero-panel,
.countdown-card,
.feature-card,
.gallery-card {
    backdrop-filter: blur(18px);
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.app-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    border-radius: 1.5rem;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
}

.brand-mark {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.brand-mark span {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--muted);
}

.brand-mark strong {
    font-size: 1.25rem;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.role-strip {
    padding: 0.5rem 0.8rem;
    border-radius: 999px;
    background: rgba(207, 95, 50, 0.12);
    color: var(--accent-deep);
    font-size: 0.9rem;
}

.app-nav {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 0.5rem;
    border-radius: 1.25rem;
    margin-bottom: 1rem;
}

.app-nav a {
    white-space: nowrap;
    padding: 0.8rem 1rem;
    border-radius: 1rem;
    color: var(--muted);
}

.app-nav a.active {
    background: linear-gradient(135deg, var(--accent), #ed8c42);
    color: white;
}

.app-main,
.page-shell {
    display: grid;
    gap: 1rem;
}

.panel,
.hero-panel,
.countdown-card {
    border-radius: 1.75rem;
    padding: 1.25rem;
}

.hero-panel {
    padding: 1.5rem;
}

.hero-panel h1,
.panel h1 {
    font-size: clamp(2rem, 4vw, 3.6rem);
    margin-top: 0.35rem;
}

.eyebrow {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent-deep);
}

.muted {
    color: var(--muted);
}

.primary-link,
.primary-button,
.ghost-button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 0.4rem;
    min-height: 2.85rem;
    padding: 0.75rem 1.1rem;
    border-radius: 999px;
    transition: transform 0.2s ease;
}

.primary-link,
.primary-button {
    background: linear-gradient(135deg, var(--accent), #f08e46);
    color: white;
}

.ghost-button {
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.62);
    color: var(--ink);
}

.ghost-button.danger {
    color: var(--danger);
}

.primary-link:hover,
.primary-button:hover,
.ghost-button:hover {
    transform: translateY(-1px);
}

.form-grid,
.stack-list {
    display: grid;
    gap: 0.85rem;
}

.landing-hero {
    gap: 1rem;
}

.landing-hero p:not(.eyebrow) {
    max-width: 42rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.25rem;
}

.landing-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.landing-grid h2 {
    font-size: 1.55rem;
    line-height: 1.05;
}

.form-grid label {
    display: grid;
    gap: 0.45rem;
}

.checkbox-row {
    display: flex !important;
    align-items: center;
    gap: 0.75rem !important;
}

.checkbox-row input {
    width: auto;
}

.button-row,
.inline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.list-card,
.feature-card__content {
    display: grid;
    gap: 0.75rem;
}

.list-card {
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 1rem;
}

.feature-card,
.gallery-card {
    border-radius: 1.4rem;
    overflow: hidden;
}

.feature-card__content,
.gallery-card div {
    padding: 1rem;
}

.pill {
    display: inline-flex;
    align-items: center;
    min-height: 2rem;
    padding: 0.25rem 0.8rem;
    border-radius: 999px;
    background: rgba(207, 95, 50, 0.12);
    color: var(--accent-deep);
    font-size: 0.85rem;
}

.countdown-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.countdown-grid div {
    padding: 1rem;
    border-radius: 1.2rem;
    background: rgba(255, 255, 255, 0.7);
}

.countdown-open-card {
    grid-column: 1 / -1;
}

.countdown-grid strong {
    display: block;
    font-size: 1.8rem;
}

.photo-strip {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(140px, 1fr);
    gap: 0.75rem;
    overflow-x: auto;
}

.photo-strip img,
.gallery-card img {
    width: 100%;
    height: 220px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.72);
}

.gallery-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.letter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
    gap: 0.65rem;
}

.letter-tile {
    display: grid;
    gap: 0.2rem;
    padding: 0.85rem;
    border-radius: 1.2rem;
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid var(--line);
}

.letter-tile.pendingverification {
    background: rgba(240, 142, 70, 0.16);
}

.letter-tile.completed {
    background: rgba(27, 127, 71, 0.15);
}

.bingo-grid {
    display: grid;
    gap: 0.55rem;
    grid-template-columns: repeat(var(--card-size), minmax(0, 1fr));
}

.bingo-tile {
    min-height: 88px;
    padding: 0.7rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--line);
    color: var(--ink);
}

.bingo-tile.marked {
    background: linear-gradient(135deg, rgba(207, 95, 50, 0.92), rgba(240, 142, 70, 0.85));
    color: white;
}

.auth-shell {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    align-items: start;
}

.form-error {
    color: var(--danger);
}

.form-success {
    color: var(--success);
}

.media-toggle {
    display: grid;
    gap: 0.5rem;
}

.role-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 2px solid rgba(27, 127, 71, 0.45);
}

.invalid {
    outline: 2px solid rgba(155, 48, 38, 0.45);
}

.validation-message {
    color: var(--danger);
}

#blazor-error-ui {
    background: #651c1c;
    bottom: 0;
    color: white;
    display: none;
    left: 0;
    padding: 0.8rem 1rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 1rem;
    top: 0.7rem;
}

@media (max-width: 720px) {
    .app-shell {
        width: calc(100vw - 1rem);
        padding-top: 0.5rem;
    }

    .app-header {
        flex-direction: column;
        align-items: stretch;
    }

    .header-actions {
        justify-content: space-between;
    }

    .hero-panel h1,
    .panel h1 {
        font-size: 2.3rem;
    }

    .countdown-grid {
        grid-template-columns: 1fr;
    }
}
