:root {
  color-scheme: dark;
  --bg: #1f140c;
  --panel: rgba(16, 13, 11, 0.92);
  --panel-soft: rgba(37, 28, 22, 0.86);
  --gold: #f6cf74;
  --gold-deep: #a87725;
  --ember: #f1593c;
  --jade: #69d892;
  --aqua: #64d9ff;
  --ink: #070706;
  --cream: #fff3d6;
  --muted: #b9a98c;
  --line: rgba(246, 207, 116, 0.28);
  --danger: #ff7a70;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  color: var(--cream);
  background:
    radial-gradient(circle at 50% 18%, rgba(160, 43, 36, 0.35), transparent 28rem),
    radial-gradient(circle at 20% 86%, rgba(46, 151, 108, 0.18), transparent 18rem),
    linear-gradient(120deg, #24160d, #120c08 44%, #2b1a10);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.auth-screen,
.game-screen {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 18px;
}

.auth-panel {
  width: min(430px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.06), transparent 36%),
    rgba(15, 12, 10, 0.9);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  padding: 28px;
}

.brand-mark {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  border: 2px solid var(--gold);
  border-radius: 50%;
  color: #111;
  font-weight: 900;
  background:
    radial-gradient(circle at 35% 30%, #fff9ca, transparent 22%),
    conic-gradient(from 30deg, #f9d76b, #f05c3d, #5dd49a, #67cdf5, #f9d76b);
  box-shadow: 0 0 28px rgba(246, 207, 116, 0.35);
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 8px;
  font-size: clamp(1.65rem, 7vw, 2.35rem);
  line-height: 1.05;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 10px;
  color: var(--gold);
  font-size: 1.45rem;
}

.auth-copy,
.modal-card p {
  color: var(--muted);
  line-height: 1.55;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 22px 0 18px;
  border: 1px solid rgba(246, 207, 116, 0.18);
  border-radius: 8px;
  padding: 5px;
  background: rgba(255, 255, 255, 0.04);
}

.tab-button {
  min-height: 40px;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
}

.tab-button.active {
  color: #231306;
  font-weight: 800;
  background: linear-gradient(180deg, #ffe38d, #d9902f);
}

.auth-form,
.modal-card {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--gold);
  font-size: 0.88rem;
  font-weight: 800;
}

input,
select {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(246, 207, 116, 0.26);
  border-radius: 8px;
  outline: 0;
  padding: 0 13px;
  color: var(--cream);
  background: rgba(0, 0, 0, 0.32);
}

input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(246, 207, 116, 0.18);
}

select:focus {
  border-color: #61e488;
  box-shadow: 0 0 0 3px rgba(97, 228, 136, 0.16);
}

.form-message {
  min-height: 18px;
  margin: 0;
  color: var(--danger);
  font-size: 0.86rem;
}

.primary-action {
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  color: #221207;
  font-weight: 900;
  background: linear-gradient(180deg, #fff0a1, #e0912f 78%, #9d5f1f);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 10px 22px rgba(200, 99, 33, 0.26);
}

.game-screen {
  padding: 0;
}

.phone-frame {
  position: relative;
  width: min(100vw, 430px);
  min-height: 100dvh;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 42%, rgba(249, 213, 103, 0.11), transparent 18rem),
    linear-gradient(180deg, rgba(0, 0, 0, 0.35), transparent 20%, rgba(0, 0, 0, 0.72)),
    #080705;
  isolation: isolate;
}

.phone-frame::before {
  content: "";
  position: absolute;
  inset: 72px 0 72px;
  z-index: -2;
  background:
    radial-gradient(ellipse at 50% 58%, rgba(255, 243, 214, 0.12), transparent 26%),
    repeating-radial-gradient(ellipse at 50% 35%, transparent 0 34px, rgba(246, 207, 116, 0.24) 35px 37px, transparent 39px 62px);
  transform: rotate(-4deg) scale(1.12);
}

.cosmic-lines {
  position: absolute;
  inset: 64px -30px 0;
  z-index: -1;
  opacity: 0.75;
  background:
    linear-gradient(175deg, transparent 4%, rgba(247, 218, 120, 0.35) 5%, transparent 6%),
    linear-gradient(172deg, transparent 15%, rgba(247, 218, 120, 0.3) 16%, transparent 17%),
    linear-gradient(168deg, transparent 26%, rgba(247, 218, 120, 0.2) 27%, transparent 28%);
}

.lotus {
  position: absolute;
  width: 145px;
  filter: drop-shadow(0 12px 20px rgba(0, 0, 0, 0.45));
  opacity: 0.95;
  pointer-events: none;
}

.lotus-a {
  left: -22px;
  top: 110px;
  transform: rotate(-14deg);
}

.lotus-b {
  right: -12px;
  top: 92px;
  width: 130px;
  transform: rotate(12deg);
}

.lotus-c {
  left: -35px;
  bottom: 118px;
  width: 125px;
  transform: rotate(-18deg);
}

.top-hud {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 10px;
  align-items: center;
  min-height: 78px;
  padding: 8px 14px 7px;
  border-bottom: 1px solid rgba(246, 207, 116, 0.18);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.52));
}

.avatar-ring {
  width: 48px;
  height: 48px;
  overflow: hidden;
  border: 2px solid var(--gold);
  border-radius: 50%;
  background: #15100d;
  box-shadow: 0 0 0 2px #2c1706;
}

.avatar-ring img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.top-avatar-button {
  display: block;
  padding: 0;
  cursor: pointer;
}

.top-avatar-button:active {
  transform: scale(0.96);
}

.player-meta {
  min-width: 0;
}

.name-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  color: #ffe8aa;
}

.name-row strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 1rem;
}

.name-row span {
  flex: 0 0 auto;
  color: #ffe186;
  font-size: 0.75rem;
  font-weight: 900;
}

.age-line,
.root-line,
.resource-row {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.74rem;
}

.age-line {
  color: #fff2ce;
  font-weight: 800;
}

.root-line {
  color: #79e4a5;
}

.resource-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: #bcd8ff;
  line-height: 1.1;
  white-space: normal;
}

.cultivation-bar {
  position: relative;
  z-index: 5;
  width: calc(100% - 96px);
  height: 16px;
  margin: 0 12px 0 auto;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.cultivation-bar::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--bar, 0%);
  background: linear-gradient(90deg, #e55c52, #d64549);
}

.cultivation-bar span {
  position: relative;
  display: block;
  z-index: 1;
  color: #ffe7cf;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 16px;
}

.profile-detail-panel {
  position: absolute;
  inset: 4px;
  z-index: 42;
  display: grid;
  grid-template-rows: auto 128px minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid rgba(205, 139, 46, 0.74);
  border-radius: 8px;
  color: #fff2d3;
  background:
    linear-gradient(180deg, rgba(5, 9, 13, 0.9), rgba(7, 8, 10, 0.94)),
    url("assets/maps/character-status-sect-hall.webp") center / cover no-repeat;
  box-shadow: 0 18px 80px rgba(0, 0, 0, 0.72);
}

.profile-detail-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 58% 22%, rgba(93, 140, 183, 0.18), transparent 9rem),
    linear-gradient(180deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.58));
  pointer-events: none;
}

.profile-detail-panel > * {
  position: relative;
  z-index: 1;
}

.profile-detail-header {
  display: grid;
  grid-template-columns: 1fr auto 32px;
  gap: 8px;
  align-items: center;
  min-height: 52px;
  padding: 9px 12px;
  background: rgba(3, 6, 9, 0.72);
}

.profile-detail-header strong,
.profile-detail-header small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-detail-header strong {
  color: #ffe8aa;
  font-size: 1rem;
}

.profile-detail-header small {
  color: #d5c6a7;
  font-size: 0.68rem;
  font-weight: 900;
}

#profileDetailStone {
  color: #ffe08d;
  font-size: 0.78rem;
  font-weight: 900;
  white-space: nowrap;
}

#profileDetailStone::before {
  content: "◉ ";
  color: #ffbb44;
}

.profile-detail-header button {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  color: #ffe7b2;
  font-size: 1.15rem;
  background: rgba(0, 0, 0, 0.24);
}

.profile-detail-hero {
  position: relative;
  display: grid;
  grid-template-columns: 102px 1fr;
  gap: 10px;
  align-items: center;
  padding: 8px 14px 6px;
}

.profile-detail-character {
  position: absolute;
  right: 54px;
  bottom: -46px;
  height: 196px;
  opacity: 0.46;
  filter: drop-shadow(0 16px 22px rgba(0, 0, 0, 0.62));
  pointer-events: none;
}

.profile-big-avatar {
  position: relative;
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  overflow: hidden;
  border: 3px solid #ffdf61;
  border-radius: 50%;
  background: #120d08;
  box-shadow:
    0 0 0 2px #4e2b0b,
    0 0 24px rgba(255, 216, 82, 0.52);
}

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

.profile-big-avatar span {
  position: absolute;
  right: 9px;
  bottom: 1px;
  border: 1px solid #ffec86;
  border-radius: 999px;
  padding: 1px 5px;
  color: #231506;
  font-size: 0.56rem;
  font-weight: 900;
  background: linear-gradient(180deg, #fff6a6, #d89422);
}

.profile-detail-bars {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 9px;
  align-content: center;
}

.profile-mini-bar {
  position: relative;
  height: 18px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
}

.profile-mini-bar span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: inherit;
}

.profile-mini-bar b {
  position: relative;
  z-index: 1;
  display: block;
  padding-right: 8px;
  color: #fff8df;
  text-align: right;
  font-size: 0.62rem;
  line-height: 18px;
  text-shadow: 0 2px 3px #000;
}

.profile-mini-bar.hp span {
  background: linear-gradient(90deg, #d93e48, #ff646a);
}

.profile-mini-bar.mp span {
  background: linear-gradient(90deg, #2785dc, #56b9ff);
}

.profile-mini-bar.cultivation span {
  background: linear-gradient(90deg, #8c55e9, #b976ff);
}

.profile-stat-list {
  overflow-y: auto;
  margin: 8px 14px;
  border: 1px solid rgba(156, 96, 29, 0.52);
  border-radius: 8px;
  padding: 7px 12px;
  background: rgba(20, 13, 5, 0.76);
}

.profile-stat-row {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  gap: 8px;
  align-items: center;
  min-height: 28px;
  border-bottom: 1px solid rgba(255, 218, 150, 0.08);
  color: #f5e5c5;
  font-size: 0.75rem;
  font-weight: 900;
}

.profile-stat-row:last-child {
  border-bottom: 0;
}

.profile-stat-row span {
  color: #ffd983;
  text-align: center;
}

.profile-stat-row.hp span {
  color: #ff858c;
}

.profile-stat-row.attack span,
.profile-stat-row.crit span {
  color: #ffb168;
}

.profile-stat-row.defense span {
  color: #88bdff;
}

.profile-stat-row.mp span {
  color: #7ed9ff;
}

.profile-stat-row em {
  font-style: normal;
  color: #dacdb7;
}

.profile-stat-row strong {
  color: #fff0c9;
  text-align: right;
}

.profile-card-box {
  display: grid;
  gap: 9px;
  margin: 0 14px 12px;
  border: 1px solid rgba(205, 126, 41, 0.68);
  border-radius: 8px;
  padding: 10px;
  background: rgba(14, 13, 18, 0.9);
}

.profile-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.profile-card-title strong {
  color: #f5d8ff;
  font-size: 0.88rem;
}

.profile-card-title span {
  border-radius: 999px;
  padding: 3px 8px;
  color: #ebcfff;
  font-size: 0.64rem;
  font-weight: 900;
  background: rgba(129, 68, 188, 0.36);
}

.profile-card-bonuses,
.profile-element-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.profile-card-bonuses span,
.profile-element-chips span {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 7px;
  padding: 4px 8px;
  font-size: 0.66rem;
  font-weight: 900;
  background: rgba(255, 255, 255, 0.06);
}

.profile-card-bonuses .hp {
  color: #81ff9a;
}

.profile-card-bonuses .attack {
  color: #ff8f78;
}

.profile-card-bonuses .defense {
  color: #6fc5ff;
}

.profile-element-chips span {
  color: #fff1c7;
  border-color: color-mix(in srgb, var(--chip-color) 64%, transparent);
  background: color-mix(in srgb, var(--chip-color) 18%, rgba(0, 0, 0, 0.38));
}

.side-actions {
  position: absolute;
  z-index: 6;
  top: 112px;
  display: grid;
  gap: 13px;
}

.side-left {
  left: 14px;
}

.side-right {
  right: 14px;
}

.side-actions button {
  width: 56px;
  min-height: 58px;
  border: 0;
  color: #fff3d5;
  background: transparent;
  padding: 0;
  text-shadow: 0 2px 4px #000;
}

.side-actions small {
  display: block;
  margin-top: 3px;
  font-size: 0.67rem;
  font-weight: 900;
  line-height: 1.05;
}

.round-icon {
  position: relative;
  display: block;
  width: 43px;
  height: 43px;
  margin: 0 auto;
  border: 1px solid rgba(255, 230, 160, 0.78);
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.24), transparent 22%),
    rgba(27, 20, 14, 0.78);
  box-shadow:
    inset 0 0 0 3px rgba(0, 0, 0, 0.36),
    0 7px 16px rgba(0, 0, 0, 0.38);
}

.round-icon.menu-art,
.nav-icon.nav-menu-art,
.character-menu-icon.character-menu-art {
  background-image:
    radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.18), transparent 23%),
    var(--menu-icon),
    linear-gradient(180deg, rgba(42, 29, 18, 0.92), rgba(10, 7, 5, 0.92));
  background-position: center;
  background-repeat: no-repeat;
  background-size: 100% 100%, 86% 86%, 100% 100%;
}

.menu-art::before,
.menu-art::after,
.nav-menu-art::before,
.nav-menu-art::after,
.character-menu-art::before,
.character-menu-art::after {
  display: none;
}

.icon-luyen-khi {
  --menu-icon: url("assets/sprites/icons/round-menu/luyen-khi.webp");
}

.icon-luyen-dan {
  --menu-icon: url("assets/sprites/icons/round-menu/luyen-dan.webp");
}

.icon-phu-luc {
  --menu-icon: url("assets/sprites/icons/round-menu/phu-luc.webp");
}

.icon-he-thong {
  --menu-icon: url("assets/sprites/icons/round-menu/he-thong.webp");
}

.icon-tui-tru-vat {
  --menu-icon: url("assets/sprites/icons/round-menu/tui-tru-vat.webp");
}

.icon-tran-phap {
  --menu-icon: url("assets/sprites/icons/round-menu/tran-phap.webp");
}

.icon-linh-dien {
  --menu-icon: url("assets/sprites/icons/round-menu/linh-dien.webp");
}

.icon-dong-phu {
  --menu-icon: url("assets/sprites/icons/round-menu/dong-phu.webp");
}

.icon-nhan-vat {
  --menu-icon: url("assets/sprites/icons/round-menu-2/nhan-vat.webp");
}

.icon-bi-canh {
  --menu-icon: url("assets/sprites/icons/round-menu-2/bi-canh.webp");
}

.icon-thanh-tran {
  --menu-icon: url("assets/sprites/icons/round-menu-2/thanh-tran.webp");
}

.icon-tong-mon {
  --menu-icon: url("assets/sprites/icons/round-menu-2/tong-mon.webp");
}

.icon-ban-do {
  --menu-icon: url("assets/sprites/icons/round-menu-2/ban-do.webp");
}

.icon-lich-luyen {
  --menu-icon: url("assets/sprites/icons/round-menu-2/lich-luyen.webp");
}

.icon-bottom-dong-phu {
  --menu-icon: url("assets/sprites/icons/round-menu-2/dong-phu.webp");
}

.round-icon::before,
.round-icon::after,
.nav-icon::before,
.nav-icon::after {
  content: "";
  position: absolute;
  display: block;
}

.blade::before {
  width: 22px;
  height: 4px;
  left: 11px;
  top: 20px;
  border-radius: 999px;
  background: #f7f0df;
  transform: rotate(-43deg);
}

.blade::after {
  width: 9px;
  height: 9px;
  left: 24px;
  top: 11px;
  border: 2px solid #f7f0df;
  border-left: 0;
  border-bottom: 0;
  transform: rotate(2deg);
}

.cauldron::before {
  width: 23px;
  height: 16px;
  left: 10px;
  top: 17px;
  border: 2px solid #f7f0df;
  border-top-width: 4px;
  border-radius: 4px 4px 10px 10px;
}

.cauldron::after {
  width: 22px;
  height: 12px;
  left: 10px;
  top: 8px;
  border-top: 2px solid #f7f0df;
  border-radius: 50%;
}

.scroll::before {
  width: 20px;
  height: 25px;
  left: 12px;
  top: 9px;
  border: 2px solid #f7f0df;
  border-radius: 4px;
}

.scroll::after {
  width: 12px;
  height: 2px;
  left: 16px;
  top: 19px;
  background: #f7f0df;
  box-shadow: 0 6px 0 #f7f0df;
}

.bag::before {
  width: 22px;
  height: 18px;
  left: 10px;
  top: 16px;
  border: 2px solid #f7f0df;
  border-radius: 4px;
}

.bag::after {
  width: 12px;
  height: 8px;
  left: 15px;
  top: 9px;
  border: 2px solid #f7f0df;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
}

.system::before {
  width: 20px;
  height: 20px;
  left: 11px;
  top: 11px;
  border: 2px dotted #f7f0df;
  border-radius: 50%;
}

.system::after {
  width: 7px;
  height: 7px;
  left: 18px;
  top: 18px;
  border-radius: 50%;
  background: #f7f0df;
}

.array::before {
  width: 23px;
  height: 23px;
  left: 10px;
  top: 10px;
  border: 2px solid #f7f0df;
  transform: rotate(45deg);
}

.array::after {
  width: 14px;
  height: 14px;
  left: 14px;
  top: 14px;
  border: 2px solid #f7f0df;
  border-radius: 50%;
}

.field::before {
  width: 20px;
  height: 20px;
  left: 12px;
  top: 12px;
  border-left: 2px solid #f7f0df;
  border-bottom: 2px solid #f7f0df;
  transform: rotate(-45deg);
}

.field::after {
  width: 2px;
  height: 19px;
  left: 21px;
  top: 9px;
  background: #f7f0df;
  transform: rotate(45deg);
}

.cave::before {
  width: 25px;
  height: 20px;
  left: 9px;
  top: 14px;
  border: 2px solid #f7f0df;
  border-bottom: 0;
  border-radius: 16px 16px 4px 4px;
}

.cave::after {
  width: 9px;
  height: 14px;
  left: 17px;
  top: 20px;
  border-radius: 8px 8px 0 0;
  background: #f7f0df;
}

.cultivator-stage {
  position: relative;
  z-index: 2;
  display: grid;
  justify-items: center;
  align-content: center;
  min-height: calc(100dvh - 190px);
  padding: 76px 70px 148px;
}

.cultivator-art {
  position: absolute;
  left: 50%;
  bottom: 128px;
  z-index: -1;
  width: min(118%, 520px);
  max-height: min(62dvh, 520px);
  max-width: none;
  object-fit: contain;
  object-position: center bottom;
  transform: translateX(-50%);
  filter: drop-shadow(0 26px 38px rgba(0, 0, 0, 0.58));
  animation: main-meditation-float 2.8s ease-in-out infinite;
}

@keyframes main-meditation-float {
  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }

  50% {
    transform: translateX(-50%) translateY(-5px);
  }
}

.energy-badge {
  display: grid;
  grid-template-columns: auto auto;
  grid-template-areas:
    "icon rate"
    "icon realm";
  align-items: center;
  gap: 0 9px;
  margin-top: min(30dvh, 210px);
  color: #fff2dc;
  text-shadow: 0 3px 8px #000;
}

.energy-symbol {
  grid-area: icon;
  color: #ffd247;
  font-size: 2rem;
}

.energy-badge strong {
  grid-area: rate;
  font-size: clamp(1.8rem, 8vw, 2.4rem);
  line-height: 0.9;
}

.energy-badge small {
  grid-area: realm;
  color: #f3bd5d;
  font-size: 1.02rem;
  font-weight: 900;
}

.meditate-panel {
  width: min(285px, 100%);
  margin-top: 18px;
}

.meditate-track {
  position: relative;
  height: 24px;
  overflow: hidden;
  border: 1px solid rgba(255, 231, 156, 0.46);
  border-radius: 999px;
  background: rgba(20, 13, 8, 0.78);
}

.meditate-track span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ffb64e, #e66b25);
}

.meditate-track strong {
  position: relative;
  display: grid;
  place-items: center;
  height: 100%;
  color: #fff7dc;
  font-size: 0.78rem;
  text-shadow: 0 2px 5px #000;
}

.pill-action,
.breakthrough-action {
  border: 1px solid rgba(255, 231, 156, 0.4);
  border-radius: 999px;
  color: #fff3d5;
  font-weight: 900;
  background: rgba(25, 15, 8, 0.82);
}

.pill-action {
  min-height: 38px;
  margin-top: 58px;
  padding: 0 18px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.38);
}

.breakthrough-action {
  min-height: 38px;
  margin-top: 16px;
  padding: 0 24px;
  color: #1a1007;
  background: linear-gradient(180deg, #fff4aa, #ec9d31);
  box-shadow: 0 0 18px rgba(246, 207, 116, 0.42);
}

.quick-slots {
  position: absolute;
  z-index: 5;
  left: 78px;
  right: 78px;
  bottom: 93px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  pointer-events: none;
}

.quick-slots button {
  width: 94px;
  border: 0;
  color: #fff3d5;
  background: transparent;
  text-shadow: 0 2px 5px #000;
  pointer-events: auto;
}

.quick-slots button.inactive {
  opacity: 0.62;
}

.quick-slots button.active-buff {
  filter: drop-shadow(0 0 10px rgba(255, 225, 132, 0.24));
}

.quick-slots strong,
.quick-slots small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.quick-slots strong {
  font-size: 0.77rem;
  white-space: nowrap;
}

.quick-slots small {
  color: #86e9a7;
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1.15;
}

.skill-orb {
  display: block;
  width: 37px;
  height: 37px;
  margin: 0 auto 4px;
  border: 2px solid rgba(255, 232, 170, 0.8);
  border-radius: 8px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.42);
}

.skill-orb.violet {
  background:
    radial-gradient(circle at 35% 35%, #fff, transparent 13%),
    conic-gradient(#6837ff, #ff5dba, #5bd6ff, #6837ff);
}

.skill-orb.amber {
  background:
    radial-gradient(circle at 35% 35%, #fff, transparent 13%),
    conic-gradient(#ffcc4d, #6e37ff, #ff5dba, #ffcc4d);
}

.bottom-nav {
  position: absolute;
  z-index: 8;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  min-height: 76px;
  padding: 6px 8px 8px;
  border-top: 1px solid rgba(246, 207, 116, 0.24);
  background: linear-gradient(180deg, rgba(18, 13, 9, 0.86), #080605);
}

.bottom-nav button {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 3px;
  min-width: 0;
  border: 0;
  color: #d9c49c;
  background: transparent;
  padding: 0;
}

.bottom-nav button.active {
  color: #ffe9ad;
}

.bottom-nav small {
  max-width: 100%;
  overflow-wrap: anywhere;
  font-size: 0.62rem;
  font-weight: 900;
  line-height: 1.05;
}

.nav-icon {
  position: relative;
  width: 37px;
  height: 37px;
  border: 1px solid rgba(255, 231, 156, 0.52);
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.2), transparent 24%),
    rgba(43, 30, 19, 0.84);
}

.person::before {
  width: 9px;
  height: 9px;
  top: 8px;
  left: 14px;
  border-radius: 50%;
  background: currentColor;
}

.person::after {
  width: 17px;
  height: 12px;
  top: 19px;
  left: 10px;
  border: 2px solid currentColor;
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
}

.pack::before,
.town::before,
.sect::before,
.calendar::before {
  left: 9px;
  top: 12px;
  width: 19px;
  height: 16px;
  border: 2px solid currentColor;
  border-radius: 3px;
}

.pack::after {
  left: 13px;
  top: 8px;
  width: 11px;
  height: 7px;
  border: 2px solid currentColor;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
}

.town::before {
  height: 18px;
  border-radius: 0;
  clip-path: polygon(0 37%, 50% 0, 100% 37%, 100% 100%, 0 100%);
}

.sect::before {
  top: 10px;
  height: 19px;
  clip-path: polygon(50% 0, 100% 32%, 83% 32%, 83% 100%, 17% 100%, 17% 32%, 0 32%);
}

.compass::before {
  left: 8px;
  top: 8px;
  width: 21px;
  height: 21px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.compass::after {
  left: 17px;
  top: 5px;
  width: 3px;
  height: 27px;
  background: currentColor;
  transform: rotate(45deg);
}

.calendar::after {
  left: 12px;
  top: 18px;
  width: 13px;
  height: 2px;
  background: currentColor;
  box-shadow: 0 5px 0 currentColor;
}

.cave-mini::before {
  left: 8px;
  top: 12px;
  width: 21px;
  height: 17px;
  border: 2px solid currentColor;
  border-bottom: 0;
  border-radius: 13px 13px 3px 3px;
}

.cave-mini::after {
  left: 16px;
  top: 20px;
  width: 7px;
  height: 9px;
  border-radius: 8px 8px 0 0;
  background: currentColor;
}

.system-panel {
  position: absolute;
  inset: 18px 14px 92px;
  z-index: 27;
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
  border: 1px solid rgba(255, 214, 119, 0.46);
  border-radius: 8px;
  color: #f7ecd1;
  background:
    radial-gradient(circle at 50% 0, rgba(255, 203, 87, 0.22), transparent 12rem),
    linear-gradient(180deg, rgba(29, 19, 10, 0.97), rgba(8, 6, 4, 0.98));
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.72);
}

.system-header {
  display: grid;
  grid-template-columns: 1fr 34px;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-bottom: 1px solid rgba(255, 214, 119, 0.24);
  background: rgba(8, 5, 3, 0.58);
}

.system-header h2,
.system-header p,
.system-content p,
.system-mission-card h3 {
  margin: 0;
}

.system-header h2 {
  color: #fff0ba;
  font-size: 1.05rem;
}

.system-header p {
  color: #e7c678;
  font-size: 0.74rem;
  font-weight: 900;
}

.system-content {
  display: grid;
  align-content: start;
  gap: 10px;
  overflow-y: auto;
  padding: 14px;
  font-size: 0.86rem;
  line-height: 1.55;
}

.system-content strong {
  color: #ffe18b;
}

.system-mission-card {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(255, 214, 119, 0.28);
  border-radius: 8px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.26);
}

.system-mission-card h3 {
  color: #ffe7a4;
  font-size: 0.96rem;
}

.system-mission-card dl {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 7px 10px;
  margin: 0;
}

.system-mission-card dt {
  color: #d5b269;
  font-weight: 900;
}

.system-mission-card dd {
  margin: 0;
}

.system-progress {
  position: relative;
  height: 22px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.52);
}

.system-progress span {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--system-progress, 0%);
  border-radius: inherit;
  background: linear-gradient(90deg, #ffb23e, #ffe783);
}

.system-progress strong {
  position: relative;
  z-index: 1;
  display: block;
  color: #281506;
  font-size: 0.74rem;
  line-height: 22px;
  text-align: center;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.32);
}

