@font-face {
  font-family: "daw";
  src: url("/assets/fonts/Silkscreen-Regular.ttf") format("truetype");
  font-display: swap;
}

:root {
  --paper: #f3efe4;
  --mute: #a3988c;
  --ash: #6d645c;
  --mid: #4a433c;
  --panel: #2a241f;
  --ink: #161311;
  --void: #070605;
  --ember: #ff7a2e;
  --warn: #ffb089;
  --edge: #1a1422;
  --track-height: 8px;
  --thumb-height: 24px;
  --thumb-width: 16px;
  --chunk: 3px 3px 0 #1a1422;
  --well: inset 0 0 0 2px #1a1422;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

img,
svg,
canvas {
  display: block;
}

button,
input {
  font: inherit;
  color: inherit;
  background: transparent;
  letter-spacing: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: inherit;
}

html,
body {
  height: 100%;
}

body {
  font-family: "daw", ui-monospace, monospace;
  font-size: 16px;
  line-height: 1.35;
  color: var(--paper);
  background: var(--void);
  height: auto;
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  user-select: none;
}

p {
  padding-top: 4px;
}

.app {
  height: 100vh;
  height: 100dvh;
  min-height: 100vh;
  min-height: 100dvh;
  flex-shrink: 0;
  overflow: hidden;
  display: flex;
}

.window {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  box-shadow: var(--chunk);
}

.window-head {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 6px 8px;
  background: var(--mid);
  box-shadow: inset 0 -2px 0 var(--edge);
}

.window-body {
  flex: 1;
  min-height: 0;
  display: flex;
  padding: 6px;
}

.head-left,
.head-right {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.head-title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-weight: normal;
  font-size: 16px;
}

.head-title .name {
  font-family: "daw", ui-monospace, monospace;
  font-size: 24px;
  line-height: 1;
  position: relative;
  top: 2px;
}

.head-title .by {
  color: var(--mute);
}

.brand-logo {
  display: block;
  height: 28px;
  width: auto;
  max-width: min(240px, 62vw);
  object-fit: contain;
  object-position: left center;
  image-rendering: pixelated;
}

.brand-mark {
  width: 22px;
  height: 22px;
  flex: none;
  image-rendering: pixelated;
}

.window-head.brand-head {
  justify-content: flex-start;
}

.btn {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  padding: 6px 8px;
  background: var(--mid);
  color: var(--paper);
  box-shadow: var(--chunk);
}

.btn:hover {
  background: var(--ash);
}

.btn:focus {
  outline: none;
}

.btn > span {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn img {
  width: 20px;
  height: 20px;
  image-rendering: pixelated;
}

a.btn {
  color: inherit;
  text-decoration: none;
}

.tag {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  font-size: 14px;
  background: var(--ink);
  box-shadow: var(--well);
}

.tag:hover {
  background: var(--mid);
}

.tag > span {
  margin-top: 3px;
}

.stage {
  position: relative;
  flex: 1;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: var(--void);
  box-shadow: var(--well);
}

#game {
  position: absolute;
  left: 2px;
  top: 2px;
  image-rendering: pixelated;
}

.stage.playing:not(.waiting),
.stage.playing:not(.waiting) * {
  cursor: none !important;
}

#ui {
  position: absolute;
  inset: 2px;
  pointer-events: none;
}

.title-video {
  position: absolute;
  inset: 2px;
  pointer-events: none;
  opacity: 0;
}

.title-video.on {
  opacity: 1;
}

.title-video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.title-video::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(22, 19, 17, 0.42);
}

.screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.15s ease;
}

.screen.hidden,
.hidden {
  opacity: 0;
  pointer-events: none !important;
}

.screen.hidden * {
  pointer-events: none !important;
}

#loading.hidden {
  visibility: hidden;
  transition: opacity 0.15s ease, visibility 0s linear 0.15s;
}

#loading.gone {
  display: none !important;
}

.more-link,
.join-link {
  display: flex;
  align-items: center;
  color: var(--paper);
}

.join-link {
  gap: 6px;
  align-items: baseline;
}

body.touch #title .keys-row {
  justify-content: space-between;
}

.more-link p,
.made-on a,
.legal a,
.text-link p {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 2px;
}

.made-on,
.pack-promo,
.pack-promo-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.art-strip {
  display: flex;
  align-items: flex-start;
  justify-content: space-evenly;
}

