:root {
  color-scheme: dark;
  --gold: #ffc44a;
  --gold-2: #ff8a1e;
  --text: #fff8ee;
  --muted: #cbb8d8;
  --panel: #100814;
  --line: rgba(255, 214, 140, 0.18);
  --danger: #ff5d78;
  --header-h: 64px;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  display: grid;
  grid-template-columns: minmax(300px, 390px) minmax(0, 1fr) 340px;
  grid-template-rows: auto minmax(0, 1fr);
  background: #000;
  color: var(--text);
  font-family: Manrope, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.4;
}

.site-head {
  grid-column: 1 / -1;
  background: #0c0612;
  border-bottom: 1px solid rgba(255, 214, 140, 0.16);
}

.showcase {
  grid-column: 3;
  grid-row: 2;
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: calc(100vh - var(--header-h));
  min-height: 0;
  padding: 14px 12px;
  overflow: hidden;
  border-left: 1px solid rgba(255, 214, 140, 0.16);
  background: #07040d;
}

.site-head { background: #141a2e; }

.nav-live {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 108px;
  margin-right: 8px;
  color: #3dde7a;
}

.nav-signal {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
}

.nav-signal svg { width: 26px; height: 26px; }

.nav-live-text { display: grid; line-height: 1.05; }

.nav-live-text b {
  font-family: Unbounded, "Segoe UI", sans-serif;
  font-size: 18px;
  font-weight: 800;
}

.nav-live-text span {
  color: #3dde7a;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.showcase-drop {
  position: relative;
  display: grid;
  flex: 0 0 auto;
  grid-template-columns: 118px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 120px;
  padding: 12px 14px;
  overflow: visible;
  border-radius: 16px;
  border: 1px solid rgba(255, 214, 140, 0.28);
  background:
    linear-gradient(180deg, rgba(255, 196, 74, 0.14), transparent 62%),
    #161022;
}

.drop-user {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.drop-avatar {
  display: block;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  overflow: hidden;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(255, 214, 140, 0.45);
}

.drop-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.drop-plus {
  position: absolute;
  left: 50%;
  top: 0;
  z-index: 2;
  padding: 4px 10px;
  border: 1px solid rgba(255, 196, 74, 0.75);
  border-radius: 999px;
  background: linear-gradient(180deg, #ffe7a2 0%, #ffc44a 48%, #f08a12 100%);
  color: #1a1008;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: 0.01em;
  white-space: nowrap;
  box-shadow: 0 0 0 3px #07040d, 0 8px 16px rgba(0, 0, 0, 0.35);
  transform: translate(-50%, -50%);
  animation: plus-in 0.55s cubic-bezier(0.16, 0.9, 0.28, 1.35);
}

@keyframes plus-in {
  0% { transform: translate(-50%, -50%) scale(0.3); opacity: 0; }
  70% { transform: translate(-50%, -50%) scale(1.12); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

.drop-name,
.drop-action,
.drop-copy > span {
  overflow: hidden;
  max-width: 100%;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drop-name {
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

.drop-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.drop-skin {
  display: grid;
  place-items: center;
  min-width: 0;
  height: 96px;
  overflow: hidden;
  border-radius: 12px;
  background: radial-gradient(circle at 50% 58%, color-mix(in srgb, var(--rarity, #8b7cff) 42%, transparent), transparent 72%);
}

.drop-skin img {
  display: block;
  width: 108%;
  height: 96px;
  object-fit: contain;
  filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.35));
}

.drop-copy > span {
  display: block;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
}

.drop-action {
  display: block;
  color: #3ee57a;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: 0;
  text-shadow: 0 0 8px rgba(62, 229, 122, 0.45);
}

.showcase-viewport {
  flex: 1;
  min-height: 0;
  padding-top: 20px;
  overflow: hidden;
  mask-image: linear-gradient(#000 calc(100% - 28px), transparent);
}

.showcase-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.showcase-card {
  position: relative;
  width: 132px;
  flex: 0 0 132px;
  padding: 16px 6px 5px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--rarity, #b0c3d9) 72%, transparent);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--rarity, #b0c3d9) 30%, transparent), transparent 58%),
    #12101c;
  text-align: center;
}

.showcase-card em {
  position: absolute;
  top: 4px;
  left: 7px;
  color: var(--rarity, #b0c3d9);
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.showcase-card img {
  display: block;
  width: 100%;
  height: 48px;
  object-fit: contain;
}

.showcase-card span,
.showcase-card b {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.showcase-card span {
  margin-top: 3px;
  color: #ddd0ea;
  font-size: 11px;
  font-weight: 700;
}

.showcase-card b {
  color: #ffd978;
  font-size: 11px;
  font-weight: 800;
}

@keyframes livepulse {
  50% { opacity: 0.35; }
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 64px;
  padding: 0 16px;
  background: #141a2e;
}

.site-logo {
  margin-right: 8px;
  color: #fff;
  font-family: Unbounded, "Segoe UI", sans-serif;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.03em;
  text-decoration: none;
  white-space: nowrap;
}

.site-logo:hover,
.site-logo.is-on { color: var(--gold); }

.site-main { display: contents; }

.site-tabs { display: flex; gap: 4px; }

.site-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #9eafd4;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.site-tab svg { width: 18px; height: 18px; flex: 0 0 18px; }

.site-tab.is-on {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.account-chip { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.account-box { display: flex; align-items: center; gap: 10px; min-width: 0; }
.account-avatar {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 2px rgba(255, 214, 140, 0.55);
}
#accountName {
  max-width: 168px;
  overflow: hidden;
  color: #fff;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.account-box b { color: var(--gold); }
.ghost.icon-exit {
  display: grid;
  place-items: center;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  padding: 0;
  line-height: 0;
  color: #d7c6ea;
}
.ghost.icon-exit svg {
  display: block;
  width: 22px;
  height: 22px;
}
.ghost.icon-exit:hover { color: #ff8fa3; }

.steam-login {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 0;
  border-radius: 999px;
  background: #ff4b4b;
  color: #fff;
  font-weight: 800;
  white-space: nowrap;
}

.steam-login svg { width: 20px; height: 20px; flex: 0 0 20px; }
.login-short { display: none; }

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.72);
}

.auth-card {
  position: relative;
  width: min(440px, 100%);
  padding: 28px 22px 22px;
  border: 1px solid rgba(170, 120, 255, 0.35);
  border-radius: 24px;
  background: #24143a;
}

.auth-card h2 { margin: 0 0 8px; font-size: 28px; }

.match-cancel {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.72);
}

.match-cancel-card {
  width: min(460px, 100%);
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 28px 24px 22px;
  text-align: center;
  border: 1px solid rgba(255, 196, 74, 0.45);
  border-radius: 24px;
  background: #24143a;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.match-cancel-card h2,
.match-cancel-card p { margin: 0; }

#modeAbout .match-cancel-card p { line-height: 1.5; }

.mode-hide {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 2px 0 4px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.mode-hide input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--gold);
}

.match-cancel-card .spin-btn { min-width: min(240px, 100%); }
.auth-x {
  position: absolute;
  top: 12px;
  right: 12px;
  border: 0;
  background: transparent;
  font-size: 24px;
}

.check-row { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0; }
.auth-steam, .auth-alt {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin-top: 8px;
  padding: 12px 14px;
  border: 0;
  border-radius: 999px;
  background: #f4f1ea;
  color: #1b1b1b;
  font-weight: 800;
  cursor: pointer;
}
.auth-steam:disabled, .auth-alt:disabled { opacity: 0.45; cursor: default; }
.auth-ico { width: 22px; height: 22px; flex: 0 0 22px; }

.skin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 8px; margin: 10px 0; }
.skin-card {
  padding: 10px;
  border: 1px solid rgba(255, 214, 140, 0.2);
  border-radius: 12px;
  background: #140a1c;
  text-align: left;
}
.skin-card.is-on { border-color: var(--gold); }
.skin-card b { display: block; }
.skin-card span { color: var(--gold); font-size: 13px; }

.screen {
  display: none;
  grid-column: 1 / 3;
  grid-row: 2;
  min-height: 0;
  height: calc(100vh - var(--header-h));
}

body[data-screen="home"] .screen-hub {
  display: flex;
  align-items: center;
  justify-content: center;
}

body[data-screen="deck"] .screen-home,
body[data-screen="pvp"] .screen-pvp {
  display: grid;
  grid-template-columns: minmax(340px, 430px) minmax(0, 1fr);
}

body[data-screen="home"] .panel,
body[data-screen="home"] .stage,
body[data-screen="deck"] .panel,
body[data-screen="deck"] .stage,
body[data-screen="pvp"] .panel,
body[data-screen="pvp"] .stage,
body[data-screen="players"] .panel,
body[data-screen="players"] .stage,
body[data-screen="profit"] .panel,
body[data-screen="profit"] .stage { display: none; }

.site-tab[hidden] { display: none; }

body[data-screen="players"] .screen-players,
body[data-screen="profit"] .screen-profit {
  display: block;
  overflow: auto;
  padding: 28px 22px 48px;
}

.admin-page { width: min(1100px, 100%); margin: 0 auto; }
.admin-lead { max-width: 760px; color: #9eafd4; line-height: 1.5; }
.admin-total {
  margin: 8px 0 0;
  font-family: Unbounded, "Segoe UI", sans-serif;
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 800;
}
.admin-scroll { overflow-x: auto; margin-top: 18px; }
.admin-table { width: 100%; border-collapse: collapse; min-width: 760px; }
.admin-table th,
.admin-table td {
  padding: 12px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
  font-size: 14px;
  white-space: nowrap;
}
.admin-table th { color: #9eafd4; font-size: 12px; font-weight: 800; }
.admin-table tbody tr { cursor: pointer; }
.admin-table tbody tr.is-pick td { background: rgba(255, 196, 74, 0.08); }
.money-plus { color: #8dffb0; }
.money-minus { color: #ff8fa3; }
.admin-detail {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.2);
}
.mode-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.mode-chip {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-weight: 700;
}
.admin-plays { width: 100%; border-collapse: collapse; min-width: 0; }
.admin-plays td { white-space: normal; }
.profit-list { display: grid; gap: 12px; margin-top: 18px; }
.profit-card {
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.2);
}
.profit-card b { display: block; margin-bottom: 6px; font-size: 18px; }
.profit-card p { margin: 0; color: #9eafd4; }
.profit-bar {
  height: 8px;
  margin-top: 12px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
}
.profit-bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #ffc44a, #ff8a3d);
}

.hub-menu { width: min(980px, 100%); }

.mode-pick {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 18px;
  width: 100%;
}

.mode-card {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 8px;
  min-height: 320px;
  padding: 22px 16px 20px;
  border: 1px solid rgba(255, 214, 140, 0.28);
  border-radius: 22px;
  font: inherit;
  text-decoration: none;
  cursor: pointer;
  background:
    radial-gradient(240px 140px at 50% 28%, rgba(255, 180, 60, 0.12), transparent 70%),
    #120818;
  color: var(--text);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.mode-card:hover {
  transform: translateY(-6px);
  border-color: var(--gold);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35);
}

.mode-card b {
  font-family: Unbounded, Manrope, sans-serif;
  font-size: 28px;
}

.mode-card > span:last-child {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.hub-art {
  position: relative;
  width: min(230px, 88%);
  aspect-ratio: 4 / 5.15;
  margin: 8px auto 6px;
}

.hub-art.is-duel {
  filter: drop-shadow(0 18px 12px rgba(0, 0, 0, 0.5)) drop-shadow(0 0 16px rgba(255, 93, 120, 0.35));
}

.hub-swords { display: block; width: 100%; height: 100%; overflow: visible; }

.hub-swords .sword-a,
.hub-swords .sword-b {
  transform-box: view-box;
  transform-origin: 100px 150px;
}

.hub-swords .sword-a { animation: sword-a 5.4s ease-in-out infinite; }
.hub-swords .sword-b { animation: sword-b 5.4s ease-in-out infinite; }

@keyframes sword-a {
  0%, 100% { transform: rotate(38deg); }
  50% { transform: rotate(50deg); }
}

@keyframes sword-b {
  0%, 100% { transform: rotate(-38deg); }
  50% { transform: rotate(-50deg); }
}

.hub-art.is-prize {
  display: grid;
  place-items: center;
  filter: drop-shadow(0 18px 12px rgba(0, 0, 0, 0.5)) drop-shadow(0 0 18px rgba(255, 196, 80, 0.34));
}

.hub-gift {
  display: block;
  width: 78%;
  height: auto;
  overflow: visible;
  animation: hub-gift 5.4s ease-in-out infinite;
}

@keyframes hub-gift {
  0%, 100% { transform: translateY(6%); }
  50% { transform: translateY(-8%); }
}

.screen-pvp .hub-stage { position: relative; justify-content: flex-start; padding-top: 28px; }

.pvp-modes { grid-template-columns: repeat(2, minmax(220px, 1fr)); }
#pvpPick .now { margin-bottom: 36px; }
#pvpPick .now-name { line-height: 1.2; }
.pvp-modes .mode-card { min-height: 236px; }
.pvp-modes .mode-card b { font-size: 22px; }
.pvp-modes .mode-mark { width: 108px; height: 108px; }

.mode-mark.is-rope,
.mode-mark.is-sun,
.mode-mark.is-balls,
.mode-mark.is-station {
  display: grid;
  align-content: center;
  justify-items: center;
}

.mode-mark.is-rope img {
  width: 78px;
  height: 64px;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.45));
}

.mode-mark.is-rope .mode-hp {
  width: 72px;
  height: 8px;
  margin-top: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, #8dff63 0 58%, #1b241c 58% 100%);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.45), 0 0 8px rgba(120, 255, 80, 0.35);
}

.mode-mark.is-sun,
.mode-mark.is-balls {
  width: 108px;
  height: 108px;
  margin: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
}

.mode-mark.is-sun svg,
.mode-mark.is-balls svg { width: 96px; height: 96px; }

.mode-mark.is-station {
  grid-auto-flow: column;
  align-items: center;
  gap: 4px;
  width: 108px;
  background: none;
}

.mode-mark.is-station img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.45));
}

.lobby-box {
  display: grid;
  justify-items: center;
  gap: 8px;
  width: min(520px, 100%);
}

.lobby-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.lobby-row form { display: flex; gap: 8px; }

.lobby-row input {
  width: 92px;
  border: 1px solid rgba(255, 214, 140, 0.35);
  border-radius: 12px;
  background: #140e1c;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 800;
}

#lobbyStatus {
  margin: 0;
  min-height: 1.2em;
  color: var(--gold);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

#lobbyReady { width: min(280px, 100%); }

.pvp-panel {
  display: grid;
  justify-items: center;
  gap: 14px;
  width: min(920px, 100%);
}

.duel-search {
  display: grid;
  justify-items: center;
  gap: 8px;
  min-height: 220px;
  padding-top: 12px;
}

.duel-search b {
  font-family: Unbounded, Manrope, sans-serif;
  font-size: 72px;
  line-height: 0.9;
  text-shadow: 0 0 24px rgba(255, 196, 74, 0.75);
}

.duel-search span {
  color: var(--gold);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.search-cancel {
  margin-top: 16px;
  min-width: 240px;
  padding: 14px 32px;
  border: 1px solid rgba(255, 196, 196, 0.55);
  border-radius: 18px;
  color: #fff;
  font-family: Unbounded, Manrope, sans-serif;
  font-size: 18px;
  font-weight: 800;
  background:
    radial-gradient(120% 80% at 50% -30%, rgba(255, 186, 186, 0.55), transparent 60%),
    linear-gradient(180deg, #ff4d5c 0%, #c41224 58%, #8d0d1a 100%);
  box-shadow:
    0 0 0 1px rgba(255, 70, 80, 0.28),
    0 14px 32px rgba(180, 16, 32, 0.42),
    inset 0 1px 0 rgba(255, 236, 236, 0.55);
}

.search-radar {
  position: relative;
  width: 148px;
  height: 148px;
  border-radius: 50%;
  border: 2px solid rgba(255, 196, 74, 0.45);
  background:
    repeating-radial-gradient(circle, transparent 0 18px, rgba(255, 196, 74, 0.16) 18px 19px);
  overflow: hidden;
}

.search-radar::before {
  content: "";
  position: absolute;
  inset: -20%;
  background: conic-gradient(from 0deg, transparent 0 72%, rgba(255, 210, 90, 0.85));
  animation: sun-spin 1.1s linear infinite;
}

.ready-box {
  display: grid;
  justify-items: center;
  gap: 10px;
  width: min(520px, 100%);
}

.ready-box > b {
  font-family: Unbounded, Manrope, sans-serif;
  font-size: 64px;
  line-height: 0.9;
  text-shadow: 0 0 24px rgba(255, 196, 74, 0.75);
}

.ready-box > span {
  color: var(--gold);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.ready-list {
  list-style: none;
  display: grid;
  gap: 8px;
  width: 100%;
  margin: 0;
  padding: 0;
}

.ready-list li {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 8px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.ready-list small {
  color: #ffd56a;
  font-size: 13px;
  font-weight: 800;
}

.ready-list li.is-in {
  border-color: rgba(120, 220, 140, 0.7);
}

.ready-list .profile-logo {
  width: 42px;
  height: 42px;
  font-size: 16px;
}

.ready-list b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ready-list em {
  color: rgba(255, 255, 255, 0.55);
  font-style: normal;
  font-size: 13px;
  font-weight: 700;
}

.ready-list li.is-in em { color: #8dffb0; }

.ready-box .spin-btn { min-width: min(280px, 100%); }

.duel-board {
  display: grid;
  grid-template-columns: minmax(0, 220px) minmax(0, 1fr) minmax(0, 220px);
  gap: 16px;
  align-items: center;
  width: 100%;
}

.duel-board.is-live .duel-side {
  animation: side-glow 1.1s ease-in-out infinite;
}

.duel-mid {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 220px;
  width: 100%;
}

.creep-stage {
  display: grid;
  justify-items: center;
  gap: 8px;
  width: min(460px, 100%);
}

.creep-count {
  margin: 0;
  color: #ffe08a;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.creep-frame {
  position: relative;
  width: 180px;
  height: 200px;
  overflow: visible;
  display: grid;
  align-items: end;
  justify-items: center;
}

.creep-art {
  width: 170px;
  height: 196px;
  overflow: visible;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 14px 10px rgba(0, 0, 0, 0.45));
  transform-origin: 50% 88%;
}

.creep-idle { animation: creep-bob 1.1s ease-in-out infinite; }

.creep-hurt,
.creep-taunt {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
}

.creep-belly,
.creep-head,
.creep-club {
  transform-box: fill-box;
  transform-origin: center;
}

.creep-punch {
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
}

.creep-hp {
  position: relative;
  width: min(420px, 100%);
  height: 28px;
  margin-top: 16px;
}

.creep-track {
  height: 18px;
  margin-top: 5px;
  border-radius: 999px;
  overflow: hidden;
  background: #140c16;
  box-shadow: inset 0 0 0 2px rgba(255, 214, 140, 0.4);
}

.creep-track i {
  display: block;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #8dff6a, #d6ff6a);
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.18);
}

.creep-mark {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 3px;
  margin-left: -1px;
  background: #fff;
  box-shadow: 0 0 10px #fff;
}

.creep-mark::after {
  content: "денай";
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  color: #ffe08a;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.creep-note {
  margin: 0;
  min-height: 22px;
  color: #fff;
  font-weight: 800;
}

.creep-stage.is-open .creep-art { filter: drop-shadow(0 0 16px rgba(255, 90, 60, 0.85)); }
.creep-stage.is-open .creep-track i { background: linear-gradient(90deg, #ff5a3c, #ffd56a); }
.creep-stage.is-open .creep-note { color: #ffd0c2; }
.creep-stage.is-hit .creep-idle,
.creep-stage.is-late .creep-idle { animation: creep-hide 0.16s ease forwards; }
.creep-stage.is-hit .creep-hurt,
.creep-stage.is-late .creep-hurt { animation: creep-show 0.2s ease 0.08s forwards; }
.creep-stage.is-taunt .creep-idle,
.creep-stage.is-taunt .creep-hurt { animation: creep-hide 0.12s ease forwards; }
.creep-stage.is-taunt .creep-taunt { animation: creep-show 0.2s ease 0.06s forwards; }
.creep-stage.is-rise .creep-idle { animation: creep-show 0.46s ease forwards; }
.creep-stage.is-rise .creep-hurt,
.creep-stage.is-rise .creep-taunt { animation: creep-hide 0.34s ease forwards; }

@keyframes creep-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes creep-hide {
  from { opacity: 1; }
  to { opacity: 0; }
}
@keyframes creep-show {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes creep-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

body.is-duel-focus.is-creep-board {
  background: #05070c;
}

body.is-duel-focus.is-creep-board #screenPvp {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: #05070c;
}

body.is-duel-focus.is-creep-board #screenPvp .hub-stage {
  background: transparent;
  justify-content: flex-start;
  padding: 16px 12px 12px;
  overflow: hidden;
}

body.is-creep-board #pvpDuel:not(.is-result) {
  width: min(1180px, 96vw);
  height: 100%;
  align-content: stretch;
  align-items: center;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 6px;
}

body.is-duel-focus.is-creep-board #screenPvp .hub-stage:has(#duelSearch:not([hidden])),
body.is-duel-focus.is-creep-board #screenPvp .hub-stage:has(#duelReady:not([hidden])) {
  justify-content: center;
}

body.is-creep-board #pvpDuel:has(#duelSearch:not([hidden])),
body.is-creep-board #pvpDuel:has(#duelReady:not([hidden])) {
  height: auto;
  grid-template-rows: none;
  align-content: center;
  gap: 8px;
}

body.is-creep-board #pvpDuel.is-result {
  width: min(760px, 96vw);
  height: 100%;
  align-content: center;
}

body.is-creep-board .duel-search,
body.is-creep-board .ready-box {
  align-self: center;
  padding: 18px 28px 22px;
  border-radius: 24px;
  background: rgba(6, 8, 12, 0.5);
}

body.is-creep-board #pvpDuel .now-kicker {
  color: #e7c56a;
  letter-spacing: 0.42em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.85);
}

body.is-creep-board #pvpDuel .now-name {
  overflow: visible;
  font-size: clamp(34px, 4.6vw, 58px);
  color: #fff8ea;
  text-shadow: 0 2px 0 #6a4a16, 0 10px 28px rgba(0, 0, 0, 0.7);
}

body.is-creep-board #duelLead {
  max-width: 560px;
  margin: 0;
  color: #f7f1e6;
  font-size: 16px;
  text-align: center;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

body.is-creep-board .duel-board.is-live {
  grid-template-columns: minmax(0, 230px) minmax(0, 1fr) minmax(0, 230px);
  grid-template-areas:
    "count count count"
    "you art foe"
    ". bar ."
    "note note note";
  align-items: center;
  justify-items: center;
  column-gap: 22px;
  row-gap: 8px;
  width: min(1080px, 100%);
  height: auto;
  align-self: center;
  align-content: center;
}

body.is-creep-board .duel-board.is-live .duel-mid,
body.is-creep-board .duel-board.is-live .creep-stage {
  display: contents;
}

body.is-creep-board .duel-board.is-live #duelYou { grid-area: you; }
body.is-creep-board .duel-board.is-live #duelFoe { grid-area: foe; }
body.is-creep-board .duel-board.is-live .creep-count { grid-area: count; }
body.is-creep-board .duel-board.is-live .creep-frame { grid-area: art; }
body.is-creep-board .duel-board.is-live .creep-hp { grid-area: bar; justify-self: center; }
body.is-creep-board .duel-board.is-live .creep-note { grid-area: note; }

body.is-creep-board .duel-board.is-live .duel-side {
  animation: none;
  position: relative;
  width: 100%;
  max-width: 220px;
  min-width: 0;
  min-height: 236px;
  padding: 26px 14px 18px;
  border: 3px solid #e2b15a;
  border-radius: 18px;
  background:
    linear-gradient(#ffe7b0, #ffe7b0) left 10px top 10px / 18px 2px no-repeat,
    linear-gradient(#ffe7b0, #ffe7b0) left 10px top 10px / 2px 18px no-repeat,
    linear-gradient(#ffe7b0, #ffe7b0) right 10px top 10px / 18px 2px no-repeat,
    linear-gradient(#ffe7b0, #ffe7b0) right 10px top 10px / 2px 18px no-repeat,
    linear-gradient(#ffe7b0, #ffe7b0) left 10px bottom 10px / 18px 2px no-repeat,
    linear-gradient(#ffe7b0, #ffe7b0) left 10px bottom 10px / 2px 18px no-repeat,
    linear-gradient(#ffe7b0, #ffe7b0) right 10px bottom 10px / 18px 2px no-repeat,
    linear-gradient(#ffe7b0, #ffe7b0) right 10px bottom 10px / 2px 18px no-repeat,
    linear-gradient(180deg, rgba(28, 22, 16, 0.72), rgba(8, 8, 12, 0.86));
}

body.is-creep-board .duel-board.is-live #duelYou {
  border-color: #f0a24a;
  box-shadow:
    0 0 0 6px rgba(48, 28, 10, 0.45),
    0 0 36px rgba(255, 120, 30, 0.72),
    inset 0 0 42px rgba(255, 110, 20, 0.22);
}

body.is-creep-board .duel-board.is-live #duelFoe {
  border-color: #8ec0ff;
  box-shadow:
    0 0 0 6px rgba(10, 24, 48, 0.5),
    0 0 36px rgba(70, 150, 255, 0.7),
    inset 0 0 42px rgba(40, 130, 255, 0.22);
}

body.is-creep-board .duel-side b:not(.score-plus) {
  display: -webkit-box;
  width: 100%;
  max-width: 100%;
  min-height: 2.4em;
  margin-top: 8px;
  overflow: hidden;
  font-size: 18px;
  line-height: 1.2;
  overflow-wrap: anywhere;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.65);
}

body.is-creep-board .duel-side .arcade-score {
  display: inline-block;
  font-size: 44px;
  color: #f0c14a;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.45);
}

body.is-creep-board .duel-board.is-live .duel-side.is-score {
  animation: score-card 0.62s ease;
}

body.is-creep-board .duel-side .arcade-score.is-up {
  animation: score-burst 0.62s ease;
}

body.is-creep-board .duel-side .score-plus {
  position: absolute;
  left: 50%;
  top: 38%;
  z-index: 3;
  margin: 0;
  color: #fff6c2;
  font-family: Unbounded, Manrope, sans-serif;
  font-size: 28px;
  line-height: 1;
  pointer-events: none;
  text-shadow: 0 0 16px rgba(255, 210, 80, 0.95);
  animation: score-float 0.72s ease forwards;
}

@keyframes score-burst {
  0% { transform: scale(1); color: #fff; }
  28% { transform: scale(1.7); color: #fff6c2; text-shadow: 0 0 22px #ffd56a; }
  100% { transform: scale(1); color: #f0c14a; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.45); }
}

@keyframes score-card {
  0% { transform: scale(1); filter: brightness(1); }
  30% { transform: scale(1.07); filter: brightness(1.45); }
  100% { transform: scale(1); filter: brightness(1); }
}

@keyframes score-float {
  0% { opacity: 0; transform: translate(-50%, 10px) scale(0.7); }
  18% { opacity: 1; transform: translate(-50%, -4px) scale(1.15); }
  100% { opacity: 0; transform: translate(-50%, -42px) scale(1); }
}

body.is-creep-board .creep-count {
  color: #f0d48a;
  font-size: 15px;
  letter-spacing: 0.22em;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

body.is-creep-board .creep-frame {
  width: min(390px, 38vw);
  height: min(330px, 36vh);
  overflow: visible;
}

body.is-creep-board .creep-art {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 18px 12px rgba(0, 0, 0, 0.5));
}

body.is-creep-board .creep-hp {
  width: min(520px, 46vw);
  height: 34px;
  margin-top: 4px;
}

body.is-creep-board .creep-track {
  height: 20px;
  border-radius: 7px;
  background: #140e0a;
  box-shadow:
    inset 0 2px 5px rgba(0, 0, 0, 0.65),
    0 0 0 2px #c9922e,
    0 0 18px rgba(255, 176, 60, 0.35);
}

body.is-creep-board .creep-mark::after {
  top: -18px;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8);
}

body.is-creep-board .creep-note {
  color: #fff8ee;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

body.is-creep-board .duel-pull {
  align-self: end;
  min-width: min(460px, 72vw);
  margin-top: 8px;
  padding: 14px 40px 12px;
  border-radius: 4px;
  color: #2a1604;
  background: linear-gradient(180deg, #ffe9b0 0%, #f2c14a 40%, #e09a22 78%, #c47a12 100%);
  clip-path: polygon(22px 0, calc(100% - 22px) 0, 100% 14px, 100% calc(100% - 14px), calc(100% - 22px) 100%, 22px 100%, 0 calc(100% - 14px), 0 14px);
  filter: drop-shadow(0 6px 0 #6a3e0c) drop-shadow(0 0 16px rgba(255, 160, 40, 0.55));
  animation: creep-pull 1.5s ease-in-out infinite;
}

body.is-creep-board .duel-pull b {
  font-size: 34px;
  letter-spacing: 0.18em;
}

body.is-creep-board .duel-pull span {
  font-size: 13px;
  letter-spacing: 0.04em;
}

@keyframes creep-pull {
  50% { transform: translateY(-2px) scale(1.03); }
}

.vs-mark {
  font-family: Unbounded, Manrope, sans-serif;
  font-size: 64px;
  letter-spacing: 0.08em;
  text-shadow: 0 0 24px rgba(255, 80, 120, 0.8);
}

.duel-count {
  position: absolute;
  z-index: 2;
  font-family: Unbounded, Manrope, sans-serif;
  font-size: 108px;
  line-height: 1;
  text-shadow: 0 0 28px rgba(255, 196, 74, 0.85);
}

.duel-board.is-surge .duel-mid { padding-top: 42px; }

.duel-board.is-surge .duel-count {
  top: 0;
  font-size: 52px;
  color: #fff;
  text-shadow: 0 0 24px rgba(255, 90, 70, 0.9);
}

.duel-board.is-surge .tug-ring {
  box-shadow: 0 0 28px rgba(255, 80, 70, 0.95), 0 8px 0 rgba(0, 0, 0, 0.25);
}

.duel-pull {
  display: grid;
  justify-items: center;
  gap: 2px;
  min-width: min(420px, 100%);
  padding: 16px 28px 14px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffe08a, #ff9a1f);
  color: #1a1008;
  box-shadow: 0 0 0 0 rgba(255, 180, 40, 0.7);
  animation: pull-pulse 0.9s ease-in-out infinite;
}

.duel-pull b {
  font-family: Unbounded, Manrope, sans-serif;
  font-size: 32px;
  letter-spacing: 0.16em;
}

.duel-pull span { font-size: 14px; font-weight: 800; }

.duel-pull.is-hit {
  transform: scale(0.96);
  filter: brightness(1.35);
}

#pvpDuel.is-shake { animation: screen-shake 0.14s linear; }


.duel-side {
  display: grid;
  justify-items: center;
  gap: 4px;
  width: 100%;
  min-width: 0;
  max-width: 220px;
  min-height: 180px;
  padding: 12px;
  border: 1px solid rgba(255, 214, 140, 0.28);
  border-radius: 16px;
  background: #120818;
  text-align: center;
}

.duel-side .stake-pics {
  display: flex;
  gap: 4px;
  width: 100%;
  height: 72px;
}

.duel-side .stake-pics img {
  width: auto;
  height: 72px;
  flex: 1;
  object-fit: contain;
}
.duel-side b {
  max-width: 100%;
  overflow-wrap: anywhere;
  font-family: Unbounded, Manrope, sans-serif;
  font-size: 18px;
  line-height: 1.15;
}
.duel-side small { color: #ffd56a; font-weight: 800; font-size: 15px; }
.duel-side.is-win { box-shadow: 0 0 28px rgba(255, 196, 74, 0.7); }
.duel-side.is-lose { opacity: 0.38; filter: grayscale(0.6); }

.tug {
  position: relative;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) 22px;
  align-items: center;
  gap: 8px;
  width: 100%;
  height: 96px;
  --t: 50%;
}

.tug::before {
  content: "";
  position: absolute;
  left: 28px;
  right: 28px;
  top: 50%;
  height: 10px;
  border-radius: 999px;
  transform: translateY(34px);
  background: linear-gradient(90deg, rgba(255, 70, 90, 0.9), transparent 16%, transparent 84%, rgba(140, 90, 255, 0.9));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.tug-post {
  position: relative;
  height: 86px;
  border-radius: 7px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.28), transparent 28% 72%, rgba(0, 0, 0, 0.28)),
    linear-gradient(180deg, #ffe7a4, #d0861a 55%, #6a3d08);
  box-shadow: inset 0 0 0 2px rgba(90, 48, 8, 0.55), 0 12px 16px rgba(0, 0, 0, 0.45);
}

.tug-post.is-foe {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.28), transparent 28% 72%, rgba(0, 0, 0, 0.28)),
    linear-gradient(180deg, #efe4ff, #7a4de0 55%, #2c1468);
}

.tug-post::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 28px;
  height: 22px;
  border-radius: 8px 8px 10px 10px;
  background: radial-gradient(circle at 30% 30%, #ffe0c2, #c47a4a 70%);
  box-shadow: 0 4px 0 #8a4e28;
}

.tug-post.is-you::after { right: -16px; transform: translateY(-50%) rotate(-8deg); }
.tug-post.is-foe::after { left: -16px; transform: translateY(-50%) rotate(8deg); }

.tug-line {
  position: relative;
  height: 26px;
  border-radius: 999px;
  background:
    repeating-linear-gradient(115deg, transparent 0 7px, rgba(255, 236, 190, 0.28) 7px 9px),
    repeating-linear-gradient(90deg, #f0cb7a 0 7px, #8d5314 7px 12px, #e2b15a 12px 16px, #5c320c 16px 21px);
  box-shadow:
    inset 0 6px 7px rgba(255, 244, 214, 0.45),
    inset 0 -8px 8px rgba(40, 16, 0, 0.6),
    0 14px 0 rgba(0, 0, 0, 0.28);
  transform: rotate(-1.5deg);
}

.tug-ring {
  position: absolute;
  top: 50%;
  left: var(--t);
  z-index: 1;
  width: 64px;
  height: 64px;
  margin-left: -32px;
  border-radius: 50%;
  transform: translateY(-50%) rotate(1.5deg);
  background:
    radial-gradient(circle, #1a1008 0 15px, #fff6d2 16px 19px, #c47a12 20px 28px, #fff1c4 29px 32px, #6a4010 33px 38px, transparent 39px);
  box-shadow: 0 0 22px rgba(255, 200, 80, 0.8), 0 8px 0 rgba(0, 0, 0, 0.25);
  transition: left 0.08s linear;
}

.tug.is-yank .tug-line { filter: brightness(1.35); }
.tug.is-yank .tug-ring { transform: translateY(-50%) rotate(1.5deg) scale(1.14); }

.duel-board.is-danger .tug-line {
  box-shadow:
    inset 0 6px 7px rgba(255, 244, 214, 0.45),
    inset 0 -8px 8px rgba(40, 16, 0, 0.6),
    0 0 26px rgba(255, 70, 80, 0.85);
}

.duel-board.is-snap { animation: snap-flash 0.9s ease; }

.profile-logo,
.win-avatar {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  overflow: hidden;
  border-radius: 50%;
  color: #fff;
  font-family: Unbounded, Manrope, sans-serif;
  font-size: 32px;
  box-shadow: 0 0 0 3px rgba(255, 214, 140, 0.8), 0 10px 20px rgba(0, 0, 0, 0.35);
}

.profile-logo img,
.win-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.win-avatar { width: 120px; height: 120px; font-size: 52px; }

.duel-win {
  display: grid;
  justify-items: center;
  gap: 8px;
  width: min(760px, 100%);
  max-height: calc(100vh - 36px);
  overflow: auto;
  animation: victory-in 0.7s ease;
}

.duel-win h2 {
  margin: 0;
  font-size: clamp(32px, 4vw, 52px);
}

.victory {
  position: relative;
  display: grid;
  justify-items: center;
  width: min(280px, 100%);
  padding-top: 6px;
}

.victory::before {
  content: "";
  position: absolute;
  top: 18px;
  width: 210px;
  height: 210px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 196, 74, 0.32), transparent 68%);
  pointer-events: none;
}

.victory-cup {
  position: relative;
  z-index: 2;
  width: 84px;
  height: 96px;
  margin-bottom: -4px;
  filter: drop-shadow(0 10px 12px rgba(255, 170, 40, 0.38));
}

.podium {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  margin-bottom: 18px;
}

.victory .win-avatar {
  z-index: 2;
  width: 104px;
  height: 104px;
  margin: 0 0 -30px;
  font-size: 42px;
  box-shadow:
    0 0 0 4px #140c08,
    0 0 0 7px #f0c14a,
    0 12px 20px rgba(0, 0, 0, 0.42);
}

.podium-step {
  position: relative;
  display: grid;
  align-items: end;
  justify-items: center;
  width: 168px;
  height: 92px;
  padding-bottom: 18px;
  border-radius: 8px 8px 12px 12px;
  background: linear-gradient(180deg, #f6d48a 0%, #e2a63a 46%, #a86a14 100%);
  box-shadow: inset 0 -20px 24px rgba(90, 40, 0, 0.22);
  color: #3a2208;
  font-family: Unbounded, Manrope, sans-serif;
  font-size: 28px;
  font-weight: 800;
}

.podium-step::before {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  top: -14px;
  height: 24px;
  border-radius: 10px;
  background: linear-gradient(180deg, #fff8e6 0%, #e8bc58 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.podium-step::after {
  content: "";
  position: absolute;
  left: -22px;
  right: -22px;
  bottom: -14px;
  height: 18px;
  border-radius: 7px;
  background: linear-gradient(180deg, #e2b15a 0%, #7a4e12 100%);
  box-shadow: 0 14px 18px rgba(0, 0, 0, 0.4);
}

.podium-step span {
  position: relative;
  z-index: 1;
  line-height: 1;
}

.duel-win .win-loot-label {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.win-loot {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  width: 100%;
}

.loot-card {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 2px;
  width: 124px;
  padding: 8px 8px 10px;
  border-radius: 14px;
  background: #140a1c;
  box-shadow: inset 0 0 0 1px rgba(255, 214, 140, 0.22);
  text-align: center;
}

.loot-card img,
.loot-empty {
  width: 100%;
  height: 68px;
  object-fit: contain;
}

.loot-empty { border-radius: 8px; background: #24142e; }

.loot-card b {
  font-size: 12px;
  line-height: 1.2;
  font-weight: 800;
}

.loot-card small { color: #ffd56a; font-weight: 800; }

.duel-win.is-draw .victory,
.duel-win.is-draw .win-loot-label,
.duel-win.is-draw .win-loot { display: none; }

.duel-win p { margin: 0; color: var(--gold); font-weight: 800; }

#pvpDuel.is-result .now,
#pvpDuel.is-result #duelLead,
#pvpDuel.is-result #duelBoard,
#pvpDuel.is-result #duelPull { display: none; }

body.is-duel-focus {
  grid-template-columns: minmax(0, 1fr);
  background:
    radial-gradient(900px 420px at 50% 42%, rgba(120, 30, 180, 0.28), transparent 70%),
    #000;
}

body.is-duel-focus .site-head,
body.is-duel-focus .showcase,
body.is-duel-focus .panel,
body.is-duel-focus #screenPvp .hub-panel { display: none; }

body.is-duel-focus #screenPvp {
  grid-column: 1;
  grid-row: 1 / -1;
  grid-template-columns: minmax(0, 1fr);
  height: 100vh;
}

body.is-duel-focus #screenPvp .hub-stage {
  grid-column: 1 / -1;
  width: 100%;
  height: 100vh;
  align-items: center;
  justify-content: center;
}

body.is-duel-focus.is-sun-board #screenPvp {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100vw;
  height: 100vh;
  grid-template-columns: none;
  background: #000;
}

body.is-duel-focus.is-sun-board #screenPvp .hub-stage {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  padding: 10px 16px 12px;
  overflow: hidden;
  background: transparent;
}

@keyframes snap-flash {
  0% { filter: brightness(1); }
  18% { filter: brightness(1.7); }
  100% { filter: brightness(1); }
}

@keyframes count-pop {
  0% { transform: scale(1.7); opacity: 0; }
  35% { transform: scale(1); opacity: 1; }
  100% { transform: scale(0.94); opacity: 1; }
}

@keyframes pull-pulse {
  50% { transform: scale(1.04); box-shadow: 0 0 0 14px rgba(255, 180, 40, 0); }
}

@keyframes screen-shake {
  25% { transform: translateX(-7px); }
  50% { transform: translateX(6px); }
  75% { transform: translateX(-4px); }
}

@keyframes ball-drift {
  50% { translate: 0 -12px; }
}

@keyframes ball-pop {
  to { transform: translate(-50%, -50%) scale(1.55); opacity: 0; }
}

@keyframes side-glow {
  50% { box-shadow: 0 0 22px rgba(255, 196, 74, 0.35); }
}

.arcade-clock {
  font-family: Unbounded, Manrope, sans-serif;
  font-size: 72px;
  line-height: 1;
  text-shadow: 0 0 24px rgba(255, 196, 74, 0.8);
}

.arcade-clock.is-up { animation: count-pop 0.45s ease; }

.arcade-score {
  font-family: Unbounded, Manrope, sans-serif;
  font-size: 34px;
  line-height: 1;
  color: #ffe08a;
}

.arcade-score.is-up { animation: count-pop 0.28s ease; }

.ball-field {
  position: relative;
  width: 100%;
  height: 380px;
  overflow: hidden;
  border-radius: 24px;
  cursor: crosshair;
  background:
    radial-gradient(420px 180px at 50% 40%, rgba(120, 40, 200, 0.28), transparent 70%),
    linear-gradient(180deg, #140820, #07040d);
  box-shadow: inset 0 0 0 1px rgba(255, 214, 140, 0.2);
  user-select: none;
}

.ball {
  position: absolute;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #1a1008;
  font-family: Unbounded, Manrope, sans-serif;
  font-size: 18px;
  cursor: crosshair;
  transform: translate(-50%, -50%);
  animation: ball-drift 1.5s ease-in-out infinite;
  box-shadow: inset -8px -10px 14px rgba(0, 0, 0, 0.35), 0 12px 16px rgba(0, 0, 0, 0.35);
}

.ball.is-gold { box-shadow: inset -8px -10px 14px rgba(90, 40, 0, 0.35), 0 0 20px rgba(255, 200, 80, 0.9); }

.ball.is-pop {
  animation: ball-pop 0.16s ease forwards;
  pointer-events: none;
}

.station-field {
  display: grid;
  justify-items: center;
  gap: 12px;
  width: min(720px, 100%);
  padding: 22px 18px 18px;
  border-radius: 24px;
  background:
    radial-gradient(420px 160px at 50% 0%, rgba(90, 40, 180, 0.28), transparent 70%),
    #100818;
  box-shadow: inset 0 0 0 1px rgba(255, 214, 140, 0.22);
}

.station-field.is-miss { animation: screen-shake 0.16s linear; }

.station-spell {
  margin: 0;
  font-family: Unbounded, Manrope, sans-serif;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.05;
  text-align: left;
}

.spell-head {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  width: min(460px, 100%);
}

.spell-copy { display: grid; justify-items: start; gap: 4px; }

.spell-icon {
  width: 104px;
  height: 104px;
  overflow: hidden;
  border-radius: 22px;
  box-shadow:
    0 0 0 2px rgba(255, 214, 140, 0.55),
    0 12px 22px rgba(0, 0, 0, 0.4);
}

.spell-icon svg,
.spell-icon img { display: block; width: 100%; height: 100%; object-fit: cover; }

.spell-icon.is-in { animation: stake-pop 0.4s ease; }

.station-en { margin: 0; color: var(--muted); font-weight: 800; letter-spacing: 0.08em; }
.station-caption { margin: 0; color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }

.station-orbs { display: flex; gap: 10px; min-height: 42px; }

.orb {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.28), 0 6px 10px rgba(0, 0, 0, 0.3);
}

.orb.is-q { background: radial-gradient(circle at 32% 30%, #fff, #3aa0ff 55%, #0d3f78); }
.orb.is-w { background: radial-gradient(circle at 32% 30%, #fff, #b06bff 55%, #4a188c); }
.orb.is-e { background: radial-gradient(circle at 32% 30%, #fff, #ff8a1e 55%, #8a3a04); }
.orb.is-empty { background: #1a1024; box-shadow: inset 0 0 0 2px rgba(255, 214, 140, 0.2); }

.orb-icon {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 6px 10px rgba(0, 0, 0, 0.35);
}

.station-keys { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

.station-keys button {
  position: relative;
  display: block;
  width: 84px;
  height: 84px;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 10px;
  background: #120818;
  box-shadow: inset 0 0 0 1px rgba(255, 214, 140, 0.35), 0 8px 16px rgba(0, 0, 0, 0.35);
}

.station-keys button img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.station-keys button b {
  position: absolute;
  right: 4px;
  bottom: 4px;
  min-width: 18px;
  padding: 1px 4px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.78);
  color: #fff;
  font-family: Unbounded, Manrope, sans-serif;
  font-size: 12px;
  line-height: 1.2;
  text-align: center;
}

.station-progress { margin: 0; color: #ffe08a; font-weight: 800; }

#pvpArcade.is-result .now,
#pvpArcade.is-result #arcadeLead,
#pvpArcade.is-result #arcadeBoard,
#pvpArcade.is-result #ballField,
#pvpArcade.is-result #stationField { display: none; }

.sun-ring {
  --size: min(300px, 34vh);
  --orbit: calc(var(--size) / 2 + 92px);
  --seat: 116px;
  --slice: 72deg;
  position: relative;
  width: calc(var(--orbit) * 2 + var(--seat));
  max-width: calc(100vw - 24px);
  height: calc(var(--orbit) * 2 + var(--seat));
  margin-inline: auto;
}

#pvpSun.is-spin .sun-ring {
  --size: min(360px, 38vh, 34vw);
  --orbit: calc(var(--size) / 2 + 82px);
  --seat: 128px;
}

#pvpSun.is-spin .sun-swatch { display: none; }

#pvpSun.is-spin .sun-ring::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 0;
  width: calc(var(--size) + 120px);
  height: calc(var(--size) + 120px);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 176, 48, 0.28), rgba(120, 30, 180, 0.08) 46%, transparent 70%);
  pointer-events: none;
}

#pvpSun.is-spin .sun-core {
  width: calc(var(--size) * 0.46);
  height: calc(var(--size) * 0.46);
}

.sun-wheel,
.sun-cuts,
.sun-glow,
.sun-core,
.sun-needle {
  position: absolute;
  left: 50%;
  top: 50%;
}

.sun-wheel,
.sun-cuts,
.sun-glow {
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.sun-wheel {
  z-index: 1;
  box-shadow:
    inset 0 0 0 12px #140a08,
    inset 0 0 0 16px #f6d48a,
    inset 0 0 28px rgba(0, 0, 0, 0.55),
    0 0 0 2px #4a240c,
    0 0 0 7px #e8b84a,
    0 16px 36px rgba(0, 0, 0, 0.55),
    0 0 42px rgba(255, 160, 40, 0.32);
}

.sun-cuts {
  z-index: 2;
  background: repeating-conic-gradient(
    from 0deg,
    transparent 0 calc(var(--slice) - 1.8deg),
    rgba(8, 4, 12, 0.92) calc(var(--slice) - 1.8deg) var(--slice)
  );
  pointer-events: none;
}

.sun-ring:not(.is-fair) .sun-cuts { display: none; }

.sun-glow {
  z-index: 3;
  background: conic-gradient(from 0deg, rgba(255, 255, 255, 0.34) 0 var(--slice), transparent var(--slice) 360deg);
  transform: translate(-50%, -50%) rotate(var(--glow, 0deg));
  pointer-events: none;
  opacity: 0;
}

#pvpSun.is-spin .sun-glow { opacity: 1; }

.sun-core {
  z-index: 5;
  width: calc(var(--size) * 0.72);
  height: calc(var(--size) * 0.72);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.sun-core img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 14px rgba(255, 140, 30, 0.75));
}

.sun-needle {
  z-index: 4;
  width: 0;
  height: 0;
  transform: translate(-50%, -50%);
}

.sun-needle i {
  position: absolute;
  left: 50%;
  bottom: 8px;
  width: 16px;
  height: calc(var(--size) / 2 - 10px);
  margin-left: -8px;
  background: linear-gradient(180deg, #fff 0 22%, #ffe7a8 22% 70%, #e0a03a 100%);
  clip-path: polygon(50% 0, 100% 18%, 62% 18%, 62% 100%, 38% 100%, 38% 18%, 0 18%);
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.85));
}

#pvpSun:not(.is-spin) .sun-needle,
#pvpSun:not(.is-spin) .sun-glow { display: none; }

.sun-arm {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 6;
  width: 0;
  height: 0;
  transform: rotate(var(--a));
}

.sun-seat {
  --c: #ffb020;
  position: absolute;
  left: 0;
  top: calc(var(--orbit) * -1);
  z-index: 6;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 1px;
  width: 108px;
  min-height: 96px;
  padding: 7px 7px 8px;
  border: 1px solid color-mix(in srgb, var(--c) 70%, #fff);
  border-radius: 16px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--c) 28%, #161018), #0c0612 72%);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.45);
  text-align: center;
  transform: translate(-50%, -50%) rotate(calc(var(--a) * -1));
}

.sun-seat .profile-logo {
  width: 34px;
  height: 34px;
  font-size: 14px;
  box-shadow: 0 0 0 2px var(--c);
}

.sun-seat b,
.sun-seat em,
.sun-seat small { display: block; max-width: 100%; }
.sun-seat b {
  display: -webkit-box;
  overflow: hidden;
  font-size: 11px;
  line-height: 1.15;
  height: 2.3em;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.sun-seat em { color: var(--c); font-style: normal; font-weight: 800; font-size: 14px; }
.sun-seat small { color: #fff6e8; font-size: 11px; font-weight: 800; }

.sun-pot {
  margin: 0;
}

.sun-pot.stake-banner {
  width: min(460px, 100%);
}

#pvpSun.is-result .now,
#pvpSun.is-result #sunLead,
#pvpSun.is-result #sunPot,
#pvpSun.is-result #sunRing,
#pvpSun.is-result #sunDock { display: none; }

.sun-swatch {
  width: 70%;
  height: 4px;
  border-radius: 999px;
  background: var(--c);
}

.sun-seat.is-hot {
  z-index: 8;
  background: color-mix(in srgb, var(--c) 34%, #120818);
  box-shadow: 0 0 0 2px #fff, 0 0 22px var(--c);
  transform: translate(-50%, -50%) rotate(calc(var(--a) * -1)) scale(1.05);
}
.sun-seat.is-win {
  z-index: 8;
  background: color-mix(in srgb, var(--c) 40%, #120818);
  box-shadow: 0 0 0 2px #fff, 0 0 26px var(--c);
  transform: translate(-50%, -50%) rotate(calc(var(--a) * -1)) scale(1.05);
}

.sun-clock {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 6;
  transform: translate(-50%, -50%);
  color: #fff8e6;
  font-family: Unbounded, Manrope, sans-serif;
  font-size: 34px;
  text-shadow: 0 2px 0 #5a2a04;
}

.sun-dock {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-height: min(620px, calc(100vh - 200px));
  overflow: auto;
  padding-right: 4px;
}

.sun-dock-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.sun-dock p {
  margin: 0;
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-align: left;
  text-transform: uppercase;
}

.sun-dock .price-sort {
  display: flex;
  width: auto;
  margin: 0;
  gap: 8px;
}

.sun-dock .price-sort .ghost {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
}

.sun-dock .price-sort svg {
  width: 20px;
  height: 20px;
}

.sun-boards {
  display: block;
  width: 100%;
}

.sun-dock-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
  gap: 8px;
}

.sun-dock:not(.is-open) .sun-dock-row {
  max-height: calc(78px * 2 + 8px + 4px);
  overflow: hidden;
  padding-bottom: 2px;
}

body.is-duel-focus.is-sun-board .sun-chip {
  height: 78px;
  min-height: 0;
  padding: 4px 4px 6px;
  overflow: hidden;
}

body.is-duel-focus.is-sun-board .sun-chip img { height: 32px; }

#sunArsenalMore { width: min(280px, 100%); margin: 0 auto; }

.sun-chip {
  display: grid;
  justify-items: center;
  gap: 2px;
  width: 100%;
  min-height: 84px;
  padding: 6px;
  border: 1px solid rgba(255, 214, 140, 0.28);
  border-radius: 12px;
  background: #120818;
  color: #ffd56a;
}

.sun-chip img { width: 100%; height: 40px; object-fit: contain; }
.sun-chip b {
  max-width: 100%;
  overflow: hidden;
  font-size: 10px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sun-chip small { font-size: 11px; font-weight: 800; }
.sun-chip.is-on { border-color: #3ee57a; box-shadow: inset 0 0 0 1px rgba(62, 229, 122, 0.45); }
.sun-chip.is-locked { cursor: default; }
.sun-dock .add-btn { margin-top: 0; }

body.is-duel-focus.is-sun-board #screenPvp .hub-stage:has(#pvpSun.is-live) {
  align-items: flex-start;
  padding-top: 52px;
}

body.is-duel-focus.is-sun-board #pvpSun.is-live:not(.is-spin):not(.is-result) {
  width: min(1180px, calc(100vw - 28px));
  height: calc(100vh - 72px);
  max-height: calc(100vh - 72px);
  margin: 0 auto;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto auto minmax(0, 1fr);
  grid-template-areas:
    "title"
    "pot"
    "roster"
    "arsenal";
  align-items: start;
  justify-items: center;
  align-content: start;
  row-gap: 8px;
  overflow: hidden;
}

body.is-duel-focus.is-sun-board #pvpSun.is-live:not(.is-spin):not(.is-result) > .now { grid-area: title; }
body.is-duel-focus.is-sun-board #pvpSun.is-live:not(.is-spin):not(.is-result) > #sunPot { grid-area: pot; }
body.is-duel-focus.is-sun-board #pvpSun.is-live:not(.is-spin):not(.is-result) > #sunRoster {
  grid-area: roster;
  width: min(1080px, 100%);
  margin-top: 18px;
}
body.is-duel-focus.is-sun-board #pvpSun.is-live:not(.is-spin):not(.is-result) > #sunDock {
  grid-area: arsenal;
  width: min(1080px, 100%);
  height: 100%;
  min-height: 0;
  max-height: 100%;
  margin-top: 28px;
  overflow: auto;
  padding-right: 0;
}
body.is-duel-focus.is-sun-board #pvpSun.is-live:not(.is-spin):not(.is-result) .sun-dock .price-sort {
  width: auto;
  margin: 0;
}

#sunLootMore { width: min(280px, 100%); margin-top: 0; }

body.is-duel-focus.is-sun-board #pvpSun.is-spin {
  width: min(100%, calc(100vw - 20px));
  max-height: calc(100vh - 64px);
  margin: 8px auto 0;
  justify-items: center;
  align-content: start;
  gap: 10px;
  overflow: visible;
}

body.is-duel-focus.is-sun-board .now-name {
  font-size: clamp(26px, 4.2vh, 46px);
  line-height: 1;
}

body.is-duel-focus.is-sun-board .sun-pot.stake-banner { padding: 8px 18px 10px; }
body.is-duel-focus.is-sun-board .sun-pot .stake-sum { font-size: clamp(26px, 3.6vh, 36px); }

.sun-roster {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
}

.sun-player {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 3px;
  min-width: 0;
  padding: 10px 8px 12px;
  border-radius: 16px;
  background: #120818;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c, #ffb020) 72%, transparent);
  text-align: center;
}

.sun-player.is-you {
  box-shadow:
    inset 0 0 0 2px var(--c, #ffb020),
    0 0 18px color-mix(in srgb, var(--c, #ffb020) 42%, transparent);
}

.sun-player.is-drop { animation: sun-join 0.6s ease; }

.sun-player-skins i.is-new,
.trade-slot.is-drop { animation: sun-pop 0.55s ease; }

.sun-player .profile-logo { width: 44px; height: 44px; }

.sun-player b {
  display: -webkit-box;
  max-width: 100%;
  height: 2.4em;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.sun-player small {
  color: #ffe08a;
  font-size: 15px;
  font-weight: 800;
}

.sun-player strong {
  color: var(--c, #ffb020);
  font-family: Unbounded, Manrope, sans-serif;
  font-size: 20px;
  line-height: 1;
}

.sun-player-skins {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 4px;
  width: 100%;
  min-height: 34px;
  margin: 2px 0;
  overflow: hidden;
}

.sun-player-skins i {
  display: grid;
  width: 34px;
  height: 32px;
  flex: 0 0 34px;
  place-items: center;
  border-radius: 8px;
  background: #1c1024;
  color: #ffe08a;
  font-style: normal;
  font-size: 12px;
  font-weight: 800;
}

.sun-player-skins img {
  width: 100%;
  height: 26px;
  object-fit: contain;
}

.sun-player-skins em {
  color: #8d7d96;
  font-size: 12px;
  font-style: normal;
}
.sun-seat.is-slim { width: 78px; padding: 6px; }
.sun-seat.is-slim b,
.sun-seat.is-slim .sun-swatch { display: none; }

@keyframes sun-spin { to { transform: rotate(360deg); } }

.hub-panel {
  height: 100%;
  overflow-y: auto;
  padding: 28px 22px 48px;
  background:
    radial-gradient(900px 420px at 0% -10%, rgba(140, 40, 255, 0.22), transparent 60%),
    linear-gradient(180deg, #160a22 0%, var(--panel) 42%, #07060c 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.hub-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: safe center;
  gap: 14px;
  height: 100%;
  min-width: 0;
  padding: 28px 24px 32px;
  overflow: auto;
  background:
    radial-gradient(520px 280px at 50% 42%, rgba(120, 20, 200, 0.22), transparent 70%),
    #000;
}

.screen-home .hub-stage {
  position: relative;
  justify-content: flex-start;
  gap: 10px;
  padding-top: 14px;
}

.deck-corner {
  position: absolute;
  top: 14px;
  left: 16px;
  z-index: 3;
  width: auto;
  padding: 8px 16px;
}

.trade-box {
  display: grid;
  justify-items: center;
  gap: 14px;
  width: min(860px, 100%);
}

.trade-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  width: 100%;
}

.trade-grid.is-stake {
  grid-template-columns: minmax(0, 1fr);
  width: min(560px, 100%);
  margin-inline: auto;
}

.trade-grid.is-stake .trade-col,
.trade-grid.is-stake .trade-cells { width: 100%; }

.trade-grid.is-stake .trade-cells {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.trade-grid.is-stake .trade-slot {
  aspect-ratio: 1;
  min-height: 0;
}

.trade-grid.is-stake .trade-slot img {
  width: 78%;
  height: auto;
  max-height: 58%;
}

.pvp-panel .trade-box { width: 100%; }

.hub-lead:empty { display: none; }

.skin-more {
  width: 100%;
  margin-top: 12px;
}

.price-sort {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 12px 0;
}

.price-sort .ghost {
  padding: 8px 6px;
  font-size: 12px;
}

.price-sort .ghost.is-on {
  border-color: transparent;
  color: #2a1200;
  background: linear-gradient(180deg, #ffe7a2 0%, #ffc44a 42%, #f08a12 100%);
}

.sun-dock .price-sort { margin-top: 0; }
.sun-dock .skin-more { margin-top: 0; }

.trade-col h3 {
  margin: 0 0 8px;
  color: var(--gold);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-align: center;
  text-transform: uppercase;
}

.trade-cells {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
  gap: 8px;
  min-height: 124px;
  padding: 10px;
  border: 1px solid rgba(255, 214, 140, 0.22);
  border-radius: 16px;
  background: rgba(18, 8, 24, 0.72);
}

.trade-slot {
  display: grid;
  align-content: end;
  justify-items: center;
  gap: 2px;
  min-height: 108px;
  padding: 6px;
  border: 1px solid rgba(255, 214, 140, 0.28);
  border-radius: 12px;
  background: #120818;
  color: #fff;
  text-align: center;
}

button.trade-slot { cursor: pointer; }

@keyframes sun-join {
  0% { filter: brightness(1); }
  35% { filter: brightness(1.55); }
  100% { filter: brightness(1); }
}

@keyframes sun-pop {
  0% { transform: scale(0.55); }
  58% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

.trade-slot img {
  width: 100%;
  height: 52px;
  object-fit: contain;
}

.trade-slot b,
.trade-slot small {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trade-slot b { font-size: 11px; font-weight: 800; }
.trade-slot small { color: #ffd56a; font-size: 11px; font-weight: 800; }

.trade-slot.is-empty {
  border-style: dashed;
  background: transparent;
}

.trade-empty {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.trade-stake {
  margin: 0;
  color: #ffd7a8;
  font-size: 14px;
  font-weight: 800;
}

.stake-banner {
  display: grid;
  justify-items: center;
  gap: 2px;
  width: min(100%, 320px);
  margin: 8px auto 0;
  padding: 12px 22px 14px;
  border: 1px solid rgba(255, 214, 140, 0.72);
  border-radius: 22px;
  background:
    radial-gradient(120% 90% at 50% -20%, rgba(255, 214, 120, 0.42), transparent 58%),
    linear-gradient(180deg, #4a2a12 0%, #1a0c16 100%);
  box-shadow:
    0 0 0 1px rgba(255, 186, 70, 0.18),
    0 14px 36px rgba(255, 140, 32, 0.28),
    inset 0 1px 0 rgba(255, 244, 214, 0.45);
}

.stake-kicker {
  color: #ffd58a;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.stake-sum {
  display: inline-block;
  font-family: Unbounded, Manrope, sans-serif;
  font-size: 40px;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  background: linear-gradient(180deg, #fff8df 0%, #ffd56a 42%, #ff8a1e 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 16px rgba(255, 176, 32, 0.55));
}

.stake-meta {
  color: #f6e7cf;
  font-size: 14px;
  font-weight: 800;
}

.stake-banner.is-pop .stake-sum {
  animation: stake-pop 0.48s ease;
}

@keyframes stake-pop {
  0% { transform: scale(0.82); filter: drop-shadow(0 0 0 transparent); }
  55% { transform: scale(1.1); filter: drop-shadow(0 0 22px rgba(255, 210, 90, 0.95)); }
  100% { transform: scale(1); filter: drop-shadow(0 0 16px rgba(255, 176, 32, 0.55)); }
}

.trade-box .spin-btn:disabled {
  cursor: default;
  filter: grayscale(0.35) brightness(0.72);
}

.chance-box {
  display: grid;
  gap: 6px;
  width: min(760px, 100%);
  padding: 12px 14px;
  border: 1px solid rgba(255, 214, 140, 0.22);
  border-radius: 16px;
  background: rgba(10, 8, 16, 0.78);
}

.chance-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  margin-bottom: 2px;
}

.chance-head span {
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.chance-head b { color: #ffd7a8; font-size: 13px; }

.chance-row {
  display: grid;
  grid-template-columns: minmax(90px, 1.3fr) minmax(80px, 1.6fr) 72px 64px;
  gap: 8px;
  align-items: center;
}

.chance-name,
.chance-val,
.chance-row em {
  overflow: hidden;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chance-val,
.chance-row em { text-align: right; }
.chance-row em { color: #fff; }

.chance-bar {
  height: 8px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
}

.chance-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.deck-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
}

.deck-actions .ghost,
.deck-actions .spin-btn {
  min-width: 180px;
  width: auto;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 16px;
  letter-spacing: 0.04em;
}

.hub-lead {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  text-align: center;
}

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

.skin-cell {
  display: grid;
  align-content: end;
  aspect-ratio: 1;
  min-height: 0;
  padding: 6px;
  border: 1px solid rgba(255, 214, 140, 0.22);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 40%),
    #120818;
  color: #ddd0ea;
  text-align: center;
}

.skin-cell img {
  width: 100%;
  height: 58%;
  object-fit: contain;
  align-self: center;
}

.skin-cell span {
  overflow: hidden;
  font-size: 10px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.skin-cell small {
  color: #ffd56a;
  font-size: 10px;
  font-weight: 800;
}

.skin-cell.is-filled {
  border-color: rgba(255, 196, 74, 0.55);
  background:
    linear-gradient(180deg, rgba(255, 196, 74, 0.14), transparent 55%),
    #120818;
}

.skin-cell.is-locked {
  border-color: #ff5d78;
  background:
    linear-gradient(180deg, rgba(255, 93, 120, 0.28), rgba(80, 12, 24, 0.55) 55%),
    #1a0810;
  box-shadow: inset 0 0 0 1px rgba(255, 93, 120, 0.45);
  cursor: default;
}

.skin-cell.is-locked img {
  filter: grayscale(0.45) saturate(0.65);
}

.skin-cell.is-locked span,
.skin-cell.is-locked small {
  color: #ff8fa3;
}

.skin-cell.is-picked {
  border-color: #3ee57a;
  box-shadow: 0 0 0 1px #3ee57a, 0 0 16px rgba(62, 229, 122, 0.28);
}

button.skin-cell { cursor: pointer; }

.skin-cell.is-empty {
  place-items: center;
  align-content: center;
  color: rgba(255, 214, 140, 0.85);
}

.cell-plus {
  width: 34px;
  height: 34px;
}

.deck-pick {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  justify-content: center;
  width: min(820px, 100%);
}

.deck-card {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 22px 16px 18px;
  border: 1px solid rgba(255, 214, 140, 0.28);
  border-radius: 22px;
  background: #120818;
  color: var(--text);
}

.deck-stack {
  position: relative;
  width: min(230px, 88%);
  aspect-ratio: 4 / 5.15;
  height: auto;
  margin: 8px auto 6px;
  filter: drop-shadow(0 18px 12px rgba(0, 0, 0, 0.5)) drop-shadow(0 0 18px rgba(255, 186, 70, 0.4));
}

.deck-back {
  position: absolute;
  top: 12%;
  left: 8%;
  width: 74%;
  height: 82%;
  border-radius: 14px;
  background:
    radial-gradient(circle at 50% 46%, rgba(255, 196, 80, 0.18), transparent 28%),
    linear-gradient(165deg, #4a2c16 0%, #1a0d08 46%, #2c160e 100%);
  box-shadow:
    inset 0 0 0 2px #140904,
    inset 0 0 0 5px #e2c16a,
    inset 0 0 0 9px #6d4a18,
    0 12px 16px rgba(0, 0, 0, 0.45);
  animation: deck-float-d 5.4s ease-in-out infinite;
}

.deck-back:nth-child(1) { animation-name: deck-float-a; animation-delay: 0s; }
.deck-back:nth-child(2) { animation-name: deck-float-b; animation-delay: -1.6s; }
.deck-back:nth-child(3) { animation-name: deck-float-c; animation-delay: -3.2s; }
.deck-back.is-top { animation-name: deck-float-d; animation-delay: -0.8s; }

@keyframes deck-float-a {
  0%, 100% { transform: translate(14%, 8%) rotate(9deg); }
  50% { transform: translate(14%, -2%) rotate(9deg); }
}

@keyframes deck-float-b {
  0%, 100% { transform: translate(8%, 5%) rotate(4deg); }
  50% { transform: translate(8%, -8%) rotate(4deg); }
}

@keyframes deck-float-c {
  0%, 100% { transform: translate(4%, 2%) rotate(-6deg); }
  50% { transform: translate(4%, -12%) rotate(-6deg); }
}

@keyframes deck-float-d {
  0%, 100% { transform: translate(0, 0) rotate(2deg); }
  50% { transform: translate(0, -14%) rotate(2deg); }
}

.deck-back.is-top::before,
.deck-back.is-top::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
}

.deck-back.is-top::before {
  width: 36%;
  height: auto;
  aspect-ratio: 1;
  border: 4px solid #f3d48a;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: inset 0 0 0 6px rgba(70, 36, 10, 0.85);
}

.deck-back.is-top::after {
  width: 12%;
  height: auto;
  aspect-ratio: 1;
  background: linear-gradient(135deg, #fff6c8, #f0a020 42%, #7a2bff 80%);
  transform: translate(-50%, -50%) rotate(45deg);
}

.deck-card.is-dota .deck-stack {
  filter: drop-shadow(0 18px 12px rgba(0, 0, 0, 0.5)) drop-shadow(0 0 18px rgba(176, 90, 255, 0.48));
}

.deck-card.is-dota .deck-back {
  background:
    radial-gradient(circle at 50% 46%, rgba(120, 80, 255, 0.28), transparent 30%),
    linear-gradient(165deg, #3a2458 0%, #140818 48%, #241232 100%);
  box-shadow:
    inset 0 0 0 2px #120814,
    inset 0 0 0 4px #c9a4ff,
    inset 0 0 0 7px #5a3a86;
}

.deck-card b { font-size: 26px; }
.deck-card span { color: var(--muted); font-size: 13px; font-weight: 700; }

.deck-card.is-on {
  border-color: #3ee57a;
  box-shadow: 0 0 0 1px #3ee57a, 0 0 24px rgba(62, 229, 122, 0.28);
}

.hub-controls {
  width: min(460px, 100%);
  display: grid;
  gap: 10px;
}

.hub-panel .extra-actions .text-input { width: 92px; flex: 0 0 92px; }
.hub-controls .field-label { margin-top: 0; }
.hub-controls .spin-btn { width: 100%; }
.hub-stage .balance-line { display: flex; align-items: center; gap: 10px; }

.balance-line { margin: 0; font-size: 18px; }
.balance-line b { color: var(--gold); }

.hub-stage.is-cs {
  background:
    radial-gradient(680px 300px at 50% 78%, rgba(255, 122, 32, 0.32), transparent 68%),
    radial-gradient(420px 200px at 18% 82%, rgba(40, 150, 255, 0.2), transparent 70%),
    #05070c;
}

.hub-stage.is-dota {
  background:
    radial-gradient(680px 320px at 50% 78%, rgba(150, 50, 255, 0.4), transparent 68%),
    radial-gradient(380px 200px at 82% 80%, rgba(255, 196, 70, 0.18), transparent 70%),
    #07040e;
}

.game-deck {
  position: relative;
  width: min(980px, 100%);
  min-height: 300px;
}


.game-aura {
  position: absolute;
  left: 50%;
  bottom: 36px;
  width: 70%;
  height: 180px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse, var(--aura, rgba(255, 140, 40, 0.35)), transparent 68%);
  filter: blur(8px);
  pointer-events: none;
}

.game-deck[data-game="dota"] { --aura: rgba(150, 70, 255, 0.4); }
.game-deck[data-game="cs"] { --aura: rgba(80, 160, 255, 0.28); }

.game-fan {
  position: relative;
  height: 430px;
  perspective: 1400px;
}

.game-slot {
  position: absolute;
  left: 50%;
  bottom: 108px;
  width: 172px;
  height: 276px;
  transform: translate(-50%, 36px) scale(0.72);
  z-index: var(--z);
}

.game-deck.is-fanned .game-slot {
  animation: fan-in 1.05s cubic-bezier(0.16, 0.9, 0.22, 1) both;
  animation-delay: calc(var(--i) * 45ms);
}

.game-deck.is-shuffling .game-slot,
.game-deck.is-placed .game-slot {
  animation: none;
}

.game-deck.is-shuffling .game-card:hover {
  transform: none;
}

.game-deck.is-shuffling .game-flip {
  transition-duration: 0.22s;
}

.game-deck.is-shuffling .game-aura {
  animation: aura-pulse 0.7s ease-in-out infinite;
}

@keyframes aura-pulse {
  50% { transform: translateX(-50%) scale(1.35); opacity: 1; }
}

.game-deck.is-reveal::before,
.game-deck.is-reveal::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 34%;
  width: 120px;
  height: 120px;
  border: 2px solid rgba(255, 228, 160, 0.9);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0.25);
  animation: reveal-ring 1500ms ease-out forwards;
  pointer-events: none;
  z-index: 4;
}

.game-deck.is-reveal::before {
  width: 70px;
  height: 70px;
  border-color: rgba(255, 250, 230, 0.95);
  animation-delay: 110ms;
}

.game-deck[data-tier="epic"].is-reveal::after { border-color: rgba(230, 180, 255, 0.95); }
.game-deck[data-tier="rare"].is-reveal::after { border-color: rgba(150, 205, 255, 0.95); }
.game-deck[data-tier="mythic"].is-reveal::after { border-color: rgba(255, 214, 90, 1); }

.game-deck.is-reveal .game-fan { animation: deck-shake 0.46s linear; }
.game-deck[data-tier="mythic"].is-reveal .game-fan,
.game-deck[data-tier="epic"].is-reveal .game-fan { animation-name: deck-shake-hard; }

.game-deck.is-tense .game-aura { animation: aura-pulse 0.4s ease-in-out infinite; }
.game-deck.is-reveal .game-aura { animation: aura-burst 0.85s ease-out forwards; }

@keyframes deck-shake {
  0%, 100% { transform: translate(0, 0); }
  16% { transform: translate(-5px, 2px); }
  36% { transform: translate(6px, -3px); }
  56% { transform: translate(-3px, 2px); }
  76% { transform: translate(2px, -1px); }
}

@keyframes deck-shake-hard {
  0%, 100% { transform: translate(0, 0); }
  12% { transform: translate(-11px, 4px); }
  30% { transform: translate(12px, -5px); }
  48% { transform: translate(-7px, 3px); }
  66% { transform: translate(4px, -2px); }
  84% { transform: translate(-2px, 1px); }
}

@keyframes aura-burst {
  0% { transform: translateX(-50%) scale(0.9); opacity: 0.4; }
  32% { transform: translateX(-50%) scale(1.9); opacity: 1; }
  100% { transform: translateX(-50%) scale(1.2); opacity: 0.72; }
}

@keyframes reveal-ring {
  to { transform: translate(-50%, -50%) scale(6.5); opacity: 0; }
}

.hub-stage.is-rolling .chance-box,
.hub-stage.is-rolling .deck-actions {
  opacity: 0.28;
  pointer-events: none;
}

@keyframes fan-in {
  0% { transform: translate(-50%, 48px) rotate(0deg) scale(0.72); }
  72% { transform: translate(calc(-50% + var(--x)), calc(var(--y) - 16px)) rotate(var(--rot)) scale(calc(var(--scale) + 0.04)); }
  100% { transform: translate(calc(-50% + var(--x)), var(--y)) rotate(var(--rot)) scale(var(--scale)); }
}

.game-card {
  width: 100%;
  height: 100%;
  perspective: 900px;
  transition: transform 0.35s ease;
}

.game-deck.is-fanned .game-card:hover {
  transform: translateY(-22px) scale(1.06);
  z-index: 5;
}

.game-deck.is-rolled .game-card:not(.is-chosen) {
  filter: grayscale(0.75) brightness(0.32);
  opacity: 0.36;
  transition: filter 0.65s ease, opacity 0.65s ease;
}

.game-deck.is-rolled .game-card.is-chosen {
  filter: none;
}

.game-deck.is-prize {
  min-height: 0;
  margin-top: 18px;
}

.game-deck.is-prize .game-aura { display: none; }

.game-deck.is-prize .game-fan {
  height: 460px;
}

.game-deck.is-prize .game-slot {
  bottom: 8px;
  width: 280px;
  height: 430px;
}

.game-deck.is-prize .game-face img {
  height: 250px;
}

.game-deck.is-prize .game-face b {
  font-size: 18px;
}

.game-deck.is-prize .game-face em {
  font-size: 15px;
}

.game-deck.is-prize .game-slot .game-price {
  top: 214px;
  left: 14px;
  right: 14px;
  font-size: 22px;
}

button.prize-close {
  min-width: 200px;
  width: auto;
  padding: 14px 36px;
  font-size: 18px;
}

.game-flip {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.9s cubic-bezier(0.45, 0.05, 0.2, 1);
}

.game-card.is-opening .game-flip {
  transition: none;
  filter: drop-shadow(0 0 18px rgba(255, 214, 130, 0.85));
}

.game-card.is-open .game-flip { transform: rotateY(180deg); }

.game-card.is-tense {
  animation: tense-glow 0.34s ease-in-out infinite;
}

@keyframes tense-glow {
  0%, 100% { filter: drop-shadow(0 0 8px rgba(255, 196, 90, 0.35)); }
  50% { filter: drop-shadow(0 0 28px rgba(255, 230, 160, 0.95)); }
}

.back-sheen {
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 32%, rgba(255, 246, 214, 0.72) 50%, transparent 68%);
  transform: translateX(-130%);
  opacity: 0;
  pointer-events: none;
}

.game-card.is-tense .back-sheen {
  opacity: 1;
  animation: deck-sheen 0.72s ease-in-out infinite;
}

@keyframes deck-sheen {
  0% { transform: translateX(-130%); }
  100% { transform: translateX(130%); }
}

.game-card.is-hit .game-face::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 18%, rgba(255, 255, 255, 0.72), transparent 58%);
  transform: translateX(-140%);
  animation: face-shine 0.74s ease-out forwards;
  pointer-events: none;
}

.game-card.is-hit.is-open .game-face {
  box-shadow:
    inset 0 0 0 2px #0c0a10,
    inset 0 0 0 4px var(--rarity),
    0 0 34px color-mix(in srgb, var(--rarity) 75%, white),
    0 22px 36px rgba(0, 0, 0, 0.5);
}

.game-card[data-tier="mythic"].is-hit .game-face,
.game-card[data-tier="epic"].is-hit .game-face {
  animation: face-bloom 0.62s ease-out 2;
}

@keyframes face-shine {
  to { transform: translateX(140%); }
}

@keyframes face-bloom {
  0% { filter: brightness(1); }
  35% { filter: brightness(1.55); }
  100% { filter: brightness(1); }
}

body.is-deck-open .game-card.is-chosen:not(.is-open) .game-back {
  animation: back-pulse 1.15s ease-in-out infinite;
}

body.is-deck-open .game-card.is-tense .game-back {
  animation-duration: 0.32s;
}

@keyframes back-pulse {
  50% { filter: brightness(1.45); }
}

.game-card.is-open .game-face {
  box-shadow:
    inset 0 0 0 2px #0c0a10,
    inset 0 0 0 4px var(--rarity),
    0 0 22px color-mix(in srgb, var(--rarity) 55%, transparent),
    0 18px 28px rgba(0, 0, 0, 0.45);
}

.game-back,
.game-face {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 14px;
  backface-visibility: hidden;
}

.game-back {
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 210, 120, 0.2), transparent 26%),
    linear-gradient(165deg, #3a2412, #100804 55%);
  box-shadow:
    inset 0 0 0 2px #120804,
    inset 0 0 0 5px #e2c16a,
    inset 0 0 0 8px #6a4516,
    0 16px 24px rgba(0, 0, 0, 0.45);
}

.game-deck[data-game="dota"] .game-back {
  background:
    radial-gradient(circle at 50% 42%, rgba(170, 110, 255, 0.35), transparent 28%),
    linear-gradient(165deg, #3a2460, #120816 58%);
  box-shadow:
    inset 0 0 0 2px #140816,
    inset 0 0 0 5px #d2b0ff,
    inset 0 0 0 8px #62408e,
    0 16px 24px rgba(0, 0, 0, 0.45);
}

.game-back::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 46%;
  width: 42px;
  height: 42px;
  border: 3px solid #f3d48a;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.game-deck[data-game="dota"] .game-back::before { border-color: #e4d0ff; }

.game-back::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 46%;
  width: 14px;
  height: 14px;
  background: linear-gradient(135deg, #fff6c8, #f0a020 40%, #7a2bff);
  transform: translate(-50%, -50%) rotate(45deg);
}

.game-face {
  display: flex;
  flex-direction: column;
  transform: rotateY(180deg);
  padding: 8px 8px 42px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--rarity) 35%, #121018), #0c0a10 42%);
  box-shadow:
    inset 0 0 0 2px #0c0a10,
    inset 0 0 0 4px var(--rarity),
    0 18px 28px rgba(0, 0, 0, 0.45);
}

.game-deck[data-game="dota"] .game-face {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--rarity) 42%, #1a1028), #100816 40%);
}

.game-face img {
  width: 100%;
  height: 132px;
  object-fit: contain;
  padding: 4px;
  border-radius: 10px;
  background:
    radial-gradient(circle at 50% 58%, rgba(255, 255, 255, 0.2), transparent 68%),
    rgba(0, 0, 0, 0.28);
  filter: drop-shadow(0 10px 12px rgba(0, 0, 0, 0.5));
}

.game-face b,
.game-face em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-face b {
  margin-top: 6px;
  color: #fff;
  font-size: 12px;
  line-height: 1.25;
  text-align: center;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.game-face em {
  margin-top: 2px;
  color: var(--rarity);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  text-align: center;
}

.game-price {
  position: absolute;
  top: 104px;
  padding: 5px 8px 4px;
  border-radius: 8px;
  background: rgba(8, 6, 12, 0.9);
  box-shadow: inset 0 0 0 1px rgba(255, 214, 120, 0.55);
  color: #ffe7a2;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.01em;
  text-align: center;
  text-shadow: 0 0 12px rgba(255, 196, 74, 0.7);
  white-space: nowrap;
}

.game-slot[data-side="left"] .game-price { left: 8px; }
.game-slot[data-side="right"] .game-price { right: 8px; }
.game-slot[data-side="center"] .game-price { left: 8px; right: 8px; }

.home-cards, .pvp-arena { display: flex; justify-content: center; flex-wrap: wrap; gap: 16px; margin: 10px 0; }
.home-cards:empty { display: none; }

.mini-card {
  width: 150px;
  height: 210px;
  perspective: 800px;
}

.mini-flip {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.8s cubic-bezier(0.62, 0.04, 0.2, 1);
}

.mini-card.is-open .mini-flip { transform: rotateY(180deg); }

.mini-back, .mini-face {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 14px;
  overflow: hidden;
  border-radius: 14px;
  backface-visibility: hidden;
  box-shadow: inset 0 0 0 2px #140904, inset 0 0 0 5px #e2c16a;
}

.mini-back { background: linear-gradient(165deg, #4a2c16, #1a0d08 60%); }
.mini-face { transform: rotateY(180deg); background: linear-gradient(180deg, #3a2414, #120c09); text-align: center; }
.mini-face b { font-family: Unbounded, "Segoe UI", sans-serif; }

.pvp-side {
  width: min(240px, 42vw);
  padding: 16px;
  border: 1px solid rgba(255, 214, 140, 0.25);
  border-radius: 18px;
  background: #140a1c;
  text-align: center;
}

.pvp-side.is-win { box-shadow: 0 0 24px rgba(255, 196, 74, 0.45); }
.pvp-side.is-lose { opacity: 0.45; }

button, input, textarea, select { font: inherit; color: inherit; }

button { cursor: pointer; }

img { max-width: 100%; }

.panel {
  grid-column: 1;
  grid-row: 2;
  align-self: start;
  height: calc(100vh - var(--header-h));
  overflow-y: auto;
  padding: 28px 22px 48px;
  background:
    radial-gradient(900px 420px at 0% -10%, rgba(140, 40, 255, 0.22), transparent 60%),
    linear-gradient(180deg, #160a22 0%, var(--panel) 42%, #07060c 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.brand { margin-bottom: 22px; }

.eyebrow {
  margin: 0 0 6px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

h1, h2, h3, .now-name, .modal-name, .spin-btn, .add-btn {
  font-family: Unbounded, "Segoe UI", sans-serif;
}

h1, .brand-title {
  margin: 0;
  font-size: 34px;
  line-height: 1.05;
  letter-spacing: -0.03em;
  background: linear-gradient(180deg, #fff 10%, #ffe7a8 55%, #ff9a2e 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

h1.now-name {
  background: none;
  -webkit-background-clip: border-box;
  background-clip: border-box;
  color: var(--text);
  -webkit-text-fill-color: var(--text);
}

.lead, .extra-hint {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.modes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 18px 0 16px;
}

.mode {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #120c1a;
  padding: 12px 10px;
  font-weight: 800;
}

.mode.is-on {
  border-color: transparent;
  color: #2a1200;
  background: linear-gradient(180deg, #ffe7a2, #ffc44a 55%, #f08a12);
}

.raffle-box textarea {
  width: 100%;
  height: calc(5 * 1.4em + 28px);
  line-height: 1.4;
  resize: none;
  overflow-y: auto;
}

body.mode-raffle .queue-only,
.name-wheel { display: none; }

body.mode-raffle .name-wheel { display: block; }

body:not(.mode-raffle) .raffle-only { display: none; }

.add-box {
  position: sticky;
  top: 0;
  z-index: 2;
  padding-bottom: 8px;
  background: linear-gradient(#160a22, #14091ee6 70%, #14091e00);
}

.field-label {
  display: block;
  margin: 14px 0 8px;
  color: #f0ddff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.text-input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #09070f;
  padding: 13px 14px;
  outline: none;
}

.text-input:focus, textarea:focus, select:focus {
  border-color: rgba(255, 196, 74, 0.8);
  box-shadow: 0 0 0 3px rgba(255, 180, 40, 0.15);
}

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

.prize-pick {
  position: relative;
  display: block;
  aspect-ratio: 1;
  padding: 0;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: #000;
}

.prize-pick img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.prize-pick span {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 16px 4px 5px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.92));
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
}

.prize-pick.is-on {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(255, 180, 40, 0.28), 0 0 18px rgba(255, 160, 40, 0.45);
}

.prize-slot { position: relative; }

.prize-slot .prize-pick { width: 100%; }

.prize-x {
  position: absolute;
  z-index: 2;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.78);
  color: #fff;
  font-weight: 800;
  line-height: 1;
}

.prize-x:disabled { opacity: 0.35; cursor: default; }

.prize-actions { display: flex; gap: 8px; margin-top: 10px; }
.prize-actions .ghost { flex: 1; }
#resetPrizes.is-on {
  border-color: transparent;
  color: #2a1200;
  background: linear-gradient(180deg, #ffe7a2, #ffc44a 55%, #f08a12);
}

.prize-form { margin-top: 10px; }

#prizeMsg:empty { display: none; }

.file-btn { display: inline-flex; cursor: pointer; }

.prize-preview {
  position: relative;
  width: 112px;
  margin-top: 10px;
}

.prize-preview img {
  display: block;
  width: 112px;
  height: 112px;
  object-fit: cover;
  border-radius: 14px;
  box-shadow: inset 0 0 0 1px rgba(255, 214, 140, 0.35);
}

.odds {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.odd {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 72px;
  gap: 8px;
  align-items: center;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
}

.odd img {
  width: 46px;
  height: 46px;
  object-fit: cover;
  border-radius: 10px;
}

.odd-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
  font-size: 13px;
  font-weight: 800;
}

.odd-pct { color: var(--gold); }

.odd input[type="range"] {
  width: 100%;
  accent-color: #f0a020;
}

.odd-num {
  width: 72px;
  padding: 8px 6px;
  text-align: center;
}

.odds-arrow {
  display: grid;
  place-items: center;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid rgba(255, 214, 140, 0.35);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: #ffd56a;
}

.odds-arrow svg {
  width: 18px;
  height: 18px;
  transition: transform 0.2s ease;
}

.odds-arrow.is-open svg { transform: rotate(180deg); }

.odds-clear { width: 100%; margin-top: 10px; }

.prize-grid.shake, .text-input.shake { animation: shake 0.35s linear; }

.add-btn, .spin-btn {
  border: 0;
  color: #2a1200;
  background: linear-gradient(180deg, #ffe7a2 0%, #ffc44a 42%, #f08a12 100%);
  box-shadow: 0 10px 30px rgba(255, 160, 30, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.add-btn {
  width: 100%;
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 800;
}

.add-btn:hover, .spin-btn:hover { filter: brightness(1.05); }

.add-btn:active, .spin-btn:active { transform: translateY(1px); }

.form-msg {
  min-height: 1.2em;
  margin: 8px 0 0;
  color: #ffd7a8;
  font-size: 13px;
}

.form-msg.is-bad { color: var(--danger); }

.list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 18px 0 10px;
}

h2 {
  margin: 0;
  font-family: Manrope, "Segoe UI", sans-serif;
  font-size: 18px;
  font-weight: 800;
}

h2.brand-title {
  font-family: Unbounded, "Segoe UI", sans-serif;
  font-size: 34px;
  font-weight: 800;
}

.pill {
  border-radius: 999px;
  background: rgba(255, 196, 74, 0.12);
  color: var(--gold);
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 800;
}

.people {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.win-more .ghost, .win-clear { width: 100%; }

.admin-only { display: none; width: 100%; margin-top: 16px; }
body.is-admin .admin-only { display: block; }
body.is-admin .admin-only.is-on {
  border-color: transparent;
  color: #2a1200;
  background: linear-gradient(180deg, #ffe7a2, #ffc44a 55%, #f08a12);
}

.empty {
  margin: 0;
  padding: 18px 14px;
  border: 1px dashed rgba(255, 214, 140, 0.25);
  border-radius: 16px;
  color: var(--muted);
  text-align: center;
}

.person {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  gap: 4px 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
}

.person.is-next {
  border-color: rgba(255, 196, 74, 0.75);
  background: rgba(255, 180, 40, 0.07);
}

.person.is-done { opacity: 0.55; }

.person-thumb, .thumb-placeholder {
  grid-row: 1 / span 2;
  width: 52px;
  height: 52px;
  border-radius: 12px;
  object-fit: cover;
}

.thumb-placeholder {
  display: grid;
  place-items: center;
  background: #1a1024;
  color: var(--gold);
  font-weight: 800;
}

.name-edit {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  font-weight: 800;
}

.name-edit:focus {
  border-color: var(--line);
  background: #09070f;
}

.person-sub {
  grid-column: 2 / -1;
  display: flex;
  gap: 6px;
  align-items: center;
  min-width: 0;
}

.prize-edit {
  flex: 1;
  min-width: 0;
  padding: 6px 8px;
  border-radius: 10px;
  font-size: 13px;
}

.prize-hidden {
  color: var(--muted);
  font-size: 13px;
}

.icon-btn, .text-btn {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: #140e1c;
}

.icon-btn {
  width: 32px;
  height: 32px;
  padding: 0;
  line-height: 1;
}

.icon-btn:disabled { opacity: 0.35; cursor: default; }

.icon-btn.danger { color: var(--danger); }

.text-btn {
  padding: 6px 8px;
  font-size: 12px;
  font-weight: 800;
}

.list-tools, .extra-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.ghost, .danger {
  border-radius: 12px;
  padding: 9px 12px;
  background: #140e1c;
  font-weight: 800;
}

.ghost { border: 1px solid var(--line); }

.danger {
  border: 1px solid rgba(255, 93, 120, 0.45);
  color: #ffd0d8;
}

.ghost:hover, .icon-btn:hover, .text-btn:hover { border-color: rgba(255, 196, 74, 0.55); }

.extra {
  margin-top: 16px;
  padding: 12px 14px 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.2);
}

.extra summary {
  cursor: pointer;
  font-weight: 800;
}

.extra textarea { margin-top: 10px; resize: vertical; }

.switch {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 16px;
  color: var(--muted);
  font-size: 14px;
}

.switch input { width: 18px; height: 18px; accent-color: #f0a020; }

.stage {
  grid-column: 2;
  grid-row: 2;
  position: sticky;
  top: 0;
  display: flex;
  align-self: start;
  min-width: 0;
  height: calc(100vh - var(--header-h));
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 28px 24px 32px;
  background:
    radial-gradient(520px 280px at 50% 42%, rgba(120, 20, 200, 0.22), transparent 70%),
    #000;
  overflow: hidden;
}

.stage-tools {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  gap: 8px;
}

.tool-btn {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  background: rgba(10, 8, 16, 0.72);
}
.tool-btn svg { width: 22px; height: 22px; }
.tool-btn.is-on { border-color: var(--gold); color: var(--gold); }

.now { text-align: center; max-width: min(920px, 100%); }

.now-kicker {
  margin: 0;
  color: var(--gold);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.now-name {
  margin: 4px 0 0;
  font-size: clamp(32px, 5vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.now-name.is-live { animation: namepulse 0.8s ease-in-out infinite; }

.wheels {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  width: 100%;
}

.wheel-box {
  position: relative;
  container-type: inline-size;
  width: min(820px, 100%, calc(100vh - 250px));
  aspect-ratio: 1;
}

.wheel-caption {
  display: none;
  position: absolute;
  top: -28px;
  right: 0;
  left: 0;
  margin: 0;
  color: var(--gold);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-align: center;
  text-transform: uppercase;
}

body.mode-raffle .stage { padding-bottom: 7vh; }

body.mode-raffle .wheels { padding-top: 28px; }

body.mode-raffle .wheel-caption { display: block; }

body.mode-raffle .wheel-box {
  width: min(460px, calc(50vw - 250px), calc(100vh - 300px));
}

#nameCanvas {
  width: 100%;
  height: 100%;
  display: block;
}

.wheel-glow {
  position: absolute;
  inset: 7%;
  z-index: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(170, 40, 255, 0.34), transparent 68%);
  filter: blur(10px);
  pointer-events: none;
}

.rotor {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  border-radius: 50%;
  will-change: transform;
}

.wheel {
  width: 100%;
  height: 100%;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

.prize-layer { position: absolute; inset: 0; }

.prize {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.prize-card {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: transparent;
}

.prize-card img {
  position: absolute;
  left: 50%;
  max-width: none;
  transform: translate(-50%, -50%);
  object-fit: cover;
  object-position: center;
}

.prize-card.won {
  animation: wedgeshine 0.7s ease-in-out;
}

.pointer {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 11cqi;
  height: 15cqi;
  transform: translate(-50%, -100%);
  transform-origin: 50% 12%;
  filter: drop-shadow(0 8px 8px rgba(0, 0, 0, 0.7));
  pointer-events: none;
}

.pointer svg { display: block; width: auto; height: 100%; }

.pointer.tick { animation: flap 90ms linear; }

.card-table {
  position: relative;
  width: min(920px, 96%);
  height: min(460px, calc(100vh - 280px));
}

.card-grid {
  display: grid;
  gap: 10px;
  width: 100%;
  height: 100%;
}

.slot { border-radius: 12px; }

.flying { position: absolute; inset: 0; }

.hs-card {
  position: absolute;
  left: 0;
  top: 0;
  padding: 0;
  border: 0;
  background: transparent;
  perspective: 900px;
}

.hs-card:disabled { cursor: default; }

.hs-card.is-idle { pointer-events: none; }

.card-table.is-preview::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 4%;
  z-index: 0;
  width: 42%;
  height: 22%;
  transform: translateX(-50%);
  background: radial-gradient(ellipse, rgba(150, 70, 255, 0.42), rgba(255, 176, 60, 0.14) 46%, transparent 72%);
  filter: blur(10px);
  pointer-events: none;
}

.preview-slot {
  position: absolute;
  left: 0;
  top: 0;
}

.preview-deck {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 3;
  perspective: 760px;
  pointer-events: none;
}

.preview-deck-inner {
  position: absolute;
  inset: 0;
  transform: rotateX(67deg) rotateZ(-8deg);
  transform-origin: 50% 78%;
  transform-style: preserve-3d;
}

.preview-deck::after {
  content: "";
  position: absolute;
  left: -22%;
  right: -6%;
  bottom: 2%;
  height: 24%;
  background: radial-gradient(ellipse, rgba(0, 0, 0, 0.7), transparent 72%);
  filter: blur(5px);
  pointer-events: none;
}

.preview-slot.is-pile { transform-style: preserve-3d; }

.preview-slot.is-gold {
  filter: drop-shadow(0 18px 12px rgba(0, 0, 0, 0.5)) drop-shadow(0 0 18px rgba(255, 186, 70, 0.55));
}

.preview-slot.is-silver {
  filter: drop-shadow(0 18px 12px rgba(0, 0, 0, 0.5)) drop-shadow(0 0 18px rgba(214, 226, 255, 0.5));
}

.preview-slot.is-violet {
  filter: drop-shadow(0 18px 12px rgba(0, 0, 0, 0.5)) drop-shadow(0 0 18px rgba(176, 90, 255, 0.55));
}

.preview-slot.is-float .hs-card {
  animation: card-bob 5.4s ease-in-out infinite;
}

@keyframes card-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.card-table.is-ready .hs-card:not(:disabled) { cursor: pointer; }

.hs-flip {
  display: block;
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.7s cubic-bezier(0.2, 0.75, 0.2, 1);
}

.hs-back,
.hs-face {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 12px;
  backface-visibility: hidden;
}

.hs-back {
  background:
    radial-gradient(circle at 50% 44%, rgba(255, 196, 80, 0.18), transparent 26%),
    linear-gradient(165deg, #4a2c16 0%, #1a0d08 46%, #2c160e 100%);
  box-shadow:
    inset 0 0 0 2px #140904,
    inset 0 0 0 5px #e2c16a,
    inset 0 0 0 9px #6d4a18,
    0 12px 16px rgba(0, 0, 0, 0.45);
}

.hs-ring {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 40%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border: 3px solid #f3d48a;
  border-radius: 50%;
  box-shadow:
    inset 0 0 0 6px rgba(70, 36, 10, 0.85),
    0 0 12px rgba(255, 186, 60, 0.28);
}

.hs-gem {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 13%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%) rotate(45deg);
  background: linear-gradient(135deg, #fff6c8, #f0a020 42%, #7a2bff 80%);
  box-shadow: 0 0 8px rgba(255, 176, 50, 0.7);
}

.hs-num {
  position: absolute;
  top: 7%;
  left: 50%;
  z-index: 2;
  min-width: 1.7em;
  padding: 2px 8px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: linear-gradient(#fff4c8, #e2a63c);
  color: #2a1608;
  font-family: Unbounded, "Segoe UI", sans-serif;
  font-size: clamp(16px, 2vw, 26px);
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  opacity: 0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
}

.card-table.is-ready .hs-num,
.card-table.is-suspense .hs-num { opacity: 1; }

.hs-face {
  transform: rotateY(180deg);
  background: linear-gradient(180deg, #3a2414, #120c09 28%);
  box-shadow:
    inset 0 0 0 2px #140904,
    inset 0 0 0 5px #e6c36a,
    inset 0 0 0 9px #6a4514,
    0 12px 16px rgba(0, 0, 0, 0.45);
}

.hs-card.is-legend .hs-face {
  box-shadow:
    inset 0 0 0 2px #3a2208,
    inset 0 0 0 5px #ffd78a,
    inset 0 0 0 9px #b86a12,
    0 0 22px rgba(255, 170, 40, 0.55);
}

.hs-portrait {
  position: absolute;
  left: 7%;
  right: 7%;
  top: 6%;
  height: 68%;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 0 0 2px #8d6a32;
  background: #050308;
}

.hs-portrait img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hs-banner {
  position: absolute;
  right: 7%;
  bottom: 6%;
  left: 7%;
  z-index: 1;
  display: flex;
  height: 16%;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  overflow: hidden;
  border-radius: 9px;
  background: linear-gradient(#fff0c4, #e0aa45 52%, #9a641c);
  color: #2a1608;
  font-family: Unbounded, "Segoe UI", sans-serif;
  font-size: clamp(10px, 1.2vw, 15px);
  font-weight: 800;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  text-overflow: ellipsis;
  box-shadow: 0 2px 0 #5c3810, 0 8px 12px rgba(0, 0, 0, 0.4);
}

.hs-card.is-flipped .hs-flip,
.hs-card.is-open .hs-flip { transform: rotateY(180deg); }

.hs-card.is-flipped.is-flat {
  perspective: none;
}

.hs-card.is-flipped.is-flat .hs-flip,
.hs-card.is-flipped.is-flat .hs-face {
  transform: none;
  transition: none;
  animation: none;
}

.hs-card.is-flipped.is-flat .hs-back { display: none; }

.card-table.is-ready .hs-card:not(.is-flipped):hover { z-index: 8; }

.card-table.is-ready .hs-card:not(.is-flipped):hover .hs-flip {
  transform: translateY(-16px) scale(1.05);
}

.card-table.is-picked .hs-card:not(.is-chosen) {
  filter: brightness(0.28) saturate(0.5);
  transition: filter 0.6s ease;
}

.card-table.is-picked .hs-card:not(.is-chosen) .hs-flip {
  transform: scale(0.9);
  transition: transform 0.6s ease;
}

.hs-card.is-chosen { z-index: 9; }

.hs-card.is-chosen:not(.is-flipped)::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: -1;
  width: 320%;
  height: 320%;
  transform: translate(-50%, -50%) scale(0.2);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 206, 80, 0.75), rgba(150, 40, 255, 0.35) 38%, transparent 64%);
  animation: bloom 3.6s ease-out forwards;
  pointer-events: none;
}

.hs-card.is-chosen:not(.is-flipped)::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: -1;
  width: 150%;
  height: 150%;
  border: 3px solid rgba(255, 220, 130, 0.85);
  border-radius: 50%;
  animation: ring-out 1.15s ease-out infinite;
  pointer-events: none;
}

.hs-card.is-chosen:not(.is-flipped) .hs-flip {
  animation: card-tremble 0.38s ease-in-out infinite;
}

.card-table.is-reveal .hs-card.is-chosen::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: -1;
  width: 260%;
  height: 260%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 236, 170, 0.9), rgba(255, 140, 30, 0.35) 40%, transparent 68%);
  animation: flash-out 0.8s ease-out forwards;
  pointer-events: none;
}

@keyframes bloom {
  0% { transform: translate(-50%, -50%) scale(0.15); opacity: 0.25; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

@keyframes ring-out {
  0% { transform: translate(-50%, -50%) scale(0.4); opacity: 0.95; }
  100% { transform: translate(-50%, -50%) scale(2.1); opacity: 0; }
}

@keyframes card-tremble {
  0%, 100% { transform: rotate(0deg) translateY(0); }
  30% { transform: rotate(-1.6deg) translateY(-5px); }
  70% { transform: rotate(1.6deg) translateY(4px); }
}

@keyframes flash-out {
  0% { opacity: 1; transform: translate(-50%, -50%) scale(0.4); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.3); }
}

.hs-card.is-chosen .hs-face::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 32%, rgba(255, 255, 255, 0.55), transparent 68%);
  animation: hs-sheen 0.7s ease forwards;
  pointer-events: none;
}

@keyframes hs-sheen {
  0% { transform: translateX(-50%); opacity: 0; }
  35% { opacity: 1; }
  100% { transform: translateX(50%); opacity: 0; }
}

.spin-btn {
  min-width: min(420px, 100%);
  padding: 18px 36px;
  border-radius: 999px;
  font-size: clamp(18px, 2vw, 26px);
  font-weight: 800;
  letter-spacing: 0.08em;
}

.spin-btn:disabled {
  cursor: default;
  filter: grayscale(0.35) brightness(0.72);
  box-shadow: none;
}

.fx-layer {
  position: fixed;
  inset: 0;
  z-index: 16;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hint {
  margin: 0;
  color: rgba(255, 248, 238, 0.45);
  font-size: 13px;
}

body.is-spinning .wheel { animation: pulsebright 0.45s ease-in-out infinite; }

body.is-dealing {
  grid-template-columns: minmax(0, 1fr);
}

body.is-dealing .panel,
body.is-dealing .showcase { display: none; }

body.is-dealing .stage { grid-column: 1; }

body.is-deck-roll {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
}

body.is-deck-roll .site-head,
body.is-deck-roll .showcase,
body.is-deck-roll .panel,
body.is-deck-roll #screenHome .hub-panel,
body.is-deck-roll #chanceBox,
body.is-deck-roll #deckActions,
body.is-deck-roll #deckBack,
body.is-deck-roll #homeMsg {
  display: none;
}

body.is-deck-roll.is-deck-result #deckBack,
body.is-deck-roll.is-deck-result #homeMsg {
  display: block;
}

body.is-deck-roll .screen {
  grid-column: 1;
  grid-row: 1;
  height: 100vh;
}

body.is-deck-roll #screenHome {
  grid-template-columns: minmax(0, 1fr);
}

body.is-deck-roll #screenHome .hub-stage {
  height: 100vh;
  justify-content: center;
}

body.is-deck-roll .now {
  position: relative;
  z-index: 6;
  transition: opacity 0.7s ease;
}

body.is-deck-open .now {
  opacity: 0;
}

body.is-deck-roll .game-deck {
  z-index: 1;
}

body.is-deck-pick .game-card { cursor: pointer; }

body.is-deck-pick .game-card:hover {
  transform: translateY(-26px) scale(1.06);
}

body.show-mode {
  grid-template-columns: 1fr;
  grid-template-rows: minmax(0, 1fr);
}

body.show-mode .site-head,
body.show-mode .panel,
body.show-mode .showcase { display: none; }

body.show-mode .stage { grid-column: 1; }

body.show-mode .stage { height: 100vh; }

.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(7px);
}

.modal canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.modal-card {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  padding: 26px 22px 22px;
  border: 1px solid rgba(255, 214, 120, 0.45);
  border-radius: 28px;
  background:
    radial-gradient(420px 180px at 50% 0%, rgba(180, 60, 255, 0.35), transparent 70%),
    linear-gradient(180deg, #2a1244, #120814 55%);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55);
  text-align: center;
  animation: popin 0.45s cubic-bezier(0.2, 1.15, 0.3, 1);
}

.modal-kicker {
  margin: 0;
  color: var(--gold);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.modal-name {
  display: inline-block;
  max-width: 100%;
  margin: 10px 0 16px;
  padding: 8px 16px 10px;
  border: 1px solid rgba(255, 214, 120, 0.75);
  border-radius: 16px;
  background: rgba(255, 196, 74, 0.08);
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: #fff4c2;
  animation: winnerin 0.7s cubic-bezier(0.2, 1.25, 0.3, 1) both;
}

.modal-name::before {
  content: "";
  display: inline-block;
  width: 0.85em;
  height: 0.85em;
  margin-right: 0.28em;
  vertical-align: -0.1em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23ffe7a2' d='M7 3h10v6a5 5 0 0 1-10 0V3zm1.2 2v3.2a3.8 3.8 0 0 0 7.6 0V5H8.2z'/%3E%3Cpath fill='%23ffc44a' d='M7 5H4.5A3.5 3.5 0 0 0 8 8.4V6.6A2 2 0 0 1 6.2 5H7zm10 0h2.5A3.5 3.5 0 0 1 16 8.4V6.6A2 2 0 0 0 17.8 5H17z'/%3E%3Cpath fill='%23ffe7a2' d='M11 15h2v2.2h3.2V20H7.8v-2.8H11V15z'/%3E%3C/svg%3E") center / contain no-repeat;
}

@keyframes winnerin {
  from { transform: scale(0.72); filter: brightness(1.8); }
  to { transform: none; filter: none; }
}

.modal-card img {
  width: 100%;
  max-height: 40vh;
  object-fit: contain;
  border-radius: 18px;
  background: #000;
}

.modal-prize {
  margin: 12px 0 0;
  font-size: 22px;
  font-weight: 800;
}

.modal-next {
  min-height: 1.2em;
  margin: 6px 0 14px;
  color: var(--muted);
}

.done-label {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@keyframes shake {
  25% { transform: translateX(-4px); }
  50% { transform: translateX(4px); }
  75% { transform: translateX(-3px); }
}

@keyframes flap {
  0% { transform: translate(-50%, -100%) rotate(0deg); }
  40% { transform: translate(-50%, -100%) rotate(16deg); }
  100% { transform: translate(-50%, -100%) rotate(0deg); }
}

@keyframes popin {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: none; opacity: 1; }
}

@keyframes victory-in {
  from { transform: translateY(28px); opacity: 0; }
  to { transform: none; opacity: 1; }
}

@keyframes wedgeshine {
  0% { filter: brightness(1); }
  45% { filter: brightness(1.45) saturate(1.15); }
  100% { filter: brightness(1); }
}

@keyframes namepulse {
  50% { transform: scale(1.03); }
}

@keyframes pulsebright {
  50% { filter: brightness(1.14) saturate(1.08); }
}

@media (max-width: 980px) {
  body { grid-template-columns: 1fr; }
  .panel, .stage, .showcase, .screen { grid-column: 1; grid-row: auto; }
  .showcase { height: 480px; border-left: 0; border-top: 1px solid rgba(255, 214, 140, 0.16); }
  body[data-screen="deck"] .screen-home,
  body[data-screen="pvp"] .screen-pvp { grid-template-columns: 1fr; height: auto; overflow: auto; }
  .mode-pick { grid-template-columns: 1fr; }
  .mode-card { min-height: 0; }
  .hub-panel { height: auto; border-right: 0; border-top: 1px solid rgba(255, 255, 255, 0.06); }
  .hub-stage { order: -1; height: auto; min-height: 70vh; }
  .trade-grid,
  .trade-grid.is-stake { grid-template-columns: 1fr; }
  .chance-row { grid-template-columns: minmax(70px, 1fr) minmax(50px, 1fr) 64px 56px; }
  .account-chip { margin-left: 0; }
  .panel {
    min-height: 0;
    border-right: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
  }
  .panel { height: auto; max-height: none; overflow: visible; }
  .stage { position: static; order: -1; height: auto; min-height: auto; padding-top: 64px; }
  .now-name { white-space: normal; }
  .duel-board {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.5fr) minmax(0, 0.8fr);
    gap: 8px;
  }
  .duel-side { min-height: 0; padding: 10px 6px; }
  .profile-logo { width: 52px; height: 52px; font-size: 22px; }
  .duel-side b { font-size: 13px; }
  .tug { height: 74px; gap: 4px; }
  .tug-post { height: 58px; }
  .tug-ring { width: 44px; height: 44px; margin-left: -22px; }
  .duel-pull, .duel-win .spin-btn { width: 100%; min-width: 0; }
  .duel-count { font-size: 72px; }
  .vs-mark { font-size: 42px; }
  .ball-field { height: 280px; }
  .station-keys button { width: 72px; height: 72px; }
  .arcade-clock { font-size: 52px; }
  .add-box { position: static; background: transparent; }
  body.mode-raffle .wheels { flex-direction: column; }
  body.mode-raffle .wheel-box { width: min(100%, calc(100vh - 280px)); }
}

body[data-screen="home"] {
  height: 100vh;
  overflow: hidden;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto minmax(0, 1fr);
}

body[data-screen="home"] .showcase {
  grid-column: 1;
  grid-row: 1;
  flex-direction: row;
  height: auto;
  padding: 8px 16px 12px;
  border-left: 0;
  border-bottom: 1px solid rgba(255, 214, 140, 0.16);
}

body[data-screen="home"] .site-head {
  grid-column: 1;
  grid-row: 2;
}

body[data-screen="home"] .screen-hub {
  grid-column: 1;
  grid-row: 3;
  height: 100%;
  min-height: 0;
}

body[data-screen="home"] .showcase-viewport {
  width: 100%;
  padding-top: 14px;
  overflow: hidden;
  mask-image: linear-gradient(90deg, #000 calc(100% - 56px), transparent);
}

body[data-screen="home"] .showcase-row {
  flex-direction: row;
  align-items: stretch;
  width: max-content;
}

body[data-screen="home"] .showcase-drop {
  width: 300px;
  flex: 0 0 300px;
}

@media (max-width: 980px) {
  body,
  body[data-screen="home"] {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    font-size: 14px;
  }

  .site-head,
  .showcase,
  .panel,
  .stage,
  .screen,
  body[data-screen="home"] .showcase,
  body[data-screen="home"] .site-head,
  body[data-screen="home"] .screen-hub {
    grid-column: auto;
    grid-row: auto;
    width: 100%;
  }

  .site-head { order: 1; }
  .showcase,
  body[data-screen="home"] .showcase { order: 2; }
  .screen,
  .stage { order: 3; }
  .panel { order: 4; }
  body[data-screen="home"] .showcase { order: 0; }

  .site-nav {
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-items: center;
    height: auto;
    gap: 8px 10px;
    padding: 8px 10px 10px;
  }

  .site-logo {
    grid-column: 1;
    grid-row: 1;
    margin-right: 0;
    font-size: 15px;
  }

  .nav-live {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    margin: 0;
  }

  .nav-live-text b { font-size: 16px; }

  .account-chip {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    min-width: 0;
    margin: 0;
    gap: 6px;
  }

  .account-box { gap: 6px; }
  #accountName { max-width: 84px; font-size: 13px; }
  .account-box b { font-size: 13px; }

  .steam-login { padding: 8px 12px; font-size: 13px; }
  .login-full { display: none; }
  .login-short { display: inline; }

  .site-tabs {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .site-tabs::-webkit-scrollbar { display: none; }

  .site-tab {
    flex: 1 0 auto;
    justify-content: center;
    gap: 5px;
    padding: 8px 8px;
    font-size: 13px;
    white-space: nowrap;
  }

  .showcase,
  body[data-screen="home"] .showcase {
    display: flex;
    flex-direction: row;
    height: auto;
    min-height: 0;
    padding: 6px 10px 8px;
    border: 0;
    border-bottom: 1px solid rgba(255, 214, 140, 0.16);
    overflow: hidden;
  }

  .showcase-viewport,
  body[data-screen="home"] .showcase-viewport {
    width: 100%;
    flex: 1;
    min-height: 0;
    padding-top: 12px;
    overflow: hidden;
    mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent);
  }

  .showcase-row,
  body[data-screen="home"] .showcase-row {
    flex-direction: row;
    align-items: stretch;
    width: max-content;
    gap: 8px;
  }

  .showcase-drop,
  body[data-screen="home"] .showcase-drop {
    width: 240px;
    flex: 0 0 240px;
    min-height: 0;
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 8px;
    padding: 8px 10px;
  }

  .drop-skin,
  .drop-skin img { height: 58px; }
  .drop-copy > span { font-size: 13px; }
  .drop-name,
  .drop-action { font-size: 12px; }

  .screen {
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  body[data-screen="home"] .screen-hub,
  body[data-screen="deck"] .screen-home,
  body[data-screen="pvp"] .screen-pvp,
  body[data-screen="players"] .screen-players,
  body[data-screen="profit"] .screen-profit {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  body[data-screen="home"] .screen-hub {
    align-items: stretch;
    justify-content: flex-start;
    padding: 12px 12px 28px;
  }

  .panel,
  .hub-panel,
  .hub-stage,
  .screen-home .hub-stage,
  .screen-pvp .hub-stage {
    width: 100%;
    height: auto;
    min-height: 0;
    overflow: visible;
    padding: 16px 12px 28px;
    border-right: 0;
  }

  .hub-stage { order: -1; }
  .deck-corner { position: static; align-self: flex-start; margin: 0 0 8px; }

  h1, .brand-title, h2.brand-title { font-size: 26px; }
  .now { width: 100%; padding: 0 4px; }
  .now-kicker { font-size: 11px; letter-spacing: 0.12em; }
  .now-name,
  body.is-duel-focus.is-sun-board .now-name {
    font-size: clamp(22px, 7vw, 34px);
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }

  .hub-menu,
  .mode-pick,
  .pvp-modes,
  .deck-pick { width: 100%; }

  .mode-pick,
  .pvp-modes,
  .deck-pick { grid-template-columns: 1fr; gap: 12px; }

  .mode-card { min-height: 0; padding: 14px 12px 16px; }
  .mode-card b { font-size: 22px; }
  .pvp-modes .mode-card b { font-size: 20px; }
  .pvp-modes .mode-mark { width: 84px; height: 84px; }
  .deck-card { padding: 16px 12px 14px; }
  .deck-card b { font-size: 20px; }
  .hub-art,
  .deck-stack { width: min(168px, 46vw); }

  .hub-lead { font-size: 14px; padding: 0 8px; }

  .panel,
  .stage {
    height: auto;
    max-height: none;
    overflow: visible;
  }

  .panel { position: static; }
  .stage { position: relative; }

  .stage {
    min-height: 0;
    justify-content: flex-start;
    gap: 12px;
    padding: 56px 12px 24px;
  }

  .stage-tools { top: 10px; right: 10px; }

  .card-table {
    width: 100%;
    height: min(420px, 54vh);
  }

  .wheel-box,
  body.mode-raffle .wheel-box {
    width: min(100%, 78vw);
    max-width: 420px;
  }

  body.mode-raffle .wheels { flex-direction: column; padding-top: 8px; }
  .spin-btn,
  .duel-pull,
  .duel-win .spin-btn,
  .search-cancel,
  .deck-actions .ghost,
  .deck-actions .spin-btn,
  button.prize-close {
    width: 100%;
    min-width: 0;
    padding: 14px 16px;
    font-size: 16px;
  }

  .hint { padding: 0 8px; text-align: center; font-size: 13px; }

  .duel-board {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .duel-mid { grid-column: 1 / -1; order: -1; min-height: 160px; }
  .duel-side { min-height: 0; padding: 10px 8px; }
  .duel-side b { font-size: 13px; }
  .profile-logo { width: 48px; height: 48px; font-size: 18px; }
  .duel-count,
  .vs-mark,
  .duel-search b,
  .ready-box > b { font-size: 42px; }
  .arcade-clock { font-size: 44px; }
  .arcade-score { font-size: 26px; }

  body.is-creep-board .duel-board.is-live {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "count count"
      "art art"
      "bar bar"
      "you foe"
      "note note";
    column-gap: 8px;
  }

  body.is-creep-board .creep-frame {
    width: min(240px, 70vw);
    height: min(210px, 28vh);
  }

  body.is-creep-board .creep-hp { width: min(100%, 320px); }
  body.is-creep-board .duel-board.is-live .duel-side {
    max-width: none;
    min-height: 0;
    padding: 12px 8px;
  }

  body.is-creep-board .duel-pull { min-width: 0; }
  body.is-creep-board .duel-pull b { font-size: 20px; letter-spacing: 0.08em; }

  .ball-field { height: min(300px, 42vh); border-radius: 16px; }
  .station-field { padding: 14px 10px; border-radius: 16px; }
  .spell-head { grid-template-columns: 72px minmax(0, 1fr); gap: 10px; }
  .spell-icon { width: 72px; height: 72px; border-radius: 16px; }
  .station-spell { font-size: 18px; }
  .station-keys button { width: 64px; height: 64px; }

  .sun-ring,
  #pvpSun.is-spin .sun-ring {
    --size: min(168px, 46vw);
    --orbit: calc(var(--size) / 2 + 34px);
    --seat: 64px;
    max-width: 100%;
  }

  .sun-seat {
    width: 64px;
    min-height: 58px;
    padding: 4px;
    border-radius: 12px;
  }

  .sun-seat .profile-logo { width: 26px; height: 26px; }
  .sun-seat b { font-size: 9px; height: 2.2em; }
  .sun-seat em { font-size: 11px; }
  .sun-roster { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sun-dock { max-height: none; overflow: visible; }

  body.is-duel-focus.is-sun-board #pvpSun.is-live:not(.is-spin):not(.is-result) {
    width: 100%;
    height: auto;
    max-height: none;
    overflow: visible;
  }

  body.is-duel-focus.is-sun-board #pvpSun.is-live:not(.is-spin):not(.is-result) > #sunDock {
    height: auto;
    max-height: none;
    overflow: visible;
  }

  body.is-duel-focus #screenPvp,
  body.is-duel-focus #screenPvp .hub-stage,
  body.is-duel-focus.is-sun-board #screenPvp,
  body.is-duel-focus.is-sun-board #screenPvp .hub-stage,
  body.is-duel-focus.is-creep-board #screenPvp .hub-stage {
    height: auto;
    min-height: 100dvh;
    max-height: none;
    overflow: auto;
  }

  body.is-creep-board #pvpDuel:not(.is-result) {
    width: 100%;
    height: auto;
  }

  .ready-list li {
    grid-template-columns: 36px minmax(0, 1fr) auto;
    gap: 4px 8px;
  }

  .ready-list small { grid-column: 2; }
  .lobby-row,
  .lobby-row form { width: 100%; }
  .lobby-row form { flex-wrap: wrap; justify-content: center; }
  .lobby-row input { width: 120px; min-height: 40px; font-size: 16px; }

  .chance-row {
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr) 48px 42px;
    gap: 6px;
  }

  .chance-name,
  .chance-val,
  .chance-row em { font-size: 11px; }

  .game-deck { min-height: 240px; }
  .game-fan { height: 300px; }
  .game-slot { width: 124px; height: 200px; bottom: 36px; }
  .game-deck.is-prize .game-fan { height: 360px; }
  .game-deck.is-prize .game-slot {
    width: min(210px, 62vw);
    height: min(320px, 94vw);
  }
  .game-deck.is-prize .game-face img { height: 42%; }
  .game-deck.is-prize .game-slot .game-price {
    top: auto;
    bottom: 24%;
    font-size: 16px;
  }
  .game-face b { font-size: 13px; }

  .trade-grid,
  .trade-grid.is-stake { width: 100%; }
  .skin-grid { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); }

  input,
  textarea,
  select { font-size: 16px; }

  .modal,
  .auth-modal,
  .match-cancel { padding: 12px; align-items: end; }

  .modal-card,
  .auth-card,
  .match-cancel-card,
  .duel-win {
    width: 100%;
    max-height: calc(100dvh - 24px);
    overflow: auto;
    padding: 20px 14px 16px;
    border-radius: 20px;
  }

  .auth-card h2,
  .modal-name,
  .duel-win h2 { font-size: 24px; }

  body.show-mode { display: block; overflow: hidden; }
  body.show-mode .stage {
    height: 100dvh;
    min-height: 0;
    padding: 16px 10px;
    overflow: hidden;
  }

  .head-lobby span { display: none; }
  .account-box b { display: none; }
  #accountName { max-width: 64px; }
  .notice-pop { top: 108px; }
  .lobby-card,
  .profile-card { max-height: calc(100dvh - 24px); }
}

.head-lobby,
.head-bell,
.head-sound,
.account-id {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.head-lobby,
.head-bell,
.head-sound {
  position: relative;
  height: 36px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-weight: 800;
}

.head-lobby svg,
.head-bell svg,
.head-sound svg { width: 18px; height: 18px; flex: 0 0 18px; }

.head-bell,
.head-sound { width: 36px; padding: 0; justify-content: center; }

.head-sound.is-off { color: rgba(255, 255, 255, 0.38); }

#noticeBadge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #ff4b4b;
  color: #fff;
  font-style: normal;
  font-size: 10px;
  font-weight: 800;
  line-height: 16px;
  text-align: center;
}

.account-id { min-width: 0; padding: 0; }
.account-id #accountName { display: block; }

button.drop-user {
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.notice-pop {
  position: fixed;
  z-index: 36;
  top: 72px;
  right: 16px;
  width: min(360px, calc(100vw - 24px));
  max-height: min(480px, calc(100dvh - 96px));
  overflow: auto;
  padding: 14px;
  border: 1px solid rgba(255, 214, 140, 0.28);
  border-radius: 18px;
  background: #1a1028;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}

.notice-list,
.person-list { display: grid; gap: 8px; }

.notice-item,
.person-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
}

.notice-item b,
.person-row b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.person-row b .mini-btn {
  border: 0;
  background: transparent;
  padding: 0;
  color: #fff;
  font-size: 14px;
}

.notice-item p,
.person-row small {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.notice-actions,
.person-row .row-actions { display: flex; gap: 6px; }

.notice-empty { margin: 0; color: var(--muted); text-align: center; }

.lobby-card,
.profile-card { width: min(640px, 100%); text-align: left; }

.lobby-modes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.lobby-modes button,
.mini-btn {
  border: 1px solid rgba(255, 214, 140, 0.28);
  border-radius: 12px;
  background: #140e1c;
  color: #fff;
  font-weight: 800;
  padding: 10px 8px;
}

.lobby-modes button.is-on,
.mini-btn.is-on {
  border-color: transparent;
  color: #2a1200;
  background: linear-gradient(180deg, #ffe7a2, #ffc44a 55%, #f08a12);
}

.mini-btn { padding: 8px 10px; font-size: 12px; }

.lobby-guest {
  margin: 8px 0;
  color: #ffd56a;
  font-weight: 800;
  text-align: center;
}

#lobbyPlay {
  display: block;
  width: min(240px, 100%);
  min-width: 0;
  margin: 16px auto 0;
  text-align: center;
  letter-spacing: 0;
}

#lobbyPlay:disabled {
  filter: none;
  color: #ffd56a;
  background: transparent;
  box-shadow: inset 0 0 0 1px rgba(255, 214, 140, 0.45);
  cursor: default;
}

#lobbyPlay:disabled:hover,
#lobbyPlay:disabled:active {
  filter: none;
  transform: none;
}

.profile-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.profile-head img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 2px rgba(255, 214, 140, 0.55);
}

.profile-id { min-width: 0; }
.profile-name {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.profile-head h2 { margin: 0; font-size: 26px; }
.profile-name .mini-btn { flex: 0 0 auto; white-space: nowrap; }
.profile-head p { margin: 4px 0 0; color: var(--muted); }

.profile-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }

#profileGear { max-height: 320px; overflow: auto; }
