:root {
    color-scheme: light;
    --paper: #efe5d4;
    --white: #faf6ed;
    --ink: #40382d;
    --pine: #3e4b38;
    --sage: #e4dbc6;
    --line: #d3c3a7;
    --muted: #736958;
    --clay: #a46842;
    --leaf: #8f9468;
    --warning: #966018;
    --urgent: #a63e35;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-synthesis: none;
    text-rendering: optimizeLegibility;
}

.hide-mouse {
    cursor: none !important;
}

* {
    box-sizing: border-box;
}

body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    background: var(--paper);
}

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

button {
    color: inherit;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid var(--clay);
    outline-offset: 3px;
}

.app-shell {
    display: grid;
    width: min(1120px, calc(100% - 48px));
    grid-template-columns: minmax(0, 1.25fr) minmax(290px, .75fr);
    grid-template-rows: auto auto auto auto minmax(0, 1fr);
    gap: 20px 22px;
    min-height: 100vh;
    margin: 0 auto;
    padding-bottom: 14px;
}

.topbar,
.info-grid,
.bottom-row,
.footer {
    grid-column: 1 / -1;
}

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

.brand {
    display: flex;
    align-items: center;
    gap: 11px;
}

.brand-mark {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
}

.brand-mark img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.brand-name {
    margin: 0;
    color: var(--pine);
    font-size: 16px;
    font-weight: 720;
    letter-spacing: -.025em;
}

