:root {
  --bg: #121715;
  --panel: #1b241f;
  --panel-2: #202b25;
  --panel-3: #26352e;
  --line: rgba(231, 220, 177, 0.16);
  --text: #f4efd9;
  --muted: #a8b5a6;
  --gold: #f3c760;
  --gold-2: #ffe69d;
  --jade: #57d6b1;
  --red: #ed6a5a;
  --cyan: #73d2de;
  --violet: #b69cff;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.36);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 12%, rgba(237, 106, 90, 0.2), transparent 26%),
    radial-gradient(circle at 90% 18%, rgba(87, 214, 177, 0.16), transparent 26%),
    linear-gradient(135deg, #111513 0%, #162019 52%, #201813 100%);
  display: grid;
  place-items: stretch center;
  overflow: hidden;
}

button {
  color: inherit;
  font: inherit;
}

.auth-gate {
  position: fixed;
  z-index: 30;
  inset: 0;
  display: none;
  place-items: center;
  padding: max(16px, env(safe-area-inset-top)) 12px max(16px, env(safe-area-inset-bottom));
  background:
    radial-gradient(circle at 18% 12%, rgba(243, 199, 96, 0.18), transparent 25%),
    radial-gradient(circle at 88% 20%, rgba(87, 214, 177, 0.16), transparent 25%),
    linear-gradient(145deg, rgba(9, 13, 12, 0.92), rgba(19, 27, 23, 0.96));
  backdrop-filter: blur(12px);
}

.auth-gate.show {
  display: grid;
}

.auth-card {
  width: min(420px, 100%);
  max-height: min(760px, calc(100vh - 24px));
  max-height: min(760px, calc(100dvh - 24px));
  overflow: auto;
  border: 1px solid rgba(243, 199, 96, 0.28);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), transparent 30%),
    rgba(20, 28, 24, 0.96);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.5);
}

.auth-head {
  padding: 18px 16px 12px;
  border-bottom: 1px solid rgba(243, 199, 96, 0.16);
  background:
    linear-gradient(135deg, rgba(243, 199, 96, 0.16), rgba(87, 214, 177, 0.08)),
    rgba(255, 255, 255, 0.025);
}

.auth-head span {
  color: var(--jade);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.auth-head strong {
  display: block;
  margin-top: 4px;
  color: var(--gold-2);
  font-size: 24px;
  line-height: 1.15;
}

.auth-head p,
.auth-message {
  margin: 8px 0 0;
  color: rgba(244, 239, 217, 0.76);
  font-size: 12px;
  line-height: 1.55;
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 12px 12px 0;
}

.auth-tabs button,
.auth-form button,
.auth-root,
.auth-avatar {
  min-height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
}

.auth-tabs button.active,
.auth-root.active,
.auth-avatar.active {
  color: var(--gold-2);
  border-color: rgba(243, 199, 96, 0.55);
  background: rgba(243, 199, 96, 0.13);
  box-shadow: 0 0 18px rgba(243, 199, 96, 0.12);
}

.auth-form {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.auth-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.auth-form input {
  width: 100%;
  min-height: 38px;
  padding: 0 11px;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  outline: none;
  background: rgba(4, 7, 6, 0.38);
}

.auth-form input:focus {
  border-color: rgba(87, 214, 177, 0.58);
  box-shadow: 0 0 0 2px rgba(87, 214, 177, 0.1);
}

.auth-primary {
  color: #15110a;
  font-weight: 900;
  border-color: rgba(255, 230, 157, 0.75) !important;
  background: linear-gradient(180deg, #ffe69d, #f3c760) !important;
}

.auth-taptap {
  color: #15110a;
  font-weight: 900;
  border-color: rgba(79, 230, 194, 0.72) !important;
  background:
    radial-gradient(circle at 20% 18%, rgba(255, 255, 255, 0.52), transparent 20%),
    linear-gradient(180deg, #73f3d0, #24c9a4) !important;
}

.auth-ghost {
  color: var(--muted);
}

.auth-safe-note,
.auth-identity-hint {
  margin: 0;
  padding: 10px 11px;
  border: 1px solid rgba(87, 214, 177, 0.18);
  border-radius: 8px;
  color: rgba(244, 239, 217, 0.72);
  background: rgba(87, 214, 177, 0.07);
  font-size: 12px;
  line-height: 1.55;
}

.auth-identity-hint {
  display: grid;
  gap: 4px;
}

.auth-identity-hint strong {
  color: var(--jade);
  font-size: 12px;
}

.auth-identity-hint span {
  color: rgba(244, 239, 217, 0.74);
}

.auth-message.error {
  color: #ff9d8f;
}

.auth-message.success {
  color: var(--jade);
}

.auth-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--gold-2);
  font-size: 12px;
  font-weight: 900;
}

.auth-section-title small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
}

.auth-section-title button {
  min-height: 28px;
  padding: 0 9px;
  color: var(--jade);
}

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

.auth-avatar {
  min-height: 78px;
  padding: 6px 4px;
  display: grid;
  place-items: center;
  gap: 4px;
}

.auth-avatar i {
  width: 42px;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: var(--auth-avatar) center/cover no-repeat, rgba(255, 255, 255, 0.08);
}

.auth-avatar span {
  max-width: 100%;
  overflow: hidden;
  color: rgba(244, 239, 217, 0.82);
  font-size: 10px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.auth-root-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

.auth-root {
  min-height: 72px;
  padding: 6px 5px;
  display: grid;
  align-content: start;
  gap: 4px;
  text-align: left;
}

.auth-root strong {
  color: inherit;
  font-size: 12px;
}

.auth-root span {
  display: -webkit-box;
  overflow: hidden;
  color: rgba(244, 239, 217, 0.68);
  font-size: 9px;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.auth-root-preview {
  display: grid;
  gap: 4px;
  padding: 9px;
  border: 1px solid rgba(87, 214, 177, 0.24);
  border-radius: 9px;
  background: rgba(87, 214, 177, 0.07);
}

.auth-root-preview strong {
  color: var(--jade);
  font-size: 12px;
}

.auth-root-preview span {
  color: rgba(244, 239, 217, 0.82);
  font-size: 11px;
  line-height: 1.45;
}

.app-shell {
  width: min(100vw, 600px);
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 22%),
    var(--bg);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.09);
  display: grid;
  grid-template-rows: 32px minmax(238px, 2.15fr) minmax(122px, 1.05fr) minmax(154px, 1.45fr) 56px;
  position: relative;
  overflow: hidden;
}

.app-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(to bottom, transparent, #000 16%, #000 86%, transparent);
}

.top-bar,
.battlefield,
.choice-panel,
.log-panel,
.bottom-nav {
  position: relative;
  z-index: 1;
  border-bottom: 1px solid var(--line);
}

.top-bar {
  min-height: 32px;
  padding: max(3px, env(safe-area-inset-top)) 8px 5px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  background: linear-gradient(180deg, rgba(243, 199, 96, 0.11), rgba(27, 36, 31, 0.64));
  overflow: hidden;
}

.identity {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex: 1 1 auto;
}

.portrait,
.avatar-ring {
  --hp: 100%;
  flex: 0 0 auto;
  width: 54px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  position: relative;
  background:
    radial-gradient(circle at 50% 50%, #1a211d 0 54%, transparent 55%),
    conic-gradient(var(--red) var(--hp), rgba(255, 255, 255, 0.12) 0);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.08), 0 0 22px rgba(243, 199, 96, 0.18);
}

.portrait::before,
.avatar-ring::before {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 28% 24%, rgba(255, 230, 157, 0.8), transparent 14%),
    radial-gradient(circle at 50% 55%, rgba(87, 214, 177, 0.2), transparent 45%),
    linear-gradient(145deg, #344036, #151b17);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.portrait span,
.avatar-ring span {
  position: relative;
  z-index: 1;
  color: var(--gold-2);
  font-weight: 800;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.66);
}

.player-portrait {
  width: 58px;
}

.identity-text {
  min-width: 0;
  width: 100%;
}

.name-row,
.realm-row {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.name-row {
  flex-wrap: nowrap;
  overflow: hidden;
  line-height: 1;
}

.name-row strong {
  flex: 0 1 auto;
  font-size: 13px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.name-row span,
.realm-row span,
#pauseButton,
.tag {
  border: 1px solid rgba(243, 199, 96, 0.24);
  color: var(--gold-2);
  background: rgba(243, 199, 96, 0.1);
  border-radius: 999px;
  padding: 3px 8px;
  line-height: 1.2;
  white-space: nowrap;
}

.name-row span,
.realm-row span {
  border: 0;
  background: transparent;
  color: var(--gold-2);
  padding: 0;
  font-size: 11px;
}

.realm-row span {
  color: var(--muted);
}

.realm-row {
  display: none;
}

.resource-strip {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 0;
  flex: 0 0 auto;
  font-size: 11px;
}

.resource-strip span {
  color: var(--gold-2);
  white-space: nowrap;
}

.cultivation-track {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 2px;
  height: 2px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  overflow: hidden;
}

.cultivation-track i {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #57d6b1, #f3c760, #ffe69d);
  box-shadow: 0 0 8px rgba(243, 199, 96, 0.55);
  transition: width 0.2s ease;
}

.battlefield {
  padding: 7px 9px 8px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(16, 26, 21, 0.15), rgba(17, 31, 24, 0.84)),
    radial-gradient(circle at 50% 110%, rgba(87, 214, 177, 0.18), transparent 46%);
}

.section-heading,
.drawer-header,
.tabs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.battle-arena {
  height: calc(100% - 48px);
  min-height: 286px;
  position: relative;
  margin-top: 0;
  border-radius: 8px;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 85%, rgba(243, 199, 96, 0.16), transparent 38%),
    radial-gradient(circle at 22% 28%, rgba(87, 214, 177, 0.12), transparent 22%),
    linear-gradient(180deg, rgba(16, 24, 19, 0.62), rgba(20, 35, 25, 0.88));
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.battle-arena::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, transparent 0 48%, rgba(255, 255, 255, 0.04) 49% 51%, transparent 52%),
    radial-gradient(ellipse at 50% 100%, rgba(0, 0, 0, 0.26), transparent 48%);
  background-size: 54px 54px, auto;
  opacity: 0.72;
}

.battle-arena::after {
  content: "";
  position: absolute;
  left: 5%;
  right: 5%;
  bottom: 12%;
  height: 2px;
  border-radius: 50%;
  background: linear-gradient(90deg, transparent, rgba(243, 199, 96, 0.28), rgba(87, 214, 177, 0.22), transparent);
  filter: blur(0.4px);
}

.city-scene {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 230, 157, 0.08), transparent 40%),
    radial-gradient(ellipse at 52% 72%, rgba(243, 199, 96, 0.14), transparent 46%);
}

.town-map-hud {
  position: absolute;
  z-index: 6;
  left: 8px;
  top: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: calc(100% - 16px);
  padding: 5px 6px;
  border: 1px solid rgba(243, 199, 96, 0.24);
  border-radius: 999px;
  background: rgba(8, 12, 10, 0.68);
  box-shadow: 0 0 18px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(4px);
}

.town-map-hud span {
  max-width: 126px;
  overflow: hidden;
  color: var(--gold-2);
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.town-map-button {
  min-height: 24px;
  padding: 2px 8px;
  border: 1px solid rgba(182, 156, 255, 0.34);
  border-radius: 999px;
  color: #efe7ff;
  background: rgba(182, 156, 255, 0.13);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.town-label {
  position: absolute;
  min-width: 54px;
  text-align: center;
  border: 1px solid rgba(255, 230, 157, 0.24);
  background: rgba(13, 17, 15, 0.5);
  color: #f6eecf;
  border-radius: 6px;
  padding: 5px 7px;
  font-size: 12px;
}

.town-label.gate {
  left: 42%;
  bottom: 20%;
}

.town-npc {
  position: absolute;
  z-index: 2;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 230, 157, 0.28);
  border-radius: 50%;
  padding: 0;
  color: #fff2bf;
  background:
    radial-gradient(circle at 34% 24%, rgba(255, 230, 157, 0.58), transparent 16%),
    radial-gradient(circle at 50% 52%, rgba(87, 214, 177, 0.14), transparent 48%),
    conic-gradient(from 180deg, rgba(243, 199, 96, 0.42), rgba(87, 214, 177, 0.22), rgba(243, 199, 96, 0.42)),
    rgba(11, 15, 13, 0.62);
  box-shadow: inset 0 0 0 6px rgba(9, 14, 12, 0.78), 0 0 18px rgba(243, 199, 96, 0.16);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
  isolation: isolate;
}

.town-npc::before {
  content: "";
  position: absolute;
  inset: 6px;
  z-index: 0;
  border-radius: 50%;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(0, 0, 0, 0.18)),
    var(--npc-avatar),
    radial-gradient(circle at 50% 55%, rgba(87, 214, 177, 0.22), transparent 48%);
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(255, 255, 255, 0.13);
  box-shadow: inset 0 -12px 18px rgba(0, 0, 0, 0.32);
}

.town-npc::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(circle at 50% 92%, rgba(0, 0, 0, 0.56), transparent 38%);
}

.town-npc strong {
  position: relative;
  z-index: 2;
  max-width: 46px;
  font-size: 11px;
  line-height: 1.05;
  text-align: center;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.72);
}

.town-npc small {
  position: absolute;
  left: 50%;
  bottom: -18px;
  transform: translateX(-50%);
  z-index: 2;
  min-width: 42px;
  padding: 2px 5px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(8, 12, 10, 0.78);
  font-size: 10px;
  line-height: 1;
  white-space: nowrap;
}

.town-npc:active {
  transform: scale(0.96);
}

.town-npc:hover {
  border-color: rgba(243, 199, 96, 0.52);
  box-shadow: inset 0 0 0 6px rgba(9, 14, 12, 0.74), 0 0 24px rgba(243, 199, 96, 0.24);
}

.town-npc.male {
  border-color: rgba(115, 210, 222, 0.34);
  box-shadow: inset 0 0 0 6px rgba(9, 14, 12, 0.76), 0 0 18px rgba(115, 210, 222, 0.14);
}

.town-npc.female {
  border-color: rgba(255, 135, 154, 0.34);
  box-shadow: inset 0 0 0 6px rgba(9, 14, 12, 0.76), 0 0 18px rgba(255, 135, 154, 0.14);
}

.town-npc.male small {
  color: #a8e7f0;
}

.town-npc.female small {
  color: #ffc0cb;
}

.npc-forge {
  --npc-avatar: url("./assets/img/avatars/npc_forge.webp");
  left: 7%;
  top: 18%;
}

.npc-enhance {
  --npc-avatar: url("./assets/img/avatars/npc_enhance.webp");
  left: 27%;
  top: 34%;
}

.npc-alchemy {
  --npc-avatar: url("./assets/img/avatars/npc_alchemy.webp");
  right: 8%;
  top: 19%;
}

.npc-rune {
  --npc-avatar: url("./assets/img/avatars/npc_rune.webp");
  right: 25%;
  top: 42%;
}

.npc-shop {
  --npc-avatar: url("./assets/img/avatars/npc_shop.webp");
  left: 10%;
  bottom: 22%;
}

.npc-stall {
  --npc-avatar: url("./assets/img/avatars/npc_stall.webp");
  left: 31%;
  bottom: 18%;
}

.npc-tea {
  --npc-avatar: url("./assets/img/avatars/npc_tea.webp");
  right: 9%;
  bottom: 22%;
}

.npc-commission {
  --npc-avatar: url("./assets/img/avatars/npc_enhance.webp");
  left: 48%;
  bottom: 23%;
  border-color: rgba(87, 214, 177, 0.4);
  box-shadow: inset 0 0 0 6px rgba(9, 14, 12, 0.76), 0 0 22px rgba(87, 214, 177, 0.2);
}

.npc-commission small {
  color: #bdf4de;
}

.npc-inn {
  --npc-avatar: url("./assets/img/avatars/npc_inn.webp");
  left: 40%;
  top: 17%;
}

.town-light {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ffe69d;
  box-shadow: 0 0 22px rgba(243, 199, 96, 0.7);
  animation: townLight 2s ease-in-out infinite;
}

.town-light.one {
  left: 18%;
  top: 56%;
}

.town-light.two {
  left: 68%;
  top: 54%;
  animation-delay: 0.5s;
}

.town-light.three {
  left: 48%;
  top: 34%;
  animation-delay: 1s;
}

.battlefield:not(.city-mode) .city-scene {
  display: none;
}

.battlefield.city-mode .monster-field {
  display: none;
}

.battlefield.city-mode .player-side {
  display: none;
}

.online-player-toggle {
  position: absolute;
  z-index: 6;
  top: 8px;
  right: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 24px;
  max-width: 68px;
  padding: 3px 7px;
  border: 1px solid rgba(87, 214, 177, 0.28);
  border-radius: 999px;
  color: #dff8ec;
  background: rgba(7, 12, 10, 0.72);
  box-shadow: 0 0 18px rgba(87, 214, 177, 0.14);
  backdrop-filter: blur(4px);
  font-size: 10px;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}

.online-player-toggle.has-players {
  border-color: rgba(243, 199, 96, 0.48);
  color: var(--gold-2);
  box-shadow: 0 0 18px rgba(243, 199, 96, 0.18);
}

.online-player-toggle b {
  min-width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #1a1408;
  background: var(--gold-2);
  font-size: 10px;
}

.online-player-name {
  position: absolute;
  z-index: 5;
  transform: translate(-50%, -50%);
  display: grid;
  gap: 2px;
  justify-items: center;
  min-width: 58px;
  max-width: 92px;
  padding: 4px 7px;
  border: 1px solid rgba(87, 214, 177, 0.32);
  border-radius: 999px;
  color: #dff8ec;
  background: rgba(8, 13, 11, 0.76);
  box-shadow: 0 0 18px rgba(87, 214, 177, 0.18);
  pointer-events: auto;
}

.online-player-name strong,
.online-player-name span {
  max-width: 82px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.online-player-name strong {
  font-size: 11px;
  line-height: 1;
}

.online-player-name span {
  color: var(--muted);
  font-size: 9px;
  line-height: 1;
}

.player-inspect-modal {
  position: fixed;
  z-index: 12;
  inset: 0;
  display: none;
  place-items: center;
  padding: 14px;
  background: rgba(5, 8, 7, 0.72);
  backdrop-filter: blur(5px);
}

.player-inspect-modal.show {
  display: grid;
}

.player-inspect-card {
  position: relative;
  width: min(100%, 420px);
  max-height: calc(100dvh - 28px);
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background:
    radial-gradient(circle at 50% -8%, rgba(87, 214, 177, 0.16), transparent 34%),
    linear-gradient(180deg, #202b25, #141a16);
  box-shadow: 0 26px 90px rgba(0, 0, 0, 0.62);
}

.player-inspect-close {
  position: absolute;
  z-index: 2;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.28);
  cursor: pointer;
}

.player-inspect-body {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.inspect-title,
.inspect-head,
.online-list-row,
.inspect-stats span,
.inspect-gear {
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.045);
}

.inspect-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-radius: 10px;
  padding: 10px 12px;
}

.inspect-title strong,
.inspect-head strong,
.inspect-gear strong {
  color: var(--gold-2);
}

.inspect-title span,
.inspect-head span,
.inspect-head i,
.inspect-gear span,
.inspect-gear em,
.online-list-row em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.online-list {
  display: grid;
  gap: 7px;
}

.online-list-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 8px;
  align-items: center;
  min-height: 48px;
  padding: 8px 10px;
  border-radius: 10px;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.online-player-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 8px;
  align-items: center;
  min-width: 0;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.online-player-actions {
  grid-row: 1 / span 2;
  grid-column: 2;
  display: grid;
  gap: 5px;
  min-width: 54px;
}

.online-player-actions button,
.inspect-pk-warning button,
.dao-actions button {
  min-height: 26px;
  padding: 0 8px;
  border-radius: 999px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.065);
}

.online-player-actions button.danger,
.inspect-pk-warning button.danger {
  color: #ffb3a8;
  border-color: rgba(237, 106, 90, 0.5);
  background: rgba(126, 35, 24, 0.22);
  box-shadow: 0 0 14px rgba(237, 106, 90, 0.16);
}

.online-list-row span {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: #f4efd8;
  font-weight: 800;
}

.online-list-row em {
  grid-column: 1 / -1;
}

.online-list-row b {
  grid-row: 1;
  grid-column: 2;
  color: #9ee7cc;
  font-size: 12px;
}

.inspect-head {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  border-radius: 12px;
  padding: 10px;
}

.inspect-head > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.inspect-avatar {
  width: 62px;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(0, 0, 0, 0.2)),
    var(--inspect-avatar),
    rgba(0, 0, 0, 0.26);
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(87, 214, 177, 0.36);
  box-shadow: inset 0 0 0 5px rgba(8, 13, 11, 0.58), 0 0 20px rgba(87, 214, 177, 0.2);
}

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

.inspect-stats span {
  display: grid;
  gap: 2px;
  min-height: 42px;
  place-items: center;
  border-radius: 9px;
  color: var(--muted);
  font-size: 10px;
}

.inspect-stats b {
  color: #f4efd8;
  font-size: 13px;
}

.inspect-pk-warning {
  display: grid;
  gap: 6px;
  border: 1px solid rgba(237, 106, 90, 0.22);
  border-radius: 10px;
  padding: 9px 10px;
  background: linear-gradient(180deg, rgba(126, 35, 24, 0.18), rgba(255, 255, 255, 0.035));
}

.inspect-pk-warning strong {
  color: #ffb3a8;
}

.inspect-pk-warning span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.inspect-equipment-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.inspect-gear {
  display: grid;
  gap: 5px;
  min-height: 92px;
  border-radius: 10px;
  padding: 8px;
  overflow: hidden;
}

.inspect-gear.empty {
  opacity: 0.58;
}

.inspect-gear .slot-icon {
  width: 32px;
}

