html, body { margin: 0; height: 100%; overflow: hidden; background: #14171a; color: #e8e4d8;
  font: 14px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif; }
canvas#view { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }

#hud { position: fixed; inset: 0; pointer-events: none; text-shadow: 0 1px 2px #000c; }
#crosshair { position: absolute; left: 50%; top: 50%; width: 4px; height: 4px; margin: -2px;
  border-radius: 50%; background: #fffc; box-shadow: 0 0 2px #000; }
#where { position: absolute; left: 18px; bottom: 16px; }
#street { font-size: 18px; font-weight: 600; letter-spacing: .02em; min-height: 1.4em; }
#coords { font-size: 12px; opacity: .8; font-variant-numeric: tabular-nums; }
#compass { position: absolute; top: 14px; left: 50%; transform: translateX(-50%);
  font-size: 15px; font-weight: 600; letter-spacing: .12em; font-variant-numeric: tabular-nums; }
#debug { position: absolute; top: 12px; left: 14px; font: 11px/1.5 ui-monospace, Menlo, Consolas, monospace;
  opacity: .7; white-space: pre; }
#toast { position: absolute; top: 22%; width: 100%; text-align: center; font-size: 40px; font-weight: 300;
  letter-spacing: .18em; text-transform: uppercase; opacity: 0; transition: opacity 1.2s; }
#toast.show { opacity: 1; }
#toast small { display: block; font-size: 13px; letter-spacing: .3em; opacity: .75; margin-top: 6px; }

#menu { position: fixed; inset: 0; display: grid; place-items: center;
  background: radial-gradient(ellipse at center, #1c2023d9, #0c0e10f2); }
#menu[hidden] { display: none; }
.panel { width: min(430px, calc(100vw - 32px)); text-align: center; }
h1 { font-size: 56px; font-weight: 200; letter-spacing: .22em; margin: 0 0 4px; }
.tag { margin: 0 0 26px; opacity: .65; letter-spacing: .08em; }
button#play { font: inherit; font-size: 17px; padding: 12px 34px; color: #14171a; background: #d8cfae;
  border: 0; border-radius: 2px; cursor: pointer; letter-spacing: .08em; }
button#play:disabled { background: #5a5a52; color: #b9b6aa; cursor: default; }
button#play:not(:disabled):hover { background: #efe6c4; }
#status { min-height: 1.4em; font-size: 12px; opacity: .7; margin: 10px 0 20px; }
table { margin: 0 auto 22px; border-spacing: 14px 3px; font-size: 13px; text-align: left; }
td:nth-child(odd) { font-weight: 600; opacity: .9; white-space: nowrap; }
td:nth-child(even) { opacity: .65; }
.credit { font-size: 11px; opacity: .6; }
a { color: inherit; }
#attribution { position: fixed; right: 8px; bottom: 6px; font-size: 10px; opacity: .6; text-shadow: 0 1px 2px #000; pointer-events: none; }
#clock { position: absolute; top: 14px; right: 16px; font-size: 13px; letter-spacing: .06em; font-variant-numeric: tabular-nums; }

