:root {
  --gold: #f2ba54;
  --gold-soft: #ffd37a;
  --panel: rgba(19, 14, 9, 0.82);
  --panel-strong: rgba(12, 9, 7, 0.92);
  --line: rgba(242, 186, 84, 0.25);
  --text: #fff5dc;
  --muted: #c9b58d;
  --green: #59e779;
  --red: #ff6b6b;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  background: #120d09;
  overflow-x: hidden;
}
.game-icon,
.nav-icon,
.stat-icon,
.inline-icon,
.button-icon,
.chat-icon,
.avatar-icon,
.card-game-icon,
.big-game-icon,
.combat-game-icon,
.boss-game-icon,
.property-game-icon {
  display: inline-grid;
  place-items: center;
  width: 1.25em;
  aspect-ratio: 1;
  vertical-align: -0.18em;
  object-fit: contain;
}
img.game-icon,
img.nav-icon,
img.stat-icon,
img.inline-icon,
img.button-icon,
img.chat-icon,
img.avatar-icon,
img.card-game-icon,
img.big-game-icon,
img.combat-game-icon,
img.boss-game-icon,
img.property-game-icon {
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.5));
}
.nav-icon {
  width: 22px;
  margin-right: 7px;
}
.stat-icon,
.inline-icon,
.chat-icon,
.button-icon {
  width: 18px;
}
.avatar-icon {
  width: 28px;
}
.card-game-icon {
  width: 38px;
}
.big-game-icon {
  width: 58px;
}
.combat-game-icon,
.boss-game-icon {
  width: 64px;
}
.property-game-icon {
  width: 34px;
}
button, input, select { font: inherit; }
button, .logout, .tabs a {
  border: 1px solid rgba(242, 186, 84, 0.25);
  background: linear-gradient(180deg, #f6c36a, #d99c35);
  color: #1d1208;
  border-radius: 8px;
  padding: 10px 16px;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
}
button:disabled { opacity: .45; cursor: not-allowed; }
input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, .45);
  color: var(--text);
  padding: 12px 14px;
}
.app-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at 50% 14%, rgba(255, 202, 99, .22), transparent 28%),
    radial-gradient(circle at 22% 76%, rgba(145, 35, 24, .18), transparent 34%),
    linear-gradient(90deg, rgba(0,0,0,.78), rgba(34,8,5,.34) 45%, rgba(0,0,0,.82)),
    url('../img/arena-bg.svg') center / cover;
  filter: saturate(.92) contrast(1.08);
}
.app-bg::after {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0,0,0,.12), rgba(0,0,0,.72)),
    repeating-linear-gradient(90deg, rgba(255,255,255,.025) 0 1px, transparent 1px 9px),
    rgba(0, 0, 0, .32);
  z-index: -1;
}
.app-shell {
  position: relative;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 18px;
  width: min(1540px, 100%);
  margin-inline: auto;
  min-height: 100vh;
  padding: 16px;
}
.app-shell::before {
  content: "";
  position: fixed;
  left: 50%;
  top: 0;
  z-index: -1;
  width: min(1180px, 76vw);
  height: 160px;
  transform: translateX(-50%);
  border: 1px solid rgba(242, 186, 84, .18);
  border-top: 0;
  border-radius: 0 0 8px 8px;
  background:
    radial-gradient(circle at 50% 0%, rgba(242,186,84,.18), transparent 48%),
    linear-gradient(180deg, rgba(90,54,24,.36), rgba(15,10,7,.06));
  pointer-events: none;
}
.sidebar {
  position: sticky;
  top: 16px;
  height: calc(100vh - 32px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    radial-gradient(circle at top, rgba(145, 35, 24, .18), transparent 42%),
    linear-gradient(180deg, rgba(34, 17, 10, .95), rgba(7, 6, 5, .96));
  padding: 12px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 24px 60px rgba(0,0,0,.42);
}
.profile {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 10px;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(95, 19, 15, .45), rgba(0,0,0,.18)),
    rgba(0,0,0,.28);
}
.avatar {
  display: grid;
  place-items: center;
  width: 50px;
  aspect-ratio: 1;
  border: 2px solid var(--gold);
  border-radius: 50%;
  background: #120905;
}
.profile span { display: none; }
.side-resources {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin-bottom: 10px;
}
.side-resources span {
  min-width: 0;
  padding: 8px 6px;
  border: 1px solid rgba(242, 186, 84, .22);
  border-radius: 8px;
  background: rgba(0, 0, 0, .34);
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}
.side-resources b {
  display: block;
  color: var(--gold-soft);
  font-size: 13px;
}
.nav { display: grid; gap: 8px; }
.nav-group {
  border: 1px solid rgba(242, 186, 84, .2);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(24, 12, 8, .76), rgba(0,0,0,.42));
  overflow: hidden;
}
.nav-group summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 9px 11px;
  color: #ffe0a0;
  cursor: pointer;
  font-weight: 900;
  list-style: none;
}
.nav-group summary::-webkit-details-marker { display: none; }
.nav-group summary::after {
  content: "+";
  margin-left: auto;
  color: var(--gold);
  font-weight: 900;
}
.nav-group[open] summary {
  background:
    linear-gradient(90deg, rgba(133, 32, 23, .55), rgba(45, 25, 12, .44));
  border-bottom: 1px solid rgba(242, 186, 84, .16);
}
.nav-group[open] summary::after { content: "-"; }
.nav-group summary span {
  display: grid;
  place-items: center;
  width: 28px;
  aspect-ratio: 1;
  border: 1px solid rgba(242, 186, 84, .42);
  border-radius: 8px;
  color: #1d1208;
  background: linear-gradient(180deg, #f5c66d, #b87925);
  font-size: 11px;
}
.nav-group summary .nav-icon,
.nav a .nav-icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 26px;
  margin-right: 0;
  aspect-ratio: 1;
  border: 1px solid rgba(242, 186, 84, .42);
  border-radius: 8px;
  color: #1d1208;
  background: linear-gradient(180deg, #f5c66d, #b87925);
  font-size: 16px;
}
.nav-group > div {
  display: grid;
  gap: 6px;
  padding: 8px;
}
.nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 33px;
  padding: 7px 10px;
  border: 1px solid rgba(242, 186, 84, .18);
  border-radius: 8px;
  color: var(--text);
  background: linear-gradient(90deg, rgba(0, 0, 0, .58), rgba(55, 31, 16, .28));
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
}
.nav a span {
  display: grid;
  place-items: center;
  width: 24px;
  aspect-ratio: 1;
  border-radius: 7px;
  background: rgba(242, 186, 84, .1);
  color: var(--gold-soft);
  font-size: 0;
}
.nav a span::before {
  content: "";
  width: 7px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: currentColor;
}
.nav a .nav-icon::before {
  display: none;
}
.nav a .nav-icon {
  width: 24px;
  border-color: transparent;
  color: var(--gold-soft);
  background: rgba(242, 186, 84, .1);
}
.nav a.active {
  background:
    linear-gradient(90deg, rgba(242, 186, 84, .28), rgba(118, 31, 20, .34)),
    rgba(0,0,0,.36);
  color: #fff;
  border-color: var(--gold);
  box-shadow: inset 4px 0 0 #d44b32;
}
.main {
  min-width: 0;
  padding-bottom: 116px;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: minmax(170px, .9fr) minmax(250px, 1.2fr) minmax(250px, 1.1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 72px;
  padding: 10px;
  background:
    linear-gradient(180deg, rgba(255, 221, 143, .045), transparent 46%),
    linear-gradient(90deg, rgba(9, 7, 5, .96), rgba(30, 17, 11, .94) 42%, rgba(10, 7, 5, .96));
  border: 1px solid rgba(242, 186, 84, .28);
  border-radius: 8px;
  backdrop-filter: blur(8px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 18px 44px rgba(0,0,0,.32);
}
.topbar-player {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
}
.topbar-avatar {
  width: 46px;
  border-width: 1px;
  box-shadow: 0 0 22px rgba(242, 186, 84, .12);
}
.topbar-avatar .avatar-icon.is-fallback,
.topbar-resources .stat-icon.is-fallback {
  font-size: 0;
}
.topbar-avatar .avatar-icon.is-fallback::before {
  content: "";
  width: 16px;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid currentColor;
  box-shadow: inset 0 0 0 4px rgba(242, 186, 84, .16);
}
.topbar-resources .stat-icon.is-fallback {
  display: none;
}
.topbar-identity {
  display: grid;
  gap: 8px;
  min-width: 0;
}
.topbar-identity > div:first-child {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}
.topbar-identity b {
  color: var(--gold-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.topbar-identity span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.topbar-progress {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(0, 0, 0, .58);
  box-shadow: inset 0 0 0 1px rgba(242, 186, 84, .14);
}
.topbar-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #65e879, #f7d36b);
}
.topbar-resources,
.topbar-combat {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  min-width: 0;
}
.topbar-resources span,
.topbar-combat span {
  display: grid;
  gap: 4px;
  min-width: 0;
  min-height: 50px;
  align-content: center;
  padding: 7px 9px;
  border: 1px solid rgba(242, 186, 84, .16);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(42, 24, 14, .62), rgba(0,0,0,.36));
}
.topbar-resources small,
.topbar-combat small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1;
}
.topbar-resources b,
.topbar-combat b {
  color: var(--gold-soft);
  font-size: 14px;
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.topbar-combat b {
  color: #fff1ca;
}
.topbar > .stats {
  display: none;
}
.topbar .logout {
  justify-self: end;
  min-height: 50px;
  display: inline-grid;
  place-items: center;
  padding-inline: 18px;
}
.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  font-size: 14px;
}
.stats b { color: var(--gold-soft); }
.content { margin-top: 16px; }
.quick-nav {
  position: sticky;
  top: 92px;
  z-index: 4;
  display: none;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
  padding: 8px;
  border: 1px solid rgba(242, 186, 84, .22);
  border-radius: 8px;
  background: rgba(8, 6, 5, .82);
  backdrop-filter: blur(8px);
}
.quick-nav a {
  display: grid;
  place-items: center;
  min-height: 38px;
  border: 1px solid rgba(242, 186, 84, .18);
  border-radius: 8px;
  color: var(--muted);
  background: linear-gradient(180deg, rgba(36, 19, 12, .82), rgba(0,0,0,.42));
  text-decoration: none;
  font-weight: 900;
}
.quick-nav a.active,
.quick-nav a:hover {
  color: #201307;
  border-color: rgba(255, 224, 150, .7);
  background: linear-gradient(180deg, #ffd77d, #bc7c27);
}
.flash-stack { display: grid; gap: 8px; margin-top: 12px; }
.flash {
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(0,0,0,.72);
  border: 1px solid var(--line);
}
.flash.success { border-color: rgba(89, 231, 121, .45); color: #a8ffb7; }
.flash.error { border-color: rgba(255, 107, 107, .5); color: #ffb0b0; }
.flash.info { border-color: rgba(93, 188, 255, .5); color: #acdfff; }
.empty-state {
  display: grid;
  gap: 8px;
  max-width: 760px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}
.empty-state h2 {
  color: var(--gold);
}
.empty-state p,
.empty-state small {
  color: var(--muted);
}
.empty-state.error-state {
  border-color: rgba(255, 107, 107, .48);
}
.empty-state.error-state h2 {
  color: #ffb0b0;
}
.job-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.job-pill {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}
.job-pill-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 104px;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 212, 118, .5);
  border-radius: 7px;
  background: linear-gradient(180deg, var(--gold-soft), var(--gold));
  color: #1a0e05;
  font-weight: 900;
  text-align: center;
}
.job-pill span, small, p { color: var(--muted); }
.hero-card, .page-title, .arena-hero {
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    radial-gradient(circle at 12% 0%, rgba(242, 186, 84, .16), transparent 34%),
    linear-gradient(135deg, rgba(40, 18, 10, .88), rgba(9, 7, 6, .88));
  padding: 24px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 20px 52px rgba(0,0,0,.28);
}
h1, h2 { margin: 0 0 10px; color: var(--gold-soft); }
.dashboard-hero {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 18px;
  align-items: center;
  position: relative;
  overflow: hidden;
  min-height: 164px;
}
.dashboard-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 34%, rgba(242, 186, 84, .2), transparent 28%),
    linear-gradient(90deg, rgba(0,0,0,.74), rgba(74,20,14,.34) 58%, rgba(0,0,0,.68)),
    url('../img/battle-banner.svg') center / cover;
  opacity: .62;
  z-index: 0;
}
.dashboard-hero > * {
  position: relative;
  z-index: 1;
}
.dashboard-hero h1 {
  font-size: clamp(32px, 4vw, 54px);
  text-shadow: 0 4px 24px rgba(0,0,0,.64);
}
.progress {
  height: 12px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(0,0,0,.55);
}
.progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #ffcf62, #67e87d);
}
.energy-card {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0,0,0,.58);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.04);
}
.energy-card strong { color: var(--gold); font-size: 28px; }
.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(600px, 1.55fr) minmax(240px, .65fr);
  gap: 16px;
  margin-top: 16px;
}
.equipment-panel, .inventory-panel, .stats-panel, .character-panel, .bank-grid article, .bank-grid form, .table-card, .filters, .reward-panel, .dungeon-list, .boss-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(25, 15, 10, .9), rgba(8, 7, 6, .9)),
    radial-gradient(circle at top right, rgba(155, 45, 35, .18), transparent 40%);
  padding: 18px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04), 0 16px 42px rgba(0,0,0,.22);
}
.equipment-panel,
.inventory-panel,
.stats-panel,
.character-panel {
  position: relative;
  overflow: hidden;
}
.equipment-panel::before,
.inventory-panel::before,
.stats-panel::before,
.character-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(120deg, rgba(255,255,255,.045), transparent 22%),
    repeating-linear-gradient(0deg, rgba(255,255,255,.018) 0 1px, transparent 1px 8px);
}
.equipment-panel > *,
.inventory-panel > *,
.stats-panel > *,
.character-panel > * {
  position: relative;
  z-index: 1;
}
.dashboard-grid > .inventory-panel,
.dashboard-grid > .stats-panel:not(.compact) {
  display: none;
}
.panel-head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 14px;
}
.panel-head p {
  margin: 0;
}
.panel-head button {
  white-space: nowrap;
}
.character-panel {
  display: grid;
  align-content: start;
  gap: 16px;
}
.character-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.character-summary article {
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(242, 186, 84, .18);
  border-radius: 8px;
  background: rgba(0,0,0,.32);
}
.character-summary span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.character-summary b {
  display: block;
  margin-top: 5px;
  color: var(--gold-soft);
  font-size: 20px;
}
.stats-panel.compact {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}
.stats-panel.compact::before {
  display: none;
}
.paperdoll {
  display: grid;
  grid-template-columns: 90px minmax(140px, 1fr) 90px;
  gap: 12px;
  align-items: center;
  min-height: 420px;
  position: relative;
  padding: 12px;
  border: 1px solid rgba(242, 186, 84, .16);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 42%, rgba(242,186,84,.2), transparent 34%),
    linear-gradient(180deg, rgba(0,0,0,.12), rgba(0,0,0,.48));
}
.paperdoll::before {
  content: "";
  position: absolute;
  inset: 12px 18%;
  z-index: 0;
  border: 1px solid rgba(242, 186, 84, .14);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(116, 31, 20, .18), transparent 62%);
  pointer-events: none;
}
.paperdoll > * {
  position: relative;
  z-index: 1;
}
.slot {
  position: relative;
  display: grid;
  place-items: center;
  gap: 4px;
  min-height: 74px;
  border: 1px solid rgba(242, 186, 84, .55);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(21, 17, 13, .9), rgba(0,0,0,.64)),
    radial-gradient(circle at top, rgba(242,186,84,.12), transparent 54%);
  color: var(--muted);
  text-align: center;
  padding: 8px;
  overflow: hidden;
}
.slot::after {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(255,255,255,.035);
  border-radius: 6px;
  pointer-events: none;
}
.slot.filled {
  border-color: var(--gold);
  background:
    radial-gradient(circle at 50% 15%, rgba(255, 218, 139, .24), transparent 42%),
    linear-gradient(180deg, rgba(83, 42, 15, .7), rgba(0,0,0,.62));
  color: var(--text);
  cursor: pointer;
  box-shadow: 0 0 24px rgba(242,186,84,.12);
}
.slot.filled:focus-visible {
  outline: 2px solid rgba(255, 224, 140, .72);
  outline-offset: 2px;
}
.slot span {
  font-size: 26px;
  line-height: 1;
}
.slot.filled .item-art {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 58px;
  height: 68px;
  aspect-ratio: auto;
  max-width: none;
  border: 0;
  background: transparent;
  box-shadow: none;
  overflow: hidden;
  transform: translate(-50%, -50%);
}
.slot.filled .item-art img {
  place-self: center;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
}
.slot-weapon.filled .item-art {
  width: 94px;
  height: 468px;
}
.slot-amulet.filled .item-art {
  width: 48px;
  height: 72px;
}
.slot-amulet.filled .item-art img {
  width: 92%;
  height: 92%;
}
.slot-gloves.filled .item-art {
  width: 54px;
  height: 62px;
}
.slot-gloves.filled .item-art img {
  width: 96%;
  height: 96%;
}
.slot-shoulder.filled .item-art {
  width: 68px;
  height: 66px;
}
.slot-shoulder.filled .item-art img {
  width: 96%;
  height: 96%;
}
.slot-talisman.filled .item-art {
  width: 38px;
  height: 54px;
}
.slot-talisman.filled .item-art img {
  width: 92%;
  height: 92%;
}
.slot-pants.filled .item-art {
  width: 76px;
  height: 78px;
}
.slot-pants.filled .item-art img {
  width: 108%;
  height: 108%;
}
.slot-ring.filled .item-art {
  width: 64px;
  height: 64px;
}
.slot-ring.filled .item-art img {
  width: 110%;
  height: 110%;
}
.character-paperdoll .slot:not(.slot-weapon) {
  min-height: 84px;
  height: 84px;
}
.slot .slot-upgrade-badge {
  position: absolute;
  right: 2px;
  bottom: 2px;
  z-index: 2;
  min-width: 9px;
  padding: 1px 2px;
  border: 1px solid rgba(22, 255, 117, .62);
  border-radius: 999px;
  background: rgba(8, 20, 10, .86);
  color: #55ff86;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .85);
  box-shadow: 0 0 8px rgba(35, 255, 111, .16);
  pointer-events: none;
}
.slot b {
  max-width: 100%;
  color: var(--gold-soft);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.slot small {
  font-size: 11px;
}
.slot-empty-label {
  color: rgba(255, 232, 181, .72);
}
.slot.drag-over {
  border-color: #79ff9a;
  box-shadow: 0 0 0 2px rgba(89, 231, 121, .18), 0 0 26px rgba(89, 231, 121, .2);
}
.item-art {
  --art-metal-a: #fff6d8;
  --art-metal-b: #b7b9bc;
  --art-leather: #5d3922;
  --art-accent: #d9a848;
  --art-gem: #f2ba54;
  --art-glow: rgba(242, 186, 84, .26);
  position: relative;
  display: grid;
  place-items: center;
  width: 34px;
  aspect-ratio: 1;
  border: 1px solid rgba(242, 186, 84, .38);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 30%, rgba(255,255,255,.2), transparent 35%),
    linear-gradient(145deg, rgba(132, 38, 28, .72), rgba(20, 11, 7, .92));
  color: transparent;
  font-size: 0;
  overflow: hidden;
}
.item-art.item-art-image::before,
.item-art.item-art-image::after {
  display: none;
}
.item-art img {
  position: relative;
  z-index: 1;
  width: 84%;
  height: 84%;
  object-fit: contain;
  object-position: center;
  filter: drop-shadow(0 5px 8px rgba(0,0,0,.56));
}
.item-art-gloves-common img,
.item-art-gloves-uncommon img,
.item-art-gloves-rare img,
.item-art-gloves-epic img,
.item-art-gloves-legendary img {
  width: 112%;
  height: 112%;
}
.item-art::before,
.item-art::after {
  content: "";
  position: absolute;
}
.item-art-weapon-common::before,
.item-art-weapon-uncommon::before,
.item-art-weapon-rare::before,
.item-art-weapon-epic::before,
.item-art-weapon-legendary::before,
.item-art[class*="item-art-weapon-sword-"]::before {
  width: 5px;
  height: 72%;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--art-metal-a), var(--art-metal-b) 55%, var(--art-leather) 56%);
  transform: rotate(-28deg);
  box-shadow: 0 0 12px var(--art-glow);
}
.item-art-weapon-common::after,
.item-art-weapon-uncommon::after,
.item-art-weapon-rare::after,
.item-art-weapon-epic::after,
.item-art-weapon-legendary::after,
.item-art[class*="item-art-weapon-sword-"]::after {
  width: 18px;
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(90deg, #3c1a10, var(--art-accent), #3c1a10);
  transform: translate(-2px, 8px) rotate(-28deg);
}
.item-art[class*="item-art-weapon-greatsword-"]::before {
  width: 8px;
  height: 78%;
  border-radius: 9px 9px 2px 2px;
  clip-path: polygon(50% 0, 83% 14%, 64% 72%, 50% 100%, 36% 72%, 17% 14%);
  background:
    linear-gradient(90deg, rgba(255,255,255,.7), transparent 34%),
    linear-gradient(180deg, var(--art-metal-a), var(--art-metal-b) 68%, var(--art-leather) 69%);
  transform: rotate(-18deg);
  box-shadow: 0 0 16px var(--art-glow);
}
.item-art[class*="item-art-weapon-greatsword-"]::after {
  width: 24px;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, #2a0f0b, var(--art-accent), #2a0f0b);
  transform: translate(-2px, 9px) rotate(-18deg);
  box-shadow: 0 8px 0 -2px var(--art-leather);
}
.item-art[class*="item-art-weapon-runeblade-"]::before {
  width: 11px;
  height: 78%;
  border-radius: 10px 10px 3px 3px;
  clip-path: polygon(52% 0, 86% 16%, 68% 46%, 80% 64%, 56% 100%, 40% 100%, 52% 64%, 27% 48%, 42% 22%);
  background:
    radial-gradient(circle at 55% 34%, var(--art-gem) 0 10%, transparent 12%),
    linear-gradient(90deg, rgba(255,255,255,.86), transparent 38%),
    linear-gradient(180deg, #f9f0d5, #9aa7b9 62%, #452015 63%);
  transform: rotate(-24deg);
  box-shadow: 0 0 18px var(--art-glow), inset 0 0 10px rgba(255,255,255,.16);
}
.item-art[class*="item-art-weapon-runeblade-"]::after {
  width: 22px;
  height: 7px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 50% 50%, var(--art-gem) 0 18%, transparent 20%),
    linear-gradient(90deg, #2a0f0b, var(--art-accent), #2a0f0b);
  transform: translate(-1px, 8px) rotate(-24deg);
}
.item-art[class*="item-art-weapon-axe-"]::before {
  width: 5px;
  height: 76%;
  border-radius: 999px;
  background: linear-gradient(180deg, #9a642d, #3a1a0e);
  transform: rotate(-24deg);
  box-shadow: 0 0 10px rgba(0,0,0,.34);
}
.item-art[class*="item-art-weapon-axe-"]::after {
  width: 23px;
  height: 18px;
  top: 7px;
  left: 7px;
  border-radius: 12px 4px 14px 4px;
  clip-path: polygon(8% 20%, 62% 0, 100% 32%, 74% 48%, 100% 70%, 58% 100%, 8% 80%, 38% 50%);
  background:
    linear-gradient(135deg, rgba(255,255,255,.78), transparent 38%),
    linear-gradient(180deg, var(--art-metal-a), var(--art-metal-b) 62%, #75624e);
  transform: rotate(-24deg);
  box-shadow: 0 0 16px var(--art-glow);
}
.item-art[class*="item-art-weapon-staff-"]::before {
  width: 5px;
  height: 82%;
  border-radius: 999px;
  background:
    linear-gradient(180deg, var(--art-accent), #8b4a24 42%, #3a1a0e);
  transform: rotate(24deg);
  box-shadow: 0 0 12px rgba(0,0,0,.24);
}
.item-art[class*="item-art-weapon-staff-"]::after {
  width: 17px;
  aspect-ratio: 1;
  top: 3px;
  right: 7px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 32%, #fff, transparent 18%),
    radial-gradient(circle, var(--art-gem), #4a1d70 68%, #190923);
  box-shadow: 0 0 18px var(--art-glow), 0 0 0 3px rgba(89, 42, 18, .7);
}
.item-art[class*="item-art-weapon-dagger-"]::before {
  width: 7px;
  height: 56%;
  top: 6px;
  border-radius: 8px 8px 2px 2px;
  clip-path: polygon(50% 0, 84% 20%, 62% 82%, 50% 100%, 38% 82%, 16% 20%);
  background:
    linear-gradient(90deg, rgba(255,255,255,.86), transparent 38%),
    linear-gradient(180deg, var(--art-metal-a), var(--art-metal-b) 72%, var(--art-leather) 73%);
  transform: rotate(28deg);
  box-shadow: 0 0 14px var(--art-glow);
}
.item-art[class*="item-art-weapon-dagger-"]::after {
  width: 16px;
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(90deg, #2a0f0b, var(--art-accent), #2a0f0b);
  transform: translate(2px, 9px) rotate(28deg);
}
.item-art[class*="item-art-weapon-bow-"]::before {
  width: 64%;
  height: 76%;
  border: 5px solid #8b4a24;
  border-left-color: transparent;
  border-radius: 50%;
  transform: rotate(10deg);
  box-shadow: inset -4px 0 0 rgba(255,255,255,.12), 0 0 14px var(--art-glow);
}
.item-art[class*="item-art-weapon-bow-"]::after {
  width: 2px;
  height: 74%;
  background: linear-gradient(180deg, transparent, var(--art-metal-a) 16% 84%, transparent);
  transform: rotate(10deg) translateX(9px);
  box-shadow: 9px 4px 0 -1px var(--art-gem);
}
.item-art[class*="item-art-weapon-spear-"]::before {
  width: 4px;
  height: 82%;
  border-radius: 999px;
  background: linear-gradient(180deg, #9a642d, #3a1a0e);
  transform: rotate(-28deg);
}
.item-art[class*="item-art-weapon-spear-"]::after {
  width: 13px;
  height: 23px;
  top: 3px;
  border-radius: 12px 12px 2px 2px;
  clip-path: polygon(50% 0, 95% 38%, 64% 100%, 36% 100%, 5% 38%);
  background: linear-gradient(180deg, var(--art-metal-a), var(--art-metal-b) 72%, #75624e);
  transform: rotate(-28deg) translateX(-2px);
  box-shadow: 0 0 16px var(--art-glow);
}
.item-art[class*="item-art-weapon-hammer-"]::before {
  width: 5px;
  height: 76%;
  border-radius: 999px;
  background: linear-gradient(180deg, #9a642d, #3a1a0e);
  transform: rotate(-26deg);
}
.item-art[class*="item-art-weapon-hammer-"]::after {
  width: 24px;
  height: 15px;
  top: 8px;
  border-radius: 4px;
  background:
    linear-gradient(90deg, #6e6258, var(--art-metal-a) 28%, var(--art-metal-b) 72%, #6e6258);
  transform: rotate(-26deg);
  box-shadow: 0 0 14px var(--art-glow);
}
.item-art-gloves-common::before,
.item-art-gloves-uncommon::before,
.item-art-gloves-rare::before,
.item-art-gloves-epic::before,
.item-art-gloves-legendary::before {
  width: 42%;
  height: 56%;
  bottom: 20%;
  left: 23%;
  border-radius: 8px 8px 12px 12px;
  clip-path: polygon(22% 0, 72% 0, 92% 40%, 72% 100%, 18% 100%, 0 42%);
  background:
    linear-gradient(135deg, rgba(255,255,255,.32), transparent 38%),
    linear-gradient(180deg, #c9a35d, #6f2a1c 70%, #2b1710);
  box-shadow: 14px 5px 0 -2px rgba(111, 42, 28, .92), 0 0 14px var(--art-glow);
}
.item-art-gloves-common::after,
.item-art-gloves-uncommon::after,
.item-art-gloves-rare::after,
.item-art-gloves-epic::after,
.item-art-gloves-legendary::after {
  width: 38%;
  height: 9%;
  left: 29%;
  bottom: 42%;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--art-accent), transparent);
}
.item-art-shield-common::before,
.item-art-shield-uncommon::before,
.item-art-shield-rare::before,
.item-art-shield-epic::before,
.item-art-shield-legendary::before {
  width: 60%;
  height: 70%;
  border-radius: 46% 46% 50% 50% / 30% 30% 70% 70%;
  clip-path: polygon(50% 0, 92% 15%, 82% 72%, 50% 100%, 18% 72%, 8% 15%);
  background:
    radial-gradient(circle at 50% 44%, var(--art-gem) 0 13%, transparent 15%),
    linear-gradient(90deg, #6f241b 0 47%, #d1b171 48% 52%, #2d5386 53% 100%);
  box-shadow: inset 0 0 0 3px rgba(255, 220, 142, .26), 0 0 18px var(--art-glow);
}
.item-art-helmet-common::before,
.item-art-helmet-uncommon::before,
.item-art-helmet-rare::before,
.item-art-helmet-epic::before,
.item-art-helmet-legendary::before {
  width: 62%;
  height: 44%;
  border-radius: 50% 50% 12% 12%;
  background: linear-gradient(180deg, #e8d6a7, #6e6258);
  bottom: 24%;
}
.item-art-chest-common::before,
.item-art-chest-uncommon::before,
.item-art-chest-rare::before,
.item-art-chest-epic::before,
.item-art-chest-legendary::before,
.item-art-shoulder-common::before,
.item-art-shoulder-uncommon::before,
.item-art-shoulder-rare::before,
.item-art-shoulder-epic::before,
.item-art-shoulder-legendary::before {
  width: 58%;
  height: 68%;
  border-radius: 10px 10px 4px 4px;
  background: linear-gradient(180deg, #c9a35d, #6f2a1c);
}
.item-art-boots-common::before,
.item-art-boots-uncommon::before,
.item-art-boots-rare::before,
.item-art-boots-epic::before,
.item-art-boots-legendary::before {
  width: 58%;
  height: 36%;
  border-radius: 8px;
  background: linear-gradient(90deg, #9c5a31, #2b1710);
  bottom: 24%;
}
.item-art-pants-common::before,
.item-art-pants-uncommon::before,
.item-art-pants-rare::before,
.item-art-pants-epic::before,
.item-art-pants-legendary::before,
.item-art-cloak-common::before,
.item-art-cloak-uncommon::before,
.item-art-cloak-rare::before,
.item-art-cloak-epic::before,
.item-art-cloak-legendary::before {
  width: 56%;
  height: 70%;
  clip-path: polygon(30% 0, 70% 0, 92% 100%, 8% 100%);
  background: linear-gradient(180deg, #a71918, #45100d);
}
.item-art-amulet-common::before,
.item-art-amulet-uncommon::before,
.item-art-amulet-rare::before,
.item-art-amulet-epic::before,
.item-art-amulet-legendary::before,
.item-art-talisman-common::before,
.item-art-talisman-uncommon::before,
.item-art-talisman-rare::before,
.item-art-talisman-epic::before,
.item-art-talisman-legendary::before {
  width: 42%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, #8fffd0, #17794f 60%, #083225);
}
.item-art[class*="-uncommon"] {
  --art-gem: #59e779;
  --art-glow: rgba(89, 231, 121, .3);
  border-color: rgba(89, 231, 121, .5);
}
.item-art[class*="-rare"] {
  --art-gem: #5dbcff;
  --art-glow: rgba(93, 188, 255, .32);
  border-color: rgba(93, 188, 255, .56);
}
.item-art[class*="-epic"] {
  --art-gem: #c370ff;
  --art-glow: rgba(195, 112, 255, .34);
  border-color: rgba(195, 112, 255, .62);
}
.item-art[class*="-legendary"] {
  --art-gem: #ffcc5c;
  --art-glow: rgba(255, 204, 92, .4);
  border-color: rgba(255, 204, 92, .82);
  box-shadow: 0 0 20px rgba(255, 204, 92, .2);
}
.fighter {
  position: relative;
  grid-row: span 3;
  display: grid;
  place-items: center;
  min-height: 300px;
  border-radius: 8px;
  border: 1px solid rgba(242, 186, 84, .24);
  background:
    url('../img/gladiator-portrait.svg') center bottom / contain no-repeat,
    radial-gradient(circle at 50% 18%, rgba(255, 208, 116, .26), transparent 28%),
    linear-gradient(180deg, rgba(82, 31, 17, .58), rgba(0,0,0,.72)),
    repeating-linear-gradient(90deg, rgba(242,186,84,.12) 0 2px, transparent 2px 28px);
  color: transparent;
  font-size: 0;
  box-shadow: inset 0 -80px 80px rgba(0,0,0,.62);
}
.fighter::before {
  content: "";
  width: min(72%, 190px);
  aspect-ratio: 2 / 3;
  background:
    radial-gradient(circle at 50% 14%, #f0d5aa 0 9%, transparent 10%),
    linear-gradient(90deg, transparent 0 33%, #8e1f18 33% 44%, #d5b16a 44% 57%, #8e1f18 57% 68%, transparent 68%),
    linear-gradient(165deg, transparent 0 38%, #dac39a 38% 44%, transparent 44%),
    linear-gradient(195deg, transparent 0 38%, #dac39a 38% 44%, transparent 44%),
    linear-gradient(180deg, transparent 0 18%, #74605a 18% 40%, #191411 40% 72%, transparent 72%);
  filter: drop-shadow(0 14px 18px rgba(0,0,0,.72));
  clip-path: polygon(42% 0, 58% 0, 66% 18%, 78% 38%, 64% 47%, 72% 100%, 28% 100%, 36% 47%, 22% 38%, 34% 18%);
}
.fighter::before {
  display: none;
}
.fighter::after {
  content: "Arena Hazir";
  position: absolute;
  bottom: 18px;
  color: var(--gold-soft);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
}
.avatar-select-title {
  align-items: end;
}
.avatar-select-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.avatar-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(242, 186, 84, .26);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(25, 15, 10, .9), rgba(8, 7, 6, .92)),
    radial-gradient(circle at 50% 18%, rgba(242, 186, 84, .18), transparent 40%);
  color: var(--text);
  text-align: left;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04), 0 16px 36px rgba(0,0,0,.24);
}
.avatar-card.selected {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(242, 186, 84, .16), 0 18px 38px rgba(0,0,0,.28);
}
.avatar-card-art {
  display: grid;
  place-items: end center;
  height: 250px;
  overflow: hidden;
  border: 1px solid rgba(242, 186, 84, .18);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 90%, rgba(0,0,0,.55), transparent 32%),
    radial-gradient(circle at 50% 30%, rgba(255, 214, 135, .14), transparent 38%),
    linear-gradient(180deg, rgba(255,255,255,.035), rgba(0,0,0,.2));
}
.avatar-card-art img {
  width: auto;
  max-width: 95%;
  max-height: 240px;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 18px 20px rgba(0,0,0,.62));
}
.avatar-card h2 {
  margin: 0 0 4px;
  color: var(--gold-soft);
}
.avatar-card strong {
  display: block;
  color: var(--gold);
}
.avatar-card p {
  margin: 8px 0 0;
  color: var(--muted);
}
.character-paperdoll {
  grid-template-columns: 110px 84px minmax(280px, 320px) 84px;
  grid-template-rows: repeat(6, 84px);
  grid-template-areas:
    "weapon helmet stage shield"
    "weapon ring stage chest"
    "weapon shoulder stage gloves"
    "weapon cloak stage pants"
    "weapon talisman stage amulet"
    "weapon . stage boots";
  align-items: stretch;
  justify-content: center;
  min-height: 560px;
}
.character-paperdoll::before {
  inset: 16px 22%;
}
.character-paperdoll .slot-helmet { grid-area: helmet; }
.character-paperdoll .slot-weapon { grid-area: weapon; }
.character-paperdoll .slot-shield { grid-area: shield; }
.character-paperdoll .slot-ring { grid-area: ring; }
.character-paperdoll .slot-shoulder { grid-area: shoulder; }
.character-paperdoll .slot-chest { grid-area: chest; }
.character-paperdoll .slot-gloves { grid-area: gloves; }
.character-paperdoll .slot-pants { grid-area: pants; }
.character-paperdoll .slot-boots { grid-area: boots; }
.character-paperdoll .slot-amulet { grid-area: amulet; }
.character-paperdoll .slot-cloak { grid-area: cloak; }
.character-paperdoll .slot-talisman { grid-area: talisman; }
.avatar-stage {
  --helmet-x: 42%;
  --helmet-y: 4%;
  --helmet-w: 16%;
  --helmet-h: 13%;
  --helmet-wear-x: 37%;
  --helmet-wear-y: 18%;
  --helmet-wear-w: 26%;
  --helmet-wear-h: 19%;
  --shoulder-x: 23%;
  --shoulder-y: 20%;
  --shoulder-w: 54%;
  --shoulder-h: 17%;
  --chest-x: 31%;
  --chest-y: 25%;
  --chest-w: 38%;
  --chest-h: 26%;
  --chest-wear-x: 19%;
  --chest-wear-y: 32%;
  --chest-wear-w: 62%;
  --chest-wear-h: 27%;
  --gloves-x: 9%;
  --gloves-y: 35%;
  --gloves-w: 82%;
  --gloves-h: 16%;
  --glove-left-x: 10%;
  --glove-right-x: 72%;
  --glove-y: 42%;
  --glove-w: 18%;
  --glove-h: 29%;
  --glove-left-rotate: 8deg;
  --glove-right-rotate: -8deg;
  --pants-x: 34%;
  --pants-y: 51%;
  --pants-w: 32%;
  --pants-h: 21%;
  --pants-wear-x: 31%;
  --pants-wear-y: 54%;
  --pants-wear-w: 38%;
  --pants-wear-h: 20%;
  --boots-x: 28%;
  --boots-y: 76%;
  --boots-w: 44%;
  --boots-h: 15%;
  --boot-left-x: 18%;
  --boot-right-x: 56%;
  --boot-y: 72%;
  --boot-w: 25%;
  --boot-h: 24%;
  --boot-left-rotate: 8deg;
  --boot-right-rotate: -8deg;
  --cloak-x: 20%;
  --cloak-y: 12%;
  --cloak-w: 60%;
  --cloak-h: 74%;
  --amulet-x: 44%;
  --amulet-y: 25%;
  --amulet-w: 12%;
  --amulet-h: 11%;
  --talisman-x: 44%;
  --talisman-y: 64%;
  --talisman-w: 12%;
  --talisman-h: 11%;
  --weapon-x: -5%;
  --weapon-y: 25%;
  --weapon-w: 34%;
  --weapon-h: 58%;
  --shield-x: 72%;
  --shield-y: 31%;
  --shield-w: 28%;
  --shield-h: 36%;
  position: relative;
  grid-area: stage;
  width: min(100%, 320px);
  justify-self: center;
  min-height: 500px;
  overflow: hidden;
  border: 1px solid rgba(242, 186, 84, .2);
  border-radius: 8px;
  background:
    radial-gradient(ellipse at 50% 94%, rgba(0,0,0,.7), transparent 32%),
    radial-gradient(circle at 50% 26%, rgba(255, 211, 122, .16), transparent 34%),
    linear-gradient(180deg, rgba(78, 34, 19, .38), rgba(0,0,0,.68));
  box-shadow: inset 0 -90px 90px rgba(0,0,0,.54);
}
.arena-stage-rookie {
  --arena-a: rgba(92, 61, 37, .38);
  --arena-b: rgba(20, 14, 10, .72);
  --arena-glow: rgba(242, 186, 84, .16);
}
.arena-stage-bronze {
  --arena-a: rgba(142, 80, 35, .42);
  --arena-b: rgba(30, 15, 9, .72);
  --arena-glow: rgba(224, 126, 52, .2);
}
.arena-stage-iron {
  --arena-a: rgba(78, 86, 92, .42);
  --arena-b: rgba(10, 14, 17, .74);
  --arena-glow: rgba(170, 190, 205, .2);
}
.arena-stage-silver {
  --arena-a: rgba(126, 151, 166, .42);
  --arena-b: rgba(12, 20, 24, .74);
  --arena-glow: rgba(210, 235, 255, .22);
}
.arena-stage-gold {
  --arena-a: rgba(191, 132, 34, .44);
  --arena-b: rgba(42, 24, 6, .76);
  --arena-glow: rgba(255, 207, 91, .24);
}
.arena-stage-platinum {
  --arena-a: rgba(89, 166, 154, .42);
  --arena-b: rgba(9, 31, 33, .76);
  --arena-glow: rgba(116, 255, 229, .22);
}
.arena-stage-epic {
  --arena-a: rgba(120, 65, 171, .44);
  --arena-b: rgba(23, 10, 38, .78);
  --arena-glow: rgba(195, 112, 255, .25);
}
.arena-stage-legend {
  --arena-a: rgba(173, 39, 39, .44);
  --arena-b: rgba(35, 8, 8, .8);
  --arena-glow: rgba(255, 88, 75, .24);
}
.avatar-stage[class*="arena-stage-"] {
  background:
    radial-gradient(ellipse at 50% 94%, rgba(0,0,0,.7), transparent 32%),
    radial-gradient(circle at 50% 22%, var(--arena-glow), transparent 36%),
    linear-gradient(180deg, var(--arena-a), var(--arena-b));
}
.avatar-arena-name {
  position: absolute;
  top: 18px;
  left: 50%;
  z-index: 0;
  transform: translateX(-50%);
  max-width: 88%;
  color: rgba(255, 229, 171, .18);
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
  text-shadow: 0 0 20px var(--arena-glow), 0 2px 8px rgba(0, 0, 0, .72);
}
.avatar-stage-dwarf {
  --helmet-y: 16%;
  --helmet-wear-x: 36%;
  --helmet-wear-y: 24%;
  --helmet-wear-w: 28%;
  --helmet-wear-h: 22%;
  --shoulder-y: 30%;
  --chest-y: 34%;
  --chest-wear-x: 15%;
  --chest-wear-y: 35%;
  --chest-wear-w: 70%;
  --chest-wear-h: 28%;
  --glove-left-x: 12%;
  --glove-right-x: 67%;
  --glove-y: 45%;
  --glove-w: 20%;
  --glove-h: 27%;
  --pants-y: 58%;
  --pants-wear-x: 18%;
  --pants-wear-y: 48%;
  --pants-wear-w: 64%;
  --pants-wear-h: 30%;
  --boots-y: 79%;
  --boot-left-x: 21%;
  --boot-right-x: 58%;
  --boot-y: 69%;
  --boot-w: 27%;
  --boot-h: 26%;
  --boot-left-rotate: 12deg;
  --boot-right-rotate: -12deg;
  --amulet-y: 35%;
  --weapon-y: 35%;
  --shield-y: 40%;
}
.avatar-stage-orc {
  --helmet-x: 41%;
  --helmet-w: 18%;
  --helmet-wear-x: 35%;
  --helmet-wear-y: 24%;
  --helmet-wear-w: 30%;
  --helmet-wear-h: 22%;
  --shoulder-x: 18%;
  --shoulder-w: 64%;
  --chest-x: 28%;
  --chest-w: 44%;
  --chest-wear-x: 15%;
  --chest-wear-y: 33%;
  --chest-wear-w: 70%;
  --chest-wear-h: 28%;
  --gloves-x: 4%;
  --gloves-w: 92%;
  --glove-left-x: 5%;
  --glove-right-x: 75%;
  --glove-y: 42%;
  --glove-w: 20%;
  --glove-h: 29%;
  --pants-wear-x: 20%;
  --pants-wear-y: 46%;
  --pants-wear-w: 60%;
  --pants-wear-h: 31%;
  --boot-left-x: 18%;
  --boot-right-x: 62%;
  --boot-y: 70%;
  --boot-w: 28%;
  --boot-h: 25%;
  --boot-left-rotate: 10deg;
  --boot-right-rotate: -10deg;
  --weapon-x: -9%;
  --weapon-w: 38%;
  --shield-x: 73%;
}
.avatar-stage-elf {
  --helmet-y: 3%;
  --helmet-wear-x: 37%;
  --helmet-wear-y: 18%;
  --helmet-wear-w: 26%;
  --helmet-wear-h: 19%;
  --shoulder-x: 25%;
  --shoulder-w: 50%;
  --cloak-x: 18%;
  --cloak-w: 64%;
  --chest-wear-x: 22%;
  --chest-wear-y: 33%;
  --chest-wear-w: 56%;
  --chest-wear-h: 26%;
  --gloves-x: 13%;
  --gloves-w: 74%;
  --glove-left-x: 13%;
  --glove-right-x: 69%;
  --glove-y: 41%;
  --glove-w: 18%;
  --glove-h: 28%;
  --pants-wear-x: 22%;
  --pants-wear-y: 58%;
  --pants-wear-w: 56%;
  --pants-wear-h: 28%;
  --boot-left-x: 18%;
  --boot-right-x: 58%;
  --boot-y: 72%;
  --boot-w: 24%;
  --boot-h: 24%;
  --boot-left-rotate: 8deg;
  --boot-right-rotate: -6deg;
}
.avatar-stage-ancient {
  --helmet-y: 3%;
  --helmet-wear-x: 36%;
  --helmet-wear-y: 9%;
  --helmet-wear-w: 28%;
  --helmet-wear-h: 21%;
  --chest-y: 26%;
  --chest-wear-x: 18%;
  --chest-wear-y: 33%;
  --chest-wear-w: 64%;
  --chest-wear-h: 26%;
  --glove-left-x: 12%;
  --glove-right-x: 70%;
  --glove-y: 39%;
  --glove-w: 18%;
  --glove-h: 28%;
  --pants-wear-x: 26%;
  --pants-wear-y: 45%;
  --pants-wear-w: 48%;
  --pants-wear-h: 30%;
  --boot-left-x: 25%;
  --boot-right-x: 55%;
  --boot-y: 72%;
  --boot-w: 23%;
  --boot-h: 23%;
  --boot-left-rotate: 4deg;
  --boot-right-rotate: -4deg;
  --weapon-x: -6%;
}
.avatar-base {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 8px;
  width: auto;
  max-width: 118%;
  max-height: 96%;
  transform: translateX(-50%);
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 22px 24px rgba(0,0,0,.62));
}
.avatar-paperdoll-layer,
.avatar-layer {
  --pd-base-z: 4;
  --pd-active-x: var(--pd-x, 0px);
  --pd-active-y: var(--pd-y, 0px);
  --pd-active-scale: var(--pd-scale, 1);
  --pd-active-rotate: var(--pd-rotate, 0deg);
  --pd-active-z: var(--pd-z, var(--pd-base-z));
  --pd-active-left-x: var(--pd-left-x, 0px);
  --pd-active-left-y: var(--pd-left-y, 0px);
  --pd-active-right-x: var(--pd-right-x, 0px);
  --pd-active-right-y: var(--pd-right-y, 0px);
  --pd-active-left-scale: var(--pd-left-scale, 1);
  --pd-active-right-scale: var(--pd-right-scale, 1);
  --pd-active-left-rotate: var(--pd-left-rotate, 0deg);
  --pd-active-right-rotate: var(--pd-right-rotate, 0deg);
  --pd-active-box-x: var(--pd-box-x);
  --pd-active-box-y: var(--pd-box-y);
  --pd-active-box-w: var(--pd-box-w);
  --pd-active-box-h: var(--pd-box-h);
}
.avatar-paperdoll-layer {
  position: absolute;
  left: 50%;
  bottom: 8px;
  width: auto;
  max-width: 118%;
  max-height: 96%;
  z-index: var(--pd-active-z);
  transform: translate(calc(-50% + var(--pd-active-x)), var(--pd-active-y)) scale(var(--pd-active-scale)) rotate(var(--pd-active-rotate));
  transform-origin: center bottom;
  object-fit: contain;
  object-position: center bottom;
  pointer-events: none;
  filter: drop-shadow(0 8px 10px rgba(0,0,0,.5));
}
.avatar-paperdoll-layer-weapon {
  --pd-base-z: 1;
  filter: drop-shadow(0 12px 14px rgba(0,0,0,.62));
}
.avatar-paperdoll-layer-helmet {
  --pd-base-z: 8;
  transform: translate(calc(-53.1% + var(--pd-active-x)), calc(-4.4% + var(--pd-active-y))) scale(var(--pd-active-scale)) rotate(var(--pd-active-rotate));
  filter: drop-shadow(0 8px 10px rgba(0,0,0,.55));
}
.avatar-paperdoll-layer-chest { --pd-base-z: 4; }
.avatar-paperdoll-layer-gloves {
  --pd-base-z: 7;
  transform: translate(calc(-53% + var(--pd-active-x)), calc(-2.5% + var(--pd-active-y))) scale(var(--pd-active-scale)) rotate(var(--pd-active-rotate));
}
.avatar-paperdoll-layer-pants { --pd-base-z: 5; }
.avatar-paperdoll-layer-boots { --pd-base-z: 6; }
.avatar-layer {
  position: absolute;
  display: grid;
  place-items: center;
  pointer-events: none;
  z-index: var(--pd-active-z);
  transform: translate(var(--pd-active-x), var(--pd-active-y)) scale(var(--pd-active-scale)) rotate(var(--pd-active-rotate));
  transform-origin: center;
  filter: drop-shadow(0 8px 10px rgba(0,0,0,.54));
}
.avatar-stage .avatar-layer[data-pd-box="1"] {
  left: var(--pd-active-box-x) !important;
  top: var(--pd-active-box-y) !important;
  width: var(--pd-active-box-w) !important;
  height: var(--pd-active-box-h) !important;
}
.avatar-layer-cloak { left: var(--cloak-x); top: var(--cloak-y); width: var(--cloak-w); height: var(--cloak-h); --pd-base-z: 1; }
.avatar-layer-helmet { left: var(--helmet-x); top: var(--helmet-y); width: var(--helmet-w); height: var(--helmet-h); }
.avatar-layer.avatar-layer-helmet-wear {
  left: var(--helmet-wear-x) !important;
  top: var(--helmet-wear-y) !important;
  width: var(--helmet-wear-w) !important;
  height: var(--helmet-wear-h) !important;
  --pd-base-z: 8;
}
.avatar-helmet-piece {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 8px 10px rgba(0,0,0,.55));
}
.avatar-layer-shoulder { left: var(--shoulder-x); top: var(--shoulder-y); width: var(--shoulder-w); height: var(--shoulder-h); }
.avatar-layer-chest { left: var(--chest-x); top: var(--chest-y); width: var(--chest-w); height: var(--chest-h); }
.avatar-layer.avatar-layer-chest-wear {
  left: var(--chest-wear-x) !important;
  top: var(--chest-wear-y) !important;
  width: var(--chest-wear-w) !important;
  height: var(--chest-wear-h) !important;
  --pd-base-z: 5;
  transform: translate(calc(-12px + var(--pd-active-x)), calc(-26px + var(--pd-active-y))) scale(var(--pd-active-scale)) rotate(var(--pd-active-rotate));
  transform-origin: center top;
}
.avatar-chest-piece {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center top;
  filter: drop-shadow(0 10px 12px rgba(0,0,0,.52));
}
.avatar-layer-gloves { left: var(--gloves-x); top: var(--gloves-y); width: var(--gloves-w); height: var(--gloves-h); }
.avatar-layer-gloves-split {
  left: var(--pd-active-x);
  top: var(--pd-active-y);
  width: 100%;
  height: 100%;
  --pd-base-z: 7;
  filter: none;
  transform: none;
}
.avatar-glove-piece {
  position: absolute;
  width: auto;
  max-width: var(--glove-w);
  height: var(--glove-h);
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 8px 10px rgba(0,0,0,.55));
  transform-origin: center bottom;
}
.avatar-glove-left {
  left: calc(var(--glove-left-x) + var(--pd-active-left-x));
  top: calc(var(--glove-y) + var(--pd-active-left-y));
  transform: scale(var(--pd-active-scale)) scale(var(--pd-active-left-scale)) rotate(calc(var(--glove-left-rotate) + var(--pd-active-rotate) + var(--pd-active-left-rotate)));
}
.avatar-glove-right {
  left: calc(var(--glove-right-x) + var(--pd-active-right-x));
  top: calc(var(--glove-y) + var(--pd-active-right-y));
  transform: scale(var(--pd-active-scale)) scale(var(--pd-active-right-scale)) rotate(calc(var(--glove-right-rotate) + var(--pd-active-rotate) + var(--pd-active-right-rotate)));
}
.avatar-layer-pants { left: var(--pants-x); top: var(--pants-y); width: var(--pants-w); height: var(--pants-h); }
.avatar-layer.avatar-layer-pants-wear {
  left: var(--pants-wear-x) !important;
  top: var(--pants-wear-y) !important;
  width: var(--pants-wear-w) !important;
  height: var(--pants-wear-h) !important;
  --pd-base-z: 4;
  transform: translate(var(--pd-active-x), calc(-18px + var(--pd-active-y))) scale(var(--pd-active-scale)) rotate(var(--pd-active-rotate));
  transform-origin: center top;
}
.avatar-pants-piece {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center top;
  filter: drop-shadow(0 8px 10px rgba(0,0,0,.5));
}
.avatar-layer-boots { left: var(--boots-x); top: var(--boots-y); width: var(--boots-w); height: var(--boots-h); }
.avatar-layer-boots-split {
  left: var(--pd-active-x);
  top: var(--pd-active-y);
  width: 100%;
  height: 100%;
  --pd-base-z: 5;
  filter: none;
  transform: none;
}
.avatar-boot-piece {
  position: absolute;
  width: auto;
  max-width: var(--boot-w);
  height: var(--boot-h);
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 8px 10px rgba(0,0,0,.55));
  transform-origin: center bottom;
}
.avatar-boot-left {
  left: calc(var(--boot-left-x) + var(--pd-active-left-x));
  top: calc(var(--boot-y) + var(--pd-active-left-y));
  transform: scale(var(--pd-active-scale)) scale(var(--pd-active-left-scale)) rotate(calc(var(--boot-left-rotate) + var(--pd-active-rotate) + var(--pd-active-left-rotate)));
}
.avatar-boot-right {
  left: calc(var(--boot-right-x) + var(--pd-active-right-x));
  top: calc(var(--boot-y) + var(--pd-active-right-y));
  transform: scale(var(--pd-active-scale)) scale(var(--pd-active-right-scale)) rotate(calc(var(--boot-right-rotate) + var(--pd-active-rotate) + var(--pd-active-right-rotate)));
}
.avatar-layer-amulet { left: var(--amulet-x); top: var(--amulet-y); width: var(--amulet-w); height: var(--amulet-h); --pd-base-z: 5; }
.avatar-layer-talisman { left: var(--talisman-x); top: var(--talisman-y); width: var(--talisman-w); height: var(--talisman-h); --pd-base-z: 5; }
.avatar-layer-weapon { left: auto; right: 2%; top: 20%; width: 22%; height: 58%; --pd-base-z: 1; opacity: .92; }
.avatar-layer-shield { left: var(--shield-x); top: var(--shield-y); width: var(--shield-w); height: var(--shield-h); --pd-base-z: 6; }
.avatar-layer .item-art {
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}
.avatar-layer .item-art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}
.avatar-layer .item-art::before,
.avatar-layer .item-art::after {
  transform-origin: center;
}

@media (max-width: 980px) {
  .avatar-paperdoll-layer,
  .avatar-layer {
    --pd-active-x: var(--pd-tablet-x, var(--pd-x, 0px));
    --pd-active-y: var(--pd-tablet-y, var(--pd-y, 0px));
    --pd-active-scale: var(--pd-tablet-scale, var(--pd-scale, 1));
    --pd-active-rotate: var(--pd-tablet-rotate, var(--pd-rotate, 0deg));
    --pd-active-z: var(--pd-tablet-z, var(--pd-z, var(--pd-base-z)));
    --pd-active-left-x: var(--pd-tablet-left-x, var(--pd-left-x, 0px));
    --pd-active-left-y: var(--pd-tablet-left-y, var(--pd-left-y, 0px));
    --pd-active-right-x: var(--pd-tablet-right-x, var(--pd-right-x, 0px));
    --pd-active-right-y: var(--pd-tablet-right-y, var(--pd-right-y, 0px));
    --pd-active-left-scale: var(--pd-tablet-left-scale, var(--pd-left-scale, 1));
    --pd-active-right-scale: var(--pd-tablet-right-scale, var(--pd-right-scale, 1));
    --pd-active-left-rotate: var(--pd-tablet-left-rotate, var(--pd-left-rotate, 0deg));
    --pd-active-right-rotate: var(--pd-tablet-right-rotate, var(--pd-right-rotate, 0deg));
    --pd-active-box-x: var(--pd-tablet-box-x, var(--pd-box-x));
    --pd-active-box-y: var(--pd-tablet-box-y, var(--pd-box-y));
    --pd-active-box-w: var(--pd-tablet-box-w, var(--pd-box-w));
    --pd-active-box-h: var(--pd-tablet-box-h, var(--pd-box-h));
  }
}

@media (max-width: 560px) {
  .avatar-paperdoll-layer,
  .avatar-layer {
    --pd-active-x: var(--pd-mobile-x, var(--pd-tablet-x, var(--pd-x, 0px)));
    --pd-active-y: var(--pd-mobile-y, var(--pd-tablet-y, var(--pd-y, 0px)));
    --pd-active-scale: var(--pd-mobile-scale, var(--pd-tablet-scale, var(--pd-scale, 1)));
    --pd-active-rotate: var(--pd-mobile-rotate, var(--pd-tablet-rotate, var(--pd-rotate, 0deg)));
    --pd-active-z: var(--pd-mobile-z, var(--pd-tablet-z, var(--pd-z, var(--pd-base-z))));
    --pd-active-left-x: var(--pd-mobile-left-x, var(--pd-tablet-left-x, var(--pd-left-x, 0px)));
    --pd-active-left-y: var(--pd-mobile-left-y, var(--pd-tablet-left-y, var(--pd-left-y, 0px)));
    --pd-active-right-x: var(--pd-mobile-right-x, var(--pd-tablet-right-x, var(--pd-right-x, 0px)));
    --pd-active-right-y: var(--pd-mobile-right-y, var(--pd-tablet-right-y, var(--pd-right-y, 0px)));
    --pd-active-left-scale: var(--pd-mobile-left-scale, var(--pd-tablet-left-scale, var(--pd-left-scale, 1)));
    --pd-active-right-scale: var(--pd-mobile-right-scale, var(--pd-tablet-right-scale, var(--pd-right-scale, 1)));
    --pd-active-left-rotate: var(--pd-mobile-left-rotate, var(--pd-tablet-left-rotate, var(--pd-left-rotate, 0deg)));
    --pd-active-right-rotate: var(--pd-mobile-right-rotate, var(--pd-tablet-right-rotate, var(--pd-right-rotate, 0deg)));
    --pd-active-box-x: var(--pd-mobile-box-x, var(--pd-tablet-box-x, var(--pd-box-x)));
    --pd-active-box-y: var(--pd-mobile-box-y, var(--pd-tablet-box-y, var(--pd-box-y)));
    --pd-active-box-w: var(--pd-mobile-box-w, var(--pd-tablet-box-w, var(--pd-box-w)));
    --pd-active-box-h: var(--pd-mobile-box-h, var(--pd-tablet-box-h, var(--pd-box-h)));
  }
}
.avatar-stage-name {
  display: none;
}
.inventory-panel { grid-row: span 2; }
.inventory-list { display: grid; gap: 10px; }
.item-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(0,0,0,.58), rgba(48, 25, 16, .42));
  box-shadow: inset 3px 0 0 rgba(242,186,84,.18);
}
.item-row span { font-size: 28px; }
.item-row .item-art { font-size: 0; }
.item-row small { display: block; margin-top: 4px; }
.item-row form { margin: 0; }
.item-row button {
  padding: 8px 12px;
  min-width: 72px;
}
.equipment-item {
  cursor: grab;
  user-select: none;
  touch-action: manipulation;
}
.equipment-item:active {
  cursor: grabbing;
}
.equipment-item.is-equipped {
  opacity: .72;
  background:
    linear-gradient(90deg, rgba(59, 44, 22, .72), rgba(0,0,0,.42));
}
.equipment-item.is-locked,
.slot.is-locked {
  border-color: rgba(121, 255, 226, .48);
  box-shadow: 0 0 0 1px rgba(121, 255, 226, .12), inset 0 1px 0 rgba(255,255,255,.06);
}
.equipment-item.dragging,
.slot.dragging {
  opacity: .45;
}
.inventory-bag.drag-over {
  border-color: #79ff9a;
  box-shadow: 0 0 0 2px rgba(89, 231, 121, .16), 0 0 32px rgba(89, 231, 121, .18);
}
.inventory-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  place-items: center;
  padding: 18px;
}
body.inventory-open {
  overflow: hidden;
}
body.inventory-open .inventory-modal {
  display: grid;
}
.inventory-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.76);
  backdrop-filter: blur(5px);
}
.stats-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  place-items: center;
  padding: 18px;
}
body.stats-open {
  overflow: hidden;
}
body.stats-open .stats-modal {
  display: grid;
}
.stats-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.74);
  backdrop-filter: blur(5px);
}
.stats-workbench {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
  max-height: min(760px, calc(100vh - 36px));
  overflow: auto;
  border: 1px solid rgba(242, 186, 84, .38);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 0%, rgba(112, 255, 202, .1), transparent 34%),
    linear-gradient(180deg, rgba(34, 17, 10, .98), rgba(8, 6, 5, .98));
  box-shadow: 0 28px 82px rgba(0,0,0,.64);
  padding: 16px;
}
.stats-workbench > header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 6px 4px 14px;
}
.stats-workbench h2,
.stats-workbench p {
  margin: 0;
}
.stats-workbench header p {
  color: var(--muted);
  font-weight: 800;
}
.stat-points-summary {
  display: flex;
  align-items: stretch;
  gap: 8px;
}
.stat-points-summary span {
  min-width: 98px;
  padding: 9px 11px;
  border: 1px solid rgba(242, 186, 84, .22);
  border-radius: 8px;
  background: rgba(0,0,0,.32);
}
.stat-points-summary small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}
.stat-points-summary b {
  display: block;
  color: var(--gold-soft);
  font-size: 24px;
  line-height: 1;
}
.stat-system-warning {
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 120, 120, .3);
  border-radius: 8px;
  color: #ffd1d1;
  background: rgba(120, 20, 20, .18);
  font-weight: 800;
}
.stat-allocator-list {
  display: grid;
  gap: 10px;
}
.stat-allocator-row {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(230px, 1.35fr) 64px;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(242, 186, 84, .18);
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(48, 28, 15, .58), rgba(0,0,0,.32));
}
.stat-allocator-row strong {
  display: block;
  color: var(--gold-soft);
  font-size: 18px;
}
.stat-allocator-row p,
.stat-reset-panel p {
  color: var(--muted);
  line-height: 1.3;
}
.stat-allocator-row dl {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin: 0;
}
.stat-allocator-row dt,
.stat-allocator-row dd {
  min-width: 0;
  margin: 0;
}
.stat-allocator-row dt {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}
.stat-allocator-row dd {
  color: #79ffe2;
  font-weight: 900;
}
.stat-allocator-row form,
.stat-reset-panel form {
  margin: 0;
}
.stat-allocator-row button {
  width: 54px;
  min-width: 0;
  padding: 9px 0;
}
.stat-reset-panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(242, 186, 84, .18);
  border-radius: 8px;
  background: rgba(0,0,0,.28);
}
.stat-reset-panel strong {
  color: var(--gold-soft);
}
.inventory-workbench {
  position: relative;
  z-index: 1;
  width: min(650px, calc(100vw - 32px));
  max-height: min(860px, calc(100vh - 36px));
  overflow: auto;
  scrollbar-color: rgba(242, 186, 84, .72) rgba(18, 11, 7, .84);
  scrollbar-width: thin;
  border: 1px solid rgba(242, 186, 84, .34);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 0%, rgba(242,186,84,.12), transparent 36%),
    linear-gradient(180deg, rgba(33, 17, 10, .98), rgba(8, 6, 5, .98));
  box-shadow: 0 30px 90px rgba(0,0,0,.65);
  padding: 16px 14px;
}
.inventory-workbench > header {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  justify-content: space-between;
  padding: 8px 4px 16px;
}
.inventory-workbench > header p {
  margin: 0;
}
.inventory-workbench::-webkit-scrollbar {
  width: 12px;
}
.inventory-workbench::-webkit-scrollbar-track {
  border-left: 1px solid rgba(242, 186, 84, .16);
  background: linear-gradient(180deg, rgba(24, 14, 8, .92), rgba(7, 5, 4, .94));
}
.inventory-workbench::-webkit-scrollbar-thumb {
  border: 3px solid rgba(13, 8, 5, .95);
  border-radius: 999px;
  background: linear-gradient(180deg, #ffd77d, #a86b22);
}
.inventory-workbench::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #ffe3a2, #c6852d);
}
.inventory-header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}
.inventory-workbench-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}
.inventory-workbench:has(.inventory-workbench-grid:not(.is-character-collapsed)) {
  width: min(1220px, calc(100vw - 24px));
}
.inventory-workbench-grid:not(.is-character-collapsed) {
  grid-template-columns: minmax(640px, 1fr) minmax(486px, 486px);
}
.inventory-workbench-grid.is-character-collapsed {
  grid-template-columns: minmax(0, 1fr);
}
.inventory-workbench-grid.is-character-collapsed .modal-equipment {
  display: none;
}
.modal-equipment {
  min-width: 0;
  padding: 14px;
}
.modal-equipment > h2 {
  margin-bottom: 10px;
}
.inventory-character-toggle {
  position: absolute;
  left: -2px;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 44px;
  min-width: 44px;
  height: 118px;
  padding: 0;
  border: 1px solid rgba(255, 220, 142, .9);
  border-left: 0;
  border-radius: 0 18px 18px 0;
  background:
    linear-gradient(90deg, rgba(56, 28, 9, .98), rgba(141, 78, 23, .98) 26%, rgba(255, 211, 112, .98) 58%, rgba(176, 99, 24, .98)),
    radial-gradient(circle at 68% 16%, rgba(255,255,255,.46), transparent 24%);
  color: #1b1006;
  box-shadow:
    0 14px 34px rgba(0,0,0,.56),
    0 0 22px rgba(242, 186, 84, .22),
    inset 0 1px 0 rgba(255,255,255,.42),
    inset -3px 0 0 rgba(255, 236, 173, .34),
    inset 4px 0 0 rgba(60, 31, 9, .42);
  font-size: 34px;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 1px 0 rgba(255,255,255,.34);
  transform: translate(-35%, -50%);
}
.inventory-character-toggle::before,
.inventory-character-toggle::after {
  content: "";
  position: absolute;
  left: 7px;
  right: 7px;
  height: 2px;
  border-radius: 999px;
  background: rgba(86, 47, 14, .5);
}
.inventory-character-toggle::before {
  top: 13px;
}
.inventory-character-toggle::after {
  bottom: 13px;
}
.inventory-workbench-grid.is-character-collapsed .inventory-character-toggle {
  transform: translate(-35%, -50%);
}
.modal-paperdoll {
  grid-template-columns: 76px 66px minmax(350px, 1fr) 66px;
  grid-template-rows: repeat(6, 82px);
  gap: 10px;
  min-height: 570px;
  padding: 14px;
}
.modal-paperdoll .avatar-stage {
  width: min(100%, 400px);
  min-height: 540px;
}
.modal-paperdoll .slot:not(.slot-weapon) {
  min-height: 82px;
  height: 82px;
}
.modal-paperdoll .slot {
  padding: 6px;
}
.modal-paperdoll .slot.filled .item-art {
  width: 60px;
  height: 68px;
}
.modal-paperdoll .slot-weapon.filled .item-art {
  width: 100px;
  height: 470px;
}
.equipment-inventory-list {
  grid-template-columns: repeat(5, var(--inventory-slot-size));
  align-items: start;
}
.inventory-tools {
  display: flex;
  gap: 8px;
  align-items: center;
}
.inventory-bag {
  display: grid;
  --inventory-slot-size: 92px;
  --inventory-slot-gap: 8px;
  --inventory-grid-width: calc((var(--inventory-slot-size) * 5) + (var(--inventory-slot-gap) * 4));
  gap: 12px;
  justify-items: center;
  min-width: 0;
}
.inventory-grid-bag {
  display: grid;
  grid-template-columns: repeat(5, var(--inventory-slot-size));
  grid-auto-rows: var(--inventory-slot-size);
  gap: var(--inventory-slot-gap);
  align-items: stretch;
  justify-content: center;
  width: var(--inventory-grid-width);
  max-width: 100%;
}
.inventory-slot-item[hidden] {
  display: none !important;
}
.inventory-slot-item,
.inventory-empty-slot {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  width: var(--inventory-slot-size);
  height: var(--inventory-slot-size);
  padding: 7px;
  border: 1px solid rgba(242, 186, 84, .26);
  border-radius: 8px;
  background:
    radial-gradient(circle at 38% 18%, rgba(255, 210, 122, .14), transparent 38%),
    linear-gradient(180deg, rgba(47, 28, 15, .74), rgba(0,0,0,.54));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
  cursor: pointer;
  overflow: hidden;
}
.inventory-empty-slot {
  cursor: default;
  opacity: .62;
  background:
    linear-gradient(180deg, rgba(27, 17, 10, .56), rgba(0,0,0,.46));
}
.inventory-slot-item:hover,
.inventory-slot-item:focus-visible {
  border-color: rgba(255, 216, 126, .78);
  box-shadow: 0 0 0 2px rgba(242, 186, 84, .15), inset 0 1px 0 rgba(255,255,255,.08);
  outline: 0;
}
.inventory-slot-item .item-art {
  display: grid;
  place-items: center;
  width: calc(var(--inventory-slot-size) - 18px);
  height: calc(var(--inventory-slot-size) - 18px);
  max-width: none;
  max-height: none;
  border: 0;
  background: transparent;
  box-shadow: none;
  overflow: hidden;
  contain: paint;
}
.inventory-slot-item .item-art img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center center;
  transform: none;
}
.inventory-slot-item .item-art[class*="item-art-talisman-"] img,
.inventory-slot-item .item-art[class*="item-art-cloak-"] img,
.inventory-slot-item .item-art[class*="item-art-amulet-"] img,
.inventory-slot-item .item-art[class*="item-art-helmet-"] img {
  width: 86% !important;
  height: 86% !important;
}
.inventory-slot-item .item-art[class*="item-art-cloak-"] img {
  width: 82% !important;
  height: 88% !important;
}
.inventory-slot-item .item-art[class*="item-art-amulet-"] img,
.inventory-slot-item .item-art[class*="item-art-talisman-"] img {
  width: 80% !important;
  height: 80% !important;
}
.inventory-slot-item.is-equipped {
  border-color: rgba(121, 255, 154, .52);
  background:
    radial-gradient(circle at 50% 18%, rgba(121, 255, 154, .14), transparent 36%),
    linear-gradient(180deg, rgba(37, 47, 22, .72), rgba(0,0,0,.54));
}
.inventory-slot-quantity,
.inventory-slot-equipped,
.inventory-slot-lock,
.slot-lock-badge {
  position: absolute;
  right: 5px;
  bottom: 4px;
  min-width: 20px;
  padding: 2px 4px;
  border-radius: 6px;
  color: #1d1208;
  background: linear-gradient(180deg, #ffd77d, #bc7c27);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}
.inventory-slot-equipped {
  left: 5px;
  right: auto;
  background: linear-gradient(180deg, #79ff9a, #2f9e53);
}
.inventory-slot-lock,
.slot-lock-badge {
  top: 5px;
  bottom: auto;
  color: #081612;
  background: linear-gradient(180deg, #9bfff0, #36b9a3);
}
.slot-lock-badge {
  right: 6px;
}
.inventory-pagination {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) 88px;
  gap: 6px;
  align-items: center;
  justify-self: center;
  width: var(--inventory-grid-width);
  max-width: 100%;
  margin-top: 12px;
}
.inventory-pagination > div {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}
.inventory-pagination button {
  min-width: 0;
  padding: 8px 7px;
  white-space: nowrap;
}
.inventory-pagination button.active {
  color: #1d1208;
  background: linear-gradient(180deg, #ffd77d, #bc7c27);
}
.item-action-menu {
  position: fixed;
  z-index: 100;
  width: min(350px, calc(100vw - 24px));
  padding: 0;
  border: 1px solid rgba(242, 186, 84, .42);
  border-radius: 8px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(36, 18, 12, .98), rgba(6, 5, 4, .96)),
    rgba(12, 8, 5, .96);
  box-shadow: 0 18px 55px rgba(0,0,0,.58), 0 0 26px rgba(242, 186, 84, .1);
}
.item-action-menu strong {
  display: block;
  color: var(--gold-soft);
  font-size: 18px;
  line-height: 1.05;
}
.item-action-menu small {
  display: block;
  margin-top: 4px;
  font-size: 12px;
}
.item-action-menu button {
  padding: 8px;
  min-width: 0;
}
.item-tooltip-head {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 12px;
  background:
    radial-gradient(circle at 22% 18%, rgba(255,255,255,.22), transparent 24%),
    linear-gradient(135deg, rgba(171, 56, 69, .9), rgba(224, 134, 92, .68));
}
.item-tooltip-art {
  display: grid;
  place-items: center;
  width: 58px;
  aspect-ratio: 1;
  border: 2px solid rgba(255, 197, 118, .7);
  border-radius: 8px;
  background: rgba(35, 10, 11, .54);
}
.item-tooltip-art .item-art {
  width: 52px;
}
.item-tooltip-head [data-menu-stars] {
  display: block;
  margin-top: 5px;
  color: #fff24e;
  font-size: 15px;
  letter-spacing: 0;
  text-shadow: 0 2px 3px rgba(0,0,0,.45);
}
.item-tooltip-head small {
  color: rgba(255,255,255,.86);
  font-weight: 800;
}
.item-tooltip-body {
  padding: 12px;
  background: linear-gradient(180deg, rgba(0,0,0,.72), rgba(0,0,0,.88));
}
.item-tooltip-power {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: baseline;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,.24);
}
.item-tooltip-sale {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-top: 9px;
  padding: 8px 10px;
  border: 1px solid rgba(242, 186, 84, .18);
  border-radius: 8px;
  background: rgba(242, 186, 84, .08);
  font-weight: 900;
}
.item-tooltip-sale span {
  color: var(--muted);
}
.item-tooltip-sale b {
  color: #79ffe2;
}
.item-tooltip-power span,
.item-tooltip-body h3 {
  color: #fff176;
  font-size: 15px;
  font-weight: 900;
}
.item-tooltip-power b {
  color: #fff;
  font-size: 28px;
  line-height: 1;
  text-shadow: 0 0 18px rgba(255, 232, 120, .34);
}
.item-tooltip-body dl {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px 10px;
  margin: 9px 0 0;
  font-size: 14px;
}
.item-tooltip-body dt {
  color: rgba(255,255,255,.9);
}
.item-tooltip-body dd {
  margin: 0;
  color: #7fffe5;
  font-weight: 900;
}
.item-tooltip-body section {
  margin-top: 11px;
  padding-top: 9px;
  border-top: 1px solid rgba(255,255,255,.18);
}
.item-tooltip-body h3 {
  margin: 0;
  font-size: 15px;
}
.item-tooltip-set h3 {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
}
.item-tooltip-set h3 small {
  margin: 0;
  color: rgba(255,255,255,.72);
}
.item-tooltip-set ul {
  display: grid;
  gap: 5px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
}
.item-tooltip-set li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: baseline;
  color: rgba(255,255,255,.42);
}
.item-tooltip-set li.is-active {
  color: var(--gold-soft);
  font-weight: 900;
}
.item-tooltip-set li span::before {
  content: "- ";
}
.item-tooltip-set li b {
  color: rgba(127,255,229,.44);
  font-size: 12px;
  text-align: right;
  white-space: nowrap;
}
.item-tooltip-set li.is-active b {
  color: rgba(127,255,229,.62);
}
.item-tooltip-set li.is-active.set-complete b {
  color: #7fffe5;
}
.item-tooltip-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 12px;
  border-top: 1px solid rgba(242, 186, 84, .2);
  background: rgba(0,0,0,.72);
}
.item-tooltip-actions button[data-menu-equip]:not([hidden]) ~ button[data-menu-unequip] {
  display: none;
}
.item-tooltip-actions button[hidden] {
  display: none;
}
.item-tooltip-actions button:not([hidden]):first-child:last-child,
.item-tooltip-actions button:not([hidden]):only-child {
  grid-column: 1 / -1;
}
.drag-ghost {
  position: fixed;
  z-index: 120;
  pointer-events: none;
  width: 190px;
  opacity: .92;
  transform: translate(-50%, -50%) scale(.96);
  box-shadow: 0 18px 50px rgba(0,0,0,.55);
}
.stats-panel dl {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  margin: 0;
}
.stats-panel dt {
  color: #d8c39c;
}
.stats-panel dd {
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(242, 186, 84, .08);
}
.stats-panel dd { margin: 0; color: var(--gold-soft); font-weight: 800; }
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.cards-grid.small { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); max-width: 960px; margin-inline: auto; }
.craft-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
}
.craft-summary span {
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}
.craft-summary b {
  color: var(--gold-soft);
}
.craft-guide {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.craft-guide article {
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid rgba(242, 186, 84, .18);
  border-radius: 8px;
  background: rgba(0,0,0,.26);
}
.craft-guide b {
  display: block;
  color: var(--gold-soft);
  margin-bottom: 4px;
}
.craft-guide span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}
.craft-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.craft-filters a {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  min-height: 40px;
  padding: 9px 12px;
  border: 1px solid rgba(242, 186, 84, .24);
  border-radius: 8px;
  color: var(--text);
  background: rgba(0,0,0,.32);
  font-weight: 900;
  text-decoration: none;
}
.craft-filters a.active {
  color: #1d1208;
  border-color: rgba(255, 211, 122, .65);
  background: linear-gradient(180deg, #f6c36a, #d99c35);
}
.craft-filters b {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  border-radius: 999px;
  color: var(--gold-soft);
  background: rgba(0,0,0,.34);
  font-size: 12px;
}
.craft-filters a.active b {
  color: #1d1208;
  background: rgba(255,255,255,.25);
}
.craft-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}
.craft-item {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}
.craft-icon {
  display: grid;
  place-items: center;
  width: 54px;
  aspect-ratio: 1;
  font-size: 30px;
}
.craft-icon .item-art {
  width: 54px;
}
.craft-info h2 {
  margin-bottom: 4px;
  font-size: 20px;
}
.craft-info h2 small {
  color: var(--green);
}
.craft-info p {
  margin: 0 0 6px;
}
.craft-pity {
  display: inline-block;
  margin-top: 2px;
  padding: 4px 7px;
  border: 1px solid rgba(121, 255, 154, .22);
  border-radius: 999px;
  color: #a8ffb7;
  background: rgba(0,0,0,.22);
  font-weight: 900;
}
.craft-lock-note {
  border-color: rgba(121, 255, 226, .26);
  color: #9bfff0;
}
.craft-item.is-locked,
.market-card.is-locked {
  border-color: rgba(121, 255, 226, .24);
}
.craft-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(108px, 1fr));
  gap: 8px;
}
.craft-actions button {
  width: 100%;
  min-width: 0;
  min-height: 58px;
  line-height: 1.15;
}
.craft-actions button small {
  color: rgba(29, 18, 8, .82);
}
.crafting-disabled {
  margin-top: 16px;
}
.crafting-tools {
  margin-top: 16px;
}
.crafting-tools > .action-card:not(.gem-card):not(.forge-card) {
  display: none;
}
.forge-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}
.forge-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(118px, auto);
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(226, 169, 75, .22);
  border-radius: 8px;
  background: rgba(0, 0, 0, .22);
}
.forge-row span {
  min-width: 0;
  font-weight: 700;
}
.forge-row b {
  color: var(--gold-soft);
}
.forge-row em {
  color: var(--muted);
  font-style: normal;
  font-weight: 900;
  text-align: right;
}
.forge-row button {
  min-height: 38px;
}
.action-card {
  position: relative;
  min-height: 210px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(18, 12, 8, .78);
  padding: 20px;
}
.action-card h2 { font-size: 26px; }
.action-card .card-icon { position: absolute; top: 18px; right: 18px; font-size: 28px; }
.action-card form { margin-top: 20px; }
.action-card button { width: 100%; }
.action-card.locked { filter: grayscale(.7); opacity: .68; }
.chest-card {
  display: grid;
  align-content: start;
  gap: 12px;
}
.chest-card p {
  color: var(--muted);
}
.chest-card small {
  color: var(--gold-soft);
  font-weight: 700;
}
.chest-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.chest-meta span {
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(226, 169, 75, .18);
  border-radius: 8px;
  background: rgba(0, 0, 0, .24);
  color: var(--muted);
}
.chest-meta b {
  display: block;
  color: var(--gold-soft);
}
.big-icon { font-size: 50px; margin-bottom: 18px; }
.dungeon-layout {
  display: grid;
  grid-template-columns: 240px minmax(300px, 1fr) 260px;
  gap: 16px;
}
.dungeon-list { display: grid; gap: 10px; align-content: start; }
.dungeon-list a,
.dungeon-list button {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 76px;
  padding: 12px;
  border: 1px solid rgba(242, 186, 84, .18);
  border-radius: 8px;
  color: var(--text);
  background: rgba(0,0,0,.35);
  text-decoration: none;
}
.dungeon-list a.active,
.dungeon-list button.active {
  border-color: rgba(255, 211, 122, .72);
  background: linear-gradient(135deg, rgba(89, 48, 18, .64), rgba(0,0,0,.46));
  box-shadow: 0 0 0 1px rgba(242, 186, 84, .12), inset 0 1px 0 rgba(255,255,255,.06);
}
.dungeon-list a.locked {
  opacity: .66;
  filter: grayscale(.45);
}
.dungeon-list small {
  display: grid;
  place-items: center;
  width: 34px;
  aspect-ratio: 1;
  border: 1px solid rgba(242, 186, 84, .2);
  border-radius: 8px;
  color: var(--gold-soft);
  background: rgba(0,0,0,.28);
  font-weight: 900;
}
.dungeon-list strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dungeon-list span {
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
}
.boss-art {
  display: grid;
  place-items: center;
  min-height: 420px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(0, 255, 200, .18), rgba(0,0,0,.65));
  font-size: 160px;
}
.dungeon-stage-card {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 0%, rgba(242, 186, 84, .12), transparent 36%),
    linear-gradient(180deg, rgba(22, 14, 10, .92), rgba(4, 4, 4, .9));
}
.dungeon-stage-card > small {
  display: block;
  margin-top: 12px;
  color: var(--gold);
  font-weight: 900;
  text-transform: uppercase;
}
.dungeon-hero-art {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 420px;
  border: 1px solid rgba(242, 186, 84, .16);
  border-radius: 8px;
  background:
    linear-gradient(rgba(0,0,0,.08), rgba(0,0,0,.72)),
    radial-gradient(circle at 50% 58%, rgba(242, 186, 84, .2), transparent 38%),
    linear-gradient(135deg, rgba(0, 90, 72, .42), rgba(0,0,0,.78));
}
.dungeon-scene-forest .dungeon-hero-art,
.dungeon-scene-forest .dungeon-battle-stage {
  background:
    linear-gradient(rgba(0,0,0,.12), rgba(0,0,0,.72)),
    radial-gradient(circle at 36% 60%, rgba(90, 255, 136, .16), transparent 36%),
    linear-gradient(135deg, rgba(19, 74, 32, .58), rgba(0,0,0,.8));
}
.dungeon-scene-dragon .dungeon-hero-art,
.dungeon-scene-dragon .dungeon-battle-stage {
  background:
    linear-gradient(rgba(0,0,0,.12), rgba(0,0,0,.72)),
    radial-gradient(circle at 56% 62%, rgba(255, 93, 50, .22), transparent 38%),
    linear-gradient(135deg, rgba(92, 26, 14, .64), rgba(0,0,0,.82));
}
.dungeon-scene-frost .dungeon-hero-art,
.dungeon-scene-frost .dungeon-battle-stage {
  background:
    linear-gradient(rgba(0,0,0,.1), rgba(0,0,0,.72)),
    radial-gradient(circle at 50% 60%, rgba(111, 222, 255, .22), transparent 38%),
    linear-gradient(135deg, rgba(20, 58, 82, .62), rgba(0,0,0,.82));
}
.dungeon-hero-art .boss-game-icon {
  width: min(220px, 48%);
  max-height: 260px;
  filter: drop-shadow(0 18px 34px rgba(0,0,0,.5));
}
.dungeon-route-map {
  position: relative;
  display: block;
  width: min(100%, 580px);
  aspect-ratio: 16 / 9;
  min-height: 250px;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(242, 186, 84, .2);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(242, 186, 84, .07) 1px, transparent 1px) 0 0 / 18px 18px,
    linear-gradient(rgba(242, 186, 84, .07) 1px, transparent 1px) 0 0 / 18px 18px,
    radial-gradient(circle at 55% 45%, rgba(121, 255, 154, .08), transparent 42%),
    linear-gradient(180deg, rgba(38, 25, 14, .86), rgba(8, 7, 6, .9));
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.55), inset 0 0 70px rgba(0,0,0,.4);
}
.dungeon-route-map::before,
.dungeon-route-map::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.dungeon-route-map::before {
  background:
    linear-gradient(90deg, transparent 8%, rgba(146, 108, 55, .44) 8% 14%, transparent 14%) 0 22% / 100% 15% no-repeat,
    linear-gradient(90deg, transparent 25%, rgba(146, 108, 55, .5) 25% 60%, transparent 60%) 0 45% / 100% 13% no-repeat,
    linear-gradient(0deg, transparent 15%, rgba(146, 108, 55, .42) 15% 70%, transparent 70%) 42% 0 / 11% 100% no-repeat,
    linear-gradient(90deg, transparent 50%, rgba(146, 108, 55, .45) 50% 83%, transparent 83%) 0 22% / 100% 11% no-repeat,
    linear-gradient(0deg, transparent 45%, rgba(146, 108, 55, .42) 45% 86%, transparent 86%) 76% 0 / 9% 100% no-repeat;
  filter: drop-shadow(0 0 0 rgba(0,0,0,.3));
}
.dungeon-route-map::after {
  background:
    radial-gradient(circle, rgba(242, 186, 84, .28) 1px, transparent 1.5px) 0 0 / 16px 16px;
  opacity: .45;
}
.dungeon-route-map span {
  position: absolute;
  display: grid;
  align-content: center;
  justify-items: center;
  width: 18%;
  min-width: 66px;
  min-height: 54px;
  padding: 8px 6px;
  border: 2px solid rgba(33, 24, 15, .88);
  outline: 1px solid rgba(242, 186, 84, .22);
  border-radius: 4px;
  color: var(--muted);
  background:
    linear-gradient(90deg, rgba(0,0,0,.12) 1px, transparent 1px) 0 0 / 12px 12px,
    linear-gradient(rgba(0,0,0,.12) 1px, transparent 1px) 0 0 / 12px 12px,
    linear-gradient(180deg, rgba(89, 63, 36, .92), rgba(38, 25, 16, .94));
  text-align: center;
  box-shadow: inset 0 0 0 1px rgba(255, 223, 143, .08), 0 10px 20px rgba(0,0,0,.25);
  z-index: 1;
}
.dungeon-route-map span::before {
  content: "";
  width: 13px;
  height: 13px;
  margin-bottom: 5px;
  border-radius: 50%;
  background: rgba(242, 186, 84, .48);
}
.dungeon-route-map span::after {
  content: "";
  position: absolute;
  inset: -5px;
  border: 1px dotted rgba(242, 186, 84, .26);
  border-radius: inherit;
  pointer-events: none;
}
.dungeon-route-map b {
  color: var(--gold-soft);
  font-size: 12px;
}
.dungeon-route-map small,
.dungeon-route-map em {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dungeon-route-map small {
  color: inherit;
  font-size: 11px;
  font-weight: 900;
}
.dungeon-route-map em {
  color: var(--text);
  font-size: 10px;
  font-style: normal;
}
.dungeon-route-map .room-army::before { background: #f28a54; }
.dungeon-route-map .room-commander::before { background: #ffcb69; }
.dungeon-route-map .room-boss::before {
  background: #ff5f5f;
  box-shadow: 0 0 14px rgba(255, 95, 95, .38);
}
.dungeon-route-map .room-gate {
  width: 13%;
}
.dungeon-route-map .room-corridor {
  width: 15%;
  min-height: 42px;
}
.dungeon-route-map .room-army,
.dungeon-route-map .room-room {
  width: 19%;
  min-height: 70px;
}
.dungeon-route-map .room-commander {
  width: 17%;
  min-height: 62px;
}
.dungeon-route-map .room-boss {
  width: 23%;
  min-height: 92px;
  border-color: rgba(73, 26, 19, .94);
  outline-color: rgba(255, 95, 95, .34);
}
.dungeon-route-map .room-node-1 { left: 5%; top: 57%; }
.dungeon-route-map .room-node-2 { left: 19%; top: 58%; }
.dungeon-route-map .room-node-3 { left: 35%; top: 47%; }
.dungeon-route-map .room-node-4 { left: 34%; top: 18%; }
.dungeon-route-map .room-node-5 { left: 52%; top: 22%; }
.dungeon-route-map .room-node-6 { left: 53%; top: 58%; }
.dungeon-route-map .room-node-7 { left: 69%; top: 58%; }
.dungeon-route-map .room-node-8 { left: 70%; top: 17%; }
.dungeon-route-map .room-node-9 { left: 18%; top: 19%; }
.dungeon-route-map .room-node-10 { left: 73%; top: 35%; }
.dungeon-route-map .is-done {
  border-color: rgba(121, 255, 154, .38);
  outline-color: rgba(121, 255, 154, .32);
  color: #9dffad;
}
.dungeon-route-map .is-current {
  border-color: rgba(242, 186, 84, .76);
  outline-color: rgba(242, 186, 84, .48);
  background: rgba(129, 86, 19, .3);
  color: var(--gold-soft);
  box-shadow: 0 0 0 1px rgba(242, 186, 84, .12);
}
.dungeon-route-forest {
  background:
    linear-gradient(90deg, rgba(121, 255, 154, .06) 1px, transparent 1px) 0 0 / 18px 18px,
    linear-gradient(rgba(121, 255, 154, .06) 1px, transparent 1px) 0 0 / 18px 18px,
    radial-gradient(circle at 45% 55%, rgba(98, 211, 105, .13), transparent 45%),
    linear-gradient(180deg, rgba(21, 48, 28, .88), rgba(7, 10, 7, .92));
}
.dungeon-route-dragon {
  background:
    linear-gradient(90deg, rgba(255, 113, 64, .06) 1px, transparent 1px) 0 0 / 18px 18px,
    linear-gradient(rgba(255, 113, 64, .06) 1px, transparent 1px) 0 0 / 18px 18px,
    radial-gradient(circle at 58% 55%, rgba(255, 88, 44, .16), transparent 45%),
    linear-gradient(180deg, rgba(58, 24, 16, .9), rgba(8, 5, 5, .94));
}
.dungeon-route-frost {
  background:
    linear-gradient(90deg, rgba(136, 224, 255, .06) 1px, transparent 1px) 0 0 / 18px 18px,
    linear-gradient(rgba(136, 224, 255, .06) 1px, transparent 1px) 0 0 / 18px 18px,
    radial-gradient(circle at 52% 52%, rgba(111, 222, 255, .14), transparent 45%),
    linear-gradient(180deg, rgba(20, 46, 62, .9), rgba(5, 8, 10, .94));
}
.dungeon-map-stage {
  min-height: 300px;
}
.dungeon-hero-art .boss-game-icon.is-fallback {
  position: relative;
  display: block;
  width: min(230px, 50%);
  aspect-ratio: .84;
  border: 1px solid rgba(255, 225, 155, .16);
  border-radius: 42% 42% 18% 18%;
  color: transparent;
  background:
    radial-gradient(circle at 35% 32%, rgba(0,0,0,.74) 0 13%, transparent 14%),
    radial-gradient(circle at 65% 32%, rgba(0,0,0,.74) 0 13%, transparent 14%),
    radial-gradient(circle at 50% 58%, rgba(0,0,0,.8) 0 8%, transparent 9%),
    linear-gradient(180deg, rgba(255, 232, 194, .92), rgba(143, 106, 82, .7));
  box-shadow: inset 0 -24px 45px rgba(0,0,0,.34), 0 22px 50px rgba(0,0,0,.45);
}
.dungeon-scene-forest .boss-game-icon.is-fallback {
  background:
    radial-gradient(circle at 35% 32%, rgba(0,0,0,.7) 0 12%, transparent 13%),
    radial-gradient(circle at 65% 32%, rgba(0,0,0,.7) 0 12%, transparent 13%),
    linear-gradient(180deg, rgba(133, 255, 154, .88), rgba(44, 91, 39, .76));
}
.dungeon-scene-dragon .boss-game-icon.is-fallback {
  border-radius: 34% 34% 26% 26%;
  background:
    radial-gradient(circle at 33% 34%, rgba(0,0,0,.8) 0 10%, transparent 11%),
    radial-gradient(circle at 67% 34%, rgba(0,0,0,.8) 0 10%, transparent 11%),
    linear-gradient(180deg, rgba(255, 128, 82, .9), rgba(91, 20, 12, .82));
}
.dungeon-scene-frost .boss-game-icon.is-fallback {
  background:
    radial-gradient(circle at 35% 32%, rgba(0,0,0,.62) 0 12%, transparent 13%),
    radial-gradient(circle at 65% 32%, rgba(0,0,0,.62) 0 12%, transparent 13%),
    linear-gradient(180deg, rgba(184, 245, 255, .9), rgba(48, 96, 122, .78));
}
.dungeon-lock {
  position: absolute;
  right: 18px;
  top: 18px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 211, 122, .42);
  border-radius: 999px;
  color: #1d1208;
  background: linear-gradient(180deg, #ffd77d, #bc7c27);
  font-size: 12px;
  font-weight: 900;
}
.dungeon-stage-card.is-locked .dungeon-hero-art {
  filter: grayscale(.35);
}
.dungeon-missing {
  display: grid;
  gap: 4px;
  width: fit-content;
  max-width: 100%;
  margin-top: 14px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 107, 107, .28);
  border-radius: 8px;
  color: #ffb4a8;
  background: rgba(100, 24, 20, .24);
}
.battle-card {
  overflow: hidden;
}
.battle-stage {
  position: relative;
  display: grid;
  grid-template-columns: minmax(150px, 1fr) 170px minmax(150px, 1fr);
  gap: 18px;
  align-items: end;
  min-height: 430px;
  padding: 22px;
  border-radius: 8px;
  background:
    linear-gradient(rgba(0,0,0,.18), rgba(0,0,0,.65)),
    radial-gradient(circle at 50% 70%, rgba(242, 186, 84, .2), transparent 42%),
    linear-gradient(135deg, rgba(0, 90, 72, .42), rgba(0,0,0,.78));
}
.dungeon-info-panel {
  align-content: start;
}
.reward-stat-grid,
.requirement-list {
  display: grid;
  gap: 9px;
  margin: 10px 0 18px;
}
.reward-stat-grid article,
.requirement-list article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: baseline;
  padding: 10px;
  border: 1px solid rgba(242, 186, 84, .16);
  border-radius: 8px;
  background: rgba(0,0,0,.24);
}
.reward-stat-grid span,
.requirement-list span {
  color: var(--muted);
  font-weight: 800;
}
.reward-stat-grid b,
.requirement-list b {
  color: var(--gold-soft);
  text-align: right;
}
.requirement-list article.met {
  border-color: rgba(121, 255, 154, .2);
}
.requirement-list article.met b {
  color: #9dffad;
}
.requirement-list article.missing {
  border-color: rgba(255, 107, 107, .28);
}
.requirement-list article.missing b {
  color: #ffaaa0;
}
.combatant {
  position: relative;
  display: grid;
  gap: 12px;
  justify-items: center;
  transition: transform .28s ease, filter .18s ease;
}
.combatant.player.attacking {
  transform: translateX(42px) scale(1.04);
}
.combatant.enemy.attacking {
  transform: translateX(-42px) scale(1.04);
}
.combatant.hit {
  animation: combat-hit .26s linear 2;
  filter: drop-shadow(0 0 18px rgba(255, 72, 72, .9));
}
.combat-name {
  width: 100%;
  text-align: center;
  color: var(--gold-soft);
  font-weight: 900;
  font-size: 20px;
}
.hp-line {
  width: min(230px, 100%);
  display: grid;
  gap: 6px;
  color: #fff;
  font-weight: 800;
  text-align: center;
}
.hp-line > div {
  height: 14px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 99px;
  background: rgba(0,0,0,.55);
}
.hp-line i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #26d96f, #f6c34f);
  transition: width .35s ease;
}
.combat-sprite {
  display: grid;
  place-items: center;
  width: min(220px, 100%);
  aspect-ratio: 1;
  border: 1px solid rgba(242, 186, 84, .28);
  border-radius: 8px;
  background: radial-gradient(circle, rgba(255,255,255,.16), rgba(0,0,0,.56) 62%);
  font-size: clamp(82px, 10vw, 150px);
}
.damage-pop {
  position: absolute;
  top: 42%;
  left: 50%;
  opacity: 0;
  transform: translate(-50%, 0) scale(.8);
  color: #ff4848;
  font-size: 34px;
  font-weight: 900;
  text-shadow: 0 2px 0 #000, 0 0 14px rgba(255, 70, 70, .8);
  pointer-events: none;
}
.damage-pop.show {
  animation: damage-pop .8s ease forwards;
}
.battle-center {
  align-self: center;
  display: grid;
  gap: 10px;
  justify-items: center;
  text-align: center;
  padding: 14px;
  border: 1px solid rgba(242, 186, 84, .22);
  border-radius: 8px;
  background: rgba(0,0,0,.48);
}
.battle-center strong {
  color: var(--gold);
  font-size: 18px;
}
.battle-center span,
.battle-center small {
  color: var(--muted);
}
.battle-log {
  display: grid;
  gap: 6px;
  min-height: 88px;
  width: 100%;
  font-size: 12px;
  color: var(--text);
}
.battle-log div {
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(255,255,255,.06);
}
@keyframes combat-hit {
  0%, 100% { transform: translateX(0); }
  35% { transform: translateX(-7px); }
  70% { transform: translateX(7px); }
}
@keyframes damage-pop {
  0% { opacity: 0; transform: translate(-50%, 8px) scale(.8); }
  20% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -54px) scale(1.25); }
}
.reward-panel p {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid rgba(242, 186, 84, .12);
  padding-bottom: 10px;
}
.arena-hero {
  min-height: 360px;
  background:
    radial-gradient(circle at 50% 18%, rgba(242, 186, 84, .18), transparent 32%),
    linear-gradient(rgba(0,0,0,.5), rgba(0,0,0,.55));
}
.arena-screen {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, .42fr);
  gap: 16px;
  overflow: hidden;
  background:
    radial-gradient(circle at 64% 18%, var(--arena-glow, rgba(242, 186, 84, .2)), transparent 34%),
    linear-gradient(180deg, var(--arena-a, rgba(83, 42, 15, .42)), var(--arena-b, rgba(0,0,0,.72))),
    linear-gradient(rgba(0,0,0,.46), rgba(0,0,0,.62));
}
.arena-screen::before,
.arena-screen::after {
  content: "";
  position: absolute;
  pointer-events: none;
  inset: auto 5% -90px 5%;
  height: 190px;
  border: 1px solid rgba(242, 186, 84, .12);
  border-radius: 50%;
  background:
    repeating-radial-gradient(ellipse at center, rgba(242, 186, 84, .12) 0 1px, transparent 1px 18px),
    radial-gradient(ellipse at center, rgba(242, 186, 84, .13), transparent 66%);
  opacity: .8;
}
.arena-screen::after {
  inset: 18px 20px auto auto;
  width: min(280px, 36vw);
  height: min(280px, 36vw);
  border: 0;
  background: radial-gradient(circle, rgba(255, 221, 146, .18), transparent 62%);
  filter: blur(10px);
}
.arena-command,
.arena-meta,
.arena-combat-preview,
.arena-migration-note {
  position: relative;
  z-index: 1;
  grid-column: 1;
}
.arena-command {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
}
.arena-command-copy small {
  color: var(--gold);
  font-weight: 900;
  text-transform: uppercase;
}
.arena-command-copy p {
  max-width: 620px;
}
.arena-action-form {
  display: grid;
  min-width: 170px;
}
.arena-action-form button {
  min-height: 52px;
  font-size: 17px;
}
.arena-meta, .score-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 0;
}
.arena-meta span, .score-row span {
  min-width: 126px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0,0,0,.52);
}
.arena-meta b {
  display: block;
  margin-top: 3px;
  color: var(--gold-soft);
  font-size: 18px;
}
.arena-meta form {
  display: none;
}
.arena-combat-preview {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) 90px minmax(190px, 1fr);
  gap: 12px;
  align-items: stretch;
}
.arena-combat-preview.is-live .arena-fighter-card {
  border-color: rgba(121, 255, 154, .42);
  box-shadow: inset 0 0 0 1px rgba(121, 255, 154, .08), 0 0 28px rgba(121, 255, 154, .08);
}
.arena-combat-preview.is-live .arena-fighter-card.enemy {
  border-color: rgba(255, 97, 82, .42);
  box-shadow: inset 0 0 0 1px rgba(255, 97, 82, .08), 0 0 28px rgba(255, 97, 82, .08);
}
.arena-combat-preview.is-live .arena-versus {
  border-color: rgba(255, 211, 107, .52);
  background: linear-gradient(180deg, rgba(104, 48, 22, .82), rgba(0,0,0,.42));
}
.arena-combat-preview.is-live .arena-versus span {
  color: var(--gold-soft);
}
.arena-fighter-card {
  position: relative;
  display: grid;
  gap: 10px;
  min-height: 220px;
  padding: 16px;
  border: 1px solid rgba(242, 186, 84, .22);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 0%, rgba(121, 255, 154, .12), transparent 42%),
    rgba(0,0,0,.38);
}
.arena-fighter-card.enemy {
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 97, 82, .14), transparent 42%),
    rgba(0,0,0,.38);
}
.arena-fighter-badge {
  justify-self: start;
  padding: 5px 9px;
  border: 1px solid rgba(242, 186, 84, .22);
  border-radius: 999px;
  color: var(--gold);
  background: rgba(0,0,0,.3);
  font-size: 11px;
  font-weight: 900;
}
.arena-fighter-portrait {
  display: grid;
  place-items: center;
  justify-self: center;
  width: 82px;
  aspect-ratio: 1;
  border: 1px solid rgba(242, 186, 84, .28);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 34%, rgba(255,255,255,.22), transparent 20%),
    radial-gradient(circle, rgba(242, 186, 84, .24), rgba(0,0,0,.46));
}
.arena-fighter-card h2 {
  margin: 0;
  text-align: center;
}
.arena-fighter-card dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}
.arena-fighter-card dt,
.arena-fighter-card dd {
  margin: 0;
  text-align: center;
}
.arena-fighter-card dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}
.arena-fighter-card dd {
  color: var(--gold-soft);
  font-weight: 900;
}
.arena-versus {
  display: grid;
  place-items: center;
  gap: 8px;
  align-self: center;
  min-height: 110px;
  border: 1px solid rgba(242, 186, 84, .2);
  border-radius: 8px;
  background: rgba(0,0,0,.35);
}
.arena-versus b {
  color: #fff2c2;
  font-size: 30px;
}
.arena-versus span {
  color: var(--muted);
  font-weight: 900;
}
.arena-side-panel {
  position: relative;
  z-index: 1;
  grid-column: 2;
  grid-row: 1 / span 3;
  display: grid;
  align-content: start;
  gap: 12px;
}
.arena-energy-panel,
.arena-reward-grid article {
  border: 1px solid rgba(242, 186, 84, .18);
  border-radius: 8px;
  background: rgba(0,0,0,.38);
  padding: 14px;
}
.arena-energy-panel > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}
.arena-energy-panel span,
.arena-reward-grid span {
  color: var(--muted);
  font-weight: 900;
}
.arena-energy-panel small b {
  color: var(--gold-soft);
}
.arena-energy-panel b,
.arena-reward-grid b {
  color: var(--gold-soft);
  font-size: 22px;
}
.arena-energy-panel i {
  display: block;
  height: 12px;
  margin: 12px 0 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(0,0,0,.58);
  box-shadow: inset 0 0 0 1px rgba(242, 186, 84, .14);
}
.arena-energy-panel em {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #72ef89, #f6c36a);
}
.arena-reward-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.arena-reward-grid article {
  display: grid;
  gap: 4px;
}
.arena-monitor {
  display: grid;
  gap: 12px;
  min-height: 280px;
  border: 1px solid rgba(242, 186, 84, .24);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 0%, rgba(242, 186, 84, .16), transparent 40%),
    linear-gradient(180deg, rgba(0,0,0,.58), rgba(16, 6, 5, .72));
  padding: 14px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}