.inspect-gear strong,
.inspect-gear span,
.inspect-gear em {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.combatant,
.monster-card {
  position: relative;
}

.player-side {
  position: absolute;
  left: var(--x, 22%);
  top: var(--y, 58%);
  width: 62px;
  height: 62px;
  display: grid;
  justify-items: center;
  align-content: center;
  transform: translate3d(-50%, -50%, 0);
  z-index: 4;
  transition: left 0.18s linear, top 0.18s linear;
  will-change: left, top, transform;
  backface-visibility: hidden;
}

.avatar-ring {
  width: 58px;
}

.player-avatar {
  --avatar: url("./资源/avatars/player_male_01.webp");
  width: 58px;
  background:
    radial-gradient(circle at 50% 50%, #17211c 0 54%, transparent 55%),
    conic-gradient(#57d6b1 var(--hp), rgba(255, 255, 255, 0.13) 0);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.08), 0 0 24px rgba(87, 214, 177, 0.26);
}

.player-avatar::before {
  background:
    radial-gradient(circle at 36% 30%, rgba(255, 230, 157, 0.7), transparent 13%),
    radial-gradient(circle at 50% 58%, rgba(87, 214, 177, 0.24), transparent 45%),
    linear-gradient(145deg, #2b3a31, #121a16);
}

.player-avatar span {
  display: none;
}

.treasure-orbit {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 4;
  width: 86px;
  height: 86px;
  pointer-events: none;
  transform: translate(-50%, -50%) rotate(0deg);
  animation: treasureOrbitGuard 3.8s linear infinite;
}

.treasure-sprite {
  position: absolute;
  left: 50%;
  top: -5px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-image: var(--treasure-sprite);
  background-repeat: no-repeat;
  background-size: 200% 200%;
  background-position: 0 0;
  transform: translateX(-50%) rotate(0deg);
  mix-blend-mode: screen;
  filter: drop-shadow(0 0 9px rgba(255, 230, 157, 0.82)) drop-shadow(0 0 18px rgba(87, 214, 177, 0.42));
  animation:
    treasureSpriteFrames 0.82s steps(1, end) infinite,
    treasureSpriteGlow 1.4s ease-in-out infinite;
}

.combat-health {
  position: relative;
  width: 100%;
  height: 11px;
  border-radius: 999px;
  background: rgba(10, 10, 10, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

.combat-health i {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #57d6b1, #ffe69d);
  transition: width 0.18s ease;
}

.player-health {
  z-index: 2;
  width: 88px;
  height: 13px;
  border-color: rgba(255, 230, 157, 0.32);
  box-shadow: 0 0 22px rgba(87, 214, 177, 0.28), 0 2px 10px rgba(0, 0, 0, 0.52);
}

.combatant small,
.monster-card small {
  color: var(--muted);
  font-size: 12px;
  max-width: 84px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.monster-field {
  position: absolute;
  inset: 0;
  z-index: 3;
}

.monster-card {
  position: absolute;
  left: var(--x, 70%);
  top: var(--y, 50%);
  width: 70px;
  display: grid;
  justify-items: center;
  gap: 4px;
  transform: translate3d(-50%, -50%, 0);
  transition: left 0.18s linear, top 0.18s linear, opacity 0.18s ease;
  will-change: left, top, transform, opacity;
  backface-visibility: hidden;
}

.monster-card.defeated {
  opacity: 0;
  filter: grayscale(0.8);
  pointer-events: none;
}

.monster-avatar::before {
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 230, 157, 0.62), transparent 14%),
    radial-gradient(circle at 52% 60%, rgba(237, 106, 90, 0.28), transparent 42%),
    linear-gradient(145deg, #3d2f28, #171b18);
}

.avatar-ring.image-avatar::before,
.player-avatar::before {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(0, 0, 0, 0.2)),
    var(--avatar),
    radial-gradient(circle at 50% 58%, rgba(87, 214, 177, 0.18), transparent 48%);
  background-size: cover;
  background-position: center;
  box-shadow: inset 0 -12px 20px rgba(0, 0, 0, 0.34);
}

.avatar-ring .avatar-img {
  position: absolute;
  inset: 3px;
  z-index: 0;
  width: calc(100% - 6px);
  height: calc(100% - 6px);
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  display: block;
  pointer-events: none;
  backface-visibility: hidden;
  transform: translateZ(0);
}

.avatar-ring.has-avatar::before {
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(0, 0, 0, 0.24)),
    radial-gradient(circle at 50% 58%, rgba(87, 214, 177, 0.12), transparent 48%);
  background-size: cover;
  background-position: center;
}

.avatar-ring.has-avatar span {
  z-index: 2;
}

.avatar-ring.image-avatar span {
  min-width: 18px;
  min-height: 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(8, 12, 10, 0.72);
  border: 1px solid rgba(255, 230, 157, 0.35);
  font-size: 11px;
}

.avatar-ring.image-avatar span:empty {
  display: none;
}

.monster-card.status-root .monster-avatar {
  filter: drop-shadow(0 0 10px rgba(255, 230, 157, 0.78));
}

.monster-card.status-root .avatar-ring.image-avatar span {
  color: #241a05;
  background: linear-gradient(180deg, #fff6c8, #f3c760);
  border-color: rgba(255, 245, 190, 0.82);
  box-shadow: 0 0 14px rgba(243, 199, 96, 0.72);
}

.monster-card.status-slow .monster-avatar {
  filter: drop-shadow(0 0 10px rgba(115, 210, 222, 0.78));
}

.monster-card.status-slow .avatar-ring.image-avatar span {
  color: #06151a;
  background: linear-gradient(180deg, #d9f8ff, #73d2de);
  border-color: rgba(217, 248, 255, 0.78);
  box-shadow: 0 0 14px rgba(115, 210, 222, 0.72);
}

.monster-card.status-stun .monster-avatar,
.monster-card.status-burn .monster-avatar,
.monster-card.status-poison .monster-avatar,
.monster-card.status-bleed .monster-avatar,
.monster-card.status-weaken .monster-avatar,
.monster-card.status-vulnerable .monster-avatar {
  filter: drop-shadow(0 0 10px var(--status-glow, rgba(255, 230, 157, 0.72)));
}

.monster-card.status-stun { --status-glow: rgba(217, 248, 255, 0.82); }
.monster-card.status-burn { --status-glow: rgba(255, 110, 66, 0.8); }
.monster-card.status-poison { --status-glow: rgba(117, 224, 126, 0.76); }
.monster-card.status-bleed { --status-glow: rgba(255, 135, 154, 0.76); }
.monster-card.status-weaken { --status-glow: rgba(182, 156, 255, 0.74); }
.monster-card.status-vulnerable { --status-glow: rgba(255, 230, 157, 0.78); }

.monster-card.status-stun .avatar-ring.image-avatar span,
.monster-card.status-burn .avatar-ring.image-avatar span,
.monster-card.status-poison .avatar-ring.image-avatar span,
.monster-card.status-bleed .avatar-ring.image-avatar span,
.monster-card.status-weaken .avatar-ring.image-avatar span,
.monster-card.status-vulnerable .avatar-ring.image-avatar span {
  color: #0b1110;
  background: linear-gradient(180deg, #fff8dd, var(--status-glow, #ffe69d));
  border-color: rgba(255, 255, 255, 0.52);
  box-shadow: 0 0 14px var(--status-glow, rgba(243, 199, 96, 0.72));
}

.monster-card.status-armor .avatar-ring.image-avatar span {
  color: #fff1d1;
  background: rgba(83, 29, 18, 0.78);
  border-color: rgba(237, 106, 90, 0.64);
}

.skill-cast-row {
  height: 42px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  align-items: end;
  margin-top: 5px;
  overflow: visible;
}

.skill-chip {
  height: 31px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(0, 0, 0, 0.2);
  overflow: hidden;
  position: relative;
  display: grid;
  place-items: center;
  color: var(--gold-2);
  font-size: 13px;
  isolation: isolate;
  transition: transform 0.18s ease, height 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.skill-chip i {
  position: absolute;
  inset: auto 0 0 0;
  height: 100%;
  transform-origin: left;
  transform: scaleX(var(--ready, 0));
  background: linear-gradient(90deg, rgba(243, 199, 96, 0.24), rgba(87, 214, 177, 0.3));
  z-index: -1;
}

.skill-chip span {
  position: relative;
  z-index: 1;
  max-width: calc(100% - 10px);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.skill-chip em {
  position: absolute;
  left: 50%;
  bottom: calc(100% - 2px);
  z-index: 2;
  transform: translateX(-50%);
  min-width: max-content;
  color: #fff5be;
  font-size: 15px;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 0;
  text-shadow: 0 0 8px rgba(243, 199, 96, 0.95), 0 0 18px rgba(255, 245, 190, 0.58);
  animation: skillCastName 1.05s ease-out forwards;
}

.skill-chip.casting {
  height: 37px;
  z-index: 3;
  transform: translateY(-4px) scale(1.12);
  color: #fff9cf;
  border-color: rgba(255, 230, 157, 0.72);
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 245, 190, 0.22), transparent 58%),
    rgba(24, 20, 11, 0.78);
  box-shadow: 0 0 18px rgba(243, 199, 96, 0.45), inset 0 0 12px rgba(255, 230, 157, 0.18);
  animation: skillChipCast 1.05s ease-out forwards;
}

.skill-chip.casting span {
  font-size: 15px;
  font-weight: 900;
  text-shadow: 0 0 8px rgba(255, 245, 190, 0.78), 0 0 18px rgba(243, 199, 96, 0.48);
  animation: skillTextPulse 0.7s ease-out both;
}

.choice-panel {
  padding: 7px 10px;
  background: linear-gradient(180deg, rgba(32, 43, 37, 0.92), rgba(27, 36, 31, 0.94));
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 6px;
}

.section-heading {
  color: var(--gold-2);
  font-weight: 700;
  font-size: 13px;
}

#routeResourceButton,
#autoSettingButton,
#pauseButton,
.choice-actions button,
.tab,
.nav-button,
.drawer button,
.treasure-card button {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.07);
  min-height: 30px;
  border-radius: 7px;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

#pauseButton {
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
}

.choice-panel .section-heading {
  justify-content: flex-start;
  gap: 5px;
}

.choice-panel .section-heading > span {
  margin-right: auto;
}

#routeResourceButton,
#autoSettingButton {
  min-height: 24px;
  padding: 2px 7px;
  border-radius: 999px;
  color: var(--gold-2);
  font-size: 11px;
}

#routeResourceButton[hidden] {
  display: none;
}

.choice-actions button:active,
.nav-button:active,
.drawer button:active,
.treasure-card button:active {
  transform: scale(0.97);
}

#choiceText {
  margin: 0;
  color: #dbe5cf;
  font-size: 12px;
  line-height: 1.45;
  min-height: 0;
  overflow: auto;
  padding: 2px 1px 4px;
}

.route-signpost {
  display: grid;
  gap: 6px;
}

.route-signpost > p {
  margin: 0;
  color: rgba(244, 239, 217, 0.88);
}

.route-sign-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.route-sign-head strong {
  color: var(--gold-2);
  font-size: 12px;
}

.route-sign-head span {
  color: var(--jade);
  font-size: 10px;
  white-space: nowrap;
}

.route-sign-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}

.route-sign-card {
  display: grid;
  gap: 3px;
  min-height: 62px;
  padding: 6px;
  border: 1px solid rgba(87, 214, 177, 0.16);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.16);
}

.route-sign-card.combat {
  border-color: rgba(239, 197, 96, 0.22);
}

.route-sign-card.primary-route {
  border-color: rgba(87, 214, 177, 0.52);
  background:
    linear-gradient(135deg, rgba(87, 214, 177, 0.14), rgba(243, 199, 96, 0.06)),
    rgba(0, 0, 0, 0.18);
  box-shadow: 0 0 14px rgba(87, 214, 177, 0.1);
}

.route-sign-card.primary-route strong {
  color: var(--gold-2);
}

.route-sign-card.locked {
  opacity: 0.68;
}

.route-sign-card div {
  display: flex;
  justify-content: space-between;
  gap: 6px;
}

.route-sign-card strong {
  color: #f4efd9;
  font-size: 11px;
}

.route-sign-card span {
  color: var(--jade);
  font-size: 9.5px;
  white-space: nowrap;
}

.route-sign-card p {
  margin: 0;
  color: rgba(219, 229, 207, 0.82);
  font-size: 10px;
  line-height: 1.35;
}

.daily-guide {
  display: grid;
  gap: 5px;
  margin-top: 8px;
  padding: 7px;
  border: 1px solid rgba(243, 199, 96, 0.14);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(87, 214, 177, 0.07), transparent 42%),
    rgba(255, 255, 255, 0.035);
}

.daily-guide-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.daily-guide-head strong {
  color: var(--gold-2);
  font-size: 12px;
}

.daily-guide-head span {
  color: var(--jade);
  font-size: 10px;
  white-space: nowrap;
}

.daily-guide p {
  margin: 0;
  color: rgba(244, 239, 217, 0.9);
}

.daily-guide ul {
  display: grid;
  gap: 2px;
  margin: 0;
  padding-left: 16px;
  color: var(--muted);
}

.daily-task-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  margin-top: 2px;
}

.daily-task {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 6px;
  align-items: center;
  min-width: 0;
  padding: 5px 6px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.14);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 0.14s ease, border-color 0.14s ease, background 0.14s ease;
}

.daily-task:hover {
  border-color: rgba(243, 199, 96, 0.28);
  background: rgba(243, 199, 96, 0.055);
}

.daily-task:active {
  transform: scale(0.985);
}

.daily-task strong {
  display: block;
  color: #e8ead6;
  font-size: 11px;
}

.daily-task span {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.daily-task em {
  color: var(--gold-2);
  font-size: 10px;
  font-style: normal;
}

.daily-task i {
  grid-column: 1 / -1;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
}

.daily-task b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(87, 214, 177, 0.84), rgba(243, 199, 96, 0.9));
}

.daily-task.done {
  border-color: rgba(87, 214, 177, 0.28);
  background: rgba(87, 214, 177, 0.07);
}

.yuanhao-commission {
  display: grid;
  gap: 6px;
  margin-top: 6px;
  padding: 7px;
  border: 1px solid rgba(243, 199, 96, 0.18);
  border-radius: 8px;
  background:
    radial-gradient(circle at 100% 0, rgba(243, 199, 96, 0.13), transparent 48%),
    rgba(0, 0, 0, 0.16);
}

.yuanhao-commission.compact {
  gap: 5px;
  padding: 6px;
}

.yuanhao-commission.done {
  border-color: rgba(87, 214, 177, 0.22);
  background:
    radial-gradient(circle at 100% 0, rgba(87, 214, 177, 0.1), transparent 48%),
    rgba(0, 0, 0, 0.14);
}

.yuanhao-commission-head,
.yuanhao-commission-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.yuanhao-commission-head div {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.yuanhao-commission-head strong {
  color: var(--gold-2);
  font-size: 12px;
}

.yuanhao-commission-head span,
.yuanhao-commission-foot small {
  overflow: hidden;
  color: var(--muted);
  font-size: 9.5px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.yuanhao-commission-head em {
  color: var(--jade);
  font-size: 11px;
  font-style: normal;
  white-space: nowrap;
}

.yuanhao-commission p {
  margin: 0;
  color: rgba(244, 239, 217, 0.84);
  font-size: 10px;
  line-height: 1.4;
}

.yuanhao-commission-rows {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}

.yuanhao-commission-rows div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 6px;
  padding: 5px 6px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.035);
}

.yuanhao-commission-rows div.ok {
  border-color: rgba(87, 214, 177, 0.22);
  background: rgba(87, 214, 177, 0.06);
}

.yuanhao-commission-rows span {
  min-width: 0;
  color: #e8ead6;
  font-size: 10.5px;
}

.yuanhao-commission-rows small {
  display: block;
  overflow: hidden;
  margin-top: 1px;
  color: var(--muted);
  font-size: 8.5px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.yuanhao-commission-rows b {
  color: var(--gold-2);
  font-size: 10px;
}

.yuanhao-commission-rows i {
  grid-column: 1 / -1;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
}

.yuanhao-commission-rows em {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(87, 214, 177, 0.82), rgba(243, 199, 96, 0.9));
}

.yuanhao-commission-foot button {
  min-height: 26px;
  padding: 3px 10px;
  white-space: nowrap;
}

.search-progress {
  display: grid;
  gap: 5px;
}

.search-progress strong {
  color: var(--gold-2);
  font-size: 12px;
}

.search-progress span,
.search-progress em {
  color: var(--muted);
  font-style: normal;
}

.search-progress i {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.search-progress b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(87, 214, 177, 0.86), rgba(243, 199, 96, 0.92));
  transition: width 0.12s linear;
}

.town-wander {
  padding: 6px;
  border: 1px solid rgba(243, 199, 96, 0.12);
  border-radius: 8px;
  background: rgba(243, 199, 96, 0.045);
}

.town-wander b {
  background: linear-gradient(90deg, rgba(243, 199, 96, 0.88), rgba(181, 132, 69, 0.92));
}

.choice-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  align-self: end;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.choice-actions button {
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(243, 199, 96, 0.13), rgba(255, 255, 255, 0.05)),
    rgba(0, 0, 0, 0.12);
  padding: 0 6px;
  min-height: 26px;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.choice-actions button.primary {
  border-color: rgba(243, 199, 96, 0.45);
  color: var(--gold-2);
}

.choice-actions button.danger {
  border-color: rgba(237, 106, 90, 0.4);
  color: #ffb7ac;
}

.choice-actions button:disabled {
  opacity: 0.46;
  cursor: not-allowed;
}

.log-panel {
  background: rgba(18, 23, 21, 0.9);
  overflow: hidden;
  display: grid;
  grid-template-rows: 34px minmax(0, 1fr);
}

.tabs {
  padding: 6px 8px 0;
  justify-content: flex-start;
  gap: 5px;
}

.tab {
  min-height: 26px;
  padding: 0 10px;
  color: var(--muted);
  border-radius: 999px;
  background: transparent;
  font-size: 12px;
}

.tab.active {
  color: var(--gold-2);
  background: rgba(243, 199, 96, 0.1);
  border-color: rgba(243, 199, 96, 0.28);
}

.log-list {
  min-height: 0;
  padding: 5px 10px 10px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.log-entry {
  font-size: 12px;
  line-height: 1.45;
  color: #c8d2c2;
  display: flex;
  gap: 7px;
}

.log-entry time {
  color: rgba(244, 239, 217, 0.45);
  flex: 0 0 auto;
}

.log-entry.rare {
  color: var(--gold-2);
  text-shadow: 0 0 14px rgba(243, 199, 96, 0.24);
}

.chat-panel {
  min-height: 100%;
  display: grid;
  grid-template-rows: 28px minmax(0, 1fr) 34px;
  gap: 7px;
}

.chat-channels {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}

.chat-channels button {
  min-height: 26px;
  padding: 0 6px;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.045);
}

.chat-channels button.active {
  color: var(--gold-2);
  border-color: rgba(243, 199, 96, 0.32);
  background: rgba(243, 199, 96, 0.1);
}

.chat-thread {
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.chat-entry {
  display: grid;
  grid-template-columns: auto auto auto minmax(0, 1fr);
  gap: 5px;
  align-items: baseline;
  color: #c8d2c2;
  font-size: 12px;
  line-height: 1.35;
}

.chat-entry time {
  color: rgba(244, 239, 217, 0.42);
  font-size: 11px;
}

.chat-entry strong {
  color: var(--gold-2);
  white-space: nowrap;
}

.chat-entry em {
  color: rgba(244, 239, 217, 0.42);
  font-size: 11px;
  font-style: normal;
}

.chat-entry.self strong {
  color: var(--jade);
}

.chat-entry span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.chat-compose {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 58px;
  gap: 6px;
}

.chat-compose input {
  min-width: 0;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 0 9px;
  color: var(--text);
  background: rgba(0, 0, 0, 0.22);
  outline: none;
}

.chat-compose input:focus {
  border-color: rgba(243, 199, 96, 0.45);
  box-shadow: 0 0 14px rgba(243, 199, 96, 0.12);
}

.chat-compose button {
  min-height: 32px;
  border-radius: 8px;
}

.bottom-nav {
  padding: 6px 7px max(6px, env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 5px;
  background: rgba(10, 13, 12, 0.94);
  border-bottom: 0;
}

.nav-button {
  min-height: 42px;
  color: var(--muted);
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.nav-button.active {
  color: var(--gold-2);
  border-color: rgba(243, 199, 96, 0.35);
  background: rgba(243, 199, 96, 0.11);
}

.nav-button span {
  font-size: 12px;
  line-height: 1;
}

.drawer {
  position: fixed;
  z-index: 5;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0 auto;
  width: min(100vw, 600px);
  max-height: min(72dvh, 650px);
  transform: translateY(110%);
  background:
    linear-gradient(180deg, rgba(243, 199, 96, 0.08), transparent 22%),
    #17201b;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-bottom: 0;
  border-radius: 14px 14px 0 0;
  box-shadow: 0 -24px 80px rgba(0, 0, 0, 0.46);
  transition: none;
  overflow: hidden;
}

.drawer.open {
  transform: translateY(0);
}

.drawer.full-screen {
  top: 0;
  bottom: 0;
  height: 100dvh;
  max-height: none;
  border-radius: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.11);
}

.drawer.full-screen .drawerContent {
  max-height: calc(100dvh - 61px);
}

.drawer-header {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
}

.drawer-header button {
  width: 34px;
  min-height: 34px;
  border-radius: 50%;
  color: var(--muted);
}

.drawerContent {
  max-height: calc(min(72dvh, 650px) - 61px);
  overflow: auto;
  padding: 12px;
}

.grid-list {
  display: grid;
  gap: 9px;
}

.item-row,
.skill-row,
.gear-row,
.realm-box {
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.045);
  border-radius: 8px;
  padding: 10px;
}

.item-top,
.skill-top,
.gear-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.item-name,
.skill-name,
.gear-name {
  font-weight: 700;
}

.grade-fan {
  color: #d9ddce;
}

.grade-huang {
  color: #f3c760;
}

.grade-xuan {
  color: #73d2de;
}

.grade-di {
  color: #b69cff;
}

.grade-tian {
  color: #ff879a;
}

.item-quality-mark {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  padding: 1px 5px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 0.72em;
  font-style: normal;
  line-height: 1.35;
  opacity: 0.86;
  vertical-align: middle;
}

.item-meta,
.skill-meta,
.gear-meta,
.condition {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.row-actions {
  display: flex;
  gap: 7px;
  margin-top: 9px;
  flex-wrap: wrap;
}

.row-actions button,
.drawer .mini-button {
  min-height: 30px;
  padding: 0 10px;
  color: var(--text);
}

.row-actions button.primary,
.drawer .mini-button.primary,
.preview-actions button.primary {
  color: var(--gold-2);
  border-color: rgba(243, 199, 96, 0.36);
}

.empty-state {
  color: var(--muted);
  text-align: center;
  padding: 26px 8px;
  line-height: 1.6;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.stat-cell {
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 8px;
  display: grid;
  gap: 4px;
}

.stat-cell span {
  color: var(--muted);
  font-size: 12px;
}

.stat-cell strong {
  color: var(--gold-2);
}

.dao-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: -2px 0 12px;
}

.dao-actions button.primary {
  color: var(--gold-2);
  border-color: rgba(243, 199, 96, 0.42);
  background: rgba(243, 199, 96, 0.1);
}

.rpg-panel {
  display: grid;
  gap: 10px;
}

.resource-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.resource-line span,
.resource-chip {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.045);
  color: var(--muted);
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
}

.resource-chip {
  --chip-border: var(--grade-border, rgba(255, 255, 255, 0.1));
  --chip-glow: var(--grade-glow, rgba(255, 255, 255, 0.08));
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 25px;
  border-color: var(--chip-border);
  background:
    radial-gradient(circle at 50% -30%, var(--chip-glow), transparent 55%),
    rgba(255, 255, 255, 0.045);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.025);
  cursor: pointer;
}

.resource-chip strong {
  color: var(--text);
  font-size: 12px;
}

.resource-chip em {
  color: var(--gold-2);
  font-style: normal;
  font-size: 10px;
}

.resource-chip.active,
.resource-chip.ready {
  color: var(--gold-2);
  border-color: rgba(243, 199, 96, 0.48);
  box-shadow: 0 0 16px var(--chip-glow), inset 0 0 0 1px rgba(243, 199, 96, 0.18);
}

.resource-chip.missing {
  border-color: rgba(205, 96, 76, 0.5);
  background:
    radial-gradient(circle at 50% -30%, rgba(205, 96, 76, 0.14), transparent 55%),
    rgba(205, 96, 76, 0.055);
}

.rpg-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 128px;
  gap: 10px;
  align-items: start;
}

.bag-slots,
.skill-grid,
.gear-slot-grid {
  display: grid;
  gap: 7px;
}

.bag-slots {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.bag-layout {
  position: relative;
}

.bag-sections {
  display: grid;
  gap: 10px;
}

.bag-section {
  display: grid;
  gap: 7px;
}

.bag-filter-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
}

.bag-filter-tabs button {
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 7px;
  color: rgba(244, 239, 217, 0.82);
  background: rgba(0, 0, 0, 0.16);
  font-size: 11px;
}

.bag-filter-tabs button.active {
  color: var(--gold-2);
  border-color: rgba(243, 199, 96, 0.42);
  background: rgba(243, 199, 96, 0.09);
}

.bag-filter-tabs b {
  min-width: 16px;
  padding: 1px 5px;
  border-radius: 999px;
  color: #10130f;
  background: var(--gold-2);
  font-size: 9px;
}

.drawer.full-screen .bag-slots {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 5px;
}

.drawer.full-screen .bag-layout .item-slot {
  min-height: 42px;
  padding: 2px;
  border-radius: 6px;
}

.drawer.full-screen .bag-layout .slot-icon {
  width: 24px;
  font-size: 13px;
  border-radius: 5px;
}

.drawer.full-screen .bag-layout .slot-name {
  left: 2px;
  right: 2px;
  bottom: 2px;
  font-size: 9px;
}

.drawer.full-screen .bag-layout .slot-grade {
  top: 2px;
  right: 2px;
  min-width: 14px;
  height: 14px;
  font-size: 9px;
}

.item-frame-fan {
  --grade-border: rgba(217, 221, 206, 0.42);
  --grade-glow: rgba(217, 221, 206, 0.12);
  --grade-fill: rgba(217, 221, 206, 0.06);
}

.item-frame-huang {
  --grade-border: rgba(243, 199, 96, 0.72);
  --grade-glow: rgba(243, 199, 96, 0.22);
  --grade-fill: rgba(243, 199, 96, 0.09);
}

.item-frame-xuan {
  --grade-border: rgba(115, 210, 222, 0.82);
  --grade-glow: rgba(115, 210, 222, 0.28);
  --grade-fill: rgba(115, 210, 222, 0.1);
}

.item-frame-di {
  --grade-border: rgba(182, 156, 255, 0.86);
  --grade-glow: rgba(182, 156, 255, 0.34);
  --grade-fill: rgba(182, 156, 255, 0.11);
}

.item-frame-tian {
  --grade-border: rgba(255, 135, 154, 0.9);
  --grade-glow: rgba(255, 135, 154, 0.42);
  --grade-fill: rgba(255, 135, 154, 0.13);
}

.item-slot,
.skill-card,
.gear-slot {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(0, 0, 0, 0.08)),
    rgba(255, 255, 255, 0.035);
  border-radius: 7px;
  color: var(--text);
  position: relative;
  overflow: hidden;
}

.item-slot {
  aspect-ratio: 1;
  min-height: 54px;
  display: grid;
  place-items: center;
  padding: 4px;
}

