:root { color-scheme: dark; font-family: system-ui, sans-serif; color: #e8f4ed; background: #08111b; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
canvas { position: fixed; inset: 0; display: block; width: 100%; height: 100%; touch-action: none; }
#world[data-mouse-look] { cursor: none; }
header { position: fixed; inset: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.5rem; background: #081611ee; border-bottom: 1px solid #365742; }
header strong { letter-spacing: .12em; }
header em { font-style: normal; color: #a6dcb8; }
header span, .wallet span, .keys { color: #b4cbbe; font-size: .875rem; }
.card { padding: 1.25rem; background: #0f2019ee; border: 1px solid #365742; border-radius: .75rem; box-shadow: 0 10px 32px #0005; }
#welcome { position: fixed; left: clamp(1rem,7vw,7rem); bottom: clamp(2rem,12vh,9rem); width: min(29rem,calc(100vw - 2rem)); }
h1 { font-size: clamp(2rem,5vw,3.6rem); margin: 0; line-height: 1.05; }
p { line-height: 1.5; }
button { padding: .65rem .8rem; border: 1px solid #8cc5a1; border-radius: .35rem; background: #a8dbb9; color: #10271a; font: 600 .9rem system-ui; cursor: pointer; }
button:focus-visible { outline: 2px solid white; outline-offset: 3px; }
button:disabled { cursor: not-allowed; opacity: .6; }
.wallet { position: fixed; top: 4.5rem; right: 1rem; display: grid; gap: .3rem; }
.wallet strong { font-variant-numeric: tabular-nums; font-size: 1.25rem; }
.wallet small { color: #b4cbbe; }
.actions { position: fixed; bottom: 1rem; left: 1rem; width: min(38rem,calc(100vw - 2rem)); }
.actions button { margin: .15rem; }
.actions a { color: #b8e4c7; margin: .4rem; }
.actions p { margin: .6rem 0 0; }
.touch { display: none; }
@media (pointer: coarse) {
  .touch { position: fixed; right: 1rem; bottom: 12rem; display: flex; flex-wrap: wrap; gap: .4rem; max-width: 10rem; }
  .touch button { touch-action: none; }
  .keys { display: none; }
}

[hidden] { display: none !important; }
#account-form { display: grid; gap: .8rem; }
#account-form label { display: grid; gap: .35rem; }
#account-form input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #48645b;
  border-radius: .4rem;
  padding: .65rem;
  background: #101e20;
  color: #e3f2e9;
  font: inherit;
}
.account-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
#welcome .sign-out { margin-inline-start: .5rem; }
#account-list { position: fixed; inset: 0; margin: auto; width: min(42rem, 90vw); max-height: 80vh; overflow: auto; color: #e3f2e9; background: #102023; }
#account-list::backdrop { background: #061014bd; }
#account-list .table-wrap { overflow-x: auto; margin-block: .8rem; }
#account-list table { width: 100%; border-collapse: collapse; }
#account-list :is(th, td) { padding: .55rem; text-align: left; border-bottom: 1px solid #48645b; }
#presence-status { margin-block: .3rem; }

#animations { color: inherit; width: min(23rem, 90vw); }
#animations::backdrop { background: #061014bd; }
#animations label { display: grid; gap: .35rem; margin-bottom: 1rem; }
#animations select { background: #101e20; color: inherit; padding: .55rem; border: 1px solid #48645b; border-radius: .35rem; font: inherit; }

header strong #tower-title { font-size: inherit; color: inherit; letter-spacing: normal; }
.game-panel { color: inherit; width: min(35rem, 92vw); max-height: 85vh; overflow: auto; }
.game-panel::backdrop { background: #061014bd; }
.game-panel label { display: block; margin-bottom: 1rem; }
.game-panel input { color: inherit; background: #101e20; border: 1px solid #48645b; padding: .5rem; }
.game-panel button { margin: .2rem; }
.game-panel form { margin-top: .75rem; }
#terminal-prompt, #elevator-prompt, #punch-prompt { position: fixed; bottom: 12%; left: 50%; transform: translateX(-50%); }

#elevator-stops { display: flex; flex-wrap: wrap; gap: .35rem; }

#mouse-sensitivity { display: block; width: 100%; margin: .5rem 0 1rem; accent-color: #a8dbb9; }
#sensitivity-value { float: right; font-variant-numeric: tabular-nums; }

#tutorial { position: fixed; top: 4.5rem; left: 1rem; width: min(25rem, calc(100vw - 2rem)); pointer-events: none; }
#tutorial h2 { font-size: 1.1rem; margin: .35rem 0; }
#tutorial p { margin: 0; }
#tutorial-progress { color: #b7d9ca; font-size: .875rem; }
@media (max-width: 720px) {
  #tutorial { top: 10rem; padding: .75rem; }
  #tutorial-instruction { font-size: .875rem; }
}

.header-actions { display: flex; gap: .5rem; flex: none; }
header strong { overflow-wrap: anywhere; }
#online-list { padding-inline-start: 1.4rem; }
@media (max-width: 530px) {
  header { padding: .65rem; gap: .5rem; }
  .header-actions button { padding: .5rem; }
}

.impact-table-wrap { overflow-x: auto; }
.impact-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.impact-table th, .impact-table td { padding: .45rem .3rem; text-align: left; border-bottom: 1px solid #365742; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

#chat-box { position: fixed; bottom: 1rem; left: 1rem; width: min(28rem, calc(100vw - 2rem)); padding: .65rem; }
#chat-log { max-height: 8.5rem; overflow-y: auto; overflow-wrap: anywhere; font-size: .875rem; }
#chat-log:not(:empty) { margin-bottom: .5rem; }
#chat-log p, #chat-status { margin: .2rem 0; }
#chat-compose { display: flex; align-items: center; gap: .35rem; }
#chat-compose input { flex: 1; min-width: 0; padding: .5rem; color: inherit; background: #101e20; border: 1px solid #48645b; }
#admin-xyz { width: min(100%, 22rem); }
#admin-player-list { max-height: 40vh; overflow: auto; }
#admin-panel button[aria-pressed="false"] { background: #203b31; color: #e8f4ed; }
.admin-delete { margin-block: 1rem; border-top: 1px solid #684b4d; padding-top: .75rem; }
.admin-delete summary { cursor: pointer; color: #ffd0d0; font-weight: 600; }
.admin-delete-submit { border-color: #ec9e9e; background: #b45359; color: #fff; }
#frozen-notice { position: fixed; top: 5rem; left: 50%; transform: translateX(-50%); background: #18251e; padding: .7rem; text-align: center; }

#world-announcement { position: fixed; inset: 4.85rem 0 auto; margin: 0 auto; width: min(34rem, calc(100vw - 2rem)); z-index: 8; color: inherit; text-align: center; overflow-wrap: anywhere; pointer-events: none; }
#announcement-input { width: min(100%, 24rem); }

.touch-chat { display: none; }
@media (pointer: coarse) { .touch-chat { display: block; position: fixed; bottom: 1rem; left: 1rem; } }

.tutorial-computer-card { margin-block: .85rem; padding: .8rem; border: 1px solid #5e987d; border-radius: .5rem; background: #152c24; }
.tutorial-computer-card h3 { margin: .15rem 0 .5rem; font-size: 1.15rem; }
.tutorial-computer-card p { margin: .4rem 0; }
#tutorial-hardware, #tutorial-subscribers details { margin-block: .75rem; }
#tutorial-hardware summary, #tutorial-subscribers summary { cursor: pointer; font-weight: 600; }
#tutorial-hardware dl { display: grid; gap: .35rem; margin: .65rem 0 0; }
#tutorial-hardware dt { font-weight: 600; }
#tutorial-hardware dd { margin: 0 0 .35rem; color: #c6dfd3; }
.tutorial-subscriber-details { display: grid; gap: .15rem; margin-block: .4rem; }

#admin-crypto-grant label { margin: 0 0 .45rem; font-weight: 600; }
#admin-crypto-amount { width: min(100%, 13rem); }
#admin-crypto-grant button { margin-inline-start: .45rem; }
