/* Q版奇幻冒险统一皮肤。图片由 Luna 美术 agent 提供；布局沿用主界面逻辑坐标。 */
:root {
  --q-ink: #343b32;
  --q-muted: #59604c;
  --q-border: #b58a53;
  --q-paper: #f6e7bd;
  --q-mint: #174e57;
  --text-main: #343b32;
  --text-muted: #59604c;
  --gold-bright: #226b75;
  --gold-main: #cf8c41;
  --border-gold: #bc925b;
}
html, body { background: radial-gradient(ellipse at center, #477b7e, #183b46); }
.phone-viewport { background: #173e47; box-shadow: 0 0 50px #102c35; }
.lobby-screen, .select-job-screen {
  background: linear-gradient(180deg, rgba(18,66,67,.15), rgba(17,49,52,.5)), url("/assets/q-maps/yongzhedaluzhucheng.jpg") center / cover no-repeat;
}
.game-screen { background: #173e47; color: var(--q-ink); }
/* 统一的珐琅按钮，九宫格保留厚边与宝石。 */
.top-line-btn, .stone-mini-btn, .cross-node-btn, .submap-util-btn, .red-gothic-btn,
.feature-cell-btn, .gothic-btn, .window-tab-btn, .lobby-gold-btn, .lobby-red-btn,
.lobby-top-left-btn, .lobby-top-right-btn {
  background: none;
  border: 7px solid transparent;
  border-image: url("/assets/ui-adventure/runtime/controls/button-normal.png") 60 90 60 90 fill / 7px / 0 stretch;
  border-radius: 0;
  color: #fff3d3;
  font-weight: 700;
  text-shadow: 0 1px 2px #16414a;
  box-shadow: none;
  line-height: 1.2;
}
button:focus-visible { outline: 2px solid #ffe18e; outline-offset: 2px; }
.top-line-btn:hover, .feature-cell-btn:hover, .gothic-btn:hover { filter: brightness(1.12); }
.stone-mini-btn.active-gold, .cross-node-btn.active-node, .main-nav-btn.active,
.window-tab-btn.active, .gothic-btn.gold {
  background: none;
  border-image-source: url("/assets/ui-adventure/runtime/controls/button-active.png");
  color: #174e42;
  text-shadow: 0 1px #e8ffce;
}
.gothic-btn.red, .stone-mini-btn.pk-text { background: none; color: #ffe0b7; filter: hue-rotate(325deg); }
.top-map-bar {
  height: calc(var(--u) * 76); padding: 0 calc(var(--u) * 36); gap: calc(var(--u) * 12);
  background: url("/assets/ui-adventure/runtime/hud/status-bar.png") center / 100% 100% no-repeat;
  border: 0; color: #fff2cf; font-size: clamp(11px, calc(var(--u) * 21), 17px);
  text-shadow: 0 1px 2px #123c43;
}
.top-map-name span, .top-map-count span, .top-line-btn span { color: #ffe39c; }
.top-line-btn { padding: 2px 4px; border-width: 4px; border-image-width: 4px; font-size: inherit; }
.map-viewport-container { background: #315b43; }
.hud-weather-banner {
  top: calc(var(--u) * 9); left: 50%; transform: translateX(-50%); width: max-content; max-width: 94%;
  padding: 3px 10px; border: 1px solid #cba96b; border-radius: 3px;
  background: rgba(20,68,72,.91); color: #fff0bd; font-size: clamp(10px, calc(var(--u) * 18), 15px);
  line-height: 1.4; text-shadow: 0 1px #163b3e;
}
.hud-buffs {
  position: absolute; top: calc(var(--u) * 62); left: 50%; transform: translateX(-50%); z-index: 30;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 3px; width: 60%; pointer-events: none;
}
.hud-buff {
  padding: 1px 6px; border: 1px solid #cba96b; border-radius: 3px; background: rgba(20,68,72,.91);
  color: #fff0bd; font-size: clamp(9px, calc(var(--u) * 11), 12px); line-height: 1.4;
}
.task-sidebar { top: calc(var(--u) * 64); }
.sidebar-body {
  width: calc(var(--u) * 220); padding: 4px 2px;
  border: 12px solid transparent;
  border-image: url("/assets/ui-adventure/runtime/panels/quest-scroll.png") 110 85.074 110 85.074 fill / 12px / 0 stretch;
  border-radius: 0; background: none; color: var(--q-ink); text-shadow: 0 1px #fff1ca;
}
.sidebar-title { margin-bottom: 5px; color: #245b60; font-size: clamp(12px, calc(var(--u) * 23), 18px); font-weight: 800; }
.task-stage-line, .task-desc-line, .stat-line { color: #5d513a; font-size: clamp(10px, calc(var(--u) * 19), 15px); line-height: 1.5; }
.task-name-line { color: #393d30; font-size: clamp(11px, calc(var(--u) * 21), 16px); line-height: 1.4; margin: 5px 0; white-space: pre-line; }
.task-nav-link { color: #12674d; font-size: clamp(11px, calc(var(--u) * 20), 16px); padding: 5px 0 0; font-weight: 700; }
.stat-line strong { color: #254f4d; font-weight: 700; }
.stats-sidebar { bottom: calc(var(--u) * 220); }
.sidebar-collapse-btn { width: 15px; color: #ffe6b4; background: #236674; border: 2px solid #bb9559; border-radius: 0 6px 6px 0; }
.right-top-buttons { top: calc(var(--u) * 64); gap: calc(var(--u) * 10); }
.red-gothic-btn { height: calc(var(--u) * 56); min-height: 33px; padding: 0 3px; font-size: clamp(11px, calc(var(--u) * 21), 16px); }
/* 球体独立于控制台，避免球框与液体错位。 */
.orb-control-row { height: calc(var(--u) * 190); }
.orb-control-row::before {
  inset: auto calc(var(--u) * 157) calc(var(--u) * 6);
  height: calc(var(--u) * 150);
  background: url("/assets/ui-adventure/runtime/hud/combat-deck.png") center / 210% 100% no-repeat;
}
.orb-frame-wing { left: calc(var(--u) * 20); bottom: 0; top: auto; right: auto; width: calc(var(--u) * 180); height: calc(var(--u) * 180); background: url("/assets/ui-adventure/runtime/hud/orb-ring.png") center / contain no-repeat; z-index: 6; }
.orb-right .orb-frame-wing { left: auto; right: calc(var(--u) * 20); }
.orb-sphere { left: calc(var(--u) * 55); bottom: calc(var(--u) * 35); width: calc(var(--u) * 110); height: calc(var(--u) * 110); border: 0; background: #143945; box-shadow: inset 0 0 10px #102c37; }
.orb-right .orb-sphere { right: calc(var(--u) * 55); left: auto; }
.hp-fill { background: radial-gradient(circle at 32% 24%, #ffb49a, #ed564b 50%, #9b2834 92%); }
.mp-fill { background: radial-gradient(circle at 32% 24%, #c5f6ff, #36bbe7 50%, #16558f 92%); }
.orb-sphere::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(ellipse at 30% 20%, #fff9 0, #fff0 24%); pointer-events: none; }
.orb-value-text { color: #fff7de; font-weight: 800; font-size: clamp(10px, calc(var(--u) * 20), 16px); text-shadow: 0 1px 3px #162c3c, 1px 0 #162c3c; }
.orb-center-controls { left: calc(var(--u) * 183); right: calc(var(--u) * 183); bottom: calc(var(--u) * 26); gap: calc(var(--u) * 6); }
.orb-center-btns { gap: calc(var(--u) * 5); }
.stone-mini-btn { height: calc(var(--u) * 55); min-height: 31px; padding: 0; border-width: 5px; border-image-width: 5px; font-size: clamp(11px, calc(var(--u) * 20), 16px); }
.stone-mini-btn.peace-text { color: #d9ffc2; }
.mini-status-bar { height: 7px; border: 1px solid #d3b77b; border-radius: 3px; background: #123540; box-shadow: 0 1px #12343d; }
.yellow-bar .mini-bar-fill { background: linear-gradient(90deg,#e5a940,#ffe9a1); }
.hud-hero-summary { padding: 0 3px; background: none; color: #fff0bd; text-shadow: 0 1px 2px #143d47; font-size: clamp(9px, calc(var(--u) * 17), 14px); white-space: pre-line; line-height: 1.35; }
/* 路线纸盘及六个主菜单。 */
.bottom-hud-deck { background: #183e44; }
.map-travel-box { height: calc(var(--u) * 266); background: none; border: 6px solid transparent; border-image: url("/assets/ui-adventure/runtime/panels/travel-panel.png") 65.095 90.041 65.095 90.041 fill / 6px / 0 stretch; }
.cross-map-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); grid-template-rows: repeat(3,minmax(0,1fr)) calc(var(--u) * 30); gap: calc(var(--u) * 6) calc(var(--u) * 40); padding: calc(var(--u) * 8); }
.cross-map-grid > .cross-node-btn { position: relative; inset: auto; width: auto; height: 100%; min-height: 0; }
.cross-node-btn { padding: 1px; border-width: 4px; border-image-width: 4px; font-size: clamp(11px, calc(var(--u) * 21), 17px); font-weight: 700; gap: 0; }
.cross-node-btn .lv-bracket { color: #f8dfab; font-size: clamp(9px, calc(var(--u) * 16), 13px); line-height: 1.1; text-shadow: 0 1px #194f55; }
.cross-node-btn.active-node .lv-bracket { color: #265743; text-shadow: none; }
.cross-north { grid-area: 1 / 2; } .cross-west { grid-area: 2 / 1; } .cross-hub { grid-area: 2 / 2; } .cross-east { grid-area: 2 / 3; } .cross-south { grid-area: 3 / 2; }
.cross-map-links { color: #a7cbbb; }
.cross-hub, .cross-hub.active-node { font-size: clamp(12px, calc(var(--u) * 24), 19px); }
.cross-node-btn.boss-node { color: #ffbd8d; filter: hue-rotate(325deg); }
.cross-drops, .cross-continent { position: static; align-self: center; max-width: none; padding: 0; border: 0; border-image: none; box-shadow: none; background: none; font-size: clamp(10px, calc(var(--u) * 18), 14px); color: #ffe9b2; }
.cross-drops { grid-area: 4 / 1; justify-self: start; } .cross-continent { grid-area: 4 / 3; justify-self: end; }
.submap-util-btn { padding: 2px 5px; border-width: 4px; border-image-width: 4px; font-size: clamp(10px, calc(var(--u) * 18), 14px); }
.submap-region-title, .submap-chain-arrow { color: #fbe8b8; }
.submap-util-btn.drop-btn { color: #d5ffc8; }
.bottom-main-nav { height: calc(var(--u) * 100); min-height: 52px; gap: calc(var(--u) * 4); padding: calc(var(--u) * 6); background: #1a4b52; border-top: 3px solid #b88a51; box-shadow: inset 0 2px #e7c68b; }
.main-nav-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 0 1px; border: 0; border-radius: 0; background: none; color: #ffedc3; font-size: clamp(10px,calc(var(--u) * 19),15px); font-weight: 700; text-shadow: 0 1px 2px #102d34; }
.main-nav-btn::before { content: ""; flex-shrink: 0; width: calc(var(--u) * 53); height: calc(var(--u) * 53); background: url("/assets/ui-adventure/runtime/controls/nav-icons.png") 0 0 / 300% 200% no-repeat; filter: drop-shadow(0 2px 2px #102e35); }
.main-nav-btn:nth-child(2)::before { background-position: 50% 0; } .main-nav-btn:nth-child(3)::before { background-position: 100% 0; }
.main-nav-btn:nth-child(4)::before { background-position: 0 100%; } .main-nav-btn:nth-child(5)::before { background-position: 50% 100%; } .main-nav-btn:nth-child(6)::before { background-position: 100% 100%; }
.main-nav-btn:active, .main-nav-btn.active { background: #33767966; color: #fff4a9; border: 0; box-shadow: inset 0 -2px #e4c579; }
/* 面板共享同一套木框与羊皮纸；正文保留上轮阅读尺寸。 */
.gothic-modal-backdrop { background: rgba(8,30,37,.65); padding: calc(var(--u) * 20); }
.more-features-window, .feature-window-frame, .offline-reward-window, .nickname-dialog-box {
  background: none; border: solid transparent; border-width: 48px 18px 18px;
  border-image: url("/assets/ui-adventure/runtime/panels/window-frame.png") 105 72.5 75 72.5 fill / 48px 18px 18px / 0 stretch;
  border-radius: 0; box-shadow: 0 14px 35px #0b29367a; overflow: visible;
}
.more-features-window { width: calc(var(--u) * 660); max-width: 100%; padding: 4px; }
.gothic-window-header, .more-features-window .gothic-window-header {
  position: relative; display: flex; align-items: center; justify-content: center; min-height: 40px;
  margin-top: -24px; margin-bottom: 8px; padding: 0 34px; gap: 8px; border: 0; background: none;
}
.gothic-window-title, .more-features-window .gothic-window-title { color: #255762; font-size: clamp(16px,calc(var(--u) * 28),22px); font-weight: 800; letter-spacing: .04em; text-shadow: 0 1px #fff1ce; text-align: center; }
.gothic-close-btn, .more-features-window .gothic-close-btn { position: absolute; right: -6px; top: 3px; width: 32px; height: 32px; border: 3px solid #c29961; border-radius: 50%; background: #206675; color: #fff0ba; font-size: 16px; box-shadow: inset 0 0 0 1px #e6ce92; }
.more-features-grid { gap: calc(var(--u) * 14); padding: calc(var(--u) * 12) 0 calc(var(--u) * 8); }
.feature-cell-btn { height: calc(var(--u) * 82); min-height: 43px; padding: 2px; font-size: clamp(12px,calc(var(--u) * 23),18px); }
.feature-window-frame { width: 100%; max-height: 90%; }
.feature-window-body { padding: 4px 2px 8px; color: var(--q-ink); scrollbar-color: #b78a51 #eddbb1; }
.feature-window-body::-webkit-scrollbar-track { background: #eddbb1; } .feature-window-body::-webkit-scrollbar-thumb { background: #b78a51; }
.gothic-section-card { background: rgba(251,238,199,.72); border: 1px solid #c6a572; border-radius: 3px; box-shadow: inset 0 1px #fff3cf; }
.gothic-section-title { color: #255c62; font-weight: 800; }
.window-tab-btn { min-height: 36px; padding: 2px 6px; border-width: 5px; border-image-width: 5px; }
.gothic-btn { min-height: 34px; padding: 3px 7px; border-width: 5px; border-image-width: 5px; white-space: nowrap; }
.skill-row { display: grid; grid-template-columns: 44px minmax(0,1fr) auto; align-items: center; gap: 8px; }
.skill-row.is-current { background: #e5edc6; border-color: #759462; }
.skill-icon { width: 44px; height: 44px; object-fit: contain; } .skill-copy { min-width: 0; }
.skill-name { color: #24535b; font-size: 13px; font-weight: 800; line-height: 1.4; }
.skill-desc { margin-top: 3px; color: #5d523b; font-size: 12px; line-height: 1.5; } .skill-cost { display: inline-block; white-space: nowrap; color: #30615f; }
.skill-row .gothic-btn { min-width: 70px; padding: 2px; font-size: 12px; }
.paperdoll-stage { background: radial-gradient(ellipse at 50% 46%,#a0c8a3,#327779); border: 3px solid #b08753; border-radius: 3px; }
.paperdoll-portrait { position: relative; width: 118px; height: 168px; overflow: hidden; }
.paperdoll-portrait .paperdoll-hero-img { position: absolute; max-width: none; margin: 0; }
.paperdoll-hero-name { color: #173f47; font-size: 13px; font-weight: 800; text-shadow: 0 1px #c5ddad; }
.paperdoll-power { margin-top: 4px; padding: 3px 7px; background: #e6e9b5; color: #265849; border: 1px solid #9eae6e; font-size: 12px; font-weight: 800; }
.item-quality-name { padding: 3px 6px; background: #20545c; border: 1px solid #ac8b54; text-shadow: 0 1px #15373b; }
.equip-slot-box, .bag-item-cell { background: none; border: 4px solid transparent; border-image: url("/assets/ui-adventure/runtime/panels/travel-panel.png") 65.095 90.041 65.095 90.041 fill / 4px / 0 stretch; border-radius: 0; }
.equip-slot-label, .bag-item-name { color: #fff0c6; text-shadow: 0 1px #16454c; }
.equip-slot-box.has-item .equip-slot-label, .bag-item-power { color: #f5d78d; }
.bag-item-cell.selected, .equip-slot-box.has-item { box-shadow: 0 0 0 2px #e2bd66; }
.bag-item-cell { min-width: 0; padding: 5px 2px; }
.bag-item-power { width: 100%; font-size: 10px; line-height: 1.3; }
.bag-item-icon { background: radial-gradient(ellipse,#f7e9b04d,transparent 72%); }
.attr-row { background: #e8d7a8; border-color: #c5a36a; color: #4e4935; }
.attr-row strong { color: #245b61; }
.battle-toast { z-index: 90; pointer-events: none; background: #1d5965; color: #ffedc0; border: 2px solid #c5a069; border-radius: 4px; text-shadow: 0 1px #153d47; }
.city-entry-banner { width: max-content; max-width: 82%; padding: 7px 22px; background: url("/assets/ui-adventure/runtime/hud/status-bar.png") center / 100% 100% no-repeat; border: 0; border-radius: 0; box-shadow: none; text-align: center; }
.city-entry-banner span { color: #ffebb8; font-size: calc(var(--u) * 30); font-weight: 800; letter-spacing: .04em; text-shadow: 0 1px 2px #143c47; }
.lobby-title-banner, .lobby-footer, .lobby-slot-info-box, .pedestal-tag, .job-card {
  color: var(--q-ink); border: 12px solid transparent;
  border-image: url("/assets/ui-adventure/runtime/panels/quest-scroll.png") 110 85.074 110 85.074 fill / 12px / 0 stretch;
  background: none; border-radius: 0; text-shadow: 0 1px #fff1ce;
}
.pedestal-name, .lobby-title-banner, .lobby-slot-heading, .job-card-name { color: #255762; text-shadow: 0 1px #fff1ce; }
.pedestal-meta, .lobby-slot-sub, .job-card-sub { color: #584c36; text-shadow: 0 1px #fff1ce; }
.lobby-gold-btn, .lobby-red-btn { text-shadow: 0 1px #143c47; }
.pedestal-spotlight { background: radial-gradient(ellipse at 50% 70%,#ffe9a47a,transparent 78%); }
.nickname-dialog-title { color: #255762; text-align: center; text-shadow: 0 1px #fff1ce; }
.nickname-input { color: #383e31; background: #f6e8c5; border: 2px solid #ad8956; border-radius: 3px; }

/* ==================== 提示和结算卡 ==================== */
.battle-toast.is-error { background: #6d2422; border-color: #e0917a; color: #ffe3d6; }

.reward-burst {
  position: relative; overflow: hidden; color: #fff3cf; text-align: center;
  background: radial-gradient(circle at 50% 0%, #2f7680 0%, #17454f 55%, #0f3039 100%);
  border: 2px solid #d9b56a; border-radius: 8px;
  box-shadow: 0 0 0 1px #6a4f22, 0 0 calc(var(--u) * 26) rgba(245, 205, 110, .55), inset 0 0 calc(var(--u) * 22) rgba(255, 225, 150, .16);
}
.settlement-card {
  position: absolute; z-index: 80; left: 50%; top: calc(var(--u) * 118); width: 78%; max-width: 560px;
  padding: calc(var(--u) * 12) calc(var(--u) * 16) calc(var(--u) * 16);
  transform: translateX(-50%); pointer-events: none;
}
.settlement-card.is-showing { animation: reward-in .42s cubic-bezier(.2, 1.4, .4, 1) both; }
.settlement-card.is-leaving { animation: reward-out .3s ease-in both; }
@keyframes reward-in { from { opacity: 0; transform: translateX(-50%) translateY(-22px) scale(.86); } to { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); } }
@keyframes reward-out { to { opacity: 0; transform: translateX(-50%) translateY(-14px) scale(.96); } }

.reward-burst::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255, 244, 205, .42), transparent);
  animation: reward-shine 1.5s ease-out .25s 2;
}
@keyframes reward-shine { to { left: 130%; } }
.reward-burst-rays {
  position: absolute; left: 50%; top: -120%; width: 240%; aspect-ratio: 1; margin-left: -120%; pointer-events: none; opacity: .22;
  background: repeating-conic-gradient(rgba(255, 226, 150, .8) 0 8deg, transparent 8deg 24deg);
  animation: reward-spin 14s linear infinite;
}
@keyframes reward-spin { to { transform: rotate(360deg); } }

.reward-burst-title, .reward-stats, .reward-items, .reward-levelup, .reward-warning { position: relative; }
.reward-burst-title {
  font-weight: 800; letter-spacing: .14em; font-size: clamp(14px, calc(var(--u) * 26), 21px);
  color: #ffe08a; text-shadow: 0 2px 0 #6a4514, 0 0 calc(var(--u) * 12) rgba(255, 210, 100, .9);
}
.reward-levelup {
  display: inline-block; margin-top: 4px; padding: 1px 12px; border-radius: 12px; font-weight: 700; color: #3a2204;
  font-size: clamp(11px, calc(var(--u) * 20), 15px); background: linear-gradient(180deg, #ffe9a0, #e9ae3f);
  animation: reward-pop .55s cubic-bezier(.2, 1.8, .4, 1) .15s both;
}
@keyframes reward-pop { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: scale(1); } }
.reward-stats { display: flex; justify-content: center; gap: calc(var(--u) * 22); margin-top: 6px; }
.reward-stat { display: flex; flex-direction: column; align-items: center; min-width: 0; }
.reward-stat span { font-size: clamp(10px, calc(var(--u) * 17), 13px); color: #bfe0dd; }
.reward-stat strong { font-size: clamp(15px, calc(var(--u) * 30), 24px); font-variant-numeric: tabular-nums; color: #fff; text-shadow: 0 2px 0 rgba(0, 0, 0, .35); }
.reward-stat.is-gold strong { color: #ffd65c; }
.reward-stat.is-exp strong { color: #9fe6ff; }
.reward-items { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin-top: 8px; }
.reward-item {
  display: flex; align-items: center; gap: 3px; padding: 2px 7px; border-radius: 4px; border: 1px solid #7f9a97;
  background: rgba(8, 30, 37, .72); font-size: clamp(10px, calc(var(--u) * 17), 13px);
  animation: reward-pop .4s cubic-bezier(.2, 1.6, .4, 1) both;
}
.reward-item img { width: clamp(14px, calc(var(--u) * 26), 22px); height: clamp(14px, calc(var(--u) * 26), 22px); object-fit: contain; }
.reward-item.is-lucky { border-color: #60a9ff; color: #bcdcff; box-shadow: 0 0 6px rgba(96, 169, 255, .75); }
.reward-item.is-rare { border-color: #c184ff; color: #e6ccff; box-shadow: 0 0 7px rgba(193, 132, 255, .8); }
.reward-item.is-excellent { border-color: #55dd75; color: #b9ffc9; box-shadow: 0 0 9px rgba(85, 221, 117, .95); animation-name: reward-pop, reward-glow; animation-duration: .4s, 1.2s; animation-iteration-count: 1, infinite; animation-direction: normal, alternate; }
@keyframes reward-glow { to { box-shadow: 0 0 15px rgba(85, 221, 117, 1); } }
.reward-item.is-more { color: #bfe0dd; }
.reward-warning { margin-top: 6px; font-size: clamp(10px, calc(var(--u) * 17), 13px); color: #ffc2a8; }
@media (prefers-reduced-motion: reduce) {
  .reward-burst::after, .reward-burst-rays, .reward-item.is-excellent { animation: none; }
}

/* ==================== 血色城堡结算 ==================== */
.castle-result-backdrop { position: absolute; inset: 0; z-index: 85; display: flex; align-items: center; justify-content: center; padding: calc(var(--u) * 24); background: rgba(6, 18, 24, .72); }
.castle-result-backdrop[hidden] { display: none; }
#offline-modal .castle-result { max-width: 90%; }
.castle-result { width: 100%; max-width: 600px; padding: calc(var(--u) * 22) calc(var(--u) * 20) calc(var(--u) * 24); animation: castle-in .5s cubic-bezier(.2, 1.5, .4, 1) both; }
@keyframes castle-in { from { opacity: 0; transform: scale(.7); } to { opacity: 1; transform: scale(1); } }
.castle-result.is-win { background: radial-gradient(circle at 50% 0%, #a52a2a 0%, #5c1319 52%, #2a0b10 100%); }
.castle-result.is-lose { background: radial-gradient(circle at 50% 0%, #3f4a52 0%, #262e35 55%, #171c20 100%); border-color: #8d8d8d; box-shadow: 0 0 0 1px #3c3c3c; }
.castle-result.is-lose .reward-burst-rays { display: none; }
.castle-result.is-lose .castle-result-title { color: #d7d7d7; text-shadow: 0 2px 0 #222; }
.castle-result > * { position: relative; }
.castle-result > .reward-burst-rays { position: absolute; }
.castle-result-head { font-size: clamp(11px, calc(var(--u) * 20), 15px); color: #f2d9c0; letter-spacing: .1em; }
.castle-result-title { font-size: clamp(26px, calc(var(--u) * 60), 46px); line-height: 1.2; animation: reward-pop .6s cubic-bezier(.2, 1.8, .4, 1) .1s both; }
.castle-rating {
  position: absolute; right: calc(var(--u) * 20); top: calc(var(--u) * 18); width: calc(var(--u) * 84); height: calc(var(--u) * 84); line-height: calc(var(--u) * 78);
  border: 3px solid currentColor; border-radius: 50%; transform: rotate(-14deg); font-weight: 900; font-size: calc(var(--u) * 54); color: #ffd65c;
  text-shadow: 0 0 calc(var(--u) * 12) rgba(255, 214, 92, .9); animation: castle-stamp .5s cubic-bezier(.2, 1.8, .4, 1) .75s both;
}
.castle-rating.rating-A { color: #ff9fce; text-shadow: 0 0 calc(var(--u) * 12) rgba(255, 159, 206, .9); }
.castle-rating.rating-B { color: #9fe6ff; text-shadow: 0 0 calc(var(--u) * 12) rgba(159, 230, 255, .9); }
@keyframes castle-stamp { from { opacity: 0; transform: rotate(-14deg) scale(2.6); } to { opacity: 1; transform: rotate(-14deg) scale(1); } }
.castle-stages { display: flex; justify-content: center; gap: calc(var(--u) * 6); margin: calc(var(--u) * 14) 0; }
.castle-stage { flex: 1; min-width: 0; color: #a7a7a7; font-size: clamp(10px, calc(var(--u) * 17), 13px); animation: reward-pop .4s cubic-bezier(.2, 1.6, .4, 1) both; }
.castle-stage i { display: block; height: calc(var(--u) * 8); margin-bottom: 3px; border-radius: 4px; background: rgba(255, 255, 255, .16); }
.castle-stage.is-done { color: #ffe08a; }
.castle-stage.is-done i { background: linear-gradient(90deg, #ffd65c, #ff9b3d); box-shadow: 0 0 8px rgba(255, 190, 80, .9); }
.castle-stage.is-stopped { color: #ff9f8a; }
.castle-stage.is-stopped i { background: #8f2c22; }
.castle-result-meta { margin-top: 6px; font-size: clamp(10px, calc(var(--u) * 17), 13px); color: #e6d6c2; }
.castle-result .reward-levelup { margin-top: 8px; }
.castle-result-close { margin-top: calc(var(--u) * 16); }
.castle-sparks { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.castle-sparks i {
  position: absolute; left: calc(var(--i) * 7.2% + 2%); top: -8%; width: calc(var(--u) * 7); height: calc(var(--u) * 7); border-radius: 50%; background: #ffe08a;
  box-shadow: 0 0 8px #ffd65c; animation: castle-fall calc(1.6s + var(--i) * .13s) linear calc(var(--i) * .17s) infinite;
}
@keyframes castle-fall { to { top: 108%; opacity: .15; } }
@media (prefers-reduced-motion: reduce) { .castle-sparks { display: none; } }
.master-exp { height: 8px; margin-top: 4px; border-radius: 4px; overflow: hidden; background: rgba(60, 40, 20, .25); }
.master-exp i { display: block; height: 100%; background: linear-gradient(90deg, #c184ff, #ffb0f0); }
.master-tabs { display: flex; gap: 6px; margin: 8px 0; }
.master-tabs .gothic-btn { flex: 1; min-width: 0; }
.master-node { display: flex; align-items: center; gap: 8px; padding: 6px 8px; margin-bottom: 4px; border-radius: 6px; border: 1px solid rgba(120, 90, 50, .3); background: rgba(255, 255, 255, .25); }
.master-node.is-learned { border-color: #d9a441; background: rgba(255, 224, 138, .25); }
.master-node-info { flex: 1; min-width: 0; font-size: 0.8rem; }
.master-node-level { color: #8a5a12; font-weight: 700; margin: 0 4px; }
.master-node-rank { font-size: 0.68rem; color: var(--text-muted); }
.master-node-effect { font-size: 0.72rem; color: var(--text-muted); }
.master-node-blocked { font-size: 0.68rem; color: #b5462f; }
.class-path { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; margin-bottom: 6px; }
.class-path i { font-style: normal; color: var(--text-muted); }
.class-path-step { padding: 2px 8px; border-radius: 10px; border: 1px solid rgba(120, 90, 50, .4); color: var(--text-muted); font-size: 0.78rem; }
.class-path-step.is-current { border-color: #d9a441; background: linear-gradient(180deg, #ffe08a, #e9a93c); color: #4a2a06; font-weight: 700; }
.class-need { white-space: nowrap; }
.class-need.is-ok { color: #2f9e57; }
.class-result.is-win { background: radial-gradient(circle at 50% 0%, #1f8f8a 0%, #125450 52%, #082b2a 100%); }
.class-result-name { font-size: clamp(20px, calc(var(--u) * 44), 34px); color: #ffe08a; text-shadow: 0 0 calc(var(--u) * 14) rgba(255, 214, 92, .95); animation: reward-pop .6s cubic-bezier(.2, 1.8, .4, 1) .5s both; }
.chaos-result.is-win { background: radial-gradient(circle at 50% 0%, #b5572a 0%, #6b2a14 52%, #2c1008 100%); }
.ancient-detail { margin-top: 6px; padding-top: 6px; border-top: 1px dashed rgba(120, 90, 50, .4); font-size: 0.72rem; color: var(--text-muted); }
.ancient-detail-name { color: #8a4fd0; font-weight: 700; }
.ancient-detail .is-active { color: #2f9e57; font-weight: 700; }
.square-result.is-win { background: radial-gradient(circle at 50% 0%, #6e36b5 0%, #3a1766 52%, #170a2c 100%); }
.square-result.is-lose { background: radial-gradient(circle at 50% 0%, #443a52 0%, #2a2333 55%, #17131d 100%); }
.square-result .castle-sparks i { background: #d9a6ff; box-shadow: 0 0 8px #b26bff; }
.square-medal.medal-1 { color: #ffd65c; text-shadow: 0 0 calc(var(--u) * 12) rgba(255, 214, 92, .9); }
.square-medal.medal-2 { color: #e4edf5; text-shadow: 0 0 calc(var(--u) * 12) rgba(228, 237, 245, .9); }
.square-medal.medal-3 { color: #f0a56b; text-shadow: 0 0 calc(var(--u) * 12) rgba(240, 165, 107, .9); }
.square-medal.medal-4 { color: #a9b4bf; text-shadow: 0 0 calc(var(--u) * 12) rgba(169, 180, 191, .7); }
.square-bosses { display: flex; align-items: center; justify-content: center; gap: calc(var(--u) * 6); margin: calc(var(--u) * 4) 0 calc(var(--u) * 10); color: #e6d6f2; font-size: clamp(10px, calc(var(--u) * 17), 13px); }
.square-bosses i { width: clamp(11px, calc(var(--u) * 20), 16px); height: clamp(11px, calc(var(--u) * 20), 16px); border-radius: 50%; border: 1px solid rgba(255, 255, 255, .35); background: rgba(255, 255, 255, .08); animation: reward-pop .4s cubic-bezier(.2, 1.6, .4, 1) both; }
.square-bosses i.is-slain { border-color: #ffb0f0; background: radial-gradient(circle, #ffd9f6, #d14fd6); box-shadow: 0 0 9px rgba(225, 100, 230, .95); }
.square-bosses span { margin-left: calc(var(--u) * 4); }

/* 全服广播框：路线盘与主菜单之间，固定 3 行。 */
.world-broadcasts { height: calc(var(--u) * 96); min-height: 54px; padding: calc(var(--u) * 6) calc(var(--u) * 12); overflow: hidden; background: #10292e; border-top: 2px solid #b88a51; color: #f3ecdc; font-size: clamp(10px, calc(var(--u) * 19), 14px); line-height: 1.45; display: flex; flex-direction: column; justify-content: flex-end; }
.broadcast-line { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bc-tag { color: #ffb347; }
.bc-hero { color: #6add94; }
.bc-monster { color: #ffcf5a; }
.bc-excellent { color: #59e08f; font-weight: 700; }
.bc-jewel { color: #ffe16b; font-weight: 700; }
.bc-empty { color: #8fb3ad; }
