:root {
  --ink: #26332b;
  --muted: #5d6b62;
  --paper: rgba(250, 248, 242, 0.84);
  --line: rgba(38, 51, 43, 0.12);
  --accent: #2f4a3a;
  --warm: #8a6240;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--ink);
  background: #dbe7ec;
}
* { box-sizing: border-box; }
body { margin: 0; overflow: hidden; }
[hidden] { display: none !important; }
#world { position: fixed; inset: 0; width: 100%; height: 100%; outline: none; touch-action: none; }

/* The first screen (and the pause screen): a name and one button over the island; the real menu is the 3D scene behind it. */
.menu {
  position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; padding: 0 5vw; z-index: 5;
  background: radial-gradient(ellipse at 50% 55%, rgba(6, 10, 8, 0.42), rgba(3, 5, 4, 0.9) 78%);
  transition: opacity 0.7s ease; color: #ece8dc;
}
.menu.fade { opacity: 0; pointer-events: none; }
.landing { display: flex; flex-direction: column; align-items: center; text-align: center; width: min(760px, 100%); }
.landing h1 {
  margin: 0 0 34px; font-size: clamp(28px, 4.6vw, 54px); line-height: 1.02; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase;
  text-shadow: 0 2px 28px rgba(0, 0, 0, 0.7);
}
.landing h1 b { display: block; font-weight: 800; letter-spacing: 0.32em; color: #d9cfae; }
.name-field input {
  width: 260px; height: 44px; padding: 0 16px; text-align: center; font: 600 15px system-ui, sans-serif; letter-spacing: 0.08em;
  color: #ece8dc; background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(236, 232, 220, 0.28); border-radius: 4px; outline: none;
}
.name-field input::placeholder { color: rgba(236, 232, 220, 0.45); }
.name-field input:focus { border-color: rgba(217, 207, 174, 0.8); background: rgba(255, 255, 255, 0.11); }
.landing .note { color: #e9a58f; min-height: 20px; margin: 8px 0 12px; }
.account { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.account[hidden], .enter[hidden] { display: none; }
.account .note { margin: 2px 0 4px; max-width: 320px; }
.acc-tabs { display: flex; gap: 4px; padding: 4px; margin-bottom: 6px; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(236, 232, 220, 0.14); border-radius: 6px; }
.acc-tabs button { height: 34px; padding: 0 18px; font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(236, 232, 220, 0.55); background: transparent; border: 0; border-radius: 4px; }
.acc-tabs button:hover { color: #ece8dc; }
.acc-tabs button.on { color: #15180f; background: #d9cfae; }
.pw-rules { display: flex; gap: 14px; margin: 2px 0 0; padding: 0; list-style: none; font-size: 12px; letter-spacing: 0.04em; color: rgba(236, 232, 220, 0.45); }
.pw-rules li::before { content: '○ '; }
.pw-rules li.ok { color: #9fd8a8; }
.pw-rules li.ok::before { content: '● '; }
.signed-in { margin: 0 0 18px; font-size: 14px; letter-spacing: 0.04em; color: rgba(236, 232, 220, 0.7); }
.signed-in b { color: #ece8dc; }
.signed-in .link { height: auto; padding: 0; margin-left: 14px; font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(236, 232, 220, 0.5); background: none; border: 0; border-radius: 0; text-decoration: underline; text-underline-offset: 3px; }
.signed-in .link:hover { color: #ece8dc; }
button {
  font: inherit; font-size: 15px; font-weight: 600; height: 48px; padding: 0 22px; border-radius: 12px;
  cursor: pointer; transition: transform 0.15s, background 0.15s, box-shadow 0.15s, opacity 0.15s;
}
.primary { background: var(--accent); color: #f6f4ec; border: 0; box-shadow: 0 6px 18px rgba(47, 74, 58, 0.28); }
.primary:hover:not(:disabled) { transform: translateY(-1px); background: #3a5a47; }
.secondary { background: rgba(255, 255, 255, 0.7); color: var(--ink); border: 1px solid var(--line); }
.secondary:hover:not(:disabled) { background: #fff; transform: translateY(-1px); }
button:disabled { cursor: default; opacity: 0.55; }
button:focus-visible { outline: 3px solid #d9cfae; outline-offset: 3px; }
.enter {
  min-width: 260px; height: 54px; padding: 0 34px; font-size: 17px; font-weight: 800; letter-spacing: 0.4em; text-indent: 0.4em; text-transform: uppercase;
  color: #15180f; background: #d9cfae; border: 0; border-radius: 4px; box-shadow: 0 10px 34px rgba(0, 0, 0, 0.45);
}
.enter:hover:not(:disabled) { transform: translateY(-2px); background: #ebe2c3; box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5); }
.tools { display: flex; gap: 10px; margin-top: 18px; }
.tool { height: 32px; padding: 0 14px; font-size: 12px; font-weight: 600; letter-spacing: 0.06em; color: rgba(236, 232, 220, 0.75); background: transparent; border: 1px solid rgba(236, 232, 220, 0.25); border-radius: 4px; }
.tool:hover:not(:disabled) { color: #fff; border-color: rgba(236, 232, 220, 0.6); }
.credits { margin-top: 34px; max-width: 420px; font-size: 11px; color: rgba(236, 232, 220, 0.5); }
.credits summary { cursor: pointer; letter-spacing: 0.1em; text-transform: uppercase; }
.credits p { margin: 10px 0 0; line-height: 1.55; text-align: left; max-height: 24vh; overflow: auto; }
.credits a { color: rgba(236, 232, 220, 0.75); }
.note { min-height: 18px; margin: 12px 0 0; font-size: 13px; color: var(--muted); }
kbd {
  display: inline-block; min-width: 20px; margin-right: 2px; padding: 2px 6px; border-radius: 5px;
  font: 600 11px/1.4 system-ui, sans-serif; text-align: center;
  background: #fff; border: 1px solid var(--line); border-bottom-width: 2px;
}

#hud {
  position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); display: flex; gap: 14px;
  padding: 9px 14px; border-radius: 12px; font-size: 12px; color: var(--muted);
  background: rgba(250, 248, 242, 0.72); backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, 0.6);
  pointer-events: none; white-space: nowrap;
}
#toast {
  position: fixed; left: 50%; top: 22px; transform: translate(-50%, -8px); padding: 10px 18px; border-radius: 10px;
  background: rgba(38, 51, 43, 0.9); color: #f3f1e8; font-size: 14px; opacity: 0; pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
}
#toast.visible { opacity: 1; transform: translate(-50%, 0); }
#error {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(440px, calc(100% - 32px)); z-index: 30;
  padding: 26px; border-radius: 16px; background: #faf8f2; box-shadow: 0 20px 70px rgba(0, 0, 0, 0.2);
}
#error h2 { margin: 0 0 8px; }
#error p { margin: 0; line-height: 1.6; color: var(--muted); }

/* First-load veil: covers the sign-in until the island menu has streamed in (it can take a minute or two). */
#loading-screen {
  position: fixed; inset: 0; z-index: 8; display: flex; align-items: center; justify-content: center; padding: 0 5vw;
  background: radial-gradient(ellipse at 50% 50%, #12160f, #040503 74%); color: #ece8dc;
  font-family: system-ui, -apple-system, Segoe UI, sans-serif;
}
#loading-screen[hidden] { display: none; }
.load-card { text-align: center; width: min(520px, 100%); }
.load-card h1 { font-size: clamp(26px, 6vw, 44px); font-weight: 300; letter-spacing: 0.18em; text-transform: uppercase; margin: 0 0 30px; }
.load-card h1 b { display: block; font-weight: 800; letter-spacing: 0.32em; color: #d9cfae; }
.load-bar { width: 220px; max-width: 70%; height: 4px; margin: 0 auto 22px; border-radius: 3px; background: rgba(236, 232, 220, 0.14); overflow: hidden; }
.load-bar i { display: block; height: 100%; width: 40%; border-radius: 3px; background: #d9cfae; animation: load-slide 1.3s ease-in-out infinite; }
@keyframes load-slide { 0% { transform: translateX(-120%); } 100% { transform: translateX(320%); } }
.load-msg { margin: 0 0 6px; font-size: 15px; letter-spacing: 0.14em; text-transform: uppercase; color: #d9cfae; }
.load-sub { margin: 0; font-size: 13px; color: rgba(236, 232, 220, 0.62); }
.load-file { margin: 14px auto 0; max-width: 100%; font: 12px/1.4 ui-monospace, Consolas, monospace; color: rgba(236, 232, 220, 0.5); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }

/* Admin 3-D match replay overlay (only shown when the page is opened with ?replay=) */
#replay-ui { position: fixed; inset: 0; z-index: 40; pointer-events: none; font-family: system-ui, -apple-system, Segoe UI, sans-serif; color: #ece8dc; }
#replay-ui[hidden] { display: none; }
#replay-ui .rv-top { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: linear-gradient(180deg, rgba(4,6,4,0.8), rgba(4,6,4,0)); pointer-events: auto; }
#replay-ui .rv-top b { font-size: 16px; letter-spacing: 0.04em; }
#replay-ui #rv-sub { color: #e8c86a; font-size: 13px; }
#replay-ui .rv-right { margin-left: auto; display: flex; gap: 8px; }
#replay-ui .rv-btn { font: inherit; height: 34px; padding: 0 14px; border-radius: 6px; border: 1px solid rgba(236,232,220,0.25); background: rgba(20,24,16,0.7); color: #ece8dc; font-weight: 700; cursor: pointer; }
#replay-ui .rv-btn:hover { background: rgba(40,46,34,0.9); }
#replay-ui .rv-ban { background: #8a3a2e; border-color: #a24435; }
#replay-ui .rv-ban:hover { background: #a24435; }
#replay-ui .rv-status { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); background: rgba(4,6,4,0.85); padding: 14px 22px; border-radius: 10px; font-size: 15px; pointer-events: auto; }
#replay-ui .rv-status:empty { display: none; }
#replay-ui .rv-bar { position: absolute; left: 50%; bottom: 46px; transform: translateX(-50%); width: min(820px, 92vw); display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 10px; background: rgba(4,6,4,0.78); border: 1px solid rgba(236,232,220,0.14); pointer-events: auto; }
#replay-ui .rv-play { width: 44px; }
#replay-ui #rv-seek { flex: 1; accent-color: #d9cfae; }
#replay-ui #rv-time { font-variant-numeric: tabular-nums; font-size: 13px; color: rgba(236,232,220,0.8); min-width: 92px; text-align: right; }
#replay-ui .rv-view { font: inherit; height: 30px; max-width: 150px; padding: 0 8px; border-radius: 5px; border: 1px solid rgba(236,232,220,0.2); background: rgba(20,24,16,0.9); color: #ece8dc; font-size: 12px; cursor: pointer; }
#replay-ui .rv-speed { display: inline-flex; gap: 4px; }
#replay-ui .rv-speed button { font: inherit; height: 30px; padding: 0 9px; border-radius: 5px; border: 1px solid rgba(236,232,220,0.2); background: transparent; color: rgba(236,232,220,0.7); font-weight: 700; font-size: 12px; cursor: pointer; }
#replay-ui .rv-speed button.on { background: #d9cfae; color: #15180f; border-color: #d9cfae; }
#replay-ui .rv-help { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); font-size: 12px; color: rgba(236,232,220,0.55); white-space: nowrap; }
#replay-ui .rv-help b { color: rgba(236,232,220,0.85); }
/* Health and stamina, bottom left (in VR they're on your watch). */
#vitals { position: fixed; left: 18px; bottom: 18px; display: grid; gap: 6px; pointer-events: none; }
#hud[hidden] + #vitals { display: none; }
.vital { display: flex; align-items: center; gap: 8px; font: 700 11px system-ui, sans-serif; color: #f3f1e8; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7); }
.vital b { width: 26px; }
.vital i { display: block; width: 170px; height: 9px; border-radius: 5px; background: rgba(20, 26, 24, 0.6); overflow: hidden; }
.vital u { display: block; height: 100%; width: 100%; background: #3fae63; transition: width 0.15s; }
body.in-vr .menu, body.in-vr #hud, body.in-vr #vitals { display: none !important; }

@media (max-width: 720px) {
  .menu { align-items: flex-end; padding: 16px; background: none; }
  .card { padding: 24px; }
  h1 { font-size: 32px; }
  .controls { grid-template-columns: 1fr; gap: 16px; }
  #hud { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---- Grip editor (this PC only) ---- */
#grip-panel {
  position: fixed; top: 16px; right: 16px; bottom: 16px; width: 300px; overflow-y: auto; padding: 16px 18px;
  border-radius: 16px; background: var(--paper); border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 18px 60px rgba(38, 60, 50, 0.2); backdrop-filter: blur(14px); font-size: 13px;
}
#grip-panel header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
#grip-panel h2 { margin: 0; font-size: 17px; letter-spacing: -0.01em; }
#grip-panel button { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 9px; background: rgba(255, 255, 255, 0.75); color: var(--ink); border: 1px solid var(--line); }
#grip-panel button.on { background: var(--ink); color: #f6f4ec; }
#grip-panel button.primary { background: var(--accent); color: #f6f4ec; border: 0; }
#grip-panel label { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 6px 0; }
#grip-panel select, #grip-panel input[type=number] { font: inherit; width: 110px; padding: 5px 7px; border-radius: 8px; border: 1px solid var(--line); background: #fff; }
#grip-panel input[type=number] { width: 80px; }
#grip-panel input[type=range] { width: 120px; }
#grip-panel fieldset { margin: 10px 0; padding: 6px 10px 8px; border: 1px solid var(--line); border-radius: 10px; }
#grip-panel legend { padding: 0 4px; font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
#grip-panel .ge-row { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0; }
#grip-panel .ge-check { justify-content: flex-start; }
#grip-panel kbd { font-size: 10px; padding: 0 4px; }
#ge-status { min-height: 18px; margin: 4px 0; font-weight: 600; color: var(--accent); }
.ge-help { margin: 6px 0 0; color: var(--muted); line-height: 1.5; }
#grip-panel button.on kbd { color: var(--ink); }
#ge-pose-sliders h3 { margin: 10px 0 2px; font-size: 12px; }
#ge-pose-sliders output { width: 34px; text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
#ge-pose-sliders label { gap: 6px; }

/* Username, before you can play */
.name-error { color: #a33a2a; min-height: 1.2em; margin: 0 0 8px; }

/* Map choice */
.maps { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 2px 0 14px; }
.maps-label { font-weight: 600; font-size: 0.9rem; margin-right: 4px; }
.map { font: inherit; font-size: 0.92rem; padding: 8px 14px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.65); color: var(--ink); cursor: pointer; }
.map:hover { background: #fff; }
.map.on { background: var(--accent); color: #f6f4ec; border-color: transparent; }

/* ---- Map editor ---- */
#map-editor { position: fixed; inset: 0; pointer-events: none; font: 13px system-ui, sans-serif; color: #e9edf2; z-index: 20; }
#map-editor[hidden] { display: none; }
#map-editor > div { pointer-events: auto; background: rgba(24, 28, 33, 0.92); backdrop-filter: blur(8px); }
#map-editor button, #map-editor select, #map-editor input { font: inherit; color: #e9edf2; background: #343b44; border: 1px solid #4a535e; border-radius: 6px; height: 28px; padding: 0 9px; }
#map-editor button:hover { background: #414a55; }
#map-editor button.on { background: #d9a441; color: #1a1d21; border-color: #d9a441; }
#map-editor .me-main { background: #3f7d52; border-color: #3f7d52; }
#map-editor input[type=number] { width: 64px; padding: 0 5px; }
#map-editor input[type=color] { width: 48px; padding: 1px; }
#map-editor input[type=checkbox] { width: auto; height: auto; }
#map-editor h3 { margin: 14px 0 6px; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: #9aa6b4; }
#map-editor h3 small { text-transform: none; letter-spacing: 0; font-weight: 400; }
.me-top { position: absolute; top: 0; left: 0; right: 0; height: 44px; display: flex; align-items: center; gap: 6px; padding: 0 10px; border-bottom: 1px solid #3a424c; }
.me-top label { display: flex; gap: 5px; align-items: center; color: #9aa6b4; }
.me-sep { width: 1px; height: 24px; background: #3a424c; margin: 0 4px; }
.me-grow { flex: 1; }
#me-status { color: #b9c3cf; margin-right: 8px; }
.me-left { position: absolute; top: 44px; left: 0; bottom: 0; width: 210px; padding: 4px 10px 40px; overflow-y: auto; border-right: 1px solid #3a424c; }
.me-right { position: absolute; top: 44px; right: 0; bottom: 0; width: 290px; padding: 4px 12px 40px; overflow-y: auto; border-left: 1px solid #3a424c; }
.me-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.me-row { display: flex; gap: 5px; } .me-row select { flex: 1; min-width: 0; }
#me-list { display: flex; flex-direction: column; gap: 1px; }
.me-item { padding: 4px 7px; border-radius: 5px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #c9d1db; }
.me-item:hover { background: #343b44; } .me-item.on { background: #5c4a22; color: #ffe2a6; }
.me-field { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 5px 0; color: #b9c3cf; }
.me-field input[type=text] { width: 150px; }
.me-triple { display: grid; grid-template-columns: 74px repeat(3, 1fr); gap: 4px; align-items: center; margin: 5px 0; color: #b9c3cf; }
.me-triple input { width: 100% !important; }
.me-tex { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin: 6px 0 8px; }
.me-tex button { height: 52px !important; padding: 0 !important; background-size: cover; background-position: center; }
.me-tex button.on { outline: 2px solid #d9a441; outline-offset: 1px; }
.me-right > button { display: block; width: 100%; margin-top: 6px; }
.me-note { color: #9aa6b4; line-height: 1.45; margin: 8px 0; }
.me-help { position: absolute; left: 220px; right: 300px; bottom: 8px; padding: 6px 10px; border-radius: 8px; color: #9aa6b4; text-align: center; background: rgba(24, 28, 33, 0.7) !important; }
/* The stash screen (drawn on its own canvas): over the game, as big as fits, the shape kept. */
#stash { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(96vw, calc(96vh * 1.6)); aspect-ratio: 1.6; z-index: 6; touch-action: none; border-radius: 14px; box-shadow: 0 20px 80px rgba(0, 0, 0, 0.6); }
#stash[hidden] { display: none; }

/* ---- The gritty look (as the stash screen): a condensed stencil face, plates with cut corners, bone paint, signal amber,
   hazard stripes, grain over everything. ---- */
:root {
  --face: 'Bahnschrift', 'Roboto Condensed', 'sans-serif-condensed', 'Arial Narrow', 'Segoe UI', sans-serif;
  --bone: #e2ddcc; --amber: #d99a2b; --amber-hi: #ecb04c; --dark: #15120a;
  --cut: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px);
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.5 0 0 0 0 0.5 0 0 0 0 0.5 0 0 0 1.1 -0.2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --chips: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='160'%3E%3Cfilter id='c'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.16' numOctaves='3' seed='7'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -12 8.9'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23c)'/%3E%3C/svg%3E");
}
.menu { font-family: var(--face); font-stretch: semi-condensed; color: var(--bone); background: radial-gradient(ellipse at 50% 48%, rgba(14, 16, 11, 0.3), rgba(4, 5, 3, 0.93) 74%); }
.menu::before { content: ''; position: absolute; inset: 0; pointer-events: none; background-image: var(--grain); opacity: 0.22; mix-blend-mode: overlay; }
.menu::after { /* corner marks, a viewfinder round the screen */
  content: ''; position: absolute; inset: 26px; pointer-events: none;
  --m: rgba(226, 221, 204, 0.32);
  background:
    linear-gradient(var(--m), var(--m)) top left / 64px 2px, linear-gradient(var(--m), var(--m)) top left / 2px 64px,
    linear-gradient(var(--m), var(--m)) top right / 64px 2px, linear-gradient(var(--m), var(--m)) top right / 2px 64px,
    linear-gradient(var(--m), var(--m)) bottom left / 64px 2px, linear-gradient(var(--m), var(--m)) bottom left / 2px 64px,
    linear-gradient(var(--m), var(--m)) bottom right / 64px 2px, linear-gradient(var(--m), var(--m)) bottom right / 2px 64px;
  background-repeat: no-repeat;
}
.landing {
  position: relative; z-index: 1; width: min(560px, 100%); padding: 40px 54px 30px;
  background: var(--grain), linear-gradient(180deg, rgba(42, 46, 36, 0.94), rgba(19, 21, 17, 0.96));
  background-blend-mode: overlay, normal;
  clip-path: polygon(30px 0, 100% 0, 100% calc(100% - 30px), calc(100% - 30px) 100%, 0 100%, 0 30px);
  box-shadow: inset 0 2px 0 rgba(226, 221, 204, 0.1), inset 0 0 0 1px rgba(226, 221, 204, 0.14);
}
.landing::before { /* the amber bracket in the cut corner */
  content: ''; position: absolute; left: 5px; top: 5px; width: 52px; height: 52px; pointer-events: none;
  background: linear-gradient(135deg, transparent 21px, var(--amber) 21px, var(--amber) 24px, transparent 24px),
    linear-gradient(var(--amber), var(--amber)) 22px 0 / 30px 3px no-repeat, linear-gradient(var(--amber), var(--amber)) 0 22px / 3px 30px no-repeat;
}
.landing h1 { margin: 0 0 30px; font-family: var(--face); font-size: 15px; font-weight: 700; letter-spacing: 0.5em; color: var(--amber); text-shadow: none; }
.landing h1::before { content: ''; display: inline-block; width: 10px; height: 13px; margin-right: 12px; background: var(--amber); vertical-align: -1px; }
.landing h1 b {
  display: block; margin-top: 10px; font-size: clamp(54px, 8vw, 96px); font-weight: 700; letter-spacing: 0.14em; line-height: 0.95; color: var(--bone);
  -webkit-mask-image: var(--chips); mask-image: var(--chips); -webkit-mask-size: 300px 160px; mask-size: 300px 160px; /* (worn paint) */
}
.name-field input {
  width: 300px; height: 46px; border-radius: 0; font: 600 16px var(--face); letter-spacing: 0.12em; color: var(--bone);
  background: rgba(4, 5, 4, 0.55); border: 1px solid rgba(226, 221, 204, 0.18); border-left: 3px solid var(--amber);
}
.name-field input:focus { border-color: rgba(217, 154, 43, 0.7); border-left-color: var(--amber-hi); background: rgba(4, 5, 4, 0.72); }
.acc-tabs { gap: 0; padding: 3px; border-radius: 0; background: rgba(4, 5, 4, 0.5); border: 1px solid rgba(226, 221, 204, 0.14); clip-path: var(--cut); }
.acc-tabs button { border-radius: 0; font-family: var(--face); font-size: 13px; letter-spacing: 0.22em; color: rgba(226, 221, 204, 0.55); }
.acc-tabs button.on { color: var(--dark); background: var(--amber); }
button { font-family: var(--face); border-radius: 0; }
.enter {
  min-width: 300px; height: 58px; border-radius: 0; clip-path: var(--cut); box-shadow: none; color: var(--dark);
  font: 700 19px var(--face); letter-spacing: 0.5em; text-indent: 0.5em;
  background: repeating-linear-gradient(135deg, rgba(21, 18, 10, 0.88) 0 9px, transparent 9px 18px) bottom / 100% 9px no-repeat, var(--grain), var(--amber);
  background-blend-mode: normal, overlay, normal;
}
.enter:hover:not(:disabled) { transform: translateY(-1px); background-color: var(--amber-hi); box-shadow: none; }
.tool { border-radius: 0; font-family: var(--face); letter-spacing: 0.16em; text-transform: uppercase; border-color: rgba(226, 221, 204, 0.22); clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px); }
.signed-in, .credits { font-family: var(--face); letter-spacing: 0.06em; }
.pw-rules li.ok { color: #a9c972; }
.landing .note, .name-error { color: #de5d4c; }
kbd { border-radius: 0; font: 700 11px/1.4 var(--face); color: var(--bone); background: #2a2d24; border: 1px solid rgba(226, 221, 204, 0.25); border-bottom-width: 2px; }
#hud {
  border-radius: 0; font-family: var(--face); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(226, 221, 204, 0.72);
  background: rgba(10, 11, 8, 0.82); border: 1px solid rgba(226, 221, 204, 0.14); backdrop-filter: none; clip-path: var(--cut);
}
#hud .online { color: var(--amber); }
#toast {
  border-radius: 0; padding: 12px 22px 12px 18px; font: 700 15px var(--face); letter-spacing: 0.1em; text-transform: uppercase; color: var(--bone);
  background: rgba(12, 13, 10, 0.94); border-left: 4px solid var(--amber); clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
}
#error { border-radius: 0; background: #16180f; color: var(--bone); font-family: var(--face); border-left: 4px solid #cc4a3a; }
#error p { color: rgba(226, 221, 204, 0.7); }
.vital { font: 700 12px var(--face); letter-spacing: 0.14em; color: var(--bone); }
.vital i { width: 190px; height: 10px; border-radius: 0; background: rgba(10, 11, 8, 0.75); border: 1px solid rgba(226, 221, 204, 0.2); }
.vital u { background: repeating-linear-gradient(90deg, #93b55a 0 9px, transparent 9px 11px); } /* (a gauge in blocks) */
#sta-bar { background: repeating-linear-gradient(90deg, var(--amber) 0 9px, transparent 9px 11px); }