.system-actions {
  padding: 12px;
  border-top: 1px solid rgba(255, 214, 119, 0.22);
  background: rgba(0, 0, 0, 0.28);
}

.system-actions button {
  width: 100%;
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  color: #221304;
  font-weight: 900;
  background: linear-gradient(180deg, #fff0a8, #e59a2e);
}

.system-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.system-error {
  border: 1px solid rgba(255, 103, 111, 0.52);
  border-radius: 8px;
  padding: 8px;
  color: #ffd6d9;
  background: rgba(91, 17, 22, 0.46);
}

.cave-panel {
  position: absolute;
  inset: 0;
  z-index: 17;
  overflow: hidden;
  color: #f7f0da;
  background:
    linear-gradient(180deg, rgba(5, 9, 13, 0.08), rgba(4, 8, 10, 0.28) 48%, rgba(3, 5, 5, 0.76) 100%),
    url("assets/maps/cultivation-cave-dwelling.webp");
  background-position: center;
  background-size: cover;
}

.cave-panel::before,
.cave-panel::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.cave-panel::before {
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 58%, rgba(116, 255, 214, 0.14), transparent 34%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.34));
  opacity: 0.92;
}

.cave-panel::after {
  left: -12%;
  right: -12%;
  bottom: -90px;
  height: 280px;
  background: radial-gradient(ellipse at 50% 0%, rgba(203, 255, 235, 0.18), transparent 54%);
}

.cave-header {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  padding: 10px 12px;
  background: linear-gradient(180deg, rgba(6, 9, 12, 0.86), rgba(6, 9, 12, 0.28));
  border-bottom: 1px solid rgba(221, 196, 117, 0.22);
}

.cave-header h2,
.cave-header p {
  margin: 0;
}

.cave-header h2 {
  color: #fff3bd;
  font-size: 1.08rem;
}

.cave-header p {
  color: #aef6d8;
  font-size: 0.76rem;
  font-weight: 900;
}

.cave-stage {
  position: absolute;
  inset: 60px 0 180px;
  z-index: 2;
  overflow: hidden;
}

.cave-light {
  position: absolute;
  left: 50%;
  top: -18px;
  width: 210px;
  height: 520px;
  background: linear-gradient(180deg, rgba(214, 255, 239, 0.18), rgba(87, 217, 179, 0.06), transparent);
  clip-path: polygon(42% 0, 58% 0, 100% 100%, 0 100%);
  filter: blur(0.8px);
  transform: translateX(-50%);
}

.cave-meditation-art {
  position: absolute;
  left: 50%;
  bottom: 0;
  z-index: 3;
  width: min(96%, 410px);
  max-height: 94%;
  object-fit: contain;
  object-position: center bottom;
  transform: translateX(-50%);
  filter: drop-shadow(0 24px 28px rgba(0, 0, 0, 0.62));
  animation: cave-meditation-float 2.8s ease-in-out infinite;
}

.cave-aura {
  position: absolute;
  left: 50%;
  bottom: 42px;
  z-index: 2;
  width: 280px;
  height: 56px;
  border: 1px solid rgba(126, 255, 205, 0.28);
  border-radius: 50%;
  background: rgba(74, 222, 172, 0.1);
  transform: translateX(-50%);
  animation: cave-aura-pulse 2.4s ease-in-out infinite;
}

@keyframes cave-meditation-float {
  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }

  50% {
    transform: translateX(-50%) translateY(-5px);
  }
}

@keyframes cave-aura-pulse {
  0%,
  100% {
    opacity: 0.45;
    transform: translateX(-50%) scaleX(0.95);
  }

  50% {
    opacity: 0.82;
    transform: translateX(-50%) scaleX(1.08);
  }
}

.cave-status {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 86px;
  z-index: 5;
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid rgba(221, 196, 117, 0.34);
  border-radius: 8px;
  background: rgba(6, 10, 12, 0.76);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.4);
}

.cave-status strong {
  color: #fff3bd;
  font-size: 0.96rem;
}

.cave-status span {
  color: #c7f5df;
  font-size: 0.72rem;
  font-weight: 900;
}

.cave-progress {
  position: relative;
  height: 18px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.cave-progress span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  background: linear-gradient(90deg, #7bf0c5, #e8cf7a);
}

.cave-progress b {
  position: relative;
  display: block;
  color: #fffdf1;
  font-size: 0.68rem;
  line-height: 18px;
  text-align: center;
  text-shadow: 0 1px 4px #000;
}

.cave-stat-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.cave-stat-row span {
  display: grid;
  place-items: center;
  min-height: 30px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.08);
}

.field-panel {
  position: absolute;
  inset: 0;
  z-index: 20;
  overflow-y: auto;
  padding: 14px;
  color: #f5ffdf;
  background:
    linear-gradient(180deg, rgba(17, 37, 22, 0.58), rgba(6, 14, 12, 0.94)),
    radial-gradient(circle at 18% 18%, rgba(255, 220, 118, 0.16), transparent 8rem),
    radial-gradient(circle at 80% 8%, rgba(129, 227, 184, 0.18), transparent 9rem),
    linear-gradient(145deg, #243b25, #0a1512 58%, #07130d);
}

.field-panel::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(92deg, rgba(119, 177, 114, 0.1) 0 2px, transparent 2px 76px),
    radial-gradient(ellipse at 50% 92%, rgba(117, 228, 141, 0.14), transparent 34%);
}

.field-header,
.field-status,
.field-tools,
.field-message,
.field-grid {
  position: relative;
  z-index: 1;
}

.field-header,
.town-header {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  min-height: 58px;
}

.field-header h2,
.field-header p,
.town-header h2,
.town-header p {
  margin: 0;
}

.field-header h2,
.town-header h2 {
  color: #fff0bd;
  font-size: 1.05rem;
}

.field-header p,
.town-header p {
  color: #cbe7b1;
  font-size: 0.76rem;
  font-weight: 900;
}

.field-status {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 64px;
  margin: 4px 0 10px;
  padding: 10px;
  border: 1px solid rgba(147, 231, 133, 0.42);
  border-radius: 8px;
  background: rgba(20, 55, 25, 0.72);
  box-shadow: inset 0 -10px 26px rgba(94, 241, 118, 0.12);
}

.field-badge {
  display: grid;
  gap: 2px;
  min-width: 105px;
  margin-right: auto;
}

.field-badge strong {
  color: #fff7c2;
  font-size: 0.9rem;
}

.field-badge span,
.field-status > span {
  border: 1px solid rgba(204, 255, 158, 0.32);
  border-radius: 999px;
  padding: 5px 8px;
  color: #b8ff9d;
  font-size: 0.7rem;
  font-weight: 900;
  white-space: nowrap;
  background: rgba(0, 0, 0, 0.32);
}

.field-tools {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.field-tools button {
  min-height: 38px;
  border: 1px solid rgba(159, 255, 147, 0.46);
  border-radius: 8px;
  color: #f7ffe4;
  font-weight: 900;
  background: linear-gradient(180deg, rgba(78, 117, 47, 0.92), rgba(31, 68, 35, 0.92));
}

.field-tools button:disabled {
  cursor: not-allowed;
  opacity: 0.54;
}

.field-tools span,
.field-message {
  color: #ffe6a4;
  font-size: 0.75rem;
  font-weight: 900;
}

.field-message {
  min-height: 28px;
  margin: 0 0 8px;
  padding: 7px 9px;
  border: 1px solid rgba(255, 218, 116, 0.25);
  border-radius: 8px;
  background: rgba(51, 37, 12, 0.64);
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
  padding-bottom: 26px;
}

.field-plot {
  position: relative;
  display: grid;
  place-items: center;
  gap: 3px;
  aspect-ratio: 0.88;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(118, 212, 157, 0.46);
  border-radius: 8px;
  color: #ecffdb;
  font-weight: 900;
  background:
    linear-gradient(180deg, rgba(14, 37, 24, 0.72), rgba(9, 18, 14, 0.84)),
    linear-gradient(135deg, rgba(75, 111, 53, 0.48), rgba(17, 44, 36, 0.76));
}

.field-plot::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--grow, 0%);
  pointer-events: none;
  background: linear-gradient(180deg, rgba(75, 255, 116, 0), rgba(75, 255, 116, 0.28));
}

.field-plot.locked {
  border-color: rgba(255, 255, 255, 0.14);
  color: rgba(238, 238, 238, 0.5);
  background: rgba(0, 0, 0, 0.48);
}

.field-plot.ready {
  border-color: rgba(255, 226, 98, 0.86);
  box-shadow: 0 0 18px rgba(255, 226, 98, 0.2);
}

.field-plot strong,
.field-plot small,
.field-plot-icon {
  position: relative;
  z-index: 1;
}

.field-plot strong {
  font-size: 0.84rem;
}

.field-plot small {
  color: #afe99a;
  font-size: 0.66rem;
}

.field-plot-icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 72%, #28642b 0 20%, transparent 21%),
    radial-gradient(ellipse at 35% 38%, #9bff84 0 22%, transparent 24%),
    radial-gradient(ellipse at 65% 40%, #4edf69 0 20%, transparent 22%);
  opacity: 0.86;
}

.field-plot.empty .field-plot-icon {
  display: grid;
  place-items: center;
  border: 1px dashed rgba(184, 255, 145, 0.48);
  background: rgba(0, 0, 0, 0.24);
}

.field-plot.empty .field-plot-icon::before {
  content: "+";
  color: #bfff94;
  font-size: 1.25rem;
  line-height: 1;
}

.field-plot.locked .field-plot-icon {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(0, 0, 0, 0.28);
}

.field-plot.locked .field-plot-icon::before {
  content: "";
  display: block;
  width: 10px;
  height: 8px;
  margin: 9px auto 0;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.38);
  box-shadow: 0 -5px 0 -2px rgba(255, 255, 255, 0.38);
}

.town-panel {
  position: absolute;
  inset: 0;
  z-index: 20;
  overflow: hidden;
  color: #fff5df;
  background:
    linear-gradient(180deg, rgba(28, 19, 9, 0.12), rgba(10, 14, 12, 0.06) 44%, rgba(5, 9, 8, 0.36)),
    url("assets/maps/thien-long-thanh.webp") center / cover no-repeat;
}

.town-panel::before {
  content: "";
  position: absolute;
  inset: 58px 0 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.18), transparent 16%, transparent 84%, rgba(0, 0, 0, 0.18)),
    linear-gradient(180deg, transparent 66%, rgba(0, 0, 0, 0.24));
}

.town-panel::after {
  content: none;
}

.town-header {
  position: relative;
  z-index: 3;
  grid-template-columns: 1fr auto 34px;
  padding: 8px 10px;
  background: rgba(74, 64, 47, 0.76);
}

.town-currency {
  border-radius: 999px;
  padding: 6px 9px;
  color: #fff1aa;
  font-size: 0.75rem;
  font-weight: 900;
  white-space: nowrap;
  background: rgba(0, 0, 0, 0.38);
}

.town-map {
  position: relative;
  z-index: 2;
  height: calc(100% - 58px);
}

.town-node {
  position: absolute;
  display: grid;
  gap: 4px;
  place-items: center;
  min-width: 76px;
  border: 0;
  color: #fff4d0;
  font-weight: 900;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.7);
  background: transparent;
}

.town-node-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border: 2px solid rgba(255, 232, 161, 0.74);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 38%, rgba(255, 240, 180, 0.18), transparent 28%),
    rgba(25, 17, 8, 0.86);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.42);
}

.town-node-icon::before {
  color: #ffe7a8;
  font-size: 1.45rem;
}

.town-node-icon.seed::before {
  content: "✦";
}

.town-node-icon.shop::before {
  content: "□";
}

.town-node-icon.sword::before {
  content: "×";
}

.town-node-icon.scroll::before {
  content: "≡";
}

.town-node-icon.chest::before {
  content: "▣";
}

.town-node strong {
  max-width: 94px;
  font-size: 0.76rem;
  line-height: 1.15;
}

.town-node.seed-market {
  left: 50%;
  top: 22%;
  transform: translateX(-50%);
}

.town-node.market {
  right: 18px;
  top: 10%;
}

.town-node.arena {
  left: 16px;
  top: 18%;
}

.town-node.quest {
  right: 34px;
  top: 40%;
}

.town-node.mail {
  left: 50%;
  bottom: 120px;
  transform: translateX(-50%);
}

.ranking-panel {
  position: absolute;
  inset: 64px 12px 92px;
  z-index: 6;
  display: grid;
  grid-template-rows: auto auto 1fr;
  overflow: hidden;
  border: 1px solid rgba(255, 226, 149, 0.42);
  border-radius: 8px;
  color: #fff2d6;
  background:
    linear-gradient(180deg, rgba(9, 17, 24, 0.96), rgba(5, 9, 13, 0.98)),
    rgba(8, 12, 16, 0.96);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.54);
}

.ranking-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px;
  background: linear-gradient(180deg, rgba(43, 34, 21, 0.94), rgba(13, 18, 24, 0.9));
}

.ranking-panel header strong,
.ranking-panel header small {
  display: block;
}

.ranking-panel header strong {
  color: #ffe7a8;
  font-size: 1rem;
}

.ranking-panel header small {
  color: #cfc8ba;
  font-size: 0.68rem;
  font-weight: 900;
}

.ranking-panel header button {
  width: 31px;
  height: 31px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  color: #fff1c8;
  background: rgba(255, 255, 255, 0.08);
}

.ranking-tabs {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 9px 10px;
  background: rgba(9, 18, 31, 0.78);
  scrollbar-width: none;
}

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

.ranking-tabs button {
  flex: 0 0 auto;
  min-height: 32px;
  border: 1px solid rgba(139, 177, 230, 0.42);
  border-radius: 7px;
  padding: 0 10px;
  color: #c8d9f5;
  font-size: 0.7rem;
  font-weight: 900;
  white-space: nowrap;
  background: rgba(35, 55, 86, 0.62);
}

.ranking-tabs button.active {
  border-color: #ffe18e;
  color: #ffe69f;
  background: rgba(115, 82, 22, 0.72);
}

.ranking-list {
  display: grid;
  align-content: start;
  gap: 8px;
  overflow-y: auto;
  padding: 10px;
}

.ranking-row {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  align-items: center;
  gap: 8px;
  min-height: 58px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 8px;
  background: linear-gradient(90deg, rgba(31, 46, 69, 0.8), rgba(11, 16, 24, 0.84));
}

.ranking-row.current {
  border-color: rgba(255, 218, 92, 0.7);
  box-shadow: inset 0 0 0 1px rgba(255, 218, 92, 0.16);
}

.ranking-rank {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: #191208;
  font-weight: 900;
  background: linear-gradient(180deg, #fff0a8, #d79a32);
}

.ranking-player {
  min-width: 0;
}

.ranking-player strong,
.ranking-player small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-player strong {
  color: #fff3d0;
  font-size: 0.82rem;
}

.ranking-player small {
  color: #bfcce0;
  font-size: 0.66rem;
  font-weight: 900;
}

.ranking-row > b {
  color: #8fffc0;
  font-size: 0.76rem;
  text-align: right;
  white-space: nowrap;
}

.ranking-empty {
  border: 1px dashed rgba(255, 226, 149, 0.34);
  border-radius: 8px;
  padding: 20px 12px;
  color: #d8cfbd;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 900;
  background: rgba(0, 0, 0, 0.28);
}

.town-mission-panel {
  position: absolute;
  inset: 64px 12px 92px;
  z-index: 6;
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
  border: 1px solid rgba(255, 226, 149, 0.42);
  border-radius: 8px;
  color: #fff2d6;
  background:
    linear-gradient(180deg, rgba(16, 18, 25, 0.96), rgba(6, 9, 14, 0.98)),
    rgba(8, 12, 16, 0.96);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.54);
}

.town-mission-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px;
  background: linear-gradient(180deg, rgba(64, 44, 18, 0.92), rgba(13, 18, 24, 0.9));
}

.town-mission-panel header strong,
.town-mission-panel header small {
  display: block;
}

.town-mission-panel header strong {
  color: #ffe7a8;
  font-size: 1rem;
}

.town-mission-panel header small {
  color: #cfc8ba;
  font-size: 0.68rem;
  font-weight: 900;
}

.town-mission-panel header button {
  width: 31px;
  height: 31px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  color: #fff1c8;
  background: rgba(255, 255, 255, 0.08);
}

.town-mission-list {
  display: grid;
  align-content: start;
  gap: 10px;
  overflow-y: auto;
  padding: 10px;
}

.town-mission-card {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(255, 226, 149, 0.28);
  border-radius: 8px;
  padding: 10px;
  background:
    radial-gradient(circle at 92% 12%, rgba(255, 210, 98, 0.16), transparent 4.2rem),
    linear-gradient(90deg, rgba(32, 43, 58, 0.84), rgba(12, 15, 22, 0.88));
}

.town-mission-card.complete {
  border-color: rgba(126, 255, 178, 0.54);
}

.town-mission-card.claimed {
  opacity: 0.72;
}

.town-mission-card header,
.town-mission-card footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.town-mission-card header {
  padding: 0;
  background: transparent;
}

.town-mission-card strong,
.town-mission-card small {
  display: block;
}

.town-mission-card strong {
  color: #fff2c8;
  font-size: 0.86rem;
}

.town-mission-card small,
.town-mission-card footer span {
  color: #cbd8e9;
  font-size: 0.68rem;
  font-weight: 900;
}

.town-mission-card header > b {
  color: #8fffc0;
  font-size: 0.8rem;
  white-space: nowrap;
}

.town-mission-progress {
  height: 9px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.42);
}

.town-mission-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #46d781, #ffe177);
}

.town-mission-card footer button {
  min-width: 92px;
  min-height: 32px;
  border: 1px solid rgba(255, 223, 137, 0.62);
  border-radius: 7px;
  color: #241506;
  font-size: 0.72rem;
  font-weight: 900;
  background: linear-gradient(180deg, #fff1a7, #dd9a30);
}

.town-mission-card footer button:disabled {
  border-color: rgba(255, 255, 255, 0.12);
  color: #aaa394;
  background: rgba(255, 255, 255, 0.1);
}

.town-mission-message {
  margin: 0;
  border-top: 1px solid rgba(255, 226, 149, 0.18);
  padding: 10px 12px;
  color: #ffe7a8;
  font-size: 0.72rem;
  font-weight: 900;
  background: rgba(0, 0, 0, 0.36);
}

.travel-panel {
  position: absolute;
  inset: 0;
  z-index: 7;
  overflow-y: auto;
  padding: 16px 12px 102px;
  color: #fff3d8;
  background:
    linear-gradient(180deg, rgba(6, 48, 58, 0.78), rgba(8, 18, 18, 0.78)),
    url("assets/maps/thien-long-thanh.webp") center / cover no-repeat;
}

.travel-panel::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.48)),
    linear-gradient(90deg, rgba(0, 0, 0, 0.26), transparent 18%, transparent 82%, rgba(0, 0, 0, 0.26));
}

.travel-header {
  position: relative;
  z-index: 1;
  padding: 0 4px 12px;
}

.travel-header h2 {
  margin: 0;
  color: #ffe9c0;
  font-size: 1.35rem;
  letter-spacing: 0;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.62);
}

.travel-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.travel-card {
  position: relative;
  min-height: 172px;
  overflow: hidden;
  display: grid;
  align-content: end;
  border: 1px solid rgba(255, 226, 165, 0.42);
  border-radius: 8px;
  padding: 12px 10px;
  color: #fff4d6;
  text-align: left;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(0, 0, 0, 0.68)),
    var(--travel-card-image) center / cover no-repeat;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07), 0 14px 28px rgba(0, 0, 0, 0.34);
}

.travel-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.06), transparent 44%, rgba(0, 0, 0, 0.78)),
    radial-gradient(circle at 28% 20%, rgba(255, 232, 169, 0.14), transparent 3.8rem);
}

.travel-card-icon {
  position: absolute;
  z-index: 1;
  left: 12px;
  top: 12px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 2px solid rgba(255, 224, 151, 0.78);
  border-radius: 50%;
  color: #fff1bf;
  font-size: 1.18rem;
  font-weight: 900;
  background: rgba(17, 10, 4, 0.88);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.4);
}

.travel-card-icon.duel::before {
  content: "☯";
}

.travel-card-icon.squad::before {
  content: "♟";
}

.travel-card-icon.dragon::before {
  content: "♞";
}

.travel-card-icon.fate::before {
  content: "令";
}

.travel-card-icon.tower::before {
  content: "塔";
}

.travel-card-icon.puppet::before {
  content: "傀";
}

.travel-card-copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 2px;
}

.travel-card-copy strong {
  color: #fff2cf;
  font-size: 0.93rem;
  line-height: 1.16;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.84);
}

.travel-card-copy small {
  color: #d6d0c7;
  font-size: 0.67rem;
  line-height: 1.25;
  font-weight: 800;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.84);
}

.travel-card-copy em {
  width: max-content;
  max-width: 100%;
  margin-top: 5px;
  padding: 3px 8px;
  border: 1px solid rgba(255, 220, 137, 0.48);
  border-radius: 999px;
  color: #ffe492;
  font-size: 0.64rem;
  font-style: normal;
  font-weight: 900;
  background: rgba(20, 11, 4, 0.72);
  box-shadow: inset 0 0 10px rgba(255, 215, 110, 0.12);
}

.travel-arena,
.travel-fate {
  --travel-card-image: url("assets/maps/thien-long-thanh.webp");
}

.travel-team {
  --travel-card-image: url("assets/maps/character-status-sect-hall.webp");
  filter: sepia(0.28) saturate(0.72);
}

.travel-pet {
  filter: saturate(0.95);
}

.travel-card-icon.pet::before {
  content: "🐾";
}

.travel-boss {
  --travel-card-image: url("assets/maps/realm-back-mountain.webp");
}

.travel-tower {
  --travel-card-image: url("assets/maps/cultivation-cave-dwelling.webp");
}

.travel-puppet {
  --travel-card-image: url("assets/maps/refining-room.webp");
}

.pet-panel {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 10px;
  overflow-y: auto;
  padding: 10px 12px 98px;
  color: #fff0ce;
  background:
    linear-gradient(180deg, rgba(10, 18, 27, 0.8), rgba(3, 7, 13, 0.96)),
    radial-gradient(circle at 50% 0, rgba(87, 139, 255, 0.18), transparent 15rem);
}

.pet-topbar {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 48px;
}

.pet-topbar button {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 222, 145, 0.55);
  border-radius: 50%;
  color: #ffe5a8;
  font-size: 1.6rem;
  line-height: 1;
  background: rgba(20, 12, 4, 0.78);
}

.pet-topbar strong,
.pet-topbar small {
  display: block;
}

.pet-topbar strong {
  color: #ffe7b4;
  font-size: 1.05rem;
}

.pet-topbar small {
  color: #c7d7ee;
  font-size: 0.68rem;
  font-weight: 900;
}

.pet-topbar em {
  padding: 7px 10px;
  border-radius: 999px;
  color: #ffdf75;
  font-size: 0.76rem;
  font-style: normal;
  font-weight: 900;
  background: rgba(40, 23, 6, 0.8);
}

.pet-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid rgba(82, 130, 205, 0.32);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(18, 34, 58, 0.82);
}

.pet-tabs button {
  min-height: 42px;
  border: 0;
  border-bottom: 3px solid transparent;
  color: #8fa0bb;
  font-size: 0.72rem;
  font-weight: 900;
  background: transparent;
}

.pet-tabs button.active {
  border-bottom-color: #f5ce48;
  color: #ffe08a;
}

.pet-content {
  display: grid;
  align-content: start;
  gap: 12px;
}

.pet-empty-slot,
.pet-featured-card,
.pet-box,
.pet-book-card,
.pet-hunt-map {
  border: 1px solid rgba(87, 139, 255, 0.4);
  border-radius: 8px;
  background: rgba(10, 24, 48, 0.82);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.pet-empty-slot {
  display: grid;
  place-items: center;
  gap: 6px;
  min-height: 150px;
  color: #d8e6ff;
  text-align: center;
}

button.pet-empty-slot {
  width: 100%;
  font: inherit;
  cursor: pointer;
}

.pet-empty-slot small {
  max-width: 240px;
  color: #9fb1c8;
  font-size: 0.7rem;
  font-weight: 900;
}

.pet-placeholder-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 2px dashed rgba(255, 226, 139, 0.64);
  border-radius: 14px;
  color: #ffe18d;
  font-size: 2rem;
  font-weight: 900;
}

.pet-featured-card,
.pet-storage-card,
.pet-book-card {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
}

