@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@500;600;700;800;900&family=DM+Mono:wght@400;500&family=DM+Sans:wght@400;500;600;700&display=swap');

:root {
    color-scheme: light;
    --ink: #17241d;
    --paper: #f3f0e7;
    --white: #fffdf7;
    --green: #c4f060;
    --orange: #f0784b;
    --line: #d8d6cb;
    --muted: #73796f;
    --display: 'Barlow Condensed', Impact, sans-serif;
    --body: 'DM Sans', sans-serif;
    --mono: 'DM Mono', monospace;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--paper);
    font-family: var(--body);
}

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

[hidden] {
    display: none !important;
}

.login-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(350px, 0.85fr) 1.15fr;
    background: var(--paper);
}

.login-panel {
    width: min(100%, 590px);
    padding: clamp(32px, 7vw, 92px);
    align-self: center;
    justify-self: center;
}

.eyebrow {
    margin: 0 0 12px;
    font: 500 11px var(--mono);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #71776e;
}

.login-panel h1,
.intro h1 {
    margin: 0;
    font: 900 clamp(70px, 9vw, 128px)/0.78 var(--display);
    letter-spacing: 0;
    text-transform: uppercase;
}

.login-panel h1 span {
    color: #648c31;
}

.login-copy {
    margin: 29px 0 34px;
    font-size: 15px;
    line-height: 1.65;
    color: #4d574e;
}

.login-form {
    display: grid;
    gap: 9px;
}

.login-form label {
    margin-top: 9px;
    font: 500 10px var(--mono);
    text-transform: uppercase;
    letter-spacing: 0.09em;
}

.login-form select,
.login-form input {
    width: 100%;
    min-height: 48px;
    border: 1px solid #c8c9bf;
    border-radius: 2px;
    padding: 0 12px;
    color: var(--ink);
    background: var(--white);
    outline-color: #648c31;
}

.button {
    min-height: 50px;
    border: 0;
    border-radius: 2px;
    padding: 0 17px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 700;
}

.button-dark {
    margin-top: 14px;
    color: var(--white);
    background: var(--ink);
}

.button-dark:hover {
    background: #344438;
}

.form-error {
    min-height: 18px;
    margin: 4px 0 0;
    color: #a33d25;
    font-size: 13px;
}

.guest-hint {
    margin: 18px 0 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.6;
}

.login-art {
    min-height: 600px;
    position: relative;
    overflow: hidden;
    background: #92b9a2;
    isolation: isolate;
}

.login-art::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    opacity: 0.3;
    background-image: radial-gradient(#fff 0.7px, transparent 0.7px);
    background-size: 8px 8px;
}

.sun {
    position: absolute;
    width: min(35vw, 410px);
    aspect-ratio: 1;
    border-radius: 50%;
    top: 11%;
    right: 14%;
    background: var(--green);
}

.hill {
    position: absolute;
    width: 145%;
    height: 61%;
    left: -22%;
    border-radius: 50% 50% 0 0 / 22% 22% 0 0;
}

.hill-back {
    bottom: 4%;
    transform: rotate(-12deg);
    background: #527b68;
}

.hill-front {
    bottom: -18%;
    left: -7%;
    transform: rotate(13deg);
    background: #263e31;
}

.art-caption {
    position: absolute;
    top: 34px;
    left: 38px;
    color: var(--ink);
    font: 500 10px var(--mono);
    letter-spacing: 0.1em;
}

.art-number {
    position: absolute;
    right: 10%;
    bottom: 12%;
    color: var(--green);
    font: 900 clamp(130px, 25vw, 340px)/0.72 var(--display);
}

.art-number span {
    display: block;
    margin: 10px 0 0 10px;
    font: 500 16px var(--mono);
    letter-spacing: 0.08em;
}

.app-shell {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 5.4%;
}

.topbar {
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--line);
}

.wordmark {
    color: var(--ink);
    text-decoration: none;
    font: 800 25px var(--display);
}

.wordmark span {
    color: #648c31;
}

.topbar-event,
.session-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    font: 500 10px var(--mono);
    letter-spacing: 0.04em;
}

.topbar-event {
    color: #48544a;
}

.topbar-divider {
    color: #9da095;
}