.art-strip canvas,
.slot canvas,
.hero-pick canvas,
.skin-tile canvas,
.keys-row img,
.mobile-icon,
.rotate img,
.tbtn-alt canvas {
  image-rendering: pixelated;
}

#pause .gray,
#complete .gray,
#vs-over .gray,
.gray {
  color: var(--ash);
}

.menu-card [hidden],
.featured-card[hidden] {
  display: none !important;
}

.more-link:hover,
.text-link:hover,
.text-link:focus-visible,
.legal a:hover {
  color: #ffffff;
  outline: none;
}

.overlay {
  background: rgba(0, 0, 0, 0.55);
}

.sfwin {
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  box-shadow: var(--chunk);
}

.sfwin > .window-head {
  gap: 16px;
}

.sfwin > .window-head button img {
  width: 20px;
  height: 20px;
}

.sfwin-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px;
}

.muted,
.legal,
.party-status,
.party-online,
.lobby-waiting p,
.picks > p,
.picks.col > p {
  color: var(--mute);
}

.legal {
  font-size: 12px;
}

.home-legal {
  margin-top: 16px;
  text-align: center;
}

.title-card {
  width: min(620px, calc(100% - 32px));
  max-height: calc(100% - 16px);
  overflow: auto;
}

.title-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 16px;
  width: 100%;
}

.featured-card {
  width: 280px;
}

.featured-img,
.mobile-hero {
  display: block;
  width: 100%;
  height: auto;
  box-shadow: var(--well);
}

#title {
  container-type: inline-size;
  justify-content: flex-start;
  overflow-y: auto;
  padding: 24px 0;
}

@container (min-width: 1212px) {
  .title-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
  }
  .title-row > .title-card {
    grid-column: 2;
    width: 620px;
  }
  #title .title-row > .featured-card {
    grid-column: 3;
    justify-self: start;
    width: 280px;
  }
}

.hero-title,
.big-score,
.skins-name,
.party-count,
.vs-center,
.map-tile .any {
  font-family: "daw", ui-monospace, monospace;
  font-weight: normal;
}

.hero-title {
  font-size: 48px;
  line-height: 1.1;
}

.url-row,
.code-row,
.pick-row,
.menu-card .row,
.leave-body {
  display: flex;
  gap: 8px;
}

.input-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px 8px 6px;
  background: var(--void);
  box-shadow: var(--well);
  cursor: text;
}

.input-wrap:focus-within {
  box-shadow: inset 0 0 0 2px #ff7a2e;
}

.input-wrap .proto {
  color: var(--ash);
  padding-top: 4px;
}

.input-wrap .proto.label {
  margin-right: 8px;
}

.input-wrap input {
  flex: 1;
  min-width: 0;
  outline: none;
  padding-top: 4px;
}

.input-wrap input::placeholder {
  color: var(--ash);
}

.picks {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.picks.col {
  flex-direction: column;
  align-items: flex-start;
}

.picks.col > .url-row {
  align-self: stretch;
}

.err {
  color: var(--warn);
}

.err:empty {
  display: none;
}

#title .err {
  display: block;
  min-height: 24px;
}

.keys-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  color: var(--mute);
}

.keys-row > span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.keys-row img {
  height: 17px;
  width: auto;
}

kbd {
  font: inherit;
  font-size: 14px;
  color: var(--paper);
  background: var(--mid);
  padding: 2px 5px 0;
  box-shadow: var(--well);
}

.load-card {
  width: min(420px, calc(100% - 32px));
}

.load-row,
.meter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.load-bar,
.meter {
  position: relative;
  display: flex;
  height: 12px;
  width: 100%;
  background: var(--void);
  box-shadow: var(--well);
}

.load-bar i,
.meter i,
.meter b {
  position: absolute;
  left: 0;
  top: 0;
  height: 12px;
  width: 0;
}

.load-bar i,
.meter i {
  background: var(--ember);
}

.meter b {
  background: var(--paper);
  opacity: 0.85;
}

#hud {
  position: absolute;
  inset: 0;
  transition: opacity 0.15s ease;
}

.hud-tl {
  position: absolute;
  left: 12px;
  top: 12px;
  width: 260px;
}

