/* web/src/wardrobe-layout-contract.css */
.resource-amount {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  white-space: nowrap;
  vertical-align: middle;
  flex-shrink: 0;
}
.resource-icon {
  display: block;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  image-rendering: pixelated;
  object-fit: contain;
}
.resource-value {
  font: inherit;
  line-height: 1.2;
}
.avalon-button:has(> .resource-amount) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.avalon-button .resource-icon {
  width: 24px;
  height: 24px;
}
.v4-wallet-badge .resource-amount {
  gap: 8px;
  font-size: 24px;
}
.v4-wallet-badge .resource-icon {
  width: 36px;
  height: 36px;
}
.v4-wallet-badge {
  min-width: 110px;
}
.v4-chip-coin.resource-amount {
  gap: 3px;
}
.v4-chip-coin .resource-icon {
  width: 20px;
  height: 20px;
}
.rw-result-description.resource-amount {
  margin: 4px auto;
}
.rw-result-coins > .resource-icon {
  width: 48px;
  height: 48px;
}
.v4-receipt-art > .resource-icon {
  width: 48px;
  height: 48px;
}
.cosmetics-document .wardrobe-detail-heading h4 {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 14px !important;
  line-height: 17px !important;
}
.cosmetics-document .wardrobe-detail-heading .v4-rarity {
  flex: 0 0 auto;
  margin: 0;
}
.cosmetics-document .wardrobe-detail-heading .wardrobe-unlock {
  flex: 0 0 auto;
  width: auto !important;
  min-width: 0 !important;
  padding-inline: 10px !important;
  height: 32px !important;
  min-height: 32px !important;
  font-size: 13px !important;
}
.cosmetics-document .wardrobe-detail .v4-unlock-error:not([hidden]) {
  position: absolute;
  bottom: 0;
  background: #f6ecd6;
  z-index: 2;
}
.cosmetics-document .wardrobe-equipment-stage {
  --equipment-size:48px;
  --equipment-gap:3px;
  display: grid !important;
  grid-template-columns: var(--equipment-size) minmax(0, 1fr) var(--equipment-size) !important;
  grid-template-rows: minmax(0, 1fr) !important;
  column-gap: 6px !important;
  row-gap: 0 !important;
  padding: 2px 4px 2px !important;
  overflow: hidden !important;
  align-items: center;
}
.cosmetics-document .wardrobe-equipment-stage > .equipment-top {
  display: none !important;
}
.cosmetics-document .wardrobe-equipment-stage > .equipment-column {
  position: static !important;
  display: grid !important;
  width: var(--equipment-size) !important;
  max-height: none !important;
  min-height: 0;
  height: calc(8 * var(--equipment-size) + 7 * var(--equipment-gap)) !important;
  grid-template-columns: var(--equipment-size) !important;
  grid-template-rows: repeat(8, var(--equipment-size)) !important;
  row-gap: var(--equipment-gap) !important;
  column-gap: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
  align-self: center;
}
.cosmetics-document .wardrobe-equipment-stage > .equipment-column:first-child {
  grid-column: 1;
  grid-row: 1;
}
.cosmetics-document .wardrobe-equipment-stage > .wardrobe-walk-preview {
  grid-column: 2;
  grid-row: 1;
}
.cosmetics-document .wardrobe-equipment-stage > .equipment-column:nth-child(3) {
  grid-column: 3;
  grid-row: 1;
}
.cosmetics-document .wardrobe-equipment-stage .equipment-slot.avalon-button {
  position: relative !important;
  inset: auto !important;
  box-sizing: border-box;
  width: var(--equipment-size) !important;
  min-width: var(--equipment-size) !important;
  max-width: var(--equipment-size) !important;
  height: var(--equipment-size) !important;
  min-height: var(--equipment-size) !important;
  max-height: var(--equipment-size) !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: minmax(0, 1fr) 12px !important;
  padding: 2px !important;
  gap: 0 !important;
  justify-items: center;
  align-content: stretch !important;
  border: 1px solid #8a7550 !important;
  border-bottom: 2px solid var(--r,#8a7550) !important;
  border-radius: 5px !important;
  background:
    linear-gradient(
      180deg,
      #f6eedb,
      #e7d8b3) !important;
  color: #4a3b25 !important;
  box-shadow: inset 0 1px 0 #fffaf0, 0 1px 0 rgba(60, 40, 15, .25) !important;
  transform: none !important;
  transition:
    border-color 140ms,
    box-shadow 180ms,
    background-color 180ms !important;
}
.cosmetics-document .wardrobe-equipment-stage .equipment-slot::before,
.cosmetics-document .wardrobe-equipment-stage .equipment-slot::after {
  display: none !important;
  content: none !important;
}
.cosmetics-document .wardrobe-equipment-stage .equipment-slot .wardrobe-part-art,
.cosmetics-document .wardrobe-equipment-stage .equipment-slot .equipment-empty {
  grid-column: 1 !important;
  grid-row: 1 !important;
  width: 100% !important;
  height: 100% !important;
  max-height: none !important;
  min-height: 0;
  display: grid;
  place-items: center;
  color: #a8946c !important;
}
.cosmetics-document .wardrobe-equipment-stage .equipment-slot canvas {
  width: auto !important;
  height: 100% !important;
  max-height: calc(var(--equipment-size) - 18px) !important;
  max-width: 100%;
  image-rendering: pixelated;
}
.cosmetics-document .wardrobe-equipment-stage .equipment-slot .equipment-label {
  grid-column: 1 !important;
  grid-row: 2 !important;
  width: 100%;
  height: 12px;
  min-height: 12px;
  line-height: 12px !important;
  font-size: 10px !important;
  padding: 0;
  margin: 0;
  white-space: nowrap;
  text-align: center;
  color: #5a4a30;
}
.cosmetics-document .wardrobe-equipment-stage .equipment-slot .equipment-glyph {
  font-size: 15px;
  line-height: 1;
  color: #9a7330 !important;
}
@media (hover: hover) and (pointer: fine) {
  .cosmetics-document .wardrobe-equipment-stage .equipment-slot:hover:not(:disabled) {
    border-color: #5d4a2a !important;
    background:
      linear-gradient(
        180deg,
        #fffaf0,
        #efe2c2) !important;
  }
}
.cosmetics-document .wardrobe-equipment-stage .equipment-slot[aria-pressed=true] {
  border-color: #b07d24 !important;
  background:
    linear-gradient(
      180deg,
      #fff7df,
      #f1dca4) !important;
  box-shadow:
    0 0 0 2px #f2cf73,
    0 0 10px rgba(242, 190, 80, .45),
    inset 0 1px 0 #fffbe9 !important;
}
.cosmetics-document .wardrobe-equipment-stage .equipment-slot[aria-pressed=true] .equipment-label {
  color: #5e3909;
  font-weight: bold;
}
.cosmetics-document .wardrobe-equipment-stage .equipment-count {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 14px;
  height: 14px;
  padding: 0 3px;
  border-radius: 3px;
  font-size: 10px;
  line-height: 14px;
  text-align: center;
}
.cosmetics-document .wardrobe-equipment-stage[data-compact=true] {
  column-gap: 4px !important;
}
.cosmetics-document .wardrobe-equipment-stage[data-compact=true] .equipment-slot.avalon-button {
  grid-template-rows: minmax(0, 1fr) !important;
  padding: 1px !important;
  border-radius: 3px !important;
}
.cosmetics-document .wardrobe-equipment-stage[data-compact=true] .equipment-slot .equipment-label {
  display: none;
}
.cosmetics-document .wardrobe-equipment-stage[data-compact=true] .equipment-slot canvas {
  max-height: calc(var(--equipment-size) - 4px) !important;
}
@media (max-height: 500px) {
  .cosmetics-document .wardrobe-equipment-stage {
    padding: 4px 2px !important;
  }
  .cosmetics-document .wardrobe-detail-heading h4 {
    font-size: 12px !important;
  }
  .cosmetics-document .wardrobe-detail-heading {
    gap: 5px;
  }
}
.cosmetics-document .wardrobe-detail .wardrobe-swatches,
.cosmetics-document .wardrobe-detail .wardrobe-dye-controls,
.cosmetics-document .wardrobe-detail .wardrobe-detail-heading {
  border: 0 !important;
  outline: 0;
  box-shadow: none;
}
.cosmetics-document .wardrobe-detail > .wardrobe-swatches {
  flex-shrink: 0;
}
.cosmetics-document .wardrobe-detail .wardrobe-dye-controls {
  order: -1;
}

/* web/src/cosmetic-character.css */

/* web/src/reward-preview.css */
.reward-preview-document {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  max-height: calc(100dvh - 24px);
  overflow: auto;
  padding: 54px 24px 20px !important;
}
.reward-preview-document .reward-preview-stage {
  flex: 0 0 auto;
  width: 100%;
  min-height: 0;
  height: auto;
  padding: 20px 12px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.reward-preview-document .collection-art {
  width: 192px;
  height: 192px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.reward-preview-document .collection-art[data-art-type=nameplate] {
  width: 100%;
  height: auto;
  aspect-ratio: 3.3;
}
.reward-preview-document .collection-art[data-art-type=nameplate] > :is(img, canvas, .dynamic-nameplate) {
  display: block;
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 3.3;
  object-fit: contain;
}
.reward-preview-document .collection-art:not([data-art-type=nameplate]) :is(.wardrobe-part-art, .cosmetic-character-render) {
  width: 192px;
  height: 192px;
}
.reward-preview-document .collection-art:not([data-art-type=nameplate]) canvas,
.reward-preview-document .collection-art .v4-avatar-media {
  width: 192px !important;
  height: 192px !important;
  max-width: 192px !important;
  max-height: 192px !important;
  object-fit: contain;
  image-rendering: pixelated;
}
.reward-preview-name {
  margin: 0;
  max-width: 100%;
  text-align: center;
  overflow-wrap: anywhere;
}
.reward-preview-document .v4-detail-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.reward-preview-document .collection-state {
  margin: 0;
}
@media (max-height: 600px) {
  .reward-preview-document {
    gap: 6px;
    padding: 42px 16px 12px !important;
  }
  .reward-preview-document .reward-preview-stage {
    padding: 8px;
  }
  .reward-preview-document .collection-art:not([data-art-type=nameplate]),
  .reward-preview-document .collection-art:not([data-art-type=nameplate]) :is(.wardrobe-part-art, .cosmetic-character-render),
  .reward-preview-document .collection-art:not([data-art-type=nameplate]) canvas,
  .reward-preview-document .collection-art .v4-avatar-media {
    width: 112px !important;
    height: 112px !important;
    max-width: 112px !important;
    max-height: 112px !important;
  }
}

/* web/src/collection-gallery.css */
.collection-set-parts {
  list-style: none;
  padding: 0;
  margin: 2px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: center;
  max-width: 100%;
  font-size: 12px;
  line-height: 1.5;
}
.collection-set-parts li {
  border: 1px solid #c9b98e;
  background: #eee5cd;
  border-radius: 4px;
  padding: 2px 6px;
}
.collection-set-parts li[data-owned=true] {
  color: #49633c;
}
.collection-set-parts li[data-owned=false] {
  color: #78664b;
}
.collection-item[data-owned=false] {
  background: linear-gradient(#f0ebde, #dfd7c6);
}
.collection-ownership-label {
  position: absolute;
  top: 5px;
  right: 5px;
  padding: 2px 5px;
  border-radius: 3px;
  background: #eee4cb;
  color: #665437;
  font-size: 10px;
  line-height: 1.3;
  border: 1px solid #b7a783;
}
.collection-art[data-art-type=set] .cosmetic-character-render {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
}
.collection-art[data-art-type=set] canvas {
  image-rendering: pixelated;
  object-fit: contain;
}
.collection-detail .collection-art[data-art-type=set] canvas {
  width: 160px;
  height: 160px;
}
.treasury-reward[type=button] {
  font: inherit;
  color: inherit;
  text-align: center;
  cursor: pointer;
}
.treasury-reward[type=button]:focus-visible {
  outline: 2px solid #c29337;
  outline-offset: 2px;
}
.collection-detail-viewport {
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  padding: 2px;
  box-sizing: border-box;
}
.collection-document .collection-detail.v4-pedestal {
  box-sizing: border-box;
  height: auto;
  min-height: 100%;
  overflow: visible;
  width: 100%;
  flex-shrink: 0;
}
.collection-detail.v4-pedestal > *,
.collection-set-parts {
  flex-shrink: 0;
}
.collection-set-parts {
  width: 100%;
  box-sizing: border-box;
  align-content: flex-start;
}
.collection-set-parts li {
  flex: 0 1 auto;
  max-width: 100%;
  min-width: 0;
  width: fit-content;
  height: auto;
  box-sizing: border-box;
  white-space: normal;
  overflow-wrap: anywhere;
}
.collection-detail .v4-type {
  display: inline-flex;
  flex: 0 0 auto;
  width: max-content;
  max-width: 100%;
  height: auto;
  box-sizing: border-box;
  white-space: normal;
  overflow-wrap: anywhere;
}
.collection-part-media {
  display: contents;
}
.rw-result-display > .collection-part-media,
.rw-emergence-art > .collection-part-media {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
}

/* web/src/reward-presentation/rewards.css */
.game-modal-layer:has(.rewards-document) {
  padding: 24px;
  background: transparent;
  overflow: auto;
}
.game-modal-layer:has(.rewards-document)::backdrop {
  background: #030811d9;
  backdrop-filter: blur(7px);
}
.rewards-document.game-document {
  --rw-gold:#d8b873;
  --rw-muted:#aab4c5;
  --rw-line:#b49b5f35;
  box-sizing: border-box;
  position: relative;
  width: min(1180px, calc(100vw - 48px));
  max-width: 1180px;
  max-height: calc(100dvh - 48px);
  padding: 28px 32px 20px;
  overflow: auto;
  border: 1px solid #ac92505e;
  border-radius: 5px;
  background:
    radial-gradient(
      ellipse at 70% 0,
      #23314788,
      transparent 52%),
    linear-gradient(
      145deg,
      #141e2c,
      #0c121d 62%);
  color: #eee8d8;
  box-shadow: 0 30px 100px #000b, inset 0 0 0 5px #070b122e;
  font-family:
    "CourtWenKai",
    system-ui,
    sans-serif;
  scrollbar-width: thin;
  scrollbar-color: #867349 #101722;
}
.rewards-document * {
  box-sizing: border-box;
}
.rewards-document::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 8px;
  right: 8px;
  height: 80px;
  border: 1px solid #d2b87b14;
  border-bottom: 0;
  pointer-events: none;
}
.rewards-document > .document-title {
  position: relative;
  padding: 0 220px 0 0;
  border: 0;
  text-align: left;
  font-size: 29px;
  line-height: 1.35;
  letter-spacing: 4px;
  color: #eee8d8;
  margin: 0 0 6px;
  font-weight: 500;
}
.rewards-document > .document-close {
  position: absolute;
  top: 20px;
  right: 22px;
  width: 36px;
  min-width: 36px;
  height: 36px;
  min-height: 36px;
  border: 1px solid #baa47555;
  background: #141e2b;
  color: #e7d2a0;
  box-shadow: none;
  font: 24px/1 system-ui;
  padding: 0;
  border-radius: 50%;
}
.rewards-document .avalon-button {
  min-height: 44px;
  min-width: 0;
  padding: 10px 20px;
  border: 1px solid #bc9a59;
  background: linear-gradient(#dbc48a, #b99b5f);
  color: #211b12;
  border-radius: 2px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  box-shadow: 0 3px 12px #0003;
  letter-spacing: .06em;
  transition:
    filter .16s,
    border-color .16s,
    background .16s;
  touch-action: manipulation;
}
@media (hover: hover) and (pointer: fine) {
  .rewards-document .avalon-button:hover:not(:disabled) {
    filter: brightness(1.12);
    transform: none;
  }
}
.rewards-document .avalon-button:disabled {
  opacity: .4;
  cursor: not-allowed;
}
.rewards-document .rw-secondary {
  background: transparent;
  color: #d7c59c;
  border-color: #8e7a4b66;
  box-shadow: none;
}
.rewards-document :focus-visible {
  outline: 2px solid #f6dda3;
  outline-offset: 4px;
}
.rw-kicker {
  font: 10px/1.5 system-ui, sans-serif;
  letter-spacing: 4px;
  color: #9e8d65;
  text-transform: uppercase;
  margin: 0;
}
.rw-topline {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 25px;
}
.rw-subtitle {
  color: var(--rw-muted);
  font-size: 13px;
  line-height: 1.6;
  margin: 0;
}
.rw-wallet {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
  font: 14px system-ui;
  color: #dcc58b;
}
.rw-wallet strong {
  font-size: 21px;
  letter-spacing: 1px;
  color: #f1db9d;
}
.rw-wallet span + span {
  border-left: 1px solid #b8a16b40;
  padding-left: 14px;
}
.rw-tabs {
  display: flex;
  gap: 22px;
  border-bottom: 1px solid var(--rw-line);
  margin-bottom: 26px;
  overflow-x: auto;
  scrollbar-width: none;
}
.rewards-document .rw-tab {
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: none;
  box-shadow: none;
  color: #9eabbc;
  white-space: nowrap;
  min-height: 48px;
  padding: 10px 4px 14px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 2px;
}
.rewards-document .rw-tab[aria-selected=true] {
  color: #efd59a;
  border-bottom-color: #d8b873;
}
.rw-content {
  min-height: 380px;
}
.rw-status {
  font-size: 13px;
  line-height: 1.6;
  min-height: 22px;
  margin: 14px 0 0;
  color: #b5c8b3;
}
.rw-status[data-error=true] {
  color: #ffb4a6;
}
.rw-status:empty {
  margin: 4px 0 0;
  min-height: 0;
}
.rw-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid var(--rw-line);
  color: #7f8da1;
  font: 11px/1.6 system-ui;
}
.rw-footer .avalon-button {
  padding: 4px 10px;
  min-height: 34px;
  font-size: 12px;
  white-space: nowrap;
}
.rw-loading {
  min-height: 380px;
  display: grid;
  place-content: center;
  text-align: center;
  color: #baa77e;
  gap: 14px;
}
.rw-loading::before {
  content: "\25c7";
  font-size: 44px;
  animation: rw-breathe 1.5s infinite;
}
.rw-heading {
  font-size: 24px;
  font-weight: 500;
  margin: 0 0 10px;
  color: #eee4cb;
  letter-spacing: 2px;
}
.rw-copy {
  font: 14px/1.8 system-ui;
  color: #a4b0c0;
  margin: 0 0 14px;
}
.rw-pill {
  display: inline-flex;
  border: 1px solid #a58b4c66;
  border-radius: 20px;
  padding: 4px 10px;
  font: 11px/1.4 system-ui;
  color: #d7c18c;
  letter-spacing: 1px;
}
.rw-tag {
  font: 11px/1.5 system-ui;
  color: #9eb49e;
  letter-spacing: 1px;
}
.rw-owned {
  color: #c8d9b1;
}
.rw-feature {
  display: grid;
  grid-template-columns: 43% 1fr;
  min-height: 280px;
  border: 1px solid var(--rw-line);
  background:
    radial-gradient(
      ellipse at 15% 50%,
      #46442955,
      transparent 50%),
    #101824;
  position: relative;
  overflow: hidden;
  margin-bottom: 26px;
}
.rw-feature-art {
  position: relative;
  min-height: 280px;
  display: grid;
  place-items: center;
  isolation: isolate;
}
.rw-feature-art::before {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  border: 1px solid #d8b8732e;
  border-radius: 50%;
  box-shadow: 0 0 0 20px #d8b87304, 0 0 0 21px #d8b87314;
  z-index: -1;
}
.rw-feature-art::after {
  content: "\2727";
  position: absolute;
  color: #d5c1804d;
  left: 20%;
  top: 15%;
  font-size: 30px;
}
.rw-feature-copy {
  align-self: center;
  padding: 28px 36px 28px 10px;
}
.rw-feature-copy .rw-kicker {
  margin: 0 0 14px;
}
.rw-feature-copy .rw-copy {
  max-width: 470px;
}
.rw-price {
  font: 18px/1.4 system-ui;
  color: #ebce86;
  margin: 16px 0 18px;
}
.rw-price small {
  font-size: 11px;
  color: #8d9bae;
  margin-left: 8px;
}
.rw-section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 2px;
  margin: 20px 0 14px;
}
.rw-section-title span {
  font: 11px system-ui;
  color: #8c99ab;
  letter-spacing: 1px;
}
.rw-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
}
.rw-card {
  padding: 18px;
  border: 1px solid #76849b33;
  background:
    linear-gradient(
      150deg,
      #1b2637,
      #111a27);
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.rw-card h4 {
  font-size: 17px;
  line-height: 1.4;
  font-weight: 500;
  margin: 3px 0;
  color: #e8ddbf;
  letter-spacing: 1px;
}
.rw-card .rw-copy {
  font-size: 12px;
  margin-bottom: 6px;
  flex: 1;
}
.rw-card .avalon-button {
  min-height: 39px;
  padding: 8px 12px;
  font-size: 13px;
}
.rw-card-price {
  font: 14px system-ui;
  color: #d3b878;
}
.rw-card-preview {
  min-height: 96px;
  display: grid;
  place-items: center;
  margin: -5px -8px 6px;
}
.rw-card-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}
.rw-card-actions .avalon-button {
  flex: 1;
}
.rw-catalog-portrait {
  height: 140px;
  width: 100%;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(
      ellipse at bottom,
      #b9a46730,
      transparent 65%);
}
.rw-catalog-portrait > .original-portrait {
  height: 180px;
  max-width: 100%;
  filter: drop-shadow(0 0 3px #e4d9b455);
}
.rw-rules {
  border: 1px solid #9b875642;
  margin-top: 22px;
  padding: 14px 18px;
  color: #a3afbf;
  font: 12px/1.8 system-ui;
  background: #080e1740;
}
.rw-rules summary {
  color: #d0bb87;
  cursor: pointer;
  min-height: 25px;
  list-style-position: inside;
}
.rw-odds {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 14px 0;
}
.rw-odd {
  border-left: 2px solid #a58e55;
  padding-left: 12px;
}
.rw-odd strong {
  display: block;
  font: 23px/1.3 system-ui;
  color: #e1c990;
}
.rw-odd span {
  font-size: 12px;
}
.rw-rules p {
  margin: 10px 0 0;
}
.rw-chest {
  --chest-size:160px;
  position: relative;
  width: var(--chest-size);
  height: calc(var(--chest-size)*.68);
  filter: drop-shadow(0 18px 15px #0008);
  perspective: 500px;
  transform: rotate(-4deg);
}
.rw-chest-body {
  position: absolute;
  inset: 33% 0 0;
  border: 3px solid #9b7336;
  border-radius: 3px 3px 12px 12px;
  background:
    repeating-linear-gradient(
      0deg,
      transparent 0 15px,
      #110d0a55 16px 18px),
    linear-gradient(
      110deg,
      #514020,
      #292619 45%,
      #181914);
  box-shadow: inset 0 0 0 4px #d2ab4b1c, inset -15px 0 25px #0008;
}
.rw-chest-body::before,
.rw-chest-body::after {
  content: "";
  position: absolute;
  top: -3px;
  bottom: -3px;
  width: 15px;
  border: 1px solid #c19d52;
  background:
    linear-gradient(
      90deg,
      #6d5426,
      #cba65a 50%,
      #715329);
  box-shadow: 0 0 7px #0005;
}
.rw-chest-body::before {
  left: 15%;
}
.rw-chest-body::after {
  right: 15%;
}
.rw-chest-lid {
  position: absolute;
  inset: 0 0 55%;
  z-index: 2;
  border: 3px solid #c29d51;
  border-radius: 35px 35px 4px 4px;
  background:
    repeating-linear-gradient(
      90deg,
      transparent 0 20px,
      #1a160c38 21px 23px),
    linear-gradient(#655c39, #302a18);
  box-shadow: inset 0 4px 12px #d8c98f45, 0 4px 8px #0009;
  transform-origin: 50% 100%;
  transition: transform .8s ease;
}
.rw-chest-lock {
  position: absolute;
  top: 37%;
  left: 42%;
  width: 16%;
  height: 29%;
  z-index: 3;
  border: 2px solid #e1c88a;
  background:
    linear-gradient(
      130deg,
      #eedda0,
      #a27a2c);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  box-shadow: 0 0 12px #f4dc8055;
}
.rw-chest-lock::after {
  content: "";
  position: absolute;
  inset: 28% 39% 21%;
  background: #302716;
  border-radius: 50%;
}
.rw-chest-glow {
  position: absolute;
  inset: -40%;
  z-index: -1;
  background:
    radial-gradient(
      ellipse,
      #e5ce6c33,
      transparent 60%);
  opacity: .7;
}
.rw-warehouse {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}
.rw-warehouse-main {
  border: 1px solid var(--rw-line);
  padding: 32px;
  text-align: center;
  background:
    radial-gradient(
      ellipse at 50% 35%,
      #3f462c55,
      transparent 65%);
}
.rw-warehouse-main .rw-feature-art {
  min-height: 250px;
}
.rw-warehouse-main .rw-chest {
  --chest-size:190px;
}
.rw-chest-count {
  font: 12px system-ui;
  color: #a5b2c3;
  margin-bottom: 16px;
}
.rw-chest-count strong {
  font: 32px system-ui;
  color: #efd593;
  margin-right: 5px;
}
.rw-receipt-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}
.rewards-document .rw-receipt-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  text-align: left;
  min-height: 61px;
  padding: 12px 14px;
  border: 1px solid #79879b30;
  background: #18223380;
  color: #d2d9e3;
  box-shadow: none;
  font-size: 13px;
}
.rw-receipt-row small {
  display: block;
  color: #8997aa;
  font: 11px/1.7 system-ui;
}
.rw-empty {
  padding: 30px 12px;
  color: #8d9aae;
  font: 13px/1.8 system-ui;
  text-align: center;
  border: 1px dashed #52607970;
}
.rw-characters {
  display: grid;
  grid-template-columns: 22% minmax(0, 43%) minmax(0, 35%);
  min-height: 470px;
  border: 1px solid var(--rw-line);
  overflow: hidden;
  background: #111a25;
}
.rw-character-list {
  padding: 12px;
  max-height: 545px;
  overflow-y: auto;
  border-right: 1px solid var(--rw-line);
  scrollbar-width: thin;
  scrollbar-color: #82714c #111923;
}
.rewards-document .rw-character-option {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 85px;
  padding: 6px 8px;
  margin-bottom: 9px;
  background: #192536;
  color: #8c99ad;
  border: 1px solid #5f6c7e45;
  box-shadow: none;
  text-align: left;
  border-radius: 1px;
  font-size: 12px;
  letter-spacing: 0;
}
.rw-character-option .original-portrait {
  height: 70px;
  width: 52px;
  filter: grayscale(.95) brightness(.8);
  transition: filter .2s, transform .2s;
}
.rw-character-option[aria-checked=true] {
  border-color: #d5b76d !important;
  background: #c2ad6c21 !important;
  color: #eee0b8 !important;
  box-shadow: inset 3px 0 #d5b76d !important;
}
.rw-character-option[aria-checked=true] .original-portrait {
  filter: none;
  transform: scale(1.08);
}
.rw-character-option small {
  display: block;
  font: 10px/1.5 system-ui;
  margin-top: 6px;
  color: #8d9eaf;
}
.rw-character-stage {
  --rw-accent:#849dbe;
  position: relative;
  display: grid;
  place-items: center;
  isolation: isolate;
  overflow: hidden;
  min-height: 470px;
  background:
    radial-gradient(
      ellipse at 50% 40%,
      #748ba042,
      transparent 65%),
    linear-gradient(
      160deg,
      #22364e,
      #121e2d);
}
.rw-character-stage::before {
  content: "";
  position: absolute;
  inset: 40px;
  border: 1px solid #c3d0e030;
  border-radius: 50% 50% 0 0;
  z-index: -1;
  background:
    repeating-conic-gradient(
      from 0deg at 50% 42%,
      #c5d3e004 0deg 11deg,
      transparent 11deg 22deg);
}
.rw-character-stage::after {
  content: "AVALON";
  position: absolute;
  bottom: 25px;
  letter-spacing: 12px;
  font: 11px system-ui;
  color: #c5cfd35c;
}
.rw-stage-art {
  position: absolute;
  inset: 20px 0 40px;
  display: grid;
  place-items: center;
  animation: rw-art-in .32s ease-out;
}
.rw-stage-art > .original-portrait {
  height: 100%;
  width: 100%;
  max-width: 95%;
  overflow: visible;
  filter: drop-shadow(1px 0 0 #f4ebda) drop-shadow(-1px 0 0 #f4ebda) drop-shadow(0 0 18px #0005);
}
.rw-character-sheet {
  position: relative;
  background:
    linear-gradient(
      120deg,
      #e2d6b9,
      #c6b795);
  color: #433a2c;
  padding: 38px 28px 28px;
  border-left: 1px solid #b5a278;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  box-shadow: inset 6px 0 18px #5b4c3220;
}
.rw-character-sheet::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid #86725033;
  pointer-events: none;
}
.rw-character-sheet .rw-kicker {
  color: #8c7852;
}
.rw-character-sheet .rw-heading {
  font-size: 29px;
  line-height: 1.5;
  color: #3c342a;
  background: #b9a17333;
  padding: 2px 8px;
  margin: 0 -8px;
  letter-spacing: 3px;
}
.rw-character-sheet .rw-copy {
  font-size: 13px;
  color: #655943;
  margin: 0;
  line-height: 1.9;
}
.rw-character-sheet .rw-pill {
  color: #695c3f;
  border-color: #8e7c4b88;
}
.rw-sheet-facts {
  font: 12px/1.8 system-ui;
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 10px 15px;
  border-block: 1px solid #8b744b40;
  margin: 6px 0;
  padding: 16px 0;
  width: 100%;
}
.rw-sheet-facts dt {
  color: #8a7657;
}
.rw-sheet-facts dd {
  margin: 0;
  color: #514632;
}
.rw-character-sheet .avalon-button {
  width: 100%;
  margin-top: auto;
  position: relative;
}
.rw-character-sheet .rw-secondary {
  border-color: #88714e;
  color: #514632;
}
.rw-character-stage[data-theme=ember] {
  background:
    radial-gradient(
      ellipse at 50% 40%,
      #9d674b55,
      transparent 65%),
    linear-gradient(
      160deg,
      #472a2f,
      #1c1b2b);
}
.rw-character-stage[data-theme=moon] {
  background:
    radial-gradient(
      ellipse at 50% 40%,
      #9dacc660,
      transparent 65%),
    linear-gradient(
      160deg,
      #30445c,
      #171c2f);
}
.rw-character-stage[data-theme=jade] {
  background:
    radial-gradient(
      ellipse at 50% 40%,
      #65b09b45,
      transparent 65%),
    linear-gradient(
      160deg,
      #1d403c,
      #121e29);
}
.rw-variant-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 2;
  background: #101925bb;
  border: 1px solid #9aafaa44;
  padding: 5px 8px;
  color: #c5d9d1;
  font: 10px system-ui;
}
.rw-plates-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 26px;
}
.rw-plate-stage {
  padding: 38px 22px;
  text-align: center;
  border: 1px solid var(--rw-line);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  background:
    radial-gradient(
      ellipse,
      #31435d7a,
      transparent 70%),
    #101724;
  min-height: 350px;
}
.rw-plate-stage > .reward-nameplate {
  width: 100%;
  max-width: 390px;
  height: 110px;
  font-size: 26px;
}
.rw-plate-stage .rw-copy {
  font-size: 12px;
  max-width: 310px;
}
.rw-plate-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.rewards-document .rw-plate-choice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 5px 14px 5px 5px;
  background: #172131;
  border: 1px solid #73809835;
  color: #a5b3c6;
  box-shadow: none;
  min-height: 79px;
}
.rw-plate-choice[aria-checked=true] {
  border-color: #d6b86d !important;
  background: #b69d5a1a !important;
}
.rw-plate-choice > .reward-nameplate {
  width: 230px;
  max-width: 80%;
  height: 66px;
  font-size: 17px;
}
.rw-plate-choice .rw-tag {
  font-size: 10px;
  text-align: right;
  max-width: 56px;
}
.rw-achievement-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  gap: 20px;
}
.rw-achievement-summary .rw-copy {
  margin: 0;
}
.rw-achievement-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
}
.rw-achievement {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 14px 18px;
  padding: 24px;
  border: 1px solid #7281983d;
  background:
    linear-gradient(
      130deg,
      #202c3b,
      #141e2a);
}
.rw-achievement-icon {
  font-size: 33px;
  color: #b29d69;
  text-align: center;
}
.rw-achievement h4 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 500;
  color: #e3d6b6;
}
.rw-achievement p {
  margin: 0;
  color: #9caabe;
  font: 12px/1.8 system-ui;
}
.rw-achievement-footer {
  grid-column: 1/-1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.rw-achievement-footer .avalon-button {
  padding: 7px 15px;
  font-size: 12px;
  min-height: 37px;
}
.rw-achievement-bar {
  height: 3px;
  background: #75829530;
  margin: 14px 0 6px;
  overflow: hidden;
}
.rw-achievement-bar span {
  display: block;
  height: 100%;
  background:
    linear-gradient(
      90deg,
      #8c7643,
      #e5ca81);
}
.rw-achievement[data-claimed=true] {
  opacity: .65;
}
.rw-achievement[data-ready=true] {
  border-color: #b79a5b99;
}
.rw-achievement-progress {
  font: 10px system-ui;
  color: #9dabb9;
}
.rw-confirm,
.rw-reveal {
  min-height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  padding: 28px 24px;
  position: relative;
  overflow: hidden;
}
.rw-confirm {
  max-width: 540px;
  margin: auto;
}
.rw-confirm .rw-heading {
  margin: 18px 0 10px;
}
.rw-confirm .rw-copy {
  max-width: 440px;
}
.rw-confirm-actions {
  display: flex;
  gap: 12px;
  margin-top: 22px;
  width: min(100%, 370px);
}
.rw-confirm-actions > * {
  flex: 1;
}
.rw-confirm .reward-nameplate {
  width: min(100%, 340px);
  height: 100px;
}
.rw-reveal .rw-feature-art {
  min-height: 220px;
  width: 260px;
}
.rw-reveal .rw-chest {
  --chest-size:175px;
}
.rw-reveal[data-phase=opening] .rw-chest {
  animation: rw-chest-shake .6s ease-in-out both;
}
.rw-reveal[data-phase=opening] .rw-chest-lid {
  animation: rw-chest-open 1s .55s ease forwards;
}
.rw-reveal[data-phase=opening] .rw-chest-glow {
  animation: rw-chest-light 1.5s ease forwards;
}
.rw-reveal .rw-reward-art {
  width: min(340px, 100%);
  height: 180px;
  display: grid;
  place-items: center;
  animation: rw-art-in .4s ease-out;
}
.rw-reward-art > .reward-nameplate {
  height: 105px;
  width: 100%;
  font-size: 25px;
}
.rw-reward-art > .original-portrait {
  height: 180px;
  max-width: 100%;
  filter: drop-shadow(0 0 14px #bdc0a966);
}
.rw-coin-reward {
  font: 50px system-ui;
  color: #ebce89;
  text-shadow: 0 0 35px #eac56555;
}
.rw-receipt-id {
  font: 10px/1.7 ui-monospace, monospace;
  color: #7b8b9f;
  word-break: break-all;
  margin-top: 16px;
}
.rw-reveal .rw-copy {
  max-width: 480px;
}
.rw-pending-banner {
  padding: 18px;
  background: #6f4c2533;
  border: 1px solid #a78b4d66;
  display: flex;
  gap: 14px;
  align-items: center;
  font: 12px/1.8 system-ui;
  color: #d5c095;
  margin-bottom: 18px;
}
.rw-pending-banner .avalon-button {
  white-space: nowrap;
  font-size: 12px;
}
.rw-test-note {
  font: 11px/1.7 system-ui;
  color: #94a2b5;
  margin-top: 20px;
}
.reward-nameplate {
  --np-accent:#b59c67;
  --np-dark:#d8caab;
  --np-text:#55432c;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 300px;
  max-width: 100%;
  height: 84px;
  padding: 18px 52px;
  color: var(--np-text);
  vertical-align: middle;
  isolation: isolate;
  text-align: center;
  font-size: 22px;
  line-height: 1.2;
  font-family:
    "CourtWenKai",
    system-ui,
    sans-serif;
  filter: drop-shadow(0 4px 5px #0005);
}
.reward-nameplate::before {
  content: "";
  position: absolute;
  inset: 23% 9%;
  background:
    linear-gradient(
      110deg,
      var(--np-dark),
      color-mix(in srgb, var(--np-dark), #000 15%));
  border: 1px solid color-mix(in srgb, var(--np-accent), transparent 25%);
  clip-path: polygon(4% 0, 96% 0, 100% 50%, 96% 100%, 4% 100%, 0 50%);
  z-index: -1;
}
.nameplate-ornament {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  color: var(--np-accent);
  pointer-events: none;
  z-index: -1;
}
.nameplate-safe-name {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
  text-shadow: 0 1px 2px #0002;
  position: relative;
  z-index: 1;
}
.nameplate-collection-title {
  position: absolute;
  bottom: 0;
  font: 9px system-ui;
  color: var(--np-accent);
  letter-spacing: 2px;
}
.reward-nameplate[data-nameplate=moon],
.reward-nameplate-applied[data-nameplate=moon] {
  --np-accent:#b9d9ee;
  --np-dark:#21354c;
  --np-text:#ebf7ff;
}
.reward-nameplate[data-nameplate=ember],
.reward-nameplate-applied[data-nameplate=ember] {
  --np-accent:#e2be75;
  --np-dark:#59232a;
  --np-text:#fff0d6;
}
.reward-nameplate[data-nameplate=jade],
.reward-nameplate-applied[data-nameplate=jade] {
  --np-accent:#80d6bc;
  --np-dark:#163b38;
  --np-text:#e4fff5;
}
.reward-nameplate[data-nameplate=void],
.reward-nameplate-applied[data-nameplate=void] {
  --np-accent:#caa4cd;
  --np-dark:#422c4b;
  --np-text:#f9e9fa;
}
.reward-nameplate--small {
  height: 42px;
  width: 170px;
  font-size: 14px;
  padding: 8px 24px;
  filter: none;
}
.reward-nameplate--small::before {
  inset: 19% 6%;
}
.reward-nameplate--small .nameplate-ornament {
  opacity: .85;
}
.reward-nameplate--small .nameplate-collection-title {
  display: none;
}
.reward-nameplate-applied {
  --np-accent:#c9b17e;
  --np-dark:#2c2930;
  --np-text:#f5ead6;
  color: var(--np-text) !important;
  background:
    linear-gradient(
      110deg,
      var(--np-dark),
      color-mix(in srgb, var(--np-dark), #000 22%)) !important;
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--np-accent), transparent 18%),
    inset 4px 0 0 var(--np-accent),
    inset -4px 0 0 var(--np-accent) !important;
  text-shadow: 0 1px 2px #000b !important;
}
.reward-nameplate-applied--small {
  box-shadow:
    inset 0 -1px 0 var(--np-accent),
    inset 2px 0 0 var(--np-accent),
    inset -2px 0 0 var(--np-accent) !important;
}
.reward-nameplate-applied::after {
  pointer-events: none;
}
@keyframes rw-art-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes rw-breathe {
  50% {
    opacity: .4;
    transform: scale(.95);
  }
}
@keyframes rw-chest-shake {
  20%, 60% {
    transform: rotate(-7deg);
  }
  40%, 80% {
    transform: rotate(5deg);
  }
  100% {
    transform: rotate(0);
  }
}
@keyframes rw-chest-open {
  to {
    transform: rotateX(-105deg) translateY(-10px);
    opacity: .75;
  }
}
@keyframes rw-chest-light {
  30% {
    opacity: .8;
  }
  70%, 100% {
    opacity: 1;
    transform: scale(1.6);
    background:
      radial-gradient(
        ellipse,
        #e9db82bb,
        transparent 65%);
  }
}
@media (max-width: 900px) {
  .rewards-document.game-document {
    padding: 24px 22px 18px;
  }
  .rw-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .rw-character-sheet {
    padding: 30px 20px;
  }
  .rw-character-sheet .rw-heading {
    font-size: 23px;
  }
  .rw-character-list {
    padding: 8px;
  }
  .rewards-document .rw-character-option {
    grid-template-columns: 40px 1fr;
    gap: 4px;
    padding: 5px;
  }
  .rw-character-option .original-portrait {
    width: 38px;
  }
  .rw-characters {
    grid-template-columns: 23% 39% 38%;
  }
  .rw-plates-layout {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }
  .rw-plate-choice > .reward-nameplate {
    width: 180px !important;
    font-size: 14px !important;
  }
  .rw-tabs {
    gap: 18px;
  }
  .rw-feature-copy {
    padding-right: 25px;
  }
}
@media (max-width: 650px) {
  .game-modal-layer:has(.rewards-document) {
    padding: 8px;
  }
  .rewards-document.game-document {
    width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
    padding: 22px 16px 14px;
  }
  .rewards-document > .document-title {
    font-size: 23px;
    letter-spacing: 3px;
    padding-right: 48px;
  }
  .rewards-document > .document-close {
    top: 16px;
    right: 14px;
  }
  .rw-topline {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 14px;
  }
  .rw-subtitle {
    font-size: 11px;
    padding-right: 25px;
  }
  .rw-wallet strong {
    font-size: 19px;
  }
  .rw-wallet {
    font-size: 12px;
  }
  .rw-tabs {
    gap: 21px;
    margin-bottom: 18px;
  }
  .rewards-document .rw-tab {
    font-size: 13px;
    min-height: 43px;
    padding-bottom: 11px;
    letter-spacing: 1px;
  }
  .rw-feature {
    grid-template-columns: 1fr;
    margin-bottom: 20px;
  }
  .rw-feature-art {
    min-height: 205px;
  }
  .rw-feature-art::before {
    width: 165px;
    height: 165px;
  }
  .rw-feature-copy {
    padding: 0 23px 25px;
  }
  .rw-feature-copy .rw-heading {
    font-size: 23px;
  }
  .rw-copy {
    font-size: 13px;
  }
  .rw-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .rw-card {
    padding: 12px;
    gap: 6px;
  }
  .rw-card-preview {
    min-height: 72px;
    margin: -6px -12px 0;
  }
  .rw-card-preview .reward-nameplate {
    height: 68px;
    font-size: 12px;
    padding-inline: 25px;
  }
  .rw-card h4 {
    font-size: 14px;
  }
  .rw-card .rw-copy {
    font-size: 11px;
  }
  .rw-card-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .rw-card-actions .avalon-button {
    font-size: 12px;
    width: 100%;
  }
  .rw-section-title {
    font-size: 15px;
    letter-spacing: 1px;
  }
  .rw-section-title span {
    font-size: 9px;
  }
  .rw-catalog-portrait {
    height: 120px;
  }
  .rw-catalog-portrait > .original-portrait {
    height: 155px;
  }
  .rw-warehouse {
    grid-template-columns: 1fr;
    gap: 22px;
  }
  .rw-warehouse-main {
    padding: 15px 20px 25px;
  }
  .rw-warehouse-main .rw-feature-art {
    min-height: 205px;
  }
  .rw-warehouse-main .rw-chest {
    --chest-size:160px;
  }
  .rw-characters {
    display: flex;
    flex-direction: column;
  }
  .rw-character-list {
    order: 1;
    display: flex;
    gap: 9px;
    max-height: none;
    overflow: auto;
    border-right: 0;
    border-bottom: 1px solid var(--rw-line);
    padding: 10px;
  }
  .rewards-document .rw-character-option {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    width: 90px;
    gap: 2px;
    min-height: 107px;
    margin: 0;
    padding: 4px;
    text-align: center;
  }
  .rw-character-option .original-portrait {
    width: 52px;
    height: 65px;
  }
  .rw-character-option small {
    font-size: 8px;
    margin-top: 2px;
  }
  .rw-character-stage {
    order: 2;
    min-height: 365px;
  }
  .rw-character-sheet {
    order: 3;
    min-height: 320px;
    padding: 28px 26px;
    border-left: 0;
  }
  .rw-character-sheet .rw-heading {
    font-size: 26px;
  }
  .rw-character-sheet .rw-copy {
    font-size: 13px;
  }
  .rw-sheet-facts {
    font-size: 12px;
    padding: 12px 0;
    margin: 0;
  }
  .rw-stage-art {
    inset: 20px 20px 35px;
  }
  .rw-plates-layout {
    display: flex;
    flex-direction: column;
  }
  .rw-plate-stage {
    min-height: 300px;
    padding: 22px 16px;
    gap: 12px;
  }
  .rw-plate-stage > .reward-nameplate {
    height: 110px;
    font-size: 24px;
  }
  .rw-plate-choice > .reward-nameplate {
    width: 240px !important;
    font-size: 17px !important;
  }
  .rw-achievement-grid {
    grid-template-columns: 1fr;
  }
  .rw-achievement-summary {
    align-items: flex-start;
  }
  .rw-achievement {
    padding: 19px;
    gap: 12px;
  }
  .rw-achievement-summary .rw-heading {
    font-size: 21px;
  }
  .rw-achievement-summary .rw-copy {
    font-size: 11px;
  }
  .rw-footer {
    font-size: 9px;
    gap: 10px;
  }
  .rw-odds {
    gap: 8px;
  }
  .rw-odd {
    padding-left: 8px;
  }
  .rw-odd strong {
    font-size: 21px;
  }
  .rw-odd span {
    font-size: 10px;
  }
  .rw-pending-banner {
    flex-direction: column;
    align-items: flex-start;
    padding: 14px;
  }
  .rw-confirm,
  .rw-reveal {
    padding: 20px 7px;
    min-height: 350px;
  }
  .rw-confirm-actions {
    gap: 9px;
  }
  .rw-confirm-actions .avalon-button {
    padding: 10px 12px;
    font-size: 13px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .rewards-document *,
  .rewards-document *::before,
  .rewards-document *::after,
  .reward-nameplate {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  .game-modal-layer:has(.rewards-document)::backdrop {
    backdrop-filter: none;
  }
}
.rw-reveal {
  --reveal-light:#e6e7e9;
}
.rw-reveal[data-tier=blue] {
  --reveal-light:#81c4ef;
}
.rw-reveal[data-tier=gold] {
  --reveal-light:#eac66e;
}
.rw-reveal[data-tier=pink] {
  --reveal-light:#ef96cb;
}
.rw-reveal-seal::before {
  border: 2px solid var(--reveal-light);
  border-radius: 20px;
  transform: rotate(5deg);
  box-shadow: 0 0 26px color-mix(in srgb, var(--reveal-light), transparent 50%), inset 0 0 25px color-mix(in srgb, var(--reveal-light), transparent 80%);
  transition: border-color .35s, box-shadow .35s;
}
.rw-reveal-seal::after {
  color: var(--reveal-light);
  transition: color .35s;
}
.rw-reveal .rw-chest-glow {
  background:
    radial-gradient(
      ellipse,
      color-mix(in srgb, var(--reveal-light), transparent 45%),
      transparent 65%) !important;
}
.rw-reveal .rw-chest-lock {
  border-color: var(--reveal-light);
  transition: border-color .35s;
}
.rw-reveal[data-tier=pink] .rw-reveal-seal::before {
  box-shadow: 0 0 48px #ef96cb80, inset 0 0 38px #ef96cb40;
}
.native-menu:has(.menu-options > :nth-child(7)) {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 72px 24px 24px;
  overflow: auto;
  gap: 24px;
}
.native-menu:has(.menu-options > :nth-child(7)) .menu-brand {
  position: static;
  inset: auto;
  margin: 0;
}
.native-menu:has(.menu-options > :nth-child(7)) h1 {
  font-size: clamp(28px, 4.2vw, 56px);
  line-height: 1.3;
}
.native-menu:has(.menu-options > :nth-child(7)) .menu-options {
  position: static;
  inset: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: min(540px, 100%);
  gap: 12px 20px;
}
.native-menu:has(.menu-options > :nth-child(7)) .menu-options .avalon-button {
  width: 100%;
  height: 50px;
  min-height: 50px;
  font-size: 20px;
  padding: 4px 12px;
}
.native-menu:has(.menu-options > :nth-child(7)) .menu-options > :last-child {
  grid-column: 1/-1;
  width: calc(50% - 10px);
  justify-self: center;
}
@media (max-width: 520px) {
  .native-menu:has(.menu-options > :nth-child(7)) {
    padding: 75px 22px 26px;
    gap: 24px;
  }
  .native-menu:has(.menu-options > :nth-child(7)) .menu-options {
    gap: 13px;
  }
  .native-menu:has(.menu-options > :nth-child(7)) .menu-options .avalon-button {
    font-size: 17px;
    min-height: 50px;
    height: 50px;
  }
  .native-menu:has(.menu-options > :nth-child(7)) .menu-options > :last-child {
    width: calc(50% - 6px);
  }
}
@media (max-height: 500px) {
  .native-menu:has(.menu-options > :nth-child(7)) {
    justify-content: flex-start;
    padding: 50px 60px 20px;
    gap: 14px;
  }
  .native-menu:has(.menu-options > :nth-child(7)) h1 {
    font-size: 28px;
  }
  .native-menu:has(.menu-options > :nth-child(7)) .menu-subtitle {
    font-size: 11px;
  }
  .native-menu:has(.menu-options > :nth-child(7)) .menu-motto {
    display: none;
  }
  .native-menu:has(.menu-options > :nth-child(7)) .menu-options {
    grid-template-columns: repeat(3, 1fr);
    width: min(650px, 100%);
    gap: 10px 14px;
  }
  .native-menu:has(.menu-options > :nth-child(7)) .menu-options .avalon-button {
    min-height: 44px;
    height: 44px;
    font-size: 17px;
  }
  .native-menu:has(.menu-options > :nth-child(7)) .menu-options > :last-child {
    grid-column: 2;
    width: 100%;
  }
}
.rewards-document.game-document {
  display: block;
}
.rewards-document > .document-title {
  outline-offset: 2px;
}
.rewards-document > .document-title:focus:not(:focus-visible) {
  outline: none;
}
.rewards-document > .document-close {
  background: #162232;
  color: #e5c984;
  min-width: 36px;
  min-height: 36px;
  width: 36px;
  height: 36px;
  border: 1px solid #b79a5c66;
  border-radius: 50%;
  box-shadow: none;
  font-size: 24px;
  padding: 0;
}
.rewards-document .rw-tabs {
  flex-shrink: 0;
  min-height: 49px;
}
.rewards-document .rw-content {
  overflow: visible;
}
.rewards-document .rw-footer {
  position: static;
  inset: auto;
}
.rewards-document .avalon-button::before,
.rewards-document .avalon-button::after {
  content: none !important;
  display: none !important;
}
.rw-card-preview {
  min-width: 0;
  max-width: calc(100% + 16px);
  overflow: hidden;
}
.rw-card-preview > .reward-nameplate {
  width: 100%;
  min-width: 0;
}
.rw-stage-art > .original-portrait {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: 100%;
  max-width: 100%;
  overflow: hidden;
}
@media (max-width: 650px) {
  .rw-card-preview {
    max-width: calc(100% + 24px);
  }
  .rw-card-preview > .reward-nameplate {
    width: 100%;
    height: 68px;
    padding-inline: 25px;
    font-size: 12px;
  }
  .rw-feature-copy {
    min-width: 0;
  }
}

/* web/src/reward-presentation/rewards-pixel.css */
.rewards-document.game-document {
  width: min(1320px, calc(100vw - 40px));
  max-width: 1320px;
  max-height: calc(100dvh - 40px);
  padding: 26px 34px 20px;
  background: #0d141c;
  border: 2px solid #6c6044;
  border-radius: 0;
  box-shadow:
    0 0 0 4px #080c12,
    0 0 0 6px #343229,
    0 24px 90px #000d;
  --rw-gold:#dfbc72;
  --rw-line:#8c78434f;
}
.rewards-document.game-document::before {
  top: 7px;
  left: 7px;
  right: 7px;
  height: 66px;
  border-color: #7e6b4038;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 99.8% 100%, 99.8% 1%, .2% 1%, .2% 100%, 0 100%);
}
.rewards-document > .document-title {
  font-family: AvalonPixel, monospace;
  font-size: 32px;
  line-height: 1.25;
  letter-spacing: 5px;
  color: #eaddb9;
  text-shadow: 2px 2px #000;
  margin-bottom: 12px;
}
.rewards-document > .document-close {
  border-radius: 0 !important;
  border: 1px solid #847047 !important;
  background: #151b20 !important;
  box-shadow: inset 1px 1px #b3964e22 !important;
}
.rw-topline {
  margin-bottom: 16px;
}
.rw-subtitle {
  color: #8b979f;
  font-size: 12px;
}
.rw-wallet strong {
  font-family: AvalonPixel, monospace;
  font-size: 24px;
}
.rw-tabs {
  gap: 10px;
  margin-bottom: 22px;
  border-bottom: 1px solid #6f6045;
}
.rewards-document .rw-tab {
  padding: 11px 24px 13px;
  font-family: AvalonPixel, monospace;
  letter-spacing: 2px;
  font-size: 18px;
  color: #8e9a9f;
  border-bottom-width: 3px;
}
.rewards-document .rw-tab[aria-selected=true] {
  color: #f2d694;
  background: #c3a05b0b;
  border-bottom-color: #d8b873;
}
.rewards-document .avalon-button {
  border-radius: 0;
  font-family: AvalonPixel, monospace;
  font-size: 16px;
  letter-spacing: 1px;
  background: #c4a15d;
  border: 2px solid #77603b;
  box-shadow:
    inset 1px 1px #f3d593,
    inset -1px -1px #99763b,
    0 3px #03080d;
}
@media (hover: hover) and (pointer: fine) {
  .rewards-document .avalon-button:hover:not(:disabled) {
    filter: brightness(1.15);
  }
}
.rewards-document .rw-secondary {
  background: #172129;
  color: #d5c297;
  border: 1px solid #665b44;
  box-shadow: inset 0 0 0 2px #09121a;
}
.rewards-document .rw-heading {
  font-family: AvalonPixel, monospace;
  font-size: 28px;
  letter-spacing: 2px;
}
.rw-kicker {
  color: #887954;
  letter-spacing: 4px;
  font-size: 9px;
}
.rw-feature {
  grid-template-columns: 48% 1fr;
  min-height: 320px;
  border: 1px solid #786542;
  background:
    linear-gradient(
      90deg,
      #101a21 46%,
      #151c20 46%);
  box-shadow: inset 0 0 0 5px #0b1117;
}
.rw-feature::after {
  position: absolute;
  content: "ROYAL TREASURY";
  font: 70px/1 AvalonPixel, monospace;
  letter-spacing: 2px;
  left: 28px;
  bottom: 8px;
  color: #d4bb7b06;
  pointer-events: none;
}
.rw-feature-art {
  min-height: 310px;
  overflow: hidden;
}
.rw-feature-art::before {
  width: 220px;
  height: 55px;
  top: 74%;
  border: 0;
  border-radius: 50%;
  box-shadow: none;
  transform: none;
  background:
    radial-gradient(
      ellipse,
      #0005,
      transparent 70%);
}
.rw-feature-art::after {
  display: none;
}
.rw-feature-copy {
  padding: 38px 44px 38px 20px;
}
.rw-feature-copy .rw-heading {
  font-size: 36px;
  margin: 18px 0 14px;
}
.rw-feature-copy .rw-copy {
  max-width: 380px;
  line-height: 1.9;
}
.rw-chest.rw-pixel-chest,
.rw-warehouse-main .rw-chest.rw-pixel-chest {
  display: block;
  width: 288px;
  height: 288px;
  max-width: none;
  --chest-size:288px;
  background: transparent;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  transform: none;
  filter: drop-shadow(0 10px 0 #0004);
  perspective: none;
  animation: none;
}
.rw-grid {
  gap: 18px;
}
.rw-card {
  border: 1px solid #645941;
  background: #131e27;
  padding: 16px 20px;
  box-shadow: inset 0 0 0 3px #080f1688;
}
.rw-card-preview {
  background: #070d1350;
  margin: 0 -8px 10px;
  min-height: 110px;
  border-bottom: 1px solid #7d684326;
}
.rw-card h4 {
  font-family: AvalonPixel, monospace;
  font-size: 20px;
  line-height: 1.5;
}
.rw-section-title {
  font-family: AvalonPixel, monospace;
  font-size: 20px;
  letter-spacing: 3px;
  color: #ddcda7;
}
.rw-card-actions {
  margin-top: 10px;
}
.rw-card .rw-copy {
  color: #8f9aa4;
}
.rw-card .rw-tag {
  color: #b7a16d;
}
.rw-warehouse {
  grid-template-columns: 1.2fr 1fr;
}
.rw-warehouse-main {
  background: #121c23;
  border: 1px solid #776340;
  box-shadow: inset 0 0 0 5px #0b1116;
}
.rw-warehouse-main .rw-feature-art {
  min-height: 300px;
}
.rw-receipts {
  padding: 25px 16px;
}
.rewards-document .rw-receipt-row {
  border-color: #73644455;
  background: #121c25;
  box-shadow: inset 0 0 0 2px #091017;
  font-family: inherit;
}
.rw-plates-layout {
  grid-template-columns: 1.05fr 1fr;
  gap: 30px;
}
.rw-plate-stage {
  border: 1px solid #7b6644;
  background: #101a23;
  padding: 34px 28px;
  gap: 22px;
  box-shadow: inset 0 0 0 6px #080f16;
  min-height: 500px;
}
.rw-plate-stage > .reward-nameplate {
  width: 100%;
  max-width: 480px;
  height: 128px;
}
.rewards-document .rw-plate-choice {
  background: #111b24;
  border: 1px solid #58606a55;
  box-shadow: inset 0 0 0 3px #080f15;
  padding: 14px;
  min-height: 90px;
}
.rewards-document .rw-plate-choice[aria-checked=true] {
  border-color: #dcc080;
  background: #242a27;
}
.rw-characters {
  grid-template-columns: 23% minmax(0, 43%) minmax(0, 34%);
  min-height: 580px;
  border-color: #7e6c45;
  background: #0f1821;
}
.rw-character-list {
  max-height: 610px;
  background: #0b121b;
  border-right: 1px solid #7f6b43;
  padding: 10px;
}
.rewards-document .rw-character-option {
  min-height: 90px;
  margin-bottom: 8px;
  border: 1px solid #535a5c55;
  background: #16202a;
  box-shadow: inset 0 0 0 3px #0a1119;
  color: #79868f;
  font-family: AvalonPixel, monospace;
  font-size: 16px;
  grid-template-columns: 62px 1fr;
}
.rw-character-option .original-portrait {
  height: 72px;
  width: 62px;
  filter: grayscale(1) brightness(.67);
  transition: filter .2s;
}
.rewards-document .rw-character-option[aria-checked=true] {
  background: #302f27;
  border-color: #e1c589;
  box-shadow: inset 4px 0 #e1c589, inset 0 0 0 3px #111b20;
  color: #fff0c7;
}
.rw-character-option[aria-checked=true] .original-portrait {
  filter: none;
}
.rw-character-stage {
  min-height: 580px;
  background:
    radial-gradient(
      ellipse at 50% 40%,
      #53657b44,
      transparent 66%),
    linear-gradient(
      145deg,
      #24313e,
      #111b26);
  transition: background .5s;
}
.rw-character-stage::before {
  border-radius: 0;
  inset: 22px;
  border: 1px solid #d0c29830;
  box-shadow: inset 0 0 0 7px #10182144;
}
.rw-character-stage[data-theme=moon] {
  background:
    radial-gradient(
      ellipse at 45% 40%,
      #9780bd55,
      transparent 66%),
    #192237;
}
.rw-character-stage[data-theme=ember] {
  background:
    radial-gradient(
      ellipse at 45% 40%,
      #b47a5155,
      transparent 66%),
    #292120;
}
.rw-character-stage[data-theme=jade] {
  background:
    radial-gradient(
      ellipse at 45% 40%,
      #61a79555,
      transparent 66%),
    #132b2c;
}
.rw-stage-art {
  inset: 20px 14px 44px;
  animation: rw-portrait-enter .5s ease-out both;
}
.rw-stage-art > .original-portrait {
  filter: drop-shadow(12px 12px 0 #07101b66);
  transform: scale(1.03);
}
.rw-stage-title {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 21px;
  text-align: center;
  font: 20px AvalonPixel, monospace;
  letter-spacing: 6px;
  color: #b4a780;
  text-shadow: 2px 2px #030914;
}
.rw-character-sheet {
  background: #dfd1ac;
  color: #453b29;
  box-shadow: inset 0 0 0 8px #b9a3764d, inset 0 0 0 9px #806b3b44;
  border-left: 2px solid #837043;
  padding: 36px 30px;
}
.rw-character-sheet .rw-heading {
  font-size: 32px;
  line-height: 1.5;
  color: #40301d;
  padding: 10px 0;
  border-bottom: 2px solid #9d855335;
  background: none;
}
.rw-character-sheet .rw-kicker {
  color: #897044;
}
.rw-character-sheet .rw-copy {
  color: #726449;
}
.rw-sheet-facts {
  border-color: #9a84513d;
}
.rw-character-sheet .avalon-button {
  font-family: AvalonPixel, monospace;
  font-size: 17px;
  box-shadow: inset 1px 1px #f2d78d, 0 3px #83683d55;
}
.rw-achievement {
  background: #131e27;
  border: 1px solid #74613e;
  box-shadow: inset 0 0 0 4px #0b121a;
}
.rw-achievement h4 {
  font-family: AvalonPixel, monospace;
  font-size: 20px;
}
.rw-achievement-mark {
  border-radius: 0;
}
.rw-reveal {
  min-height: 540px;
  padding: 36px 20px 20px;
  position: relative;
  background: #070d16;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid #796742;
}
.rw-reveal > .rw-kicker,
.rw-reveal > .rw-heading,
.rw-reveal > .rw-copy,
.rw-reveal > .avalon-button,
.rw-reveal > .rw-confirm-actions,
.rw-reveal > .rw-receipt-id {
  position: relative;
  z-index: 4;
}
.rw-reveal .rw-feature-art {
  height: 320px;
  min-height: 320px;
  overflow: visible;
}
.rw-reveal .rw-feature-art::before,
.rw-reveal .rw-feature-art::after {
  display: none;
}
.rw-reveal .rw-pixel-chest {
  width: 288px;
  height: 288px;
  animation: none;
}
.rw-pixel-fx {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  image-rendering: pixelated;
  z-index: 0;
  pointer-events: none;
}
.rw-quality-card {
  display: none;
  position: absolute;
  top: 95px;
  left: 50%;
  width: 166px;
  height: 254px;
  transform: translateX(-50%);
  padding: 5px;
  border: 2px solid var(--reveal-light);
  box-shadow:
    0 0 0 4px #07111b,
    0 0 0 5px var(--reveal-light),
    0 12px 30px #0005;
  background: #09131e;
  z-index: 3;
  image-rendering: pixelated;
}
.rw-quality-card img {
  width: 100%;
  height: 100%;
  object-fit: fill;
  image-rendering: pixelated;
  display: block;
}
.rw-reveal[data-phase=upgrade] .rw-pixel-chest {
  visibility: visible;
}
.rw-reveal[data-phase=upgrade] .rw-quality-card {
  display: block;
  animation: none;
}
.rw-reveal[data-tier=blue] .rw-quality-card img {
  filter: sepia(.18) hue-rotate(150deg) saturate(.65);
}
.rw-reveal[data-tier=pink] .rw-quality-card img {
  filter: sepia(.18) hue-rotate(270deg) saturate(.65);
}
.rw-reveal[data-phase=result] .rw-reward-art {
  min-height: 240px;
  padding: 20px;
  animation: rw-portrait-enter .4s steps(8) both;
}
.rw-coin-reward {
  font-family: AvalonPixel, monospace;
  letter-spacing: 5px;
  color: #ffdda0;
  text-shadow: 4px 4px #6e462d;
}
@keyframes rw-portrait-enter {
  from {
    opacity: 0;
    translate: 12px 0;
  }
  to {
    opacity: 1;
    translate: 0 0;
  }
}
@media (max-width: 850px) {
  .rewards-document.game-document {
    padding: 20px;
  }
  .rewards-document .rw-tab {
    padding-inline: 10px;
  }
  .rw-feature-copy {
    padding: 22px;
  }
  .rw-characters {
    grid-template-columns: 24% 43% 33%;
  }
  .rw-character-sheet {
    padding: 24px 20px;
  }
  .rw-character-sheet .rw-heading {
    font-size: 26px;
  }
  .rw-character-option small {
    font-size: 9px;
  }
}
@media (max-width: 650px) {
  .rewards-document.game-document {
    width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
    padding: 18px 14px 14px;
  }
  .rewards-document > .document-title {
    font-size: 24px;
    letter-spacing: 3px;
    padding-right: 36px;
  }
  .rw-tabs {
    gap: 8px;
  }
  .rewards-document .rw-tab {
    font-size: 16px;
    padding: 10px 6px;
  }
  .rw-feature {
    grid-template-columns: 1fr;
    background: #111a22;
  }
  .rw-feature-art {
    min-height: 240px;
  }
  .rw-chest.rw-pixel-chest {
    width: 240px;
    height: 240px;
  }
  .rw-feature-copy {
    padding: 12px 22px 26px;
  }
  .rw-feature-copy .rw-heading {
    font-size: 30px;
  }
  .rw-grid {
    grid-template-columns: 1fr;
  }
  .rw-card-preview {
    min-height: 112px;
  }
  .rw-card-actions {
    flex-direction: row;
  }
  .rw-warehouse {
    grid-template-columns: 1fr;
  }
  .rw-receipts {
    padding: 16px 0;
  }
  .rw-plates-layout {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }
  .rw-plate-stage {
    min-height: 390px;
    padding: 24px 12px;
  }
  .rw-plate-stage > .reward-nameplate {
    height: 100px;
  }
  .rw-characters {
    display: flex;
    flex-direction: column;
  }
  .rw-character-list {
    display: flex;
    max-height: none;
    border-bottom: 1px solid #776747;
    gap: 8px;
  }
  .rewards-document .rw-character-option {
    flex: 0 0 96px;
    display: flex;
    font-size: 13px;
    margin: 0;
  }
  .rw-character-stage {
    min-height: 450px;
  }
  .rw-character-sheet {
    min-height: 340px;
    border-left: 0;
  }
  .rw-character-sheet .rw-heading {
    font-size: 30px;
  }
  .rw-reveal {
    min-height: 530px;
    padding-inline: 10px;
  }
  .rw-feature::after {
    font-size: 40px;
  }
  .rw-quality-card {
    width: 152px;
    height: 232px;
    top: 115px;
  }
  .rw-section-title span {
    font-size: 10px;
  }
  .rw-footer {
    font-size: 9px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .rw-pixel-chest,
  .rw-stage-art,
  .rw-quality-card,
  .rw-reveal .rw-reward-art {
    animation: none !important;
    translate: none !important;
  }
}
.rw-stage-previous {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(
      ellipse at 50% 40%,
      #53657b44,
      transparent 66%),
    linear-gradient(
      145deg,
      #24313e,
      #111b26);
  animation: rw-portrait-exit .5s ease-in-out both;
}
.rw-stage-previous > .rw-stage-art {
  animation: none;
}
.rw-stage-previous[data-theme=moon] {
  background:
    radial-gradient(
      ellipse at 45% 40%,
      #9780bd55,
      transparent 66%),
    #192237;
}
.rw-stage-previous[data-theme=ember] {
  background:
    radial-gradient(
      ellipse at 45% 40%,
      #b47a5155,
      transparent 66%),
    #292120;
}
.rw-stage-previous[data-theme=jade] {
  background:
    radial-gradient(
      ellipse at 45% 40%,
      #61a79555,
      transparent 66%),
    #132b2c;
}
@keyframes rw-portrait-exit {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .rw-stage-previous {
    display: none;
  }
}
.nameplate-with-avatar {
  padding-left: 30% !important;
  padding-right: 10% !important;
}
.nameplate-with-avatar .nameplate-avatar {
  display: block;
  position: absolute;
  left: 0;
  bottom: -16%;
  width: 29%;
  height: 120%;
  max-width: none;
  max-height: none;
  min-height: 0;
  z-index: 1;
  filter: drop-shadow(3px 0 0 #05091488);
  pointer-events: none;
}
.nameplate-with-avatar .nameplate-safe-name {
  position: relative;
  z-index: 2;
}
@media (max-width: 650px) {
  .rw-chest.rw-pixel-chest {
    width: 192px;
    height: 192px;
  }
}
.rw-feature::after {
  display: none;
}
.rw-chest.rw-pixel-chest {
  background-image: none;
  filter: drop-shadow(0 8px 4px #0005);
  animation: none;
  transform-origin: 50% 83%;
}
.rw-reveal {
  background:
    radial-gradient(
      ellipse at 50% 53%,
      #34393b35,
      transparent 48%),
    #0b1016;
  --reveal-light:#c9c1b0;
}
.rw-reveal[data-tier=blue] {
  --reveal-light:#92aeba;
}
.rw-reveal[data-tier=gold] {
  --reveal-light:#c3ae80;
}
.rw-reveal[data-tier=pink] {
  --reveal-light:#bba0b1;
}
.rw-reveal .rw-pixel-chest,
.rw-reveal[data-phase=opening] .rw-pixel-chest {
  animation: none;
  translate: none;
  transform: translateY(0) scale(1);
  transition: transform .24s cubic-bezier(.2, .7, .25, 1);
}
.rw-reveal .rw-quality-card {
  transition: transform .16s cubic-bezier(.2, .8, .25, 1), border-color .08s;
  box-shadow:
    0 0 0 4px #0a1119,
    0 0 0 5px #5d626666,
    0 12px 30px #0005;
  transform: translateX(-50%) scale(1);
  transform-origin: 50% 60%;
}
.rw-reveal[data-phase=upgrade] .rw-quality-card {
  animation: none;
}
.rw-reveal[data-phase=upgrade][data-motion=anticipation] .rw-quality-card {
  transform: translate(-50%, 3px) scale(.975);
  transition-duration: .15s;
}
.rw-reveal[data-phase=upgrade][data-motion=hit-stop] .rw-quality-card {
  transform: translate(-50%, 4px) scale(.955);
  transition: none;
}
.rw-reveal[data-phase=upgrade][data-motion=release] .rw-quality-card {
  transform: translate(-50%, -5px) scale(1.045);
  transition-duration: .09s;
  box-shadow:
    0 0 0 4px #0a1119,
    0 0 0 5px var(--reveal-light),
    0 12px 30px #0005;
}
.rw-reveal[data-phase=upgrade][data-motion=recoil] .rw-quality-card {
  transform: translate(-50%, 2px) scale(.994);
  transition-duration: .13s;
}
.rw-reveal[data-phase=upgrade][data-motion=settle] .rw-quality-card {
  transform: translate(-50%, 0) scale(1);
  transition-duration: .2s;
}
@media (prefers-reduced-motion: reduce) {
  .rw-reveal .rw-pixel-chest,
  .rw-reveal .rw-quality-card {
    animation: none !important;
    transition: none !important;
    translate: none !important;
    transform: none !important;
  }
  .rw-pixel-fx {
    display: none;
  }
}
.rw-chest.rw-pixel-chest {
  position: relative;
  overflow: hidden;
  background: transparent !important;
  background-image: none !important;
  isolation: isolate;
  filter: none !important;
  mix-blend-mode: normal;
  opacity: 1;
  forced-color-adjust: none;
}
.rw-chest.rw-pixel-chest::before,
.rw-chest.rw-pixel-chest::after {
  display: none;
  content: none;
}
.rw-chest.rw-pixel-chest > .rw-chest-sprite {
  display: block !important;
  position: absolute;
  inset: 0 auto auto 0;
  width: 300% !important;
  height: 500% !important;
  max-width: none !important;
  max-height: none !important;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent !important;
  object-fit: fill;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  filter: none !important;
  mix-blend-mode: normal;
  opacity: 1 !important;
  transform: translate(var(--chest-frame-x,0%), var(--chest-tier-y,0%));
  transition: none;
  forced-color-adjust: none;
}
.rw-reveal[data-chest=cracked] .rw-pixel-chest {
  --chest-frame-x:-33.333333%;
}
.rw-reveal[data-chest=open] .rw-pixel-chest {
  --chest-frame-x:-66.666667%;
}
.rw-pixel-chest[data-art-state=loading] > .rw-chest-sprite,
.rw-pixel-chest[data-art-state=error] > .rw-chest-sprite {
  visibility: hidden;
}
.rw-pixel-chest[data-art-state=loading]::after,
.rw-pixel-chest[data-art-state=error]::after {
  display: grid;
  place-content: center;
  position: absolute;
  inset: 40% 0 0;
  content: "\6b63\5728\8f7d\5165\7bb1\4f53";
  color: #a8aca8;
  font: 12px system-ui;
  text-align: center;
  background: none;
}
.rw-pixel-chest[data-art-state=error]::after {
  content: "\7bb1\4f53\56fe\672a\80fd\8f7d\5165\ff0c\8bf7\5237\65b0";
  color: #ccb992;
}
.rw-reveal[data-tier=white] .rw-pixel-chest {
  --chest-tier-y:0%;
}
.rw-reveal[data-tier=blue] .rw-pixel-chest {
  --chest-tier-y:-20%;
}
.rw-reveal[data-tier=purple] .rw-pixel-chest {
  --chest-tier-y:-40%;
}
.rw-reveal[data-tier=gold] .rw-pixel-chest {
  --chest-tier-y:-60%;
}
.rw-reveal[data-tier=pink] .rw-pixel-chest {
  --chest-tier-y:-80%;
}
.rw-reveal[data-tier=purple] {
  --reveal-light:#aa94c7;
}
.rw-reveal[data-phase=upgrade] .rw-pixel-chest {
  visibility: visible;
  z-index: 2;
}
.rw-reveal .rw-pixel-fx {
  z-index: 0;
  mix-blend-mode: screen;
}
.rw-reveal-quality {
  position: relative;
  z-index: 4;
  min-height: 22px;
  color: var(--reveal-light);
  font: 16px AvalonPixel, monospace;
  letter-spacing: 3px;
  margin: 0 0 4px;
}
.rw-reveal .rw-pixel-chest {
  z-index: 2;
}
.rw-reveal-scene {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  --scene-energy:.1;
  --ray-energy:.05;
  --spot-energy:.08;
  --frame-energy:.15;
}
.rw-reveal-scene > div {
  position: absolute;
  pointer-events: none;
}
.rw-scene-wash {
  inset: 0;
  background:
    radial-gradient(
      ellipse at 50% 52%,
      var(--scene-color) 0%,
      var(--scene-deep) 60%,
      #090a10 100%);
  opacity: var(--scene-energy);
  transition: opacity 70ms ease-out;
}
.rw-scene-spot {
  inset: 8% 5% 0;
  background:
    radial-gradient(
      ellipse at 50% 57%,
      var(--scene-bright) 0%,
      var(--scene-glow) 8%,
      var(--scene-deep) 28%,
      transparent 54%);
  opacity: var(--spot-energy);
  transition: opacity 80ms ease-out;
}
.rw-scene-frame {
  inset: 9px;
  border: var(--scene-border) solid var(--scene-color);
  box-shadow:
    inset 0 0 35px var(--scene-glow),
    0 0 22px var(--scene-glow),
    inset 0 0 3px var(--scene-bright);
  opacity: var(--frame-energy);
  transition: opacity 65ms ease-out;
}
.rw-reveal-scene[data-energy=peak] > div {
  transition: none;
}
@media (prefers-reduced-motion: reduce) {
  .rw-reveal-scene {
    display: none !important;
  }
  .rw-reveal-scene > div {
    transition: none !important;
  }
}
.rw-reveal .rw-feature-art {
  position: relative;
  z-index: 2;
}
.rw-reveal .rw-reveal-scene {
  z-index: 0;
}
.rw-reveal .rw-pixel-fx {
  z-index: 1;
}
.rw-reveal .rw-feature-art {
  height: 400px;
  min-height: 400px;
  width: 100%;
  position: relative;
  z-index: 2;
}
.rw-reveal[data-phase][data-motion] .rw-pixel-chest {
  width: 240px;
  height: 240px;
  transform: none;
  transition: none;
  animation: none;
}
.rw-reveal[data-motion=release] .rw-reveal-quality,
.rw-reveal[data-motion=display] .rw-reveal-quality {
  color: #fff;
  transform: scale(1.18);
}
.rw-reveal-quality {
  transition: none;
  font-size: 20px;
  letter-spacing: 5px;
}
.rw-reveal .rw-pixel-fx {
  z-index: 1;
}
.rw-reveal .rw-reveal-scene {
  z-index: 0;
}
@media (max-width: 650px) {
  .rw-reveal .rw-feature-art {
    height: 330px;
    min-height: 330px;
  }
  .rw-reveal[data-phase][data-motion] .rw-pixel-chest {
    width: 140px;
    height: 140px;
  }
  .rw-reveal {
    min-height: 490px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .rw-reveal[data-phase][data-motion] .rw-pixel-chest {
    transform: none !important;
    will-change: auto;
  }
}
body.chest-preview-document {
  display: block;
  min-height: 100dvh;
  height: auto;
  overflow: auto;
  background: #080c12;
  color: #e8e5dc;
  margin: 0;
  padding: 24px;
  font: 14px system-ui;
}
.rw-motion-preview.rewards-document.game-document {
  position: relative;
  inset: auto;
  transform: none;
  margin: auto;
  width: min(100%, 1100px);
  max-height: none;
  overflow: visible;
}
.rw-preview-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}
.rw-preview-controls button {
  padding: 10px 16px;
  background: #202b38;
  color: #ddd;
  border: 1px solid #526276;
  cursor: pointer;
  font: inherit;
}
.rw-preview-controls button[aria-pressed=true] {
  border-color: #e9d19b;
  color: #ffe8b8;
  background: #443b2b;
}
.rw-preview-note {
  color: #aab3bf;
  font: 13px/1.7 system-ui;
  margin: 8px 0 16px;
}
.rw-preview-status {
  font: 13px ui-monospace, monospace;
  color: #bcc7d7;
  margin: 12px 0;
}
.rw-preview-meter {
  display: flex;
  gap: 6px;
  margin: 14px 0;
}
.rw-preview-meter span {
  flex: 1;
  height: 3px;
  background: #26313f;
}
.rw-preview-meter span[data-active=true] {
  background: #d8c693;
}
@media (max-width: 650px) {
  body.chest-preview-document {
    padding: 8px;
  }
  .rw-motion-preview.rewards-document.game-document {
    width: 100%;
    padding: 16px 10px;
  }
  .rw-preview-controls button {
    padding: 9px 12px;
  }
}
.rw-preview-variant {
  padding: 10px 12px;
  background: #14202b;
  color: #eee;
  border: 1px solid #526276;
  font: inherit;
}
.rw-reveal-scene .rw-pixelfx-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  pointer-events: none;
  z-index: 5;
  opacity: 1;
}
.rw-preview-fx {
  padding: 10px 12px;
  background: #241a32;
  color: #f8e6ff;
  border: 1px solid #80638d;
  font: inherit;
  max-width: 100%;
}
@media (prefers-reduced-motion: reduce) {
  .rw-pixelfx-layer {
    display: none !important;
  }
}
.rw-reveal[data-phase=result] {
  padding: 0;
  min-height: 0;
  overflow: visible;
  border-color: #6a6a7c;
}
.rw-result-stage {
  --result:#d9e6f1;
  --result-deep:#263140;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: center;
  flex-direction: column;
  min-height: 510px;
  padding: 32px 24px 22px;
  color: #f6f3ee;
  text-align: center;
  background:
    radial-gradient(
      ellipse at 50% 35%,
      var(--result-deep),
      transparent 65%),
    #0c1220;
  border: 1px solid var(--result);
  box-shadow: inset 0 0 0 5px #101724, inset 0 0 0 6px #ffffff12;
}
.rw-result-stage[data-tier=blue] {
  --result:#7ddcff;
  --result-deep:#09375a;
}
.rw-result-stage[data-tier=purple] {
  --result:#dab0ff;
  --result-deep:#45235d;
}
.rw-result-stage[data-tier=gold] {
  --result:#ffe489;
  --result-deep:#57431c;
}
.rw-result-stage[data-tier=pink] {
  --result:#ffb8e7;
  --result-deep:#5d2349;
}
.rw-result-stage > * {
  position: relative;
  z-index: 1;
}
.rw-result-seal {
  position: absolute;
  width: min(72%, 370px);
  aspect-ratio: 1;
  border: 1px solid var(--result);
  opacity: .16;
  top: 46px;
  transform: rotate(45deg);
  box-shadow: inset 0 0 0 16px #ffffff09, 0 0 80px var(--result-deep);
  pointer-events: none;
}
.rw-result-eyebrow {
  font: 10px/1.5 system-ui;
  letter-spacing: 2px;
  color: #c5d2df;
  margin: 0 0 16px;
}
.rw-result-quality {
  font: 600 14px/1.6 system-ui;
  letter-spacing: 3px;
  margin: 0;
  color: var(--result);
  border-block: 1px solid #ffffff27;
  padding: 7px 24px;
}
.rw-result-display {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  width: 100%;
  min-height: 215px;
  padding: 22px 0 14px;
}
.rw-result-display > .reward-nameplate {
  width: min(100%, 430px);
  height: 112px;
  font-size: 25px;
}
.rw-result-display .nameplate-safe-name {
  z-index: 3;
}
.rw-result-display .nameplate-avatar {
  width: 82px;
  height: 100px;
}
.rw-result-display > .original-portrait,
.rw-preview-portrait {
  width: min(100%, 320px);
  height: 230px;
  object-fit: contain;
  filter: drop-shadow(0 8px 20px #0008);
}
.rw-result-title {
  font: 700 clamp(24px, 4vw, 35px)/1.35 system-ui;
  margin: 7px 0 10px;
  color: #fff4e0;
  overflow-wrap: anywhere;
}
.rw-result-description {
  font: 14px/1.75 system-ui;
  color: #c5cfdd;
  max-width: 510px;
  min-height: 25px;
  margin: 0 0 23px;
}
.rw-result-receipt {
  font: 10px/1.5 ui-monospace, monospace;
  color: #8f9cad;
  margin: 20px 0 0;
  overflow-wrap: anywhere;
  max-width: 100%;
}
.rw-result-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  width: 100%;
}
.rw-result-actions button,
.rw-preview-skip,
.rw-audio-test {
  min-height: 44px;
  padding: 10px 22px;
  border: 1px solid #77859b;
  color: #e9effb;
  background: #172339;
  font: 600 14px system-ui;
  cursor: pointer;
}
.rw-result-actions .rw-result-primary {
  border-color: var(--result);
  background: var(--result);
  color: #171c29;
}
.rw-result-actions button:focus-visible,
.rw-audio-controls input:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}
.rw-result-coins {
  position: relative;
  width: 185px;
  height: 110px;
}
.rw-result-coins i {
  position: absolute;
  left: calc(26px + var(--coin-index)*22px);
  top: calc(30px - var(--coin-index)*4px);
  width: 55px;
  height: 55px;
  font: 38px/55px serif;
  font-style: normal;
  border: 3px solid #ffdc72;
  background: #9b691d;
  border-radius: 50%;
  color: #fff0a1;
  box-shadow: 5px 6px 0 #634712;
  transform: rotate(calc(var(--coin-index)*9deg - 15deg));
}
.rw-result-amount {
  font: 700 30px system-ui;
  color: #ffe390;
}
.rw-result-fallback {
  font: 100px serif;
  color: var(--result);
}
.rw-audio-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 12px 0 18px;
  padding: 10px 14px;
  border: 1px solid #45536b;
  color: #c9d3e4;
  background: #0f1725;
  font: 12px system-ui;
  min-width: 0;
}
.rw-audio-controls legend {
  padding: 0 8px;
  color: #bfcce1;
}
.rw-audio-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
}
.rw-audio-volume {
  display: flex;
  align-items: center;
  gap: 6px;
}
.rw-audio-volume input {
  width: 90px;
}
.rw-audio-controls input {
  accent-color: #dec8f5;
}
.rw-audio-status {
  flex-basis: 100%;
  color: #b2becf;
  font-size: 11px;
}
.rw-audio-test {
  font-size: 12px;
  padding: 7px 12px;
  min-height: 36px;
}
.rw-preview-kind {
  padding: 10px 12px;
  background: #162c2a;
  color: #e7fff4;
  border: 1px solid #638b7d;
  font: inherit;
  max-width: 100%;
}
.rw-preview-ready {
  padding: 80px 20px;
  text-align: center;
  background: #111b2d;
  color: #c7d3e5;
}
.rw-suspense-prompt {
  position: absolute;
  bottom: 100px;
  left: 0;
  right: 0;
  text-align: center;
  z-index: 4;
  font: 14px/1.6 system-ui;
  letter-spacing: 4px;
  color: #ded4f2;
  opacity: 0;
  pointer-events: none;
}
.rw-reveal[data-motion=suspense] .rw-suspense-prompt {
  opacity: .8;
}
.rw-reveal[data-motion=suspense] .rw-reveal-quality {
  color: #e8d7ff;
}
@media (max-width: 650px) {
  .rw-result-stage {
    padding: 25px 14px 20px;
    min-height: 480px;
  }
  .rw-result-display {
    min-height: 200px;
  }
  .rw-result-actions button {
    flex: 1 1 130px;
    padding: 11px 12px;
  }
  .rw-result-display > .reward-nameplate {
    height: 96px;
    font-size: 21px;
  }
  .rw-result-eyebrow {
    letter-spacing: 1px;
  }
  .rw-audio-controls {
    gap: 10px;
    padding: 10px;
  }
  .rw-result-description {
    font-size: 13px;
  }
  .rw-suspense-prompt {
    bottom: 95px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .rw-result-stage * {
    animation: none !important;
    transition: none !important;
  }
}
.rw-result-stage {
  width: 100%;
  min-width: 0;
}
.rw-result-display {
  animation: rw-result-arrive .28s cubic-bezier(.18, .7, .3, 1) both;
}
.rw-result-title {
  animation: rw-result-caption .22s 0s ease-out both;
}
@keyframes rw-result-arrive {
  from {
    opacity: .35;
    transform: translateY(8px) scale(.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
@keyframes rw-result-caption {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (prefers-reduced-motion: reduce) {
  .rw-result-display,
  .rw-result-title {
    animation: none !important;
  }
}
.rw-reveal[data-motion=suspense] .rw-suspense-prompt {
  color: var(--reveal-light);
}
.rw-reveal[data-motion=suspense][data-tier=blue] .rw-reveal-quality {
  color: #a2ecff;
}
.rw-reveal[data-motion=suspense][data-tier=gold] .rw-reveal-quality {
  color: #ffe489;
}
.rw-reveal[data-original-chest=true] .rw-pixel-chest {
  display: none !important;
}
.rw-reveal[data-original-chest=true] .rw-feature-art {
  height: 420px;
  min-height: 420px;
}
.rw-original-chest {
  position: absolute;
  bottom: 20px;
  left: 50%;
  width: min(100%, 704px);
  aspect-ratio: 176/112;
  pointer-events: none;
  z-index: 3;
  transform: translateX(-50%);
}
.rw-original-chest-canvas {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  background: transparent;
  filter: none;
  opacity: 1;
}
.rw-reveal[data-original-chest=true][data-motion=opening] .rw-original-chest {
  will-change: auto;
}
@media (max-width: 650px) {
  .rw-reveal[data-original-chest=true] .rw-feature-art {
    height: 300px;
    min-height: 300px;
  }
  .rw-original-chest {
    bottom: 30px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .rw-original-chest {
    display: none !important;
  }
}
.rw-reveal[data-original-chest=true] > .rw-pixel-fx {
  transform: translateY(var(--original-particle-offset,0px));
}
.rw-reveal[data-original-chest=true] .rw-pixelfx-layer {
  transform: translateY(var(--original-layer-offset,0px));
}
.rw-reveal-scene .rw-mythic-prism {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  image-rendering: auto;
  pointer-events: none;
  z-index: 6;
  mix-blend-mode: screen;
}
.rw-reveal-scene[data-prism]:not([data-prism=off]) .rw-scene-wash {
  opacity: calc(var(--scene-energy) * (1 - var(--mythic-chroma) * .65));
}
.rw-reveal-scene[data-prism]:not([data-prism=off]) .rw-scene-spot {
  opacity: calc(var(--spot-energy) * (1 - var(--mythic-chroma) * .65));
}
.rw-reveal-scene[data-prism]:not([data-prism=off]) .rw-pixelfx-layer {
  opacity: calc(1 - var(--mythic-chroma) * .70);
}
@media (prefers-reduced-motion: reduce) {
  .rw-mythic-prism {
    display: none !important;
  }
}
.rw-emerging-reward {
  position: absolute;
  left: 50%;
  top: var(--reward-mouth-y,360px);
  width: min(78%, 440px);
  height: 220px;
  z-index: 6;
  pointer-events: none;
  transform: translate(-50%, -50%) translateY(calc(-1 * var(--reward-lift,180px) * var(--reward-rise,0))) scale(var(--reward-scale,.16));
  transform-origin: 50% 50%;
  will-change: transform, opacity;
  filter: drop-shadow(0 8px 24px #08091299);
}
.rw-emerging-reward .rw-result-display {
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0;
  animation: none;
  --result:var(--reveal-light);
  overflow: visible;
}
.rw-emerging-reward .rw-result-display > .original-portrait,
.rw-emerging-reward .rw-preview-portrait {
  height: 210px;
  width: min(100%, 300px);
}
.rw-emerging-reward .rw-result-display > .reward-nameplate {
  width: 100%;
  height: 100px;
  font-size: 22px;
}
.rw-reveal[data-reward-flight] > .rw-kicker,
.rw-reveal[data-reward-flight] > .rw-heading,
.rw-reveal[data-reward-flight] > .rw-reveal-quality {
  opacity: 0;
  transition: opacity .28s ease-out;
  pointer-events: none;
}
.rw-reveal[data-reward-flight] > .rw-reveal-scene,
.rw-reveal[data-reward-flight] > .rw-pixel-fx,
.rw-reveal[data-reward-flight] > .rw-feature-art {
  opacity: var(--reveal-remainder,1);
}
.rw-reveal[data-reward-flight][data-phase=result] {
  min-height: 540px;
}
.rw-reveal[data-reward-flight] .rw-result-stage {
  min-height: 540px;
}
.rw-reveal[data-reward-flight] .rw-result-display {
  animation: none;
}
.rw-reveal[data-reward-flight] .rw-result-stage > :not(.rw-result-display) {
  animation: rw-result-caption .26s ease-out both;
}
.rw-result-stage[data-carried=true] .rw-result-display {
  animation: none;
}
.rw-result-display[data-fallback=true] .rw-result-fallback {
  font-size: 86px;
}
@media (max-width: 650px) {
  .rw-emerging-reward {
    width: min(88%, 380px);
    height: 180px;
  }
  .rw-emerging-reward .rw-result-display > .original-portrait,
  .rw-emerging-reward .rw-preview-portrait {
    height: 175px;
  }
  .rw-emerging-reward .rw-result-display > .reward-nameplate {
    height: 88px;
    font-size: 19px;
  }
  .rw-reveal[data-reward-flight][data-phase=result],
  .rw-reveal[data-reward-flight] .rw-result-stage {
    min-height: 510px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .rw-emerging-reward {
    display: none !important;
  }
  .rw-reveal[data-reward-flight] * {
    animation: none !important;
    transition: none !important;
  }
}
.rw-reveal[data-v9] > .rw-reveal-skip-dock {
  position: absolute;
  z-index: 9;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  inset-block-start: max(12px, calc(env(safe-area-inset-top) + 8px));
  inset-inline-end: max(16px, calc(env(safe-area-inset-right) + 10px));
  max-width: calc(100% - 32px);
  pointer-events: none;
}
.rw-reveal[data-v9] .rw-reveal-skip.avalon-button {
  pointer-events: auto;
  flex: none;
  min-width: 88px !important;
  min-height: 44px !important;
  height: auto !important;
  padding: 6px 12px !important;
  font: 14px/1.3 AvalonPixel, monospace !important;
  letter-spacing: 0 !important;
  white-space: nowrap;
}
.rw-reveal[data-v9] .rw-reveal-skip[hidden],
.rw-reveal-skip-status:empty {
  display: none !important;
}
.rw-reveal[data-v9] .rw-reveal-skip-status {
  margin: 0;
  padding: 5px 9px;
  border-radius: 6px;
  background: var(--v4-well,#251d15);
  color: var(--v4-gold-hi,#ffe7a3);
  font: 13px/1.45 AvalonPixel, monospace;
  overflow-wrap: anywhere;
}
.economy-document.rewards-document .rw-reveal[data-v9] .rw-reveal-skip.avalon-button {
  background:
    linear-gradient(
      180deg,
      rgba(239, 247, 255, .17),
      rgba(15, 21, 35, .23)) !important;
  border: 1px solid rgba(221, 236, 252, .32) !important;
  border-radius: 6px !important;
  color: #f6f8fe !important;
  box-shadow: inset 0 1px 0 rgba(250, 253, 255, .18), 0 2px 8px rgba(0, 0, 0, .13) !important;
  text-shadow: 0 1px 3px rgba(8, 12, 24, .85) !important;
  backdrop-filter: blur(3px) saturate(1.12);
  -webkit-backdrop-filter: blur(3px) saturate(1.12);
}
.economy-document.rewards-document .rw-reveal[data-v9] .rw-reveal-skip.avalon-button::before,
.economy-document.rewards-document .rw-reveal[data-v9] .rw-reveal-skip.avalon-button::after {
  display: none !important;
}
@media (hover: hover) and (pointer: fine) {
  .economy-document.rewards-document .rw-reveal[data-v9] .rw-reveal-skip.avalon-button:not(:disabled):hover {
    background:
      linear-gradient(
        180deg,
        rgba(239, 247, 255, .25),
        rgba(20, 27, 45, .30)) !important;
    border-color: rgba(235, 244, 255, .53) !important;
  }
}
.economy-document.rewards-document .rw-reveal[data-v9] .rw-reveal-skip.avalon-button:focus-visible {
  outline: 2px solid #f0f6ff;
  outline-offset: 2px;
}
.economy-document.rewards-document .rw-reveal[data-v9] .rw-reveal-skip.avalon-button:disabled {
  opacity: .68 !important;
  filter: none !important;
  cursor: wait;
}

/* web/src/phase-two-badges.css */
.phase-two-diamond {
  display: inline-block;
  flex: none;
  inline-size: 6px;
  block-size: 8px;
  background:
    linear-gradient(
      105deg,
      #ffe7a3 0 49%,
      #c48e2f 50% 100%);
  border: 1px solid #241508;
  clip-path: polygon(33% 0, 67% 0, 67% 13%, 83% 13%, 83% 25%, 100% 25%, 100% 75%, 83% 75%, 83% 87%, 67% 87%, 67% 100%, 33% 100%, 33% 87%, 17% 87%, 17% 75%, 0 75%, 0 25%, 17% 25%, 17% 13%, 33% 13%);
  image-rendering: pixelated;
  pointer-events: none;
}
.phase-two-new {
  position: absolute;
  inset: 4px auto auto 4px;
  z-index: 2;
  pointer-events: none;
  font-size: 10px;
  line-height: 1;
  padding: 2px 3px;
  color: #241508;
  background: linear-gradient(#ffe7a3, #e4b955);
  border: 1px solid #241508;
  box-shadow: 1px 1px #241508;
  image-rendering: pixelated;
}
.collection-tabs button {
  position: relative;
}
.collection-tabs .phase-two-diamond {
  position: absolute;
  inset: 3px 4px auto auto;
}

/* web/src/economy-ui.css */
.game-document.economy-document {
  width: min(1100px, 96vw);
  max-height: 94dvh;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.economy-content {
  overflow: auto;
  min-height: 0;
  flex: 1;
}
.economy-items {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 8px;
}
.economy-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border-bottom: 1px solid #a99b76;
}
.economy-item > span:first-child {
  flex: 1;
  min-width: 120px;
}
.economy-item .avalon-button {
  width: 100%;
}
.economy-pool {
  margin: 12px 0;
}
.economy-pool summary {
  cursor: pointer;
}
.wardrobe-basic-heads,
.wardrobe-basic-skin {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.wardrobe-basic-heads h4,
.wardrobe-basic-skin h4 {
  width: 100%;
  margin: 4px 0;
}
@media (max-height: 600px) {
  .game-document.economy-document {
    gap: 6px;
  }
  .economy-document p {
    margin: 4px 0;
  }
  .wardrobe-basic-heads .avalon-button,
  .wardrobe-basic-skin .avalon-button {
    min-height: 36px;
  }
}
.game-document.economy-document {
  height: min(720px, 94dvh);
  overflow: hidden;
}
.economy-document > .economy-content {
  overflow: auto;
  min-height: 0;
}
.economy-document > .avalon-button {
  align-self: flex-end;
  flex-shrink: 0;
}
.economy-document > .document-title,
.economy-document > p,
.economy-document > nav {
  flex-shrink: 0;
}
.room-lifecycle {
  position: absolute;
  right: 12px;
  top: 72px;
  max-width: min(340px, 45vw);
  padding: 10px;
  background: #292721e8;
  color: #eee8d4;
  border: 2px solid #aaa793;
  z-index: 20;
}
.room-lifecycle p {
  margin: 4px 0;
}
.room-lifecycle[hidden] {
  display: none;
}
.room-lifecycle .small {
  margin: 4px;
}
.cosmetic-nameplate > .dynamic-nameplate {
  width: 100%;
  height: 100%;
}
.cosmetic-plate-art > .dynamic-nameplate {
  width: 100%;
}
.court-nameplate.cosmetics-world-nameplate {
  min-width: 170px;
  min-height: 52px;
  display: grid;
  place-items: center;
}
.court-nameplate > .dynamic-nameplate {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
}
.game-document.economy-document.rewards-document {
  padding: 12px 18px;
  width: min(1100px, 96vw);
  height: min(720px, 94dvh);
  max-height: 94dvh;
}
.economy-document.rewards-document .rw-reveal,
.economy-document.rewards-document .rw-result-stage {
  min-height: 0;
  flex: 1;
  max-height: 100%;
  padding: 12px;
  overflow: hidden;
}
.economy-document.rewards-document .rw-reveal {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.economy-document.rewards-document .rw-feature-art {
  height: auto !important;
  min-height: 0 !important;
  flex: 1;
  width: 100%;
}
.economy-document.rewards-document .rw-original-chest {
  width: min(80%, 480px);
  bottom: 0;
}
.economy-document.rewards-document .rw-result-display {
  min-height: 0;
  max-height: 210px;
  flex: 1;
}
.economy-document.rewards-document .rw-result-actions {
  flex-shrink: 0;
  margin-top: auto;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}
@media (max-height: 600px) {
  .game-document.economy-document.rewards-document {
    padding: 6px 12px;
    height: calc(100dvh - 16px);
    max-height: calc(100dvh - 16px);
  }
  .economy-document.rewards-document .document-title {
    font-size: 22px;
    margin: 2px 0 8px;
    padding: 4px;
  }
  .economy-document.rewards-document .rw-heading {
    font-size: 20px;
    margin: 2px;
  }
  .economy-document.rewards-document .rw-original-chest {
    width: 220px;
  }
  .economy-document.rewards-document .rw-result-stage {
    display: grid;
    grid-template-columns: 40% 60%;
    grid-template-rows: 24px 30px 1fr 44px;
    gap: 4px;
    padding: 8px;
  }
  .economy-document.rewards-document .rw-result-eyebrow {
    display: none;
  }
  .economy-document.rewards-document .rw-result-quality {
    grid-column: 2;
    grid-row: 1;
    margin: 0;
    font-size: 14px;
  }
  .economy-document.rewards-document .rw-result-display {
    grid-column: 1;
    grid-row: 1/5;
    width: 100%;
    height: 100%;
    max-height: 220px;
    margin: 0;
  }
  .economy-document.rewards-document .rw-result-title {
    grid-column: 2;
    grid-row: 2;
    font-size: 22px;
    margin: 0;
  }
  .economy-document.rewards-document .rw-result-description {
    grid-column: 2;
    grid-row: 3;
    font-size: 15px;
    margin: 6px;
  }
  .economy-document.rewards-document .rw-result-actions {
    grid-column: 2;
    grid-row: 4;
    align-self: end;
  }
  .economy-document.rewards-document .rw-result-actions button {
    min-height: 36px;
    font-size: 20px;
  }
  .economy-document.rewards-document .rw-reveal-quality {
    font-size: 20px;
  }
}
.court-nameplate.player-offline {
  color: #ff8a81 !important;
}
.court-nameplate.player-offline::after {
  content: " \25c7  \79bb\7ebf";
  font-size: .7em;
  color: #ff8a81;
}
.cosmetic-avatar-colors {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.cosmetic-avatar-colors h4 {
  width: 100%;
}
.game-modal-layer:has(.economy-document) {
  padding: 8px;
  overflow: hidden;
}
.economy-items {
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
}
.economy-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px;
  border: 2px solid #ac9e78;
  background: #c6b994;
  text-align: center;
  min-width: 0;
}
.economy-item > span:first-child {
  flex: initial;
  min-width: 0;
}
.economy-item-name {
  min-height: 24px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.economy-item-quality {
  font-size: 14px;
  opacity: .8;
}
.economy-item-art {
  height: 72px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.economy-item-art > img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
}
.economy-item-art .wardrobe-part-art {
  width: 64px;
  height: 64px;
}
.economy-item-art .wardrobe-part-art canvas {
  width: 64px;
  height: 64px;
}
.economy-item .avalon-button {
  margin-top: auto;
  min-height: 34px;
  font-size: 15px;
  padding: 3px 6px;
}
.wardrobe-dye-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.wardrobe-dye-controls label {
  display: flex;
  align-items: center;
  gap: 6px;
}
.wardrobe-dye-controls input {
  width: 48px;
  height: 36px;
}
.cosmetic-nameplate-name {
  width: 51%;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: anywhere;
  line-height: 1.1;
}
.cosmetic-nameplate-name[data-long=true] {
  font-size: 16px;
}
.cosmetic-nameplate-plain .cosmetic-nameplate-name {
  width: 80%;
}
.menu-profile-plate:has(.cosmetic-nameplate-name[data-long=true]) {
  min-width: min(300px, 42vw);
}
@media (max-height: 600px) {
  .cosmetic-nameplate-name[data-long=true] {
    font-size: 12px;
  }
  .menu-profile-plate .cosmetic-nameplate-name[data-long=true] {
    font-size: 12px;
  }
  .menu-profile-plate:has(.cosmetic-nameplate-name[data-long=true]) {
    min-width: min(288px, 40vw);
  }
}
.economy-document.rewards-document {
  margin: auto;
  min-width: 0;
  font-family: AvalonPixel, monospace;
}
.economy-document.rewards-document .rw-result-stage {
  flex-basis: 0;
  width: 100%;
  min-width: 0;
}
.economy-document.rewards-document .rw-result-seal {
  position: absolute;
}
.economy-document.rewards-document .rw-result-display {
  padding: 0;
  overflow: hidden;
}
.economy-document.rewards-document .rw-result-display .cosmetic-character-render {
  width: 192px;
  height: 192px;
}
.economy-document.rewards-document .rw-result-display .cosmetic-character-render canvas {
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
}
.economy-document.rewards-document .rw-result-actions .avalon-button {
  background: #292721;
  color: #ece8d8;
  border: 3px double #aaa99a;
  box-shadow: inset 0 0 0 2px #171713;
  font-family: AvalonPixel, monospace;
}
@media (max-height: 600px) {
  .economy-document.rewards-document .rw-result-stage {
    grid-template-columns: minmax(0, 40%) minmax(0, 1fr);
    grid-template-rows: 24px 30px minmax(0, 1fr) 44px;
  }
  .economy-document.rewards-document .rw-result-display .cosmetic-character-render {
    width: 192px;
    height: 192px;
  }
  .economy-document.rewards-document .rw-result-actions {
    margin: 0;
    min-width: 0;
  }
  .economy-document.rewards-document .rw-result-actions button {
    padding: 4px 14px;
  }
}
.economy-actions {
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  flex-shrink: 0;
}
.economy-actions > .avalon-button {
  margin: 0;
  width: 190px;
}
.economy-document > .avalon-button {
  margin-left: auto;
  margin-right: 0;
}
.economy-item-fit {
  font-size: 13px;
}
.economy-receipt {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 8px;
  border-bottom: 1px solid #a99b76;
}
.economy-receipt .avalon-button {
  margin: 0;
}
.economy-document .rw-result-display .wardrobe-part-art {
  width: 160px;
  height: 160px;
}
.economy-document .rw-result-display .wardrobe-part-art canvas {
  width: 100%;
  height: 100%;
}
.wardrobe-basic-heads,
.wardrobe-basic-skin {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  margin-top: 0;
}
.wardrobe-basic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 8px;
  width: 100%;
}
.cosmetics-document.desktop-wardrobe .wardrobe-basic-card.avalon-button {
  height: 94px;
  min-height: 94px;
  grid-template-rows: 64px minmax(18px, auto);
  padding: 4px;
}
@media (max-height: 600px) {
  .wardrobe-basic-heads,
  .wardrobe-basic-skin {
    grid-column: 1/-1;
  }
  .wardrobe-basic-grid {
    grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
    gap: 6px;
  }
  .cosmetics-document.desktop-wardrobe .wardrobe-basic-card.avalon-button {
    height: 76px;
    min-height: 76px;
    grid-template-rows: 48px minmax(18px, auto);
  }
}
.cosmetics-document.desktop-wardrobe .wardrobe-basic-skin > .avalon-button.small {
  width: auto;
  min-width: 168px;
  align-self: flex-start;
  padding-left: 12px;
  padding-right: 12px;
  white-space: nowrap;
}
.account-panel.avalon-document .account-form {
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  text-align: left;
}
.account-panel.avalon-document .account-field {
  min-width: 0;
  text-align: left;
  font-size: 20px;
  line-height: 1.35;
  gap: 8px;
}
.account-panel.avalon-document .account-form .avalon-input {
  font-size: 20px;
  min-height: 46px;
  text-align: left;
}
.account-panel.avalon-document .account-form .avalon-paired {
  grid-column: 1;
  margin-top: 6px;
}
.game-document.economy-document.gift-welcome {
  align-items: center;
  justify-content: center;
  gap: 18px;
  text-align: center;
  padding: 28px;
}
.gift-welcome > .document-title {
  border: 0;
  padding: 0;
  margin: 0;
  font-size: clamp(24px, 3vw, 36px);
  text-align: center;
}
.gift-welcome .gift-chest {
  width: 224px;
  height: 224px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  animation: gift-arrive .4s ease-out both;
}
.gift-welcome .gift-chest .rw-chest {
  width: 224px;
  height: 224px;
}
.gift-welcome > .gift-count {
  font-size: 32px;
  line-height: 1;
  margin: 0;
}
.game-document.gift-welcome > .avalon-button {
  align-self: center;
  margin: 0;
  width: 240px;
  min-height: 52px;
  font-size: 24px;
}
.gift-welcome .account-message:empty {
  display: none;
}
@keyframes gift-arrive {
  from {
    transform: translateY(18px) scale(.72);
    opacity: 0;
  }
  65% {
    transform: translateY(-5px) scale(1.05);
    opacity: 1;
  }
  to {
    transform: none;
    opacity: 1;
  }
}
.game-document.economy-document.rewards-document {
  padding: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
  gap: 0;
}
.game-document.economy-document.rewards-document::before {
  display: none;
}
.economy-document.rewards-document .rw-reveal {
  padding: 0;
  border: 0;
  width: 100%;
}
.economy-document.rewards-document .rw-reveal .rw-feature-art {
  position: absolute;
  inset: 0;
  overflow: visible;
  margin: 0;
  padding: 0;
}
.economy-document.rewards-document .rw-original-chest {
  --reward-chest-width:min(440px,62vw,80dvh);
  width: var(--reward-chest-width);
  bottom: auto;
  top: 50%;
  margin-top: calc(var(--reward-chest-width) * -.47727);
}
.economy-document.rewards-document .rw-suspense-prompt,
.economy-document.rewards-document .rw-reveal-quality {
  display: none;
}
.economy-document.rewards-document .rw-result-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  gap: 14px;
  border: 0;
  box-shadow: none;
}
.economy-document.rewards-document .rw-result-quality {
  font-size: 20px;
  margin: 0;
}
.economy-document.rewards-document .rw-result-display {
  flex: 0 1 220px;
  width: min(520px, 90%);
  height: 220px;
  max-height: 40dvh;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.economy-document.rewards-document .rw-result-display > .dynamic-nameplate {
  width: min(100%, calc(32dvh * 3.3));
  height: auto;
  aspect-ratio: 3.3;
}
.economy-document.rewards-document .rw-result-display > img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.economy-document.rewards-document .rw-result-title {
  font-size: 30px;
  line-height: 1.2;
  margin: 0;
}
.economy-document.rewards-document .rw-result-description {
  font-size: 20px;
  margin: 0;
}
.economy-document.rewards-document .rw-result-actions {
  display: flex;
  justify-content: center;
  align-self: center;
  margin: 8px 0 0;
  width: auto;
}
.economy-document.rewards-document .rw-result-actions button {
  width: 240px;
  min-height: 52px;
  font-size: 24px;
  margin: 0;
  padding: 8px 20px;
}
.economy-document.rewards-document .rw-emerging-reward .dynamic-nameplate {
  width: 100%;
  height: auto;
  aspect-ratio: 3.3;
}
@media (max-height: 600px) {
  .account-panel.avalon-document .account-field {
    font-size: 18px;
  }
  .account-panel.avalon-document .account-form {
    gap: 12px;
  }
  .game-document.economy-document.gift-welcome {
    gap: 8px;
    padding: 14px;
  }
  .gift-welcome .gift-chest,
  .gift-welcome .gift-chest .rw-chest {
    width: 144px;
    height: 144px;
  }
  .gift-welcome > .gift-count {
    font-size: 24px;
  }
  .game-document.gift-welcome > .avalon-button {
    min-height: 44px;
    font-size: 22px;
  }
  .economy-document.rewards-document .rw-result-stage {
    gap: 8px;
    padding: 12px;
  }
  .economy-document.rewards-document .rw-result-display {
    flex-basis: 140px;
    max-height: 40dvh;
  }
  .economy-document.rewards-document .rw-result-title {
    font-size: 24px;
  }
  .economy-document.rewards-document .rw-result-quality,
  .economy-document.rewards-document .rw-result-description {
    font-size: 18px;
  }
  .economy-document.rewards-document .rw-result-actions button {
    min-height: 44px;
    font-size: 22px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .gift-welcome .gift-chest {
    animation: none;
  }
}
.game-document.economy-document.gift-welcome.v4-gift {
  height: auto;
  min-height: 0;
  max-height: calc(100dvh - 32px);
  padding-block: 24px 26px;
  gap: 12px;
}
.game-document.economy-document.gift-welcome.v4-gift .gift-chest.v4-altar-stage {
  height: 158px;
  flex-basis: auto;
  padding-bottom: 10px;
}
.gift-welcome.v4-gift > .document-title {
  font-size: clamp(24px, 2.6vw, 34px);
  line-height: 1.25;
}
@media (max-height: 600px) {
  .game-document.economy-document.gift-welcome.v4-gift {
    max-height: calc(100dvh - 20px);
    padding-block: 12px 14px;
    gap: 7px;
  }
  .game-document.economy-document.gift-welcome.v4-gift .gift-chest.v4-altar-stage {
    height: 106px;
    padding-bottom: 5px;
  }
  .game-document.economy-document.gift-welcome.v4-gift .treasury-chest {
    width: 168px !important;
    height: 96px !important;
  }
  .game-document.economy-document.gift-welcome.v4-gift .v4-altar-ring {
    width: 182px;
    height: 42px;
  }
  .gift-welcome.v4-gift > .document-title {
    font-size: clamp(20px, 3.2vw, 27px);
  }
  .game-document.economy-document.gift-welcome.v4-gift > .gift-count {
    font-size: 22px;
    padding-block: 3px;
  }
  .game-document.economy-document.gift-welcome.v4-gift > .avalon-button {
    min-height: 46px;
    font-size: 20px;
  }
}

/* web/src/cosmetics.css */
.game-modal-layer:has(.cosmetics-document) {
  padding: 24px;
  overflow: hidden;
  align-items: center;
}
.cosmetics-document.desktop-wardrobe {
  --ui-unit:1px;
  --card:#beb08e;
  --selected:#d8caab;
  --edge:#a59779;
  --focus:#655a43;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: 56px 52px minmax(0, 1fr) 64px;
  gap: 0;
  width: min(1200px, calc(100vw - 48px));
  height: min(760px, calc(100dvh - 48px));
  max-width: none !important;
  max-height: none;
  min-height: 0;
  padding: 0 24px;
  background: #c7b99a radial-gradient(#b9ab8c .55px, transparent .75px);
  background-size: 7px 9px;
  border: 4px solid #51483b;
  border-radius: 0;
  box-shadow: inset 0 0 0 3px #b2a484, 3px 4px 0 #0007;
  color: #493e30;
  overflow: hidden;
  position: relative;
  font-size: 12px;
  line-height: 1.5;
}
.cosmetics-document.desktop-wardrobe h3,
.cosmetics-document.desktop-wardrobe h4,
.cosmetics-document.desktop-wardrobe p {
  margin: 0;
}
.cosmetics-document.desktop-wardrobe > .document-title {
  position: absolute;
  top: 12px;
  left: 24px;
  font-size: 24px;
  line-height: 32px;
  padding: 0;
  margin: 0;
  border: 0;
  text-align: left;
}
.cosmetics-document > .document-close {
  top: 6px;
  right: 24px;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  font-size: 24px;
}
.cosmetics-document .avalon-button.small {
  width: 72px;
  min-width: 72px;
  min-height: 36px;
  height: 36px;
  padding: 4px;
  font-size: 12px;
  line-height: 20px;
  white-space: normal;
}
.cosmetics-tabs {
  grid-row: 2;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 8px;
  padding: 0;
  border-block: 1px solid var(--edge);
}
.cosmetics-content {
  grid-row: 3;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  padding: 16px 0;
}
.cosmetics-footer {
  grid-row: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--edge);
}
.cosmetics-feedback {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}
.cosmetics-dirty {
  font-size: 12px;
  white-space: nowrap;
}
.cosmetics-feedback > .cosmetics-status {
  min-width: 0;
  margin: 0;
  font-size: 12px;
  line-height: 16px;
  color: #743c33;
  white-space: normal;
  overflow-wrap: anywhere;
}
.cosmetics-status:empty {
  display: none;
}
.cosmetics-feedback:has(.cosmetics-status:not(:empty)) .cosmetics-dirty {
  display: none;
}
.cosmetics-footer > .avalon-paired {
  display: grid;
  grid-template-columns: 172px 172px;
  gap: 16px;
  width: auto;
  margin: 0;
  padding: 0;
  flex-shrink: 0;
}
.cosmetics-footer .avalon-paired > .avalon-button {
  width: 172px;
  min-width: 0;
  height: 44px;
  min-height: 44px;
  padding: 4px 12px;
  font-size: 24px;
}
.cosmetics-document .avalon-input {
  color: #342c24;
  background: #e1d5b9;
  border: 1px solid #8c8066;
  border-radius: 0;
  min-width: 0;
  padding: 4px 8px;
  font-size: 12px;
  box-shadow: none;
  letter-spacing: 0;
}
.cosmetics-document .avalon-input:focus-visible {
  outline: 2px solid #655a43;
  outline-offset: 1px;
}
.wardrobe-workspace {
  height: 100%;
  display: grid;
  grid-template-columns: 400px minmax(0, 1fr);
  gap: 24px;
  min-height: 0;
}
.wardrobe-preview {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-width: 0;
  min-height: 0;
  padding-right: 24px;
  border-right: 1px solid var(--edge);
}
.wardrobe-person-heading {
  flex: none;
  width: 100%;
}
.wardrobe-equipment-stage {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 56px;
  gap: 4px;
  align-items: center;
  flex: 1;
  min-height: 0;
}
.equipment-column {
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: center;
}
.cosmetics-document .equipment-slot.avalon-button {
  position: relative;
  width: 56px;
  min-width: 56px;
  height: 62px;
  min-height: 62px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2px;
  gap: 0;
}
.equipment-slot canvas {
  width: 36px;
  height: 36px;
}
.equipment-empty {
  height: 36px;
  line-height: 36px;
  color: #82745b;
}
.equipment-label {
  font-size: 12px;
  line-height: 16px;
}
.equipment-count {
  position: absolute;
  right: 2px;
  top: 0;
  background: #493e30;
  color: #f4e9d1;
  padding: 0 3px;
  font-size: 10px;
  line-height: 14px;
}
.wardrobe-walk-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: none;
  min-width: 0;
  height: 100%;
  outline: none;
}
.wardrobe-walk-preview:focus,
.wardrobe-walk-preview:focus-visible {
  outline: none;
  box-shadow: none;
}
.wardrobe-walk-preview canvas {
  width: 256px;
  height: 256px;
  max-width: none;
  image-rendering: pixelated;
  object-fit: contain;
}
.wardrobe-preview-hint {
  text-align: center;
  color: #6f6149;
  font-size: 12px;
  line-height: 24px;
  margin-top: 8px !important;
}
.wardrobe-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}
.wardrobe-categories,
.wardrobe-subcategories {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
  overflow: auto;
  scrollbar-width: thin;
  padding-bottom: 2px;
}
.wardrobe-subcategories[hidden] {
  display: none;
}
.wardrobe-categories > .avalon-button {
  flex-shrink: 0;
}
.wardrobe-muted {
  font-size: 12px;
  color: #6b5e48;
  line-height: 20px;
}
.wardrobe-list-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.wardrobe-list-heading h3 {
  font-size: 18px;
  line-height: 28px;
}
.wardrobe-count {
  font-size: 12px;
  white-space: nowrap;
  color: #675b47;
}
.wardrobe-search {
  margin-left: auto;
  width: 160px;
  height: 32px !important;
  min-height: 32px !important;
}
.wardrobe-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-content: start;
  gap: 8px;
  flex: 1;
  min-height: 80px;
  overflow: auto;
  scrollbar-width: thin;
  padding: 2px 4px 4px 2px;
}
.cosmetics-document .appearance-option.avalon-button {
  background: var(--card);
  color: #493e30;
  border: 2px solid var(--edge);
  box-shadow: none;
  border-radius: 0;
  text-shadow: none;
  letter-spacing: 0;
  transition: none;
}
.cosmetics-document .appearance-option.avalon-button::before,
.cosmetics-document .appearance-option.avalon-button::after {
  display: none;
}
@media (hover: hover) and (pointer: fine) {
  .cosmetics-document .appearance-option.avalon-button:hover {
    background: #d0c19e;
    border-color: #8d7e61;
  }
}
.cosmetics-document .appearance-option.avalon-button[aria-pressed=true],
.cosmetics-document .appearance-option.avalon-button[aria-checked=true] {
  background: var(--selected);
  border-color: var(--focus);
}
.cosmetics-document .appearance-option.avalon-button:focus-visible {
  outline: 2px solid #493e30;
  outline-offset: -4px;
}
.cosmetics-document .wardrobe-item.avalon-button {
  width: 100%;
  min-width: 0;
  height: 112px;
  min-height: 112px;
  padding: 6px;
  display: grid;
  grid-template-rows: 64px 18px 14px;
  align-items: center;
  justify-items: center;
  gap: 0;
}
.wardrobe-item-picture {
  height: 64px;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}
.wardrobe-item-picture canvas {
  width: 64px;
  height: 64px;
  image-rendering: pixelated;
  object-fit: contain;
}
.wardrobe-item-name {
  font-size: 12px;
  line-height: 18px;
  white-space: normal;
  overflow-wrap: anywhere;
}
.wardrobe-item-count {
  font-size: 12px;
  line-height: 14px;
  color: #675b47;
}
.wardrobe-sets {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.cosmetics-document .wardrobe-sets .wardrobe-item {
  height: 144px;
  grid-template-rows: 96px 18px 14px;
}
.wardrobe-sets .wardrobe-item-picture,
.wardrobe-sets .wardrobe-item-picture canvas {
  height: 96px;
  width: 96px;
}
.wardrobe-part-art {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
}
.wardrobe-part-art canvas {
  image-rendering: pixelated;
  object-fit: contain;
}
.wardrobe-detail {
  flex-shrink: 0;
  border-top: 1px solid var(--edge);
  padding-top: 8px;
  max-height: 44%;
  overflow: auto;
  scrollbar-width: thin;
}
.wardrobe-detail:empty {
  display: none;
}
.wardrobe-detail-heading {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}
.wardrobe-detail-heading h4 {
  font-size: 12px;
  overflow-wrap: anywhere;
  margin-right: auto !important;
}
.wardrobe-swatches {
  display: flex;
  gap: 6px;
  overflow: auto;
  padding: 2px;
  margin-bottom: 6px;
}
.cosmetics-document .wardrobe-swatch.avalon-button {
  width: 32px;
  min-width: 32px;
  height: 32px;
  min-height: 32px;
  position: relative;
  padding: 5px;
  background: #beb08e;
  border: 2px solid #a59779;
  box-shadow: none;
}
.wardrobe-swatch::before {
  content: "" !important;
  display: block !important;
  position: static !important;
  width: 100% !important;
  height: 100% !important;
  background: var(--swatch) !important;
  border: 0 !important;
}
.cosmetics-document .wardrobe-swatch[aria-pressed=true] {
  border-color: #493e30;
  outline: 1px solid #493e30;
  outline-offset: 1px;
}
.wardrobe-swatch::after {
  display: none !important;
}
.wardrobe-dyes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  align-items: center;
}
.wardrobe-dye-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}
.wardrobe-dye-row input[type=color] {
  width: 36px;
  height: 32px;
  padding: 2px;
  border: 1px solid #8c8066;
  background: #e1d5b9;
  cursor: pointer;
}
.cosmetics-document .wardrobe-hex.avalon-input {
  width: 82px;
  height: 32px;
  min-height: 32px;
  font-family: monospace;
  font-size: 12px;
  text-align: left;
}
.wardrobe-stack {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.wardrobe-stack-row {
  display: flex;
  align-items: center;
  gap: 4px;
}
.wardrobe-stack-row .wardrobe-part-art canvas {
  width: 32px;
  height: 32px;
}
.wardrobe-stack-row > span {
  flex: 1;
  font-size: 12px;
}
.cosmetics-document .wardrobe-stack-row .avalon-button {
  width: 44px;
  min-width: 44px;
  height: 32px;
  min-height: 32px;
}
.wardrobe-empty {
  grid-column: 1/-1;
  padding: 20px 12px;
  text-align: center;
}
.wardrobe-empty p {
  margin-top: 8px !important;
}
.wardrobe-empty h3 {
  font-size: 18px;
}
.wardrobe-basics {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  overflow: auto;
  padding: 8px 16px 12px 0;
  min-height: 0;
}
.wardrobe-basics > h3 {
  font-size: 24px;
  line-height: 32px;
}
.wardrobe-name-field {
  width: min(100%, 440px);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.wardrobe-name-field .avalon-input {
  font-size: 24px;
  height: 48px;
  min-height: 48px;
  width: 100%;
  text-align: left;
}
.wardrobe-body-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.wardrobe-body-choices {
  display: flex;
  gap: 12px;
}
.cosmetics-document .wardrobe-body-choice.avalon-button {
  width: 112px;
  height: 132px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
}
.wardrobe-body-choice canvas {
  width: 96px;
  height: 96px;
}
.cosmetics-public-card {
  width: min(520px, 92vw) !important;
  display: flex !important;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
}
.cosmetics-public-card > .cosmetic-character-render {
  align-self: center;
}
.cosmetics-public-card > .cosmetic-character-render canvas {
  width: 256px;
  height: 256px;
}
.cosmetics-public-card > p {
  text-align: center;
}
.cosmetics-public-card > .avalon-button {
  align-self: center;
}
.cosmetics-public-card > .avalon-paired {
  display: grid;
  grid-template-columns: 172px 172px;
  justify-content: center;
  gap: 16px;
  width: 100%;
  padding: 0;
  margin: 0;
}
.cosmetics-public-card > .avalon-paired > .avalon-button {
  width: 172px;
  min-width: 0;
  height: 42px;
  min-height: 42px;
  font-size: 24px;
}
.court-labels button.court-nameplate.cosmetics-world-nameplate {
  width: 132px;
  height: 40px;
  min-width: 132px;
  min-height: 40px;
  max-width: 132px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(
      180deg,
      rgba(23, 20, 27, .92),
      rgba(14, 12, 19, .96));
  border: 1.5px solid rgba(216, 176, 96, .82);
  border-radius: 5px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .72);
  padding: 0;
  overflow: hidden;
  color: #fff !important;
  text-shadow: 1px 1px 2px #17120e, 0 0 3px #17120e;
}
.court-labels button.court-nameplate.cosmetics-world-nameplate .court-label-name {
  color: #fff !important;
  line-height: 20px;
  max-width: 110px;
}
.court-labels button.court-nameplate.cosmetics-plain-name {
  width: auto;
  height: auto;
  min-width: 0;
  min-height: 0;
  max-width: 180px;
  padding: 3px 9px;
  border: 1.5px solid rgba(216, 176, 96, .78);
  border-radius: 5px;
  background:
    linear-gradient(
      180deg,
      rgba(23, 20, 27, .92),
      rgba(14, 12, 19, .96));
  box-shadow: 0 2px 6px rgba(0, 0, 0, .72);
  color: #fff4dc;
  text-shadow: 1px 1px 2px #17120e, 0 0 3px #17120e;
  font-size: 16px;
  line-height: 22px;
  opacity: 1;
}
.court-labels button.court-nameplate.cosmetics-plain-name .court-label-name {
  font-size: 16px;
  line-height: 22px;
  max-width: 100%;
  overflow-wrap: anywhere;
  white-space: nowrap;
}
@media (max-width: 1100px) {
  .wardrobe-workspace {
    grid-template-columns: 288px minmax(0, 1fr);
    gap: 16px;
  }
  .wardrobe-preview {
    padding-right: 16px;
  }
  .wardrobe-equipment-stage {
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    gap: 0;
  }
  .cosmetics-document .equipment-slot.avalon-button {
    width: 44px;
    min-width: 44px;
    height: 54px;
    min-height: 54px;
  }
  .equipment-slot canvas {
    width: 32px;
    height: 32px;
  }
  .wardrobe-walk-preview canvas {
    width: 160px;
    height: 160px;
  }
  .wardrobe-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .wardrobe-categories .avalon-button.small {
    width: 60px;
    min-width: 60px;
  }
  .cosmetics-document.desktop-wardrobe {
    padding: 0 16px;
  }
}
@media (max-height: 600px) {
  .game-modal-layer:has(.cosmetics-document) {
    padding: 0;
  }
  .cosmetics-document.desktop-wardrobe {
    width: 100vw;
    height: 100dvh;
    padding: 0 12px;
    border-width: 2px;
    grid-template-rows: 40px 40px minmax(0, 1fr) 48px;
  }
  .cosmetics-document.desktop-wardrobe > .document-title {
    font-size: 18px;
    line-height: 28px;
    top: 6px;
    left: 12px;
  }
  .cosmetics-document > .document-close {
    width: 36px;
    height: 32px;
    min-width: 36px;
    min-height: 32px;
    top: 4px;
    right: 12px;
  }
  .cosmetics-document .avalon-button.small {
    height: 32px;
    min-height: 32px;
  }
  .cosmetics-tabs {
    gap: 8px;
  }
  .cosmetics-content {
    padding: 8px 0;
  }
  .wardrobe-workspace {
    grid-template-columns: 224px minmax(0, 1fr);
    gap: 12px;
  }
  .wardrobe-preview {
    padding-right: 12px;
  }
  .wardrobe-equipment-stage {
    grid-template-columns: 36px minmax(0, 1fr) 36px;
  }
  .equipment-column {
    gap: 4px;
  }
  .cosmetics-document .equipment-slot.avalon-button {
    width: 36px;
    min-width: 36px;
    height: 38px;
    min-height: 38px;
    padding: 0;
  }
  .equipment-slot canvas {
    width: 22px;
    height: 22px;
  }
  .equipment-empty {
    height: 22px;
    line-height: 22px;
  }
  .equipment-label {
    font-size: 10px;
    line-height: 12px;
  }
  .wardrobe-walk-preview canvas {
    width: 128px;
    height: 128px;
  }
  .wardrobe-preview-hint {
    margin-top: 0 !important;
    line-height: 18px;
    font-size: 10px;
  }
  .wardrobe-controls {
    overflow: auto;
    gap: 6px;
    scrollbar-width: thin;
  }
  .wardrobe-categories {
    scrollbar-width: none;
  }
  .wardrobe-categories .avalon-button.small {
    width: 56px;
    min-width: 56px;
  }
  .wardrobe-list-heading h3 {
    font-size: 12px;
    line-height: 20px;
  }
  .wardrobe-search {
    width: 128px;
    height: 28px !important;
    min-height: 28px !important;
  }
  .wardrobe-grid {
    flex: 1 0 100px;
    min-height: 100px;
    max-height: 160px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
  }
  .cosmetics-document .wardrobe-item.avalon-button {
    height: 88px;
    min-height: 88px;
    grid-template-rows: 48px 18px 14px;
    padding: 2px;
  }
  .wardrobe-item-picture,
  .wardrobe-item-picture canvas {
    width: 48px;
    height: 48px;
  }
  .cosmetics-document .wardrobe-sets .wardrobe-item {
    height: 104px;
    min-height: 104px;
    grid-template-rows: 64px 18px 14px;
  }
  .wardrobe-sets .wardrobe-item-picture,
  .wardrobe-sets .wardrobe-item-picture canvas {
    width: 64px;
    height: 64px;
  }
  .wardrobe-sets {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  .wardrobe-detail {
    max-height: none;
    overflow: visible;
    padding-top: 4px;
  }
  .wardrobe-detail-heading {
    gap: 4px;
    margin-bottom: 4px;
  }
  .wardrobe-detail-heading .avalon-button.small {
    width: 56px;
    min-width: 56px;
  }
  .wardrobe-swatches {
    margin-bottom: 4px;
  }
  .cosmetics-footer > .avalon-paired {
    grid-template-columns: 88px 88px;
    gap: 12px;
  }
  .cosmetics-footer .avalon-paired > .avalon-button {
    width: 88px;
    height: 36px;
    min-height: 36px;
    font-size: 12px;
    padding: 4px;
  }
  .cosmetics-feedback {
    gap: 8px;
  }
  .wardrobe-basics {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 168px;
    align-content: start;
    align-items: start;
    gap: 8px 12px;
    padding: 0;
  }
  .wardrobe-basics > h3 {
    grid-column: 1/-1;
    font-size: 18px;
    line-height: 24px;
  }
  .wardrobe-basics > p {
    grid-column: 1/-1;
    font-size: 12px;
    line-height: 16px;
  }
  .wardrobe-name-field {
    grid-column: 1;
    grid-row: 3;
    gap: 4px;
  }
  .wardrobe-name-field .avalon-input {
    height: 36px;
    min-height: 36px;
    font-size: 18px;
  }
  .wardrobe-body-section {
    grid-column: 2;
    grid-row: 3/5;
    gap: 4px;
  }
  .wardrobe-body-choices {
    gap: 8px;
  }
  .cosmetics-document .wardrobe-body-choice.avalon-button {
    width: 80px;
    min-width: 80px;
    height: 88px;
  }
  .wardrobe-body-choice canvas {
    width: 64px;
    height: 64px;
  }
  .wardrobe-body-section > p {
    font-size: 10px;
    line-height: 14px;
  }
  .wardrobe-basics > button {
    grid-column: 1;
    grid-row: 4;
  }
  .wardrobe-card-mode {
    overflow: hidden;
  }
  .cosmetics-public-card {
    max-height: calc(100dvh - 12px) !important;
    overflow: auto;
  }
  .cosmetics-public-card > .cosmetic-character-render canvas {
    width: 128px;
    height: 128px;
  }
  .cosmetics-public-card > .cosmetic-nameplate {
    width: 264px;
  }
  .cosmetics-public-card > .avalon-paired > .avalon-button {
    font-size: 12px;
    height: 36px;
    min-height: 36px;
  }
}
@media (max-width: 740px) and (max-height: 600px) {
  .wardrobe-workspace {
    grid-template-columns: 192px minmax(0, 1fr);
    gap: 8px;
  }
  .wardrobe-preview {
    padding-right: 8px;
  }
  .wardrobe-walk-preview canvas {
    width: 112px;
    height: 112px;
  }
  .wardrobe-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .wardrobe-sets {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .wardrobe-basics {
    grid-template-columns: minmax(0, 1fr) 144px;
    gap: 8px;
  }
  .cosmetics-document .wardrobe-body-choice.avalon-button {
    width: 68px;
    min-width: 68px;
  }
  .wardrobe-body-choices {
    gap: 8px;
  }
  .cosmetic-avatar-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .wardrobe-stack-row {
    flex-wrap: wrap;
  }
}
.equipment-column {
  height: 100%;
  max-height: 300px;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  justify-content: flex-start;
  padding-block: 2px;
}
.cosmetics-document .equipment-slot.avalon-button {
  flex-shrink: 0;
  height: 54px;
  min-height: 54px;
}
.equipment-column {
  align-self: center;
  gap: 6px;
}
@media (max-height: 600px) {
  .equipment-column {
    max-height: 100%;
    gap: 4px;
    padding: 0;
  }
  .cosmetics-document .equipment-slot.avalon-button {
    height: 38px;
    min-height: 38px;
  }
}
.wardrobe-swatch::before,
.wardrobe-swatch::after {
  display: none !important;
}
.wardrobe-swatch-fill {
  display: block;
  width: 18px;
  height: 18px;
  background: var(--swatch);
  border: 1px solid #493e3066;
  flex-shrink: 0;
}
.cosmetic-character-render canvas {
  image-rendering: pixelated;
  object-fit: contain;
}
.wardrobe-layering-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  font-size: 12px;
}
.cosmetics-document .wardrobe-layering-toggle > .identity-rule-toggle.avalon-button {
  width: 172px;
  min-width: 172px;
  height: 42px;
  min-height: 42px;
  gap: 14px;
}
.wardrobe-layering-toggle .wardrobe-muted {
  margin-left: auto;
}
.cosmetics-document .equipment-column .equipment-slot.avalon-button {
  width: 100%;
  min-width: 0;
}
.equipment-column {
  scrollbar-width: thin;
  scrollbar-gutter: auto;
}
@media (max-height: 600px) {
  .cosmetics-public-card {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 128px;
    gap: 8px !important;
    padding: 16px !important;
  }
  .cosmetics-public-card > .document-title {
    grid-column: 1/-1;
    margin: 0 !important;
    padding: 0 44px 8px !important;
    font-size: 20px !important;
    line-height: 28px !important;
  }
  .cosmetics-public-card > .cosmetic-nameplate {
    grid-column: 1;
    grid-row: 2;
    width: min(264px, 100%);
  }
  .cosmetics-public-card > .cosmetic-character-render {
    grid-column: 2;
    grid-row: 2/5;
    justify-self: center;
  }
  .cosmetics-public-card > p {
    grid-column: 1;
    grid-row: 3;
    margin: 0 !important;
  }
  .cosmetics-public-card > .avalon-button:not(.document-close) {
    grid-column: 1;
    grid-row: 4;
    justify-self: center;
    width: 128px !important;
    min-width: 0 !important;
    height: 32px !important;
    min-height: 32px !important;
    font-size: 12px !important;
  }
  .cosmetics-public-card > .avalon-paired {
    grid-column: 1/-1;
    grid-row: 5;
    grid-template-columns: 128px 128px;
    gap: 12px;
  }
  .cosmetics-public-card > .avalon-paired > .avalon-button {
    width: 128px;
  }
  .cosmetics-public-card > .document-close {
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    font-size: 18px;
  }
}
.cosmetics-document.desktop-wardrobe > .document-title {
  left: 76px;
  right: 76px;
  text-align: center;
}
.cosmetics-document .cosmetics-dirty {
  display: none !important;
}
.cosmetics-footer > .cosmetics-restore.avalon-button {
  width: 172px;
  min-width: 172px;
  height: 44px;
  min-height: 44px;
  font-size: 24px;
  padding: 4px 12px;
}
.wardrobe-dye-locked {
  font-size: 12px;
  color: #685b46;
  margin-top: 8px !important;
}
#game[data-stage=menu] .game-toolbar .menu-profile-plate.avalon-button {
  width: calc(211.2 * var(--menu-unit));
  min-width: 0;
  padding: 2px;
  display: block;
  letter-spacing: 0;
}
.menu-profile-plate .cosmetic-nameplate {
  height: 100%;
  width: 100%;
  aspect-ratio: auto;
}
.menu-profile-plate .cosmetic-nameplate-name {
  font-size: calc(20 * var(--menu-unit));
}
.menu-profile-plate::before,
.menu-profile-plate::after {
  display: none !important;
}
.game-toolbar .appearance-tuning-trigger.avalon-button {
  width: 88px !important;
  min-width: 88px !important;
  font-size: 12px !important;
  padding: 4px !important;
}
.appearance-tuning-panel {
  position: fixed;
  z-index: 80;
  right: 20px;
  top: 86px;
  width: 308px;
  max-width: calc(100vw - 32px);
  padding: 16px;
  box-sizing: border-box;
  background: #c7b99a;
  color: #493e30;
  border: 3px solid #51483b;
  box-shadow: inset 0 0 0 2px #b2a484;
  font-size: 12px;
  max-height: calc(100dvh - 96px);
  overflow: auto;
}
.appearance-tuning-panel h2 {
  font-size: 18px;
  line-height: 28px;
  margin: 0 36px 12px 0;
}
.appearance-tuning-panel .avalon-button.small {
  width: 100px;
  min-width: 0;
  min-height: 32px;
  height: 32px;
  font-size: 12px;
  padding: 4px;
}
.appearance-tuning-panel .tuning-close {
  position: absolute;
  right: 8px;
  top: 8px;
  width: 28px !important;
  min-width: 28px !important;
  height: 28px !important;
  min-height: 28px !important;
}
.tuning-field {
  display: grid;
  grid-template-columns: 1fr 68px 40px;
  align-items: center;
  gap: 8px;
  margin: 12px 0;
}
.tuning-field > span:first-child {
  grid-column: 1/-1;
}
.tuning-field input[type=range] {
  width: 100%;
  min-width: 0;
  accent-color: #655a43;
}
.tuning-field input[type=number] {
  width: 68px;
  min-width: 0;
  height: 30px;
  padding: 2px 6px;
  font-size: 12px;
}
.tuning-walk-toggle {
  display: flex;
  gap: 8px;
  align-items: center;
}
.tuning-hint,
.tuning-status {
  line-height: 18px;
  margin: 10px 0;
}
.appearance-tuning-panel > .avalon-paired {
  display: flex;
  gap: 8px;
  margin: 10px 0;
  padding: 0;
}
.appearance-tuning-panel > .avalon-button:last-child {
  margin-top: 2px;
}
@media (max-width: 900px) {
  #game[data-stage=menu] .game-toolbar .menu-profile-plate.avalon-button {
    width: 145.2px;
  }
  .menu-profile-plate .cosmetic-nameplate-name {
    font-size: 12px;
  }
}
@media (max-height: 600px) {
  .cosmetics-document.desktop-wardrobe > .document-title {
    left: 60px;
    right: 60px;
    text-align: center;
  }
  .cosmetics-footer > .cosmetics-restore.avalon-button {
    width: 88px;
    min-width: 88px;
    height: 36px;
    min-height: 36px;
    font-size: 12px;
    padding: 4px;
  }
  .cosmetics-footer {
    gap: 8px;
  }
  .cosmetics-feedback {
    position: absolute;
    bottom: 50px;
    left: 16px;
    right: 16px;
    pointer-events: none;
  }
  .cosmetics-status:not(:empty) {
    background: #e1d5b9;
    padding: 4px 8px;
  }
  .appearance-tuning-panel {
    top: 68px;
    right: 12px;
    width: 280px;
    max-height: calc(100dvh - 76px);
    padding: 10px;
  }
  .tuning-field {
    margin: 6px 0;
    gap: 4px;
  }
  .tuning-hint,
  .tuning-status {
    margin: 6px 0;
  }
  .appearance-tuning-panel h2 {
    margin-bottom: 6px;
  }
  #game[data-stage=menu] .game-toolbar .menu-profile-plate.avalon-button {
    width: 145.2px;
  }
  .menu-profile-plate .cosmetic-nameplate-name {
    font-size: 12px;
  }
}
.appearance-tuning-panel .tuning-field input[type=number] {
  min-height: 30px;
  height: 30px;
}
.cosmetic-nameplate-avatar {
  line-height: 0;
}
.cosmetic-nameplate-avatar img {
  display: block;
}
@media (max-height: 600px) {
  .appearance-tuning-panel .tuning-hint {
    display: none;
  }
}
.menu-profile-plate .cosmetic-nameplate-art {
  object-fit: cover;
}
.appearance-tuning-panel .tuning-walk-toggle > .identity-rule-toggle.avalon-button {
  width: 172px;
  min-width: 172px;
  height: 42px;
  min-height: 42px;
  gap: 14px;
}
.appearance-tuning-panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.appearance-tuning-panel > h2,
.appearance-tuning-panel > .tuning-walk-toggle,
.appearance-tuning-panel > .tuning-hint,
.appearance-tuning-panel > .tuning-status,
.appearance-tuning-panel > .tuning-actions {
  flex-shrink: 0;
}
.tuning-fields {
  min-height: 60px;
  overflow: auto;
  flex: 1 1 auto;
  scrollbar-width: thin;
}
.tuning-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}
.appearance-tuning-panel .tuning-actions > .avalon-button.small {
  width: 100%;
  min-width: 0;
  padding: 2px;
  font-size: 12px;
}
#game[data-stage=menu] .game-toolbar .menu-profile-plate.avalon-button:has(.cosmetic-nameplate-name[data-long=true]) {
  width: 260px;
  min-width: 260px;
}
.menu-profile-plate .cosmetic-nameplate-name[data-long=true] {
  font-size: 12px;
  line-height: 1.05;
}
.court-labels button.court-nameplate.cosmetics-world-nameplate {
  width: 172px;
  min-width: 172px;
  max-width: 172px;
  height: 52px;
  min-height: 52px;
}
.court-labels button.court-nameplate.cosmetics-world-nameplate .court-label-name {
  position: relative;
  z-index: 1;
  width: 156px;
  max-width: 156px;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: anywhere;
  font-size: 16px;
  line-height: 18px;
}
.court-labels button.court-nameplate.cosmetics-world-nameplate[data-long-name=true] .court-label-name {
  font-size: 12px;
  line-height: 14px;
}
.court-labels button.court-nameplate.player-offline .court-label-name {
  color: #ff8a81 !important;
}
.cosmetics-document :is(.cosmetics-tabs button, .cosmetic-card-categories button, .phase-two-wardrobe-slot-unread) {
  position: relative;
}
.cosmetics-document :is(.cosmetics-tabs, .cosmetic-card-categories, .phase-two-wardrobe-slot-unread) .phase-two-diamond {
  position: absolute;
  inset: 3px 4px auto auto;
}
.cosmetics-document .phase-two-wardrobe-slot-unread {
  outline: 1px solid #c89036;
  outline-offset: -2px;
}
.cosmetics-document .phase-two-wardrobe-target {
  outline: 2px solid #e4af45;
  outline-offset: -3px;
}

/* web/src/cosmetic-card.css */
.cosmetic-nameplate {
  position: relative;
  width: 100%;
  aspect-ratio: 3.3;
  min-width: 0;
  color: #fff4dc;
  isolation: isolate;
  text-shadow: 1px 1px 2px #17120e, 0 0 3px #17120e;
}
.cosmetic-nameplate-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
  z-index: -1;
}
.cosmetic-nameplate-avatar {
  position: absolute;
  left: 5%;
  top: 50%;
  transform: translateY(-50%);
  width: 18%;
  aspect-ratio: 1;
  background: transparent;
}
.cosmetic-nameplate-avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
}
.cosmetic-nameplate-name {
  position: absolute;
  left: 27.5%;
  top: 50%;
  transform: translateY(-50%);
  max-width: 51%;
  font-size: 24px;
  line-height: 1.3;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: anywhere;
  text-align: left;
}
.cosmetic-nameplate-plain {
  color: #493e30;
  text-shadow: none;
}
.cosmetic-nameplate-room .cosmetic-nameplate-name {
  left: 10%;
  max-width: 80%;
  width: 80%;
  text-align: center;
}
.cosmetic-card-editor {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  gap: 12px;
}
.cosmetic-card-categories {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.cosmetic-card-section {
  overflow: auto;
  min-height: 0;
  scrollbar-width: thin;
  padding: 2px 4px 4px 0;
}
.cosmetic-card-section > h3 {
  font-size: 18px;
  margin-bottom: 12px !important;
}
.cosmetic-avatar-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}
.cosmetic-plate-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.cosmetics-document .cosmetic-content-option.avalon-button {
  width: 100%;
  min-width: 0;
  height: auto;
  min-height: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px;
  gap: 8px;
}
.cosmetic-avatar-art {
  display: block;
  width: 64px;
  height: 64px;
  background: #b5a887;
}
.cosmetic-avatar-art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
}
.cosmetic-option-label {
  font-size: 12px;
  line-height: 18px;
  white-space: normal;
  overflow-wrap: anywhere;
}
.cosmetic-plate-art {
  display: block;
  width: 100%;
  aspect-ratio: 3.3;
}
.cosmetic-plate-art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
}
.cosmetics-public-card > .cosmetic-nameplate {
  max-width: 396px;
  margin-inline: auto;
}
.toolbar-nickname {
  overflow: visible;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.3;
}
@media (max-height: 600px) {
  .cosmetic-nameplate-name {
    font-size: 12px;
  }
  .cosmetic-card-editor {
    gap: 8px;
  }
  .cosmetic-card-section > h3 {
    font-size: 12px;
  }
  .cosmetic-avatar-grid,
  .cosmetic-plate-grid {
    gap: 8px;
  }
  .cosmetics-document .cosmetic-content-option.avalon-button {
    min-height: 80px;
    padding: 4px;
    gap: 4px;
  }
  .cosmetic-avatar-art {
    width: 48px;
    height: 48px;
  }
}

/* web/src/season-pass.css */
.avalon-button.v4-feature-entry.v6-diegetic-plaque.v4-entry-season {
  border-color: #d9aa4c !important;
  background: #0c1222 !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 243, 196, 0.38),
    inset 0 -1px 0 rgba(8, 10, 18, 0.85),
    0 6px 16px rgba(0, 0, 0, 0.58),
    0 0 0 1px #140f08 !important;
}
@media (hover: hover) and (pointer: fine) {
  .avalon-button.v4-feature-entry.v6-diegetic-plaque.v4-entry-season:hover:not(:disabled) {
    border-color: #ffe49c !important;
    box-shadow:
      inset 0 1px 0 rgba(255, 248, 214, 0.55),
      0 8px 20px rgba(217, 165, 66, 0.25),
      0 0 0 1px #1a1208 !important;
  }
}
.v5-season-plaque-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  border-radius: inherit;
}
.v5-season-plaque-bg .dynamic-nameplate,
.v5-season-plaque-bg img,
.v5-season-plaque-bg canvas {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  object-fit: cover !important;
  display: block !important;
  image-rendering: pixelated;
}
.v5-season-plaque-scrim {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(
      90deg,
      rgba(8, 12, 24, 0.92) 0%,
      rgba(11, 16, 30, 0.78) 48%,
      rgba(14, 20, 36, 0.22) 78%,
      rgba(14, 20, 36, 0.05) 100%);
}
.v4-entry-season .v4-entry-icon-wrap {
  background:
    linear-gradient(
      180deg,
      #fff1b8 0%,
      #eab646 52%,
      #b57919 100%) !important;
  box-shadow:
    inset 0 1px 0 #fffbe6,
    0 0 10px rgba(245, 188, 66, 0.35),
    0 1px 0 #0b0804 !important;
}
.v4-entry-season .v4-entry-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.v4-entry-season .v5-season-lv-pill {
  display: inline-flex;
  align-items: center;
  padding: 1px 5px;
  border-radius: 3px;
  font: 400 10.5px/1.2 AvalonPixel, monospace;
  color: #1c1204;
  background:
    linear-gradient(
      180deg,
      #ffe79e 0%,
      #dfa63b 100%);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.65);
  white-space: nowrap;
  flex: none;
}
.v4-entry-season .v5-season-mini-bar {
  width: 76%;
  height: 3px;
  margin-top: 2px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.14);
  overflow: hidden;
}
.v4-entry-season .v5-season-mini-fill {
  height: 100%;
  border-radius: inherit;
  background:
    linear-gradient(
      90deg,
      #f59e0b,
      #fde047);
  transition: width 280ms ease;
}
.v4-entry-season[data-has-claim=true] .v5-season-claim-dot {
  position: relative;
  z-index: 2;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex: none;
  background:
    radial-gradient(
      circle at 35% 35%,
      #fff7cc 0%,
      #fbbf24 55%,
      #ea580c 100%);
  box-shadow: 0 0 0 1.5px #120d06, 0 0 9px rgba(251, 191, 36, 0.95);
  animation: spPulseDot 1.8s ease-in-out infinite;
}
@keyframes spPulseDot {
  0%, 100% {
    transform: scale(1);
    opacity: 0.92;
  }
  50% {
    transform: scale(1.24);
    opacity: 1;
  }
}
.v5-toolbar-season-btn {
  position: relative;
}
.v5-toolbar-season-btn[data-has-claim=true]::after {
  content: "";
  position: absolute;
  top: 3px;
  right: 3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fbbf24;
  box-shadow: 0 0 0 1.5px #1a1208, 0 0 6px #f59e0b;
}
#modals .season-pass-document::before,
#modals .season-pass-document::after {
  content: none !important;
  display: none !important;
}
#modals .season-pass-document {
  position: relative;
  width: min(1060px, calc((100vw - 28px) / var(--v4-ui-scale, 1))) !important;
  max-width: min(1060px, calc((100vw - 28px) / var(--v4-ui-scale, 1))) !important;
  height: min(650px, calc((100dvh - 28px) / var(--v4-ui-scale, 1))) !important;
  max-height: calc((100dvh - 24px) / var(--v4-ui-scale, 1)) !important;
  min-height: min(460px, calc((100dvh - 28px) / var(--v4-ui-scale, 1))) !important;
  padding: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  box-sizing: border-box;
  border-radius: 10px !important;
  background:
    radial-gradient(
      ellipse at 82% 8%,
      rgba(245, 184, 65, 0.17) 0%,
      transparent 52%),
    radial-gradient(
      ellipse at 16% 92%,
      rgba(56, 108, 212, 0.14) 0%,
      transparent 48%),
    linear-gradient(
      180deg,
      #131b30 0%,
      #0b101e 55%,
      #090d18 100%) !important;
  border: 2px solid #cfa14b !important;
  box-shadow:
    0 0 0 1px #05070d,
    inset 0 0 0 1px rgba(255, 232, 172, 0.22),
    0 24px 64px rgba(0, 0, 0, 0.86) !important;
  color: #f5ebd2 !important;
  font-family: AvalonPixel, monospace;
}
.sp-hero-bar {
  position: relative;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 18px 12px;
  background:
    linear-gradient(
      90deg,
      rgba(212, 163, 71, 0.14) 0%,
      rgba(18, 26, 48, 0.65) 45%,
      rgba(212, 163, 71, 0.1) 100%);
  border-bottom: 1.5px solid rgba(212, 165, 78, 0.34);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
}
.sp-hero-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.sp-grail-emblem {
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(
      circle at 50% 35%,
      #2b3964 0%,
      #12192e 100%);
  border: 1.5px solid #e2b457;
  box-shadow: inset 0 1px 0 rgba(255, 244, 204, 0.38), 0 0 16px rgba(234, 179, 8, 0.24);
}
.sp-grail-emblem img {
  width: 36px;
  height: 36px;
  image-rendering: pixelated;
  display: block;
}
.sp-title-stack {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.sp-title-line {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.sp-season-code {
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 12px;
  color: #1c1204;
  background:
    linear-gradient(
      180deg,
      #ffe8a3 0%,
      #dba136 100%);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}
.sp-season-title {
  margin: 0;
  font-size: 21px;
  line-height: 1.1;
  font-weight: 400;
  color: #fff3cf;
  letter-spacing: 1px;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8), 0 0 14px rgba(245, 190, 78, 0.28);
}
.sp-time-pill {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11.5px;
  color: #cfe0ff;
  background: rgba(36, 58, 108, 0.55);
  border: 1px solid rgba(130, 170, 245, 0.38);
  white-space: nowrap;
}
.sp-nav-tabs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border-radius: 7px;
  background: rgba(6, 9, 18, 0.72);
  border: 1px solid rgba(212, 165, 78, 0.28);
}
.sp-tab-btn {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: #a9b6d3;
  font: 400 13.5px/1.2 AvalonPixel, monospace;
  padding: 6px 13px;
  border-radius: 5px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 140ms ease;
  white-space: nowrap;
}
.sp-tab-btn:hover {
  color: #fff2cc;
}
.sp-tab-btn[aria-selected=true] {
  color: #1f1404;
  background:
    linear-gradient(
      180deg,
      #ffe69e 0%,
      #dfa63c 100%);
  border-color: #fff3c4;
  box-shadow: 0 2px 8px rgba(234, 179, 8, 0.32);
}
.sp-tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  font-size: 11px;
  background: #dc2626;
  color: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}
.sp-hero-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: none;
}
.sp-level-cluster {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 11px;
  border-radius: 8px;
  background: rgba(7, 11, 22, 0.68);
  border: 1px solid rgba(218, 172, 84, 0.32);
}
.sp-level-crest {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  padding: 3px 6px;
  border-radius: 6px;
  background:
    linear-gradient(
      180deg,
      #322410 0%,
      #1c1308 100%);
  border: 1px solid #e4b658;
  box-shadow: inset 0 1px 0 rgba(255, 236, 179, 0.25);
}
.sp-level-crest small {
  font-size: 9.5px;
  color: #d9b56c;
  line-height: 1;
}
.sp-level-crest strong {
  font-size: 18px;
  line-height: 1.1;
  color: #ffe9a8;
  font-weight: 400;
}
.sp-xp-meter {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 148px;
}
.sp-xp-labels {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  font-size: 11px;
  color: #cbd5e8;
  white-space: nowrap;
}
.sp-xp-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(212, 165, 78, 0.28);
  overflow: hidden;
}
.sp-xp-fill {
  height: 100%;
  border-radius: inherit;
  background:
    linear-gradient(
      90deg,
      #d97706 0%,
      #fbbf24 60%,
      #fef08a 100%);
  box-shadow: 0 0 8px rgba(251, 191, 36, 0.65);
  transition: width 320ms ease;
}
.sp-claim-all-btn {
  appearance: none;
  border: 1.5px solid #ffe7a0;
  border-radius: 7px;
  padding: 8px 14px;
  font: 400 13.5px/1.15 AvalonPixel, monospace;
  color: #201403;
  background:
    linear-gradient(
      180deg,
      #ffebaa 0%,
      #e4ab3c 55%,
      #c5881e 100%);
  box-shadow: inset 0 1px 0 #fff9df, 0 3px 12px rgba(234, 179, 8, 0.36);
  cursor: pointer;
  white-space: nowrap;
  transition: transform 120ms ease, filter 140ms ease;
}
.sp-claim-all-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(1.06);
}
.sp-claim-all-btn:disabled {
  opacity: 0.46;
  cursor: default;
  box-shadow: none;
}
.sp-close-btn {
  position: static !important;
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  min-height: 32px !important;
  border-radius: 50% !important;
  border: 1.5px solid rgba(218, 172, 84, 0.55) !important;
  background: rgba(12, 18, 34, 0.85) !important;
  color: #f6e3b4 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer;
  padding: 0 !important;
  margin: 0 !important;
}
.sp-close-btn:hover {
  border-color: #ffe599 !important;
  color: #fff !important;
}
.sp-body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.sp-pass-layout {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 332px;
  gap: 0;
  overflow: hidden;
}
.sp-ladder-pane {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 12px 16px 14px;
  gap: 10px;
}
.sp-anchor-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.sp-jump-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.sp-jump-pill {
  appearance: none;
  border: 1px solid rgba(212, 165, 78, 0.34);
  background: rgba(17, 25, 46, 0.78);
  color: #d7e2f8;
  font: 400 11.5px/1.2 AvalonPixel, monospace;
  padding: 4px 9px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 130ms ease;
}
.sp-jump-pill:hover,
.sp-jump-pill.is-active {
  border-color: #f5c869;
  color: #ffe8a3;
  background: rgba(68, 49, 18, 0.72);
}
.sp-scroll-hint {
  font-size: 11px;
  color: #8b9bb8;
}
.sp-tier-track {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: stretch;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px 4px 10px;
  scroll-behavior: smooth;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}
.sp-tier-track::-webkit-scrollbar {
  height: 7px;
}
.sp-tier-track::-webkit-scrollbar-track {
  background: rgba(8, 12, 22, 0.65);
  border-radius: 4px;
}
.sp-tier-track::-webkit-scrollbar-thumb {
  background:
    linear-gradient(
      90deg,
      #8a6426,
      #cfa14b);
  border-radius: 4px;
}
.sp-tier-card {
  position: relative;
  flex: 0 0 122px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 10px 8px 10px;
  border-radius: 9px;
  background:
    linear-gradient(
      180deg,
      #19233d 0%,
      #101729 100%);
  border: 1.5px solid rgba(145, 164, 204, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 6px 16px rgba(0, 0, 0, 0.42);
  transition:
    transform 140ms ease,
    border-color 140ms ease,
    box-shadow 140ms ease;
  box-sizing: border-box;
}
.sp-tier-card.is-unlocked {
  border-color: rgba(226, 180, 87, 0.58);
  background:
    linear-gradient(
      180deg,
      #222b44 0%,
      #141b2e 100%);
}
.sp-tier-card.is-claimable {
  border-color: #ffd978;
  box-shadow:
    inset 0 1px 0 rgba(255, 245, 204, 0.35),
    0 0 18px rgba(245, 184, 65, 0.28),
    0 8px 18px rgba(0, 0, 0, 0.5);
}
.sp-tier-card.is-milestone {
  flex: 0 0 168px;
  cursor: pointer;
  background:
    radial-gradient(
      circle at 50% 34%,
      rgba(234, 179, 8, 0.18) 0%,
      transparent 65%),
    linear-gradient(
      180deg,
      #251f3d 0%,
      #141327 100%);
  border-width: 1.5px;
  border-color: rgba(234, 179, 8, 0.65);
}
.sp-tier-card.is-milestone[data-rarity=mythic] {
  flex: 0 0 188px;
  background:
    radial-gradient(
      circle at 50% 34%,
      rgba(251, 191, 36, 0.26) 0%,
      transparent 68%),
    linear-gradient(
      180deg,
      #312038 0%,
      #181326 100%);
  border-color: #f6c453;
}
.sp-tier-card.is-selected {
  outline: 2px solid #ffe89e;
  outline-offset: 1px;
}
.sp-tier-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}
.sp-tier-lv {
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 12px;
  color: #e2e8f0;
  background: rgba(8, 12, 24, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.3);
}
.sp-tier-card.is-unlocked .sp-tier-lv {
  color: #ffe69c;
  border-color: rgba(234, 179, 8, 0.55);
}
.sp-milestone-crown {
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  color: #231503;
  background:
    linear-gradient(
      180deg,
      #ffe7a3 0%,
      #dca135 100%);
  white-space: nowrap;
}
.sp-tier-art {
  width: 100%;
  flex: 1 1 auto;
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 2px;
}
.sp-coin-orb {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    radial-gradient(
      circle at 38% 32%,
      rgba(254, 240, 138, 0.24),
      rgba(15, 23, 42, 0.75));
  border: 1px solid rgba(234, 179, 8, 0.42);
}
.sp-coin-orb img,
.sp-coin-orb svg {
  width: 38px !important;
  height: 38px !important;
  image-rendering: pixelated;
}
.sp-chest-box {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.6));
}
.sp-chest-box .treasury-chest,
.sp-chest-box img {
  width: 72px !important;
  height: 72px !important;
  object-fit: contain;
  image-rendering: pixelated;
}
.sp-avatar-preview-box {
  width: 84px;
  height: 84px;
  border-radius: 10px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background:
    radial-gradient(
      circle at 50% 40%,
      #2a365c 0%,
      #11172a 100%);
  border: 1.5px solid rgba(234, 179, 8, 0.55);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.55);
}
.sp-avatar-preview-box img,
.sp-avatar-preview-box canvas {
  width: 76px !important;
  height: 76px !important;
  image-rendering: pixelated;
}
.sp-plate-mini-banner {
  width: 100%;
  aspect-ratio: 3.3;
  border-radius: 6px;
  overflow: hidden;
  border: 1.5px solid rgba(245, 194, 88, 0.68);
  background: #080c18;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6);
}
.sp-plate-mini-banner img,
.sp-plate-mini-banner canvas,
.sp-plate-mini-banner .dynamic-nameplate {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  display: block;
  image-rendering: pixelated;
}
.sp-tier-info {
  width: 100%;
  text-align: center;
  margin-bottom: 6px;
}
.sp-tier-name {
  display: block;
  font-size: 13px;
  color: #fff3d4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sp-tier-sub {
  display: block;
  font-size: 10.5px;
  color: #9cb0d4;
  margin-top: 2px;
}
.sp-tier-action {
  width: 100%;
  appearance: none;
  border-radius: 5px;
  padding: 5px 6px;
  font: 400 12px/1.15 AvalonPixel, monospace;
  text-align: center;
  cursor: pointer;
  border: 1px solid rgba(148, 163, 184, 0.26);
  background: rgba(15, 23, 42, 0.72);
  color: #8fa1c2;
}
.sp-tier-action.is-claim {
  border-color: #ffe89e;
  background:
    linear-gradient(
      180deg,
      #ffe79e 0%,
      #dca136 100%);
  color: #1f1404;
  box-shadow: 0 2px 8px rgba(234, 179, 8, 0.35);
}
.sp-tier-action.is-done {
  border-color: rgba(74, 222, 128, 0.38);
  background: rgba(20, 83, 45, 0.38);
  color: #86efac;
  cursor: default;
}
.sp-overflow-card {
  flex: 0 0 156px;
  border-style: dashed;
  border-color: rgba(234, 179, 8, 0.48);
}
.sp-showcase-dock {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 14px 16px;
  background:
    radial-gradient(
      circle at 50% 24%,
      rgba(234, 179, 8, 0.14) 0%,
      transparent 62%),
    rgba(7, 10, 20, 0.72);
  border-left: 1.5px solid rgba(212, 165, 78, 0.28);
  gap: 10px;
}
.sp-showcase-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.sp-showcase-badge {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  color: #1e1303;
  background:
    linear-gradient(
      180deg,
      #ffe69c 0%,
      #dca034 100%);
  white-space: nowrap;
}
.sp-showcase-hint {
  font-size: 11px;
  color: #9bb0d4;
  white-space: nowrap;
}
.sp-live-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 14px 10px;
  border-radius: 9px;
  background:
    radial-gradient(
      circle at 50% 50%,
      rgba(37, 52, 94, 0.45) 0%,
      rgba(8, 12, 22, 0.92) 100%);
  border: 1.5px solid rgba(226, 180, 87, 0.48);
  box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.7);
  gap: 10px;
}
.sp-live-stage .cosmetic-nameplate {
  width: 100% !important;
  max-width: 296px !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.75);
}
.sp-showcase-title {
  margin: 0;
  font-size: 16px;
  font-weight: 400;
  color: #fff2cc;
  text-align: center;
}
.sp-showcase-desc {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.45;
  color: #b8c7e4;
  text-align: center;
}
.sp-exclusive-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.sp-ex-btn {
  appearance: none;
  padding: 5px 4px;
  border-radius: 6px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(16, 23, 42, 0.8);
  color: #cbd5e1;
  font: 400 10.5px/1.2 AvalonPixel, monospace;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  transition: all 120ms ease;
}
.sp-ex-btn:hover,
.sp-ex-btn.is-active {
  border-color: #f6c453;
  background: rgba(68, 49, 18, 0.65);
  color: #ffe8a3;
}
.sp-ex-btn small {
  font-size: 9.5px;
  color: #eab308;
}
.sp-equip-btn {
  width: 100%;
  appearance: none;
  padding: 8px 12px;
  border-radius: 7px;
  border: 1.5px solid rgba(226, 180, 87, 0.62);
  background:
    linear-gradient(
      180deg,
      #28365e 0%,
      #17213c 100%);
  color: #ffe8a3;
  font: 400 13px/1.2 AvalonPixel, monospace;
  cursor: pointer;
  transition: filter 130ms ease;
}
.sp-equip-btn:hover:not(:disabled) {
  filter: brightness(1.12);
}
.sp-equip-btn:disabled {
  opacity: 0.55;
  cursor: default;
}
.sp-quests-pane {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 14px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.sp-routine-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.sp-routine-card {
  padding: 10px 12px;
  border-radius: 8px;
  background:
    linear-gradient(
      180deg,
      rgba(35, 48, 84, 0.62) 0%,
      rgba(16, 23, 42, 0.85) 100%);
  border: 1px solid rgba(212, 165, 78, 0.38);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sp-routine-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.sp-routine-title {
  font-size: 13.5px;
  color: #fff2cc;
}
.sp-xp-tag {
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 11px;
  color: #fde047;
  background: rgba(161, 98, 7, 0.35);
  border: 1px solid rgba(250, 204, 21, 0.42);
  white-space: nowrap;
}
.sp-routine-sub {
  font-size: 11.5px;
  color: #a9b8d4;
}
.sp-ach-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.sp-ach-card {
  padding: 11px 13px;
  border-radius: 8px;
  background:
    linear-gradient(
      180deg,
      #18223b 0%,
      #101728 100%);
  border: 1px solid rgba(148, 163, 184, 0.25);
  display: flex;
  align-items: center;
  gap: 12px;
}
.sp-ach-card.is-claimable {
  border-color: #fbbf24;
  box-shadow: 0 0 14px rgba(245, 184, 65, 0.22);
}
.sp-ach-card.is-claimed {
  border-color: rgba(74, 222, 128, 0.32);
  background:
    linear-gradient(
      180deg,
      rgba(20, 48, 38, 0.45) 0%,
      #101728 100%);
}
.sp-ach-icon {
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(
      circle at 35% 30%,
      #2f3e6b,
      #12192e);
  border: 1px solid rgba(226, 180, 87, 0.48);
  color: #ffd978;
  font-size: 18px;
}
.sp-ach-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sp-ach-head {
  display: flex;
  align-items: center;
  gap: 8px;
}
.sp-ach-title {
  font-size: 14px;
  color: #fff3d1;
}
.sp-ach-desc {
  font-size: 11.5px;
  color: #9fb0cf;
  line-height: 1.35;
}
.sp-ach-prog-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}
.sp-ach-bar {
  flex: 1 1 auto;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}
.sp-ach-fill {
  height: 100%;
  border-radius: inherit;
  background:
    linear-gradient(
      90deg,
      #eab308,
      #fef08a);
}
.sp-ach-count {
  font-size: 11px;
  color: #cbd5e1;
  white-space: nowrap;
}
.sp-ach-side {
  flex: none;
}
@media (max-width: 960px), (max-height: 520px) {
  html[data-mobile-shell=true] .v4-entry-season .v5-season-mini-bar {
    display: none !important;
  }
  html[data-mobile-shell=true] .v4-entry-season .v5-season-lv-pill {
    font-size: 9.5px !important;
    padding: 0 4px !important;
  }
  #modals .season-pass-document {
    width: calc(100vw - 16px) !important;
    max-width: calc(100vw - 16px) !important;
    height: calc(var(--mobile-viewport-height, 100dvh) - 12px) !important;
    max-height: calc(var(--mobile-viewport-height, 100dvh) - 12px) !important;
    min-height: 0 !important;
    border-radius: 8px !important;
  }
  .sp-hero-bar {
    padding: 7px 10px !important;
    gap: 8px !important;
  }
  .sp-grail-emblem {
    width: 30px !important;
    height: 30px !important;
  }
  .sp-grail-emblem img {
    width: 24px !important;
    height: 24px !important;
  }
  .sp-season-title {
    font-size: 15px !important;
  }
  .sp-time-pill {
    font-size: 10px !important;
    padding: 1px 6px !important;
  }
  .sp-tab-btn {
    padding: 4px 9px !important;
    font-size: 12px !important;
  }
  .sp-level-cluster {
    padding: 3px 7px !important;
    gap: 6px !important;
  }
  .sp-level-crest {
    min-width: 38px !important;
    padding: 2px 4px !important;
  }
  .sp-level-crest strong {
    font-size: 14px !important;
  }
  .sp-xp-meter {
    width: 132px !important;
  }
  .sp-xp-labels {
    font-size: 10px !important;
  }
  .sp-showcase-badge {
    font-size: 10px !important;
    padding: 2px 6px !important;
  }
  .sp-showcase-hint {
    font-size: 10px !important;
  }
  .sp-claim-all-btn {
    padding: 5px 9px !important;
    font-size: 12px !important;
  }
  .sp-pass-layout {
    grid-template-columns: minmax(0, 1fr) 246px !important;
  }
  .sp-ladder-pane {
    padding: 6px 10px 8px !important;
    gap: 5px !important;
  }
  .sp-scroll-hint {
    display: none !important;
  }
  .sp-tier-card {
    flex: 0 0 104px !important;
    padding: 6px 6px !important;
  }
  .sp-tier-card.is-milestone {
    flex: 0 0 136px !important;
  }
  .sp-tier-card.is-milestone[data-rarity=mythic] {
    flex: 0 0 148px !important;
  }
  .sp-tier-art {
    min-height: 54px !important;
    padding: 2px !important;
  }
  .sp-coin-orb {
    width: 44px !important;
    height: 44px !important;
  }
  .sp-chest-box,
  .sp-chest-box .treasury-chest,
  .sp-chest-box img {
    width: 50px !important;
    height: 50px !important;
  }
  .sp-avatar-preview-box {
    width: 52px !important;
    height: 52px !important;
  }
  .sp-avatar-preview-box img,
  .sp-avatar-preview-box canvas {
    width: 46px !important;
    height: 46px !important;
  }
  .sp-showcase-dock {
    padding: 8px 10px !important;
    gap: 5px !important;
  }
  .sp-live-stage {
    padding: 7px 6px !important;
    gap: 5px !important;
  }
  .sp-showcase-title {
    font-size: 13px !important;
  }
  .sp-showcase-desc {
    font-size: 10px !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .sp-equip-btn {
    padding: 5px 8px !important;
    font-size: 11.5px !important;
  }
  .sp-quests-pane {
    padding: 8px 10px 10px !important;
    gap: 8px !important;
  }
  .sp-routine-grid {
    gap: 6px !important;
  }
  .sp-ach-grid {
    grid-template-columns: 1fr !important;
    gap: 6px !important;
  }
}

/* web/src/evil-signal.css */
.evil-signal-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: calc(8 * var(--v4-u, 1px));
  pointer-events: auto;
}
.evil-signal-wrap[hidden] {
  display: none !important;
}
#game .toolbar-left-sub .evil-signal-trigger::before,
#game .toolbar-left-sub .evil-signal-trigger::after {
  content: none !important;
  display: none !important;
}
#game .toolbar-left-sub .evil-signal-trigger {
  width: calc(44 * var(--v4-u, 1px)) !important;
  height: calc(44 * var(--v4-u, 1px)) !important;
  min-width: calc(44 * var(--v4-u, 1px)) !important;
  max-width: calc(44 * var(--v4-u, 1px)) !important;
  min-height: calc(44 * var(--v4-u, 1px)) !important;
  max-height: calc(44 * var(--v4-u, 1px)) !important;
  flex: 0 0 calc(44 * var(--v4-u, 1px)) !important;
  padding: 0 !important;
  margin: 0 !important;
  display: inline-grid !important;
  place-items: center;
  border-radius: calc(8 * var(--v4-u, 1px)) !important;
  background:
    linear-gradient(
      180deg,
      #3a1724 0%,
      #200d15 56%,
      #13070d 100%) !important;
  border: calc(2 * var(--v4-u, 1px)) solid #b53d4f !important;
  box-shadow:
    0 calc(3 * var(--v4-u, 1px)) calc(10 * var(--v4-u, 1px)) rgba(0, 0, 0, 0.72),
    inset 0 calc(1 * var(--v4-u, 1px)) 0 rgba(255, 224, 166, 0.34),
    inset 0 0 calc(8 * var(--v4-u, 1px)) rgba(208, 36, 60, 0.28) !important;
  cursor: pointer;
  transition:
    transform 90ms ease,
    border-color 120ms ease,
    box-shadow 120ms ease;
}
#game .toolbar-left-sub .evil-signal-trigger:hover,
.evil-signal-wrap.is-open .evil-signal-trigger {
  border-color: #ef6374 !important;
  box-shadow: 0 0 calc(12 * var(--v4-u, 1px)) rgba(236, 48, 76, 0.58), inset 0 calc(1 * var(--v4-u, 1px)) 0 rgba(255, 232, 184, 0.5) !important;
}
#game .toolbar-left-sub .evil-signal-trigger:active {
  transform: translateY(1px);
}
.evil-signal-trigger-svg {
  width: calc(24 * var(--v4-u, 1px));
  height: calc(24 * var(--v4-u, 1px));
  display: block;
  image-rendering: pixelated;
}
.evil-signal-picker {
  display: inline-flex;
  align-items: center;
  gap: calc(5 * var(--v4-u, 1px));
  padding: calc(4 * var(--v4-u, 1px)) calc(6 * var(--v4-u, 1px));
  border-radius: calc(8 * var(--v4-u, 1px));
  background:
    linear-gradient(
      180deg,
      rgba(28, 12, 20, 0.96) 0%,
      rgba(14, 7, 12, 0.98) 100%);
  border: calc(2 * var(--v4-u, 1px)) solid #c44a5a;
  box-shadow: 0 calc(6 * var(--v4-u, 1px)) calc(18 * var(--v4-u, 1px)) rgba(0, 0, 0, 0.78), inset 0 0 0 calc(1 * var(--v4-u, 1px)) rgba(240, 196, 90, 0.32);
  animation: evil-signal-slide 140ms cubic-bezier(.16, 1, .3, 1) both;
}
.evil-signal-picker[hidden] {
  display: none !important;
}
@keyframes evil-signal-slide {
  from {
    opacity: 0;
    transform: translateX(-8px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
.evil-signal-opt {
  width: calc(36 * var(--v4-u, 1px));
  height: calc(34 * var(--v4-u, 1px));
  min-width: calc(36 * var(--v4-u, 1px));
  padding: 0;
  display: inline-grid;
  place-items: center;
  border-radius: calc(6 * var(--v4-u, 1px));
  background:
    linear-gradient(
      180deg,
      #321824 0%,
      #1a0c14 100%);
  border: calc(1.5 * var(--v4-u, 1px)) solid rgba(218, 152, 76, 0.58);
  color: #fff3d4;
  font: 700 calc(18 * var(--v4-u, 1px))/1 AvalonPixel, monospace;
  text-shadow: 0 calc(2 * var(--v4-u, 1px)) 0 #480914;
  cursor: pointer;
  transition:
    transform 80ms ease,
    background 100ms ease,
    border-color 100ms ease;
}
.evil-signal-opt:hover {
  background:
    linear-gradient(
      180deg,
      #5c192a 0%,
      #2f0d18 100%);
  border-color: #ffd978;
  transform: translateY(-1px);
}
.evil-signal-opt:active {
  transform: translateY(1px);
}
.evil-signal-opt .evil-signal-icon-svg,
.evil-signal-opt .evil-signal-dagger-svg {
  width: calc(20 * var(--v4-u, 1px));
  height: calc(20 * var(--v4-u, 1px));
  display: block;
  image-rendering: pixelated;
}
html[data-mobile-shell=true] #game .toolbar-left-sub .evil-signal-trigger {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  max-width: 44px !important;
  min-height: 44px !important;
  max-height: 44px !important;
  flex: 0 0 44px !important;
  border-radius: 8px !important;
  border-width: 2px !important;
}
html[data-mobile-shell=true] .evil-signal-trigger-svg {
  width: 22px;
  height: 22px;
}
html[data-mobile-shell=true] .evil-signal-wrap {
  gap: 6px;
}
html[data-mobile-shell=true] .evil-signal-picker {
  gap: 4px;
  padding: 4px 5px;
  border-radius: 7px;
  border-width: 2px;
}
html[data-mobile-shell=true] .evil-signal-opt {
  width: 34px;
  height: 34px;
  min-width: 34px;
  border-radius: 5px;
  border-width: 1.5px;
  font-size: 16px;
}
html[data-mobile-shell=true] .evil-signal-opt .evil-signal-icon-svg,
html[data-mobile-shell=true] .evil-signal-opt .evil-signal-dagger-svg {
  width: 18px;
  height: 18px;
}
.court-evil-signal {
  --sig-u: calc(var(--stage-scale, 1) * 1px);
  position: absolute;
  left: 0;
  top: 0;
  z-index: 32 !important;
  pointer-events: auto;
  cursor: pointer;
  background: transparent;
  border: 0;
  padding: calc(3 * var(--sig-u));
  min-width: calc(34 * var(--sig-u));
  min-height: calc(32 * var(--sig-u));
  display: grid;
  place-items: center;
  touch-action: manipulation;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
html[data-mobile-shell=true] .court-evil-signal {
  padding: calc(1.5 * var(--sig-u)) calc(2.5 * var(--sig-u)) calc(2.5 * var(--sig-u));
  min-width: calc(30 * var(--sig-u));
  min-height: calc(24 * var(--sig-u));
}
.court-evil-signal[hidden] {
  display: none !important;
}
.court-evil-signal-box {
  position: relative;
  min-width: calc(28 * var(--sig-u));
  height: calc(26 * var(--sig-u));
  padding: 0 calc(6 * var(--sig-u));
  display: inline-grid;
  place-items: center;
  background:
    linear-gradient(
      180deg,
      #1b0d1b 0%,
      #0d060f 100%);
  border: calc(2 * var(--sig-u)) solid #e0465a;
  border-radius: calc(6 * var(--sig-u));
  box-shadow:
    0 calc(3 * var(--sig-u)) calc(10 * var(--sig-u)) rgba(0, 0, 0, 0.85),
    0 0 calc(8 * var(--sig-u)) rgba(232, 42, 68, 0.42),
    inset 0 0 0 calc(1 * var(--sig-u)) rgba(244, 198, 96, 0.55);
  color: #fff6dc;
  font: 700 calc(16 * var(--sig-u))/1 AvalonPixel, monospace;
  text-shadow: 0 calc(2 * var(--sig-u)) 0 #5c0c18;
  animation: evil-bubble-pop 160ms cubic-bezier(.18, 1.35, .36, 1) both;
}
html[data-mobile-shell=true] .court-evil-signal-box {
  min-width: calc(26 * var(--sig-u));
  height: calc(23 * var(--sig-u));
  padding: 0 calc(5 * var(--sig-u));
  border-radius: calc(5 * var(--sig-u));
}
.court-evil-signal:hover .court-evil-signal-box {
  border-color: #ffd876;
  filter: brightness(1.1);
}
.court-evil-signal-box .evil-signal-icon-svg,
.court-evil-signal-box .evil-signal-dagger-svg {
  width: calc(17 * var(--sig-u));
  height: calc(17 * var(--sig-u));
  display: block;
  image-rendering: pixelated;
}
html[data-mobile-shell=true] .court-evil-signal-box .evil-signal-icon-svg,
html[data-mobile-shell=true] .court-evil-signal-box .evil-signal-dagger-svg {
  width: calc(15 * var(--sig-u));
  height: calc(15 * var(--sig-u));
}
.court-evil-signal-box::after {
  content: "";
  position: absolute;
  width: calc(7 * var(--sig-u));
  height: calc(7 * var(--sig-u));
  background: #0d060f;
  border-right: calc(2 * var(--sig-u)) solid #e0465a;
  border-bottom: calc(2 * var(--sig-u)) solid #e0465a;
  left: 50%;
  bottom: calc(-5 * var(--sig-u));
  transform: translateX(-50%) rotate(45deg);
}
.court-evil-signal[data-tail=left] .court-evil-signal-box::after {
  left: calc(-5 * var(--sig-u));
  top: 50%;
  bottom: auto;
  border-right: 0;
  border-bottom: calc(2 * var(--sig-u)) solid #e0465a;
  border-left: calc(2 * var(--sig-u)) solid #e0465a;
  transform: translateY(-50%) rotate(45deg);
}
.court-evil-signal[data-tail=right] .court-evil-signal-box::after {
  left: auto;
  right: calc(-5 * var(--sig-u));
  top: 50%;
  bottom: auto;
  border-bottom: 0;
  border-top: calc(2 * var(--sig-u)) solid #e0465a;
  border-right: calc(2 * var(--sig-u)) solid #e0465a;
  transform: translateY(-50%) rotate(45deg);
}
@keyframes evil-bubble-pop {
  from {
    opacity: 0;
    transform: scale(0.72);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
html body #game .toolbar-left.v4-icon-tray {
  z-index: 18 !important;
}
html body #game .toolbar-right.v4-icon-tray {
  position: relative;
  z-index: 18 !important;
}
html body #game[data-stage=waiting] .game-hud .room-strip {
  position: relative !important;
  z-index: 20 !important;
}
html body #game[data-stage=waiting] .game-hud .v4-room-anchor {
  position: relative !important;
  z-index: 60 !important;
}
html body #game[data-stage=waiting] .game-hud .v4-room-list {
  z-index: 65 !important;
}
html body #game[data-stage=waiting] .game-hud .lobby-emote-row {
  position: absolute;
  left: 0;
  top: calc(100% + 10 * var(--v4-u, 1px));
  z-index: 2 !important;
  display: inline-flex;
  align-items: center;
  pointer-events: auto;
}
html body #game:not([data-stage=waiting]) .lobby-emote-row,
html body #game .lobby-emote-row[hidden] {
  display: none !important;
}
@media (max-height: 620px) {
  html body #game[data-stage=waiting] .game-hud .lobby-emote-row {
    top: calc(100% + 6px);
  }
}
html[data-mobile-shell=true] body #game[data-stage=waiting] .game-hud .lobby-emote-row {
  top: calc(100% + 8px);
}
html body #game .lobby-emote-row .lobby-emote-trigger {
  position: relative;
  zoom: 1 !important;
  width: calc(44 * var(--v4-u, 1px)) !important;
  height: calc(44 * var(--v4-u, 1px)) !important;
  min-width: calc(44 * var(--v4-u, 1px)) !important;
  max-width: calc(44 * var(--v4-u, 1px)) !important;
  min-height: calc(44 * var(--v4-u, 1px)) !important;
  max-height: calc(44 * var(--v4-u, 1px)) !important;
  flex: 0 0 calc(44 * var(--v4-u, 1px)) !important;
  padding: calc(8 * var(--v4-u, 1px)) !important;
  margin: 0 !important;
  border-radius: 9px !important;
  background:
    linear-gradient(
      180deg,
      #f7e2a3 0%,
      #e1ac44 54%,
      #c28824 100%) !important;
  border: 1.5px solid #452c0d !important;
  color: #261705 !important;
  box-shadow:
    inset 0 1.5px 0 #fff9df,
    inset 0 -2px 0 rgba(116, 70, 12, 0.48),
    0 4px 10px rgba(0, 0, 0, 0.54) !important;
  transition:
    transform 140ms ease,
    filter 140ms ease,
    box-shadow 140ms ease !important;
  display: inline-grid !important;
  place-items: center !important;
  cursor: pointer;
}
html body #game .lobby-emote-row .lobby-emote-trigger::before {
  content: none !important;
  display: none !important;
}
html body #game .lobby-emote-row .lobby-emote-trigger > svg {
  width: calc(24 * var(--v4-u, 1px)) !important;
  height: calc(24 * var(--v4-u, 1px)) !important;
  color: #261705 !important;
  fill: currentColor !important;
  display: block !important;
  filter: drop-shadow(0 1px 0 rgba(255, 246, 210, 0.65));
}
@media (hover: hover) and (pointer: fine) {
  html body #game .lobby-emote-row .lobby-emote-trigger:hover:not(:disabled),
  html body #game .lobby-emote-wrap.is-open .lobby-emote-trigger {
    transform: translateY(-2px);
    filter: brightness(1.07);
    border-color: #2b1b07 !important;
    color: #160c02 !important;
    box-shadow:
      inset 0 1.5px 0 #ffffff,
      inset 0 -2px 0 rgba(120, 74, 14, 0.45),
      0 6px 14px rgba(0, 0, 0, 0.62),
      0 0 16px rgba(246, 208, 108, 0.55) !important;
  }
  html body #game .lobby-emote-row .lobby-emote-trigger[data-tip]::after {
    content: attr(data-tip) !important;
    position: absolute !important;
    top: calc(100% + 6 * var(--v4-u, 1px)) !important;
    left: 0 !important;
    right: auto !important;
    width: max-content !important;
    height: auto !important;
    transform: translateY(-3px) !important;
    padding: 3px 9px !important;
    border-radius: 6px !important;
    background: rgba(20, 15, 26, 0.94) !important;
    border: 1px solid #c99d46 !important;
    color: #faeac6 !important;
    font: calc(12 * var(--v4-u, 1px)) / 1.25 AvalonPixel, sans-serif !important;
    white-space: nowrap !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.6) !important;
    opacity: 0 !important;
    pointer-events: none !important;
    z-index: 60 !important;
    transition: opacity 140ms ease, transform 140ms ease !important;
  }
  html body #game .lobby-emote-wrap:not(.is-open) .lobby-emote-trigger[data-tip]:hover:not(:disabled)::after {
    opacity: 1 !important;
    transform: translateY(0) !important;
  }
}
html body #game .lobby-emote-wrap.is-open .lobby-emote-trigger::after {
  display: none !important;
  opacity: 0 !important;
}
html[data-mobile-shell=true] body #game .lobby-emote-row .lobby-emote-trigger {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  max-width: 44px !important;
  min-height: 44px !important;
  max-height: 44px !important;
  flex: 0 0 44px !important;
  padding: 8px !important;
  border-radius: 8px !important;
}
html[data-mobile-shell=true] body #game .lobby-emote-row .lobby-emote-trigger > svg {
  width: 22px !important;
  height: 22px !important;
}
.lobby-emote-picker {
  background:
    linear-gradient(
      180deg,
      rgba(30, 24, 16, 0.96) 0%,
      rgba(16, 12, 8, 0.98) 100%) !important;
  border-color: #dfac46 !important;
  box-shadow: 0 calc(6 * var(--v4-u, 1px)) calc(18 * var(--v4-u, 1px)) rgba(0, 0, 0, 0.78), inset 0 0 0 calc(1 * var(--v4-u, 1px)) rgba(255, 226, 146, 0.28) !important;
}
.lobby-emote-opt {
  background:
    linear-gradient(
      180deg,
      #2b2216 0%,
      #17120b 100%) !important;
  border-color: rgba(232, 180, 78, 0.68) !important;
  color: #ffe89e !important;
  text-shadow: 0 calc(1.5 * var(--v4-u, 1px)) 0 #140d05 !important;
}
.lobby-emote-opt:hover {
  background:
    linear-gradient(
      180deg,
      #4b391f 0%,
      #291e0f 100%) !important;
  border-color: #ffe484 !important;
}
.lobby-emote-opt.is-ready {
  width: auto !important;
  min-width: calc(48 * var(--v4-u, 1px)) !important;
  padding: 0 calc(7 * var(--v4-u, 1px)) !important;
}
html[data-mobile-shell=true] .lobby-emote-opt.is-ready {
  min-width: 46px !important;
  padding: 0 6px !important;
}
.lobby-emote-ready-word {
  display: inline-block;
  font: 700 calc(14 * var(--v4-u, 1px))/1 AvalonPixel, monospace;
  letter-spacing: 0.04em;
  color: #ffe588;
  text-shadow:
    calc(-1 * var(--v4-u, 1px)) 0 0 #1a1106,
    calc(1 * var(--v4-u, 1px)) 0 0 #1a1106,
    0 calc(-1 * var(--v4-u, 1px)) 0 #1a1106,
    0 calc(1.5 * var(--v4-u, 1px)) 0 #1a1106;
  white-space: nowrap;
}
html[data-mobile-shell=true] .lobby-emote-ready-word {
  font-size: 13px;
}
.court-evil-signal[data-variant=lobby] .court-evil-signal-box {
  background:
    linear-gradient(
      180deg,
      #231c12 0%,
      #120e08 100%);
  border-color: #e6b24a;
  box-shadow:
    0 calc(3 * var(--sig-u)) calc(10 * var(--sig-u)) rgba(0, 0, 0, 0.85),
    0 0 calc(8 * var(--sig-u)) rgba(236, 180, 68, 0.36),
    inset 0 0 0 calc(1 * var(--sig-u)) rgba(255, 232, 164, 0.42);
  color: #ffe896;
  text-shadow: 0 calc(1.5 * var(--sig-u)) 0 #1c1206;
}
.court-evil-signal[data-variant=lobby] .court-evil-signal-box .lobby-emote-ready-word {
  font-size: calc(13.5 * var(--sig-u));
}
html[data-mobile-shell=true] .court-evil-signal[data-variant=lobby] .court-evil-signal-box .lobby-emote-ready-word {
  font-size: calc(12.5 * var(--sig-u));
}
.court-evil-signal[data-variant=lobby] .court-evil-signal-box::after {
  background: #120e08;
  border-right-color: #e6b24a;
  border-bottom-color: #e6b24a;
}
.court-evil-signal[data-variant=lobby][data-tail=left] .court-evil-signal-box::after {
  border-bottom-color: #e6b24a;
  border-left-color: #e6b24a;
}
.court-evil-signal[data-variant=lobby][data-tail=right] .court-evil-signal-box::after {
  border-top-color: #e6b24a;
  border-right-color: #e6b24a;
}

/* web/src/court-compact-nameplates.css */
html[data-mobile-shell=true] #court .court-labels[data-ten-compact=true] {
  --compact-plate-h: max(18px, calc(19px * var(--stage-scale, 1)));
  --compact-plate-w: calc(var(--compact-plate-h) * 3.4);
}
html[data-mobile-shell=true] #court .court-labels[data-ten-compact=true] button.court-nameplate[data-player-id][data-anchor]:not([hidden]) {
  --court-plate-scale: 1;
  position: absolute !important;
  display: inline-flex !important;
  justify-content: center !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
  box-sizing: border-box !important;
  width: auto !important;
  min-width: max(24px, calc(26px * var(--stage-scale, 1))) !important;
  max-width: none !important;
  height: var(--compact-plate-h) !important;
  min-height: var(--compact-plate-h) !important;
  max-height: var(--compact-plate-h) !important;
  aspect-ratio: auto !important;
  padding: 0 max(5px, calc(5.5px * var(--stage-scale, 1))) !important;
  margin: 0 !important;
  overflow: hidden !important;
  border: 1px solid rgba(212, 172, 92, 0.72) !important;
  border-radius: calc(var(--compact-plate-h) * 5 / 30) !important;
  background:
    linear-gradient(
      180deg,
      rgba(24, 20, 30, 0.93),
      rgba(13, 11, 18, 0.96)) !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.78) !important;
  color: #f6ebd6 !important;
  text-shadow: 0 1px 1px #000 !important;
  filter: none !important;
  pointer-events: auto !important;
  cursor: pointer;
}
html[data-mobile-shell=true] #court .court-labels[data-ten-compact=true] button.court-nameplate[data-player-id][data-anchor]:not([hidden])[data-expanded=true] {
  width: max-content !important;
  min-width: calc(var(--compact-plate-h) * 2.5) !important;
  max-width: 96px !important;
  height: var(--compact-plate-h) !important;
  min-height: var(--compact-plate-h) !important;
  max-height: var(--compact-plate-h) !important;
  padding: 0 calc(var(--compact-plate-h) * 7 / 30) !important;
  border-color: rgba(235, 194, 102, 0.88) !important;
  z-index: 4;
}
html[data-mobile-shell=true] #court .court-labels[data-ten-compact=true] button.court-nameplate[data-player-id][data-anchor]:not([hidden])::before,
html[data-mobile-shell=true] #court .court-labels[data-ten-compact=true] button.court-nameplate[data-player-id][data-anchor]:not([hidden])::after {
  content: none !important;
  display: none !important;
}
html[data-mobile-shell=true] #court .court-labels[data-stage=waiting][data-ten-compact=true] button.court-nameplate[data-player-id][data-anchor]:not([hidden])[data-expanded=true] {
  position: absolute !important;
  width: max-content !important;
  min-width: max(62px, var(--compact-plate-w)) !important;
  max-width: 96px !important;
  height: var(--compact-plate-h) !important;
  min-height: var(--compact-plate-h) !important;
  max-height: var(--compact-plate-h) !important;
  padding: 0 5px !important;
  border-radius: calc(var(--compact-plate-h) * 5 / 30) !important;
  overflow: hidden !important;
}
html[data-mobile-shell=true] #court .court-labels[data-stage=waiting][data-ten-compact=true] button.court-nameplate[data-player-id][data-anchor]:not([hidden])[data-expanded=true]:not([data-waiting-seated=true]) {
  min-width: max(66px, var(--compact-plate-w)) !important;
  max-width: 108px !important;
  padding: 0 6px !important;
}
html[data-mobile-shell=true] #court .court-labels[data-stage]:not([data-stage=waiting])[data-ten-compact=true] button.court-nameplate.cosmetics-world-nameplate[data-player-id][data-anchor]:not([hidden])[data-expanded=true] {
  position: absolute !important;
  width: max-content !important;
  min-width: var(--compact-plate-w) !important;
  max-width: 96px !important;
  height: var(--compact-plate-h) !important;
  min-height: var(--compact-plate-h) !important;
  max-height: var(--compact-plate-h) !important;
  padding: 0 calc(var(--compact-plate-h) * 7 / 30) !important;
  border-radius: calc(var(--compact-plate-h) * 5 / 30) !important;
  overflow: hidden !important;
}
html[data-mobile-shell=true] #court .court-labels[data-ten-compact=true] button.court-nameplate[data-player-id][data-anchor]:not([hidden]) .court-label-name,
html[data-mobile-shell=true] #court .court-labels[data-ten-compact=true] button.court-nameplate.cosmetics-world-nameplate[data-player-id][data-anchor]:not([hidden]) .court-label-name {
  display: inline-flex !important;
  justify-content: center !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
  gap: calc(var(--compact-plate-h) * 0.14) !important;
  min-width: 0 !important;
  position: relative !important;
  inset: auto !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  z-index: 2 !important;
  transform: none !important;
  margin: 0 !important;
  padding: 0 !important;
  width: auto !important;
  max-width: 100% !important;
  height: 100% !important;
  overflow: hidden !important;
  white-space: nowrap !important;
  text-overflow: ellipsis !important;
  font: 400 clamp(10px, calc(var(--compact-plate-h) * 0.46), 11.5px)/1 AvalonPixel, monospace !important;
  line-height: 1 !important;
  letter-spacing: 0 !important;
  background: none !important;
  border: 0 !important;
  box-shadow: none !important;
}
html[data-mobile-shell=true] #court .court-labels[data-ten-compact=true] button.court-nameplate.cosmetics-world-nameplate[data-player-id][data-anchor]:not([hidden])[data-expanded=true] .court-label-name {
  color: #ffffff !important;
  font-size: clamp(10px, calc(var(--compact-plate-h) * 0.46), 11.5px) !important;
  line-height: 1 !important;
  text-shadow:
    0 1px 2px #050406,
    0 0 3px #050406,
    1px 0 1px rgba(5, 4, 6, 0.92),
    -1px 0 1px rgba(5, 4, 6, 0.92) !important;
}
html[data-mobile-shell=true] #court .court-labels[data-ten-compact=true] button.court-nameplate[data-player-id][data-anchor]:not([hidden]) .court-label-seat {
  flex: none;
  font: inherit !important;
  line-height: 1 !important;
  color: #f8d57c !important;
}
html[data-mobile-shell=true] #court .court-labels[data-ten-compact=true] button.court-nameplate[data-player-id][data-anchor]:not([hidden]) .court-label-seat[hidden] {
  display: none !important;
}
html[data-mobile-shell=true] #court .court-labels[data-ten-compact=true] button.court-nameplate[data-player-id][data-anchor]:not([hidden]) .court-label-nick {
  display: none !important;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100% !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
html[data-mobile-shell=true] #court .court-labels[data-ten-compact=true] button.court-nameplate[data-player-id][data-anchor]:not([hidden])[data-expanded=true] .court-label-nick {
  display: inline-block !important;
}
html[data-mobile-shell=true] #court .court-labels[data-ten-compact=true] button.court-nameplate[data-player-id][data-anchor]:not([hidden]):not([data-expanded=true]) > .dynamic-nameplate {
  display: none !important;
}
html[data-mobile-shell=true] #court .court-labels[data-ten-compact=true] button.court-nameplate.cosmetics-world-nameplate[data-player-id][data-anchor]:not([hidden])[data-expanded=true] > .dynamic-nameplate {
  display: block !important;
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 0 !important;
  aspect-ratio: auto !important;
  z-index: 0 !important;
  pointer-events: none !important;
  overflow: hidden !important;
  border-radius: inherit !important;
}
html[data-mobile-shell=true] #court .court-labels[data-ten-compact=true] button.court-nameplate.cosmetics-world-nameplate[data-player-id][data-anchor]:not([hidden])[data-expanded=true] > .dynamic-nameplate :is(canvas, img) {
  display: block !important;
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: cover !important;
  image-rendering: pixelated;
}
html[data-mobile-shell=true] #court .court-labels[data-ten-compact=true] button.court-nameplate.cosmetics-world-nameplate[data-player-id][data-anchor]:not([hidden])[data-expanded=true] > .dynamic-nameplate::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(
      180deg,
      rgba(10, 8, 14, 0.30),
      rgba(10, 8, 14, 0.48));
}
html[data-mobile-shell=true] #court .court-labels[data-ten-compact=true] button.court-nameplate[data-player-id][data-anchor]:not([hidden])[data-choosing=true][data-selectable=true][data-selected=false] {
  border-color: rgba(250, 214, 126, 0.96) !important;
  box-shadow: 0 0 6px rgba(248, 206, 112, 0.52), 0 1px 4px rgba(0, 0, 0, 0.78) !important;
}
html[data-mobile-shell=true] #court .court-labels[data-ten-compact=true]:is([data-stage=assassination], [data-stage=recruitment]) button.court-nameplate[data-player-id][data-anchor]:not([hidden])[data-choosing=true][data-selectable=true][data-selected=false] {
  border-color: rgba(255, 138, 132, 0.94) !important;
  box-shadow: 0 0 6px rgba(235, 76, 82, 0.55), 0 1px 4px rgba(0, 0, 0, 0.78) !important;
}
html[data-mobile-shell=true] #court .court-labels[data-ten-compact=true] button.court-nameplate[data-player-id][data-anchor]:not([hidden])[data-choosing=true][data-ineligible=true] {
  opacity: 0.42 !important;
  filter: grayscale(0.75) !important;
  border-color: rgba(130, 126, 138, 0.48) !important;
  box-shadow: none !important;
  cursor: not-allowed !important;
}
html[data-mobile-shell=true] #court .court-labels[data-ten-compact=true] button.court-nameplate[data-player-id][data-anchor]:not([hidden])[data-selected=true],
html[data-mobile-shell=true] #court .court-labels[data-ten-compact=true] button.court-nameplate[data-player-id][data-anchor]:not([hidden]):focus-visible {
  border-color: #ffd679 !important;
  color: #fff1b7 !important;
  box-shadow: 0 0 6px rgba(250, 195, 95, 0.85) !important;
}
html[data-mobile-shell=true] #court .court-labels[data-ten-compact=true]:is([data-stage=assassination], [data-stage=recruitment]) button.court-nameplate[data-player-id][data-anchor]:not([hidden])[data-selected=true] {
  border-color: #ff807d !important;
  color: #ffd4cc !important;
  box-shadow: 0 0 7px rgba(239, 62, 68, 0.9) !important;
}
html[data-mobile-shell=true] #court .court-labels[data-stage=waiting][data-ten-compact=true] button.court-nameplate[data-waiting-seated=true].ready,
html[data-mobile-shell=true] #court .court-labels[data-stage=waiting][data-ten-compact=true] button.court-nameplate[data-waiting-seated=true].ready .court-label-seat,
html[data-mobile-shell=true] #court .court-labels[data-stage=waiting][data-ten-compact=true] button.court-nameplate[data-waiting-seated=true].ready .court-label-nick {
  color: #5ee69c !important;
  text-shadow: 0 1px 2px #05140c, 0 0 3px rgba(4, 22, 12, 0.92) !important;
}
html[data-mobile-shell=true] #court .court-labels[data-stage=waiting][data-ten-compact=true] button.court-nameplate[data-waiting-seated=true]:not(.ready),
html[data-mobile-shell=true] #court .court-labels[data-stage=waiting][data-ten-compact=true] button.court-nameplate[data-waiting-seated=true]:not(.ready) .court-label-seat,
html[data-mobile-shell=true] #court .court-labels[data-stage=waiting][data-ten-compact=true] button.court-nameplate[data-waiting-seated=true]:not(.ready) .court-label-nick {
  color: #f7f3ea !important;
  text-shadow: 0 1px 2px #080a10 !important;
}

/* web/src/cdk-panel.css */
.avalon-document.cdk-panel {
  box-sizing: border-box;
  width: min(600px, 94vw);
  max-height: min(84dvh, 560px);
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
}
.cdk-form {
  display: flex;
  gap: 8px;
  align-items: center;
}
.cdk-form input {
  flex: 1;
  min-width: 0;
  font-size: 16px;
  height: 44px;
}
.cdk-panel .avalon-button {
  min-height: 44px;
}
.cdk-history {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #aea18c #211e1b;
}
.cdk-history p,
.cdk-status {
  margin: 4px 0;
}
html[data-mobile-shell=true] .avalon-document.cdk-panel {
  zoom: 1;
  max-height: calc(var(--mobile-viewport-height,100dvh) - 16px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  padding: 10px 16px;
}
html[data-mobile-shell=true] .cdk-panel .document-close {
  min-width: 44px;
  min-height: 44px;
}

/* web/src/match-roster-view.css */
#game .v4-expedition-hud[data-roster-polish=true] {
  gap: 6px !important;
  margin-top: 2px !important;
  align-items: center !important;
  max-width: calc(100vw - 28px) !important;
}
#game .v4-expedition-hud[data-roster-polish=true] .v4-exp-chip {
  width: calc(72 * var(--v4-u)) !important;
  height: auto !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 0 !important;
}
#game .v4-expedition-hud[data-roster-polish=true] .v4-exp-avatar,
#game .v4-expedition-hud[data-roster-polish=true] .v4-exp-avatar > .original-portrait,
#game .v4-expedition-hud[data-roster-polish=true] .v4-exp-avatar .original-portrait > canvas {
  display: block !important;
  width: calc(64 * var(--v4-u)) !important;
  height: calc(64 * var(--v4-u)) !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: contain !important;
  margin: 0 !important;
  image-rendering: pixelated;
}
#game .v4-expedition-hud[data-roster-polish=true] .v4-exp-nick {
  display: block;
  width: 100%;
  font: calc(13 * var(--v4-u))/1.2 AvalonPixel, monospace;
  text-align: center;
  color: #f3e5c6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: none !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  text-shadow: 0 2px 2px #000;
}
#game .v4-expedition-hud[data-roster-polish=true] .v4-exp-crown {
  top: 0 !important;
  z-index: 2;
}
#game .v4-expedition-hud[data-roster-polish=true] .v4-exp-sword {
  position: absolute;
  right: 0;
  top: calc(28 * var(--v4-u));
  z-index: 2;
}
#game .v4-expedition-hud[data-roster-polish=true] .v4-exp-slot-empty {
  width: calc(64 * var(--v4-u)) !important;
  height: calc(36 * var(--v4-u)) !important;
  box-sizing: border-box;
}
#game .game-actions:has(.selection-dock.v4-command-deck[data-roster-polish=true][data-collapsed=false]) {
  position: fixed !important;
  inset: calc(50% + 32px) 12px auto !important;
  transform: translateY(-50%) !important;
  max-height: calc(100dvh - 150px) !important;
  justify-content: center !important;
}
#game .game-actions:has(.selection-dock.v4-command-deck[data-roster-polish=true][data-collapsed=true]) {
  position: fixed !important;
  inset: auto 12px max(10px, env(safe-area-inset-bottom)) !important;
  transform: none !important;
  justify-content: flex-end !important;
}
#game .selection-dock.v4-command-deck[data-roster-polish=true] {
  --pick-art-size:min(calc(96 * var(--v4-u)),calc((100vw - 72px)/var(--roster-columns)));
  width: min(calc((var(--roster-columns)*128 + 28) * var(--v4-u)), calc(100vw - 24px)) !important;
  max-height: calc(100dvh - 150px) !important;
  padding: calc(8 * var(--v4-u)) calc(10 * var(--v4-u)) !important;
  gap: calc(6 * var(--v4-u)) !important;
}
#game .selection-dock.v4-command-deck[data-roster-polish=true][data-collapsed=true] {
  width: min(calc(460 * var(--v4-u)), calc(100vw - 24px)) !important;
}
#game .selection-dock.v4-command-deck[data-roster-polish=true] .selection-roster.v4-tactical-grid {
  grid-template-columns: repeat(var(--roster-columns), minmax(0, 1fr)) !important;
  gap: calc(6 * var(--v4-u)) !important;
  max-height: none !important;
  min-height: 0 !important;
  padding: 0 !important;
  align-items: start;
  align-content: start;
  flex: 0 1 auto !important;
}
#game .selection-dock.v4-command-deck[data-roster-polish=true] .avalon-button.selection-player.v4-tactical-tile {
  height: auto !important;
  min-height: 0 !important;
  padding: 2px !important;
  gap: 2px !important;
  justify-content: flex-start !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  transform: none !important;
}
#game .selection-dock.v4-command-deck[data-roster-polish=true] .avalon-button.selection-player.v4-tactical-tile:focus-visible {
  outline: 2px solid var(--deck-accent-hi) !important;
  outline-offset: 0 !important;
}
#game .selection-dock.v4-command-deck[data-roster-polish=true] .v4-tile-top {
  position: relative;
  justify-content: center !important;
  gap: 8px !important;
  min-height: 16px;
}
#game .selection-dock.v4-command-deck[data-roster-polish=true] .v4-tile-seat,
#game .selection-dock.v4-command-deck[data-roster-polish=true] .v4-tile-self {
  background: none !important;
  border: 0 !important;
  padding: 0 !important;
}
#game .selection-dock.v4-command-deck[data-roster-polish=true] .v4-tile-sprite,
#game .selection-dock.v4-command-deck[data-roster-polish=true] .v4-tile-sprite > .original-portrait,
#game .selection-dock.v4-command-deck[data-roster-polish=true] .v4-tile-sprite .original-portrait > canvas {
  display: block !important;
  width: var(--pick-art-size) !important;
  height: var(--pick-art-size) !important;
  max-width: none !important;
  max-height: none !important;
  min-width: 0 !important;
  flex: none !important;
  object-fit: contain !important;
  margin: 0 !important;
  image-rendering: pixelated;
}
#game .selection-dock.v4-command-deck[data-roster-polish=true] .v4-tile-sprite::before {
  content: "";
  position: absolute;
  left: 10%;
  right: 10%;
  bottom: 3%;
  height: 11%;
  background: #a8853c55;
  border-radius: 50%;
  box-shadow: 0 0 9px #d2aa4c44;
  pointer-events: none;
}
#game .selection-dock.v4-command-deck[data-roster-polish=true] .v4-tile-sprite > .original-portrait {
  position: relative;
  z-index: 1;
}
#game .selection-dock.v4-command-deck[data-roster-polish=true] .v4-tactical-tile[aria-pressed=true] .v4-tile-sprite::before {
  background: #f5ce6688;
  box-shadow: 0 0 14px #ffd97799;
}
#game .selection-dock.v4-command-deck[data-roster-polish=true] .v4-tile-name {
  font-size: calc(14 * var(--v4-u));
  line-height: 1.25;
  background: none !important;
  border: 0 !important;
  padding: 0 !important;
  box-shadow: none !important;
  text-shadow: 0 2px 3px #000;
}
#game .selection-dock.v4-command-deck[data-roster-polish=true] .v4-token-check.v4-tile-seal {
  z-index: 2;
  right: 0 !important;
  bottom: 3px !important;
  width: 22px !important;
  height: 22px !important;
}
#game .selection-dock.v4-command-deck[data-roster-polish=true] .v4-command-head {
  padding-bottom: 4px !important;
}
#game .selection-dock.v4-command-deck[data-roster-polish=true] .v4-command-footer {
  padding-top: 2px !important;
}
@media (max-height: 620px) {
  #game .v4-expedition-hud[data-roster-polish=true] .v4-exp-chip {
    width: 48px !important;
  }
  #game .v4-expedition-hud[data-roster-polish=true] .v4-exp-avatar,
  #game .v4-expedition-hud[data-roster-polish=true] .v4-exp-avatar > .original-portrait,
  #game .v4-expedition-hud[data-roster-polish=true] .v4-exp-avatar .original-portrait > canvas {
    width: 44px !important;
    height: 44px !important;
  }
  #game .v4-expedition-hud[data-roster-polish=true] .v4-exp-nick {
    font-size: 11px;
  }
  #game .selection-dock.v4-command-deck[data-roster-polish=true] {
    --pick-art-size:min(56px,calc((100vw - 72px)/var(--roster-columns)));
    max-height: calc(100dvh - 105px) !important;
    padding: 5px 8px !important;
    gap: 4px !important;
  }
  #game .game-actions:has(.selection-dock.v4-command-deck[data-roster-polish=true][data-collapsed=false]) {
    inset: calc(50% + 35px) 10px auto !important;
    max-height: calc(100dvh - 105px) !important;
  }
  #game .selection-dock.v4-command-deck[data-roster-polish=true] .v4-tile-name {
    font-size: 12px;
  }
  #game .selection-dock.v4-command-deck[data-roster-polish=true] .v4-tile-top {
    min-height: 12px;
  }
}
#game .v4-expedition-hud[data-roster-polish=true] {
  padding: 3px 8px 5px !important;
  background:
    linear-gradient(
      180deg,
      #f7edcce8,
      #dfcc9ee8) !important;
  border: 2px double #b18b4d !important;
  border-radius: 9px !important;
  box-shadow: 0 4px 14px #0008, inset 0 0 0 1px #fff2cd !important;
}
#game .v4-expedition-hud[data-roster-polish=true] .v4-exp-nick {
  color: #33424b;
  text-shadow: 0 1px #fff1c4;
}
#game .v4-expedition-hud[data-roster-polish=true] .v4-exp-tag {
  color: #66512d;
  text-shadow: none;
}
#game[data-stage=game_result] .result-pane.v4-result-gallery[data-roster-polish=true] {
  --result-card-width:clamp(96px,calc((100vw - 88px)/var(--result-columns) - 12px),168px) !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  justify-content: safe center !important;
}
#game[data-stage=game_result] .result-pane.v4-result-gallery[data-roster-polish=true] .result-card-row {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  gap: 12px !important;
}
#game[data-stage=game_result] .result-pane.v4-result-gallery[data-roster-polish=true] .result-roles {
  flex: 0 0 auto !important;
  overflow: visible !important;
}
#game .card-choice.v4-card-dock[data-has-selection=true] .choice-card[aria-pressed=false]:not(:disabled) {
  opacity: .84 !important;
  filter: none !important;
}
@media (hover: hover) and (pointer: fine) {
  #game .card-choice.v4-card-dock[data-has-selection=true] .choice-card[aria-pressed=false]:not(:disabled):is(:hover, :focus-visible) {
    opacity: 1 !important;
  }
}
#game .card-choice.v4-card-dock[data-has-selection=true] .choice-card[aria-pressed=false]:not(:disabled):is(:focus-visible) {
  opacity: 1 !important;
}
#game .v4-expedition-hud[data-roster-polish=true] {
  --exp-slot-w:calc(72 * var(--v4-u));
  --exp-slot-h:calc(80 * var(--v4-u));
}
#game .v4-expedition-hud[data-roster-polish=true] :is(.v4-exp-chip, .v4-exp-slot-empty) {
  width: var(--exp-slot-w) !important;
  height: var(--exp-slot-h) !important;
  min-height: var(--exp-slot-h) !important;
  flex: 0 0 var(--exp-slot-w) !important;
  box-sizing: border-box !important;
  padding: 0 !important;
  justify-content: center !important;
  align-items: center !important;
}
#game .v4-expedition-hud[data-roster-polish=true] .v4-exp-slots {
  align-items: center !important;
}
@media (max-height: 620px) {
  #game .v4-expedition-hud[data-roster-polish=true] {
    --exp-slot-w:48px;
    --exp-slot-h:58px;
  }
}
#game:is([data-stage=vote_reveal], [data-stage=mission_reveal]) .game-actions:has(> .stage-announcement.v4-pixel-banner) {
  z-index: 36 !important;
}
#game:is([data-stage=vote_reveal], [data-stage=mission_reveal]) .game-actions > .stage-announcement.v4-pixel-banner {
  z-index: 36 !important;
  top: 50% !important;
  translate: -50% -50% !important;
}
#game[data-stage=mission_reveal] .game-actions > .waiting-note.v4-magic-subnote {
  top: calc(50% + 42 * var(--v4-u)) !important;
  z-index: 36 !important;
}
#game .v5-command-bar[data-theme=nominate] {
  --command-row-h:max(70px,calc(70 * var(--v4-u)));
}
#game .v5-command-bar[data-theme=nominate] > .v5-command-row {
  grid-template-columns: minmax(0, 1fr) auto auto;
  min-height: var(--command-row-h);
  height: var(--command-row-h);
}
#game .v5-command-bar[data-theme=nominate] .v5-command-slots {
  align-items: center;
  gap: max(8px, calc(8 * var(--v4-u)));
}
#game .v5-command-bar[data-theme=nominate] .avalon-button.v5-slot {
  width: max(44px, calc(50 * var(--v4-u))) !important;
  height: max(44px, calc(50 * var(--v4-u))) !important;
}
#game .v5-command-bar .v5-roster-crown {
  display: inline-grid;
  place-items: center;
  flex: 0 0 12px;
  width: 12px;
  height: 12px;
  color: #ffe199;
}
#game .v5-command-bar .v5-roster-crown svg {
  display: block;
  width: 100%;
  height: 100%;
}
#game .v5-command-bar .v5-roster-meta {
  align-items: center;
}
#game .v5-command-bar .v5-sword-candidate {
  display: grid !important;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 4px;
  position: relative;
  box-sizing: border-box;
  min-width: 72px !important;
  min-height: 44px !important;
  height: 44px !important;
  max-width: 82px;
  width: clamp(72px, calc(82 * var(--v4-u)), 82px) !important;
  margin: 0 !important;
  padding: 3px 5px !important;
  border: 1px solid #83afca99 !important;
  border-radius: 4px !important;
  background: linear-gradient(#343849, #242839) !important;
  color: #e0f2fb !important;
  text-align: left;
  text-shadow: 0 1px #111 !important;
  box-shadow: inset 0 1px #d3ebff24 !important;
  font: 12px/1.15 AvalonPixel, monospace !important;
  letter-spacing: 0 !important;
  overflow: hidden;
}
#game .v5-command-bar .v5-sword-candidate::before,
#game .v5-command-bar .v5-sword-candidate::after {
  content: none !important;
}
#game .v5-command-bar .v5-sword-candidate[aria-pressed=true] {
  background: linear-gradient(#edfbff, #91cdf0) !important;
  border-color: #f2fbff !important;
  color: #142739 !important;
  text-shadow: none !important;
  box-shadow: inset 0 0 0 1px #fff8, 0 0 9px #7cc2f277 !important;
}
#game .v5-command-bar .v5-sword-candidate .v5-slot-portrait {
  position: relative;
  inset: auto;
  width: 30px;
  height: 36px;
}
#game .v5-command-bar .v5-sword-candidate .v5-slot-seat {
  z-index: 1;
}
#game .v5-command-bar .v5-sword-candidate .v5-sword-name {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#game .v5-command-bar .v5-command-back {
  margin: 0 !important;
  width: max-content !important;
  min-width: 44px !important;
  min-height: 44px !important;
  height: 44px !important;
  padding-inline: 8px !important;
}
@media (hover: hover) and (pointer: fine) {
  @media (hover: hover) and (pointer: fine) {
    #game .v5-command-bar[data-theme=nominate] .v5-slot[data-filled=true]:hover {
      border-color: #ff8e83 !important;
      box-shadow: inset 0 0 0 1px #4f1918, 0 0 8px #ef70666f !important;
    }
  }
}
@media (hover: none), (pointer: coarse) {
  @media (hover: hover) and (pointer: fine) {
    #game .v5-command-bar[data-theme=nominate] .v5-slot[data-filled=true]:not(:active):hover {
      transform: none;
      box-shadow: inset 0 0 0 1px #000b, 0 2px 0 #050307 !important;
    }
  }
  #game .v5-command-bar[data-theme=nominate] .v5-slot[data-filled=true]:active,
  #game .v5-command-bar .v5-sword-candidate:active {
    transform: scale(.96);
    filter: brightness(1.2);
  }
}
@media (orientation: landscape) and (max-height: 620px) {
  html[data-mobile-shell=true] #game .game-actions:has(> .v5-command-bar) {
    position: fixed !important;
    inset: auto 0 0 !important;
    width: auto !important;
    height: auto !important;
    max-height: none !important;
    padding: 0 !important;
    transform: none !important;
    translate: none !important;
    rotate: none !important;
    scale: none !important;
    filter: none !important;
    backdrop-filter: none !important;
    perspective: none !important;
    contain: none !important;
    will-change: auto !important;
    overflow: visible !important;
  }
  html[data-mobile-shell=true] #game .v5-command-bar {
    --command-row-h:62px;
    --command-trim:#dbb360;
    position: fixed !important;
    inset: auto 0 0 !important;
    box-sizing: border-box;
    transform: none !important;
    translate: none !important;
    overflow: visible !important;
    pointer-events: auto !important;
    margin: 0 !important;
    width: auto !important;
    max-width: none !important;
    padding: 6px max(12px, env(safe-area-inset-right)) max(6px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
    background: linear-gradient(#1c1722, #100d15);
    border-top: 2px solid var(--command-trim);
    box-shadow: inset 0 1px #fff0bc23, 0 -5px 16px #08060bab;
    animation: none;
  }
  html[data-mobile-shell=true] #game .v5-command-bar:is([data-theme=assassinate], [data-theme=recruit]) {
    --command-trim:#da716a;
    background: linear-gradient(#24151b, #160f15);
  }
  html[data-mobile-shell=true] #game .v5-command-bar > .v5-command-row {
    grid-template-columns: minmax(82px, 1fr) auto auto;
    gap: 8px;
    width: 100%;
    max-width: 744px;
    margin: 0 auto;
    padding: 0;
    min-height: var(--command-row-h);
    height: var(--command-row-h);
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
  }
  html[data-mobile-shell=true] #game .v5-command-row::before,
  html[data-mobile-shell=true] #game .v5-command-row::after {
    content: none;
  }
  html[data-mobile-shell=true] #game .v5-command-head {
    display: flex;
    gap: 2px;
  }
  html[data-mobile-shell=true] #game .v5-command-title {
    font-size: 13px;
    letter-spacing: 0;
  }
  html[data-mobile-shell=true] #game .v5-command-hint {
    font-size: 11px;
  }
  html[data-mobile-shell=true] #game .v5-command-actions,
  html[data-mobile-shell=true] #game .v5-command-slots {
    gap: 8px;
  }
  html[data-mobile-shell=true] #game .v5-command-bar .avalon-button:is(.v5-slot, .v5-command-list, .v5-command-skip, .v5-command-submit, .v5-command-back, .v5-roster-close) {
    min-width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
  }
  html[data-mobile-shell=true] #game .v5-command-bar .avalon-button.v5-slot {
    width: 44px !important;
  }
  html[data-mobile-shell=true] #game .v5-command-bar .avalon-button.v5-command-list {
    width: 44px !important;
    justify-content: center;
    padding: 0 !important;
  }
  html[data-mobile-shell=true] #game .v5-command-bar .avalon-button.v5-command-submit {
    min-width: 96px !important;
  }
  html[data-mobile-shell=true] #game .v5-command-bar .v5-command-roster {
    position: absolute !important;
    inset: auto max(12px, env(safe-area-inset-right)) calc(100% + 8px) max(12px, env(safe-area-inset-left)) !important;
    max-width: 744px;
    margin-inline: auto;
    padding: 8px;
  }
  html[data-mobile-shell=true] #game .v5-command-roster .v5-roster-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    grid-auto-rows: 46px;
    gap: 8px;
    max-height: none;
  }
  html[data-mobile-shell=true] #game .v5-command-roster .avalon-button.v5-roster-tile {
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 4px;
    min-width: 44px !important;
    height: 46px !important;
  }
  html[data-mobile-shell=true] #game .v5-roster-portrait {
    width: 30px;
    height: 34px;
  }
  html[data-mobile-shell=true] #game .v5-roster-meta {
    gap: 3px;
  }
  html[data-mobile-shell=true] #game .v5-roster-name {
    font-size: 12px;
  }
}
@media (orientation: landscape) and (max-height: 620px) {
  html[data-mobile-shell=true] #game .v5-command-bar .v5-sword-candidate {
    width: 72px !important;
  }
}

/* web/src/trickster-presentation.css */
.identity-layout.trickster-identity-layout {
  --trickster-preset-top:calc(var(--identity-layout-top) + var(--identity-layout-height) + var(--identity-layout-gap));
  --trickster-preset-clue-bottom:calc(var(--identity-layout-top) + var(--identity-layout-height));
  --trickster-control-height:48px;
  --trickster-control-font:16px;
}
#game[data-stage=reveal] .identity-layout.trickster-identity-layout > .identity-confirm,
#modals .identity-review .identity-layout.trickster-identity-layout > .identity-confirm {
  top: var(--trickster-preset-top) !important;
  height: var(--trickster-control-height) !important;
  min-height: var(--trickster-control-height) !important;
  font-size: var(--trickster-control-font) !important;
}
.identity-layout.trickster-identity-layout > .report-preset {
  position: absolute;
  left: var(--identity-layout-clue-left);
  top: var(--trickster-preset-top);
  width: var(--identity-layout-clue-width);
  margin: 0;
  padding: 0;
  text-align: center;
}
#game[data-stage=reveal] .identity-layout.trickster-identity-layout > .identity-clue-column,
#modals .identity-review .identity-layout.trickster-identity-layout > .identity-clue-column {
  height: calc(var(--trickster-preset-clue-bottom) - var(--identity-layout-clue-top));
}
.identity-layout.trickster-identity-layout .identity-clue-column > .identity-clues {
  margin: 0 !important;
}
.trickster-preset-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.identity-layout.trickster-identity-layout .trickster-preset-buttons > .avalon-button {
  width: 100%;
  min-width: 0;
  height: var(--trickster-control-height) !important;
  min-height: var(--trickster-control-height) !important;
  margin: 0;
  padding: 0 3px;
  white-space: nowrap;
  font-size: var(--trickster-control-font) !important;
}
.identity-layout.trickster-identity-layout [data-preset-choice=good] {
  --trickster-preset-ink:#16478e;
}
.identity-layout.trickster-identity-layout [data-preset-choice=evil] {
  --trickster-preset-ink:#9e1e1e;
}
.identity-layout.trickster-identity-layout .trickster-preset-buttons > .avalon-button[data-preset-choice] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--trickster-preset-ink) !important;
  text-shadow: none !important;
  background: linear-gradient(#dac08a, #b38e4f) !important;
  border-color: #725833 !important;
  box-shadow: inset 0 1px #e7d0a1, 0 2px #221808 !important;
  font-weight: 400;
}
.identity-layout.trickster-identity-layout .trickster-preset-buttons > .avalon-button[data-preset-choice][aria-pressed=true] {
  background:
    linear-gradient(
      #fff4bb,
      #f1cd65 48%,
      #d89a34) !important;
  border-color: #f8d47b !important;
  box-shadow: inset 0 0 0 1px #fff7d1, 0 2px #322014 !important;
  font-weight: 700;
}
.trickster-preset-icon {
  width: 12px;
  height: 14px;
  flex: none;
  display: block;
  background: currentColor;
  image-rendering: pixelated;
  clip-path: polygon(0 0, 100% 0, 100% 57%, 83% 57%, 83% 72%, 67% 72%, 67% 86%, 55% 86%, 55% 100%, 45% 100%, 45% 86%, 33% 86%, 33% 72%, 17% 72%, 17% 57%, 0 57%);
}
.identity-layout.trickster-identity-layout .trickster-preset-saved > .trickster-preset-faction {
  background: none !important;
  padding: 0 !important;
  border-radius: 0;
}
.identity-layout.trickster-identity-layout .trickster-preset-saved > .trickster-preset-faction[data-preset-choice=good] {
  color: #7ec4ff !important;
}
.identity-layout.trickster-identity-layout .trickster-preset-saved > .trickster-preset-faction[data-preset-choice=evil] {
  color: #ff7d7d !important;
}
.trickster-preset-saved {
  min-height: 16px;
  margin: 6px 0 0 !important;
  color: #ffe6ac;
  text-shadow: 0 2px 3px #080612;
  font: 12px/1.35 AvalonPixel, monospace;
  white-space: nowrap;
}
@media (min-height: 621px) and (hover: hover) and (pointer: fine) {
  .identity-layout.trickster-identity-layout .trickster-preset-saved {
    font-size: clamp(11px, calc(var(--identity-layout-clue-width) / 15), 17px) !important;
  }
}
@media (max-height: 620px) {
  .identity-layout.trickster-identity-layout {
    --trickster-control-height:44px;
    --trickster-control-font:14px;
    --trickster-preset-top:calc(var(--trickster-preset-clue-bottom) + 5px);
  }
  .trickster-preset-saved {
    margin-top: 2px !important;
    min-height: 12px;
    font-size: 11px !important;
    line-height: 1.12 !important;
  }
}
:is(#game, #modals)[data-identity-stacked=true] .identity-layout.trickster-identity-layout > .identity-clue-column {
  height: var(--identity-layout-clue-height);
}
:is(#game, #modals)[data-identity-stacked=true] .identity-layout.trickster-identity-layout > .report-preset {
  top: calc(var(--identity-layout-clue-top) + var(--identity-layout-clue-height) + 10px);
}
#game[data-stage=inspection] .game-actions:has(> .trickster-inspection-stack) {
  inset: 100px 16px 16px !important;
  max-width: none !important;
}
.trickster-inspection-stack {
  display: grid;
  grid-template-columns: minmax(0, max-content);
  gap: 14px;
  flex: none;
  max-width: 100%;
}
#game[data-stage=inspection] .trickster-inspection-stack .card-choice[data-kind=inspection] .choice-card {
  width: min(180px, calc((100dvh - 200px) * 180 / 276), calc((100vw - 72px)/2)) !important;
}
#game[data-stage=inspection] .game-actions > .trickster-inspection-stack > .trickster-inspection-countdown {
  box-sizing: border-box;
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: .38em;
  width: 100%;
  height: 48px;
  min-height: 48px;
  padding: 0 6px !important;
  margin: 0 !important;
  color: #f7ead0 !important;
  background: rgba(14, 12, 20, .92) !important;
  border: 2px solid #d5a64d !important;
  border-radius: 6px;
  box-shadow: 0 0 0 1px #161019, 0 3px 7px #0806129e;
  font: 16px/1 AvalonPixel, monospace !important;
  white-space: nowrap;
  pointer-events: none;
}
.trickster-inspection-main {
  display: flex;
  align-items: center;
  gap: .35em;
}
.trickster-inspection-guide {
  color: #cbb688;
  font-size: .8em;
}
.trickster-inspection-countdown .trickster-inspection-time {
  color: #ffe184;
}
.trickster-inspection-countdown .trickster-inspection-alignment {
  color: #ffdd83;
}
.trickster-inspection-countdown[data-alignment=good] .trickster-inspection-alignment {
  color: #a1d6ff;
}
.trickster-inspection-countdown[data-alignment=evil] .trickster-inspection-alignment {
  color: #ffaeab;
}
@media (max-height: 620px) {
  #game[data-stage=inspection] .game-actions:has(> .trickster-inspection-stack) {
    inset: 96px 12px 12px !important;
  }
  .trickster-inspection-stack {
    gap: 12px;
  }
  #game[data-stage=inspection] .trickster-inspection-stack .card-choice[data-kind=inspection] .choice-card {
    width: min(150px, calc((100dvh - 167px) * 180 / 276), calc((100vw - 56px)/2)) !important;
  }
  #game[data-stage=inspection] .game-actions > .trickster-inspection-stack > .trickster-inspection-countdown {
    height: 42px;
    min-height: 42px;
    font-size: 14px !important;
    flex-direction: column;
    gap: 2px;
  }
}
#game[data-stage=inspection] .trickster-inspection-stack .card-choice[data-kind=inspection] .choice-card {
  filter: none !important;
  image-rendering: pixelated;
}
#game[data-stage=inspection] .trickster-inspection-stack .card-choice[data-kind=inspection] .choice-card[aria-pressed=true] {
  outline: 2px solid #ffe29b !important;
  outline-offset: 3px !important;
}
#game[data-stage=reveal] .identity-layout.trickster-identity-layout > .identity-confirm,
#modals .identity-review .identity-layout.trickster-identity-layout > .identity-confirm,
.identity-layout.trickster-identity-layout .trickster-preset-buttons > .avalon-button {
  transform: none !important;
}
#game[data-stage=inspection] .trickster-inspection-stack .card-choice[data-kind=inspection] .choice-card > .court-card {
  transform: none !important;
  box-shadow: none !important;
  filter: none !important;
}
#game[data-stage=inspection] .trickster-inspection-stack .card-choice[data-kind=inspection] .choice-card[aria-pressed=true] {
  outline-offset: -2px !important;
}
#game[data-stage=inspection] .trickster-inspection-stack .card-choice[data-kind=inspection] .choice-card[aria-pressed=true] > .court-card {
  outline: 2px solid #ffe29b !important;
  outline-offset: -2px !important;
}

/* web/src/early-assassination.css */
#game .game-toolbar > .ea-pillar {
  position: absolute;
  left: 0;
  top: calc(100% + 64 * var(--v4-u));
  z-index: 6;
  width: calc(44 * var(--v4-u));
  margin: 0 !important;
  padding: calc(6 * var(--v4-u)) calc(4 * var(--v4-u)) calc(8 * var(--v4-u));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: calc(6 * var(--v4-u));
  background:
    linear-gradient(
      180deg,
      rgba(16, 12, 22, 0.86) 0%,
      rgba(10, 8, 16, 0.90) 100%);
  border: calc(1.2px * var(--v4-u)) solid rgba(168, 124, 62, 0.52);
  border-radius: calc(9 * var(--v4-u));
  box-shadow: 0 calc(6 * var(--v4-u)) calc(18 * var(--v4-u)) rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 226, 160, 0.14);
  cursor: pointer;
  pointer-events: auto;
  box-sizing: border-box;
  transition:
    transform 160ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    opacity 180ms ease;
}
#game .ea-pillar[hidden] {
  display: none !important;
}
#game .ea-pillar:hover:not([data-locked=true]) {
  transform: translateY(-2px);
  border-color: rgba(242, 186, 86, 0.88);
  box-shadow: 0 calc(8 * var(--v4-u)) calc(22 * var(--v4-u)) rgba(0, 0, 0, 0.72), 0 0 calc(14 * var(--v4-u)) rgba(226, 54, 76, 0.35);
}
#game .ea-pillar[data-voted=true] {
  border-color: rgba(235, 76, 92, 0.85);
  box-shadow: 0 calc(6 * var(--v4-u)) calc(20 * var(--v4-u)) rgba(0, 0, 0, 0.72), 0 0 calc(16 * var(--v4-u)) rgba(235, 46, 68, 0.45);
}
#game .ea-pillar[data-locked=true] {
  opacity: 0.62;
  filter: saturate(0.55) brightness(0.84);
  border-color: rgba(110, 102, 122, 0.55);
}
#game .ea-pillar[data-burst=true] {
  border-color: #ffe28a !important;
  box-shadow: 0 0 calc(28 * var(--v4-u)) rgba(255, 58, 84, 0.95), 0 0 calc(12 * var(--v4-u)) rgba(255, 224, 130, 0.85) !important;
  filter: brightness(1.38) !important;
}
.ea-dagger-wrap {
  display: grid;
  place-items: center;
  width: calc(26 * var(--v4-u));
  height: calc(32 * var(--v4-u));
  flex: none;
}
.ea-dagger-svg {
  width: 100%;
  height: 100%;
  display: block;
  image-rendering: pixelated;
  filter: drop-shadow(0 calc(2 * var(--v4-u)) calc(3 * var(--v4-u)) rgba(0, 0, 0, 0.8));
}
.ea-dg-gold {
  fill: #d6a94b;
}
.ea-dg-jewel {
  fill: #8b3b4e;
}
.ea-dg-grip {
  fill: #3f2b22;
}
.ea-dg-guard-hi {
  fill: #bfa065;
}
.ea-dg-guard {
  fill: #6e552b;
}
.ea-dg-blade-dark {
  fill: #5e687c;
}
.ea-dg-blade-mid {
  fill: #9ba6ba;
}
.ea-dg-blade-hi {
  fill: #dce5f4;
}
.ea-dg-fuller {
  fill: #3b4252;
}
[data-voted=true] .ea-dg-gold {
  fill: #ffe082;
}
[data-voted=true] .ea-dg-jewel {
  fill: #ff475e;
}
[data-voted=true] .ea-dg-guard-hi {
  fill: #f5c85c;
}
[data-voted=true] .ea-dg-blade-dark {
  fill: #8c1124;
}
[data-voted=true] .ea-dg-blade-mid {
  fill: #e62842;
}
[data-voted=true] .ea-dg-blade-hi {
  fill: #ff94a0;
}
[data-voted=true] .ea-dg-fuller {
  fill: #ffe082;
}
[data-voted=true] .ea-dagger-svg {
  filter: drop-shadow(0 0 calc(6 * var(--v4-u)) rgba(255, 56, 82, 0.85)) drop-shadow(0 calc(2 * var(--v4-u)) calc(3 * var(--v4-u)) rgba(0, 0, 0, 0.85));
}
.ea-gem-rail {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(7 * var(--v4-u));
}
.ea-gem-rail::before {
  content: "";
  position: absolute;
  top: calc(-4 * var(--v4-u));
  bottom: calc(6 * var(--v4-u));
  left: 50%;
  width: max(1px, calc(1.5 * var(--v4-u)));
  transform: translateX(-50%);
  background:
    linear-gradient(
      180deg,
      rgba(196, 152, 74, 0.65),
      rgba(128, 92, 42, 0.35));
  z-index: 0;
}
.ea-gem-slot {
  position: relative;
  z-index: 1;
  width: calc(22 * var(--v4-u));
  height: calc(22 * var(--v4-u));
  display: grid;
  place-items: center;
  flex: none;
}
.ea-gem-svg {
  width: 100%;
  height: 100%;
  display: block;
  image-rendering: pixelated;
}
.ea-gem-slot.is-empty .ea-gem-rim {
  fill: #4a4058;
}
.ea-gem-slot.is-empty .ea-gem-body {
  fill: #1c1826;
}
.ea-gem-slot.is-empty .ea-gem-socket {
  fill: #0d0a14;
}
.ea-gem-slot.is-lit .ea-gem-rim {
  fill: #ffd678;
}
.ea-gem-slot.is-lit .ea-gem-body {
  fill: #c71835;
}
.ea-gem-slot.is-lit .ea-gem-hi {
  fill: #ff4760;
}
.ea-gem-slot.is-lit .ea-gem-spec {
  fill: #ffe6eb;
}
.ea-gem-slot.is-lit .ea-gem-deep {
  fill: #69091b;
}
.ea-gem-slot.is-lit .ea-gem-svg {
  filter: drop-shadow(0 0 calc(5 * var(--v4-u)) rgba(255, 42, 72, 0.82));
  animation: ea-gem-ignite 280ms cubic-bezier(.16, 1, .3, 1) both;
}
#game .ea-pillar[data-near-full=true] .ea-gem-slot.is-lit .ea-gem-svg {
  animation: ea-gem-breathe 1.35s ease-in-out infinite;
}
.ea-gem-slot.is-unknown .ea-gem-rim {
  fill: #7f5fb3;
}
.ea-gem-slot.is-unknown .ea-gem-body {
  fill: #2a1b42;
}
.ea-gem-slot.is-unknown .ea-gem-q {
  fill: #d6c0ff;
}
.ea-gem-slot.is-unknown .ea-gem-svg {
  filter: drop-shadow(0 0 calc(4 * var(--v4-u)) rgba(140, 96, 212, 0.55));
}
.ea-lock-badge {
  position: absolute;
  right: calc(-4 * var(--v4-u));
  bottom: calc(-4 * var(--v4-u));
  width: calc(16 * var(--v4-u));
  height: calc(16 * var(--v4-u));
  border-radius: 50%;
  background: #1a1724;
  border: 1px solid #8a829c;
  color: #c8c2d6;
  display: grid;
  place-items: center;
  z-index: 3;
}
.ea-lock-svg {
  width: 65%;
  height: 65%;
  display: block;
}
@keyframes ea-gem-ignite {
  0% {
    transform: scale(0.75);
    filter: brightness(2.0);
  }
  100% {
    transform: scale(1);
  }
}
@keyframes ea-gem-breathe {
  0%, 100% {
    transform: scale(1);
    filter: drop-shadow(0 0 calc(5 * var(--v4-u)) rgba(255, 42, 72, 0.78));
  }
  50% {
    transform: scale(1.1);
    filter: brightness(1.22) drop-shadow(0 0 calc(9 * var(--v4-u)) rgba(255, 78, 98, 1));
  }
}
@media (max-height: 620px) {
  #game .game-toolbar > .ea-pillar {
    left: 0;
    top: calc(100% + 56px);
    width: 44px;
    padding: 4px 4px 5px;
    gap: 4px;
    border-radius: 7px;
  }
  .ea-dagger-wrap {
    width: 20px;
    height: 24px;
  }
  .ea-gem-rail {
    gap: 4px;
  }
  .ea-gem-slot {
    width: 16px;
    height: 16px;
  }
  .ea-lock-badge {
    width: 14px;
    height: 14px;
    right: -3px;
    bottom: -3px;
  }
}
#modals .ea-confirm-document::before,
#modals .ea-confirm-document::after {
  content: none !important;
  display: none !important;
}
#modals .ea-confirm-document {
  width: min(410px, calc((100vw - 32px) / var(--v4-ui-scale, 1))) !important;
  max-width: min(410px, calc((100vw - 32px) / var(--v4-ui-scale, 1))) !important;
  padding: 18px 22px 20px !important;
  display: flex !important;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  background:
    linear-gradient(
      180deg,
      rgba(32, 22, 34, 0.97) 0%,
      rgba(16, 11, 20, 0.98) 100%) !important;
  border: 2px solid #c99a44 !important;
  border-radius: 10px !important;
  box-shadow:
    0 0 0 1px #0b070e,
    0 18px 46px rgba(0, 0, 0, 0.82),
    inset 0 1px 0 rgba(255, 234, 176, 0.22) !important;
  color: #f8ecd2 !important;
}
#modals .ea-confirm-document > .document-title {
  width: 100%;
  margin: 0 !important;
  padding: 0 28px 8px !important;
  border-bottom: 1px solid rgba(212, 168, 86, 0.36) !important;
  font: 400 19px/1.2 AvalonPixel, monospace !important;
  color: #ffe294 !important;
  text-shadow: 0 1px 2px #09060b !important;
}
.ea-confirm-emblem {
  width: 34px;
  height: 42px;
  display: grid;
  place-items: center;
  margin-top: 2px;
}
.ea-confirm-copy {
  margin: 0 !important;
  font: 400 16px/1.45 AvalonPixel, monospace;
  color: #fff3da;
}
.ea-confirm-sub {
  margin: 0 !important;
  font: 400 13px/1.4 AvalonPixel, monospace;
  color: #c2b296;
}
.ea-confirm-sub.is-highlight {
  color: #ff9aa6;
  background: rgba(206, 36, 62, 0.16);
  border: 1px solid rgba(235, 76, 94, 0.45);
  border-radius: 5px;
  padding: 4px 10px;
}
.ea-confirm-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 6px;
  width: 100%;
}
.ea-confirm-actions > .avalon-button {
  min-width: 112px;
  height: 38px !important;
  min-height: 38px !important;
  font-size: 14.5px !important;
}
html[data-dark-blade-freeze="1"] #game {
  filter: grayscale(0.88) contrast(1.18) brightness(0.6);
}
.dbx-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  pointer-events: auto;
  overflow: hidden;
  background: transparent;
}
.dbx-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

/* web/src/changelog.css */
.v6-title-trigger {
  appearance: none;
  position: relative;
  display: inline-flex;
  align-items: flex-start;
  justify-content: center;
  margin: 0;
  padding: calc(4 * var(--v4-u)) calc(12 * var(--v4-u));
  border: 0;
  border-radius: calc(10 * var(--v4-u));
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 180ms cubic-bezier(.22, 1, .36, 1), filter 180ms ease;
}
.v6-title-trigger:focus-visible {
  outline: 2px solid #ffe49c;
  outline-offset: calc(4 * var(--v4-u));
}
@media (hover: hover) and (pointer: fine) {
  .v6-title-trigger:hover {
    transform: translateY(calc(-3 * var(--v4-u)));
  }
  .v6-title-trigger:hover .v6-title-name {
    filter: drop-shadow(0 calc(4 * var(--v4-u)) 0 #170c04) drop-shadow(calc(2 * var(--v4-u)) 0 0 #2a1607) drop-shadow(0 0 calc(24 * var(--v4-u)) rgba(255, 218, 122, .62));
  }
  .v6-title-trigger:hover .cl-ver-badge {
    border-color: #ffe399;
    color: #fff8de;
    box-shadow: 0 calc(2 * var(--v4-u)) 0 #160c05, 0 0 calc(12 * var(--v4-u)) rgba(255, 206, 98, .55);
  }
}
.v6-title-trigger:active {
  transform: translateY(calc(1 * var(--v4-u)));
}
.cl-ver-badge {
  position: absolute;
  top: calc(4 * var(--v4-u));
  right: calc(-48 * var(--v4-u));
  display: inline-flex;
  align-items: center;
  gap: calc(4 * var(--v4-u));
  padding: calc(2 * var(--v4-u)) calc(6 * var(--v4-u)) calc(2 * var(--v4-u)) calc(7 * var(--v4-u));
  border: max(1px, calc(1.5 * var(--v4-u))) solid #c89b46;
  border-radius: calc(3 * var(--v4-u));
  background:
    linear-gradient(
      180deg,
      #2d2015 0%,
      #19110b 100%);
  color: #f3dc9e;
  font: calc(12 * var(--v4-u)) / 1.15 AvalonPixel, monospace;
  letter-spacing: calc(1 * var(--v4-u));
  white-space: nowrap;
  box-shadow: 0 calc(2 * var(--v4-u)) 0 #120904, inset 0 1px 0 rgba(255, 232, 168, .28);
  pointer-events: none;
  transition:
    border-color 160ms ease,
    color 160ms ease,
    box-shadow 160ms ease;
}
.cl-ver-dot {
  display: none;
  width: calc(6 * var(--v4-u));
  height: calc(6 * var(--v4-u));
  background: #ff3342;
  border: max(1px, calc(1 * var(--v4-u))) solid #ffd1d5;
  box-shadow: 0 0 calc(6 * var(--v4-u)) rgba(255, 51, 66, .88);
  flex: none;
  animation: cl-dot-pulse 1.6s steps(4, end) infinite;
}
.v6-title-trigger[data-unread=true] .cl-ver-dot {
  display: inline-block;
}
@keyframes cl-dot-pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: .72;
    transform: scale(.86);
  }
}
html[data-mobile-shell=true] .v6-title-trigger {
  min-height: 44px;
  padding: 4px 10px;
}
html[data-mobile-shell=true] .cl-ver-badge {
  top: 2px;
  right: -38px;
  padding: 2px 5px;
  font-size: 10px;
  letter-spacing: .5px;
  border-width: 1px;
}
html[data-mobile-shell=true] .cl-ver-dot {
  width: 5px;
  height: 5px;
}
#modals .game-document.cl-dialog {
  box-sizing: border-box !important;
  width: min(920px, calc((100vw - 32px) / var(--v4-ui-scale))) !important;
  height: min(650px, calc((100dvh - 32px) / var(--v4-ui-scale))) !important;
  padding: 18px 26px 16px !important;
  gap: 10px !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  text-align: left;
  border: 2px solid #8c6a32 !important;
  border-radius: 10px !important;
}
#modals .game-document.cl-dialog::before,
#modals .game-document.cl-dialog::after {
  content: none !important;
  display: none !important;
}
.cl-dialog > .document-title {
  margin: 0 !important;
  padding-bottom: 8px !important;
  text-align: center;
  letter-spacing: 3px;
  flex: 0 0 auto;
}
.cl-meta-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  flex: 0 0 auto;
  margin-top: -2px;
}
.cl-meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid rgba(138, 104, 48, .55);
  background: rgba(255, 249, 232, .65);
  color: #5b4322;
  font: 12.5px/1.25 AvalonPixel, monospace;
}
.cl-meta-pill.is-new {
  border-color: #c8871c;
  background:
    linear-gradient(
      180deg,
      #fff5cf 0%,
      #f3d78a 100%);
  color: #5e3804;
  box-shadow: 0 1px 4px rgba(164, 112, 20, .24);
}
#modals .game-document.cl-dialog > .cl-scroll-body {
  flex: 0 0 auto !important;
  min-height: 0 !important;
  height: auto !important;
  overflow: visible !important;
  padding: 4px 2px 8px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.cl-pinned-banner {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 13px 16px;
  border-radius: 10px;
  background:
    radial-gradient(
      ellipse 55% 95% at 8% 50%,
      rgba(246, 196, 82, .20),
      transparent 70%),
    linear-gradient(
      135deg,
      #271f34 0%,
      #181322 56%,
      #241a2b 100%);
  border: 1.5px solid #d4a64a;
  box-shadow:
    0 8px 20px rgba(32, 20, 8, .26),
    inset 0 1px 0 rgba(255, 238, 190, .28),
    inset 0 0 0 1px rgba(16, 11, 24, .75);
  color: #f7ebd0;
  flex: 0 0 auto;
}
.cl-pin-emblem {
  width: 54px;
  height: 54px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(
      circle at 50% 42%,
      rgba(255, 212, 98, .28),
      rgba(20, 15, 28, .92) 72%);
  border: 1.5px solid rgba(226, 180, 86, .72);
  box-shadow: 0 4px 10px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 242, 198, .3);
  flex: none;
}
.cl-pin-chest-svg {
  width: 36px;
  height: 36px;
  display: block;
  image-rendering: pixelated;
  shape-rendering: crispEdges;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .65));
}
.cl-pin-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.cl-pin-eyebrow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.cl-pin-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 4px;
  background:
    linear-gradient(
      180deg,
      #fae08e 0%,
      #d49626 100%);
  border: 1px solid #8a560b;
  color: #2b1703;
  font: 700 12px/1.2 AvalonPixel, monospace;
  white-space: nowrap;
  box-shadow: 0 2px 5px rgba(0, 0, 0, .32);
}
.cl-pin-qq-pill {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px 2px 9px;
  border-radius: 5px;
  background: rgba(11, 8, 17, .78);
  border: 1px solid rgba(214, 172, 88, .5);
  color: #ffe7aa;
  font: 12.5px/1.2 AvalonPixel, monospace;
  cursor: pointer;
  transition:
    border-color 140ms ease,
    background 140ms ease,
    transform 90ms ease;
}
.cl-pin-qq-pill:hover {
  border-color: #ffe291;
  background: rgba(24, 18, 35, .92);
}
.cl-pin-qq-pill:active {
  transform: translateY(1px);
}
.cl-pin-qq-pill[data-copied=true] {
  border-color: #62e39c;
  background: rgba(18, 46, 34, .88);
  color: #c6ffe0;
}
.cl-pin-copy-svg {
  width: 12px;
  height: 12px;
  display: block;
  flex: none;
}
.cl-pin-qq-act {
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(228, 182, 84, .2);
  color: #ffd97d;
  font-size: 11px;
}
.cl-pin-qq-pill[data-copied=true] .cl-pin-qq-act {
  background: rgba(98, 227, 156, .24);
  color: #b8ffd8;
}
.cl-pin-title {
  margin: 0;
  font: 700 17px/1.28 AvalonPixel, monospace;
  color: #fff2cc;
  text-shadow: 0 2px 4px rgba(0, 0, 0, .72);
}
.cl-pin-desc {
  margin: 0;
  font: 12.5px/1.35 AvalonPixel, monospace;
  color: #d6c5a3;
}
.cl-pin-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}
html body #modals .game-document.cl-dialog a.avalon-button.cl-pin-join-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-decoration: none !important;
  box-sizing: border-box !important;
  min-width: 108px !important;
  min-height: 38px !important;
  height: 38px !important;
  padding: 0 15px !important;
  border-radius: 7px !important;
  background:
    linear-gradient(
      180deg,
      #f5d680 0%,
      #cf9832 100%) !important;
  border: 1.5px solid #ffe7a3 !important;
  color: #241504 !important;
  font: 700 14px/1 AvalonPixel, monospace !important;
  text-shadow: 0 1px 0 rgba(255, 245, 210, .55) !important;
  box-shadow: 0 3px 10px rgba(0, 0, 0, .42), inset 0 1px 0 rgba(255, 250, 226, .75) !important;
  cursor: pointer;
  white-space: nowrap;
}
html body #modals .game-document.cl-dialog a.avalon-button.cl-pin-join-btn:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}
html body #modals .game-document.cl-dialog button.avalon-button.cl-pin-cdk-btn {
  min-width: 96px !important;
  min-height: 38px !important;
  height: 38px !important;
  padding: 0 13px !important;
  border-radius: 7px !important;
  background:
    linear-gradient(
      180deg,
      #352b46 0%,
      #1f192b 100%) !important;
  border: 1.5px solid rgba(214, 170, 86, .68) !important;
  color: #f7e6bd !important;
  font: 600 13.5px/1 AvalonPixel, monospace !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .82) !important;
  box-shadow: 0 3px 8px rgba(0, 0, 0, .38), inset 0 1px 0 rgba(255, 238, 190, .18) !important;
  white-space: nowrap;
}
html body #modals .game-document.cl-dialog button.avalon-button.cl-pin-cdk-btn:hover {
  border-color: #ffe294 !important;
  color: #fff6dc !important;
}
.cl-version-block {
  border: 1.5px solid rgba(134, 102, 50, .52);
  border-radius: 9px;
  background:
    linear-gradient(
      180deg,
      rgba(255, 250, 236, .76) 0%,
      rgba(235, 219, 184, .68) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 253, 244, .85), 0 3px 10px rgba(48, 32, 12, .12);
  overflow: hidden;
  flex: 0 0 auto;
}
.cl-version-block[data-new=true] {
  border-color: #b87e22;
  box-shadow:
    inset 0 1px 0 rgba(255, 252, 236, .95),
    0 0 0 1px rgba(218, 162, 56, .28),
    0 4px 14px rgba(72, 44, 10, .16);
}
.cl-version-head {
  appearance: none;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 15px;
  border: 0;
  background:
    linear-gradient(
      180deg,
      rgba(168, 128, 62, .16) 0%,
      rgba(138, 102, 46, .08) 100%);
  color: #2f2010;
  text-align: left;
  cursor: pointer;
  font-family: AvalonPixel, monospace;
}
.cl-version-block[data-open=true] > .cl-version-head {
  border-bottom: 1px solid rgba(138, 104, 48, .32);
}
.cl-version-head-main {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}
.cl-version-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 5px;
  background:
    linear-gradient(
      180deg,
      #3c2a18 0%,
      #24170c 100%);
  border: 1px solid #c99d4a;
  color: #ffeab3;
  font-size: 14px;
  line-height: 1.25;
  letter-spacing: 1px;
}
.cl-version-title {
  font-size: 16px;
  line-height: 1.3;
  color: #2d1e0e;
}
.cl-version-date {
  font-size: 12px;
  color: #775d38;
  white-space: nowrap;
}
.cl-new-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 4px;
  background:
    linear-gradient(
      180deg,
      #f9df8e 0%,
      #d89d2b 100%);
  border: 1px solid #8a560b;
  color: #2e1903;
  font-size: 12px;
  line-height: 1.25;
  white-space: nowrap;
  box-shadow: 0 1px 4px rgba(168, 114, 18, .3);
}
.cl-version-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #6b502a;
  font-size: 12px;
  white-space: nowrap;
  flex: none;
}
.cl-chevron {
  display: inline-block;
  transition: transform 160ms ease;
}
.cl-version-block[data-open=false] .cl-chevron {
  transform: rotate(-90deg);
}
.cl-version-content {
  padding: 12px 15px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cl-version-block[data-open=false] > .cl-version-content {
  display: none;
}
.cl-cat-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 10px 13px;
  border-radius: 7px;
  border: 1px solid rgba(138, 104, 48, .25);
  background: rgba(255, 252, 242, .52);
}
.cl-cat-group[data-tone=crimson] {
  border-color: rgba(180, 32, 44, .46);
  background:
    linear-gradient(
      180deg,
      rgba(255, 236, 238, .72) 0%,
      rgba(248, 222, 224, .46) 100%);
  box-shadow: inset 3px 0 0 #b81f2c;
}
.cl-cat-group[data-tone=royal] {
  border-color: rgba(34, 92, 168, .36);
  background:
    linear-gradient(
      180deg,
      rgba(235, 245, 255, .64) 0%,
      rgba(224, 237, 250, .38) 100%);
  box-shadow: inset 3px 0 0 #235fa8;
}
.cl-cat-group[data-tone=amber] {
  border-color: rgba(182, 120, 20, .38);
  background:
    linear-gradient(
      180deg,
      rgba(255, 248, 224, .68) 0%,
      rgba(247, 234, 196, .42) 100%);
  box-shadow: inset 3px 0 0 #c28016;
}
.cl-cat-group[data-tone=bronze] {
  border-color: rgba(110, 92, 68, .36);
  background:
    linear-gradient(
      180deg,
      rgba(242, 236, 222, .66) 0%,
      rgba(228, 218, 198, .42) 100%);
  box-shadow: inset 3px 0 0 #76634b;
}
.cl-cat-pill {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 6px;
  padding: 3px 11px 3px 8px;
  border-radius: 999px;
  font: 13.5px/1.25 AvalonPixel, monospace;
  letter-spacing: 1px;
  color: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, .18);
}
.cl-cat-pill[data-tone=crimson] {
  background:
    linear-gradient(
      180deg,
      #bf1f2c 0%,
      #861019 100%);
  border: 1px solid #f47f89;
  color: #fff4f5;
}
.cl-cat-pill[data-tone=royal] {
  background:
    linear-gradient(
      180deg,
      #2564b3 0%,
      #153e78 100%);
  border: 1px solid #7fb7ff;
  color: #f0f8ff;
}
.cl-cat-pill[data-tone=amber] {
  background:
    linear-gradient(
      180deg,
      #c78618 0%,
      #8c5909 100%);
  border: 1px solid #f7d277;
  color: #fff9e8;
}
.cl-cat-pill[data-tone=bronze] {
  background:
    linear-gradient(
      180deg,
      #75634e 0%,
      #4d3f30 100%);
  border: 1px solid #bca98f;
  color: #f7f1e6;
}
.cl-cat-icon {
  width: 14px;
  height: 14px;
  display: block;
  flex: none;
  image-rendering: pixelated;
  shape-rendering: crispEdges;
}
.cl-star-icon {
  width: 11px;
  height: 11px;
  display: block;
  flex: none;
  image-rendering: pixelated;
  shape-rendering: crispEdges;
}
.cl-list {
  margin: 0;
  padding: 0 0 0 2px;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cl-item {
  position: relative;
  padding-left: 14px;
  font: 14px/1.62 AvalonPixel, monospace;
  color: #342412;
  word-break: break-word;
}
.cl-item::before {
  content: "";
  position: absolute;
  left: 2px;
  top: .62em;
  width: 5px;
  height: 5px;
  background: #8a642c;
  transform: rotate(45deg);
}
.cl-cat-group[data-tone=crimson] .cl-item::before {
  background: #b81f2c;
}
.cl-cat-group[data-tone=royal] .cl-item::before {
  background: #235fa8;
}
.cl-cat-group[data-tone=amber] .cl-item::before {
  background: #b87712;
}
.cl-cat-group[data-tone=bronze] .cl-item::before {
  background: #6f5d47;
}
.cl-item strong {
  font-weight: 700;
  color: #1f1306;
}
.cl-cat-group[data-tone=crimson] .cl-item strong {
  color: #8c111b;
}
.cl-footer {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 8px;
  border-top: 1px solid rgba(138, 104, 48, .32);
}
.cl-footer-hint {
  margin: 0;
  font: 12px/1.35 AvalonPixel, monospace;
  color: #6e5533;
}
.cl-footer-ok {
  min-width: 132px !important;
  flex: none;
}
html[data-mobile-shell=true] #modals .game-document.cl-dialog {
  width: min(760px, calc(100vw - 24px)) !important;
  height: min(368px, calc(var(--mobile-viewport-height, 100dvh) - 18px)) !important;
  max-height: calc(var(--mobile-viewport-height, 100dvh) - 18px) !important;
  padding: 10px 14px 10px !important;
  gap: 6px !important;
  zoom: 1 !important;
}
@media (max-height: 520px) {
  #modals .game-document.cl-dialog {
    width: min(760px, calc(100vw - 24px)) !important;
    height: min(368px, calc(var(--mobile-viewport-height, 100dvh) - 18px)) !important;
    max-height: calc(var(--mobile-viewport-height, 100dvh) - 18px) !important;
    padding: 10px 14px 10px !important;
    gap: 6px !important;
    zoom: 1 !important;
  }
}
@media (max-height: 520px) {
  .cl-dialog > .document-title {
    font-size: 18px !important;
    padding-bottom: 4px !important;
  }
  .cl-meta-strip {
    gap: 6px;
  }
  .cl-meta-pill {
    font-size: 11px;
    padding: 2px 8px;
  }
  .cl-scroll-body {
    gap: 8px;
    padding: 2px 4px 4px 0;
  }
  .cl-pinned-banner {
    padding: 8px 11px;
    gap: 10px;
    border-radius: 8px;
  }
  .cl-pin-emblem {
    width: 40px;
    height: 40px;
    border-radius: 8px;
  }
  .cl-pin-chest-svg {
    width: 28px;
    height: 28px;
  }
  .cl-pin-body {
    gap: 3px;
  }
  .cl-pin-eyebrow {
    gap: 6px;
  }
  .cl-pin-badge {
    font-size: 10.5px;
    padding: 1px 6px;
  }
  .cl-pin-qq-pill {
    font-size: 11px;
    padding: 1px 6px 1px 7px;
    gap: 4px;
  }
  .cl-pin-qq-act {
    font-size: 10px;
  }
  .cl-pin-title {
    font-size: 14px;
  }
  .cl-pin-desc {
    font-size: 11px;
  }
  .cl-pin-actions {
    gap: 6px;
  }
  html body #modals .game-document.cl-dialog a.avalon-button.cl-pin-join-btn {
    min-width: 86px !important;
    min-height: 32px !important;
    height: 32px !important;
    padding: 0 11px !important;
    font-size: 12.5px !important;
  }
  html body #modals .game-document.cl-dialog button.avalon-button.cl-pin-cdk-btn {
    min-width: 78px !important;
    min-height: 32px !important;
    height: 32px !important;
    padding: 0 10px !important;
    font-size: 12px !important;
  }
  .cl-version-head {
    padding: 7px 10px;
  }
  .cl-version-tag {
    font-size: 12px;
    padding: 1px 7px;
  }
  .cl-version-title {
    font-size: 13.5px;
  }
  .cl-version-content {
    padding: 8px 10px 10px;
    gap: 8px;
  }
  .cl-cat-group {
    padding: 7px 9px;
    gap: 5px;
  }
  .cl-cat-pill {
    font-size: 12px;
    padding: 2px 9px 2px 7px;
  }
  .cl-item {
    font-size: 12.5px;
    line-height: 1.5;
    padding-left: 12px;
  }
  .cl-footer {
    padding-top: 6px;
  }
  .cl-footer-hint {
    font-size: 11px;
  }
  .cl-footer-ok {
    min-height: 36px !important;
    min-width: 112px !important;
    font-size: 13px !important;
  }
}
@media (max-width: 640px) {
  .cl-pinned-banner {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .cl-pin-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }
}
@media (prefers-reduced-motion: reduce) {
  .cl-ver-dot {
    animation: none;
  }
  .v6-title-trigger {
    transition: none;
  }
}

/* web/src/vote-reveal-mobile.css */
#game[data-stage=vote_reveal] .native-reveal .council-reject-name {
  appearance: none;
  cursor: pointer;
  pointer-events: auto;
  margin: 0;
}
#game[data-stage=vote_reveal] .council-reject-name:focus-visible {
  outline: 2px solid #f6d58f;
  outline-offset: 2px;
}
#game[data-stage=vote_reveal] .council-reject-name-label {
  display: block;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
#game[data-stage=vote_reveal] .council-name-peek[hidden] {
  display: none !important;
}
#game[data-stage=vote_reveal] .council-name-peek {
  position: absolute;
  z-index: 5;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  box-sizing: border-box;
  width: min(360px, calc(100vw - 48px));
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: auto;
  background: #231821;
  color: #fae2ce;
  border: 2px solid #b98869;
  box-shadow: 0 5px 15px #100910c0;
  border-radius: 6px;
}
#game[data-stage=vote_reveal] .council-name-peek-text {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
  font: clamp(15px, 2vw, 20px)/1.35 AvalonPixel, monospace;
}
#game[data-stage=vote_reveal] .council-name-peek-close {
  appearance: none;
  flex: none;
  min-height: 44px;
  min-width: 46px;
  padding: 0 6px;
  border: 1px solid #b98869;
  border-radius: 4px;
  background: #362630;
  color: #fae2ce;
  font: 14px/1 AvalonPixel, monospace;
}
.council-vote-minor-cover {
  display: none;
}
@media (orientation: landscape) and (max-height: 500px) {
  #game[data-stage=vote_reveal] .game-actions > .native-reveal[data-kind=vote][data-ten-votes] {
    --ten-vote-top:max(88px,calc(var(--ten-vote-gem-bottom,78px) + 10px));
    --ten-vote-col-gap:10px;
    --ten-vote-row-gap:39px;
    --ten-vote-bottom:calc(44px + env(safe-area-inset-bottom));
    --ten-vote-card-h:min(116px,max(40px,calc((var(--mobile-viewport-height,100dvh) - var(--ten-vote-top) - var(--ten-vote-row-gap) - var(--ten-vote-bottom)) / 2)));
    --council-card-w:min(calc(var(--ten-vote-card-h) * 180 / 276),calc((100vw - 72px) / 5));
    display: grid !important;
    grid-template-columns: repeat(5, var(--council-card-w));
    grid-auto-rows: auto;
    width: max-content !important;
    max-width: 100% !important;
    top: var(--ten-vote-top) !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    margin: 0 !important;
    gap: var(--ten-vote-row-gap) var(--ten-vote-col-gap) !important;
  }
  #game[data-stage=vote_reveal] .native-reveal[data-ten-votes] .council-reject-name:not([hidden]) {
    top: calc(100% - 8px);
    min-height: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: none;
    padding: 0;
  }
  #game[data-stage=vote_reveal] .native-reveal[data-ten-votes] .council-reject-name-label {
    width: 100%;
    padding: 3px 4px;
    border: 1px solid #ab6a6580;
    border-radius: 4px;
    background: #21121c;
    color: #f5d7c9;
    text-align: center;
  }
}
@media (orientation: landscape) and (max-width: 700px) and (max-height: 400px) {
  #game[data-stage=vote_reveal] .native-reveal[data-ten-votes] .council-vote-minor-cover {
    display: block;
    position: absolute;
    inset: 79.5% 21% 11%;
    pointer-events: none;
    background:
      linear-gradient(
        90deg,
        transparent,
        #16191e 15% 85%,
        transparent);
  }
  #game[data-stage=vote_reveal] .native-reveal[data-ten-votes] [data-negative=true] .council-vote-minor-cover {
    background:
      linear-gradient(
        90deg,
        transparent,
        #1a171c 15% 85%,
        transparent);
  }
  #game[data-stage=vote_reveal] .game-actions:has(> .native-reveal[data-ten-votes]) > .council-pre-reveal-note {
    display: none !important;
  }
}

/* web/src/rejection-gems.css */
:is(#game, .v5-wiki-real-hud) .v4-gem-track {
  --gem-size:calc(22 * var(--v4-u));
  --gem-gap:calc(13 * var(--v4-u));
  --gem-rail-h:max(1px,calc(1.5 * var(--v4-u)));
  --gem-glow-main:rgba(168,128,255,.56);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--gem-gap);
  margin: calc(8 * var(--v4-u)) auto 0;
  padding: calc(2 * var(--v4-u)) calc(8 * var(--v4-u));
  filter: drop-shadow(0 3px 7px #000b);
  overflow: visible;
  pointer-events: none;
  isolation: isolate;
}
:is(#game, .v5-wiki-real-hud) .v4-vote-gem {
  position: relative;
  display: block;
  width: var(--gem-size);
  height: var(--gem-size);
  flex: none;
  overflow: visible;
}
:is(#game, .v5-wiki-real-hud) .v4-vote-gem:not(:last-child)::after {
  content: "";
  position: absolute;
  left: calc(100% - 1px);
  top: 50%;
  transform: translateY(-50%);
  width: calc(var(--gem-gap) + 2px);
  height: var(--gem-rail-h);
  background:
    linear-gradient(
      90deg,
      #9a82ee6b,
      #6672b247,
      #9a82ee6b);
  z-index: -1;
  transition: background 240ms ease;
}
:is(#game, .v5-wiki-real-hud) .v4-vote-gem[data-state=shattered]:not(:last-child)::after {
  background: #3e466652;
}
:is(#game, .v5-wiki-real-hud) .v4-vote-gem[data-state=shattered]:has(+ .v4-vote-gem[data-state=crisis])::after {
  background:
    linear-gradient(
      90deg,
      #3e466657,
      #ff3d6e9e);
}
:is(#game, .v5-wiki-real-hud) .v4-vote-gem-visual,
:is(#game, .v5-wiki-real-hud) .v4-vote-gem-art {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  transform-origin: 50% 50%;
  overflow: visible;
}
:is(#game, .v5-wiki-real-hud) .v4-vote-gem-art > svg {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  shape-rendering: crispEdges;
}
:is(#game, .v5-wiki-real-hud) .v4-vote-gem[data-state=intact] .v4-vote-gem-art > svg {
  filter: drop-shadow(0 0 calc(var(--gem-size) * .22) var(--gem-glow-main));
}
:is(#game, .v5-wiki-real-hud) .v4-vote-gem[data-state=crisis] > .v4-vote-gem-visual {
  animation: v4-gem-crisis-jitter 1.25s steps(4, end) infinite;
}
:is(#game, .v5-wiki-real-hud) .v4-vote-gem[data-state=crisis] .v4-vote-gem-art > svg {
  animation: v4-gem-crisis-glow 1.25s ease-in-out infinite;
}
:is(#game, .v5-wiki-real-hud) .v4-vote-gem[data-state=shattered] .v4-vote-gem-art > svg {
  opacity: .78;
  filter: none;
}
#game .v4-vote-gem[data-cracking=true] > .v4-vote-gem-visual {
  animation: v4-gem-crack-tremor 180ms steps(2, end) infinite;
}
#game .v4-vote-gem[data-just-reforged=true] .v4-vote-gem-art {
  animation: v4-gem-reforge-pop 340ms var(--v4-ease-back,cubic-bezier(.16,1,.3,1)) both;
}
#game .v4-gem-fx {
  position: absolute;
  display: block;
  left: 50%;
  top: 50%;
  pointer-events: none;
  z-index: 12;
  image-rendering: pixelated;
  mix-blend-mode: normal !important;
  max-width: none;
  max-height: none;
  transition: none;
  opacity: 1;
}
#game .v4-gem-fx.fx-sheen {
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  transform: none;
  z-index: 9;
}
#game .v4-gem-fx.fx-shatter {
  width: calc(var(--gem-size) * 52 / 19);
  height: calc(var(--gem-size) * 68 / 19);
  transform: translate(-50%, calc(-100% * 23 / 68));
}
#game .v4-gem-fx.fx-doom {
  width: calc(var(--gem-size) * 60 / 19);
  height: calc(var(--gem-size) * 76 / 19);
  transform: translate(-50%, calc(-100% * 25 / 76));
}
#game .v4-gem-fx.fx-reforge {
  width: calc(var(--gem-size) * 44 / 19);
  height: calc(var(--gem-size) * 44 / 19);
  transform: translate(-50%, -50%);
}
#game .v4-gem-fx.fx-ambient {
  width: calc(var(--gem-size) * 34 / 19);
  height: calc(var(--gem-size) * 40 / 19);
  transform: translate(-50%, -55%);
  z-index: 10;
}
#game .v4-gem-track.doom-shake {
  animation: v4-gem-track-doom-shake 340ms steps(6, end);
}
@media (max-height: 620px), (max-width: 600px) {
  #game .v4-gem-track {
    --gem-size:18px;
    --gem-gap:10px;
    --gem-rail-h:1px;
    margin-top: 5px;
  }
}
@keyframes v4-gem-track-doom-shake {
  0%, 100% {
    transform: translate(0, 0);
  }
  18% {
    transform: translate(-2px, 1px);
  }
  36% {
    transform: translate(2px, -1px);
  }
  54% {
    transform: translate(-2px, -1px);
  }
  72% {
    transform: translate(1px, 1px);
  }
}
@keyframes v4-gem-crack-tremor {
  0% {
    transform: translate(-1px, 0);
  }
  50% {
    transform: translate(1px, -.5px);
  }
  100% {
    transform: translate(-1px, .5px);
  }
}
@keyframes v4-gem-crisis-jitter {
  0%, 76%, 100% {
    transform: translate(0, 0);
  }
  82% {
    transform: translate(-1px, 0);
  }
  88% {
    transform: translate(1px, 0);
  }
  94% {
    transform: translate(-.5px, 0);
  }
}
@keyframes v4-gem-crisis-glow {
  0%, 100% {
    filter: drop-shadow(0 0 calc(var(--gem-size) * .28) #ff3a70b8);
  }
  50% {
    filter: brightness(1.22) drop-shadow(0 0 calc(var(--gem-size) * .55) #ff5e91);
  }
}
@keyframes v4-gem-reforge-pop {
  0% {
    transform: scale(.76);
    filter: brightness(2.2);
  }
  55% {
    transform: scale(1.12);
    filter: brightness(1.3);
  }
  100% {
    transform: scale(1);
    filter: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  #game .v4-gem-track,
  #game .v4-vote-gem-visual,
  #game .v4-vote-gem-art,
  #game .v4-vote-gem-art > svg {
    animation: none !important;
  }
  #game .v4-vote-gem::after {
    transition: none;
  }
}

/* web/src/wave3c.css */
#game .mission-shield[data-hud-help] {
  appearance: none;
  padding: 0;
  border: 0;
  background: none;
  pointer-events: auto;
  cursor: pointer;
}
#game .v4-gem-track[data-hud-help] {
  pointer-events: auto;
  cursor: pointer;
  background: transparent !important;
  -webkit-tap-highlight-color: transparent;
}
.v4-room-crest-compact {
  display: none;
}
.v4-lobby-guest-status:not([data-lobby-seat-hint=true]) {
  display: none;
}
@media (orientation: landscape) {
  html[data-mobile-shell=true] {
    --lobby-action-height: 48px;
    --lobby-action-radius: 3px;
  }
  html[data-mobile-shell=true] #game[data-stage=waiting] .game-hud {
    column-gap: 8px !important;
    width: max-content !important;
  }
  html[data-mobile-shell=true] #game[data-stage=waiting] .game-hud .room-code.v4-room-crest {
    width: max-content !important;
    min-width: 0 !important;
    height: 44px !important;
    min-height: 44px !important;
    gap: 4px !important;
    padding-inline: 6px !important;
  }
  html[data-mobile-shell=true] .room-code .v4-room-crest-text {
    display: none;
  }
  html[data-mobile-shell=true] .room-code .v4-room-crest-compact {
    display: block;
    font-size: 19px;
  }
  html[data-mobile-shell=true] #game[data-stage=waiting] .game-hud .v4-room-anchor {
    position: static !important;
  }
  html[data-mobile-shell=true] #game[data-stage=waiting] .game-hud .v4-room-list {
    scrollbar-width: none;
  }
  html[data-mobile-shell=true] .v4-lobby-guest-status:not([data-lobby-seat-hint=true]) {
    display: block;
  }
  html[data-mobile-shell=true] .native-lobby-status[data-lobby-headcount]::after {
    content: " \b7  " attr(data-lobby-headcount);
    white-space: pre;
  }
  html[data-mobile-shell=true] .native-lobby-status[data-lobby-seat-hint=true]::after {
    grid-area: 1 / 2;
  }
  html[data-mobile-shell=true] #game[data-stage=waiting] .game-actions:has(> .v4-start-throne-btn) {
    bottom: var(--court-action-bottom) !important;
  }
  html[data-mobile-shell=true] #game[data-stage=waiting] .game-actions > .v4-start-throne-btn,
  html[data-mobile-shell=true] body #touch-interact:is([data-court-interaction=seat], [data-court-interaction=stand]) {
    height: var(--lobby-action-height) !important;
    min-height: var(--lobby-action-height) !important;
    border-radius: var(--lobby-action-radius) !important;
  }
  html[data-mobile-shell=true] body #touch-interact:is([data-court-interaction=seat], [data-court-interaction=stand]) {
    right: max(12px, env(safe-area-inset-right));
    bottom: calc(var(--mobile-bottom, 0px) + var(--court-action-bottom)) !important;
    width: 72px !important;
    min-width: 72px !important;
    padding: 0 12px;
    font-size: 16px;
  }
  html[data-mobile-shell=true] body #touch-interact:is([data-court-interaction=seat], [data-court-interaction=stand])::before,
  html[data-mobile-shell=true] body #touch-interact:is([data-court-interaction=seat], [data-court-interaction=stand])::after {
    content: none !important;
    display: none !important;
  }
}
#game .match-hud-help {
  position: absolute;
  z-index: 2;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  display: grid;
  gap: 3px;
  width: max-content;
  max-width: calc(100vw - 24px);
  box-sizing: border-box;
  padding: 6px 10px;
  border: 1px solid #9d7940;
  background: #1d160efa;
  box-shadow: 0 0 0 2px #120e09, 0 4px 10px #0009;
  color: #f7e7bf;
  font: 13px/1.35 AvalonPixel, sans-serif;
  text-align: left;
  pointer-events: none;
}
#game .match-hud-help strong:last-child {
  color: #ffcf70;
}
html[data-mobile-shell=true] .v4-wiki-dialog > .rule-tabs.v4-segmented {
  display: flex;
  flex-wrap: nowrap;
  justify-content: safe center;
  gap: 8px !important;
  max-width: 100%;
  overflow-x: auto;
  scroll-behavior: smooth;
}
html[data-mobile-shell=true] .v4-wiki-dialog .rule-tabs .avalon-button[role=tab] {
  height: 44px !important;
  min-height: 44px !important;
  flex: 0 0 auto;
  white-space: nowrap;
}
html[data-mobile-shell=true] .v4-wiki-dialog .avalon-button.v4-wiki-role-chip {
  display: inline-flex;
  align-items: center;
  min-height: 36px !important;
  padding-block: 4px !important;
  margin: 4px !important;
  line-height: 1.3 !important;
  vertical-align: middle;
}

/* web/src/match-status-hints.css */
#game[data-stage] .game-actions:has(> .match-status-hint:not([data-match-hint=seat])) {
  position: absolute !important;
  inset: auto 0 max(16px, env(safe-area-inset-bottom)) !important;
  width: auto !important;
  max-width: none !important;
  max-height: none !important;
  transform: none !important;
  padding: 0 12px !important;
  margin: 0 !important;
  display: flex !important;
  flex-flow: column nowrap !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 8px !important;
  overflow: visible !important;
  background: none !important;
  pointer-events: none !important;
}
#game .game-actions:has(> .match-status-hint:not([data-match-hint=seat])) > button {
  pointer-events: auto;
}
#game .game-actions > .match-status-hint {
  --match-hint-border:var(--v4-gold, #e4b955);
  --match-hint-bg:rgba(14, 12, 20, .94);
  --match-hint-ink:#fff7e0;
  --match-hint-sub:var(--v4-gold-hi, #ffe7a3);
  --match-hint-icon:var(--v4-gold-hi, #ffe7a3);
  box-sizing: border-box;
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: max-content !important;
  min-width: min(360px, calc(100vw - 32px)) !important;
  max-width: min(520px, calc(100vw - 32px)) !important;
  height: auto !important;
  min-height: 52px !important;
  margin: 0 !important;
  padding: 12px 24px !important;
  background: var(--match-hint-bg) !important;
  color: var(--match-hint-ink) !important;
  border: 2px solid var(--match-hint-border) !important;
  border-radius: 8px !important;
  font: 18px/1.25 AvalonPixel, monospace !important;
  text-align: center;
  letter-spacing: 0;
  text-shadow: 0 1px 2px #08060a;
  box-shadow: 0 6px 18px #08060a94, inset 0 1px 0 #ffe7a323 !important;
  pointer-events: none;
}
#game .game-actions > button.match-status-hint {
  pointer-events: auto;
  cursor: pointer;
}
#game .game-actions > button.match-status-hint:focus-visible {
  outline: 2px solid var(--v4-gold-hi,#ffe7a3);
  outline-offset: 4px;
}
#game .game-actions > .match-status-hint[data-match-hint=assassination-wait] {
  --match-hint-bg:rgb(42 12 19 / .92);
  --match-hint-border:#d76a69;
  --match-hint-ink:#ffe2e0;
  --match-hint-sub:#f9bdb8;
  --match-hint-icon:#ffaca7;
}
.match-status-hint-copy {
  min-width: 0;
  overflow-wrap: anywhere;
}
.match-status-hint-main {
  display: block;
  font-weight: 400;
}
.match-status-hint-detail {
  display: block;
  margin-top: 4px;
  font-size: 15px;
  color: var(--match-hint-sub);
}
.match-status-hint-accent {
  margin-inline-start: .45em;
  color: var(--match-hint-icon);
  white-space: nowrap;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.match-status-hint-icon {
  display: grid;
  place-items: center;
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  font-size: 20px;
  line-height: 1;
  color: var(--match-hint-icon);
}
.match-status-hint-crown {
  width: 31px;
  height: auto;
  max-width: none;
  object-fit: contain;
  image-rendering: pixelated;
}
.match-status-hint [hidden] {
  display: none !important;
}
body #game-notice[data-match-toast=true] {
  top: var(--match-toast-top,76px) !important;
  left: 50% !important;
  right: auto !important;
  bottom: auto !important;
  translate: -50% 0 !important;
  transform: none !important;
  width: max-content;
  box-sizing: border-box;
  min-width: min(260px, calc(100vw - 32px)) !important;
  max-width: min(520px, calc(100vw - 32px)) !important;
  min-height: 44px;
  height: auto !important;
  margin: 0 !important;
  padding: 7px 16px !important;
  font: 16px/1.25 AvalonPixel, monospace !important;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
  background: rgba(14, 12, 20, .94) !important;
  color: #fff7e0 !important;
  border-radius: 6px !important;
  pointer-events: none !important;
  cursor: default !important;
  animation: none !important;
  opacity: 1;
  transition: opacity 200ms ease-out;
}
body #game-notice[data-match-toast=true][data-fading=true] {
  opacity: 0;
}
@media (prefers-reduced-motion: reduce) {
  body #game-notice[data-match-toast=true] {
    transition: none;
  }
}
html[data-mobile-shell=true] #game[data-stage] .game-actions:has(> .match-status-hint:not([data-match-hint=seat])) {
  bottom: max(10px, env(safe-area-inset-bottom)) !important;
}
html[data-mobile-shell=true] #game .game-actions > .match-status-hint {
  min-width: min(260px, 82vw) !important;
  max-width: 82vw !important;
  min-height: 42px !important;
  padding: 8px 12px !important;
  gap: 8px;
  font-size: 15px !important;
}
html[data-mobile-shell=true] #game .game-actions > button.match-status-hint {
  min-height: 44px !important;
}
html[data-mobile-shell=true] .match-status-hint-detail {
  margin-top: 3px;
  font-size: 13px;
}
html[data-mobile-shell=true] .match-status-hint-icon {
  flex-basis: 18px;
  width: 18px;
  height: 18px;
  font-size: 18px;
}
html[data-mobile-shell=true] body #game-notice[data-match-toast=true] {
  min-width: min(220px, 82vw) !important;
  max-width: 82vw !important;
  min-height: 40px;
  font-size: 14px !important;
}
#game[data-stage=waiting] > .game-actions {
  left: calc(50% + (env(safe-area-inset-left) - env(safe-area-inset-right)) / 2) !important;
  right: auto !important;
  translate: -50% 0 !important;
  transform: none !important;
  width: max-content !important;
  max-width: 90% !important;
  align-items: center !important;
  justify-content: flex-end !important;
  flex-wrap: nowrap !important;
  pointer-events: none !important;
}
#game[data-stage=waiting] > .game-actions > .v4-start-throne-btn {
  flex: none !important;
  align-self: center !important;
  margin-inline: 0 !important;
  pointer-events: auto;
}
#game[data-stage=waiting] .native-lobby-status > :empty:not(button),
#game[data-stage=waiting] .native-lobby-status > [hidden] {
  display: none !important;
}
#game[data-stage=waiting] .game-actions > .native-lobby-status[data-lobby-seat-hint=true] {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: fit-content !important;
  min-width: 0 !important;
  max-width: min(90vw, 480px) !important;
  padding: 6px 18px !important;
  text-align: center !important;
  color: var(--v4-gold-hi, #ffe7a3) !important;
  border-color: rgba(228, 185, 85, .68) !important;
}
#game[data-stage=waiting] .native-lobby-status[data-lobby-seat-hint=true]::after {
  content: none !important;
  display: none !important;
}
#game[data-stage=waiting] .native-lobby-status:not([data-lobby-seat-hint=true]) button {
  pointer-events: auto;
}
html[data-mobile-shell=true] #game[data-stage=waiting] > .game-actions > .v4-start-throne-btn {
  width: min(220px, 52vw) !important;
}
.native-lobby-status[data-lobby-seat-hint=true] > .native-lobby-seat-prompt {
  display: inline-block;
  text-align: center;
  white-space: nowrap;
}
html[data-mobile-shell=true] body #touch-interact[data-court-interaction=seat] {
  right: var(--safe-edge-x, max(12px, env(safe-area-inset-right))) !important;
  bottom: calc(var(--mobile-bottom, 0px) + var(--safe-bottom-pad, max(18px, env(safe-area-inset-bottom)))) !important;
  width: 56px;
  min-width: 56px;
  height: 56px;
  min-height: 56px;
  padding: 0 6px;
  font-size: 16px;
  white-space: nowrap;
}

/* web/src/match-overview.css */
#game .toolbar-left.v4-icon-tray {
  position: relative;
  z-index: 8;
}
#game .toolbar-left-sub.v4-icon-tray {
  position: absolute !important;
  left: 0 !important;
  top: calc(100% + 10 * var(--v4-u)) !important;
  z-index: 6 !important;
  display: inline-flex !important;
  align-items: center;
  gap: calc(10 * var(--v4-u)) !important;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  pointer-events: auto;
}
#game .toolbar-left-sub.v4-icon-tray[hidden] {
  display: none !important;
}
@media (max-height: 620px) {
  #game .toolbar-left-sub.v4-icon-tray {
    left: 0 !important;
    top: calc(100% + 6px) !important;
    gap: 6px !important;
  }
}
#modals .match-overview-document::before,
#modals .match-overview-document::after {
  content: none !important;
  display: none !important;
}
#modals .match-overview-document {
  position: relative;
  width: min(860px, calc((100vw - 28px) / var(--v4-ui-scale, 1))) !important;
  max-width: min(860px, calc((100vw - 28px) / var(--v4-ui-scale, 1))) !important;
  min-height: min(468px, calc((100dvh - 36px) / var(--v4-ui-scale, 1))) !important;
  max-height: calc((100dvh - 28px) / var(--v4-ui-scale, 1)) !important;
  padding: 14px 16px 12px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  overflow: hidden !important;
  box-sizing: border-box;
  background:
    linear-gradient(
      180deg,
      #f6eccf 0%,
      #ead8ab 100%) !important;
  border: 2px solid #9f7939 !important;
  box-shadow:
    0 0 0 1px #24190c,
    0 18px 46px rgba(0, 0, 0, .75),
    inset 0 1px 0 #fff8df !important;
  color: #2b2013 !important;
}
#modals .match-overview-document[data-compact-cols=true] {
  width: min(820px, calc((100vw - 28px) / var(--v4-ui-scale, 1))) !important;
  max-width: min(820px, calc((100vw - 28px) / var(--v4-ui-scale, 1))) !important;
}
.match-overview-document .mo-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 10px;
  padding-bottom: 7px;
  border-bottom: 1.5px solid rgba(132, 98, 46, 0.38);
  flex: none;
  min-width: 0;
}
.match-overview-document .mo-header-bar > .document-title {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  font: 400 20px/1.15 AvalonPixel, monospace !important;
  color: #2e1f0e !important;
  text-shadow: 0 1px 0 rgba(255, 248, 224, .75);
  white-space: nowrap;
  flex: none;
}
.match-overview-document .mo-header-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
  flex: 1 1 auto;
}
.match-overview-document .mo-header-controls > .document-close,
.match-overview-document .mo-header-bar > .document-close {
  position: static !important;
  flex: none;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  line-height: 1 !important;
  width: 30px !important;
  height: 30px !important;
  min-width: 30px !important;
  min-height: 30px !important;
  margin: 0 !important;
}
.mo-deck-strip {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  flex: 0 1 auto;
  gap: 4px;
  min-width: 0;
  max-width: 100%;
}
.mo-deck-strip::-webkit-scrollbar {
  display: none;
}
.mo-deck-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  border-radius: 4px;
  font: 400 12px/1.2 AvalonPixel, monospace;
  white-space: nowrap;
  flex: none;
}
.mo-deck-pill.mo-role-pill.is-good {
  background: rgba(33, 87, 148, 0.14);
  border: 1px solid rgba(33, 87, 148, 0.48);
  color: #174478;
}
.mo-deck-pill.mo-role-pill.is-evil {
  background: rgba(164, 38, 44, 0.14);
  border: 1px solid rgba(164, 38, 44, 0.48);
  color: #7c1820;
}
.mo-rej-badge {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 5px;
  background: rgba(68, 48, 22, 0.12);
  border: 1px solid rgba(132, 98, 46, 0.42);
  font: 400 12.5px/1.2 AvalonPixel, monospace;
  white-space: nowrap;
  flex: none;
}
.mo-rej-lbl {
  color: #6e5735;
  font-size: 11.5px;
}
.mo-rej-val {
  color: #3d2810;
  font-weight: 700;
}
.mo-rej-badge.is-warn {
  background: rgba(176, 42, 42, 0.14);
  border-color: rgba(176, 42, 42, 0.55);
}
.mo-rej-badge.is-warn .mo-rej-val {
  color: #9c1f1f;
}
.match-overview-document .avalon-button.mo-toggle-notes {
  height: 28px !important;
  min-height: 28px !important;
  padding: 0 10px !important;
  font-size: 12px !important;
  white-space: nowrap;
  flex: none;
  border-radius: 5px !important;
  background:
    linear-gradient(
      180deg,
      #fff9e6,
      #ebd8ab) !important;
  border: 1.5px solid #8f6b32 !important;
  color: #362410 !important;
  text-shadow: none !important;
  box-shadow: inset 0 1px 0 #fffdf4 !important;
  opacity: 1 !important;
}
.match-overview-document .avalon-button.mo-toggle-notes[aria-pressed=true] {
  background:
    linear-gradient(
      180deg,
      #3c2b18,
      #281c0f) !important;
  color: #ffe8a8 !important;
  border-color: #24190c !important;
}
.match-overview-document .avalon-button.mo-spectator-btn {
  height: 28px !important;
  min-height: 28px !important;
  padding: 0 10px !important;
  font-size: 12px !important;
  white-space: nowrap;
  flex: none;
  border-radius: 999px !important;
  background:
    linear-gradient(
      180deg,
      #252028,
      #16131a) !important;
  border: 1.5px solid #c99c46 !important;
  color: #fde9b0 !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85) !important;
  box-shadow: 0 2px 8px rgba(10, 8, 14, 0.28) !important;
  opacity: 1 !important;
}
html[data-mobile-shell=true] .match-overview-document .avalon-button.mo-spectator-btn {
  height: 24px !important;
  min-height: 24px !important;
  padding: 0 8px !important;
  font-size: 11px !important;
}
#modals .match-overview-document > .mo-table-wrap {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  min-width: 0;
  overflow-y: auto !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-x pan-y !important;
  border: 1.5px solid rgba(132, 98, 46, 0.48);
  border-radius: 6px;
  background: rgba(251, 244, 224, 0.72);
  scrollbar-width: thin;
  scrollbar-color: #9e7b42 rgba(132, 98, 46, 0.14);
}
#modals .match-overview-document > .mo-table-wrap[data-dragging=true] {
  cursor: grabbing;
  user-select: none;
}
#modals .match-overview-document > .mo-table-wrap::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
#modals .match-overview-document > .mo-table-wrap::-webkit-scrollbar-track {
  background: rgba(132, 98, 46, 0.12);
  border-radius: 3px;
}
#modals .match-overview-document > .mo-table-wrap::-webkit-scrollbar-thumb {
  background: rgba(154, 114, 48, 0.78);
  border-radius: 3px;
}
#modals .match-overview-document > .mo-table-wrap .mo-player-row,
#modals .match-overview-document > .mo-table-wrap .mo-note-slot {
  touch-action: pan-x pan-y;
}
.mo-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: auto;
  font-family: AvalonPixel, monospace;
}
.mo-table th,
.mo-table td {
  border-right: 1px solid rgba(138, 106, 56, 0.28);
  border-bottom: 1px solid rgba(138, 106, 56, 0.28);
  padding: 0;
  text-align: center;
  vertical-align: middle;
  box-sizing: border-box;
}
.mo-table tr:last-child td {
  border-bottom: 0;
}
.mo-table th:last-child,
.mo-table td:last-child {
  border-right: 0;
}
.mo-sticky-1 {
  position: sticky;
  left: 0;
  z-index: 4;
  width: 150px;
  min-width: 150px;
  max-width: 150px;
  background: #f3e6c3;
}
.mo-sticky-2 {
  position: sticky;
  left: 150px;
  z-index: 4;
  width: 90px;
  min-width: 90px;
  max-width: 90px;
  background: #efe0b8;
  box-shadow: 3px 0 7px rgba(56, 38, 12, 0.18);
}
.mo-table thead th.mo-sticky-1,
.mo-table thead th.mo-sticky-2 {
  z-index: 8;
  background: #e5cf9d;
  color: #4b3519;
  font-size: 14px;
  font-weight: 400;
}
.mo-table thead tr.mo-head-rounds th {
  position: sticky;
  top: 0;
  z-index: 5;
  height: 40px;
  background: #e7d4a6;
}
.mo-table thead tr.mo-head-subs th {
  position: sticky;
  top: 40px;
  z-index: 5;
  height: 28px;
  background: #efe1bc;
}
.mo-table thead tr.mo-head-rounds th.mo-sticky-1,
.mo-table thead tr.mo-head-rounds th.mo-sticky-2 {
  top: 0;
  z-index: 12 !important;
  background: #e5cf9d !important;
}
.mo-round-head {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 6px;
}
.mo-shield-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 28px;
  border-radius: 4px 4px 11px 11px;
  box-sizing: border-box;
  font-family: AvalonPixel, monospace;
  font-size: 13px;
  line-height: 1;
  overflow: visible;
}
.mo-shield-badge.is-pending {
  background:
    linear-gradient(
      180deg,
      #322d3c 0%,
      #1d1a26 100%);
  border: 1.5px solid #8f774d;
  color: #efe1be;
  box-shadow: inset 0 1px 0 rgba(255, 244, 210, 0.2);
}
.mo-shield-badge.is-pending.is-current {
  border-color: #e4ac38;
  box-shadow: 0 0 7px rgba(228, 172, 56, 0.58), inset 0 1px 0 rgba(255, 245, 210, 0.35);
  color: #ffe490;
}
.mo-shield-badge.is-good {
  background:
    linear-gradient(
      180deg,
      #2b75c4 0%,
      #17467e 100%);
  border: 1.5px solid #e4ba52;
  color: #f4fbff;
  box-shadow: 0 1px 4px rgba(18, 62, 118, 0.42), inset 0 1px 0 rgba(190, 228, 255, 0.45);
}
.mo-shield-badge.is-evil {
  background:
    linear-gradient(
      180deg,
      #c9303b 0%,
      #7f141e 100%);
  border: 1.5px solid #e4ba52;
  color: #fff2e8;
  box-shadow: 0 1px 4px rgba(132, 20, 30, 0.45), inset 0 1px 0 rgba(255, 198, 204, 0.38);
}
.mo-shield-mark {
  display: inline-flex;
  width: 14px;
  height: 14px;
  color: #fff9e6;
}
.mo-shield-mark > svg {
  width: 100%;
  height: 100%;
  display: block;
}
.mo-shield-fail {
  font-size: 12px;
  font-weight: 700;
  color: #fff2df;
  letter-spacing: -0.02em;
}
.mo-shield-lance-pip {
  position: absolute;
  top: -4px;
  right: -6px;
  z-index: 3;
  min-width: 13px;
  height: 13px;
  padding: 0 2px;
  border-radius: 3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: 400 9px/1 AvalonPixel, monospace;
  box-sizing: border-box;
  border: 1px solid rgba(196, 168, 112, 0.72);
  background: #1b2230;
  color: #d6c090;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}
.mo-shield-lance-pip[data-lance-state=keep] {
  background: #2b3444;
  border-color: #b8aa8a;
  color: #e4dac2;
}
.mo-shield-lance-pip[data-lance-state=swap] {
  background:
    linear-gradient(
      125deg,
      #2564a8 0%,
      #a82238 100%);
  border-color: #f4ce72;
  color: #fff8e2;
  box-shadow: 0 0 5px rgba(188, 42, 68, 0.55);
}
.mo-sub-col {
  min-width: 74px;
  width: 74px;
  padding: 0 4px !important;
  font-size: 13px;
  font-weight: 400;
  color: #4f3a1e;
}
.mo-sub-col.is-empty {
  color: #a89572;
}
.mo-sub-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  white-space: nowrap;
}
.mo-sub-ic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 13px;
  height: 13px;
  font-size: 12px;
  line-height: 1;
}
.mo-sub-ic > svg {
  width: 100%;
  height: 100%;
  display: block;
}
.mo-sub-ic.is-passed {
  color: #9c6a12;
}
.mo-sub-ic.is-rejected {
  color: #7e688c;
}
.mo-player-row {
  height: 38px;
  cursor: pointer;
}
.match-overview-document:is([data-player-count="5"], [data-player-count="6"], [data-player-count="7"]) .mo-player-row,
.match-overview-document:is([data-player-count="5"], [data-player-count="6"], [data-player-count="7"]) .mo-vote-cell {
  height: 54px;
}
.mo-player-row:nth-child(even) td:not(.is-on-team) {
  background: rgba(235, 218, 178, 0.34);
}
.mo-player-row:nth-child(even) td.mo-sticky-1 {
  background: #eedfb9;
}
.mo-player-row:nth-child(even) td.mo-sticky-2 {
  background: #ead9ae;
}
.mo-player-row[data-focus-row=true] td:not(.is-on-team) {
  background: rgba(242, 200, 96, 0.24) !important;
}
.mo-player-row[data-focus-row=true] td.mo-sticky-1,
.mo-player-row[data-focus-row=true] td.mo-sticky-2 {
  background: #f4df9e !important;
}
.mo-player-cell {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 7px;
  height: 100%;
  min-width: 0;
}
.mo-seat-num {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 22px;
  padding: 0 4px;
  border-radius: 4px;
  background: #231b14;
  border: 1px solid #b58d42;
  color: #f8d474;
  font-size: 12.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.mo-mini-avatar {
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid #9f7939;
  background: #221b14;
}
.mo-mini-avatar > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.mo-player-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14.5px;
  color: #2b1e10;
  text-align: left;
}
.mo-note-slot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: calc(100% - 14px);
  height: 28px;
  margin: 0 auto;
  padding: 0 4px;
  border-radius: 5px;
  background: rgba(255, 250, 236, 0.58);
  border: 1px dashed rgba(138, 102, 46, 0.52);
  color: #8a6a38;
  cursor: pointer;
  font-family: inherit;
  transition: background 120ms ease, border-color 120ms ease;
}
.mo-note-slot[data-has-notes=true] {
  border-style: solid;
  border-color: rgba(138, 102, 46, 0.38);
  background: rgba(255, 250, 236, 0.88);
}
.mo-note-slot:hover {
  border-color: #9e6e18;
  background: #fff9e8;
}
.mo-note-plus {
  font-size: 15px;
  line-height: 1;
}
.match-overview-document[data-notes-hidden=true] .mo-note-slot {
  opacity: 0.25;
  pointer-events: none;
}
.match-overview-document[data-notes-hidden=true] .mo-note-slot > * {
  visibility: hidden;
}
.mo-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 2px 5px;
  border-radius: 4px;
  font-size: 13.5px;
  line-height: 1.15;
  white-space: nowrap;
}
.mo-tag-ic {
  display: inline-flex;
  width: 12px;
  height: 12px;
}
.mo-tag-ic > svg {
  width: 100%;
  height: 100%;
  display: block;
}
.mo-tag-good {
  background: rgba(34, 102, 174, 0.16);
  border: 1px solid rgba(34, 102, 174, 0.52);
  color: #164b8a;
}
.mo-tag-evil {
  background: rgba(178, 38, 44, 0.16);
  border: 1px solid rgba(178, 38, 44, 0.52);
  color: #94191e;
}
.mo-tag-neutral {
  background: rgba(154, 112, 34, 0.16);
  border: 1px solid rgba(154, 112, 34, 0.52);
  color: #6b4b12;
}
.mo-tag-abyss,
.mo-tag-ext-abyss {
  background:
    linear-gradient(
      180deg,
      rgba(38, 35, 42, 0.24),
      rgba(22, 19, 26, 0.28));
  border: 1px solid rgba(217, 78, 20, 0.78);
  color: #26160e;
}
.mo-tag-ext-resonance {
  background: rgba(217, 28, 43, 0.16);
  border: 1px solid rgba(217, 28, 43, 0.62);
  color: #9e121e;
}
.mo-tag-ext-assassin-sword {
  background: rgba(181, 72, 120, 0.16);
  border: 1px solid rgba(181, 72, 120, 0.62);
  color: #7d244d;
}
.mo-tag-ext-council {
  background: rgba(132, 84, 181, 0.16);
  border: 1px solid rgba(132, 84, 181, 0.62);
  color: #542d80;
}
.mo-tag-ext-lady {
  background: rgba(47, 122, 214, 0.16);
  border: 1px solid rgba(47, 122, 214, 0.60);
  color: #154d96;
}
.mo-tag-ext-sword {
  background: rgba(196, 133, 28, 0.18);
  border: 1px solid rgba(196, 133, 28, 0.66);
  color: #7a4f07;
}
.mo-tag-lancelot {
  background:
    linear-gradient(
      90deg,
      rgba(34, 102, 174, 0.16),
      rgba(178, 38, 44, 0.16));
  border: 1px solid rgba(128, 72, 116, 0.55);
  color: #4a2346;
}
.mo-tag-mode-quick {
  background: rgba(18, 128, 118, 0.15);
  border: 1px solid rgba(18, 128, 118, 0.56);
  color: #0e5a54;
}
.mo-table tfoot.mo-tally-foot tr.mo-tally-row th,
.mo-table tfoot.mo-tally-foot tr.mo-tally-row td {
  position: sticky;
  bottom: 0;
  z-index: 6;
  height: 24px;
  background: #ead7a7;
  border-top: 1.5px solid rgba(132, 98, 46, 0.48);
  border-bottom: 0;
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
}
.mo-table tfoot.mo-tally-foot th.mo-tally-head {
  left: 0;
  z-index: 10 !important;
  background: #e2cb96 !important;
  color: #4b3519;
  font-weight: 400;
  box-shadow: 3px 0 7px rgba(56, 38, 12, 0.18);
}
.mo-tally-cell {
  padding: 0 3px !important;
  font-variant-numeric: tabular-nums;
}
.mo-tally-approve {
  color: #0f6b73;
  margin-right: 3px;
  font-weight: 700;
}
.mo-tally-reject {
  color: #b52424;
  font-weight: 700;
}
.mo-tally-empty {
  color: #9c8a6b;
}
.mo-vote-cell {
  position: relative;
  min-width: 74px;
  width: 74px;
  height: 38px;
}
.mo-vote-cell.is-on-team {
  background: rgba(232, 174, 48, 0.30) !important;
  box-shadow: inset 0 0 0 1px rgba(196, 138, 24, 0.72);
}
.mo-cell-crown,
.mo-cell-sword {
  position: absolute;
  top: 2px;
  left: 3px;
  width: 14px;
  height: 14px;
  filter: drop-shadow(0 1px 0 rgba(255, 245, 210, 0.85));
}
.mo-cell-crown {
  color: #b57408;
}
.mo-cell-sword {
  color: #c7840e;
}
.mo-cell-crown > svg,
.mo-cell-sword > svg {
  width: 100%;
  height: 100%;
  display: block;
}
.mo-cell-sword-flip {
  position: absolute;
  top: 1px;
  right: 2px;
  min-width: 14px;
  height: 14px;
  padding: 0 1px;
  border-radius: 3px;
  background:
    linear-gradient(
      135deg,
      #c96816 0%,
      #a81e2d 100%);
  border: 1px solid #ffe08a;
  color: #fff8e2;
  font: 700 10.5px/1 AvalonPixel, monospace;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(120, 24, 20, 0.45);
}
.mo-cell-watch {
  position: absolute;
  bottom: 1px;
  left: 2px;
  width: 14px;
  height: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #8f640c;
  pointer-events: none;
  filter: drop-shadow(0 1px 1px rgba(28, 18, 6, 0.45));
}
.mo-cell-watch > img,
.mo-cell-watch > svg,
.mo-legend-ic.is-watch > img,
.mo-legend-ic.is-watch > svg {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  image-rendering: pixelated;
}
.mo-legend-ic.is-watch {
  color: #8f640c;
}
.mo-player-lady {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  margin-left: auto;
}
.mo-player-lady > svg {
  width: 100%;
  height: 100%;
  display: block;
}
.mo-player-lady.is-current {
  color: #1c8ed6;
  filter: drop-shadow(0 0 4px rgba(56, 178, 248, 0.72));
}
.mo-player-lady.is-past {
  color: #5b7e96;
  opacity: 0.56;
}
.mo-cell-vote {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
}
.mo-cell-vote > svg {
  width: 100%;
  height: 100%;
  display: block;
}
.mo-cell-vote.is-approve {
  color: #0f6b73;
  filter: drop-shadow(0 0.5px 0 rgba(15, 107, 115, 0.35));
}
.mo-cell-vote.is-reject {
  color: #b52424;
  filter: drop-shadow(0 0.5px 0 rgba(181, 36, 36, 0.35));
}
.mo-cell-anon {
  color: #9c8a6b;
  font-size: 15px;
}
.mo-relic-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 6px;
  border-top: 1px solid rgba(132, 98, 46, 0.34);
  flex: none;
  overflow-x: auto;
  scrollbar-width: none;
}
.mo-relic-footer::-webkit-scrollbar {
  display: none;
}
.mo-relic-label {
  font-size: 12px;
  color: #6d5533;
  white-space: nowrap;
  flex: none;
}
.mo-relic-list {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.mo-relic-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
}
.mo-relic-chip.is-lady {
  background: rgba(34, 114, 152, 0.14);
  border: 1px solid rgba(34, 114, 152, 0.45);
  color: #164f6d;
}
.mo-relic-chip.is-sword {
  background: rgba(164, 116, 26, 0.16);
  border: 1px solid rgba(164, 116, 26, 0.48);
  color: #6a460b;
}
.mo-relic-ic {
  display: inline-flex;
  width: 13px;
  height: 13px;
}
.mo-relic-ic > svg {
  width: 100%;
  height: 100%;
  display: block;
}
.mo-relic-round {
  opacity: 0.72;
  font-size: 11px;
}
.mo-relic-flow {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.mo-legend-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 10px;
  padding: 5px 8px 2px;
  border-top: 1px solid rgba(132, 98, 46, 0.30);
  flex: 0 0 auto !important;
  font-size: 12px;
  color: #5c4525;
  overflow-x: auto;
  scrollbar-width: none;
  touch-action: pan-x;
}
.mo-legend-bar::-webkit-scrollbar {
  display: none;
}
.mo-legend-bar:not(:has(.mo-lady-chain, .mo-recruit-chip)) {
  justify-content: center;
}
.mo-recruit-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 11.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  flex: none;
}
.mo-recruit-chip.is-success {
  background: rgba(186, 30, 44, 0.14);
  border: 1px solid rgba(196, 56, 48, 0.56);
  color: #8f1622;
}
.mo-recruit-chip.is-fail {
  background: rgba(96, 106, 122, 0.14);
  border: 1px solid rgba(112, 122, 138, 0.48);
  color: #4a5566;
}
.mo-lady-chain {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(34, 126, 184, 0.13);
  border: 1px solid rgba(34, 126, 184, 0.45);
  color: #14547e;
  font-size: 11.5px;
  white-space: nowrap;
  flex: none;
}
.mo-lady-chain-text {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.mo-legend-items {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: none;
  margin-left: auto;
}
.mo-legend-bar:not(:has(.mo-lady-chain, .mo-recruit-chip)) .mo-legend-items {
  margin-left: 0;
}
.mo-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  flex: none;
}
.mo-legend-ic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 13px;
  height: 13px;
}
.mo-legend-ic > svg {
  width: 100%;
  height: 100%;
  display: block;
}
.mo-legend-ic.is-crown {
  color: #b57408;
}
.mo-legend-ic.is-sword {
  color: #c7840e;
}
.mo-legend-ic.is-lady {
  color: #1c8ed6;
}
.mo-legend-ic.is-approve {
  color: #0f6b73;
}
.mo-legend-ic.is-reject {
  color: #b52424;
}
.mo-legend-flip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  background:
    linear-gradient(
      135deg,
      #c96816 0%,
      #a81e2d 100%);
  border: 1px solid #ffe08a;
  color: #fff8e2;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
}
.mo-legend-swatch {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  background: rgba(232, 174, 48, 0.36);
  border: 1px solid rgba(196, 138, 24, 0.82);
}
.mo-stamp-popover {
  position: absolute;
  z-index: 30;
  width: max-content;
  max-width: min(310px, calc(100% - 20px));
  padding: 8px 10px;
  border-radius: 7px;
  background:
    linear-gradient(
      180deg,
      #faf2d8 0%,
      #eedcb2 100%);
  border: 1.5px solid #8f6a2e;
  box-shadow: 0 10px 26px rgba(18, 12, 5, 0.52), inset 0 1px 0 #fffbeb;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.mo-stamp-popover[hidden] {
  display: none !important;
}
.mo-popover-head {
  font-size: 12px;
  color: #5e4624;
  border-bottom: 1px solid rgba(132, 98, 46, 0.28);
  padding-bottom: 4px;
}
.mo-stamp-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.mo-stamp-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 26px !important;
  min-height: 26px !important;
  padding: 0 7px !important;
  border-radius: 4px !important;
  font: 400 12px/1 AvalonPixel, monospace !important;
  cursor: pointer;
  text-shadow: none !important;
  box-shadow: none !important;
}
.mo-stamp-btn[aria-pressed=true] {
  outline: 2px solid #b5780f;
  outline-offset: -1px;
  filter: brightness(0.95);
  font-weight: 700 !important;
}
.mo-stamp-btn.mo-stamp-clear {
  background: rgba(88, 66, 38, 0.12) !important;
  border: 1px solid rgba(120, 92, 52, 0.42) !important;
  color: #4f3a1e !important;
}
html[data-mobile-shell=true] #modals dialog.match-overview-layer {
  padding: max(6px, env(safe-area-inset-top)) max(6px, env(safe-area-inset-right)) max(6px, env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-left)) !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}
html[data-mobile-shell=true] #modals .match-overview-document {
  width: calc(100vw - env(safe-area-inset-left) - env(safe-area-inset-right) - 12px) !important;
  max-width: calc(100vw - env(safe-area-inset-left) - env(safe-area-inset-right) - 12px) !important;
  height: calc(var(--mobile-viewport-height, 100dvh) - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 12px) !important;
  max-height: calc(var(--mobile-viewport-height, 100dvh) - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 12px) !important;
  min-height: 0 !important;
  padding: 5px 8px 5px !important;
  gap: 4px !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  zoom: 1 !important;
}
html[data-mobile-shell=true] .match-overview-document .mo-header-bar {
  padding-bottom: 3px;
  gap: 6px;
  flex: 0 0 auto !important;
}
html[data-mobile-shell=true] .match-overview-document .mo-header-bar > .document-title {
  font-size: 14.5px !important;
  min-height: 0 !important;
  padding: 0 !important;
}
html[data-mobile-shell=true] .mo-deck-pill {
  padding: 1px 4px;
  font-size: 10.5px;
}
html[data-mobile-shell=true] .mo-rej-badge {
  padding: 2px 6px;
  font-size: 10.5px;
}
html[data-mobile-shell=true] .match-overview-document .mo-toggle-notes {
  height: 24px !important;
  min-height: 24px !important;
  padding: 0 7px !important;
  font-size: 11px !important;
}
html[data-mobile-shell=true] .match-overview-document .mo-header-controls > .document-close,
html[data-mobile-shell=true] .match-overview-document .mo-header-bar > .document-close {
  width: 26px !important;
  height: 26px !important;
  min-width: 26px !important;
  min-height: 26px !important;
  font-size: 14px !important;
}
html[data-mobile-shell=true] .mo-sticky-1 {
  width: 118px;
  min-width: 118px;
  max-width: 118px;
}
html[data-mobile-shell=true] .mo-sticky-2 {
  left: 118px;
  width: 74px;
  min-width: 74px;
  max-width: 74px;
}
html[data-mobile-shell=true] .mo-mini-avatar {
  display: none;
}
html[data-mobile-shell=true] .mo-table thead tr.mo-head-rounds th {
  height: 28px;
}
html[data-mobile-shell=true] .mo-table thead tr.mo-head-subs th {
  top: 28px;
  height: 20px;
}
html[data-mobile-shell=true] .mo-table thead th.mo-sticky-1,
html[data-mobile-shell=true] .mo-table thead th.mo-sticky-2 {
  font-size: 12px;
}
html[data-mobile-shell=true] .mo-shield-badge {
  width: 20px;
  height: 22px;
  font-size: 11px;
  border-radius: 3px 3px 8px 8px;
}
html[data-mobile-shell=true] .mo-shield-mark {
  width: 11px;
  height: 11px;
}
html[data-mobile-shell=true] .mo-shield-fail {
  font-size: 10px;
}
html[data-mobile-shell=true] .mo-shield-lance-pip {
  top: -3px;
  right: -5px;
  min-width: 11px;
  height: 11px;
  font-size: 8px;
}
html[data-mobile-shell=true] .mo-sub-col {
  min-width: 56px;
  width: 56px;
  font-size: 11.5px;
}
html[data-mobile-shell=true] .mo-player-row {
  height: 25px;
}
html[data-mobile-shell=true] .mo-vote-cell {
  height: 25px;
  min-width: 56px;
  width: 56px;
}
html[data-mobile-shell=true] .match-overview-document[data-compact-cols=false] .mo-sub-col,
html[data-mobile-shell=true] .match-overview-document[data-compact-cols=false] .mo-vote-cell {
  min-width: 68px;
  width: 68px;
}
html[data-mobile-shell=true] .mo-cell-crown,
html[data-mobile-shell=true] .mo-cell-sword {
  width: 11px;
  height: 11px;
  top: 1px;
  left: 2px;
}
html[data-mobile-shell=true] .mo-cell-watch {
  width: 11px;
  height: 12px;
  bottom: 1px;
  left: 2px;
}
html[data-mobile-shell=true] .mo-cell-sword-flip {
  min-width: 11px;
  height: 11px;
  font-size: 8.5px;
  top: 1px;
  right: 1px;
}
html[data-mobile-shell=true] .mo-player-lady {
  width: 12px;
  height: 12px;
}
html[data-mobile-shell=true] .mo-player-cell {
  padding: 0 5px;
  gap: 3px;
}
html[data-mobile-shell=true] .mo-seat-num {
  min-width: 19px;
  height: 16px;
  font-size: 10.5px;
}
html[data-mobile-shell=true] .mo-player-name {
  font-size: 11px;
  flex: 1 1 0;
}
html[data-mobile-shell=true] .mo-note-slot {
  height: 20px !important;
  min-height: 20px !important;
  padding: 0 4px !important;
  width: calc(100% - 6px);
}
html[data-mobile-shell=true] .mo-cell-vote {
  width: 14px;
  height: 14px;
}
html[data-mobile-shell=true] .mo-table tfoot.mo-tally-foot tr.mo-tally-row th,
html[data-mobile-shell=true] .mo-table tfoot.mo-tally-foot tr.mo-tally-row td {
  height: 20px;
  font-size: 10px;
}
html[data-mobile-shell=true] .mo-legend-bar {
  gap: 6px;
  padding: 2px 5px 1px;
  font-size: 10px;
  flex: 0 0 auto !important;
}
html[data-mobile-shell=true] .mo-lady-chain {
  padding: 1px 5px;
  font-size: 10px;
}
html[data-mobile-shell=true] .mo-legend-items {
  gap: 7px;
}
html[data-mobile-shell=true] .mo-legend-ic,
html[data-mobile-shell=true] .mo-legend-swatch,
html[data-mobile-shell=true] .mo-legend-flip {
  width: 11px;
  height: 11px;
  font-size: 8.5px;
}
html[data-mobile-shell=true] .match-overview-document:is([data-player-count="5"], [data-player-count="6"], [data-player-count="7"]) .mo-player-row,
html[data-mobile-shell=true] .match-overview-document:is([data-player-count="5"], [data-player-count="6"], [data-player-count="7"]) .mo-vote-cell {
  height: 34px;
}
@media (max-width: 900px), (max-height: 520px) {
  #modals dialog.match-overview-layer {
    top: var(--mobile-viewport-top, 0px);
    height: var(--mobile-viewport-height, 100dvh);
    max-height: var(--mobile-viewport-height, 100dvh);
    padding: max(6px, env(safe-area-inset-top)) max(6px, env(safe-area-inset-right)) max(6px, env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-left)) !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }
  #modals .match-overview-document,
  #modals .match-overview-document[data-compact-cols=true] {
    width: calc(100vw - env(safe-area-inset-left) - env(safe-area-inset-right) - 12px) !important;
    max-width: calc(100vw - env(safe-area-inset-left) - env(safe-area-inset-right) - 12px) !important;
    height: calc(var(--mobile-viewport-height, 100dvh) - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 12px) !important;
    max-height: calc(var(--mobile-viewport-height, 100dvh) - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 12px) !important;
    min-height: 0 !important;
    padding: 5px 8px 5px !important;
    gap: 4px !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    zoom: 1 !important;
  }
  .match-overview-document .mo-header-bar {
    padding-bottom: 3px;
    gap: 6px;
    flex: 0 0 auto !important;
  }
  .match-overview-document .mo-header-bar > .document-title {
    font-size: 14.5px !important;
    min-height: 0 !important;
    padding: 0 !important;
  }
  .match-overview-document .mo-header-controls > .document-close,
  .match-overview-document .mo-header-bar > .document-close {
    width: 26px !important;
    height: 26px !important;
    min-width: 26px !important;
    min-height: 26px !important;
    font-size: 14px !important;
  }
  .match-overview-document .avalon-button.mo-spectator-btn {
    height: 24px !important;
    min-height: 24px !important;
    padding: 0 8px !important;
    font-size: 11px !important;
  }
  .match-overview-document .avalon-button.mo-toggle-notes {
    height: 24px !important;
    min-height: 24px !important;
    padding: 0 7px !important;
    font-size: 11px !important;
  }
  .mo-deck-pill {
    padding: 1px 4px;
    font-size: 10.5px;
  }
  .mo-rej-badge {
    padding: 2px 6px;
    font-size: 10.5px;
  }
  .mo-mini-avatar {
    display: none;
  }
  .mo-sticky-1 {
    width: 118px;
    min-width: 118px;
    max-width: 118px;
  }
  .mo-sticky-2 {
    left: 118px;
    width: 70px;
    min-width: 70px;
    max-width: 70px;
  }
  .mo-table thead tr.mo-head-rounds th {
    height: 28px;
  }
  .mo-table thead tr.mo-head-subs th {
    top: 28px;
    height: 20px;
  }
  .mo-table thead th.mo-sticky-1,
  .mo-table thead th.mo-sticky-2 {
    font-size: 12px;
  }
  .mo-shield-badge {
    width: 20px;
    height: 22px;
    font-size: 11px;
    border-radius: 3px 3px 8px 8px;
  }
  .mo-shield-mark {
    width: 11px;
    height: 11px;
  }
  .mo-shield-fail {
    font-size: 10px;
  }
  .mo-shield-lance-pip {
    top: -3px;
    right: -5px;
    min-width: 11px;
    height: 11px;
    font-size: 8px;
  }
  .mo-sub-col,
  .mo-vote-cell {
    min-width: 58px;
    width: 58px;
    font-size: 11.5px;
  }
  .mo-player-row,
  .mo-vote-cell {
    height: 28px;
  }
  .mo-cell-crown,
  .mo-cell-sword {
    width: 11px;
    height: 11px;
    top: 1px;
    left: 2px;
  }
  .mo-cell-watch {
    width: 11px;
    height: 12px;
    bottom: 1px;
    left: 2px;
  }
  .mo-cell-sword-flip {
    min-width: 11px;
    height: 11px;
    font-size: 8.5px;
    top: 1px;
    right: 1px;
  }
  .mo-player-lady {
    width: 12px;
    height: 12px;
  }
  .mo-player-cell {
    padding: 0 5px;
    gap: 3px;
  }
  .mo-seat-num {
    min-width: 19px;
    height: 16px;
    font-size: 10.5px;
  }
  .mo-player-name {
    font-size: 11.5px;
    flex: 1 1 0;
  }
  .mo-note-slot {
    height: 20px !important;
    min-height: 20px !important;
    padding: 0 4px !important;
    width: calc(100% - 6px);
  }
  .mo-cell-vote {
    width: 14px;
    height: 14px;
  }
  .mo-table tfoot.mo-tally-foot tr.mo-tally-row th,
  .mo-table tfoot.mo-tally-foot tr.mo-tally-row td {
    height: 20px;
    font-size: 10px;
  }
  .mo-legend-bar {
    gap: 6px;
    padding: 3px 5px 1px;
    font-size: 10px;
    flex: 0 0 auto !important;
  }
  .mo-lady-chain {
    padding: 1px 5px;
    font-size: 10px;
  }
  .mo-legend-items {
    gap: 7px;
  }
  .mo-legend-ic,
  .mo-legend-swatch,
  .mo-legend-flip {
    width: 11px;
    height: 11px;
    font-size: 8.5px;
  }
}
@media (max-width: 640px) {
  #modals .match-overview-document,
  html[data-mobile-shell=true] #modals .match-overview-document {
    height: auto !important;
    max-height: calc(var(--mobile-viewport-height, 100dvh) - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 16px) !important;
    padding: 8px 8px 6px !important;
    gap: 6px !important;
  }
  .match-overview-document .mo-header-bar {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    grid-template-rows: auto auto !important;
    align-items: center !important;
    gap: 5px 8px !important;
    padding-bottom: 6px !important;
  }
  .match-overview-document .mo-header-bar > .document-title {
    grid-column: 1 !important;
    grid-row: 1 !important;
    font-size: 16px !important;
    text-align: left !important;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .match-overview-document .mo-header-bar > .document-close {
    grid-column: 2 !important;
    grid-row: 1 !important;
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    min-height: 30px !important;
    font-size: 16px !important;
  }
  .match-overview-document .mo-header-controls {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    justify-content: flex-start !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
    scrollbar-width: none;
    gap: 5px !important;
    padding-bottom: 1px;
  }
  .match-overview-document .mo-header-controls::-webkit-scrollbar {
    display: none;
  }
  .match-overview-document .mo-deck-strip {
    flex: 0 0 auto !important;
    flex-wrap: nowrap !important;
    overflow: visible !important;
    max-width: none !important;
  }
  .match-overview-document .mo-sticky-1 {
    width: 102px !important;
    min-width: 102px !important;
    max-width: 102px !important;
  }
  .match-overview-document .mo-sticky-2 {
    left: 102px !important;
    width: 58px !important;
    min-width: 58px !important;
    max-width: 58px !important;
  }
  .match-overview-document .mo-sub-col,
  .match-overview-document .mo-vote-cell,
  .match-overview-document[data-compact-cols=false] .mo-sub-col,
  .match-overview-document[data-compact-cols=false] .mo-vote-cell {
    min-width: 56px !important;
    width: 56px !important;
  }
  .match-overview-document .mo-player-row,
  .match-overview-document .mo-vote-cell,
  .match-overview-document:is([data-player-count="5"], [data-player-count="6"], [data-player-count="7"]) .mo-player-row,
  .match-overview-document:is([data-player-count="5"], [data-player-count="6"], [data-player-count="7"]) .mo-vote-cell {
    height: 36px !important;
  }
  .match-overview-document .mo-table thead tr.mo-head-rounds th {
    height: 32px !important;
  }
  .match-overview-document .mo-table thead tr.mo-head-subs th {
    top: 32px !important;
    height: 22px !important;
  }
  .match-overview-document .mo-note-slot {
    height: 26px !important;
    min-height: 26px !important;
    padding: 0 4px !important;
    width: calc(100% - 6px) !important;
  }
  .match-overview-document .mo-player-name {
    font-size: 12px !important;
  }
  .match-overview-document .mo-legend-bar {
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    font-size: 11px !important;
    padding: 4px 4px 2px !important;
  }
}
@media (max-height: 500px) {
  #modals .match-overview-document {
    height: calc(var(--mobile-viewport-height, 100dvh) - 12px) !important;
    max-height: calc(var(--mobile-viewport-height, 100dvh) - 12px) !important;
    min-height: 0 !important;
    padding: 5px 8px 4px !important;
    gap: 3px !important;
  }
  .match-overview-document .mo-header-bar {
    padding-bottom: 3px;
  }
  .match-overview-document .mo-table thead tr.mo-head-rounds th {
    height: 27px;
  }
  .match-overview-document .mo-table thead tr.mo-head-subs th {
    top: 27px;
    height: 19px;
  }
  .match-overview-document .mo-player-row,
  .match-overview-document .mo-vote-cell {
    height: 24px;
  }
  .match-overview-document .mo-note-slot {
    height: 19px;
  }
  .match-overview-document .mo-legend-bar {
    padding: 2px 5px 0;
    font-size: 10px;
    gap: 6px;
  }
}
.mo-deck-pill.mo-tag-lancelot.is-swapped {
  background:
    linear-gradient(
      90deg,
      rgba(44, 102, 168, 0.24) 0%,
      rgba(168, 42, 62, 0.28) 100%);
  border-color: rgba(166, 46, 72, 0.65);
  color: #6b1526;
  font-weight: 700;
}
.mo-deck-pill.mo-tag-messengers {
  background:
    linear-gradient(
      180deg,
      rgba(31, 118, 84, 0.2) 0%,
      rgba(20, 84, 60, 0.26) 100%);
  border: 1px solid rgba(31, 118, 84, 0.65);
  color: #114a34;
  font-weight: 700;
}
.mo-shield-badge {
  position: relative;
}
.mo-shield-badge[data-msg-backup-state=good-ready] {
  box-shadow: 0 0 0 1.5px #22a374, 0 0 8px rgba(42, 176, 126, 0.55) !important;
}
.mo-shield-badge[data-msg-backup-state=evil-ready] {
  box-shadow: 0 0 0 1.5px #d42c3e, 0 0 8px rgba(212, 44, 62, 0.55) !important;
}
.mo-shield-msg-seal {
  position: absolute;
  left: 50%;
  bottom: -5px;
  transform: translateX(-50%);
  z-index: 4;
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  min-width: 22px;
  height: 11px;
  border-radius: 3px;
  overflow: hidden;
  border: 1px solid #b88e3e;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
  font: 700 8.5px/1 AvalonPixel, monospace;
}
.mo-shield-msg-seal > i {
  font-style: normal;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 2px;
}
.mo-shield-msg-seal > .mo-msg-seal-good {
  background: #145942;
  color: #c8f9e4;
  border-right: 1px solid rgba(184, 142, 62, 0.7);
}
.mo-shield-msg-seal > .mo-msg-seal-good[data-ready=true] {
  background: #20966c;
  color: #ffffff;
}
.mo-shield-msg-seal > .mo-msg-seal-evil {
  background: #6c1722;
  color: #ffd0d6;
}
.mo-shield-msg-seal > .mo-msg-seal-evil[data-ready=true] {
  background: #b82234;
  color: #fff6d6;
}
.mo-deck-pill.mo-tag-rogues {
  background:
    linear-gradient(
      180deg,
      rgba(200, 162, 40, 0.22) 0%,
      rgba(128, 98, 20, 0.28) 100%);
  border: 1px solid rgba(176, 134, 22, 0.72);
  color: #5c4206;
  font-weight: 700;
}
.mo-shield-rogue-pips {
  position: absolute;
  left: 50%;
  bottom: -4px;
  transform: translateX(-50%);
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  pointer-events: none;
}
.mo-rogue-pip {
  display: inline-block;
  width: 7px;
  height: 7px;
  transform: rotate(45deg);
  border-radius: 1px;
  border: 1.2px solid #e8bf42;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.65);
}
.mo-rogue-pip.is-good {
  background:
    radial-gradient(
      circle at 36% 36%,
      #8fd0ff 0%,
      #247ee8 65%,
      #114391 100%);
}
.mo-rogue-pip.is-evil {
  background:
    radial-gradient(
      circle at 36% 36%,
      #ff9aa6 0%,
      #df283c 65%,
      #7a0e1b 100%);
}

/* web/src/record-archive.css */
.game-document.v4-record-detail-dialog.record-archive-dialog::before,
.game-document.v4-record-detail-dialog.record-archive-dialog::after {
  content: none !important;
  display: none !important;
}
.game-document.v4-record-detail-dialog.record-archive-dialog {
  --arc-ink:#2b2013;
  --arc-sub:#6e532e;
  --arc-border:#9f7939;
  --arc-paper:#f6eccf;
  --arc-light:#fff8e6;
  --arc-gold:#b88633;
  --arc-good:#154d79;
  --arc-evil:#8f1b24;
  width: min(1040px, calc((100vw - 28px) / var(--v4-ui-scale, 1))) !important;
  max-width: min(1040px, calc((100vw - 28px) / var(--v4-ui-scale, 1))) !important;
  height: min(700px, calc((100dvh - 28px) / var(--v4-ui-scale, 1))) !important;
  max-height: calc((100dvh - 28px) / var(--v4-ui-scale, 1)) !important;
  padding: 12px 16px 10px !important;
  gap: 8px !important;
  color: var(--arc-ink) !important;
  background:
    linear-gradient(
      180deg,
      #f6eccf 0%,
      #ead8ab 100%) !important;
  border: 2px solid #9f7939 !important;
  box-shadow:
    0 0 0 1px #24190c,
    0 18px 46px rgba(0, 0, 0, .75),
    inset 0 1px 0 #fff8df !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  box-sizing: border-box;
}
.record-archive-dialog .record-archive-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 10px;
  min-height: 36px;
  padding-bottom: 7px;
  border-bottom: 1.5px solid rgba(132, 98, 46, 0.38);
  flex: 0 0 auto;
  min-width: 0;
  z-index: 2;
}
.record-archive-top-left {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
  min-width: 0;
}
.record-archive-dialog .record-archive-back.avalon-button {
  min-width: 60px !important;
  height: 30px !important;
  min-height: 30px !important;
  margin: 0 !important;
  padding: 0 9px !important;
  font-size: 12.5px !important;
  white-space: nowrap;
  border-radius: 5px !important;
  background:
    linear-gradient(
      180deg,
      #fff9e6,
      #ebd8ab) !important;
  border: 1.5px solid #8f6b32 !important;
  color: #362410 !important;
  text-shadow: none !important;
  box-shadow: inset 0 1px 0 #fffdf4 !important;
}
.record-archive-dialog .record-archive-top .document-title {
  min-width: 0;
  min-height: 0;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  font: 400 19px/1.15 AvalonPixel, monospace !important;
  color: #2e1f0e !important;
  text-shadow: 0 1px 0 rgba(255, 248, 224, .75);
  white-space: nowrap;
  flex: none;
}
.record-archive-dialog .record-archive-tabs {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border-radius: 6px;
  background: rgba(76, 54, 24, 0.14);
  border: 1px solid rgba(132, 98, 46, 0.44);
  flex: none;
}
#modals .record-archive-dialog .record-archive-tab.avalon-button {
  min-width: 76px !important;
  height: 26px !important;
  min-height: 26px !important;
  padding: 0 10px !important;
  margin: 0 !important;
  white-space: nowrap;
  font-size: 12.5px !important;
  line-height: 1 !important;
  border-radius: 4px !important;
  background: transparent !important;
  border: 1px solid transparent !important;
  color: #4c361a !important;
  text-shadow: none !important;
  box-shadow: none !important;
  opacity: 1 !important;
}
#modals .record-archive-dialog .record-archive-tab.avalon-button[aria-selected=true] {
  background:
    linear-gradient(
      180deg,
      #3c2b18,
      #261a0e) !important;
  border-color: #24190c !important;
  color: #ffe6a2 !important;
  box-shadow: 0 1px 4px rgba(24, 15, 6, 0.35) !important;
}
.record-archive-top-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
}
.record-archive-ext-strip {
  justify-content: flex-end;
}
.record-archive-dialog .record-archive-top .document-close {
  position: static !important;
  inset: auto !important;
  flex: none;
  width: 30px !important;
  height: 30px !important;
  min-width: 30px !important;
  min-height: 30px !important;
  margin: 0 !important;
  padding: 0 !important;
  transform: none !important;
}
.mo-deck-pill.mo-tag-early-blade {
  background:
    linear-gradient(
      180deg,
      rgba(164, 24, 34, 0.20),
      rgba(112, 16, 26, 0.24));
  border: 1px solid rgba(196, 44, 56, 0.65);
  color: #7e121c;
  font-weight: 700;
}
.game-document.record-archive-dialog[data-view=overview] > .v4-record-detail-scroll.record-archive-body {
  flex: 0 0 auto !important;
  height: auto !important;
  overflow: visible !important;
}
.game-document.record-archive-dialog > .v4-record-detail-scroll.record-archive-body {
  margin: 0;
  padding: 1px 2px 2px;
  min-height: 0;
  gap: 0;
  touch-action: auto;
  scrollbar-width: thin;
  scrollbar-color: #9b7740 #e9d9ae;
  flex: 1 1 auto !important;
  display: flex;
  flex-direction: column;
}
.record-archive-dialog .record-archive-panel[hidden],
.record-archive-dialog [hidden] {
  display: none !important;
}
.record-archive-dialog .record-archive-panel {
  min-width: 0;
}
.record-archive-body[data-view=matrix] {
  overflow: hidden !important;
}
.record-archive-dialog .record-archive-panel[data-view=matrix] {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.record-archive-dialog :is(button, [tabindex]):focus-visible {
  outline: 2px solid #794b14;
  outline-offset: -2px;
}
.record-archive-dialog .arc-matrix-section {
  position: relative;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  gap: 6px;
}
.record-archive-dialog .arc-table-wrap {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  min-width: 0;
  overflow: auto !important;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-x pan-y !important;
  border: 1.5px solid rgba(132, 98, 46, 0.48);
  border-radius: 6px;
  background: rgba(251, 244, 224, 0.80);
  scrollbar-width: thin;
  scrollbar-color: #9e7b42 rgba(132, 98, 46, 0.14);
}
.record-archive-dialog .arc-table-wrap[data-dragging=true] {
  cursor: grabbing;
  user-select: none;
}
.record-archive-dialog .arc-table-wrap::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
.record-archive-dialog .arc-table-wrap::-webkit-scrollbar-track {
  background: rgba(132, 98, 46, 0.12);
  border-radius: 3px;
}
.record-archive-dialog .arc-table-wrap::-webkit-scrollbar-thumb {
  background: rgba(154, 114, 48, 0.78);
  border-radius: 3px;
}
.arc-matrix-table {
  width: max-content;
  min-width: 100%;
}
.arc-matrix-table .arc-player-col {
  width: 196px;
  min-width: 196px;
  max-width: 196px;
  background: #f5e7c0;
  box-shadow: 3px 0 7px rgba(56, 38, 12, 0.18);
  text-align: left;
}
.arc-matrix-table thead th.arc-player-col {
  z-index: 12 !important;
  top: 0;
  background: #e5cf9d !important;
  text-align: center;
  font-size: 13.5px;
  color: #4b3519;
}
.arc-matrix-table tbody tr:nth-child(even) th.arc-player-col {
  background: #eedfb9;
}
.arc-matrix-table tbody tr[data-focus-row=true] th.arc-player-col {
  background: #f4df9e !important;
}
.arc-matrix-table tbody tr[data-focus-row=true] td:not(.is-on-team) {
  background: rgba(242, 200, 96, 0.24) !important;
}
.arc-matrix-table thead tr.mo-head-rounds th {
  height: 50px;
  top: 0;
  z-index: 5;
  background: #e7d4a6;
}
.arc-matrix-table thead tr.mo-head-subs th {
  top: 50px;
  height: 26px;
  z-index: 5;
  background: #efe1bc;
}
.arc-matrix-table [data-round-start=true] {
  border-left: 1.5px solid rgba(124, 92, 42, 0.45);
}
.arc-matrix-table .mo-round-head.has-tally {
  flex-direction: column;
  gap: 2px;
  padding: 2px 4px;
}
.mo-shield-tally {
  font: 400 10.5px/1 AvalonPixel, monospace;
  color: #4c371b;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.mo-shield-tally.is-empty {
  color: #9c8868;
}
.arc-head-btn,
.arc-sub-btn,
.arc-cell-btn {
  appearance: none;
  border: 0;
  background: none;
  padding: 0;
  margin: 0;
  width: 100%;
  height: 100%;
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.arc-head-btn:hover,
.arc-sub-btn:hover {
  background: rgba(255, 250, 232, 0.35);
}
.arc-cell-btn:hover {
  background: rgba(255, 248, 224, 0.28);
}
.arc-player-row {
  height: 44px;
}
.arc-vote-cell {
  height: 44px;
  min-width: 68px;
  width: 68px;
}
.arc-sub-col {
  min-width: 68px;
  width: 68px;
}
.arc-player-cell {
  padding: 2px 6px;
  gap: 6px;
  align-items: center;
  cursor: pointer;
}
.arc-player-meta {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  min-width: 0;
  flex: 1 1 auto;
}
.arc-player-name-row {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}
.arc-player-name {
  font-size: 13px;
  line-height: 1.15;
  color: #2b1e10;
}
.arc-player-role-row {
  display: flex;
  align-items: center;
  gap: 3px;
  min-width: 0;
}
.arc-role-pill {
  display: inline-flex;
  align-items: center;
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 11px;
  line-height: 1.15;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  background: rgba(130, 102, 58, 0.16);
  border: 1px solid rgba(130, 102, 58, 0.42);
  color: #4c381c;
}
.arc-role-pill[data-faction=good] {
  background: rgba(28, 98, 172, 0.16);
  border-color: rgba(28, 98, 172, 0.52);
  color: #134782;
}
.arc-role-pill[data-faction=evil] {
  background: rgba(176, 34, 42, 0.16);
  border-color: rgba(176, 34, 42, 0.52);
  color: #8d1720;
}
.arc-role-pill[data-swapped=true] {
  font-weight: 700;
}
.arc-role-pill[data-recruited=true] {
  background:
    linear-gradient(
      90deg,
      rgba(186, 30, 44, 0.22),
      rgba(148, 22, 34, 0.18));
  border-color: rgba(186, 36, 46, 0.65);
  color: #84131c;
  font-weight: 700;
}
.arc-target-pip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 16px;
  height: 15px;
  border-radius: 3px;
  background: rgba(178, 28, 38, 0.16);
  border: 1px solid rgba(178, 28, 38, 0.58);
  color: #9c1620;
  line-height: 1;
}
.arc-target-pip > svg {
  width: 10px;
  height: 10px;
  display: block;
}
.mo-cell-sword.is-offset {
  left: 18px;
}
.arc-card-pip {
  position: absolute;
  bottom: 1px;
  right: 2px;
  z-index: 2;
  padding: 0 3px;
  height: 14px;
  border-radius: 3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: 700 9.5px/1 AvalonPixel, monospace;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 1px 2px rgba(20, 12, 6, 0.35);
}
.arc-card-pip.is-fail {
  background: #b81d29;
  border: 1px solid #ffcf94;
  color: #fff7e6;
}
.arc-card-pip.is-flip-fail {
  background:
    linear-gradient(
      135deg,
      #c22828,
      #7f121e);
  border: 1px solid #ffe08a;
  color: #fff8e2;
}
.arc-card-pip.is-flip-good {
  background:
    linear-gradient(
      135deg,
      #226eb8,
      #14447a);
  border: 1px solid #ffe08a;
  color: #f2faff;
}
.arc-card-pip.is-magic {
  background:
    linear-gradient(
      135deg,
      #7c42b8,
      #4f2282);
  border: 1px solid #e6c8ff;
  color: #faf4ff;
}
.arc-matrix-foot th,
.arc-matrix-foot td {
  position: sticky;
  bottom: 0;
  z-index: 4;
  height: 26px;
  background: #e5cf9d !important;
  border-top: 1.5px solid rgba(128, 94, 42, 0.55);
  font-size: 11.5px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.arc-matrix-foot th.arc-player-col {
  z-index: 9 !important;
  text-align: center;
  color: #4b3519;
  font-weight: 700;
}
.arc-aggregate-cell {
  padding: 0 3px !important;
}
.arc-agg-approve {
  color: #0f6b73;
  font-weight: 700;
  margin-right: 3px;
}
.arc-agg-reject {
  color: #a82026;
  font-weight: 700;
}
.arc-agg-empty {
  color: #9c8868;
}
.arc-footer-bar {
  padding: 4px 6px 1px;
  gap: 8px;
}
.arc-trace-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
}
.arc-assassination-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 11.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  flex: none;
}
.arc-assassination-chip.is-hit {
  background: rgba(186, 30, 44, 0.14);
  border: 1px solid rgba(196, 56, 48, 0.56);
  color: #8f1622;
}
.arc-assassination-chip.is-miss {
  background: rgba(28, 102, 168, 0.14);
  border: 1px solid rgba(28, 102, 168, 0.48);
  color: #144d82;
}
.arc-legend-fail {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  height: 14px;
  border-radius: 3px;
  background: #b81d29;
  border: 1px solid #ffcf94;
  color: #fff7e6;
  font-size: 9.5px;
  font-weight: 700;
  line-height: 1;
}
.record-archive-dialog .v4-record-drilldown {
  position: absolute;
  z-index: 15;
  inset: auto 6px 34px;
  max-height: min(54%, 172px);
  background: #fff4d4;
  border: 1.5px solid #9f7939;
  border-left: 4px solid #b88633;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 12px;
  color: var(--arc-ink);
  overflow: auto;
  box-shadow: 0 6px 20px rgba(32, 20, 8, 0.45);
  overflow-wrap: anywhere;
  overscroll-behavior: contain;
}
.v4-record-drilldown-heading {
  display: flex;
  gap: 6px;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}
.v4-record-drilldown-title {
  font-size: 13px;
  color: #38240e;
}
.record-archive-dialog .v4-record-drilldown-close {
  width: 26px !important;
  height: 26px !important;
  min-width: 26px !important;
  min-height: 26px !important;
  margin: 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ebd4a0;
  color: #432e14;
  border: 1px solid var(--arc-border);
  border-radius: 4px;
  cursor: pointer;
}
.v4-record-drilldown-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 10px;
  margin: 0;
}
.v4-record-drilldown-field {
  display: flex;
  gap: 5px;
  min-width: 0;
  align-items: baseline;
}
.v4-record-drilldown-field dt {
  font-weight: 700;
  white-space: nowrap;
  color: var(--arc-sub);
}
.v4-record-drilldown-field dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}
.arc-drill-cards {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
}
.arc-drill-card-chip {
  display: inline-flex;
  align-items: center;
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.arc-drill-card-chip.is-success {
  background: rgba(28, 102, 168, 0.16);
  border: 1px solid rgba(28, 102, 168, 0.48);
  color: #144d82;
}
.arc-drill-card-chip.is-fail {
  background: rgba(186, 30, 44, 0.18);
  border: 1px solid rgba(186, 30, 44, 0.56);
  color: #8f1622;
}
.arc-drill-card-chip.is-magic {
  background: rgba(124, 66, 184, 0.18);
  border: 1px solid rgba(124, 66, 184, 0.56);
  color: #592691;
}
.record-overview {
  display: grid;
  gap: 10px;
  font-size: 14px;
}
.record-overview-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.record-archive-dialog .record-overview-card.v4-pedestal {
  background: linear-gradient(#fff6dc, #eddcb4);
  border: 1.5px solid #a48650;
  border-radius: 6px;
  padding: 10px 13px;
  min-width: 0;
  box-shadow: inset 0 1px #fff9;
}
.record-overview-card h3 {
  margin: 0 0 4px;
  color: var(--arc-ink);
  font-size: 18px;
  line-height: 1.25;
}
.record-overview-card p {
  margin: 2px 0;
  line-height: 1.28;
}
.record-overview-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  align-items: center;
  margin: 5px 0 0;
}
.record-overview-stat {
  display: flex;
  gap: 4px;
  min-width: 0;
  line-height: 1.25;
  font-size: 13px;
}
.record-overview-stat dt {
  color: var(--arc-sub);
  white-space: nowrap;
  font-weight: 700;
}
.record-overview-stat dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.record-overview-verdict {
  color: #70461d;
  display: flex;
  align-items: center;
  gap: 5px;
}
.record-overview-card[data-winner=good] .record-overview-verdict {
  color: var(--arc-good);
}
.record-overview-card[data-winner=evil] .record-overview-verdict {
  color: var(--arc-evil);
}
.record-overview-crest {
  width: 22px;
  height: 20px;
  display: grid;
  place-items: center;
  flex: none;
}
.record-overview-crest img,
.record-overview-duel-result img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
}
.record-overview-duel-result {
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 700;
  color: var(--arc-good);
}
.record-overview-duel-result img {
  width: 17px;
  height: 14px;
}
.record-overview-duel-footer[data-outcome=hit] .record-overview-duel-result {
  color: var(--arc-evil);
}
.record-overview-identity {
  display: flex;
  gap: 5px;
  align-items: center;
  margin-top: 4px;
}
.record-overview-identity span {
  padding: 2px 6px;
  border: 1px solid #ac8a49;
  border-radius: 4px;
  font-size: .88em;
}
.record-overview-own-faction[data-faction=good] {
  color: var(--arc-good);
  background: #dcebf1;
}
.record-overview-own-faction[data-faction=evil] {
  color: var(--arc-evil);
  background: #efd7cf;
}
.record-overview-duel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18px minmax(0, 1fr);
  gap: 6px;
  align-items: center;
}
.record-overview-duelist {
  min-width: 0;
  padding: 4px 6px;
  display: grid;
  gap: 1px;
  align-items: center;
  border: 1px solid #a98448;
  border-radius: 4px;
  background: #fbebc5;
  line-height: 1.18;
}
.record-overview-duelist[data-side=executor] {
  color: var(--arc-evil);
}
.record-overview-duelist[data-side=target] {
  color: var(--arc-good);
}
.record-overview-duelist-name,
.record-overview-duelist-role {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.record-overview-duelist-role {
  font-size: .84em;
}
.record-overview-duel-arrow {
  justify-self: center;
  color: #815719;
  font-weight: 700;
}
.record-overview-duel-footer {
  display: flex;
  gap: 4px 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 4px;
}
.record-overview-track {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  padding: 8px 8px;
  margin: 0;
  list-style: none;
  border: 1.5px solid #a48650;
  border-radius: 6px;
  background: rgba(180, 140, 75, 0.14);
}
.record-overview-node {
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--arc-sub);
  font-size: 12px;
  line-height: 1.1;
}
.record-overview-node:not(:last-child)::after {
  content: "";
  position: absolute;
  z-index: 0;
  left: calc(50% + 18px);
  width: calc(100% - 30px);
  top: 52%;
  height: 1.5px;
  background: rgba(145, 109, 61, 0.42);
  pointer-events: none;
}
.record-overview-round-lbl {
  font-size: 11.5px;
  color: #5a4120;
}
.record-overview-node .mo-round-head {
  position: relative;
  z-index: 1;
  padding: 0;
}
.record-overview-node .mo-round-head.has-tally {
  flex-direction: column;
  gap: 3px;
}
.record-overview-node .mo-shield-badge {
  width: 30px;
  height: 32px;
  font-size: 14px;
}
.record-overview-node .mo-shield-tally {
  font-size: 11.5px;
}
.record-overview-roster {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}
.record-archive-dialog .record-overview-seat.avalon-button {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 2px 5px;
  align-items: center;
  min-width: 0 !important;
  height: auto !important;
  min-height: 44px !important;
  color: var(--arc-ink) !important;
  text-shadow: none !important;
  line-height: 1.15 !important;
  font-size: 13px !important;
  text-align: left;
  margin: 0 !important;
  padding: 5px 6px !important;
  border: 1px solid #a48650 !important;
  border-left: 3.5px solid #968161 !important;
  border-radius: 5px !important;
  box-shadow: none !important;
  background: #f8edcf !important;
}
.record-archive-dialog .record-overview-seat.avalon-button[data-faction=good] {
  border-left-color: var(--arc-good) !important;
  background: #e4edf1 !important;
}
.record-archive-dialog .record-overview-seat.avalon-button[data-faction=evil] {
  border-left-color: var(--arc-evil) !important;
  background: #f3dfd7 !important;
}
.record-overview-seat-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 17px;
  padding: 0 3px;
  border-radius: 3px;
  background: #231b14;
  border: 1px solid #b58d42;
  color: #f8d474;
  font-size: 10.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.record-overview-seat-name,
.record-overview-seat-role {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.record-overview-seat-role {
  grid-column: 1 / -1;
  color: var(--arc-sub);
  font-size: 11.5px;
}
.record-overview-seat[data-faction=good] .record-overview-seat-role {
  color: var(--arc-good);
}
.record-overview-seat[data-faction=evil] .record-overview-seat-role {
  color: var(--arc-evil);
}
.record-overview-badges {
  position: absolute;
  top: 3px;
  right: 3px;
  display: flex;
  align-items: center;
  gap: 2px;
  pointer-events: none;
  font-size: 9.5px;
}
.record-overview-badge {
  padding: 1px 3px;
  border: 1px solid #927533;
  border-radius: 2px;
  background: #fdf3d4;
  color: #5b411d;
  line-height: 1;
}
.record-overview-badge[data-badge=target],
.record-overview-badge[data-badge=executor],
.record-overview-badge[data-badge=recruited] {
  color: #8a1a24;
  border-color: #b65b62;
  background: #fde7e4;
}
.record-overview-badge[data-badge=swapped] {
  color: #582658;
  border-color: #9e6098;
  background: #f4e6f5;
}
.record-overview-disclosure {
  padding: 8px 10px;
  border: 1.5px solid var(--arc-border);
  border-radius: 5px;
  background: #fff4cf;
  overflow-wrap: anywhere;
}
.record-overview-detail-title,
.record-overview-detail-body {
  margin: 0 0 4px;
}
.record-overview svg,
.v4-record-archive .v4-record-icon {
  display: inline-block;
  flex: none;
  width: 12px;
  height: 12px;
  vertical-align: -2px;
  image-rendering: pixelated;
}
html[data-mobile-shell=true] #modals dialog:has(.record-archive-dialog) {
  padding: 6px !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden !important;
}
@media (max-height: 620px) and (orientation: landscape), (max-height: 500px) {
  html[data-mobile-shell=true] #modals .game-document.v4-record-detail-dialog.record-archive-dialog,
  #modals .game-document.v4-record-detail-dialog.record-archive-dialog {
    width: calc((100vw - 16px) / var(--v4-ui-scale, 1)) !important;
    max-width: calc((100vw - 16px) / var(--v4-ui-scale, 1)) !important;
    height: calc((var(--mobile-viewport-height, 100dvh) - 16px) / var(--v4-ui-scale, 1)) !important;
    max-height: calc((var(--mobile-viewport-height, 100dvh) - 16px) / var(--v4-ui-scale, 1)) !important;
    padding: 5px 8px 5px !important;
    gap: 4px !important;
  }
  html[data-mobile-shell=true] #modals .record-archive-dialog .record-archive-top,
  .record-archive-dialog .record-archive-top {
    min-height: 26px !important;
    padding-bottom: 3px !important;
    gap: 6px !important;
  }
  .record-archive-top-left {
    gap: 5px;
  }
  html[data-mobile-shell=true] #modals .record-archive-dialog .record-archive-back.avalon-button,
  .record-archive-dialog .record-archive-back.avalon-button {
    min-width: 48px !important;
    height: 24px !important;
    min-height: 24px !important;
    padding: 0 6px !important;
    font-size: 11px !important;
  }
  html[data-mobile-shell=true] #modals .record-archive-dialog .record-archive-top .document-title,
  .record-archive-dialog .record-archive-top .document-title {
    font-size: 14px !important;
    min-height: 0 !important;
    padding: 0 !important;
  }
  html[data-mobile-shell=true] #modals .record-archive-dialog .record-archive-tab.avalon-button,
  .record-archive-dialog .record-archive-tab.avalon-button {
    min-width: 60px !important;
    height: 22px !important;
    min-height: 22px !important;
    padding: 0 7px !important;
    font-size: 11px !important;
  }
  html[data-mobile-shell=true] #modals .record-archive-dialog .record-archive-top .document-close,
  .record-archive-dialog .record-archive-top .document-close {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    min-height: 24px !important;
    font-size: 14px !important;
  }
  .arc-matrix-table .arc-player-col {
    width: 154px;
    min-width: 154px;
    max-width: 154px;
  }
  .arc-matrix-table thead tr.mo-head-rounds th {
    height: 36px;
  }
  .arc-matrix-table thead tr.mo-head-subs th {
    top: 36px;
    height: 20px;
  }
  .arc-matrix-table thead th.arc-player-col {
    font-size: 11.5px;
  }
  .arc-matrix-table .mo-shield-badge {
    width: 20px;
    height: 21px;
    font-size: 10.5px;
    border-radius: 3px 3px 8px 8px;
  }
  .arc-matrix-table .mo-shield-tally {
    font-size: 9px;
  }
  .arc-matrix-table .mo-round-head.has-tally {
    gap: 1px;
    padding: 1px 2px;
  }
  .arc-player-row,
  .arc-vote-cell {
    height: 32px;
  }
  .arc-vote-cell,
  .arc-sub-col {
    min-width: 56px;
    width: 56px;
  }
  .arc-player-cell {
    padding: 1px 4px;
    gap: 4px;
  }
  .arc-player-name {
    font-size: 11px;
  }
  .arc-role-pill {
    font-size: 9.5px;
    padding: 0 4px;
  }
  .arc-target-pip {
    height: 12px;
    font-size: 8.5px;
  }
  .arc-card-pip {
    height: 12px;
    font-size: 8.5px;
    padding: 0 2px;
  }
  .arc-matrix-foot th,
  .arc-matrix-foot td {
    height: 21px;
    font-size: 10px;
  }
  .arc-footer-bar {
    padding: 2px 4px 0;
    font-size: 10px;
    gap: 5px;
  }
  .arc-assassination-chip,
  .mo-recruit-chip,
  .mo-lady-chain {
    padding: 1px 5px;
    font-size: 10px;
  }
  .record-overview {
    gap: 6px;
    font-size: 12px;
  }
  .record-overview-summary {
    gap: 6px;
  }
  .record-archive-dialog .record-overview-card.v4-pedestal {
    padding: 6px 8px;
  }
  .record-overview-card h3 {
    font-size: 14.5px;
    margin-bottom: 2px;
  }
  .record-overview-track {
    padding: 4px 5px;
    gap: 4px;
  }
  .record-overview-node .mo-shield-badge {
    width: 22px;
    height: 24px;
    font-size: 11px;
  }
  .record-overview-node .mo-shield-tally {
    font-size: 10px;
  }
  .record-overview-roster {
    gap: 4px;
  }
  .record-archive-dialog .record-overview-seat.avalon-button {
    min-height: 36px !important;
    padding: 3px 5px !important;
    font-size: 11.5px !important;
  }
  .record-overview-seat-role {
    font-size: 10px;
  }
}

/* web/src/pwa-install.css */
dialog:not([open]),
:is(#modals, #accounts, #title, #touch-movement, #mobile-rotate, #pwa-guide-modal, .game-modal-layer, .transition-mask)[hidden],
.transition-mask:not([data-active=true]),
.v5-spectator-dialog-layer[hidden],
.v5-recruit-banner[hidden],
.v6-title[data-leaving=true] {
  display: none !important;
  pointer-events: none !important;
}
.avalon-pwa-toast {
  position: fixed;
  z-index: 110;
  left: 50%;
  bottom: max(8px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  white-space: nowrap;
  padding: 6px 10px;
  color: #f4e6c6;
  background: #1b1822;
  border: 1px solid #c99c46;
  border-radius: 4px;
  font: clamp(10px, 3vw, 13px)/1.3 AvalonPixel, monospace;
  pointer-events: none;
}
dialog.avalon-pwa-layer[open] {
  padding: 12px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: rgba(6, 7, 12, 0.72) !important;
  backdrop-filter: blur(4px);
}
dialog.avalon-pwa-layer::backdrop {
  background: rgba(6, 7, 12, 0.72);
}
.avalon-pwa-card {
  width: min(460px, calc((100vw - 28px) / var(--v4-ui-scale, 1)));
  max-height: calc((100dvh - 24px) / var(--v4-ui-scale, 1));
  overflow-y: auto;
  zoom: var(--v4-ui-scale, 1);
  background:
    linear-gradient(
      180deg,
      #1b1822 0%,
      #100e16 100%);
  border: 2px solid #c99c46;
  border-radius: 8px;
  box-shadow:
    0 0 0 1px #060609,
    0 18px 44px rgba(0, 0, 0, 0.82),
    inset 0 1px 0 rgba(255, 224, 146, 0.25);
  padding: 14px 16px 14px;
  color: #f4e6c6;
  font-family: AvalonPixel, monospace;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-sizing: border-box;
}
.avalon-pwa-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(201, 156, 70, 0.32);
}
.avalon-pwa-title {
  margin: 0;
  font-size: 18px;
  font-weight: 400;
  color: #ffe39c;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}
.avalon-pwa-close {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(201, 156, 70, 0.55);
  background: rgba(34, 28, 42, 0.9);
  color: #f5dfaa;
  font: 400 18px/1 AvalonPixel, monospace;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.avalon-pwa-perks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.avalon-pwa-perk {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 4px;
  background: rgba(201, 156, 70, 0.14);
  border: 1px solid rgba(201, 156, 70, 0.44);
  color: #fde8b2;
  font-size: 12px;
  line-height: 1.2;
}
.avalon-pwa-steps {
  margin: 0;
  padding: 8px 10px;
  list-style: none;
  border-radius: 6px;
  background: rgba(255, 240, 200, 0.05);
  border: 1px solid rgba(201, 156, 70, 0.24);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.avalon-pwa-step {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  line-height: 1.4;
  color: #efe2c4;
}
.avalon-pwa-step-num {
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: 4px;
  background:
    linear-gradient(
      180deg,
      #e0b354,
      #9c7224);
  color: #16110a;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}
.avalon-pwa-foot {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.4;
  color: #bfa97a;
  text-align: center;
}
.avalon-pwa-ok.avalon-button {
  width: 100% !important;
  height: 36px !important;
  min-height: 36px !important;
  font-size: 14px !important;
  margin: 0 !important;
}
@media (max-height: 500px) {
  .avalon-pwa-card {
    zoom: 1;
    width: min(440px, calc(100vw - 24px));
    max-height: calc(var(--mobile-viewport-height, 100dvh) - 18px);
    padding: 10px 12px;
    gap: 6px;
  }
  .avalon-pwa-title {
    font-size: 15px;
  }
  .avalon-pwa-perk {
    font-size: 11px;
    padding: 3px 6px;
  }
  .avalon-pwa-steps {
    padding: 6px 8px;
    gap: 5px;
  }
  .avalon-pwa-step {
    font-size: 12px;
  }
  .avalon-pwa-foot {
    font-size: 10.5px;
  }
  .avalon-pwa-ok.avalon-button {
    height: 32px !important;
    min-height: 32px !important;
    font-size: 13px !important;
  }
}
.v4-net-diag-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 4px;
  padding: 6px 8px;
  border-radius: 5px;
  background: rgba(16, 14, 22, 0.72);
  border: 1px solid rgba(182, 142, 68, 0.36);
  font: 400 12px/1.2 AvalonPixel, monospace;
  color: #e6d7b4;
}
.v4-net-diag-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.v4-net-diag-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex: none;
  background: #8c92a0;
}
.v4-net-diag-status[data-tone=good] {
  color: #67e6a8;
}
.v4-net-diag-status[data-tone=good] .v4-net-diag-dot {
  background: #36d687;
  box-shadow: 0 0 6px rgba(54, 214, 135, 0.75);
}
.v4-net-diag-status[data-tone=warn] {
  color: #f6c85e;
}
.v4-net-diag-status[data-tone=warn] .v4-net-diag-dot {
  background: #f2b434;
  box-shadow: 0 0 6px rgba(242, 180, 52, 0.7);
}
.v4-net-diag-status[data-tone=bad] {
  color: #ff7b86;
}
.v4-net-diag-status[data-tone=bad] .v4-net-diag-dot {
  background: #e83546;
  box-shadow: 0 0 6px rgba(232, 53, 70, 0.78);
}
.court-menu-document .avalon-button.v4-net-diag-copy {
  flex: none;
  width: auto !important;
  min-width: 64px !important;
  height: 24px !important;
  min-height: 24px !important;
  padding: 0 8px !important;
  margin: 0 !important;
  font-size: 11px !important;
  line-height: 1 !important;
  border-radius: 4px !important;
  background:
    linear-gradient(
      180deg,
      #34291b,
      #221a11) !important;
  border: 1px solid #b88b3a !important;
  color: #fde4a4 !important;
}
.court-menu-document .avalon-button.v4-pwa-menu-btn {
  background:
    linear-gradient(
      180deg,
      #2d2418,
      #1c160e) !important;
  border-color: #c89a42 !important;
  color: #ffe39c !important;
}
@media (max-height: 500px) {
  html[data-mobile-shell=true] #modals .court-menu-document.native-dropdown {
    padding: 6px 8px !important;
    gap: 4px !important;
    max-height: calc(var(--mobile-viewport-height, 100dvh) - 58px) !important;
    overflow-y: auto !important;
  }
  html[data-mobile-shell=true] #modals .court-menu-document.native-dropdown > .avalon-button {
    height: 30px !important;
    min-height: 30px !important;
    font-size: 12.5px !important;
    padding: 0 10px !important;
    margin: 0 !important;
    flex: none !important;
  }
  html[data-mobile-shell=true] #modals .court-menu-document.native-dropdown .v4-net-diag-bar {
    margin-top: 2px;
    padding: 4px 7px;
    font-size: 11px;
    flex: none;
  }
  html[data-mobile-shell=true] #modals .court-menu-document.native-dropdown .avalon-button.v4-net-diag-copy {
    height: 22px !important;
    min-height: 22px !important;
    font-size: 10.5px !important;
  }
}
.account-layer .game-document.v4-passport-dialog::before,
.account-layer .game-document.v4-passport-dialog::after {
  content: none !important;
  display: none !important;
}
.account-layer .game-document.v4-passport-dialog {
  position: relative;
  width: min(560px, calc((100vw - 28px) / var(--v4-ui-scale, 1))) !important;
  max-width: min(560px, calc((100vw - 28px) / var(--v4-ui-scale, 1))) !important;
  max-height: calc((100dvh - 28px) / var(--v4-ui-scale, 1)) !important;
  zoom: var(--v4-ui-scale, 1);
  padding: 18px 22px 18px !important;
  background:
    linear-gradient(
      180deg,
      #f7edd2 0%,
      #ead8ab 100%) !important;
  border: 2px solid #9f7939 !important;
  box-shadow:
    0 0 0 1px #24190c,
    inset 0 0 0 2px rgba(255, 248, 224, 0.65),
    inset 0 0 0 4px rgba(159, 121, 57, 0.25),
    0 18px 46px rgba(0, 0, 0, 0.78) !important;
  border-radius: 8px !important;
  color: #2b2013 !important;
  text-align: left;
  box-sizing: border-box;
  overflow-y: auto;
}
.v4-passport-dialog > .document-title.account-title {
  margin: 0 0 12px !important;
  padding: 0 36px 9px 0 !important;
  font: 400 22px/1.2 AvalonPixel, monospace !important;
  color: #2e1f0e !important;
  border-bottom: 1.5px solid rgba(132, 98, 46, 0.36);
  text-align: left;
  text-shadow: 0 1px 0 rgba(255, 248, 224, 0.75);
}
.v4-passport-dialog > .document-close.v4-passport-close {
  position: absolute !important;
  top: 14px !important;
  right: 16px !important;
  width: 30px !important;
  height: 30px !important;
  min-width: 30px !important;
  min-height: 30px !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 50% !important;
  background:
    linear-gradient(
      180deg,
      #352718,
      #20160d) !important;
  border: 1.5px solid #c99c46 !important;
  color: #ffe5a3 !important;
  font: 400 18px/1 AvalonPixel, monospace !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}
.v4-passport-dialog > .document-close.v4-passport-close:hover {
  filter: brightness(1.14);
}
.v4-passport-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 7px;
  background:
    linear-gradient(
      180deg,
      #fff8e4 0%,
      #f1e1ba 100%);
  border: 1.5px solid #b58d46;
  box-shadow: inset 0 1px 0 #fffdf4, 0 3px 10px rgba(68, 46, 16, 0.14);
}
.v4-passport-crest {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 10px;
  background:
    linear-gradient(
      180deg,
      #2b2116 0%,
      #17120c 100%);
  border: 1.5px solid #c99c46;
  box-shadow: inset 0 1px 0 rgba(255, 232, 168, 0.32), 0 3px 8px rgba(0, 0, 0, 0.3);
  color: #f4cc6c;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 0;
  box-sizing: border-box;
  image-rendering: pixelated;
}
.v4-passport-crest-fallback {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  transition: opacity 0.14s ease;
}
.v4-passport-crest[data-avatar-state=ready] .v4-passport-crest-fallback {
  opacity: 0;
  pointer-events: none;
}
.v4-passport-avatar-slot {
  position: absolute;
  inset: 0;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.14s ease;
  image-rendering: pixelated;
}
.v4-passport-avatar-slot[data-ready=true] {
  opacity: 1;
}
.v4-passport-avatar-slot > .v4-passport-avatar-media {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  image-rendering: pixelated;
  pointer-events: none;
}
.v4-passport-card[data-tier=guest] .v4-passport-crest {
  border-color: #9e8a64;
  color: #d8c69f;
}
.v4-passport-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.v4-passport-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}
.v4-passport-name {
  font-size: 21px;
  font-weight: 400;
  color: #241709;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.v4-passport-tier {
  flex: none;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11.5px;
  line-height: 1.25;
  white-space: nowrap;
}
.v4-passport-tier[data-tier=permanent] {
  background:
    linear-gradient(
      135deg,
      #3c2a12 0%,
      #24180a 100%);
  border: 1px solid #d4a64a;
  color: #ffe399;
}
.v4-passport-tier[data-tier=guest] {
  background: rgba(110, 92, 64, 0.16);
  border: 1px solid rgba(132, 106, 68, 0.5);
  color: #5c492d;
}
.v4-passport-attrs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 12px;
  margin: 0;
  padding-top: 7px;
  border-top: 1px solid rgba(145, 112, 58, 0.28);
}
.v4-passport-attr {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.v4-passport-attr dt {
  font-size: 11px;
  color: #7c6036;
  line-height: 1.1;
}
.v4-passport-attr dd {
  margin: 0;
  font-size: 13.5px;
  color: #2d1f0e;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
}
.v4-passport-mini-chip {
  flex: none;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid #9f7939;
  background: #f3e0b2;
  color: #4c3312;
  font: 400 11.5px/1.2 AvalonPixel, monospace;
  cursor: pointer;
  transition: filter 0.14s ease, transform 0.12s ease;
}
.v4-passport-mini-chip:hover {
  filter: brightness(1.06);
}
.v4-passport-mini-chip:active {
  transform: translateY(1px);
}
.v4-passport-mini-chip[data-tone=gold] {
  background:
    linear-gradient(
      180deg,
      #3b2b15 0%,
      #24190c 100%);
  border-color: #c99c46;
  color: #ffe39c;
  box-shadow: inset 0 1px 0 rgba(255, 232, 168, 0.28);
}
.v4-passport-mini-chip[data-tone=subtle] {
  background: rgba(145, 112, 58, 0.14);
  border-color: rgba(145, 112, 58, 0.56);
  color: #513917;
}
.v4-passport-mini-chip:disabled {
  opacity: 0.55;
  cursor: default;
}
.v4-passport-attr-val {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.v4-field-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}
.v4-forgot-link {
  appearance: none;
  border: 0;
  background: none;
  padding: 0 2px;
  margin: 0;
  font: 400 12px/1 AvalonPixel, monospace;
  color: #f4cf7a;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.v4-forgot-link:hover {
  color: #ffe9ad;
}
.v4-recovery-reset-dialog .v4-form-well > .account-field:last-child {
  grid-column: 1 / -1;
}
.v4-recovery-input {
  font-family:
    ui-monospace,
    SFMono-Regular,
    Menlo,
    Consolas,
    monospace !important;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.v4-recovery-card-dialog > .document-title.account-title {
  padding-right: 0 !important;
  text-align: center;
}
.v4-recovery-vault {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 7px;
  background:
    linear-gradient(
      180deg,
      #fff8e6 0%,
      #f1e1ba 100%);
  border: 1.5px solid #b58d46;
  box-shadow: inset 0 1px 0 #fffdf4, 0 3px 10px rgba(68, 46, 16, 0.14);
  text-align: center;
}
.v4-recovery-vault-head {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: #5b3f19;
  font-size: 13px;
  line-height: 1.35;
}
.v4-recovery-key-icon {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 5px;
  background:
    linear-gradient(
      180deg,
      #2d2215 0%,
      #17110b 100%);
  border: 1px solid #c99c46;
  color: #f6cf70;
  flex: none;
}
.v4-recovery-code-box {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 14px 12px 12px;
  border-radius: 6px;
  background:
    linear-gradient(
      180deg,
      #1b1620 0%,
      #100d14 100%);
  border: 1.5px solid #c99c46;
  box-shadow: inset 0 1px 0 rgba(255, 228, 156, 0.22), 0 4px 14px rgba(0, 0, 0, 0.28);
  box-sizing: border-box;
}
.v4-recovery-code-text {
  font-family:
    ui-monospace,
    SFMono-Regular,
    Menlo,
    Consolas,
    monospace;
  font-size: clamp(18px, 2.6vw, 24px);
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #ffe59e;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.85);
  user-select: all;
  -webkit-user-select: all;
  white-space: nowrap;
  max-width: 100%;
  overflow-x: auto;
}
.v4-recovery-copy-btn.avalon-button {
  width: auto !important;
  min-width: 112px !important;
  height: 34px !important;
  min-height: 34px !important;
  padding: 0 16px !important;
  margin: 0 !important;
  font-size: 13px !important;
  background:
    linear-gradient(
      180deg,
      #3c2e1b 0%,
      #241a0e 100%) !important;
  border: 1px solid #d4a64a !important;
  color: #ffe6a6 !important;
}
.v4-recovery-copy-btn.avalon-button[data-copied=true] {
  border-color: #79d89f !important;
  color: #a9f4c5 !important;
}
.v4-recovery-warning {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
  color: #8f231d;
  text-align: center;
}
.v4-recovery-confirm-btn.avalon-button {
  width: 100% !important;
  height: 42px !important;
  min-height: 42px !important;
  margin-top: 12px !important;
  font-size: 15px !important;
}
.v4-passport-guest-note {
  margin: 0;
  padding-top: 6px;
  border-top: 1px solid rgba(145, 112, 58, 0.26);
  font-size: 12.5px;
  line-height: 1.45;
  color: #5e4727;
}
.v4-passport-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}
.v4-passport-actions > .avalon-button {
  flex: 1 1 0;
  min-width: 0 !important;
  height: 40px !important;
  min-height: 40px !important;
  padding: 0 12px !important;
  margin: 0 !important;
  font-size: 14.5px !important;
  border-radius: 6px !important;
  white-space: nowrap;
}
.v4-passport-actions[data-layout=permanent] > .v4-passport-switch {
  flex: 1.25 1 0;
}
.v4-passport-dialog > .account-message {
  margin: 8px 0 0 !important;
  min-height: 0 !important;
  font-size: 13px !important;
  text-align: center;
}
.v4-passport-dialog > .account-message:empty {
  display: none;
}
@media (max-height: 500px) {
  .account-layer .game-document.v4-passport-dialog {
    zoom: 1;
    width: min(500px, calc(100vw - 24px)) !important;
    max-width: min(500px, calc(100vw - 24px)) !important;
    max-height: calc(var(--mobile-viewport-height, 100dvh) - 18px) !important;
    padding: 11px 14px 12px !important;
  }
  .v4-passport-dialog > .document-title.account-title {
    font-size: 17px !important;
    margin-bottom: 8px !important;
    padding-bottom: 6px !important;
  }
  .v4-passport-dialog > .document-close.v4-passport-close {
    top: 9px !important;
    right: 11px !important;
    width: 26px !important;
    height: 26px !important;
    min-width: 26px !important;
    min-height: 26px !important;
    font-size: 16px !important;
  }
  .v4-passport-card {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 10px;
    padding: 9px 11px;
  }
  .v4-passport-crest {
    width: 44px;
    height: 44px;
    border-radius: 8px;
  }
  .v4-passport-crest-fallback > svg {
    width: 22px;
    height: 22px;
  }
  .v4-passport-name {
    font-size: 16.5px;
  }
  .v4-passport-tier {
    font-size: 10.5px;
    padding: 1px 6px;
  }
  .v4-passport-attr dt {
    font-size: 10px;
  }
  .v4-passport-attr dd {
    font-size: 12px;
  }
  .v4-passport-guest-note {
    font-size: 11.5px;
  }
  .v4-passport-actions {
    margin-top: 10px;
    gap: 8px;
  }
  .v4-passport-actions > .avalon-button {
    height: 36px !important;
    min-height: 36px !important;
    font-size: 13px !important;
  }
  .v4-passport-mini-chip {
    padding: 2px 7px;
    font-size: 10.5px;
  }
  .v4-recovery-vault {
    padding: 8px 10px;
    gap: 7px;
  }
  .v4-recovery-vault-head {
    font-size: 11.5px;
  }
  .v4-recovery-key-icon {
    width: 20px;
    height: 20px;
  }
  .v4-recovery-code-box {
    padding: 8px 10px;
    gap: 6px;
    flex-direction: row;
    justify-content: space-between;
  }
  .v4-recovery-code-text {
    font-size: 15.5px;
    letter-spacing: 0.05em;
  }
  .v4-recovery-copy-btn.avalon-button {
    min-width: 82px !important;
    height: 30px !important;
    min-height: 30px !important;
    padding: 0 10px !important;
    font-size: 12px !important;
  }
  .v4-recovery-warning {
    font-size: 11.5px;
  }
  .v4-recovery-confirm-btn.avalon-button {
    height: 36px !important;
    min-height: 36px !important;
    margin-top: 8px !important;
    font-size: 13.5px !important;
  }
  .v4-recovery-reset-dialog .account-form,
  .v4-recovery-rotate-dialog .account-form {
    gap: 6px;
  }
  .v4-recovery-reset-dialog .v4-form-well {
    padding: 8px 10px !important;
    gap: 6px !important;
  }
  .v4-recovery-reset-dialog .account-field {
    font-size: 12px;
    gap: 3px;
  }
  .v4-recovery-reset-dialog .avalon-input {
    height: 34px !important;
    min-height: 34px !important;
    font-size: 13px !important;
  }
}

/* web/src/voice-chat.css */
#game .toolbar-right-sub.v4-icon-tray {
  position: absolute !important;
  right: 0 !important;
  top: calc(100% + 10 * var(--v4-u, 1px)) !important;
  z-index: 6 !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: flex-end;
  gap: calc(10 * var(--v4-u, 1px)) !important;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  pointer-events: auto;
}
#game .toolbar-right-sub.v4-icon-tray[hidden] {
  display: none !important;
}
#game .toolbar-right-sub .voice-hud-btn::before,
#game .toolbar-right-sub .voice-hud-btn::after {
  content: none !important;
  display: none !important;
}
#game .toolbar-right-sub .voice-hud-btn {
  position: relative;
  width: calc(44 * var(--v4-u, 1px)) !important;
  height: calc(44 * var(--v4-u, 1px)) !important;
  min-width: calc(44 * var(--v4-u, 1px)) !important;
  max-width: calc(44 * var(--v4-u, 1px)) !important;
  min-height: calc(44 * var(--v4-u, 1px)) !important;
  max-height: calc(44 * var(--v4-u, 1px)) !important;
  flex: 0 0 calc(44 * var(--v4-u, 1px)) !important;
  padding: 0 !important;
  margin: 0 !important;
  display: inline-grid !important;
  place-items: center;
  border-radius: calc(8 * var(--v4-u, 1px)) !important;
  background:
    linear-gradient(
      180deg,
      #32283d 0%,
      #1d1725 60%,
      #130f19 100%) !important;
  border: calc(2 * var(--v4-u, 1px)) solid #b89043 !important;
  color: #f6e6be !important;
  box-shadow: 0 calc(4 * var(--v4-u, 1px)) calc(12 * var(--v4-u, 1px)) rgba(0, 0, 0, .68), inset 0 calc(1 * var(--v4-u, 1px)) 0 rgba(255, 236, 185, .28) !important;
  transition:
    transform 90ms ease,
    border-color 140ms ease,
    box-shadow 160ms ease,
    color 140ms ease;
}
#game .toolbar-right-sub .voice-hud-btn .v4-ui-glyph {
  width: calc(22 * var(--v4-u, 1px));
  height: calc(22 * var(--v4-u, 1px));
  display: block;
}
html body #game .toolbar-right-sub.v4-icon-tray > button.avalon-button.original-icon.voice-hud-btn[data-state=muted],
html body #game .toolbar-right-sub.v4-icon-tray > button.avalon-button.original-icon.voice-hud-btn[data-state=off] {
  background:
    linear-gradient(
      180deg,
      #2d2438 0%,
      #1a1522 65%,
      #120e18 100%) !important;
  border-color: #8f7038 !important;
  box-shadow: 0 calc(4 * var(--v4-u, 1px)) calc(10 * var(--v4-u, 1px)) rgba(0, 0, 0, .65), inset 0 1px 0 rgba(255, 236, 185, .16) !important;
}
html body #game .toolbar-right-sub.v4-icon-tray > button.avalon-button.original-icon.voice-hud-btn[data-state=muted] > svg,
html body #game .toolbar-right-sub.v4-icon-tray > button.avalon-button.original-icon.voice-hud-btn[data-state=off] > svg {
  color: #dcc596 !important;
  fill: currentColor !important;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .85)) !important;
}
html body #game .toolbar-right-sub.v4-icon-tray > button.avalon-button.original-icon.voice-hud-btn[data-state=live] {
  background:
    linear-gradient(
      180deg,
      #1f4b39 0%,
      #122e23 62%,
      #0c1f17 100%) !important;
  border-color: #5ee69c !important;
  box-shadow:
    0 0 14px rgba(82, 224, 150, .52),
    0 calc(4 * var(--v4-u, 1px)) calc(12 * var(--v4-u, 1px)) rgba(0, 0, 0, .68),
    inset 0 1px 0 rgba(196, 255, 222, .38) !important;
}
html body #game .toolbar-right-sub.v4-icon-tray > button.avalon-button.original-icon.voice-hud-btn[data-state=live] > svg {
  color: #c8ffe0 !important;
  fill: currentColor !important;
  filter: drop-shadow(0 0 6px rgba(94, 230, 156, .65)) !important;
}
html body #game .toolbar-right-sub.v4-icon-tray > button.avalon-button.original-icon.voice-hud-btn[data-speaking=true] {
  animation: v5MicSpeakPulse 900ms ease-in-out infinite !important;
}
@keyframes v5MicSpeakPulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(98, 223, 156, .6), 0 0 14px rgba(98, 223, 156, .58);
  }
  50% {
    box-shadow: 0 0 0 5px rgba(98, 223, 156, 0), 0 0 22px rgba(248, 208, 102, .85);
  }
}
html body #game .toolbar-right-sub.v4-icon-tray > button.avalon-button.original-icon.voice-hud-btn[data-state=locked] {
  background:
    linear-gradient(
      180deg,
      #3b271b 0%,
      #22160f 65%,
      #160e09 100%) !important;
  border-color: #d28e43 !important;
  box-shadow: 0 calc(4 * var(--v4-u, 1px)) calc(10 * var(--v4-u, 1px)) rgba(0, 0, 0, .65), inset 0 1px 0 rgba(255, 214, 156, .22) !important;
}
html body #game .toolbar-right-sub.v4-icon-tray > button.avalon-button.original-icon.voice-hud-btn[data-state=locked] > svg {
  color: #f6bf78 !important;
  fill: currentColor !important;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .85)) !important;
}
html body #game .toolbar-right-sub.v4-icon-tray > button.avalon-button.original-icon.voice-hud-btn[data-prompt-turn=true] {
  border-color: #ffd36e !important;
  box-shadow: 0 0 18px rgba(247, 196, 76, .75) !important;
}
@media (hover: hover) and (pointer: fine) {
  #game .toolbar-right-sub .voice-hud-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    border-color: var(--v4-gold-hi, #ffe7a3) !important;
  }
}
@media (max-height: 620px) {
  #game .toolbar-right-sub.v4-icon-tray {
    right: 0 !important;
    top: calc(100% + 6px) !important;
    gap: 6px !important;
  }
}
html[data-mobile-shell=true] #game .toolbar-right-sub .voice-hud-btn {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  max-width: 44px !important;
  min-height: 44px !important;
  max-height: 44px !important;
  flex: 0 0 44px !important;
  border-radius: 8px !important;
  border-width: 2px !important;
}
html[data-mobile-shell=true] #game .toolbar-right-sub .voice-hud-btn .v4-ui-glyph {
  width: 21px;
  height: 21px;
}
html body #court#court .court-labels button.court-nameplate[data-speaking=true] {
  overflow: visible !important;
  border-color: #ffd86b !important;
  box-shadow:
    0 0 0 2px #ffd86b,
    0 0 18px rgba(255, 204, 72, .95),
    0 4px 12px rgba(0, 0, 0, .72) !important;
  z-index: 12 !important;
}
html body #court#court .court-labels button.court-nameplate[data-speaking=true]::after {
  content: "" !important;
  display: block !important;
  position: absolute;
  inset: -5px;
  border-radius: 7px;
  border: 1.5px solid rgba(255, 222, 128, .88);
  pointer-events: none;
  animation: v5NameplateWave 1.05s ease-out infinite;
}
@keyframes v5NameplateWave {
  0% {
    opacity: .9;
    transform: scale(.98);
  }
  100% {
    opacity: 0;
    transform: scale(1.14, 1.32);
  }
}
.player-token[data-speaking=true],
.v4-room-member[data-speaking=true],
.v4-room-plate-item[data-speaking=true] {
  box-shadow: 0 0 0 2px #ffd670, 0 0 14px rgba(245, 192, 68, .72) !important;
}
.v5-speech-banner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px auto 0;
  padding: 4px 12px;
  border-radius: 999px;
  background:
    linear-gradient(
      180deg,
      rgba(30, 24, 40, .92) 0%,
      rgba(17, 13, 24, .95) 100%);
  border: 1.5px solid rgba(206, 162, 82, .52);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .52), inset 0 1px 0 rgba(255, 236, 185, .18);
  color: #f4e6c6;
  font-size: 13px;
  line-height: 1.2;
  pointer-events: auto;
  max-width: min(620px, calc(100vw - 140px));
}
.v5-speech-banner[data-own-turn=true] {
  border-color: #ffd36b;
  background:
    linear-gradient(
      180deg,
      rgba(52, 39, 20, .94) 0%,
      rgba(29, 21, 12, .96) 100%);
  box-shadow: 0 0 18px rgba(244, 192, 72, .38), 0 6px 18px rgba(0, 0, 0, .55);
}
.v5-speech-banner-ic {
  width: 15px;
  height: 15px;
  color: #f6ca65;
  display: inline-flex;
  flex: none;
}
.v5-speech-banner-ic > svg {
  width: 100%;
  height: 100%;
}
.v5-speech-banner-text {
  font-weight: 500;
  color: #faeed2;
}
.v5-speech-banner-timer {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(10, 8, 15, .72);
  border: 1px solid rgba(228, 185, 85, .42);
  color: #ffdc85;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: 12px;
}
.v5-speech-banner-timer[data-urgent=true] {
  color: #ff9c9c;
  border-color: rgba(240, 96, 96, .65);
  background: rgba(68, 18, 22, .72);
}
html body #game .avalon-button.v5-speech-pass-btn {
  min-height: 25px !important;
  height: 25px !important;
  padding: 0 10px !important;
  font-size: 12px !important;
  border-radius: 999px !important;
}
html body #game .avalon-button.v5-speech-pass-btn:not(.primary) {
  background:
    linear-gradient(
      180deg,
      #45341f 0%,
      #281d11 100%) !important;
  border: 1px solid #d4a34a !important;
  color: #ffebb3 !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .85) !important;
}
@media (max-height: 500px) {
  .v5-speech-banner {
    margin-top: 1px;
    padding: 2px 9px;
    gap: 5px;
    font-size: 11.5px;
  }
  .v5-speech-banner-ic {
    width: 13px;
    height: 13px;
  }
  .v5-speech-banner-timer {
    padding: 1px 6px;
    font-size: 11px;
    min-width: 36px;
  }
  html body #game .avalon-button.v5-speech-pass-btn {
    min-height: 21px !important;
    height: 21px !important;
    padding: 0 8px !important;
    font-size: 11px !important;
  }
}
.v5-card-voice-panel {
  padding: 10px 14px !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.v5-card-voice-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--v4-ink, #3a2f22);
}
.v5-card-voice-label .v4-ui-glyph {
  width: 16px;
  height: 16px;
}
.v5-card-voice-controls {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 200px;
  justify-content: flex-end;
}
.v5-card-voice-slider {
  flex: 1 1 120px;
  max-width: 180px;
  accent-color: #b88428;
}
.v5-card-voice-val {
  min-width: 40px;
  text-align: right;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  color: var(--v4-ink, #3a2f22);
}
.v5-audio-section-title {
  margin: 8px 2px 2px;
  font-size: 14px;
  font-weight: 600;
  color: var(--v4-ink, #3a2f22);
}
.v5-peer-audio-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.v5-peer-audio-row {
  padding: 8px 12px !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.v5-peer-audio-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--v4-ink, #3a2f22);
  min-width: 90px;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (max-height: 460px) {
  .v5-speech-banner {
    margin-top: 2px;
    padding: 3px 10px;
    font-size: 12px;
    gap: 6px;
    max-width: calc(100vw - 156px);
  }
  .avalon-button.v5-speech-pass-btn {
    min-height: 24px !important;
    height: 24px !important;
    padding: 0 8px !important;
    font-size: 11px !important;
  }
}

/* web/src/lobby-browser.css */
.game-document.v5-hall-dialog {
  width: min(920px, calc(100vw - 32px)) !important;
  max-width: 920px !important;
  max-height: min(680px, calc(100dvh - 32px));
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  padding: 18px 22px 18px !important;
  box-sizing: border-box;
  border-radius: 14px !important;
  background:
    radial-gradient(
      ellipse 85% 45% at 50% 0%,
      rgba(232, 184, 86, .13),
      transparent 70%),
    linear-gradient(
      180deg,
      #251e30 0%,
      #171320 100%) !important;
  border: 2px solid #c69a47 !important;
  box-shadow:
    0 22px 54px rgba(0, 0, 0, .72),
    inset 0 1px 0 rgba(255, 236, 185, .25),
    inset 0 0 0 1px rgba(20, 14, 28, .85) !important;
  color: #f4e7c8 !important;
  overflow: hidden !important;
}
.v5-hall-dialog > .document-title {
  margin: 0 !important;
  padding: 0 44px 10px 4px !important;
  text-align: left !important;
  font-size: 24px !important;
  color: #f8e8be !important;
  text-shadow: 0 2px 6px rgba(0, 0, 0, .75), 0 0 18px rgba(228, 185, 85, .28) !important;
  border-bottom: 1px solid rgba(206, 162, 82, .28) !important;
  flex-shrink: 0;
}
.v5-hall-dialog > .document-close {
  background: rgba(44, 35, 56, .92) !important;
  border: 1.5px solid rgba(204, 160, 78, .62) !important;
  color: #f6e4b8 !important;
}
.v5-hall-overview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 7px 12px;
  border-radius: 10px;
  background: rgba(14, 11, 20, .66);
  border: 1px solid rgba(196, 154, 76, .24);
  flex-shrink: 0;
}
.v5-hall-stats-copy {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 14px;
  color: #dfd0ae;
}
.v5-hall-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #52e096;
  box-shadow: 0 0 8px rgba(82, 224, 150, .8);
  animation: v5HallPulse 2.2s ease-in-out infinite;
  flex: none;
}
@keyframes v5HallPulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: .55;
    transform: scale(.86);
  }
}
.v5-hall-stat-pill.is-gold {
  color: #f7cf73;
  font-weight: 600;
}
.v5-hall-stat-sep {
  opacity: .45;
}
.v5-hall-filters.v4-segmented {
  background: rgba(28, 22, 38, .9) !important;
  border: 1px solid rgba(196, 154, 76, .35) !important;
  padding: 2px !important;
  gap: 2px !important;
}
.v5-hall-filters .avalon-button[data-variant=pill] {
  min-height: 30px !important;
  height: 30px !important;
  padding: 0 12px !important;
  font-size: 13px !important;
  color: #d7c7a3 !important;
}
.v5-hall-filters .avalon-button[data-variant=pill][aria-pressed=true] {
  background:
    linear-gradient(
      180deg,
      #e5ba58 0%,
      #b88428 100%) !important;
  color: #231709 !important;
  font-weight: 600 !important;
}
.v5-hall-command-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  flex-shrink: 0;
}
.avalon-button.v5-hall-quick-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 148px !important;
  min-height: 42px !important;
  height: 42px !important;
  padding: 0 18px !important;
  font-size: 16px !important;
}
.v5-hall-quick-btn .v4-ui-glyph {
  width: 18px;
  height: 18px;
}
.v5-hall-code-box {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 4px 3px 10px;
  border-radius: 9px;
  background: rgba(12, 9, 18, .78);
  border: 1px solid rgba(196, 154, 76, .38);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, .55);
  flex: 1 1 220px;
  max-width: 310px;
}
.game-document.v5-hall-dialog .v5-hall-code-input.avalon-input {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  color: #ffe8ad !important;
  caret-color: #ffd978 !important;
  font-size: 16px !important;
  letter-spacing: 2px;
  min-height: 34px !important;
  height: 34px !important;
  padding: 0 4px !important;
  width: 100%;
  min-width: 96px;
}
.game-document.v5-hall-dialog .v5-hall-code-input.avalon-input::placeholder {
  color: rgba(232, 210, 164, .68) !important;
  letter-spacing: 0;
  font-size: 14px;
}
.avalon-button.v5-hall-code-submit {
  min-height: 34px !important;
  height: 34px !important;
  padding: 0 12px !important;
  font-size: 14px !important;
  white-space: nowrap;
  flex: none;
}
.v5-hall-right-tools {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.avalon-button.v5-hall-create-btn {
  min-height: 42px !important;
  height: 42px !important;
  padding: 0 16px !important;
  font-size: 15px !important;
}
.avalon-button.v5-hall-refresh-btn {
  width: 42px !important;
  height: 42px !important;
  min-width: 42px !important;
  min-height: 42px !important;
  padding: 9px !important;
}
.v5-hall-refresh-btn.is-spinning .v4-ui-glyph {
  animation: v5HallSpin 480ms cubic-bezier(.22, 1, .36, 1);
}
@keyframes v5HallSpin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}
.v5-hall-body {
  flex: 1 1 auto;
  min-height: 150px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.v5-hall-section-label {
  margin: 4px 2px 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  color: #d9b86c;
}
.v5-hall-section-label.is-playing {
  color: #b79ce0;
  margin-top: 8px;
}
.v5-hall-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.v5-hall-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 11px;
  background:
    radial-gradient(
      ellipse 70% 80% at 0% 50%,
      rgba(228, 185, 85, .09),
      transparent 70%),
    linear-gradient(
      180deg,
      rgba(44, 36, 56, .92) 0%,
      rgba(28, 23, 38, .95) 100%);
  border: 1.5px solid rgba(196, 154, 76, .42);
  box-shadow: 0 6px 16px rgba(0, 0, 0, .38), inset 0 1px 0 rgba(255, 238, 194, .12);
  transition:
    border-color 140ms ease,
    transform 140ms ease,
    box-shadow 180ms ease;
}
@media (hover: hover) and (pointer: fine) {
  .v5-hall-card:hover {
    border-color: rgba(244, 202, 108, .78);
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(0, 0, 0, .48), 0 0 14px rgba(228, 185, 85, .18);
  }
}
.v5-hall-card[data-status=playing] {
  border-color: rgba(146, 112, 196, .42);
  background:
    radial-gradient(
      ellipse 70% 80% at 0% 50%,
      rgba(148, 104, 212, .10),
      transparent 70%),
    linear-gradient(
      180deg,
      rgba(36, 30, 49, .9) 0%,
      rgba(23, 19, 33, .94) 100%);
}
.v5-hall-card-crest {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: none;
}
.v5-hall-avatar-frame {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  overflow: hidden;
  border: 1.5px solid #c59b49;
  background: #1a1523;
  box-shadow: 0 3px 8px rgba(0, 0, 0, .45);
  display: flex;
  align-items: center;
  justify-content: center;
}
.v5-hall-avatar-frame > :is(img, canvas) {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
}
.v5-hall-avatar-fallback {
  font-size: 18px;
  color: #f4d68c;
}
.v5-hall-code-seal {
  font-size: 12px;
  line-height: 1.1;
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(14, 11, 20, .82);
  border: 1px solid rgba(196, 154, 76, .36);
  color: #f2cf7c;
  letter-spacing: .5px;
}
.v5-hall-card-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.v5-hall-card-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
}
.v5-hall-host-name {
  font-size: 16px;
  color: #fbf0d6;
  font-weight: 600;
  max-width: 240px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.v5-hall-count-group {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.v5-hall-seat-badge,
.v5-hall-total-badge,
.v5-hall-need-badge,
.v5-hall-full-badge,
.v5-hall-live-badge,
.v5-hall-spec-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 6px;
  white-space: nowrap;
}
.v5-hall-seat-badge {
  background: rgba(228, 185, 85, .18);
  border: 1px solid rgba(232, 192, 98, .5);
  color: #ffe39b;
  font-weight: 600;
}
.v5-hall-total-badge {
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(214, 195, 152, .25);
  color: #d8c8a6;
}
.v5-hall-need-badge {
  background: rgba(62, 196, 126, .18);
  border: 1px solid rgba(92, 224, 152, .52);
  color: #8cf5b9;
  font-weight: 600;
}
.v5-hall-full-badge {
  background: rgba(150, 132, 102, .18);
  border: 1px solid rgba(186, 164, 126, .35);
  color: #cbbba0;
}
.v5-hall-live-badge {
  background: rgba(146, 98, 212, .22);
  border: 1px solid rgba(182, 140, 238, .52);
  color: #e4d0ff;
}
.v5-hall-spec-badge {
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(196, 176, 228, .32);
  color: #d6c6ee;
}
.v5-hall-spec-badge .v4-ui-glyph {
  width: 13px;
  height: 13px;
}
.v5-hall-tags-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}
.v5-hall-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  line-height: 1;
  padding: 3.5px 7px;
  border-radius: 5px;
  background: rgba(18, 14, 25, .72);
  border: 1px solid rgba(196, 164, 104, .28);
  color: #dfd0b0;
  white-space: nowrap;
}
.v5-hall-chip.is-voice .v4-ui-glyph {
  width: 12px;
  height: 12px;
}
.v5-hall-chip.is-voice[data-voice=ordered] {
  background: rgba(218, 158, 48, .16);
  border-color: rgba(236, 182, 74, .48);
  color: #ffd985;
}
.v5-hall-chip.is-ext {
  color: var(--ext-accent, #7cb8ff);
  background: var(--ext-bg, rgba(47, 122, 214, .18));
  border-color: var(--ext-border, rgba(92, 162, 248, .5));
}
.v5-hall-chip.is-ext-role {
  color: #8cc4ff;
  background: rgba(62, 118, 186, .18);
  border-color: rgba(108, 164, 232, .45);
}
.v5-hall-chip.is-flavor {
  color: #f5dba0;
  background: rgba(188, 142, 58, .15);
  border-color: rgba(218, 174, 88, .42);
}
.v5-hall-card-cta {
  flex: none;
}
.avalon-button.v5-hall-join-btn {
  min-width: 98px !important;
  min-height: 40px !important;
  height: 40px !important;
  padding: 0 14px !important;
  font-size: 14px !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.v5-hall-join-btn .v4-ui-glyph {
  width: 15px;
  height: 15px;
}
.v5-hall-empty {
  flex: 1 1 auto;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 10px;
  padding: 24px 16px;
  border-radius: 11px;
  background: rgba(14, 11, 21, .52);
  border: 1px dashed rgba(196, 154, 76, .3);
}
.v5-hall-empty-title {
  margin: 0;
  font-size: 17px;
  color: #f4e4bf;
}
.v5-hall-empty-sub {
  margin: 0;
  max-width: 460px;
  font-size: 13px;
  line-height: 1.5;
  color: #bfb090;
}
.game-document.v4-room-dialog {
  gap: 10px !important;
  padding-top: 16px !important;
  padding-bottom: 16px !important;
}
.v5-sandbox-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.v5-sandbox-card {
  padding: 8px 11px !important;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.v5-sandbox-card .v4-sandbox-heading {
  margin: 0 !important;
  font-size: 14px !important;
}
.v5-sandbox-card .v4-segmented {
  width: 100%;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.v5-sandbox-card .v4-segmented > .avalon-button {
  min-height: 32px !important;
  font-size: 13px !important;
  padding: 0 8px !important;
}
.v5-sandbox-subhint {
  margin: 0;
  font-size: 12px;
  line-height: 1.3;
  color: var(--v4-ink-soft, #6a5a40);
}
.v5-flavor-tags-box {
  padding: 8px 11px !important;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.v5-flavor-tags-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.v5-flavor-tags-head .v4-sandbox-heading {
  margin: 0 !important;
  font-size: 14px !important;
}
.v5-flavor-tags-limit {
  font-size: 12px;
  color: var(--v4-ink-soft, #6a5a40);
}
.v5-flavor-tags-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.v5-flavor-tags-pills > .avalon-button[data-variant=pill] {
  min-height: 30px !important;
  height: 30px !important;
  padding: 0 10px !important;
  font-size: 13px !important;
  border-radius: 7px !important;
  background: rgba(255, 250, 238, .86) !important;
  border: 1px solid rgba(138, 102, 46, .42) !important;
  color: #432f15 !important;
  text-shadow: none !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .65) !important;
}
.v5-flavor-tags-pills > .avalon-button[data-variant=pill]:hover:not(:disabled) {
  background: rgba(255, 243, 214, .96) !important;
  border-color: rgba(168, 118, 36, .72) !important;
  color: #2c1d09 !important;
}
.v5-flavor-tags-pills > .avalon-button[data-variant=pill][aria-pressed=true],
.v5-flavor-tags-pills > .avalon-button[data-variant=pill][aria-pressed=true]:hover,
.v5-flavor-tags-pills > .avalon-button[data-variant=pill][aria-pressed=true]:focus-visible {
  background:
    linear-gradient(
      180deg,
      #f3d27a 0%,
      #cf9b38 100%) !important;
  border: 1.5px solid #8c5e14 !important;
  color: #241606 !important;
  font-weight: 700 !important;
  text-shadow: none !important;
  box-shadow: 0 2px 6px rgba(140, 94, 20, .26), inset 0 1px 0 rgba(255, 246, 214, .65) !important;
}
.v5-flavor-tags-pills > .avalon-button[data-variant=pill]:disabled {
  opacity: .56 !important;
  filter: none !important;
}
@media (max-height: 480px), (max-width: 820px) {
  .game-document.v5-hall-dialog {
    width: calc(100vw - 24px) !important;
    max-height: calc(var(--mobile-height, 100dvh) - 18px) !important;
    padding: 10px 14px 10px !important;
    gap: 7px !important;
  }
  .v5-hall-dialog > .document-title {
    font-size: 18px !important;
    min-height: 32px !important;
    padding: 0 40px 6px 2px !important;
  }
  .v5-hall-overview {
    padding: 4px 10px;
    gap: 6px;
  }
  .v5-hall-stats-copy {
    font-size: 12px;
    gap: 6px;
  }
  .v5-hall-filters .avalon-button[data-variant=pill] {
    min-height: 26px !important;
    height: 26px !important;
    padding: 0 9px !important;
    font-size: 12px !important;
  }
  .v5-hall-command-bar {
    gap: 6px;
    flex-wrap: nowrap;
  }
  .avalon-button.v5-hall-quick-btn {
    min-width: 118px !important;
    min-height: 36px !important;
    height: 36px !important;
    padding: 0 12px !important;
    font-size: 14px !important;
  }
  .v5-hall-code-box {
    max-width: 250px;
    padding: 2px 3px 2px 8px;
  }
  .v5-hall-code-input.avalon-input {
    min-height: 30px !important;
    height: 30px !important;
    font-size: 14px !important;
  }
  .avalon-button.v5-hall-code-submit {
    min-height: 30px !important;
    height: 30px !important;
    padding: 0 10px !important;
    font-size: 13px !important;
  }
  .avalon-button.v5-hall-create-btn {
    min-height: 36px !important;
    height: 36px !important;
    padding: 0 12px !important;
    font-size: 13px !important;
  }
  .avalon-button.v5-hall-refresh-btn {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    padding: 7px !important;
  }
  .v5-hall-body {
    min-height: 0;
    gap: 6px;
  }
  .v5-hall-card {
    padding: 7px 10px;
    gap: 10px;
  }
  .v5-hall-avatar-frame {
    width: 34px;
    height: 34px;
  }
  .v5-hall-host-name {
    font-size: 14px;
    max-width: 170px;
  }
  .avalon-button.v5-hall-join-btn {
    min-width: 86px !important;
    min-height: 34px !important;
    height: 34px !important;
    padding: 0 10px !important;
    font-size: 13px !important;
  }
  .v5-sandbox-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 580px) {
  .v5-hall-command-bar {
    flex-wrap: wrap;
  }
  .v5-hall-code-box {
    max-width: none;
  }
}

/* web/src/terminate-vote.css */
.room-lifecycle.v4-lifecycle-toast {
  --tv-u: var(--v4-u, 1px);
  position: fixed !important;
  left: 50% !important;
  top: calc(118 * var(--tv-u)) !important;
  right: auto !important;
  bottom: auto !important;
  translate: -50% 0 !important;
  transform: none !important;
  z-index: 235 !important;
  min-width: calc(270 * var(--tv-u));
  max-width: min(calc(480 * var(--tv-u)), calc(100vw - 28px)) !important;
  padding: calc(12 * var(--tv-u)) calc(36 * var(--tv-u)) calc(12 * var(--tv-u)) calc(18 * var(--tv-u)) !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: calc(8 * var(--tv-u));
  text-align: center;
  border-radius: calc(10 * var(--tv-u));
  background:
    linear-gradient(
      180deg,
      rgba(32, 24, 42, 0.96),
      rgba(16, 12, 22, 0.98));
  border: calc(2 * var(--tv-u)) solid #c89d4a;
  color: #f8ecd0;
  box-shadow: 0 calc(12 * var(--tv-u)) calc(32 * var(--tv-u)) rgba(0, 0, 0, 0.72), inset 0 1px 0 rgba(255, 236, 185, 0.28);
  pointer-events: auto !important;
  cursor: pointer;
  user-select: none;
  animation: v4-toast-in 180ms var(--v4-ease-back, ease-out) both;
}
.room-lifecycle.v4-lifecycle-toast:hover {
  border-color: #f2cb72;
}
.room-lifecycle.v4-lifecycle-toast[hidden] {
  display: none !important;
}
.room-lifecycle.v4-lifecycle-toast p {
  margin: 0 !important;
  font: 400 calc(15.5 * var(--tv-u))/1.45 AvalonPixel, monospace !important;
  color: #f8ecd0;
}
.room-lifecycle.v4-lifecycle-toast .v4-lifecycle-dismiss {
  position: absolute;
  top: calc(6 * var(--tv-u));
  right: calc(8 * var(--tv-u));
  width: calc(22 * var(--tv-u));
  height: calc(22 * var(--tv-u));
  display: grid;
  place-items: center;
  border-radius: calc(4 * var(--tv-u));
  color: rgba(248, 226, 172, 0.72);
  font: 700 calc(14 * var(--tv-u))/1 AvalonPixel, monospace;
  pointer-events: none;
}
.room-lifecycle.v4-lifecycle-toast:hover .v4-lifecycle-dismiss {
  color: #fff4d2;
  background: rgba(255, 220, 140, 0.14);
}
.room-lifecycle.v4-lifecycle-toast.is-result-toast {
  border-color: #d6a44e;
  background:
    linear-gradient(
      180deg,
      rgba(36, 26, 44, 0.97),
      rgba(18, 13, 24, 0.98));
}
.terminate-vote-panel {
  --tv-u: var(--v4-u, 1px);
  position: fixed;
  left: 50%;
  top: 50%;
  translate: -50% -50%;
  z-index: 222;
  width: min(calc(456 * var(--tv-u)), calc(100vw - 24px));
  padding: calc(16 * var(--tv-u)) calc(20 * var(--tv-u)) calc(18 * var(--tv-u));
  display: flex;
  flex-direction: column;
  gap: calc(10 * var(--tv-u));
  border-radius: calc(12 * var(--tv-u));
  background:
    linear-gradient(
      180deg,
      rgba(28, 20, 34, 0.97) 0%,
      rgba(14, 10, 19, 0.985) 100%);
  border: calc(2 * var(--tv-u)) solid #cc9c46;
  box-shadow:
    0 0 0 1px #09060d,
    0 calc(18 * var(--tv-u)) calc(46 * var(--tv-u)) rgba(0, 0, 0, 0.82),
    inset 0 1px 0 rgba(255, 234, 178, 0.25);
  color: #f8ecd2;
  font-family: AvalonPixel, monospace;
  pointer-events: auto !important;
  animation: v4-toast-in 180ms var(--v4-ease-back, ease-out) both;
}
.terminate-vote-panel[hidden] {
  display: none !important;
}
.tv-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: calc(8 * var(--tv-u));
  padding-bottom: calc(8 * var(--tv-u));
  border-bottom: 1px solid rgba(212, 168, 86, 0.34);
}
.tv-title-group {
  display: flex;
  align-items: center;
  gap: calc(8 * var(--tv-u));
  min-width: 0;
}
.tv-title {
  margin: 0;
  font: 400 calc(19 * var(--tv-u))/1.2 AvalonPixel, monospace;
  color: #ffe294;
  text-shadow: 0 calc(2 * var(--tv-u)) 0 #09060b;
}
.tv-timer {
  padding: calc(2 * var(--tv-u)) calc(7 * var(--tv-u));
  border-radius: calc(999 * var(--tv-u));
  background: rgba(208, 42, 64, 0.2);
  border: 1px solid rgba(235, 86, 102, 0.55);
  color: #ffadb6;
  font: 700 calc(13 * var(--tv-u))/1.2 AvalonPixel, monospace;
}
.tv-collapse-btn {
  padding: calc(4 * var(--tv-u)) calc(10 * var(--tv-u));
  border-radius: calc(6 * var(--tv-u));
  background: rgba(255, 236, 190, 0.08);
  border: 1px solid rgba(216, 176, 102, 0.48);
  color: #f0d79c;
  font: 400 calc(13 * var(--tv-u))/1.2 AvalonPixel, monospace;
  cursor: pointer;
  flex-shrink: 0;
}
.tv-collapse-btn:hover {
  background: rgba(255, 236, 190, 0.16);
  border-color: #ffd97a;
}
.tv-subtitle {
  margin: 0;
  font: 400 calc(13.5 * var(--tv-u))/1.4 AvalonPixel, monospace;
  color: #c9baa0;
}
.tv-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: calc(8 * var(--tv-u));
}
.tv-pill {
  display: inline-flex;
  align-items: center;
  gap: calc(6 * var(--tv-u));
  padding: calc(5 * var(--tv-u)) calc(10 * var(--tv-u));
  border-radius: calc(999 * var(--tv-u));
  background: rgba(12, 9, 17, 0.72);
  border: 1px solid rgba(204, 158, 74, 0.38);
  font: 400 calc(13.5 * var(--tv-u))/1.2 AvalonPixel, monospace;
  color: #f3e4c4;
}
.tv-pill-seat {
  display: inline-block;
  padding: calc(1 * var(--tv-u)) calc(5 * var(--tv-u));
  border-radius: calc(4 * var(--tv-u));
  background: rgba(232, 184, 84, 0.18);
  border: 1px solid rgba(232, 184, 84, 0.5);
  color: #ffe294;
  font-weight: 700;
}
.tv-tally {
  display: inline-flex;
  align-items: center;
  gap: calc(8 * var(--tv-u));
  padding: calc(5 * var(--tv-u)) calc(11 * var(--tv-u));
  border-radius: calc(999 * var(--tv-u));
  background: rgba(12, 9, 17, 0.76);
  border: 1px solid rgba(204, 158, 74, 0.36);
  font: 400 calc(13.5 * var(--tv-u))/1.2 AvalonPixel, monospace;
}
.tv-tally-yes {
  color: #ff8e99;
}
.tv-tally-no {
  color: #9be0a8;
}
.tv-tally-sep {
  color: rgba(240, 220, 180, 0.42);
}
.tv-pending-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: calc(6 * var(--tv-u));
  padding: calc(8 * var(--tv-u)) calc(10 * var(--tv-u));
  border-radius: calc(8 * var(--tv-u));
  background: rgba(10, 8, 15, 0.62);
  border: 1px solid rgba(196, 156, 86, 0.24);
}
.tv-pending-label {
  font: 400 calc(13 * var(--tv-u))/1.2 AvalonPixel, monospace;
  color: #cbb996;
  margin-right: calc(2 * var(--tv-u));
}
.tv-seat-badge {
  display: inline-grid;
  place-items: center;
  min-width: calc(28 * var(--tv-u));
  height: calc(22 * var(--tv-u));
  padding: 0 calc(5 * var(--tv-u));
  border-radius: calc(5 * var(--tv-u));
  background:
    linear-gradient(
      180deg,
      #302438 0%,
      #1d1524 100%);
  border: 1px solid rgba(224, 182, 96, 0.56);
  color: #ffeaad;
  font: 700 calc(13 * var(--tv-u))/1 AvalonPixel, monospace;
}
.tv-pending-done {
  font: 400 calc(13 * var(--tv-u))/1.2 AvalonPixel, monospace;
  color: #a9d9b4;
}
.tv-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: calc(10 * var(--tv-u));
  margin-top: calc(2 * var(--tv-u));
}
.tv-actions > .avalon-button {
  width: 100%;
  min-height: calc(40 * var(--tv-u)) !important;
  height: calc(40 * var(--tv-u)) !important;
  font-size: calc(15 * var(--tv-u)) !important;
}
.tv-receipt {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: calc(8 * var(--tv-u));
  padding: calc(10 * var(--tv-u)) calc(14 * var(--tv-u));
  border-radius: calc(8 * var(--tv-u));
  font: 400 calc(15 * var(--tv-u))/1.3 AvalonPixel, monospace;
  margin-top: calc(2 * var(--tv-u));
}
.tv-receipt.is-yes {
  background: rgba(196, 36, 58, 0.18);
  border: 1px solid rgba(242, 92, 110, 0.58);
  color: #ffcbd2;
}
.tv-receipt.is-no {
  background: rgba(44, 134, 82, 0.18);
  border: 1px solid rgba(112, 214, 148, 0.56);
  color: #c8f5d6;
}
.tv-receipt.is-spectator {
  background: rgba(255, 236, 188, 0.07);
  border: 1px solid rgba(212, 174, 96, 0.34);
  color: #d8c8a8;
}
.tv-receipt-icon {
  width: calc(16 * var(--tv-u));
  height: calc(16 * var(--tv-u));
  flex-shrink: 0;
  image-rendering: pixelated;
}
.terminate-vote-capsule {
  --tv-u: var(--v4-u, 1px);
  position: fixed;
  left: 50%;
  top: calc(114 * var(--tv-u));
  translate: -50% 0;
  z-index: 230;
  display: inline-flex;
  align-items: center;
  gap: calc(8 * var(--tv-u));
  padding: calc(6 * var(--tv-u)) calc(14 * var(--tv-u));
  border-radius: calc(999 * var(--tv-u));
  background:
    linear-gradient(
      180deg,
      rgba(32, 22, 38, 0.95),
      rgba(16, 11, 22, 0.97));
  border: calc(1.5 * var(--tv-u)) solid #cfa04a;
  box-shadow: 0 calc(6 * var(--tv-u)) calc(18 * var(--tv-u)) rgba(0, 0, 0, 0.72);
  color: #f8ecd2;
  font: 400 calc(13.5 * var(--tv-u))/1.2 AvalonPixel, monospace;
  pointer-events: auto !important;
  cursor: pointer;
  white-space: nowrap;
}
.terminate-vote-capsule:hover {
  border-color: #ffe08a;
}
.terminate-vote-capsule[hidden] {
  display: none !important;
}
.tv-cap-title {
  color: #ffe294;
}
.tv-cap-expand {
  color: #9ecbff;
  text-decoration: underline;
  text-underline-offset: 2px;
}
#game:has(.terminate-vote-capsule:not([hidden])) .room-lifecycle.v4-lifecycle-toast {
  top: calc(154 * var(--tv-u)) !important;
}
html[data-mobile-shell=true] .room-lifecycle.v4-lifecycle-toast,
html[data-mobile-shell=true] .terminate-vote-panel,
html[data-mobile-shell=true] .terminate-vote-capsule {
  --tv-u: 0.88px;
}
html[data-mobile-shell=true] .terminate-vote-capsule {
  top: 64px;
}
html[data-mobile-shell=true] .room-lifecycle.v4-lifecycle-toast {
  top: 66px !important;
}
html[data-mobile-shell=true] #game:has(.terminate-vote-capsule:not([hidden])) .room-lifecycle.v4-lifecycle-toast {
  top: 102px !important;
}

/* web/src/title-screen.css */
#title {
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
}
#title:empty {
  display: none;
}
.v6-title {
  --gem-size: 57px;
  position: absolute;
  inset: 0;
  pointer-events: auto;
  overflow: hidden;
  isolation: isolate;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  justify-items: center;
  padding: max(clamp(66px, 9vh, 105px), env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) max(clamp(52px, 7.7vh, 90px), env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left));
  font-family: AvalonPixel, monospace;
  color: #f1e6c8;
  line-height: 1.4;
  text-align: center;
  transition: opacity .45s ease;
}
.v6-title[data-leaving=true] {
  opacity: 0;
  pointer-events: none;
}
.v6-title-vignette {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(
      ellipse 52% 30% at 50% 21%,
      rgba(6, 6, 16, .58),
      rgba(6, 6, 16, .22) 55%,
      transparent 78%),
    radial-gradient(
      ellipse 60% 26% at 50% 100%,
      rgba(4, 4, 10, .62),
      transparent 72%),
    radial-gradient(
      ellipse 120% 90% at 50% 50%,
      transparent 58%,
      rgba(3, 3, 9, .42) 100%);
}
.v6-title-motes {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  image-rendering: pixelated;
}
.v6-title-veil {
  position: absolute;
  inset: 0;
  z-index: 30;
  pointer-events: none;
  background: #04060c;
}
.v6-title > header,
.v6-title > section,
.v6-title > footer,
.v6-title > aside {
  position: relative;
  z-index: 2;
}
.v6-title-lockup {
  grid-row: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(4 * var(--v4-u));
}
.v6-title-name {
  position: relative;
  margin: 0;
  font-weight: 400;
  white-space: nowrap;
  font-size: calc(58 * var(--v4-u));
  line-height: 1.12;
  letter-spacing: calc(5 * var(--v4-u));
  background:
    linear-gradient(
      180deg,
      #fffbe9 0 18%,
      #ffeeb0 18% 30%,
      #f6cd63 30% 47%,
      #dc9f34 47% 60%,
      #a96a1d 60% 72%,
      #7d4a14 72% 80%,
      #c18a33 80% 90%,
      #f0cd7a 90% 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 calc(3 * var(--v4-u)) 0 #170c04) drop-shadow(calc(2 * var(--v4-u)) 0 0 #2a1607) drop-shadow(0 0 calc(18 * var(--v4-u)) rgba(255, 196, 92, .26));
}
.v6-title-name::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(
      112deg,
      transparent 0 42%,
      rgba(255, 255, 255, .0) 43%,
      rgba(255, 255, 255, .95) 46%,
      rgba(255, 246, 214, .75) 48%,
      transparent 51% 100%);
  background-size: 260% 100%;
  background-position: 130% 0;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: v6-title-sweep 7.2s steps(36, end) 1.6s infinite;
}
@keyframes v6-title-sweep {
  0% {
    background-position: 130% 0;
  }
  16%, 100% {
    background-position: -40% 0;
  }
}
.v6-title-sub {
  margin: 0;
  font-size: calc(19 * var(--v4-u));
  letter-spacing: calc(5 * var(--v4-u));
  color: #d9c393;
  text-shadow: 0 calc(2 * var(--v4-u)) 0 #120b05, 0 0 calc(10 * var(--v4-u)) rgba(214, 170, 92, .25);
}
.v6-gem-zone {
  grid-row: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(12 * var(--v4-u));
  margin-top: calc(30 * var(--v4-u));
}
.v6-gem-rail {
  --gem-gap: calc(var(--gem-size) * .74);
  --gem-glow-main: rgba(168, 128, 255, .56);
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--gem-gap);
  padding: 6px 10px;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, .8));
  isolation: isolate;
}
.v6-gem {
  appearance: none;
  position: relative;
  display: grid;
  place-items: center;
  flex: none;
  width: var(--gem-hit-size, var(--gem-size));
  height: var(--gem-hit-size, var(--gem-size));
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
  overflow: visible;
  border-radius: 4px;
  -webkit-tap-highlight-color: transparent;
}
.v6-gem:disabled {
  cursor: default;
}
.v6-gem:focus-visible {
  outline: 2px solid #f3cf72;
  outline-offset: 4px;
}
.v6-gem:not(:last-child)::after {
  content: "";
  position: absolute;
  left: calc(100% - 1px);
  top: 50%;
  transform: translateY(-50%);
  z-index: -1;
  width: calc(var(--gem-gap) + 2px);
  height: 2px;
  background:
    linear-gradient(
      90deg,
      #9a82ee6b,
      #6672b247,
      #9a82ee6b);
  transition: background .3s ease;
}
.v6-gem:is([data-state=socket], [data-state=broken]):not(:last-child)::after {
  background: #3e466645;
}
.v6-gem[data-state=broken]:has(+ .v6-gem[data-state=crisis])::after {
  background:
    linear-gradient(
      90deg,
      #3e466657,
      #ff3d6e9e);
}
.v6-gem-visual,
.v6-gem-art {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  transform-origin: 50% 50%;
  overflow: visible;
  transition: transform .16s var(--v4-ease-out, ease-out);
}
.v6-gem-visual {
  width: var(--gem-size);
  height: var(--gem-size);
}
.v6-gem-art > svg {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  shape-rendering: crispEdges;
}
.v6-gem[data-state=socket] .v6-gem-art > svg {
  opacity: .92;
  filter: drop-shadow(0 0 2px rgba(40, 52, 110, .7));
}
.v6-gem[data-state=intact] .v6-gem-art > svg {
  filter: drop-shadow(0 0 calc(var(--gem-size) * .22) var(--gem-glow-main));
}
.v6-gem[data-state=broken] .v6-gem-art > svg {
  opacity: .8;
}
.v6-gem[data-state=crisis] > .v6-gem-visual {
  animation: v4-gem-crisis-jitter 1.25s steps(4, end) infinite;
}
.v6-gem[data-state=crisis] .v6-gem-art > svg {
  animation: v4-gem-crisis-glow 1.25s ease-in-out infinite;
}
.v6-gem[data-cracking=true] > .v6-gem-visual {
  animation: v4-gem-crack-tremor 180ms steps(2, end) infinite;
}
.v6-gem[data-just-reforged=true] .v6-gem-art {
  animation: v4-gem-reforge-pop 360ms var(--v4-ease-back, cubic-bezier(.16, 1, .3, 1)) both;
}
@media (hover: hover) and (pointer: fine) {
  .v6-gem-rail[data-ready=true] .v6-gem:is([data-state=intact], [data-state=crisis]):not([data-busy=true]):hover .v6-gem-visual {
    transform: translateY(-2px) scale(1.06);
  }
}
@media (hover: hover) and (pointer: fine) {
  .v6-gem-rail[data-ready=true] .v6-gem[data-state=broken]:not([data-busy=true]):hover .v6-gem-art > svg {
    opacity: 1;
    filter: drop-shadow(0 0 4px rgba(124, 242, 255, .55));
  }
}
.v6-gem[data-failed=true] .v6-gem-art > svg {
  opacity: .5;
}
.v6-gem-fx {
  position: absolute;
  display: block;
  left: 50%;
  top: 50%;
  pointer-events: none;
  z-index: 12;
  image-rendering: pixelated;
  max-width: none;
  max-height: none;
}
.v6-gem-fx.fx-sheen {
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  transform: none;
  z-index: 9;
}
.v6-gem-fx.fx-shatter {
  width: calc(var(--gem-size) * 52 / 19);
  height: calc(var(--gem-size) * 68 / 19);
  transform: translate(-50%, calc(-100% * 23 / 68));
}
.v6-gem-fx.fx-doom {
  width: calc(var(--gem-size) * 60 / 19);
  height: calc(var(--gem-size) * 76 / 19);
  transform: translate(-50%, calc(-100% * 25 / 76));
}
.v6-gem-fx.fx-reforge {
  width: calc(var(--gem-size) * 44 / 19);
  height: calc(var(--gem-size) * 44 / 19);
  transform: translate(-50%, -50%);
}
.v6-gem-fx.fx-ambient {
  width: calc(var(--gem-size) * 34 / 19);
  height: calc(var(--gem-size) * 40 / 19);
  transform: translate(-50%, -55%);
  z-index: 10;
}
.v6-gem-rail.doom-shake {
  animation: v4-gem-track-doom-shake 340ms steps(6, end);
}
.v6-gem-hint {
  margin: 0;
  font-size: clamp(18px, calc(20 * var(--v4-u)), 27px);
  line-height: 1.35;
  letter-spacing: calc(1.5 * var(--v4-u));
  color: #fff1d0;
  text-shadow:
    0 2px 1px #08070f,
    0 0 8px #0b0716,
    0 0 16px #0b0716;
  pointer-events: none;
}
.v6-title-actions {
  grid-row: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(10 * var(--v4-u));
}
.v6-title .avalon-button.v6-title-enter {
  width: calc(320 * var(--v4-u)) !important;
  min-width: 0 !important;
  min-height: calc(62 * var(--v4-u)) !important;
  height: auto !important;
  padding: 0 calc(20 * var(--v4-u)) !important;
  font-size: calc(26 * var(--v4-u)) !important;
  letter-spacing: calc(7 * var(--v4-u));
  text-indent: calc(7 * var(--v4-u));
}
.v6-title .avalon-button.v6-title-enter[data-busy=true] {
  letter-spacing: calc(3 * var(--v4-u));
  text-indent: calc(3 * var(--v4-u));
  font-size: calc(20 * var(--v4-u)) !important;
}
.v6-title-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: calc(6 * var(--v4-u));
  min-height: calc(30 * var(--v4-u));
  font-size: calc(16 * var(--v4-u));
  color: #d8c9a4;
  text-shadow: 0 2px 3px #000;
}
.v6-title .avalon-link.v6-title-link {
  min-height: 0 !important;
  padding: calc(4 * var(--v4-u)) calc(8 * var(--v4-u)) !important;
  font-size: inherit !important;
  letter-spacing: calc(2 * var(--v4-u));
  color: #eadcb6 !important;
  text-decoration: none !important;
  opacity: .8;
  transition: opacity var(--v4-fast, .14s), color var(--v4-fast, .14s);
}
@media (hover: hover) and (pointer: fine) {
  .v6-title .avalon-link.v6-title-link:hover {
    opacity: 1;
    color: #ffe7a3 !important;
    text-decoration: underline !important;
    text-underline-offset: 5px;
  }
}
.v6-title .avalon-link.v6-title-link:focus-visible {
  opacity: 1;
  color: #ffe7a3 !important;
  text-decoration: underline !important;
  text-underline-offset: 5px;
}
.v6-title-sep {
  opacity: .38;
}
.v6-title-who {
  opacity: .82;
  letter-spacing: 1px;
}
.v6-title-status {
  margin: 0;
  min-height: 1.3em;
  font-size: calc(14 * var(--v4-u));
  color: #ffb9a6;
  text-shadow: 0 2px 3px #000;
}
.v6-title-status:empty {
  min-height: 0;
}
.v6-plate-showcase {
  position: absolute !important;
  left: max(calc(30 * var(--v4-u)), env(safe-area-inset-left));
  top: max(calc(24 * var(--v4-u)), calc(env(safe-area-inset-top) + 8px));
  width: min(calc(236 * var(--v4-u)), 21vw);
  display: flex;
  flex-direction: column;
  gap: calc(7 * var(--v4-u));
  pointer-events: none;
}
.v6-plate-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 3.3;
  filter: drop-shadow(0 calc(6 * var(--v4-u)) calc(14 * var(--v4-u)) rgba(0, 0, 0, .65));
}
.v6-plate-stage::before {
  content: "";
  position: absolute;
  inset: -22% -10%;
  z-index: -1;
  background:
    radial-gradient(
      closest-side,
      rgba(255, 142, 232, .16),
      rgba(168, 128, 255, .08) 55%,
      transparent);
}
.v6-plate-card {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateY(calc(4 * var(--v4-u)));
  transition: opacity .75s ease, transform .75s var(--v4-ease-out, ease-out);
}
.v6-plate-card[data-state=show] {
  opacity: 1;
  transform: none;
}
.v6-plate-card[data-state=leave] {
  opacity: 0;
  transform: translateY(calc(-4 * var(--v4-u)));
}
.v6-plate-card > * {
  width: 100% !important;
  height: 100% !important;
}
.v6-plate-card .dynamic-nameplate {
  aspect-ratio: auto !important;
}
.v6-plate-caption {
  margin: 0;
  padding-left: 2px;
  font-size: calc(12 * var(--v4-u));
  letter-spacing: calc(2 * var(--v4-u));
  color: #ecd9a9;
  text-align: left;
  text-shadow: 0 2px 3px #000;
}
.v6-plate-caption::before {
  content: "\25c6";
  margin-right: calc(6 * var(--v4-u));
  color: var(--r, var(--v4-mythic));
  text-shadow: 0 0 6px var(--r-glow);
}
.v6-plate-rarity {
  color: var(--r, var(--v4-mythic));
}
.v6-title-lockup,
.v6-gem-zone,
.v6-title-actions,
.v6-plate-showcase {
  opacity: 0;
}
.v6-title[data-intro=play] .v6-title-veil {
  animation: v6-veil-out 1.05s cubic-bezier(.4, 0, .2, 1) .05s forwards;
}
.v6-title[data-intro=play] .v6-title-lockup {
  animation: v6-rise .95s var(--v4-ease-out, ease-out) .26s forwards;
}
.v6-title[data-intro=play] .v6-gem-zone {
  animation: v6-rise .8s var(--v4-ease-out, ease-out) .5s forwards;
}
.v6-title[data-intro=play] .v6-title-actions {
  animation: v6-rise .8s var(--v4-ease-out, ease-out) .68s forwards;
}
.v6-title[data-intro=play] .v6-plate-showcase {
  animation: v6-rise 1s var(--v4-ease-out, ease-out) 1s forwards;
}
.v6-title[data-intro=done] .v6-title-veil {
  display: none;
}
.v6-title[data-intro=done] :is(.v6-title-lockup, .v6-gem-zone, .v6-title-actions, .v6-plate-showcase) {
  opacity: 1;
  animation: none;
}
.v6-title--quake[data-intro=done] :is(.v6-title-lockup, .v6-gem-zone) {
  animation: v4-gem-track-doom-shake 340ms steps(6, end);
}
@keyframes v6-veil-out {
  to {
    opacity: 0;
    visibility: hidden;
  }
}
@keyframes v6-rise {
  from {
    opacity: 0;
    transform: translateY(calc(10 * var(--v4-u)));
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (max-width: 1000px), (max-height: 500px) {
  .v6-title {
    --gem-size: 38px;
    --gem-hit-size: 44px;
  }
}
@media (min-width: 900px) and (max-width: 1100px) {
  .v6-plate-showcase {
    width: min(calc(236 * var(--v4-u)), 16vw);
  }
  .v6-plate-caption {
    font-size: clamp(9px, 1.02vw, 11px);
    letter-spacing: .4px;
  }
}
@media (max-width: 899px), (max-height: 430px) {
  .v6-plate-showcase {
    display: none !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  .v6-title-veil {
    display: none;
  }
  .v6-title :is(.v6-title-lockup, .v6-gem-zone, .v6-title-actions, .v6-plate-showcase) {
    opacity: 1 !important;
    animation: none !important;
  }
  .v6-title-name::after,
  .v6-gem-visual,
  .v6-gem-art,
  .v6-gem-art > svg {
    animation: none !important;
  }
}
.rw-reveal > .rw-dev-gift-note {
  position: absolute;
  z-index: 40;
  left: 50%;
  top: calc(var(--rw-gift-title-y, 10dvh) + clamp(32px, calc(42 * var(--v4-u)), 60px) + 8px);
  transform: translateX(-50%);
  width: min(calc(520 * var(--v4-u)), calc(100% - 32px));
  box-sizing: border-box;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: calc(12 * var(--v4-u));
  padding: calc(10 * var(--v4-u)) calc(18 * var(--v4-u)) calc(11 * var(--v4-u)) calc(12 * var(--v4-u));
  border-radius: 6px;
  text-align: left;
  pointer-events: auto;
  cursor: pointer;
  color: inherit;
  font-family: inherit;
  background:
    linear-gradient(
      180deg,
      rgba(38, 30, 52, .9),
      rgba(18, 14, 26, .92));
  border: 1px solid rgba(228, 185, 85, .72);
  box-shadow:
    0 0 0 1px #0b0806,
    inset 0 1px 0 rgba(255, 236, 185, .28),
    0 calc(10 * var(--v4-u)) calc(26 * var(--v4-u)) rgba(0, 0, 0, .55),
    0 0 calc(22 * var(--v4-u)) rgba(228, 185, 85, .16);
  animation: v6-note-drop .35s var(--v4-ease-out, ease-out) .36s both;
}
.rw-dev-gift-crest {
  display: grid;
  place-items: center;
  width: calc(44 * var(--v4-u));
  height: calc(44 * var(--v4-u));
  border-radius: 6px;
  background:
    radial-gradient(
      circle at 50% 40%,
      rgba(255, 214, 110, .35),
      rgba(120, 80, 30, .1) 70%);
  box-shadow: inset 0 0 0 1px rgba(228, 185, 85, .5);
}
.rw-dev-gift-crest > img {
  width: 75%;
  height: 75%;
  object-fit: contain;
  image-rendering: pixelated;
}
.rw-dev-gift-copy {
  display: flex;
  flex-direction: column;
  gap: calc(3 * var(--v4-u));
  min-width: 0;
}
.rw-dev-gift-title {
  font-weight: 400;
  font-size: calc(17 * var(--v4-u));
  letter-spacing: calc(2 * var(--v4-u));
  color: #ffe7a3;
  text-shadow: 0 2px 0 #140c05;
}
.rw-dev-gift-body {
  margin: 0 !important;
  font-size: calc(13 * var(--v4-u));
  line-height: 1.55;
  color: #eadfc6;
}
@media (prefers-reduced-motion: reduce) {
  .rw-reveal > .rw-dev-gift-note {
    animation: none;
  }
}
@keyframes v6-note-drop {
  from {
    opacity: 0;
    transform: translate(-50%, calc(-10 * var(--v4-u)));
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}
.game-document.v6-bind-prompt {
  width: min(calc(600 * var(--v4-u)), calc(100vw - 32px));
  height: auto !important;
  max-height: calc(100dvh - 36px) !important;
  padding: calc(22 * var(--v4-u)) calc(28 * var(--v4-u)) calc(24 * var(--v4-u)) !important;
  gap: calc(16 * var(--v4-u));
  animation: v6-bind-in .35s var(--v4-ease-out, ease-out) both;
}
.v6-bind-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(14 * var(--v4-u));
  padding: calc(16 * var(--v4-u)) calc(20 * var(--v4-u));
  text-align: center;
}
.v6-bind-chests {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: calc(10 * var(--v4-u));
  flex-wrap: nowrap;
}
.v6-bind-chest {
  position: relative;
  display: grid;
  place-items: center;
  width: calc(46 * var(--v4-u));
  height: calc(46 * var(--v4-u));
  border-radius: 6px;
  background:
    linear-gradient(
      180deg,
      #2d2318,
      #1d160f);
  box-shadow: inset 0 0 0 1px rgba(212, 172, 92, .65), 0 3px 8px rgba(0, 0, 0, .35);
}
.v6-bind-chest > img {
  width: calc(32 * var(--v4-u));
  height: calc(32 * var(--v4-u));
  object-fit: contain;
  image-rendering: pixelated;
  display: block;
}
.v6-bind-chest::after {
  content: "\2713";
  position: absolute;
  right: -3px;
  bottom: -4px;
  width: calc(15 * var(--v4-u));
  height: calc(15 * var(--v4-u));
  border-radius: 3px;
  display: grid;
  place-items: center;
  font-size: calc(10 * var(--v4-u));
  line-height: 1;
  color: #2a1a06;
  background: #f2cf73;
  box-shadow: 0 0 0 1px #7a5418;
}
.v6-bind-copy {
  margin: 0 !important;
  font-size: calc(17 * var(--v4-u)) !important;
  line-height: 1.7 !important;
  color: var(--v4-ink, #3a2f22);
  text-align: left;
}
@keyframes v6-bind-in {
  from {
    opacity: 0;
    transform: translateY(calc(12 * var(--v4-u))) scale(.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes v6-chest-pop {
  from {
    opacity: 0;
    transform: scale(.6);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* web/src/title-fullscreen.css */
.v6-title-actions {
  --enter-width: min(320 * var(--v4-u), 100%);
  width: min(100%, max(320px, 340 * var(--v4-u)));
}
.v6-title-sub-row {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: calc(12 * var(--v4-u));
  width: var(--enter-width);
  max-width: 100%;
  margin: 0;
}
.v6-title .avalon-button.v6-title-fullscreen,
.v6-title .avalon-button.v6-title-pwa {
  flex: 1 1 0;
  width: auto !important;
  min-width: 0 !important;
  min-height: calc(46 * var(--v4-u)) !important;
  height: calc(46 * var(--v4-u)) !important;
  font-size: max(13.5px, calc(16 * var(--v4-u))) !important;
  padding: 0 calc(10 * var(--v4-u)) !important;
  margin: 0 !important;
  white-space: nowrap;
}
.v6-title-sub-row[data-single=true] .avalon-button.v6-title-fullscreen {
  flex: 0 0 auto;
  width: calc(var(--enter-width) * .72) !important;
}
.v6-title .avalon-button.v6-title-pwa {
  position: relative;
  overflow: visible !important;
  background:
    linear-gradient(
      180deg,
      #322719 0%,
      #1d160d 100%) !important;
  border: 1.5px solid #d4a64a !important;
  color: #ffe5a3 !important;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 228, 156, 0.34) !important;
}
.v6-title .avalon-button.v6-title-pwa:hover {
  background:
    linear-gradient(
      180deg,
      #40311d 0%,
      #261c10 100%) !important;
  border-color: #f0c76e !important;
}
.v6-title .avalon-button.v6-title-pwa[data-unclicked=true] {
  animation: v6-pwa-breathe 2.6s ease-in-out infinite;
}
@keyframes v6-pwa-breathe {
  0%, 100% {
    box-shadow:
      0 3px 12px rgba(0, 0, 0, 0.45),
      0 0 6px rgba(232, 184, 78, 0.24),
      inset 0 1px 0 rgba(255, 228, 156, 0.34);
  }
  50% {
    box-shadow:
      0 3px 14px rgba(0, 0, 0, 0.5),
      0 0 15px rgba(242, 198, 92, 0.62),
      inset 0 1px 0 rgba(255, 236, 176, 0.52);
  }
}
@media (prefers-reduced-motion: reduce) {
  .v6-title .avalon-button.v6-title-pwa[data-unclicked=true] {
    animation: none;
  }
}
.v6-pwa-label {
  display: inline-block;
  overflow: hidden;
  text-overflow: ellipsis;
}
.v6-pwa-badge {
  position: absolute;
  top: calc(-7 * var(--v4-u));
  right: calc(-5 * var(--v4-u));
  z-index: 2;
  padding: calc(1 * var(--v4-u)) calc(5 * var(--v4-u));
  border-radius: calc(4 * var(--v4-u));
  background:
    linear-gradient(
      135deg,
      #f8d474 0%,
      #c88b26 100%);
  border: 1px solid #fff3c9;
  color: #1c1206;
  font: 700 max(9.5px, calc(10.5 * var(--v4-u)))/1.15 AvalonPixel, monospace;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.55);
  pointer-events: none;
}
.v6-title .avalon-button.v6-title-pwa[hidden],
.v6-title .avalon-button.v6-title-fullscreen[hidden],
.v6-title-sub-row[hidden] {
  display: none !important;
}
#title .v6-title-actions {
  gap: calc(6 * var(--v4-u));
}
#title .v6-title-enter {
  margin: 0 0 calc(4 * var(--v4-u));
  max-width: 100%;
}
.v6-fullscreen-hint {
  margin: calc(2 * var(--v4-u)) 0 0;
  font-size: max(11.5px, calc(13.5 * var(--v4-u)));
  color: #d8c9a4;
  text-shadow: 0 1px 3px #000;
  white-space: nowrap;
}
.v6-fullscreen-hint .touch-advice,
.v6-fullscreen-hint:has(.fullscreen-feedback) > :not(.fullscreen-feedback),
.v6-title-status:empty {
  display: none;
}
@media (any-pointer: coarse) {
  .v6-fullscreen-hint .desktop-advice {
    display: none;
  }
  .v6-fullscreen-hint .touch-advice {
    display: inline;
  }
}
.v6-account-entry {
  appearance: none;
  position: absolute !important;
  z-index: 8;
  top: max(clamp(66px, 9vh, 105px), env(safe-area-inset-top));
  right: max(calc(26 * var(--v4-u)), env(safe-area-inset-right));
  display: inline-flex;
  align-items: center;
  gap: 0;
  padding: 0;
  margin: 0;
  border: 0;
  background: none;
  cursor: pointer;
  font-family: AvalonPixel, monospace;
  color: #f3e4bf;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.14s ease, filter 0.14s ease;
}
.v6-title[data-intro=on] .v6-account-entry {
  opacity: 0;
}
.v6-title[data-intro=play] .v6-account-entry {
  animation: v6-rise .9s ease-out .45s forwards;
  opacity: 0;
}
.v6-title[data-intro=done] .v6-account-entry {
  opacity: 1;
  animation: none;
}
.v6-account-entry:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}
.v6-account-entry:active {
  transform: translateY(1px);
}
.v6-account-entry:focus-visible {
  outline: 2px solid #f5d278;
  outline-offset: 4px;
  border-radius: 10px;
}
.v6-account-pill {
  display: inline-flex;
  align-items: center;
  gap: calc(3 * var(--v4-u));
  height: calc(36 * var(--v4-u));
  padding: 0 calc(14 * var(--v4-u)) 0 calc(12 * var(--v4-u));
  margin-right: calc(-8 * var(--v4-u));
  border-radius: calc(18 * var(--v4-u)) 0 0 calc(18 * var(--v4-u));
  background:
    linear-gradient(
      180deg,
      rgba(22, 18, 28, 0.88),
      rgba(12, 10, 18, 0.90));
  border: 1.5px solid rgba(208, 164, 76, 0.72);
  border-right: 0;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.52), inset 0 1px 0 rgba(255, 228, 152, 0.18);
  font-size: max(12px, calc(13.5 * var(--v4-u)));
  line-height: 1;
  white-space: nowrap;
}
.v6-account-prefix {
  color: #d8c69f;
}
.v6-account-nick {
  display: inline-block;
  max-width: clamp(56px, 9.5vw, calc(136 * var(--v4-u)));
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #fff2ce;
  vertical-align: bottom;
}
.v6-account-dot {
  color: rgba(216, 198, 159, 0.55);
  margin: 0 1px;
}
.v6-account-action {
  color: #e2c88b;
}
.v6-account-action.is-highlight {
  color: #ffd970;
  font-weight: 700;
  text-shadow: 0 0 8px rgba(255, 212, 102, 0.42);
}
.v6-account-badge {
  position: relative;
  z-index: 2;
  width: calc(44 * var(--v4-u));
  height: calc(44 * var(--v4-u));
  flex: 0 0 auto;
  border-radius: calc(9 * var(--v4-u));
  background:
    linear-gradient(
      180deg,
      #f7e2a3 0%,
      #e1ac44 54%,
      #c28824 100%);
  border: 1.5px solid #452c0d;
  color: #261705;
  box-shadow:
    inset 0 1.5px 0 #fff9df,
    inset 0 -2px 0 rgba(116, 70, 12, .48),
    0 4px 10px rgba(0, 0, 0, .54);
  display: inline-grid;
  place-items: center;
}
.v6-account-badge > svg {
  width: calc(22 * var(--v4-u));
  height: calc(22 * var(--v4-u));
  display: block;
}
@media (min-width: 900px) and (max-width: 1150px) {
  .v6-account-entry {
    right: max(14px, env(safe-area-inset-right));
  }
  .v6-account-pill {
    height: 32px;
    padding: 0 11px 0 9px;
    font-size: 11.5px;
  }
  .v6-account-nick {
    max-width: 56px;
  }
  .v6-account-badge {
    width: 38px;
    height: 38px;
    border-radius: 8px;
  }
  .v6-account-badge > svg {
    width: 19px;
    height: 19px;
  }
}
@media (max-height: 500px) {
  html[data-mobile-shell=true] .v6-title-actions {
    --enter-width: min(296px, 94vw);
  }
  html[data-mobile-shell=true] #title .v6-title-enter {
    width: var(--enter-width) !important;
    min-height: 50px !important;
  }
  .v6-title-sub-row {
    gap: 12px;
  }
  .v6-title .avalon-button.v6-title-fullscreen,
  .v6-title .avalon-button.v6-title-pwa {
    min-height: 40px !important;
    height: 40px !important;
    font-size: 13.5px !important;
    padding: 0 8px !important;
  }
  .v6-pwa-badge {
    top: -6px;
    right: -4px;
    padding: 1px 4px;
    font-size: 9.5px;
    border-radius: 3px;
  }
  .v6-fullscreen-hint {
    font-size: 11.5px;
    margin-top: 2px;
  }
  #title .v6-title {
    padding-block: max(8px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-bottom));
  }
  #title .v6-gem-zone {
    margin-top: 4px;
    gap: 2px;
  }
  .v6-account-entry {
    top: max(10px, env(safe-area-inset-top));
    right: max(12px, env(safe-area-inset-right));
  }
  .v6-account-pill {
    height: 29px;
    padding: 0 11px 0 9px;
    margin-right: -6px;
    font-size: 11.5px;
    border-radius: 15px 0 0 15px;
  }
  .v6-account-nick {
    max-width: 68px;
  }
  .v6-account-badge {
    width: 34px;
    height: 34px;
    border-radius: 8px;
  }
  .v6-account-badge > svg {
    width: 18px;
    height: 18px;
  }
}
@media (max-width: 520px) and (orientation: portrait) {
  #title .v6-title {
    padding-inline: max(10px, env(safe-area-inset-left)) max(10px, env(safe-area-inset-right));
  }
  #title .v6-title-name {
    font-size: clamp(25px, 7vw, 36px);
    letter-spacing: 2px;
  }
  #title .v6-gem-rail {
    --gem-gap: min(3vw, 18px);
  }
  .v6-account-entry {
    top: max(10px, env(safe-area-inset-top));
    right: max(10px, env(safe-area-inset-right));
  }
  .v6-account-nick {
    max-width: 64px;
  }
}

/* web/src/collection-v3.css */
.game-document.collection-document {
  padding: 24px;
  gap: 12px;
  max-width: 1100px;
  width: 96vw;
  height: 94dvh;
}
.collection-document > .document-title {
  font-size: 30px;
  padding: 0 60px 12px;
  text-align: center;
}
.collection-document > .economy-content {
  overflow: hidden;
  flex: 1;
  min-height: 0;
}
.collection-document > .account-message:empty {
  display: none;
}
.collection-document > .cosmetics-tabs {
  gap: 8px;
}
.collection-document > .cosmetics-tabs .avalon-button {
  width: 88px;
  min-width: 88px;
  height: 40px;
  min-height: 40px;
  padding: 4px;
  font-size: 16px;
}
.collection-layout {
  height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 24px;
}
.collection-browser {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.collection-filters {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.collection-document .collection-filters .avalon-button {
  width: 72px;
  min-width: 0;
  height: 36px;
  min-height: 36px;
  font-size: 14px;
  padding: 4px;
}
.collection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  grid-auto-rows: 112px;
  gap: 8px;
  overflow: auto;
  align-content: start;
  min-height: 0;
  padding-right: 4px;
  scrollbar-width: thin;
}
.collection-document .collection-item.avalon-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 0;
  width: 100%;
  height: 112px;
  min-height: 112px;
  padding: 6px;
  background: #c2b493;
  color: #554632;
  border: 2px solid #ac9e78;
  box-shadow: none;
  text-shadow: none;
  font-size: 14px;
  white-space: normal;
}
.collection-item.avalon-button::before,
.collection-item.avalon-button::after {
  display: none;
}
.collection-document .collection-item[aria-pressed=true] {
  background: #dfd2b2;
  border-color: #655638;
}
.collection-item-name {
  line-height: 18px;
  overflow-wrap: anywhere;
}
.collection-art {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  width: 100%;
  height: 64px;
  flex-shrink: 0;
}
.collection-art img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  image-rendering: pixelated;
}
.collection-art .dynamic-nameplate {
  width: 100%;
  height: auto;
  aspect-ratio: 3.3;
}
.collection-art .wardrobe-part-art,
.collection-art canvas {
  width: 64px;
  height: 64px;
}
.collection-detail {
  border-left: 1px solid #a99b76;
  padding-left: 24px;
  min-width: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  scrollbar-width: thin;
}
.collection-detail > .collection-art {
  height: 128px;
}
.collection-detail > .collection-art .wardrobe-part-art,
.collection-detail > .collection-art canvas {
  width: 112px;
  height: 112px;
}
.collection-detail h3 {
  font-size: 24px;
  line-height: 1.3;
  margin: 0;
  overflow-wrap: anywhere;
}
.collection-quality,
.collection-state {
  font-size: 16px;
}
.collection-hint {
  font-size: 14px;
  color: #6b5e48;
}
.collection-detail .avalon-button {
  width: 100%;
  min-height: 42px;
  height: auto;
  font-size: 16px;
  padding: 8px;
  white-space: normal;
}
.collection-colors {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}
.collection-colors span {
  width: 18px;
  height: 18px;
  border: 1px solid #6b5e48;
}
.collection-empty {
  grid-column: 1/-1;
  padding: 24px;
  text-align: center;
}
.collection-help {
  font-size: 16px;
  margin-top: 12px;
}
.collection-help summary {
  cursor: pointer;
  min-height: 32px;
}
.collection-help p {
  font-size: 14px;
  line-height: 1.6;
}
.treasury-layout {
  height: 100%;
  display: grid;
  grid-template-columns: 42% minmax(0, 1fr);
  gap: 24px;
}
.treasury-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 0;
  overflow: auto;
}
.treasury-hero h3,
.treasury-catalog h3 {
  font-size: 24px;
  margin: 0;
}
.treasury-catalog {
  min-height: 0;
  overflow: auto;
  border-left: 1px solid #a99b76;
  padding-left: 24px;
  scrollbar-width: thin;
}
.treasury-chest {
  width: 200px;
  height: 128px;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
.treasury-chest .rw-pixel-chest {
  position: absolute !important;
  width: 288px !important;
  height: 288px !important;
  left: 50%;
  top: -142px;
  transform: translateX(-50%) !important;
}
.treasury-count {
  font-size: 28px;
  line-height: 1;
}
.treasury-hero > .avalon-button {
  width: 172px;
  min-height: 42px;
  height: auto;
  font-size: 18px;
  padding: 6px;
}
.treasury-tier {
  border-bottom: 1px solid #a99b76;
}
.treasury-tier > summary {
  display: grid;
  grid-template-columns: 1fr 55px 120px;
  gap: 12px;
  cursor: pointer;
  padding: 16px 0;
  font-size: 16px;
}
.treasury-rewards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 8px;
  padding: 8px 0;
}
.treasury-reward {
  text-align: center;
  font-size: 14px;
  background: #c2b493;
  padding: 6px;
  overflow-wrap: anywhere;
}
.weekly-layout {
  height: 100%;
  overflow: auto;
}
.weekly-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 24px;
  padding: 24px;
  background: #d3c5a5;
  border: 1px solid #ac9e78;
}
.weekly-objective {
  display: flex;
  flex-direction: column;
  gap: 16px;
  justify-content: center;
}
.weekly-objective h3 {
  font-size: 28px;
  margin: 0;
}
.weekly-objective progress {
  width: 100%;
  height: 16px;
  accent-color: #536652;
}
.weekly-progress {
  font-size: 24px;
}
.weekly-reward {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  text-align: center;
}
.weekly-reward > .avalon-button {
  width: 172px;
  min-height: 42px;
  font-size: 18px;
}
.weekly-reward .treasury-chest {
  transform: scale(.8);
  margin: -12px 0;
}
.game-document.gift-welcome {
  gap: 16px;
}
.gift-welcome .gift-chest {
  width: 240px;
  height: 150px;
}
.gift-welcome .gift-chest .treasury-chest {
  width: 240px;
  height: 150px;
}
.gift-welcome .gift-chest .rw-pixel-chest {
  width: 320px !important;
  height: 320px !important;
  top: -155px;
}
.economy-document.rewards-document,
.economy-document.rewards-document button,
.economy-document.rewards-document h3 {
  font-family: AvalonPixel, monospace !important;
}
.cosmetics-document .wardrobe-browse-mode {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  grid-template-rows: auto auto auto minmax(100px, 1fr) auto;
  gap: 8px 12px;
  overflow: hidden;
}
.wardrobe-browse-mode > .wardrobe-categories {
  grid-column: 1;
  grid-row: 1/6;
  display: flex;
  flex-direction: column;
  overflow: auto;
  gap: 5px;
  padding: 0;
  scrollbar-width: thin;
}
.cosmetics-document .wardrobe-category.avalon-button {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  width: 60px;
  min-width: 60px;
  height: 56px;
  min-height: 56px;
  gap: 2px;
  padding: 4px;
  font-size: 12px;
}
.wardrobe-category svg {
  width: 24px;
  height: 24px;
}
.wardrobe-category::before,
.wardrobe-category::after {
  display: none !important;
}
.wardrobe-browse-mode > .wardrobe-subcategories {
  grid-column: 2;
  grid-row: 1;
  gap: 6px;
}
.wardrobe-browse-mode > .wardrobe-list-heading {
  grid-column: 2;
  grid-row: 2;
}
.wardrobe-browse-mode > .wardrobe-layering-toggle {
  grid-column: 2;
  grid-row: 3;
}
.wardrobe-browse-mode > .wardrobe-grid {
  grid-column: 2;
  grid-row: 4;
  min-height: 100px;
  max-height: none;
  overflow: auto;
  align-content: start;
}
.wardrobe-browse-mode > .wardrobe-detail {
  grid-column: 2;
  grid-row: 5;
  max-height: 150px;
  overflow: auto;
  min-height: 0;
}
.cosmetics-document .wardrobe-subcategories .avalon-button {
  width: 88px;
  min-width: 72px;
  height: 36px;
  min-height: 36px;
  font-size: 14px;
  padding: 4px;
}
@media (max-height: 600px) {
  .game-document.collection-document {
    height: calc(100dvh - 16px);
    max-height: calc(100dvh - 16px);
    padding: 12px 16px;
    gap: 6px;
  }
  .collection-document > .document-title {
    font-size: 22px;
    padding-bottom: 6px;
  }
  .collection-document > .document-close {
    top: 8px;
    right: 12px;
  }
  .collection-document > p {
    font-size: 14px;
    margin: 0;
  }
  .collection-document > .cosmetics-tabs .avalon-button {
    height: 32px;
    min-height: 32px;
    font-size: 14px;
  }
  .collection-document > .economy-actions > .avalon-button {
    width: 172px;
    height: 36px;
    min-height: 36px;
    font-size: 16px;
  }
  .collection-layout {
    grid-template-columns: minmax(0, 1fr) 192px;
    gap: 12px;
  }
  .collection-browser {
    gap: 6px;
  }
  .collection-document .collection-filters .avalon-button {
    height: 30px;
    min-height: 30px;
    font-size: 12px;
    width: 60px;
  }
  .collection-grid {
    grid-template-columns: repeat(auto-fill, minmax(86px, 1fr));
    grid-auto-rows: 90px;
    gap: 6px;
  }
  .collection-document .collection-item.avalon-button {
    height: 90px;
    min-height: 90px;
    padding: 4px;
    font-size: 12px;
  }
  .collection-item .collection-art {
    height: 48px;
  }
  .collection-item .collection-art canvas,
  .collection-item .wardrobe-part-art {
    width: 48px;
    height: 48px;
  }
  .collection-detail {
    padding-left: 12px;
    gap: 6px;
  }
  .collection-detail > .collection-art {
    height: 64px;
  }
  .collection-detail > .collection-art canvas,
  .collection-detail > .collection-art .wardrobe-part-art {
    width: 64px;
    height: 64px;
  }
  .collection-detail h3 {
    font-size: 18px;
  }
  .collection-state,
  .collection-quality {
    font-size: 12px;
  }
  .collection-detail .avalon-button {
    font-size: 14px;
    min-height: 36px;
    padding: 4px;
  }
  .collection-colors span {
    width: 12px;
    height: 12px;
  }
  .collection-hint {
    font-size: 12px;
  }
  .treasury-layout {
    grid-template-columns: 40% minmax(0, 1fr);
    gap: 12px;
  }
  .treasury-hero {
    gap: 6px;
  }
  .treasury-hero h3,
  .treasury-catalog h3 {
    font-size: 18px;
  }
  .treasury-hero > .treasury-chest {
    width: 150px;
    height: 75px;
  }
  .treasury-hero > .treasury-chest .rw-pixel-chest {
    width: 192px !important;
    height: 192px !important;
    top: -96px;
  }
  .treasury-count {
    font-size: 20px;
  }
  .treasury-hero > .avalon-button {
    min-height: 32px;
    font-size: 14px;
  }
  .treasury-catalog {
    padding-left: 12px;
  }
  .treasury-tier > summary {
    grid-template-columns: 1fr 42px 96px;
    padding: 10px 0;
    gap: 6px;
    font-size: 14px;
  }
  .collection-help {
    font-size: 14px;
    margin-top: 8px;
  }
  .weekly-card {
    grid-template-columns: minmax(0, 1fr) 190px;
    padding: 12px;
    gap: 16px;
  }
  .weekly-objective {
    gap: 10px;
  }
  .weekly-objective h3 {
    font-size: 22px;
  }
  .weekly-progress {
    font-size: 20px;
  }
  .weekly-reward {
    gap: 4px;
  }
  .weekly-reward .treasury-chest {
    height: 90px;
    width: 160px;
    margin: -8px;
  }
  .weekly-reward .treasury-chest .rw-pixel-chest {
    width: 224px !important;
    height: 224px !important;
    top: -110px;
  }
  .weekly-reward > .avalon-button {
    min-height: 36px;
    font-size: 16px;
  }
  .game-document.gift-welcome {
    gap: 12px;
  }
  .gift-welcome .gift-chest,
  .gift-welcome .gift-chest .treasury-chest {
    width: 200px;
    height: 110px;
  }
  .gift-welcome .gift-chest .rw-pixel-chest {
    width: 256px !important;
    height: 256px !important;
    top: -125px;
  }
  .cosmetics-document .wardrobe-browse-mode {
    grid-template-columns: 50px minmax(0, 1fr);
    grid-template-rows: 32px 26px auto minmax(88px, 1fr) auto;
    gap: 4px 8px;
  }
  .cosmetics-document .wardrobe-category.avalon-button {
    width: 46px;
    min-width: 46px;
    height: 44px;
    min-height: 44px;
    font-size: 12px;
    padding: 2px;
  }
  .wardrobe-category svg {
    width: 20px;
    height: 20px;
  }
  .wardrobe-browse-mode > .wardrobe-detail {
    max-height: 70px;
    overflow: auto;
  }
  .wardrobe-browse-mode > .wardrobe-grid {
    min-height: 88px;
    max-height: none;
    grid-template-columns: repeat(auto-fill, minmax(82px, 1fr));
  }
  .cosmetics-document .wardrobe-subcategories .avalon-button {
    height: 30px;
    min-height: 30px;
    min-width: 60px;
    width: 60px;
    font-size: 12px;
  }
  .wardrobe-browse-mode .wardrobe-list-heading h3 {
    font-size: 14px;
  }
  .wardrobe-browse-mode .wardrobe-search {
    width: 112px;
  }
  .wardrobe-browse-mode .wardrobe-layering-toggle {
    font-size: 12px;
  }
  .wardrobe-browse-mode .wardrobe-layering-toggle .wardrobe-muted {
    display: none;
  }
}
@media (max-width: 700px) {
  .collection-layout {
    grid-template-columns: minmax(0, 1fr) 168px;
  }
  .collection-document .collection-filters .avalon-button {
    width: 52px;
  }
  .collection-detail h3 {
    font-size: 16px;
  }
  .treasury-layout {
    grid-template-columns: 40% minmax(0, 1fr);
  }
  .treasury-tier > summary {
    font-size: 12px;
    grid-template-columns: 1fr 35px 85px;
  }
  .weekly-card {
    grid-template-columns: minmax(0, 1fr) 172px;
  }
  .weekly-objective h3 {
    font-size: 20px;
  }
}
@media (max-height: 600px) {
  .collection-detail {
    gap: 4px;
  }
  .collection-detail > .collection-art {
    height: 48px;
  }
  .collection-detail > .collection-art canvas,
  .collection-detail > .collection-art .wardrobe-part-art {
    width: 48px;
    height: 48px;
  }
  .collection-detail h3 {
    line-height: 20px;
  }
  .collection-detail p {
    margin: 0;
    line-height: 14px;
  }
  .collection-detail .collection-quality {
    line-height: 14px;
  }
  .collection-detail .avalon-button {
    min-height: 32px;
    height: 32px;
    flex-shrink: 0;
  }
  .collection-detail .collection-colors {
    gap: 3px;
  }
  .treasury-hero {
    justify-content: flex-start;
    gap: 3px;
  }
  .treasury-hero h3 {
    display: none;
  }
  .treasury-hero > .treasury-chest {
    width: 120px;
    height: 56px;
  }
  .treasury-hero > .treasury-chest .rw-pixel-chest {
    width: 160px !important;
    height: 160px !important;
    top: -80px;
  }
  .treasury-hero p {
    margin: 0;
    line-height: 16px;
  }
  .treasury-hero > .avalon-button {
    height: 32px;
    min-height: 32px;
    flex-shrink: 0;
    padding: 4px;
  }
  .treasury-count {
    font-size: 18px;
  }
  .weekly-card p {
    margin: 0;
  }
  .weekly-reward .treasury-chest {
    height: 64px;
    width: 128px;
    margin: 0;
    transform: none;
  }
  .weekly-reward .treasury-chest .rw-pixel-chest {
    width: 160px !important;
    height: 160px !important;
    top: -80px;
  }
  .weekly-objective {
    gap: 6px;
  }
}
.treasury-chest {
  height: 136px;
}
.treasury-chest .rw-pixel-chest {
  top: -144px;
}
@media (max-height: 600px) {
  .treasury-hero > .treasury-chest {
    height: 60px;
  }
  .treasury-hero > .treasury-chest .rw-pixel-chest,
  .weekly-reward .treasury-chest .rw-pixel-chest {
    width: 128px !important;
    height: 128px !important;
    top: -64px;
  }
}
@media (max-height: 600px) {
  .weekly-card {
    padding: 8px;
  }
  .weekly-reward strong,
  .weekly-reward p {
    font-size: 14px;
    line-height: 16px;
  }
  .weekly-reward > .avalon-button {
    height: 32px;
    min-height: 32px;
    padding: 4px;
  }
  .weekly-objective p {
    line-height: 18px;
  }
}
.weekly-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
}
.weekly-badge svg {
  width: 24px;
  height: 24px;
}
@media (max-height: 600px) {
  .weekly-badge {
    font-size: 12px;
  }
  .weekly-badge svg {
    width: 16px;
    height: 16px;
  }
  .gift-welcome .gift-chest,
  .gift-welcome .gift-chest .treasury-chest {
    height: 116px;
  }
  .gift-welcome .gift-chest .rw-pixel-chest {
    top: -130px;
  }
}
.economy-document.rewards-document .rw-result-stage * {
  font-family: AvalonPixel, monospace !important;
  font-weight: 400;
}
.economy-document.rewards-document .rw-result-actions .avalon-button {
  background: var(--control-fill);
  color: var(--control-ink);
  border: 2px solid var(--control-edge);
  border-radius: 0;
  box-shadow:
    inset 0 0 0 2px #131412,
    0 0 0 2px #131412,
    2px 4px 0 #0008;
  letter-spacing: 0;
  font-size: 22px;
  line-height: 1.25;
}
.economy-document.rewards-document .rw-result-quality {
  font-size: 18px;
  letter-spacing: 1px;
}
.economy-document.rewards-document .rw-result-description {
  font-size: 18px;
}
@media (max-height: 600px) {
  .economy-document.rewards-document .rw-result-actions .avalon-button {
    width: 172px;
    min-height: 36px;
    height: 36px;
    padding: 4px;
    font-size: 16px;
  }
  .economy-document.rewards-document .rw-result-quality,
  .economy-document.rewards-document .rw-result-description {
    font-size: 14px;
  }
}
.treasury-chest > .chest-still {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
}
.cosmetics-document .wardrobe-detail .wardrobe-unlock {
  width: 200px;
  min-width: 172px;
  white-space: nowrap;
  font-size: 14px;
  line-height: 1.25;
  height: 36px;
  min-height: 36px;
  padding: 4px 10px;
}
@media (max-height: 600px) {
  .cosmetics-document .wardrobe-detail .wardrobe-unlock {
    width: 172px;
    min-height: 32px;
    height: 32px;
    font-size: 12px;
  }
}
.collection-document[data-section=receipts] > .economy-content {
  overflow: auto;
}