.arena-monitor header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
}
.arena-monitor header small {
  color: var(--gold);
  font-weight: 900;
  text-transform: uppercase;
}
.arena-monitor header b {
  color: #fff2c2;
  text-align: right;
}
.arena-monitor-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px minmax(0, 1fr);
  gap: 8px;
  align-items: stretch;
}
.arena-monitor-stage article {
  position: relative;
  display: grid;
  gap: 7px;
  align-content: center;
  min-width: 0;
  min-height: 112px;
  padding: 10px;
  border: 1px solid rgba(242, 186, 84, .16);
  border-radius: 8px;
  background: rgba(0,0,0,.36);
  transition: transform .18s ease, border-color .18s ease, filter .18s ease;
}
.arena-monitor-stage article.is-attacking {
  transform: translateY(-4px) scale(1.03);
  border-color: rgba(255, 211, 122, .72);
  filter: brightness(1.18);
}
.arena-monitor-stage article.is-hit {
  animation: arena-hit .26s ease;
  border-color: rgba(255, 107, 107, .68);
}
.arena-monitor-stage span,
.arena-monitor-stage small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}
.arena-monitor-stage strong {
  min-width: 0;
  color: var(--gold-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.arena-monitor-stage i {
  display: block;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(0,0,0,.6);
}
.arena-monitor-stage em {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #72ef89, #f6c36a);
  transition: width .28s ease;
}
.arena-monitor-stage [data-arena-unit="enemy"] em {
  background: linear-gradient(90deg, #ff6b6b, #f6c36a);
}
.arena-monitor-stage [data-arena-unit="player"] {
  border-color: rgba(114, 239, 137, .22);
  background:
    radial-gradient(circle at 0% 0%, rgba(114, 239, 137, .12), transparent 52%),
    rgba(0,0,0,.36);
}
.arena-monitor-stage [data-arena-unit="enemy"] {
  text-align: right;
  border-color: rgba(255, 107, 107, .24);
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 107, 107, .14), transparent 52%),
    rgba(0,0,0,.36);
}
.arena-monitor-stage u {
  position: absolute;
  left: 50%;
  top: 34px;
  color: #ffdf8a;
  font-weight: 900;
  text-decoration: none;
  opacity: 0;
  transform: translate(-50%, 10px);
  pointer-events: none;
}
.arena-monitor-stage u.show {
  animation: arena-damage-pop .78s ease;
}
.arena-monitor-stage u.is-heal {
  color: #7dff9b;
}
.arena-monitor-vs {
  display: grid;
  place-items: center;
  align-self: center;
  min-height: 82px;
  border: 1px solid rgba(242, 186, 84, .16);
  border-radius: 8px;
  color: #fff2c2;
  background: rgba(0,0,0,.34);
  font-weight: 900;
}
.arena-monitor-log {
  display: grid;
  align-content: start;
  gap: 6px;
  min-height: 86px;
  max-height: 116px;
  overflow: hidden;
  padding: 10px;
  border: 1px solid rgba(242, 186, 84, .14);
  border-radius: 8px;
  background: rgba(0,0,0,.34);
}
.arena-monitor-log div {
  width: fit-content;
  max-width: 86%;
  padding: 6px 9px;
  border: 1px solid rgba(242, 186, 84, .12);
  border-radius: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  background: rgba(0,0,0,.2);
}
.arena-monitor-log .arena-log-player {
  justify-self: start;
  color: #9dffad;
  border-color: rgba(114, 239, 137, .48);
  border-left: 3px solid #72ef89;
  background: rgba(31, 103, 47, .28);
  text-align: left;
}
.arena-monitor-log .arena-log-enemy {
  justify-self: end;
  color: #ffaaa0;
  border-color: rgba(255, 107, 107, .5);
  border-right: 3px solid #ff6b6b;
  background: rgba(116, 28, 25, .32);
  text-align: right;
}
.arena-monitor-log .arena-log-result {
  max-width: 100%;
  color: #fff2c2;
  border-color: rgba(255, 211, 122, .3);
}
.arena-reward-modal[hidden] {
  display: none;
}
.arena-reward-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 18px;
}
.arena-reward-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.66);
  backdrop-filter: blur(4px);
}
.arena-reward-dialog {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 14px;
  width: min(460px, 100%);
  padding: 22px;
  border: 1px solid rgba(242, 186, 84, .34);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 0%, rgba(242, 186, 84, .22), transparent 42%),
    linear-gradient(180deg, rgba(44, 18, 12, .98), rgba(10, 7, 6, .98));
  box-shadow: 0 24px 70px rgba(0,0,0,.58), inset 0 1px 0 rgba(255,255,255,.06);
  animation: arena-reward-in .22s ease;
}
.arena-reward-dialog small {
  color: var(--gold);
  font-weight: 900;
  text-transform: uppercase;
}
.arena-reward-dialog h2 {
  margin: 0;
  color: var(--gold-soft);
}
.arena-reward-dialog p {
  margin: 0;
}
.arena-reward-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.arena-reward-summary article {
  min-width: 0;
  padding: 12px 8px;
  border: 1px solid rgba(242, 186, 84, .18);
  border-radius: 8px;
  background: rgba(0,0,0,.38);
  text-align: center;
}
.arena-reward-summary span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}
.arena-reward-summary b {
  display: block;
  margin-top: 5px;
  color: #fff2c2;
  font-size: 20px;
}
@keyframes arena-reward-in {
  from { opacity: 0; transform: translateY(10px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes arena-hit {
  0%, 100% { transform: translateX(0); }
  35% { transform: translateX(-5px); }
  70% { transform: translateX(5px); }
}
@keyframes arena-damage-pop {
  0% { opacity: 0; transform: translate(-50%, 12px) scale(.82); }
  22% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -34px) scale(1.18); }
}
.pvp-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(300px, .9fr);
  gap: 16px;
  margin-top: 16px;
}
.combat-skill-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.arena-side-panel .combat-skill-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.pvp-hero + .combat-skill-grid {
  margin-top: 14px;
}
.combat-skill-grid article {
  padding: 10px 12px;
  border: 1px solid rgba(242, 186, 84, .2);
  border-radius: 8px;
  background: rgba(0,0,0,.28);
}
.combat-skill-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.combat-skill-grid b {
  display: block;
  margin-top: 4px;
  color: var(--gold);
  font-size: 17px;
}
.pvp-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 16px;
}
.pvp-panel h2 {
  margin-bottom: 12px;
}
.pvp-target-list,
.pvp-history {
  display: grid;
  gap: 10px;
}
.pvp-target {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px 96px;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(226, 169, 75, .22);
  border-radius: 8px;
  background: rgba(0, 0, 0, .24);
}
.pvp-target h3 {
  margin-bottom: 3px;
  color: var(--gold-soft);
}
.pvp-reward span,
.pvp-target small,
.pvp-history small {
  color: var(--muted);
}
.pvp-reward b {
  display: block;
  color: var(--gold-soft);
}
.pvp-history article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 10px;
  padding: 10px;
  border: 1px solid rgba(226, 169, 75, .18);
  border-radius: 8px;
  background: rgba(0, 0, 0, .22);
}
.pvp-history article > small {
  grid-column: 1 / -1;
}
.pvp-history .win span {
  color: var(--green);
}
.pvp-history .lose span {
  color: #ff7777;
}
.clan-layout {
  display: grid;
  grid-template-columns: minmax(420px, 1.1fr) minmax(340px, .9fr);
  gap: 16px;
  margin-top: 16px;
}
.clan-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    radial-gradient(circle at 12% 0%, rgba(242, 186, 84, .08), transparent 34%),
    linear-gradient(180deg, rgba(25, 15, 10, .9), rgba(8, 7, 6, .88));
  padding: 16px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04), 0 16px 38px rgba(0,0,0,.18);
}
.clan-card h2 {
  margin-bottom: 10px;
}
.clan-overview {
  display: grid;
  grid-template-columns: minmax(220px, .8fr) minmax(360px, 1.2fr);
  gap: 16px;
  align-items: end;
  grid-column: 1 / -1;
  min-height: 180px;
  background:
    radial-gradient(circle at 76% 26%, rgba(121, 255, 154, .12), transparent 26%),
    linear-gradient(110deg, rgba(70, 32, 14, .78), rgba(13, 9, 7, .92) 54%, rgba(0,0,0,.72));
}
.clan-tabs,
.clan-tab-panels {
  grid-column: 1 / -1;
}
.clan-tabs {
  display: flex;
  gap: 8px;
  align-items: center;
  overflow-x: auto;
  padding: 8px;
  border: 1px solid rgba(226, 169, 75, .2);
  border-radius: 8px;
  background: rgba(0, 0, 0, .26);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035);
}
.clan-tabs button {
  flex: 0 0 auto;
  min-height: 42px;
  padding: 10px 14px;
  border: 1px solid rgba(226, 169, 75, .2);
  border-radius: 8px;
  color: var(--muted);
  background: linear-gradient(180deg, rgba(42, 23, 14, .92), rgba(12, 8, 6, .92));
  font-weight: 900;
}
.clan-tabs button:hover,
.clan-tabs button:focus-visible {
  color: var(--gold-soft);
  border-color: rgba(242, 186, 84, .45);
}
.clan-tabs button.is-active {
  color: #120b06;
  border-color: rgba(255, 214, 118, .7);
  background: linear-gradient(180deg, #ffd36b, #d99b35);
  box-shadow: 0 10px 24px rgba(213, 151, 50, .18);
}
.clan-tab-panels {
  display: grid;
}
.clan-tab-panel {
  display: none;
  gap: 16px;
}
.clan-tab-panel.is-active {
  display: grid;
}
.clan-identity {
  display: grid;
  align-content: end;
  min-height: 100%;
}
.clan-overview small {
  color: var(--gold);
  font-weight: 800;
}
.clan-identity h2 {
  margin: 2px 0 8px;
  font-size: 34px;
}
.clan-stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}
.clan-stats span {
  padding: 12px;
  border: 1px solid rgba(226, 169, 75, .2);
  border-radius: 8px;
  background: rgba(0, 0, 0, .32);
}
.clan-stats b {
  display: block;
  color: var(--gold-soft);
  font-size: 22px;
}
.clan-level-track {
  display: grid;
  grid-column: 1 / -1;
  gap: 7px;
  padding: 10px 12px;
  border: 1px solid rgba(226, 169, 75, .18);
  border-radius: 8px;
  background: rgba(0,0,0,.24);
}
.clan-level-track > div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
}
.clan-level-track i {
  display: block;
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(0,0,0,.58);
  box-shadow: inset 0 0 0 1px rgba(242, 186, 84, .16);
}
.clan-level-track em {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #79ffe2, #f2ba54);
}
.clan-overview-actions {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 10px;
  align-items: end;
}
.clan-create,
.clan-donate {
  display: grid;
  gap: 10px;
}
.clan-donate {
  grid-template-columns: minmax(180px, 1fr) auto;
}
.clan-leave-form {
  display: grid;
}
.clan-leave-form button {
  min-height: 44px;
}
.clan-list,
.clan-members {
  display: grid;
  gap: 10px;
}
.clan-list article,
.clan-members article {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(226, 169, 75, .2);
  border-radius: 8px;
  background: rgba(0, 0, 0, .24);
}
.clan-members article {
  grid-template-columns: minmax(0, 1fr) auto;
}
.clan-members small {
  grid-column: 1 / -1;
}
.clan-list small,
.clan-members small {
  color: var(--muted);
}
.clan-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
}
.clan-card-head small,
.clan-card-head span {
  color: var(--gold);
  font-weight: 900;
}
.clan-boss-card,
.clan-project-card,
.clan-buildings-card,
.clan-boss-monitor,
.clan-unlocks-card,
.clan-dungeon-card {
  grid-column: 1 / -1;
}
.clan-help-card,
.clan-shop-card,
.clan-buildings-card {
  min-height: 100%;
}
.clan-building-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.clan-building-list article {
  display: grid;
  grid-template-rows: auto auto auto auto auto;
  gap: 8px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(226, 169, 75, .2);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 0%, rgba(121, 255, 154, .08), transparent 42%),
    rgba(0, 0, 0, .24);
}
.clan-building-list b {
  color: var(--gold-soft);
}
.clan-building-list p {
  margin: 0;
  color: #a8ffb7;
  font-weight: 900;
}
.clan-building-list span {
  justify-self: start;
  padding: 4px 8px;
  border: 1px solid rgba(242, 186, 84, .22);
  border-radius: 999px;
  color: var(--gold);
  background: rgba(0,0,0,.28);
  font-size: 12px;
  font-weight: 900;
}
.clan-building-list form {
  display: grid;
  align-self: end;
}
.clan-management-card {
  grid-column: 1 / -1;
}
.clan-management-form,
.clan-rank-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  align-items: end;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid rgba(226, 169, 75, .16);
  border-radius: 8px;
  background: rgba(0,0,0,.22);
}
.clan-management-form label,
.clan-check {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.clan-management-form select,
.clan-member-action select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: rgba(0,0,0,.45);
  padding: 9px 10px;
}
.clan-check {
  display: flex;
  gap: 7px;
  align-items: center;
  min-height: 42px;
  padding: 9px 10px;
  border: 1px solid rgba(226, 169, 75, .16);
  border-radius: 8px;
  background: rgba(0,0,0,.18);
}
.clan-check input {
  width: auto;
}
.clan-permission-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}
.clan-permission-grid label {
  display: flex;
  gap: 6px;
  align-items: center;
  min-width: 0;
  padding: 7px;
  border: 1px solid rgba(226, 169, 75, .16);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(0,0,0,.18);
  font-size: 11px;
  font-weight: 800;
}
.clan-permission-grid input {
  width: auto;
}
.clan-member-action {
  display: flex;
  gap: 6px;
  align-items: center;
}
.clan-member-action button {
  min-width: 58px;
  padding: 8px 10px;
}
.clan-boss-figure {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin-bottom: 14px;
}
.clan-boss-figure > span {
  display: block;
  aspect-ratio: 1;
  border: 1px solid rgba(242, 186, 84, .28);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 34%, rgba(121,255,154,.34), transparent 18%),
    radial-gradient(circle at 50% 52%, rgba(242,186,84,.28), transparent 34%),
    linear-gradient(180deg, rgba(50, 17, 14, .92), rgba(0,0,0,.7));
  box-shadow: inset 0 0 26px rgba(0,0,0,.5), 0 14px 34px rgba(0,0,0,.25);
}
.clan-boss-avatar {
  position: relative;
  overflow: hidden;
}
.clan-boss-avatar::before,
.clan-boss-avatar::after {
  content: "";
  position: absolute;
  inset: 18%;
  border-radius: 50%;
}
.clan-boss-avatar::before {
  background:
    radial-gradient(circle at 50% 36%, rgba(255,255,255,.5), transparent 12%),
    radial-gradient(circle at 50% 58%, rgba(242, 186, 84, .6), transparent 28%);
  filter: blur(8px);
}
.clan-boss-avatar::after {
  inset: 30% 24% 18%;
  border: 1px solid rgba(255, 235, 160, .36);
  box-shadow: 0 0 22px rgba(242, 186, 84, .28);
}
.boss-tier-veteran {
  background:
    radial-gradient(circle at 50% 36%, rgba(121,255,154,.36), transparent 18%),
    radial-gradient(circle at 50% 60%, rgba(93,188,255,.28), transparent 34%),
    linear-gradient(180deg, rgba(18, 42, 34, .92), rgba(0,0,0,.7));
}
.boss-tier-iron {
  background:
    radial-gradient(circle at 50% 36%, rgba(255,255,255,.28), transparent 18%),
    radial-gradient(circle at 50% 62%, rgba(170, 190, 210, .38), transparent 36%),
    linear-gradient(180deg, rgba(36, 42, 48, .96), rgba(0,0,0,.72));
}
.boss-tier-infernal {
  background:
    radial-gradient(circle at 50% 36%, rgba(255, 214, 96, .42), transparent 18%),
    radial-gradient(circle at 50% 62%, rgba(255, 86, 38, .42), transparent 36%),
    linear-gradient(180deg, rgba(82, 20, 12, .96), rgba(0,0,0,.72));
}
.boss-tier-ancient {
  background:
    radial-gradient(circle at 50% 36%, rgba(121,255,226,.38), transparent 18%),
    radial-gradient(circle at 50% 62%, rgba(126, 92, 255, .42), transparent 36%),
    linear-gradient(180deg, rgba(27, 18, 62, .96), rgba(0,0,0,.72));
}
.boss-tier-titan {
  background:
    radial-gradient(circle at 50% 36%, rgba(255,255,255,.5), transparent 18%),
    radial-gradient(circle at 50% 62%, rgba(255, 214, 96, .48), transparent 30%),
    radial-gradient(circle at 50% 82%, rgba(121,255,226,.36), transparent 38%),
    linear-gradient(180deg, rgba(72, 47, 12, .96), rgba(0,0,0,.72));
}
.clan-boss-figure strong {
  display: block;
  color: var(--gold-soft);
  margin-bottom: 8px;
}
.clan-boss-figure i,
.clan-project-list i {
  display: block;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(0,0,0,.58);
  box-shadow: inset 0 0 0 1px rgba(242, 186, 84, .16);
}
.clan-boss-figure em,
.clan-project-list em {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #79ff9a, #f2ba54);
}
.clan-boss-figure p {
  margin: 8px 0 0;
  color: var(--muted);
}
.clan-boss-statline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}
.clan-boss-statline span {
  padding: 7px 8px;
  border: 1px solid rgba(242, 186, 84, .16);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(0,0,0,.24);
  font-size: 12px;
  font-weight: 900;
}
.clan-boss-statline b {
  color: #fff2c2;
}
[data-clan-boss-attack-form] {
  display: grid;
  grid-template-columns: minmax(140px, auto) minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}