.hud-tl .window-head p {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.hud-tl .sfwin-body {
  padding: 8px;
  gap: 0;
}

.hud-progress {
  position: absolute;
  left: 12px;
  top: 12px;
  width: 256px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  background: var(--mid);
  box-shadow: var(--chunk);
}

.hud-progress .meter {
  flex: 1;
}

.hud-progress p {
  min-width: 40px;
  text-align: right;
}

.meter-row {
  margin-bottom: 8px;
}

.hud-weapons {
  position: absolute;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  padding: 8px;
  background: var(--void);
  box-shadow: var(--well);
}

.slot {
  position: relative;
  width: 76px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--panel);
  box-shadow: var(--chunk);
}

.slot.on {
  background: var(--mid);
}

.slot .key {
  position: absolute;
  left: 6px;
  top: 3px;
  font-size: 14px;
  color: var(--ash);
}

.slot.on .key {
  color: var(--paper);
}

.slot.alt {
  width: 60px;
}

.slot.off {
  display: none;
}

.wname {
  position: absolute;
  left: 50%;
  bottom: 92px;
  transform: translateX(-50%);
  padding: 6px 8px;
  background: var(--panel);
  box-shadow: var(--well);
  white-space: nowrap;
  transition: opacity 0.15s ease;
}

.hud-hint {
  position: absolute;
  left: 12px;
  bottom: 12px;
  max-width: 380px;
  transition: opacity 0.15s ease;
}

.slot .charge {
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 4px;
  height: 3px;
  background: var(--ink);
  opacity: 0;
}

.slot .charge i {
  display: block;
  height: 100%;
  background: var(--paper);
}

.slot .charge.on {
  opacity: 1;
}

.hud-hint .sfwin-body {
  padding: 10px 12px;
  gap: 8px;
}

.menu-card {
  width: min(500px, calc(100% - 32px));
  max-height: calc(100% - 24px);
}

.menu-card > .sfwin-body,
#about .sfwin-body {
  overflow: auto;
}

.hero-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.hero-pick {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  flex: 1 1 108px;
  padding: 6px;
  background: var(--ink);
  box-shadow: var(--chunk);
  color: inherit;
}

.hero-pick.on,
.skin-tile.on,
.skin-tile.worn {
  background: var(--mid);
  box-shadow: 0 0 0 2px var(--ember);
}

.hero-pick.poor {
  background: #5a3038;
}

.hero-pick canvas {
  width: 64px;
  height: 48px;
}

.hero-pick p {
  font-size: 13px;
  line-height: 16px;
}

.hud-coins {
  position: absolute;
  left: 12px;
  top: 44px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  background: var(--mid);
  box-shadow: var(--chunk);
}

.hud-coins::before {
  content: "";
  width: 8px;
  height: 8px;
  background: #ffd84d;
  box-shadow: inset -2px -2px 0 #a56b10;
}

.hud-coins p {
  color: #ffd84d;
}

body.touch #hud-coins {
  left: auto;
  right: 42px;
  top: 6px;
  padding: 2px 6px;
  background: rgba(0, 0, 0, 0.72);
}

body.touch:not(.portrait) .hud-weapons {
  max-width: calc(100% - 16px);
  overflow-x: auto;
}

.menu-card .row .btn,
.leave-body .btn {
  flex: 1;
}

.inner {
  padding: 8px;
  background: var(--void);
  box-shadow: var(--well);
}

.keys,
.stats {
  display: grid;
  gap: 6px 16px;
  color: var(--mute);
}

.keys {
  grid-template-columns: auto 1fr;
}

.stats {
  grid-template-columns: 1fr auto;
}

.keys > p:nth-child(odd),
.stats .v,
.board .n,
.board .v {
  color: var(--paper);
}

.stats .v,
.board .v {
  text-align: right;
}

.seg {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.seg .btn {
  flex: 1 0 auto;
  background: var(--ink);
}

.seg .btn.on,
.seg .btn:hover {
  background: var(--mid);
}

input[type="range"] {
  appearance: none;
  background: transparent;
  width: 100%;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-runnable-track,
input[type="range"]::-moz-range-track {
  background: var(--mid);
  height: var(--track-height);
}

input[type="range"]::-webkit-slider-thumb,
input[type="range"]::-moz-range-thumb {
  appearance: none;
  background: var(--ember);
  width: var(--thumb-width);
  height: var(--thumb-height);
  border: 0;
  border-radius: 0;
}

input[type="range"]::-webkit-slider-thumb {
  margin-top: calc((var(--track-height) / 2) - (var(--thumb-height) / 2));
}

input[type="range"]:focus {
  outline: none;
}

.sfx-vol {
  display: block;
  height: var(--thumb-height);
  margin-top: 8px;
}

.big-score {
  font-size: 96px;
  line-height: 1;
}

#ui.versus .sp-only,
#ui:not(.versus) .vs-only {
  display: none !important;
}

.input-wrap.code {
  flex: none;
  width: 132px;
}

.input-wrap.code input {
  text-transform: uppercase;
}

.input-wrap.code input::placeholder {
  text-transform: none;
}

#mobile.hidden {
  display: none;
}