.item-slot.has-item,
.gear-slot.has-item {
  cursor: pointer;
  border-color: var(--grade-border);
  background:
    radial-gradient(circle at 50% 28%, var(--grade-fill), transparent 56%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(0, 0, 0, 0.1)),
    rgba(255, 255, 255, 0.035);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.045), 0 0 14px var(--grade-glow);
}

.item-slot.has-item::before,
.gear-slot.has-item::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(135deg, transparent 0 34%, var(--grade-border) 48%, transparent 62%),
    radial-gradient(circle at 50% 50%, transparent 52%, var(--grade-glow) 72%, transparent 76%);
  opacity: 0.28;
}

.item-slot.item-frame-xuan::before,
.item-slot.item-frame-di::before,
.item-slot.item-frame-tian::before,
.gear-slot.item-frame-xuan::before,
.gear-slot.item-frame-di::before,
.gear-slot.item-frame-tian::before {
  animation: itemGradeSweep 2.6s linear infinite;
}

.item-slot.item-frame-di,
.item-slot.item-frame-tian,
.gear-slot.item-frame-di,
.gear-slot.item-frame-tian {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 0 18px var(--grade-glow), 0 0 30px rgba(255, 255, 255, 0.04);
}

.item-slot.item-frame-tian,
.gear-slot.item-frame-tian {
  animation: itemGradePulse 1.9s ease-in-out infinite;
}

.item-slot.active,
.skill-card.active,
.gear-slot.active {
  border-color: rgba(255, 230, 157, 0.72);
  box-shadow: 0 0 18px rgba(243, 199, 96, 0.2), inset 0 0 0 1px rgba(255, 230, 157, 0.22);
}

.item-slot.empty {
  opacity: 0.54;
}

.slot-icon {
  width: 30px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.24);
  color: var(--gold-2);
  font-weight: 800;
  font-size: 16px;
  position: relative;
  z-index: 2;
}

.slot-icon.item-image-icon,
.card-icon.item-image-icon {
  color: transparent;
  font-size: 0;
  text-shadow: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(0, 0, 0, 0.18)),
    var(--item-icon),
    rgba(0, 0, 0, 0.22);
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 -8px 12px rgba(0, 0, 0, 0.28), 0 0 10px var(--grade-glow, rgba(243, 199, 96, 0.16));
}

.slot-icon.treasure-frame-icon,
.card-icon.treasure-frame-icon {
  background-size: 100% 100%, 200% 200%, auto;
  background-position: center, 0 0, center;
  background-repeat: no-repeat;
}

.slot-name {
  position: absolute;
  left: 3px;
  right: 3px;
  bottom: 3px;
  color: rgba(244, 239, 217, 0.86);
  font-size: 10px;
  line-height: 1.1;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  z-index: 2;
}

.slot-grade {
  position: absolute;
  right: 3px;
  top: 3px;
  min-width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.44);
  font-size: 10px;
  font-weight: 800;
}

.details-panel {
  min-height: 220px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(7, 9, 8, 0.28);
  border-radius: 8px;
  padding: 10px;
  position: sticky;
  top: 0;
}

.details-panel h3 {
  margin: 0 0 6px;
  font-size: 14px;
  line-height: 1.3;
}

.details-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.details-panel .row-actions {
  margin-top: 10px;
}

.slot-count {
  position: absolute;
  top: 2px;
  right: 2px;
  z-index: 3;
  min-width: 18px;
  height: 16px;
  display: grid;
  place-items: center;
  padding: 0 4px;
  border: 1px solid rgba(0, 0, 0, 0.42);
  border-radius: 999px;
  color: #17110a;
  background: linear-gradient(180deg, #ffe69d, #f3c760);
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
}

.item-compare {
  display: grid;
  gap: 5px;
  padding: 7px;
  border: 1px solid rgba(87, 214, 177, 0.16);
  border-radius: 7px;
  background: rgba(87, 214, 177, 0.055);
}

.item-compare strong {
  color: #9effdf;
  font-size: 11px;
}

.item-compare p {
  margin: 0;
}

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

.item-compare-grid > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-width: 0;
  padding: 4px 5px;
  border-radius: 6px;
  color: rgba(244, 239, 217, 0.78);
  background: rgba(0, 0, 0, 0.14);
  font-size: 10px;
}

.item-compare .up {
  color: #9effdf;
}

.item-compare .down {
  color: #ffb3a8;
}

.item-compare .same {
  color: var(--muted);
}

.item-popover-layer {
  position: fixed;
  z-index: 8;
  inset: 0;
  display: grid;
  place-items: end center;
  padding: 12px 12px max(18px, env(safe-area-inset-bottom));
  background: rgba(6, 8, 7, 0.44);
  backdrop-filter: blur(2px);
}

.item-popover {
  width: min(90vw, 372px);
  max-height: min(64dvh, 520px);
  overflow: auto;
  position: relative;
  border: 1px solid var(--grade-border);
  border-radius: 10px;
  padding: 14px 14px 12px;
  background:
    radial-gradient(circle at 50% -10%, var(--grade-fill), transparent 38%),
    linear-gradient(180deg, rgba(36, 47, 40, 0.98), rgba(15, 20, 17, 0.98));
  box-shadow: 0 0 28px var(--grade-glow), 0 24px 70px rgba(0, 0, 0, 0.58);
}

.item-popover::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(135deg, transparent 0 42%, var(--grade-glow) 50%, transparent 58%);
  opacity: 0.28;
}

.item-popover h3,
.item-popover p,
.item-popover .row-actions {
  position: relative;
  z-index: 1;
}

.item-popover h3 {
  margin: 0 28px 7px 0;
  font-size: 16px;
}

.item-popover p {
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.item-use-advice {
  border: 1px solid rgba(249, 208, 115, 0.2);
  border-radius: 7px;
  padding: 6px 8px;
  color: #f8dc96 !important;
  background: rgba(249, 208, 115, 0.07);
}

.item-use-advice.warning {
  border-color: rgba(241, 154, 132, 0.28);
  color: #ffc4b2 !important;
  background: rgba(241, 154, 132, 0.075);
}

.item-use-advice.safe {
  border-color: rgba(87, 214, 177, 0.22);
  color: #9effdf !important;
  background: rgba(87, 214, 177, 0.06);
}

.resource-popover .resource-need {
  color: var(--gold-2);
}

.resource-popover .resource-need.missing {
  color: #f19a84;
}

.resource-source-list {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 8px 0 10px;
}

.resource-source-list span {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  padding: 3px 7px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.045);
  font-size: 11px;
}

.item-popover-close {
  position: absolute;
  z-index: 2;
  top: 8px;
  right: 8px;
  width: 28px;
  min-height: 28px;
  border-radius: 50%;
  padding: 0;
  color: var(--muted);
}

.item-popover.item-frame-xuan::before,
.item-popover.item-frame-di::before,
.item-popover.item-frame-tian::before {
  animation: itemGradeSweep 2.8s linear infinite;
}

.item-popover.item-frame-di,
.item-popover.item-frame-tian {
  box-shadow: 0 0 34px var(--grade-glow), 0 24px 70px rgba(0, 0, 0, 0.62), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.item-popover.item-frame-tian {
  animation: itemPopoverPulse 1.9s ease-in-out infinite;
}

.fragment-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 7px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.13);
}

.fragment-card {
  display: grid;
  gap: 2px;
  min-height: 48px;
  justify-items: start;
  border-color: var(--grade-border);
  background:
    radial-gradient(circle at 12% 0%, var(--grade-glow), transparent 55%),
    rgba(255, 255, 255, 0.045);
}

.fragment-card strong {
  color: var(--text);
  font-size: 13px;
}

.fragment-card span {
  color: var(--muted);
  font-size: 11px;
}

.fragment-card.ready {
  color: var(--gold-2);
  box-shadow: 0 0 18px var(--grade-glow);
}

.fragment-actions {
  display: grid;
  align-content: center;
  gap: 5px;
  width: clamp(68px, 12vw, 88px);
}

.fragment-actions .mini-button {
  min-height: 24px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
}

.equipment-layout {
  display: grid;
  grid-template-columns: 172px 1fr;
  gap: 11px;
}

.paperdoll {
  min-height: 244px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 34%, rgba(243, 199, 96, 0.16), transparent 28%),
    rgba(0, 0, 0, 0.16);
  display: grid;
  grid-template-areas:
    ". head ."
    "upper core treasure"
    "lower sword feet";
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 76px;
  gap: 6px;
  padding: 8px;
}

.paper-core {
  grid-area: core;
  display: grid;
  place-items: center;
  color: transparent;
  font-size: 0;
  border-radius: 50%;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(0, 0, 0, 0.24)),
    var(--paper-avatar, url("./资源/avatars/player_male_01.webp")),
    rgba(0, 0, 0, 0.18);
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(87, 214, 177, 0.28);
  box-shadow: inset 0 0 0 5px rgba(8, 13, 11, 0.55), 0 0 22px rgba(87, 214, 177, 0.18);
}

.gear-slot {
  min-height: 68px;
  padding: 6px 4px;
  display: grid;
  place-items: center;
  text-align: center;
  cursor: pointer;
}

.gear-slot[data-slot="head"] {
  grid-area: head;
}

.gear-slot[data-slot="upper"] {
  grid-area: upper;
}

.gear-slot[data-slot="lower"] {
  grid-area: lower;
}

.gear-slot[data-slot="feet"] {
  grid-area: feet;
}

.gear-slot[data-slot="sword"] {
  grid-area: sword;
}

.gear-slot[data-slot="treasure"] {
  grid-area: treasure;
}

.gear-slot strong,
.skill-card strong {
  font-size: 11px;
  line-height: 1.2;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gear-stat-side {
  display: grid;
  gap: 8px;
}

.character-page {
  display: grid;
  gap: 10px;
  padding-bottom: max(8px, env(safe-area-inset-bottom));
}

.character-card {
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 9px;
  padding: 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(0, 0, 0, 0.08)),
    rgba(255, 255, 255, 0.035);
}

.role-title,
.role-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.role-title strong {
  display: block;
  color: var(--gold-2);
  font-size: 17px;
  line-height: 1.25;
}

.role-title span,
.role-title em,
.role-section-title small {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.role-section-title span {
  color: var(--gold-2);
  font-weight: 800;
}

.role-exp {
  display: grid;
  gap: 5px;
  margin: 9px 0;
  color: #dbe5cf;
  font-size: 12px;
}

.role-exp i {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
}

.role-exp b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--jade), var(--gold), var(--gold-2));
  box-shadow: 0 0 12px rgba(243, 199, 96, 0.45);
}

.role-stat-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 0;
}

.companion-page {
  display: grid;
  gap: 10px;
  padding-bottom: max(10px, env(safe-area-inset-bottom));
}

.npc-world-note {
  margin: 8px 0 0;
  color: #dbe5cf;
  font-size: 12px;
  line-height: 1.6;
}

.npc-section {
  display: grid;
  gap: 8px;
}

.journal-section {
  display: grid;
  gap: 8px;
}

.journal-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.journal-summary span {
  min-height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(243, 199, 96, 0.13);
  border-radius: 8px;
  color: var(--gold-2);
  background: rgba(243, 199, 96, 0.055);
  font-size: 11px;
  font-weight: 700;
}

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

.journal-filters button {
  min-height: 28px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 11px;
}

.journal-filters button strong,
.journal-filters button span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.journal-filters button span {
  color: var(--gold-2);
  font-weight: 800;
}

.journal-filters button.active {
  border-color: rgba(87, 214, 177, 0.36);
  color: #f7f1dc;
  background: rgba(87, 214, 177, 0.12);
  box-shadow: inset 0 0 12px rgba(87, 214, 177, 0.08);
}

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

.friend-dynamics-section {
  display: grid;
  gap: 8px;
}

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

.friend-dynamic-card {
  min-height: 96px;
  display: grid;
  gap: 7px;
  padding: 9px 10px;
  border: 1px solid rgba(243, 199, 96, 0.2);
  border-radius: 9px;
  background:
    linear-gradient(145deg, rgba(243, 199, 96, 0.08), rgba(87, 214, 177, 0.045)),
    rgba(255, 255, 255, 0.035);
  text-align: left;
  cursor: pointer;
}

.friend-dynamic-card strong {
  color: var(--gold-2);
  font-size: 13px;
}

.friend-dynamic-card span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.friend-dynamic-card p {
  margin: 0;
  color: #e9ead7;
  font-size: 11px;
  line-height: 1.5;
}

.journal-card {
  min-height: 104px;
  display: grid;
  gap: 6px;
  padding: 9px 10px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 9px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.055), rgba(0, 0, 0, 0.08)),
    rgba(255, 255, 255, 0.035);
}

.journal-card.route {
  border-color: rgba(87, 214, 177, 0.22);
}

.journal-card.town {
  border-color: rgba(243, 199, 96, 0.22);
}

.journal-card.npc {
  border-color: rgba(182, 156, 255, 0.24);
}

.journal-card-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: flex-start;
}

.journal-card-head strong {
  color: var(--gold-2);
  font-size: 13px;
}

.journal-card-head span,
.journal-card em {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  white-space: nowrap;
}

.journal-card p {
  margin: 0;
  color: #dbe5cf;
  font-size: 11px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.npc-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.npc-card {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 9px;
  padding: 9px 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(0, 0, 0, 0.08)),
    rgba(255, 255, 255, 0.035);
  display: grid;
  gap: 5px;
  min-height: 66px;
  text-align: left;
  cursor: pointer;
}

.npc-card.romance {
  border-color: rgba(255, 135, 154, 0.28);
  box-shadow: 0 0 18px rgba(255, 135, 154, 0.08);
}

.npc-card.friend {
  border-color: rgba(243, 199, 96, 0.46);
  box-shadow: 0 0 18px rgba(243, 199, 96, 0.12);
}

.npc-card.male {
  border-color: rgba(115, 210, 222, 0.22);
}

.npc-card.female {
  border-color: rgba(255, 135, 154, 0.24);
}

.npc-card.male .npc-card-head span {
  color: #a8e7f0;
}

.npc-card.female .npc-card-head span {
  color: #ffc0cb;
}

.npc-card.locked {
  filter: grayscale(0.35);
  opacity: 0.74;
}

.npc-card-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: flex-start;
}

.npc-card-head strong {
  color: var(--gold-2);
  font-size: 14px;
}

.npc-card-head span,
.npc-card em,
.npc-card small,
.affinity-line span {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.npc-card p {
  margin: 0;
  color: #dbe5cf;
  font-size: 12px;
  line-height: 1.55;
}

.companion-modal-layer {
  position: fixed;
  z-index: 8;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 14px;
  background: rgba(5, 8, 7, 0.72);
}

.companion-modal {
  position: relative;
  width: min(100%, 410px);
  max-height: calc(100dvh - 34px);
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 12px;
  background:
    radial-gradient(circle at 50% 0, rgba(243, 199, 96, 0.12), transparent 38%),
    #17201b;
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.62);
}

.companion-modal.romance {
  border-color: rgba(255, 135, 154, 0.32);
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.62), 0 0 28px rgba(255, 135, 154, 0.12);
}

.companion-modal.male {
  border-color: rgba(115, 210, 222, 0.24);
}

.companion-modal.female {
  border-color: rgba(255, 135, 154, 0.3);
}

.companion-modal.locked .companion-portrait {
  filter: grayscale(0.55) brightness(0.72);
}

.companion-modal-close {
  position: absolute;
  z-index: 2;
  top: 9px;
  right: 9px;
  width: 32px;
  min-height: 32px;
  border-radius: 50%;
  background: rgba(8, 12, 10, 0.72);
}

.companion-portrait {
  height: min(58dvh, 430px);
  min-height: 300px;
  border-radius: 12px 12px 0 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(6, 10, 8, 0.62)),
    var(--npc-portrait),
    radial-gradient(circle at 50% 58%, rgba(243, 199, 96, 0.16), rgba(5, 8, 7, 0.92) 68%);
  background-size: cover, contain, cover;
  background-repeat: no-repeat;
  background-position: center, center bottom, center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.companion-modal.female .companion-portrait {
  background-position: center, center bottom, center;
}

.companion-modal.male .companion-portrait {
  background-position: center, center bottom, center;
}

.companion-detail-copy {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.companion-detail-copy p {
  margin: 0;
  color: #dbe5cf;
  font-size: 12px;
  line-height: 1.6;
}

.npc-personality {
  color: #f3dca1 !important;
}

.friend-dynamic-detail {
  display: grid;
  gap: 5px;
  padding: 8px 9px;
  border: 1px solid rgba(243, 199, 96, 0.2);
  border-radius: 9px;
  background: rgba(243, 199, 96, 0.06);
}

.friend-dynamic-detail strong {
  color: var(--gold-2);
  font-size: 12px;
}

.friend-dynamic-detail span {
  color: #e9ead7;
  font-size: 12px;
  line-height: 1.55;
}

.companion-detail-copy em,
.companion-detail-copy small {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.affinity-line {
  display: grid;
  gap: 4px;
}

.affinity-line i {
  height: 5px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.09);
}

.affinity-line b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff879a, #f3c760);
}

.profession-switch {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 5px;
  margin: 8px 0 10px;
}

.profession-switch button {
  min-height: 38px;
  display: grid;
  gap: 2px;
  place-items: center;
  padding: 4px 2px;
  color: var(--muted);
}

.profession-switch button strong {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: var(--gold-2);
  font-size: 12px;
}

.profession-switch button span {
  font-size: 10px;
}

.profession-switch button.active {
  color: var(--gold-2);
  border-color: rgba(243, 199, 96, 0.42);
  background: rgba(243, 199, 96, 0.1);
  box-shadow: 0 0 16px rgba(243, 199, 96, 0.12);
}

.avatar-picker {
  display: grid;
  gap: 7px;
  margin: 9px 0 10px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.035);
}

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

.avatar-option-grid button {
  min-height: 64px;
  display: grid;
  gap: 4px;
  place-items: center;
  padding: 5px 3px;
  color: var(--muted);
}

.avatar-option-grid button span {
  width: 34px;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(0, 0, 0, 0.2)),
    var(--avatar-choice),
    rgba(0, 0, 0, 0.2);
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 -8px 12px rgba(0, 0, 0, 0.28);
}

.avatar-option-grid button em {
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
}

.avatar-option-grid button.active {
  border-color: rgba(87, 214, 177, 0.48);
  color: #dff8ec;
  background: rgba(87, 214, 177, 0.1);
  box-shadow: 0 0 16px rgba(87, 214, 177, 0.14);
}

.avatar-option-grid button.active span {
  border-color: rgba(87, 214, 177, 0.58);
  box-shadow: inset 0 -8px 12px rgba(0, 0, 0, 0.28), 0 0 16px rgba(87, 214, 177, 0.22);
}

.role-equipment-layout {
  grid-template-columns: 1fr;
  gap: 9px;
  margin-top: 8px;
}

.role-paperdoll {
  min-height: 326px;
  grid-auto-rows: minmax(88px, 1fr);
  gap: 9px;
  padding: 10px;
  background:
    radial-gradient(circle at 50% 45%, rgba(243, 199, 96, 0.18), transparent 30%),
    radial-gradient(circle at 50% 55%, rgba(87, 214, 177, 0.12), transparent 42%),
    rgba(0, 0, 0, 0.16);
}

.role-paperdoll .paper-core {
  width: 68px;
  aspect-ratio: 1;
  justify-self: center;
  align-self: center;
  border-radius: 50%;
  color: transparent;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(0, 0, 0, 0.22)),
    var(--paper-avatar, url("./资源/avatars/player_male_01.webp"));
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(87, 214, 177, 0.34);
  box-shadow: inset 0 0 0 5px rgba(8, 13, 11, 0.6), 0 0 24px rgba(87, 214, 177, 0.2);
}

.role-paperdoll .gear-slot {
  min-height: 86px;
  padding: 8px 5px;
  border-radius: 9px;
}

.role-paperdoll .slot-icon {
  width: 36px;
  font-size: 18px;
}

.role-paperdoll .gear-slot strong {
  font-size: 12px;
}

.role-gear-detail {
  position: static;
  min-height: auto;
}

.realm-condition-list {
  display: grid;
  gap: 6px;
  margin: 8px 0 10px;
}

.condition.ok {
  color: #9effdf;
}

.progression-plan {
  display: grid;
  gap: 8px;
}

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

.plan-card {
  display: grid;
  gap: 4px;
  min-height: 72px;
  padding: 7px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9px;
  background:
    radial-gradient(circle at 100% 0, rgba(243, 199, 96, 0.12), transparent 42%),
    rgba(255, 255, 255, 0.035);
}

.plan-card strong {
  color: var(--gold-2);
  font-size: 12px;
}

.plan-card p,
.plan-card em {
  margin: 0;
  color: rgba(220, 228, 211, 0.86);
  font-size: 10px;
  line-height: 1.42;
  font-style: normal;
}

.plan-card em {
  color: var(--muted);
}

.daily-roadmap-current {
  display: grid;
  gap: 4px;
  padding: 7px;
  border: 1px solid rgba(87, 214, 177, 0.18);
  border-radius: 9px;
  background: rgba(87, 214, 177, 0.055);
}

.daily-roadmap-current strong {
  color: #9effdf;
}

.daily-roadmap-current span,
.daily-roadmap-current p {
  margin: 0;
  color: rgba(220, 228, 211, 0.88);
  font-size: 10px;
  line-height: 1.4;
}

.daily-roadmap {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 5px;
}

.daily-roadmap-card {
  display: grid;
  gap: 2px;
  min-height: 39px;
  padding: 5px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.032);
}

.daily-roadmap-card.active {
  border-color: rgba(243, 199, 96, 0.44);
  box-shadow: inset 0 0 0 1px rgba(243, 199, 96, 0.12), 0 0 16px rgba(243, 199, 96, 0.08);
}

.daily-roadmap-card strong {
  color: var(--gold-2);
  font-size: 11px;
  line-height: 1;
}

.daily-roadmap-card span {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.skill-page {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 10px;
  min-height: calc(100dvh - 86px);
}

.skill-loadout-block {
  display: grid;
  gap: 9px;
}

.loadout-group {
  display: grid;
  gap: 6px;
}

.skill-book-layout {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(128px, 42%) minmax(0, 1fr);
  gap: 9px;
}

.skill-list-pane {
  min-height: 0;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 6px;
  padding-right: 2px;
}

.skill-card {
  min-height: 48px;
  padding: 6px;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  cursor: pointer;
}

.skill-card.equipped::after {
  display: none;
}

.skill-card.locked {
  opacity: 0.58;
  filter: grayscale(0.35);
}

.skill-card.locked .skill-icon {
  color: rgba(212, 219, 223, 0.66);
  background:
    radial-gradient(circle at 30% 22%, rgba(255, 255, 255, 0.18), transparent 18%),
    linear-gradient(145deg, rgba(105, 111, 116, 0.32), rgba(60, 67, 72, 0.22));
}

.skill-icon {
  width: 32px;
  aspect-ratio: 1;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 30% 22%, rgba(255, 255, 255, 0.4), transparent 18%),
    linear-gradient(145deg, rgba(243, 199, 96, 0.38), rgba(115, 210, 222, 0.16));
  color: var(--gold-2);
  font-weight: 900;
}

.skill-card-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.skill-card-copy strong {
  font-size: 12px;
  line-height: 1.15;
}

