:root {
    color-scheme: dark;
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
    background: #111714;
    color: #f4f2e9;
    font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 280px; }
.shell {
    min-height: 100svh;
    padding: clamp(24px, 6vw, 80px);
    background: radial-gradient(ellipse at 95% 25%, #2c3a2b 0, transparent 60%);
    display: flex;
    flex-direction: column;
    gap: 64px;
}
.brand { font-weight: 900; letter-spacing: .12em; }
.brand span { display: block; margin-top: 8px; font-size: .65rem; color: #b9c3b5; }
.intro { max-width: 820px; margin-block: auto; }
.eyebrow { color: #e9b652; font-size: .75rem; letter-spacing: .16em; font-weight: 700; }
h1 { font-size: clamp(2.5rem, 7vw, 5.5rem); line-height: 1.06; letter-spacing: -.05em; margin: 24px 0; }
.description { max-width: 540px; color: #b9c3b5; line-height: 1.7; }
.connection { margin-top: 32px; }
button {
    background: #e9b652;
    color: #171c15;
    border: 0;
    border-radius: 6px;
    padding: 15px 22px;
    font: inherit;
    font-weight: 750;
    cursor: pointer;
}
button:hover { background: #f5c873; }
button:focus-visible { outline: 3px solid #f4f2e9; outline-offset: 4px; }
button:disabled { opacity: .65; cursor: wait; }
#server-status, footer { color: #b9c3b5; font-size: .85rem; }
#server-status[data-state="error"] { color: #ffa99c; }
#server-status[data-state="success"] { color: #b6dd91; }

[hidden] { display: none !important; }
.table-link {display:inline-block;padding:12px 18px;background:#e9b652;color:#171c15;text-decoration:none;border-radius:6px;font-weight:700;}
.shell { gap: 28px; }
#entry { max-width: 820px; }
#room { width: 100%; max-width: 1280px; }
#room h1 { font-size: clamp(2rem, 4vw, 3.5rem); }
.panel { padding: clamp(18px, 3vw, 28px); background: #1c251f; border: 1px solid #3b483b; border-radius: 12px; margin-block: 20px; }
#entry-form { max-width: 540px; display: grid; gap: 12px; }
label { font-weight: 650; }
small { color: #b9c3b5; font-weight: 400; }
input { width: 100%; background: #111714; color: #f4f2e9; border: 1px solid #64725f; padding: 13px; border-radius: 6px; font: inherit; }
input:focus-visible { outline: 2px solid #e9b652; outline-offset: 2px; }
#room-code { text-transform: uppercase; letter-spacing: .12em; }
.actions, .room-header, .invite { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.room-header, .invite { justify-content: space-between; }
.actions { margin-top: 12px; }
.secondary { background: #2d3a2e; color: #f4f2e9; border: 1px solid #64725f; }
.secondary:hover { background: #425243; }
.invite strong { display: block; font-size: clamp(1.2rem, 4vw, 1.8rem); letter-spacing: .15em; margin-top: 8px; overflow-wrap: anywhere; }
.room-grid { display: grid; grid-template-columns: minmax(240px, 1fr) 2fr; gap: 20px; }
.room-grid .panel { margin-block: 0; }
h2 { font-size: 1.2rem; margin-top: 0; }
ul { padding-left: 20px; }
li { margin-block: 16px; line-height: 1.6; overflow-wrap: anywhere; }
.survivor-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.survivor { min-height: 64px; overflow-wrap: anywhere; }
button:disabled { cursor: default; }
#feedback { min-height: 1.5em; margin: 0; color: #b9c3b5; }
#feedback[data-state="error"] { color: #ffa99c; }
@media (max-width: 760px) { .room-grid { grid-template-columns: 1fr; } }
.player-entry {list-style:none;padding:8px;border-radius:6px;}
.player-active {background:#30462e;}
.player-name {display:block;font-size:14px;}
.player-characters {display:flex;gap:6px;flex-wrap:wrap;margin-top:7px;}
.player-character {width:34px;height:34px;border-radius:50%;object-fit:cover;border:2px solid #b7c5a9;}
#end-room {background:#472c28;color:#ffe0d7;border:1px solid #b66d61;}