.pet-featured-card {
  border-color: rgba(255, 112, 21, 0.72);
}

.pet-featured-copy strong,
.pet-storage-card strong,
.pet-book-card strong {
  display: block;
  color: #ffe0a8;
  font-size: 0.9rem;
}

.pet-featured-copy small,
.pet-storage-card small,
.pet-book-card small,
.pet-featured-copy p {
  display: block;
  color: #aebed6;
  font-size: 0.66rem;
  font-weight: 900;
}

.pet-featured-copy em {
  display: block;
  margin: 5px 0;
  color: #79f59c;
  font-size: 0.75rem;
  font-style: normal;
  font-weight: 900;
}

.pet-art {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(255, 220, 124, 0.42);
  border-radius: 10px;
  background: linear-gradient(145deg, #17243d, #07101d);
}

.pet-art.large {
  width: 68px;
  height: 68px;
}

.pet-art.spirit-wolf::before {
  content: "狼";
  color: #d7e7ff;
  font-size: 1.8rem;
  font-weight: 900;
}

.pet-art.spirit-wolf-egg::before {
  content: "卵";
  color: #ffe08a;
  font-size: 1.8rem;
  font-weight: 900;
}

.travel-card-icon.pet::before {
  content: "THU";
  font-size: 0.7rem;
}

.pet-art.spirit-wolf::before {
  content: "SOI";
  font-size: 0.72rem;
  letter-spacing: 0;
}

.pet-art.spirit-wolf-egg::before {
  content: "EGG";
  font-size: 0.72rem;
  letter-spacing: 0;
}

.pet-exp {
  position: relative;
  height: 16px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.42);
}

.pet-exp span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #51db82, #ffe26f);
}

.pet-exp b {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 0.62rem;
  text-shadow: 0 1px 3px #000;
}

.pet-featured-card button,
.pet-storage-card button,
.pet-hunt-copy button {
  min-width: 72px;
  min-height: 34px;
  border: 0;
  border-radius: 7px;
  color: #221404;
  font-weight: 900;
  background: linear-gradient(180deg, #fff0a0, #e3a12b);
}

.pet-featured-card button:disabled,
.pet-hunt-copy button:disabled {
  color: #a9a4a0;
  background: rgba(255, 255, 255, 0.12);
}

.pet-box {
  padding: 10px;
}

.pet-box header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.pet-box header strong {
  color: #dce8ff;
}

.pet-box header small,
.pet-empty-list {
  color: #8798b3;
  font-size: 0.68rem;
  font-weight: 900;
}

.pet-storage-list {
  display: grid;
  gap: 8px;
}

.pet-storage-card {
  grid-template-columns: 54px 1fr auto;
  border: 1px solid rgba(87, 139, 255, 0.3);
  border-radius: 8px;
  background: rgba(6, 17, 33, 0.84);
}

.pet-storage-card.selected {
  border-color: rgba(86, 218, 105, 0.72);
}

.pet-hunt-map {
  overflow: hidden;
}

.pet-hunt-bg {
  position: relative;
  min-height: 260px;
  background:
    linear-gradient(180deg, rgba(33, 70, 89, 0.2), rgba(3, 8, 13, 0.28)),
    linear-gradient(160deg, #172b3a, #0d1f1c 52%, #081018);
}

.pet-mountain,
.pet-forest,
.pet-egg-glow {
  position: absolute;
  display: block;
}

.pet-mountain {
  width: 160px;
  height: 120px;
  background: linear-gradient(135deg, transparent 50%, rgba(154, 189, 205, 0.34) 51%), linear-gradient(225deg, transparent 50%, rgba(36, 77, 83, 0.76) 51%);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.pet-mountain.m1 { left: 4%; bottom: 24%; }
.pet-mountain.m2 { right: 2%; bottom: 32%; transform: scale(1.15); }
.pet-mountain.m3 { left: 34%; bottom: 45%; transform: scale(0.8); }

.pet-forest {
  width: 72px;
  height: 92px;
  background: radial-gradient(ellipse at 50% 34%, #3ca46b 0 40%, transparent 41%), linear-gradient(90deg, transparent 45%, #68451f 46% 54%, transparent 55%);
}

.pet-forest.f1 { left: 13%; bottom: 8%; }
.pet-forest.f2 { right: 18%; bottom: 8%; transform: scale(1.2); }

.pet-egg-glow {
  left: 50%;
  bottom: 18%;
  width: 34px;
  height: 44px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 45%, #fff4af, #e4a82e 54%, transparent 56%);
  box-shadow: 0 0 28px rgba(255, 220, 100, 0.74);
}

.pet-hunt-copy,
.pet-book-card {
  padding: 12px;
}

.pet-hunt-copy strong {
  display: block;
  color: #ffe7a9;
  font-size: 1rem;
}

.pet-hunt-copy small,
.pet-hunt-copy p {
  color: #c8d7ea;
  font-size: 0.72rem;
  font-weight: 900;
}

.pet-message {
  margin: 0;
  border: 1px solid rgba(87, 139, 255, 0.3);
  border-radius: 8px;
  padding: 10px;
  color: #9ff5b8;
  font-size: 0.75rem;
  font-weight: 900;
  background: rgba(7, 17, 31, 0.86);
}

.arena-panel {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  gap: 10px;
  overflow-y: auto;
  padding: 10px 12px 98px;
  color: #fff0ce;
  background:
    linear-gradient(180deg, rgba(9, 13, 18, 0.42), rgba(5, 7, 10, 0.8)),
    url("assets/maps/arena-duel.webp") center / cover no-repeat;
}

.arena-panel::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 215, 102, 0.16), transparent 6rem),
    linear-gradient(180deg, rgba(0, 0, 0, 0.06), rgba(0, 0, 0, 0.46));
}

.arena-panel > * {
  position: relative;
  z-index: 1;
}

.arena-topbar {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 48px;
}

.arena-topbar button {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 222, 145, 0.55);
  border-radius: 50%;
  color: #ffe5a8;
  font-size: 1.6rem;
  line-height: 1;
  background: rgba(20, 12, 4, 0.78);
}

.arena-topbar span {
  display: grid;
  min-width: 0;
}

.arena-topbar strong {
  color: #ffe9b5;
  font-size: 1.2rem;
  text-shadow: 0 2px 8px #000;
}

.arena-topbar small,
.arena-topbar em {
  color: #d8d1c0;
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 900;
}

.arena-topbar em {
  border: 1px solid rgba(255, 221, 106, 0.5);
  border-radius: 999px;
  padding: 5px 9px;
  color: #ffe58a;
  background: rgba(28, 17, 5, 0.72);
}

.arena-status {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.arena-status div,
.arena-battle-result,
.arena-content {
  border: 1px solid rgba(255, 225, 149, 0.34);
  border-radius: 8px;
  background: rgba(9, 10, 14, 0.76);
  box-shadow: inset 0 0 22px rgba(255, 215, 112, 0.06);
}

.arena-status div {
  display: grid;
  gap: 4px;
  padding: 10px;
}

.arena-status small {
  color: #bfc7d2;
  font-size: 0.68rem;
  font-weight: 900;
}

.arena-status strong {
  color: #fff2c7;
  font-size: 0.82rem;
}

.arena-battle-result {
  display: grid;
  gap: 5px;
  padding: 11px 12px;
}

.arena-battle-result strong {
  font-size: 0.9rem;
}

.arena-battle-result strong.win {
  color: #91f7b0;
}

.arena-battle-result strong.lose {
  color: #ff9288;
}

.arena-battle-result p,
.arena-battle-result em {
  margin: 0;
  color: #d9d2c4;
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 800;
  line-height: 1.35;
}

.arena-battle-result em {
  color: #ffe188;
}

.arena-content {
  display: grid;
  gap: 9px;
  padding: 10px;
}

.arena-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.arena-section-title strong {
  color: #ffe4a5;
  font-size: 0.86rem;
}

.arena-section-title button {
  min-height: 30px;
  border: 1px solid rgba(255, 222, 145, 0.42);
  border-radius: 7px;
  padding: 0 10px;
  color: #ffe5a8;
  font-size: 0.68rem;
  font-weight: 900;
  background: rgba(42, 27, 11, 0.8);
}

.arena-opponent-list,
.arena-ranking-list {
  display: grid;
  gap: 8px;
}

.arena-opponent-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  border: 1px solid rgba(159, 192, 239, 0.24);
  border-radius: 8px;
  padding: 8px;
  background: rgba(17, 27, 42, 0.72);
}

.arena-opponent-avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 2px solid #ffdd72;
  border-radius: 50%;
  color: #211105;
  font-weight: 1000;
  background:
    radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.7), transparent 24%),
    linear-gradient(180deg, #fff0a2, #d68a2a);
}

.arena-opponent-card strong,
.arena-opponent-card small,
.arena-opponent-card em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.arena-opponent-card strong {
  color: #fff2cc;
  font-size: 0.82rem;
}

.arena-opponent-card small,
.arena-opponent-card em {
  color: #cad5e5;
  font-size: 0.64rem;
  font-style: normal;
  font-weight: 800;
}

.arena-opponent-card button {
  min-height: 34px;
  border: 1px solid rgba(255, 227, 145, 0.58);
  border-radius: 999px;
  padding: 0 10px;
  color: #211105;
  font-size: 0.68rem;
  font-weight: 1000;
  white-space: nowrap;
  background: linear-gradient(180deg, #fff0a3, #e5a13a);
}

.arena-opponent-card button:disabled {
  color: #c8c0b4;
  background: linear-gradient(180deg, #56575d, #282a31);
}

.arena-ranking-box {
  align-self: start;
}

.arena-ranking-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 6px 0;
  color: #f3e7ce;
  font-size: 0.72rem;
  font-weight: 900;
}

.arena-ranking-row:last-child {
  border-bottom: 0;
}

.arena-ranking-row.current {
  color: #ffe272;
}

.arena-ranking-row span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  color: #1b1005;
  background: linear-gradient(180deg, #fff0a4, #c78322);
}

.arena-ranking-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.arena-ranking-row em {
  color: #9ff4bd;
  font-style: normal;
  white-space: nowrap;
}

.arena-empty {
  border: 1px dashed rgba(255, 225, 149, 0.26);
  border-radius: 8px;
  padding: 14px 10px;
  color: #d5d0c4;
  text-align: center;
  font-size: 0.74rem;
  font-weight: 900;
  background: rgba(0, 0, 0, 0.26);
}

.arena-combat-panel {
  position: absolute;
  inset: 0;
  z-index: 5;
  overflow: hidden;
  color: #f2f8ff;
  background:
    radial-gradient(circle at 50% 35%, rgba(115, 224, 255, 0.18), transparent 13rem),
    linear-gradient(180deg, #071722, #07100f 72%, #091611);
}

.arena-combat-header {
  position: relative;
  z-index: 8;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 36px;
  gap: 8px;
  align-items: center;
  min-height: 54px;
  padding: 8px 10px;
  background: linear-gradient(180deg, rgba(2, 9, 12, 0.94), rgba(2, 9, 12, 0.46));
}

.arena-combat-header strong,
.arena-combat-header small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.arena-combat-header strong {
  color: #fff0b9;
  font-size: 0.95rem;
}

.arena-combat-header small {
  color: #d4ffe4;
  font-size: 0.68rem;
  font-weight: 900;
}

.arena-combat-header button {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 222, 145, 0.55);
  border-radius: 50%;
  color: #ffe5a8;
  font-size: 1.1rem;
  background: rgba(20, 12, 4, 0.78);
}

.arena-combat-target {
  position: absolute;
  z-index: 8;
  right: 10px;
  top: 62px;
  display: grid;
  gap: 5px;
  width: 132px;
  border: 1px solid rgba(255, 232, 160, 0.28);
  border-radius: 8px;
  padding: 9px;
  background: rgba(14, 25, 22, 0.78);
}

.arena-combat-target strong {
  color: #ffe8ad;
  font-size: 0.74rem;
}

.arena-combat-target span {
  color: #e3f1ff;
  font-size: 0.63rem;
  font-weight: 900;
  line-height: 1.28;
}

.arena-combat-stage {
  position: absolute;
  inset: 0 0 76px;
  z-index: 1;
}

.arena-combat-map {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(4, 8, 12, 0.06) 0%, rgba(3, 7, 10, 0.12) 54%, rgba(3, 7, 10, 0.56) 100%),
    url("assets/maps/arena-duel.webp") center / cover no-repeat;
}

.arena-combat-map::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 186px;
  width: 320px;
  height: 82px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(227, 255, 248, 0.18), rgba(24, 38, 40, 0.1) 50%, transparent 72%);
}

.arena-combat-sprite {
  --facing: 1;
  --attack-move: 22px;
  --hit-move: 8px;
  --dead-rotate: -6deg;
  position: absolute;
  z-index: 3;
  bottom: 182px;
  width: 232px;
  height: 232px;
  background-position: center bottom;
  background-repeat: no-repeat;
  background-size: contain;
  filter: drop-shadow(0 16px 18px rgba(0, 0, 0, 0.58));
  pointer-events: none;
  transform: scaleX(var(--facing));
  transform-origin: center bottom;
}

.arena-combat-sprite.player {
  left: 12px;
}

.arena-combat-sprite.opponent {
  --facing: -1;
  --attack-move: -22px;
  --hit-move: -8px;
  --dead-rotate: 6deg;
  right: 12px;
}

.arena-combat-sprite.has-sprite {
  background-image: var(--arena-frame);
}

.arena-combat-sprite.mirrored {
  --facing: -1;
}

.arena-combat-sprite.has-sprite[data-animation="idle"] {
  animation: arena-combat-breathe 1.6s ease-in-out infinite;
}

.arena-combat-sprite.has-sprite[data-animation="attack"] {
  animation: arena-combat-attack 0.5s ease-out 1;
}

.arena-combat-sprite.has-sprite[data-animation="hit"] {
  animation: arena-combat-hit 0.38s ease-out infinite;
}

.arena-combat-sprite.has-sprite[data-animation="dead"] {
  opacity: 0.62;
  transform: translateY(20px) scaleX(var(--facing)) rotate(var(--dead-rotate));
}

.arena-impact-flash {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 292px;
  width: 88px;
  height: 88px;
  transform: translateX(-50%);
  border-radius: 50%;
  opacity: 0;
  background: radial-gradient(circle, rgba(255, 236, 132, 0.92), rgba(103, 222, 255, 0.28) 48%, transparent 70%);
  filter: blur(1px);
}

.arena-combat-panel:has(.arena-combat-sprite[data-animation="attack"]) .arena-impact-flash {
  animation: arena-impact 0.55s ease-out 1;
}

.arena-combat-actions {
  position: absolute;
  z-index: 8;
  left: 10px;
  bottom: 202px;
  display: grid;
  gap: 8px;
  width: 54px;
}

.arena-atk-button,
.arena-skill-button {
  width: 48px;
  height: 48px;
  border: 1px solid rgba(163, 255, 177, 0.68);
  border-radius: 8px;
  color: #dbffd9;
  font-weight: 900;
  background: rgba(18, 54, 35, 0.72);
  box-shadow: 0 0 14px rgba(63, 255, 140, 0.18);
}

.arena-skill-button {
  color: #a8f6ff;
  font-size: 0.58rem;
  line-height: 1.05;
  background: rgba(9, 29, 42, 0.78);
}

.arena-skill-button span,
.arena-skill-button small {
  display: block;
  line-height: 1.05;
}

.arena-skill-button small {
  margin-top: 2px;
  color: #ffd982;
  font-size: 0.52rem;
}

.arena-atk-button:disabled,
.arena-skill-button:disabled {
  cursor: not-allowed;
  border-color: rgba(120, 149, 170, 0.42);
  color: #7895aa;
  background: rgba(16, 24, 31, 0.82);
  box-shadow: none;
}

.arena-combat-footer {
  position: absolute;
  z-index: 8;
  left: 0;
  right: 0;
  bottom: 76px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  min-height: 104px;
  padding: 8px 12px;
  background: linear-gradient(180deg, rgba(5, 8, 9, 0.48), rgba(4, 8, 8, 0.92));
}

.arena-combat-side {
  display: grid;
  align-content: start;
  gap: 5px;
  min-width: 0;
}

.arena-combat-side strong,
.arena-combat-side span,
.arena-combat-side small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.arena-combat-side strong {
  color: #fff0b7;
  font-size: 0.78rem;
}

.arena-combat-side span,
.arena-combat-side small {
  color: #d9f7ff;
  font-size: 0.62rem;
  font-weight: 900;
}

.arena-combat-side small {
  color: #e9e0c9;
}

.arena-combat-result-dialog {
  position: absolute;
  z-index: 12;
  left: 50%;
  top: 50%;
  display: grid;
  gap: 10px;
  width: min(82%, 310px);
  padding: 18px 16px 15px;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(255, 223, 142, 0.72);
  border-radius: 8px;
  color: #fff1bd;
  text-align: center;
  background: linear-gradient(180deg, rgba(20, 12, 4, 0.96), rgba(5, 8, 10, 0.96));
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.58), inset 0 0 24px rgba(255, 216, 108, 0.08);
}

.arena-combat-result-dialog strong {
  color: #9cffb6;
  font-size: 1.12rem;
}

.arena-combat-result-dialog.lose strong {
  color: #ff9b91;
}

.arena-combat-result-dialog p,
.arena-combat-result-dialog em {
  margin: 0;
  color: #e6dcc9;
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 900;
  line-height: 1.35;
}

.arena-combat-result-dialog em {
  color: #ffe188;
}

.arena-combat-result-dialog button {
  height: 38px;
  border: 1px solid rgba(255, 226, 150, 0.72);
  border-radius: 8px;
  color: #2d1603;
  font-weight: 1000;
  background: linear-gradient(180deg, #fff0a8, #f1a93a);
}

@keyframes arena-combat-breathe {
  0%, 100% { transform: translateY(0) scaleX(var(--facing)); }
  50% { transform: translateY(-3px) scaleX(var(--facing)); }
}

@keyframes arena-combat-attack {
  0% { transform: translateX(0) scaleX(var(--facing)) scale(1); }
  44% { transform: translateX(var(--attack-move)) scaleX(var(--facing)) scale(1.03); }
  100% { transform: translateX(0) scaleX(var(--facing)) scale(1); }
}

@keyframes arena-combat-hit {
  0%, 100% {
    filter: drop-shadow(0 16px 18px rgba(0, 0, 0, 0.58)) brightness(1);
    transform: translateX(0) scaleX(var(--facing));
  }

  50% {
    filter: drop-shadow(0 16px 18px rgba(0, 0, 0, 0.58)) brightness(1.55);
    transform: translateX(var(--hit-move)) scaleX(var(--facing));
  }
}

@keyframes arena-impact {
  0% { opacity: 0; transform: translateX(-50%) scale(0.45); }
  35% { opacity: 1; }
  100% { opacity: 0; transform: translateX(-50%) scale(1.28); }
}

.fate-panel {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 10px 12px 98px;
  overflow: hidden;
  color: #fff0ce;
  background:
    linear-gradient(180deg, rgba(4, 12, 16, 0.72), rgba(4, 7, 8, 0.9)),
    url("assets/maps/realm-back-mountain.webp") center / cover no-repeat;
}

.fate-topbar {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 48px;
}

.fate-topbar button {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 222, 145, 0.55);
  border-radius: 50%;
  color: #ffe5a8;
  font-size: 1.6rem;
  line-height: 1;
  background: rgba(20, 12, 4, 0.78);
}

.fate-topbar span {
  display: grid;
  gap: 2px;
}

.fate-topbar strong {
  color: #ffe5b2;
  font-size: 1.2rem;
}

.fate-topbar small,
.fate-topbar em {
  color: #d8d1c0;
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 900;
}

.fate-topbar em {
  padding: 5px 8px;
  border: 1px solid rgba(107, 214, 162, 0.36);
  border-radius: 999px;
  color: #a9f5c7;
  background: rgba(7, 28, 18, 0.62);
}

.fate-road {
  position: relative;
  z-index: 1;
  min-height: 390px;
  overflow: hidden;
  border: 1px solid rgba(255, 222, 145, 0.3);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.06), rgba(0, 0, 0, 0.24)),
    url("assets/maps/realm-back-mountain.webp") center / cover no-repeat;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 18px 36px rgba(0, 0, 0, 0.36);
}

.fate-road::before,
.fate-road::after {
  content: "";
  position: absolute;
  inset: auto -20% 0;
  height: 42%;
  background:
    radial-gradient(ellipse at 50% 100%, rgba(13, 20, 17, 0.92), rgba(13, 20, 17, 0.2) 62%, transparent 63%),
    linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.62));
}

.fate-road::after {
  inset: 0;
  height: auto;
  background:
    radial-gradient(circle at 72% 24%, rgba(111, 223, 255, 0.28), transparent 4rem),
    radial-gradient(circle at 24% 34%, rgba(255, 223, 129, 0.16), transparent 5rem);
  animation: fateGlow 3.4s ease-in-out infinite;
}

.fate-road-layer {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.34), transparent 18%, transparent 82%, rgba(0, 0, 0, 0.34)),
    repeating-linear-gradient(180deg, transparent 0 58px, rgba(255, 255, 255, 0.08) 60px 62px);
  opacity: 0.62;
}

.fate-road.moving .fate-road-layer {
  animation: fateRoadMove 0.72s linear infinite;
}

.fate-traveler-sprite {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 18px;
  width: 188px;
  height: 188px;
  transform: translateX(-50%);
  background: var(--fate-traveler) center bottom / contain no-repeat;
  filter: drop-shadow(0 18px 16px rgba(0, 0, 0, 0.56));
  animation: fateTravelerIdle 2.4s ease-in-out infinite;
}

.fate-road.moving .fate-traveler-sprite {
  animation: fateTravelerMove 0.72s ease-in-out infinite;
}

.fate-road-dust {
  position: absolute;
  z-index: 1;
  bottom: 60px;
  width: 74px;
  height: 18px;
  border-radius: 50%;
  background: rgba(222, 238, 210, 0.26);
  filter: blur(3px);
  opacity: 0;
}

.fate-road-dust.one { left: 21%; }
.fate-road-dust.two { left: 49%; }
.fate-road-dust.three { left: 70%; }

.fate-road.moving .fate-road-dust {
  animation: fateDust 0.86s ease-out infinite;
}

.fate-road.moving .fate-road-dust.two { animation-delay: 0.18s; }
.fate-road.moving .fate-road-dust.three { animation-delay: 0.36s; }

.fate-event-card {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 8px;
  min-height: 166px;
  padding: 14px;
  border: 1px solid rgba(255, 216, 133, 0.42);
  border-radius: 8px;
  background: rgba(12, 8, 7, 0.76);
  box-shadow: inset 0 0 24px rgba(255, 210, 117, 0.08), 0 14px 28px rgba(0, 0, 0, 0.34);
}

.fate-event-kind {
  width: max-content;
  padding: 4px 9px;
  border-radius: 999px;
  color: #111;
  font-size: 0.68rem;
  font-weight: 1000;
  background: linear-gradient(180deg, #fff0a6, #e8a83c);
}

.fate-event-card h3 {
  margin: 0;
  color: #ffe7b8;
  font-size: 1rem;
}

.fate-event-card p {
  margin: 0;
  color: #ddd3c3;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.45;
}

.fate-event-card strong {
  color: #9ff5bd;
  font-size: 0.82rem;
}

.fate-event-card.moving {
  border-color: rgba(105, 219, 255, 0.5);
  box-shadow: inset 0 0 30px rgba(105, 219, 255, 0.1), 0 14px 28px rgba(0, 0, 0, 0.34);
}

.fate-explore-button {
  position: relative;
  z-index: 2;
  min-height: 48px;
  border: 1px solid rgba(255, 226, 156, 0.55);
  border-radius: 999px;
  color: #1a0c02;
  font-size: 0.95rem;
  font-weight: 1000;
  background: linear-gradient(180deg, #fff3b8, #f3b840 44%, #bb6d16);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.34), inset 0 2px 0 rgba(255, 255, 255, 0.48);
}

.fate-explore-button:disabled {
  color: #bfb7aa;
  background: linear-gradient(180deg, #555, #28282e);
  box-shadow: none;
}

@keyframes fateRoadMove {
  from { background-position: 0 0, 0 0; }
  to { background-position: 0 0, 0 62px; }
}

@keyframes fateTravelerIdle {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-6px); }
}

@keyframes fateTravelerMove {
  0%, 100% { transform: translateX(-50%) translateY(0) scale(1); }
  50% { transform: translateX(-50%) translateY(-10px) scale(1.02); }
}

@keyframes fateDust {
  0% { transform: translateX(40px) scale(0.7); opacity: 0; }
  35% { opacity: 0.75; }
  100% { transform: translateX(-62px) scale(1.28); opacity: 0; }
}

@keyframes fateGlow {
  0%, 100% { opacity: 0.65; }
  50% { opacity: 1; }
}

.world-boss-panel {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  overflow: hidden;
  padding: 10px 10px 96px;
  color: #fff2d3;
  background:
    linear-gradient(180deg, rgba(3, 9, 16, 0.64), rgba(3, 5, 8, 0.94)),
    url("assets/maps/realm-back-mountain.webp") center / cover no-repeat;
}

.world-boss-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 20%, rgba(104, 224, 255, 0.28), transparent 7.5rem),
    radial-gradient(circle at 50% 58%, rgba(255, 83, 62, 0.14), transparent 12rem),
    linear-gradient(90deg, rgba(0, 0, 0, 0.36), transparent 18%, transparent 82%, rgba(0, 0, 0, 0.36));
}

.world-boss-panel > * {
  position: relative;
  z-index: 1;
}

.world-boss-topbar {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 44px;
}

.world-boss-topbar button {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 226, 150, 0.58);
  border-radius: 50%;
  color: #ffe6ae;
  font-size: 1.5rem;
  line-height: 1;
  background: rgba(10, 9, 9, 0.72);
}

.world-boss-topbar span {
  display: grid;
  min-width: 0;
}