.live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #65973e;
    box-shadow: 0 0 0 3px #d8e5c7;
}

.connection-status {
    color: #5f7460;
}

.connection-status.offline {
    color: #a85236;
}

.text-button {
    border: 0;
    border-left: 1px solid var(--line);
    padding: 4px 0 4px 10px;
    background: transparent;
    color: #48544a;
    font: 500 10px var(--mono);
    text-transform: uppercase;
}

.intro {
    min-height: 240px;
    padding: 48px 0 38px;
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 30px;
}

.intro h1 {
    font-size: clamp(70px, 11vw, 142px);
}

.intro h1 span {
    color: #648c31;
}

.intro-side {
    display: flex;
    align-items: flex-end;
    gap: 28px;
}

.countdown {
    display: grid;
    gap: 6px;
    justify-items: end;
    text-align: right;
}

.countdown .eyebrow {
    margin-bottom: 0;
}

.login-countdown {
    justify-items: start;
    margin: 22px 0 28px;
    text-align: left;
}

.countdown-time {
    color: #577a2c;
    font: 500 24px/1.2 var(--mono);
    white-space: nowrap;
}

.intro-note {
    margin: 0 0 4px;
    font-size: 13px;
    line-height: 1.7;
    color: #636b60;
}

.scoreboard-section {
    padding: 29px 0 54px;
    border-top: 1px solid var(--line);
}

.section-heading,
.alerts-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 22px;
}

.section-heading h2,
.alerts-header h2 {
    margin: 0;
    font: 800 38px/1 var(--display);
    text-transform: uppercase;
}

.scoreboard-note {
    margin: 0;
    color: var(--muted);
    text-align: right;
    font-size: 11px;
    line-height: 1.55;
}

.scoreboard {
    border-top: 2px solid var(--ink);
}

.score-header,
.task-row {
    display: grid;
    grid-template-columns: minmax(130px, 1.05fr) repeat(3, minmax(115px, 1fr));
}

.score-header {
    min-height: 48px;
    align-items: center;
    border-bottom: 1px solid var(--line);
    font: 500 10px var(--mono);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.score-header>div:not(:first-child) {
    padding-left: 17px;
}

.score-header .active-player {
    color: #577a2c;
}

.task-row {
    min-height: 93px;
    border-bottom: 1px solid var(--line);
    align-items: stretch;
}

.task-name {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    padding-right: 10px;
}

.task-name strong {
    font: 700 21px/1 var(--display);
    text-transform: uppercase;
}

.task-name span {
    color: var(--muted);
    font: 10px var(--mono);
}

.player-cell {
    min-width: 0;
    padding: 12px 10px 12px 17px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    border-left: 1px solid var(--line);
}

.player-cell.is-self {
    background: rgba(196, 240, 96, 0.15);
}

.counter-value {
    white-space: nowrap;
    font: 700 27px/1 var(--display);
}

.counter-value small {
    color: #72796e;
    font: 500 12px var(--mono);
}

.counter-controls {
    display: flex;
    gap: 5px;
}

.counter-controls button {
    width: 29px;
    height: 29px;
    border: 1px solid #aab09f;
    border-radius: 2px;
    background: transparent;
    color: var(--ink);
    font: 500 17px var(--body);
}

.counter-controls button:hover:not(:disabled) {
    border-color: var(--ink);
    background: var(--green);
}

.counter-controls button:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.progress-track {
    height: 3px;
    margin-top: 7px;
    background: #dedfd4;
}

.progress-fill {
    height: 100%;
    background: #719c3c;
    transition: width 280ms ease;
}

.alerts-section {
    padding: 31px 0 45px;
    border-top: 1px solid var(--line);
}

.alerts-header {
    margin-bottom: 23px;
}

.alert-frequency {
    color: #747a70;
    font: 500 10px var(--mono);
    letter-spacing: 0.04em;
}

.alerts-body {
    padding: 23px;
    background: #e7e8dc;
}

.alerts-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.alert-item {
    display: grid;
    grid-template-columns: 115px 1fr;
    gap: 14px;
    padding: 12px 0;
    border-top: 1px solid #ced1c3;
}

.alert-item:first-child {
    border-top: 0;
    padding-top: 0;
}

.alert-time {
    color: #757c71;
    font: 10px var(--mono);
}

.alert-copy {
    font-size: 13px;
    line-height: 1.5;
}

.alert-copy strong {
    font-weight: 700;
}

.empty-alerts {
    color: #73796f;
    font-size: 12px;
    line-height: 1.6;
}

.footer {
    min-height: 61px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--line);
    color: #767c72;
    font: 500 9px var(--mono);
    letter-spacing: 0.08em;
}