[data-clan-boss-attack-form] small {
  color: var(--muted);
  font-weight: 900;
}
.clan-monitor-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
}
.clan-monitor-stage article {
  position: relative;
  display: grid;
  align-content: center;
  gap: 8px;
  min-height: 116px;
  padding: 12px;
  border: 1px solid rgba(242, 186, 84, .16);
  border-radius: 8px;
  background: rgba(0,0,0,.3);
  transition: transform .18s ease, border-color .18s ease, filter .18s ease;
}
.clan-monitor-stage article.is-attacking {
  transform: translateY(-4px) scale(1.02);
  border-color: rgba(255, 211, 122, .72);
  filter: brightness(1.16);
}
.clan-monitor-stage article.is-hit {
  animation: arena-hit .26s ease;
  border-color: rgba(255, 107, 107, .68);
}
.clan-monitor-stage span,
.clan-monitor-stage small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}
.clan-monitor-stage strong {
  color: var(--gold-soft);
}
.clan-monitor-stage i {
  display: block;
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(0,0,0,.6);
}
.clan-monitor-stage em {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff6b6b, #f6c36a);
  transition: width .28s ease;
}
.clan-monitor-stage u {
  position: absolute;
  left: 50%;
  top: 34px;
  color: #ffdf8a;
  font-weight: 900;
  text-decoration: none;
  opacity: 0;
  transform: translate(-50%, 10px);
  pointer-events: none;
}
.clan-monitor-stage u.show {
  animation: arena-damage-pop .78s ease;
}
.clan-monitor-vs {
  display: grid;
  place-items: center;
  align-self: center;
  min-height: 84px;
  border: 1px solid rgba(242, 186, 84, .16);
  border-radius: 8px;
  color: #fff2c2;
  background: rgba(0,0,0,.34);
  font-weight: 900;
}
.clan-monitor-log,
.clan-unlock-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}
.clan-monitor-log {
  max-height: 150px;
  overflow: hidden;
  padding: 10px;
  border: 1px solid rgba(242, 186, 84, .14);
  border-radius: 8px;
  background: rgba(0,0,0,.28);
}
.clan-monitor-log div {
  width: fit-content;
  max-width: 88%;
  padding: 6px 9px;
  border: 1px solid rgba(242, 186, 84, .12);
  border-radius: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  background: rgba(0,0,0,.2);
}
.clan-monitor-log .clan-log-player {
  color: #9dffad;
  border-color: rgba(114, 239, 137, .48);
  border-left: 3px solid #72ef89;
  background: rgba(31, 103, 47, .28);
}
.clan-monitor-log .clan-log-muted {
  justify-self: end;
  color: #ffdca2;
  border-color: rgba(242, 186, 84, .26);
}
.clan-monitor-log .clan-log-result {
  max-width: 100%;
  color: #fff2c2;
  border-color: rgba(255, 211, 122, .3);
  background: rgba(129, 86, 19, .24);
}
.clan-dungeon-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.clan-war-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.clan-dungeon-grid article {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(226, 169, 75, .2);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 0%, rgba(121, 255, 154, .08), transparent 42%),
    rgba(0, 0, 0, .24);
}
.clan-war-grid article {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(226, 169, 75, .2);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 0%, rgba(242, 186, 84, .1), transparent 42%),
    rgba(0, 0, 0, .24);
}
.clan-war-grid article.owned {
  border-color: rgba(121, 255, 154, .36);
}
.clan-dungeon-grid article.locked {
  opacity: .62;
}
.clan-dungeon-grid article.is-active-run {
  border-color: rgba(121, 255, 154, .42);
  background:
    radial-gradient(circle at 50% 0%, rgba(121, 255, 154, .12), transparent 44%),
    rgba(0, 0, 0, .28);
}
.clan-dungeon-grid b {
  color: var(--gold-soft);
}
.clan-war-grid b {
  color: var(--gold-soft);
}
.clan-dungeon-grid small {
  color: var(--muted);
}
.clan-war-grid small {
  color: var(--muted);
}
.clan-war-score {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}
.clan-war-score span {
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid rgba(242, 186, 84, .14);
  border-radius: 8px;
  color: var(--muted);
  font-weight: 800;
}
.clan-war-score b {
  display: block;
  font-size: 18px;
}
.clan-dungeon-rewards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}
.clan-dungeon-rewards span,
.clan-dungeon-reqs span {
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid rgba(242, 186, 84, .14);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(0,0,0,.24);
  font-size: 12px;
  font-weight: 800;
}
.clan-dungeon-rewards b {
  display: block;
}
.clan-dungeon-map {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}
.clan-dungeon-map span {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 44px;
  padding: 5px 4px;
  border: 1px solid rgba(242, 186, 84, .16);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(0,0,0,.24);
  font-size: 10px;
  font-weight: 900;
  text-align: center;
}
.clan-dungeon-map span::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(242, 186, 84, .45);
}
.clan-dungeon-map b,
.clan-dungeon-map small {
  display: block;
  line-height: 1.05;
}
.clan-dungeon-map b {
  color: var(--gold-soft);
  font-size: 11px;
}
.clan-dungeon-map small {
  max-width: 100%;
  overflow: hidden;
  color: inherit;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.clan-dungeon-map .room-army::before {
  background: #f28a54;
}
.clan-dungeon-map .room-commander::before {
  background: #ffcb69;
}
.clan-dungeon-map .room-boss::before {
  background: #ff5f5f;
  box-shadow: 0 0 12px rgba(255, 95, 95, .38);
}
.clan-dungeon-map .is-done {
  border-color: rgba(121, 255, 154, .34);
  color: #9dffad;
}
.clan-dungeon-map .is-current {
  border-color: rgba(242, 186, 84, .72);
  background: rgba(129, 86, 19, .26);
  color: var(--gold-soft);
}
.clan-dungeon-reqs {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.clan-dungeon-progress {
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid rgba(121, 255, 154, .22);
  border-radius: 8px;
  background: rgba(8, 34, 17, .26);
}
.clan-dungeon-progress div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.clan-dungeon-progress span,
.clan-dungeon-progress small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.clan-dungeon-progress i {
  display: block;
  height: 8px;
  overflow: hidden;
  border: 1px solid rgba(242, 186, 84, .18);
  border-radius: 999px;
  background: rgba(0,0,0,.35);
}
.clan-dungeon-progress em {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #70f2cc, #f2ba54);
}
.clan-dungeon-history {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}
.clan-dungeon-history article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid rgba(242, 186, 84, .14);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(0,0,0,.22);
  font-size: 12px;
  font-weight: 800;
}
.clan-help-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}
.clan-help-actions button {
  display: grid;
  gap: 3px;
  align-content: center;
  min-width: 0;
  min-height: 58px;
  padding: 8px;
}
.clan-help-actions small {
  color: rgba(29, 18, 8, .72);
  font-size: 10px;
  font-weight: 900;
  line-height: 1.15;
}
.clan-help-current {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
  padding: 11px;
  border: 1px solid rgba(121, 255, 154, .28);
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(43, 70, 34, .42), rgba(0,0,0,.3));
}
.clan-help-current b {
  color: #a8ffb7;
}
.clan-help-current small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}
.clan-help-list,
.clan-shop-list,
.clan-project-list,
.clan-preview-grid {
  display: grid;
  gap: 10px;
}
.clan-help-list article,
.clan-shop-list article,
.clan-project-list article,
.clan-preview-grid article {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(226, 169, 75, .2);
  border-radius: 8px;
  background: rgba(0, 0, 0, .24);
}
.clan-help-list article,
.clan-shop-list article {
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
}
.clan-help-list article.empty {
  grid-template-columns: 1fr;
}
.clan-help-list article.answered,
.clan-help-list article.expired,
.clan-shop-list article.locked {
  opacity: .6;
}
.clan-status {
  min-width: 80px;
  padding: 5px 8px;
  border: 1px solid rgba(242, 186, 84, .2);
  border-radius: 999px;
  color: var(--gold-soft);
  background: rgba(0,0,0,.28);
  font-size: 11px;
  font-weight: 900;
  text-align: center;
}
.clan-help-list article.open .clan-status {
  color: #a8ffb7;
  border-color: rgba(121, 255, 154, .28);
}
.clan-waiting {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: right;
}
.clan-help-list small,
.clan-shop-list small,
.clan-shop-list span,
.clan-project-list small,
.clan-preview-grid span {
  color: var(--muted);
}
.clan-shop-list button {
  min-width: 86px;
}
.clan-project-list article {
  grid-template-columns: minmax(160px, .65fr) minmax(180px, 1fr) 48px;
  align-items: center;
}
.clan-project-list span {
  color: #79ffe2;
  font-weight: 900;
  text-align: right;
}
.clan-preview-card {
  grid-column: 1 / -1;
}
.clan-preview-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.clan-preview-grid b {
  color: var(--gold-soft);
}
.clan-unlock-list article {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 11px;
  border: 1px solid rgba(226, 169, 75, .18);
  border-radius: 8px;
  background: rgba(0,0,0,.24);
}
.clan-unlock-list article.locked {
  opacity: .58;
}
.clan-unlock-list b {
  color: var(--gold-soft);
}
.clan-unlock-list strong {
  display: block;
  color: #fff2c2;
}
.clan-unlock-list small {
  color: var(--muted);
}
.clan-unlock-list span {
  min-width: 70px;
  padding: 5px 8px;
  border: 1px solid rgba(242, 186, 84, .2);
  border-radius: 999px;
  color: var(--gold-soft);
  background: rgba(0,0,0,.28);
  font-size: 11px;
  font-weight: 900;
  text-align: center;
}
.bank-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 14px;
  margin-top: 16px;
  max-width: 760px;
}
.bank-grid article { display: grid; gap: 8px; text-align: center; }
.bank-grid strong { color: var(--gold); font-size: 30px; }
.bank-grid form { display: grid; gap: 14px; }
.tabs { display: flex; gap: 10px; margin: 16px 0; }
.tabs a { background: rgba(0,0,0,.35); color: var(--text); }
.tabs a.active { background: linear-gradient(180deg, #f6c36a, #d99c35); color: #1d1208; }
.quest-header {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(320px, .9fr);
  gap: 16px;
  align-items: end;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    radial-gradient(circle at 78% 20%, rgba(121, 255, 154, .1), transparent 30%),
    linear-gradient(120deg, rgba(60, 29, 14, .82), rgba(10, 8, 6, .92));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04), 0 18px 44px rgba(0,0,0,.16);
}
.quest-header small {
  color: var(--gold);
  font-weight: 900;
  text-transform: uppercase;
}
.quest-header h1 {
  margin: 4px 0 8px;
  font-size: 34px;
}
.quest-header p {
  margin: 0;
  color: var(--muted);
}
.quest-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.quest-summary article {
  padding: 12px;
  border: 1px solid rgba(226, 169, 75, .2);
  border-radius: 8px;
  background: rgba(0,0,0,.3);
}
.quest-summary span,
.quest-overall span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}
.quest-summary b {
  display: block;
  margin-top: 4px;
  color: var(--gold-soft);
  font-size: 24px;
}
.quest-overall {
  display: grid;
  grid-column: 1 / -1;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(226, 169, 75, .18);
  border-radius: 8px;
  background: rgba(0,0,0,.22);
}
.quest-overall > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.quest-overall b {
  color: var(--gold);
}
.quest-overall i,
.quest-progress i {
  display: block;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(0,0,0,.58);
  box-shadow: inset 0 0 0 1px rgba(242, 186, 84, .14);
}
.quest-overall em,
.quest-progress em {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ffd36b, #6bf083);
}
.quest-tabs {
  align-items: center;
}
.quest-tabs a {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}
.quest-tabs b {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  color: #160d06;
  background: var(--gold-soft);
  font-size: 12px;
}
.tutorial-chain {
  display: grid;
  gap: 12px;
  margin: 16px 0;
  padding: 14px;
  border: 1px solid rgba(226, 169, 75, .2);
  border-radius: 8px;
  background:
    radial-gradient(circle at 100% 0%, rgba(121, 255, 226, .08), transparent 34%),
    rgba(0,0,0,.26);
}
.tutorial-chain-head {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(260px, .65fr);
  gap: 14px;
  align-items: center;
}
.tutorial-chain-head small {
  color: var(--gold);
  font-weight: 900;
  text-transform: uppercase;
}
.tutorial-chain-head h2 {
  margin: 3px 0 6px;
  font-size: 26px;
}
.tutorial-chain-head p {
  margin: 0;
  color: var(--muted);
}
.tutorial-step-list {
  display: grid;
  gap: 9px;
}
.tutorial-step-list article {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) minmax(180px, auto) 108px;
  gap: 12px;
  align-items: center;
  padding: 11px;
  border: 1px solid rgba(226, 169, 75, .16);
  border-radius: 8px;
  background: rgba(8, 6, 5, .54);
}
.tutorial-step-list article.is-ready {
  border-color: rgba(121, 255, 154, .34);
}
.tutorial-step-list article.is-claimed {
  opacity: .72;
}
.tutorial-step-number {
  display: grid;
  place-items: center;
  width: 34px;
  aspect-ratio: 1;
  border: 1px solid rgba(242, 186, 84, .26);
  border-radius: 8px;
  color: var(--gold-soft);
  background: rgba(0,0,0,.34);
  font-weight: 900;
}
.tutorial-step-main b {
  display: block;
  color: var(--text);
}
.tutorial-step-main small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}
.tutorial-action {
  display: grid;
}
.tutorial-action a,
.tutorial-action button {
  display: grid;
  place-items: center;
  min-height: 42px;
  padding: 10px 12px;
  border-radius: 8px;
  font-weight: 900;
  text-decoration: none;
}
.tutorial-action a {
  color: #1d1208;
  background: linear-gradient(180deg, #f6c36a, #d99c35);
}
.quest-list {
  display: grid;
  gap: 12px;
}
.quest-card {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(220px, auto) 130px;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(226, 169, 75, .18);
  border-radius: 8px;
  background:
    radial-gradient(circle at 0% 50%, rgba(242, 186, 84, .08), transparent 28%),
    rgba(11, 8, 6, .74);
}
.quest-card.is-ready {
  border-color: rgba(121, 255, 154, .34);
  box-shadow: inset 0 0 0 1px rgba(121, 255, 154, .06);
}
.quest-card.is-claimed {
  opacity: .74;
}
.quest-card.empty {
  grid-template-columns: 1fr;
  color: var(--muted);
}
.quest-card-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px 12px;
  align-items: center;
}
.quest-card-main b {
  color: var(--text);
}
.quest-card-main small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}
.quest-status {
  align-self: start;
  padding: 6px 9px;
  border: 1px solid rgba(242, 186, 84, .24);
  border-radius: 999px;
  color: var(--gold);
  background: rgba(0,0,0,.28);
  font-size: 11px;
  font-weight: 900;
}
.quest-card.is-ready .quest-status {
  color: #101607;
  border-color: rgba(121, 255, 154, .55);
  background: #82f58f;
}
.quest-progress {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1fr) 44px;
  gap: 10px;
  align-items: center;
}
.quest-progress span {
  color: var(--gold);
  font-weight: 900;
  text-align: right;
}
.quest-rewards {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}
.quest-rewards span {
  padding: 7px 9px;
  border: 1px solid rgba(226, 169, 75, .18);
  border-radius: 8px;
  color: var(--gold-soft);
  background: rgba(0,0,0,.3);
  font-size: 13px;
  font-weight: 900;
}
.quest-claim {
  display: grid;
}
.quest-claim button {
  min-height: 44px;
}
.reports-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.report-panel {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}
.report-panel h2 { margin-bottom: 12px; }
.report-list {
  display: grid;
  gap: 10px;
}
.report-list article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(226, 169, 75, .18);
  border-radius: 8px;
  background: rgba(0, 0, 0, .22);
}
.report-list article > small {
  grid-column: 1 / -1;
  color: var(--muted);
}
.report-list span {
  color: var(--gold-soft);
  font-weight: 800;
}
.report-list .win span { color: var(--green); }
.report-list .lose span { color: #ff7777; }
.world-boss-title {
  background:
    linear-gradient(rgba(0, 0, 0, .5), rgba(0, 0, 0, .7)),
    radial-gradient(circle at 78% 35%, rgba(255, 79, 79, .22), transparent 32%),
    var(--panel);
}
.world-boss-hero {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr) 150px;
  gap: 18px;
  align-items: center;
  margin-top: 16px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(45, 10, 10, .78), rgba(0, 0, 0, .78));
}
.world-boss-art {
  display: grid;
  place-items: center;
  width: 120px;
  aspect-ratio: 1;
  border: 1px solid rgba(242, 186, 84, .45);
  border-radius: 8px;
  background: rgba(0, 0, 0, .36);
  font-size: 58px;
}
.world-boss-main h2 {
  margin: 4px 0 12px;
  color: var(--gold);
  font-size: 32px;
}
.world-boss-main small,
.world-boss-main p {
  color: var(--muted);
}
.boss-health {
  height: 18px;
  overflow: hidden;
  border: 1px solid rgba(242, 186, 84, .28);
  border-radius: 999px;
  background: rgba(0, 0, 0, .58);
}
.boss-health span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff5f5f, #f6c36a, #72ef89);
}
.world-boss-hero form {
  display: grid;
}
.world-boss-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  margin-top: 16px;
}
.property-title .craft-summary {
  align-items: center;
}
.property-title form {
  margin: 0;
}
.property-map {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  align-items: stretch;
  max-width: 1040px;
  min-height: 0;
  margin-top: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: visible;
  background:
    linear-gradient(90deg, rgba(255,255,255,.035), transparent 18%, rgba(255,255,255,.02) 52%, transparent 80%),
    radial-gradient(circle at 18% 18%, rgba(89, 231, 121, .14), transparent 26%),
    radial-gradient(circle at 72% 34%, rgba(242, 186, 84, .14), transparent 30%),
    radial-gradient(circle at 82% 86%, rgba(93, 188, 255, .1), transparent 26%),
    linear-gradient(135deg, rgba(43, 59, 33, .72), rgba(27, 20, 12, .92));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04), 0 18px 44px rgba(0,0,0,.18);
}
.property-marker {
  position: relative;
  display: grid;
  grid-template-rows: auto auto minmax(38px, auto) auto auto auto;
  gap: 7px;
  justify-items: center;
  align-content: start;
  min-width: 0;
  min-height: 230px;
  width: 100%;
  padding: 14px;
  border: 1px solid rgba(226, 169, 75, .26);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 0%, rgba(242, 186, 84, .1), transparent 42%),
    rgba(0,0,0,.72);
  color: var(--gold-soft);
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.045), 0 14px 30px rgba(0,0,0,.18);
}
.property-marker::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(255,255,255,.04);
  border-radius: 6px;
  pointer-events: none;
}
.property-marker.owned {
  border-color: rgba(114, 239, 137, .6);
  background:
    radial-gradient(circle at 50% 0%, rgba(114, 239, 137, .18), transparent 42%),
    linear-gradient(180deg, rgba(12, 55, 24, .84), rgba(0,0,0,.7));
}
.property-marker.locked {
  filter: grayscale(.5);
  opacity: .72;
}
.property-marker span {
  display: grid;
  place-items: center;
  width: 46px;
  aspect-ratio: 1;
  border: 1px solid rgba(242, 186, 84, .2);
  border-radius: 8px;
  background: rgba(0,0,0,.28);
  font-size: 30px;
}
.property-marker strong,
.property-marker b {
  max-width: 100%;
  overflow-wrap: anywhere;
}
.property-marker strong {
  color: var(--gold-soft);
  font-size: 17px;
  line-height: 1.12;
}
.property-marker b {
  color: #ffe18f;
  font-size: 18px;
  line-height: 1.05;
}
.property-marker small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
}
.property-marker form {
  align-self: end;
  width: 100%;
  margin: 0;
}
.property-marker button {
  width: 100%;
  min-height: 42px;
  padding: 8px 10px;
}
.market-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 14px;
  margin-top: 16px;
}
.filters form {
  display: grid;
  gap: 10px;
}
.filters input,
.filters select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0,0,0,.45);
  color: var(--text);
  padding: 12px 14px;
}
.market-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}
.market-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(242, 186, 84, .22);
  border-radius: 8px;
  background: rgba(0,0,0,.34);
}
.market-lock-note {
  padding: 10px 12px;
  border: 1px solid rgba(121, 255, 226, .24);
  border-radius: 8px;
  color: #9bfff0;
  background: rgba(0,0,0,.28);
  font-weight: 900;
}
.market-item-head {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 12px;
  align-items: center;
}
.market-item-head > span {
  display: grid;
  place-items: center;
  width: 48px;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 28px;
  background: rgba(0,0,0,.42);
}
.market-item-head > .item-art {
  background:
    radial-gradient(circle at 50% 30%, rgba(255,255,255,.2), transparent 35%),
    linear-gradient(145deg, rgba(132, 38, 28, .72), rgba(20, 11, 7, .92));
  color: transparent;
  font-size: 0;
}
.market-item-head h2 {
  margin: 0 0 4px;
  font-size: 18px;
}
.market-item-head p,
.market-card p {
  margin: 0;
}
.market-price-note,
.market-price-panel {
  border: 1px solid rgba(242, 186, 84, .18);
  border-radius: 8px;
  background: rgba(0,0,0,.22);
}
.market-price-note {
  padding: 10px 12px;
  color: var(--muted);
  font-weight: 800;
}
.market-price-panel {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
}
.market-price-panel > b {
  color: var(--gold);
  font-size: 13px;
}
.market-price-panel dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 12px;
  margin: 0;
}
.market-price-panel dt,
.market-price-panel dd {
  margin: 0;
  min-width: 0;
}
.market-price-panel dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.market-price-panel dd {
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
  text-align: right;
}
.market-buy-row,
.sell-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}
.market-buy-row strong {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--gold);
  font-size: 20px;
  line-height: 1;
  white-space: nowrap;
}
.market-buy-row strong .inline-icon {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
}
.auction-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.auction-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(242, 186, 84, .28);
  border-radius: 8px;
  background:
    linear-gradient(rgba(0,0,0,.18), rgba(0,0,0,.52)),
    var(--panel);
}
.auction-lot-head {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}
.auction-lot-art {
  position: relative;
  display: grid;
  place-items: center;
  width: 96px;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid rgba(242, 186, 84, .34);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 38%, rgba(255, 216, 136, .26), transparent 36%),
    radial-gradient(circle at 50% 82%, rgba(0,0,0,.62), transparent 44%),
    linear-gradient(145deg, rgba(66, 20, 15, .82), rgba(8, 5, 4, .94));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.04), 0 14px 28px rgba(0,0,0,.32);
}
.auction-lot-art::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(242, 186, 84, .12);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(242,186,84,.14), transparent 64%);
}
.auction-lot-art .item-art {
  z-index: 1;
  width: 72px;
  height: 72px;
  border-radius: 10px;
  box-shadow: 0 0 26px var(--art-glow);
}
.auction-lot-art .item-art img {
  width: 92%;
  height: 92%;
  object-fit: contain;
  object-position: center;
}
.auction-lot-head h2 {
  margin: 0 0 5px;
  color: var(--gold-soft);
  font-size: 19px;
}
.auction-lot-head p {
  margin: 0;
  color: var(--muted);
}
.auction-price {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid rgba(242, 186, 84, .18);
  border-radius: 8px;
  background: rgba(0,0,0,.36);
}
.auction-price strong {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #ffe15c;
  font-size: 28px;
  line-height: 1;
  white-space: nowrap;
}
.auction-price strong .inline-icon {
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
}
.auction-price span {
  color: var(--muted);
}
.auction-price b {
  color: #ff8989;
  font-size: 20px;
  letter-spacing: 1px;
}
.admin-title {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: end;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    radial-gradient(circle at 80% 22%, rgba(242, 186, 84, .16), transparent 28%),
    var(--panel);
}
.admin-title h1 {
  margin: 0 0 6px;
  color: var(--gold);
  font-size: 34px;
}
.admin-title p {
  margin: 0;
  color: var(--muted);
}
.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.admin-tabs a,
.admin-list a {
  display: inline-grid;
  place-items: center;
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid rgba(242, 186, 84, .28);
  border-radius: 8px;
  color: var(--gold-soft);
  background: rgba(0,0,0,.34);
  font-weight: 800;
  text-decoration: none;
}
.admin-tabs a.active {
  color: #1d1208;
  background: linear-gradient(180deg, #f6c36a, #d99c35);
}
.admin-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.admin-metrics article,
.admin-card {
  border: 1px solid rgba(242, 186, 84, .22);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(30, 18, 12, .84), rgba(0,0,0,.46)),
    var(--panel);
}
.admin-metrics article {
  padding: 14px;
}
.admin-metrics span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.admin-metrics b {
  display: block;
  margin-top: 5px;
  color: var(--gold);
  font-size: 26px;
}
.admin-card {
  margin-top: 14px;
  padding: 16px;
}
.admin-card h2 {
  margin: 0 0 12px;
  color: var(--gold-soft);
}
.admin-card p,
.admin-card small {
  color: var(--muted);
}
.migration-status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.migration-status-grid article {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  min-height: 68px;
  padding: 12px;
  border: 1px solid rgba(242, 186, 84, .18);
  border-radius: 8px;
  background: rgba(0, 0, 0, .24);
}
.migration-status-grid strong,
.migration-status-grid small {
  display: block;
}
.migration-status-grid span {
  flex: 0 0 auto;
  min-width: 58px;
  text-align: right;
  font-weight: 900;
}
.migration-status-grid article.ready span {
  color: #8dffa5;
}
.migration-status-grid article.missing {
  border-color: rgba(255, 107, 107, .42);
}
.migration-status-grid article.missing span {
  color: #ff9b9b;
}
.economy-report-panel h3 {
  margin: 16px 0 8px;
  color: var(--gold);
}
.economy-report-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}
.economy-report-grid article,
.economy-sink-list article {
  padding: 12px;
  border: 1px solid rgba(242, 186, 84, .18);
  border-radius: 8px;
  background: rgba(0, 0, 0, .24);
}
.economy-report-grid strong,
.economy-report-grid span,
.economy-report-grid b,
.economy-report-grid small,
.economy-sink-list strong,
.economy-sink-list span,
.economy-sink-list small {
  display: block;
}
.economy-report-grid b {
  margin: 6px 0;
  color: var(--gold-soft);
}
.economy-sink-list {
  display: grid;
  gap: 10px;
}
.economy-sink-list span {
  margin: 5px 0;
  color: var(--gold-soft);
  font-weight: 800;
}
.admin-grid {
  display: grid;
  grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}
