:root {
  color-scheme: dark;
  --ink: #eff5e6;
  --quiet: #b0bcaa;
  --grass: #99d958;
  --surface: #263428;
  --border: #58684e;
  --shade: #121b14;
  background: #19241a;
  color: var(--ink);
  font-family: system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 300px; }
[hidden] { display: none !important; }
h1, h2, .identity { font-family: ui-monospace, monospace; letter-spacing: -.04em; }
h1 { font-size: clamp(1.7rem, 5vw, 2.55rem); margin: 0 0 1.4rem; }
h2 { margin: 0 0 1rem; }
p { line-height: 1.5; }
a { color: var(--ink); text-underline-offset: .3em; }
button, input { font: inherit; }
button { background: #344635; color: var(--ink); border: 1px solid #7e9377; border-bottom: 3px solid #17201a; padding: .65rem .9rem; min-height: 42px; cursor: pointer; font-weight: 650; }
button:hover { filter: brightness(1.12); }
button:disabled { opacity: .55; cursor: wait; }
:focus-visible { outline: 3px solid var(--grass); outline-offset: 3px; }
input { color: var(--ink); background: #18241a; border: 1px solid #7b8a70; padding: .75rem; min-height: 44px; width: 100%; }
label { display: block; margin: .7rem 0 .32rem; color: var(--quiet); font-weight: 650; }
.primary { color: #18240e; background: #99d958; border-color: #bbef7c; border-bottom-color: #578431; }
.danger { background: #743c33; border-color: #c88873; border-bottom-color: #3f2925; }
.link-button { padding: .2rem 0; background: none; border: 0; color: #b7e88d; text-decoration: underline; text-underline-offset: .24em; }
.identity { display: flex; align-items: center; gap: .7rem; font-size: 1.38rem; font-weight: 850; }
.grass-block { width: 1.8rem; aspect-ratio: 1; display: inline-block; border: 2px solid #1e3019; border-top: 7px solid #8dcc4c; background: repeating-conic-gradient(#825a38 0 25%, #684528 0 50%) 0 / 9px 9px; box-shadow: 2px 2px 0 #111a12; }
.gate { min-height: 100svh; display: grid; place-items: center; padding: 1.5rem; background: radial-gradient(ellipse at 40% 30%, #3d5a35, transparent 60%), repeating-conic-gradient(#1c2a1e 0 25%, #1a261c 0 50%) 0 / 48px 48px; }
.gate-card { width: min(100%, 27rem); padding: clamp(1.4rem, 5vw, 2.35rem); border: 1px solid var(--border); border-top: 5px solid #89be56; background: var(--surface); box-shadow: 8px 8px 0 #141f14; }
.gate-card .identity { margin-bottom: 1.3rem; }
.gate-card form .primary { margin-top: 1.1rem; width: 100%; }
[role="alert"] { color: #ffbaa6; margin: .55rem 0 0; }
.topbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; background: #213024; border-bottom: 4px solid #73934d; padding: 1rem max(1rem, calc((100% - 72rem) / 2)); }
.topbar nav { display: flex; flex-wrap: wrap; gap: 1rem; }
.topbar a[aria-current="page"] { color: var(--grass); font-weight: 700; }
.dashboard { padding: 2rem 1rem 4rem; max-width: 74rem; margin: auto; }
.new-player, .roster, details, #feedback { background: var(--surface); border: 1px solid var(--border); padding: 1rem; }
.new-player > div { display: flex; gap: .55rem; }
.new-player button { white-space: nowrap; }
.roster, .occupants { list-style: none; }
.roster li, .occupants li { display: flex; justify-content: space-between; gap: .6rem; align-items: center; padding: .55rem 0; }
.roster li + li, .occupants li + li { border-top: 1px solid var(--border); }
.world-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.world-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); gap: .8rem; align-items: start; }
summary { min-height: 44px; cursor: pointer; }
summary strong { color: var(--ink); }
summary small { color: var(--quiet); display: block; margin: .35rem 0 0 1rem; }
.occupants { margin: .4rem 0 0; padding: .25rem 0 0; }
dialog { border: 2px solid var(--border); border-top: 5px solid var(--grass); padding: 1.3rem; background: var(--surface); color: var(--ink); width: min(90%, 28rem); }
dialog::backdrop { background: #0c130cbb; }
.dialog-actions { display: flex; gap: .6rem; justify-content: flex-end; margin-top: 1.15rem; }
@media (max-width: 480px) { .new-player > div { flex-direction: column; } .topbar nav { order: 3; width: 100%; } }