.brand-caption {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.button {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 13px;
    color: var(--pine);
    background: transparent;
    border: 1px solid #c5b69d;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color .15s ease;
}

.button:hover {
    background: #e7dcc7;
}

.button:active {
    background: #ddcfb6;
}

.button svg {
    width: 16px;
    height: 16px;
}

.button-primary {
    color: var(--white);
    background: var(--pine);
    border-color: var(--pine);
    font-weight: 650;
}

.button-primary:hover {
    background: #355b47;
}

.button-quiet {
    min-height: 35px;
    padding: 0 10px;
    font-size: 12px;
}

.icon-button {
    display: grid;
    width: 36px;
    height: 36px;
    padding: 0;
    place-items: center;
    color: var(--muted);
    background: transparent;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
}

.icon-button:hover {
    color: var(--ink);
    background: var(--sage);
}

.icon-button svg {
    width: 18px;
    height: 18px;
}

.hero {
    position: relative;
    display: grid;
    min-height: 290px;
    grid-template-columns: minmax(0, 1fr) 130px;
    align-items: center;
    padding: 30px 32px;
    color: var(--white);
    background: var(--pine);
    border-radius: 20px 4px 20px 4px;
    overflow: hidden;
}

.hero-copy {
    position: relative;
    z-index: 1;
    min-width: 0;
}

.eyebrow {
    margin: 0 0 12px;
    color: #e5d7bd;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .04em;
}

.clock {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(68px, 8.5vw, 108px);
    font-weight: 400;
    letter-spacing: -.07em;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.date-line {
    margin: 13px 0 0;
    color: #e4d7bf;
    font-size: 14px;
}

.mascot-wrap {
    display: flex;
    min-height: 190px;
    align-items: center;
    justify-content: center;
}

.leaf-sprig {
    position: absolute;
    top: 50%;
    left: 18%;
    z-index: -1;
    width: clamp(120px, 18vw, 190px);
    height: auto;
    color: #c1b67c;
    opacity: .12;
    pointer-events: none;
    transform: translateY(-45%);
}

.leaf-sprig .stem {
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-width: 2;
}

.leaf-sprig .leaf {
    fill: currentColor;
    stroke: var(--pine);
    stroke-width: .8;
}

.mascot-wrap img {
    width: 150%;
}

.countdown-card {
    display: flex;
    min-height: 290px;
    flex-direction: column;
    justify-content: space-between;
    padding: 27px 25px 24px;
    background: var(--sage);
    border-radius: 4px 20px 4px 20px;
}

.countdown-label {
    margin: 0 0 13px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 650;
    letter-spacing: .045em;
}

.countdown-time {
    margin: 0;
    color: var(--pine);
    font-size: clamp(23px, 2.8vw, 31px);
    font-weight: 680;
    letter-spacing: -.035em;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}

.countdown-detail {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

.countdown-side {
    width: 100%;
    margin-top: 24px;
}

.progress-copy {
    margin: 0 0 8px;
    color: var(--muted);
    font-size: 12px;
}

.progress-track {
    height: 7px;
    overflow: hidden;
    background: #cbbda3;
    border-radius: 99px;
}

.progress-fill {
    width: 0;
    height: 100%;
    background: #78805a;
    border-radius: inherit;
    transition: width .4s ease, background-color .2s ease;
}

.countdown-card.warning .countdown-time,
.countdown-card.warning .progress-copy {
    color: var(--warning);
}

.countdown-card.warning .progress-fill {
    background: #a8732b;
}

.countdown-card.urgent .countdown-time,
.countdown-card.urgent .progress-copy {
    color: var(--urgent);
}

.countdown-card.urgent .progress-fill {
    background: var(--urgent);
}

.countdown-card.finished .countdown-time {
    color: var(--pine);
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
}

.panel {
    min-width: 0;
    padding: 18px 20px 20px;
    border: 1px solid #ddcfb9;
    border-radius: 8px;
}

.section-heading {
    margin: 0 0 16px;
    color: var(--pine);
    font-size: 17px;
    font-weight: 680;
    letter-spacing: -.02em;
}

.notice-copy {
    margin: 0;
    color: #4a4034;
    font-size: 14px;
    line-height: 1.65;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

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

.rules-list,
.announcement-list {
    display: grid;
    gap: 10px;
    margin: 0;
    padding-left: 20px;
}

.rules-list {
    color: #4a4034;
    font-size: 14px;
    line-height: 1.55;
}

.rules-list li::marker {
    color: var(--clay);
}

.bottom-row .panel {
    min-height: 0;
}

.announcement-list {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px 24px;
    color: #4a4034;
    font-size: 14px;
    line-height: 1.5;
}

.rules-list {
    grid-template-columns: minmax(0, 1fr);
}

.announcement-list li::marker {
    color: var(--clay);
}

.footer {
    align-self: end;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 2px 0;
    color: var(--muted);
    border-top: 1px solid var(--line);
    font-size: 11px;
}

dialog {
    width: min(700px, calc(100% - 28px));
    max-height: min(90vh, 880px);
    padding: 0;
    overflow: hidden;
    color: var(--ink);
    background: var(--paper);
    border: 1px solid #c5b69d;
    border-radius: 12px;
}

dialog::backdrop {
    background: rgb(53 46 36 / 55%);
}

.dialog-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 22px 15px;
    border-bottom: 1px solid var(--line);
}

.dialog-header h2 {
    margin: 0;
    color: var(--pine);
    font-size: 20px;
    letter-spacing: -.025em;
}

.dialog-header p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.dialog-body {
    max-height: calc(80vh - 138px);
    padding: 18px 22px;
    overflow-y: auto;
}

.dialog-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 9px 22px;
    border-top: 1px solid var(--line);
}

.settings-section+.settings-section {
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
}

.settings-section h3 {
    margin: 0 0 13px;
    color: var(--pine);
    font-size: 14px;
}

.field-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.field {
    display: grid;
    gap: 7px;
    min-width: 0;
}

.field label,
.field-label {
    color: #594c3b;
    font-size: 12px;
    font-weight: 600;
}

input[type="datetime-local"],
input[type="text"],
textarea,
select {
    width: 100%;
    min-height: 40px;
    padding: 9px 2px;
    color: var(--ink);
    background: var(--white);
    border: 1px solid #c5b69d;
    border-radius: 5px;
}

textarea {
    min-height: 86px;
    resize: vertical;
    line-height: 1.5;
}

.hint {
    margin: 7px 0 0;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.5;
}

.inline-fields {
    display: flex;
    align-items: end;
    gap: 9px;
}

.inline-fields+.inline-fields {
    margin-top: 10px;
}

.inline-fields .field {
    flex: 1;
}

.toggle-row {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: 14px;
    color: #4a4034;
    font-size: 13px;
}

.toggle-row input {
    width: 16px;
    height: 16px;
    accent-color: var(--leaf);
}

.editable-list {
    display: grid;
    gap: 8px;
}

.editable-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.editable-item input {
    flex: 1;
}

.add-button {
    margin-top: 9px;
}

.save-status {
    min-height: 18px;
    margin: 9px 0 0;
    color: var(--muted);
    font-size: 11px;
}

.toast {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 5;
    max-width: min(440px, calc(100% - 36px));
    padding: 11px 14px;
    color: var(--white);
    background: var(--pine);
    border: 1px solid #827253;
    border-radius: 6px;
    font-size: 12px;
}

[hidden] {
    display: none !important;
}

@media (max-width: 800px) {
    .app-shell {
        width: min(100% - 32px, 620px);
        grid-template-columns: 1fr;
        grid-template-rows: repeat(5, auto) minmax(0, 1fr);
        gap: 16px;
        padding-bottom: 14px;
    }

    .topbar,
    .hero,
    .countdown-card,
    .info-grid,
    .bottom-row,
    .footer {
        grid-column: 1;
    }

    .hero,
    .countdown-card {
        min-height: 0;
    }

    .hero {
        min-height: 255px;
        grid-template-columns: minmax(0, 1fr) 110px;
        padding: 25px;
    }

    .leaf-sprig {
        left: 22%;
        width: 150px;
    }

    .clock {
        font-size: clamp(68px, 12vw, 92px);
    }

    .countdown-card {
        min-height: 175px;
    }

    .info-grid {
        gap: 16px;
    }
}

@media (max-width: 560px) {
    .app-shell {
        width: calc(100% - 28px);
        gap: 13px;
    }

    .topbar {
        flex-wrap: wrap;
        gap: 12px;
        padding: 12px 0;
    }

    .top-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .button {
        min-height: 37px;
        padding: 0 10px;
        font-size: 12px;
    }

    .fullscreen-label {
        display: none;
    }

    .hero {
        min-height: 215px;
        grid-template-columns: minmax(0, 1fr) 76px;
        padding: 20px 16px;
    }

    .clock {
        font-size: clamp(52px, 13vw, 72px);
    }

    .mascot-wrap {
        min-height: 140px;
    }

    .mascot-wrap img {
        width: 76px;
    }

    .leaf-sprig {
        left: 19%;
        width: 112px;
        opacity: .1;
    }

    .date-line {
        font-size: 12px;
    }

    .countdown-card {
        min-height: 185px;
        padding: 21px 18px;
    }

    .info-grid {
        grid-template-columns: 1fr;
        gap: 13px;
    }

    .panel {
        min-height: 0;
        padding: 16px;
    }

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

    .inline-fields {
        flex-wrap: wrap;
    }

    .inline-fields .field {
        flex-basis: 100%;
    }

    .dialog-header,
    .dialog-body,
    .dialog-footer {
        padding-right: 16px;
        padding-left: 16px;
    }

    .footer {
        flex-direction: column;
    }
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}

body.large-display .app-shell {
    width: min(1440px, calc(100% - 64px));
    gap: 28px 30px;
}

body.large-display .topbar {
    min-height: 88px;
}

body.large-display .brand-name {
    font-size: 19px;
}

body.large-display .brand-caption {
    font-size: 14px;
}

body.large-display .button {
    min-height: 48px;
    padding-right: 16px;
    padding-left: 16px;
    font-size: 15px;
}

body.large-display .hero {
    min-height: 360px;
    grid-template-columns: minmax(0, 1fr) 170px;
    padding: 38px;
}

body.large-display .clock {
    font-size: clamp(112px, 12vw, 174px);
}

body.large-display .eyebrow,
body.large-display .date-line {
    font-size: 17px;
}

body.large-display .mascot-wrap img {
    width: 155px;
    max-height: 245px;
}

body.large-display .countdown-card {
    min-height: 360px;
    padding: 34px 32px;
}

body.large-display .countdown-label {
    font-size: 15px;
}

body.large-display .countdown-time {
    font-size: clamp(32px, 3.8vw, 48px);
}

body.large-display .countdown-detail,
body.large-display .progress-copy {
    font-size: 16px;
}

body.large-display .progress-track {
    height: 9px;
}

body.large-display .info-grid {
    gap: 30px;
}

body.large-display .panel {
    padding: 27px 30px;
}

body.large-display .section-heading {
    font-size: 23px;
}

body.large-display .notice-copy {
    font-size: 20px;
}

body.large-display .rules-list,
body.large-display .announcement-list {
    font-size: 20px;
    line-height: 1.65;
}

body.large-display .rules-list,
body.large-display .announcement-list {
    gap: 14px;
}

body.large-display .footer {
    font-size: 14px;
}

@media (max-width: 800px) {
    body.large-display .app-shell {
        width: min(100% - 32px, 820px);
    }

    body.large-display .hero {
        min-height: 320px;
        grid-template-columns: minmax(0, 1fr) 130px;
        padding: 32px;
    }

    body.large-display .clock {
        font-size: clamp(88px, 14vw, 132px);
    }

    body.large-display .mascot-wrap img {
        width: 118px;
    }

    body.large-display .countdown-card {
        min-height: 240px;
    }

    body.large-display .countdown-time {
        font-size: clamp(32px, 6vw, 44px);
    }
}

@media (max-width: 560px) {
    body.large-display .app-shell {
        width: calc(100% - 24px);
    }

    body.large-display .topbar {
        min-height: 0;
    }

    body.large-display .button {
        min-height: 42px;
        padding-right: 11px;
        padding-left: 11px;
        font-size: 13px;
    }

    body.large-display .hero {
        min-height: 245px;
        grid-template-columns: minmax(0, 1fr) 70px;
        padding: 23px 15px;
    }

    body.large-display .clock {
        font-size: clamp(58px, 15vw, 78px);
    }

    body.large-display .mascot-wrap img {
        width: 68px;
    }

    body.large-display .eyebrow,
    body.large-display .date-line {
        font-size: 14px;
    }

    body.large-display .countdown-card {
        min-height: 210px;
        padding: 24px 20px;
    }

    body.large-display .countdown-time {
        font-size: clamp(28px, 7vw, 36px);
    }

    body.large-display .countdown-detail,
    body.large-display .progress-copy,
    body.large-display .rules-list,
    body.large-display .announcement-list,
    body.large-display .notice-copy {
        font-size: 16px;
    }

    body.large-display .panel {
        padding: 21px 16px;
    }

    body.large-display .section-heading {
        font-size: 20px;
    }
}

.home-shell {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: 0;
}

.home-header-note {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.home-main {
    display: grid;
    align-content: center;
    gap: 30px;
    min-height: 0;
    padding: 38px 0;
}

.home-hero {
    min-height: 220px;
    grid-template-columns: minmax(0, 1fr) 145px;
    padding: 34px 40px;
}

.home-title {
    max-width: 720px;
    margin: 0;
    color: var(--white);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(36px, 5vw, 58px);
    font-weight: 400;
    letter-spacing: -.045em;
    line-height: 1.08;
}

.home-intro {
    max-width: 560px;
    margin: 14px 0 0;
    color: #e4d7bf;
    font-size: 15px;
    line-height: 1.6;
}

.home-mascot img {
    width: 150px;
}

.home-choices {
    display: grid;
    gap: 18px;
    justify-items: center;
}

.home-section-title {
    margin: 0;
    color: var(--pine);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 25px;
    font-weight: 400;
    letter-spacing: -.025em;
    text-align: center;
}

.home-links {
    display: grid;
    width: min(860px, 100%);
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.home-link {
    display: grid;
    min-height: 158px;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    padding: 25px 27px;
    color: var(--ink);
    background: var(--sage);
    border: 1px solid var(--line);
    border-radius: 4px 18px 4px 18px;
    text-decoration: none;
    transition: background-color .15s ease, transform .15s ease;
}

.home-link-class {
    background: #e9dfcd;
    border-radius: 18px 4px 18px 4px;
}

.home-link:hover {
    background: #f3ead9;
    transform: translateY(-2px);
}

.home-link:focus-visible {
    outline: 2px solid var(--clay);
    outline-offset: 4px;
}

.home-link-copy {
    display: grid;
    gap: 7px;
}

.home-link-kicker {
    color: var(--clay);
    font-size: 11px;
    font-weight: 650;
    letter-spacing: .055em;
    text-transform: uppercase;
}

.home-link-title {
    color: var(--pine);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 27px;
    letter-spacing: -.03em;
    line-height: 1.15;
}

.home-link-description {
    max-width: 310px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.home-link-arrow {
    width: 23px;
    height: 23px;
    color: var(--pine);
    transition: transform .15s ease;
}

.home-link:hover .home-link-arrow {
    transform: translateX(3px);
}

.home-footer {
    align-self: end;
}

@media (max-width: 800px) {
    .home-shell {
        width: min(100% - 32px, 620px);
    }

    .home-main {
        gap: 24px;
        padding: 28px 0;
    }

    .home-hero {
        min-height: 200px;
        grid-template-columns: minmax(0, 1fr) 110px;
        padding: 27px;
    }

    .home-mascot img {
        width: 115px;
    }

    .home-links {
        gap: 13px;
    }

    .home-link {
        min-height: 148px;
        padding: 20px;
    }

    .home-link-title {
        font-size: 24px;
    }
}

@media (max-width: 560px) {
    .home-shell {
        width: calc(100% - 28px);
    }

    .home-header-note {
        display: none;
    }

    .home-main {
        align-content: start;
        gap: 22px;
        padding: 13px 0 22px;
    }

    .home-hero {
        min-height: 0;
        grid-template-columns: minmax(0, 1fr) 68px;
        padding: 23px 17px;
    }

    .home-title {
        font-size: clamp(31px, 8vw, 40px);
    }

    .home-intro {
        margin-top: 10px;
        font-size: 13px;
    }

    .home-mascot img {
        width: 72px;
    }

    .home-section-title {
        font-size: 22px;
    }

    .home-links {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .home-link {
        min-height: 122px;
        padding: 18px;
    }

    .home-link-title {
        font-size: 23px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .home-link,
    .home-link-arrow {
        transition-duration: .01ms;
    }
}