:root { color-scheme: dark; font-family: system-ui, sans-serif; background: #111b20; color: #e6ece8; font-synthesis: none; --mint: #83dfc7; --dim: #98b0b0; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body, #game { margin: 0; width: 100%; height: 100%; overflow: hidden; }
button, input, select { font: inherit; }
/* Trim the font's ascender/descender space so labels sit optically centred. */
button { cursor: pointer; text-box: trim-both cap alphabetic; }
button:disabled { opacity: .6; cursor: wait; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; }
#scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: crosshair; }
.topbar { position: absolute; top: env(safe-area-inset-top, 0); inset-inline: 0; padding: 22px 28px; display: flex; align-items: center; gap: 16px; pointer-events: none; background: linear-gradient(#091219a6, transparent); }
.topbar button { pointer-events: auto; }
.brand { font-weight: 850; letter-spacing: .12em; font-size: 19px; }
.brand span { color: var(--mint); font-weight: 450; }
.brand small { display: block; font-size: 8px; font-weight: 500; color: #9eb6bc; letter-spacing: .17em; margin-top: 5px; }
.room-info { display: flex; flex-direction: column; gap: 5px; margin-left: auto; text-align: right; font-size: 11px; color: #b3c9ce; }
#room-label { color: #718b94; font-size: 9px; letter-spacing: .1em; }
#notice { position: absolute; top: 88px; left: 28px; color: #ffc396; font-size: 13px; z-index: 5; }
.panel { position: absolute; width: min(570px, calc(100% - 36px)); left: 50%; top: 50%; transform: translate(-50%, -47%); padding: 32px; background: #0d1b22ed; border: 1px solid #617c7d66; border-radius: 8px; box-shadow: 0 26px 100px #0008; backdrop-filter: blur(12px); max-height: 85dvh; overflow: auto; }
.eyebrow { margin: 0 0 12px; color: var(--mint); font-size: 10px; font-weight: 650; letter-spacing: .2em; }
h1 { margin: 0; font-size: clamp(32px, 4vw, 52px); line-height: 1.02; letter-spacing: -.045em; }
h1 em { font-style: normal; color: #9fc7c4; }
.intro { font-size: 12px; color: #a4b8bb; margin: 16px 0 24px; }
.classes { padding: 0; border: 0; margin: 0 0 20px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.classes legend { font-size: 10px; color: var(--dim); margin-bottom: 9px; }
.classes label { cursor: pointer; }
.classes input { position: absolute; opacity: 0; }
.classes span { display: block; border: 1px solid #38505a; background: #1e333d66; border-radius: 5px; padding: 14px 10px; }
.classes input:checked + span { background: #24483e; border-color: #82d8bc; }
.classes input:focus-visible + span { outline: 2px solid var(--mint); }
.classes b { font-size: 12px; }
.classes small { display: block; font-size: 10px; line-height: 1.6; color: #a0b6b6; margin-top: 7px; }
.form-row { display: flex; gap: 14px; }
.form-row label { font-size: 11px; color: #b1c3c4; flex: 1; min-width: 0; }
.form-row small { color: #718e95; }
.form-row input { display: block; width: 100%; margin-top: 7px; padding: 11px; color: #f2f3eb; background: #1b303a; border: 1px solid #3b545f; border-radius: 4px; font-size: 12px; }
.primary { width: 100%; display: flex; justify-content: center; gap: 24px; border: 0; border-radius: 4px; background: #89d9bd; color: #132b29; padding: 14px; margin-top: 20px; font-weight: 750; font-size: 12px; }
.primary:hover { background: #b0f0d8; }
.controls-hint { color: #b0c1c5; font-size: 10px; text-align: center; margin-top: 18px; line-height: 1.9; }
kbd { font: 10px system-ui; border: 1px solid #6d888655; border-radius: 3px; padding: 2px 5px; color: #dce9e6; }
.prototype-note { color: #789196; font-size: 9px; text-align: center; line-height: 1.6; margin-bottom: 0; }
.lobby { width: min(670px, calc(100% - 30px)); padding: 25px; }
.lobby h1 { font-size: 32px; }.lobby .intro { margin: 10px 0 14px; }
.profile-heading, .character-picker { display: flex; align-items: end; gap: 8px; margin: 12px 0; }
.profile-heading label, .character-picker label { flex: 1; font-size: 10px; color: #abc2c2; }
.profile-heading input, .character-picker select, .character-editor select { display: block; width: 100%; background: #1b303a; border: 1px solid #3b545f; color: #dfedeb; padding: 8px; border-radius: 4px; margin-top: 5px; font-size: 11px; }
.profile-note { color: #97b8ae; font-size: 10px; line-height: 1.5; }
.character-editor select { height: 38px; max-width: 100%; }.character-editor { gap: 9px; }
.traits { display: flex; gap: 10px; margin-top: 12px; }.traits label { flex: 1; color: #c9ddd4; font-size: 11px; }.traits small { display: block; font-size: 9px; color: #8baaa2; margin: 5px 0; }.traits input { width: 100%; padding: 7px 9px; border: 1px solid #4c6c63; border-radius: 4px; background: #18312e; color: #c5efdf; }
.character-save { display: flex; justify-content: space-between; align-items: center; margin: 12px 0; }.character-save span { color: #9ec6b3; font-size: 10px; }
#profile-error { color: #ffb69e; font-size: 11px; margin: 7px 0; }
.subtle { color: #c4d6d7; background: #15262d99; border: 1px solid #6c8b8c55; padding: 7px 10px; border-radius: 4px; font-size: 10px; }
.run-status { position: absolute; top: 96px; left: 28px; display: flex; align-items: center; gap: 16px; font-size: 11px; color: #becfce; pointer-events: none; }
.run-status .eyebrow { margin: 0; font-size: 8px; }
.run-status b { font-size: 24px; font-variant-numeric: tabular-nums; color: #edf7f0; }
.party-panel { position: absolute; right: 28px; top: 96px; font-size: 11px; text-align: right; color: #a8c0c0; }
#party { font-size: 10px; line-height: 1.9; margin: 9px 0; }
.vitals { position: absolute; bottom: calc(30px + env(safe-area-inset-bottom)); left: calc(28px + env(safe-area-inset-left)); width: 245px; padding: 14px; background: #0e202bd9; border: 1px solid #597c7c55; border-radius: 6px; }
.vitals-heading { display: flex; justify-content: space-between; font-size: 10px; margin-bottom: 10px; }
.vitals-heading span { color: #83dfc7; }
.bar { height: 19px; position: relative; background: #2d3942; margin-top: 5px; border-radius: 2px; overflow: hidden; }
.bar > div { height: 100%; transition: width .15s; }
.bar span { position: absolute; inset: 0; display: grid; place-items: center; font-size: 9px; text-shadow: 0 1px 3px #000; }
.health > div { background: linear-gradient(90deg, #a34542, #dc7d69); }
.xp > div { background: linear-gradient(90deg, #277668, #60cba7); }
.vitals > small { display: block; margin-top: 8px; font-size: 8px; color: #8aa9ae; }
.skillbar { position: absolute; bottom: calc(30px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); display: flex; gap: 8px; }
.skill { width: 120px; padding: 10px 14px; background: #142932e6; border: 1px solid #607c7c66; border-radius: 5px; display: flex; flex-direction: column; gap: 7px; }
.skill kbd { align-self: flex-start; }.skill span { font-size: 11px; }.skill small { font-size: 9px; color: #91d6bd; }
.settings { position: absolute; bottom: calc(28px + env(safe-area-inset-bottom)); right: 28px; display: flex; gap: 8px; flex-wrap: wrap; width: 180px; font-size: 10px; color: #adc0c1; background: #10232ace; padding: 10px; border-radius: 4px; }
.settings label { display: flex; align-items: center; gap: 4px; }.settings input { accent-color: #84d9bd; }.settings select { width: 74px; background: #1d343e; color: #b9d9d1; border: 1px solid #49636a; font-size: 10px; }
.upgrade-panel { position: absolute; top: 19%; left: 50%; transform: translateX(-50%); background: #10252df0; border: 1px solid #79a29288; padding: 18px; border-radius: 7px; box-shadow: 0 15px 50px #0008; width: min(520px, 85%); }
.upgrade-panel h2 { margin: 0 0 6px; font-size: 20px; }.upgrade-panel .eyebrow { margin-bottom: 5px; }.upgrade-panel small { font-size: 10px; color: #a2b8b5; }
.upgrade-choices { display: flex; gap: 7px; margin: 14px 0 9px; }
.upgrade-choices button { flex: 1; background: #24433e; border: 1px solid #729885; padding: 12px 8px; color: #dceee5; border-radius: 4px; }.upgrade-choices button:hover { background: #3e6253; }.upgrade-choices b { display: block; font-size: 12px; }.upgrade-choices span { display: block; font-size: 9px; margin-top: 7px; line-height: 1.5; color: #b2c9bd; }
.down-panel { z-index: 4; text-align: center; }.down-panel h2 { font-size: 30px; }.down-panel p { color: #b2c4c6; font-size: 12px; }
#revive-hint { position: absolute; bottom: 160px; left: 50%; transform: translateX(-50%); color: #a9ead0; background: #102b23cc; padding: 10px; border-radius: 4px; font-size: 12px; }
#portrait { position: absolute; inset: 0; z-index: 10; background: #102028; padding: 30px; text-align: center; align-content: center; font-size: 24px; display: none; }
#touch-controls { display: none; position: absolute; inset: auto calc(25px + env(safe-area-inset-right)) calc(25px + env(safe-area-inset-bottom)) calc(25px + env(safe-area-inset-left)); align-items: end; justify-content: space-between; pointer-events: none; }
.stick { width: 110px; height: 110px; border: 1px solid #accbc866; background: #1f353855; border-radius: 50%; display: grid; place-items: center; pointer-events: auto; touch-action: none; position: relative; }
.stick i { width: 42px; height: 42px; background: #85bea355; border: 1px solid #adddce; border-radius: 50%; }.stick span { position: absolute; bottom: 9px; font-size: 7px; letter-spacing: .1em; pointer-events: none; color: #bdd9d4; }
#special-button { position: absolute; right: 125px; bottom: 0; width: 60px; height: 60px; border-radius: 50%; background: #42685bcc; border: 1px solid #8dc8b0; color: #d7e9e0; pointer-events: auto; touch-action: none; font-size: 10px; }
#revive-button { position: absolute; right: 125px; bottom: 70px; width: 50px; height: 50px; border-radius: 50%; background: #365d63cc; border: 1px solid #9bd4d8; color: #e2f5f1; pointer-events: auto; touch-action: none; font-size: 9px; }
@media (max-width: 1000px) { .settings { bottom: 146px; right: 18px; }.skillbar { left: auto; right: 18px; transform: none; }.run-status .eyebrow { display: none; } }
@media (pointer: coarse) { #touch-controls { display: flex; }.vitals { top: 124px; bottom: auto; left: 16px; width: 180px; padding: 9px; }.vitals > small { display: none; }.skillbar { display: none; }.settings { bottom: auto; top: 130px; right: 16px; width: 160px; }.party-panel { top: 78px; right: 16px; }.run-status { top: 78px; left: 16px; }.topbar { padding: 14px 16px; }.brand { font-size: 14px; }.lobby { padding: 20px; } }
@media (max-height: 600px) { .lobby { max-height: 90dvh; top: 50%; transform: translate(-50%,-50%); }.lobby h1 { font-size: 28px; }.intro { margin: 10px 0; }.classes { margin-bottom: 10px; }.classes span { padding: 8px; }.lobby .primary { margin-top: 10px; }.upgrade-panel { top: 12%; }.run-status b { font-size: 18px; } }
@media (orientation: portrait) and (pointer: coarse) { #portrait:not([hidden]) { display: block; } }
