@import url('https://fonts.googleapis.com/css2?family=Bodoni+Moda:opsz,wght@6..96,600;6..96,700&family=Manrope:wght@400;500;700;800&display=swap');

:root {
    --bg: #0b0b0b;
    --bg-soft: #141414;
    --ink: #f2e8d1;
    --muted: #bda97b;
    --gold: #c9a246;
    --gold-soft: #8f6f2d;
    --card: #131313;
    --line: #4c3a1b;
    --ok-bg: #162118;
    --ok-ink: #a4e0ae;
    --error-bg: #2b1717;
    --error-ink: #efb2b2;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Manrope", "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--ink);
    letter-spacing: 0.005em;
}

.container {
    width: min(1040px, 92vw);
    margin: 0 auto;
    padding: 28px 0 44px;
}

.flow-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.flow-head {
    margin-bottom: 18px;
}

.eyebrow,
.screen-kicker {
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--muted);
    font-size: 12px;
    margin: 0 0 10px;
}

.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-left: 4px solid var(--gold-soft);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.32);
}

h1, h2, h3 {
    margin-top: 0;
    font-family: "Bodoni Moda", Georgia, serif;
    letter-spacing: 0.03em;
}

h1 {
    font-size: clamp(34px, 5.5vw, 58px);
    color: var(--gold);
    margin-bottom: 12px;
    line-height: 1.05;
}

a {
    color: var(--gold);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

p {
    color: #e8dcc2;
    line-height: 1.45;
}

input, button, textarea, select {
    width: 100%;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #665328;
    background: #0f0f0f;
    color: var(--ink);
    font: inherit;
}

input:focus, textarea:focus, select:focus {
    outline: 2px solid #79612e;
    outline-offset: 1px;
}

button {
    background: var(--gold);
    border: none;
    color: #1a1408;
    font-weight: 800;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: transform 120ms ease, filter 120ms ease;
}

button.secondary {
    background: #1a1a1a;
    color: var(--gold);
    border: 1px solid var(--gold-soft);
}

button.liked {
    background: #203221;
    color: #b6e5bc;
    border: 1px solid #46704a;
}

button:hover {
    transform: translateY(-1px);
    filter: brightness(1.04);
}

.row {
    display: grid;
    gap: 12px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

img.feed {
    width: 100%;
    border-radius: 6px;
    border: 1px solid #6d5627;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.badge {
    display: inline-block;
    padding: 4px 9px;
    border-radius: 4px;
    font-size: 12px;
    background: #201a0f;
    color: #f2d688;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.hero {
    border: 1px solid var(--gold-soft);
    border-left: 10px solid var(--gold);
    padding: 22px;
    position: relative;
}

.hero::after {
    content: "";
    position: absolute;
    top: 14px;
    right: 14px;
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: var(--gold);
    box-shadow: -18px 12px 0 #7a5d26, -34px 4px 0 #3e3118;
}

.hero-line {
    font-family: "Bodoni Moda", Georgia, serif;
    font-size: clamp(30px, 6vw, 66px);
    line-height: 1;
    margin: 0 0 8px;
    color: var(--gold);
}

.hero-subline {
    margin: 0;
    color: var(--muted);
    font-size: clamp(15px, 2.3vw, 22px);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.screen {
    display: none;
}

.screen.is-active {
    display: block;
}

.screen-card {
    max-width: 720px;
}

.join-screen .screen-card {
    max-width: 620px;
}

.split-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.task-preview {
    display: none;
    margin-top: 14px;
    border-top: 1px solid #2d2413;
    padding-top: 14px;
}

.task-preview.visible {
    display: block;
}

.task-badge {
    display: inline-block;
    margin: 0 0 14px;
    padding: 8px 12px;
    border: 1px solid #71592a;
    border-radius: 999px;
    color: #f2d688;
    background: #17130d;
}

.vote-card {
    max-width: 520px;
}

.vote-image {
    margin-bottom: 12px;
}

.vote-meta,
.vote-task {
    margin: 8px 0;
}

.button-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 48px;
    border-radius: 6px;
    background: #1a1a1a;
    color: var(--gold);
    border: 1px solid var(--gold-soft);
    text-decoration: none;
    font-weight: 700;
}

.flow-footer-actions {
    margin-top: 18px;
    padding-bottom: 24px;
    max-width: 720px;
}

.grid .card {
    padding: 12px;
}

.grid .card p {
    margin: 8px 0;
}

.message {
    padding: 10px;
    border-radius: 8px;
    margin: 10px 0;
}

.message.error {
    background: var(--error-bg);
    color: var(--error-ink);
}

.message.ok {
    background: var(--ok-bg);
    color: var(--ok-ink);
}

.toast-stack {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 3000;
    display: grid;
    gap: 8px;
    width: min(360px, 90vw);
}

.toast {
    border: 1px solid var(--line);
    background: #121212;
    color: var(--ink);
    padding: 12px 14px;
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.34);
    transition: opacity 180ms ease;
}

.toast.ok {
    border-color: #325236;
    background: #162118;
    color: var(--ok-ink);
}

.toast.error {
    border-color: #633535;
    background: #2b1717;
    color: var(--error-ink);
}

.toast.fade {
    opacity: 0;
}

.tv {
    margin: 0;
    overflow: hidden;
    background: #050505;
    color: #fff;
}

.tv-slide {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 0;
    position: relative;
}

.tv-timer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 10px;
    background: rgba(20, 20, 20, 0.55);
    z-index: 3;
}

.tv-progress {
    width: 0;
    height: 100%;
    background: #c9a246;
    box-shadow: 0 0 18px rgba(201, 162, 70, 0.45);
}

.tv-progress.run {
    animation: tvProgress var(--duration, 12000ms) linear forwards;
}

.tv-photo {
    width: 100vw;
    height: 100vh;
    object-fit: contain;
    filter: saturate(1.07) contrast(1.05);
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 900ms ease;
    background: #050505;
}

.tv-photo.is-active {
    opacity: 1;
}

.tv-overlay {
    position: absolute;
    bottom: 30px;
    left: 30px;
    right: 30px;
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 15px;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.9);
    font-size: clamp(18px, 2.3vw, 40px);
    color: #f2d688;
    background: rgba(8, 8, 8, 0.55);
    border: 1px solid #71592a;
    border-radius: 8px;
    padding: 12px 14px;
}

.tv-task {
    margin-top: 4px;
    color: #fff0be;
    font-size: 0.72em;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.tv-pulse {
    animation: pulseMove 12s ease-in-out infinite;
}

@keyframes tvProgress {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes pulseMove {
    0% { transform: translateX(0); }
    50% { transform: translateX(8px); }
    100% { transform: translateX(0); }
}

@media (max-width: 720px) {
    .container {
        width: 94vw;
    }

    .hero-subline {
        letter-spacing: 0.03em;
    }
}