.world-boss-topbar strong,
.world-boss-topbar small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.world-boss-topbar strong {
  color: #fff0c0;
  font-size: 1rem;
  text-shadow: 0 2px 8px #000;
}

.world-boss-topbar small,
.world-boss-topbar em {
  color: #d8d2c7;
  font-size: 0.7rem;
  font-style: normal;
  font-weight: 900;
}

.world-boss-topbar em {
  border: 1px solid rgba(255, 221, 106, 0.58);
  border-radius: 999px;
  padding: 5px 9px;
  color: #ffeb8b;
  background: rgba(7, 9, 13, 0.76);
}

.world-boss-hp {
  position: relative;
  height: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 179, 179, 0.48);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.28);
}

.world-boss-hp span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #e43f45, #ff7272);
  box-shadow: 0 0 16px rgba(255, 70, 70, 0.42);
}

.world-boss-hp strong {
  position: relative;
  z-index: 1;
  display: block;
  color: #fff6e7;
  text-align: center;
  font-size: 0.68rem;
  line-height: 17px;
  text-shadow: 0 2px 4px #000;
}

.world-boss-arena {
  position: relative;
  min-height: 0;
  margin-top: 8px;
  overflow: hidden;
  border: 1px solid rgba(132, 228, 255, 0.28);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.38) 58%, rgba(0, 0, 0, 0.8)),
    url("assets/maps/realm-back-mountain.webp") center / cover no-repeat;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.07),
    inset 0 -110px 80px rgba(0, 0, 0, 0.46);
}

.world-boss-storm {
  position: absolute;
  inset: 0;
  opacity: 0.72;
  background:
    radial-gradient(circle at 50% 12%, rgba(244, 250, 255, 0.22), transparent 3rem),
    repeating-linear-gradient(105deg, transparent 0 50px, rgba(139, 232, 255, 0.16) 51px 53px, transparent 54px 100px);
  animation: worldBossStorm 4.8s linear infinite;
}

.world-boss-sprite {
  position: absolute;
  left: 50%;
  top: 26px;
  width: 300px;
  height: 300px;
  transform: translateX(-50%);
  background: url("assets/sprites/bosses/demon-beast-emperor/xianxia-demon-beast-emperor-1024-transparent.png") center / contain no-repeat;
  filter: drop-shadow(0 24px 28px rgba(0, 0, 0, 0.72));
  animation: worldBossFloat 3.2s ease-in-out infinite;
}