.mobile-body {
  align-items: center;
  text-align: center;
}

.mobile-body .hero-title {
  font-size: 32px;
}

.mobile-hero {
  max-width: 512px;
}

.btn.shine {
  width: 100%;
  max-width: 512px;
  padding: 6px 64px;
  background: linear-gradient(110deg, #1a1422, 45%, #ffb089, 55%, #1a1422);
  background-size: 220% 100%;
  animation: background-shine 2.5s linear infinite;
}

@keyframes background-shine {
  from { background-position: -20% 0; }
  to { background-position: -200% 0; }
}

.mobile .head-title .by,
.mobile .head-title a,
.mobile #btn-share,
.mobile #btn-mp {
  display: none !important;
}

@media (max-width: 640px) {
  .head-title .name { font-size: 18px; }
}

body:not(.touch) .touch-only,
body.touch .kb-only {
  display: none !important;
}

body.touch {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
}

body.touch button,
body.touch a {
  touch-action: manipulation;
}

body.touch .app {
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

body.touch .window > .window-head {
  display: none;
}

body.touch .window-body {
  padding: 0;
}

body.touch .stage.playing {
  touch-action: none;
}

body.touch .screen {
  justify-content: flex-start;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 8px 0;
}

body.touch #title,
body.touch #mp,
body.touch #lobby,
body.touch #loading {
  padding-top: 76px;
}

body.touch .screen:not(.hidden) {
  pointer-events: auto;
}

body:not(.ios-safari) .ios-only {
  display: none !important;
}

body.touch .screen > .sfwin,
body.touch .screen > .title-row {
  flex-shrink: 0;
  margin: auto 0;
}

body.touch #pause,
body.touch #complete,
body.touch #vs-over {
  overflow-anchor: none;
}

#pause {
  overflow-y: auto;
  justify-content: safe center;
}

#pause > .sfwin {
  margin-top: 0;
  margin-bottom: 0;
  flex-shrink: 0;
}

body.touch .featured-card {
  width: min(620px, calc(100% - 32px));
}

body.touch .sfwin-body {
  gap: 10px;
  padding: 12px;
}

body.touch .hero-title { font-size: 30px; }
body.touch .big-score { font-size: 60px; }

body.touch #hud .sfwin,
#hud.hidden * {
  pointer-events: none !important;
}

body.touch .hud-tl {
  left: 8px;
  top: 8px;
  width: 200px;
}

body.touch .hud-tl .window-head { padding: 4px 8px; }
body.touch .hud-tl .sfwin-body { padding: 6px 8px; }

body.touch #hud-progress {
  left: 8px;
  top: 8px;
  width: 150px;
  gap: 6px;
  padding: 3px 6px;
  background: rgba(0, 0, 0, 0.35);
  box-shadow: none;
}

body.touch #hud-progress p {
  min-width: 0;
  font-size: 13px;
  line-height: 14px;
}

body.touch #hud-progress .meter {
  flex: 1;
  box-shadow: none;
  background: rgba(255, 255, 255, 0.15);
}

body.touch #hud-progress .meter,
body.touch #hud-progress .meter i,
body.touch #hud-progress .meter b {
  height: 4px;
}

body.touch .hud-weapons {
  bottom: 6px;
  gap: 4px;
  padding: 4px;
  background: none;
  box-shadow: none;
  pointer-events: auto;
}

body.touch .slot {
  width: 50px;
  height: 34px;
}

body.touch .slot .key,
body.touch .slot.alt {
  display: none;
}

body.touch .wname {
  bottom: 52px;
  padding: 3px 6px;
  font-size: 12px;
}

body.touch .hud-hint {
  left: 50%;
  top: 8px;
  bottom: auto;
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100% - 440px);
  font-size: 14px;
}

body.touch .hud-hint .sfwin-body { padding: 6px 10px; }
body.touch .vs-feed { top: 40px; right: 6px; }

