:root {
  --sand-100: #f3d49a;
  --sand-200: #e5b56b;
  --sand-300: #c88743;
  --sand-400: #9c5a2d;
  --ink-900: #130c08;
  --ink-800: #21140b;
  --ink-700: #312013;
  --panel-glass: rgba(28, 17, 9, 0.74);
  --panel-edge: rgba(255, 226, 170, 0.28);
  --ui-text: #fff3d3;
  --ui-muted: #e9c98d;
  --font-ui: "Trebuchet MS", "Segoe UI", sans-serif;
  --font-title: Georgia, "Times New Roman", serif;
  --cursor-frontier-default: url("data:image/svg+xml,%3Csvg%20id='frontier-pointer'%20xmlns='http://www.w3.org/2000/svg'%20width='32'%20height='32'%20viewBox='0%200%2032%2032'%3E%3Cpath%20d='M4%202.5v23l6.1-5.5%204.1%209.1%204.2-2-4.1-8.8h8.3Z'%20fill='%23f6bd55'%20stroke='%2324150a'%20stroke-width='2.2'%20stroke-linejoin='round'/%3E%3Cpath%20d='M6.6%206.4v13.1l3.9-3.5%201.2%202.5'%20fill='none'%20stroke='%23ffe4a4'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3E%3Ccircle%20cx='6.5'%20cy='6.4'%20r='1.15'%20fill='%23d75c2e'%20stroke='%2324150a'%20stroke-width='.7'/%3E%3C/svg%3E") 4 3, default;
  --cursor-frontier-crosshair: url("data:image/svg+xml,%3Csvg%20id='frontier-crosshair'%20xmlns='http://www.w3.org/2000/svg'%20width='32'%20height='32'%20viewBox='0%200%2032%2032'%3E%3Cg%20fill='none'%20stroke-linecap='round'%3E%3Cpath%20d='M16%202v7m0%2014v7M2%2016h7m14%200h7'%20stroke='%2324150a'%20stroke-width='4'/%3E%3Ccircle%20cx='16'%20cy='16'%20r='8.5'%20stroke='%2324150a'%20stroke-width='4'/%3E%3Cpath%20d='M16%202v7m0%2014v7M2%2016h7m14%200h7'%20stroke='%23f6bd55'%20stroke-width='2'/%3E%3Ccircle%20cx='16'%20cy='16'%20r='8.5'%20stroke='%23f6bd55'%20stroke-width='2'/%3E%3C/g%3E%3Ccircle%20cx='16'%20cy='16'%20r='2.35'%20fill='%23df5f36'%20stroke='%2324150a'%20stroke-width='1.4'/%3E%3Ccircle%20cx='15.3'%20cy='15.2'%20r='.65'%20fill='%23fff0c1'/%3E%3C/svg%3E") 16 16, crosshair;
}

html[lang="hi"] {
  --font-ui: "Nirmala UI", "Noto Sans Devanagari", Mangal, "Segoe UI", sans-serif;
  --font-title: "Nirmala UI", "Noto Serif Devanagari", Mangal, Georgia, serif;
}

html[lang="hi"] * {
  letter-spacing: 0 !important;
}

html[lang="hi"] button {
  line-height: 1.2;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--ink-900);
  color: var(--ui-text);
  font-family: var(--font-ui);
  touch-action: none;
  user-select: none;
  cursor: var(--cursor-frontier-default);
}

button {
  border: 1px solid rgba(255, 229, 173, 0.32);
  border-radius: 999px;
  background:
    linear-gradient(180deg, #f6bf62, #d98a38 58%, #9e5424);
  color: #201108;
  cursor: var(--cursor-frontier-default);
  font: 800 16px/1 var(--font-ui);
  letter-spacing: 0.08em;
  padding: 14px 24px;
  text-transform: uppercase;
  box-shadow:
    inset 0 1px 0 rgba(255, 245, 211, 0.52),
    inset 0 -4px 0 rgba(70, 28, 7, 0.28),
    0 10px 28px rgba(0, 0, 0, 0.28);
}

button:hover,
button:focus-visible {
  background:
    linear-gradient(180deg, #ffd37c, #eb9f4f 58%, #b3652e);
  outline: 2px solid #ffe3a5;
  outline-offset: 3px;
}

button:disabled {
  cursor: var(--cursor-frontier-default);
  opacity: 0.48;
  outline: 0;
}

#game-root {
  position: fixed;
  inset: 0;
  --combat-hud-top: 16px;
  --combat-hud-right: 16px;
  --ammo-hud-width: min(246px, calc(100vw - 32px));
  --pause-menu-gap: 10px;
  overflow: hidden;
  cursor: var(--cursor-frontier-default);
}

#game-root::after {
  position: fixed;
  inset: 0;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(rgba(255, 238, 191, 0.08), rgba(74, 31, 15, 0.08)),
    radial-gradient(circle at 50% 45%, transparent 46%, rgba(33, 18, 9, 0.18) 100%);
  mix-blend-mode: multiply;
  z-index: 3;
}

#game-root.is-menu::after {
  background:
    radial-gradient(circle at 72% 30%, rgba(255, 196, 105, 0.16), transparent 26%),
    linear-gradient(rgba(255, 238, 191, 0.04), rgba(51, 22, 10, 0.2)),
    radial-gradient(circle at 50% 45%, transparent 42%, rgba(22, 11, 5, 0.28) 100%);
}

canvas {
  display: block;
  width: 100vw;
  height: 100vh;
}

.multiplayer-player-nameplates {
  position: fixed;
  inset: 0;
  z-index: 4;
  overflow: hidden;
  pointer-events: none;
}

.multiplayer-player-nameplate {
  --player-color: #55d7ff;
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  gap: 5px;
  max-width: 132px;
  padding: 3px 7px 4px 6px;
  border: 1px solid var(--player-color);
  border-radius: 999px;
  background: rgba(25, 15, 9, 0.68);
  color: #fff7df;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.02em;
  text-overflow: ellipsis;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.95);
  white-space: nowrap;
  box-shadow: 0 2px 7px rgba(0, 0, 0, 0.3);
  will-change: transform;
}

.multiplayer-player-nameplate::before {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--player-color);
  box-shadow: 0 0 5px var(--player-color);
  content: "";
}

.multiplayer-player-nameplate__text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.multiplayer-spectator {
  position: fixed;
  inset: 0;
  z-index: 7;
  pointer-events: none;
}

.multiplayer-spectator[hidden] {
  display: none !important;
}

.multiplayer-spectator__arrow {
  position: fixed;
  top: 50%;
  display: grid;
  place-items: center;
  width: 52px;
  height: 64px;
  transform: translateY(-50%);
  padding: 0;
  border: 1px solid rgba(255, 224, 161, 0.54);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 211, 118, 0.24), rgba(137, 71, 31, 0.3)),
    rgba(32, 19, 10, 0.7);
  color: #ffe6a2;
  font: 900 44px/1 Georgia, serif;
  text-shadow: 0 2px 3px rgba(0, 0, 0, 0.82);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 244, 211, 0.18);
  opacity: 0.78;
  pointer-events: auto;
  touch-action: manipulation;
  transition: opacity 120ms ease, filter 120ms ease, transform 90ms ease;
  -webkit-tap-highlight-color: transparent;
}

.multiplayer-spectator__arrow:hover,
.multiplayer-spectator__arrow:focus-visible {
  background:
    linear-gradient(180deg, rgba(255, 225, 151, 0.34), rgba(158, 83, 36, 0.4)),
    rgba(38, 22, 11, 0.82);
  opacity: 1;
}

.multiplayer-spectator__arrow:active {
  transform: translateY(-50%) scale(0.96);
}

.multiplayer-spectator__arrow--prev {
  left: max(12px, calc(env(safe-area-inset-left) + 8px));
}

.multiplayer-spectator__arrow--next {
  right: max(12px, calc(env(safe-area-inset-right) + 8px));
}

.multiplayer-spectator__arrow:disabled {
  opacity: 0.34;
  pointer-events: none;
}

.multiplayer-spectator__status {
  position: fixed;
  top: max(64px, calc(env(safe-area-inset-top) + 52px));
  left: 50%;
  display: grid;
  width: clamp(136px, 28vw, 280px);
  max-width: calc(100vw - 152px);
  transform: translateX(-50%);
  padding: 6px 14px 7px;
  overflow: hidden;
  border: 1px solid rgba(255, 220, 151, 0.34);
  border-radius: 999px;
  background: rgba(31, 18, 10, 0.74);
  color: rgba(240, 198, 126, 0.82);
  font-size: 8px;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: 0.13em;
  text-align: center;
  text-transform: uppercase;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
  box-shadow: 0 7px 22px rgba(0, 0, 0, 0.28);
}

.multiplayer-spectator__status strong {
  overflow: hidden;
  color: #fff2c4;
  font-size: 12px;
  letter-spacing: 0.02em;
  text-overflow: ellipsis;
  text-transform: none;
  white-space: nowrap;
}

#game-root.is-spectating .ammo-hud,
#game-root.is-spectating .mobile-controls,
#game-root.is-spectating .multiplayer-upgrade-toggle,
#game-root.is-spectating .multiplayer-upgrade-drawer {
  display: none !important;
}

#game-root.is-paused .multiplayer-spectator {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

#game-root.has-blocking-overlay .multiplayer-spectator {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

#game-root.is-paused .multiplayer-spectator__arrow,
#game-root.has-blocking-overlay .multiplayer-spectator__arrow {
  pointer-events: none;
}

@media (orientation: landscape) and (max-height: 400px) {
  .multiplayer-spectator__arrow {
    width: 48px;
    height: 56px;
    border-radius: 10px;
    font-size: 40px;
  }

  .multiplayer-spectator__arrow--prev {
    left: max(8px, calc(env(safe-area-inset-left) + 6px));
  }

  .multiplayer-spectator__arrow--next {
    right: max(8px, calc(env(safe-area-inset-right) + 6px));
  }

  .multiplayer-spectator__status {
    top: max(52px, calc(env(safe-area-inset-top) + 44px));
    padding: 4px 11px 5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .multiplayer-spectator__arrow {
    transition: none;
  }

  .multiplayer-spectator__arrow:active {
    transform: translateY(-50%);
  }
}

/* Unlock catalog: the store uses the same physical-card language as run drafts. */
.unlock-groups,
.unlock-catalog-groups {
  display: grid;
  gap: 15px;
  align-content: start;
}

.unlock-groups--mastery {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.unlock-group--mastery,
.unlock-class-group {
  min-width: 0;
  padding: 13px;
  border: 1px solid rgba(235, 178, 94, 0.2);
  border-radius: 15px;
  background:
    radial-gradient(circle at 8% 0%, rgba(211, 135, 58, 0.12), transparent 34%),
    linear-gradient(145deg, rgba(57, 33, 19, 0.8), rgba(21, 13, 8, 0.88));
  box-shadow:
    inset 0 1px 0 rgba(255, 239, 201, 0.055),
    0 9px 24px rgba(0, 0, 0, 0.17);
}

.unlock-group--mastery.is-class-locked,
.unlock-class-group.is-class-locked {
  border-color: rgba(184, 137, 83, 0.15);
  background:
    repeating-linear-gradient(135deg, transparent 0 24px, rgba(255, 226, 178, 0.018) 24px 26px),
    linear-gradient(145deg, rgba(49, 32, 21, 0.74), rgba(20, 14, 10, 0.88));
}

.unlock-group__header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  min-width: 0;
  margin-bottom: 11px;
}

.unlock-group__copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.unlock-group__eyebrow {
  color: #d69a5d;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 0.14em;
  line-height: 1.1;
  text-transform: uppercase;
}

.unlock-group__header h3 {
  margin: 0;
  color: #ffe1a3;
  font: 800 19px/1.05 var(--font-title);
}

.unlock-group__header p {
  margin: 0;
  color: rgba(242, 207, 151, 0.59);
  font-size: 8px;
  line-height: 1.35;
}

.unlock-group__badge {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  min-height: 25px;
  padding: 5px 8px;
  border: 1px solid rgba(230, 178, 100, 0.24);
  border-radius: 999px;
  background: rgba(25, 14, 8, 0.48);
  color: rgba(255, 222, 163, 0.76);
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 0.07em;
  white-space: nowrap;
  text-transform: uppercase;
}

.is-class-locked > .unlock-group__header .unlock-group__badge,
.is-path-locked > .unlock-group__header .unlock-group__badge {
  border-color: rgba(179, 128, 76, 0.2);
  color: rgba(220, 178, 121, 0.58);
}

.unlock-class-group {
  display: grid;
  gap: 13px;
  padding: 15px;
}

.unlock-class-group > .unlock-group__header {
  margin: 0;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(238, 184, 103, 0.16);
}

.unlock-class-group > .unlock-group__header h3 {
  font-size: 23px;
}

.unlock-branch-group {
  display: grid;
  gap: 9px;
  min-width: 0;
  padding: 10px 11px 12px;
  border: 1px solid rgba(231, 178, 101, 0.13);
  border-radius: 12px;
  background: rgba(20, 12, 7, 0.24);
}

.unlock-branch-group.is-path-locked {
  background:
    repeating-linear-gradient(135deg, transparent 0 21px, rgba(241, 201, 139, 0.015) 21px 23px),
    rgba(18, 12, 8, 0.28);
}

.unlock-branch-group > .unlock-group__header {
  margin: 0;
}

.unlock-branch-group > .unlock-group__header h3 {
  font-size: 16px;
}

.unlock-card-row,
.unlock-grid.unlock-card-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(154px, 184px));
  gap: 14px;
  justify-content: start;
  align-items: stretch;
  min-width: 0;
}

.unlock-shop__content[data-unlock-view="classes"] .unlock-card-row {
  grid-template-columns: repeat(4, minmax(154px, 184px));
  justify-content: center;
}

.unlock-card-row--mastery {
  grid-template-columns: repeat(2, minmax(154px, 184px));
  justify-content: center;
}

.unlock-shop__content[data-unlock-view="cards"] .unlock-card-row {
  grid-template-columns: repeat(auto-fill, minmax(154px, 184px));
}

.unlock-card.unlock-playing-card {
  --unlock-card-ink: #241308;
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  gap: 7px;
  width: 100%;
  min-width: 0;
  min-height: 276px;
  aspect-ratio: 2 / 3;
  padding: 24px 12px 12px;
  overflow: hidden;
  border: 2px solid #2c1608;
  border-radius: 8px;
  background:
    radial-gradient(ellipse at 50% 13%, rgba(255, 255, 255, 0.66), transparent 23%),
    radial-gradient(ellipse at 50% 100%, rgba(116, 58, 20, 0.16), transparent 52%),
    linear-gradient(145deg, #fff4cf, #edd096 56%, #c99148);
  color: var(--unlock-card-ink);
  box-shadow:
    inset 0 0 0 4px rgba(255, 249, 226, 0.9),
    inset 0 0 0 7px currentColor,
    inset 0 -18px 34px rgba(79, 38, 12, 0.14),
    0 12px 25px rgba(0, 0, 0, 0.3);
  transition:
    transform 140ms ease,
    box-shadow 140ms ease,
    filter 140ms ease;
}

.unlock-card.unlock-playing-card.class-card--red {
  --unlock-card-ink: #8d1f18;
}

.unlock-card.unlock-playing-card.class-card--black {
  --unlock-card-ink: #241308;
}

.unlock-card.unlock-playing-card::before,
.unlock-card.unlock-playing-card::after {
  position: absolute;
  z-index: 3;
  width: 26px;
  height: auto;
  pointer-events: none;
  content: attr(data-rank) "\A" attr(data-suit);
  border: 0;
  border-radius: 0;
  background: none;
  color: currentColor;
  box-shadow: none;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
  font-weight: 900;
  line-height: 0.86;
  text-align: center;
  white-space: pre;
}

.unlock-card.unlock-playing-card::before {
  inset: 11px auto auto 8px;
}

.unlock-card.unlock-playing-card::after {
  inset: auto 8px 11px auto;
  transform: rotate(180deg);
}

.unlock-card.unlock-playing-card:hover {
  border-color: #351a09;
  background:
    radial-gradient(ellipse at 50% 13%, rgba(255, 255, 255, 0.78), transparent 25%),
    radial-gradient(ellipse at 50% 100%, rgba(116, 58, 20, 0.14), transparent 54%),
    linear-gradient(145deg, #fff8dd, #f1d9a5 56%, #d6a052);
  box-shadow:
    inset 0 0 0 4px rgba(255, 250, 229, 0.94),
    inset 0 0 0 7px currentColor,
    inset 0 -18px 34px rgba(79, 38, 12, 0.13),
    0 16px 31px rgba(0, 0, 0, 0.35);
  transform: translateY(-2px);
}

.unlock-card.unlock-playing-card.is-unlocked {
  border-color: #2b1a0d;
  background:
    radial-gradient(circle at 78% 12%, rgba(111, 165, 91, 0.17), transparent 26%),
    radial-gradient(ellipse at 50% 13%, rgba(255, 255, 255, 0.66), transparent 23%),
    linear-gradient(145deg, #fff3cc, #ebd09a 57%, #c99a50);
}

.unlock-card.unlock-playing-card.is-locked {
  border-color: #3c2817;
  background:
    repeating-linear-gradient(135deg, transparent 0 20px, rgba(92, 50, 20, 0.025) 20px 22px),
    radial-gradient(ellipse at 50% 12%, rgba(255, 255, 255, 0.42), transparent 24%),
    linear-gradient(145deg, #ead7ad, #cdaa72 57%, #9c6b39);
  filter: saturate(0.72);
}

.unlock-card.unlock-playing-card.is-dormant,
.unlock-card.unlock-playing-card.is-parent-locked {
  background:
    repeating-linear-gradient(135deg, transparent 0 17px, rgba(69, 39, 19, 0.035) 17px 19px),
    radial-gradient(ellipse at 50% 12%, rgba(255, 255, 255, 0.36), transparent 24%),
    linear-gradient(145deg, #dfc89d, #ba9563 58%, #8d6037);
  filter: saturate(0.52);
}

.unlock-card.unlock-playing-card.is-parent-locked {
  opacity: 0.78;
}

.unlock-card.unlock-playing-card.is-marked {
  border-color: #6e3516;
  box-shadow:
    inset 0 0 0 4px rgba(255, 249, 226, 0.92),
    inset 0 0 0 7px currentColor,
    0 0 0 2px rgba(245, 190, 91, 0.45),
    0 0 22px rgba(237, 162, 57, 0.32),
    0 14px 29px rgba(0, 0, 0, 0.34);
}

.unlock-playing-card .unlock-card__header {
  position: relative;
  z-index: 4;
  order: 1;
  display: flex;
  justify-content: space-between;
  gap: 5px;
  align-items: center;
  min-height: 20px;
  padding: 0 14px;
}

.unlock-playing-card .unlock-card__eyebrow {
  min-width: 0;
  overflow: hidden;
  color: currentColor;
  font-size: 6px;
  letter-spacing: 0.1em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.unlock-playing-card .unlock-card__status {
  min-height: 18px;
  padding: 3px 5px;
  border-color: color-mix(in srgb, currentColor 32%, transparent);
  background: rgba(255, 247, 220, 0.48);
  color: currentColor;
  font-size: 5.8px;
  letter-spacing: 0.055em;
}

.unlock-playing-card.is-unlocked .unlock-card__status {
  border-color: rgba(52, 102, 53, 0.35);
  color: #315e32;
}

.unlock-playing-card.is-dormant .unlock-card__status,
.unlock-playing-card.is-parent-locked .unlock-card__status {
  border-color: rgba(105, 68, 37, 0.32);
  color: #6e4728;
}

.unlock-playing-card > .class-card__mark {
  order: 2;
  flex: 0 0 auto;
  align-self: center;
  width: 94px;
  height: 62px;
  margin: 0;
  border-width: 2px;
}

.unlock-playing-card > .class-card__mark .class-card__weapon-icon {
  width: 82px;
  height: 42px;
}

.unlock-playing-card > .class-card__mark .class-card__weapon-icon--big-iron {
  width: 91px;
  height: 45px;
}

.unlock-playing-card > .class-card__mark .upgrade-card__symbol {
  width: 56px;
  height: 44px;
}

.unlock-playing-card > .class-card__mark .upgrade-card__icon {
  width: 52px;
  height: 44px;
}

.unlock-card.unlock-playing-card h3 {
  position: relative;
  z-index: 2;
  order: 3;
  display: -webkit-box;
  min-height: 34px;
  margin: 0;
  overflow: hidden;
  color: #2c170a;
  font: 800 17px/1.02 Georgia, "Times New Roman", serif;
  text-align: center;
  overflow-wrap: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.unlock-card__subtitle {
  display: block;
  margin-top: 2px;
  color: #713716;
  font-size: 0.68em;
  font-style: italic;
  line-height: 1;
  text-transform: none;
}

.unlock-card.unlock-playing-card > .unlock-card__copy {
  position: relative;
  z-index: 2;
  order: 4;
  display: -webkit-box;
  min-height: 31px;
  margin: 0;
  overflow: hidden;
  color: #5a3017;
  font-size: 8px;
  line-height: 1.28;
  text-align: center;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.unlock-playing-card .unlock-card__meta {
  position: relative;
  z-index: 4;
  order: 5;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 5px;
  width: 100%;
  margin-top: auto;
}

.unlock-playing-card .unlock-card__meta > span,
.unlock-playing-card .unlock-card__price {
  display: grid;
  place-items: center;
  min-height: 20px;
  padding: 3px 5px;
  border: 1px solid rgba(72, 39, 17, 0.2);
  border-radius: 999px;
  background: rgba(255, 244, 211, 0.46);
  color: #4d2914;
  font: 900 6.5px/1.15 var(--font-ui);
  letter-spacing: 0.045em;
  text-align: center;
  text-transform: uppercase;
}

.unlock-playing-card .unlock-card__action,
.unlock-shop .unlock-playing-card button[data-purchase-class],
.unlock-shop .unlock-playing-card button[data-purchase-card] {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  margin: 0;
  padding: 7px 8px;
  border: 1px solid rgba(80, 37, 13, 0.58);
  border-radius: 7px;
  background:
    linear-gradient(180deg, rgba(167, 82, 31, 0.98), rgba(87, 39, 17, 0.99));
  color: #fff0c7;
  font-size: 8px;
  box-shadow:
    inset 0 1px 0 rgba(255, 235, 194, 0.18),
    0 4px 8px rgba(54, 26, 12, 0.22);
}

.unlock-playing-card .unlock-card__action:disabled,
.unlock-shop .unlock-playing-card button[data-purchase-class]:disabled,
.unlock-shop .unlock-playing-card button[data-purchase-card]:disabled {
  border-color: rgba(80, 53, 32, 0.28);
  background: rgba(80, 61, 43, 0.55);
  color: rgba(66, 43, 26, 0.54);
  opacity: 1;
}

@media (max-width: 900px) {
  .unlock-groups--mastery {
    grid-template-columns: 1fr;
  }

  .unlock-shop__content[data-unlock-view="classes"] .unlock-card-row {
    grid-template-columns: repeat(4, minmax(140px, 172px));
  }
}

@media (max-width: 640px) {
  .unlock-group--mastery,
  .unlock-class-group {
    padding: 10px;
  }

  .unlock-group__header h3 {
    font-size: 17px;
  }

  .unlock-class-group > .unlock-group__header h3 {
    font-size: 20px;
  }

  .unlock-group__header p {
    font-size: 7.5px;
  }

  .unlock-card-row,
  .unlock-grid.unlock-card-row,
  .unlock-shop__content[data-unlock-view="classes"] .unlock-card-row,
  .unlock-shop__content[data-unlock-view="cards"] .unlock-card-row,
  .unlock-card-row--mastery {
    grid-auto-flow: column;
    grid-template-columns: none;
    grid-auto-columns: 154px;
    justify-content: start;
    gap: 10px;
    padding: 2px 2px 7px;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    /* Both axes: pan-x alone swallowed vertical drags that started on a card,
       so the shop only scrolled when a finger landed in the gap between two
       cards. The browser still picks the axis from the gesture direction. */
    touch-action: pan-x pan-y;
  }

  .unlock-card.unlock-playing-card {
    min-height: 238px;
    aspect-ratio: auto;
    padding: 21px 9px 9px;
    scroll-snap-align: start;
  }

  .unlock-playing-card > .class-card__mark {
    width: 82px;
    height: 54px;
  }

  .unlock-playing-card > .class-card__mark .class-card__weapon-icon {
    width: 72px;
    height: 37px;
  }

  .unlock-playing-card > .class-card__mark .upgrade-card__symbol {
    width: 49px;
    height: 39px;
  }

  .unlock-playing-card > .class-card__mark .upgrade-card__icon {
    width: 46px;
    height: 39px;
  }

  .unlock-card.unlock-playing-card h3 {
    min-height: 30px;
    font-size: 15px;
  }

  .unlock-card.unlock-playing-card > .unlock-card__copy {
    min-height: 27px;
    font-size: 7.5px;
    -webkit-line-clamp: 2;
  }
}

@media (orientation: landscape) and (max-width: 960px) and (max-height: 520px) {
  .unlock-groups--mastery {
    grid-template-columns: repeat(2, minmax(330px, 1fr));
    gap: 8px;
  }

  .unlock-group--mastery,
  .unlock-class-group {
    padding: 7px;
    border-radius: 10px;
  }

  .unlock-group__header {
    gap: 7px;
    margin-bottom: 6px;
  }

  .unlock-group__header h3 {
    font-size: 14px;
  }

  .unlock-class-group > .unlock-group__header h3 {
    font-size: 17px;
  }

  .unlock-group__header p {
    display: none;
  }

  .unlock-group__eyebrow,
  .unlock-group__badge {
    font-size: 5.5px;
  }

  .unlock-group__badge {
    min-height: 19px;
    padding: 3px 5px;
  }

  .unlock-branch-group {
    gap: 5px;
    padding: 6px;
  }

  .unlock-card-row,
  .unlock-grid.unlock-card-row,
  .unlock-shop__content[data-unlock-view="classes"] .unlock-card-row,
  .unlock-shop__content[data-unlock-view="cards"] .unlock-card-row,
  .unlock-card-row--mastery {
    grid-auto-flow: column;
    grid-template-columns: none;
    grid-auto-columns: 116px;
    justify-content: start;
    gap: 7px;
    padding: 1px 2px 4px;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    touch-action: pan-x pan-y;
  }

  .unlock-shop__content[data-unlock-view="classes"] .unlock-card-row,
  .unlock-card-row--mastery {
    justify-content: center;
  }

  .unlock-card.unlock-playing-card {
    gap: 3px;
    min-height: 212px;
    aspect-ratio: auto;
    padding: 17px 7px 7px;
    border-radius: 6px;
  }

  .unlock-card.unlock-playing-card::before,
  .unlock-card.unlock-playing-card::after {
    width: 20px;
    font-size: 12px;
  }

  .unlock-card.unlock-playing-card::before {
    inset: 7px auto auto 5px;
  }

  .unlock-card.unlock-playing-card::after {
    inset: auto 5px 7px auto;
  }

  .unlock-playing-card .unlock-card__header {
    justify-content: center;
    min-height: 16px;
    padding: 0 10px;
  }

  .unlock-playing-card .unlock-card__eyebrow {
    display: none;
  }

  .unlock-playing-card .unlock-card__status {
    min-height: 15px;
    padding: 2px 4px;
    font-size: 5px;
  }

  .unlock-playing-card > .class-card__mark {
    width: 62px;
    height: 39px;
  }

  .unlock-playing-card > .class-card__mark .class-card__weapon-icon {
    width: 55px;
    height: 30px;
  }

  .unlock-playing-card > .class-card__mark .upgrade-card__symbol,
  .unlock-playing-card > .class-card__mark .upgrade-card__icon {
    width: 38px;
    height: 31px;
  }

  .unlock-card.unlock-playing-card h3 {
    min-height: 25px;
    font-size: 12px;
  }

  /* The description is the only thing on the card that says what an unlock
     actually does, so it is shown in full rather than dropped. No clamp and no
     fixed min-height: a flex item with `min-height: auto` refuses to shrink
     below its content, which is what keeps ru and hi copy from being cut off
     inside the card's `overflow: hidden`. */
  .unlock-card.unlock-playing-card > .unlock-card__copy {
    display: block;
    min-height: auto;
    font-size: 7px;
    line-height: 1.2;
    /* 116px of card cannot hold a long ru/hi compound on one line. */
    overflow-wrap: anywhere;
    -webkit-line-clamp: none;
  }

  .unlock-playing-card .unlock-card__meta {
    gap: 3px;
  }

  .unlock-playing-card .unlock-card__meta > span,
  .unlock-playing-card .unlock-card__price {
    min-height: 16px;
    padding: 2px 3px;
    font-size: 5px;
  }

  .unlock-playing-card .unlock-card__action,
  .unlock-shop .unlock-playing-card button[data-purchase-class],
  .unlock-shop .unlock-playing-card button[data-purchase-card] {
    min-height: 42px;
    padding: 5px;
    font-size: 6.5px;
  }
}

.hud {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 4;
  width: min(304px, calc(100vw - 32px));
  padding: 10px;
  border: 1px solid rgba(255, 221, 154, 0.35);
  border-radius: 8px;
  background: rgba(36, 22, 12, 0.72);
  backdrop-filter: blur(4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.26);
}

.hud-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
}

.hud-label,
.hud-grid span {
  color: #f8d28a;
  font-size: 13px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hud-label b {
  color: #ffffff;
  font-size: 14px;
}

.meter {
  height: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 241, 206, 0.25);
  border-radius: 4px;
  background: #4a1d16;
}

.meter-fill {
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #d9412f, #ffd166);
  transform-origin: left center;
  transition: transform 120ms linear;
}

.hud-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  margin-top: 8px;
}

.hud-grid b {
  color: #ffffff;
  font-size: 16px;
}

/* Bell-Ringer boss HUD --------------------------------------------------- */

.boss-hud {
  --boss-health: 1;
  --boss-health-lag: 1;
  position: fixed;
  top: max(74px, calc(env(safe-area-inset-top) + 60px));
  left: 50%;
  z-index: 6;
  display: grid;
  gap: 5px;
  width: min(720px, calc(100vw - 48px));
  color: #f4dfbd;
  pointer-events: none;
  filter: drop-shadow(0 8px 13px rgba(0, 0, 0, 0.54));
  transform: translateX(-50%);
}

.boss-hud__heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
  padding: 0 15px;
}

.boss-hud__name {
  overflow: hidden;
  margin: 0;
  color: #f2dfbf;
  font: 600 18px/1.1 var(--font-title);
  letter-spacing: 0.045em;
  text-shadow:
    0 1px 0 #080403,
    0 2px 5px rgba(0, 0, 0, 0.92);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.boss-church-pips {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
  align-items: center;
  min-height: 20px;
}

.boss-church-pips > span {
  position: relative;
  display: block;
  width: 16px;
  height: 16px;
  border: 1px solid rgba(195, 168, 133, 0.52);
  background:
    linear-gradient(135deg, transparent 48%, rgba(255, 237, 202, 0.36) 49% 52%, transparent 53%),
    linear-gradient(180deg, #51473f, #201a17);
  box-shadow:
    inset 0 0 0 2px rgba(10, 6, 5, 0.5),
    0 1px 3px rgba(0, 0, 0, 0.8);
  opacity: 0.52;
  transform: rotate(45deg) scale(0.82);
  transition:
    background 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    opacity 180ms ease,
    transform 180ms ease;
}

.boss-church-pips > span::before,
.boss-church-pips > span::after {
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 1px;
  background: rgba(238, 219, 187, 0.72);
  content: "";
  transform: translate(-50%, -50%);
}

.boss-church-pips > span::before {
  width: 2px;
  height: 9px;
}

.boss-church-pips > span::after {
  width: 9px;
  height: 2px;
}

.boss-church-pips > span.is-active,
.boss-church-pips > span[data-active="true"] {
  border-color: rgba(232, 205, 255, 0.98);
  background:
    linear-gradient(135deg, transparent 47%, rgba(255, 244, 255, 0.82) 48% 53%, transparent 54%),
    linear-gradient(180deg, #b47df0, #5b287f);
  box-shadow:
    inset 0 0 0 2px rgba(70, 23, 104, 0.62),
    0 0 5px rgba(232, 197, 255, 0.96),
    0 0 13px rgba(176, 101, 235, 0.8);
  opacity: 1;
  transform: rotate(45deg) scale(0.94);
}

.boss-church-pips > span.is-silenced,
.boss-church-pips > span[data-active="false"] {
  border-color: rgba(111, 102, 91, 0.62);
  background: linear-gradient(180deg, #443f39, #181513);
  box-shadow: inset 0 0 0 2px rgba(8, 6, 5, 0.58);
  opacity: 0.42;
  transform: rotate(45deg) scale(0.7);
}

.boss-church-pips > span.is-silenced::before,
.boss-church-pips > span.is-silenced::after,
.boss-church-pips > span[data-active="false"]::before,
.boss-church-pips > span[data-active="false"]::after {
  background: rgba(137, 126, 111, 0.56);
}

.boss-hud__frame {
  position: relative;
  height: 28px;
  padding: 4px 10px 5px;
  border: 1px solid rgba(203, 167, 111, 0.7);
  background:
    linear-gradient(90deg, rgba(11, 6, 5, 0.98), rgba(35, 21, 17, 0.98) 12% 88%, rgba(11, 6, 5, 0.98)),
    #100a08;
  box-shadow:
    inset 0 0 0 1px rgba(255, 229, 178, 0.08),
    inset 0 -5px 9px rgba(0, 0, 0, 0.82),
    0 2px 0 rgba(7, 4, 3, 0.92),
    0 7px 16px rgba(0, 0, 0, 0.42);
}

.boss-hud__frame::before,
.boss-hud__frame::after {
  position: absolute;
  top: 50%;
  z-index: -1;
  width: 18px;
  height: 18px;
  border: 1px solid rgba(193, 151, 91, 0.72);
  background: linear-gradient(135deg, #231610, #090504);
  box-shadow:
    inset 0 0 0 2px rgba(235, 195, 126, 0.08),
    0 3px 6px rgba(0, 0, 0, 0.64);
  content: "";
  transform: translateY(-50%) rotate(45deg);
}

.boss-hud__frame::before {
  left: -8px;
}

.boss-hud__frame::after {
  right: -8px;
}

.boss-health-track {
  position: relative;
  height: 100%;
  overflow: hidden;
  border: 1px solid rgba(8, 4, 3, 0.96);
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.018) 0 2px, transparent 2px 5px),
    linear-gradient(180deg, #170b0b, #080404);
  box-shadow:
    inset 0 2px 5px rgba(0, 0, 0, 0.94),
    0 1px 0 rgba(255, 221, 164, 0.1);
}

.boss-health-lag,
.boss-health-fill,
.boss-shield-sheen {
  position: absolute;
  inset: 0;
  transform-origin: left center;
}

.boss-health-lag {
  z-index: 1;
  background: linear-gradient(180deg, #f2d2b5, #a7665f 48%, #4d1e23);
  box-shadow: inset 0 1px 0 rgba(255, 247, 227, 0.74);
  transform: scaleX(var(--boss-health-lag));
  transition: transform 720ms cubic-bezier(0.16, 0.8, 0.24, 1);
}

.boss-health-fill {
  z-index: 2;
  background:
    linear-gradient(180deg, rgba(255, 219, 181, 0.24), transparent 28%),
    linear-gradient(180deg, #b9363c 0%, #7d111d 52%, #39070d 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 208, 177, 0.54),
    inset 0 -2px 4px rgba(30, 0, 4, 0.7),
    0 0 8px rgba(166, 28, 40, 0.38);
  transform: scaleX(var(--boss-health));
  transition: transform 130ms linear;
}

.boss-shield-sheen {
  z-index: 3;
  background:
    repeating-linear-gradient(112deg, rgba(100, 45, 146, 0.16) 0 18px, rgba(247, 224, 255, 0.68) 22px, rgba(100, 45, 146, 0.16) 29px 52px),
    linear-gradient(90deg, rgba(100, 45, 146, 0.34), rgba(225, 175, 255, 0.58), rgba(100, 45, 146, 0.34));
  background-position: -180px 0, 0 0;
  background-size: 180px 100%, 100% 100%;
  mix-blend-mode: screen;
  opacity: 0;
  transform: none;
  transition: opacity 180ms ease;
}

.boss-hud.is-shielded .boss-shield-sheen,
.boss-shield-sheen.is-active {
  animation: bossShieldSheen 1.65s linear infinite;
  opacity: 0.82;
}

.boss-health-notch {
  position: absolute;
  top: -2px;
  bottom: -2px;
  z-index: 4;
  width: 2px;
  background: linear-gradient(180deg, #e3bf83, #6a472b 38% 68%, #e3bf83);
  box-shadow:
    -1px 0 0 rgba(0, 0, 0, 0.78),
    1px 0 0 rgba(0, 0, 0, 0.78),
    0 0 4px rgba(218, 172, 99, 0.42);
  transform: translateX(-1px);
}

.boss-health-notch[data-threshold="50"] {
  left: 50%;
}

.boss-health-notch[data-threshold="67"] {
  left: 66.6667%;
}

.boss-health-notch[data-threshold="83"] {
  left: 83.3333%;
}

.boss-hud__status {
  justify-self: center;
  min-height: 15px;
  padding: 2px 13px 3px;
  border: 1px solid rgba(193, 145, 90, 0.24);
  border-top: 0;
  background: linear-gradient(90deg, transparent, rgba(16, 9, 7, 0.88) 18% 82%, transparent);
  color: #d9b9e9;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.15em;
  line-height: 1;
  text-align: center;
  text-shadow: 0 1px 3px #000;
  text-transform: uppercase;
}

.boss-hud:not(.is-shielded) .boss-hud__status,
.boss-hud.is-vulnerable .boss-hud__status {
  color: #e5c790;
}

.boss-hud.is-resistant .boss-health-fill {
  background:
    linear-gradient(180deg, rgba(255, 220, 162, 0.28), transparent 28%),
    linear-gradient(180deg, #c54838 0%, #871118 50%, #3d0508 100%);
}

.boss-hud.is-last-stand .boss-hud__frame {
  border-color: rgba(255, 188, 99, 0.92);
  animation: bossLastStandPulse 0.86s ease-in-out infinite alternate;
}

.boss-hud.is-last-stand .boss-hud__status {
  color: #ffd585;
  text-shadow: 0 1px 3px #000, 0 0 8px rgba(255, 74, 42, 0.8);
}

/* Ghost Train boss HUD -------------------------------------------------- */

.boss-hud.is-ghost-train {
  color: #baffeb;
  filter:
    drop-shadow(0 8px 13px rgba(0, 0, 0, 0.58))
    drop-shadow(0 0 9px rgba(30, 255, 199, 0.15));
}

.boss-hud.is-ghost-train .boss-hud__name {
  color: #caffef;
  text-shadow:
    0 1px 0 #00120f,
    0 2px 5px rgba(0, 0, 0, 0.94),
    0 0 9px rgba(55, 255, 211, 0.42);
}

.boss-hud.is-ghost-train .boss-hud__frame {
  border-color: rgba(64, 239, 197, 0.74);
  background:
    repeating-linear-gradient(135deg, rgba(76, 255, 213, 0.025) 0 7px, transparent 7px 15px),
    linear-gradient(90deg, rgba(1, 12, 12, 0.99), rgba(5, 36, 31, 0.98) 12% 88%, rgba(1, 12, 12, 0.99)),
    #020c0b;
  box-shadow:
    inset 0 0 0 1px rgba(158, 255, 231, 0.09),
    inset 0 -5px 9px rgba(0, 0, 0, 0.84),
    0 2px 0 rgba(0, 8, 7, 0.94),
    0 7px 16px rgba(0, 0, 0, 0.46),
    0 0 10px rgba(29, 255, 200, 0.14);
}

.boss-hud.is-ghost-train .boss-hud__frame::before,
.boss-hud.is-ghost-train .boss-hud__frame::after {
  border-color: rgba(53, 207, 173, 0.76);
  background: linear-gradient(135deg, #0c3930, #02100e 68%);
  box-shadow:
    inset 0 0 0 2px rgba(135, 255, 224, 0.08),
    0 3px 6px rgba(0, 0, 0, 0.68),
    0 0 7px rgba(40, 244, 193, 0.19);
}

.boss-hud.is-ghost-train .boss-health-track {
  border-color: rgba(0, 10, 9, 0.98);
  background:
    repeating-linear-gradient(90deg, rgba(107, 255, 220, 0.025) 0 2px, transparent 2px 6px),
    linear-gradient(180deg, #061d19, #010908);
  box-shadow:
    inset 0 2px 6px rgba(0, 0, 0, 0.96),
    0 1px 0 rgba(165, 255, 229, 0.14);
}

.boss-hud.is-ghost-train .boss-health-lag {
  background: linear-gradient(180deg, #baffed, #43bca1 48%, #135245);
  box-shadow: inset 0 1px 0 rgba(230, 255, 248, 0.76);
}

.boss-hud.is-ghost-train .boss-health-fill,
.boss-hud.is-ghost-train.is-resistant .boss-health-fill {
  background:
    linear-gradient(180deg, rgba(220, 255, 245, 0.34), transparent 30%),
    repeating-linear-gradient(90deg, transparent 0 16px, rgba(0, 64, 51, 0.18) 16px 18px),
    linear-gradient(180deg, #42f2bd 0%, #0da883 53%, #07513f 100%);
  box-shadow:
    inset 0 1px 0 rgba(221, 255, 246, 0.7),
    inset 0 -2px 4px rgba(0, 31, 25, 0.72),
    0 0 10px rgba(25, 237, 181, 0.42);
}

.boss-hud.is-ghost-train.is-materialized .boss-health-lag {
  background: linear-gradient(180deg, #f2d2b5, #a7665f 48%, #4d1e23);
  box-shadow: inset 0 1px 0 rgba(255, 247, 227, 0.74);
}

.boss-hud.is-ghost-train.is-materialized .boss-health-fill,
.boss-hud.is-ghost-train.is-materialized.is-resistant .boss-health-fill {
  background:
    linear-gradient(180deg, rgba(255, 219, 181, 0.24), transparent 28%),
    repeating-linear-gradient(90deg, transparent 0 16px, rgba(45, 0, 5, 0.2) 16px 18px),
    linear-gradient(180deg, #b9363c 0%, #7d111d 52%, #39070d 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 208, 177, 0.54),
    inset 0 -2px 4px rgba(30, 0, 4, 0.7),
    0 0 9px rgba(196, 30, 43, 0.46);
}

.boss-hud.is-ghost-train .boss-shield-sheen {
  background:
    repeating-linear-gradient(112deg, rgba(17, 121, 99, 0.12) 0 18px, rgba(183, 255, 237, 0.74) 22px, rgba(17, 121, 99, 0.12) 29px 52px),
    linear-gradient(90deg, rgba(17, 130, 104, 0.36), rgba(87, 255, 215, 0.68), rgba(17, 130, 104, 0.36));
  background-position: -180px 0, 0 0;
  background-size: 180px 100%, 100% 100%;
}

.boss-hud.is-ghost-train .boss-health-notch {
  background: linear-gradient(180deg, #baffec, #277d69 38% 68%, #8effda);
  box-shadow:
    -1px 0 0 rgba(0, 12, 10, 0.82),
    1px 0 0 rgba(0, 12, 10, 0.82),
    0 0 5px rgba(55, 248, 200, 0.5);
}

.boss-hud.is-ghost-train.is-materialized .boss-health-notch {
  background: linear-gradient(180deg, #ffd1b5, #79202a 38% 68%, #f37d70);
  box-shadow:
    -1px 0 0 rgba(18, 0, 2, 0.88),
    1px 0 0 rgba(18, 0, 2, 0.88),
    0 0 5px rgba(231, 65, 67, 0.56);
}

.boss-hud.is-ghost-train .boss-hud__status,
.boss-hud.is-ghost-train:not(.is-shielded) .boss-hud__status,
.boss-hud.is-ghost-train.is-vulnerable .boss-hud__status {
  border-color: rgba(61, 222, 185, 0.28);
  background: linear-gradient(90deg, transparent, rgba(1, 28, 23, 0.9) 18% 82%, transparent);
  color: #89ffe0;
  text-shadow: 0 1px 3px #000, 0 0 7px rgba(40, 255, 201, 0.38);
}

.boss-hud.is-ghost-train.is-spectral .boss-hud__status {
  color: #9bdacb;
}

.boss-hud.is-ghost-train.is-vulnerable .boss-hud__status {
  color: #d4ff9d;
  text-shadow: 0 1px 3px #000, 0 0 9px rgba(133, 255, 119, 0.62);
}

.boss-hud.is-ghost-train .boss-church-pips {
  flex-direction: row-reverse;
  gap: 6px;
  align-items: flex-end;
  min-height: 28px;
  padding: 0 2px 4px 0;
}

.boss-hud.is-ghost-train .boss-church-pips > .boss-train-section {
  box-sizing: border-box;
  flex: 0 0 auto;
  width: 28px;
  height: 15px;
  margin-bottom: 3px;
  border: 1px solid rgba(91, 218, 185, 0.72);
  border-radius: 3px 3px 2px 2px;
  background:
    linear-gradient(180deg, rgba(217, 255, 244, 0.42), transparent 24%),
    linear-gradient(180deg, #239c7d 0 62%, #0a453a 63% 78%, #031d19 79%);
  box-shadow:
    inset 0 0 0 1px rgba(3, 29, 25, 0.72),
    0 1px 3px rgba(0, 0, 0, 0.84),
    0 0 5px rgba(37, 237, 187, 0.22);
  opacity: 0.82;
  transform: none;
  transition:
    background 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    filter 180ms ease,
    opacity 180ms ease,
    transform 180ms ease;
}

.boss-hud.is-ghost-train .boss-church-pips > .boss-train-section::before {
  top: auto;
  bottom: -6px;
  left: 4px;
  width: 6px;
  height: 6px;
  border: 1px solid rgba(99, 238, 204, 0.7);
  border-radius: 50%;
  background: radial-gradient(circle, #8df7d9 0 20%, #0b4b3e 26% 56%, #011713 62%);
  box-shadow:
    14px 0 0 -1px #0b4b3e,
    14px 0 0 rgba(98, 235, 201, 0.62),
    0 1px 2px rgba(0, 0, 0, 0.9),
    14px 1px 2px rgba(0, 0, 0, 0.9);
  transform: none;
}

.boss-hud.is-ghost-train .boss-church-pips > .boss-train-section::after {
  top: 7px;
  right: auto;
  left: -7px;
  width: 7px;
  height: 2px;
  border-radius: 1px;
  background: linear-gradient(90deg, #124d40, #65e6c6 52%, #124d40);
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.78);
  transform: none;
}

.boss-hud.is-ghost-train .boss-church-pips > .boss-train-section:last-child::after {
  top: 6px;
  left: -3px;
  width: 3px;
  height: 4px;
  background: #74f0cb;
  box-shadow: 0 0 4px rgba(72, 255, 207, 0.64);
}

.boss-hud.is-ghost-train .boss-church-pips > .boss-train-section[data-segment="0"] {
  z-index: 2;
  width: 46px;
  height: 18px;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  overflow: visible;
}

.boss-hud.is-ghost-train .boss-church-pips > .boss-train-section[data-segment="0"]::before {
  display: none;
  content: none;
}

.boss-hud.is-ghost-train .boss-church-pips > .boss-train-section--svg {
  border: 0;
  background: none;
  box-shadow: none;
  color: #68eac9;
  overflow: visible;
}

.boss-hud.is-ghost-train .boss-church-pips > .boss-train-section--svg::before {
  display: none;
  content: none;
}

.boss-hud.is-ghost-train .boss-church-pips > .boss-train-section--svg:not([data-segment="0"]) {
  width: 34px;
  height: 18px;
}

.boss-hud.is-ghost-train .boss-train-section__silhouette {
  position: absolute;
  top: 3px;
  right: 3px;
  left: 3px;
  height: 5px;
  border: 1px solid rgba(126, 255, 222, 0.48);
  border-radius: 1px;
  background: repeating-linear-gradient(90deg, #062b24 0 3px, #79e8c9 3px 6px, #123f35 6px 8px);
  box-shadow: 0 0 3px rgba(75, 255, 207, 0.28);
  pointer-events: none;
}

.boss-hud.is-ghost-train .boss-train-section__silhouette::before,
.boss-hud.is-ghost-train .boss-train-section__silhouette::after {
  position: absolute;
  display: block;
  content: "";
}

.boss-hud.is-ghost-train .boss-train-section__silhouette::before {
  top: -4px;
  right: -3px;
  left: -3px;
  height: 3px;
  border-radius: 2px 2px 0 0;
  background: linear-gradient(180deg, #91f5d9, #176654);
  box-shadow: 0 1px 0 rgba(0, 20, 16, 0.75);
}

.boss-hud.is-ghost-train .boss-train-section__silhouette::after {
  right: 1px;
  bottom: -5px;
  width: 2px;
  height: 4px;
  background: rgba(112, 237, 205, 0.72);
}

.boss-hud.is-ghost-train .boss-train-section[data-segment="0"] .boss-train-section__silhouette {
  top: -15px;
  right: auto;
  left: -3px;
  width: 52px;
  height: 41px;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  color: inherit;
  filter:
    drop-shadow(0 1px 0 rgba(0, 14, 11, 0.95))
    drop-shadow(0 0 3px rgba(75, 255, 209, 0.52));
  overflow: visible;
}

.boss-hud.is-ghost-train .boss-train-section[data-segment="0"] .boss-train-section__silhouette::before {
  display: none;
  content: none;
}

.boss-hud.is-ghost-train .boss-train-section[data-segment="0"] .boss-train-section__silhouette::after {
  display: none;
  content: none;
}

.boss-hud.is-ghost-train .boss-train-locomotive-icon {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  transform: scaleX(-1);
  transform-origin: 50% 50%;
}

.boss-hud.is-ghost-train .boss-train-section__silhouette--wagon {
  top: -3px;
  right: auto;
  left: -2px;
  width: 38px;
  height: 28px;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  color: inherit;
  filter:
    drop-shadow(0 1px 0 rgba(0, 14, 11, 0.95))
    drop-shadow(0 0 3px rgba(75, 255, 209, 0.4));
  overflow: visible;
}

.boss-hud.is-ghost-train .boss-train-section__silhouette--wagon::before,
.boss-hud.is-ghost-train .boss-train-section__silhouette--wagon::after {
  display: none;
  content: none;
}

.boss-hud.is-ghost-train .boss-train-wagon-icon {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.boss-hud.is-ghost-train.is-spectral .boss-train-section:not(.is-destroyed) {
  border-color: rgba(94, 229, 205, 0.5);
  filter: saturate(0.72) brightness(1.08);
  opacity: 0.58;
}

.boss-hud.is-ghost-train.is-materialized .boss-train-section:not(.is-destroyed) {
  border-color: rgba(130, 255, 220, 0.9);
  opacity: 0.96;
}

.boss-hud.is-ghost-train .boss-church-pips > .boss-train-section.is-target {
  z-index: 1;
  border-color: #ffe38a;
  background:
    linear-gradient(180deg, rgba(255, 246, 190, 0.78), transparent 30%),
    repeating-linear-gradient(90deg, rgba(74, 44, 5, 0.08) 0 4px, rgba(255, 225, 137, 0.24) 4px 5px),
    linear-gradient(180deg, #ffd566, #c78120 68%, #65400d);
  box-shadow:
    inset 0 0 0 1px rgba(91, 53, 7, 0.74),
    0 0 6px rgba(255, 236, 149, 0.98),
    0 0 15px rgba(255, 179, 61, 0.84);
  filter: none;
  opacity: 1;
  transform: translateY(-1px) scale(1.07);
  animation: ghostTrainTargetPulse 0.72s ease-in-out infinite alternate;
}

.boss-hud.is-ghost-train .boss-church-pips > .boss-train-section.is-destroyed,
.boss-hud.is-ghost-train .boss-church-pips > .boss-train-section.is-silenced {
  border-color: rgba(67, 99, 90, 0.42);
  background:
    linear-gradient(145deg, transparent 45%, rgba(0, 0, 0, 0.62) 46% 55%, transparent 56%),
    linear-gradient(180deg, #29423b, #0a1815);
  box-shadow: inset 0 0 0 1px rgba(0, 10, 8, 0.74);
  filter: grayscale(0.72);
  opacity: 0.28;
  transform: translateY(2px) scale(0.78);
  animation: none;
}

.boss-hud.is-ghost-train .boss-train-section.is-destroyed::before,
.boss-hud.is-ghost-train .boss-train-section.is-silenced::before,
.boss-hud.is-ghost-train .boss-train-section.is-destroyed::after,
.boss-hud.is-ghost-train .boss-train-section.is-silenced::after {
  border-color: rgba(60, 86, 78, 0.4);
  background: #14241f;
  box-shadow: none;
}

.boss-hud.is-ghost-train .boss-train-section.is-destroyed .boss-train-section__silhouette,
.boss-hud.is-ghost-train .boss-train-section.is-silenced .boss-train-section__silhouette {
  border-color: rgba(60, 86, 78, 0.36);
  background: #14241f;
  box-shadow: none;
  filter: grayscale(1);
  opacity: 0.28;
}

.boss-hud.is-ghost-train.is-spectral .boss-train-section--svg {
  color: #79efd1;
}

.boss-hud.is-ghost-train.is-materialized .boss-train-section--svg {
  color: #df5a58;
}

.boss-hud.is-ghost-train .boss-church-pips > .boss-train-section--svg.is-target {
  border: 0;
  background: none;
  box-shadow: none;
  color: #ffd866;
  filter:
    drop-shadow(0 1px 0 rgba(54, 29, 0, 0.95))
    drop-shadow(0 0 4px rgba(255, 230, 128, 1))
    drop-shadow(0 0 9px rgba(255, 169, 45, 0.92));
}

.boss-hud.is-ghost-train .boss-church-pips > .boss-train-section--svg.is-destroyed,
.boss-hud.is-ghost-train .boss-church-pips > .boss-train-section--svg.is-silenced {
  border: 0;
  background: none;
  box-shadow: none;
  color: #526b64;
}

.boss-hud.is-ghost-train .boss-train-section--svg.is-destroyed .boss-train-section__silhouette,
.boss-hud.is-ghost-train .boss-train-section--svg.is-silenced .boss-train-section__silhouette {
  border: 0;
  background: none;
  box-shadow: none;
  filter: grayscale(1) drop-shadow(0 1px 1px rgba(0, 0, 0, 0.8));
}

.boss-hud.is-ghost-train.is-last-stand .boss-hud__frame {
  border-color: rgba(129, 255, 154, 0.94);
  animation: ghostTrainLastStandPulse 0.64s ease-in-out infinite alternate;
}

.boss-hud.is-ghost-train.is-last-stand .boss-hud__status {
  color: #d9ff91;
  text-shadow: 0 1px 3px #000, 0 0 10px rgba(101, 255, 123, 0.78);
}

@keyframes ghostTrainTargetPulse {
  from {
    box-shadow:
      inset 0 0 0 1px rgba(91, 53, 7, 0.74),
      0 0 4px rgba(255, 239, 159, 0.86),
      0 0 9px rgba(255, 179, 61, 0.58);
  }

  to {
    box-shadow:
      inset 0 0 0 1px rgba(255, 224, 132, 0.52),
      0 0 8px rgba(255, 241, 173, 1),
      0 0 18px rgba(255, 162, 35, 0.94);
  }
}

@keyframes ghostTrainLastStandPulse {
  from {
    box-shadow:
      inset 0 0 0 1px rgba(158, 255, 231, 0.09),
      inset 0 -5px 9px rgba(0, 0, 0, 0.84),
      0 2px 0 rgba(0, 8, 7, 0.94),
      0 7px 16px rgba(0, 0, 0, 0.46),
      0 0 5px rgba(98, 255, 124, 0.28);
  }

  to {
    box-shadow:
      inset 0 0 0 1px rgba(199, 255, 220, 0.18),
      inset 0 -5px 9px rgba(0, 0, 0, 0.84),
      0 2px 0 rgba(0, 8, 7, 0.94),
      0 7px 16px rgba(0, 0, 0, 0.46),
      0 0 17px rgba(98, 255, 124, 0.78);
  }
}

@media (orientation: landscape) and (max-width: 960px),
  (orientation: landscape) and (max-height: 520px) {
  .boss-hud.is-ghost-train .boss-church-pips {
    gap: 3px;
    min-height: 13px;
    padding-bottom: 0;
  }

  .boss-hud.is-ghost-train .boss-church-pips > .boss-train-section {
    width: 19px;
    height: 9px;
    margin-bottom: 1px;
  }

  .boss-hud.is-ghost-train .boss-church-pips > .boss-train-section[data-segment="0"] {
    width: 32px;
    height: 12px;
  }

  .boss-hud.is-ghost-train .boss-church-pips > .boss-train-section::before {
    bottom: -4px;
    left: 2px;
    width: 3px;
    height: 3px;
    box-shadow:
      10px 0 0 -1px #0b4b3e,
      10px 0 0 rgba(98, 235, 201, 0.62);
  }

  .boss-hud.is-ghost-train .boss-church-pips > .boss-train-section[data-segment="0"]::before {
    left: 3px;
    box-shadow:
      7px 0 0 -1px #0b4b3e,
      7px 0 0 rgba(98, 235, 201, 0.62),
      15px 0 0 -1px #0b4b3e,
      15px 0 0 rgba(98, 235, 201, 0.62);
  }

  .boss-hud.is-ghost-train .boss-church-pips > .boss-train-section::after {
    top: 5px;
    right: auto;
    left: -4px;
    width: 4px;
    height: 1px;
  }

  .boss-hud.is-ghost-train .boss-church-pips > .boss-train-section:last-child::after {
    top: 4px;
    left: -2px;
    width: 2px;
    height: 3px;
  }

  .boss-hud.is-ghost-train .boss-train-section__silhouette {
    top: 2px;
    right: 2px;
    left: 2px;
    height: 3px;
  }

  .boss-hud.is-ghost-train .boss-train-section__silhouette::before {
    top: -3px;
    right: -2px;
    left: -2px;
    height: 2px;
  }

  .boss-hud.is-ghost-train .boss-train-section[data-segment="0"] .boss-train-section__silhouette {
    top: -10px;
    right: auto;
    left: -2px;
    width: 36px;
    height: 28px;
  }

  .boss-hud.is-ghost-train .boss-train-section[data-segment="0"] .boss-train-section__silhouette::before {
    top: -3px;
    left: -9px;
    width: 9px;
    height: 8px;
  }

  .boss-hud.is-ghost-train .boss-train-section[data-segment="0"] .boss-train-section__silhouette::after {
    top: -6px;
    right: 3px;
    width: 4px;
    height: 7px;
  }

  .boss-hud.is-ghost-train .boss-church-pips > .boss-train-section--svg:not([data-segment="0"]) {
    width: 19px;
    height: 12px;
  }

  .boss-hud.is-ghost-train .boss-train-section__silhouette--wagon {
    top: -3px;
    right: auto;
    left: -2px;
    width: 24px;
    height: 18px;
  }
}

@media (orientation: portrait) and (max-width: 760px) {
  .boss-hud.is-ghost-train .boss-church-pips {
    gap: 4px;
    min-height: 24px;
    padding-bottom: 3px;
  }

  .boss-hud.is-ghost-train .boss-church-pips > .boss-train-section {
    width: 22px;
    height: 12px;
    margin-bottom: 2px;
  }

  .boss-hud.is-ghost-train .boss-church-pips > .boss-train-section[data-segment="0"] {
    width: 37px;
    height: 15px;
  }

  .boss-hud.is-ghost-train .boss-church-pips > .boss-train-section::before {
    bottom: -5px;
    left: 3px;
    width: 4px;
    height: 4px;
    box-shadow:
      11px 0 0 -1px #0b4b3e,
      11px 0 0 rgba(98, 235, 201, 0.62);
  }

  .boss-hud.is-ghost-train .boss-church-pips > .boss-train-section[data-segment="0"]::before {
    left: 4px;
    box-shadow:
      9px 0 0 -1px #0b4b3e,
      9px 0 0 rgba(98, 235, 201, 0.62),
      19px 0 0 -1px #0b4b3e,
      19px 0 0 rgba(98, 235, 201, 0.62);
  }

  .boss-hud.is-ghost-train .boss-church-pips > .boss-train-section::after {
    top: 5px;
    right: auto;
    left: -5px;
    width: 5px;
  }

  .boss-hud.is-ghost-train .boss-church-pips > .boss-train-section:last-child::after {
    top: 4px;
    left: -2px;
    width: 2px;
    height: 3px;
  }

  .boss-hud.is-ghost-train .boss-train-section__silhouette {
    top: 2px;
    right: 2px;
    left: 2px;
    height: 4px;
  }

  .boss-hud.is-ghost-train .boss-train-section[data-segment="0"] .boss-train-section__silhouette {
    top: -12px;
    right: auto;
    left: -2px;
    width: 41px;
    height: 32px;
  }

  .boss-hud.is-ghost-train .boss-train-section[data-segment="0"] .boss-train-section__silhouette::before {
    top: -5px;
    left: -11px;
    width: 11px;
    height: 11px;
  }

  .boss-hud.is-ghost-train .boss-train-section[data-segment="0"] .boss-train-section__silhouette::after {
    top: -8px;
    right: 4px;
    width: 5px;
    height: 9px;
  }

  .boss-hud.is-ghost-train .boss-church-pips > .boss-train-section--svg:not([data-segment="0"]) {
    width: 28px;
    height: 15px;
  }

  .boss-hud.is-ghost-train .boss-train-section__silhouette--wagon {
    top: -7px;
    right: auto;
    left: -2px;
    width: 32px;
    height: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .boss-hud.is-ghost-train .boss-train-section.is-target,
  .boss-hud.is-ghost-train.is-last-stand .boss-hud__frame {
    animation: none;
  }
}

@keyframes bossShieldSheen {
  from {
    background-position: -180px 0, 0 0;
  }

  to {
    background-position: 180px 0, 0 0;
  }
}

@keyframes bossLastStandPulse {
  from {
    box-shadow:
      inset 0 0 0 1px rgba(255, 229, 178, 0.08),
      inset 0 -5px 9px rgba(0, 0, 0, 0.82),
      0 2px 0 rgba(7, 4, 3, 0.92),
      0 7px 16px rgba(0, 0, 0, 0.42),
      0 0 4px rgba(255, 70, 39, 0.2);
  }

  to {
    box-shadow:
      inset 0 0 0 1px rgba(255, 229, 178, 0.16),
      inset 0 -5px 9px rgba(0, 0, 0, 0.82),
      0 2px 0 rgba(7, 4, 3, 0.92),
      0 7px 16px rgba(0, 0, 0, 0.42),
      0 0 15px rgba(255, 70, 39, 0.72);
  }
}

/* Global warning for the Bell-Ringer's toll. */

#game-root.has-bell-warning::after {
  background:
    radial-gradient(circle at 50% 46%, transparent 38%, rgba(117, 48, 142, 0.1) 66%, rgba(41, 12, 51, 0.34) 100%),
    linear-gradient(rgba(255, 231, 184, 0.025), rgba(72, 25, 83, 0.12));
  mix-blend-mode: normal;
  animation: bellWarningVignette 1.05s ease-in-out infinite;
}

#game-root.bell-disrupted::after {
  background:
    radial-gradient(circle at 50% 46%, rgba(255, 240, 215, 0.08), rgba(98, 18, 38, 0.42) 78%, rgba(24, 3, 8, 0.64) 100%);
  mix-blend-mode: normal;
  animation: bellDisruptedVignette 320ms ease-out both;
}

.bell-warning {
  position: fixed;
  top: max(164px, calc(env(safe-area-inset-top) + 148px));
  left: 50%;
  z-index: 7;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 246px;
  padding: 9px 18px 10px 12px;
  border: 1px solid rgba(232, 197, 255, 0.5);
  background:
    radial-gradient(circle at 18% 50%, rgba(190, 112, 242, 0.18), transparent 34%),
    linear-gradient(90deg, rgba(12, 7, 7, 0.94), rgba(40, 19, 38, 0.92), rgba(12, 7, 7, 0.94));
  box-shadow:
    inset 0 0 0 1px rgba(255, 239, 255, 0.06),
    0 0 22px rgba(170, 85, 223, 0.25),
    0 12px 34px rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -8px) scale(0.96);
  visibility: hidden;
}

.bell-warning:not([hidden]),
.bell-warning.is-visible {
  animation: bellWarningEnter 180ms ease-out both;
  opacity: 1;
  visibility: visible;
}

.bell-warning::before,
.bell-warning::after {
  position: absolute;
  top: 50%;
  width: 10px;
  height: 10px;
  border: 1px solid rgba(225, 184, 247, 0.62);
  background: #1b0d19;
  content: "";
  transform: translateY(-50%) rotate(45deg);
}

.bell-warning::before {
  left: -6px;
}

.bell-warning::after {
  right: -6px;
}

.bell-warning__sigil {
  position: relative;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(231, 198, 252, 0.64);
  border-radius: 50%;
  box-shadow:
    inset 0 0 12px rgba(195, 106, 241, 0.24),
    0 0 12px rgba(193, 105, 236, 0.26);
}

.bell-warning__sigil::before,
.bell-warning__sigil::after {
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(210, 159, 242, 0.36);
  border-radius: 50%;
  content: "";
  animation: bellWarningRing 1.05s ease-out infinite;
}

.bell-warning__sigil::after {
  animation-delay: 0.52s;
}

.bell-warning__bell {
  position: relative;
  width: 18px;
  height: 18px;
  border: 1px solid #f1d6a3;
  border-radius: 8px 8px 3px 3px;
  background: linear-gradient(90deg, #7a4c27, #d49b4c 48%, #70401f);
  box-shadow:
    inset 0 1px 0 rgba(255, 239, 187, 0.64),
    0 0 7px rgba(235, 189, 113, 0.42);
  transform-origin: 50% 0;
  animation: bellWarningSwing 0.54s ease-in-out infinite alternate;
}

.bell-warning__bell::before {
  position: absolute;
  top: -5px;
  left: 6px;
  width: 6px;
  height: 5px;
  border-radius: 3px 3px 0 0;
  background: #bb8040;
  content: "";
}

.bell-warning__bell::after {
  position: absolute;
  right: 3px;
  bottom: -5px;
  left: 3px;
  height: 4px;
  border-radius: 0 0 8px 8px;
  background: #e0aa57;
  box-shadow: 0 3px 0 -1px #f0cf8e;
  content: "";
}

.bell-warning__copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

#bell-warning-title {
  color: #f4dfbd;
  font: 700 18px/1 var(--font-title);
  letter-spacing: 0.12em;
  text-shadow: 0 1px 4px #000;
  text-transform: uppercase;
}

#bell-warning-subtitle {
  color: #dab7ee;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.15em;
  line-height: 1.2;
  text-transform: uppercase;
}

@keyframes bellWarningEnter {
  from {
    opacity: 0;
    transform: translate(-50%, -8px) scale(0.96);
  }

  to {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }
}

@keyframes bellWarningVignette {
  0%,
  100% {
    opacity: 0.7;
  }

  50% {
    opacity: 1;
  }
}

@keyframes bellDisruptedVignette {
  0% {
    opacity: 1;
  }

  100% {
    opacity: 0.22;
  }
}

@keyframes bellWarningRing {
  from {
    opacity: 0.78;
    transform: scale(0.62);
  }

  to {
    opacity: 0;
    transform: scale(1.42);
  }
}

@keyframes bellWarningSwing {
  from {
    transform: rotate(-8deg);
  }

  to {
    transform: rotate(8deg);
  }
}

@media (orientation: landscape) and (max-width: 960px),
  (orientation: landscape) and (max-height: 520px) {
  .boss-hud {
    top: max(64px, calc(env(safe-area-inset-top) + 58px));
    left: calc(50% + clamp(28px, 3.7vw, 34px));
    gap: 2px;
    width: clamp(230px, 29vw, 300px);
  }

  #game-root.is-multiplayer-match .boss-hud {
    top: max(50px, calc(env(safe-area-inset-top) + 44px));
  }

  .boss-hud__heading {
    gap: 6px;
    padding: 0 5px;
  }

  .boss-hud__name {
    font-size: 10px;
    letter-spacing: 0;
  }

  .boss-church-pips {
    gap: 4px;
    min-height: 11px;
  }

  .boss-church-pips > span {
    width: 9px;
    height: 9px;
  }

  .boss-hud__frame {
    height: 18px;
    padding: 2px 6px 3px;
  }

  .boss-hud__frame::before,
  .boss-hud__frame::after {
    width: 12px;
    height: 12px;
  }

  .boss-hud__frame::before {
    left: -5px;
  }

  .boss-hud__frame::after {
    right: -5px;
  }

  .boss-hud__status {
    min-height: 10px;
    padding: 1px 8px 2px;
    font-size: 7.5px;
    letter-spacing: 0.11em;
  }

  .bell-warning {
    top: max(148px, calc(env(safe-area-inset-top) + 136px));
    gap: 9px;
    min-width: 210px;
    padding: 7px 14px 8px 9px;
  }

  .bell-warning__sigil {
    width: 34px;
    height: 34px;
  }

  .bell-warning__bell {
    transform: scale(0.82);
  }

  #bell-warning-title {
    font-size: 14px;
  }

  #bell-warning-subtitle {
    font-size: 8px;
  }
}

@media (orientation: landscape) and (max-height: 400px) {
  .boss-hud {
    top: max(62px, calc(env(safe-area-inset-top) + 56px));
    width: clamp(224px, 28.5vw, 286px);
  }

  #game-root.is-multiplayer-match .boss-hud {
    top: max(48px, calc(env(safe-area-inset-top) + 42px));
  }

  .boss-hud__name {
    font-size: 10px;
  }

  .boss-hud__frame {
    height: 17px;
  }

  .boss-hud__status {
    max-width: 82%;
    overflow: hidden;
    font-size: 7.5px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .bell-warning {
    top: max(140px, calc(env(safe-area-inset-top) + 128px));
  }
}

@media (orientation: portrait) and (max-width: 760px) {
  .boss-hud {
    top: max(88px, calc(env(safe-area-inset-top) + 74px));
    width: calc(100vw - 28px);
  }

  .boss-hud__name {
    font-size: clamp(13px, 4vw, 17px);
  }

  .boss-hud__frame {
    height: 23px;
  }

  .boss-hud__status {
    max-width: 94%;
    overflow: hidden;
    font-size: 8px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .bell-warning {
    top: max(152px, calc(env(safe-area-inset-top) + 138px));
    min-width: min(248px, calc(100vw - 40px));
  }
}

@media (prefers-reduced-motion: reduce) {
  .boss-health-lag,
  .boss-health-fill,
  .boss-shield-sheen,
  .boss-church-pips > span,
  .bell-warning,
  .bell-warning__sigil::before,
  .bell-warning__sigil::after,
  .bell-warning__bell {
    animation: none !important;
    transition-duration: 0s !important;
  }

  #game-root.has-bell-warning::after,
  #game-root.bell-disrupted::after {
    animation: none !important;
  }
}

.ammo-hud {
  position: fixed;
  top: var(--combat-hud-top);
  right: var(--combat-hud-right);
  z-index: 4;
  display: none;
  grid-template-columns: 70px minmax(112px, 1fr);
  gap: 10px;
  align-items: center;
  width: var(--ammo-hud-width);
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  background: rgba(28, 17, 9, 0.7);
  backdrop-filter: blur(4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.26);
}

#game-root.is-playing .ammo-hud {
  display: grid;
}

.multiplayer-event-history {
  position: fixed;
  top: calc(var(--combat-hud-top) + 100px);
  right: var(--combat-hud-right);
  z-index: 4;
  display: none;
  gap: 5px;
  width: min(270px, calc(100vw - 32px));
  pointer-events: none;
}

#game-root.is-multiplayer-match .multiplayer-event-history {
  display: grid;
}

.multiplayer-event-history__header {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  align-items: center;
  padding-right: 5px;
  color: rgba(255, 222, 163, 0.64);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.12em;
  line-height: 1;
  text-transform: uppercase;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
}

.multiplayer-event-history__header > span {
  width: 16px;
  height: 1px;
  background: rgba(255, 203, 116, 0.46);
}

.multiplayer-event-history__list {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.multiplayer-event-history__entry {
  display: grid;
  grid-template-columns: 7px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 31px;
  padding: 6px 9px;
  overflow: hidden;
  border: 1px solid rgba(255, 221, 157, 0.2);
  border-radius: 7px;
  background: linear-gradient(90deg, rgba(41, 24, 13, 0.86), rgba(28, 17, 9, 0.54));
  color: rgba(255, 239, 205, 0.92);
  font-size: 11px;
  line-height: 1.15;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.92);
  box-shadow: 0 7px 18px rgba(0, 0, 0, 0.2);
  animation: multiplayerHistoryEntryIn 180ms ease-out both;
}

.multiplayer-event-history__entry:nth-child(2) {
  opacity: 0.82;
}

.multiplayer-event-history__entry:nth-child(3) {
  opacity: 0.68;
}

.multiplayer-event-history__entry:nth-child(n + 4) {
  opacity: 0.54;
}

.multiplayer-event-history__marker {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ef9b4a;
  box-shadow: 0 0 8px rgba(239, 155, 74, 0.76);
}

.multiplayer-event-history__entry.is-final {
  border-color: rgba(239, 88, 67, 0.3);
  background: linear-gradient(90deg, rgba(78, 27, 20, 0.9), rgba(34, 17, 11, 0.58));
}

.multiplayer-event-history__entry.is-final .multiplayer-event-history__marker {
  background: #ef5843;
  box-shadow: 0 0 9px rgba(239, 88, 67, 0.82);
}

.multiplayer-event-history__entry.is-left .multiplayer-event-history__marker {
  background: #8eb8c7;
  box-shadow: 0 0 8px rgba(142, 184, 199, 0.7);
}

.multiplayer-event-history__message {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.multiplayer-event-history__message strong {
  color: #fff5d8;
  font-weight: 900;
}

.multiplayer-event-history__time {
  color: rgba(238, 204, 145, 0.62);
  font: 800 9px/1 Consolas, "Courier New", monospace;
}

@keyframes multiplayerHistoryEntryIn {
  from {
    opacity: 0;
    transform: translateX(14px);
  }
  to {
    transform: translateX(0);
  }
}

.pause-menu-btn {
  position: fixed;
  top: var(--combat-hud-top);
  right: calc(var(--combat-hud-right) + var(--ammo-hud-width) + var(--pause-menu-gap));
  z-index: 4;
  display: none;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border-radius: 8px;
  font-size: 24px;
  line-height: 1;
}

#game-root.is-playing .pause-menu-btn {
  display: grid;
}

#game-root.is-paused .pause-menu-btn {
  opacity: 0;
  pointer-events: none;
}

.ammo-icon-frame {
  display: grid;
  place-items: center;
  height: 54px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  transition:
    background 140ms ease,
    border-color 140ms ease,
    box-shadow 140ms ease;
}

.ammo-weapon-icon {
  width: 70px;
  height: 38px;
  color: #ffffff;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.35));
  shape-rendering: geometricPrecision;
}

.ammo-hud.is-dual-hands-ammo .ammo-weapon-icon {
  width: 66px;
  height: 36px;
  transform: translateX(-2px);
}

.ammo-readout {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.ammo-readout span {
  color: #f8d28a;
  font-size: 11px;
  line-height: 1;
  text-transform: uppercase;
}

.ammo-hud.is-low-ammo {
  border-width: 2px;
  border-color: rgba(255, 163, 48, 0.78);
  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.26),
    0 0 0 1px rgba(255, 163, 48, 0.28),
    0 0 26px rgba(255, 140, 35, 0.42),
    0 0 46px rgba(255, 116, 24, 0.18);
}

.ammo-hud.is-critical-ammo {
  border-width: 2px;
  border-color: rgba(255, 91, 67, 0.72);
  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.26),
    0 0 0 1px rgba(255, 91, 67, 0.3),
    0 0 26px rgba(255, 91, 67, 0.42),
    0 0 46px rgba(255, 91, 67, 0.18);
}

.ammo-hud.is-low-ammo .ammo-icon-frame {
  border-width: 2px;
  border-color: rgba(255, 163, 48, 0.96);
  background: rgba(255, 127, 36, 0.16);
  box-shadow:
    inset 0 0 0 1px rgba(255, 214, 120, 0.28),
    0 0 0 1px rgba(255, 163, 48, 0.3),
    0 0 18px rgba(255, 140, 35, 0.62),
    0 0 34px rgba(255, 116, 24, 0.28);
}

.ammo-hud.is-critical-ammo .ammo-icon-frame {
  border-width: 2px;
  border-color: rgba(255, 91, 67, 0.98);
  background: rgba(255, 72, 48, 0.16);
  box-shadow:
    inset 0 0 0 1px rgba(255, 180, 150, 0.24),
    0 0 0 1px rgba(255, 91, 67, 0.34),
    0 0 20px rgba(255, 72, 48, 0.7),
    0 0 38px rgba(255, 51, 34, 0.3);
}

.ammo-hud.is-low-ammo #ammo-status {
  color: #ffb347;
}

.ammo-hud.is-critical-ammo #ammo-status {
  color: #ff7b68;
}

.ammo-count {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.ammo-cartridge-rack {
  --ammo-cols: 6;
  --round-w: 13px;
  --round-h: 34px;
  display: grid;
  grid-template-columns: repeat(var(--ammo-cols), var(--round-w));
  grid-auto-rows: var(--round-h);
  gap: 4px 5px;
  align-items: end;
  min-height: 38px;
  padding: 1px 0 0;
}

.ammo-cartridge-rack[data-magazine="18"] {
  --ammo-cols: 9;
  --round-w: 7px;
  --round-h: 23px;
  gap: 3px;
  min-height: 49px;
}

.ammo-cartridge-rack[data-magazine="12"] {
  --ammo-cols: 6;
  --round-w: 9px;
  --round-h: 25px;
  gap: 3px 4px;
  min-height: 55px;
}

.ammo-cartridge-rack[data-layout="dual"],
.ammo-cartridge-rack[data-layout="dual-hands"] {
  gap: 5px 5px;
  align-items: center;
}

.ammo-cartridge-rack[data-layout="dual"] .ammo-round[data-row="top"],
.ammo-cartridge-rack[data-layout="dual-hands"] .ammo-round[data-row="top"] {
  transform: translateY(-1px);
}

.ammo-cartridge-rack[data-layout="dual"] .ammo-round[data-row="bottom"],
.ammo-cartridge-rack[data-layout="dual-hands"] .ammo-round[data-row="bottom"] {
  transform: translateY(2px);
}

.ammo-cartridge-rack[data-layout="dual-hands"] {
  position: relative;
  padding-left: 13px;
}

.ammo-cartridge-rack[data-layout="dual-hands"]::before,
.ammo-cartridge-rack[data-layout="dual-hands"]::after {
  position: absolute;
  left: 0;
  width: 9px;
  color: rgba(255, 220, 139, 0.92);
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
}

.ammo-cartridge-rack[data-layout="dual-hands"]::before {
  content: attr(data-right-label);
  top: 6px;
}

.ammo-cartridge-rack[data-layout="dual-hands"]::after {
  content: attr(data-left-label);
  bottom: 7px;
}

.ammo-cartridge-rack[data-magazine="3"] {
  --ammo-cols: 3;
  --round-w: 18px;
  --round-h: 37px;
  gap: 8px;
}

.ammo-cartridge-rack[data-weapon="launcher"] {
  --round-w: 22px;
  --round-h: 38px;
  gap: 11px;
}

.ammo-cartridge-rack[data-weapon="launcher"][data-large-magazine="true"] {
  --ammo-cols: 3;
  --round-w: 16px;
  --round-h: 30px;
  gap: 5px 7px;
  align-items: center;
  min-height: 65px;
}

.ammo-round {
  position: relative;
  width: var(--round-w);
  height: var(--round-h);
  transform-origin: center bottom;
}

.ammo-round::before {
  position: absolute;
  inset: 0;
  content: "";
  opacity: 0.76;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.07), transparent 34%, rgba(0, 0, 0, 0.22) 78%),
    rgba(0, 0, 0, 0.72);
  clip-path: polygon(50% 0, 68% 8%, 79% 24%, 79% 81%, 68% 91%, 68% 100%, 32% 100%, 32% 91%, 21% 81%, 21% 24%, 32% 8%);
}

.ammo-round-live {
  position: absolute;
  inset: 0;
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.38));
  transform-origin: center bottom;
  background:
    linear-gradient(90deg, rgba(74, 39, 12, 0.9) 0%, rgba(250, 217, 116, 0.98) 30%, rgba(185, 109, 31, 0.98) 72%, rgba(69, 36, 11, 0.95) 100%);
  clip-path: polygon(50% 0, 68% 8%, 79% 24%, 79% 81%, 68% 91%, 68% 100%, 32% 100%, 32% 91%, 21% 81%, 21% 24%, 32% 8%);
}

.ammo-round-live::before,
.ammo-round-live::after {
  position: absolute;
  content: "";
}

.ammo-round-live::before {
  left: 23%;
  right: 23%;
  top: 2%;
  height: 30%;
  border-radius: 50% 50% 18% 18%;
  background: linear-gradient(90deg, #fff5bb 0%, #cf9a44 52%, #6c4b22 100%);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  box-shadow: inset 2px 0 0 rgba(255, 255, 255, 0.28);
}

.ammo-round-live::after {
  left: 31%;
  right: 31%;
  bottom: 4%;
  height: 9%;
  border-radius: 50%;
  background: rgba(54, 29, 9, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 245, 186, 0.45);
}

.ammo-round.is-silver-bullet .ammo-round-live {
  filter: drop-shadow(0 0 5px rgba(255, 61, 49, 0.52)) drop-shadow(0 1px 0 rgba(0, 0, 0, 0.4));
  background:
    linear-gradient(90deg, rgba(78, 9, 8, 0.98) 0%, rgba(255, 82, 66, 0.98) 32%, rgba(159, 22, 18, 0.98) 72%, rgba(55, 7, 6, 0.98) 100%);
}

.ammo-round.is-silver-bullet .ammo-round-live::before {
  background: linear-gradient(90deg, #ffe5b3 0%, #ff7b68 45%, #7d130f 100%);
  box-shadow: inset 2px 0 0 rgba(255, 246, 204, 0.34), 0 0 6px rgba(255, 52, 42, 0.35);
}

.ammo-round.is-silver-bullet .ammo-round-live::after {
  background: rgba(63, 7, 6, 0.86);
  box-shadow: 0 -2px 0 rgba(255, 197, 116, 0.45), inset 0 1px 0 rgba(255, 230, 191, 0.38);
}

.ammo-round.is-chain-lightning-round .ammo-round-live {
  filter: drop-shadow(0 0 6px rgba(99, 226, 255, 0.72)) drop-shadow(0 1px 0 rgba(0, 0, 0, 0.4));
  background:
    linear-gradient(90deg, rgba(16, 42, 68, 0.98) 0%, rgba(146, 241, 255, 0.98) 33%, rgba(36, 119, 176, 0.98) 70%, rgba(8, 32, 58, 0.98) 100%);
}

.ammo-round.is-chain-lightning-round .ammo-round-live::before {
  background: linear-gradient(90deg, #f6ffff 0%, #83ecff 46%, #1d7fd8 100%);
  box-shadow: inset 2px 0 0 rgba(255, 255, 255, 0.52), 0 0 8px rgba(85, 224, 255, 0.7);
}

.ammo-round.is-chain-lightning-round .ammo-round-live::after {
  background: rgba(8, 34, 64, 0.86);
  box-shadow: 0 -2px 0 rgba(137, 239, 255, 0.62), inset 0 1px 0 rgba(238, 255, 255, 0.46);
}

.ammo-round.is-chain-lightning-round::after {
  position: absolute;
  z-index: 3;
  left: 18%;
  top: 21%;
  width: 64%;
  height: 58%;
  content: "";
  pointer-events: none;
  background: linear-gradient(180deg, #f9ffff 0%, #76edff 48%, #227fe0 100%);
  clip-path: polygon(54% 0, 76% 0, 58% 35%, 78% 35%, 34% 100%, 45% 58%, 25% 58%);
  filter: drop-shadow(0 0 4px rgba(103, 231, 255, 0.82));
}

.ammo-cartridge-rack[data-weapon="launcher"] .ammo-round::before,
.ammo-cartridge-rack[data-weapon="launcher"] .ammo-round-live {
  clip-path: polygon(50% 0, 68% 5%, 82% 18%, 89% 40%, 86% 64%, 74% 73%, 74% 90%, 63% 100%, 37% 100%, 26% 90%, 26% 73%, 14% 64%, 11% 40%, 18% 18%, 32% 5%);
}

.ammo-cartridge-rack[data-weapon="launcher"] .ammo-round::before {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.06), transparent 36%, rgba(0, 0, 0, 0.28) 82%),
    rgba(0, 0, 0, 0.76);
}

.ammo-cartridge-rack[data-weapon="launcher"] .ammo-round-live {
  background:
    linear-gradient(90deg, rgba(35, 23, 8, 0.84), rgba(255, 223, 126, 0.42) 34%, rgba(45, 28, 9, 0.34) 76%),
    linear-gradient(180deg, #8f9b57 0%, #6e7e40 37%, #2c2718 37%, #2c2718 44%, #e1b553 44%, #c37a28 82%, #743c14 100%);
  box-shadow: inset 0 -2px 0 rgba(61, 30, 9, 0.42);
}

.ammo-cartridge-rack[data-weapon="launcher"] .ammo-round-live::before {
  left: 17%;
  right: 17%;
  top: 4%;
  height: 37%;
  border-radius: 50% 50% 18% 18%;
  background: linear-gradient(90deg, #adb76b 0%, #6d7a3e 62%, #35401f 100%);
  clip-path: polygon(50% 0, 100% 38%, 88% 100%, 12% 100%, 0 38%);
  box-shadow: inset 2px 0 0 rgba(255, 247, 178, 0.16);
}

.ammo-cartridge-rack[data-weapon="launcher"] .ammo-round-live::after {
  left: 30%;
  right: 30%;
  bottom: 5%;
  height: 8%;
  border-radius: 50%;
  background: rgba(38, 22, 8, 0.8);
  box-shadow: 0 -3px 0 rgba(255, 211, 95, 0.38), inset 0 1px 0 rgba(255, 245, 186, 0.42);
}

.ammo-round.is-spent .ammo-round-live {
  opacity: 0;
}

.ammo-round.is-dropping .ammo-round-live {
  z-index: 2;
  opacity: 1;
  animation: ammoRoundDrop 780ms linear forwards;
  will-change: transform, opacity;
}

.ammo-round.is-refilling .ammo-round-live {
  animation: ammoRoundPop 240ms cubic-bezier(0.24, 1.25, 0.32, 1) both;
  animation-delay: var(--round-delay, 0ms);
}

.ammo-hud.is-reloading .ammo-cartridge-rack {
  opacity: 0.68;
}

.ammo-readout strong:not(.ammo-count) {
  color: #ffffff;
  font-size: 28px;
  line-height: 0.9;
  white-space: nowrap;
}

.ammo-separator {
  margin: 0 2px;
  color: rgba(255, 255, 255, 0.55) !important;
  font-size: 20px !important;
}

.ammo-bar {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
}

.ammo-reload-fill {
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #ffffff, #ffd166);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 80ms linear;
}

.ammo-hud.is-reloading .ammo-icon-frame {
  background: rgba(240, 163, 72, 0.2);
}

.ammo-hud.is-reloading .ammo-reload-fill {
  transform: scaleX(var(--reload-progress, 0));
}

.minimap {
  --xp-progress-angle: 0deg;
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 4;
  display: none;
  pointer-events: none;
  width: 204px;
  padding-top: 16px;
}

.minimap,
.minimap * {
  pointer-events: none;
}

#game-root.is-playing .minimap {
  display: block;
}

.minimap-level-badge {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 5px;
  transform: translate(-50%, -8%);
  padding: 4px 12px 5px;
  border: 1px solid rgba(255, 224, 143, 0.82);
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(255, 230, 158, 0.34), rgba(90, 44, 14, 0.16)),
    #221208;
  color: #f8d28a;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.72);
  box-shadow:
    inset 0 1px 0 rgba(255, 247, 215, 0.32),
    inset 0 -2px 0 rgba(0, 0, 0, 0.46),
    0 0 0 1px rgba(62, 31, 12, 0.78),
    0 6px 16px rgba(0, 0, 0, 0.26);
}

.minimap-level-badge b {
  color: #ffffff;
  font-size: 14px;
}

.minimap-xp-frame {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 4px;
  border-radius: 10px;
  background: rgba(96, 65, 32, 0.94);
  box-shadow:
    0 0 0 1px rgba(255, 224, 143, 0.58),
    0 0 0 3px rgba(62, 31, 12, 0.78),
    0 10px 26px rgba(0, 0, 0, 0.32),
    0 0 18px rgba(46, 119, 210, 0.18);
}

.minimap-xp-frame::before {
  position: absolute;
  z-index: 0;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  content: "";
  background:
    conic-gradient(
      from 0deg,
      #163b8f 0deg,
      #2e77d2 0deg,
      #74d8ff var(--xp-progress-angle),
      transparent var(--xp-progress-angle),
      transparent 360deg
    );
  box-shadow:
    inset 0 0 0 1px rgba(255, 247, 215, 0.18),
    inset 0 0 13px rgba(5, 10, 18, 0.28);
}

.minimap-xp-frame::after {
  position: absolute;
  z-index: 0;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  content: "";
  background: repeating-conic-gradient(from 0deg, rgba(255, 226, 150, 0.3) 0deg 1.4deg, transparent 1.4deg 10deg);
  mix-blend-mode: screen;
  opacity: 0.34;
}

.minimap-xp-inner {
  position: relative;
  z-index: 1;
  padding: 9px;
  border: 1px solid rgba(255, 221, 154, 0.34);
  border-radius: 7px;
  background: rgba(38, 24, 13, 0.82);
  backdrop-filter: blur(4px);
  box-shadow:
    inset 0 0 0 1px rgba(255, 247, 215, 0.1),
    inset 0 0 16px rgba(0, 0, 0, 0.16);
}

.minimap-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  color: #f8d28a;
  font-size: 11px;
  line-height: 1;
  text-transform: uppercase;
}

.minimap-top span:last-child {
  position: relative;
  padding-left: 15px;
  color: #ffffff;
  font-weight: 700;
}

.minimap-top span:last-child::before {
  position: absolute;
  left: 0;
  top: 50%;
  width: 8px;
  height: 8px;
  transform: translateY(-50%);
  border-radius: 2px;
  background: #ffd36b;
  box-shadow: 0 0 10px rgba(255, 211, 107, 0.55);
  content: "";
}

.minimap-canvas {
  display: block;
  width: 176px;
  height: 128px;
  border: 1px solid rgba(255, 238, 190, 0.22);
  border-radius: 5px;
  background: #9f7140;
  box-shadow: inset 0 0 0 1px rgba(28, 15, 8, 0.32);
}

.minimap-xp-fill {
  display: none;
}

.xp-hud {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
  display: none !important;
  pointer-events: none;
  width: auto;
  padding: 3px max(10px, env(safe-area-inset-right)) max(3px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
  border: 1px solid rgba(255, 210, 112, 0.58);
  border-right: 0;
  border-bottom: 0;
  border-left: 0;
  border-radius: 0;
  background:
    linear-gradient(180deg, rgba(84, 50, 22, 0.9), rgba(24, 13, 7, 0.9)),
    rgba(20, 12, 7, 0.86);
  box-shadow:
    inset 0 1px 0 rgba(255, 242, 190, 0.28),
    inset 0 -1px 0 rgba(67, 33, 11, 0.74),
    0 9px 22px rgba(0, 0, 0, 0.32);
}

#game-root.is-playing .xp-hud {
  display: none;
}

#game-root.has-blocking-overlay > canvas {
  pointer-events: none;
}

.xp-hud__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 2px;
  color: #f6d189;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.72);
}

.xp-hud__top b {
  color: #ffffff;
  font-size: 12px;
}

.xp-frame {
  position: relative;
  height: 15px;
  min-width: 0;
  padding: 2px 3px;
  border: 1px solid rgba(255, 224, 143, 0.68);
  border-radius: 4px;
  background:
    linear-gradient(180deg, rgba(255, 230, 158, 0.3), rgba(90, 44, 14, 0.12)),
    #221208;
  box-shadow:
    inset 0 1px 0 rgba(255, 247, 215, 0.28),
    inset 0 -2px 0 rgba(0, 0, 0, 0.46),
    0 0 0 1px rgba(62, 31, 12, 0.78);
  isolation: isolate;
}

.xp-frame::before,
.xp-frame::after {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 9px;
  height: 20px;
  transform: translateY(-50%);
  border: 1px solid rgba(255, 222, 134, 0.58);
  border-radius: 3px;
  background: linear-gradient(180deg, #9f6428, #3b1e0d);
  content: "";
  box-shadow: inset 0 1px 0 rgba(255, 244, 192, 0.2);
}

.xp-frame::before {
  left: -5px;
}

.xp-frame::after {
  right: -5px;
}

.xp-meter {
  position: relative;
  z-index: 1;
  height: 100%;
  overflow: hidden;
  border-radius: 2px;
  background:
    repeating-linear-gradient(90deg, transparent 0 9.5%, rgba(255, 230, 164, 0.2) 9.5% 10%),
    linear-gradient(180deg, #0a1520, #051017);
  box-shadow: inset 0 0 0 1px rgba(7, 4, 2, 0.78);
  contain: paint;
  isolation: isolate;
}

.xp-meter::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.24), transparent 38%, rgba(0, 0, 0, 0.28)),
    repeating-linear-gradient(90deg, rgba(255, 226, 150, 0.34) 0 1px, transparent 1px 10%);
  mix-blend-mode: screen;
}

.xp-fill {
  position: absolute;
  inset: 1px;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 120ms linear;
  border-radius: 1px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.35), transparent 36%, rgba(0, 0, 0, 0.2)),
    linear-gradient(90deg, #163b8f 0%, #2e77d2 45%, #74d8ff 100%);
  box-shadow:
    inset 0 0 8px rgba(201, 239, 255, 0.45);
}

@keyframes ammoRoundDrop {
  0% {
    opacity: 1;
    transform: translate3d(0, 0, 0) rotate(0deg) scale(1);
    animation-timing-function: cubic-bezier(0.22, 0.68, 0.22, 1);
  }
  18% {
    opacity: 1;
    transform: translate3d(calc(var(--fall-x, 2px) * 0.12), calc(var(--pop-y, -18px) * 0.78), 0) rotate(calc(var(--fall-rot, 28deg) * 0.08)) scale(1.04);
  }
  32% {
    opacity: 1;
    transform: translate3d(calc(var(--fall-x, 2px) * 0.24), var(--pop-y, -18px), 0) rotate(calc(var(--fall-rot, 28deg) * 0.18)) scale(1.05);
    animation-timing-function: cubic-bezier(0.36, 0, 0.72, 0.34);
  }
  50% {
    opacity: 0.98;
    transform: translate3d(calc(var(--fall-x, 2px) * 0.48), 2px, 0) rotate(calc(var(--fall-rot, 28deg) * 0.42)) scale(0.98);
  }
  72% {
    opacity: 0.74;
    transform: translate3d(calc(var(--fall-x, 2px) * 0.78), calc(var(--fall-y, 42px) * 0.58), 0) rotate(calc(var(--fall-rot, 28deg) * 0.74)) scale(0.86);
  }
  88% {
    opacity: 0.34;
    transform: translate3d(calc(var(--fall-x, 2px) * 0.94), calc(var(--fall-y, 42px) * 0.86), 0) rotate(calc(var(--fall-rot, 28deg) * 0.92)) scale(0.78);
  }
  100% {
    opacity: 0;
    transform: translate3d(var(--fall-x, 2px), var(--fall-y, 42px), 0) rotate(var(--fall-rot, 28deg)) scale(0.74);
  }
}

@keyframes ammoRoundPop {
  0% {
    opacity: 0;
    transform: translateY(5px) scale(0.72);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.panel {
  position: fixed;
  left: 50%;
  bottom: 8vh;
  z-index: 5;
  display: none;
  width: min(430px, calc(100vw - 32px));
  transform: translateX(-50%);
  padding: 20px;
  border: 1px solid rgba(255, 229, 173, 0.45);
  border-radius: 8px;
  background: rgba(34, 20, 10, 0.86);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.38);
}

.panel.is-visible {
  display: block;
}

/* The multiplayer map reload happens before game.js can normalize panel state.
   Keep the title/menu out of the very first rendered frame and show the lobby shell. */
html.local-multiplayer-boot #intro-screen,
html.local-multiplayer-boot #menu {
  display: none !important;
}

html.local-multiplayer-boot #local-multiplayer-lobby {
  display: block;
}

.panel h1,
.panel h2 {
  margin: 0 0 8px;
  color: #ffe2a3;
  font-size: clamp(32px, 6vw, 48px);
  line-height: 1;
}

.panel h2 {
  font-size: clamp(28px, 5vw, 40px);
}

.panel p {
  margin: 0 0 16px;
  color: #f7ddaa;
  font-size: 15px;
  line-height: 1.45;
}

.game-over__actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.game-over__actions button {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 14px 12px;
  font-size: 13px;
}

#game-over.game-over-panel {
  top: 50%;
  bottom: auto;
  width: min(680px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  overflow-x: hidden;
  overflow-y: auto;
  padding: 22px;
  transform: translate(-50%, -50%);
  background:
    radial-gradient(circle at 78% 10%, rgba(245, 174, 76, 0.14), transparent 32%),
    linear-gradient(180deg, rgba(67, 36, 18, 0.97), rgba(22, 13, 8, 0.98));
  scrollbar-gutter: stable;
}

/* The summary has to read at a glance on a phone: score, dust and the three
   buttons must stay on screen. Column flex pins every fixed block and lets the
   milestone roll - the only unbounded list here - shrink and scroll on its own
   instead of pushing the actions past the bottom edge. */
#game-over.game-over-panel.is-visible {
  display: flex;
  flex-direction: column;
}

#game-over .game-over__milestones {
  display: flex;
  flex: 0 1 auto;
  flex-direction: column;
  min-height: 0;
}

#game-over .game-over__milestone-list {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: rgba(211, 132, 63, 0.64) rgba(15, 9, 5, 0.32);
  scrollbar-width: thin;
}

.game-over__eyebrow,
.pause-menu__confirm-eyebrow {
  display: block;
  margin-bottom: 5px;
  color: #e7a34b;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

#game-over.game-over-panel h2 {
  margin-bottom: 5px;
  font-size: clamp(30px, 5vw, 44px);
}

#game-over .game-over__headline {
  margin-bottom: 14px;
  color: rgba(255, 232, 183, 0.84);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.game-over__stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.game-over__stat {
  position: relative;
  display: grid;
  align-content: center;
  min-height: 76px;
  padding: 11px 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 222, 160, 0.18);
  border-radius: 8px;
  background: rgba(15, 9, 5, 0.42);
}

.game-over__stat--dust {
  border-color: rgba(226, 165, 69, 0.38);
  background: linear-gradient(145deg, rgba(93, 56, 20, 0.76), rgba(24, 14, 7, 0.55));
}

.game-over__stat > span {
  color: rgba(255, 226, 169, 0.68);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1.25;
  text-transform: uppercase;
}

.game-over__stat strong {
  margin-top: 4px;
  color: #fff1cc;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(20px, 3vw, 27px);
  line-height: 1;
}

.game-over__stat small {
  margin-top: 4px;
  overflow: hidden;
  color: rgba(255, 226, 169, 0.67);
  font-size: 8px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-over__stat em {
  position: absolute;
  right: 7px;
  bottom: 6px;
  padding: 2px 5px;
  border-radius: 999px;
  background: #e2a545;
  color: #2b170d;
  font-size: 7px;
  font-style: normal;
  font-weight: 950;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.game-over__milestones,
.game-over__next-unlock {
  margin-top: 10px;
  padding: 11px 12px;
  border: 1px solid rgba(255, 222, 160, 0.16);
  border-radius: 8px;
  background: rgba(15, 9, 5, 0.34);
}

.game-over__milestones h3 {
  margin: 0 0 7px;
  color: #f4c47a;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.game-over__milestone-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.game-over__milestone-list li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 7px;
  align-items: center;
  min-width: 0;
  color: #fff0ce;
  font-size: 11px;
  line-height: 1.25;
}

.game-over__milestone-list li span {
  padding: 2px 5px;
  border: 1px solid rgba(232, 169, 73, 0.36);
  border-radius: 999px;
  color: #eab061;
  font-size: 7px;
  font-weight: 950;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.game-over__milestone-list li strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#game-over .game-over__empty {
  margin: 0;
  color: rgba(255, 232, 183, 0.65);
  font-size: 11px;
}

.game-over__next-unlock-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
}

.game-over__next-unlock-head span {
  color: rgba(255, 226, 169, 0.68);
  font-size: 9px;
  font-weight: 950;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.game-over__next-unlock-head strong {
  min-width: 0;
  overflow: hidden;
  color: #fff0ce;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-over__unlock-progress {
  height: 6px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 240, 202, 0.12);
}

.game-over__unlock-progress span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #a96027, #f0b658);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 180ms ease-out;
}

.game-over__unlock-progress.is-ready span {
  background: linear-gradient(90deg, #b9762e, #ffd17a);
  box-shadow: 0 0 12px rgba(240, 182, 88, 0.45);
}

#game-over .game-over__next-unlock p {
  margin: 6px 0 0;
  color: rgba(255, 232, 183, 0.72);
  font-size: 9px;
  text-align: right;
}

.game-over__actions {
  margin-top: 12px;
}

.pause-menu {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: none;
  place-items: center;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  background:
    radial-gradient(circle at 50% 32%, rgba(255, 214, 138, 0.14), transparent 28%),
    rgba(9, 6, 4, 0.68);
  backdrop-filter: blur(8px);
}

.pause-menu.is-visible {
  display: grid;
}

.pause-menu__panel {
  position: relative;
  display: grid;
  width: min(430px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow: auto;
  padding: 24px;
  border: 1px solid rgba(255, 229, 173, 0.46);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(80, 43, 20, 0.92), rgba(23, 14, 8, 0.96)),
    rgba(26, 16, 9, 0.94);
  box-shadow:
    0 26px 82px rgba(0, 0, 0, 0.52),
    inset 0 1px 0 rgba(255, 242, 208, 0.1);
}

.pause-menu__close {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 8px;
  font-size: 28px;
  line-height: 1;
}

.pause-menu__view {
  display: none;
  gap: 14px;
  padding-top: 8px;
}

.pause-menu__view.is-visible {
  display: grid;
}

.pause-menu h2 {
  margin: 0 48px 4px 0;
  color: #ffe2a3;
  font-size: clamp(30px, 6vw, 44px);
  line-height: 1;
}

.pause-menu__actions {
  display: grid;
  gap: 10px;
}

.pause-menu__actions button {
  width: 100%;
}

.pause-menu__danger {
  background:
    linear-gradient(180deg, #ffb36d, #c45b35 58%, #73301f);
  color: #fff4da;
}

.pause-menu__danger:hover,
.pause-menu__danger:focus-visible {
  background:
    linear-gradient(180deg, #ffc58a, #dd7047 58%, #8e3e29);
}

.pause-menu__confirm {
  min-height: 230px;
  align-content: center;
}

.pause-menu__confirm h2 {
  font-size: clamp(28px, 5vw, 38px);
}

.pause-menu__confirm p {
  margin: 0 0 4px;
  color: rgba(255, 232, 183, 0.82);
  font-size: 14px;
  line-height: 1.5;
}

.pause-menu__confirm-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pause-volume {
  display: grid;
  gap: 18px;
  margin: 4px 0 6px;
}

.pause-volume__control {
  display: grid;
  gap: 10px;
  color: #ffe8b7;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pause-volume__head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  font-size: 13px;
}

.pause-volume output {
  color: #ffffff;
  font-size: 15px;
}

.pause-volume input[type="range"] {
  width: 100%;
  height: 28px;
  accent-color: #f0a64a;
}

.pause-graphics {
  display: grid;
  gap: 12px;
  margin: 2px 0 8px;
}

.pause-graphics__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: #ffe8b7;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 13px;
}

.pause-graphics__options {
  display: flex;
  gap: 6px;
}

.pause-graphics__options button {
  min-width: 64px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 220, 160, 0.42);
  border-radius: 8px;
  background: rgba(38, 22, 12, 0.72);
  color: #ffe8b7;
  font: inherit;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}

.pause-graphics__options button:hover {
  border-color: rgba(255, 220, 160, 0.72);
}

.pause-graphics__options button.is-active {
  background: #f0a64a;
  border-color: #f0a64a;
  color: #2b170d;
}

/* The editor only moves the on-screen stick and fire button, so it is dead
   weight on a mouse-and-keyboard build. Mirror the media query that turns
   .mobile-controls on so the two always agree. */
#control-layout-btn {
  display: none;
}

@media (hover: none), (pointer: coarse), (max-width: 760px) {
  #control-layout-btn {
    display: block;
  }
}

.control-layout-editor {
  position: fixed;
  inset: 0;
  z-index: 11;
  display: none;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(7, 5, 3, 0.42), transparent 35%, rgba(7, 5, 3, 0.28)),
    rgba(9, 6, 4, 0.16);
}

.control-layout-editor.is-visible {
  display: block;
}

.control-layout-editor__bar {
  position: fixed;
  top: max(14px, env(safe-area-inset-top));
  left: 50%;
  z-index: 13;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  width: min(560px, calc(100vw - 28px));
  padding: 10px;
  border: 1px solid rgba(255, 229, 173, 0.46);
  border-radius: 8px;
  background: rgba(26, 16, 9, 0.9);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.4);
  pointer-events: auto;
  transform: translateX(-50%);
}

.control-layout-editor__bar strong {
  color: #ffe2a3;
  font-size: 15px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.control-layout-editor__actions {
  display: flex;
  gap: 8px;
}

.control-layout-editor__actions button {
  padding: 11px 14px;
  font-size: 12px;
}

#game-root.is-layout-editing .pause-menu {
  display: none;
}

#game-root.is-paused .mobile-controls {
  pointer-events: none;
}

#game-root.is-menu .hud {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-10px);
}

.intro-screen {
  position: fixed;
  inset: 0;
  z-index: 9;
  display: none;
  place-items: center;
  padding: 24px;
  border: 0;
  background:
    linear-gradient(180deg, rgba(255, 196, 96, 0.05), transparent 28%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.025) 0 2px, transparent 2px 7px),
    #050403;
  cursor: var(--cursor-frontier-default);
  text-align: center;
}

.intro-screen.is-visible {
  display: grid;
}

.intro-screen__inner {
  display: grid;
  justify-items: center;
  gap: 18px;
  transform: translateY(-1vh);
}

.intro-screen__title {
  color: #f4c66f;
  font: 900 clamp(42px, 10vw, 118px) / 0.88 Consolas, "Courier New", monospace;
  letter-spacing: 0;
  text-transform: uppercase;
  text-shadow:
    0 5px 0 #7a381b,
    0 10px 0 #2a160d,
    0 18px 34px rgba(0, 0, 0, 0.72);
  -webkit-text-stroke: 2px rgba(36, 18, 8, 0.9);
}

.intro-screen__prompt {
  padding: 12px 18px;
  border: 2px solid rgba(255, 229, 173, 0.72);
  background: rgba(18, 11, 7, 0.82);
  color: #fff2c7;
  font: 800 clamp(16px, 2.4vw, 28px) / 1.1 Consolas, "Courier New", monospace;
  letter-spacing: 0;
  text-transform: uppercase;
  box-shadow:
    inset 0 0 0 2px rgba(80, 43, 19, 0.86),
    0 12px 0 rgba(0, 0, 0, 0.38);
  animation: introPromptPulse 1.25s steps(2, end) infinite;
}

.intro-screen__hint {
  color: rgba(232, 196, 132, 0.78);
  font: 800 12px/1 Consolas, "Courier New", monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@keyframes introPromptPulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.68;
  }
}

.menu-panel {
  left: clamp(18px, 5vw, 72px);
  top: 50%;
  bottom: auto;
  width: min(468px, calc(100vw - 32px));
  transform: translateY(-50%);
  padding: clamp(20px, 2.6vw, 28px);
  border: 1px solid rgba(255, 226, 177, 0.2);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(77, 40, 20, 0.86), rgba(18, 11, 7, 0.9)),
    rgba(18, 11, 7, 0.88);
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 239, 204, 0.08);
  backdrop-filter: blur(14px);
  overflow: hidden;
}

.menu-panel::before {
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 124px;
  pointer-events: none;
  content: "";
  background:
    radial-gradient(circle at 18% 20%, rgba(255, 217, 138, 0.34), transparent 32%),
    linear-gradient(180deg, rgba(255, 232, 188, 0.12), transparent);
}

.menu-panel.is-visible {
  display: grid;
  gap: 14px;
  /* Never let the menu leave the screen. A short landscape window centred a
     panel taller than the viewport and pushed its first rows off the top edge;
     the compact layouts further down still avoid needing this scrollbar. */
  max-height: calc(100dvh - 24px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.menu-controls {
  position: relative;
  z-index: 1;
}

.menu-panel h1 {
  position: relative;
  z-index: 1;
  margin-bottom: 0;
  /* Sized so the wordmark sits on one line across the panel width. */
  font-size: clamp(40px, 4vw, 52px);
  line-height: 1;
  letter-spacing: 0.03em;
  text-shadow: 0 8px 24px rgba(0, 0, 0, 0.32);
}

.menu-panel__lead {
  position: relative;
  z-index: 1;
  max-width: 38ch;
  margin-bottom: 0 !important;
  color: rgba(255, 236, 201, 0.9) !important;
  font-size: clamp(15px, 1.8vw, 17px) !important;
  line-height: 1.55 !important;
  text-wrap: pretty;
}

/* The wordmark and the music toggle share the top line: the toggle is a
   utility, not a play action, so keeping it out of the action stack removes
   the orphan row it used to occupy and buys back the height that pushed the
   menu into a scrollbar. */
.menu-panel__header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
}

.menu-panel__header h1 {
  flex: 1 1 auto;
  min-width: 0;
}

.menu-panel__actions {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
}

.menu-panel__actions #start-btn {
  flex: 0 1 auto;
  min-width: 176px;
  font-size: 16px;
}

.menu-music-btn {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  font-size: 20px;
  line-height: 1;
}

.menu-music-btn.is-muted {
  filter: saturate(0.55);
  opacity: 0.62;
}

.menu-music-btn.is-pending {
  opacity: 0.88;
}

.menu-controls {
  margin-top: 2px;
  color: rgba(232, 196, 132, 0.86);
  font-size: 11px;
  letter-spacing: 0.07em;
  line-height: 1.5;
  text-transform: uppercase;
  text-wrap: balance;
}

.panel.class-choice-panel {
  top: 50%;
  bottom: auto;
  width: min(760px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  transform: translate(-50%, -50%);
  padding: 22px;
  background:
    linear-gradient(rgba(64, 34, 15, 0.88), rgba(26, 14, 8, 0.92)),
    rgba(34, 20, 10, 0.9);
}

.class-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.class-options--classes {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

#class-choice {
  width: min(980px, calc(100vw - 32px));
}

.revolver-upgrade-panel,
.rifle-upgrade-panel,
.launcher-upgrade-panel,
.marshal-upgrade-panel {
  width: min(560px, calc(100vw - 32px));
}

.revolver-upgrade-panel .class-options,
.rifle-upgrade-panel .class-options,
.launcher-upgrade-panel .class-options,
.marshal-upgrade-panel .class-options {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.level-up-panel {
  width: min(720px, calc(100vw - 32px));
}

.level-up-options {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.class-card {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-rows: 76px 28px 58px;
  gap: 9px;
  justify-items: center;
  min-height: 230px;
  align-content: center;
  padding: 28px 16px 24px;
  overflow: hidden;
  border: 2px solid #2c1608;
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 255, 255, 0.48), transparent 24%),
    linear-gradient(145deg, #fff3d0, #eed199 54%, #d6a75d);
  color: #2c170a;
  line-height: 1.2;
  text-align: center;
  text-transform: none;
  box-shadow:
    inset 0 0 0 5px rgba(255, 249, 226, 0.9),
    inset 0 0 0 8px currentColor,
    inset 0 -18px 36px rgba(79, 38, 12, 0.16),
    0 14px 28px rgba(0, 0, 0, 0.32);
  transition: transform 120ms ease, background 120ms ease;
}

.class-card::before,
.class-card::after {
  position: absolute;
  z-index: 1;
  width: 30px;
  color: currentColor;
  content: attr(data-rank) "\A" attr(data-suit);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  font-weight: 800;
  line-height: 0.88;
  text-align: center;
  white-space: pre;
}

.class-card::before {
  top: 13px;
  left: 11px;
}

.class-card::after {
  right: 11px;
  bottom: 13px;
  transform: rotate(180deg);
}

.class-card--red {
  color: #8d1f18;
}

.class-card--black {
  color: #241308;
}

.class-card__mark {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 108px;
  height: 72px;
  margin-bottom: 2px;
  border: 2px solid currentColor;
  border-radius: 50% / 42%;
  background:
    radial-gradient(ellipse at center, rgba(255, 248, 220, 0.82), rgba(210, 154, 82, 0.18) 66%, transparent 68%),
    rgba(255, 235, 177, 0.36);
  color: currentColor;
  box-shadow: inset 0 0 0 5px rgba(255, 247, 220, 0.42);
}

.class-card__mark::before,
.class-card__mark::after {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 128px;
  height: 2px;
  background: currentColor;
  content: "";
  opacity: 0.28;
  transform: translate(-50%, -50%);
}

.class-card__mark::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.class-card__weapon-icon {
  position: relative;
  z-index: 2;
  display: block;
  width: 94px;
  height: 48px;
  color: currentColor;
  filter:
    drop-shadow(0 1px 0 rgba(255, 248, 220, 0.52))
    drop-shadow(0 4px 5px rgba(45, 20, 7, 0.24));
}

.class-card__weapon-icon[data-weapon-icon^="coachGun"] {
  filter: drop-shadow(0 4px 5px rgba(45, 20, 7, 0.24));
}

.class-card__weapon-icon[data-weapon-icon="coachGunBreach"] {
  --coach-gun-breach-accent: #321b0e;
}

.class-card__weapon-icon[data-weapon-icon="coachGunGrave"] {
  --coach-gun-grave-accent: #b77932;
}

.marshal-upgrade-panel .class-card__mark::before,
.marshal-upgrade-panel .class-card__mark::after {
  opacity: 0.12;
}

.class-card__mark--dual {
  overflow: hidden;
}

.class-card__mark--dual .class-card__weapon-icon {
  position: absolute;
  width: 72px;
  height: 38px;
}

.class-card__weapon-icon--dual-left {
  transform: translate(-15px, 2px) rotate(-8deg);
}

.class-card__weapon-icon--dual-right {
  transform: translate(15px, -2px) rotate(8deg) scaleX(-1);
}

.class-card__weapon-icon--big-iron {
  width: 104px;
  height: 52px;
}

.upgrade-card {
  grid-template-rows: 84px 44px 40px;
  align-content: center;
  min-height: 204px;
  padding-top: 24px;
  padding-bottom: 22px;
  background:
    radial-gradient(ellipse at 50% 16%, rgba(255, 255, 255, 0.6), transparent 23%),
    radial-gradient(ellipse at 50% 100%, rgba(129, 67, 25, 0.18), transparent 54%),
    linear-gradient(145deg, #fff4cf, #edd096 56%, #c99148);
}

.upgrade-card--special {
  --special-border-angle: 0deg;
  border-color: transparent;
  background:
    radial-gradient(ellipse at 50% 16%, rgba(255, 255, 255, 0.66), transparent 23%) padding-box,
    radial-gradient(ellipse at 50% 100%, rgba(129, 67, 25, 0.18), transparent 54%) padding-box,
    linear-gradient(145deg, #fff7dc, #efd59f 55%, #c9944f) padding-box,
    conic-gradient(
        from var(--special-border-angle),
        rgba(183, 91, 255, 0.98),
        rgba(255, 143, 246, 0.92),
        rgba(122, 93, 255, 0.95),
        rgba(232, 190, 255, 0.96),
        rgba(144, 65, 255, 0.98),
        rgba(183, 91, 255, 0.98)
      )
      border-box;
  box-shadow:
    inset 0 0 0 5px rgba(255, 249, 226, 0.9),
    inset 0 0 0 8px currentColor,
    inset 0 -18px 36px rgba(79, 38, 12, 0.16),
    0 0 0 2px rgba(186, 96, 255, 0.2),
    0 0 18px rgba(174, 79, 255, 0.52),
    0 16px 34px rgba(75, 29, 112, 0.42);
  animation:
    specialUpgradeBorderFlow 4.2s linear infinite,
    specialUpgradeGlow 2.6s ease-in-out infinite;
}

.upgrade-card::before,
.upgrade-card::after {
  width: 27px;
  font-size: 17px;
}

.upgrade-card .class-card__mark {
  width: 98px;
  height: 76px;
  align-self: center;
  margin: 0;
}

.upgrade-card__symbol {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 62px;
  height: 50px;
  color: currentColor;
}

.upgrade-card__icon {
  display: block;
  width: 58px;
  height: 50px;
  overflow: visible;
  filter:
    drop-shadow(0 1px 0 rgba(255, 248, 220, 0.58))
    drop-shadow(0 3px 3px rgba(57, 31, 13, 0.24));
}

.upgrade-card__icon * {
  vector-effect: non-scaling-stroke;
}

.class-card:hover,
.class-card:focus-visible {
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 255, 255, 0.64), transparent 26%),
    linear-gradient(145deg, #fff8df, #f0dba8 54%, #e0b56f);
  transform: translateY(-2px);
}

.upgrade-card--special:hover,
.upgrade-card--special:focus-visible {
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 255, 255, 0.72), transparent 26%) padding-box,
    radial-gradient(ellipse at 50% 100%, rgba(137, 72, 28, 0.18), transparent 54%) padding-box,
    linear-gradient(145deg, #fffbe7, #f3dfae 54%, #dfb36f) padding-box,
    conic-gradient(
        from var(--special-border-angle),
        rgba(200, 112, 255, 1),
        rgba(255, 158, 247, 0.96),
        rgba(122, 93, 255, 1),
        rgba(232, 190, 255, 0.98),
        rgba(144, 65, 255, 1),
        rgba(200, 112, 255, 1)
      )
      border-box;
}

@property --special-border-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

@keyframes specialUpgradeBorderFlow {
  to {
    --special-border-angle: 360deg;
  }
}

@keyframes specialUpgradeGlow {
  0%,
  100% {
    box-shadow:
      inset 0 0 0 5px rgba(255, 249, 226, 0.9),
      inset 0 0 0 8px currentColor,
      inset 0 -18px 36px rgba(79, 38, 12, 0.16),
      0 0 0 2px rgba(186, 96, 255, 0.18),
      0 0 15px rgba(174, 79, 255, 0.48),
      0 16px 34px rgba(75, 29, 112, 0.38);
  }

  50% {
    box-shadow:
      inset 0 0 0 5px rgba(255, 249, 226, 0.9),
      inset 0 0 0 8px currentColor,
      inset 0 -18px 36px rgba(79, 38, 12, 0.16),
      0 0 0 3px rgba(215, 142, 255, 0.34),
      0 0 28px rgba(199, 112, 255, 0.76),
      0 18px 42px rgba(92, 36, 138, 0.48);
  }
}

.class-card strong {
  position: relative;
  z-index: 2;
  max-width: calc(100% - 28px);
  color: #2c170a;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  line-height: 1;
}

.upgrade-card strong {
  align-self: center;
  display: grid;
  place-items: center;
  min-height: 44px;
  max-width: calc(100% - 24px);
  font-size: 22px;
  line-height: 0.98;
}

.upgrade-card__subtitle {
  display: block;
  margin-top: 3px;
  color: #713716 !important;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 12px !important;
  font-style: italic;
  line-height: 1 !important;
  text-align: center;
}

.class-card > span:not(.class-card__mark) {
  position: relative;
  z-index: 2;
  max-width: calc(100% - 44px);
  color: #5a3017;
  font-size: 13px;
  line-height: 1.35;
}

.upgrade-card > span:not(.class-card__mark) {
  align-self: start;
  display: grid;
  place-items: start center;
  min-height: 38px;
  max-width: calc(100% - 32px);
}

.controls {
  margin-top: 14px;
  color: #e7c17b;
  font-size: 12px;
  line-height: 1.4;
}

.mobile-controls {
  --mobile-control-hit-slop: 10px;
  --mobile-fire-visual-size: 92px;
  --move-stick-visual-size: 122px;
  position: fixed;
  inset: auto 0 0;
  z-index: 6;
  display: none;
  pointer-events: none;
}

#game-root.has-custom-controls .mobile-controls,
#game-root.is-layout-editing .mobile-controls {
  inset: 0;
}

#game-root.is-layout-editing .mobile-controls {
  z-index: 12;
  display: block;
}

.move-stick,
.mobile-fire {
  position: absolute;
  bottom: max(calc(22px - var(--mobile-control-hit-slop)), calc(env(safe-area-inset-bottom) - var(--mobile-control-hit-slop)));
  pointer-events: auto;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
}

#game-root.has-custom-controls .move-stick,
#game-root.is-layout-editing .move-stick,
#game-root.has-custom-controls .mobile-fire,
#game-root.is-layout-editing .mobile-fire {
  right: auto;
  bottom: auto;
  transform: translate(-50%, -50%);
}

#game-root.has-custom-controls .move-stick,
#game-root.is-layout-editing .move-stick {
  left: var(--move-stick-left);
  top: var(--move-stick-top);
}

#game-root.has-custom-controls .mobile-fire,
#game-root.is-layout-editing .mobile-fire {
  left: var(--mobile-fire-left);
  top: var(--mobile-fire-top);
}

#game-root.is-layout-editing .move-stick,
#game-root.is-layout-editing .mobile-fire {
  cursor: grab;
}

#game-root.is-layout-editing .move-stick.is-layout-dragging,
#game-root.is-layout-editing .mobile-fire.is-layout-dragging {
  cursor: grabbing;
  filter: brightness(1.14);
}

.move-stick {
  left: max(calc(18px - var(--mobile-control-hit-slop)), calc(env(safe-area-inset-left) - var(--mobile-control-hit-slop)));
  width: calc(var(--move-stick-visual-size) + var(--mobile-control-hit-slop) + var(--mobile-control-hit-slop));
  height: calc(var(--move-stick-visual-size) + var(--mobile-control-hit-slop) + var(--mobile-control-hit-slop));
  border: 0;
  border-radius: 50%;
  background: transparent;
}

.move-stick::before {
  position: absolute;
  z-index: 0;
  inset: var(--mobile-control-hit-slop);
  border: 1px solid rgba(255, 231, 176, 0.3);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, transparent 0 calc(50% - 28px), rgba(255, 227, 165, 0.18) calc(50% - 28px) calc(50% - 27px), transparent calc(50% - 27px)),
    radial-gradient(circle at 50% 50%, rgba(255, 215, 138, 0.2), rgba(52, 27, 12, 0.52) 68%),
    rgba(28, 16, 9, 0.38);
  box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.25), 0 12px 28px rgba(0, 0, 0, 0.28);
  content: "";
}

.move-stick::after {
  position: absolute;
  z-index: 0;
  inset: calc(var(--mobile-control-hit-slop) + 21px);
  border: 1px dashed rgba(255, 211, 107, 0.5);
  border-radius: 50%;
  content: "";
  opacity: 0.86;
  box-shadow: 0 0 12px rgba(255, 189, 76, 0.1);
  transition: border-color 120ms ease, box-shadow 120ms ease, opacity 120ms ease;
}

.move-stick.is-auto-run-ready::after,
.move-stick.is-auto-run::after {
  border-color: rgba(255, 241, 178, 0.94);
  opacity: 1;
  box-shadow:
    0 0 0 2px rgba(255, 211, 107, 0.1),
    0 0 18px rgba(255, 199, 92, 0.42);
}

.move-knob {
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(255, 244, 214, 0.45);
  border-radius: 50%;
  background: linear-gradient(145deg, #f0a348, #8b4f25);
  box-shadow: inset 0 -5px 0 rgba(0, 0, 0, 0.22), 0 8px 18px rgba(0, 0, 0, 0.32);
}

.mobile-fire {
  right: max(calc(22px - var(--mobile-control-hit-slop)), calc(env(safe-area-inset-right) - var(--mobile-control-hit-slop)));
  display: grid;
  place-items: center;
  width: calc(var(--mobile-fire-visual-size) + var(--mobile-control-hit-slop) + var(--mobile-control-hit-slop));
  height: calc(var(--mobile-fire-visual-size) + var(--mobile-control-hit-slop) + var(--mobile-control-hit-slop));
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #231207;
  font-size: 14px;
  isolation: isolate;
  line-height: 1;
  letter-spacing: 0;
}

.mobile-fire::before {
  position: absolute;
  z-index: -1;
  inset: var(--mobile-control-hit-slop);
  border: 2px solid rgba(255, 229, 173, 0.55);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 35%, #ffd166 0, #f08b36 42%, #7b281c 100%);
  box-shadow: inset 0 -8px 0 rgba(0, 0, 0, 0.22), 0 13px 30px rgba(0, 0, 0, 0.34);
  content: "";
}

.mobile-fire.is-pressed,
.move-stick.is-active .move-knob,
.move-stick.is-auto-run .move-knob {
  filter: brightness(1.12);
}

.move-stick.is-auto-run::before {
  border-color: rgba(255, 211, 107, 0.72);
  background:
    radial-gradient(circle at 50% 50%, transparent 0 calc(50% - 28px), rgba(255, 227, 165, 0.2) calc(50% - 28px) calc(50% - 27px), transparent calc(50% - 27px)),
    radial-gradient(circle at 50% 50%, rgba(255, 215, 138, 0.28), rgba(52, 27, 12, 0.56) 68%),
    rgba(28, 16, 9, 0.42);
}

.rotate-notice {
  position: fixed;
  inset: 0;
  z-index: 12;
  display: none;
  place-items: center;
  padding: 28px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 42%, rgba(240, 163, 72, 0.18), transparent 34%),
    rgba(26, 14, 8, 0.92);
  color: #ffe6ad;
}

.rotate-notice > * {
  grid-column: 1;
  grid-row: 1;
}

.rotate-notice strong {
  align-self: center;
  margin-top: 108px;
  font-size: 22px;
  line-height: 1;
}

.rotate-notice span {
  align-self: center;
  margin-top: 152px;
  color: #f4c987;
  font-size: 14px;
}

.rotate-device {
  width: 82px;
  height: 128px;
  border: 4px solid rgba(255, 229, 173, 0.78);
  border-radius: 18px;
  box-shadow: 0 0 0 1px rgba(82, 42, 18, 0.7), 0 18px 44px rgba(0, 0, 0, 0.45);
  transform: rotate(90deg);
}

.rotate-device::after {
  display: block;
  width: 24px;
  height: 4px;
  margin: 112px auto 0;
  border-radius: 999px;
  background: rgba(255, 229, 173, 0.65);
  content: "";
}

@media (max-width: 900px) {
  .menu-panel {
    left: 16px;
    width: min(424px, calc(100vw - 32px));
  }

  .menu-panel h1 {
    font-size: clamp(34px, 4.6vw, 44px);
  }
}

@media (max-width: 640px) {
  #game-root {
    --combat-hud-top: 10px;
    --combat-hud-right: 10px;
    --ammo-hud-width: 226px;
  }

  .menu-panel {
    top: auto;
    bottom: 16px;
    transform: none;
    padding: 18px;
    gap: 12px;
  }

  .menu-panel h1 {
    font-size: clamp(30px, 8vw, 44px);
  }

  .menu-panel__lead {
    font-size: 15px !important;
    line-height: 1.5 !important;
  }

  .menu-panel__actions #start-btn {
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
  }

  .menu-controls {
    letter-spacing: 0.05em;
  }

  .hud {
    top: 10px;
    left: 10px;
    padding: 10px;
  }

  .ammo-hud {
    grid-template-columns: 64px minmax(112px, 1fr);
    padding: 8px;
  }

  .pause-menu-btn {
    width: 42px;
    height: 42px;
    font-size: 21px;
  }

  .pause-menu__panel {
    padding: 20px;
  }

  .pause-menu h2 {
    font-size: clamp(28px, 9vw, 38px);
  }

  .control-layout-editor__bar {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .control-layout-editor__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .ammo-icon-frame {
    height: 48px;
  }

  .ammo-weapon-icon {
    width: 66px;
    height: 34px;
  }

  .ammo-readout strong {
    font-size: 23px;
  }

  .ammo-cartridge-rack {
    --round-w: 11px;
    --round-h: 29px;
    gap: 3px 4px;
  }

  .ammo-cartridge-rack[data-magazine="18"] {
    --round-w: 6px;
    --round-h: 20px;
    gap: 2px;
    min-height: 42px;
  }

  .ammo-cartridge-rack[data-magazine="12"] {
    --round-w: 8px;
    --round-h: 22px;
    min-height: 48px;
  }

  .ammo-cartridge-rack[data-magazine="3"] {
    --round-w: 16px;
    --round-h: 31px;
  }

.ammo-cartridge-rack[data-weapon="launcher"] {
    --round-w: 19px;
    --round-h: 32px;
    gap: 9px;
  }

  .ammo-cartridge-rack[data-weapon="launcher"][data-large-magazine="true"] {
    --round-w: 14px;
    --round-h: 25px;
    gap: 4px 6px;
    min-height: 54px;
  }

  .panel {
    bottom: 5vh;
  }

}

.ammo-cartridge-rack[data-weapon="coachGun"] {
  --ammo-cols: 2;
  --round-w: 20px;
  --round-h: 36px;
  gap: 14px;
}

.ammo-cartridge-rack[data-weapon="coachGun"] .ammo-round::before,
.ammo-cartridge-rack[data-weapon="coachGun"] .ammo-round-live {
  border-radius: 3px 3px 5px 5px;
  clip-path: polygon(17% 0, 83% 0, 90% 8%, 90% 79%, 100% 84%, 100% 96%, 88% 100%, 12% 100%, 0 96%, 0 84%, 10% 79%, 10% 8%);
}

.ammo-cartridge-rack[data-weapon="coachGun"] .ammo-round-live {
  background:
    linear-gradient(90deg, rgba(55, 3, 3, 0.82), rgba(255, 112, 74, 0.92) 34%, rgba(140, 17, 12, 0.96) 73%, rgba(45, 2, 2, 0.9)),
    linear-gradient(180deg, #d43826 0 72%, #d8a74a 72% 100%);
  box-shadow: inset 0 -8px 0 rgba(210, 158, 58, 0.92);
}

.ammo-cartridge-rack[data-weapon="coachGun"] .ammo-round-live::before {
  left: 12%;
  right: 12%;
  top: 0;
  height: 12%;
  border-radius: 50%;
  clip-path: none;
  background: linear-gradient(90deg, #8f140f, #ff8b66 42%, #7e0b08);
  box-shadow: inset 0 2px 0 rgba(255, 211, 180, 0.32);
}

.ammo-cartridge-rack[data-weapon="coachGun"] .ammo-round-live::after {
  left: 8%;
  right: 8%;
  bottom: 3%;
  height: 17%;
  border-radius: 1px 1px 50% 50%;
  background: linear-gradient(90deg, #765018, #f0cc70 45%, #7c4d14);
  box-shadow: inset 0 1px 0 rgba(255, 244, 187, 0.66);
}

@media (max-width: 520px) {
  .menu-panel {
    right: 16px;
    left: 16px;
    width: auto;
    padding: 16px;
  }

  .menu-panel__actions {
    gap: 8px;
  }

  .class-choice-panel {
    padding: 16px;
  }

  .class-options {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .class-card {
    grid-template-columns: 68px 1fr;
    grid-template-rows: auto auto;
    gap: 3px 10px;
    justify-items: start;
    min-height: 92px;
    padding: 14px 42px 14px 44px;
    text-align: left;
  }

  .upgrade-card {
    grid-template-columns: 68px 1fr;
    grid-template-rows: minmax(32px, auto) minmax(28px, auto);
    align-content: center;
    min-height: 98px;
    padding: 14px 42px 14px 44px;
  }

  .class-card::before,
  .class-card::after {
    width: 24px;
    font-size: 14px;
  }

  .class-card::before {
    top: 10px;
    left: 9px;
  }

  .class-card::after {
    right: 9px;
    bottom: 10px;
  }

  .class-card__mark {
    grid-row: 1 / 3;
    width: 64px;
    height: 52px;
    margin: 0;
  }

  .class-card__mark::before,
  .class-card__mark::after {
    width: 74px;
  }

  .class-card__weapon-icon {
    width: 60px;
    height: 34px;
  }

  .class-card__mark--dual .class-card__weapon-icon {
    width: 48px;
    height: 28px;
  }

  .class-card__weapon-icon--dual-left {
    transform: translate(-10px, 1px) rotate(-8deg);
  }

  .class-card__weapon-icon--dual-right {
    transform: translate(10px, -1px) rotate(8deg) scaleX(-1);
  }

  .class-card__weapon-icon--big-iron {
    width: 60px;
    height: 34px;
  }

  .upgrade-card .class-card__mark {
    grid-row: 1 / 3;
    width: 64px;
    height: 52px;
  }

  .upgrade-card__symbol {
    width: 44px;
    height: 36px;
  }

  .upgrade-card__icon {
    width: 42px;
    height: 36px;
  }

  .class-card strong {
    font-size: 18px;
  }

  .upgrade-card strong {
    justify-items: start;
    place-items: center start;
    min-height: 0;
    max-width: 100%;
    font-size: 18px;
  }

  .class-card > span:not(.class-card__mark) {
    font-size: 12px;
  }

  .upgrade-card > span:not(.class-card__mark) {
    place-items: start;
    min-height: 0;
    max-width: 100%;
  }
}

@media (hover: none), (pointer: coarse), (max-width: 760px) {
  #game-root.is-playing .mobile-controls {
    display: block;
  }

  #game-root.is-playing .hud {
    width: min(304px, calc(100vw - 20px));
    background: rgba(36, 22, 12, 0.4);
  }

  #game-root.is-playing .ammo-hud {
    background: rgba(28, 17, 9, 0.4);
  }

  .minimap {
    left: 50%;
    bottom: 0;
    width: 136px;
    padding: 13px 0 0;
    opacity: 0.54;
    transform: translateX(-50%);
  }

  .minimap-level-badge {
    padding: 3px 9px 4px;
    font-size: 9px;
  }

  .minimap-level-badge b {
    font-size: 12px;
  }

  .minimap-xp-frame {
    padding: 3px;
    border-radius: 8px;
  }

  .minimap-xp-frame::before {
    inset: 0;
    border-radius: inherit;
  }

  .minimap-xp-inner {
    padding: 7px;
    border-radius: 6px;
  }

  .xp-hud {
    left: 50%;
    bottom: max(8px, env(safe-area-inset-bottom));
    width: min(258px, calc(100vw - 184px));
    min-width: 206px;
    padding: 4px 6px 6px;
    transform: translateX(-50%);
  }

  .xp-hud__top {
    margin-bottom: 3px;
    font-size: 9px;
  }

  .xp-hud__top b {
    font-size: 11px;
  }

  .xp-frame {
    height: 15px;
    padding: 2px;
  }

  .xp-frame::before,
  .xp-frame::after {
    width: 8px;
    height: 19px;
  }

  .minimap-canvas {
    width: 116px;
    height: 82px;
  }

  .minimap-top {
    margin-bottom: 5px;
    font-size: 10px;
  }

  .class-card strong {
    font-size: 19px;
  }

  .class-card > span:not(.class-card__mark) {
    font-size: 12px;
  }
}

@media (max-width: 430px) {
  .mobile-controls {
    --mobile-control-hit-slop: 8px;
    --mobile-fire-visual-size: 82px;
    --move-stick-visual-size: 108px;
  }

  .move-knob {
    width: 48px;
    height: 48px;
  }

  .mobile-fire {
    font-size: 12px;
  }
}

@media (orientation: landscape) and (hover: none),
  (orientation: landscape) and (pointer: coarse),
  (orientation: landscape) and (max-width: 960px) and (max-height: 520px) {
  #game-root {
    --combat-hud-top: max(10px, env(safe-area-inset-top));
    --combat-hud-right: max(10px, env(safe-area-inset-right));
    --mobile-player-hud-width: clamp(220px, 24vw, 264px);
    --ammo-hud-width: clamp(186px, 20.5vw, 224px);
  }

  #game-root.is-playing .hud {
    top: var(--combat-hud-top);
    left: max(10px, env(safe-area-inset-left));
    width: var(--mobile-player-hud-width);
    padding: 8px;
  }

  .hud-row {
    gap: 7px;
  }

  .hud-label,
  .hud-grid span {
    font-size: 11px;
  }

  .hud-label b {
    font-size: 12px;
  }

  .hud-grid {
    gap: 4px;
    margin-top: 6px;
  }

  .hud-grid b {
    font-size: 14px;
  }

  .meter {
    height: 10px;
  }

  #game-root.is-playing .ammo-hud {
    grid-template-columns: 52px minmax(86px, 1fr);
    gap: 7px;
    padding: 8px;
  }

  .ammo-icon-frame {
    height: 46px;
  }

  .ammo-weapon-icon {
    width: 58px;
    height: 32px;
  }

  .ammo-hud.is-dual-hands-ammo .ammo-weapon-icon {
    width: 55px;
    height: 30px;
  }

  .ammo-readout {
    gap: 4px;
  }

  .ammo-readout span {
    font-size: 10px;
  }

  .ammo-cartridge-rack {
    --round-w: 11px;
    --round-h: 29px;
    gap: 3px 4px;
    min-height: 33px;
  }

  .boss-hud {
    top: max(58px, calc(env(safe-area-inset-top) + 52px));
    left: calc(50% + clamp(18px, 2.1vw, 22px));
    gap: 2px;
    width: clamp(300px, 43vw, 720px);
    max-width: calc(100vw - var(--mobile-player-hud-width) - var(--ammo-hud-width) - 28px);
  }

  #game-root.is-multiplayer-match .boss-hud {
    top: max(50px, calc(env(safe-area-inset-top) + 44px));
  }

  .boss-hud__heading {
    gap: 7px;
    padding: 0 7px;
  }

  .boss-hud__name {
    font-size: clamp(10px, 1.35vw, 14px);
    letter-spacing: 0.01em;
  }

  .boss-hud__frame {
    height: 18px;
    padding: 2px 6px 3px;
  }

  .boss-hud__status {
    min-height: 10px;
    padding: 1px 8px 2px;
    font-size: 8px;
  }
}

@media (orientation: landscape) and (max-width: 960px) and (max-height: 520px) {
  .multiplayer-event-history {
    top: calc(var(--combat-hud-top) + 92px);
    gap: 3px;
    width: min(214px, 31vw);
  }

  .multiplayer-event-history__header {
    gap: 5px;
    padding-right: 3px;
    font-size: 8px;
  }

  .multiplayer-event-history__entry {
    grid-template-columns: 6px minmax(0, 1fr) auto;
    gap: 6px;
    min-height: 27px;
    padding: 5px 7px;
    font-size: 9.5px;
  }

  .multiplayer-event-history__entry:nth-child(n + 4) {
    display: none;
  }

  .multiplayer-event-history__time {
    font-size: 8px;
  }

  .pause-menu {
    padding: max(10px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
  }

  .pause-menu__panel {
    width: min(520px, calc(100vw - 20px));
    max-height: calc(100dvh - 20px);
    overflow-x: hidden;
    overflow-y: auto;
    padding: 12px;
  }

  .pause-menu__close {
    top: 8px;
    right: 8px;
    width: 34px;
    height: 34px;
    font-size: 24px;
  }

  .pause-menu__view {
    gap: 9px;
    padding-top: 0;
  }

  .pause-menu h2 {
    margin: 0 42px 0 0;
    font-size: 26px;
  }

  .pause-menu__actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .pause-menu__actions button {
    min-width: 0;
    padding: 11px 12px;
    font-size: 12px;
  }

  #pause-main-panel .pause-menu__actions {
    grid-template-columns: 1fr;
  }

  .pause-volume {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
  }

  .pause-volume__control {
    gap: 5px;
  }

  .pause-volume__head {
    gap: 8px;
    font-size: 11px;
  }

  .pause-volume output {
    font-size: 13px;
  }

  .pause-volume input[type="range"] {
    height: 22px;
  }

  .pause-graphics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin: 6px 0 4px;
  }

  .pause-graphics__row {
    display: grid;
    align-content: space-between;
    justify-items: stretch;
    font-size: 11px;
    gap: 4px;
  }

  .pause-graphics__row:first-child {
    grid-column: 1 / -1;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    justify-items: end;
    gap: 8px;
  }

  .pause-graphics__options {
    width: 100%;
  }

  .pause-graphics__options button {
    flex: 1 1 auto;
    min-width: 52px;
    padding: 6px 9px;
    font-size: 11px;
  }

  .pause-menu__confirm {
    min-height: 0;
  }

  .pause-menu__confirm-actions {
    grid-template-columns: 1fr;
  }

  /* Landscape phones are the shipping form factor (the APK is orientation
     locked), so the whole summary is sized to land inside ~360px of height
     without a scrollbar. */
  #game-over.game-over-panel {
    width: min(700px, calc(100vw - 20px));
    max-height: calc(100dvh - 20px);
    padding: 10px 12px;
  }

  #game-over .game-over__eyebrow {
    display: none;
  }

  #game-over.game-over-panel h2 {
    margin-bottom: 2px;
    font-size: 22px;
  }

  #game-over .game-over__headline {
    margin-bottom: 6px;
    font-size: 8px;
  }

  .game-over__stat-grid {
    gap: 6px;
  }

  .game-over__stat {
    min-height: 44px;
    padding: 5px 7px;
  }

  .game-over__stat > span {
    font-size: 6.5px;
  }

  .game-over__stat strong {
    font-size: 17px;
  }

  .game-over__stat small,
  .game-over__stat em {
    font-size: 6px;
  }

  .game-over__milestones,
  .game-over__next-unlock {
    margin-top: 6px;
    padding: 6px 8px;
  }

  .game-over__milestones h3 {
    margin-bottom: 4px;
    font-size: 8px;
  }

  .game-over__milestone-list {
    gap: 4px 10px;
  }

  .game-over__milestone-list li {
    font-size: 9.5px;
  }

  #game-over .game-over__empty {
    font-size: 9px;
  }

  .game-over__next-unlock-head span {
    font-size: 7.5px;
  }

  .game-over__next-unlock-head strong {
    font-size: 10px;
  }

  .game-over__unlock-progress {
    height: 5px;
    margin-top: 5px;
  }

  #game-over .game-over__next-unlock p {
    margin-top: 4px;
    font-size: 7.5px;
  }

  .game-over__actions {
    margin-top: 6px;
    gap: 8px;
  }

  .game-over__actions button {
    min-height: 40px;
    padding: 9px 8px;
    font-size: 11px;
  }

  .menu-panel {
    top: 12px;
    bottom: auto;
    width: min(360px, calc(100vw - 24px));
    padding: 14px;
    transform: none;
  }

  .menu-panel h1 {
    font-size: 30px;
  }

  .menu-panel__lead {
    font-size: 13px !important;
  }

  .menu-controls {
    font-size: 10px;
  }

  .panel.class-choice-panel {
    width: min(620px, calc(100vw - 20px));
    max-height: calc(100dvh - 20px);
    overflow-y: hidden;
    padding: 12px 16px;
  }

  .panel.class-choice-panel h2 {
    margin-bottom: 5px;
    font-size: 28px;
  }

  .panel.class-choice-panel p {
    margin-bottom: 10px;
    font-size: 13px;
  }

  .class-options {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .class-options--classes {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .revolver-upgrade-panel .class-options,
  .rifle-upgrade-panel .class-options,
  .launcher-upgrade-panel .class-options,
  .marshal-upgrade-panel .class-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .level-up-options {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .class-card {
    grid-template-columns: none;
    grid-template-rows: 52px 26px 44px;
    gap: 6px;
    justify-items: center;
    min-height: 166px;
    padding: 24px 8px 16px;
    text-align: center;
  }

  .upgrade-card {
    grid-template-rows: 50px 30px minmax(36px, auto);
    min-height: 158px;
    padding: 20px 8px 14px;
  }

  .class-card::before,
  .class-card::after {
    width: 22px;
    font-size: 13px;
  }

  .class-card__mark {
    grid-row: auto;
    width: 76px;
    height: 48px;
  }

  .class-card__mark::before,
  .class-card__mark::after {
    width: 88px;
  }

  .class-card__weapon-icon {
    width: 70px;
    height: 34px;
  }

  .class-card__mark--dual .class-card__weapon-icon {
    width: 52px;
    height: 30px;
  }

  .class-card__weapon-icon--big-iron {
    width: 74px;
    height: 36px;
  }

  .upgrade-card .class-card__mark {
    width: 76px;
    height: 48px;
  }

  .upgrade-card__symbol {
    width: 50px;
    height: 34px;
  }

  .upgrade-card__icon {
    width: 46px;
    height: 34px;
  }

  .class-card strong {
    max-width: calc(100% - 18px);
    font-size: 16px;
  }

  .upgrade-card strong {
    min-height: 34px;
    max-width: calc(100% - 16px);
    font-size: 16px;
  }

  .class-card > span:not(.class-card__mark) {
    max-width: calc(100% - 18px);
    font-size: 11px;
  }

  .upgrade-card > span:not(.class-card__mark) {
    min-height: 34px;
    max-width: calc(100% - 16px);
    line-height: 1.2;
  }
}

@media (orientation: landscape) and (max-width: 760px) and (max-height: 400px) {
  .panel.class-choice-panel {
    padding: 10px 14px;
  }

  .panel.class-choice-panel h2 {
    margin-bottom: 4px;
    font-size: 25px;
  }

  .panel.class-choice-panel p {
    margin-bottom: 8px;
    font-size: 12px;
    line-height: 1.25;
  }

  .class-options {
    gap: 7px;
  }

  .class-card {
    grid-template-rows: 46px 23px minmax(38px, auto);
    gap: 5px;
    min-height: 148px;
    padding: 20px 8px 14px;
  }

  .upgrade-card {
    grid-template-rows: 44px 28px minmax(34px, auto);
    min-height: 142px;
    padding: 17px 8px 12px;
  }

  .class-card__mark,
  .upgrade-card .class-card__mark {
    width: 70px;
    height: 44px;
  }

  .class-card__weapon-icon {
    width: 64px;
    height: 31px;
  }

  .class-card__weapon-icon--big-iron {
    width: 68px;
    height: 32px;
  }

  .upgrade-card__symbol {
    width: 46px;
    height: 30px;
  }

  .upgrade-card__icon {
    width: 42px;
    height: 30px;
  }

  .class-card strong,
  .upgrade-card strong {
    font-size: 15px;
  }

  .class-card > span:not(.class-card__mark) {
    font-size: 10.5px;
    line-height: 1.25;
  }

  .upgrade-card > span:not(.class-card__mark) {
    min-height: 32px;
    font-size: 10.5px;
    line-height: 1.18;
  }
}

@media (max-width: 520px), (orientation: landscape) and (max-width: 960px) and (max-height: 520px) {
  .upgrade-card__icon * {
    vector-effect: none;
  }
}

.marshal-upgrade-panel .class-card__mark {
  width: 116px;
}

.marshal-upgrade-panel .class-card__weapon-icon {
  width: 106px;
  height: 50px;
}

@media (max-width: 760px), (orientation: landscape) and (max-width: 960px) and (max-height: 520px) {
  .marshal-upgrade-panel .class-card__mark {
    width: 88px;
  }

  .marshal-upgrade-panel .class-card__weapon-icon {
    width: 80px;
    height: 36px;
  }
}

@media (orientation: landscape) and (max-width: 760px) and (max-height: 400px) {
  .marshal-upgrade-panel .class-card__mark {
    width: 84px;
  }

  .marshal-upgrade-panel .class-card__weapon-icon {
    width: 78px;
    height: 34px;
  }
}

@media (orientation: portrait) and (max-width: 760px) {
  .rotate-notice {
    display: grid;
  }

  body.test-stand-active .rotate-notice {
    display: none;
  }
}

.test-stand-reroll {
  position: fixed;
  z-index: 120;
  top: max(12px, env(safe-area-inset-top));
  right: max(12px, env(safe-area-inset-right));
  min-height: 42px;
  padding: 9px 15px;
  border: 2px solid rgba(255, 226, 166, 0.88);
  border-radius: 8px;
  color: #fff0c8;
  background: rgba(55, 25, 13, 0.94);
  box-shadow: 0 5px 18px rgba(35, 12, 5, 0.38);
  font: 700 13px/1.1 Georgia, serif;
  letter-spacing: 0.035em;
  cursor: var(--cursor-frontier-default);
}

.test-stand-reroll:hover,
.test-stand-reroll:focus-visible {
  color: #3a190d;
  background: #ffe2a6;
  outline: none;
}

/* Local multiplayer ------------------------------------------------------- */

[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* One column, one shared right edge. Two-up rows used to squeeze the primary
   labels to 12px to keep them on one line, and the odd column widths left the
   music toggle stranded beside dead space. */
.menu-panel__play-actions {
  display: grid;
  flex: 1 1 auto;
  grid-template-columns: minmax(0, 1fr);
  gap: 9px;
  min-width: 0;
}

.menu-panel__actions #start-btn,
.menu-panel__actions #local-multiplayer-btn,
.menu-panel__actions #online-multiplayer-btn {
  width: 100%;
  min-width: 0;
  min-height: 52px;
  padding-right: 14px;
  padding-left: 14px;
  font-size: 15px;
  letter-spacing: 0.05em;
  text-wrap: balance;
}

/* Start Hunt is the one action every visitor wants; the rest read as a menu
   beneath it rather than as equals. */
.menu-panel__actions #start-btn {
  min-height: 58px;
  font-size: 17px;
}

/* Local play rides Nearby Connections, which only exists in the Android build.
   game.js sets this class whenever that plugin is missing, so a browser never
   offers a mode that cannot connect to anything. */
html.no-local-multiplayer #local-multiplayer-btn {
  display: none;
}

/* Android build only: the extra mode is one row too many for a short window,
   so the two offline entries share the first row. The browser keeps the calmer
   single column. */
html:not(.no-local-multiplayer) .menu-panel__play-actions {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

html:not(.no-local-multiplayer) .menu-panel__play-actions > #start-btn {
  grid-column: 1;
  font-size: 15px;
}

html:not(.no-local-multiplayer) .menu-panel__play-actions > #local-multiplayer-btn {
  grid-column: 2;
}

html:not(.no-local-multiplayer) .menu-panel__play-actions > #online-multiplayer-btn,
html:not(.no-local-multiplayer) .menu-panel__play-actions > .menu-contracts-btn {
  grid-column: 1 / -1;
}

.multiplayer-button--secondary,
.multiplayer-button--quiet {
  border-color: rgba(255, 226, 170, 0.32);
  background:
    linear-gradient(180deg, rgba(111, 67, 35, 0.96), rgba(57, 32, 17, 0.98));
  color: #ffe7b5;
  box-shadow:
    inset 0 1px 0 rgba(255, 245, 211, 0.16),
    inset 0 -3px 0 rgba(17, 8, 4, 0.32),
    0 9px 22px rgba(0, 0, 0, 0.24);
}

.multiplayer-button--secondary:hover,
.multiplayer-button--secondary:focus-visible,
.multiplayer-button--quiet:hover,
.multiplayer-button--quiet:focus-visible {
  background:
    linear-gradient(180deg, rgba(142, 88, 46, 0.98), rgba(75, 41, 21, 0.98));
}

.multiplayer-button--danger {
  border-color: rgba(255, 193, 150, 0.46);
  background:
    linear-gradient(180deg, #e99158, #a6422d 58%, #5e241c);
  color: #fff4da;
}

.multiplayer-button--danger:hover,
.multiplayer-button--danger:focus-visible {
  background:
    linear-gradient(180deg, #ffac6e, #c25438 58%, #7b3022);
}

.multiplayer-eyebrow {
  display: block;
  margin-bottom: 6px;
  color: #e7b966;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.13em;
  line-height: 1;
  text-transform: uppercase;
}

.multiplayer-lobby {
  top: 50%;
  bottom: auto;
  z-index: 8;
  width: min(800px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  overflow: auto;
  transform: translate(-50%, -50%);
  padding: clamp(18px, 2.5vw, 26px);
  border-color: rgba(255, 224, 164, 0.38);
  border-radius: 20px;
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 198, 103, 0.13), transparent 30%),
    linear-gradient(155deg, rgba(72, 38, 19, 0.97), rgba(20, 12, 7, 0.98));
  box-shadow:
    0 28px 90px rgba(0, 0, 0, 0.58),
    inset 0 1px 0 rgba(255, 241, 211, 0.1);
  backdrop-filter: blur(14px);
}

.multiplayer-lobby.is-visible {
  display: grid;
  gap: 16px;
}

.multiplayer-lobby__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.multiplayer-lobby h2 {
  margin: 0;
  font-size: clamp(32px, 5vw, 46px);
}

.multiplayer-lobby__header p {
  max-width: 58ch;
  margin: 7px 0 0;
  color: rgba(255, 231, 189, 0.82);
  font-size: 13px;
  line-height: 1.4;
}

.multiplayer-nearby-badge {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  padding: 8px 11px;
  border: 1px solid rgba(255, 222, 154, 0.25);
  border-radius: 999px;
  background: rgba(25, 15, 8, 0.55);
  color: #f9d58e;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.multiplayer-nearby-badge > span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #7fe095;
  box-shadow: 0 0 0 3px rgba(81, 187, 109, 0.14), 0 0 12px rgba(93, 223, 127, 0.55);
}

.multiplayer-lobby__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr);
  gap: 12px;
  min-width: 0;
}

.multiplayer-lobby__card {
  display: grid;
  align-content: start;
  gap: 11px;
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(255, 226, 173, 0.2);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 234, 195, 0.06), transparent 38%),
    rgba(18, 11, 7, 0.56);
  box-shadow: inset 0 1px 0 rgba(255, 245, 219, 0.04);
}

.multiplayer-lobby__section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.multiplayer-lobby__section-title h3 {
  margin: 0;
  color: #ffe1a1;
  font: 800 18px/1.1 var(--font-title);
  letter-spacing: 0.02em;
}

.multiplayer-lobby__section-title > span {
  color: rgba(239, 197, 123, 0.8);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.multiplayer-name-field {
  display: grid;
  gap: 6px;
  color: #eac583;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.multiplayer-name-field input {
  width: 100%;
  height: 42px;
  min-width: 0;
  padding: 0 12px;
  border: 1px solid rgba(255, 226, 173, 0.28);
  border-radius: 8px;
  outline: 0;
  background: rgba(8, 5, 3, 0.55);
  color: #fff5dc;
  font: 800 15px/1 var(--font-ui);
  letter-spacing: 0.02em;
  user-select: text;
  touch-action: manipulation;
  -webkit-user-select: text;
}

.multiplayer-name-field input:focus-visible {
  border-color: #ffd783;
  outline: 2px solid #ffe3a5;
  outline-offset: 2px;
  background: rgba(12, 8, 4, 0.76);
}

.online-search-code-field > span {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.online-search-code-field > span small {
  color: rgba(234, 197, 131, 0.6);
  font-size: 8px;
  letter-spacing: 0.08em;
}

.online-search-code-field input {
  font-family: Consolas, "Courier New", monospace;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.online-search-code-help,
.online-room-help {
  margin: -2px 0 0 !important;
  color: rgba(232, 202, 151, 0.68) !important;
  font-size: 10px !important;
  line-height: 1.4 !important;
}

.online-matchmaking-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.online-matchmaking-actions button {
  width: 100%;
  min-width: 0;
  padding: 12px 10px;
  font-size: 11px;
}

.online-multiplayer-badge > span {
  background: #63c7ff;
  box-shadow: 0 0 0 3px rgba(73, 166, 226, 0.16), 0 0 12px rgba(99, 199, 255, 0.58);
}

.online-multiplayer-lobby.is-searching .online-multiplayer-badge > span,
.online-multiplayer-lobby.is-reconnecting .online-multiplayer-badge > span {
  animation: online-status-pulse 1.2s ease-in-out infinite;
}

.online-multiplayer-lobby.is-error .online-multiplayer-badge > span {
  background: #f67e64;
  box-shadow: 0 0 12px rgba(246, 87, 65, 0.55);
}

@keyframes online-status-pulse {
  0%, 100% { opacity: 0.55; transform: scale(0.82); }
  50% { opacity: 1; transform: scale(1); }
}

.multiplayer-connect-actions,
.multiplayer-room-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.multiplayer-connect-actions button,
.multiplayer-room-actions button,
.multiplayer-button--wide {
  min-width: 0;
  padding: 12px 10px;
  font-size: 11px;
}

.multiplayer-button--wide {
  width: 100%;
}

.multiplayer-session-list-wrap {
  min-width: 0;
}

.multiplayer-session-list,
.multiplayer-player-list {
  display: grid;
  align-content: start;
  gap: 6px;
  min-height: 104px;
  max-height: 144px;
  margin: 0;
  padding: 6px;
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid rgba(255, 226, 173, 0.16);
  border-radius: 9px;
  background: rgba(6, 4, 2, 0.38);
  list-style: none;
  overscroll-behavior: contain;
  scrollbar-color: rgba(220, 153, 72, 0.72) rgba(15, 9, 5, 0.5);
  touch-action: pan-y;
}

.multiplayer-player-list {
  min-height: 126px;
}

.multiplayer-list-empty {
  display: grid;
  place-items: center;
  min-height: 88px;
  padding: 12px;
  color: rgba(228, 194, 135, 0.66);
  font-size: 11px;
  line-height: 1.4;
  text-align: center;
}

.multiplayer-session-row {
  width: 100%;
  min-width: 0;
}

.multiplayer-session-row__select {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  width: 100%;
  min-height: 48px;
  padding: 7px 10px;
  border-color: transparent;
  border-radius: 7px;
  background: rgba(255, 240, 209, 0.055);
  color: #ffebc1;
  box-shadow: none;
  font-size: 12px;
  letter-spacing: 0;
  text-align: left;
  text-transform: none;
}

.multiplayer-session-row__select:hover,
.multiplayer-session-row__select:focus-visible,
.multiplayer-session-row__select[aria-pressed="true"],
.multiplayer-session-row.is-selected .multiplayer-session-row__select {
  border-color: rgba(255, 211, 126, 0.5);
  background: rgba(207, 125, 49, 0.2);
}

.multiplayer-session-row__signal {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #75d88b;
  box-shadow: 0 0 9px rgba(90, 220, 119, 0.48);
}

.multiplayer-session-row__details {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.multiplayer-session-row__name,
.multiplayer-session-row__host {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.multiplayer-session-row__name {
  color: #fff0cc;
  font-size: 12px;
}

.multiplayer-session-row__host,
.multiplayer-session-row__capacity {
  color: rgba(231, 193, 126, 0.72);
  font-size: 10px;
  font-weight: 800;
}

.multiplayer-player-row {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  min-height: 42px;
  padding: 7px 9px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: rgba(255, 240, 209, 0.055);
}

.multiplayer-player-row.is-local {
  border-color: rgba(255, 205, 112, 0.34);
  background: rgba(207, 125, 49, 0.14);
}

.multiplayer-player-row__marker,
.multiplayer-score-row__marker {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--player-color, #d59a50);
  box-shadow: 0 0 8px color-mix(in srgb, var(--player-color, #d59a50) 60%, transparent);
}

.multiplayer-player-row__name {
  overflow: hidden;
  color: #fff0cb;
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.multiplayer-player-row__state {
  color: rgba(234, 197, 130, 0.7);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.multiplayer-player-row.is-ready .multiplayer-player-row__state {
  color: #83e09a;
}

.multiplayer-player-row.is-disconnected {
  opacity: 0.52;
}

.multiplayer-player-row.is-auto-ready .multiplayer-player-row__state::before {
  content: "\231B ";
}

.online-room-actions {
  grid-template-columns: 1fr;
}

.online-multiplayer-region {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 10px;
  margin: 0;
  padding: 6px 10px;
  border: 1px solid rgba(120, 176, 214, 0.26);
  border-radius: 9px;
  background: rgba(46, 92, 122, 0.16);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.online-multiplayer-region[hidden] {
  display: none;
}

.online-multiplayer-region__label {
  color: rgba(190, 220, 240, 0.68);
}

.online-multiplayer-region__value {
  color: #cfe7f8;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

/* A pinned region was forced by a search code rather than won on latency. */
.online-multiplayer-region__value.is-pinned {
  color: #f7d391;
}

.online-multiplayer-countdown {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 7px;
  align-items: baseline;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 205, 112, 0.3);
  border-radius: 9px;
  background: rgba(207, 125, 49, 0.13);
  color: #f7d391;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.online-multiplayer-countdown[hidden] {
  display: none;
}

.online-multiplayer-countdown strong {
  color: #fff2cf;
  font: 900 24px/1 var(--font-title);
  font-variant-numeric: tabular-nums;
}

.online-multiplayer-countdown small {
  color: rgba(247, 211, 145, 0.72);
  font-size: 8px;
}

.multiplayer-connection-code {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px dashed rgba(255, 216, 143, 0.24);
  border-radius: 8px;
  background: rgba(7, 4, 2, 0.3);
  color: rgba(232, 194, 128, 0.72);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.multiplayer-connection-code output {
  color: #ffe5aa;
  font: 900 14px/1 Consolas, "Courier New", monospace;
  letter-spacing: 0.16em;
}

.multiplayer-lobby__status {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-height: 34px;
  margin: 0 !important;
  padding: 8px 9px;
  border-radius: 8px;
  background: rgba(226, 158, 72, 0.08);
  color: rgba(255, 225, 173, 0.78) !important;
  font-size: 10px !important;
  line-height: 1.35 !important;
}

.multiplayer-lobby__status-dot {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  margin-top: 3px;
  border-radius: 50%;
  background: #d7a057;
  box-shadow: 0 0 8px rgba(215, 160, 87, 0.42);
}

.multiplayer-lobby__status.is-connected .multiplayer-lobby__status-dot {
  background: #7fe095;
  box-shadow: 0 0 8px rgba(93, 223, 127, 0.55);
}

.multiplayer-lobby__status.is-error .multiplayer-lobby__status-dot {
  background: #f67e64;
  box-shadow: 0 0 8px rgba(246, 87, 65, 0.5);
}

.multiplayer-lobby__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.multiplayer-lobby__footer button {
  flex: 0 0 auto;
  min-height: 42px;
  padding: 11px 20px;
  font-size: 11px;
}

.multiplayer-lobby__footer > span {
  color: rgba(226, 190, 127, 0.62);
  font-size: 10px;
  line-height: 1.35;
  text-align: right;
}

.multiplayer-scoreboard-toggle {
  position: fixed;
  top: max(12px, env(safe-area-inset-top));
  left: 50%;
  z-index: 8;
  display: grid;
  grid-auto-flow: column;
  place-items: center;
  gap: 7px;
  min-width: 94px;
  height: 44px;
  padding: 0 13px;
  transform: translateX(-50%);
  border-radius: 8px;
  font-size: 11px;
  line-height: 1;
  transition: filter 150ms ease, opacity 150ms ease;
}

.multiplayer-scoreboard-toggle__icon {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 1px solid rgba(61, 27, 9, 0.28);
  border-radius: 5px;
  font: 900 13px/1 Georgia, serif;
}

.multiplayer-scoreboard-toggle[aria-expanded="true"] {
  filter: brightness(1.13);
}

#game-root.is-paused .multiplayer-scoreboard-toggle {
  opacity: 0;
  pointer-events: none;
}

.multiplayer-scoreboard {
  position: fixed;
  top: max(64px, calc(env(safe-area-inset-top) + 52px));
  left: 50%;
  z-index: 7;
  display: block;
  width: min(430px, calc(100vw - 24px));
  max-height: calc(100dvh - max(76px, calc(env(safe-area-inset-top) + 64px)));
  overflow: hidden auto;
  transform: translate(-50%, calc(-100% - 80px));
  padding: 13px;
  border: 1px solid rgba(255, 223, 163, 0.36);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(74, 40, 20, 0.97), rgba(19, 12, 7, 0.98));
  box-shadow:
    0 24px 72px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 242, 213, 0.08);
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition:
    transform 240ms cubic-bezier(0.2, 0.8, 0.2, 1),
    opacity 180ms ease,
    visibility 0s linear 240ms;
  backdrop-filter: blur(10px);
  overscroll-behavior: contain;
  touch-action: pan-y;
}

.multiplayer-scoreboard.is-open,
.multiplayer-scoreboard.is-visible {
  transform: translate(-50%, 0);
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  transition-delay: 0s;
}

.multiplayer-scoreboard__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}

.multiplayer-scoreboard h2 {
  margin: 0;
  color: #ffe2a3;
  font: 800 25px/1 var(--font-title);
}

.multiplayer-scoreboard__status {
  max-width: 15ch;
  padding: 5px 8px;
  border: 1px solid rgba(255, 225, 167, 0.18);
  border-radius: 999px;
  background: rgba(13, 8, 5, 0.42);
  color: #e9c47e;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.05em;
  line-height: 1.2;
  text-align: right;
  text-transform: uppercase;
}

.multiplayer-scoreboard__table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(255, 225, 167, 0.16);
  border-radius: 8px;
  background: rgba(7, 4, 2, 0.32);
}

.multiplayer-scoreboard table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.multiplayer-scoreboard th,
.multiplayer-scoreboard td {
  padding: 8px 7px;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 226, 173, 0.1);
  color: #fce5b8;
  font-size: 11px;
  line-height: 1.2;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.multiplayer-scoreboard thead th {
  color: rgba(236, 197, 127, 0.72);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.multiplayer-scoreboard th:first-child,
.multiplayer-scoreboard td:first-child {
  width: 34px;
  text-align: center;
}

.multiplayer-scoreboard th:nth-child(3),
.multiplayer-scoreboard td:nth-child(3) {
  width: 62px;
  color: #ffe08b;
  font-weight: 900;
  text-align: right;
}

.multiplayer-scoreboard th:last-child,
.multiplayer-scoreboard td:last-child {
  width: 76px;
  text-align: right;
}

.multiplayer-scoreboard tbody tr:last-child > * {
  border-bottom: 0;
}

.multiplayer-score-row__player {
  font-weight: 800;
}

.multiplayer-score-row__player > span {
  display: inline-block;
  vertical-align: middle;
}

.multiplayer-score-row__marker {
  margin-right: 6px;
}

.multiplayer-score-row.is-local > * {
  background: rgba(221, 143, 59, 0.1);
}

.multiplayer-score-row.is-leader .multiplayer-score-row__place {
  color: #ffd56f;
  font-weight: 900;
}

.multiplayer-score-row.is-dead .multiplayer-score-row__state,
.multiplayer-score-row.is-surrendered .multiplayer-score-row__state {
  color: #ef9276;
}

.multiplayer-score-row.is-surrendered {
  opacity: 0.54;
}

.multiplayer-scoreboard__empty td {
  height: 54px;
  color: rgba(232, 194, 130, 0.6);
  text-align: center !important;
}

.multiplayer-scoreboard__rule {
  margin: 9px 2px 0;
  color: rgba(230, 193, 128, 0.66);
  font-size: 9px;
  line-height: 1.35;
  text-align: center;
}

.multiplayer-death-panel,
.multiplayer-result-panel {
  top: 50%;
  bottom: auto;
  z-index: 9;
  display: none;
  width: min(480px, calc(100vw - 32px));
  transform: translate(-50%, -50%);
  padding: clamp(20px, 3vw, 28px);
  border-color: rgba(255, 202, 146, 0.46);
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 0%, rgba(225, 92, 51, 0.16), transparent 34%),
    linear-gradient(160deg, rgba(76, 32, 20, 0.98), rgba(20, 10, 7, 0.99));
  box-shadow:
    0 0 0 100vmax rgba(7, 4, 3, 0.68),
    0 28px 90px rgba(0, 0, 0, 0.65),
    inset 0 1px 0 rgba(255, 237, 204, 0.1);
  text-align: center;
  backdrop-filter: blur(10px);
}

.multiplayer-death-panel.is-visible,
.multiplayer-result-panel.is-visible {
  display: grid;
  gap: 13px;
}

.multiplayer-death-panel.is-respawning {
  min-height: 180px;
  overflow: hidden;
  border-color: rgba(255, 200, 96, 0.46);
  background:
    radial-gradient(circle at 50% 48%, rgba(199, 131, 35, 0.16), transparent 42%),
    linear-gradient(160deg, #1a1008, #070403);
  box-shadow:
    0 0 0 100vmax #070403,
    0 28px 90px rgba(0, 0, 0, 0.72),
    inset 0 1px 0 rgba(255, 230, 172, 0.12);
}

.multiplayer-death-panel.is-respawning > * {
  visibility: hidden;
}

.multiplayer-death-panel.is-respawning::after {
  content: attr(data-respawn-label);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 28px;
  color: #f6cf80;
  font-size: clamp(15px, 3vw, 20px);
  font-weight: 900;
  line-height: 1.7;
  letter-spacing: 0.1em;
  text-align: center;
  text-shadow: 0 0 24px rgba(238, 166, 65, 0.28);
  white-space: pre-line;
  animation: multiplayer-respawn-pulse 0.9s ease-in-out infinite alternate;
}

@keyframes multiplayer-respawn-pulse {
  from { opacity: 0.7; transform: scale(0.985); }
  to { opacity: 1; transform: scale(1); }
}

.multiplayer-death-panel .multiplayer-eyebrow,
.multiplayer-result-panel .multiplayer-eyebrow {
  margin: 0;
  color: #f19a6a;
}

.multiplayer-death-panel h2,
.multiplayer-result-panel h2 {
  margin: 0;
  font-size: clamp(30px, 6vw, 42px);
}

.multiplayer-death-panel > p,
.multiplayer-result-panel > p {
  max-width: 43ch;
  margin: 0 auto;
  color: rgba(248, 216, 170, 0.8);
  font-size: 13px;
}

.multiplayer-death-panel__score {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 42px;
  padding: 8px 13px;
  border: 1px solid rgba(255, 222, 164, 0.2);
  border-radius: 9px;
  background: rgba(7, 4, 2, 0.34);
  color: #e8bf79;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.multiplayer-death-panel__score strong {
  color: #ffe28e;
  font-size: 22px;
  letter-spacing: 0;
}

.multiplayer-death-panel__timer {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 7px 12px;
  border: 1px solid rgba(241, 125, 86, 0.28);
  border-radius: 9px;
  background: rgba(79, 24, 15, 0.3);
  color: rgba(248, 207, 158, 0.82);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.multiplayer-death-panel__timer strong {
  min-width: 2ch;
  color: #ffb071;
  font-size: 24px;
  line-height: 1;
  letter-spacing: 0;
  text-shadow: 0 0 14px rgba(239, 91, 52, 0.4);
}

.multiplayer-death-panel__actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.multiplayer-death-panel__actions button {
  display: grid;
  place-items: center;
  gap: 5px;
  min-width: 0;
  min-height: 68px;
  padding: 11px 12px;
}

.multiplayer-death-panel__actions button > span {
  font-size: 14px;
}

.multiplayer-death-panel__actions button small {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.05em;
  line-height: 1.15;
}

.multiplayer-death-panel__actions button small strong {
  font-size: 13px;
}

.multiplayer-result-panel {
  max-height: calc(100dvh - 24px);
  overflow: hidden auto;
  border-color: rgba(255, 218, 142, 0.5);
  background:
    radial-gradient(circle at 50% 0%, rgba(226, 163, 58, 0.18), transparent 36%),
    linear-gradient(160deg, rgba(68, 43, 18, 0.98), rgba(18, 11, 6, 0.99));
}

.multiplayer-result-panel .multiplayer-eyebrow {
  color: #f5c76d;
}

.multiplayer-final-results {
  overflow: hidden auto;
  border: 1px solid rgba(255, 224, 165, 0.2);
  border-radius: 10px;
  background: rgba(7, 4, 2, 0.34);
}

.multiplayer-final-results table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.multiplayer-final-results th,
.multiplayer-final-results td {
  padding: 8px 7px;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 226, 173, 0.1);
  color: #fce5b8;
  font-size: 11px;
  line-height: 1.2;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.multiplayer-final-results thead th {
  color: rgba(236, 197, 127, 0.72);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.multiplayer-final-results th:first-child,
.multiplayer-final-results td:first-child {
  width: 32px;
  text-align: center;
}

.multiplayer-final-results th:nth-child(3),
.multiplayer-final-results td:nth-child(3) {
  width: 58px;
  color: #ffe08b;
  font-weight: 900;
  text-align: right;
}

.multiplayer-final-results th:last-child,
.multiplayer-final-results td:last-child {
  width: 78px;
  text-align: right;
}

.multiplayer-final-results tbody tr:last-child > * {
  border-bottom: 0;
}

.multiplayer-final-results tbody th {
  font-weight: 800;
}

.multiplayer-final-results tr.is-local > * {
  background: rgba(221, 143, 59, 0.1);
}

.multiplayer-final-results tr.is-winner > * {
  color: #ffe08b;
}

.multiplayer-result-panel__actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 3px;
}

.multiplayer-result-panel__actions button {
  display: grid;
  place-items: center;
  gap: 5px;
  min-width: 0;
  min-height: 68px;
  padding: 11px 12px;
}

.multiplayer-result-panel__actions button > span {
  font-size: 13px;
}

.multiplayer-result-panel__actions button small {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.2;
}

@media (max-width: 640px) {
  .menu-panel__play-actions {
    gap: 8px;
  }

  .menu-panel__actions #start-btn,
  .menu-panel__actions #local-multiplayer-btn,
  .menu-panel__actions #online-multiplayer-btn {
    min-height: 46px;
    font-size: 14px;
  }

  .menu-panel__actions #start-btn {
    min-height: 50px;
    font-size: 15px;
  }

  .menu-music-btn {
    width: 40px;
    height: 40px;
    min-height: 40px;
    font-size: 18px;
  }

  .multiplayer-lobby {
    width: calc(100vw - 20px);
    max-height: calc(100dvh - 20px);
    padding: 15px;
  }

  .multiplayer-lobby__grid {
    grid-template-columns: 1fr;
  }

  .multiplayer-lobby__footer > span {
    display: none;
  }
}

@media (orientation: landscape) and (max-width: 960px) and (max-height: 520px) {
  .menu-panel__play-actions {
    gap: 7px;
  }

  .menu-panel__actions #start-btn,
  .menu-panel__actions #local-multiplayer-btn,
  .menu-panel__actions #online-multiplayer-btn {
    min-height: 38px;
    padding: 8px 10px;
    font-size: 12px;
    letter-spacing: 0.04em;
  }

  .menu-panel__actions #start-btn {
    min-height: 42px;
    font-size: 13px;
  }

  .menu-music-btn {
    width: 36px;
    height: 36px;
    min-height: 36px;
    font-size: 16px;
  }

  .multiplayer-lobby {
    width: min(820px, calc(100vw - 20px));
    max-height: calc(100dvh - 20px);
    padding: 12px 14px;
    border-radius: 14px;
  }

  .multiplayer-lobby.is-visible {
    gap: 8px;
  }

  .multiplayer-lobby__header {
    align-items: center;
  }

  .multiplayer-lobby__header p {
    display: none;
  }

  .multiplayer-lobby h2 {
    font-size: 27px;
  }

  .multiplayer-eyebrow {
    margin-bottom: 4px;
    font-size: 9px;
  }

  .multiplayer-nearby-badge {
    padding: 6px 9px;
    font-size: 9px;
  }

  .multiplayer-lobby__grid {
    grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr);
    gap: 8px;
  }

  .multiplayer-lobby__card {
    gap: 7px;
    padding: 9px;
  }

  .multiplayer-lobby__section-title h3 {
    font-size: 15px;
  }

  .multiplayer-name-field {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px;
    align-items: center;
  }

  .multiplayer-name-field input {
    height: 34px;
    font-size: 13px;
  }

  .online-search-code-help,
  .online-room-help {
    font-size: 8px !important;
    line-height: 1.25 !important;
  }

  .online-multiplayer-countdown {
    min-height: 30px;
    padding: 5px 8px;
    font-size: 8px;
  }

  .online-multiplayer-countdown strong {
    font-size: 18px;
  }

  .multiplayer-connect-actions button,
  .multiplayer-room-actions button,
  .multiplayer-button--wide {
    min-height: 34px;
    padding: 8px 7px;
    font-size: 9px;
  }

  .multiplayer-session-list,
  .multiplayer-player-list {
    min-height: 64px;
    max-height: 74px;
    padding: 4px;
  }

  .multiplayer-list-empty {
    min-height: 54px;
    padding: 7px;
    font-size: 9px;
  }

  .multiplayer-session-row__select,
  .multiplayer-player-row {
    min-height: 38px;
    padding: 5px 7px;
  }

  .multiplayer-connection-code {
    min-height: 28px;
    padding: 4px 8px;
  }

  .multiplayer-connection-code output {
    font-size: 12px;
  }

  .multiplayer-lobby__status {
    min-height: 28px;
    padding: 6px 8px;
    font-size: 9px !important;
  }

  .multiplayer-lobby__footer button {
    min-height: 34px;
    padding: 8px 16px;
    font-size: 9px;
  }

  .multiplayer-lobby__footer > span {
    font-size: 8px;
  }

  .multiplayer-scoreboard-toggle {
    top: max(8px, env(safe-area-inset-top));
    min-width: 76px;
    height: 38px;
    padding: 0 9px;
    font-size: 9px;
  }

  .multiplayer-scoreboard {
    top: max(52px, calc(env(safe-area-inset-top) + 44px));
    width: min(410px, calc(100vw - 20px));
    max-height: calc(100dvh - max(62px, calc(env(safe-area-inset-top) + 54px)));
    padding: 10px;
  }

  .multiplayer-scoreboard__header {
    margin-bottom: 7px;
  }

  .multiplayer-scoreboard h2 {
    font-size: 20px;
  }

  .multiplayer-scoreboard th,
  .multiplayer-scoreboard td {
    padding: 6px;
    font-size: 10px;
  }

  .multiplayer-scoreboard__rule {
    margin-top: 6px;
  }

  .multiplayer-death-panel {
    width: min(580px, calc(100vw - 24px));
    max-height: calc(100dvh - 20px);
    overflow-y: auto;
    padding: 16px 20px;
  }

  .multiplayer-death-panel.is-visible {
    gap: 8px;
  }

  .multiplayer-death-panel h2 {
    font-size: 30px;
  }

  .multiplayer-death-panel > p {
    font-size: 11px;
  }

  .multiplayer-death-panel__score {
    min-height: 34px;
    padding: 5px 10px;
  }

  .multiplayer-death-panel__score strong {
    font-size: 18px;
  }

  .multiplayer-death-panel__actions button {
    min-height: 54px;
    padding: 8px 10px;
  }
}

@media (orientation: landscape) and (max-width: 760px) and (max-height: 400px) {
  .multiplayer-lobby__footer > span,
  .multiplayer-scoreboard-toggle__label {
    display: none;
  }

  .multiplayer-scoreboard-toggle {
    min-width: 40px;
    width: 40px;
    padding: 0;
  }

  .multiplayer-death-panel__actions button {
    min-height: 48px;
  }
}

@media (orientation: landscape) and (max-width: 520px) {
  .multiplayer-lobby__grid {
    grid-template-columns: 1fr;
  }
}

@media (orientation: landscape) and (max-width: 600px) and (max-height: 520px) {
  .progression-wallet {
    flex-direction: column;
    width: 92px;
  }

  .progression-wallet__currency,
  .progression-wallet__currency--contracts {
    grid-template-columns: 25px minmax(0, 1fr);
    gap: 6px;
    width: 100%;
    min-width: 0;
    padding: 5px 7px 5px 5px;
  }

  .progression-wallet__divider {
    align-self: stretch;
    width: auto;
    height: 1px;
    margin: 0 6px;
    background: linear-gradient(90deg, transparent, rgba(255, 225, 169, 0.34), transparent);
  }

  .progression-wallet__icon {
    width: 25px;
    height: 25px;
  }

  .progression-wallet__icon svg {
    width: 21px;
    height: 21px;
  }
}

@media (orientation: landscape) and (max-width: 520px) and (max-height: 520px) {
  .menu-panel {
    width: min(306px, calc(100vw - 112px));
  }
}

@media (prefers-reduced-motion: reduce) {
  .multiplayer-event-history__entry {
    animation: none;
  }

  .multiplayer-scoreboard {
    transition-duration: 0s;
  }
}

/* Non-pausing local multiplayer upgrades -------------------------------- */

.multiplayer-upgrade-toggle {
  position: fixed;
  top: max(96px, calc(env(safe-area-inset-top) + 80px));
  left: max(16px, env(safe-area-inset-left));
  z-index: 8;
  display: grid;
  grid-template-columns: 24px minmax(0, auto) 22px;
  place-items: center;
  gap: 7px;
  min-width: 126px;
  height: 44px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 10px;
  line-height: 1;
  transition:
    filter 150ms ease,
    opacity 150ms ease,
    transform 150ms ease;
}

.multiplayer-upgrade-toggle__icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(66, 29, 7, 0.26);
  border-radius: 7px;
  background: rgba(255, 239, 190, 0.26);
  font: 900 17px/1 Georgia, serif;
}

.multiplayer-upgrade-toggle__label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.multiplayer-upgrade-toggle__badge {
  display: grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  border: 1px solid rgba(89, 34, 13, 0.42);
  border-radius: 999px;
  background: #8f3524;
  color: #fff4da;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  box-shadow:
    inset 0 1px 0 rgba(255, 242, 208, 0.24),
    0 0 10px rgba(190, 64, 37, 0.36);
}

.multiplayer-upgrade-toggle__badge[data-count="0"] {
  background: rgba(82, 53, 30, 0.72);
  color: rgba(255, 233, 191, 0.68);
  box-shadow: none;
}

.multiplayer-upgrade-toggle.has-pending .multiplayer-upgrade-toggle__badge {
  animation: multiplayerUpgradeBadgePulse 1.4s ease-in-out infinite;
}

.multiplayer-upgrade-toggle[aria-expanded="true"] {
  filter: brightness(1.12);
}

#game-root.is-paused .multiplayer-upgrade-toggle {
  opacity: 0;
  pointer-events: none;
}

#game-root.is-multiplayer-match .pause-menu-btn {
  display: none;
}

@keyframes multiplayerUpgradeBadgePulse {
  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.14);
  }
}

.multiplayer-upgrade-drawer {
  position: fixed;
  top: max(82px, calc(env(safe-area-inset-top) + 66px));
  left: max(14px, env(safe-area-inset-left));
  z-index: 8;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 12px;
  width: min(410px, calc(100vw - 28px));
  max-height: calc(100dvh - max(100px, calc(env(safe-area-inset-top) + 84px)));
  overflow: hidden;
  transform: translateX(calc(-100% - 36px));
  padding: 16px;
  border: 1px solid rgba(255, 224, 164, 0.42);
  border-radius: 16px;
  background:
    radial-gradient(circle at 8% 0%, rgba(255, 203, 112, 0.16), transparent 29%),
    linear-gradient(155deg, rgba(76, 41, 21, 0.985), rgba(20, 12, 7, 0.99));
  box-shadow:
    0 26px 82px rgba(0, 0, 0, 0.58),
    inset 0 1px 0 rgba(255, 242, 213, 0.1);
  opacity: 0;
  outline: 0;
  pointer-events: none;
  visibility: hidden;
  transition:
    transform 240ms cubic-bezier(0.2, 0.8, 0.2, 1),
    opacity 180ms ease,
    visibility 0s linear 240ms;
  backdrop-filter: blur(12px);
}

.multiplayer-upgrade-drawer.is-open,
.multiplayer-upgrade-drawer.is-visible {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  transition-delay: 0s;
}

.multiplayer-upgrade-drawer__header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  gap: 12px;
  align-items: start;
}

.multiplayer-upgrade-drawer h2 {
  margin: 0;
  color: #ffe2a3;
  font: 800 clamp(25px, 4vw, 34px)/1 var(--font-title);
  letter-spacing: 0.01em;
}

.multiplayer-upgrade-drawer__header p {
  max-width: 42ch;
  margin: 7px 0 0;
  color: rgba(246, 216, 166, 0.76);
  font-size: 11px;
  line-height: 1.4;
}

.multiplayer-upgrade-drawer__close {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 9px;
  background:
    linear-gradient(180deg, rgba(130, 77, 39, 0.98), rgba(58, 31, 16, 0.98));
  color: #ffe7b6;
  font-size: 28px;
  line-height: 1;
}

.multiplayer-upgrade-drawer__body {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 2px;
  overscroll-behavior: contain;
  scrollbar-color: rgba(220, 153, 72, 0.72) rgba(15, 9, 5, 0.5);
  touch-action: pan-y;
}

.multiplayer-upgrade-options {
  display: grid;
  gap: 8px;
}

.multiplayer-upgrade-option {
  min-width: 0;
}

.multiplayer-upgrade-option__button {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  width: 100%;
  min-height: 74px;
  padding: 10px 12px;
  border: 2px solid rgba(91, 50, 21, 0.36);
  border-radius: 11px;
  background:
    radial-gradient(circle at 12% 16%, rgba(255, 255, 255, 0.5), transparent 29%),
    linear-gradient(145deg, #fff5d9, #e9cc91 58%, #c98d48);
  color: #2f180b;
  box-shadow:
    inset 0 0 0 2px rgba(255, 249, 222, 0.48),
    inset 0 -5px 0 rgba(111, 58, 24, 0.13),
    0 9px 22px rgba(0, 0, 0, 0.25);
  font-size: 12px;
  letter-spacing: 0;
  text-align: left;
  text-transform: none;
  transition:
    transform 130ms ease,
    filter 130ms ease,
    border-color 130ms ease;
}

.multiplayer-upgrade-option__button:hover,
.multiplayer-upgrade-option__button:focus-visible {
  border-color: rgba(255, 222, 151, 0.94);
  background:
    radial-gradient(circle at 12% 16%, rgba(255, 255, 255, 0.64), transparent 29%),
    linear-gradient(145deg, #fff9e8, #f2dca8 58%, #daa45d);
  transform: translateY(-1px);
}

.multiplayer-upgrade-option.is-special .multiplayer-upgrade-option__button {
  border-color: rgba(186, 103, 241, 0.68);
  background:
    radial-gradient(circle at 12% 16%, rgba(255, 255, 255, 0.58), transparent 28%),
    linear-gradient(145deg, #fff7e1, #ead3b3 54%, #bd92df);
  box-shadow:
    inset 0 0 0 2px rgba(255, 249, 226, 0.6),
    0 0 16px rgba(178, 88, 238, 0.3),
    0 10px 24px rgba(0, 0, 0, 0.28);
}

.multiplayer-upgrade-option__icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 2px solid rgba(83, 43, 16, 0.32);
  border-radius: 12px;
  background: rgba(124, 67, 25, 0.12);
  color: #743a18;
  font: 900 27px/1 Georgia, serif;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

.multiplayer-upgrade-option__copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.multiplayer-upgrade-option__title {
  overflow: hidden;
  color: #2c1609;
  font: 800 17px/1.08 var(--font-title);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.multiplayer-upgrade-option__description {
  display: -webkit-box;
  overflow: hidden;
  color: #633719;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.3;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.multiplayer-upgrade-option__action {
  padding: 5px 7px;
  border: 1px solid rgba(75, 37, 13, 0.26);
  border-radius: 999px;
  background: rgba(95, 48, 17, 0.1);
  color: #623116;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.multiplayer-upgrade-options:not(:empty) + .multiplayer-upgrade-empty,
.multiplayer-upgrade-drawer.has-options .multiplayer-upgrade-empty {
  display: none;
}

.multiplayer-upgrade-empty {
  display: grid;
  place-items: center;
  min-height: 172px;
  padding: 20px;
  border: 1px dashed rgba(255, 219, 151, 0.25);
  border-radius: 12px;
  background: rgba(7, 4, 2, 0.28);
  color: rgba(238, 204, 144, 0.66);
  text-align: center;
}

.multiplayer-upgrade-empty__icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 8px;
  border: 1px solid rgba(255, 218, 148, 0.2);
  border-radius: 50%;
  color: rgba(245, 197, 113, 0.7);
  font: 900 23px/1 Georgia, serif;
}

.multiplayer-upgrade-empty strong {
  color: rgba(255, 226, 173, 0.82);
  font-size: 13px;
}

.multiplayer-upgrade-empty > span:last-child {
  max-width: 31ch;
  margin-top: 5px;
  font-size: 10px;
  line-height: 1.4;
}

.multiplayer-upgrade-drawer__note {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  color: rgba(235, 197, 131, 0.62);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.3;
  text-transform: uppercase;
}

.multiplayer-upgrade-drawer__note > span {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #df9b46;
  box-shadow: 0 0 8px rgba(223, 155, 70, 0.45);
}

@media (orientation: landscape) and (max-width: 960px) and (max-height: 520px) {
  .multiplayer-upgrade-toggle {
    top: max(82px, calc(env(safe-area-inset-top) + 72px));
    left: max(10px, env(safe-area-inset-left));
    grid-template-columns: 21px minmax(0, auto) 20px;
    gap: 5px;
    min-width: 108px;
    height: 38px;
    padding: 0 7px;
    font-size: 8px;
  }

  .multiplayer-upgrade-toggle__icon {
    width: 21px;
    height: 21px;
    font-size: 14px;
  }

  .multiplayer-upgrade-toggle__badge {
    min-width: 20px;
    height: 20px;
    font-size: 9px;
  }

  .multiplayer-upgrade-drawer {
    top: max(10px, env(safe-area-inset-top));
    left: max(10px, env(safe-area-inset-left));
    gap: 8px;
    width: min(390px, calc(100vw - 20px));
    max-height: calc(100dvh - max(20px, calc(env(safe-area-inset-top) + 10px)));
    padding: 11px;
    border-radius: 13px;
  }

  .multiplayer-upgrade-drawer__header {
    grid-template-columns: minmax(0, 1fr) 36px;
    gap: 8px;
  }

  .multiplayer-upgrade-drawer h2 {
    font-size: 22px;
  }

  .multiplayer-upgrade-drawer__header p {
    margin-top: 4px;
    font-size: 9px;
    line-height: 1.25;
  }

  .multiplayer-upgrade-drawer__close {
    width: 36px;
    height: 36px;
    font-size: 24px;
  }

  .multiplayer-upgrade-options {
    gap: 6px;
  }

  .multiplayer-upgrade-option__button {
    grid-template-columns: 38px minmax(0, 1fr) auto;
    gap: 8px;
    min-height: 62px;
    padding: 7px 9px;
  }

  .multiplayer-upgrade-option__icon {
    width: 38px;
    height: 38px;
    border-radius: 9px;
    font-size: 22px;
  }

  .multiplayer-upgrade-option__title {
    font-size: 14px;
  }

  .multiplayer-upgrade-option__description {
    font-size: 9px;
  }

  .multiplayer-upgrade-empty {
    min-height: 116px;
    padding: 12px;
  }
}

@media (orientation: landscape) and (max-height: 400px) {
  .multiplayer-upgrade-drawer__note {
    display: none;
  }

  .multiplayer-upgrade-drawer {
    grid-template-rows: auto minmax(0, 1fr);
  }

  .multiplayer-upgrade-empty {
    min-height: 92px;
  }
}

@media (max-width: 430px) {
  .multiplayer-upgrade-toggle__label,
  .multiplayer-upgrade-option__action {
    display: none;
  }

  .multiplayer-upgrade-toggle {
    grid-template-columns: 24px 22px;
    min-width: 64px;
  }

  .multiplayer-upgrade-option__button {
    grid-template-columns: 42px minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  .multiplayer-upgrade-toggle.has-pending .multiplayer-upgrade-toggle__badge {
    animation: none;
  }

  .multiplayer-upgrade-drawer,
  .multiplayer-upgrade-option__button {
    transition-duration: 0s;
  }
}

/* The notification opens the same card picker used by the solo run. */
.multiplayer-upgrade-drawer {
  top: 50%;
  right: auto;
  bottom: auto;
  left: 50%;
  z-index: 12;
  gap: 0;
  width: min(720px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  padding: 22px;
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid rgba(255, 229, 173, 0.45);
  border-radius: 8px;
  background:
    linear-gradient(rgba(64, 34, 15, 0.88), rgba(26, 14, 8, 0.92)),
    rgba(34, 20, 10, 0.9);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.38);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.97);
  transition:
    transform 160ms ease,
    opacity 140ms ease,
    visibility 0s linear 160ms;
  backdrop-filter: none;
}

.multiplayer-upgrade-drawer.is-class-offer {
  width: min(980px, calc(100vw - 32px));
}

.multiplayer-upgrade-drawer.is-branch-offer {
  width: min(560px, calc(100vw - 32px));
}

.multiplayer-upgrade-drawer.is-open,
.multiplayer-upgrade-drawer.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
  transition-delay: 0s;
}

.multiplayer-upgrade-drawer__header {
  position: relative;
  display: block;
  padding-right: 42px;
}

.multiplayer-upgrade-drawer .multiplayer-eyebrow {
  display: none;
}

.multiplayer-upgrade-drawer h2 {
  margin: 0 0 8px;
  color: #ffe2a3;
  font: 800 clamp(28px, 5vw, 40px)/1 var(--font-title);
  letter-spacing: normal;
}

.multiplayer-upgrade-drawer__header p {
  max-width: none;
  margin: 0 0 16px;
  color: #f7ddaa;
  font-size: 15px;
  line-height: 1.45;
}

.multiplayer-upgrade-drawer__close {
  position: absolute;
  top: -5px;
  right: 0;
  width: 36px;
  height: 36px;
  border-radius: 7px;
  font-size: 25px;
}

.multiplayer-upgrade-drawer__body {
  overflow: visible;
  padding: 0;
}

.multiplayer-upgrade-options {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.multiplayer-upgrade-options.class-options--classes {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.multiplayer-upgrade-options.multiplayer-upgrade-options--branches {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.multiplayer-upgrade-drawer__note {
  display: none;
}

@media (orientation: landscape) and (max-width: 960px) and (max-height: 520px) {
  .multiplayer-upgrade-drawer {
    top: 50%;
    left: 50%;
    width: min(620px, calc(100vw - 20px));
    max-height: calc(100dvh - 20px);
    padding: 12px 16px;
    border-radius: 8px;
  }

  .multiplayer-upgrade-drawer.is-class-offer {
    width: min(980px, calc(100vw - 20px));
  }

  .multiplayer-upgrade-drawer.is-branch-offer {
    width: min(560px, calc(100vw - 20px));
  }

  .multiplayer-upgrade-drawer h2 {
    margin-bottom: 5px;
    font-size: 28px;
  }

  .multiplayer-upgrade-drawer__header p {
    margin-bottom: 10px;
    font-size: 13px;
  }

  .multiplayer-upgrade-drawer__close {
    top: -2px;
  }

  .multiplayer-upgrade-options {
    gap: 8px;
  }
}

@media (orientation: landscape) and (max-width: 760px) and (max-height: 400px) {
  .multiplayer-upgrade-drawer {
    padding: 10px 14px;
  }

  .multiplayer-upgrade-drawer h2 {
    margin-bottom: 4px;
    font-size: 25px;
  }

  .multiplayer-upgrade-drawer__header p {
    margin-bottom: 8px;
    font-size: 12px;
    line-height: 1.25;
  }

  .multiplayer-upgrade-options {
    gap: 7px;
  }
}

@media (max-width: 520px) and (orientation: portrait) {
  .multiplayer-upgrade-drawer,
  .multiplayer-upgrade-drawer.is-class-offer,
  .multiplayer-upgrade-drawer.is-branch-offer {
    width: calc(100vw - 20px);
    max-height: calc(100dvh - 20px);
    padding: 16px;
  }

  .multiplayer-upgrade-options,
  .multiplayer-upgrade-options.class-options--classes,
  .multiplayer-upgrade-options.multiplayer-upgrade-options--branches {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

/* Oil Baron boss presentation ----------------------------------------- */

.boss-hud.is-oil-baron {
  color: #e8ca82;
  filter:
    drop-shadow(0 9px 15px rgba(0, 0, 0, 0.72))
    drop-shadow(0 0 9px rgba(190, 132, 39, 0.13));
}

.boss-hud.is-oil-baron .boss-hud__name {
  color: #f3d995;
  font-weight: 700;
  letter-spacing: 0.075em;
  text-shadow:
    0 1px 0 #080604,
    0 2px 5px rgba(0, 0, 0, 0.96),
    0 0 10px rgba(212, 155, 57, 0.2);
}

.boss-hud.is-oil-baron .boss-hud__frame {
  border-color: rgba(201, 152, 67, 0.78);
  background:
    linear-gradient(180deg, rgba(255, 226, 155, 0.055), transparent 23%),
    repeating-linear-gradient(118deg, transparent 0 18px, rgba(211, 157, 62, 0.022) 18px 20px),
    linear-gradient(90deg, #030303, #17120c 12%, #090908 50%, #17120c 88%, #030303);
  box-shadow:
    inset 0 0 0 1px rgba(255, 225, 153, 0.075),
    inset 0 -7px 11px rgba(0, 0, 0, 0.9),
    0 2px 0 #020202,
    0 8px 18px rgba(0, 0, 0, 0.54),
    0 0 11px rgba(182, 124, 30, 0.11);
}

.boss-hud.is-oil-baron .boss-hud__frame::before,
.boss-hud.is-oil-baron .boss-hud__frame::after {
  border-color: rgba(196, 145, 58, 0.82);
  background:
    linear-gradient(135deg, rgba(235, 190, 96, 0.16), transparent 42%),
    linear-gradient(135deg, #1d160d, #030303 67%);
  box-shadow:
    inset 0 0 0 2px rgba(244, 204, 119, 0.07),
    0 3px 7px rgba(0, 0, 0, 0.76),
    0 0 7px rgba(211, 151, 45, 0.13);
}

.boss-hud.is-oil-baron .boss-health-track {
  border-color: #000;
  background:
    repeating-linear-gradient(90deg, rgba(226, 180, 92, 0.025) 0 2px, transparent 2px 7px),
    linear-gradient(180deg, #15110d, #010101 62%, #090304);
  box-shadow:
    inset 0 2px 7px rgba(0, 0, 0, 0.98),
    0 1px 0 rgba(237, 192, 104, 0.13);
}

.boss-hud.is-oil-baron .boss-health-lag {
  background: linear-gradient(180deg, #ead59f, #9e722d 42%, #3b250d 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 247, 216, 0.7),
    0 0 6px rgba(213, 160, 66, 0.28);
}

.boss-hud.is-oil-baron .boss-health-fill,
.boss-hud.is-oil-baron.is-resistant .boss-health-fill {
  background:
    linear-gradient(180deg, rgba(255, 226, 154, 0.42), transparent 25%),
    repeating-linear-gradient(108deg, transparent 0 18px, rgba(216, 164, 67, 0.08) 18px 20px),
    linear-gradient(180deg, #3d3424 0%, #11100d 35%, #030303 66%, #4a090f 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 229, 166, 0.62),
    inset 0 -3px 4px rgba(76, 3, 10, 0.76),
    0 0 10px rgba(202, 143, 47, 0.25);
}

.boss-hud.is-oil-baron.is-vulnerable .boss-health-fill {
  background:
    linear-gradient(180deg, rgba(255, 231, 177, 0.42), transparent 24%),
    repeating-linear-gradient(108deg, transparent 0 18px, rgba(255, 205, 112, 0.12) 18px 20px),
    linear-gradient(180deg, #ff6555 0%, #d92832 38%, #8f101c 72%, #4f0710 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 225, 169, 0.68),
    inset 0 -3px 4px rgba(79, 3, 12, 0.72),
    0 0 12px rgba(230, 43, 48, 0.44);
}

.boss-hud.is-oil-baron.is-shielded .boss-health-fill {
  background:
    linear-gradient(180deg, rgba(255, 226, 154, 0.42), transparent 25%),
    repeating-linear-gradient(108deg, transparent 0 18px, rgba(216, 164, 67, 0.08) 18px 20px),
    linear-gradient(180deg, #3d3424 0%, #11100d 35%, #030303 66%, #4a090f 100%);
}

.boss-hud.is-oil-baron .boss-shield-sheen {
  background:
    repeating-linear-gradient(112deg, transparent 0 17px, rgba(255, 226, 154, 0.76) 21px, transparent 28px 52px),
    linear-gradient(90deg, rgba(95, 56, 6, 0.18), rgba(225, 169, 66, 0.58), rgba(95, 56, 6, 0.18));
  background-position: -180px 0, 0 0;
  background-size: 180px 100%, 100% 100%;
}

.boss-hud.is-oil-baron.is-oil-star .boss-shield-sheen {
  background:
    radial-gradient(circle at 18% 50%, rgba(255, 198, 91, 0.72) 0 2px, transparent 3px),
    repeating-linear-gradient(106deg, rgba(0, 0, 0, 0.72) 0 15px, rgba(255, 185, 66, 0.66) 19px, rgba(4, 6, 8, 0.84) 25px 48px),
    linear-gradient(90deg, #010202, #40301a 48%, #010202);
  background-position: 0 0, -180px 0, 0 0;
  background-size: 34px 100%, 180px 100%, 100% 100%;
  opacity: 0.92;
}

.boss-hud.is-oil-baron .boss-health-notch {
  background: linear-gradient(180deg, #ffe3a1, #80571d 38% 68%, #e7b85b);
  box-shadow:
    -1px 0 0 #000,
    1px 0 0 #000,
    0 0 5px rgba(226, 171, 73, 0.46);
}

.boss-hud.is-oil-baron .boss-hud__status,
.boss-hud.is-oil-baron:not(.is-shielded) .boss-hud__status,
.boss-hud.is-oil-baron.is-vulnerable .boss-hud__status {
  border-color: rgba(192, 139, 48, 0.32);
  background: linear-gradient(90deg, transparent, rgba(5, 5, 4, 0.95) 14% 86%, transparent);
  color: #d9b66b;
  text-shadow:
    0 1px 3px #000,
    0 0 7px rgba(193, 132, 34, 0.18);
}

.boss-hud.is-oil-baron.is-shielded .boss-hud__status {
  color: #ffe3a1;
  text-shadow:
    0 1px 3px #000,
    0 0 9px rgba(229, 168, 59, 0.56);
}

.boss-hud.is-oil-baron.is-oil-star .boss-hud__status {
  border-color: rgba(255, 171, 50, 0.48);
  background: linear-gradient(90deg, transparent, rgba(1, 2, 3, 0.98) 12% 88%, transparent);
  color: #ffd276;
  letter-spacing: 0.055em;
}

.boss-hud.is-oil-baron .boss-church-pips {
  min-height: 23px;
}

.boss-hud.is-oil-baron .boss-church-pips > .boss-oil-indicator,
.boss-hud.is-oil-baron .boss-church-pips > .boss-oil-indicator.is-active {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: auto;
  min-width: 112px;
  height: 22px;
  padding: 3px 10px 3px 8px;
  border: 1px solid rgba(204, 153, 63, 0.72);
  border-radius: 2px;
  background:
    linear-gradient(180deg, rgba(245, 208, 128, 0.1), transparent 32%),
    linear-gradient(100deg, #050505, #251a0c 55%, #080706);
  color: #f0ce7d;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.12em;
  line-height: 1;
  text-shadow: 0 1px 2px #000;
  box-shadow:
    inset 0 0 0 1px rgba(255, 232, 177, 0.05),
    0 2px 5px rgba(0, 0, 0, 0.68),
    0 0 7px rgba(197, 137, 33, 0.12);
  opacity: 1;
  transform: none;
}

.boss-hud.is-oil-baron .boss-church-pips > .boss-oil-indicator::before {
  position: static;
  width: 8px;
  height: 11px;
  flex: 0 0 auto;
  border: 1px solid #e0b65e;
  border-radius: 70% 42% 66% 54%;
  background: linear-gradient(135deg, #403521 0 18%, #050505 52%, #5e1116 100%);
  box-shadow:
    inset 1px 1px 0 rgba(255, 229, 162, 0.25),
    0 0 5px rgba(209, 148, 47, 0.34);
  content: "";
  transform: rotate(45deg);
}

.boss-hud.is-oil-baron .boss-church-pips > .boss-oil-indicator::after {
  position: static;
  width: 4px;
  height: 4px;
  flex: 0 0 auto;
  margin-left: auto;
  border: 0;
  border-radius: 50%;
  background: #a51b25;
  box-shadow: 0 0 5px rgba(220, 42, 51, 0.72);
  content: "";
  transform: none;
  animation: oilDerrickIndicatorPulse 1.2s ease-in-out infinite alternate;
}

/* The deal reuses the Bell-Ringer warning node, restyled as a contract. */

#game-root.has-oil-offer::after {
  background:
    radial-gradient(circle at 50% 42%, transparent 24%, rgba(21, 15, 5, 0.2) 58%, rgba(0, 0, 0, 0.76) 100%),
    repeating-linear-gradient(118deg, rgba(213, 158, 61, 0.018) 0 1px, transparent 1px 15px),
    linear-gradient(rgba(0, 0, 0, 0.03), rgba(56, 7, 12, 0.16));
  mix-blend-mode: normal;
  animation: oilDealVignette 1.4s ease-in-out infinite alternate;
}

.bell-warning.is-oil-offer {
  --oil-deal-progress: 1;
  top: max(156px, calc(env(safe-area-inset-top) + 140px));
  z-index: 8;
  box-sizing: border-box;
  gap: 15px;
  width: min(720px, calc(100vw - 44px));
  min-width: 0;
  padding: 13px 24px 15px 14px;
  border-color: rgba(220, 171, 78, 0.78);
  border-radius: 2px;
  background:
    linear-gradient(180deg, rgba(255, 224, 150, 0.07), transparent 25%),
    repeating-linear-gradient(118deg, transparent 0 22px, rgba(214, 158, 57, 0.027) 22px 24px),
    radial-gradient(circle at 11% 50%, rgba(133, 86, 15, 0.22), transparent 27%),
    linear-gradient(90deg, rgba(2, 2, 2, 0.98), rgba(24, 17, 8, 0.98) 48%, rgba(12, 3, 5, 0.98));
  box-shadow:
    inset 0 0 0 1px rgba(255, 231, 172, 0.08),
    inset 0 -9px 20px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(0, 0, 0, 0.72),
    0 0 26px rgba(198, 139, 37, 0.2),
    0 15px 40px rgba(0, 0, 0, 0.68);
  animation:
    bellWarningEnter 180ms ease-out both,
    oilDealPanelPulse 1.5s ease-in-out 180ms infinite alternate;
}

.bell-warning.is-oil-offer::before {
  left: -7px;
  width: 12px;
  height: 12px;
  border-color: rgba(228, 180, 88, 0.86);
  background: linear-gradient(135deg, #4e3512, #050402 70%);
  box-shadow:
    inset 0 0 0 2px rgba(255, 225, 154, 0.08),
    0 0 8px rgba(214, 155, 51, 0.24);
}

.bell-warning.is-oil-offer::after {
  position: absolute;
  top: auto;
  right: 0;
  bottom: 0;
  left: 0;
  width: auto;
  height: 3px;
  border: 0;
  background:
    linear-gradient(90deg, #69420c, #f2cf77 45%, #b77919 84%, #5b1016);
  box-shadow:
    0 -1px 0 rgba(255, 232, 174, 0.12),
    0 0 8px rgba(223, 166, 63, 0.48);
  content: "";
  transform: scaleX(var(--oil-deal-progress));
  transform-origin: left center;
  transition: transform 180ms linear;
}

.bell-warning.is-oil-offer .bell-warning__sigil {
  width: 48px;
  height: 48px;
  border-color: rgba(232, 191, 105, 0.8);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(226, 173, 69, 0.15), transparent 62%),
    #070604;
  box-shadow:
    inset 0 0 15px rgba(209, 148, 43, 0.2),
    0 0 14px rgba(213, 153, 48, 0.24);
}

.bell-warning.is-oil-offer .bell-warning__sigil::before,
.bell-warning.is-oil-offer .bell-warning__sigil::after {
  border-color: rgba(226, 174, 77, 0.34);
  animation: oilDealCoinRing 1.35s ease-out infinite;
}

.bell-warning.is-oil-offer .bell-warning__sigil::after {
  animation-delay: 0.68s;
}

.bell-warning.is-oil-offer .bell-warning__bell {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border: 1px solid #ffe3a0;
  border-radius: 50%;
  background:
    linear-gradient(135deg, rgba(255, 245, 206, 0.72), transparent 26%),
    linear-gradient(135deg, #dcae52, #6f430e 72%);
  color: #241606;
  box-shadow:
    inset 0 0 0 2px rgba(76, 45, 4, 0.34),
    0 0 9px rgba(236, 187, 91, 0.52);
  transform-origin: 50% 50%;
  animation: oilDealCoinTurn 1.8s ease-in-out infinite;
}

.bell-warning.is-oil-offer .bell-warning__bell::before {
  position: static;
  width: auto;
  height: auto;
  border-radius: 0;
  background: none;
  color: #2b1905;
  font: 900 18px/1 Georgia, serif;
  text-shadow: 0 1px 0 rgba(255, 230, 166, 0.5);
  content: "$";
}

.bell-warning.is-oil-offer .bell-warning__bell::after {
  display: none;
  content: none;
}

.bell-warning.is-oil-offer .bell-warning__copy {
  gap: 4px;
  flex: 1 1 auto;
}

.bell-warning.is-oil-offer #bell-warning-title {
  color: #f7dda0;
  font-size: clamp(15px, 2.2vw, 21px);
  letter-spacing: 0.105em;
  text-shadow:
    0 1px 4px #000,
    0 0 10px rgba(219, 159, 56, 0.23);
}

.bell-warning.is-oil-offer #bell-warning-subtitle {
  color: #caa85f;
  font-size: clamp(8px, 1.15vw, 10px);
  letter-spacing: 0.12em;
  line-height: 1.35;
  text-shadow: 0 1px 3px #000;
}

.bell-warning.is-oil-offer.is-oil-message {
  border-color: rgba(197, 147, 59, 0.64);
  animation: bellWarningEnter 180ms ease-out both;
}

.bell-warning.is-oil-offer.is-oil-message::after {
  opacity: 0.42;
  transform: scaleX(1);
}

.bell-warning.is-oil-offer.is-oil-message .bell-warning__bell {
  animation: none;
}

.bell-warning.is-oil-offer.is-oil-star {
  border-color: rgba(255, 102, 52, 0.78);
  background:
    repeating-linear-gradient(118deg, transparent 0 20px, rgba(255, 111, 48, 0.035) 20px 22px),
    radial-gradient(circle at 11% 50%, rgba(127, 27, 10, 0.28), transparent 28%),
    linear-gradient(90deg, rgba(1, 2, 3, 0.98), rgba(30, 17, 8, 0.98), rgba(2, 3, 4, 0.98));
  box-shadow:
    inset 0 0 0 1px rgba(255, 215, 139, 0.08),
    0 0 20px rgba(255, 84, 25, 0.2),
    0 12px 30px rgba(0, 0, 0, 0.56);
}

.bell-warning.is-oil-offer.is-oil-star .bell-warning__bell {
  border-color: #ff7b3d;
  background:
    radial-gradient(circle at 34% 28%, rgba(255, 222, 140, 0.24), transparent 28%),
    linear-gradient(135deg, #17130e, #020304 72%);
  color: #ffd16d;
  box-shadow:
    inset 0 0 0 2px rgba(93, 31, 8, 0.7),
    0 0 12px rgba(255, 91, 28, 0.58);
  animation: oilLockedMarkPulse 0.72s ease-in-out infinite alternate;
}

.bell-warning.is-oil-offer.is-oil-star .bell-warning__bell::before {
  color: #ffd16d;
  font: 900 17px/1 Georgia, serif;
  text-shadow: 0 0 7px rgba(255, 103, 33, 0.72);
  content: "★";
}

.bell-warning.is-oil-offer.is-oil-locked {
  border-color: rgba(190, 53, 59, 0.84);
  background:
    linear-gradient(180deg, rgba(255, 203, 143, 0.045), transparent 25%),
    repeating-linear-gradient(118deg, transparent 0 22px, rgba(185, 31, 41, 0.035) 22px 24px),
    radial-gradient(circle at 11% 50%, rgba(138, 17, 25, 0.25), transparent 28%),
    linear-gradient(90deg, rgba(2, 2, 2, 0.98), rgba(31, 8, 10, 0.98), rgba(5, 3, 3, 0.98));
  box-shadow:
    inset 0 0 0 1px rgba(255, 218, 158, 0.055),
    0 0 0 1px rgba(0, 0, 0, 0.74),
    0 0 24px rgba(171, 22, 31, 0.22),
    0 15px 40px rgba(0, 0, 0, 0.68);
}

.bell-warning.is-oil-offer.is-oil-locked::after {
  background: linear-gradient(90deg, #5f080d, #e14546 56%, #9d1a21);
  box-shadow: 0 0 8px rgba(220, 44, 51, 0.5);
}

.bell-warning.is-oil-offer.is-oil-locked .bell-warning__sigil {
  border-color: rgba(218, 70, 72, 0.8);
  box-shadow:
    inset 0 0 15px rgba(160, 18, 27, 0.3),
    0 0 14px rgba(201, 31, 38, 0.26);
}

.bell-warning.is-oil-offer.is-oil-locked .bell-warning__sigil::before,
.bell-warning.is-oil-offer.is-oil-locked .bell-warning__sigil::after {
  border-color: rgba(219, 62, 66, 0.4);
}

.bell-warning.is-oil-offer.is-oil-locked .bell-warning__bell {
  border-color: #f18a81;
  background: linear-gradient(135deg, #b42a30, #43070b 74%);
  color: #ffe1c0;
  box-shadow:
    inset 0 0 0 2px rgba(45, 0, 3, 0.48),
    0 0 9px rgba(220, 42, 48, 0.5);
  animation: oilLockedMarkPulse 0.85s ease-in-out infinite alternate;
}

.bell-warning.is-oil-offer.is-oil-locked .bell-warning__bell::before {
  color: #ffe0bd;
  font-family: Arial, sans-serif;
  font-size: 20px;
  text-shadow: 0 1px 2px #250002;
  content: "\00D7";
}

.bell-warning.is-oil-offer.is-oil-locked #bell-warning-title {
  color: #ffb19d;
}

.bell-warning.is-oil-offer.is-oil-locked #bell-warning-subtitle {
  color: #e2706b;
}

/* Bought players must read as enemies before their name can be read. */

.multiplayer-player-nameplate.is-oil-baron-ally {
  max-width: 190px;
  padding: 4px 7px 5px;
  border-color: #d39a36;
  border-radius: 3px;
  background:
    linear-gradient(180deg, rgba(244, 202, 111, 0.09), transparent 30%),
    linear-gradient(100deg, rgba(2, 2, 2, 0.94), rgba(57, 7, 12, 0.94));
  color: #ffe1a0;
  letter-spacing: 0.055em;
  box-shadow:
    inset 0 0 0 1px rgba(255, 228, 169, 0.07),
    0 0 0 1px rgba(62, 0, 3, 0.68),
    0 0 9px rgba(215, 38, 45, 0.48),
    0 3px 9px rgba(0, 0, 0, 0.7);
  animation: oilBaronAllyThreatPulse 0.9s ease-in-out infinite alternate;
}

.multiplayer-player-nameplate.is-oil-baron-ally::before {
  width: 9px;
  height: 9px;
  border: 1px solid #ffb15e;
  border-radius: 1px;
  background: linear-gradient(135deg, #e33e3e, #56070b 70%);
  box-shadow:
    inset 0 0 0 1px rgba(49, 0, 2, 0.65),
    0 0 7px rgba(255, 50, 55, 0.8);
  transform: rotate(45deg);
  animation: oilBaronAllyMarkSpin 2.2s linear infinite;
}

.multiplayer-player-nameplate.is-oil-baron-ally::after {
  flex: 0 0 auto;
  padding: 2px 4px;
  border: 1px solid rgba(239, 77, 72, 0.78);
  border-radius: 2px;
  background: rgba(85, 4, 9, 0.78);
  color: #ffaaa0;
  font-size: 7px;
  font-weight: 950;
  letter-spacing: 0.11em;
  line-height: 1;
  text-shadow: 0 1px 1px #210002;
  content: attr(data-hostile-label);
}

.multiplayer-score-row.is-oil-baron-ally > * {
  background:
    linear-gradient(90deg, rgba(4, 4, 4, 0.94), rgba(79, 12, 17, 0.46)),
    rgba(0, 0, 0, 0.72);
  color: #f2cb75;
  box-shadow: inset 0 1px 0 rgba(236, 174, 68, 0.12);
}

.multiplayer-score-row.is-oil-baron-ally .multiplayer-score-row__player::before {
  margin-right: 6px;
  color: #e4473f;
  content: "◆";
  text-shadow: 0 0 6px rgba(232, 59, 51, 0.74);
}

.multiplayer-score-row.is-oil-baron-ally .multiplayer-score-row__state {
  color: #ffb84f;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.035em;
}

@keyframes oilDerrickIndicatorPulse {
  from {
    opacity: 0.46;
    transform: scale(0.82);
  }

  to {
    opacity: 1;
    transform: scale(1.18);
  }
}

@keyframes oilDealVignette {
  from {
    opacity: 0.78;
  }

  to {
    opacity: 1;
  }
}

@keyframes oilDealPanelPulse {
  from {
    border-color: rgba(202, 147, 51, 0.62);
    filter: brightness(0.96);
  }

  to {
    border-color: rgba(242, 200, 110, 0.9);
    filter: brightness(1.06);
  }
}

@keyframes oilDealCoinRing {
  from {
    opacity: 0.78;
    transform: scale(0.56);
  }

  to {
    opacity: 0;
    transform: scale(1.5);
  }
}

@keyframes oilDealCoinTurn {
  0%,
  100% {
    transform: rotateY(0deg) scale(1);
  }

  50% {
    transform: rotateY(180deg) scale(0.88);
  }
}

@keyframes oilLockedMarkPulse {
  from {
    filter: brightness(0.82);
    transform: scale(0.94);
  }

  to {
    filter: brightness(1.2);
    transform: scale(1.05);
  }
}

@keyframes oilBaronAllyThreatPulse {
  from {
    filter: brightness(0.9);
  }

  to {
    filter: brightness(1.14);
  }
}

@keyframes oilBaronAllyMarkSpin {
  from {
    transform: rotate(45deg);
  }

  to {
    transform: rotate(405deg);
  }
}

@media (orientation: landscape) and (max-width: 960px),
  (orientation: landscape) and (max-height: 520px) {
  .boss-hud.is-oil-baron .boss-church-pips > .boss-oil-indicator,
  .boss-hud.is-oil-baron .boss-church-pips > .boss-oil-indicator.is-active {
    min-width: 82px;
    height: 17px;
    gap: 4px;
    padding: 2px 6px;
    font-size: 6.5px;
    letter-spacing: 0.08em;
  }

  .boss-hud.is-oil-baron .boss-church-pips > .boss-oil-indicator::before {
    width: 6px;
    height: 8px;
  }

  .bell-warning.is-oil-offer {
    top: max(130px, calc(env(safe-area-inset-top) + 118px));
    gap: 10px;
    width: min(620px, calc(100vw - 36px));
    padding: 9px 17px 11px 10px;
  }

  .bell-warning.is-oil-offer .bell-warning__sigil {
    width: 38px;
    height: 38px;
  }

  .bell-warning.is-oil-offer .bell-warning__bell {
    width: 22px;
    height: 22px;
  }

  .bell-warning.is-oil-offer .bell-warning__bell::before {
    font-size: 15px;
  }

  .bell-warning.is-oil-offer #bell-warning-title {
    font-size: 14px;
  }

  .bell-warning.is-oil-offer #bell-warning-subtitle {
    font-size: 7.5px;
  }
}

@media (orientation: portrait) and (max-width: 760px) {
  .boss-hud.is-oil-baron .boss-hud__name {
    letter-spacing: 0.035em;
  }

  .boss-hud.is-oil-baron .boss-church-pips > .boss-oil-indicator,
  .boss-hud.is-oil-baron .boss-church-pips > .boss-oil-indicator.is-active {
    min-width: 94px;
    height: 19px;
    gap: 5px;
    padding: 2px 7px;
    font-size: 7.5px;
    letter-spacing: 0.08em;
  }

  .bell-warning.is-oil-offer {
    top: max(150px, calc(env(safe-area-inset-top) + 136px));
    gap: 10px;
    width: calc(100vw - 28px);
    padding: 10px 13px 12px 10px;
  }

  .bell-warning.is-oil-offer .bell-warning__sigil {
    width: 40px;
    height: 40px;
  }

  .bell-warning.is-oil-offer #bell-warning-title {
    font-size: clamp(12px, 4vw, 16px);
    letter-spacing: 0.07em;
  }

  .bell-warning.is-oil-offer #bell-warning-subtitle {
    font-size: clamp(7px, 2.25vw, 9px);
    letter-spacing: 0.075em;
  }

  .multiplayer-player-nameplate.is-oil-baron-ally::after {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  #game-root.has-oil-offer::after,
  .boss-hud.is-oil-baron .boss-oil-indicator::after,
  .bell-warning.is-oil-offer,
  .bell-warning.is-oil-offer .bell-warning__sigil::before,
  .bell-warning.is-oil-offer .bell-warning__sigil::after,
  .bell-warning.is-oil-offer .bell-warning__bell,
  .multiplayer-player-nameplate.is-oil-baron-ally,
  .multiplayer-player-nameplate.is-oil-baron-ally::before {
    animation: none !important;
    transition-duration: 0s !important;
  }
}

/* Sloth Archbishop boss presentation ---------------------------------- */

.boss-hud.is-sloth-archbishop {
  --sloth-plum: #39243d;
  --sloth-plum-deep: #17121c;
  --sloth-ivory: #ded4b8;
  --sloth-gold: #c39a4b;
  --sloth-teal: #72c8b4;
  color: var(--sloth-ivory);
  filter:
    drop-shadow(0 9px 15px rgba(7, 3, 10, 0.72))
    drop-shadow(0 0 10px rgba(82, 186, 160, 0.13));
}

.boss-hud.is-sloth-archbishop .boss-church-pips[hidden] {
  display: none;
}

.boss-hud.is-sloth-archbishop .boss-hud__name {
  color: #eee6cf;
  font-weight: 700;
  letter-spacing: 0.065em;
  text-shadow:
    0 1px 0 #0b0710,
    0 2px 5px rgba(0, 0, 0, 0.96),
    0 0 10px rgba(195, 154, 75, 0.2);
}

.boss-hud.is-sloth-archbishop .boss-hud__frame {
  border-color: rgba(195, 154, 75, 0.78);
  background:
    linear-gradient(180deg, rgba(222, 212, 184, 0.075), transparent 27%),
    repeating-linear-gradient(116deg, transparent 0 20px, rgba(114, 200, 180, 0.025) 20px 22px),
    linear-gradient(90deg, #0a070d, #2a182e 13%, #141019 50%, #2a182e 87%, #0a070d);
  box-shadow:
    inset 0 0 0 1px rgba(237, 225, 198, 0.075),
    inset 0 -7px 11px rgba(4, 2, 6, 0.9),
    0 2px 0 #070409,
    0 8px 18px rgba(0, 0, 0, 0.52),
    0 0 11px rgba(82, 186, 160, 0.1);
}

.boss-hud.is-sloth-archbishop .boss-hud__frame::before,
.boss-hud.is-sloth-archbishop .boss-hud__frame::after {
  border-color: rgba(195, 154, 75, 0.82);
  background:
    linear-gradient(135deg, rgba(222, 212, 184, 0.14), transparent 43%),
    linear-gradient(135deg, #2d1b32, #09060c 68%);
  box-shadow:
    inset 0 0 0 2px rgba(114, 200, 180, 0.055),
    0 3px 7px rgba(0, 0, 0, 0.76),
    0 0 7px rgba(195, 154, 75, 0.12);
}

.boss-hud.is-sloth-archbishop .boss-health-track {
  border-color: #08050a;
  background:
    repeating-linear-gradient(90deg, rgba(222, 212, 184, 0.025) 0 2px, transparent 2px 7px),
    linear-gradient(180deg, #201524, #09070c 62%, #120b15);
  box-shadow:
    inset 0 2px 7px rgba(0, 0, 0, 0.97),
    0 1px 0 rgba(222, 212, 184, 0.13);
}

.boss-hud.is-sloth-archbishop .boss-health-lag {
  background: linear-gradient(180deg, #e4dac1, #a48666 43%, #4b2b43 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 250, 231, 0.72),
    0 0 6px rgba(195, 154, 75, 0.28);
}

.boss-hud.is-sloth-archbishop .boss-health-fill {
  background:
    linear-gradient(180deg, rgba(237, 225, 198, 0.38), transparent 25%),
    repeating-linear-gradient(108deg, transparent 0 20px, rgba(114, 200, 180, 0.065) 20px 22px),
    linear-gradient(180deg, #b95f78 0%, #7b294f 42%, #451a3c 72%, #1a101f 100%);
  box-shadow:
    inset 0 1px 0 rgba(245, 230, 203, 0.58),
    inset 0 -3px 4px rgba(25, 5, 24, 0.74),
    0 0 10px rgba(95, 42, 87, 0.38);
}

.boss-hud.is-sloth-archbishop.is-resistant .boss-health-fill {
  background:
    linear-gradient(180deg, rgba(222, 212, 184, 0.28), transparent 26%),
    repeating-linear-gradient(108deg, transparent 0 20px, rgba(114, 200, 180, 0.05) 20px 22px),
    linear-gradient(180deg, #765069 0%, #492b4a 45%, #25182d 74%, #120d17 100%);
}

.boss-hud.is-sloth-archbishop.is-vulnerable .boss-health-fill {
  background:
    linear-gradient(180deg, rgba(255, 239, 210, 0.43), transparent 24%),
    repeating-linear-gradient(108deg, transparent 0 20px, rgba(195, 154, 75, 0.1) 20px 22px),
    linear-gradient(180deg, #d27688 0%, #a63b63 40%, #681c4d 73%, #30112f 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 239, 210, 0.68),
    inset 0 -3px 4px rgba(43, 7, 34, 0.72),
    0 0 12px rgba(195, 83, 119, 0.4);
}

.boss-hud.is-sloth-archbishop .boss-shield-sheen {
  background:
    repeating-linear-gradient(112deg, transparent 0 18px, rgba(176, 255, 235, 0.7) 22px, transparent 29px 54px),
    linear-gradient(90deg, rgba(35, 91, 79, 0.18), rgba(114, 200, 180, 0.6), rgba(35, 91, 79, 0.18));
  background-position: -180px 0, 0 0;
  background-size: 180px 100%, 100% 100%;
}

.boss-hud.is-sloth-archbishop .boss-health-notch {
  background: linear-gradient(180deg, #f1e5bf, #80602d 38% 68%, #72c8b4);
  box-shadow:
    -1px 0 0 #08050a,
    1px 0 0 #08050a,
    0 0 5px rgba(114, 200, 180, 0.42);
}

.boss-hud.is-sloth-archbishop .boss-hud__status {
  display: none;
}

.boss-hud.is-sloth-archbishop .boss-church-pips {
  gap: 5px;
  min-height: 22px;
}

.boss-hud.is-sloth-archbishop .boss-church-pips > .boss-sloth-phase {
  --sloth-phase-accent: #9a7d9e;
  --sloth-phase-fill: #2b1b31;
  --sloth-phase-glow: rgba(154, 125, 158, 0.42);
  position: relative;
  display: inline-flex;
  box-sizing: border-box;
  width: auto;
  min-width: 44px;
  height: 20px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0 7px;
  border: 1px solid rgba(166, 143, 153, 0.48);
  border-radius: 2px;
  background:
    linear-gradient(180deg, rgba(222, 212, 184, 0.055), transparent 40%),
    linear-gradient(100deg, #120d16, var(--sloth-phase-fill) 55%, #0a080d);
  color: #9d8e9b;
  font-family: var(--font-title);
  font-size: 7.5px;
  font-weight: 800;
  letter-spacing: 0.075em;
  line-height: 1;
  text-transform: uppercase;
  text-shadow: 0 1px 2px #000;
  box-shadow:
    inset 0 0 0 1px rgba(237, 225, 198, 0.035),
    0 2px 5px rgba(0, 0, 0, 0.58);
  opacity: 0.48;
  transform: none;
  transition:
    color 180ms ease,
    background 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    opacity 180ms ease,
    transform 180ms ease;
}

.boss-hud.is-sloth-archbishop .boss-sloth-phase[data-phase="sleep"] {
  --sloth-phase-accent: #b59abc;
  --sloth-phase-fill: #33203a;
  --sloth-phase-glow: rgba(181, 154, 188, 0.48);
}

.boss-hud.is-sloth-archbishop .boss-sloth-phase[data-phase="walk"] {
  --sloth-phase-accent: #caa75e;
  --sloth-phase-fill: #33271f;
  --sloth-phase-glow: rgba(202, 167, 94, 0.46);
}

.boss-hud.is-sloth-archbishop .boss-sloth-phase[data-phase="spider"] {
  --sloth-phase-accent: #72c8b4;
  --sloth-phase-fill: #18332f;
  --sloth-phase-glow: rgba(114, 200, 180, 0.5);
}

.boss-hud.is-sloth-archbishop .boss-church-pips > .boss-sloth-phase::before {
  position: relative;
  top: auto;
  left: auto;
  z-index: 1;
  width: auto;
  height: auto;
  border: 0;
  border-radius: 0;
  background: none;
  color: inherit;
  content: attr(data-phase);
  transform: none;
}

.boss-hud.is-sloth-archbishop .boss-church-pips > .boss-sloth-phase::after {
  position: absolute;
  top: 2px;
  right: 3px;
  left: auto;
  z-index: 2;
  width: 3px;
  height: 3px;
  border: 0;
  border-radius: 50%;
  background: rgba(222, 212, 184, 0.34);
  box-shadow: none;
  content: "";
  transform: none;
}

.boss-hud.is-sloth-archbishop .boss-sloth-phase.is-completed,
.boss-hud.is-sloth-archbishop .boss-sloth-phase[data-completed="true"] {
  border-color: rgba(195, 154, 75, 0.7);
  background:
    linear-gradient(180deg, rgba(222, 212, 184, 0.12), transparent 40%),
    linear-gradient(100deg, #171019, #45302e 55%, #110c13);
  color: #cdb57b;
  box-shadow:
    inset 0 0 0 1px rgba(222, 212, 184, 0.05),
    0 2px 5px rgba(0, 0, 0, 0.62);
  opacity: 0.78;
  transform: none;
}

.boss-hud.is-sloth-archbishop .boss-sloth-phase.is-completed::after,
.boss-hud.is-sloth-archbishop .boss-sloth-phase[data-completed="true"]::after {
  top: 2px;
  right: 4px;
  width: 3px;
  height: 6px;
  border-right: 1px solid #e4d6ac;
  border-bottom: 1px solid #e4d6ac;
  border-radius: 0;
  background: transparent;
  transform: rotate(45deg);
}

.boss-hud.is-sloth-archbishop .boss-sloth-phase.is-active,
.boss-hud.is-sloth-archbishop .boss-sloth-phase[data-active="true"] {
  border-color: var(--sloth-phase-accent);
  background:
    linear-gradient(180deg, rgba(237, 225, 198, 0.18), transparent 42%),
    linear-gradient(100deg, #17101b, var(--sloth-phase-fill) 52%, #0d0a10);
  color: #f0e7d0;
  box-shadow:
    inset 0 0 0 1px rgba(237, 225, 198, 0.075),
    0 2px 5px rgba(0, 0, 0, 0.68),
    0 0 8px var(--sloth-phase-glow);
  opacity: 1;
  transform: translateY(-1px);
  animation: slothArchbishopPhasePulse 1.35s ease-in-out infinite alternate;
}

.boss-hud.is-sloth-archbishop .boss-sloth-phase.is-active::after,
.boss-hud.is-sloth-archbishop .boss-sloth-phase[data-active="true"]::after {
  top: 2px;
  right: 3px;
  width: 4px;
  height: 4px;
  border: 0;
  border-radius: 50%;
  background: var(--sloth-phase-accent);
  box-shadow: 0 0 5px var(--sloth-phase-glow);
  transform: none;
  animation: slothArchbishopPhaseSpark 0.82s ease-in-out infinite alternate;
}

@keyframes slothArchbishopPhasePulse {
  from {
    box-shadow:
      inset 0 0 0 1px rgba(237, 225, 198, 0.065),
      0 2px 5px rgba(0, 0, 0, 0.68),
      0 0 5px var(--sloth-phase-glow);
  }

  to {
    box-shadow:
      inset 0 0 0 1px rgba(237, 225, 198, 0.11),
      0 2px 5px rgba(0, 0, 0, 0.68),
      0 0 11px var(--sloth-phase-glow);
  }
}

@keyframes slothArchbishopPhaseSpark {
  from {
    opacity: 0.52;
    transform: scale(0.78);
  }

  to {
    opacity: 1;
    transform: scale(1.14);
  }
}

@media (orientation: landscape) and (max-width: 960px),
  (orientation: landscape) and (max-height: 520px) {
  .boss-hud.is-sloth-archbishop .boss-hud__name {
    font-size: 9px;
    letter-spacing: 0;
  }

  .boss-hud.is-sloth-archbishop .boss-church-pips {
    gap: 3px;
    min-height: 16px;
  }

  .boss-hud.is-sloth-archbishop .boss-church-pips > .boss-sloth-phase {
    min-width: 31px;
    height: 16px;
    padding: 0 4px;
    font-size: 6px;
    letter-spacing: 0.04em;
  }

  .boss-hud.is-sloth-archbishop .boss-church-pips > .boss-sloth-phase::after,
  .boss-hud.is-sloth-archbishop .boss-sloth-phase.is-active::after,
  .boss-hud.is-sloth-archbishop .boss-sloth-phase[data-active="true"]::after {
    top: 1px;
    right: 2px;
  }

  .boss-hud.is-sloth-archbishop .boss-sloth-phase.is-completed::after,
  .boss-hud.is-sloth-archbishop .boss-sloth-phase[data-completed="true"]::after {
    top: 1px;
    right: 3px;
    height: 5px;
  }
}

@media (orientation: landscape) and (max-height: 400px) {
  .boss-hud.is-sloth-archbishop .boss-hud__name {
    font-size: 9px;
  }

  .boss-hud.is-sloth-archbishop .boss-church-pips {
    gap: 2px;
    min-height: 14px;
  }

  .boss-hud.is-sloth-archbishop .boss-church-pips > .boss-sloth-phase {
    min-width: 29px;
    height: 14px;
    padding: 0 3px;
    font-size: 5.7px;
    letter-spacing: 0.025em;
  }
}

@media (orientation: portrait) and (max-width: 760px) {
  .boss-hud.is-sloth-archbishop .boss-hud__name {
    letter-spacing: 0.035em;
  }

  .boss-hud.is-sloth-archbishop .boss-church-pips > .boss-sloth-phase {
    min-width: 40px;
    height: 18px;
    padding: 0 6px;
    font-size: 6.8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .boss-hud.is-sloth-archbishop .boss-sloth-phase,
  .boss-hud.is-sloth-archbishop .boss-sloth-phase::after,
  .boss-hud.is-sloth-archbishop.is-last-stand .boss-hud__frame {
    animation: none !important;
    transition-duration: 0s !important;
  }
}

/* Hordeheart boss presentation --------------------------------------- */

.boss-hud.is-hordeheart {
  --hordeheart-blood: #a5232d;
  --hordeheart-dark: #190609;
  --hordeheart-bone: #d6c39a;
  color: var(--hordeheart-bone);
  filter:
    drop-shadow(0 9px 15px rgba(8, 1, 2, 0.76))
    drop-shadow(0 0 11px rgba(147, 25, 35, 0.2));
}

.boss-hud.is-hordeheart .boss-hud__name {
  color: #ead9b5;
  font-weight: 800;
  letter-spacing: 0.075em;
  text-shadow:
    0 1px 0 #100203,
    0 2px 5px rgba(0, 0, 0, 0.98),
    0 0 10px rgba(179, 35, 44, 0.35);
}

.boss-hud.is-hordeheart .boss-hud__frame {
  border-color: rgba(174, 112, 73, 0.78);
  background:
    repeating-linear-gradient(112deg, transparent 0 18px, rgba(230, 201, 152, 0.025) 18px 20px),
    linear-gradient(90deg, #080303, #31090e 15%, #130406 50%, #31090e 85%, #080303);
  box-shadow:
    inset 0 0 0 1px rgba(235, 211, 172, 0.07),
    inset 0 -7px 11px rgba(5, 0, 1, 0.92),
    0 2px 0 #050101,
    0 8px 18px rgba(0, 0, 0, 0.56),
    0 0 12px rgba(143, 20, 29, 0.17);
}

.boss-hud.is-hordeheart .boss-hud__frame::before,
.boss-hud.is-hordeheart .boss-hud__frame::after {
  border-color: rgba(177, 119, 78, 0.78);
  background:
    linear-gradient(135deg, rgba(218, 195, 153, 0.12), transparent 42%),
    linear-gradient(135deg, #3b1114, #080202 70%);
}

.boss-hud.is-hordeheart .boss-health-track {
  border-color: #070102;
  background:
    repeating-linear-gradient(90deg, rgba(225, 199, 154, 0.025) 0 2px, transparent 2px 7px),
    linear-gradient(180deg, #25070b, #090203 68%, #120305);
}

.boss-hud.is-hordeheart .boss-health-lag {
  background: linear-gradient(180deg, #e0c69d, #a76655 44%, #4e1118);
}

.boss-hud.is-hordeheart .boss-health-fill,
.boss-hud.is-hordeheart.is-resistant .boss-health-fill {
  background:
    linear-gradient(180deg, rgba(255, 224, 184, 0.34), transparent 27%),
    repeating-linear-gradient(106deg, transparent 0 17px, rgba(225, 169, 119, 0.075) 17px 19px),
    linear-gradient(180deg, #d44846 0%, #8e1723 45%, #3e0710 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 221, 183, 0.58),
    inset 0 -3px 4px rgba(42, 0, 5, 0.78),
    0 0 10px rgba(187, 32, 42, 0.42);
}

.boss-hud.is-hordeheart.is-horde-phase .boss-health-fill,
.boss-hud.is-hordeheart.is-gathering .boss-health-fill {
  background:
    linear-gradient(180deg, rgba(231, 213, 174, 0.26), transparent 29%),
    repeating-linear-gradient(90deg, #783439 0 13px, #5d2028 13px 15px, #9c4243 15px 27px),
    linear-gradient(180deg, #a84b47, #55131c);
}

.boss-hud.is-hordeheart .boss-shield-sheen {
  background:
    repeating-linear-gradient(112deg, transparent 0 18px, rgba(255, 214, 174, 0.66) 22px, transparent 29px 54px),
    linear-gradient(90deg, rgba(91, 12, 19, 0.18), rgba(205, 77, 74, 0.52), rgba(91, 12, 19, 0.18));
  background-position: -180px 0, 0 0;
  background-size: 180px 100%, 100% 100%;
}

.boss-hud.is-hordeheart .boss-health-notch {
  background: linear-gradient(180deg, #e6d2a7, #7b4c32 38% 68%, #bd5b53);
  box-shadow: -1px 0 #070102, 1px 0 #070102, 0 0 5px rgba(190, 69, 67, 0.5);
}

.boss-hud.is-hordeheart .boss-hud__status,
.boss-hud.is-hordeheart:not(.is-shielded) .boss-hud__status,
.boss-hud.is-hordeheart.is-vulnerable .boss-hud__status {
  display: none;
  border-color: rgba(174, 101, 70, 0.3);
  background: linear-gradient(90deg, transparent, rgba(24, 3, 6, 0.94) 16% 84%, transparent);
  color: #d9a390;
  text-shadow: 0 1px 3px #000, 0 0 7px rgba(174, 28, 38, 0.32);
}

.boss-hud.is-hordeheart .boss-church-pips {
  display: none;
  gap: 4px;
  min-height: 22px;
}

.boss-hud.is-hordeheart .boss-church-pips > .boss-hordeheart-phase {
  box-sizing: border-box;
  display: inline-flex;
  width: auto;
  min-width: 36px;
  height: 20px;
  align-items: center;
  justify-content: center;
  padding: 0 7px;
  border: 1px solid rgba(177, 119, 78, 0.48);
  border-radius: 45% 35% 48% 31%;
  background: linear-gradient(180deg, #3d1418, #160609);
  color: #9b7569;
  font: 800 7px/1 var(--font-title);
  letter-spacing: 0.055em;
  text-transform: uppercase;
  box-shadow: inset 0 0 0 1px rgba(229, 205, 165, 0.035), 0 2px 5px rgba(0, 0, 0, 0.62);
  opacity: 0.48;
  transform: none;
}

.boss-hud.is-hordeheart .boss-hordeheart-phase::before {
  position: static;
  width: auto;
  height: auto;
  border-radius: 0;
  background: none;
  content: attr(data-label);
  transform: none;
}

.boss-hud.is-hordeheart .boss-hordeheart-phase::after {
  top: 3px;
  right: 3px;
  left: auto;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #7d3638;
  transform: none;
}

.boss-hud.is-hordeheart .boss-hordeheart-phase.is-completed,
.boss-hud.is-hordeheart .boss-hordeheart-phase[data-completed="true"] {
  border-color: rgba(193, 150, 100, 0.62);
  color: #c8aa7e;
  opacity: 0.74;
}

.boss-hud.is-hordeheart .boss-hordeheart-phase.is-active,
.boss-hud.is-hordeheart .boss-hordeheart-phase[data-active="true"] {
  border-color: #bc5a52;
  background: linear-gradient(180deg, #8c302f, #370a11 72%);
  color: #f0d5ae;
  box-shadow:
    inset 0 0 0 1px rgba(246, 215, 174, 0.09),
    0 0 9px rgba(184, 42, 48, 0.48);
  opacity: 1;
  animation: hordeheartBeat 0.92s ease-in-out infinite;
}

.boss-hud.is-hordeheart.is-splitting .boss-hud__frame {
  animation: hordeheartSplit 0.52s ease-in-out infinite alternate;
}

/* Hordeheart announcements reuse the existing warning node and markup. */

.bell-warning.is-hordeheart-announcement {
  border-color: rgba(182, 86, 69, 0.78);
  background:
    repeating-linear-gradient(112deg, transparent 0 22px, rgba(222, 178, 129, 0.03) 22px 24px),
    radial-gradient(circle at 11% 50%, rgba(142, 22, 31, 0.28), transparent 28%),
    linear-gradient(90deg, rgba(10, 2, 3, 0.98), rgba(54, 8, 13, 0.98), rgba(12, 3, 4, 0.98));
  box-shadow:
    inset 0 0 0 1px rgba(241, 211, 168, 0.065),
    0 0 25px rgba(157, 22, 31, 0.24),
    0 15px 38px rgba(0, 0, 0, 0.68);
}

.bell-warning.is-hordeheart-announcement .bell-warning__sigil {
  border-color: rgba(203, 118, 83, 0.78);
  background: radial-gradient(circle, #d65a51 0 12%, #6f111c 16% 42%, #180407 67%);
  box-shadow: inset 0 0 14px #250307, 0 0 14px rgba(193, 40, 45, 0.4);
  animation: hordeheartBeat 0.92s ease-in-out infinite;
}

.bell-warning.is-hordeheart-announcement .bell-warning__bell {
  width: 22px;
  height: 25px;
  border: 0;
  border-radius: 52% 48% 46% 54%;
  background: linear-gradient(145deg, #e07a65, #901d28 52%, #3b0710);
  box-shadow: inset 3px 2px rgba(255, 213, 174, 0.18), 0 0 8px rgba(218, 56, 58, 0.52);
  transform: rotate(-8deg);
  animation: none;
}

.bell-warning.is-hordeheart-announcement .bell-warning__bell::before,
.bell-warning.is-hordeheart-announcement .bell-warning__bell::after {
  display: none;
  content: none;
}

.bell-warning.is-hordeheart-announcement #bell-warning-title {
  color: #f0caa4;
}

.bell-warning.is-hordeheart-announcement #bell-warning-subtitle {
  color: #d38376;
}

@keyframes hordeheartBeat {
  0%,
  100% { transform: scale(1); }
  42% { transform: scale(1.05); }
  58% { transform: scale(0.98); }
}

@keyframes hordeheartSplit {
  from { filter: brightness(0.82); transform: scaleX(0.995); }
  to { filter: brightness(1.2); transform: scaleX(1.005); }
}

@media (orientation: landscape) and (max-width: 960px),
  (orientation: landscape) and (max-height: 520px) {
  .boss-hud.is-hordeheart .boss-church-pips > .boss-hordeheart-phase {
    min-width: 27px;
    height: 16px;
    padding: 0 4px;
    font-size: 5.7px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .boss-hud.is-hordeheart .boss-hordeheart-phase,
  .boss-hud.is-hordeheart.is-splitting .boss-hud__frame,
  .bell-warning.is-hordeheart-announcement .bell-warning__sigil {
    animation: none !important;
  }
}

.boss-hud.is-doppelganger {
  --boss-accent: #62ff83;
  --boss-accent-hot: #b9ffc2;
  --boss-shadow: rgba(21, 116, 51, 0.72);
}

.boss-hud.is-doppelganger .boss-hud__name {
  color: var(--boss-accent-hot);
  text-shadow:
    0 0 8px rgba(98, 255, 131, 0.72),
    0 2px 0 #12391d;
}

.boss-hud.is-doppelganger .boss-hud__frame {
  border-color: rgba(98, 255, 131, 0.68);
  box-shadow:
    0 0 0 1px rgba(12, 60, 25, 0.95),
    0 0 22px var(--boss-shadow);
}

.boss-hud.is-doppelganger .boss-health-lag {
  background: #d9ff80;
}

.boss-hud.is-doppelganger .boss-health-fill,
.boss-hud.is-doppelganger.is-resistant .boss-health-fill {
  background: linear-gradient(90deg, #126b31 0%, #39df61 55%, #a8ff99 100%);
  box-shadow: 0 0 14px rgba(75, 255, 108, 0.68);
}

.boss-hud.is-doppelganger .boss-hud__status {
  color: #9dffad;
}

/* Meta progression: wallet and contracts -------------------------------- */

.progression-wallet {
  position: fixed;
  top: max(18px, env(safe-area-inset-top));
  right: max(18px, env(safe-area-inset-right));
  z-index: 7;
  display: none;
  align-items: stretch;
  min-height: 66px;
  overflow: hidden;
  border: 1px solid rgba(255, 225, 169, 0.35);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(255, 231, 185, 0.08), transparent 42%),
    linear-gradient(180deg, rgba(67, 36, 18, 0.92), rgba(20, 12, 7, 0.95));
  box-shadow:
    0 20px 58px rgba(0, 0, 0, 0.46),
    inset 0 1px 0 rgba(255, 244, 217, 0.12),
    inset 0 -1px 0 rgba(62, 26, 9, 0.62);
  pointer-events: none;
  isolation: isolate;
  backdrop-filter: blur(12px);
}

.progression-wallet::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background:
    radial-gradient(circle at 14% 0%, rgba(255, 194, 91, 0.18), transparent 34%),
    repeating-linear-gradient(115deg, transparent 0 18px, rgba(255, 237, 196, 0.018) 18px 19px);
}

#game-root.is-menu:not(.is-intro) .progression-wallet {
  display: flex;
  animation: progressionWalletEnter 260ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.progression-wallet__currency {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(58px, auto);
  gap: 9px;
  align-items: center;
  min-width: 126px;
  padding: 10px 13px 10px 10px;
}

.progression-wallet__currency--contracts {
  min-width: 144px;
}

.progression-wallet__divider {
  align-self: stretch;
  width: 1px;
  margin: 9px 0;
  background: linear-gradient(transparent, rgba(255, 225, 169, 0.34), transparent);
}

.progression-wallet__icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 226, 170, 0.23);
  border-radius: 12px;
  background:
    radial-gradient(circle at 34% 26%, rgba(255, 244, 209, 0.18), transparent 32%),
    rgba(20, 12, 7, 0.52);
  box-shadow:
    inset 0 1px 0 rgba(255, 244, 217, 0.08),
    0 6px 14px rgba(0, 0, 0, 0.2);
}

.progression-wallet__icon svg {
  width: 34px;
  height: 34px;
  overflow: visible;
}

.progression-wallet__icon--dust {
  border-color: rgba(255, 196, 99, 0.32);
  background:
    radial-gradient(circle at 35% 27%, rgba(255, 221, 145, 0.25), transparent 39%),
    linear-gradient(145deg, rgba(85, 44, 20, 0.94), rgba(24, 13, 7, 0.94));
  box-shadow:
    inset 0 1px 0 rgba(255, 246, 215, 0.12),
    0 0 0 1px rgba(103, 48, 19, 0.24),
    0 0 18px rgba(225, 131, 44, 0.22),
    0 7px 14px rgba(0, 0, 0, 0.24);
}

.progression-wallet__glyph--dust {
  filter:
    drop-shadow(0 0 4px rgba(255, 199, 103, 0.62))
    drop-shadow(0 4px 3px rgba(36, 12, 4, 0.46));
  transform: rotate(5deg);
}

.progression-wallet__icon--seal {
  border-color: rgba(239, 133, 97, 0.38);
  background:
    radial-gradient(circle at 36% 26%, rgba(255, 174, 121, 0.22), transparent 40%),
    linear-gradient(145deg, rgba(77, 27, 20, 0.95), rgba(24, 11, 8, 0.95));
  box-shadow:
    inset 0 1px 0 rgba(255, 222, 191, 0.11),
    0 0 0 1px rgba(82, 24, 18, 0.35),
    0 0 18px rgba(199, 68, 43, 0.2),
    0 7px 14px rgba(0, 0, 0, 0.24);
}

.progression-wallet__glyph--seal {
  filter:
    drop-shadow(0 0 4px rgba(236, 112, 74, 0.56))
    drop-shadow(0 4px 3px rgba(36, 9, 5, 0.48));
  transform: rotate(-4deg);
}

.progression-wallet__copy {
  display: grid;
  gap: 2px;
  min-width: 0;
  align-content: center;
}

.progression-wallet__label {
  color: rgba(239, 204, 143, 0.8);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.13em;
  line-height: 1;
  text-transform: uppercase;
}

.progression-wallet__value,
.progression-wallet__fraction {
  color: #fff3d2;
  font: 900 22px/1 var(--font-title);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.6);
}

.progression-wallet__fraction {
  display: flex;
  gap: 3px;
  align-items: baseline;
}

.progression-wallet__fraction > span,
.progression-wallet__fraction output:last-child {
  color: rgba(243, 210, 153, 0.68);
  font-size: 14px;
}

.progression-wallet__currency.is-bumped .progression-wallet__icon {
  animation: progressionCurrencyBump 360ms cubic-bezier(0.2, 0.9, 0.24, 1.25);
}

.menu-contracts-btn {
  position: relative;
  grid-column: auto;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 18px;
  gap: 11px;
  align-items: center;
  width: 100%;
  min-height: 56px;
  padding: 9px 14px 9px 11px;
  overflow: hidden;
  border-color: rgba(255, 219, 153, 0.3);
  border-radius: 14px;
  background:
    linear-gradient(90deg, rgba(128, 67, 31, 0.9), rgba(57, 31, 17, 0.96)),
    rgba(48, 27, 15, 0.96);
  color: #ffe9b9;
  text-align: left;
  box-shadow:
    inset 0 1px 0 rgba(255, 244, 215, 0.15),
    inset 0 -3px 0 rgba(30, 12, 5, 0.34),
    0 10px 24px rgba(0, 0, 0, 0.2);
}

.menu-contracts-btn::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  background:
    radial-gradient(circle at 12% 12%, rgba(255, 209, 128, 0.16), transparent 28%),
    linear-gradient(90deg, transparent 0 66%, rgba(255, 231, 184, 0.05));
}

.menu-contracts-btn:hover,
.menu-contracts-btn:focus-visible {
  background:
    linear-gradient(90deg, rgba(156, 83, 38, 0.96), rgba(71, 38, 20, 0.98)),
    rgba(58, 31, 17, 0.98);
  color: #fff5d8;
}

.menu-contracts-btn__icon {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 220, 153, 0.25);
  border-radius: 10px;
  background: rgba(20, 12, 7, 0.36);
}

.menu-contracts-btn__icon svg {
  width: 31px;
  height: 31px;
}

.menu-contracts-btn__paper {
  fill: #d9aa64;
  stroke: #ffe2a3;
  stroke-linejoin: round;
  stroke-width: 1.3;
}

.menu-contracts-btn__fold,
.menu-contracts-btn__line,
.menu-contracts-btn__stamp {
  fill: none;
  stroke: #6f361e;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.menu-contracts-btn__stamp {
  stroke: #8e2f25;
  stroke-width: 2.2;
}

.menu-contracts-btn__copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 3px;
  min-width: 0;
}

.menu-contracts-btn__copy strong {
  font-size: 13px;
  letter-spacing: 0.1em;
  line-height: 1;
  text-transform: uppercase;
}

.menu-contracts-btn__copy small {
  overflow: hidden;
  color: rgba(248, 216, 160, 0.68);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.025em;
  line-height: 1.1;
  text-overflow: ellipsis;
  text-transform: none;
  white-space: nowrap;
}

.menu-contracts-btn__arrow,
.contracts-menu__back-arrow {
  position: relative;
  z-index: 1;
  width: 11px;
  height: 11px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  opacity: 0.72;
  transform: rotate(45deg);
}

.contracts-menu {
  --dialog-safe-left: env(safe-area-inset-left);
  --dialog-safe-right: env(safe-area-inset-right);
  --dialog-min-inline-gutter: 16px;
  --dialog-inline-gutter: max(
    var(--dialog-min-inline-gutter),
    var(--dialog-safe-left),
    var(--dialog-safe-right)
  );
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
  place-items: center;
  padding:
    max(16px, env(safe-area-inset-top))
    var(--dialog-inline-gutter)
    max(16px, env(safe-area-inset-bottom));
  background:
    radial-gradient(circle at 16% 5%, rgba(229, 151, 69, 0.16), transparent 31%),
    radial-gradient(circle at 84% 92%, rgba(116, 47, 27, 0.16), transparent 34%),
    linear-gradient(160deg, rgba(13, 8, 5, 0.78), rgba(5, 3, 2, 0.9));
  backdrop-filter: blur(9px);
}

.contracts-menu.is-visible {
  display: grid;
  animation: contractsBackdropEnter 180ms ease-out both;
}

.contracts-menu__panel {
  position: relative;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  width: min(1040px, 100%);
  min-width: 0;
  max-width: 100%;
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
  border: 1px solid rgba(255, 221, 157, 0.42);
  border-radius: 22px;
  background:
    radial-gradient(circle at 11% 0%, rgba(255, 202, 112, 0.14), transparent 26%),
    linear-gradient(155deg, rgba(77, 41, 20, 0.985), rgba(19, 12, 7, 0.99));
  box-shadow:
    0 32px 110px rgba(0, 0, 0, 0.68),
    inset 0 1px 0 rgba(255, 242, 213, 0.12),
    inset 0 0 0 1px rgba(73, 31, 11, 0.55);
  outline: 0;
  isolation: isolate;
}

.contracts-menu__panel::before,
.contracts-menu__panel::after {
  position: absolute;
  z-index: 5;
  top: 11px;
  width: 34px;
  height: 8px;
  pointer-events: none;
  content: "";
  border-top: 1px solid rgba(255, 218, 153, 0.28);
  border-bottom: 1px solid rgba(255, 218, 153, 0.12);
}

.contracts-menu__panel::before {
  left: 14px;
}

.contracts-menu__panel::after {
  right: 66px;
}

.contracts-menu.is-visible .contracts-menu__panel {
  animation: contractsPanelEnter 260ms cubic-bezier(0.2, 0.82, 0.22, 1) both;
}

.contracts-menu__close {
  position: absolute;
  z-index: 7;
  top: 13px;
  right: 13px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 11px;
  background:
    linear-gradient(180deg, rgba(126, 69, 35, 0.96), rgba(55, 29, 16, 0.98));
  color: #ffe8b7;
  font-size: 28px;
  font-weight: 500;
  line-height: 1;
}

.contracts-menu__header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  padding: 24px 72px 17px 24px;
  border-bottom: 1px solid rgba(255, 221, 157, 0.15);
}

.contracts-menu__title-block {
  min-width: 0;
}

.contracts-menu__eyebrow {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 7px;
  color: #e5ad61;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.18em;
  line-height: 1;
  text-transform: uppercase;
}

.contracts-menu__eyebrow > span {
  width: 28px;
  height: 1px;
  background: linear-gradient(90deg, #d47d3e, rgba(231, 176, 96, 0.22));
}

.contracts-menu h2 {
  margin: 0;
  color: #ffe2a3;
  font: 900 clamp(35px, 5vw, 54px) / 0.92 var(--font-title);
  letter-spacing: 0.015em;
  text-shadow: 0 7px 24px rgba(0, 0, 0, 0.4);
}

.contracts-menu__header p {
  max-width: 62ch;
  margin: 9px 0 0;
  color: rgba(255, 231, 189, 0.77);
  font-size: 12px;
  line-height: 1.4;
}

.contracts-menu__summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(104px, 1fr));
  gap: 8px;
}

.contracts-menu__summary-item {
  display: grid;
  grid-template-columns: 31px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-width: 112px;
  padding: 8px 10px 8px 8px;
  border: 1px solid rgba(255, 222, 159, 0.2);
  border-radius: 11px;
  background:
    linear-gradient(145deg, rgba(255, 231, 183, 0.07), transparent 55%),
    rgba(20, 12, 7, 0.48);
  box-shadow: inset 0 1px 0 rgba(255, 245, 219, 0.05);
}

.contracts-menu__summary-item > span:last-child {
  display: grid;
  gap: 2px;
}

.contracts-menu__summary-item small {
  color: rgba(231, 192, 124, 0.7);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.13em;
  line-height: 1;
  text-transform: uppercase;
}

.contracts-menu__summary-item output {
  color: #fff1cb;
  font: 900 19px/1 var(--font-title);
  font-variant-numeric: tabular-nums;
}

.contracts-menu__summary-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
}

.contracts-menu__summary-icon svg {
  width: 30px;
  height: 30px;
  overflow: visible;
}

.contracts-menu__summary-icon--dust svg {
  filter: drop-shadow(0 0 4px rgba(255, 193, 92, 0.58));
  transform: rotate(5deg);
}

.contracts-menu__summary-icon--mark svg {
  filter: drop-shadow(0 0 4px rgba(225, 83, 55, 0.52));
  transform: rotate(-4deg);
}

.contracts-menu__filters {
  display: grid;
  grid-template-columns: repeat(6, minmax(104px, 1fr));
  gap: 7px;
  padding: 10px 18px;
  overflow: hidden auto;
  border-bottom: 1px solid rgba(255, 221, 157, 0.14);
  background: rgba(16, 10, 6, 0.34);
  scrollbar-color: rgba(215, 142, 71, 0.55) transparent;
  scrollbar-width: thin;
}

.contracts-filter {
  position: relative;
  display: grid;
  grid-template-columns: 7px minmax(0, 1fr) auto;
  gap: 7px;
  align-items: center;
  min-width: 0;
  min-height: 38px;
  padding: 8px 9px;
  border-color: rgba(255, 222, 159, 0.16);
  border-radius: 10px;
  background: rgba(48, 29, 17, 0.82);
  color: rgba(246, 216, 164, 0.72);
  font-size: 9px;
  letter-spacing: 0.07em;
  box-shadow:
    inset 0 1px 0 rgba(255, 244, 215, 0.04),
    0 5px 12px rgba(0, 0, 0, 0.12);
}

.contracts-filter:hover,
.contracts-filter:focus-visible {
  background: rgba(78, 43, 22, 0.94);
  color: #fff0ca;
}

.contracts-filter.is-active,
.contracts-filter[aria-pressed="true"] {
  border-color: rgba(241, 168, 82, 0.48);
  background:
    linear-gradient(180deg, rgba(154, 78, 34, 0.96), rgba(77, 38, 20, 0.98));
  color: #fff1cc;
  box-shadow:
    inset 0 1px 0 rgba(255, 231, 186, 0.15),
    0 0 0 1px rgba(83, 34, 13, 0.55),
    0 6px 16px rgba(0, 0, 0, 0.2);
}

.contracts-filter__mark {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(207, 151, 84, 0.44);
  box-shadow: 0 0 0 2px rgba(211, 143, 69, 0.08);
}

.contracts-filter.is-active .contracts-filter__mark,
.contracts-filter[aria-pressed="true"] .contracts-filter__mark {
  background: #f6b763;
  box-shadow:
    0 0 0 2px rgba(246, 183, 99, 0.15),
    0 0 9px rgba(246, 183, 99, 0.55);
}

.contracts-filter output {
  display: grid;
  place-items: center;
  min-width: 21px;
  height: 20px;
  padding: 0 5px;
  border: 1px solid rgba(255, 225, 169, 0.13);
  border-radius: 999px;
  background: rgba(15, 9, 5, 0.4);
  color: rgba(255, 231, 187, 0.76);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

.contracts-menu__body {
  position: relative;
  min-height: 0;
  overflow: hidden;
  background:
    linear-gradient(rgba(35, 20, 11, 0.31), rgba(18, 11, 7, 0.48)),
    repeating-linear-gradient(0deg, transparent 0 25px, rgba(255, 230, 180, 0.013) 25px 26px);
}

.contracts-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-content: start;
  height: 100%;
  min-height: 180px;
  max-height: min(58vh, 620px);
  padding: 13px 16px 16px;
  overflow: hidden auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  scrollbar-color: rgba(211, 132, 63, 0.64) rgba(15, 9, 5, 0.32);
  scrollbar-width: thin;
}

.contracts-list::-webkit-scrollbar {
  width: 9px;
}

.contracts-list::-webkit-scrollbar-track {
  border-radius: 999px;
  background: rgba(15, 9, 5, 0.3);
}

.contracts-list::-webkit-scrollbar-thumb {
  border: 2px solid rgba(19, 11, 6, 0.8);
  border-radius: 999px;
  background: linear-gradient(#d68a47, #81401f);
}

.contracts-empty {
  position: absolute;
  inset: 14px 18px 18px;
  place-content: center;
  justify-items: center;
  gap: 7px;
  min-height: 190px;
  border: 1px dashed rgba(255, 218, 153, 0.22);
  border-radius: 14px;
  background: rgba(18, 11, 7, 0.28);
  color: rgba(240, 205, 145, 0.68);
  text-align: center;
}

.contracts-empty:not([hidden]) {
  display: grid;
}

.contracts-empty strong {
  color: #fbe0aa;
  font: 800 20px/1.1 var(--font-title);
}

.contracts-empty > span:last-child {
  font-size: 11px;
}

.contracts-empty__seal {
  position: relative;
  width: 44px;
  height: 44px;
  margin-bottom: 4px;
  border: 2px solid rgba(213, 116, 82, 0.76);
  border-radius: 50%;
  background: rgba(125, 43, 32, 0.76);
  box-shadow:
    0 0 0 4px rgba(65, 23, 16, 0.46),
    0 10px 22px rgba(0, 0, 0, 0.24);
}

.contracts-empty__seal::before,
.contracts-empty__seal::after {
  position: absolute;
  content: "";
  background: rgba(245, 187, 113, 0.7);
}

.contracts-empty__seal::before {
  top: 20px;
  left: 10px;
  width: 24px;
  height: 2px;
  transform: rotate(45deg);
}

.contracts-empty__seal::after {
  top: 20px;
  left: 10px;
  width: 24px;
  height: 2px;
  transform: rotate(-45deg);
}

.contract-card {
  --contract-accent: #d58a49;
  --contract-accent-soft: rgba(213, 138, 73, 0.17);
  --contract-progress: 0;
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(48px, auto) auto;
  gap: 9px;
  min-width: 0;
  min-height: 164px;
  padding: 13px 14px 12px 17px;
  overflow: hidden;
  border: 1px solid rgba(255, 223, 162, 0.2);
  border-radius: 12px;
  background:
    radial-gradient(circle at 4% 0%, var(--contract-accent-soft), transparent 38%),
    linear-gradient(150deg, rgba(82, 46, 25, 0.92), rgba(31, 19, 11, 0.97));
  color: #fff0cc;
  box-shadow:
    inset 0 1px 0 rgba(255, 244, 216, 0.065),
    inset 0 -1px 0 rgba(38, 15, 6, 0.45),
    0 7px 17px rgba(0, 0, 0, 0.19);
  transition:
    border-color 150ms ease,
    transform 150ms ease,
    background-color 150ms ease;
}

.contract-card::before {
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: 0;
  width: 3px;
  pointer-events: none;
  content: "";
  border-radius: 0 999px 999px 0;
  background: linear-gradient(180deg, transparent, var(--contract-accent) 24% 76%, transparent);
  box-shadow: 0 0 12px var(--contract-accent-soft);
  opacity: 0.72;
}

.contract-card::after {
  position: absolute;
  top: 0;
  right: 14px;
  width: 74px;
  height: 2px;
  pointer-events: none;
  content: "";
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--contract-accent), transparent);
  box-shadow: 0 0 9px var(--contract-accent-soft);
  opacity: 0.55;
}

.contract-card:hover {
  border-color: rgba(255, 215, 145, 0.38);
  transform: translateY(-1px);
}

.contract-card[data-contract-group="hunting"] {
  --contract-accent: #d58a49;
  --contract-accent-soft: rgba(213, 138, 73, 0.18);
}

.contract-card[data-contract-group="arsenal"] {
  --contract-accent: #d1b66c;
  --contract-accent-soft: rgba(209, 182, 108, 0.17);
}

.contract-card[data-contract-group="bosses"] {
  --contract-accent: #d75f4c;
  --contract-accent-soft: rgba(215, 95, 76, 0.18);
}

.contract-card[data-contract-group="journey"] {
  --contract-accent: #7fb58d;
  --contract-accent-soft: rgba(127, 181, 141, 0.16);
}

.contract-card[data-contract-group="multiplayer"] {
  --contract-accent: #82aeca;
  --contract-accent-soft: rgba(130, 174, 202, 0.16);
}

.contract-card__pin {
  display: none;
}

.contract-card__header {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.contract-card__category {
  color: var(--contract-accent);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.14em;
  line-height: 1;
  text-transform: uppercase;
}

.contract-card__badges {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  min-width: 0;
}

.contract-card__state {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  flex: 0 0 auto;
  color: rgba(244, 217, 171, 0.56);
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.contract-card__state > span:first-child {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--contract-accent);
  box-shadow: 0 0 7px var(--contract-accent-soft);
}

.contract-card__state [data-contract-status] {
  width: auto;
  height: auto;
  background: none;
  box-shadow: none;
}

.contract-card__copy {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.contract-card h3 {
  margin: 0;
  overflow-wrap: anywhere;
  color: #ffe4aa;
  font: 800 18px/1.08 var(--font-title);
  letter-spacing: 0.01em;
}

.contract-card p {
  display: -webkit-box;
  margin: 5px 0 0;
  overflow: hidden;
  color: rgba(255, 229, 184, 0.68);
  font-size: 10px;
  line-height: 1.34;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.contract-card__progress {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 5px;
}

.contract-card__progress-copy {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: rgba(231, 193, 126, 0.58);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.1em;
  line-height: 1;
  text-transform: uppercase;
}

.contract-card__progress-copy output {
  color: #f9d894;
  font-size: 9px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

.contract-card__progress-track {
  height: 7px;
  overflow: hidden;
  border: 1px solid rgba(255, 224, 163, 0.16);
  border-radius: 999px;
  background: rgba(14, 8, 5, 0.58);
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.44),
    0 1px 0 rgba(255, 238, 199, 0.035);
}

.contract-card__progress-fill {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--contract-accent) 72%, #743718), var(--contract-accent));
  box-shadow: 0 0 10px var(--contract-accent-soft);
  transform: scaleX(var(--contract-progress));
  transform-origin: left center;
  transition: transform 260ms ease-out;
}

.contract-card__reward {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  flex: 0 0 auto;
  max-width: min(190px, 76%);
  padding: 3px 6px 3px 4px;
  border: 1px solid rgba(226, 126, 88, 0.25);
  border-radius: 999px;
  background: rgba(61, 24, 17, 0.34);
  color: #f8d59b;
  font-size: 7px;
  letter-spacing: 0.035em;
  line-height: 1;
  text-transform: uppercase;
}

.contract-card__reward [data-contract-reward] {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contract-card__reward-mark {
  position: relative;
  flex: 0 0 auto;
  width: 13px;
  height: 13px;
  border: 1px solid #df7958;
  border-radius: 50%;
  background: #8f3025;
  box-shadow:
    0 0 0 1px rgba(57, 19, 14, 0.7),
    0 0 6px rgba(205, 79, 53, 0.2);
}

.contract-card__reward-mark::after {
  position: absolute;
  inset: 3px;
  content: "";
  background: #f2b56d;
  clip-path: polygon(50% 0, 62% 35%, 100% 39%, 70% 61%, 79% 100%, 50% 76%, 21% 100%, 30% 61%, 0 39%, 38% 35%);
}

.contract-card.is-complete {
  --contract-accent: #8ad09a;
  --contract-accent-soft: rgba(103, 191, 123, 0.18);
  border-color: rgba(133, 211, 151, 0.34);
  background:
    radial-gradient(circle at 7% 0%, rgba(101, 193, 123, 0.17), transparent 34%),
    linear-gradient(155deg, rgba(61, 73, 38, 0.91), rgba(29, 35, 20, 0.96));
}

.contract-card.is-complete .contract-card__state {
  color: #aee9b9;
}

.contract-card.is-complete .contract-card__state > span:first-child {
  position: relative;
  width: 14px;
  height: 14px;
  border: 1px solid #8bd29b;
  background: #2f6e40;
  box-shadow: 0 0 9px rgba(106, 210, 130, 0.28);
}

.contract-card.is-complete .contract-card__state > span:first-child::before {
  position: absolute;
  top: 2px;
  left: 3px;
  width: 5px;
  height: 3px;
  content: "";
  border-bottom: 2px solid #e2ffe8;
  border-left: 2px solid #e2ffe8;
  transform: rotate(-45deg);
}

.contracts-menu__footer {
  display: grid;
  grid-template-columns: auto minmax(120px, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 11px 18px;
  border-top: 1px solid rgba(255, 221, 157, 0.16);
  background:
    linear-gradient(180deg, rgba(90, 46, 22, 0.32), rgba(17, 10, 6, 0.58));
}

.contracts-menu__completion {
  display: flex;
  gap: 8px;
  align-items: baseline;
  color: rgba(231, 193, 126, 0.65);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.contracts-menu__completion strong {
  display: flex;
  gap: 2px;
  color: #ffe4aa;
  font: 900 14px/1 var(--font-title);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

.contracts-menu__completion-track {
  height: 7px;
  overflow: hidden;
  border: 1px solid rgba(255, 220, 153, 0.17);
  border-radius: 999px;
  background: rgba(13, 8, 5, 0.62);
}

.contracts-menu__completion-fill {
  --contracts-completion: 0;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #a44a28, #e8a44e 62%, #f4cc79);
  box-shadow: 0 0 10px rgba(233, 158, 70, 0.3);
  transform: scaleX(var(--contracts-completion));
  transform-origin: left center;
  transition: transform 300ms ease-out;
}

.contracts-menu__back {
  display: grid;
  grid-template-columns: 12px auto;
  gap: 8px;
  place-items: center;
  min-width: 156px;
  min-height: 42px;
  padding: 10px 15px;
  border-radius: 11px;
  font-size: 10px;
}

.contracts-menu__back-arrow {
  transform: rotate(-135deg);
}

/* Unlock shop ----------------------------------------------------------- */

.menu-unlocks-btn {
  border-color: rgba(231, 183, 100, 0.34);
  background:
    linear-gradient(90deg, rgba(104, 56, 29, 0.94), rgba(43, 29, 18, 0.98)),
    rgba(45, 28, 16, 0.98);
}

.menu-unlocks-btn::before {
  background:
    radial-gradient(circle at 14% 14%, rgba(255, 220, 145, 0.18), transparent 29%),
    linear-gradient(90deg, transparent 0 62%, rgba(246, 198, 116, 0.06));
}

.menu-unlocks-btn:hover,
.menu-unlocks-btn:focus-visible {
  background:
    linear-gradient(90deg, rgba(133, 73, 34, 0.97), rgba(61, 39, 21, 0.99)),
    rgba(52, 32, 17, 0.99);
}

.menu-unlocks-btn__icon {
  border-color: rgba(244, 197, 115, 0.31);
  background:
    radial-gradient(circle at 35% 24%, rgba(255, 233, 180, 0.13), transparent 40%),
    rgba(24, 15, 8, 0.55);
}

.menu-unlocks-btn__card {
  fill: #bf874d;
  stroke: #f5c978;
  stroke-linejoin: round;
  stroke-width: 1.25;
}

.menu-unlocks-btn__card--back {
  fill: #7b4828;
  stroke: #dca660;
}

.menu-unlocks-btn__lock {
  fill: rgba(61, 30, 16, 0.96);
  stroke: #ffe2a1;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.45;
}

.menu-unlocks-btn__key {
  fill: #f8bd63;
  filter: drop-shadow(0 0 3px rgba(247, 184, 88, 0.72));
}

.unlock-shop__panel {
  width: min(1120px, 100%);
  height: min(780px, 100%);
  max-height: 100%;
}

.unlock-shop__summary-icon {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border: 1px solid rgba(244, 196, 110, 0.38);
  border-radius: 8px;
  background:
    radial-gradient(circle at 33% 25%, rgba(255, 239, 199, 0.2), transparent 38%),
    linear-gradient(145deg, #8f562d, #3e2415);
  color: #ffe4a5;
  font: 900 15px/1 var(--font-title);
  box-shadow:
    inset 0 1px 0 rgba(255, 243, 213, 0.12),
    0 0 12px rgba(224, 146, 58, 0.15);
  transform: rotate(-3deg);
}

.unlock-shop__tabs {
  grid-template-columns: repeat(4, minmax(132px, 1fr));
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  touch-action: pan-x;
}

.unlock-shop__tabs .contracts-filter {
  min-height: 44px;
}

.unlock-shop__body {
  min-height: 0;
  overflow: hidden;
}

.unlock-shop__content {
  height: 100%;
  min-height: 270px;
  padding: 14px 16px 18px;
  overflow: hidden auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  scrollbar-color: rgba(211, 132, 63, 0.64) rgba(15, 9, 5, 0.32);
  scrollbar-width: thin;
}

.unlock-shop__content::-webkit-scrollbar {
  width: 9px;
}

.unlock-shop__content::-webkit-scrollbar-track {
  border-radius: 999px;
  background: rgba(15, 9, 5, 0.3);
}

.unlock-shop__content::-webkit-scrollbar-thumb {
  border: 2px solid rgba(19, 11, 6, 0.8);
  border-radius: 999px;
  background: linear-gradient(#d68a47, #81401f);
}

.unlock-shop__section-title {
  display: grid;
  gap: 5px;
  margin: 0 0 13px;
}

.unlock-shop__section-title h3,
.unlock-shop__section-title strong {
  margin: 0;
  color: #ffe3a7;
  font: 800 22px/1.08 var(--font-title);
  letter-spacing: 0.015em;
}

.unlock-shop__section-title p,
.unlock-shop__section-title span {
  max-width: 76ch;
  margin: 0;
  color: rgba(244, 214, 163, 0.66);
  font-size: 10px;
  line-height: 1.4;
}

.unlock-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 11px;
  align-content: start;
}

.unlock-grid--classes,
.unlock-shop__content[data-unlock-view="classes"] .unlock-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.unlock-grid--mastery,
.unlock-shop__content[data-unlock-view="mastery"] .unlock-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.unlock-card {
  --unlock-accent: #d99851;
  --unlock-accent-soft: rgba(217, 152, 81, 0.16);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-width: 0;
  min-height: 188px;
  padding: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 222, 160, 0.22);
  border-radius: 13px;
  background:
    radial-gradient(circle at 5% 0%, var(--unlock-accent-soft), transparent 40%),
    linear-gradient(150deg, rgba(78, 45, 25, 0.93), rgba(29, 18, 11, 0.98));
  color: #fff0cc;
  box-shadow:
    inset 0 1px 0 rgba(255, 244, 216, 0.065),
    inset 0 -1px 0 rgba(38, 15, 6, 0.45),
    0 7px 17px rgba(0, 0, 0, 0.19);
  transition:
    border-color 150ms ease,
    transform 150ms ease,
    box-shadow 150ms ease;
}

.unlock-card::before {
  position: absolute;
  top: 13px;
  bottom: 13px;
  left: 0;
  width: 3px;
  pointer-events: none;
  content: "";
  border-radius: 0 999px 999px 0;
  background: linear-gradient(180deg, transparent, var(--unlock-accent) 24% 76%, transparent);
  box-shadow: 0 0 12px var(--unlock-accent-soft);
}

.unlock-card:hover {
  border-color: rgba(255, 218, 151, 0.38);
  transform: translateY(-1px);
}

.unlock-card.is-unlocked {
  --unlock-accent: #8bc89a;
  --unlock-accent-soft: rgba(107, 196, 128, 0.15);
  border-color: rgba(135, 205, 150, 0.29);
  background:
    radial-gradient(circle at 5% 0%, rgba(105, 194, 126, 0.14), transparent 40%),
    linear-gradient(150deg, rgba(52, 67, 37, 0.92), rgba(25, 32, 20, 0.98));
}

.unlock-card.is-locked {
  --unlock-accent: #a77651;
  --unlock-accent-soft: rgba(167, 118, 81, 0.13);
  border-color: rgba(218, 180, 124, 0.2);
  background:
    repeating-linear-gradient(135deg, transparent 0 18px, rgba(255, 230, 184, 0.018) 18px 20px),
    radial-gradient(circle at 5% 0%, rgba(173, 120, 75, 0.11), transparent 40%),
    linear-gradient(150deg, rgba(61, 39, 24, 0.96), rgba(25, 17, 11, 0.99));
}

.unlock-card.is-marked {
  --unlock-accent: #f0bd63;
  --unlock-accent-soft: rgba(240, 189, 99, 0.2);
  border-color: rgba(244, 196, 109, 0.48);
  box-shadow:
    inset 0 0 0 1px rgba(255, 232, 184, 0.08),
    0 0 17px rgba(224, 144, 48, 0.13),
    0 7px 17px rgba(0, 0, 0, 0.2);
}

.unlock-card__header,
.unlock-card__top {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: flex-start;
}

.unlock-card__eyebrow {
  color: var(--unlock-accent);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.13em;
  line-height: 1.15;
  text-transform: uppercase;
}

.unlock-card__status {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  flex: 0 0 auto;
  min-height: 22px;
  padding: 4px 7px;
  border: 1px solid color-mix(in srgb, var(--unlock-accent) 35%, transparent);
  border-radius: 999px;
  background: rgba(13, 8, 5, 0.34);
  color: color-mix(in srgb, var(--unlock-accent) 82%, #ffe9bf);
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 0.075em;
  line-height: 1;
  text-transform: uppercase;
}

.unlock-card__copy {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.unlock-card h3 {
  margin: 0;
  overflow-wrap: anywhere;
  color: #ffe4aa;
  font: 800 18px/1.08 var(--font-title);
}

.unlock-card__copy p,
.unlock-card > p {
  margin: 6px 0 0;
  color: rgba(255, 229, 184, 0.68);
  font-size: 10px;
  line-height: 1.36;
}

.unlock-card__meta {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: auto;
  color: rgba(234, 195, 131, 0.66);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.unlock-card__meta > span {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 4px 7px;
  border: 1px solid rgba(255, 222, 159, 0.13);
  border-radius: 999px;
  background: rgba(16, 9, 5, 0.26);
}

.unlock-card__footer {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: auto;
}

.unlock-card__price {
  display: inline-flex;
  gap: 5px;
  align-items: baseline;
  min-width: 0;
  color: #ffd88e;
  font: 900 15px/1 var(--font-title);
  font-variant-numeric: tabular-nums;
}

.unlock-card__price small {
  color: rgba(232, 191, 123, 0.65);
  font: 900 7px/1 var(--font-ui);
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.unlock-card__action,
.unlock-purchase-btn,
.unlock-shop button[data-purchase-class],
.unlock-shop button[data-purchase-card] {
  min-width: 108px;
  min-height: 44px;
  margin-left: auto;
  padding: 9px 13px;
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(190, 104, 46, 0.98), rgba(98, 48, 24, 0.99));
  color: #fff0c7;
  font-size: 9px;
  box-shadow:
    inset 0 1px 0 rgba(255, 235, 194, 0.16),
    0 6px 13px rgba(0, 0, 0, 0.2);
}

.unlock-card__action:hover,
.unlock-card__action:focus-visible,
.unlock-purchase-btn:hover,
.unlock-purchase-btn:focus-visible,
.unlock-shop button[data-purchase-class]:hover,
.unlock-shop button[data-purchase-class]:focus-visible,
.unlock-shop button[data-purchase-card]:hover,
.unlock-shop button[data-purchase-card]:focus-visible {
  background:
    linear-gradient(180deg, rgba(219, 132, 58, 0.99), rgba(119, 58, 27, 0.99));
  color: #fff8e2;
}

.unlock-card__action:disabled,
.unlock-purchase-btn:disabled,
.unlock-shop button[data-purchase-class]:disabled,
.unlock-shop button[data-purchase-card]:disabled {
  border-color: rgba(203, 165, 111, 0.17);
  background: rgba(43, 30, 20, 0.78);
  color: rgba(230, 200, 153, 0.48);
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.72;
}

.unlock-card__progress {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 5px;
  margin-top: auto;
}

.unlock-card__progress-copy {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: rgba(231, 193, 126, 0.64);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.unlock-card__progress-track {
  height: 7px;
  overflow: hidden;
  border: 1px solid rgba(255, 224, 163, 0.16);
  border-radius: 999px;
  background: rgba(14, 8, 5, 0.58);
}

.unlock-card__progress-fill {
  --unlock-progress: 0;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #965027, var(--unlock-accent));
  box-shadow: 0 0 9px var(--unlock-accent-soft);
  transform: scaleX(var(--unlock-progress));
  transform-origin: left center;
  transition: transform 260ms ease-out;
}

.unlock-shop__notice {
  min-height: 0;
  margin-bottom: 12px;
  padding: 10px 13px;
  border: 1px solid rgba(245, 199, 116, 0.2);
  border-radius: 11px;
  background:
    linear-gradient(90deg, rgba(130, 72, 34, 0.22), transparent),
    rgba(24, 14, 8, 0.42);
  color: rgba(249, 220, 168, 0.72);
  font-size: 10px;
  line-height: 1.4;
}

.unlock-shop__empty {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
  min-height: 210px;
  padding: 24px;
  border: 1px dashed rgba(255, 218, 153, 0.24);
  border-radius: 14px;
  background:
    radial-gradient(circle at 50% 8%, rgba(224, 148, 66, 0.1), transparent 42%),
    rgba(18, 11, 7, 0.28);
  color: rgba(240, 205, 145, 0.7);
  text-align: center;
}

.unlock-shop__empty strong {
  color: #fbe0aa;
  font: 800 20px/1.1 var(--font-title);
}

.unlock-shop__empty p {
  max-width: 52ch;
  margin: 0;
  font-size: 11px;
  line-height: 1.45;
}

.marked-deck {
  display: grid;
  gap: 13px;
  align-content: start;
}

.marked-deck__intro {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3px;
  align-items: center;
  padding: 11px 13px;
  border: 1px solid rgba(245, 199, 116, 0.2);
  border-radius: 12px;
  background:
    linear-gradient(90deg, rgba(130, 72, 34, 0.24), transparent),
    rgba(24, 14, 8, 0.46);
}

.marked-deck__intro p {
  margin: 0;
  color: rgba(249, 220, 168, 0.72);
  font-size: 10px;
  line-height: 1.4;
}

.marked-deck__intro h3 {
  margin: 0 0 4px;
  color: #ffe3a7;
  font: 800 19px/1.08 var(--font-title);
}

.marked-deck__weight {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid rgba(244, 194, 103, 0.34);
  border-radius: 999px;
  background: rgba(84, 45, 20, 0.7);
  color: #ffdd9a;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.08em;
  white-space: nowrap;
  text-transform: uppercase;
}

.marked-deck__slots {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.marked-deck__slot {
  display: grid;
  place-items: center;
  min-height: 54px;
  padding: 7px 9px;
  border: 1px dashed rgba(224, 167, 89, 0.29);
  border-radius: 10px;
  background: rgba(18, 11, 7, 0.37);
  color: rgba(232, 193, 131, 0.53);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.065em;
  line-height: 1.25;
  text-align: center;
  text-transform: uppercase;
}

.marked-deck__slot.is-filled {
  border-style: solid;
  border-color: rgba(244, 194, 103, 0.42);
  background:
    radial-gradient(circle at 50% 0%, rgba(240, 183, 83, 0.15), transparent 48%),
    rgba(65, 38, 20, 0.7);
  color: #ffe3a6;
}

.marked-deck__list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.marked-deck__choice {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "title weight"
    "path weight";
  gap: 8px;
  align-items: center;
  width: 100%;
  min-height: 48px;
  padding: 9px 11px;
  border: 1px solid rgba(255, 220, 157, 0.18);
  border-radius: 10px;
  background: rgba(54, 34, 21, 0.88);
  color: rgba(255, 229, 181, 0.77);
  font-size: 9px;
  line-height: 1.2;
  text-align: left;
}

.marked-deck__choice > strong {
  display: -webkit-box;
  grid-area: title;
  overflow: hidden;
  color: inherit;
  font-size: 10px;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.marked-deck__choice > span:not(.marked-deck__weight) {
  grid-area: path;
  overflow: hidden;
  color: rgba(235, 197, 137, 0.56);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.045em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.marked-deck__choice .marked-deck__weight {
  grid-area: weight;
}

.marked-deck__choice:hover,
.marked-deck__choice:focus-visible {
  border-color: rgba(244, 194, 103, 0.42);
  background: rgba(83, 48, 24, 0.95);
  color: #fff0ca;
}

.marked-deck__choice.is-marked,
.marked-deck__choice.is-selected,
.marked-deck__choice[aria-pressed="true"] {
  border-color: rgba(244, 194, 103, 0.58);
  background:
    radial-gradient(circle at 8% 0%, rgba(248, 203, 117, 0.17), transparent 42%),
    linear-gradient(145deg, rgba(128, 70, 31, 0.98), rgba(62, 35, 19, 0.98));
  color: #ffedc1;
  box-shadow:
    inset 0 1px 0 rgba(255, 237, 198, 0.11),
    0 0 12px rgba(226, 147, 50, 0.1);
}

.marked-deck__choice.is-selected .marked-deck__weight,
.marked-deck__choice[aria-pressed="true"] .marked-deck__weight {
  border-color: rgba(255, 221, 151, 0.58);
  background: rgba(145, 76, 29, 0.88);
  color: #fff0c4;
  box-shadow: 0 0 9px rgba(240, 174, 72, 0.16);
}

.marked-deck__choice:disabled {
  opacity: 0.68;
  cursor: not-allowed;
}

.unlock-shop__footer {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.unlock-shop__status {
  min-width: 0;
  color: rgba(237, 202, 145, 0.67);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.3;
}

.unlock-shop__status.is-error,
.unlock-shop__status[data-kind="error"] {
  color: #f3a086;
}

.unlock-shop__status.is-success,
.unlock-shop__status[data-kind="success"] {
  color: #a9dda9;
}

.unlock-shop__save {
  min-height: 44px;
  padding: 9px 14px;
  border-color: rgba(244, 194, 103, 0.44);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(172, 94, 39, 0.98), rgba(85, 42, 21, 0.99));
  color: #ffefc5;
  font-size: 9px;
}

.unlock-shop__save:hover,
.unlock-shop__save:focus-visible {
  background:
    linear-gradient(180deg, rgba(207, 121, 49, 0.99), rgba(108, 52, 24, 0.99));
}

.unlock-shop__save:disabled {
  border-color: rgba(205, 167, 111, 0.16);
  background: rgba(43, 29, 19, 0.8);
  color: rgba(226, 194, 144, 0.43);
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.72;
}

.unlock-shop :is(
  .contracts-filter,
  .unlock-card__action,
  .unlock-purchase-btn,
  .marked-deck__choice,
  .unlock-shop__save,
  .contracts-menu__back
):focus-visible {
  outline: 2px solid #f6c36e;
  outline-offset: 2px;
}

.progression-toast-stack {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 24;
  display: grid;
  gap: 8px;
  width: min(360px, calc(100vw - 36px));
  pointer-events: none;
}

.progression-toast {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 5px;
  grid-template-rows: auto auto;
  column-gap: 14px;
  row-gap: 4px;
  align-items: center;
  min-height: 80px;
  padding: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 222, 159, 0.32);
  border-radius: 13px;
  background:
    radial-gradient(circle at 10% 0%, rgba(255, 202, 105, 0.15), transparent 35%),
    linear-gradient(150deg, rgba(71, 38, 19, 0.97), rgba(18, 11, 7, 0.985));
  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.48),
    inset 0 1px 0 rgba(255, 243, 213, 0.09);
  contain: layout paint style;
  animation: progressionToastEnter 260ms cubic-bezier(0.2, 0.82, 0.22, 1) both;
  will-change: transform, opacity;
}

.progression-toast.is-leaving {
  animation: progressionToastLeave 180ms ease-in both;
}

.progression-toast__icon {
  position: relative;
  z-index: 1;
  display: grid;
  grid-column: 1;
  grid-row: 1 / 3;
  place-items: center;
  box-sizing: border-box;
  width: 56px;
  height: 56px;
  padding: 0;
  overflow: visible;
  border: 1px solid rgba(255, 220, 153, 0.38);
  border-radius: 15px;
  background:
    radial-gradient(circle at 38% 30%, rgba(255, 218, 139, 0.2), transparent 42%),
    linear-gradient(145deg, rgba(84, 44, 20, 0.92), rgba(24, 13, 7, 0.92));
  box-shadow:
    inset 0 1px 0 rgba(255, 239, 201, 0.12),
    0 0 0 2px rgba(103, 48, 19, 0.3),
    0 8px 18px rgba(0, 0, 0, 0.3);
}

.progression-toast__icon::before {
  position: relative;
  z-index: 1;
  width: 32px;
  height: 32px;
  content: "";
  border: 2px solid #ffe0a0;
  background:
    linear-gradient(135deg, #ffe09a 0 18%, #eda84c 19% 55%, #a84a25 56% 100%);
  box-shadow:
    inset 6px 3px 7px rgba(255, 244, 207, 0.2),
    inset -6px -7px 8px rgba(88, 29, 12, 0.28),
    0 0 15px rgba(246, 168, 67, 0.62);
  clip-path: polygon(50% 0, 88% 20%, 100% 61%, 70% 100%, 21% 91%, 0 52%, 16% 13%);
  transform: rotate(7deg);
}

.progression-toast[data-kind="dust"] .progression-toast__icon::after,
.progression-toast--dust .progression-toast__icon::after {
  position: absolute;
  z-index: 2;
  top: 14px;
  left: 21px;
  width: 7px;
  height: 19px;
  content: "";
  border-left: 2px solid rgba(255, 250, 223, 0.8);
  border-radius: 50%;
  filter: drop-shadow(0 0 3px rgba(255, 238, 183, 0.8));
  transform: rotate(38deg);
}

.progression-toast[data-kind="contract"] .progression-toast__icon::before,
.progression-toast[data-kind="mastery"] .progression-toast__icon::before,
.progression-toast--contract .progression-toast__icon::before,
.progression-toast--mastery .progression-toast__icon::before {
  width: 36px;
  height: 36px;
  border: 3px solid #f09a72;
  border-radius: 50%;
  background:
    radial-gradient(circle at 38% 28%, rgba(255, 183, 131, 0.28), transparent 34%),
    linear-gradient(145deg, #b94b38, #75231d);
  clip-path: none;
  box-shadow:
    inset 0 0 0 4px rgba(255, 190, 122, 0.08),
    0 0 0 3px rgba(54, 18, 13, 0.72),
    0 0 18px rgba(226, 94, 62, 0.54);
  transform: rotate(-5deg);
}

.progression-toast[data-kind="contract"] .progression-toast__icon::after,
.progression-toast[data-kind="mastery"] .progression-toast__icon::after,
.progression-toast--contract .progression-toast__icon::after,
.progression-toast--mastery .progression-toast__icon::after {
  position: absolute;
  z-index: 2;
  width: 14px;
  height: 14px;
  content: "";
  background: #ffd18a;
  filter: drop-shadow(0 0 4px rgba(255, 199, 119, 0.62));
  clip-path: polygon(50% 0, 62% 35%, 100% 39%, 70% 61%, 79% 100%, 50% 76%, 21% 100%, 30% 61%, 0 39%, 38% 35%);
}

.progression-toast__icon::before,
.progression-toast__icon::after {
  display: none;
}

.progression-toast__icon-svg {
  display: none;
  width: 44px;
  height: 44px;
  overflow: visible;
}

.progression-toast:not([data-kind]) .progression-toast__icon-svg--dust,
.progression-toast[data-kind="dust"] .progression-toast__icon-svg--dust,
.progression-toast--dust .progression-toast__icon-svg--dust,
.progression-toast[data-kind="contract"] .progression-toast__icon-svg--contract,
.progression-toast[data-kind="mastery"] .progression-toast__icon-svg--contract,
.progression-toast--contract .progression-toast__icon-svg--contract,
.progression-toast--mastery .progression-toast__icon-svg--contract {
  display: block;
}

.progression-toast__icon-svg--dust {
  filter:
    drop-shadow(0 0 5px rgba(255, 199, 103, 0.72))
    drop-shadow(0 6px 5px rgba(36, 12, 4, 0.55));
  transform: rotate(5deg);
}

.progression-toast__dust-outline {
  fill: #aa4a25;
  stroke: #ffe0a0;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.progression-toast__dust-face--light {
  fill: #ffe09a;
}

.progression-toast__dust-face--mid {
  fill: #eda84c;
}

.progression-toast__dust-face--warm {
  fill: #cb672e;
}

.progression-toast__dust-face--dark {
  fill: #8e351d;
}

.progression-toast__dust-shine {
  fill: none;
  stroke: rgba(255, 251, 226, 0.86);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.progression-toast__icon-svg--contract {
  filter:
    drop-shadow(0 0 6px rgba(236, 112, 74, 0.68))
    drop-shadow(0 6px 5px rgba(36, 9, 5, 0.58));
  transform: rotate(-4deg);
}

.progression-toast__seal-ribbon {
  fill: #6f211c;
  stroke: #e77d5c;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

.progression-toast__seal-outer {
  fill: #a63c2d;
  stroke: #ffc083;
  stroke-width: 2.2;
}

.progression-toast__seal-inner {
  fill: #7d281f;
  stroke: rgba(255, 200, 132, 0.62);
  stroke-width: 1.2;
}

.progression-toast__seal-star {
  fill: #ffd18a;
  stroke: #fff0c2;
  stroke-linejoin: round;
  stroke-width: 0.7;
}

.progression-toast__copy {
  position: relative;
  z-index: 2;
  display: grid;
  grid-column: 2;
  grid-row: 1 / 3;
  gap: 4px;
  min-width: 0;
  padding-left: 1px;
  overflow: hidden;
}

.progression-toast__copy strong,
.progression-toast > strong {
  overflow: hidden;
  color: #ffe4aa;
  font: 800 16px/1.1 var(--font-title);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.progression-toast__copy > span,
.progression-toast > span:not([class]) {
  overflow: hidden;
  color: rgba(244, 213, 158, 0.72);
  font-size: 10px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.progression-toast > strong {
  grid-column: 1 / 3;
  grid-row: 1;
  align-self: end;
  padding-left: 53px;
}

.progression-toast > span:not([class]) {
  grid-column: 1 / 3;
  grid-row: 2;
  align-self: start;
  padding-left: 53px;
}

.progression-toast > strong::before {
  position: absolute;
  top: 10px;
  left: 10px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  content: "";
  border: 1px solid rgba(255, 220, 153, 0.22);
  border-radius: 11px;
  background:
    linear-gradient(135deg, transparent 26%, rgba(255, 222, 157, 0.08)),
    rgba(18, 10, 6, 0.44);
  box-shadow: inset 0 0 0 10px rgba(209, 105, 43, 0.12);
  clip-path: polygon(50% 8%, 73% 20%, 82% 50%, 66% 78%, 35% 74%, 18% 48%, 29% 18%);
}

.progression-toast--contract > strong::before,
.progression-toast--mastery > strong::before {
  border: 2px solid #e88b65;
  border-radius: 50%;
  background: #923126;
  box-shadow:
    inset 0 0 0 7px rgba(242, 180, 108, 0.14),
    0 0 0 2px rgba(54, 18, 13, 0.72);
  clip-path: none;
}

.progression-toast__accent {
  grid-column: 3;
  grid-row: 1 / 3;
  align-self: stretch;
  width: 5px;
  border-radius: 999px;
  background: linear-gradient(#f3c470, #a94b27);
  box-shadow: 0 0 10px rgba(229, 144, 58, 0.36);
}

.progression-toast[data-kind="contract"] .progression-toast__accent,
.progression-toast[data-kind="mastery"] .progression-toast__accent,
.progression-toast--contract .progression-toast__accent,
.progression-toast--mastery .progression-toast__accent {
  background: linear-gradient(#e99a73, #8f2f25);
}

.progression-toast::after {
  position: absolute;
  top: 9px;
  right: 7px;
  bottom: 9px;
  width: 4px;
  content: "";
  border-radius: 999px;
  background: linear-gradient(#f3c470, #a94b27);
  box-shadow: 0 0 10px rgba(229, 144, 58, 0.36);
}

.progression-toast:has(.progression-toast__accent)::after {
  display: none;
}

.progression-toast--contract::after,
.progression-toast--mastery::after {
  background: linear-gradient(#e99a73, #8f2f25);
}

@keyframes progressionWalletEnter {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes progressionCurrencyBump {
  0%,
  100% {
    transform: scale(1);
  }
  45% {
    transform: scale(1.13) rotate(3deg);
  }
}

@keyframes contractsBackdropEnter {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes contractsPanelEnter {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes progressionToastEnter {
  from {
    opacity: 0;
    transform: translateX(24px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes progressionToastLeave {
  to {
    opacity: 0;
    transform: translateX(20px) scale(0.98);
  }
}

@media (hover: none), (pointer: coarse), (max-width: 760px) {
  #game-root.is-playing .progression-toast-stack {
    bottom: max(132px, calc(env(safe-area-inset-bottom) + 122px));
  }
}

@media (max-width: 900px) {
  .progression-wallet {
    top: max(12px, env(safe-area-inset-top));
    right: max(12px, env(safe-area-inset-right));
  }

  .progression-wallet__currency {
    grid-template-columns: 36px minmax(52px, auto);
    min-width: 110px;
    padding: 8px 10px 8px 8px;
  }

  .progression-wallet__currency--contracts {
    min-width: 128px;
  }

  .progression-wallet__icon {
    width: 36px;
    height: 36px;
  }

  .progression-wallet__icon svg {
    width: 30px;
    height: 30px;
  }

  .progression-wallet__value,
  .progression-wallet__fraction {
    font-size: 19px;
  }

  .contracts-menu__panel {
    width: 100%;
    max-height: 100%;
  }

  .contracts-menu__header {
    gap: 15px;
    padding-left: 18px;
  }

  .contracts-menu__header p {
    max-width: 48ch;
  }

  .contracts-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .unlock-grid,
  .unlock-grid--classes,
  .unlock-grid--mastery,
  .unlock-shop__content[data-unlock-view] .unlock-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .marked-deck__list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .progression-wallet {
    min-height: 54px;
    border-radius: 13px;
  }

  .progression-wallet__currency {
    grid-template-columns: 31px minmax(46px, auto);
    gap: 7px;
    min-width: 96px;
    padding: 7px 9px 7px 7px;
  }

  .progression-wallet__currency--contracts {
    min-width: 112px;
  }

  .progression-wallet__icon {
    width: 31px;
    height: 31px;
    border-radius: 9px;
  }

  .progression-wallet__icon svg {
    width: 26px;
    height: 26px;
  }

  .progression-wallet__label {
    font-size: 7px;
  }

  .progression-wallet__value,
  .progression-wallet__fraction {
    font-size: 16px;
  }

  .progression-wallet__fraction > span,
  .progression-wallet__fraction output:last-child {
    font-size: 11px;
  }

  .menu-contracts-btn {
    min-height: 50px;
  }

  .contracts-menu {
    --dialog-min-inline-gutter: 8px;
    padding:
      max(8px, env(safe-area-inset-top))
      var(--dialog-inline-gutter)
      max(8px, env(safe-area-inset-bottom));
  }

  .contracts-menu__panel {
    width: 100%;
    max-height: 100%;
    border-radius: 16px;
  }

  .contracts-menu__header {
    grid-template-columns: 1fr;
    gap: 11px;
    padding: 18px 54px 13px 14px;
  }

  .contracts-menu h2 {
    font-size: 34px;
  }

  .contracts-menu__header p {
    margin-top: 6px;
    font-size: 10px;
  }

  .contracts-menu__summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contracts-menu__summary-item {
    min-width: 0;
  }

  .contracts-menu__filters {
    grid-auto-flow: column;
    grid-template-columns: none;
    grid-auto-columns: minmax(104px, 1fr);
    padding: 8px 10px;
    overflow-x: auto;
    overflow-y: hidden;
    touch-action: pan-x;
  }

  .contracts-list {
    grid-template-columns: 1fr;
    gap: 9px;
    padding: 10px;
  }

  .contract-card {
    min-height: 148px;
    padding: 12px 13px 11px 16px;
  }

  .contracts-menu__footer {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 9px;
    padding: 9px 10px;
  }

  .contracts-menu__completion-track {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .contracts-menu__back {
    grid-column: 2;
    grid-row: 1;
    min-width: 132px;
    min-height: 38px;
    padding: 9px 11px;
    font-size: 9px;
  }

  .progression-toast-stack {
    right: 50%;
    bottom: max(10px, env(safe-area-inset-bottom));
    width: min(342px, calc(100vw - 20px));
    transform: translateX(50%);
  }

  .unlock-shop__panel {
    width: 100%;
    height: 100%;
    max-height: 100%;
  }

  .unlock-shop__tabs {
    grid-auto-columns: minmax(124px, 1fr);
  }

  .unlock-shop__tabs .contracts-filter {
    min-height: 44px;
  }

  .unlock-shop__content {
    min-height: 0;
    padding: 10px;
  }

  .unlock-shop__section-title h3,
  .unlock-shop__section-title strong {
    font-size: 19px;
  }

  .unlock-grid {
    gap: 9px;
  }

  .unlock-card {
    min-height: 176px;
    padding: 12px;
  }

  .unlock-card__action,
  .unlock-purchase-btn,
  .unlock-shop button[data-purchase-class],
  .unlock-shop button[data-purchase-card] {
    min-width: 96px;
  }

  .marked-deck__slots {
    grid-template-columns: repeat(5, minmax(70px, 1fr));
    padding-bottom: 3px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    touch-action: pan-x pan-y;
  }

  .unlock-shop__footer {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .unlock-shop__status {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .unlock-shop__save {
    grid-column: 1;
    grid-row: 2;
    justify-self: start;
  }

  .unlock-shop__footer .contracts-menu__back {
    grid-column: 2;
    grid-row: 2;
    min-height: 44px;
  }
}

@media (orientation: landscape) and (max-width: 960px) and (max-height: 520px) {
  .menu-panel__play-actions {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 40px;
  }

  .menu-music-btn {
    width: 40px;
    min-height: 40px;
    font-size: 18px;
  }

  .progression-wallet {
    top: max(8px, env(safe-area-inset-top));
    right: max(8px, env(safe-area-inset-right));
    min-height: 46px;
  }

  .progression-wallet__currency {
    grid-template-columns: 27px minmax(40px, auto);
    gap: 6px;
    min-width: 82px;
    padding: 5px 7px 5px 5px;
  }

  .progression-wallet__currency--contracts {
    min-width: 98px;
  }

  .progression-wallet__divider {
    margin: 6px 0;
  }

  .progression-wallet__icon {
    width: 27px;
    height: 27px;
    border-radius: 8px;
  }

  .progression-wallet__icon svg {
    width: 23px;
    height: 23px;
  }

  .progression-wallet__label {
    font-size: 6px;
    letter-spacing: 0.09em;
  }

  .progression-wallet__value,
  .progression-wallet__fraction {
    font-size: 14px;
  }

  .progression-wallet__fraction > span,
  .progression-wallet__fraction output:last-child {
    font-size: 9px;
  }

  .menu-contracts-btn {
    grid-template-columns: 30px minmax(0, 1fr) 14px;
    gap: 8px;
    min-height: 42px;
    padding: 5px 9px 5px 6px;
    border-radius: 10px;
  }

  .menu-contracts-btn__icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
  }

  .menu-contracts-btn__icon svg {
    width: 25px;
    height: 25px;
  }

  .menu-contracts-btn__copy strong {
    font-size: 10px;
  }

  .menu-contracts-btn__copy small {
    font-size: 8px;
  }

  .contracts-menu {
    --dialog-min-inline-gutter: 7px;
    padding:
      max(7px, env(safe-area-inset-top))
      var(--dialog-inline-gutter)
      max(7px, env(safe-area-inset-bottom));
  }

  .contracts-menu__panel {
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    width: 100%;
    height: 100%;
    max-height: 100%;
    border-radius: 14px;
  }

  .contracts-menu__close {
    top: 8px;
    right: 8px;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    font-size: 23px;
  }

  .contracts-menu__header {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    padding: 10px 49px 8px 12px;
  }

  .contracts-menu__eyebrow {
    gap: 6px;
    margin-bottom: 4px;
    font-size: 7px;
  }

  .contracts-menu h2 {
    font-size: 27px;
  }

  .contracts-menu__header p {
    display: none;
  }

  .contracts-menu__summary {
    gap: 5px;
  }

  .contracts-menu__summary-item {
    grid-template-columns: 25px minmax(0, 1fr);
    gap: 5px;
    min-width: 92px;
    padding: 5px 7px 5px 5px;
    border-radius: 8px;
  }

  .contracts-menu__summary-icon {
    width: 25px;
    height: 25px;
  }

  .contracts-menu__summary-icon svg {
    width: 25px;
    height: 25px;
  }

  .contracts-menu__summary-item small {
    font-size: 6px;
  }

  .contracts-menu__summary-item output {
    font-size: 15px;
  }

  .contracts-menu__filters {
    grid-auto-flow: initial;
    grid-template-columns: repeat(6, minmax(82px, 1fr));
    grid-auto-columns: initial;
    gap: 5px;
    padding: 6px 9px;
    overflow-x: auto;
  }

  .contracts-filter {
    grid-template-columns: 5px minmax(0, 1fr) auto;
    gap: 5px;
    min-height: 31px;
    padding: 5px 6px;
    border-radius: 8px;
    font-size: 7px;
  }

  .contracts-filter__mark {
    width: 5px;
    height: 5px;
  }

  .contracts-filter output {
    min-width: 17px;
    height: 17px;
    padding: 0 3px;
    font-size: 7px;
  }

  .contracts-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    min-height: 120px;
    max-height: none;
    padding: 7px 9px 9px;
  }

  .contract-card {
    grid-template-rows: auto minmax(34px, auto) auto;
    gap: 6px;
    min-height: 124px;
    padding: 9px 10px 8px 13px;
    border-radius: 10px;
  }

  .contract-card__category,
  .contract-card__state {
    font-size: 6.5px;
  }

  .contract-card h3 {
    font-size: 15px;
  }

  .contract-card p {
    margin-top: 4px;
    font-size: 8.5px;
    line-height: 1.25;
    -webkit-line-clamp: 2;
  }

  .contract-card__progress {
    gap: 4px;
  }

  .contract-card__progress-copy,
  .contract-card__reward {
    font-size: 6.5px;
  }

  .contract-card__progress-track {
    height: 6px;
  }

  .contract-card__reward {
    gap: 3px;
    padding: 2px 4px 2px 3px;
  }

  .contract-card__reward-mark {
    width: 11px;
    height: 11px;
  }

  .contract-card__reward-mark::after {
    inset: 3px;
  }

  .contracts-menu__footer {
    grid-template-columns: auto minmax(90px, 1fr) auto;
    gap: 8px;
    padding: 6px 9px;
  }

  .contracts-menu__completion {
    gap: 5px;
    font-size: 7px;
  }

  .contracts-menu__completion strong {
    font-size: 11px;
  }

  .contracts-menu__completion-track {
    grid-column: auto;
    grid-row: auto;
    height: 6px;
  }

  .contracts-menu__back {
    grid-column: auto;
    grid-row: auto;
    min-width: 114px;
    min-height: 32px;
    padding: 7px 9px;
    font-size: 8px;
  }

  .progression-toast-stack {
    right: max(8px, env(safe-area-inset-right));
    bottom: max(8px, env(safe-area-inset-bottom));
    width: min(286px, calc(100vw - 16px));
    transform: none;
  }

  .progression-toast {
    grid-template-columns: 44px minmax(0, 1fr) 4px;
    column-gap: 12px;
    row-gap: 3px;
    min-height: 60px;
    padding: 7px;
    border-radius: 10px;
  }

  .progression-toast__icon {
    width: 44px;
    height: 44px;
    border-radius: 11px;
  }

  .progression-toast__icon::before {
    width: 27px;
    height: 27px;
  }

  .progression-toast__icon-svg {
    width: 36px;
    height: 36px;
  }

  .progression-toast[data-kind="dust"] .progression-toast__icon::after,
  .progression-toast--dust .progression-toast__icon::after {
    top: 11px;
    left: 16px;
    height: 16px;
  }

  .progression-toast[data-kind="contract"] .progression-toast__icon::before,
  .progression-toast[data-kind="mastery"] .progression-toast__icon::before,
  .progression-toast--contract .progression-toast__icon::before,
  .progression-toast--mastery .progression-toast__icon::before {
    width: 30px;
    height: 30px;
  }

  .progression-toast[data-kind="contract"] .progression-toast__icon::after,
  .progression-toast[data-kind="mastery"] .progression-toast__icon::after,
  .progression-toast--contract .progression-toast__icon::after,
  .progression-toast--mastery .progression-toast__icon::after {
    width: 12px;
    height: 12px;
  }

  .progression-toast__copy strong {
    font-size: 12px;
  }

  .progression-toast__copy > span {
    font-size: 8px;
  }

  .unlock-shop__panel {
    width: 100%;
    height: 100%;
    max-height: 100%;
  }

  .unlock-shop__header {
    padding-right: 49px;
  }

  .unlock-shop__summary-icon {
    width: 25px;
    height: 25px;
    font-size: 12px;
  }

  .unlock-shop__tabs {
    grid-template-columns: repeat(4, minmax(106px, 1fr));
    grid-auto-flow: initial;
    grid-auto-columns: initial;
    padding: 5px 8px;
  }

  .unlock-shop__tabs .contracts-filter {
    min-height: 38px;
    font-size: 7px;
  }

  .unlock-shop__content {
    min-height: 0;
    max-height: none;
    padding: 7px 9px 9px;
  }

  .unlock-shop__section-title {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: baseline;
    margin-bottom: 7px;
  }

  .unlock-shop__section-title h3,
  .unlock-shop__section-title strong {
    flex: 0 0 auto;
    font-size: 16px;
  }

  .unlock-shop__section-title p,
  .unlock-shop__section-title span {
    overflow: hidden;
    font-size: 8px;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .unlock-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
  }

  .unlock-grid--classes,
  .unlock-grid--mastery,
  .unlock-shop__content[data-unlock-view="classes"] .unlock-grid,
  .unlock-shop__content[data-unlock-view="mastery"] .unlock-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .unlock-card {
    gap: 6px;
    min-height: 142px;
    padding: 9px 10px;
    border-radius: 10px;
  }

  .unlock-card::before {
    top: 9px;
    bottom: 9px;
  }

  .unlock-card__eyebrow,
  .unlock-card__meta,
  .unlock-card__progress-copy {
    font-size: 6.5px;
  }

  .unlock-card__status {
    min-height: 18px;
    padding: 3px 5px;
    font-size: 6px;
  }

  .unlock-card h3 {
    font-size: 14px;
  }

  .unlock-card__copy p,
  .unlock-card > p {
    display: -webkit-box;
    margin-top: 3px;
    overflow: hidden;
    font-size: 8px;
    line-height: 1.25;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .unlock-card__meta > span {
    min-height: 18px;
    padding: 3px 5px;
  }

  .unlock-card__footer {
    gap: 5px;
  }

  .unlock-card__price {
    font-size: 11px;
  }

  .unlock-card__action,
  .unlock-purchase-btn,
  .unlock-shop button[data-purchase-class],
  .unlock-shop button[data-purchase-card] {
    min-width: 82px;
    min-height: 42px;
    padding: 7px 8px;
    font-size: 7px;
  }

  .unlock-shop__empty {
    min-height: 120px;
    padding: 14px;
  }

  .unlock-shop__notice {
    margin-bottom: 7px;
    padding: 7px 9px;
    font-size: 8px;
  }

  .marked-deck {
    gap: 7px;
  }

  .marked-deck__intro {
    padding: 7px 9px;
  }

  .marked-deck__intro p {
    font-size: 8px;
  }

  .marked-deck__slots {
    grid-template-columns: repeat(5, minmax(92px, 1fr));
    gap: 6px;
    overflow-x: auto;
    touch-action: pan-x pan-y;
  }

  .marked-deck__slot {
    min-height: 42px;
    font-size: 7px;
  }

  .marked-deck__list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .marked-deck__choice {
    min-height: 42px;
    padding: 7px 8px;
    font-size: 7.5px;
  }

  .unlock-shop__footer {
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 7px;
    padding: 5px 8px;
  }

  .unlock-shop__status {
    grid-column: auto;
    grid-row: auto;
    overflow: hidden;
    font-size: 7px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .unlock-shop__save {
    grid-column: auto;
    grid-row: auto;
    min-height: 42px;
    padding: 7px 10px;
    font-size: 7px;
  }

  .unlock-shop__footer .contracts-menu__back {
    grid-column: auto;
    grid-row: auto;
    min-height: 42px;
  }
}

@media (max-width: 430px) {
  .progression-wallet__currency {
    grid-template-columns: 27px auto;
    min-width: 76px;
  }

  .progression-wallet__currency--contracts {
    min-width: 91px;
  }

  .progression-wallet__icon {
    width: 27px;
    height: 27px;
  }

  .progression-wallet__label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  .contracts-menu__summary {
    grid-template-columns: 1fr 1fr;
  }

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

  .contracts-menu__completion > span {
    display: none;
  }

  .unlock-shop__summary-cards {
    min-width: 0;
  }

  .unlock-grid,
  .unlock-grid--classes,
  .unlock-grid--mastery,
  .unlock-shop__content[data-unlock-view] .unlock-grid,
  .marked-deck__list {
    grid-template-columns: 1fr;
  }

  .unlock-card {
    min-height: 164px;
  }

  .marked-deck__intro {
    grid-template-columns: 1fr;
  }

  .marked-deck__weight {
    justify-self: start;
  }

  .unlock-shop__footer {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .unlock-shop__status {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .unlock-shop__save {
    grid-column: 1;
    grid-row: 2;
    justify-self: stretch;
  }

  .unlock-shop__footer .contracts-menu__back {
    grid-column: 2;
    grid-row: 2;
  }
}

@media (prefers-reduced-motion: reduce) {
  #game-root.is-menu:not(.is-intro) .progression-wallet,
  .progression-wallet__currency.is-bumped .progression-wallet__icon,
  .contracts-menu.is-visible,
  .contracts-menu.is-visible .contracts-menu__panel,
  .progression-toast,
  .progression-toast.is-leaving {
    animation: none !important;
  }

  .contract-card,
  .contract-card__progress-fill,
  .contracts-menu__completion-fill,
  .unlock-card,
  .unlock-card__progress-fill,
  .marked-deck__choice {
    transition-duration: 0s !important;
  }
}

/* Keep the catalog layout last in the cascade: legacy store breakpoints also target .unlock-grid. */
.unlock-shop__content[data-unlock-view="classes"] .unlock-grid.unlock-card-row {
  grid-template-columns: repeat(4, minmax(154px, 184px));
  justify-content: center;
}

.unlock-shop__content[data-unlock-view="cards"] .unlock-grid.unlock-card-row {
  grid-template-columns: repeat(auto-fill, minmax(154px, 184px));
  justify-content: start;
}

.unlock-shop__content[data-unlock-view="cards"]
  .unlock-card.unlock-playing-card
  > .unlock-card__copy {
  min-height: 42px;
  -webkit-line-clamp: 4;
}

.unlock-card.unlock-playing-card {
  min-height: 292px;
}

.unlock-playing-card .unlock-card__meta {
  width: calc(100% - 52px);
  align-self: center;
}

@media (max-width: 900px) {
  .unlock-shop__content[data-unlock-view="classes"] .unlock-grid.unlock-card-row {
    grid-template-columns: repeat(4, minmax(140px, 172px));
  }
}

@media (max-width: 640px) {
  .unlock-shop__content[data-unlock-view="classes"] .unlock-grid.unlock-card-row,
  .unlock-shop__content[data-unlock-view="cards"] .unlock-grid.unlock-card-row {
    grid-auto-flow: column;
    grid-template-columns: none;
    grid-auto-columns: 154px;
    justify-content: start;
    gap: 10px;
    padding: 2px 2px 7px;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .unlock-card.unlock-playing-card {
    min-height: 258px;
  }

  .unlock-playing-card .unlock-card__meta {
    width: calc(100% - 42px);
  }
}

@media (orientation: landscape) and (max-width: 960px) and (max-height: 520px) {
  .unlock-shop__content[data-unlock-view="classes"] .unlock-grid.unlock-card-row,
  .unlock-shop__content[data-unlock-view="cards"] .unlock-grid.unlock-card-row {
    grid-auto-flow: column;
    grid-template-columns: none;
    grid-auto-columns: 116px;
    gap: 7px;
    padding: 1px 2px 4px;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .unlock-shop__content[data-unlock-view="classes"] .unlock-grid.unlock-card-row {
    justify-content: center;
  }

  .unlock-shop__content[data-unlock-view="cards"] .unlock-grid.unlock-card-row {
    justify-content: start;
  }

  .unlock-card.unlock-playing-card {
    min-height: 212px;
  }

  /* Matches the specificity of the cards-view clamp defined above so the
     natural-height treatment applies on every tab, not just classes. */
  .unlock-shop__content[data-unlock-view]
    .unlock-card.unlock-playing-card
    > .unlock-card__copy {
    display: block;
    min-height: auto;
    font-size: 7px;
    line-height: 1.2;
    overflow-wrap: anywhere;
    -webkit-line-clamp: none;
  }

  .unlock-playing-card .unlock-card__meta {
    width: calc(100% - 32px);
  }

  html[data-locale="ru"]
    .unlock-shop__content[data-unlock-view="cards"]
    .unlock-card.unlock-playing-card
    h3 {
    min-height: 37px;
    -webkit-line-clamp: 3;
  }
}

@media (min-width: 961px) {
  .unlock-shop__content[data-unlock-view="mastery"]
    .unlock-card-row--mastery {
    grid-template-columns: repeat(2, minmax(176px, 204px));
  }

  .unlock-shop__content[data-unlock-view="cards"]
    .unlock-grid.unlock-card-row {
    grid-template-columns: repeat(auto-fill, minmax(176px, 204px));
  }

  .unlock-shop__content
    .unlock-card.unlock-playing-card {
    min-height: 330px;
  }

  .unlock-shop__content[data-unlock-view="classes"]
    .unlock-card.unlock-playing-card {
    min-height: 310px;
  }

  .unlock-shop__content[data-unlock-view="mastery"]
    .unlock-card.unlock-playing-card {
    min-height: 340px;
  }

  .unlock-shop__content[data-unlock-view="cards"]
    .unlock-card.unlock-playing-card {
    min-height: 370px;
  }

  .unlock-shop__content
    .unlock-playing-card
    .unlock-card__eyebrow {
    font-size: 7.5px;
  }

  .unlock-shop__content
    .unlock-playing-card
    .unlock-card__status {
    min-height: 20px;
    padding: 4px 6px;
    font-size: 7px;
  }

  .unlock-shop__content
    .unlock-card.unlock-playing-card
    h3 {
    min-height: 48px;
    font-size: 19px;
    line-height: 1.06;
    -webkit-line-clamp: 3;
  }

  .unlock-shop__content[data-unlock-view="classes"]
    .unlock-card.unlock-playing-card
    h3 {
    min-height: 40px;
    -webkit-line-clamp: 2;
  }

  .unlock-shop__content[data-unlock-view="cards"]
    .unlock-card.unlock-playing-card
    h3 {
    min-height: 58px;
  }

  .unlock-shop__content
    .unlock-card.unlock-playing-card
    > .unlock-card__copy {
    min-height: 58px;
    font-size: 10.5px;
    line-height: 1.34;
    -webkit-line-clamp: 4;
  }

  .unlock-shop__content[data-unlock-view="classes"]
    .unlock-card.unlock-playing-card
    > .unlock-card__copy {
    min-height: 43px;
    -webkit-line-clamp: 3;
  }

  .unlock-shop__content[data-unlock-view="cards"]
    .unlock-card.unlock-playing-card
    > .unlock-card__copy {
    min-height: 72px;
    -webkit-line-clamp: 5;
  }

  .unlock-shop__content
    .unlock-playing-card
    .unlock-card__meta
    > span,
  .unlock-shop__content
    .unlock-playing-card
    .unlock-card__price {
    min-height: 23px;
    font-size: 8.5px;
  }

  .unlock-shop__content
    .unlock-playing-card
    .unlock-card__action,
  .unlock-shop__content
    .unlock-playing-card
    button[data-purchase-class],
  .unlock-shop__content
    .unlock-playing-card
    button[data-purchase-card] {
    font-size: 9.5px;
  }
}

/* Career choices shrink to the cards that are actually available in this run. */
#class-choice[data-visible-choices="1"],
.panel.class-choice-panel[data-visible-choices="1"] {
  width: min(380px, calc(100vw - 32px));
}

.panel.class-choice-panel[data-visible-choices="1"] .class-options {
  grid-template-columns: minmax(0, 230px);
  justify-content: center;
}

#class-choice[data-visible-choices="2"] {
  width: min(540px, calc(100vw - 32px));
}

#class-choice[data-visible-choices="2"] .class-options--classes {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#class-choice[data-visible-choices="3"] {
  width: min(760px, calc(100vw - 32px));
}

#class-choice[data-visible-choices="3"] .class-options--classes {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

#class-choice[data-visible-choices="4"] {
  width: min(980px, calc(100vw - 32px));
}

#class-choice[data-visible-choices="4"] .class-options--classes {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 520px) and (orientation: portrait) {
  #class-choice[data-visible-choices],
  .panel.class-choice-panel[data-visible-choices] {
    width: min(360px, calc(100vw - 20px));
  }

  #class-choice[data-visible-choices] .class-options,
  .panel.class-choice-panel[data-visible-choices] .class-options {
    grid-template-columns: 1fr;
    justify-content: stretch;
  }
}

/* Upgrade cards stay legible at play distance instead of inheriting the
   tightly tracked, compact typography of the global button style. */
.panel.class-choice-panel .class-card,
.multiplayer-upgrade-drawer .class-card {
  grid-template-rows: 82px minmax(38px, auto) minmax(72px, auto);
  min-height: 250px;
  letter-spacing: 0.01em;
}

.panel.class-choice-panel .upgrade-card,
.multiplayer-upgrade-drawer .upgrade-card {
  grid-template-rows: 88px minmax(52px, auto) minmax(76px, auto);
  min-height: 264px;
}

.panel.class-choice-panel .class-card strong,
.multiplayer-upgrade-drawer .class-card strong {
  font-size: 24px;
  line-height: 1.06;
}

.panel.class-choice-panel .upgrade-card strong,
.multiplayer-upgrade-drawer .upgrade-card strong {
  width: 100%;
  min-height: 52px;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  font-size: 24px;
  line-height: 1.06;
  text-wrap: balance;
}

.panel.class-choice-panel .upgrade-card__subtitle,
.multiplayer-upgrade-drawer .upgrade-card__subtitle {
  font-size: 14px !important;
  line-height: 1.1 !important;
}

.panel.class-choice-panel .class-card > span:not(.class-card__mark),
.multiplayer-upgrade-drawer .class-card > span:not(.class-card__mark) {
  min-height: 0;
  color: #542b14;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.42;
}

.panel.class-choice-panel .upgrade-card > span:not(.class-card__mark),
.multiplayer-upgrade-drawer .upgrade-card > span:not(.class-card__mark) {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  overflow-wrap: anywhere;
  text-wrap: pretty;
}

@media (min-width: 961px) and (min-height: 521px) {
  #level-up-choice.panel.class-choice-panel,
  .multiplayer-upgrade-drawer:not(.is-class-offer):not(.is-branch-offer) {
    width: min(960px, calc(100vw - 48px));
  }

  #revolver-upgrade.panel.class-choice-panel:not([data-visible-choices="1"]),
  #rifle-upgrade.panel.class-choice-panel:not([data-visible-choices="1"]),
  #launcher-upgrade.panel.class-choice-panel:not([data-visible-choices="1"]),
  #marshal-upgrade.panel.class-choice-panel:not([data-visible-choices="1"]),
  .multiplayer-upgrade-drawer.is-branch-offer:not([data-visible-choices="1"]) {
    width: min(760px, calc(100vw - 48px));
  }
}

@media (orientation: landscape) and (max-width: 960px) and (max-height: 520px) {
  .panel.class-choice-panel .class-card,
  .multiplayer-upgrade-drawer .class-card {
    grid-template-rows: 50px minmax(30px, auto) minmax(46px, auto);
    gap: 5px;
    min-height: 174px;
    padding: 18px 8px 14px;
  }

  .panel.class-choice-panel .upgrade-card,
  .multiplayer-upgrade-drawer .upgrade-card {
    grid-template-rows: 50px minmax(36px, auto) minmax(50px, auto);
    min-height: 176px;
  }

  .panel.class-choice-panel .class-card strong,
  .panel.class-choice-panel .upgrade-card strong,
  .multiplayer-upgrade-drawer .class-card strong,
  .multiplayer-upgrade-drawer .upgrade-card strong {
    min-height: 0;
    font-size: 18px;
    line-height: 1.05;
  }

  .panel.class-choice-panel .upgrade-card__subtitle,
  .multiplayer-upgrade-drawer .upgrade-card__subtitle {
    margin-top: 2px;
    font-size: 12.5px !important;
  }

  .panel.class-choice-panel .class-card > span:not(.class-card__mark),
  .multiplayer-upgrade-drawer .class-card > span:not(.class-card__mark) {
    font-size: 12.5px;
    line-height: 1.32;
  }
}

@media (orientation: landscape) and (max-width: 760px) and (max-height: 400px) {
  .panel.class-choice-panel .class-card,
  .multiplayer-upgrade-drawer .class-card {
    grid-template-rows: 44px minmax(28px, auto) minmax(46px, auto);
    gap: 4px;
    min-height: 160px;
    padding: 14px 8px 10px;
  }

  .panel.class-choice-panel .upgrade-card,
  .multiplayer-upgrade-drawer .upgrade-card {
    grid-template-rows: 44px minmax(32px, auto) minmax(48px, auto);
    min-height: 160px;
  }

  .panel.class-choice-panel .class-card strong,
  .panel.class-choice-panel .upgrade-card strong,
  .multiplayer-upgrade-drawer .class-card strong,
  .multiplayer-upgrade-drawer .upgrade-card strong {
    font-size: 17px;
  }

  .panel.class-choice-panel .upgrade-card__subtitle,
  .multiplayer-upgrade-drawer .upgrade-card__subtitle {
    font-size: 12px !important;
  }

  .panel.class-choice-panel .class-card > span:not(.class-card__mark),
  .multiplayer-upgrade-drawer .class-card > span:not(.class-card__mark) {
    font-size: 12px;
    line-height: 1.28;
  }
}

@media (orientation: landscape) and (max-width: 560px) and (max-height: 340px) {
  .panel.class-choice-panel {
    padding: 8px 10px;
  }

  .panel.class-choice-panel h2 {
    margin-bottom: 2px;
    font-size: 21px;
    line-height: 1;
  }

  .panel.class-choice-panel p {
    margin-bottom: 5px;
    font-size: 10.5px;
    line-height: 1.15;
  }

  .panel.class-choice-panel .class-options,
  .multiplayer-upgrade-drawer .class-options {
    gap: 5px;
  }

  .panel.class-choice-panel .upgrade-card,
  .multiplayer-upgrade-drawer .upgrade-card {
    grid-template-rows: 38px minmax(28px, auto) minmax(38px, auto);
    gap: 3px;
    min-height: 136px;
    padding: 10px 6px 8px;
  }

  .panel.class-choice-panel .upgrade-card .class-card__mark,
  .multiplayer-upgrade-drawer .upgrade-card .class-card__mark {
    width: 60px;
    height: 38px;
  }

  .panel.class-choice-panel .upgrade-card__symbol,
  .multiplayer-upgrade-drawer .upgrade-card__symbol {
    width: 40px;
    height: 27px;
  }

  .panel.class-choice-panel .upgrade-card__icon,
  .multiplayer-upgrade-drawer .upgrade-card__icon {
    width: 37px;
    height: 27px;
  }

  .panel.class-choice-panel .upgrade-card::after,
  .multiplayer-upgrade-drawer .upgrade-card::after {
    display: none;
  }

  .panel.class-choice-panel .upgrade-card strong,
  .multiplayer-upgrade-drawer .upgrade-card strong {
    font-size: 15px;
    line-height: 1.03;
  }

  .panel.class-choice-panel .upgrade-card__subtitle,
  .multiplayer-upgrade-drawer .upgrade-card__subtitle {
    margin-top: 1px;
    font-size: 10.5px !important;
  }

  .panel.class-choice-panel .upgrade-card > span:not(.class-card__mark),
  .multiplayer-upgrade-drawer .upgrade-card > span:not(.class-card__mark) {
    font-size: 10.5px;
    line-height: 1.16;
  }
}

@media (max-width: 760px) and (orientation: portrait) {
  .panel.class-choice-panel .class-card strong,
  .panel.class-choice-panel .upgrade-card strong,
  .multiplayer-upgrade-drawer .class-card strong,
  .multiplayer-upgrade-drawer .upgrade-card strong {
    font-size: 18px;
  }

  .panel.class-choice-panel .class-card > span:not(.class-card__mark),
  .multiplayer-upgrade-drawer .class-card > span:not(.class-card__mark) {
    font-size: 13px;
    line-height: 1.34;
  }
}

/* Contract wardrobe ------------------------------------------------------ */

.menu-wardrobe-btn {
  grid-column: 1 / -1;
  background:
    linear-gradient(90deg, rgba(77, 70, 64, 0.96), rgba(46, 30, 22, 0.98) 58%, rgba(66, 36, 20, 0.98)),
    rgba(39, 25, 18, 0.98);
}

.menu-wardrobe-btn:hover,
.menu-wardrobe-btn:focus-visible {
  background:
    linear-gradient(90deg, rgba(101, 89, 76, 0.98), rgba(61, 38, 26, 0.99) 58%, rgba(89, 47, 25, 0.99)),
    rgba(50, 30, 20, 0.99);
}

.menu-wardrobe-btn__icon {
  background:
    radial-gradient(circle at 42% 24%, rgba(255, 224, 164, 0.16), transparent 50%),
    rgba(14, 12, 11, 0.48);
}

.menu-wardrobe-btn__cabinet {
  fill: rgba(79, 42, 24, 0.94);
  stroke: #f1c779;
  stroke-linejoin: round;
  stroke-width: 2;
}

.menu-wardrobe-btn__doors {
  fill: rgba(163, 91, 43, 0.42);
  stroke: rgba(255, 220, 153, 0.62);
  stroke-width: 1.1;
}

.menu-wardrobe-btn__trim,
.menu-wardrobe-btn__hat-mark {
  fill: none;
  stroke: #e5a755;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.menu-wardrobe-btn__hat-mark {
  stroke: #ffe6a9;
  stroke-width: 1.25;
}

.menu-wardrobe-btn__handle {
  fill: #fff0bd;
  stroke: #6f351b;
  stroke-width: 0.7;
  filter: drop-shadow(0 0 2px rgba(255, 207, 112, 0.72));
}

.wardrobe-menu {
  background:
    radial-gradient(circle at 84% 20%, rgba(241, 184, 91, 0.17), transparent 29%),
    radial-gradient(circle at 14% 88%, rgba(87, 111, 101, 0.14), transparent 32%),
    linear-gradient(155deg, rgba(11, 8, 6, 0.84), rgba(5, 3, 2, 0.93));
}

.wardrobe-menu__panel {
  width: min(1180px, 100%);
  background:
    radial-gradient(circle at 82% 20%, rgba(212, 151, 70, 0.12), transparent 28%),
    linear-gradient(145deg, rgba(48, 29, 19, 0.99), rgba(23, 16, 12, 0.995));
}

.wardrobe-menu__header {
  background:
    linear-gradient(90deg, rgba(107, 54, 27, 0.42), transparent 48%),
    rgba(37, 23, 16, 0.72);
}

.wardrobe-menu__owned {
  grid-template-columns: 38px minmax(0, 1fr);
}

.wardrobe-menu__owned-icon {
  position: relative;
  display: block;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(244, 203, 126, 0.25);
  border-radius: 10px;
  background:
    linear-gradient(135deg, transparent 34%, #ba7440 35% 45%, transparent 46%),
    linear-gradient(45deg, transparent 34%, #ba7440 35% 45%, transparent 46%),
    linear-gradient(180deg, #56331f 0 28%, #c78b4d 29% 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 241, 204, 0.15),
    0 5px 12px rgba(0, 0, 0, 0.2);
}

.wardrobe-menu__owned-icon::after {
  position: absolute;
  inset: 7px 11px 5px;
  border: 2px solid #f2d18d;
  border-top: 0;
  border-radius: 2px 2px 5px 5px;
  content: "";
}

.wardrobe-menu__tabs {
  grid-template-columns: repeat(2, minmax(160px, 1fr));
}

.wardrobe-menu__body {
  display: grid;
  grid-template-columns: minmax(420px, 1.16fr) minmax(330px, 0.84fr);
  gap: 12px;
  min-height: 0;
  padding: 12px;
  overflow: hidden;
  background:
    repeating-linear-gradient(135deg, rgba(255, 229, 178, 0.018) 0 1px, transparent 1px 18px),
    rgba(16, 11, 8, 0.42);
}

.wardrobe-catalog {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: minmax(88px, auto);
  gap: 9px;
  align-content: start;
  min-width: 0;
  min-height: 0;
  padding: 2px 5px 5px 2px;
  overflow: auto;
  scrollbar-color: rgba(205, 145, 74, 0.58) rgba(23, 14, 9, 0.54);
  scrollbar-width: thin;
}

.wardrobe-card {
  position: relative;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
  min-height: 88px;
  padding: 10px 10px 10px 9px;
  overflow: hidden;
  border: 1px solid rgba(223, 173, 100, 0.24);
  border-radius: 13px;
  background:
    radial-gradient(circle at 0 0, rgba(255, 220, 158, 0.08), transparent 42%),
    linear-gradient(140deg, rgba(72, 43, 26, 0.9), rgba(35, 24, 17, 0.94));
  color: #f7dfac;
  text-align: left;
  box-shadow:
    inset 0 1px 0 rgba(255, 241, 205, 0.08),
    0 8px 18px rgba(0, 0, 0, 0.16);
}

.wardrobe-card::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  content: "";
  opacity: 0;
  box-shadow:
    inset 0 0 0 2px rgba(255, 210, 127, 0.36),
    inset 5px 0 0 #d99b50;
  transition: opacity 140ms ease;
}

.wardrobe-card:hover,
.wardrobe-card:focus-visible {
  border-color: rgba(242, 195, 119, 0.5);
  background:
    radial-gradient(circle at 0 0, rgba(255, 225, 168, 0.13), transparent 44%),
    linear-gradient(140deg, rgba(91, 53, 30, 0.96), rgba(44, 29, 19, 0.97));
}

.wardrobe-card.is-selected::after {
  opacity: 1;
}

.wardrobe-card.is-equipped {
  border-color: rgba(132, 193, 141, 0.52);
  background:
    radial-gradient(circle at 0 0, rgba(154, 218, 154, 0.1), transparent 44%),
    linear-gradient(140deg, rgba(53, 70, 46, 0.95), rgba(30, 36, 25, 0.97));
}

.wardrobe-card.is-equipped::after {
  box-shadow:
    inset 0 0 0 2px rgba(155, 215, 152, 0.3),
    inset 5px 0 0 #78bd7c;
}

.wardrobe-card.is-locked {
  filter: saturate(0.6);
}

.wardrobe-card.is-locked:not(.is-selected) {
  opacity: 0.72;
}

.wardrobe-card__token {
  position: relative;
  display: block;
  width: 58px;
  height: 62px;
  overflow: hidden;
  border: 1px solid rgba(255, 223, 162, 0.2);
  border-radius: 12px;
  background: rgba(13, 10, 8, 0.55);
  box-shadow:
    inset 0 1px 0 rgba(255, 248, 223, 0.08),
    0 5px 12px rgba(0, 0, 0, 0.2);
}

.wardrobe-card__token > span {
  position: absolute;
  background: var(--wardrobe-swatch);
}

.wardrobe-card__token--cowboy > span:nth-child(1) {
  top: 22px;
  left: 10px;
  width: 38px;
  height: 28px;
  border-radius: 5px 5px 9px 9px;
  clip-path: polygon(16% 0, 84% 0, 100% 100%, 0 100%);
}

.wardrobe-card__token--cowboy > span:nth-child(2) {
  top: 25px;
  left: 23px;
  width: 12px;
  height: 22px;
  border-radius: 2px;
}

.wardrobe-card__token--cowboy > span:nth-child(3) {
  top: 49px;
  left: 16px;
  width: 26px;
  height: 9px;
  border-radius: 2px;
  box-shadow: -6px 4px 0 var(--wardrobe-swatch), 6px 4px 0 var(--wardrobe-swatch);
}

.wardrobe-card__token--cowboy::before {
  position: absolute;
  top: 7px;
  left: 19px;
  width: 20px;
  height: 17px;
  border-radius: 5px;
  background: #d29a6a;
  content: "";
}

.wardrobe-card__token--cowboy::after {
  position: absolute;
  top: 4px;
  left: 14px;
  width: 30px;
  height: 7px;
  border-radius: 50%;
  background: #6c351a;
  box-shadow: 7px 4px 0 -1px #6c351a;
  content: "";
}

.wardrobe-card__token--hat > span:nth-child(1) {
  top: 27px;
  left: 7px;
  width: 44px;
  height: 10px;
  border-radius: 50%;
}

.wardrobe-card__token--hat > span:nth-child(2) {
  top: 12px;
  left: 17px;
  width: 24px;
  height: 19px;
  border-radius: 5px 5px 2px 2px;
}

.wardrobe-card__token--hat::after {
  position: absolute;
  top: 27px;
  left: 18px;
  width: 22px;
  height: 4px;
  border-radius: 2px;
  background: var(--wardrobe-swatch, #d19a4b);
  content: "";
}

.wardrobe-card__copy {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding-right: 34px;
}

.wardrobe-card__copy small {
  color: rgba(230, 179, 104, 0.75);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.wardrobe-card__copy strong {
  display: -webkit-box;
  overflow: hidden;
  color: #ffe7b3;
  font: 700 16px/1.03 var(--font-title);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.wardrobe-card__requirement {
  overflow: hidden;
  color: rgba(235, 207, 158, 0.7);
  font-size: 10px;
  font-weight: 750;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wardrobe-card.is-locked .wardrobe-card__requirement {
  color: #d59664;
}

.wardrobe-card__state {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 4px 6px;
  border: 1px solid rgba(235, 188, 116, 0.2);
  border-radius: 999px;
  color: rgba(241, 206, 148, 0.7);
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.wardrobe-card.is-equipped .wardrobe-card__state {
  border-color: rgba(144, 207, 145, 0.35);
  color: #bde7b8;
}

.wardrobe-preview {
  display: grid;
  grid-template-rows: minmax(210px, 1fr) auto;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(231, 179, 102, 0.24);
  border-radius: 16px;
  background:
    radial-gradient(circle at 50% 32%, rgba(231, 167, 78, 0.17), transparent 42%),
    linear-gradient(180deg, rgba(73, 44, 27, 0.84), rgba(28, 19, 14, 0.96));
  box-shadow:
    inset 0 1px 0 rgba(255, 239, 201, 0.09),
    0 12px 28px rgba(0, 0, 0, 0.18);
}

.wardrobe-preview__stage {
  --preview-coat: #934c22;
  --preview-shirt: #e2b66d;
  --preview-denim: #2d5c84;
  --preview-accent: #9f2f2b;
  --preview-hat: #6c351a;
  --preview-hat-accent: #5b1010;
  position: relative;
  min-height: 210px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(212, 146, 64, 0.11), transparent 62%),
    repeating-linear-gradient(90deg, transparent 0 39px, rgba(255, 230, 178, 0.025) 40px);
}

.wardrobe-preview__sun {
  position: absolute;
  top: 24px;
  left: 50%;
  width: 116px;
  height: 116px;
  border: 1px solid rgba(255, 211, 133, 0.12);
  border-radius: 50%;
  background: rgba(255, 191, 96, 0.05);
  box-shadow: 0 0 60px rgba(224, 145, 62, 0.1);
  transform: translateX(-50%);
}

.wardrobe-preview__ground {
  position: absolute;
  right: 14%;
  bottom: 13px;
  left: 14%;
  height: 13px;
  border-radius: 50%;
  background: rgba(10, 7, 5, 0.5);
  filter: blur(2px);
}

.wardrobe-avatar {
  position: absolute;
  bottom: 17px;
  left: 50%;
  z-index: 1;
  width: 130px;
  height: 236px;
  filter: drop-shadow(0 14px 12px rgba(0, 0, 0, 0.3));
  transform: translateX(-50%);
}

.wardrobe-avatar span {
  position: absolute;
  display: block;
  box-sizing: border-box;
}

.wardrobe-avatar__hat {
  top: 6px;
  left: 21px;
  z-index: 5;
  width: 88px;
  height: 52px;
}

.wardrobe-avatar__hat-brim {
  right: 0;
  bottom: 2px;
  left: 0;
  height: 13px;
  border: 2px solid rgba(35, 17, 9, 0.42);
  border-radius: 50%;
  background: var(--preview-hat);
}

.wardrobe-avatar__hat-crown {
  top: 4px;
  left: 25px;
  width: 40px;
  height: 37px;
  border: 2px solid rgba(35, 17, 9, 0.35);
  border-radius: 8px 8px 3px 3px;
  background: var(--preview-hat);
}

.wardrobe-avatar__hat-accent {
  top: 31px;
  left: 25px;
  width: 40px;
  height: 6px;
  border-radius: 2px;
  background: var(--preview-hat-accent);
}

.wardrobe-avatar[data-preview-hat="undertaker"] .wardrobe-avatar__hat-crown {
  top: -7px;
  left: 29px;
  width: 33px;
  height: 49px;
}

.wardrobe-avatar[data-preview-hat="undertaker"] .wardrobe-avatar__hat-accent {
  left: 29px;
  width: 33px;
}

.wardrobe-avatar[data-preview-hat="railmanCap"] .wardrobe-avatar__hat-brim {
  right: 4px;
  bottom: 3px;
  left: 31px;
  height: 10px;
  border-radius: 4px 12px 12px 4px;
  transform: translateX(12px);
}

.wardrobe-avatar[data-preview-hat="railmanCap"] .wardrobe-avatar__hat-crown {
  top: 18px;
  left: 22px;
  width: 48px;
  height: 21px;
  border-radius: 12px 12px 3px 3px;
}

.wardrobe-avatar[data-preview-hat="railmanCap"] .wardrobe-avatar__hat-accent {
  top: 31px;
  left: 23px;
  width: 46px;
  height: 5px;
}

.wardrobe-avatar[data-preview-hat="bellCrown"] .wardrobe-avatar__hat-brim {
  right: 17px;
  left: 17px;
  height: 10px;
  background: var(--preview-hat-accent);
}

.wardrobe-avatar[data-preview-hat="bellCrown"] .wardrobe-avatar__hat-crown {
  top: 1px;
  left: 24px;
  width: 43px;
  height: 41px;
  border-radius: 16px 16px 3px 3px;
  clip-path: polygon(28% 0, 72% 0, 100% 100%, 0 100%);
}

.wardrobe-avatar[data-preview-hat="bellCrown"] .wardrobe-avatar__hat-accent {
  top: 40px;
  left: 41px;
  width: 9px;
  height: 12px;
  border-radius: 50%;
}

.wardrobe-avatar__head {
  top: 48px;
  left: 42px;
  z-index: 4;
  width: 48px;
  height: 48px;
  border: 2px solid rgba(84, 45, 25, 0.36);
  border-radius: 8px;
  background: #d29a6a;
}

.wardrobe-avatar__face {
  top: 15px;
  left: 10px;
  width: 6px;
  height: 5px;
  border-radius: 50%;
  background: #20130d;
  box-shadow: 19px 0 0 #20130d;
}

.wardrobe-avatar__moustache {
  top: 29px;
  left: 10px;
  width: 27px;
  height: 6px;
  border-radius: 50%;
  background: #26150d;
}

.wardrobe-avatar__body {
  top: 92px;
  left: 20px;
  z-index: 3;
  width: 91px;
  height: 93px;
}

.wardrobe-avatar__torso {
  top: 0;
  left: 12px;
  width: 67px;
  height: 78px;
  border: 2px solid rgba(35, 19, 12, 0.32);
  border-radius: 8px 8px 4px 4px;
  background: var(--preview-coat);
  clip-path: polygon(8% 0, 92% 0, 100% 100%, 0 100%);
}

.wardrobe-avatar__shirt {
  top: 5px;
  left: 34px;
  width: 23px;
  height: 67px;
  background: var(--preview-shirt);
  clip-path: polygon(0 0, 100% 0, 82% 100%, 18% 100%);
}

.wardrobe-avatar__scarf {
  top: 2px;
  left: 37px;
  width: 18px;
  height: 10px;
  border-radius: 2px 2px 6px 6px;
  background: var(--preview-accent);
}

.wardrobe-avatar__arm {
  top: 8px;
  width: 18px;
  height: 66px;
  border: 2px solid rgba(35, 19, 12, 0.28);
  border-radius: 5px;
  background: var(--preview-coat);
}

.wardrobe-avatar__arm--left {
  left: -2px;
  transform: rotate(5deg);
}

.wardrobe-avatar__arm--right {
  right: -2px;
  transform: rotate(-5deg);
}

.wardrobe-avatar__belt {
  top: 67px;
  left: 10px;
  width: 71px;
  height: 10px;
  border-radius: 3px;
  background: #241713;
}

.wardrobe-avatar__leg {
  top: 168px;
  z-index: 2;
  width: 31px;
  height: 48px;
  border: 2px solid rgba(24, 19, 20, 0.3);
  border-radius: 3px;
  background: var(--preview-denim);
}

.wardrobe-avatar__leg--left {
  left: 33px;
}

.wardrobe-avatar__leg--right {
  right: 33px;
}

.wardrobe-avatar__boot {
  top: 209px;
  z-index: 3;
  width: 38px;
  height: 20px;
  border-radius: 3px 3px 8px 8px;
  background: #211713;
}

.wardrobe-avatar__boot--left {
  left: 27px;
}

.wardrobe-avatar__boot--right {
  right: 27px;
}

.wardrobe-preview__copy {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 12px;
  align-items: end;
  padding: 13px 14px 14px;
  border-top: 1px solid rgba(229, 176, 98, 0.16);
  background:
    linear-gradient(180deg, rgba(29, 19, 13, 0.72), rgba(20, 14, 10, 0.94));
}

.wardrobe-preview__state {
  grid-column: 1 / -1;
  justify-self: start;
  padding: 4px 8px;
  border: 1px solid rgba(224, 171, 91, 0.32);
  border-radius: 999px;
  color: #e0a45d;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.12em;
  line-height: 1;
  text-transform: uppercase;
}

.wardrobe-preview__state[data-kind="equipped"] {
  border-color: rgba(137, 202, 139, 0.38);
  color: #aee0ad;
}

.wardrobe-preview__state[data-kind="unlocked"] {
  color: #f0c47e;
}

.wardrobe-preview__copy h3 {
  grid-column: 1 / -1;
  margin: 0;
  color: #ffe6af;
  font: 700 28px/1 var(--font-title);
}

html[data-locale="hi"] .menu-contracts-btn__copy strong,
html[data-locale="hi"] .menu-contracts-btn__copy small {
  line-height: 1.25;
}

html[data-locale="hi"] .menu-contracts-btn {
  grid-template-columns: max-content minmax(0, 1fr);
}

html[data-locale="hi"] .menu-contracts-btn__arrow {
  display: none;
}

html[data-locale="hi"] .contract-card h3 {
  line-height: 1.25;
}

html[data-locale="hi"] .wardrobe-preview__copy h3 {
  line-height: 1.2;
}

.wardrobe-preview__copy p {
  grid-column: 1 / -1;
  margin: 0;
  color: rgba(237, 211, 164, 0.72);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.35;
}

.wardrobe-preview__requirement {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: #d69b61;
  font-size: 10px;
  font-weight: 850;
  line-height: 1.2;
}

.wardrobe-preview__requirement.is-complete {
  color: #9bce98;
}

.wardrobe-preview__progress {
  width: 100%;
  height: 6px;
  overflow: hidden;
  border: 1px solid rgba(227, 176, 105, 0.2);
  border-radius: 999px;
  background: rgba(10, 7, 5, 0.58);
}

.wardrobe-preview__progress > span {
  display: block;
  width: calc(var(--wardrobe-progress, 0) * 100%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #a65b35, #e2ad5a);
  box-shadow: 0 0 8px rgba(222, 159, 79, 0.3);
}

.wardrobe-preview__equip {
  min-width: 124px;
  min-height: 42px;
  padding: 9px 14px;
  border-color: rgba(255, 218, 150, 0.4);
  border-radius: 11px;
  background: linear-gradient(180deg, #d6974d, #9e532e 58%, #63331f);
  color: #fff0c7;
  font-size: 10px;
  box-shadow:
    inset 0 1px 0 rgba(255, 246, 214, 0.24),
    inset 0 -3px 0 rgba(52, 20, 10, 0.28),
    0 7px 16px rgba(0, 0, 0, 0.2);
}

.wardrobe-preview__equip:disabled {
  border-color: rgba(211, 178, 123, 0.14);
  background: rgba(76, 56, 42, 0.55);
  color: rgba(229, 203, 158, 0.45);
  box-shadow: none;
}

/* The only priced cosmetic gets its own row so the requirement copy beside it
   keeps full width, and a bullion palette that separates paying from applying. */
.wardrobe-preview__buy {
  grid-column: 1 / -1;
  justify-self: stretch;
  border-color: rgba(255, 232, 158, 0.52);
  background: linear-gradient(180deg, #f2cd6a, #c4901f 58%, #7d5a10);
  color: #2a1d05;
}

.wardrobe-preview__buy:disabled {
  border-color: rgba(211, 178, 123, 0.14);
  background: rgba(76, 56, 42, 0.55);
  color: rgba(229, 203, 158, 0.45);
  box-shadow: none;
}

.wardrobe-menu__footer {
  grid-template-columns: minmax(0, 1fr) auto;
}

.wardrobe-menu__status[data-kind="success"] {
  color: #aedaac;
}

.wardrobe-menu__status[data-kind="error"] {
  color: #e6a07b;
}

@media (max-width: 900px) {
  .wardrobe-menu__panel {
    width: 100%;
  }

  .wardrobe-menu__body {
    grid-template-columns: minmax(360px, 1.12fr) minmax(290px, 0.88fr);
  }

  .wardrobe-card {
    grid-template-columns: 50px minmax(0, 1fr);
    gap: 8px;
  }

  .wardrobe-card__token {
    width: 50px;
  }
}

@media (max-width: 640px) {
  .wardrobe-menu__body {
    grid-template-columns: minmax(0, 1fr);
    overflow: auto;
  }

  .wardrobe-catalog {
    max-height: 44dvh;
  }

  .wardrobe-preview {
    min-height: 430px;
  }
}

@media (orientation: landscape) and (max-width: 960px) and (max-height: 520px) {
  .menu-wardrobe-btn {
    min-height: 40px;
  }

  .wardrobe-menu__panel {
    grid-template-rows: auto auto minmax(0, 1fr) auto;
  }

  .wardrobe-menu .contracts-menu__close {
    width: 42px;
    height: 42px;
  }

  .wardrobe-menu__tabs {
    grid-template-columns: repeat(2, minmax(126px, 1fr));
  }

  .wardrobe-menu__body {
    grid-template-columns: minmax(350px, 1.16fr) minmax(280px, 0.84fr);
    gap: 7px;
    padding: 7px;
    overflow: hidden;
  }

  .wardrobe-catalog {
    grid-auto-rows: 66px;
    gap: 6px;
    padding: 1px 3px 3px 1px;
  }

  .wardrobe-card {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 6px;
    min-height: 66px;
    padding: 5px 6px;
    border-radius: 9px;
  }

  .wardrobe-card__token {
    width: 40px;
    height: 51px;
    border-radius: 8px;
    transform: scale(0.82);
    transform-origin: center;
  }

  .wardrobe-card__copy {
    gap: 2px;
  }

  .wardrobe-card__copy small {
    font-size: 6px;
  }

  .wardrobe-card__copy strong {
    font-size: 13px;
  }

  .wardrobe-card__requirement {
    font-size: 7px;
  }

  .wardrobe-card__state {
    padding: 3px 4px;
    font-size: 5px;
  }

  .wardrobe-preview {
    grid-template-columns: minmax(112px, 0.86fr) minmax(0, 1.14fr);
    grid-template-rows: minmax(0, 1fr);
    border-radius: 10px;
  }

  .wardrobe-preview__stage {
    min-height: 0;
  }

  .wardrobe-preview__sun {
    top: 12px;
    width: 74px;
    height: 74px;
  }

  .wardrobe-avatar {
    bottom: -31px;
    transform: translateX(-50%) scale(0.64);
    transform-origin: center bottom;
  }

  .wardrobe-preview__ground {
    bottom: 8px;
  }

  .wardrobe-preview__copy {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
    align-content: center;
    padding: 8px;
    border-top: 0;
    border-left: 1px solid rgba(229, 176, 98, 0.16);
  }

  .wardrobe-preview__state {
    padding: 3px 6px;
    font-size: 6px;
  }

  .wardrobe-preview__copy h3 {
    font-size: 18px;
  }

  .wardrobe-preview__copy p {
    display: -webkit-box;
    overflow: hidden;
    font-size: 8px;
    line-height: 1.25;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }

  .wardrobe-preview__requirement {
    font-size: 8px;
  }

  .wardrobe-preview__equip {
    justify-self: stretch;
    min-width: 0;
    min-height: 42px;
    padding: 6px 8px;
    font-size: 8px;
  }

  .wardrobe-menu__footer {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .wardrobe-menu__status {
    overflow: hidden;
    font-size: 8px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .wardrobe-menu__footer .contracts-menu__back {
    min-height: 42px;
  }
}

@media (orientation: landscape) and (max-width: 760px) and (max-height: 450px) {
  .wardrobe-menu__body {
    grid-template-columns: minmax(330px, 1.1fr) minmax(250px, 0.9fr);
  }

  .wardrobe-catalog {
    grid-template-columns: 1fr;
  }

  .wardrobe-preview {
    grid-template-columns: 104px minmax(0, 1fr);
  }

  .wardrobe-avatar {
    transform: translateX(-50%) scale(0.58);
  }
}

/* Live wardrobe fitting room -------------------------------------------- */
.wardrobe-menu {
  --dialog-min-inline-gutter: 12px;
  padding:
    max(12px, env(safe-area-inset-top))
    var(--dialog-inline-gutter)
    max(12px, env(safe-area-inset-bottom));
  background:
    radial-gradient(circle at 50% 46%, rgba(28, 17, 10, 0.04) 0 20%, rgba(12, 8, 5, 0.42) 58%, rgba(4, 3, 2, 0.88) 100%),
    linear-gradient(90deg, rgba(8, 5, 3, 0.64), transparent 32% 68%, rgba(8, 5, 3, 0.64));
  backdrop-filter: none;
}

.wardrobe-menu__panel {
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(1220px, 100%);
  height: min(780px, 100%);
  max-height: 100%;
  contain: layout paint style;
  background:
    linear-gradient(90deg,
      rgba(45, 27, 17, 0.985) 0%,
      rgba(35, 22, 15, 0.82) 18%,
      rgba(23, 15, 11, 0.16) 38%,
      rgba(20, 14, 10, 0.09) 62%,
      rgba(35, 22, 15, 0.82) 82%,
      rgba(45, 27, 17, 0.985) 100%),
    linear-gradient(180deg, rgba(47, 29, 18, 0.9), rgba(17, 11, 8, 0.08) 32% 72%, rgba(19, 12, 8, 0.88));
  box-shadow:
    0 34px 120px rgba(0, 0, 0, 0.74),
    inset 0 1px 0 rgba(255, 239, 197, 0.13),
    inset 0 0 0 1px rgba(73, 31, 11, 0.64);
}

.wardrobe-menu__header {
  position: relative;
  z-index: 8;
  padding: 18px 72px 14px 22px;
  background:
    linear-gradient(90deg, rgba(101, 52, 27, 0.48), transparent 46%),
    linear-gradient(180deg, rgba(43, 27, 18, 0.98), rgba(28, 18, 13, 0.95));
  box-shadow: 0 12px 34px rgba(5, 3, 2, 0.2);
}

.wardrobe-menu .contracts-menu__close {
  z-index: 12;
}

.wardrobe-menu__header h2 {
  font-size: clamp(32px, 4.2vw, 52px);
}

.wardrobe-menu__body {
  position: relative;
  display: block;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(15, 9, 6, 0.42), transparent 29% 71%, rgba(15, 9, 6, 0.42)),
    repeating-linear-gradient(90deg, transparent 0 79px, rgba(255, 229, 178, 0.018) 80px);
}

.wardrobe-fitting-room {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  isolation: isolate;
  /* One shared track for the two side panels and the arrow lane between them.
     Compact layouts size all three from these so the details card can never
     reach the outfit arrows; sizing the lane in vw while the card held a px
     min-width is what let them collide on a narrow phone. */
  --wardrobe-side-panel: clamp(174px, 27%, 330px);
  --wardrobe-side-gutter: 18px;
  --wardrobe-side-clearance: calc(var(--wardrobe-side-panel) + var(--wardrobe-side-gutter) + 14px);
}

.wardrobe-fitting-room::before,
.wardrobe-fitting-room::after {
  position: absolute;
  z-index: 0;
  pointer-events: none;
  content: "";
}

.wardrobe-fitting-room::before {
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 216, 151, 0.035) 0 1px, transparent 1px) center / 96px 100%,
    radial-gradient(ellipse at 50% 52%, rgba(255, 192, 99, 0.08), transparent 37%),
    linear-gradient(180deg, rgba(238, 171, 83, 0.05), transparent 32% 72%, rgba(9, 6, 4, 0.36));
}

.wardrobe-fitting-room::after {
  right: 0;
  bottom: 0;
  left: 0;
  height: 39%;
  background:
    linear-gradient(175deg, transparent 0 20%, rgba(10, 7, 5, 0.16) 21% 22%, transparent 23%),
    repeating-linear-gradient(90deg, transparent 0 92px, rgba(255, 226, 172, 0.025) 93px 94px);
  clip-path: polygon(0 43%, 100% 0, 100% 100%, 0 100%);
  opacity: 0.76;
}

.wardrobe-fitting-room__arch {
  position: absolute;
  z-index: 1;
  top: 16px;
  bottom: 22px;
  left: 50%;
  width: min(430px, 42vw);
  pointer-events: none;
  border: 1px solid rgba(241, 193, 118, 0.17);
  border-bottom-color: rgba(241, 193, 118, 0.08);
  border-radius: 52% 52% 16px 16px / 30% 30% 16px 16px;
  box-shadow:
    0 0 0 6px rgba(35, 21, 13, 0.13),
    inset 0 0 70px rgba(221, 146, 63, 0.04),
    0 0 80px rgba(222, 150, 67, 0.06);
  transform: translateX(-50%);
}

.wardrobe-fitting-room__arch::before,
.wardrobe-fitting-room__arch::after {
  position: absolute;
  top: 30px;
  bottom: 30px;
  width: 4px;
  border-radius: 999px;
  background:
    radial-gradient(circle, #e6b466 0 2px, transparent 2.4px) center top / 4px 34px repeat-y;
  content: "";
  filter: drop-shadow(0 0 5px rgba(234, 174, 90, 0.42));
  opacity: 0.7;
}

.wardrobe-fitting-room__arch::before {
  left: -2px;
}

.wardrobe-fitting-room__arch::after {
  right: -2px;
}

.wardrobe-fitting-room__floor {
  position: absolute;
  z-index: 1;
  bottom: 25px;
  left: 50%;
  width: min(340px, 36vw);
  height: 38px;
  pointer-events: none;
  border: 1px solid rgba(255, 207, 133, 0.07);
  border-radius: 50%;
  background: rgba(7, 5, 3, 0.44);
  box-shadow: 0 0 38px rgba(4, 3, 2, 0.45);
  filter: blur(1px);
  transform: translateX(-50%);
}

.wardrobe-fitting-room__live {
  position: absolute;
  z-index: 5;
  top: 13px;
  /* Keep the status pill on the arch, not on top of the selected hat. */
  left: calc(50% + min(165px, 16vw));
  display: flex;
  gap: 7px;
  align-items: center;
  padding: 6px 10px;
  border: 1px solid rgba(155, 216, 151, 0.25);
  border-radius: 999px;
  background: rgba(18, 29, 17, 0.76);
  color: #b8dfa9;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.15em;
  line-height: 1;
  text-transform: uppercase;
  box-shadow: 0 7px 20px rgba(0, 0, 0, 0.2);
  transform: translateX(-50%);
}

.wardrobe-fitting-room__live > span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #8bd684;
  box-shadow: 0 0 9px rgba(128, 221, 124, 0.8);
  animation: wardrobeLivePulse 1.8s ease-in-out infinite;
}

@keyframes wardrobeLivePulse {
  50% {
    opacity: 0.55;
    transform: scale(0.72);
  }
}

.wardrobe-look-card {
  position: absolute;
  z-index: 6;
  display: grid;
  gap: 5px;
  width: min(250px, 22vw);
  min-width: 174px;
  padding: 13px 14px;
  border: 1px solid rgba(235, 188, 116, 0.23);
  border-radius: 14px;
  background:
    radial-gradient(circle at 0 0, rgba(255, 224, 169, 0.09), transparent 45%),
    linear-gradient(145deg, rgba(63, 38, 24, 0.91), rgba(25, 17, 12, 0.93));
  box-shadow:
    inset 0 1px 0 rgba(255, 242, 211, 0.08),
    0 14px 32px rgba(0, 0, 0, 0.24);
}

.wardrobe-look-card--hat {
  top: 20px;
  left: 18px;
}

.wardrobe-look-card--cowboy {
  top: 20px;
  right: 18px;
}

.wardrobe-look-card__eyebrow {
  display: flex;
  justify-content: space-between;
  color: rgba(226, 169, 94, 0.8);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.14em;
  line-height: 1;
  text-transform: uppercase;
}

.wardrobe-look-card__eyebrow output {
  color: rgba(255, 226, 174, 0.68);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

.wardrobe-look-card strong {
  display: -webkit-box;
  overflow: hidden;
  color: #ffe4aa;
  font: 800 21px/1.05 var(--font-title);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.wardrobe-look-card__state {
  justify-self: start;
  padding: 4px 7px;
  border: 1px solid rgba(230, 173, 94, 0.25);
  border-radius: 999px;
  color: #dea05c;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 0.1em;
  line-height: 1;
  text-transform: uppercase;
}

.wardrobe-look-card__state[data-kind="equipped"] {
  border-color: rgba(139, 205, 137, 0.34);
  color: #addda9;
}

.wardrobe-look-card__state[data-kind="unlocked"] {
  color: #f2c57e;
}

.wardrobe-look-card,
.wardrobe-cycle {
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease,
    opacity 150ms ease,
    transform 150ms ease;
}

.wardrobe-fitting-room[data-preview-slot="hat"] .wardrobe-look-card--cowboy,
.wardrobe-fitting-room[data-preview-slot="cowboy"] .wardrobe-look-card--hat {
  opacity: 0.68;
}

.wardrobe-fitting-room[data-preview-slot="hat"] .wardrobe-look-card--hat,
.wardrobe-fitting-room[data-preview-slot="cowboy"] .wardrobe-look-card--cowboy {
  border-color: rgba(255, 203, 121, 0.58);
  box-shadow:
    inset 0 1px 0 rgba(255, 242, 211, 0.13),
    0 15px 34px rgba(0, 0, 0, 0.3),
    0 0 0 3px rgba(184, 104, 43, 0.13);
  transform: translateY(-2px);
}

.wardrobe-fitting-room[data-preview-slot="hat"] .wardrobe-cycle--cowboy,
.wardrobe-fitting-room[data-preview-slot="cowboy"] .wardrobe-cycle--hat {
  opacity: 0.54;
}

.wardrobe-cycle {
  position: absolute;
  z-index: 7;
  left: 50%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: min(500px, 47vw);
  pointer-events: none;
  transform: translateX(-50%);
}

.wardrobe-cycle--hat {
  top: 23%;
}

.wardrobe-cycle--cowboy {
  top: 55%;
}

.wardrobe-cycle__arrow {
  position: relative;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  padding: 0;
  pointer-events: auto;
  border: 1px solid rgba(255, 211, 137, 0.5);
  border-radius: 16px;
  background:
    radial-gradient(circle at 50% 25%, rgba(255, 231, 184, 0.16), transparent 52%),
    linear-gradient(180deg, rgba(133, 74, 38, 0.97), rgba(61, 33, 20, 0.98));
  color: #ffe5ad;
  box-shadow:
    inset 0 1px 0 rgba(255, 245, 214, 0.2),
    inset 0 -4px 0 rgba(37, 17, 9, 0.28),
    0 11px 24px rgba(0, 0, 0, 0.32),
    0 0 0 5px rgba(49, 28, 17, 0.28);
  transition: border-color 130ms ease, filter 130ms ease, transform 130ms ease;
}

.wardrobe-cycle__arrow::after {
  position: absolute;
  inset: 5px;
  pointer-events: none;
  border: 1px solid rgba(255, 223, 163, 0.12);
  border-radius: 11px;
  content: "";
}

.wardrobe-cycle__arrow:hover,
.wardrobe-cycle__arrow:focus-visible {
  border-color: rgba(255, 224, 163, 0.82);
  filter: brightness(1.15);
}

.wardrobe-cycle__arrow:active {
  transform: translateY(2px);
}

.wardrobe-cycle__arrow svg {
  width: 34px;
  height: 34px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
  filter: drop-shadow(0 2px 2px rgba(28, 12, 5, 0.45));
}

.wardrobe-cycle__label {
  display: none;
}

.wardrobe-preview__copy {
  position: absolute;
  z-index: 8;
  right: 18px;
  bottom: 17px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 12px;
  align-items: end;
  width: min(330px, 27vw);
  min-width: 250px;
  padding: 13px 14px 14px;
  border: 1px solid rgba(231, 179, 102, 0.25);
  border-radius: 15px;
  background:
    radial-gradient(circle at 100% 0, rgba(229, 164, 77, 0.1), transparent 38%),
    linear-gradient(150deg, rgba(54, 33, 21, 0.94), rgba(20, 14, 10, 0.97));
  box-shadow:
    inset 0 1px 0 rgba(255, 239, 201, 0.09),
    0 16px 36px rgba(0, 0, 0, 0.3);
}

.wardrobe-preview__state {
  grid-column: 1 / -1;
}

.wardrobe-preview__copy h3,
.wardrobe-preview__copy p {
  grid-column: 1 / -1;
}

.wardrobe-preview__copy h3 {
  font-size: 25px;
}

.wardrobe-preview__copy p {
  font-size: 10px;
}

.wardrobe-preview__requirement {
  align-self: center;
}

.wardrobe-preview__equip {
  min-width: 134px;
  min-height: 46px;
  font-size: 9px;
}

.wardrobe-menu__footer {
  position: relative;
  z-index: 8;
  grid-template-columns: minmax(0, 1fr) auto;
  background: linear-gradient(180deg, rgba(28, 18, 12, 0.96), rgba(18, 12, 8, 0.99));
  box-shadow: 0 -12px 32px rgba(5, 3, 2, 0.18);
}

.wardrobe-menu__status[data-kind="success"] {
  color: #aedaac;
}

.wardrobe-menu__status[data-kind="error"] {
  color: #e6a07b;
}

@media (max-width: 900px) {
  .wardrobe-menu__panel {
    width: 100%;
    height: 100%;
    max-height: 100%;
  }

  .wardrobe-look-card {
    width: min(210px, 25vw);
  }

  .wardrobe-cycle {
    width: min(440px, 52vw);
  }

  .wardrobe-preview__copy {
    width: min(286px, 31vw);
  }
}

/* Short landscape phone viewports can be wider than 960 CSS pixels. Keep the
   compact fitting-room layout through 1280px so the details card never reaches
   the outfit arrows and its prose does not compete with touch controls. */
@media (orientation: landscape) and (max-width: 1280px) and (max-height: 520px) {
  .wardrobe-menu {
    --dialog-min-inline-gutter: 6px;
    padding:
      max(6px, env(safe-area-inset-top))
      var(--dialog-inline-gutter)
      max(6px, env(safe-area-inset-bottom));
  }

  .wardrobe-menu__panel {
    width: 100%;
    height: 100%;
    max-height: 100%;
    border-radius: 15px;
  }

  .wardrobe-menu__header {
    gap: 10px;
    padding: 9px 54px 8px 14px;
  }

  .wardrobe-menu__header .contracts-menu__eyebrow {
    margin-bottom: 3px;
    font-size: 6px;
  }

  .wardrobe-menu__header h2 {
    font-size: 27px;
  }

  .wardrobe-menu__header p {
    max-width: 44ch;
    margin-top: 3px;
    font-size: 8px;
    line-height: 1.2;
  }

  .wardrobe-menu__summary {
    grid-template-columns: repeat(2, minmax(88px, 1fr));
    gap: 5px;
  }

  .wardrobe-menu__summary .contracts-menu__summary-item {
    grid-template-columns: 27px minmax(0, 1fr);
    min-width: 88px;
    padding: 5px 7px 5px 5px;
  }

  .wardrobe-menu__summary .contracts-menu__summary-icon,
  .wardrobe-menu__owned-icon {
    width: 27px;
    height: 27px;
  }

  .wardrobe-menu__summary .contracts-menu__summary-item small {
    font-size: 6px;
  }

  .wardrobe-menu__summary .contracts-menu__summary-item output {
    font-size: 14px;
  }

  .wardrobe-fitting-room {
    min-height: 0;
    --wardrobe-side-panel: clamp(132px, 25%, 226px);
    --wardrobe-side-gutter: 8px;
  }

  .wardrobe-fitting-room__arch {
    top: 8px;
    bottom: 8px;
    width: min(300px, 42vw);
  }

  .wardrobe-fitting-room__floor {
    bottom: 7px;
    width: min(250px, 36vw);
    height: 22px;
  }

  /* Anchored to the side track rather than centred-plus-offset: on the
     narrowest phones the vw offset walked the pill under the outfit card. */
  .wardrobe-fitting-room__live {
    top: 6px;
    right: calc(var(--wardrobe-side-panel) + var(--wardrobe-side-gutter) + 8px);
    left: auto;
    padding: 4px 7px;
    font-size: 6px;
    transform: none;
  }

  .wardrobe-look-card {
    gap: 3px;
    min-width: 0;
    width: var(--wardrobe-side-panel);
    padding: 7px 8px;
    border-radius: 9px;
  }

  .wardrobe-look-card--hat {
    top: 7px;
    left: var(--wardrobe-side-gutter);
  }

  .wardrobe-look-card--cowboy {
    top: 7px;
    right: var(--wardrobe-side-gutter);
  }

  .wardrobe-look-card__eyebrow {
    font-size: 6px;
  }

  .wardrobe-look-card strong {
    font-size: 14px;
  }

  .wardrobe-look-card__state {
    padding: 3px 5px;
    font-size: 5px;
  }

  .wardrobe-cycle {
    width: min(350px, calc(100% - 2 * var(--wardrobe-side-clearance)));
  }

  .wardrobe-cycle--hat {
    top: 22%;
  }

  .wardrobe-cycle--cowboy {
    top: 54%;
  }

  .wardrobe-cycle__arrow {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    box-shadow:
      inset 0 1px 0 rgba(255, 245, 214, 0.2),
      inset 0 -3px 0 rgba(37, 17, 9, 0.28),
      0 7px 16px rgba(0, 0, 0, 0.28),
      0 0 0 3px rgba(49, 28, 17, 0.24);
  }

  .wardrobe-cycle__arrow::after {
    inset: 4px;
    border-radius: 8px;
  }

  .wardrobe-cycle__arrow svg {
    width: 27px;
    height: 27px;
  }

  .wardrobe-cycle__label {
    display: none;
  }

  .wardrobe-preview__copy {
    right: var(--wardrobe-side-gutter);
    bottom: 6px;
    gap: 3px 7px;
    width: var(--wardrobe-side-panel);
    min-width: 0;
    padding: 7px 8px;
    border-radius: 9px;
  }

  .wardrobe-preview__state {
    padding: 3px 5px;
    font-size: 5px;
  }

  .wardrobe-preview__copy h3 {
    font-size: 16px;
  }

  .wardrobe-preview__copy p {
    display: none;
  }

  .wardrobe-preview__requirement {
    gap: 3px;
    font-size: 7px;
  }

  .wardrobe-preview__progress {
    height: 4px;
  }

  .wardrobe-preview__equip {
    justify-self: stretch;
    min-width: 0;
    min-height: 42px;
    padding: 6px 8px;
    font-size: 7px;
  }

  .wardrobe-menu__footer {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    padding: 6px 9px;
  }

  .wardrobe-menu__status {
    overflow: hidden;
    font-size: 7px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .wardrobe-menu__footer .contracts-menu__back,
  .wardrobe-menu .contracts-menu__close {
    min-height: 42px;
  }
}

@media (orientation: landscape) and (max-width: 760px) and (max-height: 450px) {
  .wardrobe-menu__header p,
  .wardrobe-menu__owned {
    display: none;
  }

  .wardrobe-menu__summary {
    grid-template-columns: minmax(88px, 1fr);
  }

  .wardrobe-fitting-room {
    /* 142px is the floor the longest ru hat names need to stay on two lines;
       the arrow lane below is derived from it, so it shrinks instead. */
    --wardrobe-side-panel: clamp(142px, 24%, 160px);
    --wardrobe-side-gutter: 6px;
  }

  .wardrobe-look-card {
    width: var(--wardrobe-side-panel);
    min-width: 0;
  }

  .wardrobe-look-card strong {
    font-size: 12px;
  }

  /* Only ~180px of stage height is left here; without dropping the duplicate
     state pill the two right-hand cards run into each other. The details card
     below still spells the state out. */
  .wardrobe-look-card__state {
    display: none;
  }

  .wardrobe-cycle {
    width: min(220px, calc(100% - 2 * var(--wardrobe-side-clearance)));
  }

  .wardrobe-preview__copy {
    width: var(--wardrobe-side-panel);
    min-width: 0;
    padding: 6px;
  }

  .wardrobe-preview__copy h3 {
    font-size: 13px;
  }

  .wardrobe-preview__requirement {
    font-size: 5.5px;
  }

  .wardrobe-preview__equip {
    font-size: 6px;
  }
}

@media (orientation: portrait) and (max-width: 640px) {
  .wardrobe-menu__panel {
    height: 100%;
    max-height: 100%;
  }

  .wardrobe-menu__header {
    grid-template-columns: minmax(0, 1fr);
  }

  .wardrobe-menu__header p {
    display: none;
  }

  .wardrobe-menu__summary {
    display: none;
  }

  .wardrobe-fitting-room {
    min-height: 0;
  }

  .wardrobe-look-card {
    top: 12px;
    width: 42%;
    min-width: 0;
  }

  .wardrobe-look-card--hat {
    left: 10px;
  }

  .wardrobe-look-card--cowboy {
    right: 10px;
  }

  .wardrobe-cycle {
    width: min(340px, 84vw);
  }

  .wardrobe-preview__copy {
    right: 10px;
    bottom: 10px;
    left: 10px;
    width: auto;
    min-width: 0;
  }
}

@media (orientation: landscape) and (min-height: 521px) and (max-height: 680px) {
  .wardrobe-menu {
    --dialog-min-inline-gutter: 8px;
    padding:
      max(8px, env(safe-area-inset-top))
      var(--dialog-inline-gutter)
      max(8px, env(safe-area-inset-bottom));
  }

  .wardrobe-menu__panel {
    width: 100%;
    height: 100%;
    max-height: 100%;
  }

  .wardrobe-menu__header {
    gap: 12px;
    padding: 9px 58px 8px 16px;
  }

  .wardrobe-menu__header .contracts-menu__eyebrow {
    margin-bottom: 3px;
    font-size: 7px;
  }

  .wardrobe-menu__header h2 {
    font-size: clamp(29px, 5.4vh, 38px);
  }

  .wardrobe-menu__header p {
    max-width: 58ch;
    margin-top: 3px;
    font-size: 9px;
    line-height: 1.25;
  }

  .wardrobe-menu__summary .contracts-menu__summary-item {
    min-width: 118px;
    padding: 6px 9px 6px 6px;
  }

  .wardrobe-look-card {
    gap: 3px;
    width: min(230px, 22vw);
    padding: 8px 10px;
    border-radius: 11px;
  }

  .wardrobe-look-card--hat,
  .wardrobe-look-card--cowboy {
    top: 9px;
  }

  .wardrobe-look-card--hat {
    left: 10px;
  }

  .wardrobe-look-card--cowboy {
    right: 10px;
  }

  .wardrobe-look-card strong {
    font-size: 17px;
  }

  .wardrobe-cycle {
    width: min(460px, 36vw);
  }

  .wardrobe-cycle--hat {
    top: 25%;
  }

  .wardrobe-cycle--cowboy {
    top: 57%;
  }

  .wardrobe-cycle__arrow {
    width: 48px;
    height: 48px;
    border-radius: 13px;
  }

  .wardrobe-preview__copy {
    right: 10px;
    bottom: 8px;
    gap: 4px 8px;
    width: min(300px, 27vw);
    min-width: 224px;
    padding: 9px 10px 10px;
    border-radius: 11px;
  }

  .wardrobe-preview__copy h3 {
    font-size: 20px;
  }

  .wardrobe-preview__copy p {
    display: none;
  }

  .wardrobe-preview__requirement {
    gap: 4px;
    font-size: 8px;
  }

  .wardrobe-preview__equip {
    min-width: 118px;
    min-height: 42px;
    padding: 7px 10px;
    font-size: 8px;
  }

  .wardrobe-menu__footer {
    gap: 10px;
    padding: 7px 10px;
  }
}

/* Field guide ------------------------------------------------------------ */

.language-switcher {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: calc(max(18px, env(safe-area-inset-bottom)) + 78px);
  z-index: 18;
  display: none;
  grid-template-columns: repeat(3, 54px);
  gap: 7px;
  padding: 7px;
  border: 1px solid rgba(255, 221, 164, 0.3);
  border-radius: 15px;
  background:
    linear-gradient(180deg, rgba(73, 39, 20, 0.92), rgba(20, 12, 8, 0.96)),
    rgba(20, 12, 8, 0.94);
  box-shadow:
    0 14px 34px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 239, 204, 0.08);
  backdrop-filter: blur(10px);
}

#game-root.is-menu:not(.is-intro):not(.is-game-guide-open):not(.is-menu-settings-open):not(.is-layout-editing)
  .menu-panel.is-visible ~ .language-switcher {
  display: grid;
  animation: gameGuideLauncherEnter 320ms ease-out both;
}

/* The switcher lives above the menu chrome, so it would otherwise float over
   the settings dialog and the control layout editor bar that open on top of
   the main menu. Those views own the screen while they are up. */
#game-root.is-menu-settings-open .language-switcher,
#game-root.is-layout-editing .language-switcher {
  display: none !important;
}

.language-switcher__button {
  position: relative;
  display: grid;
  grid-template-rows: 22px auto;
  place-items: center;
  gap: 2px;
  min-width: 0;
  min-height: 44px;
  padding: 4px 5px 3px;
  border: 1px solid rgba(232, 183, 105, 0.28);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(113, 61, 28, 0.72), rgba(47, 26, 15, 0.88)),
    rgba(45, 25, 14, 0.9);
  color: rgba(244, 207, 143, 0.74);
  font: 900 8px/1 Consolas, "Courier New", monospace;
  letter-spacing: 0.12em;
  box-shadow: inset 0 1px 0 rgba(255, 236, 196, 0.08);
  cursor: var(--cursor-frontier-default);
  transition:
    border-color 150ms ease,
    background 150ms ease,
    color 150ms ease,
    transform 150ms ease;
}

.language-switcher__button:hover,
.language-switcher__button:focus-visible {
  border-color: rgba(255, 206, 122, 0.72);
  color: #ffe1a2;
  transform: translateY(-1px);
}

.language-switcher__button:focus-visible {
  outline: 2px solid #f6c36e;
  outline-offset: 2px;
}

.language-switcher__button.is-active {
  border-color: #efae4f;
  background:
    linear-gradient(180deg, rgba(159, 79, 31, 0.94), rgba(84, 38, 19, 0.96)),
    #6d351d;
  color: #fff0c7;
  box-shadow:
    inset 0 0 0 1px rgba(255, 226, 171, 0.2),
    0 5px 14px rgba(43, 18, 7, 0.36);
}

.language-switcher__button.is-active::after {
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #ffd273;
  box-shadow: 0 0 8px rgba(255, 196, 91, 0.84);
  content: "";
}

.language-switcher__flag {
  display: block;
  width: 34px;
  height: 23px;
  border: 1px solid rgba(255, 240, 211, 0.34);
  border-radius: 3px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.34);
}

@media (orientation: landscape) and (max-height: 640px) {
  #game-root.is-menu .menu-panel.is-visible {
    top: max(12px, env(safe-area-inset-top));
    bottom: auto;
    max-height: calc(
      100dvh - max(12px, env(safe-area-inset-top)) - max(12px, env(safe-area-inset-bottom))
    );
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    touch-action: pan-y;
    transform: none;
  }

  #game-root.is-menu .menu-panel__lead,
  #game-root.is-menu .menu-controls {
    display: none;
  }

  /* Four stacked catalogue rows are what pushed the menu past the bottom of a
     landscape phone. Paired into a 2x2 block they cost two rows instead of
     four. Placement is spelled out row by row so the pairs cannot reflow. */
  #game-root.is-menu .menu-panel__play-actions {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  /* Start and Local share the first row on Android. In a browser Local is
     hidden, so Start takes the row rather than leaving half of it empty. */
  #game-root.is-menu .menu-panel__play-actions > #start-btn {
    grid-area: 1 / 1;
  }

  html.no-local-multiplayer #game-root.is-menu .menu-panel__play-actions > #start-btn {
    grid-area: 1 / 1 / auto / -1;
  }

  #game-root.is-menu .menu-panel__play-actions > #local-multiplayer-btn {
    grid-area: 1 / 2;
  }

  #game-root.is-menu .menu-panel__play-actions > #online-multiplayer-btn {
    grid-area: 2 / 1 / auto / -1;
  }

  #game-root.is-menu .menu-panel__play-actions > #contracts-btn {
    grid-area: 3 / 1;
  }

  #game-root.is-menu .menu-panel__play-actions > #unlock-shop-btn {
    grid-area: 3 / 2;
  }

  #game-root.is-menu .menu-panel__play-actions > #wardrobe-btn {
    grid-area: 4 / 1;
  }

  #game-root.is-menu .menu-panel__play-actions > #challenges-btn {
    grid-area: 4 / 2;
  }

  /* At half width the row has no space for a subtitle and a chevron; the icon
     and the name carry it. */
  #game-root.is-menu .menu-panel__play-actions > .menu-contracts-btn {
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 8px;
    min-height: 44px;
    padding: 7px 9px;
  }

  #game-root.is-menu .menu-panel__play-actions > .menu-contracts-btn .menu-contracts-btn__copy small,
  #game-root.is-menu .menu-panel__play-actions > .menu-contracts-btn .menu-contracts-btn__arrow {
    display: none;
  }

  #game-root.is-menu .menu-panel__play-actions > .menu-contracts-btn .menu-contracts-btn__icon {
    width: 30px;
    height: 30px;
  }

  #game-root.is-menu .menu-panel__play-actions > .menu-contracts-btn .menu-contracts-btn__copy strong {
    font-size: 12px;
  }
}

@media (orientation: landscape) and (max-height: 520px) {
  #game-root.is-menu .menu-panel.is-visible {
    gap: 9px;
  }

  #game-root.is-menu .menu-panel__lead,
  #game-root.is-menu .menu-controls {
    display: none;
  }

  .language-switcher {
    right: max(8px, env(safe-area-inset-right));
    bottom: calc(max(8px, env(safe-area-inset-bottom)) + 62px);
    grid-template-columns: repeat(3, 43px);
    gap: 5px;
    padding: 5px;
    border-radius: 12px;
  }

  .language-switcher__button {
    grid-template-rows: 21px;
    min-height: 36px;
    padding: 5px 4px;
  }

  .language-switcher__button > span {
    display: none;
  }

  .language-switcher__flag {
    width: 32px;
    height: 21px;
  }
}

/* The shortest landscape phones need a few more pixels out of the menu before
   the last catalogue row clears the bottom edge. Must sit after the 520px
   block above, which sets the roomier gap. */
@media (orientation: landscape) and (max-height: 400px) {
  #game-root.is-menu .menu-panel.is-visible {
    gap: 6px;
  }

  #game-root.is-menu .menu-panel h1 {
    font-size: 23px;
  }

  #game-root.is-menu .menu-panel__play-actions {
    gap: 6px;
  }

  #game-root.is-menu .menu-panel__play-actions > .menu-contracts-btn {
    min-height: 40px;
  }
}

@media (orientation: portrait) and (max-width: 760px) {
  .language-switcher {
    top: max(10px, env(safe-area-inset-top));
    right: max(10px, env(safe-area-inset-right));
    bottom: auto;
    z-index: 18;
    grid-template-columns: repeat(3, 43px);
    gap: 5px;
    padding: 5px;
    border-radius: 12px;
  }

  .language-switcher__button {
    grid-template-rows: 21px;
    min-height: 36px;
    padding: 5px 4px;
  }

  .language-switcher__button > span {
    display: none;
  }

  .language-switcher__flag {
    width: 32px;
    height: 21px;
  }
}

.game-guide-launcher {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 8;
  display: none;
  grid-template-columns: 48px minmax(0, 1fr) 13px;
  gap: 12px;
  align-items: center;
  width: min(252px, calc(100vw - 36px));
  min-height: 66px;
  padding: 8px 14px 8px 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 222, 159, 0.42);
  border-radius: 17px;
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 213, 131, 0.18), transparent 38%),
    linear-gradient(145deg, rgba(91, 49, 24, 0.96), rgba(26, 16, 9, 0.98));
  color: #ffe7ad;
  text-align: left;
  box-shadow:
    0 22px 58px rgba(0, 0, 0, 0.46),
    inset 0 1px 0 rgba(255, 246, 220, 0.13),
    inset 0 -2px 0 rgba(27, 11, 5, 0.48);
  backdrop-filter: blur(12px);
  isolation: isolate;
}

.game-guide-launcher::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(105deg, transparent 0 54%, rgba(255, 232, 188, 0.06) 54% 55%, transparent 55%),
    repeating-linear-gradient(115deg, transparent 0 19px, rgba(255, 238, 205, 0.018) 19px 20px);
}

#game-root.is-menu:not(.is-intro):not(.is-game-guide-open)
  .menu-panel.is-visible + .game-guide-launcher {
  display: grid;
  animation: gameGuideLauncherEnter 300ms cubic-bezier(0.2, 0.82, 0.22, 1) both;
}

.game-guide-launcher:hover,
.game-guide-launcher:focus-visible {
  border-color: rgba(255, 222, 159, 0.66);
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 225, 154, 0.24), transparent 40%),
    linear-gradient(145deg, rgba(119, 64, 29, 0.98), rgba(36, 21, 11, 0.99));
  color: #fff4cf;
  transform: translateY(-2px);
}

.game-guide-launcher:active {
  transform: translateY(0) scale(0.985);
}

.game-guide-launcher__icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 219, 151, 0.32);
  border-radius: 13px;
  background:
    radial-gradient(circle at 40% 28%, rgba(255, 220, 147, 0.18), transparent 44%),
    rgba(21, 12, 7, 0.52);
  box-shadow:
    inset 0 1px 0 rgba(255, 241, 207, 0.08),
    0 7px 16px rgba(0, 0, 0, 0.24);
}

.game-guide-launcher__icon svg {
  width: 38px;
  height: 38px;
  overflow: visible;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.38));
}

.game-guide-launcher__book {
  fill: rgba(211, 151, 74, 0.95);
  stroke: #ffe0a0;
  stroke-linejoin: round;
  stroke-width: 1.35;
}

.game-guide-launcher__line {
  fill: none;
  stroke: rgba(91, 43, 20, 0.88);
  stroke-linecap: round;
  stroke-width: 1.7;
}

.game-guide-launcher__seal {
  fill: #823527;
  stroke: #ffd180;
  stroke-width: 1.2;
}

.game-guide-launcher__info {
  fill: none;
  stroke: #fff0be;
  stroke-linecap: round;
  stroke-width: 1.7;
}

.game-guide-launcher__copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 4px;
  min-width: 0;
}

.game-guide-launcher__copy small {
  overflow: hidden;
  color: rgba(235, 190, 116, 0.7);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.11em;
  line-height: 1;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.game-guide-launcher__copy strong {
  color: currentColor;
  font: 900 17px/1 var(--font-title);
  letter-spacing: 0.025em;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.48);
}

html[data-locale="hi"] .game-guide-launcher__copy strong,
html[data-locale="hi"] .game-guide-launcher__copy small {
  line-height: 1.25;
}

.game-guide-launcher__arrow {
  width: 9px;
  height: 9px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  opacity: 0.72;
  transform: rotate(45deg);
}

#game-root.is-menu .menu-panel.is-visible ~ .progression-toast-stack {
  bottom: max(98px, calc(env(safe-area-inset-bottom) + 80px));
}

.game-guide {
  z-index: 30;
  background:
    radial-gradient(circle at 12% 8%, rgba(225, 145, 62, 0.21), transparent 31%),
    radial-gradient(circle at 88% 92%, rgba(100, 36, 22, 0.2), transparent 35%),
    linear-gradient(155deg, rgba(12, 7, 4, 0.83), rgba(4, 3, 2, 0.94));
}

.game-guide__panel {
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(1160px, 100%);
  height: min(820px, 100%);
  max-height: 100%;
  background:
    radial-gradient(circle at 7% 0%, rgba(255, 202, 112, 0.15), transparent 27%),
    linear-gradient(155deg, rgba(73, 38, 18, 0.99), rgba(17, 11, 7, 0.995));
}

.game-guide__header {
  grid-template-columns: minmax(300px, 1fr) minmax(360px, 0.78fr);
  gap: 28px;
  padding: 22px 76px 16px 24px;
  background:
    linear-gradient(90deg, rgba(255, 231, 184, 0.035), transparent 58%),
    rgba(24, 14, 8, 0.22);
}

.game-guide__header h2 {
  font-size: clamp(34px, 4.4vw, 50px);
}

.game-guide__header p {
  max-width: 68ch;
  margin-top: 7px;
}

.game-guide__nav {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  min-width: 0;
  padding: 5px;
  border: 1px solid rgba(255, 219, 151, 0.16);
  border-radius: 13px;
  background: rgba(14, 8, 5, 0.42);
  box-shadow: inset 0 1px 0 rgba(255, 242, 211, 0.035);
}

.game-guide__nav button {
  min-width: 0;
  min-height: 38px;
  padding: 8px 7px;
  border-color: transparent;
  border-radius: 9px;
  background: transparent;
  color: rgba(238, 201, 139, 0.64);
  font-size: 8px;
  letter-spacing: 0.065em;
  box-shadow: none;
}

.game-guide__nav button:hover,
.game-guide__nav button:focus-visible {
  border-color: rgba(255, 215, 146, 0.2);
  background: rgba(101, 52, 25, 0.54);
  color: #ffedc0;
}

.game-guide__nav button[aria-current="page"] {
  border-color: rgba(240, 164, 77, 0.46);
  background:
    linear-gradient(180deg, rgba(147, 73, 31, 0.96), rgba(67, 33, 17, 0.98));
  color: #fff1ca;
  box-shadow:
    inset 0 1px 0 rgba(255, 231, 186, 0.12),
    0 6px 15px rgba(0, 0, 0, 0.18);
}

.game-guide__body {
  display: grid;
  grid-template-columns: minmax(228px, 276px) minmax(0, 1fr);
  align-items: start;
  min-height: 0;
  padding: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
  scrollbar-color: rgba(211, 132, 63, 0.64) rgba(15, 9, 5, 0.32);
  scrollbar-width: thin;
  touch-action: pan-y;
}

.game-guide__body::-webkit-scrollbar {
  width: 10px;
}

.game-guide__body::-webkit-scrollbar-track {
  background: rgba(15, 9, 5, 0.34);
}

.game-guide__body::-webkit-scrollbar-thumb {
  border: 2px solid rgba(18, 10, 6, 0.82);
  border-radius: 999px;
  background: linear-gradient(#d88d48, #793b1e);
}

.game-guide__rail {
  position: sticky;
  top: 0;
  display: grid;
  gap: 17px;
  align-content: start;
  min-width: 0;
  min-height: 100%;
  padding: 20px;
  border-right: 1px solid rgba(255, 220, 157, 0.14);
  background:
    radial-gradient(circle at 16% 5%, rgba(220, 138, 59, 0.11), transparent 28%),
    linear-gradient(180deg, rgba(32, 18, 10, 0.66), rgba(16, 10, 6, 0.74));
  box-shadow: 12px 0 30px rgba(0, 0, 0, 0.12);
}

.game-guide__label {
  display: block;
  color: #d69951;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 0.17em;
  line-height: 1.2;
  text-transform: uppercase;
}

.game-guide__objective {
  padding: 1px 2px 15px;
  border-bottom: 1px solid rgba(255, 221, 159, 0.13);
}

.game-guide__objective h3 {
  max-width: 11ch;
  margin: 8px 0 7px;
  color: #ffe3aa;
  font: 900 24px/1.02 var(--font-title);
}

.game-guide__objective p,
.game-guide__card-note {
  margin: 0;
  color: rgba(244, 211, 155, 0.65);
  font-size: 9px;
  line-height: 1.5;
}

.game-guide__loop {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.game-guide__loop li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
}

.game-guide__loop li > span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(234, 169, 84, 0.31);
  border-radius: 9px;
  background: rgba(91, 45, 21, 0.62);
  color: #f5bd71;
  font: 900 13px/1 var(--font-title);
  box-shadow: inset 0 1px 0 rgba(255, 237, 201, 0.07);
}

.game-guide__loop li > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.game-guide__loop strong {
  color: #fbe1ad;
  font-size: 10px;
  line-height: 1.1;
}

.game-guide__loop small {
  color: rgba(230, 191, 126, 0.58);
  font-size: 8px;
  line-height: 1.25;
}

.game-guide__card-example {
  display: grid;
  gap: 9px;
  justify-items: center;
  padding-top: 1px;
}

.game-guide__card-example > .game-guide__label {
  justify-self: start;
}

.game-guide-card {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 7px;
  width: min(164px, 100%);
  min-height: 218px;
  padding: 28px 18px 17px;
  overflow: hidden;
  border: 2px solid #dfc18b;
  border-radius: 13px;
  background:
    radial-gradient(circle at 50% 34%, rgba(144, 42, 31, 0.08), transparent 36%),
    repeating-linear-gradient(0deg, transparent 0 25px, rgba(85, 48, 28, 0.025) 25px 26px),
    linear-gradient(155deg, #f4e5c5, #dec69a);
  color: #28160d;
  text-align: center;
  box-shadow:
    0 16px 30px rgba(0, 0, 0, 0.31),
    inset 0 0 0 3px rgba(91, 45, 22, 0.16);
  transform: rotate(-1.5deg);
}

.game-guide-card::before {
  position: absolute;
  inset: 6px;
  pointer-events: none;
  content: "";
  border: 1px solid rgba(77, 37, 19, 0.22);
  border-radius: 8px;
}

.game-guide-card__corner {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 1;
  display: grid;
  gap: 1px;
  color: #8d211c;
  font: 900 15px/0.82 var(--font-title);
}

.game-guide-card__corner b {
  font-size: 12px;
}

.game-guide-card__art {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  color: #9b1b1b;
  filter: drop-shadow(0 4px 3px rgba(75, 34, 19, 0.18));
}

.game-guide-card__art .upgrade-card__icon {
  width: 100%;
  height: 100%;
}

.game-guide-card > strong {
  color: #341c10;
  font: 900 17px/1 var(--font-title);
}

.game-guide-card > p {
  max-width: 16ch;
  margin: 0;
  color: rgba(55, 30, 17, 0.76);
  font-size: 9px;
  font-weight: 800;
  line-height: 1.35;
}

.game-guide-card > small {
  margin-top: 2px;
  padding: 4px 7px;
  border: 1px solid rgba(101, 49, 25, 0.21);
  border-radius: 999px;
  color: rgba(78, 36, 19, 0.67);
  font-size: 6px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.game-guide__card-note {
  max-width: 24ch;
  text-align: center;
}

.game-guide__chapters {
  display: grid;
  align-content: start;
  min-width: 0;
  padding: 0 24px 34px;
}

.game-guide__chapter {
  min-width: 0;
  padding: 26px 0 30px;
  border-bottom: 1px solid rgba(255, 221, 159, 0.13);
  scroll-margin-top: 12px;
  outline: 0;
}

.game-guide__chapter:last-child {
  padding-bottom: 10px;
  border-bottom: 0;
}

.game-guide__chapter-heading {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 15px;
}

.game-guide__chapter-heading > span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border: 1px solid rgba(230, 159, 75, 0.34);
  border-radius: 12px;
  background:
    linear-gradient(145deg, rgba(126, 61, 28, 0.92), rgba(49, 25, 13, 0.96));
  color: #f4bc6c;
  font: 900 14px/1 var(--font-title);
  box-shadow:
    inset 0 1px 0 rgba(255, 237, 199, 0.09),
    0 7px 16px rgba(0, 0, 0, 0.2);
}

.game-guide__chapter-heading > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.game-guide__chapter-heading small,
.game-guide__control-title small,
.game-guide__progress-card > div small {
  color: #d6984f;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 0.16em;
  line-height: 1;
  text-transform: uppercase;
}

.game-guide__chapter h3 {
  margin: 0;
  color: #ffe1a4;
  font: 900 clamp(23px, 2.5vw, 31px) / 1 var(--font-title);
}

.game-guide__lead {
  max-width: 74ch;
  margin: 0 0 16px;
  color: rgba(255, 232, 191, 0.75);
  font-size: 11px;
  line-height: 1.55;
}

.game-guide__lead strong {
  color: #fff0c6;
}

.game-guide__steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.game-guide__steps article {
  position: relative;
  min-width: 0;
  padding: 15px;
  overflow: hidden;
  border: 1px solid rgba(255, 220, 157, 0.17);
  border-radius: 14px;
  background:
    linear-gradient(145deg, rgba(255, 229, 183, 0.045), transparent 62%),
    rgba(25, 15, 9, 0.58);
  box-shadow: inset 0 1px 0 rgba(255, 242, 211, 0.035);
}

.game-guide__steps article > span {
  position: absolute;
  top: 6px;
  right: 9px;
  color: rgba(222, 150, 71, 0.13);
  font: 900 32px/1 var(--font-title);
}

.game-guide__steps h4,
.game-guide__control-title h4,
.game-guide__timeline h4,
.game-guide__progress-card h4,
.game-guide__where h4 {
  position: relative;
  margin: 0;
  color: #fce0aa;
  font: 900 16px/1.08 var(--font-title);
}

.game-guide__steps h4 {
  padding-inline-end: 44px;
}

.game-guide__steps p,
.game-guide__timeline p,
.game-guide__progress-card p,
.game-guide__aftercare p {
  position: relative;
  margin: 7px 0 0;
  color: rgba(239, 205, 149, 0.64);
  font-size: 9px;
  line-height: 1.5;
}

.game-guide__steps strong,
.game-guide__progress-card strong {
  color: #ffeac0;
}

.game-guide__callout {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 11px;
  align-items: center;
  margin-top: 10px;
  padding: 10px 13px;
  border: 1px solid rgba(216, 101, 63, 0.3);
  border-radius: 13px;
  background:
    radial-gradient(circle at 0 50%, rgba(181, 61, 41, 0.14), transparent 26%),
    rgba(54, 22, 14, 0.56);
}

.game-guide__callout-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(237, 142, 91, 0.4);
  border-radius: 50%;
  background: rgba(117, 39, 28, 0.78);
  color: #ffd18f;
  font: 900 13px/1 var(--font-title);
}

.game-guide__callout p {
  margin: 0;
  color: rgba(248, 213, 158, 0.7);
  font-size: 9px;
  line-height: 1.45;
}

.game-guide__callout strong {
  color: #ffeac0;
}

.game-guide__control-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.game-guide__control-grid > article {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 220, 157, 0.17);
  border-radius: 15px;
  background: rgba(24, 14, 8, 0.58);
}

.game-guide__control-title {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 12px 13px;
  border-bottom: 1px solid rgba(255, 221, 159, 0.12);
  background: rgba(104, 50, 23, 0.28);
}

.game-guide__control-title > span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border: 1px solid rgba(239, 170, 84, 0.28);
  border-radius: 10px;
  color: #efb468;
  font-size: 18px;
}

.game-guide__control-title > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.game-guide__keys {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 8px 12px 12px;
}

.game-guide__keys > div {
  display: grid;
  gap: 4px;
  padding: 8px 4px;
  border-bottom: 1px solid rgba(255, 222, 163, 0.08);
}

.game-guide__keys dt,
.game-guide__keys dd {
  margin: 0;
}

.game-guide__keys dt {
  white-space: nowrap;
}

.game-guide__keys kbd {
  display: inline-block;
  min-width: 25px;
  padding: 4px 5px;
  border: 1px solid rgba(255, 219, 151, 0.26);
  border-bottom-color: rgba(126, 63, 29, 0.72);
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(103, 57, 30, 0.96), rgba(48, 27, 15, 0.98));
  color: #ffdf9f;
  font: 900 7px/1 var(--font-ui);
  letter-spacing: 0.03em;
  text-align: center;
  box-shadow:
    inset 0 1px 0 rgba(255, 239, 201, 0.1),
    0 2px 0 rgba(18, 8, 4, 0.42);
}

.game-guide__keys em {
  color: rgba(225, 183, 116, 0.42);
  font-size: 6px;
}

.game-guide__keys dd {
  color: rgba(240, 204, 144, 0.61);
  font-size: 8px;
}

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

.game-guide__mobile-list li {
  display: grid;
  grid-template-columns: minmax(72px, 0.36fr) minmax(0, 1fr);
  gap: 9px;
  padding: 8px 4px;
  border-bottom: 1px solid rgba(255, 222, 163, 0.08);
}

.game-guide__mobile-list strong {
  color: #f8d89c;
  font-size: 8px;
}

.game-guide__mobile-list span {
  color: rgba(238, 201, 139, 0.6);
  font-size: 8px;
  line-height: 1.3;
}

.game-guide__hud-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 220, 157, 0.16);
  border-radius: 13px;
  background: rgba(255, 220, 157, 0.12);
}

.game-guide__hud-strip article {
  min-width: 0;
  padding: 11px 13px;
  background: rgba(28, 17, 10, 0.93);
}

.game-guide__hud-strip span {
  color: #e8a959;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.game-guide__hud-strip p {
  margin: 5px 0 0;
  color: rgba(237, 201, 139, 0.58);
  font-size: 8px;
  line-height: 1.35;
}

.game-guide__timeline {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.game-guide__timeline::before {
  position: absolute;
  top: 19px;
  right: 8%;
  left: 8%;
  height: 1px;
  pointer-events: none;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(226, 144, 61, 0.42) 9% 91%, transparent);
}

.game-guide__timeline article {
  position: relative;
  min-width: 0;
  padding: 10px 12px 13px;
  border: 1px solid rgba(255, 220, 157, 0.16);
  border-radius: 13px;
  background:
    linear-gradient(180deg, rgba(103, 48, 22, 0.33), transparent 42%),
    rgba(24, 14, 8, 0.66);
}

.game-guide__timeline article > span {
  position: relative;
  display: inline-flex;
  min-height: 20px;
  align-items: center;
  margin-bottom: 9px;
  padding: 4px 7px;
  border: 1px solid rgba(236, 161, 76, 0.32);
  border-radius: 999px;
  background: rgba(91, 43, 20, 0.92);
  color: #f5ba69;
  font-size: 6px;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.game-guide__timeline h4 {
  font-size: 14px;
}

.game-guide__classes {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.game-guide__classes li {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-width: 0;
  padding: 9px;
  border: 1px solid rgba(255, 220, 157, 0.13);
  border-radius: 12px;
  background: rgba(27, 16, 9, 0.57);
}

.game-guide__classes svg {
  width: 54px;
  height: 30px;
  overflow: visible;
  color: #e5aa62;
  filter: drop-shadow(0 3px 3px rgba(0, 0, 0, 0.38));
}

.game-guide__classes li > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.game-guide__classes strong {
  overflow: hidden;
  color: #f9dda6;
  font-size: 9px;
  text-overflow: ellipsis;
}

.game-guide__classes span {
  color: rgba(235, 196, 132, 0.55);
  font-size: 7px;
  line-height: 1.25;
}

.game-guide__progress-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.game-guide__progress-card {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 4px 12px;
  align-items: center;
  min-width: 0;
  padding: 13px;
  border: 1px solid rgba(255, 220, 157, 0.18);
  border-radius: 15px;
  background:
    radial-gradient(circle at 7% 10%, rgba(232, 154, 69, 0.09), transparent 28%),
    rgba(25, 15, 9, 0.65);
}

.game-guide__progress-icon {
  display: grid;
  grid-row: 1 / 3;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 220, 153, 0.25);
  border-radius: 13px;
  background: rgba(17, 10, 6, 0.5);
}

.game-guide__progress-icon svg {
  width: 38px;
  height: 38px;
  overflow: visible;
  filter: drop-shadow(0 0 5px rgba(241, 159, 67, 0.38));
}

.game-guide__progress-card > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.game-guide__progress-card p {
  grid-column: 2;
  margin-top: 3px;
}

.game-guide__where {
  margin-top: 10px;
  padding: 14px;
  border: 1px solid rgba(255, 220, 157, 0.17);
  border-radius: 15px;
  background:
    linear-gradient(115deg, rgba(112, 54, 24, 0.28), transparent 48%),
    rgba(22, 13, 8, 0.66);
}

.game-guide__where h4 {
  margin-bottom: 10px;
}

.game-guide__where h4 strong {
  color: #f2ad5a;
}

.game-guide__where dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin: 0;
}

.game-guide__where dl > div {
  display: grid;
  grid-template-columns: minmax(74px, 0.32fr) minmax(0, 1fr);
  gap: 8px;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid rgba(255, 221, 159, 0.09);
  border-radius: 10px;
  background: rgba(255, 234, 195, 0.025);
}

.game-guide__where dt,
.game-guide__where dd {
  margin: 0;
  font-size: 8px;
  line-height: 1.35;
}

.game-guide__where dt {
  color: #f3c981;
  font-weight: 900;
}

.game-guide__where dd {
  color: rgba(237, 201, 139, 0.59);
}

.game-guide__aftercare {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 9px;
}

.game-guide__aftercare article {
  min-width: 0;
  padding: 11px 13px;
  border-left: 3px solid rgba(218, 137, 57, 0.62);
  border-radius: 2px 11px 11px 2px;
  background: rgba(49, 27, 14, 0.56);
}

.game-guide__aftercare span {
  color: #efb96e;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.game-guide__aftercare p {
  margin-top: 5px;
}

.game-guide__footer {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  padding: 10px 14px 10px 18px;
}

.game-guide__footer p {
  margin: 0;
  color: rgba(235, 197, 132, 0.63);
  font-size: 9px;
  line-height: 1.4;
}

.game-guide__footer p strong {
  color: #f8d89c;
}

.game-guide :is(
  .game-guide__nav button,
  .contracts-menu__back,
  .contracts-menu__close
):focus-visible {
  outline: 2px solid #f6c36e;
  outline-offset: 2px;
}

@keyframes gameGuideLauncherEnter {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .game-guide__panel {
    width: 100%;
    height: 100%;
    max-height: 100%;
  }

  .game-guide__header {
    grid-template-columns: minmax(260px, 1fr) minmax(330px, 0.9fr);
    gap: 16px;
    padding: 17px 64px 13px 18px;
  }

  .game-guide__body {
    grid-template-columns: minmax(196px, 224px) minmax(0, 1fr);
  }

  .game-guide__rail {
    gap: 14px;
    padding: 16px;
  }

  .game-guide__objective h3 {
    font-size: 21px;
  }

  .game-guide-card {
    width: 142px;
    min-height: 190px;
  }

  .game-guide-card__art {
    width: 68px;
    height: 68px;
  }

  .game-guide__chapters {
    padding-right: 17px;
    padding-left: 17px;
  }

  .game-guide__steps article {
    padding: 12px;
  }

  .game-guide__timeline h4 {
    font-size: 13px;
  }

  .game-guide__classes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (orientation: landscape) and (max-width: 960px) and (max-height: 520px) {
  .game-guide-launcher {
    right: max(8px, env(safe-area-inset-right));
    bottom: max(8px, env(safe-area-inset-bottom));
    grid-template-columns: 40px minmax(0, 1fr) 10px;
    gap: 9px;
    width: 208px;
    min-height: 52px;
    padding: 6px 10px 6px 6px;
    border-radius: 13px;
  }

  .game-guide-launcher__icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
  }

  .game-guide-launcher__icon svg {
    width: 32px;
    height: 32px;
  }

  .game-guide-launcher__copy small {
    font-size: 6px;
  }

  .game-guide-launcher__copy strong {
    font-size: 14px;
  }

  #game-root.is-menu .menu-panel.is-visible ~ .progression-toast-stack {
    bottom: max(70px, calc(env(safe-area-inset-bottom) + 60px));
  }

  .game-guide {
    --dialog-min-inline-gutter: 6px;
    padding:
      max(6px, env(safe-area-inset-top))
      var(--dialog-inline-gutter)
      max(6px, env(safe-area-inset-bottom));
  }

  .game-guide__panel {
    width: 100%;
    height: 100%;
    max-height: 100%;
    border-radius: 14px;
  }

  .game-guide__close {
    top: 7px;
    right: 7px;
    width: 42px;
    height: 42px;
    border-radius: 9px;
    font-size: 24px;
  }

  .game-guide__header {
    grid-template-columns: minmax(236px, 1fr) minmax(300px, 0.95fr);
    gap: 12px;
    padding: 8px 53px 7px 13px;
  }

  .game-guide__eyebrow {
    margin-bottom: 3px;
    font-size: 9px;
  }

  .game-guide__header h2 {
    font-size: clamp(27px, 8vh, 35px);
  }

  .game-guide__header p {
    display: none;
  }

  .game-guide__nav {
    gap: 3px;
    padding: 3px;
    border-radius: 9px;
  }

  .game-guide__nav button {
    min-height: 32px;
    padding: 6px 4px;
    border-radius: 7px;
    font-size: 9px;
  }

  .game-guide__body {
    grid-template-columns: 1fr;
  }

  .game-guide__rail {
    display: none;
  }

  .game-guide__objective {
    padding-bottom: 9px;
  }

  .game-guide__objective h3 {
    max-width: 13ch;
    margin: 5px 0 4px;
    font-size: 16px;
  }

  .game-guide__objective p {
    font-size: 7px;
    line-height: 1.35;
  }

  .game-guide__loop {
    gap: 5px;
  }

  .game-guide__loop li {
    grid-template-columns: 23px minmax(0, 1fr);
    gap: 6px;
  }

  .game-guide__loop li > span {
    width: 23px;
    height: 23px;
    border-radius: 7px;
    font-size: 10px;
  }

  .game-guide__loop strong {
    font-size: 8px;
  }

  .game-guide__loop small {
    display: none;
  }

  .game-guide__card-example {
    gap: 6px;
  }

  .game-guide-card {
    width: 114px;
    min-height: 150px;
    gap: 4px;
    padding: 22px 12px 10px;
    border-radius: 10px;
  }

  .game-guide-card__corner {
    top: 9px;
    left: 9px;
    font-size: 11px;
  }

  .game-guide-card__art {
    width: 49px;
    height: 49px;
  }

  .game-guide-card > strong {
    font-size: 12px;
  }

  .game-guide-card > p {
    font-size: 7px;
  }

  .game-guide-card > small,
  .game-guide__card-note {
    display: none;
  }

  .game-guide__chapters {
    padding: 0 12px 18px;
  }

  .game-guide__chapter {
    padding: 14px 0 16px;
  }

  .game-guide__chapter-heading {
    gap: 8px;
    margin-bottom: 9px;
  }

  .game-guide__chapter-heading > span {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
    border-radius: 9px;
    font-size: 10px;
  }

  .game-guide__chapter h3 {
    font-size: 20px;
  }

  .game-guide__lead {
    margin-bottom: 9px;
    font-size: 11px;
    line-height: 1.45;
  }

  .game-guide__steps {
    gap: 6px;
  }

  .game-guide__steps article {
    padding: 9px;
    border-radius: 10px;
  }

  .game-guide__steps article > span {
    font-size: 24px;
  }

  .game-guide__steps h4,
  .game-guide__control-title h4,
  .game-guide__progress-card h4,
  .game-guide__where h4 {
    font-size: 15px;
  }

  .game-guide__steps h4 {
    padding-inline-end: 34px;
  }

  .game-guide__steps p,
  .game-guide__timeline p,
  .game-guide__progress-card p,
  .game-guide__aftercare p {
    margin-top: 4px;
    font-size: 11px;
    line-height: 1.45;
  }

  .game-guide__callout {
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 8px;
    margin-top: 6px;
    padding: 7px 9px;
    border-radius: 9px;
  }

  .game-guide__callout-mark {
    width: 28px;
    height: 28px;
    font-size: 10px;
  }

  .game-guide__callout p {
    font-size: 11px;
    line-height: 1.4;
  }

  .game-guide__control-grid {
    gap: 6px;
  }

  .game-guide__control-grid > article {
    border-radius: 10px;
  }

  .game-guide__control-title {
    gap: 7px;
    padding: 7px 8px;
  }

  .game-guide__control-title > span {
    width: 27px;
    height: 27px;
    flex-basis: 27px;
    border-radius: 8px;
    font-size: 13px;
  }

  .game-guide__keys,
  .game-guide__mobile-list {
    padding: 4px 7px 7px;
  }

  .game-guide__keys > div,
  .game-guide__mobile-list li {
    padding: 5px 2px;
  }

  .game-guide__keys kbd,
  .game-guide__keys dd,
  .game-guide__mobile-list strong,
  .game-guide__mobile-list span {
    font-size: 11px;
  }

  .game-guide__hud-strip {
    margin-top: 6px;
    border-radius: 9px;
  }

  .game-guide__hud-strip article {
    padding: 7px 8px;
  }

  .game-guide__hud-strip span {
    font-size: 10px;
  }

  .game-guide__hud-strip p {
    margin-top: 3px;
    font-size: 11px;
    line-height: 1.4;
  }

  .game-guide__timeline {
    gap: 5px;
  }

  .game-guide__timeline article {
    padding: 7px 8px 9px;
    border-radius: 9px;
  }

  .game-guide__timeline article > span {
    min-height: 17px;
    margin-bottom: 6px;
    padding: 3px 5px;
    font-size: 9px;
  }

  .game-guide__timeline h4 {
    font-size: 13px;
  }

  .game-guide__classes {
    gap: 5px;
    margin-top: 6px;
  }

  .game-guide__classes li {
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 6px;
    padding: 6px;
    border-radius: 8px;
  }

  .game-guide__classes svg {
    width: 42px;
    height: 24px;
  }

  .game-guide__classes strong {
    font-size: 11px;
  }

  .game-guide__classes span {
    font-size: 11px;
    line-height: 1.35;
  }

  .game-guide__progress-grid {
    gap: 6px;
  }

  .game-guide__progress-card {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 3px 8px;
    padding: 8px;
    border-radius: 10px;
  }

  .game-guide__progress-icon {
    width: 36px;
    height: 36px;
    border-radius: 9px;
  }

  .game-guide__progress-icon svg {
    width: 30px;
    height: 30px;
  }

  .game-guide__where {
    margin-top: 6px;
    padding: 9px;
    border-radius: 10px;
  }

  .game-guide__where h4 {
    margin-bottom: 6px;
  }

  .game-guide__where dl {
    gap: 4px;
  }

  .game-guide__where dl > div {
    grid-template-columns: minmax(56px, 0.28fr) minmax(0, 1fr);
    gap: 5px;
    padding: 6px;
    border-radius: 7px;
  }

  .game-guide__where dt,
  .game-guide__where dd {
    font-size: 11px;
    line-height: 1.4;
  }

  .game-guide__aftercare {
    gap: 5px;
    margin-top: 5px;
  }

  .game-guide__aftercare article {
    padding: 7px 8px;
    border-radius: 2px 8px 8px 2px;
  }

  .game-guide__aftercare span {
    font-size: 9px;
  }

  .game-guide__footer {
    gap: 10px;
    padding: 6px 8px 6px 10px;
  }

  .game-guide__footer p {
    overflow: hidden;
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .game-guide__footer .contracts-menu__back {
    min-width: 130px;
    min-height: 42px;
    padding: 8px 11px;
    font-size: 10px;
  }

  .game-guide__chapter-heading small,
  .game-guide__control-title small,
  .game-guide__progress-card small {
    font-size: 9px;
  }
}

@media (orientation: landscape) and (max-width: 580px) {
  html[data-locale="hi"] .menu-contracts-btn {
    grid-template-columns: 30px minmax(0, 1fr);
  }

  html[data-locale="hi"] .menu-contracts-btn__arrow {
    display: none;
  }

  html[data-locale="hi"] .menu-contracts-btn__copy small {
    font-size: 7.5px;
    letter-spacing: 0.01em;
  }

  .game-guide-launcher {
    grid-template-columns: 40px minmax(0, 1fr);
    width: 148px;
  }

  .game-guide-launcher__copy small,
  .game-guide-launcher__arrow {
    display: none;
  }

  .game-guide__header {
    grid-template-columns: minmax(180px, 1fr) minmax(240px, 1.2fr);
  }

  .game-guide__body {
    grid-template-columns: 1fr;
  }

  .game-guide__rail {
    display: none;
  }
}

@media (orientation: landscape) and (max-width: 640px) {
  .game-guide__header {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }

  .game-guide__header h2 {
    font-size: 24px;
  }

  .game-guide__nav {
    grid-column: 1;
    width: 100%;
  }

  .game-guide__body {
    grid-template-columns: 1fr;
  }

  .game-guide__rail {
    display: none;
  }
}

@media (orientation: landscape) and (max-width: 500px) {
  .game-guide-launcher {
    width: 144px;
  }
}

@media (orientation: portrait) and (max-width: 760px) {
  .game-guide-launcher {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .language-switcher {
    animation: none !important;
  }

  .language-switcher__button,
  .game-guide-launcher,
  .game-guide.is-visible,
  .game-guide.is-visible .game-guide__panel {
    animation: none !important;
    transition: none !important;
  }

  .game-guide-launcher:hover,
  .game-guide-launcher:focus-visible,
  .game-guide-launcher:active {
    transform: none;
  }

  .language-switcher__button:hover,
  .language-switcher__button:focus-visible,
  .language-switcher__button:active {
    transform: none;
  }

  .game-guide__body {
    scroll-behavior: auto;
  }
}

/* Frontier pointer, combat reticle, and main-menu settings --------------- */

#game-root.is-playing:not(.is-paused):not(.has-blocking-overlay):not(.is-layout-editing),
#game-root.is-playing:not(.is-paused):not(.has-blocking-overlay):not(.is-layout-editing) canvas {
  cursor: var(--cursor-frontier-crosshair);
}

.menu-settings-btn {
  position: fixed;
  top: calc(max(18px, env(safe-area-inset-top)) + 5px);
  right: max(18px, env(safe-area-inset-right));
  z-index: 8;
  display: none;
  place-items: center;
  width: 56px;
  height: 56px;
  padding: 0;
  overflow: visible;
  border: 1px solid rgba(255, 222, 159, 0.46);
  border-radius: 17px;
  background:
    radial-gradient(circle at 35% 24%, rgba(255, 229, 169, 0.2), transparent 38%),
    linear-gradient(145deg, rgba(101, 55, 27, 0.98), rgba(30, 18, 10, 0.99));
  color: #f1b65d;
  box-shadow:
    0 18px 44px rgba(0, 0, 0, 0.44),
    inset 0 1px 0 rgba(255, 245, 214, 0.15),
    inset 0 -2px 0 rgba(35, 13, 5, 0.55);
  isolation: isolate;
  backdrop-filter: blur(11px);
  transition:
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

#game-root.is-menu:not(.is-intro):not(.is-menu-settings-open) > .menu-settings-btn {
  display: grid;
  animation: gameGuideLauncherEnter 280ms cubic-bezier(0.2, 0.82, 0.22, 1) both;
}

#game-root.is-menu:not(.is-intro) > .progression-wallet {
  right: calc(max(18px, env(safe-area-inset-right)) + 68px);
}

.menu-settings-btn::before {
  position: absolute;
  inset: 5px;
  z-index: -1;
  border: 1px solid rgba(244, 177, 83, 0.18);
  border-radius: 12px;
  content: "";
  background:
    repeating-linear-gradient(125deg, transparent 0 8px, rgba(255, 232, 190, 0.025) 8px 9px);
}

.menu-settings-btn svg {
  width: 38px;
  height: 38px;
  overflow: visible;
  filter:
    drop-shadow(0 2px 2px rgba(22, 9, 4, 0.75))
    drop-shadow(0 0 5px rgba(235, 160, 66, 0.22));
  transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.menu-settings-btn__gear {
  fill: #d9943f;
  stroke: #32170b;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.menu-settings-btn__hub {
  fill: #4a2818;
  stroke: #ffd58a;
  stroke-width: 2.1;
}

.menu-settings-btn__shine {
  fill: none;
  stroke: rgba(255, 240, 197, 0.86);
  stroke-linecap: round;
  stroke-width: 1.6;
}

.menu-settings-btn:hover,
.menu-settings-btn:focus-visible {
  border-color: rgba(255, 221, 157, 0.78);
  background:
    radial-gradient(circle at 35% 24%, rgba(255, 237, 193, 0.28), transparent 42%),
    linear-gradient(145deg, rgba(132, 70, 31, 0.99), rgba(43, 24, 12, 0.99));
  box-shadow:
    0 20px 48px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(245, 174, 73, 0.2),
    0 0 24px rgba(222, 131, 43, 0.16),
    inset 0 1px 0 rgba(255, 246, 219, 0.18);
  transform: translateY(-2px);
}

.menu-settings-btn:hover svg,
.menu-settings-btn:focus-visible svg {
  transform: rotate(18deg) scale(1.04);
}

.menu-settings-btn:active {
  transform: translateY(0) scale(0.96);
}

.pause-menu.is-main-menu-settings .pause-menu__panel {
  border-color: rgba(246, 190, 101, 0.56);
  background:
    radial-gradient(circle at 84% 12%, rgba(235, 161, 68, 0.14), transparent 32%),
    linear-gradient(180deg, rgba(80, 43, 20, 0.94), rgba(23, 14, 8, 0.98));
}

@media (max-width: 900px) {
  .menu-settings-btn {
    top: calc(max(12px, env(safe-area-inset-top)) + 8px);
    right: max(12px, env(safe-area-inset-right));
    width: 50px;
    height: 50px;
    border-radius: 15px;
  }

  .menu-settings-btn svg {
    width: 34px;
    height: 34px;
  }

  #game-root.is-menu:not(.is-intro) > .progression-wallet {
    right: calc(max(12px, env(safe-area-inset-right)) + 60px);
  }
}

@media (max-width: 640px) {
  .menu-settings-btn {
    top: calc(max(12px, env(safe-area-inset-top)) + 2px);
  }
}

@media (orientation: landscape) and (max-height: 520px) {
  .menu-settings-btn {
    top: calc(max(8px, env(safe-area-inset-top)) + 1px);
    right: max(8px, env(safe-area-inset-right));
    width: 44px;
    height: 44px;
    border-radius: 13px;
  }

  .menu-settings-btn::before {
    inset: 4px;
    border-radius: 9px;
  }

  .menu-settings-btn svg {
    width: 30px;
    height: 30px;
  }

  #game-root.is-menu:not(.is-intro) > .progression-wallet {
    right: calc(max(8px, env(safe-area-inset-right)) + 52px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .menu-settings-btn,
  .menu-settings-btn svg {
    animation: none !important;
    transition: none !important;
  }

  .menu-settings-btn:hover,
  .menu-settings-btn:focus-visible,
  .menu-settings-btn:active,
  .menu-settings-btn:hover svg,
  .menu-settings-btn:focus-visible svg {
    transform: none;
  }
}

/* --- Challenges: menu button icon ------------------------------------- */

.menu-challenges-btn__cup {
  fill: rgba(122, 74, 22, 0.9);
  stroke: #f4cd7c;
  stroke-linejoin: round;
  stroke-width: 2;
}

.menu-challenges-btn__handles,
.menu-challenges-btn__stem {
  fill: none;
  stroke: #e5a755;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.menu-challenges-btn__star {
  fill: #ffe6a9;
  stroke: #6f351b;
  stroke-width: 0.6;
}

/* --- Challenges: ledger screen ---------------------------------------- */

.challenges-menu .contracts-menu__panel {
  width: min(1180px, 100%);
}

.challenge-card {
  position: relative;
  grid-template-rows: auto minmax(48px, auto) auto auto;
  align-content: start;
}

.challenge-card__reward {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed rgba(224, 187, 124, 0.28);
  font-size: 13px;
}

.challenge-card__reward-label {
  flex: 0 0 auto;
  color: rgba(233, 203, 150, 0.62);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.challenge-card__reward > [data-challenge-reward] {
  color: #f2d193;
}

.challenge-card__pin-btn {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 7px;
  min-height: 34px;
  margin-top: 0;
  padding: 6px 14px;
  border: 1px solid rgba(224, 187, 124, 0.42);
  border-radius: 3px;
  background: linear-gradient(180deg, rgba(64, 42, 24, 0.85), rgba(38, 25, 15, 0.92));
  color: #ecd3a0;
  font: inherit;
  font-size: 12.5px;
  letter-spacing: 0.05em;
  cursor: pointer;
}

.challenge-card__pin-btn:hover,
.challenge-card__pin-btn:focus-visible {
  border-color: rgba(255, 219, 153, 0.75);
  color: #ffe9bd;
}

.challenge-card__pin-btn[aria-pressed="true"] {
  border-color: rgba(255, 219, 153, 0.85);
  background: linear-gradient(180deg, rgba(112, 74, 32, 0.92), rgba(66, 42, 20, 0.95));
  color: #ffedc4;
}

.challenge-card__pin-icon {
  width: 9px;
  height: 9px;
  border: 1px solid currentcolor;
  border-radius: 50%;
  box-shadow: inset 0 0 3px currentcolor;
}

.challenge-card__pin-btn[aria-pressed="true"] .challenge-card__pin-icon {
  background: currentcolor;
}

.challenge-card.is-pinned-challenge {
  outline: 1px solid rgba(255, 219, 153, 0.4);
  outline-offset: -1px;
}

/* --- Challenges: pinned in-run indicator ------------------------------- */

.challenge-hud {
  position: fixed;
  top: max(118px, calc(env(safe-area-inset-top) + 104px));
  left: max(14px, env(safe-area-inset-left));
  z-index: 6;
  display: none;
  align-items: center;
  gap: 10px;
  max-width: min(320px, 44vw);
  padding: 7px 14px 8px 11px;
  border: 1px solid rgba(148, 214, 152, 0.5);
  background: linear-gradient(90deg, rgba(8, 12, 8, 0.93), rgba(18, 32, 18, 0.9), rgba(8, 12, 8, 0.93));
  box-shadow:
    inset 0 0 0 1px rgba(235, 255, 235, 0.05),
    0 10px 26px rgba(0, 0, 0, 0.45);
  pointer-events: none;
}

#game-root.is-playing .challenge-hud:not([hidden]) {
  display: flex;
}

/* is-paused is new here: the pause menu carries the standing readout now, so
   the in-run badge would only duplicate it behind the dimmer. */
#game-root.is-spectating .challenge-hud,
#game-root.is-menu .challenge-hud,
#game-root.is-paused .challenge-hud {
  display: none !important;
}

/* The badge is a momentary alert rather than permanent furniture: it is only
   unhidden for the fail/reset/completion window, so announce itself on entry. */
#game-root.is-playing .challenge-hud:not([hidden]) {
  animation: challengeHudFlash 260ms ease-out both;
}

@keyframes challengeHudFlash {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  #game-root.is-playing .challenge-hud:not([hidden]) {
    animation: none;
  }
}

/* Pinned challenge readout inside the pause menu --------------------------- */

.pause-challenge {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding: 9px 12px;
  border: 1px solid rgba(148, 214, 152, 0.42);
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(10, 16, 10, 0.72), rgba(20, 34, 20, 0.66));
  text-align: left;
}

.pause-challenge[hidden] {
  display: none;
}

.pause-challenge__pin {
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  border: 1px solid rgba(178, 232, 178, 0.85);
  border-radius: 50%;
  background: rgba(120, 210, 130, 0.65);
  box-shadow: 0 0 8px rgba(126, 224, 138, 0.5);
}

.pause-challenge__copy {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.pause-challenge__copy small {
  color: rgba(186, 224, 186, 0.7);
  font-size: 8px;
  font-weight: 950;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.pause-challenge__copy strong {
  overflow: hidden;
  color: #eef7e9;
  font-size: 13px;
  letter-spacing: 0.04em;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.pause-challenge__copy span {
  color: rgba(198, 236, 198, 0.88);
  font-size: 11.5px;
  letter-spacing: 0.04em;
}

.pause-challenge.is-waiting {
  border-color: rgba(196, 189, 160, 0.4);
  background: linear-gradient(90deg, rgba(14, 13, 10, 0.72), rgba(28, 26, 20, 0.66));
}

.pause-challenge.is-waiting .pause-challenge__pin {
  border-color: rgba(214, 205, 170, 0.7);
  background: rgba(168, 158, 122, 0.5);
  box-shadow: none;
}

.pause-challenge.is-waiting .pause-challenge__copy span {
  color: rgba(219, 211, 182, 0.82);
}

.pause-challenge.is-failed {
  border-color: rgba(236, 120, 108, 0.58);
  background: linear-gradient(90deg, rgba(18, 8, 8, 0.74), rgba(46, 16, 14, 0.68));
}

.pause-challenge.is-failed .pause-challenge__pin {
  border-color: rgba(255, 154, 140, 0.85);
  background: rgba(224, 84, 70, 0.72);
  box-shadow: 0 0 8px rgba(244, 108, 92, 0.55);
}

.pause-challenge.is-failed .pause-challenge__copy span {
  color: rgba(255, 186, 176, 0.9);
}

.challenge-hud__pin {
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  border: 1px solid rgba(178, 232, 178, 0.85);
  border-radius: 50%;
  background: rgba(120, 210, 130, 0.65);
  box-shadow: 0 0 8px rgba(126, 224, 138, 0.5);
}

.challenge-hud__copy {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.challenge-hud__copy strong {
  overflow: hidden;
  color: #eef7e9;
  font-size: 12.5px;
  letter-spacing: 0.05em;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.challenge-hud__copy span {
  color: rgba(198, 236, 198, 0.88);
  font-size: 11.5px;
  letter-spacing: 0.04em;
}

.challenge-hud.is-waiting {
  border-color: rgba(196, 189, 160, 0.42);
  background: linear-gradient(90deg, rgba(10, 10, 8, 0.93), rgba(26, 24, 18, 0.9), rgba(10, 10, 8, 0.93));
}

.challenge-hud.is-waiting .challenge-hud__pin {
  border-color: rgba(214, 205, 170, 0.7);
  background: rgba(168, 158, 122, 0.5);
  box-shadow: none;
}

.challenge-hud.is-waiting .challenge-hud__copy span {
  color: rgba(219, 211, 182, 0.82);
}

.challenge-hud.is-failed {
  border-color: rgba(236, 120, 108, 0.62);
  background: linear-gradient(90deg, rgba(14, 6, 6, 0.94), rgba(44, 14, 12, 0.92), rgba(14, 6, 6, 0.94));
}

.challenge-hud.is-failed .challenge-hud__pin {
  border-color: rgba(255, 154, 140, 0.85);
  background: rgba(224, 84, 70, 0.72);
  box-shadow: 0 0 8px rgba(244, 108, 92, 0.55);
}

.challenge-hud.is-failed .challenge-hud__copy strong {
  color: #ffe2dc;
}

.challenge-hud.is-failed .challenge-hud__copy span {
  color: rgba(255, 178, 166, 0.92);
}

/* --- Challenges: completion toast kind --------------------------------- */

.progression-toast--challenge .progression-toast__icon-svg--dust {
  display: none;
}

.progression-toast--challenge .progression-toast__icon-svg--contract {
  display: block;
}

.progression-toast--challenge .progression-toast__accent {
  background: linear-gradient(90deg, rgba(148, 214, 152, 0), rgba(148, 214, 152, 0.8), rgba(148, 214, 152, 0));
}

.progression-toast--challenge > .progression-toast__icon {
  border-color: rgba(163, 226, 167, 0.6);
  box-shadow:
    inset 0 0 10px rgba(112, 204, 120, 0.22),
    0 0 12px rgba(112, 204, 120, 0.24);
}

/* Mobile WebViews do not all expose the same CSS viewport as their physical
   screen. Runtime detection keeps the phone layout stable even when a device
   reports desktop-like width or height values. */
html[data-locale="ru"] .minimap-top {
  gap: 4px;
}

html[data-locale="ru"] #minimap-ammo-count {
  flex: 0 0 auto;
  padding-right: 4px;
  padding-left: 12px;
  font-size: 10px;
  letter-spacing: -0.015em;
  white-space: nowrap;
}

html[data-locale="ru"] #minimap-ammo-count::before {
  width: 7px;
  height: 7px;
}

.multiplayer-upgrade-drawer[data-visible-choices="1"],
.multiplayer-upgrade-drawer.is-class-offer[data-visible-choices="1"],
.multiplayer-upgrade-drawer.is-branch-offer[data-visible-choices="1"] {
  width: min(380px, calc(100vw - 32px));
}

.multiplayer-upgrade-options[data-visible-choices="1"],
.multiplayer-upgrade-options.class-options--classes[data-visible-choices="1"],
.multiplayer-upgrade-options.multiplayer-upgrade-options--branches[data-visible-choices="1"] {
  grid-template-columns: minmax(0, 230px);
  justify-content: center;
}

@media (orientation: landscape) {
  html.is-mobile-runtime .challenge-card {
    grid-template-rows: auto minmax(32px, auto) auto auto;
    gap: 5px;
    min-height: 152px;
  }

  html.is-mobile-runtime .challenge-card__reward {
    gap: 5px;
    margin-top: 2px;
    padding-top: 5px;
    font-size: 8px;
  }

  html.is-mobile-runtime .challenge-card__reward-label {
    font-size: 7px;
  }

  html.is-mobile-runtime .challenge-card__pin-btn {
    min-height: 34px;
    padding: 5px 10px;
    font-size: 8px;
  }

  html.is-mobile-runtime[data-locale="ru"] #minimap-ammo-count {
    font-size: 9.5px;
  }

  html.is-mobile-runtime .wardrobe-cycle {
    width: min(350px, calc(100% - 2 * var(--wardrobe-side-clearance)));
  }

  html.is-mobile-runtime .wardrobe-cycle__arrow {
    width: 44px;
    height: 44px;
    border-radius: 12px;
  }

  html.is-mobile-runtime .wardrobe-cycle__arrow::after {
    inset: 4px;
    border-radius: 8px;
  }

  html.is-mobile-runtime .wardrobe-cycle__arrow svg {
    width: 27px;
    height: 27px;
  }

  html.is-mobile-runtime .wardrobe-preview__copy {
    right: max(var(--wardrobe-side-gutter), env(safe-area-inset-right));
    bottom: max(6px, env(safe-area-inset-bottom));
    gap: 3px 7px;
    width: var(--wardrobe-side-panel);
    min-width: 0;
    padding: 7px 8px;
    border-radius: 9px;
  }

  html.is-mobile-runtime .wardrobe-preview__copy h3 {
    font-size: 16px;
  }

  html.is-mobile-runtime .wardrobe-preview__copy p {
    display: none;
  }

  html.is-mobile-runtime .wardrobe-preview__state {
    padding: 3px 5px;
    font-size: 5px;
  }

  html.is-mobile-runtime .wardrobe-preview__requirement {
    gap: 3px;
    font-size: 7px;
  }

  html.is-mobile-runtime .wardrobe-preview__equip {
    justify-self: stretch;
    min-width: 0;
    min-height: 42px;
    padding: 6px 8px;
    font-size: 7px;
  }
}

@media (orientation: landscape) and (max-width: 1280px) and (max-height: 520px) {
  .wardrobe-preview__copy {
    width: min(218px, 28vw);
    min-width: 170px;
  }

  .challenge-card {
    grid-template-rows: auto minmax(32px, auto) auto auto;
    gap: 5px;
    min-height: 152px;
  }

  .challenge-card__reward {
    gap: 5px;
    margin-top: 2px;
    padding-top: 5px;
    font-size: 8px;
  }

  .challenge-card__reward-label {
    font-size: 7px;
  }

  .challenge-card__pin-btn {
    min-height: 34px;
    padding: 5px 10px;
    font-size: 8px;
  }
}