.admin-form,
.admin-user-form,
.grant-form {
  display: grid;
  gap: 10px;
}
.admin-form label,
.admin-user-form label,
.grant-form label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.admin-form input,
.admin-form select,
.admin-user-form input,
.admin-user-form select,
.grant-form input,
.grant-form select {
  min-width: 0;
  padding: 9px 10px;
}
.admin-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.admin-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.admin-form .check,
.admin-user-form .check {
  display: flex;
  align-items: center;
  gap: 8px;
}
.admin-form .check input,
.admin-user-form .check input {
  width: auto;
}
.admin-list {
  display: grid;
  gap: 10px;
  max-height: 72vh;
  overflow: auto;
}
.admin-list.wide {
  max-height: none;
}
.admin-item-search {
  position: sticky;
  top: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(190px, .9fr) minmax(260px, 1.2fr) minmax(210px, .8fr) auto;
  gap: 8px;
  align-items: start;
  padding: 10px;
  border: 1px solid rgba(242, 186, 84, .18);
  border-radius: 8px;
  background: rgba(12, 8, 5, .96);
}
.admin-item-search label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.admin-item-search input[type="search"] {
  min-width: 0;
  padding: 9px 10px;
}
.admin-filter-group {
  min-width: 0;
  border: 1px solid rgba(242, 186, 84, .18);
  border-radius: 8px;
  background: rgba(0,0,0,.28);
  padding: 8px;
}
.admin-filter-group > b {
  display: block;
  margin-bottom: 7px;
  color: var(--gold-soft);
  font-size: 12px;
  font-weight: 900;
}
.admin-filter-group > div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 84px;
  overflow: auto;
}
.admin-filter-group label {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}
.admin-filter-group input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.admin-filter-group span {
  display: inline-grid;
  place-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border: 1px solid rgba(242, 186, 84, .22);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(0,0,0,.28);
  cursor: pointer;
  white-space: nowrap;
}
.admin-filter-group input:checked + span {
  color: #1d1208;
  border-color: rgba(255, 224, 150, .78);
  background: linear-gradient(180deg, #f6c36a, #d99c35);
}
.admin-filter-actions {
  display: grid;
  gap: 7px;
  align-content: center;
}
.admin-filter-actions small {
  white-space: nowrap;
}
.admin-balance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}
.admin-balance-grid label {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid rgba(242, 186, 84, .16);
  border-radius: 8px;
  background: rgba(0,0,0,.2);
}
.admin-balance-grid span {
  color: var(--gold-soft);
  font-weight: 900;
}
.admin-balance-grid small {
  color: var(--muted);
}
.admin-list article {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(242, 186, 84, .16);
  border-radius: 8px;
  background: rgba(0,0,0,.32);
}
.admin-item-list article {
  grid-template-columns: 42px minmax(0, 1fr) minmax(190px, 260px) auto auto;
}
.admin-list article > div {
  min-width: 0;
}
.admin-list b,
.admin-list small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.admin-list form {
  margin: 0;
}
.admin-item-list .admin-rename-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
}
.admin-item-list .admin-rename-item input {
  min-width: 0;
  padding: 8px 9px;
}
.admin-list button {
  padding: 8px 10px;
}
.admin-user-row {
  grid-template-columns: minmax(0, 1fr) !important;
}
.admin-quest-row {
  grid-template-columns: minmax(0, 1fr) auto auto !important;
}
.admin-user-form {
  grid-template-columns: 160px 110px 90px repeat(4, minmax(78px, 1fr)) 120px auto;
  align-items: end;
}
.admin-user-form strong {
  align-self: center;
  color: var(--gold-soft);
}
.grant-form {
  grid-template-columns: minmax(0, 1fr) 90px auto;
  padding-top: 8px;
  border-top: 1px solid rgba(242, 186, 84, .12);
}
.paperdoll-admin-grid {
  grid-template-columns: minmax(320px, 430px) minmax(0, 1fr);
}
.set-admin-grid {
  grid-template-columns: minmax(420px, 1.1fr) minmax(260px, .7fr);
}
.set-piece-editor {
  display: grid;
  gap: 10px;
  max-height: 64vh;
  overflow: auto;
  padding-right: 4px;
}
.set-piece-editor article {
  display: grid;
  gap: 9px;
  padding: 10px;
  border: 1px solid rgba(242, 186, 84, .16);
  border-radius: 8px;
  background: rgba(0,0,0,.24);
}
.set-piece-bonus {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}
.set-admin-list article {
  grid-template-columns: minmax(0, 1fr) auto auto;
}
.paperdoll-admin-list article {
  grid-template-columns: 46px minmax(0, 1fr) auto auto;
}
.paperdoll-admin-list .item-art,
.paperdoll-admin-list .inline-icon {
  width: 42px;
  height: 42px;
}
.admin-form button:disabled {
  cursor: not-allowed;
  opacity: .55;
}
.sell-form input {
  min-width: 0;
}
@media (max-width: 560px) {
  .combat-skill-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .auction-lot-head {
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 10px;
  }
  .auction-lot-art {
    width: 74px;
  }
  .auction-lot-art .item-art {
    width: 58px;
    height: 58px;
  }
}
@media (max-width: 980px) {
  .season-board {
    grid-template-columns: 1fr;
  }
  .admin-title,
  .admin-grid {
    grid-template-columns: 1fr;
  }
  .set-piece-bonus {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .admin-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .admin-user-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .admin-item-search {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 620px) {
  .admin-metrics,
  .admin-two,
  .admin-stats,
  .grant-form {
    grid-template-columns: 1fr;
  }
  .admin-list article {
    grid-template-columns: 42px minmax(0, 1fr);
  }
  .admin-item-search {
    grid-template-columns: 1fr;
  }
  .admin-quest-row {
    grid-template-columns: 1fr !important;
  }
  .admin-list article > a,
  .admin-list article > form {
    grid-column: 1 / -1;
  }
}
table { width: 100%; border-collapse: collapse; }
th, td { padding: 14px; border-bottom: 1px solid rgba(242, 186, 84, .18); text-align: left; }
th { color: var(--gold); }
.ranking-list { display: grid; gap: 10px; margin-top: 16px; max-width: 900px; }
.ranking-list article {
  display: grid;
  grid-template-columns: 50px 1fr 120px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}
.ranking-board {
  display: grid;
  gap: 10px;
  max-width: 1060px;
}
.season-board {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, .75fr);
  gap: 14px;
}
.ranking-board article {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 130px minmax(220px, .8fr);
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}
.ranking-board article.is-me {
  border-color: rgba(114, 239, 137, .68);
  background: rgba(28, 80, 38, .24);
}
.ranking-board article > b {
  color: var(--gold-soft);
  font-size: 20px;
}
.ranking-board strong {
  display: block;
}
.ranking-board small {
  color: var(--muted);
}
.ranking-board article > span {
  color: var(--gold-soft);
  font-weight: 800;
}
.chat {
  position: fixed;
  right: max(16px, calc((100vw - 1540px) / 2 + 16px));
  bottom: 104px;
  z-index: 40;
  width: min(410px, calc(100vw - 32px));
  height: min(590px, calc(100vh - 136px));
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 0, rgba(242, 186, 84, .12), transparent 32%),
    rgba(12, 9, 7, .96);
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(16px) scale(.98);
  transform-origin: 100% 100%;
  transition: opacity .18s ease, transform .18s ease;
  box-shadow: 0 24px 80px rgba(0,0,0,.58);
}
body.chat-open .chat {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}
.chat-backdrop {
  position: fixed;
  inset: 0;
  z-index: 39;
  background: rgba(0,0,0,.36);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
}
body.chat-open .chat-backdrop {
  opacity: 1;
  pointer-events: auto;
}
.chat-head, .chat-tabs, .chat-form {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border-bottom: 1px solid rgba(242, 186, 84, .16);
}
.chat-head { justify-content: space-between; }
.chat-head span { color: var(--green); font-size: 13px; }
.chat-close {
  display: grid;
  place-items: center;
  width: 30px;
  aspect-ratio: 1;
  padding: 0;
  border-radius: 8px;
  color: var(--gold-soft);
  background: rgba(0,0,0,.4);
}
.chat-tabs button {
  flex: 1;
  padding: 8px;
  background: transparent;
  color: var(--muted);
}
.chat-tabs button.active { color: var(--gold); border-bottom-color: var(--gold); }
.chat-body { overflow: auto; padding: 10px; }
.chat-body article {
  padding: 10px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.chat-body small { float: right; }
.chat-body p { margin: 6px 0 0; color: var(--text); line-height: 1.35; }
.chat-form { border-bottom: 0; border-top: 1px solid rgba(242, 186, 84, .16); }
.chat-form button { width: 46px; aspect-ratio: 1; padding: 0; }
.mobile-only { display: none; }
.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 14px;
  z-index: 35;
  display: grid;
  grid-template-columns: minmax(300px, .8fr) minmax(0, 1.7fr);
  gap: 10px;
  width: min(1180px, calc(100% - 28px));
  min-height: 72px;
  padding: 9px;
  border: 1px solid rgba(242, 186, 84, .34);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 232, 168, .07), transparent 44%),
    linear-gradient(90deg, rgba(8, 6, 5, .96), rgba(31, 18, 10, .94), rgba(8, 6, 5, .96));
  transform: translateX(-50%);
  backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 18px 52px rgba(0,0,0,.52);
}
.hud-status {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) 72px minmax(112px, .9fr);
  gap: 7px;
  min-width: 0;
}
.hud-status > span,
.bottom-nav a,
.bottom-nav button {
  min-width: 0;
  border: 1px solid rgba(242, 186, 84, .2);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(44, 25, 13, .76), rgba(0,0,0,.42));
}
.hud-status > span {
  display: grid;
  gap: 5px;
  align-content: center;
  padding: 8px 10px;
}
.hud-status small,
.hud-actions small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1;
  font-weight: 900;
  text-transform: uppercase;
}
.hud-status b {
  color: var(--gold-soft);
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hud-meter i {
  display: block;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(0,0,0,.6);
  box-shadow: inset 0 0 0 1px rgba(242, 186, 84, .14);
}
.hud-meter em {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #65e879, #f7d36b);
}
.hud-actions {
  display: grid;
  grid-template-columns: repeat(8, minmax(68px, 1fr));
  gap: 7px;
  min-width: 0;
}
.bottom-nav a,
.bottom-nav button {
  display: grid;
  grid-template-rows: auto auto;
  place-items: center;
  min-height: 54px;
  padding: 6px 5px;
  color: var(--muted);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.bottom-nav a:hover,
.bottom-nav button:hover,
.bottom-nav a.active,
body.chat-open .bottom-nav [data-toggle-chat],
body.sidebar-open .bottom-nav [data-toggle-sidebar],
body.stats-open .bottom-nav [data-open-stats] {
  color: #1d1208;
  border-color: rgba(255, 224, 150, .72);
  background: linear-gradient(180deg, #ffd77d, #bc7c27);
}
.bottom-nav a:hover small,
.bottom-nav button:hover small,
.bottom-nav a.active small,
body.chat-open .bottom-nav [data-toggle-chat] small,
body.sidebar-open .bottom-nav [data-toggle-sidebar] small,
body.stats-open .bottom-nav [data-open-stats] small {
  color: rgba(29, 18, 8, .68);
}
.hud-actions small {
  display: grid;
  place-items: center;
  width: 22px;
  aspect-ratio: 1;
  border-radius: 7px;
  color: #1d1208;
  background: linear-gradient(180deg, #f6c86f, #b87925);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18);
}
.hud-actions b {
  max-width: 100%;
  color: inherit;
  font-size: 12px;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.auth-screen { display: grid; place-items: center; min-height: 100vh; padding: 20px; }
.auth-card {
  width: min(430px, 100%);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
}
.auth-card h1 { font-size: 42px; }
.auth-card form { display: grid; gap: 14px; }
.auth-card label { display: grid; gap: 8px; color: var(--muted); }
.auth-card a { display: inline-block; margin-top: 16px; color: var(--gold-soft); }

.landing-screen {
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% 8%, rgba(242, 186, 84, .18), transparent 30%),
    linear-gradient(180deg, rgba(40, 13, 8, .86), #0b0a08 720px);
}
.landing-screen a { color: inherit; text-decoration: none; }
.landing-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 12px clamp(16px, 4vw, 64px);
  border-bottom: 1px solid rgba(242, 186, 84, .22);
  background: rgba(8, 9, 12, .88);
  backdrop-filter: blur(12px);
}
.landing-brand {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  min-width: 0;
}
.landing-brand span {
  display: grid;
  place-items: center;
  width: 38px;
  aspect-ratio: 1;
  border: 1px solid rgba(242, 186, 84, .55);
  border-radius: 8px;
  color: #111;
  background: var(--gold);
  font-weight: 900;
}
.landing-brand strong {
  font-size: 22px;
  letter-spacing: 0;
}
.landing-topbar nav,
.landing-actions,
.landing-cta-row,
.landing-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  align-items: center;
}
.landing-topbar nav {
  justify-content: center;
  color: #e7d2aa;
  font-weight: 700;
}
.ghost-link,
.play-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 8px;
  padding: 10px 16px;
  font-weight: 900;
}
.ghost-link {
  border: 1px solid rgba(242, 186, 84, .34);
  color: var(--gold-soft);
  background: rgba(0, 0, 0, .34);
}
.play-link {
  border: 1px solid rgba(255, 220, 145, .7);
  color: #171008;
  background: linear-gradient(180deg, #ffe09b, #e3a63e);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .28);
}
.ghost-link.large,
.play-link.large {
  min-height: 50px;
  padding-inline: 24px;
}
.landing-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: clamp(20px, 5vw, 80px);
  align-items: end;
  min-height: 680px;
  padding: 92px clamp(16px, 6vw, 96px) 54px;
  background:
    radial-gradient(circle at 58% 36%, rgba(242, 186, 84, .2), transparent 24%),
    linear-gradient(90deg, rgba(0,0,0,.78), rgba(79,24,15,.42) 48%, rgba(0,0,0,.7));
}
.landing-hero-copy {
  max-width: 760px;
}
.landing-hero-copy small,
.section-kicker {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--gold);
  font-weight: 900;
  text-transform: uppercase;
  font-size: 13px;
}
.landing-hero h1 {
  margin: 0;
  color: #fff6df;
  font-size: clamp(48px, 8vw, 110px);
  line-height: .9;
  text-shadow: 0 8px 36px rgba(0, 0, 0, .7);
}
.landing-hero p {
  max-width: 660px;
  color: #ead8b6;
  font-size: 19px;
  line-height: 1.55;
}
.landing-login-panel {
  display: grid;
  gap: 14px;
  border: 1px solid rgba(242, 186, 84, .32);
  border-radius: 8px;
  padding: 22px;
  background: rgba(10, 8, 6, .88);
  box-shadow: 0 24px 70px rgba(0,0,0,.42);
}
.landing-login-panel form,
.landing-login-panel label {
  display: grid;
  gap: 10px;
}
.landing-login-panel label {
  color: var(--muted);
  font-weight: 700;
}
.landing-login-panel a {
  color: var(--gold-soft);
  font-weight: 800;
}
.landing-stats,
.landing-section,
.landing-footer {
  width: min(1180px, calc(100% - 32px));
  margin-inline: auto;
}
.landing-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin-top: -28px;
  border: 1px solid rgba(242, 186, 84, .25);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(242, 186, 84, .16);
}
.landing-stats article {
  padding: 22px;
  background: rgba(12, 9, 7, .94);
}
.landing-stats b {
  display: block;
  color: var(--gold-soft);
  font-size: 30px;
}
.landing-stats span { color: var(--muted); font-weight: 700; }
.landing-section {
  margin-top: 74px;
}
.landing-section h2 {
  color: #fff2d1;
  font-size: clamp(28px, 4vw, 48px);
}
.landing-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.landing-feature-grid > div {
  grid-column: 1 / -1;
}
.landing-feature-grid article {
  overflow: hidden;
  border: 1px solid rgba(242, 186, 84, .22);
  border-radius: 8px;
  background: rgba(12, 9, 7, .9);
}
.feature-art {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 36%, rgba(242, 186, 84, .24), transparent 28%),
    linear-gradient(135deg, rgba(116, 31, 20, .72), rgba(6, 5, 4, .92));
}
.feature-art::before {
  content: "";
  position: absolute;
  inset: 18% 22%;
  border: 1px solid rgba(255, 224, 150, .26);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 224, 150, .12), transparent 62%);
}
.feature-art::after {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  color: rgba(255, 236, 188, .9);
  font-size: clamp(34px, 5vw, 58px);
  font-weight: 900;
}
.art-arena::after { content: "ARENA"; }
.art-boss::after { content: "BOSS"; }
.art-market::after { content: "PAZAR"; }
.landing-feature-grid h3,
.landing-feature-grid p {
  margin-inline: 18px;
}
.landing-feature-grid h3 {
  margin-top: 18px;
  color: var(--gold-soft);
}
.landing-feature-grid p {
  margin-bottom: 20px;
  line-height: 1.5;
}
.landing-news {
  display: grid;
  grid-template-columns: 1.1fr repeat(3, minmax(0, .72fr));
  gap: 14px;
}
.landing-news-main,
.landing-news article,
.landing-patch,
.video-frame,
.media-copy {
  border: 1px solid rgba(242, 186, 84, .22);
  border-radius: 8px;
  background: rgba(12, 9, 7, .86);
  padding: 22px;
}
.landing-news article {
  display: grid;
  gap: 10px;
  align-content: start;
}
.landing-news article small { color: var(--gold); font-weight: 900; }
.landing-news article strong { color: #fff2d1; font-size: 18px; }
.landing-news article span { color: var(--muted); line-height: 1.45; }
.landing-media {
  display: grid;
  grid-template-columns: 1fr 1.2fr .8fr;
  gap: 18px;
  align-items: stretch;
}
.landing-media > div:first-child {
  align-self: center;
}
.video-frame {
  min-height: 260px;
  display: grid;
  place-items: center;
  text-align: center;
  background:
    radial-gradient(circle at 50% 40%, rgba(242, 186, 84, .22), transparent 28%),
    linear-gradient(rgba(42, 15, 10, .72), rgba(0,0,0,.82));
}
.video-frame span {
  display: grid;
  place-items: center;
  width: 72px;
  aspect-ratio: 1;
  border-radius: 50%;
  color: #111;
  background: var(--gold);
  font-size: 26px;
}
.video-frame strong {
  color: #fff2d1;
  font-size: 24px;
}
.media-copy {
  display: grid;
  align-content: center;
  gap: 16px;
}
.landing-patch ol {
  margin: 0;
  padding-left: 22px;
  color: var(--muted);
  line-height: 1.8;
}
.landing-patch b { color: var(--gold-soft); }
.landing-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 76px;
  padding: 26px 0 36px;
  color: var(--muted);
}