.toast {
    position: fixed;
    right: 20px;
    bottom: 20px;
    max-width: min(360px, calc(100vw - 40px));
    padding: 13px 16px;
    background: var(--ink);
    color: var(--white);
    font-size: 13px;
    transform: translateY(20px);
    opacity: 0;
    pointer-events: none;
    transition: 180ms ease;
}

.toast.visible {
    transform: translateY(0);
    opacity: 1;
}

@media (min-width: 1500px) {
    .app-shell {
        padding-right: 78px;
        padding-left: 78px;
    }
}

@media (max-width: 760px) {
    .login-shell {
        grid-template-columns: 1fr;
    }

    .login-panel {
        width: 100%;
        padding: 45px 8vw;
    }

    .login-panel h1 {
        font-size: clamp(74px, 18vw, 110px);
    }

    .login-art {
        min-height: 280px;
    }

    .sun {
        width: 210px;
        top: 9%;
        right: 14%;
    }

    .hill {
        height: 68%;
    }

    .art-number {
        right: 9%;
        bottom: 14%;
        font-size: 150px;
    }

    .app-shell {
        padding: 0 20px;
    }

    .topbar {
        height: 60px;
    }

    .topbar-event {
        font-size: 9px;
    }

    .session-controls {
        gap: 7px;
        font-size: 9px;
    }

    .connection-status {
        display: none;
    }

    .intro {
        min-height: 200px;
        align-items: start;
        flex-direction: column;
        justify-content: center;
        gap: 15px;
        padding: 36px 0 28px;
    }

    .intro h1 {
        font-size: clamp(64px, 17vw, 110px);
    }

    .intro-side {
        width: 100%;
        align-items: flex-end;
        justify-content: space-between;
        gap: 10px;
    }

    .countdown {
        justify-items: start;
        text-align: left;
    }

    .countdown-time {
        font-size: 18px;
    }

    .login-countdown {
        margin: 12px 0 22px;
    }

    .intro-note br {
        display: none;
    }

    .section-heading h2,
    .alerts-header h2 {
        font-size: 34px;
    }

    .scoreboard-note {
        font-size: 10px;
    }

    .score-header,
    .task-row {
        grid-template-columns: minmax(83px, 0.9fr) repeat(3, minmax(76px, 1fr));
    }

    .score-header {
        font-size: 8px;
    }

    .score-header>div:not(:first-child) {
        padding-left: 7px;
    }

    .task-row {
        min-height: 92px;
    }

    .task-name strong {
        font-size: 17px;
    }

    .task-name span {
        font-size: 8px;
    }

    .player-cell {
        padding: 10px 4px 10px 7px;
        gap: 3px;
        flex-wrap: wrap;
        align-content: center;
    }

    .counter-value {
        font-size: 23px;
    }

    .counter-value small {
        font-size: 9px;
    }

    .counter-controls {
        gap: 3px;
    }

    .counter-controls button {
        width: 25px;
        height: 25px;
    }

    .progress-track {
        width: 100%;
    }

    .alerts-body {
        padding: 17px;
    }

    .alert-item {
        grid-template-columns: 85px 1fr;
        gap: 8px;
    }
}

@media (max-width: 390px) {
    .app-shell {
        padding: 0 13px;
    }

    .wordmark {
        font-size: 21px;
    }

    .topbar-event {
        gap: 6px;
        font-size: 8px;
    }

    .session-controls {
        gap: 5px;
    }

    .text-button {
        padding-left: 6px;
        font-size: 9px;
    }

    .score-header,
    .task-row {
        grid-template-columns: minmax(74px, 0.82fr) repeat(3, minmax(69px, 1fr));
    }

    .counter-controls button {
        width: 22px;
        height: 23px;
    }
}