kbd { font: inherit; font-size: .85em; font-weight: 600; padding: 1px 6px; border: 1px solid #fff6; border-radius: 3px; background: #0006; }
#prompt { position: absolute; left: 50%; top: 58%; transform: translateX(-50%); font-size: 15px; white-space: nowrap; }
#prompt.dim { opacity: .55; }

#panel { position: fixed; inset: 0; display: grid; place-items: center; background: #0b0d0f99; }
#panel[hidden] { display: none; }
.loot { display: flex; gap: 14px; align-items: stretch; max-width: calc(100vw - 32px); }
.loot section { width: 300px; max-width: 46vw; display: flex; flex-direction: column; background: #1b1e20f2; border: 1px solid #ffffff1f; border-radius: 4px; }
.loot h2 { margin: 0; padding: 12px 14px; font-size: 14px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  border-bottom: 1px solid #ffffff14; display: flex; justify-content: space-between; gap: 8px; }
.loot h2 span { font-weight: 400; opacity: .65; text-transform: none; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.loot .list { height: 320px; max-height: 50vh; overflow-y: auto; padding: 6px; }
.loot .none { margin: 18px 10px; opacity: .5; font-size: 13px; }
.item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 8px; margin: 0 0 2px; font: inherit; color: inherit; text-align: left;
  background: #ffffff0a; border: 0; border-radius: 3px; cursor: pointer; }
.item:hover { background: #d8cfae2e; }
.item .ico { width: 24px; text-align: center; font-size: 18px; }
.item .nm { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.item .nm small { display: block; font-size: 11px; opacity: .6; }
.item .qty { opacity: .75; font-variant-numeric: tabular-nums; }
.loot footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border-top: 1px solid #ffffff14; min-height: 30px; }
.loot .hint { font-size: 11px; opacity: .6; }
.cmd { font: inherit; font-size: 13px; color: inherit; background: #ffffff14; border: 0; border-radius: 3px; padding: 5px 10px; cursor: pointer; white-space: nowrap; margin-left: auto; }
.cmd:hover { background: #d8cfae40; }

#mapview { position: absolute; inset: 5vh 6vw; border: 1px solid #ffffff2e; border-radius: 4px; overflow: hidden; box-shadow: 0 10px 40px #000a; text-shadow: none; }
#mapview[hidden] { display: none; }
#map { width: 100%; height: 100%; display: block; }
#mapstats { position: absolute; top: 12px; left: 16px; padding: 5px 10px; background: #1b1e20d9; border-radius: 3px; font-size: 13px; font-variant-numeric: tabular-nums; }
#maphelp { position: absolute; right: 14px; bottom: 12px; padding: 5px 10px; background: #1b1e20d9; border-radius: 3px; font-size: 12px; }

#stats { position: absolute; right: 18px; bottom: 26px; width: 190px; font-size: 11px; text-align: right; }
#weapon { margin-bottom: 6px; font-size: 12px; opacity: .85; }
#alert { margin-bottom: 6px; font-size: 12px; font-weight: 600; color: #ffb199; }
#alert[hidden] { display: none; }
.bar { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.bar span { width: 44px; opacity: .75; }
.bar i { flex: 1; height: 6px; background: #0008; border-radius: 3px; overflow: hidden; }
.bar b { display: block; height: 100%; background: #c9d6c3; border-radius: 3px; }
#hp { background: #d9695c; } #food { background: #d9b45c; } #thirst { background: #6aa9d6; }
#crosshair.hit { background: #ff6b57; transform: scale(2.2); }
#hurt { position: fixed; inset: 0; pointer-events: none; opacity: 0; box-shadow: inset 0 0 160px 50px #a01410; }
#death { position: fixed; inset: 0; display: grid; place-items: center; background: #100606e6; text-align: center; }
#death[hidden] { display: none; }
#death div { width: min(420px, calc(100vw - 32px)); }
#death h1 { font-size: 44px; letter-spacing: .2em; }
#death p { opacity: .75; margin: 0 0 24px; }
#death button { font: inherit; font-size: 16px; padding: 11px 30px; color: #14171a; background: #d8cfae; border: 0; border-radius: 2px; cursor: pointer; }

.who { margin: 0 0 16px; font-size: 12px; opacity: .85; }
#name { font: inherit; font-size: 13px; width: 150px; padding: 6px 8px; color: inherit; background: #ffffff14; border: 1px solid #ffffff2e; border-radius: 2px; margin-right: 8px; }

.account { margin: 0 0 18px; font-size: 12px; }
.account input { font: inherit; font-size: 13px; width: 118px; padding: 6px 8px; color: inherit; background: #ffffff14; border: 1px solid #ffffff2e; border-radius: 2px; margin: 0 2px 6px; }
button.small { font: inherit; font-size: 12px; padding: 6px 10px; color: inherit; background: #ffffff1f; border: 0; border-radius: 2px; cursor: pointer; margin: 0 2px 6px; }
button.small:hover { background: #d8cfae40; }
#authmsg { min-height: 1.3em; margin: 2px 0 0; color: #ffb199; }
#online { margin: 4px 0 0; opacity: .7; }
#signedout[hidden], #signedin[hidden] { display: none; }

.travel { margin: 0 0 18px; font-size: 12px; }
.travel summary { cursor: pointer; opacity: .8; margin-bottom: 8px; }
.travel input { font: inherit; font-size: 13px; width: 210px; padding: 6px 8px; color: inherit; background: #ffffff14; border: 1px solid #ffffff2e; border-radius: 2px; }
#places { margin-top: 6px; max-height: 150px; overflow-y: auto; }
.placehit { display: block; width: 100%; font: inherit; font-size: 12px; text-align: left; color: inherit; background: #ffffff0f; border: 0; border-radius: 2px; padding: 6px 8px; margin: 0 0 2px; cursor: pointer; overflow-wrap: anywhere; }
.placehit:hover { background: #d8cfae2e; }
#menu { overflow-y: auto; }
.panel { margin: 20px 0; }