body.touch.portrait .hud-weapons {
  flex-wrap: wrap;
  justify-content: center;
  width: max-content;
  max-width: calc(100% - 120px);
}

body.touch.portrait .slot { width: 48px; }
body.touch.portrait .tstick { top: calc(100% - 190px); }
body.touch.portrait .hud-hint {
  top: 40px;
  max-width: calc(100% - 24px);
}

.tstick {
  position: absolute;
  left: 84px;
  top: calc(100% - 84px);
  width: 104px;
  height: 104px;
  margin: -52px 0 0 -52px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.35);
  background: rgba(0, 0, 0, 0.18);
  opacity: 0.45;
  pointer-events: none;
}

.tstick.on { opacity: 1; }

.tstick i {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.35);
}

.tbtn {
  position: absolute;
  pointer-events: auto;
  touch-action: none;
}

.tbtn-alt {
  right: 10px;
  bottom: 10px;
  width: 44px;
  height: 44px;
  padding: 0;
  flex-direction: column;
  gap: 0;
}

.tbtn-alt canvas { width: 32px; height: 32px; }
.tbtn-alt.dive canvas { width: 16px; height: 16px; }
.tbtn-alt p { display: none; font-size: 12px; line-height: 12px; }
.tbtn-alt.dive p { display: block; }

.tbtn-pause {
  right: 6px;
  top: 6px;
  width: 28px;
  height: 28px;
  padding: 0;
  gap: 4px;
}

.tbtn-pause i {
  width: 4px;
  height: 10px;
  background: var(--paper);
}

.rotate { display: none; }

body.touch.turn .rotate {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 24px;
  text-align: center;
  background: var(--panel);
}

.badge-preview {
  display: flex;
  justify-content: center;
  padding: 20px;
  background: #1e1e1e;
  box-shadow: var(--well);
}

