:root {
    color-scheme: light;
    --ink: #17233c;
    --muted: #65708a;
    --line: #e3e8f2;
    --surface: #ffffff;
    --background: #f4f7fb;
    --primary: #3458d1;
    --primary-dark: #2444af;
    --success: #16835b;
    --success-soft: #e9f8f1;
    --warning: #9a6500;
    --warning-soft: #fff6de;
    --danger: #aa3b3b;
    --danger-soft: #fff0f0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-width: 320px;
    color: var(--ink);
    background:
        radial-gradient(circle at 8% 0%, #e8efff 0, transparent 34rem),
        var(--background);
}

button, input { font: inherit; }
button { cursor: pointer; }

.page-shell { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 38px 0 28px; }
.hero, .city-section, .selection-panel { background: rgba(255,255,255,.92); border: 1px solid var(--line); box-shadow: 0 14px 38px rgba(37, 58, 110, .08); }
.hero { border-radius: 26px; padding: clamp(28px, 5vw, 52px); position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; width: 230px; height: 230px; border-radius: 50%; background: #eef2ff; right: -68px; top: -70px; z-index: 0; }
.hero > * { position: relative; z-index: 1; }
.eyebrow { color: var(--primary); font-weight: 800; font-size: .75rem; letter-spacing: .13em; text-transform: uppercase; }
h1, h2, p { margin-top: 0; }
h1 { max-width: 700px; margin-bottom: 10px; font-size: clamp(1.05rem, 5vw, 1.5rem); line-height: 1.03; letter-spacing: -.045em; }
h2 { margin-bottom: 0; font-size: clamp(1.35rem, 3vw, 1.9rem); letter-spacing: -.025em; }
.lead { max-width: 690px; margin-bottom: 24px; color: var(--muted); font-size: clamp(1rem, 2vw, 1.0rem); line-height: 1.0; }
.status-row { display: flex; flex-wrap: wrap; gap: 10px; }
.status-pill { display: inline-flex; align-items: center; gap: 8px; padding: 9px 13px; border-radius: 999px; background: #f7f9fd; color: var(--muted); font-size: .9rem; }
.status-pill strong { color: var(--ink); }
.status-dot { width: 9px; height: 9px; border-radius: 50%; }
.status-dot.free { background: #30ad78; }
.status-dot.claimed { background: #b9c1d2; }

.notice { margin: 18px 0; padding: 14px 18px; border-radius: 13px; border: 1px solid transparent; line-height: 1.45; }
.notice.info { color: #31517a; background: #edf4ff; border-color: #cfe0ff; }
.notice.success { color: var(--success); background: var(--success-soft); border-color: #bdebd5; }
.notice.warning { color: var(--warning); background: var(--warning-soft); border-color: #f2dfaa; }
.notice.error { color: var(--danger); background: var(--danger-soft); border-color: #f4c7c7; }

.selection-panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 1.2fr); gap: 28px; margin-top: 18px; padding: 26px; border-radius: 20px; border-color: #c9d5ff; background: linear-gradient(130deg, #f1f4ff, #fff); }
.selection-copy p { color: var(--muted); line-height: 1.55; margin: 12px 0 0; }
.selection-copy h2 { margin-top: 7px; }
.credentials { display: grid; gap: 12px; }
.credential-field { display: grid; gap: 6px; color: var(--muted); font-size: .85rem; font-weight: 700; }
.credential-input { display: flex; gap: 7px; }
.credential-input input { min-width: 0; flex: 1; padding: 11px 12px; border: 1px solid #ccd5e6; border-radius: 10px; color: var(--ink); background: white; }
.copy-button { border: 1px solid #ccd5e6; border-radius: 10px; padding: 0 12px; color: var(--ink); background: white; }
.copy-button:hover { border-color: var(--primary); color: var(--primary); }
.credential-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 3px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 43px; border: 0; border-radius: 10px; padding: 0 15px; text-decoration: none; font-weight: 800; }
.button.primary { color: white; background: var(--primary); }
.button.primary:hover { background: var(--primary-dark); }
.button.secondary { color: var(--ink); background: white; border: 1px solid #ccd5e6; }

.city-section { margin-top: 18px; padding: clamp(22px, 4vw, 34px); border-radius: 20px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.last-updated { color: var(--muted); font-size: .82rem; white-space: nowrap; }
.city-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); gap: 11px; }
.city-card { display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; min-height: 92px; padding: 15px; border: 1px solid #dbe2ee; border-radius: 14px; color: var(--ink); background: #fff; text-align: left; transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease, background .15s ease; }
.city-card:not(:disabled):hover { transform: translateY(-2px); border-color: #9eaff0; box-shadow: 0 8px 20px rgba(52, 88, 209, .12); }
.city-card:focus-visible, .button:focus-visible, .copy-button:focus-visible { outline: 3px solid #aebdff; outline-offset: 2px; }
.city-name { font-weight: 800; line-height: 1.2; }
.city-status { margin-top: 10px; color: var(--success); font-size: .76rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.city-card.is-claimed { color: #8791a6; background: #f0f3f7; border-color: #e1e5ec; cursor: not-allowed; }
.city-card.is-claimed .city-status { color: #8b95a9; }
.city-card.is-selected { border-color: #8aa0f0; background: #edf1ff; }
.city-card:disabled:not(.is-claimed) { opacity: .7; cursor: wait; }

.footer { display: flex; justify-content: space-between; gap: 20px; margin-top: 20px; padding: 0 4px; color: var(--muted); font-size: .82rem; }
.footer a { color: var(--primary); text-decoration: none; }
.footer a:hover { text-decoration: underline; }

@media (max-width: 700px) {
    .page-shell { width: min(100% - 20px, 1180px); padding-top: 10px; }
    .selection-panel { grid-template-columns: 1fr; }
    .section-heading, .footer { align-items: flex-start; flex-direction: column; }
    .last-updated { white-space: normal; }
    .city-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