@media (max-width: 1280px) {
  .app-shell { grid-template-columns: 280px minmax(0, 1fr); }
  .topbar {
    grid-template-columns: minmax(190px, 1fr) auto;
  }
  .topbar-resources,
  .topbar-combat {
    grid-column: 1 / -1;
  }
  .topbar .logout {
    grid-column: 2;
    grid-row: 1;
  }
}

@media (max-width: 900px) {
  .landing-topbar {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .landing-topbar nav {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 2px;
  }
  .landing-actions {
    justify-content: stretch;
  }
  .landing-actions a {
    flex: 1;
  }
  .landing-hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 48px 16px 36px;
  }
  .landing-hero h1 {
    font-size: 54px;
  }
  .landing-login-panel {
    max-width: 520px;
  }
  .landing-stats,
  .landing-feature-grid,
  .landing-news,
  .landing-media {
    grid-template-columns: 1fr;
  }
  .landing-stats {
    margin-top: 16px;
  }
  .landing-section {
    margin-top: 46px;
  }
  .landing-footer {
    display: grid;
  }
  .app-shell { display: block; padding: 10px; }
  .app-shell::before { width: 100vw; height: 120px; }
  .main { padding-bottom: 154px; }
  .quick-nav {
    position: static;
    grid-template-columns: repeat(5, minmax(92px, 1fr));
    overflow-x: auto;
    scrollbar-width: thin;
  }
  .quick-nav a {
    min-height: 36px;
    white-space: nowrap;
  }
  .mobile-only { display: inline-grid; place-items: center; }
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(310px, 86vw);
    height: 100vh;
    z-index: 30;
    border-radius: 0;
    transform: translateX(-100%);
    transition: transform .2s ease;
  }
  .side-resources { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  body.sidebar-open .sidebar { transform: translateX(0); }
  .chat {
    right: 10px;
    bottom: 150px;
    width: calc(100vw - 20px);
    height: min(520px, calc(100vh - 174px));
  }
  .topbar {
    grid-template-columns: auto minmax(0, 1fr);
    border-radius: 8px;
    align-items: stretch;
  }
  .topbar-player {
    grid-column: 2;
  }
  .topbar-resources,
  .topbar-combat {
    grid-column: 1 / -1;
    grid-template-columns: repeat(4, minmax(82px, 1fr));
  }
  .topbar .logout {
    grid-column: 1 / -1;
    grid-row: auto;
    min-height: 42px;
  }
  .stats { font-size: 12px; gap: 7px 10px; }
  .dashboard-hero, .dashboard-grid, .dungeon-layout, .bank-grid, .market-layout, .pvp-grid, .clan-layout, .reports-layout, .world-boss-hero, .world-boss-grid { grid-template-columns: 1fr; }
  .inventory-workbench {
    width: min(100%, calc(100vw - 20px));
    max-height: calc(100vh - 20px);
    padding: 10px;
  }
  .inventory-workbench > header {
    display: grid;
  }
  .stats-workbench > header {
    display: grid;
  }
  .stat-allocator-row {
    grid-template-columns: 1fr;
  }
  .stat-allocator-row button {
    width: 100%;
  }
  .inventory-workbench-grid {
    grid-template-columns: 1fr;
  }
  .inventory-workbench-grid:not(.is-character-collapsed) {
    grid-template-columns: 1fr;
  }
  .inventory-bag {
    --inventory-slot-size: clamp(56px, 15vw, 78px);
    --inventory-slot-gap: 6px;
  }
  .inventory-grid-bag {
    grid-template-columns: repeat(5, var(--inventory-slot-size));
    grid-auto-rows: var(--inventory-slot-size);
    gap: var(--inventory-slot-gap);
  }
  .inventory-slot-item .item-art {
    width: calc(var(--inventory-slot-size) - 18px);
    height: calc(var(--inventory-slot-size) - 18px);
  }
  .inventory-character-toggle {
    left: 18px;
    top: -6px;
    transform: translateY(-50%) rotate(90deg);
  }
  .inventory-workbench-grid.is-character-collapsed .inventory-character-toggle {
    transform: translateY(-50%) rotate(-90deg);
  }
  .inventory-pagination {
    grid-template-columns: 1fr;
  }
  .equipment-inventory-list {
    grid-template-columns: 1fr;
  }
  .inventory-grid-bag.equipment-inventory-list {
    grid-template-columns: repeat(5, var(--inventory-slot-size));
  }
  .character-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ranking-board article { grid-template-columns: 1fr; }
  .world-boss-art { width: 100%; max-width: 180px; }
  .cards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .paperdoll { grid-template-columns: 72px 1fr 72px; min-height: 320px; }
  .fighter { min-height: 220px; }
  .fighter::before { width: min(64%, 150px); }
  .quest-header,
  .quest-summary,
  .tutorial-chain-head,
  .tutorial-step-list article,
  .quest-card,
  .quest-card-main {
    grid-template-columns: 1fr;
  }
  .quest-rewards {
    justify-content: flex-start;
  }
  .craft-item {
    grid-template-columns: 48px 1fr;
  }
  .craft-guide {
    grid-template-columns: 1fr;
  }
  .craft-actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr;
  }
  .forge-row {
    grid-template-columns: 1fr;
  }
  .forge-row em {
    text-align: left;
  }
  .pvp-target {
    grid-template-columns: 1fr;
  }
  .clan-stats,
  .clan-list article {
    grid-template-columns: 1fr;
  }
  .clan-overview,
  .clan-overview-actions {
    grid-template-columns: 1fr;
  }
  .clan-donate {
    grid-template-columns: 1fr;
  }
  .clan-boss-figure,
  .clan-boss-statline,
  [data-clan-boss-attack-form],
  .clan-monitor-stage,
  .clan-dungeon-grid,
  .clan-war-grid,
  .clan-war-score,
  .clan-dungeon-rewards,
  .clan-dungeon-history article,
  .clan-help-actions,
  .clan-help-list article,
  .clan-shop-list article,
  .clan-building-list,
  .clan-management-form,
  .clan-rank-form,
  .clan-permission-grid,
  .clan-project-list article,
  .clan-unlock-list article,
  .clan-preview-grid {
    grid-template-columns: 1fr;
  }
  .clan-project-list span {
    text-align: left;
  }
  .dungeon-route-map {
    min-height: 360px;
    aspect-ratio: auto;
  }
  .property-map {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    min-width: 0;
    padding: 12px;
  }
  .page-title, .hero-card, .arena-hero { padding: 18px; }
  .battle-stage {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .arena-screen {
    grid-template-columns: 1fr;
  }
  .arena-command {
    display: grid;
  }
  .arena-side-panel {
    grid-column: 1;
    grid-row: auto;
  }
  .arena-combat-preview {
    grid-template-columns: 1fr;
  }
  .arena-versus {
    min-height: 74px;
  }
  .battle-center {
    order: 3;
  }
  .combatant.player.attacking,
  .combatant.enemy.attacking {
    transform: translateY(-18px) scale(1.03);
  }
  .bottom-nav {
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    min-height: 0;
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 8px;
    border-top: 1px solid var(--line);
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 8px 8px 0 0;
    transform: none;
  }
  .hud-status {
    grid-template-columns: minmax(140px, 1fr) 70px minmax(110px, .8fr);
  }
  .hud-actions {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .bottom-nav a, .bottom-nav button {
    min-height: 50px;
    padding: 6px 4px;
    font-size: 12px;
  }
}

@media (min-width: 1101px) and (max-width: 1280px) {
  .dashboard-grid {
    grid-template-columns: minmax(600px, 1.55fr) minmax(240px, .65fr);
  }
}

@media (max-width: 560px) {
  .cards-grid { grid-template-columns: 1fr; }
  .topbar { gap: 8px; }
  .topbar-resources,
  .topbar-combat {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .main { padding-bottom: 190px; }
  .hud-status {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .hud-actions {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .hud-actions b {
    font-size: 11px;
  }
  .stat-points-summary {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
  }
  .stat-points-summary span {
    min-width: 0;
  }
  .stat-allocator-row dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .stat-reset-panel {
    display: grid;
  }
  .stat-reset-panel button {
    width: 100%;
  }
  .inventory-grid-bag.equipment-inventory-list {
    grid-template-columns: repeat(5, var(--inventory-slot-size));
  }
  .inventory-pagination > div {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  .chat {
    bottom: 184px;
    height: min(480px, calc(100vh - 206px));
  }
  .logout { padding: 8px 10px; }
  .paperdoll { grid-template-columns: 1fr 1fr; }
  .fighter { grid-column: 1 / -1; grid-row: auto; }
  .paperdoll::before { inset: 18px 10%; }
  .character-summary { grid-template-columns: 1fr; }
  .item-tooltip-actions { grid-template-columns: 1fr; }
  .arena-meta, .score-row { display: grid; }
  .craft-actions { grid-template-columns: 1fr; }
  th:nth-child(3), td:nth-child(3) { display: none; }
}

@media (max-width: 980px) {
  .character-paperdoll {
    grid-template-columns: 88px 74px minmax(210px, 260px) 74px;
    justify-content: center;
    min-height: 470px;
  }
  .avatar-stage {
    min-height: 390px;
  }
  .avatar-card-art {
    height: 220px;
  }
  .avatar-card-art img {
    max-height: 210px;
  }
}

@media (max-width: 560px) {
  .avatar-select-grid {
    grid-template-columns: 1fr;
  }
  .character-paperdoll {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto;
    grid-template-areas:
      "stage stage"
      "helmet weapon"
      "shield ring"
      "chest gloves"
      "shoulder gloves"
      "pants boots"
      "cloak amulet"
      "talisman talisman";
    min-height: 0;
  }
  .avatar-stage {
    min-height: 420px;
  }
  .avatar-base {
    max-width: 90%;
  }
  .avatar-paperdoll-layer {
    max-width: 90%;
  }
  .avatar-stage-elf {
    --boot-left-x: 26%;
    --boot-right-x: 64%;
    --boot-w: 23%;
    --boot-h: 23%;
  }
}
