/* Wipeday: the game screen (HUD, panels, level-up, wipe). Loaded with wipeday.css. */
main.playing { position: fixed; inset: 0; }
.game { position: fixed; inset: 0; background: #0b181b; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; }
.game canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hud { position: absolute; inset: 0 0 auto 0; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 12px; align-items: start;
  padding: max(12px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) 0 max(14px, env(safe-area-inset-left)); pointer-events: none; }
.hud > * { pointer-events: auto; }
.hud-l { max-width: 280px; }
.hud .who { font-size: 15px; color: var(--fog); text-shadow: 0 1px 2px #000; }
.hud .who b { font-family: var(--display); font-weight: 400; font-size: 24px; color: var(--bone); margin-right: 4px; }
.bar { position: relative; height: 16px; border-radius: 4px; background: rgba(8, 12, 13, .75); border: 1px solid #34454a; overflow: hidden; margin-top: 6px; }
.bar i { position: absolute; inset: 0 auto 0 0; background: #b8483a; transition: width .15s linear; }
.bar.xp { height: 7px; }
.bar.xp i { background: var(--bone-2); }
.bar span { position: relative; display: block; text-align: center; font-size: 11.5px; line-height: 15px; color: var(--bone); text-shadow: 0 1px 2px #000; font-variant-numeric: tabular-nums; }
.hud-c { text-align: center; text-shadow: 0 2px 6px #000; }
.hud-c .night { font-family: var(--display); font-size: 34px; line-height: 1; font-variant-numeric: tabular-nums; }
.hud-c .sub { font-size: 14px; color: var(--fog); font-style: italic; }
.hud-r { justify-self: end; text-align: right; }
.hud-r .kills { font-size: 14px; color: var(--fog); text-shadow: 0 1px 2px #000; font-variant-numeric: tabular-nums; }
.hbtns { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; justify-content: flex-end; }
.hbtns button { background: rgba(20, 28, 31, .85); border: 1px solid var(--line); border-radius: 5px; padding: 6px 10px; cursor: pointer; font-size: 14px; display: flex; gap: 6px; align-items: center; }
.hbtns button:hover { border-color: var(--fog-2); }
kbd { font: 500 11px var(--text); color: var(--fog); border: 1px solid var(--line); border-radius: 3px; padding: 0 4px; }
.say { position: absolute; left: 50%; bottom: max(26px, env(safe-area-inset-bottom)); transform: translate(-50%, 8px); opacity: 0; transition: opacity .3s, transform .3s; pointer-events: none;
  background: rgba(13, 19, 21, .85); border: 1px solid var(--line); border-radius: 5px; padding: 7px 14px; font-size: 15px; max-width: calc(100% - 200px); text-align: center; }
.say.on { opacity: 1; transform: translate(-50%, 0); }
.banner { position: absolute; left: 0; right: 0; top: 30%; text-align: center; font-family: var(--display); font-size: clamp(40px, 7vw, 76px); color: var(--bone); text-shadow: 0 4px 18px #000; opacity: 0; pointer-events: none; }
.banner.on { animation: ban 2.4s ease forwards; }
@keyframes ban { 0% { opacity: 0; transform: translateY(10px); } 15%, 75% { opacity: 1; transform: none; } 100% { opacity: 0; } }
.stick { position: absolute; left: max(22px, env(safe-area-inset-left)); bottom: max(22px, env(safe-area-inset-bottom)); width: 128px; height: 128px; border-radius: 50%;
  border: 2px solid rgba(236, 227, 208, .25); background: rgba(13, 19, 21, .35); touch-action: none; }
.stick i { position: absolute; left: 50%; top: 50%; width: 52px; height: 52px; margin: -26px; border-radius: 50%; background: rgba(236, 227, 208, .3); border: 2px solid rgba(236, 227, 208, .5); }
.layer { position: absolute; inset: 0; pointer-events: none; }
.layer > * { pointer-events: auto; }
.modal { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(5, 9, 10, .55); padding: 16px; overflow-y: auto; }
.modal .card { width: min(520px, 100%); background: var(--deep); border: 1px solid var(--line); border-radius: 8px; padding: 26px; box-shadow: 0 20px 60px rgba(0, 0, 0, .6); animation: tin .3s var(--ease-out); }
.modal .card.wide { width: min(860px, 100%); }
.modal h2 { font-size: 40px; margin-bottom: 6px; }
.modal .ctas { justify-content: flex-start; margin-top: 18px; }
.modal.start .card { text-align: center; }
.modal.start .ctas { justify-content: center; }
.modal.start svg { margin: 0 auto 8px; }
.howto { text-align: left; margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--line); font-size: 14.5px; color: var(--bone-2); display: grid; gap: 6px; }
.howto b { color: var(--bone); }
.back { display: inline-block; margin-top: 14px; }
.choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.choice { text-align: left; background: var(--steel); border: 1px solid var(--line); border-radius: 6px; padding: 14px; cursor: pointer; display: flex; flex-direction: column; gap: 6px; transition: border-color .15s, transform .12s; }
.choice:hover { border-color: var(--rust); }
.choice:active { transform: scale(.985); }
.choice .k { font-size: 12.5px; color: var(--rust); display: flex; gap: 6px; align-items: center; }
.choice b { font-family: var(--display); font-weight: 400; font-size: 26px; line-height: 1; }
.choice span { font-size: 14px; color: var(--bone-2); }
.choice .now { color: var(--fog); font-size: 13px; margin-top: auto; padding-top: 6px; border-top: 1px dashed var(--line); }
.modal.side { place-items: start; background: rgba(5, 9, 10, .35); }
.modal.side .card { width: min(640px, 100%); margin-top: 70px; padding: 18px; }
.modal.side .card:not(.enter) { animation: none; }
.phead { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.phead h2 { font-size: 34px; margin: 0; }
.pbody { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; }
.pbody.p-perks { grid-template-columns: minmax(0, 1fr); }
.bag { display: grid; grid-template-columns: repeat(4, 54px); gap: 6px; align-content: start; }
.bag .cell { width: 54px; height: 54px; aspect-ratio: auto; }
.bag .cell .n { position: absolute; right: 4px; bottom: 2px; font-size: 12px; color: var(--bone); font-weight: 700; }
.gear { display: grid; gap: 5px; align-content: start; min-width: 210px; }
.gslot { display: flex; gap: 10px; align-items: center; background: none; border: 1px solid transparent; border-radius: 6px; padding: 3px; cursor: pointer; text-align: left; font-size: 14px; }
.gslot[aria-pressed="true"] { border-color: var(--bone); }
.gslot .cell { width: 40px; height: 40px; aspect-ratio: auto; flex: none; }
.gslot small { display: block; color: var(--fog); font-size: 11.5px; }
.gslot i { color: var(--fog-2); }
.det h3 { font-family: var(--display); font-weight: 400; font-size: 28px; margin: 0 0 4px; }
.det .ctas { margin-top: 12px; }
.plist h3 { font-family: var(--display); font-weight: 400; font-size: 24px; margin: 6px 0; }
.plist p { font-size: 15px; margin-bottom: 8px; }
.modal.dead { background: rgba(5, 9, 10, .72); }
.modal.dead .card { text-align: center; border-color: #5a2a1a; }
.modal.dead .ctas { justify-content: center; }
.modal.dead .kicker { color: var(--fog); }
.modal .wiped { font-size: clamp(64px, 14vw, 110px); color: var(--rust); letter-spacing: .02em; margin: 2px 0 4px; }
.modal.dead .who { font-size: 19px; }
.stats.big { display: inline-grid; text-align: left; font-size: 16px; margin: 14px auto; }
@media (max-width: 760px) {
  .hud { grid-template-columns: minmax(0, 1fr) auto; }
  .hud-c { grid-column: 1 / -1; grid-row: 2; }
  .hud-c .night { font-size: 26px; }
  .hud-l { max-width: 200px; }
  .hbtns button kbd { display: none; }
  .hbtns button { padding: 6px 8px; font-size: 13px; }
  .choices { grid-template-columns: minmax(0, 1fr); }
  .choice b { font-size: 22px; }
  .modal .card { padding: 18px; }
  .modal h2 { font-size: 32px; }
  .modal.side .card { margin-top: 110px; }
  .pbody { grid-template-columns: minmax(0, 1fr); }
  .say { max-width: calc(100% - 180px); left: auto; right: 14px; transform: none; font-size: 13px; }
  .say.on { transform: none; }
}
