:root {
  font: 16px/1.5 "Segoe UI", system-ui, sans-serif;
  color: #f1f5ff;
  background: #10192a;
  color-scheme: dark;
  --surface: #17253a;
  --border: #435674;
  --muted: #bac9e1;
  --accent: #7ee0d0;
}
* { box-sizing: border-box; }
body { margin: 0; background: radial-gradient(ellipse at top right, #17374a, #10192a 68%); min-height: 100vh; }
main { width: min(880px, 100%); margin: auto; padding: clamp(24px, 6vw, 64px) clamp(16px, 4vw, 32px); }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(2rem, 7vw, 3.5rem); line-height: 1.08; letter-spacing: -.045em; margin: .3rem 0; }
h2 { font-size: 1.35rem; margin-bottom: .35rem; }
.brand { color: var(--accent); font-weight: 750; }
header > p:last-child, #identity, #expiry { color: var(--muted); }
#notice { min-height: 2rem; margin: 1.5rem 0 .6rem; color: var(--accent); }
#notice[data-error] { color: #ffbdac; }
.entry { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr)); gap: 1rem; align-items: stretch; }
.entry form, .card { background: var(--surface); border: 1px solid var(--border); border-radius: 1rem; padding: clamp(16px, 4vw, 26px); }
.entry form { display: flex; flex-direction: column; gap: .85rem; }
.entry button { margin-top: auto; width: max-content; }
label { display: grid; gap: .3rem; }
input, select, button { font: inherit; padding: .55rem .75rem; border-radius: .55rem; }
input, select { width: 100%; min-width: 0; min-height: 44px; background: #0e1a2b; border: 1px solid #637491; color: inherit; }
button { cursor: pointer; min-height: 44px; border: 1px solid transparent; background: var(--accent); color: #10232a; font-weight: 700; }
button.secondary { background: transparent; color: inherit; border-color: #637491; }
button:disabled, select:disabled { opacity: .55; cursor: default; }
:focus-visible { outline: 3px solid #fbd17e; outline-offset: 3px; }
.room-head, .actions, #piece-form { display: flex; flex-wrap: wrap; align-items: end; gap: .8rem; }
.room-head { justify-content: space-between; align-items: start; }
.pin { display: grid; border: 1px solid var(--border); border-radius: .7rem; padding: .45rem .8rem; }
.pin strong { color: var(--accent); font-size: 1.75rem; font-variant-numeric: tabular-nums; letter-spacing: .1em; }
#expiry, #turn, h3 { margin-top: .9rem; }
#turn { font-weight: 700; color: var(--accent); }
#members { list-style: none; margin: .55rem 0 1.2rem; padding: 0; }
#members li { padding: .45rem 0; border-bottom: 1px solid var(--border); overflow-wrap: anywhere; }
.actions { margin-top: 1rem; }
[hidden] { display: none !important; }