.world-boss-sprite::before {
  content: none;
  position: absolute;
  inset: 16px 22px 22px;
  border-radius: 44% 44% 50% 50%;
  background:
    radial-gradient(circle at 49% 62%, rgba(105, 241, 255, 0.96), transparent 10%),
    radial-gradient(circle at 38% 42%, #ffebbb 0 4px, transparent 5px),
    radial-gradient(circle at 62% 42%, #ffebbb 0 4px, transparent 5px),
    radial-gradient(circle at 50% 52%, #151111 0 24%, transparent 25%),
    linear-gradient(155deg, #d6d0ca, #46444d 34%, #100f15 68%, #050505);
  box-shadow:
    inset 0 0 28px rgba(255, 255, 255, 0.14),
    0 0 44px rgba(93, 223, 255, 0.24);
  clip-path: polygon(8% 36%, 22% 16%, 35% 29%, 50% 4%, 65% 29%, 78% 16%, 92% 36%, 80% 84%, 50% 100%, 20% 84%);
}

.world-boss-sprite::after {
  content: none;
  position: absolute;
  left: 50%;
  top: 0;
  width: 230px;
  height: 120px;
  transform: translateX(-50%);
  background:
    linear-gradient(130deg, transparent 0 22%, #d9d3ce 23% 30%, transparent 31%),
    linear-gradient(230deg, transparent 0 22%, #d9d3ce 23% 30%, transparent 31%),
    radial-gradient(ellipse at 50% 92%, rgba(255, 255, 255, 0.16), transparent 52%);
  clip-path: polygon(2% 98%, 22% 10%, 38% 72%, 50% 0, 62% 72%, 78% 10%, 98% 98%);
}

.world-boss-beam {
  display: none;
}

.world-boss-ranking {
  position: absolute;
  right: 8px;
  top: 58px;
  width: 146px;
  border: 1px solid rgba(255, 219, 129, 0.42);
  border-radius: 8px;
  padding: 8px;
  background: rgba(10, 8, 7, 0.72);
  backdrop-filter: blur(3px);
}

.world-boss-ranking > strong {
  display: block;
  margin-bottom: 6px;
  color: #ffe28d;
  font-size: 0.78rem;
}

.world-boss-ranking ol {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.world-boss-ranking li {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) auto;
  gap: 5px;
  align-items: center;
  color: #eadfc9;
  font-size: 0.64rem;
  font-weight: 900;
}

.world-boss-ranking li.current {
  color: #ffe177;
}

.world-boss-ranking li.empty {
  grid-template-columns: 1fr;
  color: #b9c5d2;
}

.world-boss-ranking li span {
  color: #ffc85b;
}

.world-boss-ranking li strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.world-boss-ranking li em {
  color: #fff5dd;
  font-style: normal;
  text-align: right;
  white-space: nowrap;
}

.world-boss-player-layer,
.world-boss-effect-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.world-boss-player {
  position: absolute;
  display: grid;
  justify-items: center;
  gap: 2px;
  width: 64px;
  transform: translateX(-50%);
}

.world-boss-player strong {
  max-width: 84px;
  overflow: hidden;
  color: #fff6de;
  font-size: 0.63rem;
  line-height: 1;
  text-align: center;
  text-overflow: ellipsis;
  text-shadow: 0 2px 5px #000;
  white-space: nowrap;
}

.world-boss-player-avatar {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  overflow: hidden;
  border: 2px solid rgba(217, 241, 255, 0.78);
  border-radius: 50%;
  background:
    radial-gradient(circle at 38% 30%, rgba(255, 255, 255, 0.62), transparent 20%),
    radial-gradient(circle at 50% 55%, var(--avatar-glow, #66c7ff), #07101a 72%);
  box-shadow:
    0 0 0 2px rgba(0, 0, 0, 0.48),
    0 0 18px color-mix(in srgb, var(--avatar-glow, #66c7ff) 68%, transparent);
}

.world-boss-player-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.world-boss-player.current .world-boss-player-avatar::before {
  display: none;
}

.world-boss-player-avatar::before {
  content: "";
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 -10px 0 rgba(0, 0, 0, 0.22);
}

.world-boss-player-avatar img + * {
  display: none;
}

.world-boss-player-avatar.blue { --avatar-glow: #4bb1ff; }
.world-boss-player-avatar.cyan { --avatar-glow: #54fff4; }
.world-boss-player-avatar.red { --avatar-glow: #ff514b; }
.world-boss-player-avatar.violet { --avatar-glow: #b77dff; }
.world-boss-player-avatar.silver { --avatar-glow: #dbe8ff; }
.world-boss-player-avatar.gold { --avatar-glow: #ffd35a; }

.world-boss-player.current .world-boss-player-avatar {
  border-color: #ffdc62;
}

.world-boss-player em {
  color: #a8efff;
  font-size: 0.56rem;
  font-style: normal;
  font-weight: 900;
  text-shadow: 0 2px 5px #000;
}

.world-boss-hit-effect {
  position: absolute;
  left: var(--from-x);
  bottom: var(--from-y);
  width: 10px;
  height: 10px;
  transform: translate(-50%, 50%);
  animation: worldBossProjectile 0.78s ease-out forwards;
}

.world-boss-hit-effect i {
  position: absolute;
  inset: -7px;
  border-radius: 50%;
  background:
    radial-gradient(circle, #fff4b9, #ff7641 42%, transparent 70%);
  box-shadow: 0 0 18px rgba(255, 126, 59, 0.78);
}

.world-boss-hit-effect b {
  position: absolute;
  left: 14px;
  top: -22px;
  color: #ffe596;
  font-size: 0.78rem;
  text-shadow:
    0 2px 3px #000,
    0 0 8px rgba(255, 98, 44, 0.82);
  white-space: nowrap;
  animation: worldBossDamageText 0.92s ease-out forwards;
}

.world-boss-actions {
  display: grid;
  gap: 8px;
  padding-top: 9px;
}

.world-boss-actions button {
  min-height: 46px;
  border: 1px solid rgba(255, 232, 150, 0.62);
  border-radius: 999px;
  color: #221102;
  font-size: 0.9rem;
  font-weight: 1000;
  background: linear-gradient(180deg, #fff2a5, #f2b23c 48%, #a85c12);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.52), 0 12px 24px rgba(0, 0, 0, 0.34);
}

.world-boss-actions button:disabled {
  color: #d4c9b9;
  background: linear-gradient(180deg, #4a4c55, #24252c);
  box-shadow: none;
}

.world-boss-actions p {
  min-height: 33px;
  margin: 0;
  border: 1px solid rgba(255, 226, 150, 0.18);
  border-radius: 8px;
  padding: 7px 10px;
  color: #dcd6ca;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.35;
  background: rgba(5, 5, 6, 0.62);
}

@keyframes worldBossStorm {
  from { background-position: 0 0, 0 0; }
  to { background-position: 0 0, 90px 0; }
}

@keyframes worldBossFloat {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-8px); }
}

@keyframes worldBossBeam {
  0%, 100% { opacity: 0.68; transform: translateX(-50%) scaleX(0.86); }
  50% { opacity: 1; transform: translateX(-50%) scaleX(1.08); }
}

@keyframes worldBossProjectile {
  0% { left: var(--from-x); bottom: var(--from-y); opacity: 0; transform: translate(-50%, 50%) scale(0.72); }
  22% { opacity: 1; }
  100% { left: var(--to-x); bottom: calc(100% - var(--to-y)); opacity: 0; transform: translate(-50%, 50%) scale(1.18); }
}

@keyframes worldBossDamageText {
  0% { opacity: 0; transform: translateY(8px) scale(0.92); }
  28% { opacity: 1; transform: translateY(0) scale(1.08); }
  100% { opacity: 0; transform: translateY(-22px) scale(1); }
}

.world-map-panel {
  position: absolute;
  inset: 0;
  z-index: 7;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-bottom: 84px;
  color: #fff0cf;
  background:
    linear-gradient(180deg, rgba(54, 26, 8, 0.95), rgba(18, 12, 10, 0.98)),
    #241407;
}

.world-map-topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  min-height: 56px;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(240, 181, 74, 0.5);
  background: rgba(51, 28, 9, 0.98);
}

.world-clan-status {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.world-clan-shield {
  display: grid;
  flex: 0 0 32px;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(251, 218, 137, 0.48);
  border-radius: 8px;
  color: #ffdd80;
  font-weight: 900;
  background: rgba(44, 31, 19, 0.82);
}

.world-clan-status strong,
.world-clan-status small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.world-clan-status strong {
  color: #ffe8ad;
  font-size: 0.82rem;
}

.world-clan-status small {
  color: #cdb78a;
  font-size: 0.66rem;
  font-weight: 800;
}

.world-map-currencies {
  display: flex;
  align-items: center;
  gap: 4px;
  border: 1px solid rgba(230, 173, 83, 0.44);
  border-radius: 999px;
  padding: 6px 8px;
  color: #d8b36c;
  font-size: 0.68rem;
  font-weight: 900;
  background: rgba(31, 21, 14, 0.86);
}

.world-join-button {
  min-height: 36px;
  border: 1px solid rgba(255, 226, 140, 0.58);
  border-radius: 7px;
  padding: 0 12px;
  color: #5d3309;
  font-size: 0.72rem;
  font-weight: 900;
  background: linear-gradient(180deg, #ffe28b, #d99d35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.world-owner-strip {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 28px;
  gap: 8px;
  align-items: center;
  min-height: 68px;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(228, 168, 73, 0.42);
  background:
    radial-gradient(circle at 12% 50%, rgba(255, 61, 92, 0.34), transparent 4.4rem),
    rgba(41, 22, 9, 0.94);
}

.world-owner-avatar {
  width: 48px;
  height: 48px;
  border: 2px solid #ffe35d;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 210, 70, 0.36), transparent 48%),
    url("assets/cultivator-avatar.svg") center / cover no-repeat,
    #2d160b;
  box-shadow: 0 0 18px rgba(255, 51, 82, 0.78);
}

.world-owner-copy {
  min-width: 0;
  color: #fff0cf;
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1.2;
}

.world-owner-copy b {
  display: inline-block;
  margin-right: 6px;
  border: 1px solid #ffe27c;
  border-radius: 5px;
  padding: 2px 6px;
  color: #fff2c0;
  background: linear-gradient(180deg, #c91525, #831010);
}

.world-owner-copy em {
  display: inline-block;
  margin-left: 6px;
  border-radius: 5px;
  padding: 2px 5px;
  color: #ffe282;
  font-size: 0.6rem;
  font-style: normal;
  background: rgba(119, 73, 14, 0.82);
}

.world-owner-next {
  border: 0;
  color: #f5c95d;
  font-size: 1.8rem;
  line-height: 1;
  background: transparent;
}

.world-map-board {
  position: relative;
  flex: 1;
  min-height: 0;
  margin: 8px 10px 0;
  border: 2px solid rgba(223, 172, 83, 0.72);
  border-radius: 8px;
  overflow: hidden;
  background: #243a24;
  box-shadow: inset 0 0 0 1px rgba(255, 230, 157, 0.18);
}

.world-isomap {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 45%, rgba(245, 216, 105, 0.22), transparent 12rem),
    radial-gradient(circle at 47% 46%, rgba(68, 118, 41, 0.86), transparent 8rem),
    linear-gradient(135deg, transparent 82%, #d7c19c 82.2% 88%, #114258 88.2%),
    repeating-linear-gradient(30deg, rgba(255, 255, 255, 0.12) 0 1px, transparent 1px 18px),
    repeating-linear-gradient(150deg, rgba(18, 61, 22, 0.3) 0 1px, transparent 1px 18px),
    conic-gradient(from 45deg at 50% 50%, #6fab51, #82bb5b, #4f8d42, #78b35b, #6fab51);
}

.world-isomap::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(45deg, rgba(36, 86, 30, 0.22) 25%, transparent 25% 75%, rgba(36, 86, 30, 0.22) 75%),
    linear-gradient(45deg, rgba(210, 236, 139, 0.12) 25%, transparent 25% 75%, rgba(210, 236, 139, 0.12) 75%);
  background-position: 0 0, 17px 17px;
  background-size: 34px 34px;
  opacity: 0.62;
}

.world-isomap::after {
  content: "";
  position: absolute;
  right: -28px;
  bottom: -8px;
  width: 44%;
  height: 18%;
  transform: skewX(-28deg);
  background:
    linear-gradient(180deg, rgba(230, 213, 178, 0.92), rgba(213, 189, 147, 0.92) 54%, #0f4157 55%);
  box-shadow: -28px -12px 0 rgba(224, 205, 168, 0.88);
}

.world-node {
  position: absolute;
  left: var(--x);
  top: var(--y);
  z-index: 2;
  display: grid;
  place-items: center;
  width: 15px;
  height: 15px;
  transform: translate(-50%, -50%);
}

.world-node::before {
  content: "";
  display: block;
}

.world-node.mountain::before {
  width: 0;
  height: 0;
  border-right: 7px solid transparent;
  border-bottom: 18px solid #8d744f;
  border-left: 7px solid transparent;
  filter: drop-shadow(0 2px 0 rgba(25, 33, 18, 0.52));
}

.world-node.mountain::after {
  content: "";
  position: absolute;
  top: 3px;
  width: 5px;
  height: 5px;
  background: #f3ead4;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.world-node.clan::before,
.world-node.cave::before,
.world-node.mine::before,
.world-node.tower::before {
  width: 12px;
  height: 12px;
  border: 2px solid rgba(255, 255, 255, 0.78);
  border-radius: 50%;
  background: var(--node-color, #73d66b);
  box-shadow: 0 0 0 2px rgba(14, 49, 26, 0.36), 0 3px 4px rgba(0, 0, 0, 0.32);
}

.world-node.red {
  --node-color: #f04a52;
}

.world-node.blue {
  --node-color: #4fa7ff;
}

.world-node.green {
  --node-color: #5ad46b;
}

.world-node.purple {
  --node-color: #ba6cff;
}

.world-node.cave::before {
  --node-color: #d7d7c7;
  border-radius: 4px 4px 50% 50%;
}

.world-node.mine::before {
  --node-color: #47b9dc;
  border-radius: 3px;
  transform: rotate(45deg);
}

.world-node.tower::before {
  --node-color: #d68f36;
  border-radius: 2px 2px 6px 6px;
}

.world-node.city {
  width: 54px;
  height: 34px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 45% 35%, #f3d48b 0 6%, transparent 7%),
    repeating-linear-gradient(0deg, #a36f31 0 4px, #d5a54d 4px 7px);
  box-shadow: 0 0 0 2px rgba(93, 58, 18, 0.6), 0 0 14px rgba(255, 220, 95, 0.42);
}

.world-map-side-actions {
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 4;
  display: grid;
  gap: 8px;
}

.world-map-side-actions button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 2px solid rgba(255, 212, 90, 0.72);
  border-radius: 50%;
  color: #ffe9a6;
  font-size: 1.08rem;
  font-weight: 900;
  background: radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.2), transparent 24%), rgba(40, 25, 12, 0.95);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.36);
}

.world-map-side-actions button:first-child {
  color: #fff4ca;
  background: radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.22), transparent 24%), #2b2218;
}

.world-minimap {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 4;
  width: 132px;
  height: 86px;
  border: 2px solid rgba(239, 181, 83, 0.72);
  border-radius: 6px;
  padding: 9px;
  background: rgba(20, 49, 71, 0.92);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.35);
}

.world-minimap span {
  display: block;
  width: 78px;
  height: 54px;
  margin: 4px auto 0;
  transform: rotate(45deg) skew(-12deg, -12deg);
  border: 2px solid rgba(255, 236, 172, 0.58);
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 84, 120, 0.72) 0 3px, transparent 4px),
    radial-gradient(circle at 42% 44%, rgba(113, 234, 117, 0.72) 0 3px, transparent 4px),
    radial-gradient(circle at 57% 48%, rgba(95, 164, 255, 0.72) 0 3px, transparent 4px),
    linear-gradient(135deg, #6eb05b, #466d3c);
}

.world-map-rules {
  position: absolute;
  inset: 12px 10px 96px;
  z-index: 12;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255, 221, 143, 0.3);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(15, 15, 18, 0.97);
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.6);
}

.world-map-rules header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 46px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 215, 128, 0.22);
}

.world-map-rules header strong {
  color: #f1ba47;
  font-size: 1rem;
}

.world-map-rules header button {
  width: 32px;
  height: 32px;
  border: 0;
  color: #cfc8bf;
  font-size: 1.4rem;
  background: transparent;
}

.world-rule-scroll {
  overflow-y: auto;
  padding: 12px 14px 20px;
  color: #e8e2d7;
}

.world-rule-scroll h3 {
  margin: 14px 0 8px;
  color: #ffd268;
  font-size: 0.86rem;
}

.world-rule-scroll h3:first-child {
  margin-top: 0;
}

.world-rule-scroll p {
  margin: 0 0 8px;
  color: #e3ddd1;
  font-size: 0.76rem;
  line-height: 1.45;
  font-weight: 700;
}

.world-map-viewport {
  position: absolute;
  inset: 0;
  overflow: hidden;
  cursor: grab;
  touch-action: none;
  background:
    radial-gradient(circle at 50% 45%, rgba(255, 224, 140, 0.16), transparent 14rem),
    linear-gradient(135deg, #1d3826, #27142a 46%, #1a3148 100%);
}

.world-map-viewport.dragging {
  cursor: grabbing;
}

.world-map-canvas {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: 0 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.18)),
    repeating-linear-gradient(30deg, rgba(255, 255, 255, 0.09) 0 1px, transparent 1px 128px),
    repeating-linear-gradient(120deg, rgba(0, 0, 0, 0.16) 0 1px, transparent 1px 128px),
    url("assets/maps/xianxia-world-map-4096-v2.webp") center / cover no-repeat,
    radial-gradient(circle at 25% 18%, rgba(237, 222, 143, 0.5), transparent 22rem),
    radial-gradient(circle at 70% 28%, rgba(128, 59, 112, 0.52), transparent 24rem),
    radial-gradient(circle at 24% 72%, rgba(78, 135, 68, 0.58), transparent 26rem),
    radial-gradient(circle at 76% 76%, rgba(49, 111, 124, 0.54), transparent 24rem),
    #385a35;
  will-change: transform;
}

.world-region-zone {
  position: absolute;
  display: grid;
  align-content: start;
  gap: 5px;
  padding: 18px;
  border: 2px solid rgba(255, 235, 173, 0.24);
  color: #fff2cf;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 38%),
    var(--region-bg);
  pointer-events: none;
}

.world-region-zone.region-holy {
  --region-bg: linear-gradient(135deg, rgba(239, 215, 111, 0.18), rgba(91, 143, 80, 0.06));
}

.world-region-zone.region-demon {
  --region-bg: linear-gradient(135deg, rgba(106, 44, 102, 0.2), rgba(143, 61, 77, 0.06));
}

.world-region-zone.region-west {
  --region-bg: linear-gradient(135deg, rgba(56, 111, 57, 0.2), rgba(133, 170, 80, 0.06));
}

.world-region-zone.region-beast {
  --region-bg: linear-gradient(135deg, rgba(44, 98, 126, 0.2), rgba(67, 123, 66, 0.06));
}

.world-region-zone strong {
  font-size: 2rem;
  text-shadow: 0 3px 12px rgba(0, 0, 0, 0.56);
}

.world-region-zone small {
  max-width: 360px;
  color: rgba(255, 247, 219, 0.82);
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.3;
}

.world-land-cell {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
  border: 1px solid rgba(255, 241, 190, 0.24);
  border-radius: 2px;
  color: #fff7db;
  background:
    radial-gradient(circle at 50% 34%, rgba(255, 255, 255, 0.06), transparent 28%),
    rgba(18, 14, 10, 0.025);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.14);
  touch-action: none;
}

.world-land-cell span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  color: #18110a;
  font-size: 0.84rem;
  font-weight: 900;
  background: #f5d571;
  box-shadow: 0 0 0 2px rgba(41, 24, 12, 0.38), 0 6px 12px rgba(0, 0, 0, 0.3);
}

.world-land-cell small {
  color: rgba(255, 246, 216, 0.86);
  font-size: 0.57rem;
  font-weight: 900;
}

.world-land-cell.free span {
  opacity: 0;
}

.world-land-cell.free small {
  opacity: 0.2;
}

.world-land-cell.free:hover span,
.world-land-cell.free:hover small,
.world-land-cell.free.selected span,
.world-land-cell.free.selected small {
  opacity: 1;
}

.world-land-cell.region-holy span {
  background: #ffe38a;
}

.world-land-cell.region-demon span {
  background: #d887ff;
}

.world-land-cell.region-west span {
  background: #85e884;
}

.world-land-cell.region-beast span {
  background: #7bd4ff;
}

.world-map-player-layer {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}

.world-map-player-marker {
  position: absolute;
  display: grid;
  justify-items: center;
  gap: 4px;
  transform: translate(-50%, -100%);
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.55));
}

.world-map-player-marker b {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 2px solid rgba(255, 226, 124, 0.9);
  border-radius: 50%;
  color: #fff6d6;
  font-size: 0.8rem;
  font-weight: 1000;
  background: radial-gradient(circle at 38% 30%, rgba(255, 255, 255, 0.5), transparent 22%), #17324a;
}

.world-map-player-marker.current b {
  background: radial-gradient(circle at 38% 30%, rgba(255, 255, 255, 0.55), transparent 22%), #5a3308;
}

.world-map-player-marker small {
  max-width: 96px;
  overflow: hidden;
  border-radius: 999px;
  padding: 2px 6px;
  color: #fff0ba;
  font-size: 0.58rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: rgba(8, 9, 12, 0.78);
}

.world-land-cell.power {
  border-color: #ffda6c;
  background: rgba(255, 221, 111, 0.18);
}

.world-land-cell.blessed {
  border-color: #a2fff0;
  background: rgba(105, 255, 224, 0.16);
}

.world-land-cell.occupied {
  opacity: 0.78;
}

.world-land-cell.owned {
  border-color: #fff5a2;
  background: rgba(255, 237, 118, 0.28);
  box-shadow: 0 0 0 2px rgba(255, 222, 88, 0.5), 0 0 24px rgba(255, 223, 94, 0.46);
}

.world-land-cell.joined-region:not(.owned) {
  border-color: rgba(255, 255, 255, 0.34);
}

.world-land-cell.selected {
  z-index: 3;
  border-color: #fff6ad;
  outline: 3px solid rgba(255, 219, 93, 0.7);
  box-shadow: 0 0 22px rgba(255, 229, 107, 0.52);
}

.world-region-tabs {
  position: absolute;
  left: 8px;
  right: 64px;
  top: 8px;
  z-index: 7;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  pointer-events: auto;
}

.world-region-tabs button {
  display: grid;
  gap: 2px;
  min-width: 0;
  min-height: 42px;
  border: 1px solid rgba(255, 224, 139, 0.36);
  border-radius: 8px;
  padding: 6px 5px;
  color: #fff0c6;
  background: rgba(25, 17, 10, 0.72);
}

.world-region-tabs button.active {
  border-color: #ffe68d;
  background: linear-gradient(180deg, rgba(255, 221, 94, 0.28), rgba(40, 24, 10, 0.84));
}

.world-region-tabs button.locked {
  opacity: 0.52;
}

.world-region-tabs strong,
.world-region-tabs small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.world-region-tabs strong {
  font-size: 0.66rem;
}

.world-region-tabs small {
  color: #d6c2a2;
  font-size: 0.52rem;
  font-weight: 800;
}

.world-map-zoom {
  position: absolute;
  left: 8px;
  top: 60px;
  z-index: 7;
  display: flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 226, 149, 0.36);
  border-radius: 999px;
  background: rgba(23, 16, 12, 0.84);
}

.world-map-zoom button {
  width: 32px;
  height: 30px;
  border: 0;
  color: #ffe7a6;
  font-weight: 900;
  background: transparent;
}

.world-map-zoom span {
  min-width: 48px;
  color: #fff0c4;
  font-size: 0.67rem;
  font-weight: 900;
  text-align: center;
}

.world-map-message {
  position: absolute;
  left: 8px;
  right: 66px;
  bottom: 102px;
  z-index: 7;
  border: 1px solid rgba(255, 226, 149, 0.25);
  border-radius: 8px;
  padding: 7px 9px;
  color: #ffe2a0;
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1.25;
  background: rgba(14, 10, 8, 0.76);
}

.world-land-detail {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  z-index: 8;
  display: grid;
  gap: 7px;
  border: 1px solid rgba(255, 226, 149, 0.38);
  border-radius: 8px;
  padding: 10px;
  background: rgba(16, 13, 13, 0.96);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.42);
}

.world-region-choice {
  position: absolute;
  left: 10px;
  right: 10px;
  top: 64px;
  z-index: 11;
  display: grid;
  gap: 10px;
  max-height: calc(100% - 78px);
  overflow-y: auto;
  border: 1px solid rgba(255, 226, 149, 0.44);
  border-radius: 8px;
  padding: 12px;
  background:
    radial-gradient(circle at 50% 0, rgba(255, 221, 126, 0.12), transparent 11rem),
    rgba(14, 12, 12, 0.97);
  box-shadow: 0 20px 64px rgba(0, 0, 0, 0.58);
}

.world-region-choice header,
.world-region-choice footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.world-region-choice header strong,
.world-region-choice header small {
  display: block;
}

.world-region-choice header strong {
  color: #ffe9ad;
  font-size: 0.96rem;
}

.world-region-choice header small {
  color: #d6c5a8;
  font-size: 0.68rem;
  font-weight: 900;
}

.world-region-choice header button {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: #fff1c8;
  background: rgba(255, 255, 255, 0.08);
}

.world-region-warning {
  margin: 0;
  border: 1px solid rgba(255, 126, 100, 0.32);
  border-radius: 8px;
  padding: 9px;
  color: #ffd2bc;
  font-size: 0.74rem;
  font-weight: 900;
  line-height: 1.4;
  background: rgba(80, 22, 14, 0.34);
}

.world-region-choice-list {
  display: grid;
  gap: 8px;
}

.world-region-choice-list button {
  display: grid;
  gap: 3px;
  min-height: 54px;
  border: 1px solid rgba(255, 229, 156, 0.34);
  border-radius: 8px;
  padding: 9px 10px;
  color: #fff0c8;
  text-align: left;
  background:
    linear-gradient(90deg, var(--region-choice-color), rgba(255, 255, 255, 0.05));
}

.world-region-choice-list button.region-holy {
  --region-choice-color: rgba(234, 202, 99, 0.22);
}

.world-region-choice-list button.region-demon {
  --region-choice-color: rgba(177, 83, 205, 0.22);
}

.world-region-choice-list button.region-west {
  --region-choice-color: rgba(94, 202, 105, 0.22);
}

.world-region-choice-list button.region-beast {
  --region-choice-color: rgba(93, 178, 224, 0.22);
}

.world-region-choice-list span {
  font-size: 0.84rem;
  font-weight: 900;
}

.world-region-choice-list small {
  color: #d8cdbc;
  font-size: 0.66rem;
  font-weight: 900;
}

.world-region-story {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 10px;
  align-items: center;
  border: 1px solid rgba(255, 226, 149, 0.24);
  border-radius: 8px;
  padding: 10px;
  background:
    radial-gradient(circle at 13% 50%, var(--region-story-glow), transparent 5rem),
    rgba(255, 255, 255, 0.05);
}

.world-region-story.region-holy {
  --region-story-glow: rgba(247, 214, 104, 0.28);
}

.world-region-story.region-demon {
  --region-story-glow: rgba(179, 75, 214, 0.28);
}

.world-region-story.region-west {
  --region-story-glow: rgba(87, 220, 112, 0.28);
}

.world-region-story.region-beast {
  --region-story-glow: rgba(91, 188, 241, 0.28);
}

.region-emblem {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 2px solid rgba(255, 231, 157, 0.58);
  border-radius: 50%;
  color: #fff3bf;
  font-size: 0.82rem;
  font-weight: 900;
  background: rgba(18, 13, 10, 0.84);
  box-shadow: 0 0 22px var(--region-story-glow);
}

.world-region-story p {
  margin: 0;
  color: #eadfc9;
  font-size: 0.74rem;
  font-weight: 800;
  line-height: 1.45;
}

.world-region-choice footer button {
  flex: 1;
  min-height: 38px;
  border: 0;
  border-radius: 8px;
  color: #271709;
  font-size: 0.78rem;
  font-weight: 900;
  background: linear-gradient(180deg, #fff0a6, #d49734);
}

.world-region-choice footer button:last-child {
  color: #ffe6a8;
  background: rgba(255, 255, 255, 0.1);
}

.world-land-detail header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.world-land-detail header button,
.world-map-instance header button {
  width: 28px;
  height: 28px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: #fff1c8;
  background: rgba(255, 255, 255, 0.08);
}

.region-pill {
  border-radius: 999px;
  padding: 4px 8px;
  color: #11100d;
  font-size: 0.64rem;
  font-weight: 900;
  background: #f4d36e;
}

.region-pill.region-demon {
  background: #d887ff;
}

.region-pill.region-west {
  background: #91e783;
}

.region-pill.region-beast {
  background: #83d5ff;
}

.world-land-detail > strong {
  color: #fff0bd;
  font-size: 0.86rem;
}

.world-land-detail p,
.world-land-detail dl {
  margin: 0;
}

.world-land-detail p {
  color: #d6ccb8;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1.3;
}

.world-land-detail dl {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 4px 8px;
  color: #eadfc4;
  font-size: 0.66rem;
  line-height: 1.3;
}

.world-land-detail dt {
  color: #ffdc85;
  font-weight: 900;
}

.world-land-detail dd {
  margin: 0;
  font-weight: 800;
}

.world-land-actions {
  display: flex;
  gap: 7px;
}

.world-land-actions button,
.world-map-instance footer button {
  flex: 1;
  min-height: 34px;
  border: 0;
  border-radius: 8px;
  color: #271709;
  font-size: 0.74rem;
  font-weight: 900;
  background: linear-gradient(180deg, #fff0a6, #d49734);
}

.world-land-actions button:last-child {
  flex: 0 0 74px;
  color: #ffe6a8;
  background: rgba(255, 255, 255, 0.1);
}

.world-minimap .world-minimap-map {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 4px;
  background: #223d2e;
}

.world-minimap .mini-zone {
  position: absolute;
  display: block;
  width: 50%;
  height: 50%;
  margin: 0;
  transform: none;
  border: 0;
}

.world-minimap .mini-zone.holy {
  left: 0;
  top: 0;
  background: #9db75d;
}

.world-minimap .mini-zone.demon {
  right: 0;
  top: 0;
  background: #804060;
}

.world-minimap .mini-zone.west {
  left: 0;
  bottom: 0;
  background: #4d7e42;
}

.world-minimap .mini-zone.beast {
  right: 0;
  bottom: 0;
  background: #3e6e80;
}

.world-minimap b {
  position: absolute;
  z-index: 2;
  border: 2px solid #fff2a9;
  border-radius: 3px;
  background: rgba(255, 239, 136, 0.12);
}

.world-map-instance {
  position: absolute;
  inset: 10px;
  z-index: 10;
  display: grid;
  grid-template-rows: auto 1fr auto;
  border: 1px solid rgba(255, 226, 149, 0.38);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(11, 14, 16, 0.98);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.58);
}

.world-map-instance header,
.world-map-instance footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px;
  background: rgba(24, 18, 13, 0.92);
}

.world-map-instance header strong,
.world-map-instance header small {
  display: block;
}

.world-map-instance header strong {
  color: #ffe9ad;
}

.world-map-instance header small,
.world-map-instance footer span {
  color: #d9cfbc;
  font-size: 0.7rem;
  font-weight: 900;
}

.world-map-instance footer button:disabled {
  opacity: 0.54;
}

.world-instance-map {
  position: relative;
  min-height: 0;
  background:
    radial-gradient(circle at 50% 52%, rgba(255, 232, 130, 0.12), transparent 10rem),
    repeating-linear-gradient(30deg, rgba(255, 255, 255, 0.09) 0 1px, transparent 1px 42px),
    repeating-linear-gradient(120deg, rgba(0, 0, 0, 0.2) 0 1px, transparent 1px 42px),
    linear-gradient(135deg, #3e6b44, #182a25);
  overflow: hidden;
}

.world-instance-map.region-demon {
  background:
    radial-gradient(circle at 50% 52%, rgba(220, 117, 255, 0.13), transparent 10rem),
    repeating-linear-gradient(30deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 42px),
    linear-gradient(135deg, #4b2445, #171220);
}

.world-instance-map.region-beast {
  background:
    radial-gradient(circle at 50% 52%, rgba(96, 201, 255, 0.14), transparent 10rem),
    repeating-linear-gradient(30deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 42px),
    linear-gradient(135deg, #24516d, #162822);
}

.world-instance-map p {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  margin: 0;
  border-radius: 8px;
  padding: 8px;
  color: #ffe4a2;
  font-size: 0.68rem;
  font-weight: 900;
  background: rgba(0, 0, 0, 0.5);
}

.instance-node {
  position: absolute;
  left: var(--x);
  top: var(--y);
  display: grid;
  gap: 2px;
  min-width: 62px;
  min-height: 62px;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(255, 232, 160, 0.5);
  border-radius: 8px;
  padding: 5px;
  color: #fff3d3;
  text-align: center;
  background: rgba(17, 13, 11, 0.78);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.38);
}

.instance-node i {
  display: block;
  width: 25px;
  height: 25px;
  margin: 0 auto 1px;
}

.instance-node b,
.instance-node small {
  display: block;
}

.instance-node b {
  font-size: 0.72rem;
}

.instance-node small {
  color: #d5cbb7;
  font-size: 0.61rem;
  font-weight: 900;
}

.instance-node.monster.high {
  border-color: #ff7d6f;
  box-shadow: 0 0 18px rgba(255, 88, 78, 0.42);
}

.instance-node.monster i {
  border-radius: 45% 55% 52% 48%;
  background:
    radial-gradient(circle at 38% 38%, #fff7bd 0 8%, transparent 9%),
    radial-gradient(circle at 62% 38%, #fff7bd 0 8%, transparent 9%),
    radial-gradient(circle at 50% 67%, #10100f 0 18%, transparent 19%),
    linear-gradient(135deg, #5b413c, #211317);
  box-shadow:
    0 -7px 0 -3px #7d5b43,
    7px -6px 0 -4px #7d5b43,
    -7px -6px 0 -4px #7d5b43,
    0 0 12px rgba(255, 84, 84, 0.36);
}

.instance-node.monster.high i {
  background:
    radial-gradient(circle at 38% 38%, #fff7bd 0 8%, transparent 9%),
    radial-gradient(circle at 62% 38%, #fff7bd 0 8%, transparent 9%),
    radial-gradient(circle at 50% 67%, #140a09 0 18%, transparent 19%),
    linear-gradient(135deg, #af3342, #321019);
  box-shadow:
    0 -8px 0 -3px #d37545,
    8px -6px 0 -4px #d37545,
    -8px -6px 0 -4px #d37545,
    0 0 18px rgba(255, 84, 84, 0.6);
}

.instance-node.monster.defeated {
  filter: grayscale(0.8);
  opacity: 0.48;
}

.instance-node.resource {
  border-color: #ffe376;
}

.instance-node.resource i,
.resource-token {
  border-radius: 42% 58% 46% 54%;
  background:
    radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.94), transparent 13%),
    linear-gradient(135deg, #fff3a4, #d4a33d 48%, #7d5517);
  box-shadow: 0 0 16px rgba(255, 218, 91, 0.52);
}

.instance-node.home {
  border-color: #9df9e3;
}

.instance-node.home i {
  position: relative;
  border-radius: 4px 4px 7px 7px;
  background: linear-gradient(180deg, #ffe3a0, #835128);
  box-shadow: inset 0 -8px 0 rgba(0, 0, 0, 0.2);
}

.instance-node.home i::before {
  content: "";
  position: absolute;
  left: -4px;
  top: -8px;
  width: 33px;
  height: 18px;
  transform: rotate(45deg);
  border-radius: 3px;
  background: linear-gradient(135deg, #6d2a22, #d47a36);
}

.instance-scenery {
  position: absolute;
  left: var(--x);
  top: var(--y);
  z-index: 0;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.instance-scenery.tree {
  width: 22px;
  height: 38px;
  border-radius: 999px 999px 8px 8px;
  background:
    radial-gradient(circle at 50% 18%, #8dff91 0 29%, transparent 30%),
    radial-gradient(circle at 38% 44%, #3bb85a 0 38%, transparent 39%),
    radial-gradient(circle at 62% 46%, #2d8f4d 0 35%, transparent 36%),
    linear-gradient(90deg, transparent 41%, #8b5a2b 42% 58%, transparent 59%);
  opacity: 0.82;
}

.instance-scenery.mountain {
  width: 0;
  height: 0;
  border-right: 18px solid transparent;
  border-bottom: 40px solid rgba(116, 104, 87, 0.86);
  border-left: 18px solid transparent;
  filter: drop-shadow(0 8px 8px rgba(0, 0, 0, 0.32));
}

.instance-scenery.mountain::after {
  content: "";
  position: absolute;
  left: -7px;
  top: 13px;
  border-right: 7px solid transparent;
  border-bottom: 15px solid rgba(242, 232, 206, 0.9);
  border-left: 7px solid transparent;
}

.instance-scenery.stone {
  width: 24px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, #b9b4a6, #5a5b5d);
  opacity: 0.7;
}

.world-instance-popover,
.world-instance-battle {
  position: absolute;
  left: 14px;
  right: 14px;
  top: 50%;
  z-index: 4;
  display: grid;
  gap: 10px;
  transform: translateY(-50%);
  border: 1px solid rgba(255, 226, 149, 0.5);
  border-radius: 8px;
  padding: 12px;
  background: rgba(13, 14, 16, 0.96);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.6);
}

.world-instance-popover header,
.world-instance-popover footer,
.world-instance-battle footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0;
  background: transparent;
}

.world-instance-popover header button {
  width: 28px;
  height: 28px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  color: #fff3cf;
  background: rgba(255, 255, 255, 0.08);
}

.world-instance-popover p,
.world-instance-popover dl {
  position: static;
  margin: 0;
  padding: 0;
  background: transparent;
}

.world-instance-popover dl {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 5px 10px;
  color: #f6e8ca;
  font-size: 0.76rem;
  font-weight: 900;
}

.world-instance-popover dd {
  margin: 0;
  color: #8fffc0;
}

.monster-token.large,
.resource-token {
  width: 58px;
  height: 58px;
  margin: 0 auto;
}

.monster-token.large i {
  display: block;
  width: 58px;
  height: 58px;
  border-radius: 45% 55% 52% 48%;
  background:
    radial-gradient(circle at 38% 38%, #fff7bd 0 8%, transparent 9%),
    radial-gradient(circle at 62% 38%, #fff7bd 0 8%, transparent 9%),
    radial-gradient(circle at 50% 67%, #140a09 0 18%, transparent 19%),
    linear-gradient(135deg, #af3342, #321019);
  box-shadow: 0 0 28px rgba(255, 84, 84, 0.62);
}

.world-instance-popover footer button,
.world-instance-battle footer button {
  flex: 1 1 0;
  min-height: 38px;
  border: 0;
  border-radius: 8px;
  color: #24160a;
  font-weight: 900;
  background: linear-gradient(180deg, #fff1a6, #d49a33);
}

.world-instance-popover footer button:last-child,
.world-instance-battle footer button:last-child {
  color: #ffecc1;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 226, 149, 0.3);
}

.world-instance-popover footer button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.world-instance-battle {
  inset: 0;
  transform: none;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  padding: 0;
  grid-template-rows: auto 1fr auto auto;
  background:
    linear-gradient(180deg, rgba(3, 9, 12, 0.06), rgba(4, 8, 9, 0.82)),
    url("assets/maps/realm-back-mountain.webp") center / cover no-repeat;
}

.world-instance-battle::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 28%, rgba(118, 255, 225, 0.18), transparent 9rem),
    linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.5));
  pointer-events: none;
}

.world-battle-header,
.world-battle-scene,
.world-battle-hud,
.world-battle-actions {
  position: relative;
  z-index: 1;
}

.world-map-instance .world-battle-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px;
  background: linear-gradient(180deg, rgba(12, 15, 18, 0.88), rgba(6, 8, 10, 0.46));
}

.world-battle-header button {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255, 226, 149, 0.4);
  border-radius: 50%;
  color: #ffecc1;
  background: rgba(0, 0, 0, 0.36);
}

.world-battle-scene {
  position: relative;
  min-height: 0;
  isolation: isolate;
}

.world-battle-unit {
  position: absolute;
  display: grid;
  gap: 4px;
  width: 136px;
  color: #fff1ce;
  text-align: center;
  font-size: 0.76rem;
  font-weight: 900;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.75);
}

.world-battle-unit b,
.world-battle-unit small {
  display: block;
}

.world-battle-unit small {
  color: #dce9e2;
  font-size: 0.62rem;
}

.world-battle-sprite {
  display: block;
  width: 112px;
  height: 112px;
  margin: 0 auto;
  background: var(--battle-sprite) center / contain no-repeat;
  filter: drop-shadow(0 16px 18px rgba(0, 0, 0, 0.55));
}

.world-battle-unit.player {
  left: 5%;
  bottom: 22px;
}

.world-battle-unit.player .world-battle-sprite {
  width: 128px;
  height: 128px;
}

.world-battle-unit.enemy {
  right: 5%;
  top: 24px;
}

.world-battle-unit.enemy .world-battle-sprite {
  width: 132px;
  height: 132px;
}

.world-battle-unit.enemy.foundation .world-battle-sprite {
  width: 154px;
  height: 154px;
}

.world-instance-battle.player-strike .world-battle-unit.player .world-battle-sprite {
  animation: worldBattlePlayerStrike 0.28s ease-out;
}

.world-instance-battle.enemy-strike .world-battle-unit.enemy .world-battle-sprite {
  animation: worldBattleEnemyStrike 0.28s ease-out;
}

.world-battle-hud {
  display: grid;
  gap: 7px;
  padding: 0 12px 8px;
}

.world-battle-bar {
  position: relative;
  height: 25px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.62);
}

.world-battle-bar span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: inherit;
  transition: width 0.22s ease;
}

.world-battle-bar strong {
  position: relative;
  z-index: 1;
  display: block;
  padding: 5px 10px 0;
  color: #fff2d4;
  text-align: right;
  font-size: 0.66rem;
  font-weight: 900;
  text-shadow: 0 2px 4px #000;
}

.world-battle-bar.hp span {
  background: linear-gradient(90deg, #e13942, #ff6a67);
}

.world-battle-bar.mp span {
  background: linear-gradient(90deg, #3baff7, #77dcff);
}

.world-battle-bar.enemy-hp span {
  background: linear-gradient(90deg, #3fd75d, #8eff79);
}

.world-instance-map .world-battle-log {
  position: static;
  margin: 0;
  border: 1px solid rgba(255, 226, 149, 0.22);
  padding: 8px;
  color: #ffe6b0;
  text-align: center;
  background: rgba(0, 0, 0, 0.58);
}

.world-battle-actions {
  padding: 10px 12px 12px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.66));
}

.world-battle-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

@keyframes worldBattlePlayerStrike {
  0% { transform: translate(0, 0); }
  45% { transform: translate(34px, -18px) scale(1.04); }
  100% { transform: translate(0, 0); }
}

@keyframes worldBattleEnemyStrike {
  0% { transform: translate(0, 0); }
  45% { transform: translate(-30px, 18px) scale(1.04); }
  100% { transform: translate(0, 0); }
}

.battle-fighter span {
  display: block;
  width: 82px;
  height: 82px;
  margin: 0 auto;
  border-radius: 50%;
}

.battle-fighter.player {
  left: 8%;
  bottom: 18px;
}

.battle-fighter.player span {
  background: url("assets/cultivator-avatar.svg") center / cover no-repeat, #fff2cf;
  box-shadow: 0 0 26px rgba(118, 238, 255, 0.42);
}

.battle-fighter.enemy {
  right: 8%;
  top: 34px;
}

.battle-fighter.enemy span {
  background:
    radial-gradient(circle at 38% 38%, #fff7bd 0 8%, transparent 9%),
    radial-gradient(circle at 62% 38%, #fff7bd 0 8%, transparent 9%),
    radial-gradient(circle at 50% 67%, #140a09 0 18%, transparent 19%),
    linear-gradient(135deg, #af3342, #321019);
  box-shadow: 0 0 30px rgba(255, 84, 84, 0.65);
}

.world-mining-progress {
  position: relative;
  height: 30px;
  overflow: hidden;
  border: 1px solid rgba(255, 226, 149, 0.36);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.world-mining-progress span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #e0a93f, #fff08b);
}

.world-mining-progress strong {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  height: 100%;
  color: #fff4cf;
  font-size: 0.72rem;
}

.seed-shop-panel {
  position: absolute;
  left: 14px;
  right: 14px;
  top: 92px;
  z-index: 8;
  display: grid;
  gap: 10px;
  border: 1px solid rgba(255, 224, 143, 0.44);
  border-radius: 8px;
  padding: 12px;
  background: rgba(20, 18, 14, 0.99);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.48);
}

.seed-shop-panel header,
.shop-tabs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.seed-shop-panel header strong {
  color: #ffe59f;
}

.seed-shop-panel header span {
  margin-left: auto;
  border-radius: 999px;
  padding: 5px 8px;
  color: #ffe294;
  font-size: 0.74rem;
  font-weight: 900;
  background: rgba(0, 0, 0, 0.42);
}

.seed-shop-panel header button {
  width: 28px;
  height: 28px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  color: #fff2bc;
  background: rgba(255, 255, 255, 0.08);
}

.shop-tabs {
  justify-content: flex-start;
  overflow-x: auto;
  scrollbar-width: none;
}

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

.shop-tabs button {
  flex: 0 0 auto;
  min-width: 82px;
  min-height: 36px;
  border: 1px solid rgba(255, 231, 156, 0.24);
  border-radius: 8px;
  color: #c9d7c0;
  font-size: 0.72rem;
  font-weight: 900;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.07);
}

.shop-tabs button.active {
  border-color: rgba(255, 219, 122, 0.8);
  color: #ffdc7a;
  background: rgba(79, 56, 19, 0.86);
}

.shop-tabs button:disabled {
  opacity: 0.42;
}

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

.empty-shop {
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  min-height: 86px;
  border: 1px dashed rgba(255, 231, 156, 0.28);
  border-radius: 8px;
  color: #cfd8c7;
  font-size: 0.78rem;
  font-weight: 900;
  background: rgba(0, 0, 0, 0.24);
}

.shop-item {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  min-width: 0;
  border: 1px solid rgba(125, 212, 123, 0.42);
  border-radius: 8px;
  background: rgba(19, 45, 27, 0.82);
}

.shop-item.active {
  border-color: rgba(255, 219, 122, 0.86);
  box-shadow: 0 0 18px rgba(255, 219, 122, 0.16);
}

.shop-item-price,
.shop-item-owned {
  position: absolute;
  min-width: 28px;
  border-radius: 999px;
  padding: 2px 6px;
  color: #ffe294;
  font-size: 0.66rem;
  font-weight: 900;
  text-align: center;
  white-space: nowrap;
  background: rgba(0, 0, 0, 0.78);
}

.shop-item-price {
  left: 6px;
  top: 6px;
}

.shop-item-price::after {
  content: " LT";
}

.shop-item-owned {
  right: 6px;
  bottom: 6px;
  color: #efffff;
}

.shop-detail {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 10;
  display: grid;
  grid-template-columns: 62px 1fr;
  gap: 10px 12px;
  border: 1px solid rgba(255, 215, 114, 0.48);
  border-radius: 8px;
  padding: 14px;
  color: #ecf3ff;
  background: rgba(11, 22, 23, 0.98);
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.62);
}

.shop-detail h3,
.shop-detail p {
  margin: 0;
}

.shop-detail h3 {
  color: #ffe19a;
  font-size: 1rem;
}

.shop-detail p {
  color: #a7eeb4;
  font-size: 0.78rem;
  font-weight: 900;
}

.shop-detail dl {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 7px 10px;
  margin: 0;
  font-size: 0.82rem;
}

.shop-detail dt {
  color: #9fdca8;
  font-weight: 900;
}

.shop-detail dd {
  margin: 0;
  color: #f4f7ff;
}

.buy-shop-item-button {
  grid-column: 1 / -1;
  min-height: 38px;
  border: 0;
  border-radius: 8px;
  color: #281400;
  font-weight: 900;
  background: linear-gradient(180deg, #fff1a4, #f2a632);
}

.buy-shop-item-button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.seed-shop-message {
  min-height: 26px;
  margin: 0;
  color: #ffe4a0;
  font-size: 0.76rem;
  font-weight: 900;
}

.alchemy-panel {
  position: absolute;
  inset: 0;
  z-index: 18;
  overflow-y: auto;
  padding: 14px 14px 24px;
  background:
    linear-gradient(180deg, rgba(4, 16, 13, 0.52), rgba(4, 7, 7, 0.95)),
    radial-gradient(circle at 50% 4%, rgba(94, 226, 162, 0.24), transparent 16rem),
    url("assets/maps/alchemy-room.webp") center / cover no-repeat,
    #07100d;
}

.forge-panel {
  position: absolute;
  inset: 0;
  z-index: 18;
  overflow-y: auto;
  padding: 14px 14px 24px;
  background:
    linear-gradient(180deg, rgba(5, 18, 19, 0.54), rgba(4, 7, 8, 0.97)),
    radial-gradient(circle at 50% 8%, rgba(93, 239, 214, 0.18), transparent 15rem),
    url("assets/maps/refining-room.webp") center / cover no-repeat,
    #0c0b09;
}

.forge-panel::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(105deg, transparent 28%, rgba(95, 240, 215, 0.11), transparent 50%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.46)),
    repeating-linear-gradient(165deg, transparent 0 44px, rgba(112, 255, 223, 0.06) 46px 48px);
}

.forge-header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 46px;
  margin: -14px -14px 12px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 181, 82, 0.26);
  background: linear-gradient(180deg, rgba(12, 10, 8, 0.94), rgba(12, 10, 8, 0.68));
}

.forge-header h2,
.forge-log h3 {
  margin: 0;
  color: #fff0c8;
}

.forge-header h2 {
  font-size: 1rem;
}

.forge-status,
.forge-card,
.forge-log {
  position: relative;
  z-index: 1;
  border: 1px solid rgba(255, 177, 78, 0.42);
  border-radius: 8px;
  background: rgba(42, 26, 15, 0.76);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 15px 32px rgba(0, 0, 0, 0.35);
}

.forge-status {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  align-items: center;
  padding: 10px;
}

.forge-badge {
  display: inline-grid;
  place-items: center;
  min-height: 34px;
  border-radius: 999px;
  color: #fff0d0;
  font-weight: 900;
  background: rgba(130, 71, 30, 0.86);
}

.forge-status span {
  color: #ffd99d;
  font-size: 0.75rem;
  font-weight: 900;
}

.forge-exp {
  grid-column: 1 / -1;
  position: relative;
  height: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.42);
}

.forge-exp span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  background: linear-gradient(90deg, #ffd36f, #d36a2d);
}

.forge-exp strong {
  position: relative;
  display: block;
  color: #fff2d8;
  text-align: center;
  font-size: 0.65rem;
  line-height: 14px;
}

.forge-card {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding: 12px;
}

.forge-title {
  display: grid;
  gap: 8px;
}

.forge-title strong,
.forge-summary strong {
  color: #ffe4a7;
}

.forge-title select {
  min-height: 40px;
  color: #fff0d4;
  background: rgba(28, 16, 8, 0.82);
}

.forge-summary {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(255, 177, 78, 0.34);
  border-radius: 8px;
  padding: 10px;
  color: #ffd99d;
  background: rgba(0, 0, 0, 0.18);
}

.forge-summary span {
  font-size: 0.78rem;
  font-weight: 800;
}

.forge-scene {
  position: relative;
  min-height: 244px;
  overflow: hidden;
  border: 1px solid rgba(255, 200, 90, 0.26);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(3, 13, 13, 0.08), rgba(3, 7, 8, 0.54)),
    url("assets/maps/refining-room.webp") center 56% / cover no-repeat;
  box-shadow: inset 0 -58px 76px rgba(0, 0, 0, 0.52);
}

.forge-scene::before,
.forge-scene::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.forge-scene::before {
  inset: 0;
  background:
    radial-gradient(circle at 50% 46%, rgba(80, 255, 230, 0.2), transparent 7.5rem),
    linear-gradient(90deg, rgba(0, 0, 0, 0.34), transparent 28%, transparent 72%, rgba(0, 0, 0, 0.34));
}

.forge-scene::after {
  left: 50%;
  bottom: 10px;
  width: 260px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.46);
  transform: translateX(-50%);
  filter: blur(2px);
}

.forge-workbench-art {
  position: absolute;
  left: 50%;
  bottom: -8px;
  z-index: 2;
  width: min(88%, 364px);
  max-height: 238px;
  object-fit: contain;
  transform: translateX(-50%);
  filter:
    drop-shadow(0 18px 24px rgba(0, 0, 0, 0.7))
    drop-shadow(0 0 24px rgba(79, 255, 225, 0.16));
}

.forge-spark-ring {
  position: absolute;
  left: 50%;
  top: 34px;
  z-index: 3;
  width: 54px;
  height: 54px;
  border: 2px solid rgba(137, 255, 228, 0.72);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, #edfff8 0 9%, transparent 10%),
    conic-gradient(from 20deg, transparent, rgba(102, 255, 223, 0.78), transparent 34%, rgba(255, 210, 120, 0.72), transparent);
  box-shadow: 0 0 22px rgba(90, 255, 225, 0.46);
  transform: translateX(-50%);
  animation: forge-spark-pulse 2s ease-in-out infinite;
}

@keyframes forge-spark-pulse {
  0%,
  100% {
    transform: translateX(-50%) scale(0.95);
    opacity: 0.72;
  }

  50% {
    transform: translateX(-50%) scale(1.08);
    opacity: 1;
  }
}

.forge-craft-button {
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  color: #fff7df;
  font-weight: 900;
  background: linear-gradient(180deg, #8c4a25, #32180d);
}

.forge-craft-button:disabled {
  cursor: not-allowed;
  opacity: 0.56;
}

.forge-note {
  margin: 0;
  color: #ffd48b;
  font-size: 0.78rem;
  font-weight: 800;
}

.forge-log {
  display: grid;
  gap: 9px;
  margin-top: 12px;
  padding: 12px;
}

.forge-log h3 {
  font-size: 0.92rem;
}

.forge-log p {
  min-height: 38px;
  margin: 0;
  color: #ffd99d;
  font-size: 0.82rem;
  line-height: 1.45;
}

.formation-panel {
  background:
    linear-gradient(180deg, rgba(13, 13, 23, 0.62), rgba(6, 7, 12, 0.97)),
    radial-gradient(circle at 50% 8%, rgba(178, 127, 255, 0.2), transparent 15rem),
    url("assets/maps/cultivation-cave-dwelling.webp") center / cover no-repeat,
    #090913;
}

.formation-panel::before {
  background:
    linear-gradient(105deg, transparent 28%, rgba(190, 139, 255, 0.11), transparent 50%),
    repeating-linear-gradient(150deg, transparent 0 44px, rgba(255, 222, 128, 0.06) 46px 48px),
    linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.54));
}

.formation-status,
.formation-card,
.formation-log {
  border-color: rgba(197, 153, 255, 0.42);
  background: rgba(20, 16, 42, 0.78);
}

.formation-badge,
.formation-craft-button {
  color: #fff3dc;
  background: linear-gradient(180deg, #7f5fd7, #311c66);
}

.formation-exp span {
  background: linear-gradient(90deg, #c99dff, #ffd579);
}

.formation-scene {
  position: relative;
  min-height: 244px;
  overflow: hidden;
  border: 1px solid rgba(204, 167, 255, 0.32);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 52%, rgba(246, 207, 116, 0.15), transparent 8rem),
    radial-gradient(circle at 50% 45%, rgba(126, 91, 255, 0.16), transparent 11rem),
    linear-gradient(180deg, rgba(8, 8, 18, 0.2), rgba(4, 4, 8, 0.64)),
    url("assets/maps/cultivation-cave-dwelling.webp") center / cover no-repeat;
  box-shadow: inset 0 -64px 78px rgba(0, 0, 0, 0.58);
}

.formation-scene::before,
.formation-scene::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.formation-scene::before {
  width: 176px;
  height: 176px;
  border: 2px solid rgba(255, 220, 130, 0.72);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 250, 214, 0.28) 0 12%, transparent 13%),
    repeating-conic-gradient(from 0deg, rgba(255, 221, 132, 0.7) 0 2deg, transparent 2deg 18deg);
  box-shadow: 0 0 28px rgba(255, 218, 112, 0.4), inset 0 0 34px rgba(173, 107, 255, 0.18);
  animation: formation-spin 8s linear infinite;
}

.formation-scene::after {
  width: 104px;
  height: 104px;
  border: 1px solid rgba(191, 138, 255, 0.88);
  transform: translate(-50%, -50%) rotate(45deg);
  box-shadow: 0 0 22px rgba(179, 112, 255, 0.36);
  animation: formation-pulse 2.3s ease-in-out infinite;
}

.formation-array-core {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, #fff8d9 0 15%, #b982ff 16% 33%, transparent 34%),
    conic-gradient(from 90deg, #ffe28a, #8c6dff, #7ef7dc, #ffe28a);
  transform: translate(-50%, -50%);
  box-shadow: 0 0 26px rgba(211, 158, 255, 0.68);
}

.formation-node {
  position: absolute;
  z-index: 3;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffe8a4;
  box-shadow: 0 0 18px rgba(255, 227, 150, 0.74);
}

.formation-node.n1 { left: calc(50% - 9px); top: 34px; }
.formation-node.n2 { right: 78px; top: 82px; }
.formation-node.n3 { right: 104px; bottom: 58px; }
.formation-node.n4 { left: 104px; bottom: 58px; }
.formation-node.n5 { left: 78px; top: 82px; }

@keyframes formation-spin {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes formation-pulse {
  0%, 100% { opacity: 0.62; transform: translate(-50%, -50%) rotate(45deg) scale(0.92); }
  50% { opacity: 1; transform: translate(-50%, -50%) rotate(45deg) scale(1.08); }
}

.alchemy-panel::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(3, 8, 8, 0.16), rgba(3, 8, 7, 0.62)),
    linear-gradient(105deg, transparent 30%, rgba(154, 255, 205, 0.12), transparent 48%),
    repeating-linear-gradient(165deg, transparent 0 42px, rgba(98, 231, 144, 0.08) 44px 46px);
}

.alchemy-header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 46px;
  margin: -14px -14px 12px;
  padding: 10px 14px;
  background: linear-gradient(180deg, rgba(4, 9, 9, 0.94), rgba(4, 9, 9, 0.65));
  border-bottom: 1px solid rgba(99, 232, 137, 0.24);
}

.alchemy-header h2,
.alchemy-log h3 {
  margin: 0;
}

.alchemy-header h2 {
  color: #fff7dc;
  font-size: 1rem;
}

.close-panel-button {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 233, 173, 0.45);
  border-radius: 50%;
  color: #ffe7a8;
  font-size: 1.4rem;
  line-height: 1;
  background: rgba(21, 20, 16, 0.82);
}

.alchemy-status,
.recipe-card,
.alchemy-log {
  position: relative;
  z-index: 1;
  border: 1px solid rgba(95, 231, 127, 0.42);
  border-radius: 8px;
  background: rgba(10, 35, 22, 0.72);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 15px 32px rgba(0, 0, 0, 0.35);
}

.alchemy-status {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  align-items: center;
  padding: 10px;
}

.alchemy-badge {
  display: inline-grid;
  place-items: center;
  min-height: 34px;
  border-radius: 999px;
  color: #eaffd8;
  font-weight: 900;
  background: rgba(42, 111, 55, 0.8);
}

.alchemy-status span {
  color: #b7ffb9;
  font-size: 0.75rem;
  font-weight: 900;
}

.alchemy-exp {
  grid-column: 1 / -1;
  position: relative;
  height: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.42);
}

.alchemy-exp span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  background: linear-gradient(90deg, #71ff86, #33c764);
}

.alchemy-exp strong {
  position: relative;
  display: block;
  color: #eaffdc;
  text-align: center;
  font-size: 0.65rem;
  line-height: 14px;
}

.recipe-card {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding: 12px;
}

.recipe-title {
  display: grid;
  gap: 8px;
}

.recipe-title strong {
  color: #fff0c4;
}

.recipe-title select {
  min-height: 40px;
  color: #eaffdc;
  background: rgba(5, 20, 12, 0.78);
}

.recipe-summary {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(91, 226, 112, 0.34);
  border-radius: 8px;
  padding: 10px;
  color: #aaf8ad;
  background: rgba(0, 0, 0, 0.18);
}

.recipe-summary strong {
  color: #ffe3a2;
}

.recipe-summary span {
  font-size: 0.78rem;
  font-weight: 800;
}

.cauldron-scene {
  position: relative;
  min-height: 244px;
  overflow: hidden;
  border: 1px solid rgba(255, 200, 90, 0.26);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(5, 11, 9, 0.06), rgba(5, 8, 7, 0.5)),
    url("assets/maps/alchemy-room.webp") center 56% / cover no-repeat;
  box-shadow: inset 0 -54px 70px rgba(0, 0, 0, 0.48);
}

.cauldron-scene::before,
.cauldron-scene::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.cauldron-scene::before {
  inset: 0;
  background:
    radial-gradient(circle at 50% 44%, rgba(118, 255, 174, 0.18), transparent 7rem),
    linear-gradient(90deg, rgba(0, 0, 0, 0.38), transparent 28%, transparent 72%, rgba(0, 0, 0, 0.38));
}

.cauldron-scene::after {
  left: 50%;
  bottom: 16px;
  width: 220px;
  height: 34px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.42);
  transform: translateX(-50%);
  filter: blur(2px);
}

.alchemy-furnace-art {
  position: absolute;
  left: 50%;
  bottom: 4px;
  z-index: 2;
  width: min(74%, 320px);
  max-height: 224px;
  object-fit: contain;
  transform: translateX(-50%);
  filter:
    drop-shadow(0 18px 24px rgba(0, 0, 0, 0.68))
    drop-shadow(0 0 22px rgba(99, 255, 156, 0.14));
}

.pill-soul {
  position: absolute;
  left: 50%;
  top: 24px;
  z-index: 3;
  width: 54px;
  height: 54px;
  border: 2px solid rgba(193, 255, 202, 0.74);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 38%, #fff7cf 0 14%, transparent 15%),
    conic-gradient(#73ffb0, #ffe07c, #b06bff, #74dcff, #73ffb0);
  transform: translateX(-50%);
  box-shadow: 0 0 22px rgba(116, 255, 170, 0.58);
  animation: pill-soul-float 2.2s ease-in-out infinite;
}

@keyframes pill-soul-float {
  0%,
  100% {
    transform: translateX(-50%) translateY(0) scale(1);
  }

  50% {
    transform: translateX(-50%) translateY(-8px) scale(1.05);
  }
}

.ingredient-list {
  display: grid;
  gap: 8px;
  padding: 8px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.28);
}

.ingredient-row,
.inventory-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 34px;
  color: #fff6d8;
  font-weight: 900;
}

.ingredient-row span,
.inventory-item span {
  color: #8cff9e;
}

.alchemy-craft-button {
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  color: #fff8df;
  font-weight: 900;
  background: linear-gradient(180deg, #5f351d, #2a160e);
}

.alchemy-craft-button:disabled {
  cursor: not-allowed;
  opacity: 0.56;
}

.alchemy-note {
  margin: 0;
  color: #ffd48b;
  font-size: 0.78rem;
  font-weight: 800;
}

.alchemy-log {
  display: grid;
  gap: 9px;
  margin-top: 12px;
  padding: 12px;
}

.alchemy-log h3 {
  color: #fff0c4;
  font-size: 0.92rem;
}

.inventory-grid {
  display: grid;
  gap: 7px;
}

.alchemy-log p {
  min-height: 38px;
  margin: 0;
  color: #a4f0ad;
  font-size: 0.82rem;
  line-height: 1.45;
}

.talisman-panel {
  background:
    radial-gradient(circle at 50% 18%, rgba(105, 201, 255, 0.2), transparent 9rem),
    linear-gradient(180deg, rgba(6, 14, 28, 0.9), rgba(9, 18, 33, 0.96));
}

.talisman-status,
.talisman-card,
.talisman-workbench {
  border-color: rgba(101, 203, 255, 0.42);
  background: rgba(11, 27, 45, 0.76);
}

.talisman-badge,
.talisman-craft-button {
  background: linear-gradient(180deg, #9fe8ff, #2f85d8);
  color: #06101d;
}

.talisman-owned-list {
  display: grid;
  gap: 8px;
}

.talisman-workbench {
  position: relative;
  display: grid;
  gap: 10px;
  overflow: hidden;
  border: 1px solid rgba(101, 203, 255, 0.42);
  border-radius: 8px;
  margin-top: 12px;
  padding: 12px;
}

.talisman-workbench::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 24% 20%, rgba(255, 229, 146, 0.12), transparent 6rem),
    radial-gradient(circle at 72% 14%, rgba(105, 203, 255, 0.12), transparent 7rem);
}

.talisman-workbench-scene {
  position: relative;
  min-height: 152px;
  overflow: hidden;
  border: 1px solid rgba(255, 232, 170, 0.24);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(17, 34, 48, 0.54), rgba(4, 10, 18, 0.86)),
    radial-gradient(ellipse at 50% 108%, rgba(231, 166, 71, 0.22), transparent 52%);
}

.talisman-desk {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 18px;
  height: 56px;
  border: 1px solid rgba(255, 211, 124, 0.42);
  border-radius: 8px 8px 14px 14px;
  background:
    linear-gradient(90deg, rgba(255, 232, 169, 0.16), transparent 18% 82%, rgba(255, 232, 169, 0.12)),
    linear-gradient(180deg, #5a381c, #241208);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.42);
}

.talisman-paper {
  position: absolute;
  left: 27%;
  bottom: 50px;
  width: 44%;
  height: 68px;
  border: 1px solid rgba(124, 45, 27, 0.38);
  border-radius: 3px;
  background:
    linear-gradient(90deg, transparent 46%, rgba(180, 36, 26, 0.54) 47% 53%, transparent 54%),
    repeating-linear-gradient(180deg, transparent 0 13px, rgba(151, 82, 42, 0.22) 14px 15px),
    linear-gradient(180deg, #fff2ba, #e7c982);
  transform: perspective(160px) rotateX(18deg);
  box-shadow: 0 10px 16px rgba(0, 0, 0, 0.3);
}

.talisman-brush {
  position: absolute;
  right: 24%;
  bottom: 62px;
  width: 78px;
  height: 9px;
  border-radius: 999px;
  background: linear-gradient(90deg, #2a1208 0 22%, #f3d28d 23% 74%, #211107 75% 100%);
  transform: rotate(-27deg);
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.36);
}

.talisman-brush::after {
  content: "";
  position: absolute;
  right: -13px;
  top: -5px;
  width: 22px;
  height: 19px;
  border-radius: 60% 40% 50% 50%;
  background: linear-gradient(135deg, #100806, #5b1e16);
}

.talisman-inkstone,
.talisman-cinnabar {
  position: absolute;
  bottom: 49px;
  width: 38px;
  height: 26px;
  border: 1px solid rgba(255, 225, 143, 0.26);
  border-radius: 50%;
  box-shadow: inset 0 4px 8px rgba(255, 255, 255, 0.08), 0 8px 12px rgba(0, 0, 0, 0.3);
}

.talisman-inkstone {
  left: 16%;
  background: radial-gradient(circle at 48% 46%, #0d1720 0 42%, #2d4050 44% 70%, #101820 72%);
}

.talisman-cinnabar {
  right: 15%;
  background: radial-gradient(circle at 48% 46%, #d93b26 0 34%, #722017 36% 68%, #2c140f 70%);
}

.talisman-spark {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ffe889;
  box-shadow: 0 0 12px #ffe889;
  animation: talisman-spark-float 2.4s ease-in-out infinite;
}

.talisman-spark.one {
  left: 34%;
  top: 26%;
}

.talisman-spark.two {
  right: 32%;
  top: 18%;
  animation-delay: -1s;
}

.talisman-workbench > p {
  position: relative;
  min-height: 38px;
  margin: 0;
  color: #a4f0ad;
  font-size: 0.82rem;
  line-height: 1.45;
}

@keyframes talisman-spark-float {
  0%,
  100% {
    opacity: 0.42;
    transform: translateY(0);
  }

  50% {
    opacity: 0.95;
    transform: translateY(-9px);
  }
}

.talisman-owned-card {
  display: grid;
  grid-template-columns: 46px 1fr auto;
  gap: 8px;
  align-items: center;
  border: 1px solid rgba(118, 193, 255, 0.3);
  border-radius: 8px;
  padding: 8px;
  background: rgba(8, 17, 31, 0.72);
}

.talisman-owned-card .item-art {
  width: 42px;
  height: 42px;
}

.talisman-owned-card strong,
.talisman-owned-card small,
.talisman-owned-card em {
  display: block;
}

.talisman-owned-card strong {
  color: #fff4ce;
  font-size: 0.78rem;
}

.talisman-owned-card small {
  color: #cfe8ff;
  font-size: 0.66rem;
  line-height: 1.25;
}

.talisman-owned-card em {
  color: #8ee4ff;
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 900;
}

.talisman-owned-card button {
  min-width: 54px;
  min-height: 32px;
  border: 0;
  border-radius: 7px;
  color: #06101d;
  font-weight: 900;
  background: linear-gradient(180deg, #fff1a6, #eca13a);
}

.inventory-panel {
  position: absolute;
  inset: 0;
  z-index: 19;
  overflow-y: auto;
  padding: 14px;
  background:
    radial-gradient(circle at 50% 0, rgba(73, 127, 205, 0.22), transparent 16rem),
    linear-gradient(180deg, rgba(14, 34, 70, 0.96), rgba(4, 11, 24, 0.98));
}

.inventory-header {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 54px;
  margin: -14px -14px 8px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(113, 151, 219, 0.34);
  background: rgba(17, 35, 67, 0.96);
}

.inventory-header h2 {
  margin: 0;
  color: #eaf2ff;
  font-size: 1rem;
}

.inventory-tabs {
  position: sticky;
  top: 54px;
  z-index: 3;
  display: flex;
  flex-wrap: nowrap;
  gap: 7px;
  margin: 0 -4px 10px;
  padding: 8px 4px;
  overflow-x: auto;
  scrollbar-width: none;
  background: rgba(12, 27, 54, 0.94);
}

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

.inventory-tabs button {
  flex: 0 0 76px;
  min-height: 50px;
  border: 1px solid rgba(117, 153, 220, 0.42);
  border-radius: 8px;
  color: #a9b9d6;
  font-size: 0.65rem;
  font-weight: 900;
  white-space: nowrap;
  background: rgba(27, 52, 93, 0.78);
}

.inventory-tabs button.active {
  border-color: #ffd772;
  color: #ffd772;
  background: rgba(24, 45, 84, 0.96);
}

.inventory-count {
  color: #a8c6f7;
  font-size: 0.78rem;
  font-weight: 900;
  margin-bottom: 10px;
}

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

.bag-item {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  min-width: 0;
  border: 1px solid rgba(113, 151, 219, 0.66);
  border-radius: 8px;
  background: rgba(18, 34, 64, 0.86);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.bag-item.rare {
  border-color: rgba(150, 93, 255, 0.82);
  background: rgba(28, 26, 72, 0.9);
}

.bag-item.forge-low {
  border-color: rgba(133, 180, 221, 0.74);
}

.bag-item.forge-mid {
  border-color: rgba(93, 218, 142, 0.78);
  background: rgba(16, 48, 34, 0.88);
}

.bag-item.forge-high {
  border-color: rgba(150, 93, 255, 0.84);
  background: rgba(31, 24, 68, 0.9);
}

.bag-item.forge-extreme {
  border-color: rgba(255, 208, 94, 0.92);
  background: rgba(62, 39, 10, 0.92);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.06),
    0 0 16px rgba(255, 196, 66, 0.28);
}

.bag-item.material {
  border-color: rgba(93, 205, 142, 0.72);
}

.item-art {
  display: block;
  width: 44px;
  height: 44px;
  border: 2px solid rgba(255, 255, 255, 0.56);
  border-radius: 8px;
  box-shadow: 0 8px 14px rgba(0, 0, 0, 0.38);
}

.item-art.pill-low {
  background:
    radial-gradient(circle at 50% 50%, #fff9d8 0 12%, #7a22ff 13% 24%, transparent 25%),
    conic-gradient(#7f32ff, #ff70e6, #f9e45b, #7f32ff);
}

.item-art.pill-mid {
  background:
    radial-gradient(circle at 50% 50%, #fff 0 11%, #3b1aa8 12% 23%, transparent 24%),
    conic-gradient(#ffca3a, #7a36ff, #2ae1ff, #ffca3a);
}

.item-art.hp-pill {
  background:
    radial-gradient(circle at 50% 50%, #fff3f3 0 14%, #d82d3d 15% 28%, transparent 29%),
    conic-gradient(#ff8791, #9d101c, #ffd4d4, #ff8791);
}

.item-art.mp-pill {
  background:
    radial-gradient(circle at 50% 50%, #ecfbff 0 14%, #2373ff 15% 28%, transparent 29%),
    conic-gradient(#72e6ff, #265cff, #e4f9ff, #72e6ff);
}

.item-art.stealth-pill {
  background:
    radial-gradient(circle at 50% 50%, #ecfff6 0 12%, #32c987 13% 25%, transparent 26%),
    radial-gradient(circle at 36% 36%, rgba(255, 255, 255, 0.9) 0 8%, transparent 9%),
    conic-gradient(#143323, #62f0a3, #d5fff0, #143323);
}

.item-art.stealth-talisman {
  background:
    linear-gradient(90deg, transparent 18%, rgba(58, 240, 160, 0.75) 19% 23%, transparent 24% 76%, rgba(58, 240, 160, 0.75) 77% 81%, transparent 82%),
    radial-gradient(circle at 50% 36%, rgba(232, 255, 242, 0.92) 0 9%, transparent 10%),
    linear-gradient(180deg, #efffe9 0 18%, #17482c 19% 76%, #95ffd0 77% 100%);
}

.item-art.five-elements-pill {
  background:
    radial-gradient(circle at 50% 50%, #fff7cf 0 10%, transparent 11%),
    conic-gradient(#ffd76d, #54e88c, #55cfff, #8d6bff, #f15b45, #ffd76d);
}

.item-art.tuvi-pill {
  background:
    radial-gradient(circle at 50% 50%, #fff7bd 0 18%, transparent 19%),
    conic-gradient(#0ddcff, #315fff, #ffe566, #0ddcff);
}

.item-art.herb10 {
  background:
    radial-gradient(ellipse at 46% 70%, #16461d 0 28%, transparent 30%),
    radial-gradient(ellipse at 36% 38%, #8dff9a 0 22%, transparent 24%),
    radial-gradient(ellipse at 63% 36%, #55d97c 0 20%, transparent 22%),
    linear-gradient(145deg, #1d3b2b, #b7ffb8);
}

.item-art.water10 {
  background:
    radial-gradient(circle at 50% 42%, #e7fbff 0 16%, transparent 17%),
    linear-gradient(160deg, #d8f8ff, #1789ff 52%, #0b2b6e);
}

.item-art.fire-talisman {
  background:
    radial-gradient(circle at 50% 50%, #fff4a1 0 12%, #ef3129 13% 31%, transparent 32%),
    conic-gradient(#ffd76d, #e8352e, #34130e, #ffd76d);
}

.item-art.protect-talisman {
  background:
    radial-gradient(circle at 50% 36%, rgba(255, 255, 255, 0.95) 0 8%, transparent 9%),
    linear-gradient(90deg, transparent 23%, rgba(95, 210, 255, 0.75) 24% 28%, transparent 29% 71%, rgba(255, 220, 105, 0.75) 72% 76%, transparent 77%),
    linear-gradient(180deg, #fff4bd 0 16%, #234b86 17% 72%, #f1c35b 73% 100%);
}

.item-art.seed-herb10 {
  background:
    radial-gradient(circle at 50% 54%, #ffe7a0 0 13%, #9c6a24 14% 28%, transparent 29%),
    radial-gradient(ellipse at 34% 34%, #9bff84 0 18%, transparent 20%),
    radial-gradient(ellipse at 66% 36%, #4edf69 0 16%, transparent 18%),
    linear-gradient(145deg, #153421, #6fb65a 58%, #2d5b31);
}

.item-art.beast-hide {
  background:
    radial-gradient(ellipse at 50% 46%, #ffe0a3 0 18%, transparent 19%),
    linear-gradient(145deg, #7b4b25, #d4a064 55%, #4b2b18);
}

.item-art.beast-blood {
  background:
    radial-gradient(circle at 50% 34%, #ffe8e0 0 10%, transparent 11%),
    radial-gradient(ellipse at 50% 62%, #ff4d43 0 24%, transparent 25%),
    linear-gradient(180deg, #301111, #801b1b 56%, #ffd0a0);
}

.item-art.ore10 {
  background:
    radial-gradient(circle at 38% 36%, #d6fff9 0 12%, transparent 13%),
    linear-gradient(145deg, #5b7380, #172f3d 55%, #b8e9e5);
}

.item-art.wood10 {
  background:
    linear-gradient(90deg, transparent 32%, rgba(111, 68, 22, 0.85) 33% 65%, transparent 66%),
    linear-gradient(145deg, #7ed38c, #315e25 52%, #d5bd74);
}

.item-art.beast-crystal {
  background:
    radial-gradient(circle at 50% 50%, #fff 0 11%, #5bf7ff 12% 25%, transparent 26%),
    conic-gradient(#59eaff, #6738ff, #ff67d8, #59eaff);
}

.item-art.five-elements-fruit {
  background:
    radial-gradient(circle at 50% 45%, #fff6c2 0 12%, transparent 13%),
    radial-gradient(ellipse at 50% 58%, #f3c845 0 26%, transparent 28%),
    conic-gradient(#e84b37, #f3d04b, #58d875, #4fc8ff, #8d64ff, #e84b37);
}

.item-art.ginseng1000 {
  background:
    radial-gradient(ellipse at 50% 34%, #fff1c9 0 14%, transparent 15%),
    linear-gradient(90deg, transparent 26%, #d9b06f 27% 38%, transparent 39% 61%, #d9b06f 62% 73%, transparent 74%),
    radial-gradient(ellipse at 50% 64%, #c99a56 0 24%, transparent 25%),
    linear-gradient(145deg, #4b3018, #f3d093 58%, #7a4c1e);
}

.item-art.iron-sword {
  background:
    radial-gradient(circle at 35% 24%, rgba(255, 255, 255, 0.22), transparent 24%),
    url("assets/sprites/icons/equipment-basic/kiem-sat.webp") center / 88% 88% no-repeat,
    linear-gradient(145deg, #263243, #0d1118 55%, #b7c2d2);
}

.item-art.cloth-robe {
  background:
    radial-gradient(circle at 35% 24%, rgba(255, 255, 255, 0.22), transparent 24%),
    url("assets/sprites/icons/equipment-basic/ao-vai.webp") center / 88% 88% no-repeat,
    linear-gradient(160deg, #41515f, #151920 50%, #788392);
}

.item-art.cloth-pants {
  background:
    radial-gradient(circle at 35% 24%, rgba(255, 255, 255, 0.22), transparent 24%),
    url("assets/sprites/icons/equipment-basic/quan-vai.webp") center / 88% 88% no-repeat,
    linear-gradient(160deg, #3c4b58, #151a20 56%, #737f8c);
}

.item-art.cloth-boots {
  background:
    radial-gradient(circle at 35% 24%, rgba(255, 255, 255, 0.22), transparent 24%),
    url("assets/sprites/icons/equipment-basic/giay-vai.webp") center / 88% 88% no-repeat,
    linear-gradient(160deg, #31414d, #121820 58%, #6f7c88);
}

.item-art.thanh-phong-kiem {
  background:
    radial-gradient(circle at 34% 22%, rgba(255, 255, 255, 0.26), transparent 25%),
    url("assets/sprites/icons/equipment-lingqi-rank1/thanh-phong-kiem.webp") center / 88% 88% no-repeat,
    linear-gradient(145deg, #24344f, #090d16 58%, #b9d8ff);
}

.item-art.thanh-van-dao-bao {
  background:
    radial-gradient(circle at 34% 22%, rgba(255, 255, 255, 0.24), transparent 26%),
    url("assets/sprites/icons/equipment-lingqi-rank1/thanh-van-dao-bao.webp") center / 88% 88% no-repeat,
    linear-gradient(145deg, #173f3c, #071210 58%, #8ef5dd);
}

.item-art.luu-van-linh-kho {
  background:
    radial-gradient(circle at 34% 22%, rgba(255, 255, 255, 0.24), transparent 26%),
    url("assets/sprites/icons/equipment-lingqi-rank1/luu-van-linh-kho.webp") center / 88% 88% no-repeat,
    linear-gradient(145deg, #283555, #090b15 58%, #96bbff);
}

.item-art.truc-phong-bo-ngoa {
  background:
    radial-gradient(circle at 34% 22%, rgba(255, 255, 255, 0.22), transparent 26%),
    url("assets/sprites/icons/equipment-lingqi-rank1/truc-phong-bo-ngoa.webp") center / 88% 88% no-repeat,
    linear-gradient(145deg, #3b2c4d, #110915 58%, #d2a4ff);
}

.item-qty {
  position: absolute;
  right: 7px;
  bottom: 7px;
  min-width: 27px;
  border-radius: 999px;
  padding: 2px 6px;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 900;
  text-align: center;
  background: rgba(0, 0, 0, 0.82);
}

.empty-bag {
  grid-column: 1 / -1;
  min-height: 120px;
  display: grid;
  place-items: center;
  border: 1px dashed rgba(113, 151, 219, 0.38);
  border-radius: 8px;
  color: #9eb5dc;
  font-weight: 900;
}

.item-detail {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 18px;
  z-index: 30;
  display: grid;
  grid-template-columns: 62px 1fr;
  gap: 10px 12px;
  border: 1px solid rgba(255, 215, 114, 0.48);
  border-radius: 8px;
  padding: 14px;
  color: #ecf3ff;
  background: rgba(11, 22, 42, 0.98);
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.62);
}

.detail-art {
  width: 58px;
  height: 58px;
}

.item-detail h3,
.item-detail p {
  margin: 0;
}

.item-detail h3 {
  color: #ffe19a;
  font-size: 1rem;
}

.item-detail p {
  color: #9ec1ff;
  font-size: 0.78rem;
  font-weight: 900;
}

.item-detail dl {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 7px 10px;
  margin: 0;
  font-size: 0.82rem;
}

.item-detail dt {
  color: #9ec1ff;
  font-weight: 900;
}

.item-detail dd {
  margin: 0;
  color: #f4f7ff;
}

.close-detail-button {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(255, 231, 156, 0.34);
  border-radius: 50%;
  color: #ffe8ab;
  background: rgba(255, 255, 255, 0.06);
}

.use-item-button {
  grid-column: 1 / -1;
  min-height: 38px;
  border: 1px solid rgba(255, 222, 143, 0.58);
  border-radius: 8px;
  color: #1a1007;
  font-weight: 900;
  background: linear-gradient(180deg, #fff2a3, #e79a30);
}

.use-item-button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.character-panel {
  position: absolute;
  inset: 0;
  z-index: 17;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(3, 8, 16, 0.1), rgba(3, 8, 16, 0.38) 58%, rgba(3, 6, 9, 0.86) 100%),
    url("assets/maps/character-status-sect-hall.webp"),
    linear-gradient(180deg, rgba(5, 14, 28, 0.98), rgba(3, 8, 17, 0.95));
  background-position: center;
  background-size: cover;
}

.character-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 12% 16%, rgba(255, 255, 255, 0.7) 0 1px, transparent 2px),
    radial-gradient(circle at 70% 12%, rgba(255, 255, 255, 0.54) 0 1px, transparent 2px),
    radial-gradient(circle at 86% 42%, rgba(255, 255, 255, 0.5) 0 1px, transparent 2px),
    radial-gradient(circle at 38% 58%, rgba(255, 255, 255, 0.48) 0 1px, transparent 2px),
    radial-gradient(circle at 50% 58%, rgba(255, 210, 104, 0.16), transparent 9rem);
  opacity: 0.5;
}

.character-header {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: 48px 1fr 34px;
  gap: 9px;
  align-items: center;
  min-height: 70px;
  padding: 9px 12px;
}

.character-header h2,
.character-header p {
  margin: 0;
}

.character-header h2 {
  color: #fff0bd;
  font-size: 1.05rem;
  line-height: 1.1;
}

.character-header p {
  color: #ffd16e;
  font-size: 0.75rem;
  font-weight: 900;
}

.character-side-menu {
  position: absolute;
  z-index: 6;
  left: 10px;
  top: 82px;
  display: grid;
  gap: 12px;
  width: 54px;
}

.character-side-menu button {
  display: grid;
  justify-items: center;
  gap: 4px;
  border: 0;
  color: #e6d2aa;
  background: transparent;
  padding: 0;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.9);
}

.character-side-menu small {
  font-size: 0.62rem;
  font-weight: 900;
  line-height: 1.05;
}

.character-menu-icon {
  position: relative;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 231, 156, 0.6);
  border-radius: 50%;
  background: rgba(25, 18, 12, 0.82);
}

.character-menu-icon::before,
.character-menu-icon::after {
  content: "";
  position: absolute;
  display: block;
}

.book::before {
  left: 8px;
  top: 10px;
  width: 20px;
  height: 15px;
  border: 2px solid currentColor;
  border-radius: 3px;
}

.book::after {
  left: 17px;
  top: 10px;
  width: 2px;
  height: 15px;
  background: currentColor;
}

.equip::before {
  left: 13px;
  top: 7px;
  width: 11px;
  height: 23px;
  border: 2px solid currentColor;
  border-radius: 7px 7px 3px 3px;
}

.skill::before {
  left: 9px;
  top: 9px;
  width: 18px;
  height: 18px;
  border: 2px solid currentColor;
  transform: rotate(45deg);
}

.chest::before {
  left: 8px;
  top: 13px;
  width: 20px;
  height: 14px;
  border: 2px solid currentColor;
  border-radius: 3px;
}

.chest::after {
  left: 13px;
  top: 9px;
  width: 10px;
  height: 6px;
  border: 2px solid currentColor;
  border-bottom: 0;
  border-radius: 7px 7px 0 0;
}

.gear::before {
  left: 8px;
  top: 8px;
  width: 20px;
  height: 20px;
  border: 2px dotted currentColor;
  border-radius: 50%;
}

.gear::after {
  left: 15px;
  top: 15px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.character-stage {
  position: absolute;
  inset: 78px 58px 144px 58px;
  z-index: 2;
  display: grid;
  place-items: end center;
}

.character-art {
  width: min(128%, 470px);
  max-width: none;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 22px 42px rgba(0, 0, 0, 0.66));
}

.standing-character-art {
  width: min(150%, 460px);
  max-height: 98%;
  object-position: center bottom;
  transform: translateY(18px) scale(1.08);
  transform-origin: center bottom;
  filter:
    drop-shadow(0 24px 30px rgba(0, 0, 0, 0.82))
    drop-shadow(0 0 20px rgba(148, 184, 229, 0.18));
}

.five-elements-button {
  position: absolute;
  z-index: 4;
  left: 50%;
  top: 8px;
  width: 132px;
  height: 132px;
  border: 0;
  padding: 0;
  background: transparent;
  transform: translateX(-50%);
}

.five-elements-mark {
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0.92;
  filter:
    drop-shadow(0 0 16px rgba(255, 218, 116, 0.38))
    drop-shadow(0 8px 20px rgba(0, 0, 0, 0.5));
  animation: five-elements-float 3.2s ease-in-out infinite;
}

.five-elements-button:hover .five-elements-mark {
  opacity: 1;
  filter:
    drop-shadow(0 0 20px rgba(255, 225, 121, 0.6))
    drop-shadow(0 8px 20px rgba(0, 0, 0, 0.5));
}

@keyframes five-elements-float {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }

  50% {
    transform: translateY(-6px) scale(1.03);
  }
}

.equipment-slots {
  position: absolute;
  z-index: 7;
  top: 88px;
  right: 11px;
  display: grid;
  gap: 10px;
  width: 64px;
}

.equipment-slots button {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 4px;
  min-height: 76px;
  border: 1px solid rgba(160, 99, 255, 0.86);
  border-radius: 8px;
  color: #ffe8b6;
  padding: 6px 4px;
  background: rgba(14, 13, 28, 0.86);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 0 14px rgba(129, 67, 255, 0.28);
}

.equipment-slots strong {
  font-size: 0.58rem;
  line-height: 1.05;
}

.equipment-art {
  position: relative;
  display: block;
  width: 44px;
  height: 44px;
  border: 2px solid rgba(255, 231, 156, 0.58);
  border-radius: 8px;
}

.equipment-art.weapon {
  background:
    radial-gradient(circle at 35% 24%, rgba(255, 255, 255, 0.2), transparent 24%),
    url("assets/sprites/icons/equipment-basic/kiem-sat.webp") center / 86% 86% no-repeat,
    linear-gradient(145deg, #263243, #0d1118 55%, #b7c2d2);
}

.equipment-art.robe {
  background:
    radial-gradient(circle at 35% 24%, rgba(255, 255, 255, 0.2), transparent 24%),
    url("assets/sprites/icons/equipment-basic/ao-vai.webp") center / 86% 86% no-repeat,
    linear-gradient(160deg, #41515f, #151920 50%, #788392);
}

.equipment-art.pants {
  background:
    radial-gradient(circle at 35% 24%, rgba(255, 255, 255, 0.2), transparent 24%),
    url("assets/sprites/icons/equipment-basic/quan-vai.webp") center / 86% 86% no-repeat,
    linear-gradient(160deg, #3c4b58, #151a20 56%, #737f8c);
}

.equipment-art.boots {
  background:
    radial-gradient(circle at 35% 24%, rgba(255, 255, 255, 0.2), transparent 24%),
    url("assets/sprites/icons/equipment-basic/giay-vai.webp") center / 86% 86% no-repeat,
    linear-gradient(160deg, #31414d, #121820 58%, #6f7c88);
}

.equipment-slots button.equipped {
  border-color: rgba(255, 215, 114, 0.9);
  background: rgba(28, 19, 9, 0.9);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 0 16px rgba(255, 190, 73, 0.3);
}

.equipment-slots .item-art {
  width: 44px;
  height: 44px;
}

.mail-panel,
.technique-panel,
.equipment-picker,
.five-elements-panel {
  position: absolute;
  z-index: 13;
  left: 70px;
  right: 78px;
  top: 84px;
  max-height: calc(100% - 220px);
  overflow-y: auto;
  border: 1px solid rgba(255, 222, 143, 0.42);
  border-radius: 8px;
  padding: 9px;
  color: #f5ecd7;
  background: rgba(8, 13, 24, 0.96);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.58);
}

.mail-panel header,
.technique-panel header,
.equipment-picker header,
.five-elements-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 9px;
  color: #ffe6a4;
  font-size: 0.86rem;
}

.mail-panel header button,
.technique-panel header button,
.equipment-picker header button,
.five-elements-panel header button {
  width: 28px;
  height: 28px;
  border: 1px solid rgba(255, 231, 156, 0.34);
  border-radius: 50%;
  color: #ffe8ab;
  background: rgba(255, 255, 255, 0.07);
}

.mail-list,
.technique-list,
.equipment-picker-grid {
  display: grid;
  gap: 8px;
}

.mail-card,
.technique-card {
  display: grid;
  gap: 7px;
  border: 1px solid rgba(116, 207, 255, 0.3);
  border-radius: 8px;
  padding: 9px;
  background: rgba(15, 30, 52, 0.84);
}

.mail-card.claimed {
  opacity: 0.68;
}

.mail-card h3,
.mail-card p,
.technique-card h3,
.technique-card p,
.technique-card small,
.empty-mail,
.empty-equipment {
  margin: 0;
}

.mail-card h3,
.technique-card h3 {
  color: #ffe6a4;
  font-size: 0.84rem;
}

.mail-card p,
.technique-card small {
  color: #d8e6ff;
  font-size: 0.72rem;
  line-height: 1.35;
}

.mail-card small,
.technique-card p {
  color: #95ffb4;
  font-size: 0.68rem;
  font-weight: 900;
}

.mail-card button,
.technique-card button,
.equipment-confirm button {
  min-height: 34px;
  border: 0;
  border-radius: 8px;
  color: #1b1105;
  font-weight: 900;
  background: linear-gradient(180deg, #fff0a8, #e59a2e);
}

.mail-card button:disabled,
.technique-card button:disabled {
  color: #c9c1ad;
  background: rgba(255, 255, 255, 0.12);
}

.technique-card.locked {
  opacity: 0.58;
}

.equipment-picker-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.equipment-choice {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 5px;
  min-height: 112px;
  border: 1px solid rgba(113, 151, 219, 0.66);
  border-radius: 8px;
  padding: 8px 5px;
  color: #ecf3ff;
  background: rgba(18, 34, 64, 0.86);
}

.equipment-choice.active {
  border-color: #ffd772;
  box-shadow: 0 0 14px rgba(255, 215, 114, 0.24);
}

.equipment-choice strong {
  font-size: 0.68rem;
  line-height: 1.1;
}

.equipment-choice small {
  color: #9dffb1;
  font-size: 0.64rem;
  font-weight: 900;
}

.equipment-confirm {
  display: grid;
  gap: 8px;
  margin-top: 9px;
  border: 1px solid rgba(255, 215, 114, 0.36);
  border-radius: 8px;
  padding: 9px;
  background: rgba(0, 0, 0, 0.28);
}

.equipment-confirm p {
  margin: 0;
  color: #fff3db;
  font-size: 0.74rem;
  line-height: 1.35;
}

.five-elements-panel {
  inset: 0;
  z-index: 24;
  max-height: none;
  overflow-y: auto;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 10px;
  padding: 14px;
  border: 0;
  border-radius: 0;
  background:
    radial-gradient(circle at 50% 20%, rgba(255, 213, 103, 0.2), transparent 9rem),
    radial-gradient(circle at 24% 54%, rgba(94, 255, 163, 0.15), transparent 7rem),
    radial-gradient(circle at 76% 52%, rgba(85, 195, 255, 0.14), transparent 7rem),
    linear-gradient(180deg, rgba(7, 11, 20, 0.98), rgba(10, 16, 28, 0.98));
}

.five-elements-panel > header {
  margin: 0;
  color: #ffeac0;
  font-size: 1rem;
}

.five-elements-hero {
  display: grid;
  grid-template-columns: 108px 1fr;
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(255, 221, 129, 0.32);
  border-radius: 8px;
  padding: 10px;
  background: rgba(13, 18, 31, 0.78);
}

.five-elements-hero img {
  width: 108px;
  height: 108px;
  object-fit: contain;
  filter: drop-shadow(0 0 16px rgba(255, 222, 120, 0.38));
}

.five-elements-hero h3,
.five-elements-hero p,
.five-elements-upgrade p {
  margin: 0;
}

.five-elements-hero h3 {
  color: #ffe8ac;
  font-size: 0.95rem;
  line-height: 1.28;
}

.five-elements-hero p {
  margin-top: 6px;
  color: #d7e5ff;
  font-size: 0.72rem;
  line-height: 1.35;
}

.five-elements-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-content: start;
  gap: 6px;
}

.five-element-card {
  display: grid;
  align-content: start;
  gap: 3px;
  min-height: 82px;
  border: 1px solid color-mix(in srgb, var(--element-color) 74%, transparent);
  border-radius: 7px;
  padding: 7px 5px;
  background:
    radial-gradient(circle at 74% 20%, color-mix(in srgb, var(--element-color) 34%, transparent), transparent 2.3rem),
    rgba(13, 24, 42, 0.84);
}

.five-element-card span {
  color: #fff4d2;
  font-size: 0.66rem;
  font-weight: 900;
}

.five-element-card strong {
  color: var(--element-color);
  font-size: 1.08rem;
  line-height: 1;
}

.five-element-card small {
  color: #d8e7ff;
  font-size: 0.53rem;
  line-height: 1.18;
  font-weight: 900;
}

.five-element-card em {
  color: #eef5ff;
  font-size: 0.51rem;
  font-style: normal;
  font-weight: 900;
  line-height: 1.15;
}

.five-element-card.locked {
  opacity: 0.62;
  border-style: dashed;
  filter: grayscale(0.42);
}

.five-elements-upgrade {
  display: grid;
  gap: 9px;
  border: 1px solid rgba(255, 221, 129, 0.36);
  border-radius: 8px;
  padding: 10px;
  background: rgba(17, 17, 27, 0.88);
}

.five-elements-upgrade div {
  display: grid;
  gap: 4px;
}

.five-elements-upgrade strong {
  color: #ffe8ad;
  font-size: 0.86rem;
}

.five-elements-upgrade span,
.five-elements-upgrade p {
  color: #d9e7ff;
  font-size: 0.72rem;
  font-weight: 800;
}

.five-elements-upgrade button {
  min-height: 38px;
  border: 0;
  border-radius: 8px;
  color: #211207;
  font-weight: 900;
  background: linear-gradient(180deg, #fff0a8, #e89b2d);
}

.five-elements-upgrade button:disabled {
  color: rgba(255, 238, 196, 0.6);
  background: rgba(255, 255, 255, 0.1);
}

.empty-mail,
.empty-equipment {
  min-height: 74px;
  display: grid;
  place-items: center;
  border: 1px dashed rgba(113, 151, 219, 0.38);
  border-radius: 8px;
  color: #aac4e9;
  font-size: 0.74rem;
  font-weight: 900;
  text-align: center;
}

.mail-panel {
  inset: 0;
  left: 0;
  right: 0;
  top: 0;
  z-index: 24;
  display: grid;
  grid-template-rows: auto 1fr;
  max-height: none;
  overflow: hidden;
  padding: 14px;
  border: 0;
  border-radius: 0;
  background:
    linear-gradient(180deg, rgba(5, 10, 16, 0.35), rgba(5, 9, 13, 0.82)),
    radial-gradient(circle at 50% 20%, rgba(113, 174, 216, 0.22), transparent 14rem),
    linear-gradient(135deg, #0a1423, #0b0f16 62%, #101827);
}

.mail-panel::before {
  content: "";
  position: absolute;
  inset: 54px 0 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(151, 183, 198, 0.08) 0 2px, transparent 2px 54px),
    radial-gradient(circle at 18% 35%, rgba(153, 255, 226, 0.18), transparent 4rem),
    radial-gradient(circle at 82% 30%, rgba(165, 135, 255, 0.18), transparent 4rem);
  opacity: 0.78;
}

.mail-panel > header {
  position: relative;
  z-index: 2;
  min-height: 40px;
  margin: 0 0 10px;
  padding: 0;
  color: #ffeac0;
  font-size: 1rem;
}

.mail-panel > header strong {
  font-size: 1.05rem;
}

.mail-list {
  position: relative;
  z-index: 2;
  overflow-y: auto;
  padding-bottom: 18px;
}

.mail-box {
  overflow: hidden;
  border: 1px solid rgba(102, 139, 205, 0.56);
  border-radius: 8px;
  background: rgba(9, 20, 38, 0.88);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.35);
}

.mail-box-title {
  min-height: 40px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border-bottom: 1px solid rgba(102, 139, 205, 0.54);
  color: #dfe9ff;
  font-size: 0.83rem;
  font-weight: 900;
  background: rgba(24, 45, 84, 0.78);
}

.mail-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  color: #f6d48f;
  font-size: 0.82rem;
  font-weight: 900;
}

.mail-toolbar button {
  min-height: 34px;
  border: 0;
  border-radius: 8px;
  padding: 0 10px;
  color: #ffe2a4;
  font-weight: 900;
  background: rgba(255, 255, 255, 0.08);
}

.mail-toolbar button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.mail-title-list {
  display: grid;
  gap: 7px;
  padding: 0 12px 12px;
}

.mail-title-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  min-height: 42px;
  border: 1px solid rgba(116, 154, 224, 0.34);
  border-radius: 8px;
  padding: 0 10px;
  color: #ecf4ff;
  text-align: left;
  background: rgba(9, 18, 34, 0.74);
}

.mail-title-row.active {
  border-color: #ffd772;
  background: rgba(32, 38, 63, 0.96);
}

.mail-title-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.78rem;
  font-weight: 900;
}

.mail-title-row small {
  color: #9dffb1;
  font-size: 0.66rem;
  font-weight: 900;
}

.mail-detail-card {
  display: grid;
  gap: 10px;
  margin: 0 12px 12px;
  border: 1px solid rgba(255, 215, 114, 0.34);
  border-radius: 8px;
  padding: 11px;
  background: rgba(0, 0, 0, 0.25);
}

.mail-detail-card h3,
.mail-detail-card p,
.mail-no-reward {
  margin: 0;
}

.mail-detail-card h3 {
  color: #ffe7a4;
  font-size: 0.9rem;
}

.mail-detail-card p {
  color: #d9e7ff;
  font-size: 0.78rem;
  line-height: 1.45;
}

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

.mail-reward-item {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  gap: 7px;
  align-items: center;
  min-height: 46px;
  border: 1px solid rgba(113, 151, 219, 0.42);
  border-radius: 8px;
  padding: 6px;
  background: rgba(15, 30, 52, 0.72);
}

.mail-reward-item .item-art {
  width: 34px;
  height: 34px;
}

.mail-reward-item strong {
  color: #f5f8ff;
  font-size: 0.68rem;
  line-height: 1.1;
}

.mail-reward-item small {
  color: #9dffb1;
  font-size: 0.64rem;
  font-weight: 900;
}

.mail-no-reward {
  grid-column: 1 / -1;
  color: #aac4e9;
  font-size: 0.72rem;
  font-weight: 900;
}

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

.mail-detail-actions button {
  min-height: 36px;
  border: 0;
  border-radius: 8px;
  color: #1b1105;
  font-weight: 900;
  background: linear-gradient(180deg, #fff0a8, #e59a2e);
}

.mail-detail-actions button:only-child {
  grid-column: 1 / -1;
}

.mail-detail-actions .mail-delete-button {
  color: #ffe1e3;
  background: linear-gradient(180deg, #88353d, #4c1419);
}

.mail-box .empty-mail {
  margin: 0 12px 14px;
}

.character-stats {
  position: absolute;
  z-index: 8;
  left: 0;
  right: 0;
  bottom: 76px;
  display: grid;
  gap: 7px;
  min-height: 122px;
  padding: 10px 14px;
  background: linear-gradient(180deg, rgba(9, 8, 7, 0.62), rgba(11, 8, 6, 0.9));
}

.combat-stats {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

.combat-stats span {
  min-height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  padding: 0 10px;
  color: #ffe8b6;
  font-size: 0.78rem;
  font-weight: 900;
  background: rgba(0, 0, 0, 0.38);
}

.stat-bar {
  position: relative;
  height: 22px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.stat-bar label,
.stat-bar strong {
  position: absolute;
  z-index: 2;
  top: 2px;
  color: #fff3db;
  font-size: 0.72rem;
  font-weight: 900;
  text-shadow: 0 1px 4px #000;
}

.stat-bar label {
  left: 8px;
}

.stat-bar strong {
  right: 8px;
}

.hp-fill,
.mana-fill {
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.hp-fill {
  background: linear-gradient(90deg, #df3636, #ff6961);
}

.mana-fill {
  background: linear-gradient(90deg, #5ebfff, #91e8ff);
  width: 100%;
}

.realm-panel {
  position: absolute;
  inset: 0;
  z-index: 16;
  overflow: hidden;
  color: #f1f8ff;
  background:
    radial-gradient(circle at 70% 28%, rgba(115, 221, 255, 0.18), transparent 13rem),
    linear-gradient(180deg, #071722, #07100f 70%, #091611);
}

.realm-header {
  position: relative;
  z-index: 8;
  display: grid;
  grid-template-columns: 1fr 112px 74px 34px;
  gap: 7px;
  align-items: center;
  min-height: 52px;
  padding: 8px;
  background: linear-gradient(180deg, rgba(2, 9, 12, 0.94), rgba(2, 9, 12, 0.46));
}

.realm-header h2,
.realm-header p,
.realm-objectives h3,
.realm-player-list h3 {
  margin: 0;
}

.realm-header h2 {
  color: #fff0b9;
  font-size: 0.88rem;
  line-height: 1.1;
}

.realm-header p {
  color: #d4ffe4;
  font-size: 0.7rem;
  font-weight: 900;
}

.realm-header select {
  min-height: 34px;
  border-radius: 999px;
  padding-inline: 8px;
  color: #fff3c8;
  font-size: 0.68rem;
  font-weight: 900;
  background: rgba(0, 0, 0, 0.5);
}

.realm-header select:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.realm-objectives,
.realm-player-list {
  position: absolute;
  z-index: 7;
  top: 54px;
  border: 1px solid rgba(105, 255, 177, 0.28);
  border-radius: 8px;
  padding: 8px;
  background: rgba(7, 18, 10, 0.68);
  backdrop-filter: blur(3px);
}

.realm-objectives {
  left: 8px;
  width: 132px;
}

.realm-player-list {
  right: 8px;
  width: 122px;
}

.realm-objectives h3,
.realm-player-list h3 {
  color: #ffe4a4;
  font-size: 0.75rem;
}

.realm-player-list p {
  margin: 8px 0;
  color: #d6ecff;
  font-size: 0.65rem;
  line-height: 1.3;
}

.realm-targets {
  display: grid;
  gap: 5px;
  margin-top: 7px;
}

.realm-targets button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 25px;
  border: 1px solid rgba(107, 229, 153, 0.42);
  border-radius: 5px;
  color: #d9ffd7;
  font-size: 0.65rem;
  font-weight: 900;
  background: rgba(0, 0, 0, 0.28);
}

.realm-targets button.active {
  border-color: #ff6b70;
  color: #ffd5d5;
  background: rgba(92, 18, 20, 0.74);
}

.realm-targets button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.realm-mini-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
}

.realm-mini-stats span {
  display: grid;
  place-items: center;
  min-height: 32px;
  border: 1px solid rgba(255, 232, 159, 0.34);
  border-radius: 7px;
  color: #fff5cf;
  font-size: 0.63rem;
  font-weight: 900;
  background: rgba(0, 0, 0, 0.38);
}

.realm-stage {
  position: absolute;
  inset: 0 0 76px;
  z-index: 1;
}

.realm-backdrop {
  position: absolute;
  inset: 0;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 68% 34%, #e7f4ff 0 18px, transparent 19px),
    radial-gradient(circle at 46% 30%, rgba(92, 249, 255, 0.34), transparent 4px),
    radial-gradient(circle at 54% 44%, rgba(92, 249, 255, 0.3), transparent 3px),
    linear-gradient(120deg, transparent 0 44%, rgba(52, 209, 214, 0.18) 45% 49%, transparent 50%),
    linear-gradient(180deg, #073040 0, #0a242d 42%, #12281d 72%, #0c140d 100%);
}

.realm-backdrop.has-map-image {
  background:
    linear-gradient(180deg, rgba(4, 8, 12, 0.1) 0%, rgba(3, 7, 10, 0.12) 54%, rgba(3, 7, 10, 0.48) 100%),
    var(--realm-map-image);
  background-position: center;
  background-size: cover;
}

.realm-backdrop::before,
.realm-backdrop::after {
  content: "";
  position: absolute;
  bottom: 75px;
  width: 210px;
  height: 560px;
  background:
    linear-gradient(130deg, transparent 35%, rgba(30, 111, 108, 0.5) 36% 38%, transparent 39%),
    linear-gradient(165deg, #09272a, #174f4e 52%, #071718);
  clip-path: polygon(38% 0, 100% 0, 82% 100%, 0 100%);
  opacity: 0.94;
  z-index: 0;
}

.realm-backdrop.has-map-image::before,
.realm-backdrop.has-map-image::after {
  display: none;
}

.realm-backdrop::before {
  left: -58px;
}

.realm-backdrop::after {
  right: -60px;
  transform: scaleX(-1);
}

.realm-moon {
  position: absolute;
  z-index: 1;
  right: 95px;
  top: 196px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #dff1ff;
  box-shadow: 0 0 26px rgba(201, 241, 255, 0.72);
}

.realm-waterfall {
  position: absolute;
  z-index: 1;
  left: 47%;
  top: 54px;
  width: 78px;
  height: 548px;
  border-radius: 50% 50% 20px 20px;
  background:
    linear-gradient(90deg, transparent 0 18%, rgba(188, 255, 255, 0.34) 20% 34%, rgba(80, 234, 255, 0.18) 35% 58%, rgba(235, 255, 255, 0.46) 60% 72%, transparent 74%),
    linear-gradient(180deg, rgba(180, 255, 255, 0.05), rgba(159, 245, 255, 0.58), rgba(159, 245, 255, 0.06));
  filter: blur(0.3px);
  transform: translateX(-50%);
}

.realm-backdrop.has-map-image .realm-moon,
.realm-backdrop.has-map-image .realm-waterfall {
  display: none;
}

.realm-player-sprite {
  position: absolute;
  z-index: 3;
  left: 54px;
  bottom: 238px;
  width: 86px;
  height: 92px;
  background:
    radial-gradient(circle at 36% 28%, #ffe1cc 0 8%, transparent 9%),
    radial-gradient(ellipse at 58% 48%, #e8fff1 0 24%, transparent 25%),
    linear-gradient(140deg, transparent 42%, #74e7d5 43% 50%, transparent 51%),
    linear-gradient(160deg, transparent 12%, #e6fff4 13% 48%, #56c4b8 49% 70%, transparent 71%);
  clip-path: polygon(45% 0, 68% 15%, 88% 52%, 78% 100%, 20% 100%, 10% 52%, 28% 14%);
  transform: scale(0.9);
}

.realm-player-sprite.has-sprite {
  left: 12px;
  bottom: 190px;
  width: 236px;
  height: 236px;
  background-color: transparent;
  background-image: var(--player-frame);
  background-position: center bottom;
  background-repeat: no-repeat;
  background-size: contain;
  clip-path: none;
  filter: drop-shadow(0 16px 18px rgba(0, 0, 0, 0.58));
  image-rendering: auto;
  pointer-events: none;
  transform: none;
}

.realm-player-sprite.has-sprite[data-animation="idle"] {
  animation: realm-player-breathe 1.6s ease-in-out infinite;
}

.realm-player-sprite.has-sprite[data-animation="attack"] {
  animation: realm-player-attack 0.48s ease-out 1;
}

@keyframes realm-player-breathe {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-3px);
  }
}

@keyframes realm-player-attack {
  0% {
    transform: translateX(0) scale(1);
  }

  45% {
    transform: translateX(16px) scale(1.03);
  }

  100% {
    transform: translateX(0) scale(1);
  }
}

.realm-enemy {
  position: absolute;
  z-index: 3;
  right: 56px;
  bottom: 232px;
  width: 116px;
  height: 150px;
  filter: drop-shadow(0 16px 20px rgba(0, 0, 0, 0.52));
}

.realm-enemy::before {
  content: "";
  position: absolute;
  left: 25px;
  right: 25px;
  bottom: 10px;
  height: 106px;
  border: 3px solid rgba(255, 204, 67, 0.78);
  border-radius: 44% 48% 28% 28%;
  background:
    radial-gradient(circle at 42% 34%, #3b2112 0 5%, transparent 6%),
    radial-gradient(circle at 60% 34%, #3b2112 0 5%, transparent 6%),
    linear-gradient(160deg, #d6aa2f, #956d16 62%, #5b3912);
}

.realm-enemy::after {
  content: "";
  position: absolute;
  left: 5px;
  right: 5px;
  top: 0;
  height: 84px;
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 18% 40%, transparent 0 33%, #b68d1c 34% 39%, transparent 40%),
    radial-gradient(ellipse at 82% 40%, transparent 0 33%, #b68d1c 34% 39%, transparent 40%),
    repeating-conic-gradient(from 0deg, transparent 0 15deg, #b68d1c 16deg 20deg, transparent 21deg 36deg);
}

.realm-enemy.elite {
  width: 140px;
  height: 180px;
  right: 46px;
  bottom: 218px;
}

.realm-enemy.king {
  width: 174px;
  height: 220px;
  right: 26px;
  bottom: 200px;
}

.realm-enemy.has-sprite {
  width: 184px;
  height: 184px;
  right: 42px;
  bottom: 210px;
  background-image: var(--enemy-frame);
  background-position: center bottom;
  background-repeat: no-repeat;
  background-size: contain;
  pointer-events: none;
}

.realm-enemy.has-sprite::before,
.realm-enemy.has-sprite::after {
  display: none;
}

.realm-enemy.has-sprite.elite {
  width: 222px;
  height: 222px;
  right: 26px;
  bottom: 196px;
}

.realm-enemy.has-sprite.king {
  width: 262px;
  height: 262px;
  right: -2px;
  bottom: 178px;
}

.realm-enemy.respawning {
  opacity: 0;
  transform: translateY(16px) scale(0.92);
  animation: none !important;
  transition: opacity 0.24s ease, transform 0.24s ease;
}

.realm-enemy.has-sprite[data-animation="idle"] {
  animation: realm-enemy-breathe 1.4s ease-in-out infinite;
}

.realm-enemy.has-sprite[data-animation="attack"] {
  animation: realm-enemy-attack 0.36s ease-out 1;
}

.realm-enemy.has-sprite[data-animation="hit"] {
  animation: realm-enemy-hit 0.26s ease-out 1;
}

@keyframes realm-enemy-breathe {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }

  50% {
    transform: translateY(-4px) scale(1.01);
  }
}

@keyframes realm-enemy-attack {
  0% {
    transform: translateX(0) scale(1);
  }

  48% {
    transform: translateX(-18px) scale(1.04);
  }

  100% {
    transform: translateX(0) scale(1);
  }
}

@keyframes realm-enemy-hit {
  0% {
    filter: drop-shadow(0 16px 20px rgba(0, 0, 0, 0.52)) brightness(1.3);
    transform: translateX(0);
  }

  55% {
    filter: drop-shadow(0 16px 20px rgba(0, 0, 0, 0.52)) brightness(1.65);
    transform: translateX(14px);
  }

  100% {
    filter: drop-shadow(0 16px 20px rgba(0, 0, 0, 0.52)) brightness(1);
    transform: translateX(0);
  }
}

.realm-actions {
  position: absolute;
  z-index: 8;
  left: 10px;
  bottom: 202px;
  display: grid;
  gap: 8px;
  width: 54px;
}

.realm-consumable-slots {
  display: grid;
  gap: 7px;
}

.realm-consumable-slot {
  position: relative;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 219, 132, 0.72);
  border-radius: 8px;
  color: #ffe6a8;
  background: rgba(37, 24, 12, 0.76);
  box-shadow: 0 0 14px rgba(255, 198, 86, 0.16);
}

.realm-consumable-slot.empty::before {
  content: "+";
  font-size: 1.15rem;
  font-weight: 900;
}

.realm-consumable-slot .item-art {
  width: 34px;
  height: 34px;
  border-radius: 7px;
}

.realm-consumable-slot small {
  position: absolute;
  right: -4px;
  bottom: -4px;
  min-width: 23px;
  border-radius: 999px;
  padding: 1px 5px;
  color: #fff;
  font-size: 0.58rem;
  font-weight: 900;
  background: rgba(0, 0, 0, 0.88);
}

.realm-atk-button,
.realm-skill-slot {
  width: 48px;
  height: 48px;
  border: 1px solid rgba(163, 255, 177, 0.68);
  border-radius: 8px;
  color: #dbffd9;
  font-weight: 900;
  background: rgba(18, 54, 35, 0.72);
  box-shadow: 0 0 14px rgba(63, 255, 140, 0.18);
}

.realm-atk-button:disabled {
  cursor: not-allowed;
  border-color: rgba(255, 92, 99, 0.62);
  color: #ffd5d8;
  background: rgba(73, 23, 25, 0.82);
}

.realm-skill-slot {
  color: #a8f6ff;
  font-size: 0.62rem;
  background: rgba(9, 29, 42, 0.78);
}

.realm-skill-slot span,
.realm-skill-slot small {
  display: block;
  line-height: 1.05;
}

.realm-skill-slot small {
  margin-top: 2px;
  color: #ffd982;
  font-size: 0.54rem;
}

.realm-skill-slot:disabled {
  cursor: not-allowed;
  border-color: rgba(120, 149, 170, 0.42);
  color: #7895aa;
  background: rgba(16, 24, 31, 0.82);
  box-shadow: none;
}

.realm-quick-picker {
  position: absolute;
  z-index: 12;
  left: 70px;
  bottom: 260px;
  width: 230px;
  border: 1px solid rgba(255, 222, 143, 0.48);
  border-radius: 8px;
  padding: 9px;
  background: rgba(12, 20, 26, 0.94);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.55);
}

.realm-quick-picker header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  color: #fff0be;
  font-size: 0.78rem;
}

.realm-quick-picker header button {
  width: 26px;
  height: 26px;
  border: 1px solid rgba(255, 232, 170, 0.34);
  border-radius: 50%;
  color: #ffe8ab;
  background: rgba(255, 255, 255, 0.07);
}

.realm-quick-picker-list {
  display: grid;
  gap: 7px;
}

.realm-quick-picker-list button {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  gap: 8px;
  align-items: center;
  min-height: 48px;
  border: 1px solid rgba(116, 207, 255, 0.34);
  border-radius: 8px;
  padding: 6px;
  color: #ecf7ff;
  text-align: left;
  background: rgba(14, 40, 57, 0.82);
}

.realm-quick-picker-list .item-art {
  width: 34px;
  height: 34px;
}

.realm-quick-picker-list strong,
.realm-quick-picker-list small {
  display: block;
}

.realm-quick-picker-list strong {
  color: #ffe9ae;
  font-size: 0.72rem;
}

.realm-quick-picker-list small {
  color: #a9dfff;
  font-size: 0.6rem;
  line-height: 1.25;
}

.realm-quick-picker-list em {
  color: #9dffb1;
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 900;
}

.realm-quick-empty {
  margin: 0;
  min-height: 42px;
  display: grid;
  place-items: center;
  border: 1px dashed rgba(255, 219, 132, 0.32);
  border-radius: 8px;
  color: #ffdca4;
  font-size: 0.68rem;
  font-weight: 900;
  text-align: center;
}

.realm-combat-panel {
  position: absolute;
  z-index: 8;
  left: 0;
  right: 0;
  bottom: 76px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  padding: 8px 12px;
  min-height: 100px;
  background: linear-gradient(180deg, rgba(5, 8, 9, 0.48), rgba(4, 8, 8, 0.92));
}

.combat-side {
  display: grid;
  align-content: start;
  gap: 5px;
  min-width: 0;
}

.combat-side strong {
  overflow: hidden;
  color: #fff0b7;
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.combat-side span,
.combat-side small {
  color: #c8ecff;
  font-size: 0.62rem;
  font-weight: 900;
}

.enemy-side {
  text-align: right;
}

.combat-bar {
  position: relative;
  height: 15px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.combat-bar span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 100%;
  border-radius: inherit;
}

.combat-bar b {
  position: relative;
  z-index: 2;
  display: block;
  color: #fff;
  font-size: 0.58rem;
  line-height: 15px;
  text-align: center;
  text-shadow: 0 1px 3px #000;
}

.hp-combat span {
  background: linear-gradient(90deg, #ffc945, #f0a51e);
}

.mp-combat span {
  background: linear-gradient(90deg, #2f96e8, #78d7ff);
}

.enemy-combat span {
  background: linear-gradient(90deg, #54e763, #30bd43);
}

.modal-layer {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 18px;
  background:
    radial-gradient(circle at 50% 42%, rgba(246, 207, 116, 0.15), transparent 22rem),
    rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
}

.modal-card {
  width: min(430px, 100%);
  border: 1px solid rgba(246, 207, 116, 0.34);
  border-radius: 8px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.07), transparent 32%),
    var(--panel);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.52);
  padding: 24px;
}

.spirit-modal {
  justify-items: center;
  text-align: center;
}

.stone-button {
  position: relative;
  width: 190px;
  height: 190px;
  border: 0;
  background: transparent;
  isolation: isolate;
}

.stone-button::before {
  content: "";
  position: absolute;
  inset: 22px;
  z-index: -2;
  border-radius: 50%;
  background: conic-gradient(#ff355d, #ffb84a, #f7ff54, #49df7b, #45dfff, #6046ff, #d85dff, #ff355d);
  filter: blur(22px);
  opacity: 0.32;
  transition:
    opacity 0.35s ease,
    transform 0.35s ease;
}

.stone-button.awakened::before,
.stone-button.measuring::before {
  opacity: 0.82;
  transform: scale(1.16);
}

.seven-stone {
  position: absolute;
  inset: 28px;
  display: block;
  border: 2px solid rgba(255, 255, 255, 0.68);
  border-radius: 42% 58% 47% 53% / 52% 42% 58% 48%;
  background:
    radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.95), transparent 12%),
    conic-gradient(from 24deg, #fe4b5a, #ffc64d, #e8ff58, #43dc7c, #48ddff, #5e5cff, #d45dff, #fe4b5a);
  box-shadow:
    inset -16px -20px 32px rgba(0, 0, 0, 0.22),
    inset 12px 10px 28px rgba(255, 255, 255, 0.24),
    0 16px 34px rgba(0, 0, 0, 0.42);
  transform: rotate(-8deg);
}

.stone-button.measuring .seven-stone {
  animation: stonePulse 0.95s ease-in-out infinite;
}

.light-beam {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: -1;
  width: 13px;
  height: 178px;
  border-radius: 999px;
  opacity: 0;
  transform-origin: center bottom;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), transparent);
  filter: blur(2px);
}

.stone-button.measuring .light-beam,
.stone-button.awakened .light-beam {
  opacity: 0.8;
  animation: beamSpin 1.2s linear infinite;
}

.beam-one {
  background: linear-gradient(180deg, #ff486c, transparent);
}

.beam-two {
  background: linear-gradient(180deg, #58e7ff, transparent);
  animation-delay: -0.4s !important;
}

.beam-three {
  background: linear-gradient(180deg, #fff25d, transparent);
  animation-delay: -0.8s !important;
}

.root-result {
  min-height: 54px;
  color: #ffe8a8;
  font-weight: 900;
  line-height: 1.45;
}

.story-modal p {
  margin-bottom: 8px;
}

.breakthrough-pill-box {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(246, 207, 116, 0.26);
  border-radius: 8px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.24);
}

.breakthrough-pill-box span {
  color: #ffe3a2;
  font-size: 0.86rem;
  font-weight: 800;
}

.foundation-choice-box {
  display: grid;
  gap: 9px;
  max-height: 52vh;
  overflow-y: auto;
  padding-right: 2px;
}

.foundation-choice {
  display: grid;
  gap: 5px;
  width: 100%;
  border: 1px solid rgba(246, 207, 116, 0.28);
  border-radius: 8px;
  padding: 10px;
  color: #f9ead0;
  text-align: left;
  background:
    radial-gradient(circle at 100% 0, rgba(246, 207, 116, 0.15), transparent 6rem),
    rgba(0, 0, 0, 0.28);
}

.foundation-choice.selected {
  border-color: #ffe48f;
  background:
    radial-gradient(circle at 100% 0, rgba(246, 207, 116, 0.28), transparent 6rem),
    rgba(61, 40, 14, 0.72);
  box-shadow: 0 0 0 1px rgba(255, 229, 146, 0.2);
}

.foundation-choice:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.foundation-choice strong {
  color: #ffe9aa;
  font-size: 0.92rem;
}

.foundation-choice span,
.foundation-choice small,
.foundation-choice em {
  font-size: 0.74rem;
  line-height: 1.35;
}

.foundation-choice small {
  color: #c8e7ff;
  font-weight: 800;
}

.foundation-choice em {
  color: #92ffa7;
  font-style: normal;
  font-weight: 900;
}

.foundation-choice:disabled em {
  color: #ffb1a4;
}

.pill-stepper,
.modal-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pill-stepper button {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 231, 156, 0.44);
  border-radius: 50%;
  color: #fff4cf;
  font-size: 1.35rem;
  line-height: 1;
  background: rgba(22, 16, 11, 0.9);
}

.pill-stepper strong {
  min-width: 34px;
  text-align: center;
  color: #90ffa7;
  font-size: 1.2rem;
}

.modal-actions {
  justify-content: stretch;
}

.modal-actions button {
  flex: 1 1 0;
}

.secondary-action {
  min-height: 46px;
  border: 1px solid rgba(246, 207, 116, 0.28);
  border-radius: 8px;
  color: #ffe9b8;
  font-weight: 900;
  background: rgba(255, 255, 255, 0.06);
}

@keyframes stonePulse {
  0%,
  100% {
    transform: rotate(-8deg) scale(1);
  }
  50% {
    transform: rotate(4deg) scale(1.06);
  }
}

@keyframes beamSpin {
  from {
    transform: translate(-50%, -100%) rotate(0deg);
  }
  to {
    transform: translate(-50%, -100%) rotate(360deg);
  }
}

@media (max-width: 380px) {
  .realm-header {
    grid-template-columns: 1fr 100px 66px 32px;
    gap: 5px;
    min-height: 50px;
    padding: 7px 6px;
  }

  .realm-header h2 {
    font-size: 0.76rem;
  }

  .realm-header p {
    display: none;
  }

  .realm-objectives,
  .realm-player-list {
    top: 52px;
  }

  .realm-header select {
    font-size: 0.61rem;
    padding-inline: 6px;
  }

  .top-hud {
    grid-template-columns: 46px 1fr;
    padding-inline: 10px;
  }

  .avatar-ring {
    width: 42px;
    height: 42px;
  }

  .side-left {
    left: 8px;
  }

  .side-right {
    right: 8px;
  }

  .side-actions button {
    width: 50px;
  }

  .round-icon {
    width: 38px;
    height: 38px;
  }

  .cultivator-stage {
    padding-inline: 60px;
  }

  .bottom-nav {
    padding-inline: 4px;
  }

  .nav-icon {
    width: 32px;
    height: 32px;
  }
}