.skill-card-copy em {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.skill-loadout {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.mind-loadout {
  grid-template-columns: repeat(3, 1fr);
}

.loadout-slot {
  border: 1px solid rgba(243, 199, 96, 0.22);
  background: rgba(243, 199, 96, 0.07);
  border-radius: 7px;
  min-height: 46px;
  padding: 5px;
  color: var(--gold-2);
  font-size: 12px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  grid-template-areas:
    "icon name"
    "icon meta";
  gap: 2px 6px;
  align-items: center;
  text-align: left;
}

.loadout-slot .skill-icon {
  grid-area: icon;
  width: 28px;
  border-radius: 7px;
}

.loadout-slot strong {
  grid-area: name;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  line-height: 1.1;
}

.loadout-slot em {
  grid-area: meta;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
}

.loadout-slot.active,
.loadout-slot:hover {
  border-color: rgba(255, 230, 157, 0.5);
  box-shadow: 0 0 14px rgba(243, 199, 96, 0.16);
}

.skill-detail-pane {
  position: sticky;
  top: 0;
  min-height: 100%;
}

.preview-page {
  display: grid;
  gap: 10px;
}

.preview-arena {
  height: 232px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 72% 44%, rgba(237, 106, 90, 0.15), transparent 22%),
    radial-gradient(circle at 22% 55%, rgba(87, 214, 177, 0.14), transparent 22%),
    linear-gradient(180deg, #151e19, #0f1512);
}

.preview-actor,
.preview-target {
  position: absolute;
  transform: translate(-50%, -50%);
}

.preview-actor {
  left: 23%;
  top: 58%;
  width: 76px;
}

.preview-target {
  left: 76%;
  top: 45%;
  display: grid;
  justify-items: center;
  gap: 5px;
}

.preview-target small {
  color: var(--muted);
  font-size: 12px;
}

.preview-fx-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.preview-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.preview-actions button {
  min-height: 32px;
  padding: 0 6px;
  font-size: 12px;
}

.preview-body {
  overflow: auto;
  place-items: stretch center;
}

.preview-standalone {
  width: min(100vw, 920px);
  min-height: 100dvh;
  padding: max(12px, env(safe-area-inset-top)) 12px max(16px, env(safe-area-inset-bottom));
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 10px;
}

.preview-header {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 10px 12px;
  background:
    linear-gradient(180deg, rgba(243, 199, 96, 0.12), rgba(255, 255, 255, 0.045)),
    rgba(10, 13, 12, 0.78);
  box-shadow: var(--shadow);
}

.preview-header div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.preview-header strong {
  color: var(--gold-2);
  font-size: 18px;
}

.preview-header span {
  color: var(--muted);
  font-size: 12px;
}

.preview-header a {
  flex: 0 0 auto;
  color: #18160d;
  background: linear-gradient(180deg, #ffe69d, #f3c760);
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
  border-radius: 999px;
  padding: 8px 12px;
}

.profession-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
  gap: 7px;
}

.profession-tabs button {
  min-height: 54px;
  display: grid;
  place-items: center;
  gap: 2px;
  border-color: rgba(255, 255, 255, 0.1);
  background:
    radial-gradient(circle at 50% 0, color-mix(in srgb, var(--profession-accent, #f3c760) 22%, transparent), transparent 55%),
    rgba(255, 255, 255, 0.045);
}

.profession-tabs strong {
  color: var(--profession-accent, var(--gold-2));
  font-size: 19px;
  line-height: 1;
  text-shadow: 0 0 18px color-mix(in srgb, var(--profession-accent, #f3c760) 54%, transparent);
}

.profession-tabs span {
  color: var(--muted);
  font-size: 11px;
}

.profession-tabs button.active {
  border-color: color-mix(in srgb, var(--profession-accent, #f3c760) 68%, white 8%);
  box-shadow: 0 0 18px color-mix(in srgb, var(--profession-accent, #f3c760) 32%, transparent);
}

.standalone-preview-page {
  min-height: 0;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.65fr);
  grid-template-areas:
    "arena detail"
    "arena actions";
  align-items: stretch;
}

.standalone-preview-arena {
  grid-area: arena;
  height: auto;
  min-height: min(68dvh, 620px);
  border-color: color-mix(in srgb, var(--profession-accent, #f3c760) 34%, rgba(255, 255, 255, 0.1));
  background:
    radial-gradient(circle at 77% 45%, color-mix(in srgb, var(--profession-accent, #f3c760) 20%, transparent), transparent 24%),
    radial-gradient(circle at 22% 58%, rgba(87, 214, 177, 0.14), transparent 23%),
    linear-gradient(180deg, #152019, #0c1110);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.035), 0 22px 70px rgba(0, 0, 0, 0.34);
}

.standalone-preview-arena::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle at 55% 52%, #000, transparent 78%);
}

.preview-actor {
  display: grid;
  justify-items: center;
  gap: 5px;
  z-index: 2;
}

.preview-actor small {
  color: var(--muted);
  font-size: 12px;
}

.side-target.one {
  left: 66%;
  top: 70%;
}

.side-target.two {
  left: 87%;
  top: 64%;
}

.preview-target {
  z-index: 2;
}

.preview-target.hit .avatar-ring {
  border-color: color-mix(in srgb, var(--profession-accent, #f3c760) 75%, white 10%);
  box-shadow: 0 0 24px color-mix(in srgb, var(--profession-accent, #f3c760) 42%, transparent);
}

.preview-detail-card {
  grid-area: detail;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 12px;
  background:
    radial-gradient(circle at 0 0, color-mix(in srgb, var(--profession-accent, #f3c760) 18%, transparent), transparent 46%),
    rgba(7, 9, 8, 0.36);
}

.preview-detail-card span,
.preview-detail-card small {
  color: var(--muted);
  font-size: 12px;
}

.preview-detail-card h2 {
  margin: 5px 0 9px;
  font-size: 22px;
  line-height: 1.2;
}

.preview-detail-card p {
  margin: 0 0 10px;
  color: #dbe5cf;
  font-size: 13px;
  line-height: 1.58;
}

.preview-variant-bar {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 9px;
}

.preview-variant-bar span {
  color: var(--gold-2);
}

.preview-variant-bar button {
  min-height: 30px;
  padding: 0 10px;
  color: #18160d;
  background: linear-gradient(180deg, #ffe69d, #d7b66d);
  border: 0;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.preview-asset-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.preview-asset-meta span {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: #d9f8ff;
  font-size: 12px;
}

.standalone-preview-actions {
  grid-area: actions;
  align-self: start;
  grid-template-columns: 1fr;
  max-height: 100%;
  overflow: auto;
  padding-right: 2px;
}

.standalone-preview-actions button {
  min-height: 52px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 3px;
  text-align: left;
  padding: 8px 10px;
}

.standalone-preview-actions button strong,
.standalone-preview-actions button span {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.standalone-preview-actions button span {
  color: var(--muted);
  font-size: 11px;
}

.asset-group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 30px;
  margin-top: 4px;
  padding: 5px 8px;
  border-radius: 7px;
  border: 1px solid color-mix(in srgb, var(--asset-accent, #9de7ff) 36%, rgba(255, 255, 255, 0.12));
  background:
    radial-gradient(circle at 0 50%, color-mix(in srgb, var(--asset-accent, #9de7ff) 22%, transparent), transparent 58%),
    rgba(255, 255, 255, 0.035);
}

.asset-group-title strong {
  color: var(--asset-accent, #d9f8ff);
  font-size: 13px;
}

.asset-group-title span {
  min-width: auto;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.standalone-preview-actions.asset-preview-actions button {
  min-height: 44px;
  border-color: color-mix(in srgb, var(--asset-accent, #9de7ff) 30%, rgba(255, 255, 255, 0.1));
  background:
    radial-gradient(circle at 0 0, color-mix(in srgb, var(--asset-accent, #9de7ff) 16%, transparent), transparent 58%),
    rgba(255, 255, 255, 0.045);
}

.standalone-preview-actions.asset-preview-actions button strong {
  color: var(--asset-accent, #d9f8ff);
}

.service-page {
  min-height: calc(100dvh - 86px);
  display: grid;
  align-content: start;
  gap: 10px;
  padding-bottom: max(10px, env(safe-area-inset-bottom));
}

.service-intro,
.service-buff {
  border: 1px solid rgba(243, 199, 96, 0.16);
  border-radius: 8px;
  padding: 9px 10px;
  color: #dbe5cf;
  font-size: 12px;
  line-height: 1.55;
  background:
    linear-gradient(180deg, rgba(243, 199, 96, 0.08), rgba(255, 255, 255, 0.035)),
    rgba(0, 0, 0, 0.16);
}

.service-buff {
  display: grid;
  gap: 4px;
  border-color: var(--grade-border, rgba(243, 199, 96, 0.18));
  box-shadow: 0 0 18px var(--grade-glow, rgba(243, 199, 96, 0.08));
}

.service-buff strong {
  color: var(--gold-2);
}

.service-buff span {
  color: var(--muted);
  font-size: 12px;
}

.guide-page {
  gap: 9px;
}

.guide-hero,
.guide-section,
.guide-daily-panel {
  border: 1px solid rgba(243, 199, 96, 0.14);
  border-radius: 9px;
  background:
    radial-gradient(circle at 10% 0%, rgba(87, 214, 177, 0.09), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(0, 0, 0, 0.11)),
    rgba(0, 0, 0, 0.14);
}

.guide-hero {
  display: grid;
  gap: 8px;
  padding: 10px;
}

.guide-hero > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.guide-hero strong {
  color: var(--gold-2);
  font-size: 15px;
}

.guide-hero span,
.guide-hero p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  margin: 0;
}

.guide-hero > div:first-child span {
  max-width: 48%;
  color: var(--jade);
  text-align: right;
}

.guide-meters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.guide-next-step {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--grade-border, rgba(243, 199, 96, 0.2));
  border-radius: 8px;
  background:
    radial-gradient(circle at 0 0, var(--grade-glow, rgba(243, 199, 96, 0.12)), transparent 55%),
    rgba(0, 0, 0, 0.16);
}

.guide-next-step div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.guide-next-step strong {
  color: var(--gold-2);
  font-size: 13px;
}

.guide-next-step span {
  color: rgba(244, 239, 217, 0.82);
  font-size: 11px;
  line-height: 1.35;
}

.guide-next-step button {
  min-height: 30px;
  padding: 2px 10px;
  color: var(--gold-2);
  white-space: nowrap;
}

.guide-meters div {
  display: grid;
  gap: 4px;
  padding: 7px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.16);
}

.guide-meters span {
  color: var(--muted);
  font-size: 10px;
  text-align: left;
}

.guide-meters b {
  color: var(--gold-2);
  font-size: 13px;
}

.guide-meters i,
.guide-requirement i {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.guide-meters em,
.guide-requirement b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--jade), var(--gold-2));
}

.guide-section {
  display: grid;
  gap: 8px;
  padding: 9px;
}

.foundation-pill-tracker,
.foundation-pill-focus {
  border-color: rgba(243, 199, 96, 0.24);
  background:
    radial-gradient(circle at 100% 0, rgba(243, 199, 96, 0.14), transparent 46%),
    radial-gradient(circle at 0 100%, rgba(87, 214, 177, 0.08), transparent 44%),
    rgba(0, 0, 0, 0.16);
}

.foundation-pill-focus {
  margin-bottom: 9px;
}

.tracker-note {
  margin: 0;
  color: rgba(244, 239, 217, 0.84);
  font-size: 11px;
  line-height: 1.45;
}

.guide-requirement-grid,
.guide-flow-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.guide-requirement,
.guide-flow-card {
  min-width: 0;
  border: 1px solid var(--grade-border, rgba(255, 255, 255, 0.1));
  border-radius: 8px;
  background:
    radial-gradient(circle at 0 0, var(--grade-glow, rgba(255, 255, 255, 0.07)), transparent 55%),
    rgba(255, 255, 255, 0.04);
}

.guide-requirement {
  display: grid;
  gap: 6px;
  padding: 8px;
}

.guide-requirement div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.guide-requirement strong,
.guide-flow-card strong {
  color: var(--text);
  font-size: 12px;
}

.guide-requirement span {
  color: var(--jade);
  font-size: 10px;
  white-space: nowrap;
}

.guide-requirement.missing span {
  color: #ffb3a8;
}

.guide-requirement p,
.guide-flow-card span {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.guide-requirement button {
  min-height: 24px;
  padding: 2px 8px;
  color: var(--gold-2);
  font-size: 11px;
}

.guide-flow-card {
  display: grid;
  gap: 4px;
  min-height: 58px;
  padding: 8px;
  color: inherit;
  font: inherit;
  text-align: left;
}

.guide-daily-panel {
  margin-top: 0;
}

.service-grid,
.service-list,
.consume-grid {
  display: grid;
  gap: 9px;
}

.service-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.forge-grid,
.shop-grid {
  grid-template-columns: 1fr;
}

.service-card,
.consume-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 9px;
  padding: 10px;
  background:
    radial-gradient(circle at 50% 0, var(--grade-fill, rgba(243, 199, 96, 0.04)), transparent 44%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(0, 0, 0, 0.08)),
    rgba(255, 255, 255, 0.035);
}

.service-card[class*="item-frame-"],
.consume-card[class*="item-frame-"] {
  border-color: var(--grade-border);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04), 0 0 18px var(--grade-glow);
}

.stall-status,
.stall-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 9px;
  padding: 10px;
  background:
    radial-gradient(circle at 50% 0, var(--grade-fill, rgba(243, 199, 96, 0.05)), transparent 44%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(0, 0, 0, 0.08)),
    rgba(255, 255, 255, 0.035);
}

.role-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

.role-tabs button {
  min-height: 38px;
  display: grid;
  place-items: center;
  gap: 2px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.045);
}

.role-tabs button strong {
  color: inherit;
  font-size: 12px;
  line-height: 1;
}

.role-tabs button span {
  max-width: 100%;
  color: rgba(168, 181, 166, 0.84);
  font-size: 10px;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.role-tabs button.active {
  color: var(--gold-2);
  border-color: rgba(243, 199, 96, 0.42);
  background: rgba(243, 199, 96, 0.11);
  box-shadow: 0 0 16px rgba(243, 199, 96, 0.12);
}

.service-card-with-icon {
  min-height: 74px;
  padding-left: 54px;
}

.card-icon {
  position: absolute;
  left: 10px;
  top: 10px;
  width: 34px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.24);
  color: var(--gold-2);
  font-weight: 800;
}

.stall-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-color: rgba(243, 199, 96, 0.18);
}

.stall-status > div:first-child,
.stall-card {
  display: grid;
  gap: 5px;
}

.stall-status strong {
  color: var(--gold-2);
}

.stall-status span {
  color: var(--muted);
  font-size: 12px;
}

.stall-card[class*="item-frame-"] {
  border-color: var(--grade-border);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04), 0 0 18px var(--grade-glow);
}

.stall-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.stall-listings,
.stall-inventory {
  display: grid;
  gap: 8px;
}

.stall-price-actions button {
  flex: 1 1 78px;
}

.service-card-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.service-card-title strong {
  min-width: 0;
  color: var(--gold-2);
  font-size: 13px;
  line-height: 1.25;
}

.service-card-title span {
  flex: 0 0 auto;
  max-width: 42%;
  color: var(--muted);
  font-size: 11px;
  text-align: right;
}

.service-card p,
.consume-card p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.48;
}

.recipe-lines {
  display: grid;
  gap: 5px;
  margin: 8px 0 10px;
  padding: 7px;
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.recipe-lines div {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 7px;
  align-items: start;
}

.recipe-lines b {
  font-size: 11px;
  line-height: 1.35;
}

.recipe-lines span {
  color: #dbe5cf;
  font-size: 11px;
  line-height: 1.35;
}

.service-grade-actions {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 5px;
}

.service-grade-button {
  min-height: 52px;
  padding: 5px 3px;
  display: grid;
  gap: 3px;
  align-content: center;
  color: var(--text);
}

.service-grade-button strong,
.service-grade-button small {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.service-grade-button small {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.15;
}

.service-grade-button.locked {
  opacity: 0.48;
}

.cost-line {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 7px;
}

.cost-line span,
.service-card .ok,
.service-card .missing {
  border-radius: 999px;
  padding: 3px 7px;
  font-size: 11px;
  background: rgba(255, 255, 255, 0.055);
}

.cost-line .ok,
.service-card .ok {
  color: #9effdf;
}

.cost-line .missing,
.service-card .missing {
  color: #ffb7ac;
  border: 1px solid rgba(237, 106, 90, 0.22);
}

.service-section {
  display: grid;
  gap: 8px;
}

.consume-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.consume-card .row-actions {
  margin-top: 7px;
}

.treasure-modal {
  position: fixed;
  z-index: 10;
  inset: 0;
  display: none;
  place-items: center;
  background: rgba(8, 10, 9, 0.6);
  backdrop-filter: blur(5px);
}

.treasure-modal.show {
  display: grid;
}

.treasure-card {
  width: min(88vw, 350px);
  border-radius: 12px;
  border: 1px solid rgba(243, 199, 96, 0.44);
  background:
    radial-gradient(circle at 50% -12%, rgba(255, 230, 157, 0.34), transparent 36%),
    linear-gradient(180deg, #253329, #141916);
  box-shadow: 0 0 60px rgba(243, 199, 96, 0.28), 0 26px 80px rgba(0, 0, 0, 0.5);
  padding: 24px 20px 18px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.treasure-card::before,
.treasure-card::after {
  content: "";
  position: absolute;
  inset: -40%;
  background: conic-gradient(transparent, rgba(255, 230, 157, 0.22), transparent 22%);
  animation: treasureSpin 3.8s linear infinite;
}

.treasure-card::after {
  animation-direction: reverse;
  opacity: 0.5;
}

.treasure-card > * {
  position: relative;
  z-index: 1;
}

.treasure-kicker {
  color: var(--gold-2);
  letter-spacing: 0;
  font-size: 12px;
}

.treasure-card h2 {
  margin: 8px 0;
  color: #fff5be;
  font-size: 23px;
  line-height: 1.25;
  text-shadow: 0 0 18px rgba(243, 199, 96, 0.46);
}

.treasure-card p {
  color: #d9e0ce;
  margin: 0 0 18px;
  line-height: 1.6;
  font-size: 13px;
}

.treasure-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.treasure-card button {
  min-width: 132px;
  color: #18160d;
  border: 0;
  background: linear-gradient(180deg, #ffe69d, #f3c760);
  font-weight: 800;
}

.treasure-card button[hidden] {
  display: none;
}

#treasureAction {
  color: #f4efd9;
  border: 1px solid rgba(87, 214, 177, 0.38);
  background: linear-gradient(180deg, rgba(87, 214, 177, 0.22), rgba(20, 44, 37, 0.88));
}

.battle-fx-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.fx-slash,
.fx-sword-qi,
.fx-beam,
.fx-sword,
.fx-spark,
.fx-number,
.fx-wave,
.fx-ring,
.fx-lightning-strike,
.fx-basic-slash,
.fx-element-impact,
.fx-fire-sprite,
.fx-water-sprite,
.fx-asset-sprite,
.fx-status-root,
.fx-status-slow,
.fx-status-stun,
.fx-status-burn,
.fx-status-poison,
.fx-status-bleed,
.fx-status-burst,
.fx-status-weaken,
.fx-status-vulnerable,
.fx-treasure-projectile,
.fx-treasure-impact,
.fx-star,
.fx-shard,
.fx-sword-frame,
.fx-impact-frame,
.fx-element-bolt,
.fx-element-particle,
.fx-cast-mark,
.fx-ice-cast,
.fx-vine-snare,
.fx-leaf-blade,
.fx-branch-wrap,
.fx-water-stream,
.fx-ice-prison,
.fx-ice-crystal,
.fx-flame-tongue,
.fx-mountain-chunk,
.fx-rock-chunk,
.fx-mountain-seal,
.fx-earth-seal-sprite,
.fx-earth-seal-sheet,
.fx-earth-cast-circle,
.fx-earth-crack-path,
.fx-earth-pillar,
.fx-earth-rift,
.fx-earth-orbit-stone,
.fx-earth-drop,
.fx-earth-dust-cloud {
  position: absolute;
  pointer-events: none;
}

.fx-slash {
  width: 126px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, #fff5be 30%, #f3c760 58%, transparent);
  box-shadow: 0 0 14px rgba(243, 199, 96, 0.76);
  transform-origin: center;
  animation: slashFly 0.42s ease-out forwards;
}

.fx-basic-slash {
  width: 124px;
  height: 78px;
  transform-origin: center;
  opacity: 0;
  animation: basicSlashCut 0.36s cubic-bezier(0.14, 0.78, 0.2, 1) forwards;
}

.fx-basic-slash::before,
.fx-basic-slash::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.fx-basic-slash::before {
  left: 1px;
  top: 36px;
  width: 122px;
  height: 8px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, transparent 0 8%, rgba(255, 255, 255, 0.98) 26%, #fff5be 48%, #f3c760 70%, transparent 100%);
  clip-path: polygon(0 46%, 82% 25%, 100% 50%, 82% 75%, 0 54%);
  box-shadow: 0 0 12px rgba(255, 245, 190, 0.82), 0 0 22px rgba(243, 199, 96, 0.54);
}

.fx-basic-slash::after {
  left: 8px;
  top: 25px;
  width: 104px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(100deg, transparent, rgba(255, 245, 190, 0.34), rgba(243, 199, 96, 0.12), transparent);
  filter: blur(5px);
  transform: rotate(-5deg);
}

.fx-sword-qi {
  --blade-core: #fff5be;
  --blade-edge: #f3c760;
  --blade-tip: rgba(255, 255, 255, 0.98);
  --blade-aura: rgba(243, 199, 96, 0.82);
  width: 178px;
  height: 44px;
  transform-origin: center;
  overflow: visible;
  background:
    radial-gradient(circle at 2% 50%, rgba(255, 230, 157, 0.98) 0 4px, transparent 5px),
    linear-gradient(90deg, #3d2418, #ffe69d 48%, #5d3b20) 0 18px / 35px 8px no-repeat,
    linear-gradient(180deg, transparent 0 28%, #ffe69d 29% 42%, #f3c760 43% 57%, #ffe69d 58% 71%, transparent 72%) 27px 4px / 9px 36px no-repeat,
    radial-gradient(ellipse at 78% 50%, var(--blade-aura), transparent 52%);
  filter: drop-shadow(0 0 10px var(--blade-aura)) drop-shadow(0 0 22px rgba(243, 199, 96, 0.34));
  animation: swordQiFly 0.48s cubic-bezier(0.17, 0.74, 0.21, 1) forwards;
}

.fx-sword-qi::before {
  content: "";
  position: absolute;
  left: 31px;
  top: 8px;
  width: calc(100% - 34px);
  height: 28px;
  background:
    linear-gradient(180deg, transparent 0 27%, rgba(255, 255, 255, 0.9) 38%, var(--blade-core) 49%, rgba(255, 255, 255, 0.76) 60%, transparent 73%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.98), var(--blade-core) 24%, var(--blade-edge) 72%, var(--blade-tip) 94%, transparent 100%);
  clip-path: polygon(0 40%, 68% 40%, 68% 32%, 83% 32%, 100% 50%, 83% 68%, 68% 68%, 68% 60%, 0 60%, 5% 50%);
  box-shadow: 0 0 16px var(--blade-aura);
}

.fx-sword-qi::after {
  content: "";
  position: absolute;
  left: -5px;
  top: 15px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff5be 0 22%, #9b6a2c 58%, #3c2418 72%);
  box-shadow: 0 0 10px rgba(255, 230, 157, 0.62), 27px 0 0 -4px rgba(255, 230, 157, 0.9), 27px -10px 0 -4px rgba(255, 230, 157, 0.82), 27px 10px 0 -4px rgba(255, 230, 157, 0.82);
}

.fx-sword-qi.pierce {
  --blade-core: #dffcff;
  --blade-edge: #73d2de;
  --blade-aura: rgba(115, 210, 222, 0.92);
  width: 210px;
}

.fx-sword-qi.combo {
  --blade-edge: #ffcc75;
  --blade-aura: rgba(255, 230, 157, 0.9);
  width: 146px;
}

.fx-sword-qi.multi {
  --blade-core: #eafff6;
  --blade-edge: #57d6b1;
  --blade-aura: rgba(87, 214, 177, 0.88);
  width: 138px;
}

.fx-sword-qi.aoe {
  --blade-edge: #ffe69d;
  --blade-aura: rgba(243, 199, 96, 0.94);
  width: 132px;
  height: 40px;
}

.fx-sword-qi.heavy,
.fx-sword-qi.execute {
  --blade-core: #fff5be;
  --blade-edge: #ff879a;
  --blade-aura: rgba(255, 135, 154, 0.9);
  width: 208px;
  height: 48px;
}

.fx-sword-qi.shatter {
  --blade-core: #dffcff;
  --blade-edge: #b69cff;
  --blade-aura: rgba(182, 156, 255, 0.82);
}

.fx-beam {
  width: 9px;
  height: 165px;
  border-radius: 999px;
  background: linear-gradient(180deg, transparent, #fff5be 12%, #f3c760 58%, transparent);
  box-shadow: 0 0 22px rgba(255, 230, 157, 0.88);
  animation: beamDrop 0.62s ease-out forwards;
}

.fx-sword {
  width: 14px;
  height: 58px;
  overflow: visible;
  border-radius: 8px;
  background:
    linear-gradient(90deg, transparent 0 28%, rgba(255, 255, 255, 0.9) 42%, #fff5be 50%, rgba(255, 255, 255, 0.72) 58%, transparent 72%),
    linear-gradient(180deg, #fff 0 10%, #fff5be 30%, #f3c760 70%, transparent 72%);
  clip-path: polygon(50% 0, 76% 16%, 64% 72%, 100% 72%, 100% 82%, 61% 82%, 61% 100%, 39% 100%, 39% 82%, 0 82%, 0 72%, 36% 72%, 24% 16%);
  box-shadow: 0 0 16px rgba(243, 199, 96, 0.75);
  animation: swordRain 0.68s ease-in forwards;
}

.fx-spark {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #ffe69d;
  box-shadow: 0 0 16px #f3c760;
  animation: sparkPop 0.5s ease-out forwards;
}

.fx-number {
  color: #fff5be;
  font-weight: 900;
  font-size: 16px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.74), 0 0 12px rgba(243, 199, 96, 0.8);
  animation: numberFloat 0.8s ease-out forwards;
}

.fx-lightning-strike {
  width: 36px;
  height: 132px;
  transform: translate(var(--x), var(--y));
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), #d9f8ff 34%, #73d2de 72%, rgba(115, 210, 222, 0));
  clip-path: polygon(58% 0, 34% 38%, 55% 38%, 24% 100%, 84% 30%, 60% 30%);
  filter: drop-shadow(0 0 9px rgba(217, 248, 255, 0.95)) drop-shadow(0 0 18px rgba(115, 210, 222, 0.78));
  opacity: 0;
  animation: lightningStrike 0.46s cubic-bezier(0.12, 0.82, 0.18, 1) forwards;
}

.fx-lightning-strike::before,
.fx-lightning-strike::after {
  content: "";
  position: absolute;
  left: 13px;
  top: 22px;
  width: 8px;
  height: 84px;
  background: rgba(255, 255, 255, 0.86);
  clip-path: polygon(52% 0, 20% 42%, 46% 41%, 0 100%, 88% 32%, 58% 32%);
  filter: blur(1px);
}

.fx-lightning-strike::after {
  left: 4px;
  top: 40px;
  width: 28px;
  height: 58px;
  background: rgba(115, 210, 222, 0.38);
  filter: blur(6px);
}

.fx-element-impact {
  --c1: #fff5be;
  --c2: #f3c760;
  --c3: rgba(243, 199, 96, 0.18);
  --shadow: rgba(243, 199, 96, 0.7);
  width: 84px;
  height: 72px;
  transform: translate(var(--x), var(--y)) scale(calc(var(--scale, 1) * 0.55));
  transform-origin: center;
  opacity: 0;
  filter: drop-shadow(0 0 12px var(--shadow));
  animation: elementImpact 0.72s ease-out forwards;
}

.fx-element-impact::before,
.fx-element-impact::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.fx-asset-sprite {
  width: 224px;
  height: 224px;
  background-repeat: no-repeat;
  background-position: 0 0;
  transform-origin: center;
  image-rendering: auto;
  mix-blend-mode: screen;
  filter: drop-shadow(0 0 18px color-mix(in srgb, var(--asset-accent, #9de7ff) 76%, transparent)) drop-shadow(0 0 34px color-mix(in srgb, var(--asset-accent, #9de7ff) 36%, transparent));
  opacity: 0;
  will-change: transform, opacity, background-position;
  animation: assetSpriteMotion var(--duration, 980ms) ease-out forwards;
}

.fx-asset-sprite::after {
  content: attr(data-skill-no) " · " attr(data-frame-label);
  position: absolute;
  left: 50%;
  top: -22px;
  transform: translateX(-50%);
  padding: 3px 7px;
  border-radius: 999px;
  color: #091111;
  background: linear-gradient(180deg, #fff8d8, var(--asset-accent, #8bdfff));
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
  box-shadow: 0 0 14px color-mix(in srgb, var(--asset-accent, #9de7ff) 42%, transparent);
}

.fx-asset-sprite.combat-asset::after {
  display: none;
}

.fx-element-impact.thin {
  width: 72px;
  height: 66px;
}

.fx-element-impact.wide {
  width: 96px;
  height: 78px;
}

.fx-element-impact.heavy {
  width: 104px;
  height: 88px;
}

.fx-element-impact.thunder {
  --c1: #ffffff;
  --c2: #9be7ff;
  --shadow: rgba(115, 210, 222, 0.88);
}

.fx-element-impact.thunder::before {
  inset: 18px 9px 8px;
  border-radius: 50%;
  border: 2px solid rgba(217, 248, 255, 0.88);
  background: radial-gradient(circle, rgba(255, 255, 255, 0.92), rgba(115, 210, 222, 0.28) 42%, transparent 68%);
  box-shadow: 0 0 18px rgba(115, 210, 222, 0.76);
}

.fx-element-impact.thunder::after {
  left: 50%;
  top: 14px;
  width: 7px;
  height: 45px;
  background: linear-gradient(180deg, #fff, #73d2de, transparent);
  clip-path: polygon(62% 0, 14% 46%, 46% 46%, 0 100%, 88% 36%, 56% 36%);
  transform: translateX(-50%);
}

.fx-element-impact.metal {
  --c1: #fff5be;
  --c2: #f3c760;
  --shadow: rgba(243, 199, 96, 0.72);
}

.fx-element-impact.metal::before {
  left: 3px;
  top: 32px;
  width: calc(100% - 7px);
  height: 8px;
  background: linear-gradient(90deg, transparent, #fff 10%, var(--c1) 34%, var(--c2) 76%, transparent);
  clip-path: polygon(0 46%, 74% 30%, 100% 50%, 74% 70%, 0 54%);
  box-shadow: 0 0 16px var(--shadow);
  transform: rotate(-16deg);
}

.fx-element-impact.metal::after {
  left: 25%;
  top: 18px;
  width: 52%;
  height: 36px;
  border-top: 2px solid rgba(255, 255, 255, 0.72);
  border-bottom: 2px solid rgba(243, 199, 96, 0.52);
  transform: rotate(18deg) skewX(-18deg);
  opacity: 0.72;
}

.fx-element-impact.wood {
  --c1: #d7ff9c;
  --c2: #62d96b;
  --shadow: rgba(117, 224, 126, 0.72);
}

.fx-element-impact.wood::before {
  inset: 14px 10px 8px;
  border: 3px solid rgba(98, 217, 107, 0.82);
  border-left-color: rgba(34, 91, 42, 0.86);
  border-radius: 48% 54% 44% 58%;
  transform: rotate(-28deg);
  box-shadow: inset 0 0 14px rgba(117, 224, 126, 0.24), 0 0 16px var(--shadow);
}

.fx-element-impact.wood::after {
  left: 50%;
  top: 9px;
  width: 22px;
  height: 34px;
  border-radius: 100% 0 100% 0;
  background: linear-gradient(135deg, #eaffb5, var(--c2) 52%, #236c3b);
  box-shadow: -22px 22px 0 -5px rgba(98, 217, 107, 0.82), 22px 25px 0 -6px rgba(215, 255, 156, 0.72);
  transform: translateX(-50%) rotate(36deg);
}

.fx-element-impact.water {
  --c1: #d9f8ff;
  --c2: #73d2de;
  --shadow: rgba(115, 210, 222, 0.72);
}

.fx-element-impact.water::before {
  left: 8px;
  right: 8px;
  bottom: 12px;
  height: 38px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 35%, rgba(255, 255, 255, 0.95) 0 6px, transparent 7px),
    radial-gradient(circle at 68% 38%, rgba(217, 248, 255, 0.8) 0 5px, transparent 6px),
    radial-gradient(ellipse at center, rgba(115, 210, 222, 0.62), rgba(115, 210, 222, 0.18) 52%, transparent 72%);
  border: 2px solid rgba(217, 248, 255, 0.74);
}

.fx-element-impact.water::after {
  left: 25%;
  top: 8px;
  width: 48%;
  height: 44px;
  border-radius: 50% 50% 44% 56%;
  border-left: 5px solid rgba(217, 248, 255, 0.78);
  border-bottom: 4px solid rgba(115, 210, 222, 0.62);
  transform: rotate(-28deg);
}

.fx-element-impact.ice {
  --c1: #ffffff;
  --c2: #8bdfff;
  --shadow: rgba(217, 248, 255, 0.82);
}

.fx-element-impact.ice::before {
  left: 35%;
  top: 4px;
  width: 26px;
  height: 62px;
  background: linear-gradient(180deg, #fff, #d9f8ff 42%, #73d2de);
  clip-path: polygon(50% 0, 84% 24%, 68% 100%, 32% 100%, 16% 24%);
  box-shadow: -20px 17px 0 -6px rgba(217, 248, 255, 0.72), 22px 20px 0 -8px rgba(139, 223, 255, 0.62);
}

.fx-element-impact.ice::after {
  inset: 22px 6px 8px;
  border-radius: 50%;
  border: 2px solid rgba(217, 248, 255, 0.58);
  background: radial-gradient(circle, rgba(217, 248, 255, 0.18), transparent 66%);
}

.fx-element-impact.fire {
  --c1: #ffef7a;
  --c2: #ff7a42;
  --shadow: rgba(255, 110, 66, 0.86);
}

.fx-element-impact.fire::before {
  left: 26%;
  top: 5px;
  width: 48%;
  height: 70%;
  border-radius: 56% 48% 56% 8%;
  background:
    radial-gradient(circle at 54% 68%, #fff5be 0 13%, transparent 18%),
    linear-gradient(180deg, var(--c1), var(--c2) 54%, #b82418);
  box-shadow: 0 0 18px var(--shadow), -18px 20px 0 -12px rgba(255, 122, 66, 0.86), 18px 22px 0 -14px rgba(255, 239, 122, 0.78);
  transform: rotate(12deg);
}

.fx-element-impact.fire::after {
  inset: 34px 8px 5px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(255, 110, 66, 0.58), rgba(255, 110, 66, 0.12) 54%, transparent 72%);
}

.fx-element-impact.earth {
  --c1: #f0d58d;
  --c2: #9b7347;
  --shadow: rgba(215, 182, 109, 0.72);
}

.fx-element-impact.earth::before {
  left: 28%;
  top: 3px;
  width: 46%;
  height: 58%;
  background:
    radial-gradient(circle at 28% 20%, rgba(255, 245, 184, 0.46) 0 9%, transparent 20%),
    linear-gradient(145deg, var(--c1), var(--c2) 54%, #493528);
  clip-path: polygon(43% 0, 76% 12%, 100% 50%, 76% 92%, 40% 100%, 7% 72%, 0 34%);
  box-shadow: 0 0 16px var(--shadow);
  transform: rotate(-9deg);
}

.fx-element-impact.earth::after {
  left: 6px;
  right: 6px;
  bottom: 9px;
  height: 28px;
  border-radius: 50%;
  background:
    linear-gradient(14deg, transparent 0 32%, rgba(76, 57, 43, 0.9) 33% 38%, transparent 40% 100%),
    radial-gradient(ellipse, rgba(155, 115, 71, 0.58), rgba(215, 182, 109, 0.2) 52%, transparent 74%);
  box-shadow: 12px -2px 0 -9px rgba(240, 213, 141, 0.86), -14px -4px 0 -10px rgba(155, 115, 71, 0.86);
}

.fx-element-impact.crit::before {
  inset: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 245, 190, 0.88);
  box-shadow: 0 0 18px rgba(243, 199, 96, 0.72), inset 0 0 14px rgba(243, 199, 96, 0.26);
}

.fx-element-impact.crit::after {
  left: 12%;
  top: 48%;
  width: 76%;
  height: 5px;
  background: linear-gradient(90deg, transparent, #fff5be, #f3c760, transparent);
  transform: rotate(-20deg);
}

.fx-fire-sprite {
  width: 184px;
  height: 184px;
  background-repeat: no-repeat;
  background-size: 400% 400%;
  background-position: 0 0;
  transform-origin: center;
  image-rendering: auto;
  mix-blend-mode: screen;
  opacity: 0;
  will-change: transform, opacity, background-position;
}

.fx-fire-sprite.palm {
  background-image: url("./gameimg/assets/images/skill_fx_anim/anim_fire_palm.webp");
  filter: drop-shadow(0 0 16px rgba(255, 139, 64, 0.88)) drop-shadow(0 0 30px rgba(255, 230, 157, 0.42));
  animation:
    fireSpriteMotion var(--duration, 720ms) ease-out forwards,
    fireFramesHuang var(--duration, 720ms) steps(1, end) forwards;
}

.fx-fire-sprite.lotus {
  background-image: url("./gameimg/assets/images/skill_fx_anim/anim_fire_lotus.webp");
  filter: drop-shadow(0 0 15px rgba(255, 184, 86, 0.86)) drop-shadow(0 0 30px rgba(255, 90, 46, 0.36));
  transform-origin: 50% 62%;
  animation:
    fireSealMotion var(--duration, 660ms) ease-out forwards,
    fireFramesHuang var(--duration, 660ms) steps(1, end) forwards;
}

.fx-fire-sprite.tier-fan {
  animation-name: fireSpriteMotion, fireFramesFan;
}

.fx-fire-sprite.lotus.tier-fan {
  animation-name: fireSealMotion, fireFramesFan;
}

.fx-fire-sprite.tier-huang {
  animation-name: fireSpriteMotion, fireFramesHuang;
}

.fx-fire-sprite.lotus.tier-huang {
  animation-name: fireSealMotion, fireFramesHuang;
}

.fx-fire-sprite.tier-xuan {
  animation-name: fireSpriteMotion, fireFramesXuan;
}

.fx-fire-sprite.lotus.tier-xuan {
  animation-name: fireSealMotion, fireFramesXuan;
}

.fx-fire-sprite.tier-di {
  animation-name: fireSpriteMotion, fireFramesDi;
}

.fx-fire-sprite.lotus.tier-di {
  animation-name: fireSealMotion, fireFramesDi;
}

.fx-fire-sprite.tier-tian {
  animation-name: fireSpriteMotion, fireFramesTian;
}

.fx-fire-sprite.lotus.tier-tian {
  animation-name: fireSealMotion, fireFramesTian;
}

.fx-fire-sprite.bolt {
  --rise: -18px;
}

.fx-fire-sprite.burst {
  --rise: -10px;
}

.fx-fire-sprite.ring {
  --rise: -4px;
}

.fx-fire-sprite.rain {
  --rise: -26px;
}

.fx-fire-sprite.lotus.bolt {
  --seal-tilt: -8deg;
}

.fx-fire-sprite.lotus.burst {
  --seal-tilt: 0deg;
}

.fx-fire-sprite.lotus.ring {
  --seal-tilt: 12deg;
}

.fx-fire-sprite.lotus.rain {
  --seal-tilt: -4deg;
}

.fx-water-sprite {
  width: 184px;
  height: 184px;
  background-image: url("./gameimg/assets/images/skill_fx_anim/anim_ice_sword.webp");
  background-repeat: no-repeat;
  background-size: 400% 400%;
  background-position: 0 0;
  transform-origin: center;
  image-rendering: auto;
  mix-blend-mode: screen;
  opacity: 0;
  will-change: transform, opacity, background-position;
  filter: drop-shadow(0 0 16px rgba(217, 248, 255, 0.9)) drop-shadow(0 0 32px rgba(115, 210, 222, 0.46));
  animation:
    waterIceSpriteMotion var(--duration, 720ms) ease-out forwards,
    waterFramesHuang var(--duration, 720ms) steps(1, end) forwards;
}

.fx-water-sprite.tier-fan {
  animation-name: waterIceSpriteMotion, waterFramesFan;
}

.fx-water-sprite.tier-huang {
  animation-name: waterIceSpriteMotion, waterFramesHuang;
}

.fx-water-sprite.tier-xuan {
  animation-name: waterIceSpriteMotion, waterFramesXuan;
}

.fx-water-sprite.tier-di {
  animation-name: waterIceSpriteMotion, waterFramesDi;
}

.fx-water-sprite.tier-tian {
  animation-name: waterIceSpriteMotion, waterFramesTian;
}

.fx-water-sprite.surge,
.fx-water-sprite.ripple,
.fx-water-sprite.storm {
  background-image: url("./gameimg/assets/images/skill_fx_anim/anim_water_wave.webp");
  filter: drop-shadow(0 0 16px rgba(115, 210, 222, 0.88)) drop-shadow(0 0 30px rgba(51, 167, 207, 0.38));
}

.fx-water-sprite.surge.tier-fan,
.fx-water-sprite.ripple.tier-fan,
.fx-water-sprite.storm.tier-fan {
  animation-name: waterWaveSpriteMotion, waterFramesFan;
}

.fx-water-sprite.surge.tier-huang,
.fx-water-sprite.ripple.tier-huang,
.fx-water-sprite.storm.tier-huang {
  animation-name: waterWaveSpriteMotion, waterFramesHuang;
}

.fx-water-sprite.surge.tier-xuan,
.fx-water-sprite.ripple.tier-xuan,
.fx-water-sprite.storm.tier-xuan {
  animation-name: waterWaveSpriteMotion, waterFramesXuan;
}

.fx-water-sprite.surge.tier-di,
.fx-water-sprite.ripple.tier-di,
.fx-water-sprite.storm.tier-di {
  animation-name: waterWaveSpriteMotion, waterFramesDi;
}

.fx-water-sprite.surge.tier-tian,
.fx-water-sprite.ripple.tier-tian,
.fx-water-sprite.storm.tier-tian {
  animation-name: waterWaveSpriteMotion, waterFramesTian;
}

.fx-water-sprite.surge {
  --water-rise: -12px;
  --wave-tilt: -4deg;
}

.fx-water-sprite.sword {
  --water-rise: -22px;
}

.fx-water-sprite.burst {
  --water-rise: -16px;
}

.fx-water-sprite.ripple {
  --water-rise: -4px;
  --wave-tilt: 10deg;
}

.fx-water-sprite.storm {
  --water-rise: -24px;
  --wave-tilt: -8deg;
}


.fx-element-bolt {
  width: calc(112px * var(--scale, 1));
  height: 14px;
  border-radius: 999px;
  transform: translate(var(--x0), var(--y0)) rotate(var(--rot)) scaleX(0.35);
  transform-origin: left center;
  filter: blur(0.1px) drop-shadow(0 0 10px currentColor);
  animation: elementBolt 0.58s ease-out forwards;
}

.fx-element-bolt.wood { color: #75e07e; background: linear-gradient(90deg, transparent, #75e07e, #d7ff9c, transparent); }
.fx-element-bolt.metal { color: #f3c760; background: linear-gradient(90deg, transparent, #fff5be, #f3c760, transparent); }
.fx-element-bolt.water { color: #73d2de; background: linear-gradient(90deg, transparent, #73d2de, #d9f8ff, transparent); }
.fx-element-bolt.ice { color: #d9f8ff; background: linear-gradient(90deg, transparent, #d9f8ff, #8bdfff, transparent); }
.fx-element-bolt.fire { color: #ffb357; background: linear-gradient(90deg, transparent, #ffef7a, #ff6b42, transparent); }
.fx-element-bolt.earth { color: #d7b66d; background: linear-gradient(90deg, transparent, #f0d58d, #9b7347, transparent); }

.fx-cast-mark {
  width: 70px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid currentColor;
  box-shadow: 0 0 14px currentColor, inset 0 0 12px color-mix(in srgb, currentColor 34%, transparent);
  opacity: 0;
  transform: translate(var(--x), var(--y)) scale(calc(var(--scale, 1) * 0.45));
  animation: castMarkPulse 0.46s ease-out forwards;
}

.fx-cast-mark::before {
  content: "";
  position: absolute;
  inset: 9px 16px;
  border-radius: 50%;
  border: 1px dashed currentColor;
  opacity: 0.7;
}

.fx-cast-mark.fire { color: rgba(255, 132, 62, 0.86); }
.fx-cast-mark.water { color: rgba(115, 210, 222, 0.86); }
.fx-cast-mark.ice { color: rgba(217, 248, 255, 0.9); }

.fx-ice-cast {
  width: calc(128px * var(--scale, 1));
  height: calc(18px * var(--scale, 1));
  border-radius: 999px;
  clip-path: polygon(0 50%, 18% 14%, 76% 18%, 100% 50%, 76% 82%, 18% 86%);
  background:
    linear-gradient(90deg, transparent 0 4%, rgba(234, 254, 255, 0.96) 16%, #8bdfff 58%, rgba(217, 248, 255, 0.32) 86%, transparent 100%);
  filter: drop-shadow(0 0 10px rgba(217, 248, 255, 0.82)) drop-shadow(0 0 18px rgba(115, 210, 222, 0.48));
  transform-origin: left center;
  transform: translate(var(--x0), var(--y0)) rotate(var(--rot)) scaleX(0.18);
  opacity: 0;
  animation: iceCastFly 0.54s cubic-bezier(0.12, 0.76, 0.22, 1) forwards;
}

.fx-ice-cast::after {
  content: "";
  position: absolute;
  left: 18%;
  right: 8%;
  top: 47%;
  height: 2px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.9), transparent);
  opacity: 0.82;
}

.fx-element-particle {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  transform: translate(var(--x), var(--y));
  animation: elementParticle 0.72s ease-out forwards;
}

.fx-element-particle.leaf,
.fx-element-particle.wood { background: #7bea84; box-shadow: 0 0 12px rgba(117, 224, 126, 0.68); border-radius: 70% 0 70% 0; }
.fx-element-particle.water { background: #73d2de; box-shadow: 0 0 12px rgba(115, 210, 222, 0.68); }
.fx-element-particle.ice { background: #e4fbff; box-shadow: 0 0 14px rgba(217, 248, 255, 0.76); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.fx-element-particle.fire { background: #ff7a42; box-shadow: 0 0 16px rgba(255, 110, 66, 0.8); border-radius: 50% 50% 50% 0; }
.fx-element-particle.earth,
.fx-element-particle.dust { background: #b68a55; box-shadow: 0 0 10px rgba(215, 182, 109, 0.58); border-radius: 2px; }

.fx-vine-snare {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  border: 2px dashed rgba(117, 224, 126, 0.72);
  transform: translate(var(--x), var(--y)) scale(0.3) rotate(0deg);
  box-shadow: 0 0 18px rgba(117, 224, 126, 0.34), inset 0 0 16px rgba(117, 224, 126, 0.2);
  animation: vineSnare 0.86s ease-out forwards;
}

.fx-leaf-blade {
  width: 16px;
  height: 25px;
  border-radius: 100% 0 100% 0;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.45), transparent 24%),
    linear-gradient(135deg, #d9ff9c, #62d96b 54%, #1f7d43);
  box-shadow: 0 0 12px rgba(117, 224, 126, 0.72);
  transform-origin: 50% 80%;
  animation: leafWhirl 0.78s cubic-bezier(0.14, 0.78, 0.2, 1) forwards;
}

.fx-branch-wrap {
  width: 96px;
  height: 104px;
  border-radius: 46% 54% 50% 50%;
  border: 4px solid rgba(86, 148, 67, 0.82);
  border-left-color: rgba(195, 255, 140, 0.82);
  border-bottom-color: rgba(38, 92, 44, 0.84);
  box-shadow: inset 0 0 18px rgba(117, 224, 126, 0.2), 0 0 22px rgba(117, 224, 126, 0.36);
  transform: translate(var(--x), var(--y)) scale(calc(var(--scale, 1) * 0.35)) rotate(-28deg);
  animation: branchWrap 0.96s ease-out forwards;
}

.fx-branch-wrap::before,
.fx-branch-wrap::after {
  content: "";
  position: absolute;
  width: 74px;
  height: 4px;
  left: 12px;
  top: 44px;
  border-radius: 999px;
  background: linear-gradient(90deg, #214522, #85e078, #2e6d34);
  box-shadow: 0 0 10px rgba(117, 224, 126, 0.52);
}

.fx-branch-wrap::after {
  transform: rotate(68deg);
}

.fx-water-stream {
  width: calc(150px * var(--scale, 1));
  height: 22px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.95) 0 4px, transparent 5px),
    linear-gradient(90deg, transparent, rgba(115, 210, 222, 0.42), #d9f8ff 45%, #73d2de 72%, transparent);
  filter: drop-shadow(0 0 12px rgba(115, 210, 222, 0.72));
  transform-origin: left center;
  animation: waterStream 0.64s ease-out forwards;
}

.fx-water-stream::before {
  content: "";
  position: absolute;
  inset: 4px 18px;
  border-radius: 999px;
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.72) 0 10px, transparent 10px 22px);
  opacity: 0.65;
}

.fx-ice-prison {
  width: 96px;
  height: 104px;
  border-radius: 42% 42% 48% 48%;
  border: 2px solid rgba(217, 248, 255, 0.72);
  background:
    linear-gradient(120deg, transparent 0 18%, rgba(217, 248, 255, 0.58) 20% 24%, transparent 27% 48%, rgba(139, 223, 255, 0.34) 50% 55%, transparent 58%),
    radial-gradient(circle at 50% 58%, rgba(217, 248, 255, 0.16), transparent 62%);
  box-shadow: inset 0 0 20px rgba(217, 248, 255, 0.28), 0 0 24px rgba(115, 210, 222, 0.42);
  transform: translate(var(--x), var(--y)) scale(calc(var(--scale, 1) * 0.45));
  animation: icePrison 0.92s ease-out forwards;
}

.fx-ice-crystal {
  width: 14px;
  height: 44px;
  background: linear-gradient(180deg, #fff, #d9f8ff 48%, #73d2de);
  clip-path: polygon(50% 0, 86% 24%, 66% 100%, 34% 100%, 14% 24%);
  box-shadow: 0 0 14px rgba(217, 248, 255, 0.78);
  transform-origin: bottom center;
  animation: iceCrystal 0.72s ease-out forwards;
}

.fx-flame-tongue {
  width: 24px;
  height: 42px;
  border-radius: 50% 50% 50% 0;
  background:
    radial-gradient(circle at 54% 70%, #fff5be 0 12%, transparent 18%),
    linear-gradient(180deg, #ffef7a, #ff7a42 52%, #b82418);
  box-shadow: 0 0 16px rgba(255, 110, 66, 0.9), 0 0 28px rgba(255, 179, 87, 0.44);
  transform-origin: 50% 100%;
  animation: flameBurn 0.82s ease-out forwards;
}

.fx-mountain-chunk {
  width: calc(64px * var(--scale, 1));
  height: calc(58px * var(--scale, 1));
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.3), transparent 28%),
    linear-gradient(145deg, #f0d58d, #9b7347 52%, #4c392b);
  clip-path: polygon(50% 0, 100% 82%, 70% 100%, 18% 92%, 0 62%);
  filter: drop-shadow(0 0 14px rgba(215, 182, 109, 0.56));
  transform-origin: center;
  animation: mountainChunk 0.62s cubic-bezier(0.13, 0.76, 0.2, 1) forwards;
}

.fx-rock-chunk {
  width: 18px;
  height: 16px;
  background: linear-gradient(145deg, #f0d58d, #9b7347 58%, #5a402d);
  clip-path: polygon(28% 0, 80% 8%, 100% 54%, 70% 100%, 16% 88%, 0 38%);
  box-shadow: 0 0 10px rgba(215, 182, 109, 0.54);
  animation: rockBurst 0.78s ease-out forwards;
}

.fx-mountain-seal {
  width: 104px;
  height: 96px;
  background:
    linear-gradient(145deg, transparent 0 37%, rgba(240, 213, 141, 0.78) 38% 43%, transparent 45%),
    linear-gradient(215deg, transparent 0 44%, rgba(155, 115, 71, 0.72) 45% 51%, transparent 53%);
  border-bottom: 4px solid rgba(240, 213, 141, 0.82);
  clip-path: polygon(50% 0, 100% 74%, 84% 100%, 16% 100%, 0 74%);
  filter: drop-shadow(0 0 16px rgba(215, 182, 109, 0.62));
  animation: mountainSeal 0.9s ease-out forwards;
}

.fx-earth-seal-sprite {
  width: calc(156px * var(--scale, 1));
  height: calc(156px * var(--scale, 1));
  background-image: url("./gameimg/assets/images/skill_fx_anim/anim_earth_seal.webp");
  background-repeat: no-repeat;
  background-size: 400% 400%;
  background-position: var(--sprite-pos, 66.6667% 33.3333%);
  transform: translate(var(--x), var(--y)) scale(0.44) rotate(-10deg);
  filter: drop-shadow(0 0 18px rgba(240, 213, 141, 0.82)) drop-shadow(0 0 34px rgba(155, 115, 71, 0.48));
  mix-blend-mode: screen;
  animation: earthSealSprite 1.12s ease-out forwards;
}

.fx-earth-seal-sprite.peak {
  --sprite-pos: 66.6667% 33.3333%;
}

.fx-earth-seal-sprite.obelisk {
  --sprite-pos: 100% 33.3333%;
}

.fx-earth-seal-sheet {
  width: calc(156px * var(--scale, 1));
  height: calc(156px * var(--scale, 1));
  background-image: url("./gameimg/assets/images/skill_fx_anim/anim_earth_seal.webp");
  background-repeat: no-repeat;
  background-size: 400% 400%;
  background-position: 0 0;
  transform: translate(var(--x), var(--y)) scale(calc(var(--scale, 1) * 0.45)) rotate(-18deg);
  filter: drop-shadow(0 0 18px rgba(240, 213, 141, 0.9)) drop-shadow(0 0 34px rgba(155, 115, 71, 0.52));
  mix-blend-mode: screen;
  animation:
    earthSealSheetFrames 1.24s steps(1, end) forwards,
    earthSealSheetMotion 1.24s ease-out forwards;
}

.fx-earth-seal-sheet.press {
  width: calc(176px * var(--scale, 1));
  height: calc(176px * var(--scale, 1));
  filter: drop-shadow(0 0 22px rgba(240, 213, 141, 1)) drop-shadow(0 0 44px rgba(155, 115, 71, 0.66));
}

.fx-earth-cast-circle {
  width: calc(92px * var(--scale, 1));
  height: calc(72px * var(--scale, 1));
  border-radius: 50%;
  border: 2px solid rgba(240, 213, 141, 0.72);
  background:
    radial-gradient(circle, rgba(255, 230, 157, 0.34), transparent 48%),
    conic-gradient(from 0deg, transparent, rgba(240, 213, 141, 0.9), transparent 22%, rgba(155, 115, 71, 0.72), transparent 45%);
  box-shadow: inset 0 0 18px rgba(240, 213, 141, 0.2), 0 0 18px rgba(215, 182, 109, 0.42);
  transform: translate(var(--x), var(--y)) scale(0.38) rotate(0deg);
  animation: earthCastCircle 0.76s ease-out forwards;
}

.fx-earth-crack-path {
  height: 34px;
  background:
    linear-gradient(90deg, rgba(240, 213, 141, 0.85), transparent 12% 18%, rgba(155, 115, 71, 0.9) 20% 27%, transparent 30% 38%, rgba(240, 213, 141, 0.72) 40% 48%, transparent 52%),
    linear-gradient(15deg, transparent 0 44%, rgba(76, 57, 43, 0.95) 45% 54%, transparent 56%);
  clip-path: polygon(0 45%, 8% 22%, 18% 50%, 29% 32%, 42% 62%, 56% 38%, 70% 58%, 84% 30%, 100% 54%, 100% 82%, 0 74%);
  filter: drop-shadow(0 0 10px rgba(215, 182, 109, 0.48));
  transform-origin: left center;
  animation: earthCrackPath 0.66s ease-out forwards;
}

.fx-earth-pillar {
  width: 26px;
  height: 82px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.32), transparent 24%),
    linear-gradient(180deg, #f0d58d, #9b7347 48%, #443328);
  clip-path: polygon(48% 0, 82% 18%, 100% 100%, 0 100%, 18% 18%);
  filter: drop-shadow(0 0 12px rgba(215, 182, 109, 0.62));
  transform-origin: 50% 100%;
  animation: earthPillarRise 0.68s cubic-bezier(0.12, 0.82, 0.2, 1) forwards;
}

.fx-earth-rift {
  width: 124px;
  height: 30px;
  background:
    linear-gradient(92deg, transparent 0 10%, rgba(255, 232, 159, 0.9) 11% 14%, transparent 16% 24%, rgba(155, 115, 71, 0.88) 25% 29%, transparent 31% 45%, rgba(240, 213, 141, 0.86) 47% 51%, transparent 52%),
    linear-gradient(24deg, transparent 0 36%, rgba(88, 62, 42, 0.96) 38% 45%, transparent 47%);
  filter: drop-shadow(0 0 11px rgba(215, 182, 109, 0.52));
  transform-origin: center;
  animation: earthRiftOpen 0.74s ease-out forwards;
}

.fx-earth-orbit-stone {
  width: 22px;
  height: 20px;
  background: linear-gradient(145deg, #f2dc9c, #a77b4e 62%, #4f3a2b);
  clip-path: polygon(25% 0, 82% 10%, 100% 58%, 65% 100%, 12% 82%, 0 34%);
  box-shadow: 0 0 12px rgba(215, 182, 109, 0.62);
  animation: earthOrbitStone 0.82s ease-out forwards;
}

.fx-earth-drop {
  width: calc(78px * var(--scale, 1));
  height: calc(70px * var(--scale, 1));
  background:
    radial-gradient(circle at 28% 20%, rgba(255, 245, 184, 0.48) 0 9%, transparent 21%),
    linear-gradient(34deg, transparent 0 39%, rgba(55, 39, 30, 0.5) 40% 43%, transparent 44%),
    linear-gradient(126deg, transparent 0 45%, rgba(255, 221, 132, 0.26) 46% 49%, transparent 50%),
    linear-gradient(145deg, #d9bd78 0 22%, #a2764b 23% 47%, #71523d 48% 72%, #332720 73% 100%);
  clip-path: polygon(43% 0, 70% 7%, 93% 27%, 100% 61%, 82% 88%, 51% 100%, 18% 90%, 0 56%, 10% 20%);
  filter: drop-shadow(0 0 16px rgba(215, 182, 109, 0.52)) drop-shadow(0 18px 14px rgba(26, 17, 13, 0.34));
  transform-origin: center;
  will-change: transform, opacity;
  animation: earthDrop 0.78s cubic-bezier(0.13, 0.74, 0.18, 1) forwards;
}

.fx-earth-drop::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(78deg, transparent 0 33%, rgba(39, 28, 23, 0.7) 34% 36%, transparent 37%),
    linear-gradient(18deg, transparent 0 57%, rgba(44, 31, 24, 0.58) 58% 61%, transparent 62%),
    linear-gradient(142deg, transparent 0 24%, rgba(255, 231, 149, 0.28) 25% 28%, transparent 29%);
  clip-path: polygon(43% 0, 70% 7%, 93% 27%, 100% 61%, 82% 88%, 51% 100%, 18% 90%, 0 56%, 10% 20%);
}

.fx-earth-drop::after {
  content: "";
  position: absolute;
  left: 18%;
  top: -72%;
  width: 56%;
  height: 88%;
  border-radius: 50%;
  background: linear-gradient(180deg, transparent 0%, rgba(215, 182, 109, 0.18) 36%, rgba(115, 78, 48, 0.34) 100%);
  filter: blur(5px);
  transform: rotate(var(--trail-rot, -8deg));
  opacity: 0.76;
}

.fx-earth-drop.rugged {
  clip-path: polygon(38% 0, 72% 10%, 100% 39%, 91% 77%, 62% 100%, 26% 92%, 0 65%, 8% 24%);
}

.fx-earth-drop.flat {
  clip-path: polygon(24% 6%, 67% 0, 98% 31%, 100% 64%, 72% 94%, 27% 100%, 0 68%, 5% 29%);
}

.fx-earth-drop.heavy {
  filter: drop-shadow(0 0 20px rgba(215, 182, 109, 0.66)) drop-shadow(0 22px 18px rgba(21, 13, 9, 0.44));
}

.fx-earth-dust-cloud {
  width: calc(120px * var(--scale, 1));
  height: calc(70px * var(--scale, 1));
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 54%, rgba(240, 213, 141, 0.58), transparent 24%),
    radial-gradient(circle at 58% 48%, rgba(155, 115, 71, 0.58), transparent 28%),
    radial-gradient(circle at 76% 64%, rgba(93, 68, 45, 0.44), transparent 30%);
  filter: blur(1px) drop-shadow(0 0 10px rgba(215, 182, 109, 0.34));
  transform-origin: center;
  animation: earthDustCloud 0.82s ease-out forwards;
}

.fx-number.heal {
  color: #8dffd8;
}

.fx-wave {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(255, 230, 157, 0.7);
  box-shadow: 0 0 18px rgba(243, 199, 96, 0.48);
  animation: waveBloom 0.7s ease-out forwards;
}

.fx-ring {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  border: 2px solid rgba(115, 210, 222, 0.82);
  box-shadow: inset 0 0 18px rgba(115, 210, 222, 0.36), 0 0 22px rgba(115, 210, 222, 0.36);
  animation: ringPulse 0.9s ease-out forwards;
}

.fx-status-root,
.fx-status-slow {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  transform: translate(var(--x), var(--y));
  mix-blend-mode: screen;
  opacity: 0;
}

.fx-status-root {
  border: 2px solid rgba(255, 230, 157, 0.9);
  background:
    radial-gradient(circle, transparent 0 42%, rgba(243, 199, 96, 0.2) 43% 54%, transparent 55%),
    conic-gradient(from 20deg, transparent 0 12%, rgba(255, 245, 190, 0.96) 13% 16%, transparent 17% 42%, rgba(243, 199, 96, 0.92) 43% 47%, transparent 48%);
  box-shadow: inset 0 0 22px rgba(243, 199, 96, 0.32), 0 0 24px rgba(243, 199, 96, 0.54);
  animation: statusRootPulse 1.05s ease-out forwards;
}

.fx-status-root::before,
.fx-status-root::after,
.fx-status-slow::before,
.fx-status-slow::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.fx-status-root::before {
  left: 50%;
  top: 12px;
  width: 8px;
  height: 72px;
  border-radius: 999px;
  background: linear-gradient(180deg, transparent, #fff5be, #f3c760, transparent);
  box-shadow: -26px 7px 0 -2px rgba(255, 230, 157, 0.72), 26px 7px 0 -2px rgba(255, 230, 157, 0.72);
  transform: translateX(-50%);
}

.fx-status-root::after {
  inset: 23px;
  border-radius: 50%;
  border: 1px solid rgba(255, 245, 190, 0.82);
  box-shadow: 0 0 18px rgba(255, 230, 157, 0.54);
}

.fx-status-slow {
  border: 2px solid rgba(217, 248, 255, 0.86);
  background:
    radial-gradient(ellipse at 50% 70%, rgba(115, 210, 222, 0.28), transparent 56%),
    conic-gradient(from 140deg, transparent, rgba(115, 210, 222, 0.76), transparent 36%, rgba(217, 248, 255, 0.65), transparent 70%);
  box-shadow: inset 0 0 24px rgba(115, 210, 222, 0.32), 0 0 24px rgba(115, 210, 222, 0.46);
  animation: statusSlowPulse 1.1s ease-out forwards;
}

.fx-status-slow::before {
  left: 18px;
  right: 18px;
  top: 42px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(90deg, transparent, rgba(217, 248, 255, 0.92), rgba(115, 210, 222, 0.32), transparent);
  filter: blur(1px);
}

.fx-status-slow::after {
  inset: 16px;
  border-radius: 50%;
  border: 1px dashed rgba(217, 248, 255, 0.72);
}

.fx-status-stun,
.fx-status-burn,
.fx-status-poison,
.fx-status-bleed,
.fx-status-burst,
.fx-status-weaken,
.fx-status-vulnerable {
  --status-color: #ffe69d;
  --status-soft: rgba(243, 199, 96, 0.22);
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 2px solid var(--status-color);
  background:
    radial-gradient(circle at 50% 50%, var(--status-soft), transparent 60%),
    conic-gradient(from 30deg, transparent, var(--status-color), transparent 32%, var(--status-soft), transparent 70%);
  box-shadow: inset 0 0 20px var(--status-soft), 0 0 22px var(--status-soft);
  mix-blend-mode: screen;
  opacity: 0;
  animation: statusAffixPulse 0.86s ease-out forwards;
}

.fx-status-stun { --status-color: #d9f8ff; --status-soft: rgba(115, 210, 222, 0.34); }
.fx-status-burn { --status-color: #ffb357; --status-soft: rgba(255, 110, 66, 0.36); }
.fx-status-poison { --status-color: #9dff88; --status-soft: rgba(117, 224, 126, 0.32); }
.fx-status-bleed { --status-color: #ff879a; --status-soft: rgba(255, 135, 154, 0.34); }
.fx-status-weaken { --status-color: #c8b8ff; --status-soft: rgba(182, 156, 255, 0.3); }
.fx-status-vulnerable { --status-color: #fff5be; --status-soft: rgba(255, 230, 157, 0.32); }

.fx-status-burst {
  width: 104px;
  height: 104px;
  --status-color: #fff5be;
  --status-soft: rgba(255, 230, 157, 0.4);
  animation: statusBurstPulse 0.72s ease-out forwards;
}

.fx-status-stun::before,
.fx-status-burn::before,
.fx-status-poison::before,
.fx-status-bleed::before,
.fx-status-burst::before,
.fx-status-weaken::before,
.fx-status-vulnerable::before {
  content: "";
  position: absolute;
  inset: 24px;
  border-radius: inherit;
  border: 1px solid var(--status-color);
  box-shadow: 0 0 14px var(--status-color);
}

.fx-status-bleed::after,
.fx-status-vulnerable::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  top: 43px;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--status-color), #fff, var(--status-color), transparent);
  box-shadow: 0 0 14px var(--status-color);
  transform: rotate(-24deg);
}

.fx-treasure-projectile {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-repeat: no-repeat;
  background-size: 200% 200%;
  background-position: 0 0;
  mix-blend-mode: screen;
  filter: drop-shadow(0 0 10px rgba(255, 230, 157, 0.9)) drop-shadow(0 0 18px rgba(87, 214, 177, 0.42));
  transform-origin: center;
  animation: treasureProjectileFly 0.62s cubic-bezier(0.13, 0.72, 0.18, 1) forwards;
}

.fx-treasure-impact {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background-repeat: no-repeat;
  background-size: 200% 200%;
  background-position: 0 0;
  mix-blend-mode: screen;
  filter: drop-shadow(0 0 16px rgba(255, 230, 157, 0.9)) drop-shadow(0 0 28px rgba(87, 214, 177, 0.42));
  opacity: 0;
  transform-origin: center;
  animation: treasureImpactPop 0.58s ease-out forwards;
}

.fx-treasure-impact::after {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  border: 1px solid rgba(255, 230, 157, 0.76);
  box-shadow: inset 0 0 16px rgba(255, 230, 157, 0.28), 0 0 18px rgba(87, 214, 177, 0.32);
}

.fx-star {
  width: 12px;
  height: 12px;
  background: #fff5be;
  clip-path: polygon(50% 0, 62% 34%, 98% 35%, 68% 56%, 79% 91%, 50% 70%, 21% 91%, 32% 56%, 2% 35%, 38% 34%);
  box-shadow: 0 0 16px rgba(255, 230, 157, 0.9);
  animation: starFall 0.75s ease-in forwards;
}

.fx-shard {
  width: 8px;
  height: 18px;
  background: linear-gradient(180deg, #bfefff, #73d2de);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  animation: shardBurst 0.62s ease-out forwards;
}

.fx-sword-frame {
  width: 92px;
  height: 24px;
  transform-origin: center;
  opacity: 0;
  background:
    linear-gradient(90deg, #4b2c1c 0 7%, #ffe69d 7% 12%, transparent 12% 15%, rgba(255, 255, 255, 0.95) 20%, #fff5be 46%, #f3c760 74%, transparent 96%),
    radial-gradient(ellipse at 82% 50%, rgba(115, 210, 222, 0.7), transparent 42%);
  clip-path: polygon(0 42%, 5% 42%, 5% 22%, 10% 22%, 10% 39%, 78% 39%, 100% 50%, 78% 61%, 10% 61%, 10% 78%, 5% 78%, 5% 58%, 0 58%);
  mix-blend-mode: screen;
  filter: drop-shadow(0 0 8px rgba(255, 230, 157, 0.95)) drop-shadow(0 0 16px rgba(87, 214, 177, 0.35));
  animation: swordFrameFlash 0.42s steps(5, end) forwards;
}

.fx-sword-frame.multi,
.fx-sword-frame.pierce {
  background:
    linear-gradient(90deg, #284745 0 7%, #dffcff 7% 12%, transparent 12% 15%, rgba(255, 255, 255, 0.92) 20%, #dffcff 44%, #73d2de 76%, transparent 96%),
    radial-gradient(ellipse at 82% 50%, rgba(87, 214, 177, 0.76), transparent 44%);
}

.fx-sword-frame.heavy,
.fx-sword-frame.execute {
  width: 110px;
  height: 22px;
  background:
    linear-gradient(90deg, #4b2c1c 0 7%, #ffe69d 7% 12%, transparent 12% 15%, rgba(255, 255, 255, 0.95) 20%, #fff5be 42%, #ff879a 74%, transparent 96%),
    radial-gradient(ellipse at 82% 50%, rgba(255, 135, 154, 0.7), transparent 42%);
}

.fx-sword-frame.aoe {
  width: 72px;
}

.fx-impact-frame {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  opacity: 0;
  border: 2px solid rgba(255, 230, 157, 0.7);
  background:
    radial-gradient(circle, rgba(255, 245, 190, 0.75), transparent 26%),
    conic-gradient(from 45deg, transparent, rgba(243, 199, 96, 0.9), transparent 33%, rgba(87, 214, 177, 0.55), transparent 66%);
  mix-blend-mode: screen;
  filter: drop-shadow(0 0 12px rgba(243, 199, 96, 0.75));
  animation: impactFramePop 0.48s steps(4, end) forwards;
}

.fx-impact-frame.multi,
.fx-impact-frame.pierce {
  border-color: rgba(115, 210, 222, 0.8);
  background:
    radial-gradient(circle, rgba(223, 252, 255, 0.75), transparent 26%),
    conic-gradient(from 45deg, transparent, rgba(115, 210, 222, 0.9), transparent 33%, rgba(87, 214, 177, 0.55), transparent 66%);
}

.fx-impact-frame.aoe {
  width: 64px;
  height: 64px;
}

.fx-impact-frame.heavy,
.fx-impact-frame.execute {
  width: 72px;
  height: 72px;
  border-color: rgba(255, 135, 154, 0.85);
  background:
    radial-gradient(circle, rgba(255, 245, 190, 0.85), transparent 24%),
    conic-gradient(from 25deg, transparent, rgba(255, 135, 154, 0.92), transparent 36%, rgba(243, 199, 96, 0.72), transparent 68%);
}

.screen-shake {
  animation: screenShake 0.28s linear;
}

@keyframes itemGradeSweep {
  0% {
    opacity: 0.12;
    transform: translateX(-74%) rotate(0.001deg);
  }
  42% {
    opacity: 0.36;
  }
  100% {
    opacity: 0.12;
    transform: translateX(74%) rotate(0.001deg);
  }
}

@keyframes itemGradePulse {
  0%,
  100% {
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 0 18px var(--grade-glow), 0 0 30px rgba(255, 255, 255, 0.04);
  }
  50% {
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14), 0 0 28px var(--grade-glow), 0 0 46px rgba(255, 230, 157, 0.2);
  }
}

@keyframes itemPopoverPulse {
  0%,
  100% {
    box-shadow: 0 0 34px var(--grade-glow), 0 24px 70px rgba(0, 0, 0, 0.62), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  }
  50% {
    box-shadow: 0 0 46px var(--grade-glow), 0 24px 78px rgba(0, 0, 0, 0.66), inset 0 0 0 1px rgba(255, 230, 157, 0.16);
  }
}

@keyframes skillChipCast {
  0% {
    transform: translateY(0) scale(1);
    filter: brightness(1);
  }
  18% {
    transform: translateY(-6px) scale(1.18);
    filter: brightness(1.34);
  }
  100% {
    transform: translateY(-3px) scale(1.06);
    filter: brightness(1);
  }
}

@keyframes skillTextPulse {
  0% {
    transform: scale(0.92);
    opacity: 0.72;
  }
  28% {
    transform: scale(1.12);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes skillCastName {
  0% {
    opacity: 0;
    transform: translate(-50%, 7px) scale(0.86);
  }
  18% {
    opacity: 1;
    transform: translate(-50%, -2px) scale(1.12);
  }
  78% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -10px) scale(1);
  }
}

@keyframes lightningStrike {
  0% {
    opacity: 0;
    transform: translate(var(--x), calc(var(--y) - 26px)) scaleY(0.55);
  }
  12% {
    opacity: 1;
    transform: translate(var(--x), var(--y)) scaleY(1.05);
  }
  28% {
    opacity: 0.38;
  }
  42% {
    opacity: 0.95;
  }
  100% {
    opacity: 0;
    transform: translate(var(--x), calc(var(--y) + 10px)) scaleY(0.92);
  }
}

@keyframes basicSlashCut {
  0% {
    opacity: 0;
    transform: translate(calc(var(--x) - 24px), calc(var(--y) + 20px)) rotate(calc(var(--rot, 0deg) - 18deg)) scaleX(0.18) scaleY(0.72);
  }
  18% {
    opacity: 1;
  }
  62% {
    opacity: 0.95;
    transform: translate(var(--x), var(--y)) rotate(var(--rot, 0deg)) scaleX(1) scaleY(1);
  }
  100% {
    opacity: 0;
    transform: translate(calc(var(--x) + 22px), calc(var(--y) - 18px)) rotate(calc(var(--rot, 0deg) + 10deg)) scaleX(1.08) scaleY(0.86);
  }
}

@keyframes statusRootPulse {
  0% {
    opacity: 0;
    transform: translate(var(--x), var(--y)) scale(1.28) rotate(-18deg);
  }
  20% {
    opacity: 1;
    transform: translate(var(--x), var(--y)) scale(0.92) rotate(0deg);
  }
  64% {
    opacity: 0.92;
    transform: translate(var(--x), var(--y)) scale(1) rotate(9deg);
  }
  100% {
    opacity: 0;
    transform: translate(var(--x), var(--y)) scale(0.82) rotate(22deg);
  }
}

@keyframes statusSlowPulse {
  0% {
    opacity: 0;
    transform: translate(var(--x), var(--y)) scale(0.72) rotate(0deg);
  }
  18% {
    opacity: 1;
    transform: translate(var(--x), var(--y)) scale(1) rotate(26deg);
  }
  70% {
    opacity: 0.9;
    transform: translate(var(--x), var(--y)) scale(1.08) rotate(190deg);
  }
  100% {
    opacity: 0;
    transform: translate(var(--x), var(--y)) scale(1.18) rotate(260deg);
  }
}

@keyframes elementImpact {
  0% {
    opacity: 0;
    transform: translate(var(--x), calc(var(--y) + 10px)) scale(calc(var(--scale, 1) * 0.36));
  }
  16% {
    opacity: 1;
    transform: translate(var(--x), var(--y)) scale(calc(var(--scale, 1) * 0.86));
  }
  58% {
    opacity: 0.9;
    transform: translate(var(--x), calc(var(--y) - 3px)) scale(calc(var(--scale, 1) * 1));
  }
  100% {
    opacity: 0;
    transform: translate(var(--x), calc(var(--y) - 12px)) scale(calc(var(--scale, 1) * 1.12));
  }
}

@keyframes fireSpriteMotion {
  0% {
    opacity: 0;
    transform: translate(var(--x), calc(var(--y) + 16px)) scale(calc(var(--scale, 1) * 0.46));
  }
  18% {
    opacity: 1;
  }
  62% {
    opacity: 0.96;
    transform: translate(var(--x), calc(var(--y) + var(--rise, -10px))) scale(var(--scale, 1));
  }
  100% {
    opacity: 0;
    transform: translate(var(--x), calc(var(--y) + var(--rise, -10px) - 18px)) scale(calc(var(--scale, 1) * 1.14));
  }
}

@keyframes fireSealMotion {
  0% {
    opacity: 0;
    transform: translate(var(--x), calc(var(--y) + 24px)) scale(calc(var(--scale, 1) * 0.42)) rotate(calc(var(--seal-tilt, 0deg) - 10deg));
  }
  18% {
    opacity: 0.88;
  }
  68% {
    opacity: 0.9;
    transform: translate(var(--x), var(--y)) scale(calc(var(--scale, 1) * 0.96)) rotate(var(--seal-tilt, 0deg));
  }
  100% {
    opacity: 0;
    transform: translate(var(--x), calc(var(--y) + 10px)) scale(calc(var(--scale, 1) * 1.1)) rotate(calc(var(--seal-tilt, 0deg) + 16deg));
  }
}

@keyframes waterIceSpriteMotion {
  0% {
    opacity: 0;
    transform: translate(var(--x), calc(var(--y) + 18px)) scale(calc(var(--scale, 1) * 0.42)) rotate(-9deg);
  }
  18% {
    opacity: 1;
  }
  62% {
    opacity: 0.96;
    transform: translate(var(--x), calc(var(--y) + var(--water-rise, -14px))) scale(var(--scale, 1)) rotate(4deg);
  }
  100% {
    opacity: 0;
    transform: translate(var(--x), calc(var(--y) + var(--water-rise, -14px) - 18px)) scale(calc(var(--scale, 1) * 1.12)) rotate(18deg);
  }
}

@keyframes waterWaveSpriteMotion {
  0% {
    opacity: 0;
    transform: translate(var(--x), calc(var(--y) + 24px)) scale(calc(var(--scale, 1) * 0.42)) rotate(calc(var(--wave-tilt, 0deg) - 8deg));
  }
  18% {
    opacity: 0.88;
  }
  68% {
    opacity: 0.92;
    transform: translate(var(--x), var(--y)) scale(calc(var(--scale, 1) * 0.96)) rotate(var(--wave-tilt, 0deg));
  }
  100% {
    opacity: 0;
    transform: translate(var(--x), calc(var(--y) + 8px)) scale(calc(var(--scale, 1) * 1.12)) rotate(calc(var(--wave-tilt, 0deg) + 18deg));
  }
}

@keyframes assetSpriteMotion {
  0% {
    opacity: 0;
    transform: translate(var(--x), calc(var(--y) + 18px)) scale(calc(var(--scale, 1) * 0.5));
  }
  16% {
    opacity: 1;
  }
  70% {
    opacity: 0.98;
    transform: translate(var(--x), var(--y)) scale(var(--scale, 1));
  }
  100% {
    opacity: 0;
    transform: translate(var(--x), calc(var(--y) - 16px)) scale(calc(var(--scale, 1) * 1.08));
  }
}

@keyframes fireFramesFan {
  0% { background-position: 0 0; }
  34% { background-position: 33.3333% 0; }
  68%,
  100% { background-position: 66.6667% 0; }
}

@keyframes fireFramesHuang {
  0% { background-position: 0 0; }
  20% { background-position: 33.3333% 0; }
  40% { background-position: 66.6667% 0; }
  60% { background-position: 100% 0; }
  80%,
  100% { background-position: 0 33.3333%; }
}

@keyframes fireFramesXuan {
  0% { background-position: 100% 0; }
  20% { background-position: 0 33.3333%; }
  40% { background-position: 33.3333% 33.3333%; }
  60% { background-position: 66.6667% 33.3333%; }
  80%,
  100% { background-position: 100% 33.3333%; }
}

@keyframes fireFramesDi {
  0% { background-position: 0 66.6667%; }
  20% { background-position: 33.3333% 66.6667%; }
  40% { background-position: 66.6667% 66.6667%; }
  60% { background-position: 100% 66.6667%; }
  80%,
  100% { background-position: 0 100%; }
}

@keyframes fireFramesTian {
  0% { background-position: 0 0; }
  6.25% { background-position: 33.3333% 0; }
  12.5% { background-position: 66.6667% 0; }
  18.75% { background-position: 100% 0; }
  25% { background-position: 0 33.3333%; }
  31.25% { background-position: 33.3333% 33.3333%; }
  37.5% { background-position: 66.6667% 33.3333%; }
  43.75% { background-position: 100% 33.3333%; }
  50% { background-position: 0 66.6667%; }
  56.25% { background-position: 33.3333% 66.6667%; }
  62.5% { background-position: 66.6667% 66.6667%; }
  68.75% { background-position: 100% 66.6667%; }
  75% { background-position: 0 100%; }
  81.25% { background-position: 33.3333% 100%; }
  87.5% { background-position: 66.6667% 100%; }
  100% { background-position: 100% 100%; }
}

@keyframes waterFramesFan {
  0% { background-position: 0 0; }
  25% { background-position: 33.3333% 0; }
  50% { background-position: 66.6667% 0; }
  75%,
  100% { background-position: 100% 0; }
}

@keyframes waterFramesHuang {
  0% { background-position: 0 33.3333%; }
  25% { background-position: 33.3333% 33.3333%; }
  50% { background-position: 66.6667% 33.3333%; }
  75%,
  100% { background-position: 100% 33.3333%; }
}

@keyframes waterFramesXuan {
  0% { background-position: 0 66.6667%; }
  25% { background-position: 33.3333% 66.6667%; }
  50% { background-position: 66.6667% 66.6667%; }
  75%,
  100% { background-position: 100% 66.6667%; }
}

@keyframes waterFramesDi {
  0% { background-position: 0 0; }
  12.5% { background-position: 33.3333% 0; }
  25% { background-position: 66.6667% 0; }
  37.5% { background-position: 100% 0; }
  50% { background-position: 0 33.3333%; }
  62.5% { background-position: 33.3333% 33.3333%; }
  75% { background-position: 66.6667% 33.3333%; }
  87.5%,
  100% { background-position: 100% 33.3333%; }
}

@keyframes waterFramesTian {
  0% { background-position: 0 0; }
  6.25% { background-position: 33.3333% 0; }
  12.5% { background-position: 66.6667% 0; }
  18.75% { background-position: 100% 0; }
  25% { background-position: 0 33.3333%; }
  31.25% { background-position: 33.3333% 33.3333%; }
  37.5% { background-position: 66.6667% 33.3333%; }
  43.75% { background-position: 100% 33.3333%; }
  50% { background-position: 0 66.6667%; }
  56.25% { background-position: 33.3333% 66.6667%; }
  62.5% { background-position: 66.6667% 66.6667%; }
  68.75% { background-position: 100% 66.6667%; }
  75% { background-position: 0 100%; }
  81.25% { background-position: 33.3333% 100%; }
  87.5% { background-position: 66.6667% 100%; }
  100% { background-position: 100% 100%; }
}

@keyframes slashFly {
  0% {
    opacity: 0;
    transform: translate(var(--x0), var(--y0)) rotate(var(--rot)) scaleX(0.2);
  }
  18% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(var(--x1), var(--y1)) rotate(var(--rot)) scaleX(1);
  }
}

@keyframes swordQiFly {
  0% {
    opacity: 0;
    transform: translate(var(--x0), var(--y0)) rotate(var(--rot)) scaleX(0.18) scaleY(0.7);
  }
  18% {
    opacity: 1;
  }
  68% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(var(--x1), var(--y1)) rotate(var(--rot)) scaleX(var(--scale, 1)) scaleY(1);
  }
}

@keyframes swordFrameFlash {
  0% {
    opacity: 0;
    transform: translate(var(--x), var(--y)) rotate(var(--rot)) scaleX(0.35) scaleY(0.65);
  }
  20% {
    opacity: 0.95;
  }
  62% {
    opacity: 0.55;
    transform: translate(var(--x), var(--y)) rotate(var(--rot)) scaleX(var(--scale, 1)) scaleY(1);
  }
  100% {
    opacity: 0;
    transform: translate(var(--x), var(--y)) rotate(var(--rot)) scaleX(var(--scale-end, 1.18)) scaleY(0.72);
  }
}

@keyframes impactFramePop {
  0% {
    opacity: 0;
    transform: translate(var(--x), var(--y)) scale(0.4) rotate(0deg);
  }
  25% {
    opacity: 1;
  }
  70% {
    opacity: 0.55;
    transform: translate(var(--x), var(--y)) scale(var(--scale, 1)) rotate(38deg);
  }
  100% {
    opacity: 0;
    transform: translate(var(--x), var(--y)) scale(var(--scale-end, 1.28)) rotate(80deg);
  }
}

@keyframes beamDrop {
  0% {
    opacity: 0;
    transform: translate(var(--x), -150px) scaleY(0.35);
  }
  24% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(var(--x), var(--y)) scaleY(1.1);
  }
}

@keyframes swordRain {
  0% {
    opacity: 0;
    transform: translate(var(--x), -70px) rotate(28deg) scale(0.8);
  }
  18% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(var(--x2), var(--y2)) rotate(28deg) scale(1.05);
  }
}

@keyframes sparkPop {
  0% {
    opacity: 1;
    transform: translate(var(--x), var(--y)) scale(0.3);
  }
  100% {
    opacity: 0;
    transform: translate(calc(var(--x) + var(--dx)), calc(var(--y) + var(--dy))) scale(1.8);
  }
}

@keyframes numberFloat {
  0% {
    opacity: 0;
    transform: translate(var(--x), var(--y)) scale(0.82);
  }
  18% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(var(--x), calc(var(--y) - 42px)) scale(1.06);
  }
}

@keyframes waveBloom {
  0% {
    opacity: 0.9;
    transform: translate(var(--x), var(--y)) scale(0.3);
  }
  100% {
    opacity: 0;
    transform: translate(calc(var(--x) - 42px), calc(var(--y) - 42px)) scale(6);
  }
}

@keyframes ringPulse {
  0% {
    opacity: 0;
    transform: translate(var(--x), var(--y)) scale(0.5);
  }
  30% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(var(--x), var(--y)) scale(1.8);
  }
}

@keyframes starFall {
  0% {
    opacity: 0;
    transform: translate(var(--x), -40px) rotate(0deg) scale(0.7);
  }
  22% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(var(--x2), var(--y2)) rotate(210deg) scale(1.4);
  }
}

@keyframes shardBurst {
  0% {
    opacity: 1;
    transform: translate(var(--x), var(--y)) rotate(var(--rot)) scale(0.5);
  }
  100% {
    opacity: 0;
    transform: translate(calc(var(--x) + var(--dx)), calc(var(--y) + var(--dy))) rotate(calc(var(--rot) + 140deg)) scale(1.1);
  }
}

@keyframes treasureSpin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes treasureOrbitGuard {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

@keyframes treasureSpriteFrames {
  0%,
  24.9% {
    background-position: 0 0;
  }
  25%,
  49.9% {
    background-position: 100% 0;
  }
  50%,
  74.9% {
    background-position: 0 100%;
  }
  75%,
  100% {
    background-position: 100% 100%;
  }
}

@keyframes treasureSpriteGlow {
  50% {
    filter: drop-shadow(0 0 13px rgba(255, 230, 157, 0.95)) drop-shadow(0 0 24px rgba(87, 214, 177, 0.58));
  }
}

@keyframes treasureProjectileFly {
  0% {
    opacity: 0;
    transform: translate(var(--x0), var(--y0)) rotate(var(--rot)) scale(calc(var(--scale, 1) * 0.55));
  }
  16% {
    opacity: 1;
  }
  72% {
    opacity: 0.96;
  }
  100% {
    opacity: 0;
    transform: translate(var(--x1), var(--y1)) rotate(calc(var(--rot) + 70deg)) scale(calc(var(--scale, 1) * 1.08));
  }
}

@keyframes treasureImpactPop {
  0% {
    opacity: 0;
    transform: translate(var(--x), var(--y)) rotate(var(--rot, 0deg)) scale(0.42);
  }
  22% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(var(--x), var(--y)) rotate(calc(var(--rot, 0deg) + 28deg)) scale(1.16);
  }
}

@keyframes statusAffixPulse {
  0% {
    opacity: 0;
    transform: translate(var(--x), var(--y)) scale(0.62) rotate(-18deg);
  }
  22% {
    opacity: 1;
    transform: translate(var(--x), var(--y)) scale(1) rotate(0deg);
  }
  100% {
    opacity: 0;
    transform: translate(var(--x), var(--y)) scale(1.2) rotate(34deg);
  }
}

@keyframes statusBurstPulse {
  0% {
    opacity: 0;
    transform: translate(var(--x), var(--y)) scale(0.42);
  }
  18% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(var(--x), var(--y)) scale(1.42);
  }
}

@keyframes ringReady {
  50% {
    box-shadow: 0 0 28px rgba(243, 199, 96, 0.64);
  }
}

@keyframes screenShake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-3px);
  }
  50% {
    transform: translateX(4px);
  }
  75% {
    transform: translateX(-2px);
  }
}

.player-side.casting .combat-health {
  animation: ringReady 0.5s ease;
}

@keyframes townLight {
  0%,
  100% {
    opacity: 0.45;
    transform: scale(0.8);
  }
  50% {
    opacity: 1;
    transform: scale(1.25);
  }
}

@media (min-width: 760px) {
  .app-shell {
    width: min(100vw, 440px);
    border-radius: 20px;
  }

  .drawer {
    width: min(100vw, 440px);
  }

  .drawer:not(.full-screen) {
    border-radius: 16px 16px 0 0;
  }
}

@media (max-width: 720px) {
  .preview-standalone {
    padding-left: 8px;
    padding-right: 8px;
  }

  .standalone-preview-page {
    grid-template-columns: 1fr;
    grid-template-areas:
      "arena"
      "detail"
      "actions";
  }

  .standalone-preview-arena {
    min-height: min(54dvh, 460px);
  }

  .standalone-preview-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-height: none;
  }

  .standalone-preview-actions button {
    min-height: 58px;
    padding: 7px 6px;
  }
}

@media (max-width: 380px) {
  .app-shell {
    grid-template-rows: 31px minmax(220px, 2.05fr) minmax(116px, 1fr) minmax(142px, 1.35fr) 54px;
  }

  .top-bar {
    padding-left: 7px;
    padding-right: 7px;
  }

  .avatar-ring {
    width: 52px;
  }

  .bag-slots {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .rpg-layout,
  .equipment-layout {
    grid-template-columns: 1fr;
  }

  .details-panel {
    position: static;
    min-height: auto;
  }

  .role-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .daily-roadmap {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .role-paperdoll {
    min-height: 292px;
    grid-auto-rows: minmax(78px, 1fr);
  }

  .choice-actions button {
    padding: 0 4px;
    font-size: 10px;
  }

  .preview-standalone {
    padding-left: 8px;
    padding-right: 8px;
  }

  .preview-header strong {
    font-size: 16px;
  }

  .preview-header a {
    padding: 7px 9px;
    font-size: 12px;
  }

  .standalone-preview-arena {
    min-height: 390px;
  }

  .standalone-preview-actions button {
    padding: 7px 6px;
  }
}


@keyframes elementBolt {
  0% { opacity: 0; transform: translate(var(--x0), var(--y0)) rotate(var(--rot)) scaleX(0.2); }
  36% { opacity: 1; transform: translate(var(--x0), var(--y0)) rotate(var(--rot)) scaleX(0.95); }
  100% { opacity: 0; transform: translate(var(--x1), var(--y1)) rotate(var(--rot)) scaleX(1.08); }
}

@keyframes castMarkPulse {
  0% { opacity: 0; transform: translate(var(--x), var(--y)) scale(calc(var(--scale, 1) * 0.42)) rotate(-12deg); }
  34% { opacity: 0.95; }
  100% { opacity: 0; transform: translate(var(--x), var(--y)) scale(calc(var(--scale, 1) * 1.08)) rotate(28deg); }
}

@keyframes iceCastFly {
  0% { opacity: 0; transform: translate(var(--x0), var(--y0)) rotate(var(--rot)) scaleX(0.16); }
  28% { opacity: 1; transform: translate(var(--x0), var(--y0)) rotate(var(--rot)) scaleX(0.82); }
  100% { opacity: 0; transform: translate(var(--x1), var(--y1)) rotate(var(--rot)) scaleX(1.02); }
}

@keyframes elementParticle {
  0% { opacity: 0; transform: translate(var(--x), var(--y)) scale(0.2) rotate(0deg); }
  24% { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(var(--x) + var(--dx)), calc(var(--y) + var(--dy))) scale(1.1) rotate(var(--rot)); }
}

@keyframes vineSnare {
  0% { opacity: 0; transform: translate(var(--x), var(--y)) scale(0.3) rotate(0deg); }
  35% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--x), var(--y)) scale(1.15) rotate(165deg); }
}

@keyframes leafWhirl {
  0% { opacity: 0; transform: translate(var(--x), var(--y)) rotate(var(--rot)) scale(0.35); }
  22% { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(var(--x) + var(--dx)), calc(var(--y) + var(--dy))) rotate(calc(var(--rot) + 310deg)) scale(1.05); }
}

@keyframes branchWrap {
  0% { opacity: 0; transform: translate(var(--x), var(--y)) scale(calc(var(--scale, 1) * 0.28)) rotate(-62deg); }
  36% { opacity: 1; }
  72% { opacity: 0.86; transform: translate(var(--x), var(--y)) scale(var(--scale, 1)) rotate(18deg); }
  100% { opacity: 0; transform: translate(var(--x), var(--y)) scale(calc(var(--scale, 1) * 1.14)) rotate(72deg); }
}

@keyframes waterStream {
  0% { opacity: 0; transform: translate(var(--x0), var(--y0)) rotate(var(--rot)) scaleX(0.12); }
  30% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--x1), var(--y1)) rotate(var(--rot)) scaleX(1.1); }
}

@keyframes icePrison {
  0% { opacity: 0; transform: translate(var(--x), var(--y)) scale(calc(var(--scale, 1) * 0.28)); filter: blur(2px); }
  35% { opacity: 1; filter: blur(0); }
  75% { opacity: 0.78; transform: translate(var(--x), var(--y)) scale(var(--scale, 1)); }
  100% { opacity: 0; transform: translate(var(--x), var(--y)) scale(calc(var(--scale, 1) * 1.14)); }
}

@keyframes iceCrystal {
  0% { opacity: 0; transform: translate(var(--x), calc(var(--y) + 28px)) rotate(var(--rot)) scaleY(0.2); }
  28% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--x), var(--y)) rotate(var(--rot)) scaleY(1.18); }
}

@keyframes flameBurn {
  0% { opacity: 0; transform: translate(var(--x), calc(var(--y) + 16px)) rotate(-35deg) scale(calc(var(--scale, 1) * 0.35)); }
  26% { opacity: 1; }
  58% { opacity: 0.92; transform: translate(var(--x), var(--y)) rotate(12deg) scale(var(--scale, 1)); }
  100% { opacity: 0; transform: translate(var(--x), calc(var(--y) - 42px)) rotate(32deg) scale(calc(var(--scale, 1) * 1.22)); }
}

@keyframes mountainChunk {
  0% { opacity: 0; transform: translate(var(--x0), var(--y0)) rotate(var(--rot)) scale(0.28); }
  18% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--x1), var(--y1)) rotate(calc(var(--rot) + 80deg)) scale(var(--scale, 1)); }
}

@keyframes rockBurst {
  0% { opacity: 1; transform: translate(var(--x), var(--y)) rotate(var(--rot)) scale(0.48); }
  100% { opacity: 0; transform: translate(calc(var(--x) + var(--dx)), calc(var(--y) + var(--dy))) rotate(calc(var(--rot) + 210deg)) scale(1.12); }
}

@keyframes mountainSeal {
  0% { opacity: 0; transform: translate(var(--x), calc(var(--y) - 60px)) scale(1.18); }
  34% { opacity: 1; }
  68% { opacity: 0.82; transform: translate(var(--x), var(--y)) scale(0.98); }
  100% { opacity: 0; transform: translate(var(--x), calc(var(--y) + 24px)) scale(1.08); }
}

@keyframes earthSealSprite {
  0% { opacity: 0; transform: translate(var(--x), var(--y)) scale(calc(var(--scale, 1) * 0.32)) rotate(-34deg); }
  24% { opacity: 1; }
  66% { opacity: 0.95; transform: translate(var(--x), var(--y)) scale(var(--scale, 1)) rotate(8deg); }
  100% { opacity: 0; transform: translate(var(--x), var(--y)) scale(calc(var(--scale, 1) * 1.22)) rotate(42deg); }
}

@keyframes earthSealSheetFrames {
  0% { background-position: 0 0; }
  6.25% { background-position: 33.3333% 0; }
  12.5% { background-position: 66.6667% 0; }
  18.75% { background-position: 100% 0; }
  25% { background-position: 0 33.3333%; }
  31.25% { background-position: 33.3333% 33.3333%; }
  37.5% { background-position: 66.6667% 33.3333%; }
  43.75% { background-position: 100% 33.3333%; }
  50% { background-position: 0 66.6667%; }
  56.25% { background-position: 33.3333% 66.6667%; }
  62.5% { background-position: 66.6667% 66.6667%; }
  68.75% { background-position: 100% 66.6667%; }
  75% { background-position: 0 100%; }
  81.25% { background-position: 33.3333% 100%; }
  87.5% { background-position: 66.6667% 100%; }
  100% { background-position: 100% 100%; }
}

@keyframes earthSealSheetMotion {
  0% { opacity: 0; transform: translate(var(--x), var(--y)) scale(calc(var(--scale, 1) * 0.48)) rotate(-28deg); }
  16% { opacity: 1; }
  62% { opacity: 1; transform: translate(var(--x), var(--y)) scale(var(--scale, 1)) rotate(6deg); }
  100% { opacity: 0; transform: translate(var(--x), var(--y)) scale(calc(var(--scale, 1) * 1.2)) rotate(24deg); }
}

@keyframes earthCastCircle {
  0% { opacity: 0; transform: translate(var(--x), var(--y)) scale(0.28) rotate(-80deg); }
  28% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--x), var(--y)) scale(var(--scale, 1)) rotate(190deg); }
}

@keyframes earthCrackPath {
  0% { opacity: 0; transform: translate(var(--x), var(--y)) rotate(var(--rot)) scaleX(0.08); }
  26% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--x), var(--y)) rotate(var(--rot)) scaleX(1.06); }
}

@keyframes earthPillarRise {
  0% { opacity: 0; transform: translate(var(--x), calc(var(--y) + 54px)) scaleX(0.72) scaleY(0.12); }
  26% { opacity: 1; }
  68% { opacity: 0.95; transform: translate(var(--x), var(--y)) scale(var(--scale, 1)); }
  100% { opacity: 0; transform: translate(var(--x), calc(var(--y) - 10px)) scale(calc(var(--scale, 1) * 1.05)); }
}

@keyframes earthRiftOpen {
  0% { opacity: 0; transform: translate(var(--x), var(--y)) rotate(var(--rot)) scaleX(0.14); }
  34% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--x), var(--y)) rotate(var(--rot)) scaleX(1.14); }
}

@keyframes earthOrbitStone {
  0% { opacity: 0; transform: translate(var(--x), var(--y)) rotate(var(--rot)) scale(0.22); }
  28% { opacity: 1; }
  66% { opacity: 0.95; transform: translate(calc(var(--x) + var(--dx)), calc(var(--y) + var(--dy))) rotate(calc(var(--rot) + 150deg)) scale(1); }
  100% { opacity: 0; transform: translate(calc(var(--x) - var(--dx) * 0.2), calc(var(--y) - var(--dy) * 0.2)) rotate(calc(var(--rot) + 320deg)) scale(0.62); }
}

@keyframes earthDrop {
  0% { opacity: 0; transform: translate(var(--x0), var(--y0)) rotate(var(--rot)) scale(calc(var(--scale, 1) * 0.56)); }
  14% { opacity: 1; }
  70% { opacity: 1; transform: translate(calc(var(--x1) + var(--wobble, 0px)), calc(var(--y1) - 18px)) rotate(calc(var(--rot) + 38deg)) scale(var(--scale, 1)); }
  86% { opacity: 1; transform: translate(var(--x1), var(--y1)) rotate(calc(var(--rot) + 56deg)) scale(calc(var(--scale, 1) * 1.06), calc(var(--scale, 1) * 0.92)); }
  100% { opacity: 0; transform: translate(var(--x1), calc(var(--y1) + 18px)) rotate(calc(var(--rot) + 68deg)) scale(calc(var(--scale, 1) * 1.16), calc(var(--scale, 1) * 0.72)); }
}

@keyframes earthDustCloud {
  0% { opacity: 0; transform: translate(var(--x), var(--y)) scale(0.35); }
  26% { opacity: 0.82; }
  100% { opacity: 0; transform: translate(var(--x), var(--y)) scale(1.35); }
}


.foundation-overview {
  display: grid;
  gap: 9px;
}

.foundation-overview p {
  margin: 0;
  color: rgba(220, 228, 211, 0.88);
  font-size: 12px;
  line-height: 1.6;
}

.foundation-focus-hint {
  display: grid;
  gap: 7px;
  padding: 8px;
  border: 1px solid rgba(87, 214, 177, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(87, 214, 177, 0.07), rgba(243, 199, 96, 0.04)),
    rgba(0, 0, 0, 0.12);
}

.foundation-focus-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.foundation-focus-head strong {
  color: var(--gold-2);
  font-size: 12px;
  white-space: nowrap;
}

.foundation-focus-head span {
  color: rgba(244, 239, 217, 0.76);
  font-size: 10.5px;
  line-height: 1.35;
  text-align: right;
}

.foundation-focus-actions {
  justify-content: flex-end;
  gap: 6px;
}

.foundation-focus-actions button {
  min-height: 26px;
  padding: 2px 8px;
  font-size: 11px;
}

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

.foundation-current {
  display: grid;
  width: 100%;
}

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

.foundation-card {
  display: grid;
  gap: 7px;
  min-height: 196px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 9px;
  background:
    radial-gradient(circle at 100% 0, var(--grade-fill, rgba(243, 199, 96, 0.08)), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(0, 0, 0, 0.11)),
    rgba(255, 255, 255, 0.035);
}

.foundation-card.focus {
  width: 100%;
  min-height: auto;
  grid-template-columns: minmax(180px, 0.86fr) minmax(220px, 1.14fr);
  align-items: start;
  gap: 7px 11px;
  padding: 10px;
}

.foundation-card.focus .foundation-card-head,
.foundation-card.focus .foundation-level {
  grid-column: 1;
}

.foundation-card.focus p,
.foundation-card.focus .row-actions {
  grid-column: 2;
}

.foundation-card.compact {
  min-height: 72px;
  gap: 5px;
  padding: 7px;
  opacity: 0.72;
}

.foundation-card.compact .foundation-card-head {
  display: grid;
  gap: 4px;
}

.foundation-card.compact .foundation-card-head strong {
  font-size: 12px;
}

.foundation-card.compact .foundation-card-head span,
.foundation-card.compact .foundation-effect {
  font-size: 10px !important;
  line-height: 1.35;
}

.foundation-card.compact .foundation-card-head em {
  justify-self: start;
  padding: 2px 6px;
  font-size: 10px;
}

.foundation-card.future {
  opacity: 0.58;
}

.foundation-card.locked {
  border-color: rgba(87, 214, 177, 0.22);
}

.foundation-card-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: flex-start;
}

.foundation-card-head div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.foundation-card-head strong {
  font-size: 15px;
  line-height: 1.15;
}

.foundation-card-head span,
.foundation-card-head em,
.foundation-card p {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
  font-style: normal;
}

.foundation-card p {
  margin: 0;
}

.foundation-card-head em {
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  padding: 3px 7px;
  background: rgba(0, 0, 0, 0.18);
}

.foundation-level {
  display: grid;
  gap: 5px;
  color: #dfe9d5;
  font-size: 12px;
}

.foundation-level i {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
}

.foundation-level b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--jade), var(--gold-2));
  box-shadow: 0 0 10px rgba(243, 199, 96, 0.36);
}

.foundation-effect {
  color: #efe5bc !important;
}

.foundation-cost .missing {
  color: #ffb3a8;
}

.foundation-cost .ok {
  color: #9effdf;
}

.foundation-rare {
  color: #d7c18b !important;
}

.foundation-card.focus .row-actions {
  gap: 6px;
}

.foundation-card.focus .row-actions button {
  min-height: 26px;
  padding: 2px 8px;
  font-size: 11px;
}

@media (max-width: 540px) {
  .foundation-grid {
    grid-template-columns: 1fr;
  }

  .foundation-card.focus {
    grid-template-columns: 1fr;
  }

  .foundation-card.focus .foundation-card-head,
  .foundation-card.focus .foundation-level,
  .foundation-card.focus p,
  .foundation-card.focus .row-actions {
    grid-column: auto;
  }

  .foundation-mini-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .foundation-focus-head {
    display: grid;
  }

  .foundation-focus-head span {
    text-align: left;
  }

  .role-tabs button strong {
    font-size: 11px;
  }

  .role-tabs button span {
  font-size: 9px;
}

.slot-count {
  position: absolute;
  top: 2px;
  right: 2px;
  z-index: 3;
  min-width: 18px;
  height: 16px;
  display: grid;
  place-items: center;
  padding: 0 4px;
  border: 1px solid rgba(0, 0, 0, 0.42);
  border-radius: 999px;
  color: #17110a;
  background: linear-gradient(180deg, #ffe69d, #f3c760);
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
}

.item-compare {
  display: grid;
  gap: 5px;
  padding: 7px;
  border: 1px solid rgba(87, 214, 177, 0.16);
  border-radius: 7px;
  background: rgba(87, 214, 177, 0.055);
}

.item-compare strong {
  color: #9effdf;
  font-size: 11px;
}

.item-compare p {
  margin: 0;
}

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

.item-compare-grid > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-width: 0;
  padding: 4px 5px;
  border-radius: 6px;
  color: rgba(244, 239, 217, 0.78);
  background: rgba(0, 0, 0, 0.14);
  font-size: 10px;
}

.item-compare .up {
  color: #9effdf;
}

.item-compare .down {
  color: #ffb3a8;
}

.item-compare .same {
  color: var(--muted);
}

  .fragment-panel {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .fragment-actions {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .guide-next-step,
  .guide-hero > div:first-child {
    grid-template-columns: 1fr;
    display: grid;
  }

  .guide-hero > div:first-child span {
    max-width: none;
    text-align: left;
  }

  .guide-next-step button {
    width: 100%;
  }

  .guide-meters,
  .guide-requirement-grid,
  .guide-flow-grid,
  .daily-task-list {
    grid-template-columns: 1fr;
  }
}


.npc-guide {
  --npc-avatar: url("./assets/img/avatars/npc_tea.webp");
  right: 31%;
  bottom: 18%;
}

.npc-teleport {
  --npc-avatar: none;
  left: 46%;
  top: 48%;
  border-color: rgba(182, 156, 255, 0.46);
  color: #efe7ff;
  background:
    radial-gradient(circle at 50% 50%, rgba(182, 156, 255, 0.34), transparent 42%),
    conic-gradient(from 0deg, rgba(182, 156, 255, 0.55), rgba(87, 214, 177, 0.36), rgba(243, 199, 96, 0.42), rgba(182, 156, 255, 0.55)),
    rgba(11, 15, 13, 0.72);
  box-shadow: inset 0 0 0 6px rgba(9, 14, 12, 0.76), 0 0 24px rgba(182, 156, 255, 0.2);
}

.npc-teleport::before {
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.92), transparent 10%),
    conic-gradient(from 45deg, rgba(182, 156, 255, 0.8), rgba(87, 214, 177, 0.42), rgba(243, 199, 96, 0.62), rgba(182, 156, 255, 0.8));
  animation: teleportArraySpin 3.8s linear infinite;
}

.npc-teleport small {
  color: #d9ccff;
}

@keyframes teleportArraySpin {
  to { transform: rotate(360deg); }
}

.teleport-page,
.world-map-page {
  gap: 10px;
}

.world-map-panel,
.teleport-section,
.map-route-list {
  display: grid;
  gap: 9px;
}

.world-map-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
  padding: 10px;
  border: 1px solid rgba(182, 156, 255, 0.18);
  border-radius: 9px;
  background:
    radial-gradient(circle at 14% 0%, rgba(182, 156, 255, 0.16), transparent 36%),
    rgba(255, 255, 255, 0.04);
}

.world-map-head div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.world-map-head strong {
  color: var(--gold-2);
  font-size: 15px;
}

.world-map-head span,
.world-map-head em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  line-height: 1.35;
}

.world-map-stage {
  position: relative;
  height: min(58dvh, 430px);
  min-height: 330px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background:
    radial-gradient(circle at 13% 62%, rgba(87, 214, 177, 0.18), transparent 14%),
    radial-gradient(circle at 60% 55%, rgba(243, 199, 96, 0.14), transparent 18%),
    radial-gradient(circle at 18% 18%, rgba(182, 156, 255, 0.16), transparent 24%),
    linear-gradient(145deg, rgba(13, 22, 18, 0.96), rgba(20, 19, 27, 0.94));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.035);
}

.world-map-stage::before {
  content: "";
  position: absolute;
  inset: 9px;
  opacity: 0.25;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(circle at 50% 50%, #000, transparent 78%);
}

.world-map-current-badge {
  position: absolute;
  z-index: 4;
  left: 9px;
  top: 9px;
  max-width: min(56%, 260px);
  display: grid;
  gap: 2px;
  padding: 6px 8px;
  border: 1px solid rgba(243, 199, 96, 0.32);
  border-radius: 8px;
  background: rgba(9, 14, 12, 0.78);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
  pointer-events: none;
}

.world-map-current-badge strong {
  color: var(--gold-2);
  font-size: 12px;
  line-height: 1.1;
}

.world-map-current-badge span {
  color: rgba(244, 239, 217, 0.76);
  font-size: 10px;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.world-map-line {
  position: absolute;
  z-index: 1;
  height: 2px;
  transform-origin: 0 50%;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(87, 214, 177, 0.08), rgba(243, 199, 96, 0.72), rgba(87, 214, 177, 0.08));
  box-shadow: 0 0 10px rgba(243, 199, 96, 0.26);
}

.world-map-line.locked {
  opacity: 0.28;
  filter: grayscale(0.65);
}

.world-map-node {
  position: absolute;
  z-index: 2;
  width: 74px;
  min-height: 38px;
  transform: translate(-50%, -50%);
  display: grid;
  gap: 2px;
  place-items: center;
  padding: 5px 6px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  color: var(--text);
  background: rgba(8, 13, 11, 0.78);
  text-align: center;
  cursor: pointer;
}

.world-map-node:disabled {
  cursor: default;
}

.world-map-node strong,
.world-map-node span {
  max-width: 62px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.world-map-node strong {
  color: var(--gold-2);
  font-size: 11px;
  line-height: 1.05;
}

.world-map-node span {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.05;
}

.world-map-node.town {
  border-color: rgba(243, 199, 96, 0.34);
  box-shadow: 0 0 16px rgba(243, 199, 96, 0.12);
}

.world-map-node.route {
  border-color: rgba(87, 214, 177, 0.26);
  background: rgba(7, 21, 18, 0.74);
}

.world-map-node.locked {
  opacity: 0.48;
  filter: grayscale(0.55);
}

.world-map-node.current {
  border-color: rgba(255, 230, 157, 0.9);
  color: #fff4c9;
  background: rgba(45, 32, 12, 0.92);
  box-shadow: 0 0 0 2px rgba(243, 199, 96, 0.18), 0 0 22px rgba(243, 199, 96, 0.42);
  animation: currentMapPulse 1.4s ease-in-out infinite;
}

.world-map-node.selected {
  border-color: rgba(87, 214, 177, 0.78);
  box-shadow: 0 0 0 2px rgba(87, 214, 177, 0.14), 0 0 18px rgba(87, 214, 177, 0.22);
}

@keyframes currentMapPulse {
  50% { transform: translate(-50%, -50%) scale(1.06); }
}

.world-map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.world-map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 7px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
  font-size: 10px;
}

.world-map-legend i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--jade);
}

.world-map-legend i.current { background: var(--gold-2); }
.world-map-legend i.town { background: var(--gold); }
.world-map-legend i.route { background: var(--jade); }
.world-map-legend i.locked { background: #6e716a; }

.world-map-detail {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(87, 214, 177, 0.16);
  border-radius: 9px;
  background:
    radial-gradient(circle at 100% 0, rgba(87, 214, 177, 0.12), transparent 44%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.052), rgba(0, 0, 0, 0.08)),
    rgba(0, 0, 0, 0.14);
}

.world-map-detail.current {
  border-color: rgba(243, 199, 96, 0.34);
}

.world-map-detail.locked {
  opacity: 0.72;
  filter: grayscale(0.28);
}

.world-map-detail-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.world-map-detail-title div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.world-map-detail-title strong {
  color: var(--gold-2);
  font-size: 14px;
}

.world-map-detail-title span,
.world-map-detail-title em {
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.35;
  font-style: normal;
}

.world-map-detail-title em {
  color: var(--jade);
  text-align: right;
  white-space: nowrap;
}

.world-map-detail p {
  margin: 0;
  color: #dbe5cf;
  font-size: 11.5px;
  line-height: 1.5;
}

.world-map-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.world-map-detail-meta span {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  padding: 3px 7px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.14);
  font-size: 10px;
}

.world-map-detail .row-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.world-map-detail button {
  min-height: 30px;
}

.world-map-story {
  display: grid;
  gap: 9px;
  padding: 10px;
  border: 1px solid rgba(243, 199, 96, 0.14);
  border-radius: 9px;
  background:
    radial-gradient(circle at 0 0, rgba(243, 199, 96, 0.12), transparent 38%),
    radial-gradient(circle at 100% 0, rgba(87, 214, 177, 0.08), transparent 42%),
    rgba(255, 255, 255, 0.035);
}

.world-map-story-next {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 9px;
  border: 1px solid var(--grade-border, rgba(243, 199, 96, 0.2));
  border-radius: 8px;
  background:
    radial-gradient(circle at 0 0, var(--grade-glow, rgba(243, 199, 96, 0.12)), transparent 54%),
    rgba(0, 0, 0, 0.16);
}

.world-map-story-next > div:first-child {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.world-map-story-next strong {
  color: var(--gold-2);
  font-size: 13px;
}

.world-map-story-next span {
  color: rgba(244, 239, 217, 0.86);
  font-size: 11px;
  line-height: 1.45;
}

.world-map-story-next .row-actions {
  display: flex;
  gap: 6px;
}

.world-map-story-next button {
  min-height: 28px;
  padding: 2px 9px;
  white-space: nowrap;
}

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

.story-chapter {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 9px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(0, 0, 0, 0.08)),
    rgba(0, 0, 0, 0.12);
}

.story-chapter.locked {
  opacity: 0.58;
  filter: grayscale(0.36);
}

.story-chapter.completed {
  border-color: rgba(87, 214, 177, 0.22);
}

.story-chapter.active {
  border-color: rgba(243, 199, 96, 0.4);
  box-shadow: inset 0 0 0 1px rgba(243, 199, 96, 0.08), 0 0 16px rgba(243, 199, 96, 0.1);
}

.story-chapter-head {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 7px;
  align-items: center;
}

.story-chapter-head b {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  color: #1b1510;
  background: linear-gradient(135deg, var(--gold-2), var(--jade));
  font-size: 12px;
}

.story-chapter-head div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.story-chapter-head strong {
  color: var(--text);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.story-chapter-head span,
.story-chapter em {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
}

.story-chapter p {
  margin: 0;
  min-height: 48px;
  color: #dbe5cf;
  font-size: 11px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.teleport-card {
  display: grid;
  gap: 7px;
  min-height: 132px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 9px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(0, 0, 0, 0.08)),
    rgba(255, 255, 255, 0.035);
}

.teleport-card.current {
  border-color: rgba(243, 199, 96, 0.38);
  box-shadow: 0 0 18px rgba(243, 199, 96, 0.1);
}

.teleport-card.locked {
  opacity: 0.62;
  filter: grayscale(0.35);
}

.teleport-card-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.teleport-card-title strong {
  color: var(--gold-2);
  font-size: 13px;
}

.teleport-card-title span,
.teleport-card em {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
}

.teleport-card p {
  margin: 0;
  color: #dbe5cf;
  font-size: 11px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.teleport-card button {
  align-self: end;
  min-height: 30px;
}

.route-resource-panel {
  display: grid;
  gap: 6px;
  margin-top: 8px;
  padding: 8px;
  border: 1px solid rgba(87, 214, 177, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(87, 214, 177, 0.08), rgba(243, 199, 96, 0.05)),
    rgba(255, 255, 255, 0.035);
}

.route-resource-panel.compact {
  gap: 5px;
  padding: 7px;
}

.teleport-card .route-resource-panel {
  margin-top: 2px;
  padding: 7px;
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.14);
}

.route-resource-panel.locked {
  opacity: 0.65;
  filter: grayscale(0.35);
}

.route-endpoint-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 7px;
  padding: 6px 7px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.18);
}

.route-endpoint-note.open {
  border-color: rgba(87, 214, 177, 0.32);
  background: rgba(87, 214, 177, 0.08);
}

.route-endpoint-note.locked {
  border-color: rgba(243, 199, 96, 0.24);
  background: rgba(243, 199, 96, 0.07);
}

.route-endpoint-note strong {
  color: var(--gold-2);
  font-size: 11px;
  white-space: nowrap;
}

.route-endpoint-note span {
  color: rgba(244, 239, 217, 0.86);
  font-size: 10px;
  line-height: 1.35;
}

.route-resource-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.route-resource-head span {
  color: var(--gold-2);
  font-size: 12px;
  font-weight: 700;
}

.route-resource-head small {
  color: var(--jade);
  font-size: 10px;
  white-space: nowrap;
}

.route-resource-panel p {
  margin: 0;
  color: rgba(244, 239, 217, 0.86);
  font-size: 10.5px;
  line-height: 1.45;
}

.route-loop-panel {
  display: grid;
  gap: 5px;
  padding: 6px;
  border: 1px solid rgba(243, 199, 96, 0.16);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.14);
}

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

.route-loop-title strong {
  color: var(--gold-2);
  font-size: 11px;
  white-space: nowrap;
}

.route-loop-title small {
  color: rgba(244, 239, 217, 0.78);
  font-size: 9.5px;
  text-align: right;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

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

.route-loop-step {
  min-width: 0;
  padding: 4px 5px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.035);
}

.route-loop-step em,
.route-loop-step b {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-loop-step em {
  color: rgba(244, 239, 217, 0.64);
  font-size: 9px;
  font-style: normal;
}

.route-loop-step b {
  color: #ffd987;
  font-size: 10px;
}

.route-loop-step.ok {
  border-color: rgba(87, 214, 177, 0.28);
  background: rgba(87, 214, 177, 0.07);
}

.route-loop-step.ok b {
  color: var(--jade);
}

.route-loop-step.missing {
  border-color: rgba(243, 199, 96, 0.14);
}

.route-resource-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.route-resource-chips span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 22px;
  padding: 3px 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  color: #dbe5cf;
  background: rgba(0, 0, 0, 0.16);
  font-size: 10px;
}

.route-resource-chips b {
  color: var(--gold-2);
  font-weight: 700;
}

.route-resource-chips span.ok {
  border-color: rgba(87, 214, 177, 0.34);
}

.route-resource-chips span.missing {
  border-color: rgba(239, 108, 108, 0.35);
  color: #ffd2c8;
}

.info-modal-card {
  width: min(92vw, 480px);
}

.info-modal-note {
  margin: 0;
  color: rgba(244, 239, 217, 0.72);
  font-size: 11px;
  line-height: 1.45;
}

.auto-setting-card {
  display: grid;
  gap: 9px;
}

.auto-setting-card label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: rgba(244, 239, 217, 0.82);
  font-size: 12px;
}

.auto-setting-card label strong {
  color: var(--gold-2);
  font-size: 18px;
}

.auto-setting-card input[type="range"] {
  width: 100%;
  accent-color: #f3c760;
}

.auto-pct-buttons {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
}

.auto-pct-buttons button {
  min-height: 28px;
  padding: 0 6px;
}

.auto-pct-buttons button.active {
  color: #15110a;
  border-color: rgba(255, 230, 157, 0.78);
  background: linear-gradient(180deg, #ffe69d, #f3c760);
}

.auto-setting-card p {
  margin: 0;
  color: rgba(244, 239, 217, 0.76);
  font-size: 11px;
  line-height: 1.45;
}

@media (max-width: 720px) {
  .story-roadmap {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 540px) {
  .world-map-detail-title {
    display: grid;
  }

  .world-map-detail-title em {
    text-align: left;
    white-space: normal;
  }

  .world-map-story-next {
    grid-template-columns: 1fr;
  }

  .world-map-story-next .row-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 380px) {
  .world-map-node {
    width: 66px;
    min-height: 34px;
  }

  .route-sign-grid {
    grid-template-columns: 1fr;
  }

  .route-sign-card {
    min-height: 0;
  }

  .story-roadmap,
  .teleport-grid {
    grid-template-columns: 1fr;
  }
}

/* UI font bump: keep layout stable while making core text one step larger. */
.name-row strong {
  font-size: 14px;
}

.name-row span,
.realm-row span,
.resource-strip,
.town-npc strong,
.town-map-hud span,
.section-heading,
.choice-actions button,
.tab,
.nav-button span,
.log-entry,
.drawerContent,
.drawer button,
.journal-card-head strong,
.npc-card-head strong,
.friend-dynamic-card strong {
  font-size: 13px;
}

#choiceText {
  font-size: 13px;
}

.town-npc small,
.town-map-button,
#routeResourceButton,
#autoSettingButton,
.journal-card p,
.npc-card p,
.companion-detail-copy p,
.friend-dynamic-card p,
.friend-dynamic-detail span,
.chat-channels button,
.chat-compose input,
.chat-compose button {
  font-size: 12px;
}

.journal-card-head span,
.journal-card em,
.npc-card-head span,
.npc-card em,
.npc-card small,
.affinity-line span,
.friend-dynamic-card span,
.companion-detail-copy em,
.companion-detail-copy small {
  font-size: 12px;
}

.companion-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-top: 9px;
}

.companion-tabs button {
  min-height: 34px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
}

.companion-tabs button strong,
.companion-tabs button span {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.companion-tabs button span {
  color: var(--gold-2);
  font-weight: 900;
}

.companion-tabs button.active {
  color: var(--gold-2);
  border-color: rgba(243, 199, 96, 0.46);
  background: rgba(243, 199, 96, 0.12);
  box-shadow: inset 0 0 14px rgba(243, 199, 96, 0.08);
}

.companion-tab-panel {
  display: grid;
  gap: 9px;
}

.offline-reward-card {
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid rgba(243, 199, 96, 0.2);
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(243, 199, 96, 0.08), rgba(87, 214, 177, 0.045));
}

.offline-reward-card > div {
  display: grid;
  gap: 3px;
}

.offline-reward-card strong {
  color: var(--gold-2);
  font-size: 14px;
}

.offline-reward-card span,
.offline-reward-card p {
  margin: 0;
  color: #dbe5cf;
  font-size: 12px;
  line-height: 1.45;
}

.offline-reward-card.empty {
  opacity: 0.82;
}

.offline-reward-card button {
  min-height: 30px;
}

.offline-reward-card button.primary {
  color: #15110a;
  border-color: rgba(255, 230, 157, 0.78);
  background: linear-gradient(180deg, #ffe69d, #f3c760);
}

@media (max-width: 390px) {
  .companion-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .skill-chip span {
    max-width: calc(100% - 6px);
  }
}

@media (max-width: 720px), (hover: none) and (pointer: coarse) {
  .player-side,
  .monster-card {
    transition: opacity 0.12s ease;
    will-change: auto;
  }

  .avatar-ring,
  .avatar-ring::before,
  .player-avatar::before,
  .monster-avatar::before {
    backface-visibility: hidden;
    transform: translateZ(0);
  }
}
