/* ── Reset & box-sizing ─────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ── Design tokens ──────────────────────────────────────────── */
:root {
    --bg: #f0ede8;
    --card-bg: #ffffff;
    --text-primary: #1a1714;
    --text-secondary: rgba(26, 23, 20, 0.55);
    --accent: #c9541e;
    --divider: rgba(26, 23, 20, 0.12);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 12px 32px -4px rgba(0, 0, 0, 0.10);
    --radius: 12px;
    --font-ui: 'DM Sans', sans-serif;
    --font-mono: 'DM Mono', monospace;
}

/* ── Base ───────────────────────────────────────────────────── */
body {
    background-color: var(--bg);
    font-family: var(--font-ui);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ── Main ───────────────────────────────────────────────────── */
main {
    flex: 1;
}

/* ── Headings ───────────────────────────────────────────────── */
h1 {
    text-align: center;
    font-size: clamp(24px, 5vw, 36px);
    font-weight: 600;
    letter-spacing: -0.02em;
    padding: 48px 20px 0;
}

h2 {
    font-size: clamp(18px, 3vw, 24px);
    font-weight: 600;
    letter-spacing: -0.01em;
}

/* ── Container card ─────────────────────────────────────────── */
.container {
    max-width: 600px;
    margin: 40px auto 32px;
    background: var(--card-bg);
    padding: 28px 32px;
    box-shadow: var(--shadow);
    border-radius: var(--radius);
}

@media (max-width: 640px) {
    .container {
        margin: 24px 16px;
        padding: 20px;
    }
}

/* ── Label ──────────────────────────────────────────────────── */
label[for="city"] {
    display: block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

/* ── Select ─────────────────────────────────────────────────── */
select {
    display: block;
    width: 100%;
    font-family: var(--font-ui);
    font-size: 16px;
    color: var(--text-primary);
    background-color: var(--bg);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23888' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    border: 1px solid var(--divider);
    border-radius: 6px;
    padding: 10px 36px 10px 12px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    transition: border-color 0.15s;
}

select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(201, 84, 30, 0.15);
}

/* ── City rows ──────────────────────────────────────────────── */
#cities {
    margin-top: 24px;
}

.city {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 0;
    border-bottom: 1px dashed var(--divider);
}

.city:last-child {
    border-bottom: none;
}

.date {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* ── Time display ───────────────────────────────────────────── */
.time {
    font-family: var(--font-mono);
    font-size: clamp(28px, 7vw, 48px);
    font-weight: 500;
    letter-spacing: -0.02em;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.time small {
    font-family: var(--font-mono);
    font-size: clamp(13px, 2.5vw, 20px);
    font-weight: 400;
    color: var(--accent);
}

/* ── Back button ────────────────────────────────────────────── */
.back-btn {
    display: inline-block;
    margin-top: 20px;
    font-family: var(--font-ui);
    font-size: 14px;
    font-weight: 600;
    color: var(--accent);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.back-btn:hover {
    opacity: 0.75;
}

/* ── noscript warning ───────────────────────────────────────── */
.noscript-warning {
    text-align: center;
    padding: 16px;
    background: #fff3cd;
    color: #856404;
    font-size: 15px;
}

/* ── Footer ─────────────────────────────────────────────────── */
footer {
    text-align: center;
    font-size: 14px;
    color: var(--text-secondary);
    padding: 24px 20px 32px;
    margin-top: auto;
}