* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #14141a; color: #d9d2c3;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; user-select: none; -webkit-user-select: none; touch-action: none; overscroll-behavior: none; }
#c { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; cursor: pointer; touch-action: none; }
a { color: #3fd6ff; }

#vignette { position: fixed; inset: 0; pointer-events: none; opacity: 0; background: radial-gradient(ellipse at center, transparent 45%, rgba(255, 40, 10, .75) 100%); }
#hud { position: fixed; inset: 0; pointer-events: none; }
#top { position: absolute; top: calc(8px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); text-align: center; text-shadow: 0 1px 6px #000; }
#time { font-size: 34px; font-weight: 700; letter-spacing: 1px; line-height: 1; }
#kills { font-size: 13px; opacity: .85; margin-top: 3px; }
#hp { width: min(46vw, 260px); height: 7px; margin: 6px auto 0; background: rgba(20, 20, 26, .7); border: 1px solid rgba(217, 210, 195, .5); }
#hp i { display: block; height: 100%; width: 100%; background: #d9d2c3; transition: width .12s; }
#hp.low i { background: #ff4a1f; animation: pulse .5s infinite alternate; }
@keyframes pulse { to { opacity: .45; } }

#cross { position: absolute; left: 50%; top: 50%; }
#cross i { position: absolute; left: -2px; top: -2px; width: 4px; height: 4px; border-radius: 50%; background: #3fd6ff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .6); }
#cross b { position: absolute; left: -11px; top: -11px; width: 22px; height: 22px; opacity: 0; transform: rotate(45deg);
  background: linear-gradient(#fff, #fff) center/2px 100% no-repeat, linear-gradient(#fff, #fff) center/100% 2px no-repeat;
  -webkit-mask: radial-gradient(circle, transparent 4px, #000 5px); mask: radial-gradient(circle, transparent 4px, #000 5px); }
#cross b.kill { background: linear-gradient(#ff4a1f, #ff4a1f) center/3px 100% no-repeat, linear-gradient(#ff4a1f, #ff4a1f) center/100% 3px no-repeat; }

#banner { position: absolute; left: 0; right: 0; top: 24%; text-align: center; opacity: 0; transition: opacity .3s; text-shadow: 0 2px 10px #000; }
#banner.on { opacity: 1; }
#banner strong { display: block; font-size: 30px; letter-spacing: 8px; color: #ff7a3c; }
#banner span { font-size: 14px; }

#weapons { position: absolute; left: 50%; bottom: calc(12px + env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; gap: 6px; pointer-events: auto; }
#weapons button { position: relative; width: min(62px, 17vw); height: 52px; padding: 4px 2px 2px; background: rgba(20, 20, 26, .6); border: 1px solid rgba(217, 210, 195, .35); border-radius: 6px; }
#weapons svg { width: 34px; height: 17px; fill: #d9d2c3; display: block; margin: 0 auto; }
#weapons span { display: none; }
#weapons em { position: absolute; left: 4px; top: 2px; font-style: normal; font-size: 10px; opacity: .6; }
#weapons b { display: block; font-size: 15px; line-height: 1.2; }
#weapons button.on { border-color: #3fd6ff; background: rgba(63, 214, 255, .2); }
#weapons button.on svg { fill: #3fd6ff; }
#weapons button.out { opacity: .4; }
#weapons button.locked { opacity: .45; border-style: dashed; }
#weapons button.locked svg { opacity: .4; }
#weapons button.locked b { font-size: 11px; line-height: 1.65; }
#heat { position: absolute; left: 50%; top: calc(50% + 24px); width: 72px; height: 5px; margin-left: -36px; background: rgba(20, 20, 26, .6); border: 1px solid rgba(217, 210, 195, .45); opacity: 0; transition: opacity .2s; }
#heat.show { opacity: 1; }
#heat i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #3fd6ff, #ffb23c 60%, #ff4a1f); background-size: 72px 100%; }
#heat span { display: none; position: absolute; left: 50%; top: 9px; transform: translateX(-50%); font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #ff4a1f; text-shadow: 0 1px 3px #000; white-space: nowrap; }
#heat.hot { border-color: #ff4a1f; }
#heat.hot i { background: #ff4a1f; animation: pulse .25s infinite alternate; }
#heat.hot span { display: block; }
#fire.hot { border-color: #ff4a1f; color: #ff4a1f; opacity: .6; }
body.touch #weapons em { display: none; }

#corner { position: absolute; right: calc(8px + env(safe-area-inset-right)); top: calc(8px + env(safe-area-inset-top)); display: flex; gap: 6px; pointer-events: auto; }
#corner button { width: 44px; height: 44px; padding: 10px; background: rgba(20, 20, 26, .55); border: 1px solid rgba(217, 210, 195, .35); border-radius: 6px; }
#corner svg { width: 100%; height: 100%; fill: #d9d2c3; stroke: #d9d2c3; }
#mute .off { display: none; }
#mute.muted .on { display: none; }
#mute.muted .off { display: inline; }
#fps { position: absolute; left: calc(8px + env(safe-area-inset-left)); top: calc(8px + env(safe-area-inset-top)); font-size: 11px; opacity: .8; white-space: pre; text-shadow: 0 1px 3px #000; }

#touch { display: none; }
body.touch #touch { display: block; position: absolute; inset: 0; }
#stick { position: absolute; width: 112px; height: 112px; margin: -56px 0 0 -56px; border-radius: 50%; border: 2px solid rgba(217, 210, 195, .35); background: rgba(20, 20, 26, .25); opacity: 0; }
#stick.on { opacity: 1; }
#stick i { position: absolute; left: 50%; top: 50%; width: 48px; height: 48px; margin: -24px 0 0 -24px; border-radius: 50%; background: rgba(63, 214, 255, .55); }
#fire, #jump { position: absolute; pointer-events: auto; border-radius: 50%; font-weight: 700; letter-spacing: 1px; border: 2px solid rgba(217, 210, 195, .5); background: rgba(20, 20, 26, .45); }
#fire { right: calc(20px + env(safe-area-inset-right)); bottom: calc(84px + env(safe-area-inset-bottom)); width: 92px; height: 92px; font-size: 15px; border-color: #3fd6ff; color: #3fd6ff; }
#jump { right: calc(30px + env(safe-area-inset-right)); bottom: calc(192px + env(safe-area-inset-bottom)); width: 68px; height: 68px; font-size: 12px; }
#fire.on, #jump.on { background: rgba(63, 214, 255, .35); }
@media (orientation: landscape) and (max-height: 500px) {
  #fire { bottom: calc(70px + env(safe-area-inset-bottom)); right: calc(36px + env(safe-area-inset-right)); }
  #jump { bottom: calc(150px + env(safe-area-inset-bottom)); right: calc(140px + env(safe-area-inset-right)); }
  #time { font-size: 26px; }
}

.card { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(92vw, 440px); max-height: 94vh; overflow: auto; padding: 22px 20px; text-align: center;
  background: rgba(20, 20, 26, .86); border: 1px solid rgba(217, 210, 195, .3); border-radius: 10px; backdrop-filter: blur(3px); }
.card h1 { margin: 0 0 6px; font-size: 44px; letter-spacing: 6px; color: #d9d2c3; text-shadow: 0 0 18px rgba(255, 74, 31, .7); }
.card h2 { margin: 0 0 4px; font-size: 26px; }
.card .tag { margin: 0 0 16px; color: #ff7a3c; font-size: 15px; line-height: 1.45; }
.card button { display: block; width: 100%; min-height: 46px; margin: 8px 0; background: transparent; border: 1px solid rgba(217, 210, 195, .45); border-radius: 6px; font-size: 15px; }
.card button.big { min-height: 58px; font-size: 21px; font-weight: 700; letter-spacing: 3px; color: #14141a; background: #3fd6ff; border-color: #3fd6ff; }
.card label { display: block; margin: 12px 0; font-size: 13px; }
.card label input[type=range] { width: 100%; margin-top: 6px; }
.card .keys { font-size: 12px; line-height: 1.6; opacity: .8; margin: 12px 0 0; }
.card .small { font-size: 12px; opacity: .75; margin: 10px 0 0; line-height: 1.5; }
.card .mark { margin: 0 0 10px; font-size: 11px; opacity: .6; }
[data-wefav-row] { margin-top: 16px; }
#dstats { font-size: 15px; margin: 0 0 10px; }
.finger { display: none; }
body.touch .finger { display: block; }
body.touch .mouse { display: none; }
/* Once a gamepad has been used, the hints are its buttons. */
.padkeys { display: none; }
body.pad .padkeys { display: block; }
body.pad .mouse, body.pad .finger, body.pad #touch { display: none; }
.card .unlock { color: #3fd6ff; opacity: 1; font-size: 13px; margin: 0 0 6px; }
#look { position: absolute; left: 50%; top: calc(82px + env(safe-area-inset-top)); transform: translateX(-50%); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; opacity: .55; text-shadow: 0 1px 3px #000; white-space: nowrap; }
/* Whiteout is a pale backdrop: the HUD's text goes dark. */
body[data-look="whiteout"] #top, body[data-look="whiteout"] #look, body[data-look="whiteout"] #fps, body[data-look="whiteout"] #banner span { color: #14141a; text-shadow: 0 1px 2px rgba(255, 255, 255, .7); }
body[data-look="whiteout"] #hp { background: rgba(20, 20, 26, .25); }
body[data-look="whiteout"] #hp i { background: #14141a; }

/* The house question and the fake door on the death card. */
.card .ask { margin: 14px 0 0; padding-top: 10px; border-top: 1px solid rgba(217, 210, 195, .18); }
.card .ask .q { margin: 0 0 4px; font-size: 14px; font-weight: 700; }
.card .ask button { min-height: 38px; margin: 5px 0; font-size: 13px; }
.card .ask .thanks { margin: 6px 0; color: #3fd6ff; font-size: 14px; }
.card .ask a { color: #3fd6ff; }
#door button { border-style: dashed; }