.badge-preview.light { background: #ededed; }
.badge-preview img:not(.on) { display: none; }
#badge .seg { margin-top: 0; }

.badge-code {
  margin: 0;
  font: 14px/20px "daw", ui-monospace, monospace;
  color: var(--mute);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  user-select: text;
}

.link-box {
  flex: 1;
  min-width: 0;
  padding: 4px 8px 6px;
  background: var(--void);
  box-shadow: var(--well);
  overflow: hidden;
  user-select: text;
}

.link-box p {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.players {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pl {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dot {
  width: 12px;
  height: 12px;
  flex: none;
  box-shadow: var(--well);
}

.pl .tag-me { color: var(--ash); }
.meter.hp i { background: #7cff6b; }
.meter.hp.low i { background: #ff4d4d; }

.vs-feed {
  position: absolute;
  right: 12px;
  top: 12px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.vs-feed p {
  padding: 4px 8px;
  background: var(--panel);
  box-shadow: var(--well);
  white-space: nowrap;
}

.vs-center {
  position: absolute;
  left: 50%;
  top: 34%;
  transform: translate(-50%, -50%);
  font-size: 32px;
  text-shadow: 0 3px 0 #000;
  white-space: nowrap;
  transition: opacity 0.15s ease;
}

.vs-board {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(440px, calc(100% - 32px));
}

.board {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 6px 16px;
  align-items: center;
  color: var(--mute);
}

.maps {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 6px;
  width: 100%;
}

.map-tile {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 4px 4px 6px;
  box-shadow: var(--well);
  text-align: left;
  background: var(--ink);
}

.map-tile:hover,
.map-tile:focus-visible {
  background: var(--mid);
  outline: none;
}

.map-tile img,
.map-tile .any {
  width: 100%;
  height: 60px;
  object-fit: cover;
  object-position: top;
  background: var(--void);
}

.map-tile .any {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 39px;
  line-height: 1;
  color: var(--ember);
}

.map-tile p { font-size: 14px; line-height: 16px; }
.map-tile.random { background: var(--mid); }
.map-tile.random:hover { background: var(--ash); }
body.touch .map-tile img,
body.touch .map-tile .any { height: 64px; }

.skins-shelf {
  width: min(620px, calc(100% - 32px));
  container-type: inline-size;
}

#title > .skins-shelf {
  flex-shrink: 0;
  margin: auto 0 16px;
}

#title > .title-row {
  flex-shrink: 0;
  margin: 0 0 auto;
}

body.touch #title > .title-row { order: 1; margin: auto 0 16px; }
body.touch #title > .skins-shelf { order: 2; margin: 0 0 auto; }
body.touch #title > .home-legal { order: 3; }

.skins-shelf > .sfwin-body {
  flex-direction: row;
  align-items: center;
}

.skins-shelf-skins,
.pack-promo-skins {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 88px);
  gap: 6px;
}

.skins-shelf-side {
  flex: 1;
  min-width: 0;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
}

@container (max-width: 560px) {
  .skins-shelf > .sfwin-body {
    flex-direction: column;
    align-items: stretch;
  }
}

#skins-actions:empty { display: none; }

.text-link {
  font-size: 14px;
  line-height: 16px;
  color: var(--mute);
  text-align: left;
}

.window-head > .text-link { margin-left: auto; }

.skins-top {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-start;
}

.skins-preview {
  width: 150px;
  height: 150px;
  flex: none;
  padding: 0;
  background: var(--mid);
  image-rendering: pixelated;
}

.skins-about {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: flex-start;
  gap: 8px;
  min-width: min(100%, 180px);
}

.skins-name { font-size: 26px; line-height: 1.1; }

.skins-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 6px;
}

.skin-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 0 0 6px;
  background: var(--mid);
  box-shadow: var(--well);
  touch-action: manipulation;
}

.skin-tile canvas {
  display: block;
  width: 88px;
  height: 88px;
}

.skin-tile p { font-size: 14px; line-height: 16px; }

button.skin-tile:hover,
button.skin-tile:focus-visible {
  background: var(--ash);
  outline: none;
}

.skin-tile.worn::after {
  content: "Worn";
  position: absolute;
  top: 0;
  right: 0;
  padding: 0 3px 1px 4px;
  font-size: 11px;
  line-height: 12px;
  background: var(--ember);
  color: var(--void);
  pointer-events: none;
}

#skins-actions { width: 100%; }

.hero-confirm {
  width: 100%;
  flex: 1 1 100%;
  min-height: 44px;
  padding: 8px 16px;
  touch-action: manipulation;
}

.hero-confirm:disabled { opacity: 0.45; }

body.touch .skins-preview { width: 120px; height: 120px; }

#party { justify-content: center; }

.party-card { width: min(420px, calc(100% - 32px)); }

.party-body {
  align-items: center;
  text-align: center;
  gap: 14px;
}

.party-when,
.party-who {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.party-count { font-size: 64px; line-height: 1; }
.party-count:empty,
.party-online:empty { display: none; }

.party-find {
  position: relative;
  width: 160px;
  height: 8px;
  overflow: hidden;
  background: var(--void);
  box-shadow: var(--well);
}

.party-find i {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 40px;
  background: var(--ember);
  animation: party-find 1.2s linear infinite;
}

@keyframes party-find {
  from { transform: translateX(-40px); }
  to { transform: translateX(160px); }
}

body.quick .tbtn-pause:not(.tbtn-leave),
body.quick .esc-key,
body:not(.quick) .tbtn-leave,
body:not(.quick) .esc-leave {
  display: none !important;
}

.tbtn-leave img { width: 12px; height: 12px; }
#leave-q { justify-content: center; }
.leave-card { width: min(340px, calc(100% - 32px)); }
.leave-sound { display: flex; align-items: center; gap: 12px; }
.leave-sound .sfx-vol { flex: 1; margin-top: 0; }
.over-settings { display: flex; flex-wrap: wrap; gap: 12px 16px; }
.over-sound { flex: 1 1 140px; }
.leave-body #leave-no { flex: 2; }

.lobby-waiting { display: flex; align-items: center; gap: 10px; }
.lobby-waiting.hidden,
.lobby-alone.hidden { display: none; }

.party-online { font-size: 14px; }
.party-n { font-size: 22px; line-height: 24px; }

.party-players {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}

.party-players .chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px 4px;
  background: var(--void);
  box-shadow: var(--well);
}

#hud.party-hidden { opacity: 0; }
#hud.party-hidden * { pointer-events: none !important; }

@media (max-height: 520px) {
  .party-card { width: min(560px, calc(100% - 32px)); }
  .party-body { flex-direction: row; justify-content: center; gap: 24px; }
  .party-count { font-size: 48px; }
}

#about { z-index: 40; }
#about .about-card {
  width: min(560px, calc(100% - 32px));
  max-height: min(720px, calc(100% - 48px));
}

.about-weapons {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.about-weapons b { color: var(--paper); }
