:root {
    color-scheme: light;
    --ink: #30261d;
    --muted: #6d5a46;
    --parchment: #f4e9d4;
    --paper-light: #faf2e1;
    --line: #cfb48d;
    --night: #191613;
    --night-mid: #26201a;
    --gold: #ddb16d;
    --rust: #7c4828;
    --serif: "Cinzel", Georgia, serif;
    --sans: "Instrument Sans", system-ui, sans-serif;
    font-family: var(--sans);
    background: var(--night);
    color: var(--ink);
}
* { box-sizing: border-box; }
body {
    margin: 0;
    min-width: 0;
    min-height: 100vh;
    background: radial-gradient(ellipse at 50% 5%, #403226 0, #211b16 55%, #191613 85%);
}
a { color: inherit; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .52; }
:focus-visible { outline: 2px solid #a06024; outline-offset: 4px; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--serif); }
small { font-size: .8rem; }
.skip { position: fixed; top: -3rem; left: 1rem; z-index: 50; background: white; padding: .6rem; }
.skip:focus { top: 1rem; }
.wrap, .header-wrap, .clock-wrap { width: min(1224px, calc(100% - 72px)); margin-inline: auto; }
.masthead { position: sticky; top: 0; z-index: 10; color: #f5e5c9; background: var(--night); box-shadow: 0 4px 16px #0d0b0a50; }
.header-wrap { min-height: 76px; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; flex-shrink: 0; }
.brand img { filter: drop-shadow(0 2px 2px #000); }
.brand strong { display: block; font: 750 clamp(1rem, 2vw, 1.31rem)/1.1 var(--serif); letter-spacing: .015em; }
nav { display: flex; align-self: stretch; align-items: stretch; gap: 8px; }
nav a { position: relative; display: flex; align-items: center; gap: 7px; padding-inline: 12px; text-decoration: none; font-size: .87rem; color: #cdbba4; white-space: nowrap; }
nav a:hover, nav a[aria-current="page"] { color: #f8d99e; }
nav a[aria-current="page"]::after { content: ""; position: absolute; inset: auto 10px 0; height: 2px; background: var(--gold); }
.icon { width: 1.04em; height: 1.04em; flex: none; vertical-align: -.14em; }
.unread { display: inline-grid; place-items: center; font-size: .65rem; min-width: 1.14rem; height: 1.14rem; padding: 0 .16rem; background: #d4a260; color: #251a12; border-radius: 50px; }
.account { display: flex; align-items: center; gap: .65rem; }
.account button { color: #c7af8a; background: none; border: 1px solid #5d4834; padding: .35rem .55rem; border-radius: 4px; }
.account-name { overflow: hidden; max-width: 15ch; text-overflow: ellipsis; white-space: nowrap; font-size: .83rem; }
.clock-bar { border-top: 1px solid #493626; border-bottom: 1px solid #715333; background: linear-gradient(90deg, #2f241a, #31261e 50%, #261e18); }
.clock-wrap { min-height: 48px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; }
.server { color: #d8bd94; font-size: .7rem; letter-spacing: .13em; text-transform: uppercase; font-weight: 700; white-space: nowrap; }
.server i { display: inline-block; width: 7px; height: 7px; margin-right: .45rem; background: #a9aa70; border-radius: 50%; box-shadow: 0 0 9px #a9aa7040; }
.countdown { display: flex; align-items: center; gap: 13px; font-variant-numeric: tabular-nums; color: #f0d6a8; font-weight: 700; white-space: nowrap; }
.clock-label, .countdown small { color: #bc9f78; font-weight: 650; font-size: .64rem; text-transform: uppercase; letter-spacing: .11em; }
.countdown small { margin-left: .18rem; }
.tick { min-width: 2.75ch; display: inline-block; font-size: 1.02rem; text-align: right; }
#start-time { text-align: right; color: #dbc7a8; font-size: .74rem; }
main.wrap { padding-block: 24px 40px; }
.hero {
    min-height: 306px; display: flex; align-items: center; position: relative; isolation: isolate;
    border: 1px solid #916b46; border-radius: 6px; color: #f8ead2; overflow: hidden;
    background: linear-gradient(90deg, #180f0cea 0%, #1e1410c4 29%, #23150e1c 70%),
        url('/aesoland-map.jpg') 50% 48% / cover, #271b14;
    box-shadow: 0 14px 28px #130d0a48, inset 0 0 38px #140e0b60;
}
.hero::after, .frame::after { content: ""; position: absolute; z-index: -1; inset: 6px; border: 1px solid #c4a06b6e; border-radius: 3px; pointer-events: none; }
.hero-copy { padding: clamp(26px, 5vw, 62px); max-width: 38rem; }
.hero h1 { margin: .3rem 0 .55rem; font-size: clamp(2.8rem, 6vw, 5.4rem); line-height: .99; letter-spacing: -.055em; text-shadow: 0 4px 15px #140e0c80; }
.eyebrow { display: inline-flex; align-items: center; gap: .55rem; font-size: .68rem; text-transform: uppercase; font-weight: 750; letter-spacing: .18em; color: var(--rust); }
.hero .eyebrow { color: #edbc73; }
.hero p { margin-top: 1rem; color: #f3ddba; max-width: 34ch; font-size: 1rem; line-height: 1.5; }
.hero-caption { position: absolute; bottom: 15px; right: 19px; font-family: var(--serif); color: #ffedce; text-shadow: 0 2px 5px #1a120e; font-size: .72rem; }
.rsvp-heading { margin-top: .5rem; font-size: clamp(1.25rem, 2vw, 1.6rem); }
.organizer-time { margin-top: .32rem; color: #6b5034; font-size: .8rem; font-weight: 650; }
#latest-alert:empty { display: none; }
.deck { margin-top: 23px; display: grid; grid-template-columns: minmax(0, 2fr) minmax(285px, .95fr); gap: 22px; align-items: start; }
.stack { display: grid; gap: 20px; min-width: 0; }
.paper {
    background-color: var(--parchment);
    background-image: radial-gradient(ellipse at top left, #fff7e785, #ebd5b048),
        repeating-linear-gradient(122deg, #80572806 0, #80572806 1px, transparent 1px, transparent 5px);
    border: 1px solid #b19166; border-radius: 5px; box-shadow: 0 5px 15px #0f090a40;
}
.frame { position: relative; isolation: isolate; }
.frame::after { border-color: #b5905b52; }
.panel { padding: clamp(20px, 3vw, 32px); }
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
.panel-head h2 { font-size: clamp(1.32rem, 2.6vw, 1.8rem); letter-spacing: -.035em; }
.panel-head p, .muted { color: var(--muted); }
.panel-head p { margin-top: 5px; line-height: 1.5; }
.section-title { color: #f3dfbd; padding-block: 6px 20px; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.section-title h1 { font-size: clamp(2rem, 5vw, 3.1rem); letter-spacing: -.035em; }
.section-title p { margin-top: .35rem; color: #d3bd9d; }
.section-title .eyebrow { color: var(--gold); }
.round-tabs, .admin-tabs { display: flex; flex-wrap: wrap; gap: 7px; margin: 0 0 20px; }
.tab { flex: 1 0 auto; background: #e8d8bb; color: #664d36; border: 1px solid #bd9f76; border-radius: 3px; padding: .55rem .7rem; font-weight: 700; min-height: 41px; }
.tab:hover { background: #efd7ab; }
.tab[aria-selected="true"], .tab[aria-pressed="true"] { background: linear-gradient(#f4d69d, #dbad6b); color: #4c2c16; border-color: #a16e3c; box-shadow: inset 0 0 0 2px #ffedc480; }
.round-content { display: grid; grid-template-columns: minmax(0, 1fr) minmax(160px, 1fr); border: 1px solid #d2b792; border-radius: 4px; min-height: 205px; background: #fff5e53b; }
.monster { position: relative; display: grid; align-content: center; justify-items: center; padding: 17px 12px; min-width: 0; text-align: center; }
.monster img { width: 88px; height: 96px; opacity: .88; }
.monster h3 { margin-top: .62rem; font-size: clamp(1.05rem, 2.4vw, 1.45rem); overflow-wrap: anywhere; }
.stars { color: #8a4d1e; font-weight: 750; font-size: .82rem; margin-top: .25rem; }
.difficulties { display: grid; align-content: center; gap: 9px; padding: 15px; border-left: 1px solid #d6bb96; }
.difficulty { display: flex; justify-content: space-between; align-items: center; gap: 7px; padding: .6rem .7rem; background: #e6dac3; border: 1px solid #c5ad8c; border-left: 3px solid #9a8e7a; border-radius: 2px; }
.difficulty.gold { background: #efd7a8; border-color: #cca467; border-left-color: #a1682a; }
.difficulty span { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.difficulty strong { font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.round-weapons { margin-top: 16px; display: flex; gap: 7px; align-items: center; flex-wrap: wrap; }
.round-note { margin-top: 11px; color: #63513e; line-height: 1.45; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: .22rem .47rem; background: #e7d6b8; color: #604525; border: 1px solid #c6aa80; border-radius: 4px; font-size: .76rem; font-weight: 650; }
.chip.positive { color: #33452c; background: #e0e0c5; border-color: #a5ad83; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: .48rem; min-height: 41px; padding: .54rem .9rem; border: 1px solid #9c713f; border-radius: 4px; background: linear-gradient(#f3d79c, #dbb170); color: #452811; font-weight: 750; text-decoration: none; text-align: center; }
.button:hover { background: #f2d08b; }
.button.secondary { background: #f8edd8; border-color: #c6a97e; color: #654521; }
.button.secondary:hover { background: #efdbb8; }
.button.quiet { background: none; border-color: transparent; color: #77441e; }
.button.quiet:hover { background: #af7c301b; }
.button.dark { color: #f7dfb5; background: #3e2c20; border-color: #95663d; }
.button.dark:hover { background: #573b28; }
.wide { width: 100%; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin-top: 16px; }
.sidebar-copy { color: var(--muted); line-height: 1.5; margin-block: 10px 14px; }
.sidebar-meta { display: flex; gap: 8px; align-items: center; color: #5f492f; font-size: .88rem; padding-top: 14px; margin-top: 15px; border-top: 1px solid #ccb18a; }
.bulletin { background: #32271f; border: 1px solid #79573a; color: #f3e3c8; }
.bulletin .eyebrow { color: #e4b876; }
.bulletin strong { display: block; margin-top: .55rem; font-size: 1rem; }
.bulletin p { color: #d9c2a5; margin: .5rem 0 .8rem; font-size: .88rem; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.bulletin a { color: #f3c989; font-size: .82rem; font-weight: 750; text-underline-offset: .2em; }
.loading { color: #f0d6a8; padding: 2rem; }
.form { display: grid; gap: 16px; }
.form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
label.field { display: grid; align-content: start; gap: .35rem; color: #533c26; font-size: .86rem; font-weight: 700; }
input, textarea, select { width: 100%; min-width: 0; min-height: 40px; border: 1px solid #bd9d74; border-radius: 3px; padding: .5rem .58rem; background: #fff8e9; color: #36251a; }
input[readonly] { background: #e9dcc3; }
textarea { min-height: 78px; resize: vertical; }
fieldset { margin: 0; padding: 14px; border: 1px solid #cfb28b; min-width: 0; }
legend { padding: 0 .35rem; font-weight: 750; color: #614322; }
.check-list { display: flex; gap: 7px; flex-wrap: wrap; }
.check-list label { display: inline-flex; align-items: center; gap: .4rem; padding: .25rem .45rem; background: #f7edda; border: 1px solid #d0b78f; border-radius: 3px; font-size: .81rem; }
.check-list input { min-height: auto; width: auto; margin: 0; accent-color: #865325; }
.loadout { display: grid; grid-template-columns: 1.3fr 1fr 1fr auto; align-items: end; gap: 8px; margin: 0 0 9px; }
.loadout button { padding: .35rem .55rem; }
.empty { padding: 22px; background: #e8d9bc83; border: 1px dashed #bfa177; color: #644a32; border-radius: 3px; }
.empty p + p { margin-top: .5rem; }
.empty .actions { margin-top: 12px; }
.alert-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 11px; }
.alert-list li { padding: 14px; border: 1px solid #c9ad83; border-radius: 4px; background: #f9edd8; overflow-wrap: anywhere; }
.alert-list li.new { border-left: 4px solid #936237; }
.alert-list time { display: block; color: #745b41; margin-top: .35rem; font-size: .78rem; }
.alert-list p { white-space: pre-wrap; margin-top: .55rem; }
.squad-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 14px; }
.squad-card { border: 1px solid #c6a67b; border-radius: 4px; background: #f8edd8; padding: 14px; min-width: 0; }
.squad-card.mine { box-shadow: inset 0 0 0 2px #b67c37; }
.squad-card h3 { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; font-size: 1.05rem; overflow-wrap: anywhere; }
.squad-card h3 .chip { font-family: var(--sans); }
.member, .roster-hunter { padding: 9px 0; border-top: 1px solid #dec8a8; display: flex; align-items: center; justify-content: space-between; gap: 8px; overflow-wrap: anywhere; }
.member small, .roster-hunter small { display: block; color: #735c40; }
.squad-card .field { margin-top: 8px; }
.admin-head { flex-wrap: wrap; }
.assign-grid { display: grid; grid-template-columns: minmax(245px, .95fr) minmax(0, 1.65fr); gap: 18px; }
.roster-search { display: grid; gap: 8px; margin-bottom: 10px; }
.roster-hunter { display: block; }
.roster-hunter .chips { margin-top: 5px; }
.roster-hunter .pref { margin-top: 4px; }
.roster-list { max-height: 640px; overflow-y: auto; }
.round-editor { display: grid; gap: 12px; }
.round-editor .button { justify-self: start; }
.notice { padding: .75rem; border-left: 3px solid #9e6c38; background: #f1dcaf; color: #634321; }
.login-card { margin-top: 20px; }
.login-card .actions { margin-top: 14px; }
#feedback {
    position: fixed; z-index: 20; bottom: 18px; right: 18px; max-width: min(430px, calc(100vw - 36px));
    padding: .85rem 1rem; border: 1px solid #a8804a; border-radius: 4px; background: #39291c; color: #ffe6ba; box-shadow: 0 8px 32px #0007;
}
#feedback.error { background: #502b22; border-color: #b37158; }
@media (max-width: 980px) {
    .header-wrap { gap: 9px; }
    nav { gap: 2px; }
    nav a { padding-inline: 8px; }
    .account-name { display: none; }
}
@media (max-width: 770px) {
    .wrap, .header-wrap, .clock-wrap { width: calc(100% - 32px); }
    .header-wrap { display: grid; grid-template-columns: 1fr auto; min-height: 0; gap: 0 9px; padding-top: 7px; }
    .brand img { width: 36px; height: 40px; }
    nav { grid-row: 2; grid-column: 1 / -1; overflow-x: auto; scrollbar-width: none; min-height: 42px; justify-content: space-between; }
    nav a { font-size: .81rem; padding-inline: 5px; }
    nav a[aria-current="page"]::after { inset-inline: 4px; }
    #account { grid-column: 2; grid-row: 1; }
    .clock-wrap { grid-template-columns: auto 1fr; min-height: 42px; gap: 3px 8px; padding-block: 4px; }
    .countdown { justify-self: end; gap: 7px; }
    #start-time { grid-column: 2; font-size: .66rem; }
    main.wrap { padding-top: 16px; }
    .deck { grid-template-columns: 1fr; }
    .hero { min-height: 245px; }
    .assign-grid { grid-template-columns: 1fr; }
    .roster-list { max-height: 340px; }
}
@media (max-width: 490px) {
    .wrap, .header-wrap, .clock-wrap { width: calc(100% - 24px); }
    .brand { gap: 7px; }
    nav a .icon { display: none; }
    .clock-label { display: none; }
    .server { font-size: .61rem; }
    .hero { background-position: center, 59% 48%; }
    .hero-caption { font-size: .61rem; }
    .panel { padding: 17px; }
    .round-content { grid-template-columns: 1fr; }
    .difficulties { border-left: 0; border-top: 1px solid #d6bb96; }
    .form-grid, .form-grid.two { grid-template-columns: 1fr; }
    .loadout { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .section-title { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 340px) {
    nav a { font-size: .76rem; padding-inline: 3px; gap: 4px; }
    .account .button { font-size: .76rem; padding-inline: .55rem; }
    .clock-wrap { gap: 3px 4px; }
    .countdown { gap: 4px; }
}
