:root {
  --bg-outer: #13110f;
  --bg-device: #1d1a16;
  --bg-surface: #26221d;
  --bg-elevated: #2f2a24;
  --bg-well: #171411;

  --paper-bg: #f3ecdc;
  --paper-edge: #dfd3ba;
  --paper-ink: #221d17;
  --paper-sub: #5c5245;

  --brass-bright: #dfc088;
  --brass-main: #c49b57;
  --brass-dim: rgba(196, 155, 87, 0.24);
  --brass-hairline: rgba(216, 192, 145, 0.14);

  --cinnabar: #b5382a;
  --cinnabar-deep: #872318;
  --cinnabar-soft: #d96557;
  --celadon: #639681;
  --celadon-deep: #2b4a3e;

  --text-main: #ece4d4;
  --text-sec: #aba190;
  --text-dim: #736b5e;

  --font-serif: "Songti SC", "Noto Serif CJK SC", "Noto Serif SC", "Source Han Serif SC", "STSong", "SimSun", serif;
  --font-sans: "PingFang SC", "Noto Sans CJK SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
}

img {
  -webkit-user-drag: none;
  user-select: none;
  -webkit-user-select: none;
}

.tile .tile-inner,
.tile img,
.boss-portrait-hitbox img,
.spell-slot img,
.relic-slot img,
.cmd-skill-btn img,
.cmd-tactic-btn img,
.stamina-bar-outer img,
.stamina-pill img {
  pointer-events: none;
  -webkit-user-drag: none;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  background: radial-gradient(circle at 50% 0%, #24201b 0%, #141210 70%);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-variant-numeric: tabular-nums;
  touch-action: manipulation;
  -webkit-font-smoothing: antialiased;
}

.app-shell {
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 8px;
}

.game-device {
  width: 100%;
  max-width: 432px;
  min-height: 744px;
  background-color: var(--bg-device);
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(206, 174, 118, 0.36);
  box-shadow:
    0 24px 56px rgba(0, 0, 0, 0.72),
    inset 0 1px 0 rgba(255, 248, 232, 0.08);
}

.game-device.device-shake-heavy {
  animation: deviceShakeHeavy 0.34s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

@keyframes deviceShakeHeavy {
  0%, 100% { transform: translate(0, 0); }
  15% { transform: translate(-5px, -3px); }
  30% { transform: translate(5px, 3px); }
  45% { transform: translate(-4px, 2px); }
  65% { transform: translate(4px, -2px); }
  82% { transform: translate(-2px, 1px); }
}

.vfx-flash {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  z-index: 34;
}

.vfx-flash.flash-gold.active {
  background: radial-gradient(circle at 50% 55%, rgba(245, 208, 138, 0.34) 0%, rgba(196, 155, 87, 0.08) 70%);
  animation: flashBurst 0.24s ease-out;
}

.vfx-flash.flash-crit.active {
  background: radial-gradient(circle at 50% 45%, rgba(224, 109, 83, 0.3) 0%, rgba(245, 208, 138, 0.1) 70%);
  animation: flashBurst 0.22s ease-out;
}

@keyframes flashBurst {
  0% { opacity: 1; }
  100% { opacity: 0; }
}

.vfx-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 35;
}

/* Imperial Jackpot Decree Banner (3-of-a-Kind Cinematic Celebration) */
.jackpot-banner {
  position: absolute;
  left: 16px;
  right: 16px;
  top: 42%;
  transform: translateY(-50%) scale(0.86);
  pointer-events: none;
  opacity: 0;
  z-index: 38;
  transition: opacity 0.18s ease, transform 0.22s cubic-bezier(0.18, 1.25, 0.32, 1);
}

.jackpot-banner.show {
  opacity: 1;
  transform: translateY(-50%) scale(1);
}

.jackpot-banner-inner {
  background: linear-gradient(180deg, rgba(36, 26, 18, 0.96) 0%, rgba(22, 16, 12, 0.97) 100%);
  border: 1.5px solid var(--brass-bright);
  border-radius: 12px;
  padding: 14px 18px 13px;
  text-align: center;
  box-shadow:
    0 18px 44px rgba(0, 0, 0, 0.85),
    0 0 28px rgba(223, 192, 136, 0.42),
    inset 0 0 0 3px rgba(196, 155, 87, 0.18);
}

.jackpot-seal {
  display: inline-block;
  background: var(--cinnabar);
  color: #f9f2e6;
  font-family: var(--font-serif);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  padding: 2px 8px;
  border-radius: 3px;
  border: 1px solid rgba(255, 232, 214, 0.45);
}

.jackpot-title {
  margin-top: 6px;
  font-family: var(--font-serif);
  font-size: 1.24rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #f9e6b8;
  text-shadow: 0 2px 12px rgba(223, 192, 136, 0.65);
}

.jackpot-sub {
  margin-top: 4px;
  font-size: 0.75rem;
  color: var(--paper-bg);
  letter-spacing: 0.04em;
}

.hud-gold-pop {
  display: inline-block;
  animation: goldPopAnim 0.24s ease-out;
}

@keyframes goldPopAnim {
  0% { transform: scale(1); color: #fff8ea; }
  45% { transform: scale(1.28); color: #f5d08a; }
  100% { transform: scale(1); }
}

.screen {
  position: relative;
  flex: 1;
  min-height: 742px;
  display: none;
  flex-direction: column;
  z-index: 3;
}

.screen.active {
  display: flex;
}

/* ==================== HUB / COMMAND PAVILION ==================== */
.hub-screen {
  background: linear-gradient(180deg, #211d18 0%, #1a1714 100%);
}

.hero-banner {
  position: relative;
  width: 100%;
  height: 178px;
  background-size: cover;
  background-position: center 22%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 11px 16px 13px;
  flex-shrink: 0;
}

.hero-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(20, 17, 14, 0.28) 0%,
    rgba(24, 20, 17, 0.35) 48%,
    #211d18 100%
  );
}

.hub-top-bar {
  position: relative;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.gold-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(23, 20, 17, 0.78);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(207, 168, 102, 0.38);
  border-radius: 999px;
  padding: 4px 11px 4px 8px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--brass-bright);
}

.gold-pill img {
  width: 15px;
  height: 15px;
}

.top-nav-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.quiet-btn {
  background: rgba(24, 21, 18, 0.76);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(216, 192, 145, 0.24);
  color: var(--text-main);
  border-radius: 8px;
  padding: 5px 10px;
  font-family: var(--font-serif);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.quiet-btn.icon-only {
  width: 30px;
  height: 28px;
  padding: 0;
  font-family: var(--font-sans);
}

.quiet-btn:hover {
  background: rgba(48, 42, 35, 0.88);
  border-color: var(--brass-main);
}

.banner-content {
  position: relative;
  z-index: 3;
}

.title-lockup {
  display: flex;
  align-items: center;
  gap: 9px;
}

.vermilion-seal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--cinnabar);
  color: #f7efe2;
  font-family: var(--font-serif);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 2px 5px;
  border-radius: 3px;
  border: 1px solid rgba(255, 232, 214, 0.35);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
}

.title-lockup h1 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.56rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #f6efe0;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.85);
}

.hub-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  padding: 3px 16px 13px;
}

/* 4 Generals Portrait Strip */
.hero-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.hero-pick-card {
  background: var(--bg-surface);
  border: 1px solid var(--brass-hairline);
  border-radius: 12px;
  padding: 6px 4px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  position: relative;
  transition: transform 0.14s ease, border-color 0.16s ease, background 0.16s ease;
}

.hero-pick-card:hover {
  transform: translateY(-1px);
  background: var(--bg-elevated);
}

.hero-pick-card.selected {
  background: linear-gradient(180deg, #342d23 0%, #26211a 100%);
  border-color: var(--brass-main);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 240, 200, 0.12);
}

.hero-pick-card.locked img {
  opacity: 0.42;
  filter: grayscale(0.55);
}

.hero-pick-card img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  border-radius: 8px;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.45));
}

.hero-pick-name {
  font-family: var(--font-serif);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-top: 4px;
  color: var(--text-main);
}

.hero-pick-sub {
  font-size: 0.64rem;
  color: var(--text-dim);
  margin-top: 1px;
}

.hero-pick-card.selected .hero-pick-sub {
  color: var(--brass-bright);
}

/* Clean Minimalist Hero Plaque */
.hero-detail-box {
  background: var(--bg-surface);
  border: 1px solid var(--brass-hairline);
  border-radius: 12px;
  padding: 9px 13px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hero-plaque-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 245, 225, 0.06);
  padding-bottom: 5px;
}

.hero-plaque-top h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 0.94rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--brass-bright);
}

.hero-inline-stats {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.76rem;
  color: var(--text-sec);
}

.hero-inline-stats b {
  color: var(--text-main);
  font-weight: 700;
  margin-left: 2px;
}

.hero-plaque-bio {
  margin: 0;
  font-size: 0.74rem;
  line-height: 1.4;
  color: var(--text-sec);
}

.hero-talent-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.talent-pill {
  background: var(--bg-well);
  border: 1px solid rgba(216, 192, 145, 0.14);
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 0.68rem;
  color: var(--text-sec);
  cursor: pointer;
  transition: border-color 0.14s ease, color 0.14s ease;
}

.talent-pill:hover {
  border-color: var(--brass-main);
  color: var(--brass-bright);
}

.talent-pill em {
  font-style: normal;
  color: var(--brass-main);
  margin-left: 3px;
}

/* 6 Campaign Chapters (3x2 Symmetrical Grid) */
.world-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 7px;
}

.world-card {
  background: var(--bg-surface);
  border: 1px solid var(--brass-hairline);
  border-radius: 10px;
  padding: 7px 9px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.world-card:hover:not(.locked) {
  background: var(--bg-elevated);
}

.world-card.selected {
  background: linear-gradient(180deg, #342d23 0%, #26211a 100%);
  border-color: var(--brass-main);
}

.world-card.locked {
  opacity: 0.42;
  cursor: not-allowed;
}

.world-card img {
  width: 36px;
  height: 36px;
  border-radius: 7px;
  object-fit: contain;
  background: var(--bg-well);
  padding: 2px;
  flex-shrink: 0;
}

.world-card-text {
  min-width: 0;
  flex: 1;
}

.world-card-title {
  font-family: var(--font-serif);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 5px;
}

.world-num {
  font-size: 0.65rem;
  color: var(--brass-main);
  border: 1px solid rgba(196, 155, 87, 0.35);
  border-radius: 3px;
  padding: 0 4px;
  line-height: 1.35;
}

.world-card-sub {
  font-size: 0.67rem;
  color: var(--text-dim);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.world-card.selected .world-card-sub {
  color: var(--text-sec);
}

.cleared-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--celadon);
  margin-left: auto;
}

/* Primary & Secondary CTA Buttons */
.cta-row {
  display: flex;
  gap: 9px;
  margin-top: auto;
}

.btn-cinnabar {
  flex: 1.5;
  background: linear-gradient(180deg, #bf3e30 0%, #96291d 100%);
  border: 1px solid rgba(245, 190, 175, 0.38);
  border-radius: 10px;
  padding: 12px 16px;
  color: #f8f1e5;
  font-family: var(--font-serif);
  font-size: 0.96rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  cursor: pointer;
  box-shadow: 0 3px 0 #59160e, 0 8px 20px rgba(0, 0, 0, 0.4);
  transition: transform 0.1s ease, filter 0.15s ease;
}

.btn-cinnabar:hover:not(:disabled) {
  filter: brightness(1.07);
}

.btn-cinnabar:active:not(:disabled) {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #59160e;
}

.btn-cinnabar:disabled {
  background: var(--bg-surface);
  border-color: var(--brass-hairline);
  color: var(--text-dim);
  box-shadow: none;
  cursor: not-allowed;
  letter-spacing: 0.04em;
  font-size: 0.8rem;
}

.btn-stone {
  flex: 1;
  background: var(--bg-elevated);
  border: 1px solid rgba(207, 168, 102, 0.34);
  border-radius: 10px;
  padding: 12px 12px;
  color: var(--brass-bright);
  font-family: var(--font-serif);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
  position: relative;
  box-shadow: 0 3px 0 #14110e;
  transition: transform 0.1s ease, background 0.15s ease;
}

.btn-stone:hover {
  background: #3a332b;
}

.btn-stone:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #14110e;
}

.notify-dot {
  position: absolute;
  top: 7px;
  right: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cinnabar-soft);
}

/* ==================== BATTLEFIELD + ASTROLABE SCREEN ==================== */
.dungeon-screen {
  justify-content: space-between;
  background-size: cover;
  background-position: center;
}

/* Single Clean Top Header */
.dungeon-hud {
  background: rgba(24, 21, 18, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(207, 168, 102, 0.24);
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  z-index: 6;
  flex-shrink: 0;
}

.hud-left {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.hud-avatar-wrap {
  width: 50px;
  height: 50px;
  border-radius: 10px;
  background: var(--bg-well);
  border: 1.5px solid var(--brass-main);
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.55);
}

.hud-avatar-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.hud-vitals {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.hp-bar-outer {
  width: 174px;
  height: 14px;
  background: #13100e;
  border: 1px solid rgba(223, 178, 112, 0.42);
  border-radius: 999px;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.85);
}

.hp-bar-lag {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: linear-gradient(90deg, #fde68a 0%, #fffbeb 100%);
  opacity: 0.88;
  transition: width 0.56s cubic-bezier(0.22, 1, 0.36, 1) 0.12s;
  z-index: 1;
}

.hp-bar-fill {
  position: relative;
  height: 100%;
  background: linear-gradient(90deg, #8f2218 0%, #cf3e2e 45%, #ec775c 52%, #b83123 100%);
  background-size: 220% 100%;
  animation: lacquerHpSheen 3.6s linear infinite;
  transition: width 0.16s ease-out;
  z-index: 2;
}

.hp-bar-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.63rem;
  font-weight: 800;
  color: #f7efe2;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.95);
  z-index: 3;
}

.sub-stats-inline {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.69rem;
  font-weight: 700;
  color: var(--text-sec);
  white-space: nowrap;
  padding-left: 2px;
}

.stat-inline {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.stat-inline em {
  font-style: normal;
  font-size: 0.62rem;
  color: var(--text-dim);
}

.stat-inline span {
  color: var(--text-main);
  font-weight: 800;
}

.stat-inline.gold-stat span {
  color: var(--brass-bright);
}

.stat-inline img {
  width: 12px;
  height: 12px;
  opacity: 0.92;
}

.hud-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Visual Relic Indicators (Tiger Tally + Shengmen Gate) */
.objective-relics {
  display: flex;
  align-items: center;
  gap: 4px;
}

.obj-slot {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: var(--bg-well);
  border: 1px solid rgba(216, 192, 145, 0.14);
  padding: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all 0.2s ease;
}

.obj-slot img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0.24;
  filter: grayscale(1);
  transition: all 0.2s ease;
}

.obj-slot.sensed {
  border-color: var(--brass-main);
  box-shadow: 0 0 8px rgba(196, 155, 87, 0.35);
}

.obj-slot.sensed img {
  opacity: 0.72;
  filter: grayscale(0.2);
}

.obj-slot.ready {
  border-color: var(--celadon);
  background: rgba(43, 74, 62, 0.45);
}

.obj-slot.ready img {
  opacity: 1;
  filter: none;
}

.obj-slot.ready::after {
  content: "";
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--celadon);
  border: 1.5px solid #181512;
}

.stage-plaque-btn {
  background: var(--bg-surface);
  border: 1px solid rgba(207, 168, 102, 0.32);
  border-radius: 8px;
  padding: 3px 7px;
  text-align: right;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.stage-plaque-btn:hover {
  background: var(--bg-elevated);
  border-color: var(--brass-bright);
}

.stage-plaque-btn .fl-num {
  display: block;
  font-size: 0.62rem;
  color: var(--text-sec);
}

.stage-plaque-btn .fl-world {
  display: block;
  font-family: var(--font-serif);
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--brass-bright);
  letter-spacing: 0.03em;
}

/* ==================== LIVING CHARACTER DIALOGUE PLAQUE ==================== */
.speech-bar {
  margin: 5px 12px 0;
  padding: 6px 10px;
  background: linear-gradient(90deg, rgba(35, 30, 24, 0.94) 0%, rgba(26, 22, 18, 0.92) 100%);
  border: 1px solid rgba(207, 168, 102, 0.28);
  border-left: 2.5px solid var(--cinnabar);
  border-radius: 9px;
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  z-index: 6;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.36);
  transition: border-color 0.16s ease, background 0.16s ease;
}

.speech-bar:hover {
  border-color: var(--brass-main);
  border-left-color: var(--cinnabar-soft);
}

.speech-bar.enemy-voice {
  border-left-color: var(--brass-bright);
}

.speech-avatar-frame {
  width: 34px;
  height: 34px;
  border-radius: 7px;
  background: var(--bg-well);
  border: 1px solid rgba(207, 168, 102, 0.42);
  overflow: hidden;
  flex-shrink: 0;
}

.speech-avatar-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.speech-body {
  min-width: 0;
  flex: 1;
}

.speech-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.speech-speaker {
  font-family: var(--font-serif);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--brass-bright);
  letter-spacing: 0.04em;
}

.speech-stage-hint {
  font-size: 0.62rem;
  color: var(--text-dim);
}

.speech-text {
  margin-top: 1px;
  font-family: var(--font-serif);
  font-size: 0.73rem;
  line-height: 1.35;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==================== 5x6 EIGHT-TRIGRAM BOARD ==================== */
.board-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 12px;
  position: relative;
  min-height: 0;
  z-index: 4;
}

/* Ephemeral Whisper Toast (Auto-fades, zero permanent log clutter) */
.board-toast {
  position: absolute;
  top: 5px;
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  background: rgba(22, 19, 16, 0.93);
  border: 1px solid rgba(207, 168, 102, 0.42);
  border-radius: 999px;
  padding: 4px 13px;
  font-size: 0.72rem;
  color: var(--paper-bg);
  white-space: nowrap;
  max-width: 90%;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
  opacity: 0;
  z-index: 25;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.board-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.dungeon-grid {
  width: min(100%, 296px);
  aspect-ratio: 5 / 6;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(6, 1fr);
  gap: 5px;
  padding: 7px;
  background: rgba(25, 22, 18, 0.86);
  backdrop-filter: blur(3px);
  border: 1px solid rgba(207, 168, 102, 0.38);
  border-radius: 14px;
  box-shadow:
    inset 0 2px 10px rgba(0, 0, 0, 0.72),
    0 12px 28px rgba(0, 0, 0, 0.55);
  position: relative;
}

.tile {
  position: relative;
  border-radius: 8px;
  background: rgba(34, 30, 25, 0.78);
  border: 1px solid rgba(216, 192, 145, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  transition: transform 0.12s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.tile-inner {
  width: 100%;
  height: 100%;
  border-radius: 7px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.tile.unrevealed {
  border: none;
  background: transparent;
  box-shadow: 0 3px 0 rgba(12, 10, 8, 0.9), 0 4px 7px rgba(0, 0, 0, 0.35);
}

.tile.unrevealed .brick-art {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 7px;
  display: block;
}

.tile.fogged .brick-art {
  filter: brightness(0.76) saturate(0.75);
}

.tile.flippable {
  cursor: pointer;
  box-shadow: 0 3px 0 #3f2b10, 0 0 8px rgba(212, 170, 92, 0.24);
}

.tile.flippable:hover {
  transform: translateY(-1.5px);
  box-shadow: 0 4px 0 #3f2b10, 0 0 12px rgba(223, 192, 136, 0.45);
}

.tile.flippable:active {
  transform: translateY(1px) scale(0.97);
}

.tile.locked-tile {
  cursor: not-allowed;
  box-shadow: 0 3px 0 #2e1212;
}

.tile-lock-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 7px;
  z-index: 4;
  pointer-events: none;
}

/* Clean Geometric Beacon for Sensed Key / Gate (Zero Emojis!) */
.tile.key-hint::after,
.tile.door-hint::after {
  content: "";
  position: absolute;
  top: 4px;
  right: 4px;
  width: 8px;
  height: 8px;
  transform: rotate(45deg);
  z-index: 8;
  pointer-events: none;
  animation: beaconPulse 1.1s ease-in-out infinite alternate;
}

.tile.key-hint::after {
  background: var(--brass-bright);
  border: 1px solid #3a2608;
  box-shadow: 0 0 8px rgba(223, 192, 136, 0.95);
}

.tile.door-hint::after {
  background: #7cc4b0;
  border: 1px solid #0d2b23;
  box-shadow: 0 0 8px rgba(124, 196, 176, 0.95);
}

@keyframes beaconPulse {
  from { transform: rotate(45deg) scale(0.85); opacity: 0.75; }
  to { transform: rotate(45deg) scale(1.18); opacity: 1; }
}

.tile.revealed {
  background: radial-gradient(circle at 50% 42%, rgba(72, 63, 50, 0.36) 0%, rgba(28, 24, 20, 0.85) 100%);
  border: 1px solid rgba(216, 192, 145, 0.16);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.55);
  animation: flipReveal 0.18s ease-out;
}

@keyframes flipReveal {
  0% { transform: scale(0.86); opacity: 0.5; }
  100% { transform: scale(1); opacity: 1; }
}

.tile.interactive {
  cursor: pointer;
}

.tile.interactive:hover {
  border-color: var(--brass-main);
}

.tile.door-locked {
  cursor: pointer;
  border-color: rgba(124, 196, 176, 0.38);
}

.tile.door-open {
  cursor: pointer;
  border: 1.5px solid var(--brass-bright);
  background: radial-gradient(circle, rgba(99, 150, 129, 0.34) 0%, rgba(196, 155, 87, 0.22) 100%);
  box-shadow: 0 0 14px rgba(196, 155, 87, 0.45);
}

.door-tag {
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.55rem;
  font-weight: 700;
  padding: 0.5px 5px;
  border-radius: 3px;
  white-space: nowrap;
  z-index: 6;
}

.door-tag.locked {
  background: rgba(18, 16, 14, 0.9);
  color: var(--text-sec);
  border: 1px solid rgba(216, 192, 145, 0.25);
}

.door-tag.open {
  background: var(--brass-main);
  color: #1c1408;
}

/* Monster & Boss Tiles — Clean Tabular Corner Numerals (Zero Emojis!) */
.tile.monster-tile {
  cursor: pointer;
  background: radial-gradient(circle at 50% 42%, rgba(140, 42, 32, 0.3) 0%, rgba(28, 23, 20, 0.9) 100%);
  border: 1px solid rgba(205, 92, 78, 0.48);
}

.tile.monster-tile:hover {
  border-color: #e08276;
}

.tile.monster-tile.boss-tile {
  border: 1.5px solid var(--brass-bright);
  background: radial-gradient(circle at 50% 42%, rgba(180, 118, 42, 0.34) 0%, rgba(32, 24, 20, 0.92) 100%);
}

.tile.spell-targetable {
  border-color: #7cc4b0 !important;
  box-shadow: 0 0 12px rgba(124, 196, 176, 0.7) !important;
}

.entity-sprite {
  width: 88%;
  height: 88%;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.65));
}

.pickup-sprite {
  width: 70%;
  height: 70%;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.55));
}

.mon-num {
  position: absolute;
  bottom: 2px;
  min-width: 16px;
  height: 14px;
  padding: 0 3.5px;
  border-radius: 4px;
  font-size: 0.63rem;
  font-weight: 800;
  line-height: 14px;
  text-align: center;
  z-index: 6;
  pointer-events: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.mon-atk {
  left: 2px;
  background: rgba(36, 28, 16, 0.92);
  border: 1px solid rgba(207, 168, 102, 0.55);
  color: var(--brass-bright);
}

.mon-hp {
  right: 2px;
  background: rgba(68, 20, 18, 0.92);
  border: 1px solid rgba(217, 101, 87, 0.6);
  color: #f9e3df;
}

.mon-seal {
  position: absolute;
  top: 2px;
  right: 2px;
  font-family: var(--font-serif);
  font-size: 0.54rem;
  font-weight: 700;
  line-height: 1;
  padding: 1.5px 2.5px;
  border-radius: 3px;
  background: rgba(20, 18, 15, 0.84);
  color: var(--text-sec);
  border: 1px solid rgba(216, 192, 145, 0.24);
  z-index: 6;
  pointer-events: none;
}

.mon-elite-pip {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brass-bright);
  box-shadow: 0 0 5px rgba(223, 192, 136, 0.9);
  z-index: 6;
}

.mon-status-ice {
  position: absolute;
  inset: 0;
  background: rgba(110, 178, 196, 0.24);
  border: 1.5px solid #88c9db;
  border-radius: 7px;
  pointer-events: none;
  z-index: 5;
}

.hit-shake {
  animation: shakeAnim 0.22s ease;
}

@keyframes shakeAnim {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.float-text {
  position: absolute;
  left: 50%;
  top: 28%;
  transform: translate(-50%, -50%);
  font-size: 0.76rem;
  font-weight: 800;
  white-space: nowrap;
  pointer-events: none;
  z-index: 32;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.95);
  animation: floatUpFade 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes floatUpFade {
  0% { opacity: 1; transform: translate(-50%, 0) scale(0.88); }
  30% { opacity: 1; transform: translate(-50%, -12px) scale(1.04); }
  100% { opacity: 0; transform: translate(-50%, -28px) scale(0.96); }
}

/* ==================== MECHANICAL 3-REEL ASTROLABE ==================== */
.fate-slot-console {
  margin: 0 12px 6px;
  padding: 6px 10px;
  background: linear-gradient(180deg, #27221c 0%, #1c1814 100%);
  border: 1px solid rgba(207, 168, 102, 0.34);
  border-radius: 12px;
  box-shadow:
    0 6px 16px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 244, 218, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  z-index: 6;
  flex-shrink: 0;
}

.fate-slot-console.jackpot-glow {
  border-color: var(--brass-bright);
  box-shadow: 0 0 20px rgba(223, 192, 136, 0.45);
}

.slot-left-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  min-width: 48px;
}

.spin-count-row {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--brass-bright);
}

.bolt-svg {
  color: var(--celadon);
}

.flip-charge-dots {
  display: flex;
  align-items: center;
  gap: 4px;
}

.charge-dot {
  width: 9px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 245, 225, 0.1);
  transition: background 0.2s ease;
}

.charge-dot.lit {
  background: var(--celadon);
  box-shadow: 0 0 5px rgba(99, 150, 129, 0.7);
}

.slot-reels-frame {
  display: flex;
  align-items: center;
  gap: 5px;
  background: #13100d;
  border: 1px solid rgba(196, 155, 87, 0.32);
  border-radius: 9px;
  padding: 4px 7px;
  box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.85);
}

.payline-tick {
  width: 4px;
  height: 2px;
  background: var(--brass-main);
  opacity: 0.7;
}

.slot-reel-window {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  background: radial-gradient(circle at 50% 50%, #f4ecdc 0%, #ded0b4 76%, #b6a17c 100%);
  border: 1px solid #8f7240;
  overflow: hidden;
  position: relative;
  box-shadow:
    inset 0 6px 7px rgba(18, 15, 11, 0.42),
    inset 0 -6px 7px rgba(18, 15, 11, 0.42);
}

.slot-reel-window.win-highlight {
  border: 1.5px solid var(--brass-bright);
  box-shadow: 0 0 12px rgba(223, 192, 136, 0.85);
}

.slot-reel-window.reel-tease-glow {
  border: 1.5px solid #f5d08a;
  animation: reelTeasePulse 0.18s ease-in-out infinite alternate;
}

@keyframes reelTeasePulse {
  from { box-shadow: 0 0 10px rgba(245, 208, 138, 0.65), inset 0 0 8px rgba(224, 109, 83, 0.35); transform: scale(1.02); }
  to { box-shadow: 0 0 20px rgba(224, 109, 83, 0.95), inset 0 0 12px rgba(245, 208, 138, 0.55); transform: scale(1.06); }
}

.slot-reel-strip {
  width: 100%;
  display: flex;
  flex-direction: column;
  will-change: transform;
}

.slot-reel-strip.spinning {
  filter: blur(1px);
}

.slot-symbol-cell {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 6px;
}

.slot-symbol-cell img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

.slot-right-actions {
  display: flex;
  align-items: center;
  gap: 5px;
}

.bet-toggle-btn {
  width: 30px;
  height: 40px;
  background: var(--bg-well);
  border: 1px solid rgba(216, 192, 145, 0.2);
  color: var(--text-sec);
  border-radius: 7px;
  font-size: 0.7rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.14s ease;
}

.bet-toggle-btn.high-bet {
  background: var(--celadon-deep);
  border-color: var(--celadon);
  color: #dff2ea;
}

.spin-pull-btn {
  min-width: 68px;
  height: 40px;
  background: linear-gradient(180deg, #bf3e30 0%, #8f261b 100%);
  border: 1px solid rgba(245, 190, 175, 0.4);
  border-radius: 8px;
  padding: 3px 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 0 #52140d;
  transition: transform 0.1s ease, filter 0.15s ease;
}

.spin-pull-btn:hover:not(:disabled) {
  filter: brightness(1.08);
}

.spin-pull-btn:active:not(:disabled) {
  transform: translateY(2px);
  box-shadow: none;
}

.spin-pull-btn:disabled {
  background: var(--bg-surface);
  border-color: var(--brass-hairline);
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.55;
}

.spin-btn-main {
  font-family: var(--font-serif);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #f8f1e5;
  line-height: 1.1;
}

.spin-btn-sub {
  font-size: 0.58rem;
  color: rgba(248, 241, 229, 0.8);
  line-height: 1.15;
}

/* ==================== MINIMALIST BOTTOM TRAY ==================== */
.dungeon-dock {
  background: rgba(23, 20, 17, 0.95);
  border-top: 1px solid rgba(207, 168, 102, 0.22);
  padding: 6px 12px 9px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 6;
  flex-shrink: 0;
}

.dock-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.relic-slots {
  display: flex;
  align-items: center;
  gap: 5px;
}

.relic-slot {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--bg-well);
  border: 1px solid rgba(216, 192, 145, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* Subtle geometric diamond groove in empty socket — ZERO text */
.relic-slot.empty::after {
  content: "";
  width: 5px;
  height: 5px;
  transform: rotate(45deg);
  border: 1px solid rgba(216, 192, 145, 0.14);
}

.relic-slot.filled {
  cursor: pointer;
  border-color: rgba(196, 155, 87, 0.5);
  background: #28221b;
}

.relic-slot img {
  width: 20px;
  height: 20px;
}

.status-tags {
  display: flex;
  gap: 4px;
  align-items: center;
  margin-right: auto;
}

.status-pill {
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.62rem;
  font-weight: 600;
  background: var(--bg-surface);
  border: 1px solid var(--brass-hairline);
  color: var(--text-sec);
}

.status-pill.buff {
  border-color: rgba(99, 150, 129, 0.45);
  color: #9fd1be;
}

.status-pill.debuff {
  border-color: rgba(181, 56, 42, 0.5);
  color: #e69a90;
}

.devour-toggle-btn {
  background: var(--bg-surface);
  border: 1px solid rgba(216, 192, 145, 0.22);
  color: var(--text-sec);
  border-radius: 6px;
  padding: 3px 10px;
  font-family: var(--font-serif);
  font-size: 0.71rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: all 0.15s ease;
}

.devour-toggle-btn.active {
  background: var(--cinnabar);
  border-color: #e89b91;
  color: #fff;
}

.spell-bar {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 5px;
}

.spell-slot {
  height: 44px;
  border-radius: 8px;
  background: var(--bg-well);
  border: 1px solid rgba(216, 192, 145, 0.12);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: transform 0.1s ease, border-color 0.15s ease;
}

.spell-slot.filled {
  background: var(--bg-surface);
  border-color: rgba(216, 192, 145, 0.24);
  cursor: pointer;
}

.spell-slot.filled:hover {
  transform: translateY(-1px);
  border-color: var(--brass-main);
}

.spell-slot.armed {
  border-color: #7cc4b0;
  background: #21362f;
}

.spell-slot.devour-ready {
  border-color: var(--cinnabar-soft);
  background: #361d1a;
}

.spell-slot img {
  width: 24px;
  height: 24px;
}

.spell-slot-name {
  font-size: 0.56rem;
  color: var(--text-sec);
  margin-top: 2px;
  max-width: 92%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.spell-qty {
  position: absolute;
  top: 2px;
  right: 3px;
  font-size: 0.58rem;
  font-weight: 700;
  color: var(--brass-bright);
}

/* ==================== MODALS (DARK WALNUT & XUAN-PAPER SCROLL) ==================== */
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 10, 8, 0.78);
  backdrop-filter: blur(5px);
  z-index: 45;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-backdrop.open {
  display: flex;
}

.modal-card {
  width: 100%;
  max-width: 388px;
  max-height: 88%;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(196, 155, 87, 0.32) transparent;
  background: #24201b;
  border: 1px solid rgba(207, 168, 102, 0.42);
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  gap: 11px;
  animation: modalIn 0.16s ease-out;
}

.modal-card::-webkit-scrollbar {
  width: 4px;
}

.modal-card::-webkit-scrollbar-track {
  background: transparent;
}

.modal-card::-webkit-scrollbar-thumb {
  background: rgba(196, 155, 87, 0.32);
  border-radius: 999px;
}

/* Handcrafted Xuan-Paper Scroll Theme for Story Cutscenes */
.modal-card.scroll-paper {
  background: linear-gradient(180deg, #f5eedf 0%, #ebe0ca 100%);
  color: var(--paper-ink);
  border: 1px solid #bfa67a;
  box-shadow:
    0 22px 50px rgba(0, 0, 0, 0.82),
    inset 0 0 0 3px rgba(182, 152, 102, 0.22);
}

@keyframes modalIn {
  from { transform: translateY(6px) scale(0.97); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

.scroll-painting-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9.2;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #b59b6d;
  flex-shrink: 0;
}

.scroll-painting-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.scroll-stamp {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--cinnabar);
  color: #f9f2e7;
  font-family: var(--font-serif);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 3px 6px;
  border-radius: 3px;
  border: 1px solid rgba(255, 235, 220, 0.45);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.scroll-title-block {
  border-bottom: 1px solid rgba(120, 98, 64, 0.22);
  padding-bottom: 7px;
}

.scroll-era {
  font-size: 0.68rem;
  color: #7c6b53;
  letter-spacing: 0.04em;
}

.scroll-heading {
  margin: 2px 0 0;
  font-family: var(--font-serif);
  font-size: 1.08rem;
  font-weight: 700;
  color: #1f1912;
  letter-spacing: 0.04em;
}

.scroll-prose {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 0.8rem;
  line-height: 1.62;
  color: #332b21;
}

.scroll-quote-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(168, 142, 98, 0.13);
  border-left: 2.5px solid var(--cinnabar);
  border-radius: 0 7px 7px 0;
  padding: 7px 10px;
}

.scroll-quote-row img {
  width: 42px;
  height: 42px;
  border-radius: 7px;
  object-fit: contain;
  background: #28231d;
  padding: 2px;
  flex-shrink: 0;
}

.scroll-quote-row b {
  display: block;
  font-family: var(--font-serif);
  font-size: 0.74rem;
  color: #6e241b;
}

.scroll-quote-row p {
  margin: 2px 0 0;
  font-size: 0.73rem;
  line-height: 1.42;
  color: #2c251c;
}

.scroll-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px 12px;
  padding: 8px 10px;
  background: rgba(168, 142, 98, 0.12);
  border-radius: 7px;
  font-size: 0.74rem;
  color: #463c2e;
}

.scroll-stats-grid b {
  color: #1f1912;
}

/* Dark Walnut Modal Components (War Council, Shop, Altar, Guide) */
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid rgba(216, 192, 145, 0.14);
  padding-bottom: 9px;
}

.modal-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-header img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  border-radius: 8px;
  background: var(--bg-well);
  padding: 3px;
}

.modal-header h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 0.98rem;
  color: var(--brass-bright);
  letter-spacing: 0.04em;
}

.modal-header p {
  margin: 2px 0 0;
  font-size: 0.72rem;
  color: var(--text-sec);
}

.modal-section-label {
  font-family: var(--font-serif);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--brass-main);
  letter-spacing: 0.06em;
  margin-top: 2px;
}

.clean-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid rgba(255, 245, 225, 0.06);
}

.clean-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 2px;
  border-bottom: 1px solid rgba(255, 245, 225, 0.06);
}

.clean-row-left {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.clean-row-left img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  flex-shrink: 0;
}

.clean-row-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-main);
}

.clean-row-desc {
  font-size: 0.69rem;
  color: var(--text-sec);
}

.buy-btn {
  background: var(--bg-elevated);
  border: 1px solid rgba(207, 168, 102, 0.42);
  color: var(--brass-bright);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.buy-btn:hover:not(:disabled) {
  background: #3d352b;
  border-color: var(--brass-bright);
}

.buy-btn:disabled {
  border-color: rgba(255, 255, 255, 0.08);
  color: var(--text-dim);
  cursor: not-allowed;
}

.choice-btn-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.choice-btn {
  background: var(--bg-surface);
  border: 1px solid var(--brass-hairline);
  border-radius: 9px;
  padding: 9px 12px;
  color: var(--text-main);
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  transition: border-color 0.14s ease, background 0.14s ease;
}

.choice-btn:hover:not(:disabled) {
  border-color: var(--brass-main);
  background: var(--bg-elevated);
}

.choice-btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.choice-btn b {
  display: block;
  font-size: 0.8rem;
  color: var(--brass-bright);
}

.choice-btn span {
  font-size: 0.7rem;
  color: var(--text-sec);
}

.trophy-modal-banner {
  display: flex;
  align-items: center;
  gap: 11px;
  background: linear-gradient(135deg, rgba(168, 49, 36, 0.24) 0%, rgba(56, 44, 28, 0.52) 100%);
  border: 1px solid rgba(226, 178, 102, 0.42);
  border-radius: 10px;
  padding: 9px 11px;
}

.trophy-modal-banner img {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: contain;
  background: var(--bg-well);
  border: 1px solid rgba(226, 178, 102, 0.35);
  padding: 2px;
  flex-shrink: 0;
}

.trophy-banner-meta {
  min-width: 0;
  flex: 1;
}

.trophy-seal-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.trophy-banner-meta h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 0.95rem;
  color: var(--brass-bright);
  letter-spacing: 0.04em;
}

.trophy-banner-meta p {
  margin: 3px 0 0;
  font-size: 0.71rem;
  color: var(--text-sec);
}

.choice-btn.trophy-choice {
  padding: 10px 12px;
  border-color: rgba(216, 192, 145, 0.26);
}

.choice-btn.trophy-choice:hover:not(:disabled) {
  border-color: #f3d89c;
  background: linear-gradient(90deg, rgba(64, 52, 36, 0.92), rgba(44, 37, 29, 0.92));
}

.trophy-choice-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.trophy-choice-left img {
  width: 34px;
  height: 34px;
  border-radius: 7px;
  object-fit: contain;
  background: var(--bg-well);
  padding: 3px;
  border: 1px solid rgba(216, 192, 145, 0.2);
  flex-shrink: 0;
}

.trophy-choice-tag {
  font-family: var(--font-serif);
  font-size: 0.72rem;
  font-weight: 700;
  color: #f3d89c !important;
  background: rgba(196, 155, 87, 0.16);
  border: 1px solid rgba(226, 178, 102, 0.36);
  border-radius: 5px;
  padding: 2px 7px;
  white-space: nowrap;
}

.beast-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.beast-item {
  background: var(--bg-surface);
  border: 1px solid rgba(255, 245, 225, 0.06);
  border-radius: 8px;
  padding: 6px 7px;
  display: flex;
  gap: 7px;
  align-items: center;
}

.beast-item img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  flex-shrink: 0;
}

.beast-item b {
  display: block;
  font-size: 0.73rem;
  color: var(--brass-bright);
}

.beast-item span {
  display: block;
  font-size: 0.63rem;
  line-height: 1.28;
  color: var(--text-sec);
}

.skull-notes-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 6px 0;
}

.skull-note-btn {
  height: 58px;
  border-radius: 9px;
  border: 1px solid rgba(207, 168, 102, 0.3);
  background: var(--bg-well);
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: transform 0.1s ease, background 0.12s ease, border-color 0.12s ease;
}

.skull-note-btn.lit {
  transform: scale(1.05);
  border-color: var(--brass-bright);
  background: #6e4f23;
  color: #fff8ea;
}

.shop-crates-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-well);
  border: 1px dashed rgba(207, 168, 102, 0.3);
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 0.71rem;
  color: var(--text-sec);
}

.campaign-overview-item {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 7px 0;
  border-bottom: 1px solid rgba(120, 98, 64, 0.18);
}

.campaign-overview-item:last-child {
  border-bottom: none;
}

.campaign-overview-item img {
  width: 72px;
  height: 44px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid #b59b6d;
  flex-shrink: 0;
}

.campaign-overview-item b {
  display: block;
  font-family: var(--font-serif);
  font-size: 0.78rem;
  color: #1f1912;
}

.campaign-overview-item span {
  display: block;
  font-size: 0.68rem;
  line-height: 1.35;
  color: #55493a;
}

/* ==================== DYNAMIC BIOME BOARD THEMES & BOSS FRAME ==================== */
#dungeonScreen {
  transition: background-image 0.35s ease;
}

/* 1. 雄关烽燧 (Qin Fortress Pass) */
.dungeon-grid.theme-fortress {
  background: rgba(29, 24, 19, 0.88);
  border-color: rgba(226, 168, 86, 0.48);
  box-shadow:
    inset 0 2px 12px rgba(0, 0, 0, 0.78),
    0 12px 28px rgba(0, 0, 0, 0.6);
}
.dungeon-grid.theme-fortress .tile.revealed {
  background: radial-gradient(circle at 50% 42%, rgba(62, 50, 38, 0.92), rgba(32, 26, 20, 0.96));
  border-color: rgba(226, 168, 86, 0.2);
}
.dungeon-grid.theme-fortress .tile.flippable {
  box-shadow: 0 3px 0 #4a2f12, 0 0 10px rgba(226, 168, 86, 0.3);
}

/* 2. 荆襄蛮林 (Jingxiang Misty Bamboo & Mossy Stone) */
.dungeon-grid.theme-bamboo {
  background: rgba(18, 29, 25, 0.86);
  border-color: rgba(124, 196, 176, 0.45);
  box-shadow:
    inset 0 2px 12px rgba(4, 14, 11, 0.78),
    0 12px 28px rgba(0, 0, 0, 0.56);
}
.dungeon-grid.theme-bamboo .tile.revealed {
  background: radial-gradient(circle at 50% 42%, rgba(36, 56, 48, 0.92), rgba(19, 31, 26, 0.96));
  border-color: rgba(124, 196, 176, 0.22);
}
.dungeon-grid.theme-bamboo .tile.flippable {
  box-shadow: 0 3px 0 #183d32, 0 0 10px rgba(124, 196, 176, 0.34);
}

/* 3. 大江水寨 (Chibi Linked Warship Deck) */
.dungeon-grid.theme-naval {
  background: rgba(26, 18, 15, 0.89);
  border-color: rgba(224, 109, 83, 0.46);
  box-shadow:
    inset 0 2px 12px rgba(0, 0, 0, 0.82),
    0 12px 28px rgba(0, 0, 0, 0.62);
}
.dungeon-grid.theme-naval .tile.revealed {
  background: radial-gradient(circle at 50% 42%, rgba(56, 36, 26, 0.94), rgba(28, 18, 14, 0.97));
  border-color: rgba(224, 109, 83, 0.22);
}
.dungeon-grid.theme-naval .tile.flippable {
  box-shadow: 0 3px 0 #4d1f12, 0 0 10px rgba(235, 128, 72, 0.36);
}

/* 4. 奇门星坛 (Qimen Obsidian Bagua Star Altar) */
.dungeon-grid.theme-star_altar {
  background: rgba(16, 22, 26, 0.89);
  border-color: rgba(243, 216, 156, 0.5);
  box-shadow:
    inset 0 2px 14px rgba(2, 8, 12, 0.84),
    0 12px 30px rgba(0, 0, 0, 0.62);
}
.dungeon-grid.theme-star_altar .tile.revealed {
  background: radial-gradient(circle at 50% 42%, rgba(28, 44, 48, 0.94), rgba(14, 22, 26, 0.97));
  border-color: rgba(243, 216, 156, 0.22);
}
.dungeon-grid.theme-star_altar .tile.flippable {
  box-shadow: 0 3px 0 #423519, 0 0 11px rgba(243, 216, 156, 0.38);
}

/* Boss Stage Vermilion-Gold Dragon Lacquer Danger Frame */
.dungeon-grid.boss-stage-frame {
  border-color: rgba(224, 92, 71, 0.78) !important;
  box-shadow:
    inset 0 0 14px rgba(196, 54, 38, 0.35),
    0 0 0 1px rgba(245, 208, 138, 0.34),
    0 0 20px rgba(208, 68, 50, 0.34),
    0 12px 28px rgba(0, 0, 0, 0.65) !important;
  animation: bossGridPulse 2.4s ease-in-out infinite alternate;
}

@keyframes bossGridPulse {
  0% {
    border-color: rgba(214, 82, 62, 0.68);
  }
  100% {
    border-color: rgba(245, 198, 120, 0.92);
  }
}

/* ==================== QIMEN STAR-EYE TILE (AUTO-SPIN TRIGGER) ==================== */
.tile.star-eye-hint::before {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: 6px;
  border: 1px solid rgba(245, 212, 138, 0.62);
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 238, 184, 0.28) 0%, rgba(245, 208, 138, 0.06) 52%, transparent 72%);
  box-shadow: inset 0 0 8px rgba(245, 208, 138, 0.36), 0 0 9px rgba(245, 208, 138, 0.32);
  z-index: 6;
  pointer-events: none;
  animation: starEyeBreathe 1.5s ease-in-out infinite alternate;
}

/* Crisp 4-point celestial diamond star emblem in bottom-left corner */
.tile.star-eye-hint .tile-inner::after {
  content: "";
  position: absolute;
  bottom: 4px;
  left: 4px;
  width: 9px;
  height: 9px;
  background: #fff3cf;
  clip-path: polygon(50% 0%, 66% 34%, 100% 50%, 66% 66%, 50% 100%, 34% 66%, 0% 50%, 34% 34%);
  filter: drop-shadow(0 0 4px #f5d08a);
  z-index: 7;
  pointer-events: none;
  animation: starEyeSpinPulse 2.2s ease-in-out infinite;
}

@keyframes starEyeBreathe {
  0% { opacity: 0.55; }
  100% { opacity: 1; }
}

@keyframes starEyeSpinPulse {
  0%, 100% { transform: scale(0.88) rotate(0deg); opacity: 0.82; }
  50% { transform: scale(1.22) rotate(18deg); opacity: 1; }
}

/* Sequential Chain-Break Newly Freed Tile Shimmer */
.tile.tile-just-freed {
  animation: tileFreedFlash 0.42s ease-out;
}

@keyframes tileFreedFlash {
  0% {
    transform: scale(1.09);
    box-shadow: 0 0 0 2px #fff4d2, 0 0 16px rgba(245, 208, 138, 0.85);
  }
  100% {
    transform: scale(1);
  }
}

/* ==================== REEL 0 PINNED ("定星楔") & FREE BOOST SPIN ==================== */
.slot-reel-window {
  position: relative;
}

.reel-lock-badge {
  position: absolute;
  top: 2px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(180deg, #6e4e1e 0%, #3d2a0f 100%);
  border: 1px solid #f5d08a;
  color: #fff6df;
  font-family: var(--font-serif);
  font-size: 0.54rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 0 5px;
  line-height: 1.3;
  border-radius: 4px;
  z-index: 9;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.18s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.65);
}

.slot-reel-window.reel-pinned {
  border-color: #f5d08a !important;
  box-shadow:
    inset 0 0 10px rgba(245, 208, 138, 0.32),
    0 0 10px rgba(245, 208, 138, 0.35) !important;
}

.slot-reel-window.reel-pinned .reel-lock-badge {
  opacity: 1;
}

.spin-pull-btn.star-bonus-spin {
  background: linear-gradient(180deg, #c98f32 0%, #875516 100%) !important;
  border-color: #fff2cc !important;
  box-shadow: 0 0 16px rgba(245, 208, 138, 0.65) !important;
}

/* ==================== 70MS HIT-STOP & 0.7S INK-CLOUD STAGE TRANSITION ==================== */
.dungeon-grid.hit-stop-freeze {
  transform: scale(1.018);
  filter: contrast(1.08) brightness(1.06);
}

.stage-transition {
  position: absolute;
  inset: 0;
  z-index: 36;
  pointer-events: none;
  opacity: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 50% 48%, rgba(28, 23, 18, 0.94) 0%, rgba(12, 10, 8, 0.98) 100%);
  backdrop-filter: blur(4px);
  transition: opacity 0.26s ease;
}

.stage-transition.active {
  opacity: 1;
}

.stage-trans-inner {
  text-align: center;
  padding: 14px 28px;
  border-top: 1px solid rgba(223, 192, 136, 0.45);
  border-bottom: 1px solid rgba(223, 192, 136, 0.45);
  background: linear-gradient(90deg, transparent 0%, rgba(42, 34, 25, 0.75) 50%, transparent 100%);
  transform: translateY(6px) scale(0.96);
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.stage-transition.active .stage-trans-inner {
  transform: translateY(0) scale(1);
}

.stage-trans-era {
  display: block;
  font-size: 0.7rem;
  color: var(--brass-main);
  letter-spacing: 0.14em;
  margin-bottom: 4px;
}

.stage-trans-title {
  font-family: var(--font-serif);
  font-size: 1.18rem;
  font-weight: 700;
  color: var(--paper-bg);
  letter-spacing: 0.08em;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8);
}

/* ==================== ORIENTAL GILT-BRONZE LACQUER HARDWARE & FOIL SHIMMER ==================== */
@keyframes lacquerHpSheen {
  0% { background-position: 100% 0; }
  100% { background-position: -120% 0; }
}

/* Stepped Bronze Cloud-Fret Corner Brackets on Core Frames */
.dungeon-grid::before,
.fate-slot-console::before,
.modal-card::before {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(223, 192, 136, 0.72) 0 11px, transparent 11px calc(100% - 11px), rgba(223, 192, 136, 0.72) calc(100% - 11px) 100%) top / 100% 1.5px no-repeat,
    linear-gradient(90deg, rgba(223, 192, 136, 0.72) 0 11px, transparent 11px calc(100% - 11px), rgba(223, 192, 136, 0.72) calc(100% - 11px) 100%) bottom / 100% 1.5px no-repeat,
    linear-gradient(180deg, rgba(223, 192, 136, 0.72) 0 11px, transparent 11px calc(100% - 11px), rgba(223, 192, 136, 0.72) calc(100% - 11px) 100%) left / 1.5px 100% no-repeat,
    linear-gradient(180deg, rgba(223, 192, 136, 0.72) 0 11px, transparent 11px calc(100% - 11px), rgba(223, 192, 136, 0.72) calc(100% - 11px) 100%) right / 1.5px 100% no-repeat;
  opacity: 0.78;
  z-index: 3;
}

.fate-slot-console,
.modal-card {
  position: relative;
}

/* Living Foil Shimmer on Selected Hero Cards & Boss Portraits */
.hero-pick-card.selected,
.hud-avatar-wrap {
  position: relative;
  overflow: hidden;
}

.hero-pick-card.selected::after,
.hud-avatar-wrap::after,
.tile-boss-2x2 .tile-inner::after {
  content: "";
  position: absolute;
  inset: -40% -80%;
  background: linear-gradient(
    115deg,
    transparent 38%,
    rgba(255, 245, 214, 0.06) 44%,
    rgba(255, 242, 198, 0.32) 50%,
    rgba(255, 245, 214, 0.06) 56%,
    transparent 62%
  );
  transform: translateX(-75%) rotate(8deg);
  animation: foilSweep 4.8s ease-in-out infinite;
  pointer-events: none;
  z-index: 5;
}

@keyframes foilSweep {
  0%, 62% { transform: translateX(-78%) rotate(8deg); }
  100% { transform: translateX(78%) rotate(8deg); }
}

/* ==================== 60MS PURE-WHITE HIT-FLASH & LUNGE/RECOIL PHYSICS ==================== */
.hit-flash-white img,
img.hit-flash-white,
.boss-portrait-hitbox.hit-flash-white .boss-giant-portrait {
  filter: brightness(5.6) contrast(0.24) drop-shadow(0 0 12px #fff8ea) !important;
}

.hit-recoil {
  animation: unitHitRecoil 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes unitHitRecoil {
  0% { transform: scale(1); }
  28% { transform: scale(1.14, 0.86) translateY(3px); }
  65% { transform: scale(0.95, 1.05) translateY(-2px); }
  100% { transform: scale(1) translateY(0); }
}

.hero-attack-lunge {
  animation: heroAttackLunge 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes heroAttackLunge {
  0% { transform: scale(1) translateY(0); }
  35% { transform: scale(1.15) translateY(-4px); box-shadow: 0 0 14px rgba(245, 208, 138, 0.75); }
  100% { transform: scale(1) translateY(0); }
}

/* ==================== COMMANDER SHOWDOWN STAGE (TOP FRAME-BREAKING GIANT BOSS) ==================== */
.boss-showdown-stage {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  margin: 14px 12px 2px;
  padding: 7px 10px 8px;
  min-height: 134px;
  background:
    radial-gradient(circle at 18% 35%, rgba(168, 42, 28, 0.42) 0%, rgba(28, 18, 15, 0.95) 68%),
    linear-gradient(180deg, #2b1a16 0%, #17110e 100%);
  border: 1.5px solid rgba(228, 178, 102, 0.68);
  border-radius: 13px;
  position: relative;
  overflow: visible;
  z-index: 8;
  flex-shrink: 0;
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.62),
    inset 0 1px 0 rgba(255, 240, 205, 0.16),
    inset 0 0 18px rgba(180, 42, 28, 0.28);
}

/* Stepped gilt-bronze cloud-fret corners on Showdown Stage */
.boss-showdown-stage::before {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 10px;
  pointer-events: none;
  background:
    linear-gradient(90deg, #f5d08a 0 14px, transparent 14px calc(100% - 14px), #f5d08a calc(100% - 14px) 100%) top / 100% 2px no-repeat,
    linear-gradient(90deg, #f5d08a 0 14px, transparent 14px calc(100% - 14px), #f5d08a calc(100% - 14px) 100%) bottom / 100% 2px no-repeat,
    linear-gradient(180deg, #f5d08a 0 14px, transparent 14px calc(100% - 14px), #f5d08a calc(100% - 14px) 100%) left / 2px 100% no-repeat,
    linear-gradient(180deg, #f5d08a 0 14px, transparent 14px calc(100% - 14px), #f5d08a calc(100% - 14px) 100%) right / 2px 100% no-repeat;
  opacity: 0.85;
  z-index: 2;
}

.dungeon-screen.boss-showdown-mode .boss-showdown-stage {
  display: flex;
}

.dungeon-screen.boss-showdown-mode .speech-bar {
  display: none !important;
}

.dungeon-screen.boss-showdown-mode .objective-relics {
  display: none !important;
}

.boss-showdown-stage.phase-2 {
  border-color: #fb923c;
  background:
    radial-gradient(circle at 20% 35%, rgba(220, 38, 38, 0.56) 0%, rgba(34, 14, 14, 0.96) 66%),
    linear-gradient(180deg, #381512 0%, #1a0d0c 100%);
  box-shadow:
    0 0 22px rgba(239, 68, 68, 0.45),
    0 10px 26px rgba(0, 0, 0, 0.72),
    inset 0 0 22px rgba(239, 68, 68, 0.38);
  animation: bossStagePhase2Pulse 1.6s ease-in-out infinite alternate;
}

@keyframes bossStagePhase2Pulse {
  from { box-shadow: 0 0 16px rgba(239, 68, 68, 0.36), inset 0 0 18px rgba(239, 68, 68, 0.28); }
  to { box-shadow: 0 0 28px rgba(251, 146, 60, 0.62), inset 0 0 26px rgba(239, 68, 68, 0.46); }
}

.boss-stage-main {
  display: flex;
  align-items: center;
  gap: 11px;
  position: relative;
  z-index: 4;
  min-height: 110px;
}

.boss-portrait-hitbox {
  width: 124px;
  height: 110px;
  position: relative;
  flex-shrink: 0;
  cursor: pointer;
  overflow: visible;
  border-radius: 11px;
  background: radial-gradient(circle at 50% 62%, rgba(245, 208, 138, 0.24) 0%, rgba(20, 14, 12, 0.58) 75%);
  border: 1px solid rgba(223, 192, 136, 0.42);
  transition: transform 0.14s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.boss-portrait-hitbox:hover {
  border-color: var(--brass-bright);
  box-shadow: 0 0 14px rgba(245, 208, 138, 0.45);
}

.boss-portrait-hitbox:active {
  transform: scale(0.96);
}

.boss-portrait-hitbox.spell-targetable {
  border: 2px solid #7cc4b0 !important;
  box-shadow: 0 0 18px rgba(124, 196, 176, 0.85) !important;
}

.boss-aura-ring {
  position: absolute;
  left: 50%;
  top: 46%;
  width: 108px;
  height: 108px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1.5px dashed rgba(245, 208, 138, 0.38);
  background: radial-gradient(circle, rgba(224, 92, 71, 0.28) 0%, transparent 70%);
  animation: bossAuraSpin 12s linear infinite;
  pointer-events: none;
}

.boss-showdown-stage.phase-2 .boss-aura-ring {
  border-color: rgba(253, 224, 71, 0.78);
  background: radial-gradient(circle, rgba(239, 68, 68, 0.48) 0%, rgba(251, 146, 60, 0.16) 55%, transparent 74%);
  animation-duration: 5.5s;
}

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

/* Giant Frame-Breaking Half-Body Portrait Rising 22px Above Top Frame! */
.boss-giant-portrait {
  position: absolute;
  left: 50%;
  bottom: -2px;
  width: 144px;
  height: 138px;
  transform: translateX(-50%);
  object-fit: contain;
  object-position: center bottom;
  pointer-events: none;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.88));
  animation: bossLivingBreath 2.8s ease-in-out infinite alternate;
  z-index: 3;
}

@keyframes bossLivingBreath {
  0% { transform: translateX(-50%) translateY(0) scale(1); }
  100% { transform: translateX(-50%) translateY(-3px) scale(1.028); }
}

.boss-portrait-hitbox.boss-skill-slam {
  animation: bossSkillSlamAnim 0.36s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes bossSkillSlamAnim {
  0% { transform: translateY(0) scale(1); }
  35% { transform: translateY(-8px) scale(1.12); }
  70% { transform: translateY(10px) scale(1.06); }
  100% { transform: translateY(0) scale(1); }
}

.boss-atk-badge {
  position: absolute;
  left: 4px;
  bottom: 4px;
  padding: 1px 6px;
  border-radius: 5px;
  background: rgba(28, 20, 12, 0.94);
  border: 1px solid rgba(245, 208, 138, 0.7);
  color: #fde68a;
  font-size: 0.64rem;
  font-weight: 800;
  z-index: 6;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.85);
}

.boss-status-overlay {
  position: absolute;
  inset: 0;
  border-radius: 10px;
  pointer-events: none;
  z-index: 5;
}

.boss-status-overlay.frozen {
  background: rgba(110, 178, 196, 0.28);
  border: 1.5px solid #88c9db;
}

.boss-command-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.boss-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.boss-rank-seal {
  background: linear-gradient(180deg, #c93b2b 0%, #8c2015 100%);
  border: 1px solid rgba(255, 214, 186, 0.55);
  color: #fff6ec;
  font-family: var(--font-serif);
  font-size: 0.58rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.boss-showdown-stage.phase-2 .boss-rank-seal {
  background: linear-gradient(180deg, #ea580c 0%, #991b1b 100%);
  border-color: #fde047;
}

.boss-stage-name {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 0.96rem;
  font-weight: 800;
  color: #fde6b8;
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.85);
}

.boss-rage-cluster {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(16, 12, 10, 0.78);
  border: 1px solid rgba(224, 109, 83, 0.36);
  border-radius: 999px;
  padding: 2px 6px;
  flex-shrink: 0;
}

.rage-label {
  font-family: var(--font-serif);
  font-size: 0.58rem;
  font-weight: 700;
  color: #fca5a5;
}

.rage-orb {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 240, 220, 0.12);
  border: 1px solid rgba(245, 208, 138, 0.35);
  transition: all 0.2s ease;
}

.rage-orb.lit {
  background: radial-gradient(circle at 35% 35%, #fef08a 0%, #f97316 55%, #dc2626 100%);
  border-color: #fef08a;
  box-shadow: 0 0 7px rgba(249, 115, 22, 0.95);
}

.boss-speech-bubble {
  background: rgba(16, 13, 11, 0.82);
  border: 1px solid rgba(216, 192, 145, 0.22);
  border-left: 2.5px solid #e06d53;
  border-radius: 7px;
  padding: 4px 8px;
  font-family: var(--font-serif);
  font-size: 0.69rem;
  line-height: 1.35;
  color: #f4ead8;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 32px;
}

.boss-tags-row {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.boss-stage-tag {
  font-size: 0.59rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(32, 26, 20, 0.9);
  border: 1px solid rgba(223, 192, 136, 0.34);
  color: var(--brass-bright);
}

.boss-stage-tag.guard-shield {
  background: rgba(58, 36, 14, 0.92);
  border-color: #fbbf24;
  color: #fde68a;
}

.boss-stage-tag.vuln {
  background: rgba(24, 62, 52, 0.9);
  border-color: #7cc4b0;
  color: #b5f0de;
}

.boss-dragon-hp-wrap {
  margin-top: 6px;
  position: relative;
  z-index: 4;
}

.boss-dragon-hp-outer {
  width: 100%;
  height: 16px;
  background: #100c0a;
  border: 1px solid rgba(245, 208, 138, 0.62);
  border-radius: 999px;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.92), 0 1px 6px rgba(0, 0, 0, 0.55);
}

.boss-dragon-hp-lag {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: linear-gradient(90deg, #fde68a 0%, #ffffff 100%);
  opacity: 0.9;
  transition: width 0.62s cubic-bezier(0.22, 1, 0.36, 1) 0.14s;
  z-index: 1;
}

.boss-dragon-hp-fill {
  position: relative;
  height: 100%;
  background: linear-gradient(90deg, #7f1d1d 0%, #dc2626 42%, #fb923c 50%, #b91c1c 100%);
  background-size: 220% 100%;
  animation: lacquerHpSheen 3s linear infinite;
  transition: width 0.18s ease-out;
  z-index: 2;
}

.boss-dragon-hp-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #fff8ec;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.95);
  z-index: 3;
}

/* ==================== 4x5 SIEGE BATTLEFIELD GRID & SIEGE PROPS ==================== */
.dungeon-grid.grid-4x5 {
  width: min(100%, 312px);
  aspect-ratio: 5 / 4;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(4, 1fr);
}

.tile.siege-tile {
  cursor: pointer;
  background: radial-gradient(circle at 50% 42%, rgba(217, 119, 6, 0.36) 0%, rgba(34, 24, 16, 0.94) 100%) !important;
  border: 1.5px solid #fbbf24 !important;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.38);
}

.tile.siege-tile:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 0 16px rgba(251, 191, 36, 0.68);
}

.siege-tag {
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.5px 5px;
  border-radius: 3px;
  background: linear-gradient(180deg, #d97706 0%, #92400e 100%);
  border: 1px solid #fde68a;
  color: #fffbeb;
  font-size: 0.54rem;
  font-weight: 800;
  white-space: nowrap;
  z-index: 6;
  pointer-events: none;
}

.bodyguard-tag {
  position: absolute;
  top: 2px;
  left: 2px;
  padding: 1px 3.5px;
  border-radius: 3px;
  background: linear-gradient(180deg, #92400e 0%, #451a03 100%);
  border: 1px solid #fbbf24;
  color: #fef3c7;
  font-size: 0.5rem;
  font-weight: 800;
  line-height: 1;
  z-index: 7;
  pointer-events: none;
}

/* ==================== 2x2 QUAD-TILE VANGUARD SUB-BOSS ==================== */
.tile.subboss-seal-hint::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 6px;
  border: 1px dashed rgba(239, 68, 68, 0.58);
  background: radial-gradient(circle at 50% 50%, rgba(220, 38, 38, 0.2) 0%, transparent 72%);
  box-shadow: inset 0 0 8px rgba(220, 38, 38, 0.3);
  pointer-events: none;
  z-index: 5;
  animation: subBossSealPulse 1.6s ease-in-out infinite alternate;
}

@keyframes subBossSealPulse {
  from { opacity: 0.48; }
  to { opacity: 0.95; }
}

.tile.tile-merged-slave {
  display: none !important;
}

.tile.tile-boss-2x2 {
  z-index: 7;
  border-radius: 12px;
  border: 2px solid #f5d08a !important;
  background:
    radial-gradient(circle at 50% 38%, rgba(196, 54, 38, 0.48) 0%, rgba(28, 19, 16, 0.96) 76%) !important;
  box-shadow:
    0 0 20px rgba(224, 92, 71, 0.48),
    inset 0 0 18px rgba(245, 208, 138, 0.22) !important;
}

.tile.tile-boss-2x2 .entity-sprite {
  width: 90%;
  height: 86%;
  margin-top: 4px;
  animation: boss2x2Idle 2.6s ease-in-out infinite alternate;
  filter: drop-shadow(0 5px 8px rgba(0, 0, 0, 0.82));
}

@keyframes boss2x2Idle {
  from { transform: translateY(0) scale(1); }
  to { transform: translateY(-2.5px) scale(1.03); }
}

.subboss-nameplate {
  position: absolute;
  top: 3px;
  left: 4px;
  right: 22px;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(20, 14, 12, 0.88);
  border: 1px solid rgba(245, 208, 138, 0.45);
  color: #fde6b8;
  font-family: var(--font-serif);
  font-size: 0.58rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  z-index: 6;
  pointer-events: none;
}

.tile.tile-boss-2x2 .mon-num {
  min-width: 22px;
  height: 17px;
  line-height: 17px;
  font-size: 0.72rem;
  bottom: 4px;
}

.tile.tile-boss-2x2 .mon-atk { left: 4px; }
.tile.tile-boss-2x2 .mon-hp { right: 4px; }

.subboss-hp-strip {
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 7px;
  height: 6px;
  border-radius: 999px;
  background: rgba(14, 10, 8, 0.92);
  border: 1px solid rgba(245, 208, 138, 0.45);
  overflow: hidden;
  z-index: 6;
  pointer-events: none;
}

.subboss-hp-strip-fill {
  height: 100%;
  background: linear-gradient(90deg, #991b1b 0%, #ef4444 60%, #fb923c 100%);
  transition: width 0.18s ease-out;
}

/* ==================== PROMINENT STAMINA GAUGES & REGEN TIMERS ==================== */
.hub-resources-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.stamina-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(180deg, rgba(46, 28, 12, 0.94), rgba(24, 15, 8, 0.94));
  backdrop-filter: blur(6px);
  border: 1.5px solid rgba(251, 191, 36, 0.72);
  border-radius: 999px;
  padding: 4px 8px 4px 7px;
  color: #fef3c7;
  font-size: 0.76rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.25);
  transition: border-color 0.15s ease, transform 0.12s ease;
}

.stamina-pill:hover {
  border-color: #fef08a;
  transform: translateY(-1px);
}

.stamina-pill img {
  width: 15px;
  height: 15px;
  object-fit: contain;
}

.stam-pill-prefix {
  font-size: 0.68rem;
  color: #fbbf24;
  font-weight: 800;
}

.stamina-timer {
  font-style: normal;
  font-size: 0.62rem;
  font-weight: 700;
  color: #fdba74;
}

.stam-plus-chip {
  text-decoration: none;
  font-size: 0.56rem;
  font-weight: 900;
  padding: 1px 4px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.28);
  border: 1px solid rgba(253, 230, 138, 0.55);
  color: #fef08a;
  line-height: 1.2;
}

/* Prominent Full-Width Golden Stamina Bar inside Dungeon HUD (.hud-vitals) */
.stamina-bar-outer {
  width: 174px;
  height: 19px;
  padding: 0;
  background: #17110b;
  border: 1.5px solid rgba(251, 191, 36, 0.68);
  border-radius: 999px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  font-family: inherit;
  box-shadow:
    0 0 10px rgba(245, 158, 11, 0.22),
    inset 0 1px 4px rgba(0, 0, 0, 0.88);
  transition: border-color 0.15s ease, transform 0.12s ease, box-shadow 0.15s ease;
}

.stamina-bar-outer:hover {
  border-color: #fef08a;
  box-shadow: 0 0 14px rgba(251, 191, 36, 0.42), inset 0 1px 4px rgba(0, 0, 0, 0.85);
}

.stamina-bar-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: linear-gradient(90deg, #9a3412 0%, #d97706 42%, #fbbf24 82%, #fef08a 100%);
  background-size: 200% 100%;
  animation: lacquerHpSheen 3.2s linear infinite;
  transition: width 0.22s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 1;
}

.stamina-bar-outer.stamina-overcap-bar {
  border-color: #fde047;
  box-shadow: 0 0 14px rgba(250, 204, 21, 0.45), inset 0 0 8px rgba(254, 240, 138, 0.25);
}

.stamina-bar-outer.stamina-overcap-bar .stamina-bar-fill {
  background: linear-gradient(90deg, #047857 0%, #d97706 48%, #fde047 100%);
}

.stamina-bar-outer.stamina-low-bar {
  border-color: #f87171;
  animation: lowStamPulse 1.1s ease-in-out infinite alternate;
}

.stamina-bar-outer.stamina-low-bar .stamina-bar-fill {
  background: linear-gradient(90deg, #7f1d1d 0%, #dc2626 60%, #fb923c 100%);
}

@keyframes lowStamPulse {
  from { box-shadow: 0 0 6px rgba(239, 68, 68, 0.35); }
  to { box-shadow: 0 0 15px rgba(239, 68, 68, 0.82); }
}

.stamina-bar-content {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  padding: 0 5px 0 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3px;
}

.stamina-bar-label {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: #fffbeb;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.96);
}

.stamina-bar-label img {
  width: 12px;
  height: 12px;
  object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.85));
}

.stamina-bar-label em {
  font-style: normal;
  font-size: 0.62rem;
  font-weight: 900;
  color: #fef08a;
  letter-spacing: 0.02em;
}

.stamina-bar-label b {
  font-size: 0.68rem;
  font-weight: 900;
  color: #ffffff;
}

.stamina-bar-extra {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.stamina-bar-label b.stamina-overcap,
.stamina-pill span.stamina-overcap {
  color: #fef08a !important;
  text-shadow: 0 0 8px rgba(250, 204, 21, 0.85), 0 1px 2px #000;
}

.stamina-bar-label b.stamina-low,
.stamina-pill span.stamina-low {
  color: #fecaca !important;
}

.hud-stam-timer {
  font-style: normal;
  font-size: 0.56rem;
  font-weight: 800;
  color: #fffbeb;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.95);
}

/* Prominent Stamina Gauge inside Hub Hero Plaque */
.hub-stamina-strip {
  width: 100%;
  height: 22px;
  padding: 0;
  border-radius: 999px;
  background: #140f0a;
  border: 1px solid rgba(251, 191, 36, 0.56);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  font-family: inherit;
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.85);
}

.hub-stamina-strip-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: linear-gradient(90deg, #9a3412 0%, #d97706 45%, #fbbf24 100%);
  transition: width 0.22s ease;
}

.hub-stamina-strip-inner {
  position: relative;
  z-index: 2;
  height: 100%;
  padding: 0 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.68rem;
  font-weight: 800;
  color: #fffbeb;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.95);
}

.hub-stamina-strip-left {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.hub-stamina-strip-left img {
  width: 13px;
  height: 13px;
}

.hub-stamina-strip-right {
  font-size: 0.62rem;
  color: #fef08a;
}

/* ==================== TACTICAL COMMAND ORDER BAR (SKILL + DRUM + GONG + WEATHER) ==================== */
.command-order-bar {
  margin: 0 12px 5px;
  display: flex;
  align-items: center;
  gap: 5px;
  z-index: 6;
  flex-shrink: 0;
}

.cmd-skill-btn {
  flex: 1.35;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  padding: 0 8px;
  border-radius: 8px;
  background: linear-gradient(180deg, #3c2618 0%, #241710 100%);
  border: 1px solid rgba(245, 208, 138, 0.52);
  color: #fde6b8;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 244, 214, 0.14);
  transition: transform 0.12s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.cmd-skill-btn:hover:not(:disabled) {
  border-color: #fde68a;
  box-shadow: 0 0 12px rgba(245, 208, 138, 0.36);
}

.cmd-skill-btn:active:not(:disabled) {
  transform: scale(0.97);
}

.cmd-skill-btn.armed-target {
  background: linear-gradient(180deg, #1d443a 0%, #122923 100%);
  border-color: #7cc4b0 !important;
  box-shadow: 0 0 14px rgba(124, 196, 176, 0.72) !important;
}

.cmd-skill-btn:disabled,
.cmd-tactic-btn:disabled {
  opacity: 0.46;
  cursor: not-allowed;
}

.cmd-skill-btn img {
  width: 17px;
  height: 17px;
  object-fit: contain;
  flex-shrink: 0;
}

.cmd-skill-name {
  font-family: var(--font-serif);
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cmd-cost-pill {
  font-size: 0.6rem;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 999px;
  background: rgba(16, 12, 9, 0.78);
  border: 1px solid rgba(251, 146, 60, 0.45);
  color: #fdba74;
  flex-shrink: 0;
}

.cmd-tactic-btn {
  height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 7px;
  border-radius: 8px;
  background: linear-gradient(180deg, #2b231b 0%, #1b1612 100%);
  border: 1px solid rgba(216, 192, 145, 0.32);
  color: #f3e8d4;
  font-family: var(--font-serif);
  font-size: 0.71rem;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.14s ease;
}

.cmd-tactic-btn:hover:not(:disabled) {
  border-color: var(--brass-bright);
}

.cmd-tactic-btn img {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

.cmd-tactic-btn em {
  font-style: normal;
  font-family: var(--font-sans);
  font-size: 0.58rem;
  color: #fdba74;
}

.cmd-tactic-btn.drum-btn.active-drum {
  background: linear-gradient(180deg, #991b1b 0%, #5c1111 100%);
  border-color: #fde047;
  color: #fef08a;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.6);
}

.weather-seal-chip {
  height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 8px;
  border-radius: 8px;
  background: rgba(18, 20, 24, 0.88);
  border: 1px solid rgba(216, 192, 145, 0.28);
  color: #e2e8f0;
  font-family: var(--font-serif);
  font-size: 0.66rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

.weather-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fde68a;
  box-shadow: 0 0 6px currentColor;
}

/* ==================== HERO ACTIVE SKILL CUT-IN ("杀 / 斩 / 破 / 射") ==================== */
.hero-cutin-overlay {
  position: absolute;
  left: 0;
  right: 0;
  top: 29%;
  height: 112px;
  pointer-events: none;
  opacity: 0;
  z-index: 40;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.16s ease;
}

.hero-cutin-overlay.show {
  opacity: 1;
}

.hero-cutin-slash-bg {
  position: absolute;
  inset: 8px -20px;
  transform: skewY(-4deg);
  background:
    linear-gradient(90deg, rgba(16, 12, 10, 0.96) 0%, rgba(146, 36, 24, 0.92) 48%, rgba(24, 18, 14, 0.96) 100%);
  border-top: 2px solid #fde68a;
  border-bottom: 2px solid #fde68a;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.85);
}

.hero-cutin-card {
  position: relative;
  width: 100%;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  z-index: 2;
}

.hero-cutin-portrait {
  width: 96px;
  height: 96px;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.9));
  transform: translateX(-28px) scale(0.92);
  transition: transform 0.22s cubic-bezier(0.18, 1.25, 0.32, 1);
}

.hero-cutin-overlay.show .hero-cutin-portrait {
  transform: translateX(0) scale(1.06);
}

.hero-cutin-meta {
  flex: 1;
  min-width: 0;
}

.hero-cutin-skill {
  font-family: var(--font-serif);
  font-size: 1.08rem;
  font-weight: 900;
  color: #fef08a;
  letter-spacing: 0.08em;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
}

.hero-cutin-line {
  margin-top: 3px;
  font-size: 0.73rem;
  color: #fff8ec;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hero-cutin-stamp {
  width: 62px;
  height: 62px;
  border-radius: 10px;
  background: radial-gradient(circle, #dc2626 0%, #7f1d1d 100%);
  border: 2.5px solid #fef08a;
  color: #fffbeb;
  font-family: var(--font-serif);
  font-size: 2.05rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 22px rgba(239, 68, 68, 0.9), inset 0 0 10px rgba(254, 240, 138, 0.35);
  transform: scale(2.2) rotate(-12deg);
  transition: transform 0.2s cubic-bezier(0.18, 1.3, 0.32, 1);
  flex-shrink: 0;
}

.hero-cutin-overlay.show .hero-cutin-stamp {
  transform: scale(1) rotate(-5deg);
}

/* ==================== PRE-BOSS GIANT MEAT FEAST BONUS STAGE & WEATHER FRAMES ==================== */
.boss-showdown-stage.feast-mode {
  border-color: #fbbf24 !important;
  background:
    radial-gradient(circle at 22% 40%, rgba(217, 119, 6, 0.48) 0%, rgba(36, 22, 12, 0.96) 68%),
    linear-gradient(180deg, #3b2310 0%, #1c120a 100%) !important;
  box-shadow:
    0 0 22px rgba(251, 191, 36, 0.34),
    0 10px 24px rgba(0, 0, 0, 0.65),
    inset 0 0 20px rgba(245, 158, 11, 0.28) !important;
}

.boss-showdown-stage.feast-mode .boss-rank-seal {
  background: linear-gradient(180deg, #d97706 0%, #92400e 100%);
  border-color: #fef08a;
}

.boss-showdown-stage.feast-mode .boss-dragon-hp-fill {
  background: linear-gradient(90deg, #b45309 0%, #f59e0b 45%, #fef08a 52%, #d97706 100%);
  background-size: 220% 100%;
}

.dungeon-grid.drum-morale-active {
  border-color: #fb923c !important;
  box-shadow:
    0 0 22px rgba(239, 68, 68, 0.48),
    inset 0 0 16px rgba(251, 146, 60, 0.28) !important;
}

.dungeon-grid.weather-snow {
  border-color: rgba(186, 230, 253, 0.78);
  box-shadow:
    0 0 18px rgba(186, 230, 253, 0.25),
    inset 0 0 22px rgba(224, 242, 254, 0.26),
    0 12px 28px rgba(0, 0, 0, 0.62);
}

.dungeon-grid.weather-rain {
  border-color: rgba(147, 197, 253, 0.62);
  box-shadow:
    inset 0 0 20px rgba(59, 130, 246, 0.22),
    0 12px 28px rgba(4, 12, 28, 0.72);
}

.dungeon-grid.weather-thunder {
  border-color: rgba(196, 181, 253, 0.68);
  box-shadow:
    0 0 18px rgba(139, 92, 246, 0.28),
    inset 0 0 18px rgba(167, 139, 250, 0.2),
    0 12px 28px rgba(8, 6, 24, 0.75);
}

.dungeon-grid.weather-hail {
  border-color: rgba(125, 211, 252, 0.78);
  box-shadow:
    0 0 16px rgba(56, 189, 248, 0.26),
    inset 0 0 18px rgba(186, 230, 253, 0.22),
    0 12px 28px rgba(0, 0, 0, 0.65);
}

.dungeon-grid.weather-wind {
  border-color: rgba(252, 211, 77, 0.58);
  box-shadow:
    inset 0 0 16px rgba(217, 119, 6, 0.18),
    0 12px 28px rgba(0, 0, 0, 0.6);
}

.dungeon-grid.weather-night {
  border-color: rgba(96, 165, 250, 0.45);
  box-shadow:
    0 0 22px rgba(15, 23, 42, 0.85),
    inset 0 0 22px rgba(15, 23, 42, 0.55);
}

.dungeon-grid.weather-night .tile.fogged .brick-art {
  filter: brightness(0.55) saturate(0.72) hue-rotate(14deg);
}

.dungeon-grid.weather-fire {
  border-color: rgba(251, 146, 60, 0.78);
  box-shadow:
    0 0 22px rgba(239, 68, 68, 0.36),
    inset 0 0 22px rgba(239, 68, 68, 0.32),
    0 12px 28px rgba(0, 0, 0, 0.68);
}

/* ==================== V3 EXPANSION: MISSIONS, PROPS, LIEUTENANTS & GILDED REELS ==================== */
.status-tags {
  flex-wrap: nowrap;
  overflow: hidden;
  min-width: 0;
}

.status-pill {
  white-space: nowrap;
  flex-shrink: 0;
}

.hud-vitals {
  min-width: 0;
}

.dungeon-hud .hp-bar-outer,
.dungeon-hud .stamina-bar-outer {
  width: 160px;
  max-width: 100%;
}

.mission-progress-pill {
  height: 28px;
  padding: 0 6px;
  border-radius: 7px;
  background: linear-gradient(180deg, rgba(64, 34, 16, 0.94) 0%, rgba(36, 20, 11, 0.96) 100%);
  border: 1px solid rgba(245, 180, 82, 0.65);
  color: #fde68a;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-family: var(--font-serif);
  font-size: 0.61rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.25);
  transition: transform 0.14s ease, border-color 0.18s ease;
}

.mission-progress-pill:hover {
  border-color: #fef08a;
  transform: translateY(-1px);
}

.mission-progress-pill img {
  width: 14px;
  height: 14px;
  object-fit: contain;
  flex-shrink: 0;
  pointer-events: none;
}

.mission-progress-pill.goal-ready {
  background: linear-gradient(180deg, rgba(16, 78, 60, 0.95) 0%, rgba(11, 48, 37, 0.96) 100%);
  border-color: #6ee7b7;
  color: #ecfdf5;
  box-shadow: 0 0 12px rgba(52, 211, 153, 0.45);
}

.mission-progress-pill.alarm-warn {
  border-color: #f87171;
  color: #fecaca;
  animation: lowStamPulse 0.85s ease-in-out infinite alternate;
}

/* Lieutenant Companion Badge in Dock Top Bar */
.lt-companion-slot {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: #1d1813;
  border: 1px dashed rgba(216, 192, 145, 0.28);
  padding: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
  cursor: pointer;
  margin-right: 2px;
  transition: all 0.16s ease;
}

.lt-companion-slot.empty::after {
  content: "副";
  font-family: var(--font-serif);
  font-size: 0.56rem;
  color: rgba(216, 192, 145, 0.36);
  font-weight: 700;
}

.lt-companion-slot.filled {
  border-style: solid;
  border-color: rgba(245, 180, 82, 0.72);
  background: radial-gradient(circle at 50% 45%, #3b2a17 0%, #1e1711 100%);
}

.lt-companion-slot.bond-active {
  border-color: #fde047;
  box-shadow: 0 0 9px rgba(250, 204, 21, 0.55);
}

.lt-companion-slot img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 4px;
  pointer-events: none;
}

.lt-charge-pip {
  position: absolute;
  bottom: -3px;
  right: -3px;
  min-width: 12px;
  height: 11px;
  padding: 0 2px;
  border-radius: 999px;
  background: #92400e;
  border: 1px solid #fde68a;
  color: #fef9c3;
  font-size: 0.5rem;
  font-weight: 800;
  line-height: 9px;
  text-align: center;
  pointer-events: none;
}

.lt-bond-dot {
  position: absolute;
  top: -3px;
  left: -3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fde047;
  border: 1px solid #451a03;
  box-shadow: 0 0 6px #facc15;
  pointer-events: none;
}

/* Chained Warships Row Connector (赤壁铁索横江) */
.tile.row-chained {
  box-shadow: inset 0 0 0 1px rgba(251, 146, 60, 0.36);
}

.tile.row-chained.revealed {
  border-color: rgba(245, 158, 11, 0.45);
}

.tile.row-chained:not(.row-chain-end)::before {
  content: "";
  position: absolute;
  top: 50%;
  right: -7px;
  width: 8px;
  height: 4px;
  transform: translateY(-50%);
  background: repeating-linear-gradient(90deg, #cbd5e1 0 2px, #475569 2px 4px);
  border-top: 1px solid #f59e0b;
  border-bottom: 1px solid #78350f;
  z-index: 9;
  pointer-events: none;
}

/* Subtle Golden Grain Scent on Fog Tiles Adjacent to Hidden Granaries */
.tile.unrevealed.granary-scent::after {
  content: "";
  position: absolute;
  bottom: 4px;
  left: 4px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: radial-gradient(circle, #fef08a 0%, #f59e0b 70%, transparent 100%);
  box-shadow: 0 0 6px rgba(250, 204, 21, 0.9);
  z-index: 8;
  pointer-events: none;
}

/* Tactical Prop & Mission Tile Badges */
.prop-badge {
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  padding: 0 4px;
  border-radius: 4px;
  font-size: 0.52rem;
  font-weight: 800;
  line-height: 1.25;
  white-space: nowrap;
  background: rgba(20, 15, 11, 0.88);
  border: 1px solid rgba(245, 208, 138, 0.55);
  color: #fde68a;
  z-index: 6;
  pointer-events: none;
}

.prop-badge.fire {
  background: rgba(124, 45, 18, 0.92);
  border-color: #fb923c;
  color: #ffedd5;
}

.prop-badge.jade {
  background: rgba(6, 78, 59, 0.92);
  border-color: #6ee7b7;
  color: #ecfdf5;
}

.prop-badge.danger {
  background: rgba(127, 29, 29, 0.92);
  border-color: #f87171;
  color: #fee2e2;
}

/* Golden Supply Cart Flee Countdown Badge */
@keyframes fleeBadgePulse {
  from { transform: scale(1); }
  to { transform: scale(1.06); }
}

.flee-timer-badge {
  position: absolute;
  top: 3px;
  left: 3px;
  padding: 0 4px;
  border-radius: 4px;
  background: linear-gradient(180deg, #d97706 0%, #92400e 100%);
  border: 1px solid #fef08a;
  color: #fffbeb;
  font-size: 0.52rem;
  font-weight: 800;
  line-height: 1.25;
  z-index: 7;
  pointer-events: none;
  animation: fleeBadgePulse 0.65s ease-in-out infinite alternate;
}

/* High-Contrast Ink Header on Xuan-Paper Event Modals */
.modal-card.scroll-paper .modal-header {
  border-bottom-color: rgba(120, 86, 46, 0.24);
}

.modal-card.scroll-paper .modal-header h3 {
  color: #351f10;
}

.modal-card.scroll-paper .modal-header p {
  color: #6b4f35;
}

/* Astrolabe Gilded Reel Symbol Frame (浑天改命鎏金) */
.slot-symbol-cell {
  position: relative;
}

.slot-symbol-cell.is-gilded {
  background: radial-gradient(circle at 50% 50%, rgba(254, 240, 138, 0.52) 0%, rgba(245, 158, 11, 0.22) 72%, transparent 100%);
  box-shadow: inset 0 0 0 1.5px #d97706, inset 0 0 8px rgba(250, 204, 21, 0.55);
  border-radius: 5px;
}

.slot-symbol-cell.is-gilded img {
  filter: drop-shadow(0 0 4px rgba(245, 158, 11, 0.85)) saturate(1.22);
}

.slot-symbol-cell.is-gilded::after {
  content: "";
  position: absolute;
  top: 3px;
  right: 3px;
  width: 7px;
  height: 7px;
  background: #f59e0b;
  border: 1px solid #fffbeb;
  transform: rotate(45deg);
  box-shadow: 0 0 5px #fde047;
  pointer-events: none;
}

/* ==================== V4 EXPANSION: KNOCKBACK, FANJIAN, SPELL FUSION, BOSS SURRENDER & DUAL DOORS ==================== */
.devour-toggle-btn.fuse-btn {
  border-color: rgba(245, 180, 82, 0.55);
  color: #fde68a;
  background: linear-gradient(180deg, #322315 0%, #1d150e 100%);
  margin-right: 3px;
}

.devour-toggle-btn.fuse-btn.can-fuse {
  border-color: #fbbf24;
  box-shadow: 0 0 8px rgba(251, 191, 36, 0.32);
}

.devour-toggle-btn.fuse-btn.active {
  background: linear-gradient(180deg, #b45309 0%, #78350f 100%);
  border-color: #fef08a;
  color: #fffbeb;
  box-shadow: 0 0 12px rgba(250, 204, 21, 0.6);
}

.spell-slot.fuse-candidate {
  border-color: rgba(251, 191, 36, 0.72) !important;
  box-shadow: inset 0 0 8px rgba(245, 158, 11, 0.35);
}

.spell-slot.fuse-selected {
  border-color: #fef08a !important;
  background: radial-gradient(circle at 50% 45%, rgba(217, 119, 6, 0.48) 0%, #241910 100%) !important;
  box-shadow: 0 0 14px rgba(250, 204, 21, 0.85) !important;
  transform: translateY(-2px);
}

.spell-slot.forbidden-spell {
  border-color: #f59e0b !important;
  background: radial-gradient(circle at 50% 40%, rgba(146, 64, 14, 0.55) 0%, #1f1410 100%);
  box-shadow: inset 0 0 8px rgba(251, 146, 60, 0.42), 0 0 8px rgba(245, 158, 11, 0.28);
}

.spell-slot.forbidden-spell .spell-slot-name {
  color: #fef08a;
  font-weight: 800;
}

/* Conquered Boss Legendary Lieutenant Frame */
.lt-companion-slot.boss-lt {
  border-color: #fb923c !important;
  background: radial-gradient(circle at 50% 45%, #5c1912 0%, #24100d 100%) !important;
  box-shadow: 0 0 11px rgba(239, 68, 68, 0.62);
}

/* Surrender White Flag Badge on Low-HP Bosses */
.surrender-flag-badge {
  position: absolute;
  top: 3px;
  left: 3px;
  padding: 1px 5px;
  border-radius: 4px;
  background: linear-gradient(180deg, #ffffff 0%, #e2e8f0 100%);
  border: 1.5px solid #dc2626;
  color: #991b1b;
  font-size: 0.54rem;
  font-weight: 900;
  line-height: 1.25;
  z-index: 9;
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.85), 0 0 10px rgba(255, 255, 255, 0.75);
  animation: fleeBadgePulse 0.55s ease-in-out infinite alternate;
}

.tile-boss-2x2 .surrender-flag-badge {
  top: 23px;
  left: 5px;
  padding: 2px 6px;
  font-size: 0.62rem;
}

/* Traitor / Fanjian Badge */
.betray-badge {
  position: absolute;
  top: 2px;
  left: 2px;
  padding: 0 4px;
  border-radius: 4px;
  background: linear-gradient(180deg, #9333ea 0%, #581c87 100%);
  border: 1px solid #f0abfc;
  color: #fdf4ff;
  font-size: 0.52rem;
  font-weight: 800;
  line-height: 1.25;
  z-index: 8;
  pointer-events: none;
}

/* Dual Branch Exit Door Route Tags */
.door-tag.supply-route {
  background: linear-gradient(180deg, #0f766e 0%, #115e59 100%) !important;
  border-color: #6ee7b7 !important;
  color: #ecfdf5 !important;
}

.door-tag.peril-route {
  background: linear-gradient(180deg, #b91c1c 0%, #7f1d1d 100%) !important;
  border-color: #fde047 !important;
  color: #fef9c3 !important;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.55);
}

/* ==================== V5: PURPLE-SANDALWOOD 24-GENERAL FOIL CARD BINDER ==================== */
.plaque-title-group {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
}

.plaque-title-group h2 {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hub-deputy-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: linear-gradient(180deg, #3c2419 0%, #24150e 100%);
  border: 1px solid rgba(245, 190, 96, 0.52);
  border-radius: 999px;
  padding: 1px 7px 1px 4px;
  font-size: 0.64rem;
  font-weight: 700;
  color: #fde68a;
  cursor: pointer;
  flex-shrink: 0;
  white-space: nowrap;
}

.hub-deputy-badge img {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  object-fit: cover;
}

.btn-binder-hub {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  position: relative;
}

.btn-binder-hub img {
  width: 16px;
  height: 16px;
}

.binder-overlay {
  position: absolute;
  inset: 0;
  z-index: 44;
  background:
    radial-gradient(circle at 50% 0%, rgba(112, 42, 26, 0.34) 0%, transparent 58%),
    linear-gradient(180deg, #241612 0%, #17110e 100%);
  display: none;
  flex-direction: column;
  overflow: hidden;
}

.binder-overlay.open {
  display: flex;
  animation: binderFadeIn 0.18s ease-out;
}

@keyframes binderFadeIn {
  from { opacity: 0; transform: scale(0.985); }
  to { opacity: 1; transform: scale(1); }
}

.binder-header {
  padding: 10px 14px 8px;
  background: linear-gradient(180deg, rgba(52, 27, 19, 0.95) 0%, rgba(30, 18, 14, 0.94) 100%);
  border-bottom: 1px solid rgba(223, 192, 136, 0.28);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
  flex-shrink: 0;
}

.binder-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.binder-title-wrap {
  display: flex;
  align-items: center;
  gap: 7px;
}

.binder-title-wrap h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.06rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #f9ebd0;
}

.binder-count-badge {
  background: rgba(18, 12, 9, 0.72);
  border: 1px solid rgba(223, 192, 136, 0.36);
  border-radius: 999px;
  padding: 1px 8px;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--brass-bright);
}

.binder-header-right {
  display: flex;
  align-items: center;
  gap: 7px;
}

.tiger-token-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(20, 14, 10, 0.85);
  border: 1px solid rgba(245, 190, 96, 0.46);
  border-radius: 999px;
  padding: 3px 9px 3px 6px;
  font-size: 0.74rem;
  color: #fde68a;
}

.tiger-token-pill img {
  width: 15px;
  height: 15px;
}

.binder-subnav-row {
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.binder-subtabs {
  display: flex;
  align-items: center;
  gap: 5px;
}

.binder-tab-btn {
  background: rgba(20, 14, 11, 0.72);
  border: 1px solid rgba(216, 192, 145, 0.22);
  color: var(--text-sec);
  border-radius: 8px;
  padding: 4px 9px;
  font-family: var(--font-serif);
  font-size: 0.73rem;
  font-weight: 700;
  cursor: pointer;
  position: relative;
}

.binder-tab-btn.active {
  background: linear-gradient(180deg, #6e291d 0%, #481911 100%);
  border-color: #f3c878;
  color: #fff6e3;
  box-shadow: 0 2px 8px rgba(181, 56, 42, 0.4);
}

.wine-pack-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: linear-gradient(180deg, #99271b 0%, #63160e 100%);
  border: 1px solid #f7d288;
  border-radius: 8px;
  padding: 4px 10px;
  color: #fff7e6;
  font-family: var(--font-serif);
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.45), 0 0 12px rgba(245, 158, 11, 0.25);
}

.wine-pack-btn:disabled {
  opacity: 0.48;
  cursor: not-allowed;
  box-shadow: none;
}

.wine-pack-btn img {
  width: 15px;
  height: 15px;
}

.binder-panel {
  flex: 1;
  display: none;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.binder-panel.active {
  display: flex;
}

.binder-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 7px 14px 4px;
  flex-shrink: 0;
}

.faction-pills {
  display: flex;
  align-items: center;
  gap: 4px;
}

.faction-pill {
  background: rgba(28, 22, 18, 0.85);
  border: 1px solid rgba(216, 192, 145, 0.2);
  color: var(--text-sec);
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 0.69rem;
  font-weight: 700;
  cursor: pointer;
}

.faction-pill.active {
  background: linear-gradient(180deg, #4b3824 0%, #2d2115 100%);
  border-color: var(--brass-bright);
  color: #fef3c7;
}

.deputy-status-chip {
  font-size: 0.68rem;
  color: #fde68a;
  background: rgba(38, 25, 17, 0.85);
  border: 1px solid rgba(223, 192, 136, 0.3);
  border-radius: 999px;
  padding: 2px 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 145px;
}

.binder-card-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 8px;
  padding: 5px 14px;
  min-height: 0;
}

.binder-card {
  position: relative;
  border-radius: 11px;
  background: linear-gradient(180deg, #2d221b 0%, #1a1410 100%);
  border: 1.5px solid rgba(196, 155, 87, 0.35);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 5px 5px 6px;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.14s ease, box-shadow 0.16s ease;
}

.binder-card:hover {
  transform: translateY(-2px);
}

/* 1-Star Bronze Scroll Frame */
.binder-card.foil-tier-1 {
  border-color: #b58952;
  box-shadow: inset 0 0 0 1px rgba(255, 232, 190, 0.1), 0 4px 10px rgba(0, 0, 0, 0.45);
}

/* 2-Star Gilded Silk Frame */
.binder-card.foil-tier-2 {
  background: linear-gradient(165deg, #3c2d1d 0%, #211810 55%, #342415 100%);
  border-color: #f3c870;
  box-shadow: 0 4px 14px rgba(217, 155, 56, 0.28), inset 0 0 10px rgba(245, 200, 110, 0.16);
}

/* 3-Star Crimson-Gold Animated Holographic Foil */
.binder-card.foil-tier-3 {
  background: linear-gradient(155deg, #4b1f18 0%, #271510 48%, #473016 100%);
  border: 1.5px solid #fde047;
  box-shadow:
    0 0 16px rgba(245, 158, 11, 0.42),
    inset 0 0 12px rgba(253, 224, 71, 0.25);
}

.binder-card.foil-tier-3::before,
.foil-card-3d.foil-tier-3::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: linear-gradient(
    115deg,
    transparent 34%,
    rgba(255, 238, 170, 0.22) 45%,
    rgba(255, 160, 120, 0.24) 50%,
    rgba(165, 243, 252, 0.18) 55%,
    transparent 66%
  );
  transform: translateX(-60%) rotate(12deg);
  animation: holoSweep 3.4s ease-in-out infinite;
  pointer-events: none;
  z-index: 3;
}

@keyframes holoSweep {
  0%, 18% { transform: translateX(-65%) rotate(12deg); }
  62%, 100% { transform: translateX(65%) rotate(12deg); }
}

.binder-card.card-unowned {
  background: linear-gradient(180deg, #1d1815 0%, #13100e 100%);
  border-color: rgba(140, 122, 98, 0.22);
}

.binder-card-top {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 4;
}

.card-faction-dot {
  font-family: var(--font-serif);
  font-size: 0.6rem;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 4px;
  color: #fff8eb;
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.card-faction-dot.fac-shu { background: #1f6f54; }
.card-faction-dot.fac-wei { background: #294c7a; }
.card-faction-dot.fac-wu  { background: #9e2f25; }
.card-faction-dot.fac-qun { background: #6b4c28; }

.card-stars-mini {
  font-size: 0.62rem;
  letter-spacing: -1px;
  color: #fde047;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
}

.binder-card-art {
  flex: 1;
  width: 100%;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
}

.binder-card-art img {
  max-width: 92%;
  max-height: 104px;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.65));
}

.binder-card.card-unowned .binder-card-art img {
  filter: brightness(0.09) contrast(1.25) drop-shadow(0 0 2px rgba(216, 192, 145, 0.24));
  opacity: 0.82;
}

.card-unowned-seal {
  position: absolute;
  bottom: 4px;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(24, 18, 15, 0.88);
  border: 1px solid rgba(196, 155, 87, 0.32);
  color: var(--text-dim);
  font-size: 0.56rem;
  font-weight: 700;
}

.card-deploy-ribbon {
  position: absolute;
  top: 22px;
  right: 3px;
  background: linear-gradient(180deg, #dc2626 0%, #991b1b 100%);
  border: 1px solid #fde047;
  color: #fffbeb;
  font-size: 0.54rem;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: 4px;
  z-index: 5;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.65);
}

.binder-card-bottom {
  width: 100%;
  text-align: center;
  z-index: 4;
  background: rgba(16, 12, 9, 0.78);
  border-top: 1px solid rgba(223, 192, 136, 0.18);
  border-radius: 6px;
  padding: 2px 3px;
}

.binder-card-name {
  font-family: var(--font-serif);
  font-size: 0.74rem;
  font-weight: 700;
  color: #f8eedb;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.binder-card-sub {
  font-size: 0.56rem;
  color: var(--brass-bright);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.binder-card.card-unowned .binder-card-name {
  color: var(--text-sec);
}

.binder-card.card-unowned .binder-card-sub {
  color: var(--text-dim);
}

.binder-pager-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 14px 11px;
  border-top: 1px solid rgba(216, 192, 145, 0.14);
  flex-shrink: 0;
}

.binder-page-indicator {
  font-size: 0.68rem;
  color: var(--text-sec);
}

/* ==================== 3D INTERACTIVE FOIL CARD INSPECTION ==================== */
.card-inspect-backdrop {
  position: absolute;
  inset: 0;
  z-index: 48;
  background: rgba(10, 8, 6, 0.86);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 14px;
}

.card-inspect-backdrop.open {
  display: flex;
}

.card-inspect-stage {
  width: 100%;
  max-width: 344px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 11px;
  perspective: 950px;
}

.foil-card-3d {
  width: 100%;
  border-radius: 16px;
  padding: 12px 14px;
  background: linear-gradient(165deg, #35261c 0%, #1c140f 55%, #2b1d14 100%);
  border: 2px solid #d4a65a;
  box-shadow:
    0 22px 48px rgba(0, 0, 0, 0.85),
    0 0 24px rgba(212, 166, 90, 0.28),
    inset 0 0 0 1px rgba(255, 242, 208, 0.16);
  position: relative;
  overflow: hidden;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.08s ease-out;
  transform-style: preserve-3d;
}

.foil-card-3d.foil-tier-2 {
  border-color: #f6cf78;
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.88), 0 0 28px rgba(246, 207, 120, 0.36);
}

.foil-card-3d.foil-tier-3 {
  background: linear-gradient(160deg, #4b1d16 0%, #21130e 50%, #442d13 100%);
  border-color: #fde047;
  box-shadow: 0 22px 52px rgba(0, 0, 0, 0.9), 0 0 34px rgba(245, 158, 11, 0.52);
}

.foil-card-glare {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at var(--gx, 50%) var(--gy, 28%),
    rgba(255, 248, 214, 0.32) 0%,
    rgba(255, 215, 130, 0.08) 34%,
    transparent 65%
  );
  pointer-events: none;
  z-index: 4;
}

.foil-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  position: relative;
  z-index: 5;
}

.foil-faction-tag {
  font-family: var(--font-serif);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 5px;
  color: #fff9eb;
}

.foil-card-title {
  flex: 1;
  font-family: var(--font-serif);
  font-size: 0.98rem;
  font-weight: 800;
  color: #fef3d6;
  letter-spacing: 0.04em;
}

.foil-stars {
  font-size: 0.9rem;
  color: #fde047;
  text-shadow: 0 0 8px rgba(250, 204, 21, 0.65);
}

.foil-portrait-stage {
  height: 196px;
  margin: 8px 0;
  border-radius: 12px;
  background:
    radial-gradient(circle at 50% 55%, rgba(214, 162, 84, 0.24) 0%, rgba(16, 12, 9, 0.92) 74%);
  border: 1px solid rgba(223, 192, 136, 0.26);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.foil-portrait-stage img {
  max-height: 184px;
  max-width: 90%;
  object-fit: contain;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.78));
  z-index: 2;
}

.foil-card-3d.card-unowned .foil-portrait-stage img {
  filter: brightness(0.09) contrast(1.25) drop-shadow(0 0 4px rgba(223, 192, 136, 0.35));
}

.foil-role-ribbon {
  position: absolute;
  bottom: 7px;
  right: 8px;
  background: rgba(20, 14, 10, 0.88);
  border: 1px solid rgba(243, 200, 120, 0.45);
  color: #fde68a;
  font-size: 0.64rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  z-index: 3;
}

.foil-skill-scroll {
  background: rgba(17, 13, 10, 0.82);
  border: 1px solid rgba(216, 192, 145, 0.22);
  border-radius: 10px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  z-index: 5;
}

.foil-skill-block {
  font-size: 0.71rem;
  line-height: 1.38;
  color: var(--text-main);
}

.foil-skill-block b {
  color: #fde68a;
  margin-right: 4px;
}

.foil-skill-block.active-ult b {
  color: #fca5a5;
}

.foil-star-note {
  font-size: 0.64rem;
  color: #93c5fd;
  border-top: 1px dashed rgba(216, 192, 145, 0.18);
  padding-top: 4px;
}

.foil-quote-line {
  margin-top: 7px;
  font-family: var(--font-serif);
  font-size: 0.68rem;
  color: var(--brass-bright);
  text-align: center;
  font-style: italic;
  position: relative;
  z-index: 5;
}

.inspect-actions-bar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  flex-wrap: wrap;
}

.inspect-actions-bar button {
  flex: 1;
  min-width: 92px;
  padding: 8px 10px;
  font-size: 0.76rem;
}

/* ==================== CARD CAPTURE & 3-CARD WINE PACK CEREMONY ==================== */
.card-ceremony-overlay {
  position: absolute;
  inset: 0;
  z-index: 52;
  background: radial-gradient(circle at 50% 35%, rgba(68, 25, 16, 0.95) 0%, rgba(12, 9, 7, 0.96) 75%);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.card-ceremony-overlay.open {
  display: flex;
  animation: binderFadeIn 0.2s ease-out;
}

.ceremony-inner {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}

.ceremony-header h3 {
  margin: 6px 0 3px;
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: #fef08a;
  letter-spacing: 0.06em;
}

.ceremony-header p {
  margin: 0;
  font-size: 0.75rem;
  color: var(--text-sec);
}

.ceremony-cards-row {
  width: 100%;
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 9px;
  perspective: 900px;
}

.ceremony-slot {
  flex: 1;
  max-width: 126px;
  height: 196px;
  position: relative;
  cursor: pointer;
  transform-style: preserve-3d;
  transition: transform 0.48s cubic-bezier(0.2, 0.85, 0.3, 1.12);
}

.ceremony-slot.single-large {
  max-width: 196px;
  height: 256px;
}

.ceremony-slot.flipped {
  transform: rotateY(180deg);
}

.ceremony-face {
  position: absolute;
  inset: 0;
  border-radius: 12px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 8px 6px;
  overflow: hidden;
}

.ceremony-back {
  background:
    radial-gradient(circle at 50% 45%, rgba(220, 38, 38, 0.35), transparent 65%),
    linear-gradient(160deg, #581c14 0%, #290e0a 100%);
  border: 2px solid #f3c878;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.7), 0 0 16px rgba(245, 158, 11, 0.3);
}

.ceremony-back img {
  width: 44px;
  height: 44px;
}

.ceremony-back span {
  font-family: var(--font-serif);
  font-size: 0.76rem;
  font-weight: 700;
  color: #fde68a;
  letter-spacing: 0.1em;
}

.ceremony-front {
  transform: rotateY(180deg);
  background: linear-gradient(165deg, #3b281c 0%, #1b130e 100%);
  border: 2px solid #fde047;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.82), 0 0 22px rgba(250, 204, 21, 0.42);
}

.ceremony-front img {
  max-height: 112px;
  max-width: 92%;
  object-fit: contain;
  filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.75));
}

.ceremony-slot.single-large .ceremony-front img {
  max-height: 156px;
}

.ceremony-outcome-tag {
  font-size: 0.62rem;
  font-weight: 800;
  padding: 1px 7px;
  border-radius: 999px;
  background: #b91c1c;
  border: 1px solid #fde047;
  color: #fffbeb;
}

.ceremony-front-name {
  font-family: var(--font-serif);
  font-size: 0.8rem;
  font-weight: 800;
  color: #fef3c7;
}

.ceremony-front-stars {
  font-size: 0.72rem;
  color: #fde047;
}

.ceremony-footer {
  display: flex;
  gap: 10px;
  justify-content: center;
  width: 100%;
}

/* ==================== V5: DEPUTY 0-STAMINA ACTIVE SKILL READY GLOW ==================== */
.lt-companion-slot.lt-skill-ready {
  border-color: #fde047 !important;
  box-shadow:
    0 0 14px rgba(250, 204, 21, 0.78),
    inset 0 0 8px rgba(254, 240, 138, 0.45) !important;
  animation: ltSkillPulse 0.85s ease-in-out infinite alternate;
}

.lt-companion-slot.lt-combo-ready {
  border-color: #fb7185 !important;
  box-shadow:
    0 0 16px rgba(244, 63, 94, 0.88),
    0 0 24px rgba(250, 204, 21, 0.55) !important;
}

@keyframes ltSkillPulse {
  from { transform: scale(1); }
  to { transform: scale(1.06); }
}

.lt-ready-badge {
  position: absolute;
  top: -5px;
  left: -4px;
  background: linear-gradient(180deg, #dc2626 0%, #991b1b 100%);
  border: 1px solid #fde047;
  color: #fffbeb;
  font-size: 0.48rem;
  font-weight: 900;
  padding: 0 3px;
  border-radius: 4px;
  line-height: 1.25;
  z-index: 6;
  pointer-events: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.8);
}

/* ==================== V5: DUAL-PORTRAIT COMBO CUT-IN & 3-STAR OVERLORD COMMANDER ==================== */
.hero-cutin-portrait.dual-partner {
  margin-left: -10px;
  border-left: none;
}

.overlord-cmd-seal {
  display: inline-flex;
  align-items: center;
  background: linear-gradient(180deg, #b91c1c 0%, #7f1d1d 100%);
  border: 1px solid #fde047;
  color: #fffbeb;
  font-family: var(--font-serif);
  font-size: 0.6rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 4px;
  flex-shrink: 0;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.45);
}

/* ==================== V5: FOUR LEGENDARY MOUNTS & NINE-PROVINCE GARRISON MAP ==================== */
.hub-mount-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: linear-gradient(180deg, #2a2417 0%, #19150d 100%);
  border: 1px solid rgba(110, 231, 183, 0.45);
  border-radius: 999px;
  padding: 1px 6px 1px 4px;
  font-size: 0.62rem;
  font-weight: 700;
  color: #a7f3d0;
  cursor: pointer;
  flex-shrink: 0;
  white-space: nowrap;
}

.hub-mount-badge img {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  object-fit: cover;
}

.mounts-top-note,
.map-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 14px 4px;
  font-size: 0.7rem;
  color: var(--text-sec);
  flex-shrink: 0;
}

.mounts-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 9px;
  padding: 4px 14px 12px;
  min-height: 0;
}

.mount-card {
  background: linear-gradient(170deg, #31241b 0%, #1a130f 100%);
  border: 1.5px solid rgba(212, 166, 90, 0.34);
  border-radius: 13px;
  padding: 8px 9px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.mount-card.equipped {
  border-color: #6ee7b7;
  box-shadow: 0 0 16px rgba(52, 211, 153, 0.28), inset 0 0 10px rgba(110, 231, 183, 0.14);
}

.mount-card.locked {
  opacity: 0.88;
  border-color: rgba(148, 128, 102, 0.24);
}

.mount-art-box {
  height: 108px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 60%, rgba(223, 192, 136, 0.2), transparent 68%);
  border-radius: 9px;
}

.mount-art-box img {
  max-height: 100px;
  max-width: 92%;
  object-fit: contain;
  filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.72));
}

.mount-card.locked .mount-art-box img {
  filter: brightness(0.32) grayscale(0.5);
}

.mount-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.mount-title-row h4 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 0.82rem;
  color: #fef3c7;
}

.mount-skill-tag {
  font-size: 0.58rem;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(181, 56, 42, 0.32);
  border: 1px solid rgba(251, 146, 60, 0.45);
  color: #fed7aa;
}

.mount-desc {
  margin: 3px 0 5px;
  font-size: 0.63rem;
  line-height: 1.34;
  color: var(--text-sec);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mount-btn-row {
  display: flex;
  gap: 5px;
}

.mount-btn-row button {
  flex: 1;
  padding: 5px 6px;
  font-size: 0.66rem;
}

.garrison-map-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 8px;
  padding: 4px 14px 12px;
  min-height: 0;
}

.stronghold-card {
  background:
    radial-gradient(circle at 85% 15%, rgba(196, 155, 87, 0.14), transparent 55%),
    linear-gradient(175deg, #2d231a 0%, #191410 100%);
  border: 1px solid rgba(212, 166, 90, 0.34);
  border-radius: 11px;
  padding: 7px 8px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 0;
  overflow: hidden;
}

.stronghold-card.stationed {
  border-color: #f3c878;
  box-shadow: inset 0 0 8px rgba(243, 200, 120, 0.12);
}

.sh-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.sh-head b {
  font-family: var(--font-serif);
  font-size: 0.78rem;
  color: #fef3d6;
}

.sh-region {
  font-size: 0.56rem;
  color: var(--brass-bright);
  background: rgba(18, 13, 9, 0.75);
  border: 1px solid rgba(223, 192, 136, 0.25);
  border-radius: 4px;
  padding: 0 5px;
}

.sh-prefect-row {
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(16, 12, 9, 0.68);
  border: 1px solid rgba(216, 192, 145, 0.16);
  border-radius: 8px;
  padding: 4px 6px;
}

.sh-prefect-row img {
  width: 34px;
  height: 34px;
  border-radius: 7px;
  object-fit: cover;
  border: 1px solid rgba(243, 200, 120, 0.45);
  flex-shrink: 0;
}

.sh-prefect-meta {
  min-width: 0;
  flex: 1;
}

.sh-prefect-name {
  font-size: 0.68rem;
  font-weight: 700;
  color: #fde68a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sh-prefect-yield {
  font-size: 0.58rem;
  color: #86efac;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sh-airdrop-line {
  font-size: 0.57rem;
  color: var(--text-sec);
  line-height: 1.28;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sh-action-btn {
  width: 100%;
  flex: 0 0 auto !important;
  min-height: 28px;
  padding: 5px 8px !important;
  font-size: 0.68rem !important;
}

/* ==================== V4 PROGRESSIVE UNLOCK, BOARD PHYSICS & ASTROLABE CLIFFHANGER ==================== */
.feature-locked-hidden {
  display: none !important;
}

.hub-astrolabe-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid rgba(56, 189, 248, 0.55);
  background: linear-gradient(135deg, rgba(14, 34, 52, 0.88), rgba(22, 18, 12, 0.92));
  color: #bae6fd;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.25);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.hub-astrolabe-badge:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.45);
}

.hub-astrolabe-badge .astrolabe-badge-orb {
  color: #38bdf8;
  font-size: 0.82rem;
}

.board-rule-indicator {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  margin: 0 0 4px 0;
  padding: 3px 10px;
  border-radius: 7px;
  border: 1px solid rgba(56, 189, 248, 0.45);
  background: linear-gradient(90deg, rgba(12, 34, 50, 0.86), rgba(32, 24, 15, 0.88), rgba(12, 34, 50, 0.86));
  color: #e0f2fe;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-align: center;
}

.board-rule-indicator.rule-imminent {
  border-color: rgba(250, 204, 21, 0.8);
  color: #fef08a;
  box-shadow: 0 0 10px rgba(250, 204, 21, 0.3);
}

/* 1-Flip Cyan Tile Shift Telegraph Arrow */
.tile-shift-telegraph {
  position: relative;
  box-shadow: inset 0 0 0 2px rgba(56, 189, 248, 0.85), 0 0 12px rgba(56, 189, 248, 0.4) !important;
  animation: v4ShiftPulse 1.1s ease-in-out infinite;
}

.tile-shift-arrow-badge {
  position: absolute;
  top: 2px;
  left: 3px;
  z-index: 6;
  padding: 1px 4px;
  border-radius: 4px;
  background: rgba(8, 47, 73, 0.92);
  border: 1px solid rgba(56, 189, 248, 0.85);
  color: #7dd3fc;
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1.1;
  pointer-events: none;
}

@keyframes v4ShiftPulse {
  0%, 100% { box-shadow: inset 0 0 0 2px rgba(56, 189, 248, 0.85), 0 0 10px rgba(56, 189, 248, 0.35); }
  50% { box-shadow: inset 0 0 0 2px rgba(250, 204, 21, 0.95), 0 0 14px rgba(250, 204, 21, 0.5); }
}

/* Dual-Chain Guard Key Seal Indicator */
.dual-chain-seal-link {
  position: relative;
  box-shadow: inset 0 0 0 2px rgba(245, 158, 11, 0.88), 0 0 12px rgba(245, 158, 11, 0.35) !important;
}

.dual-chain-seal-badge {
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 7;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(120, 53, 15, 0.94);
  border: 1px solid rgba(251, 191, 36, 0.9);
  color: #fef3c7;
  font-size: 0.56rem;
  font-weight: 800;
  white-space: nowrap;
  pointer-events: none;
}

/* Shard II Turn-3 Key Quadrant Pulse */
.quadrant-key-pulse {
  box-shadow: inset 0 0 0 2px rgba(250, 204, 21, 0.92), 0 0 14px rgba(250, 204, 21, 0.45) !important;
  animation: v4QuadPulse 1.25s ease-in-out infinite;
}

@keyframes v4QuadPulse {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.22); }
}

/* Board prop & event semantic selector classes */
.tile-prop-oil-barrel,
.tile-prop-astro-forge,
.tile-prop-watchtower,
.tile-prop-bagua-portal,
.tile-event-xushao {
  position: relative;
}

/* ==================== ASTROLABE 3x4 CLIFFHANGER PREVIEW MODAL (1:1 AAA DARK-GOLD DESIGN) ==================== */
@keyframes cliffTargetHalo {
  0%, 100% {
    box-shadow: 0 0 0 1.5px rgba(125, 211, 252, 0.85), 0 0 14px rgba(56, 189, 248, 0.72), inset 0 0 10px rgba(56, 189, 248, 0.35);
  }
  50% {
    box-shadow: 0 0 0 2px rgba(253, 224, 71, 0.95), 0 0 22px rgba(56, 189, 248, 0.95), inset 0 0 14px rgba(253, 224, 71, 0.35);
  }
}
@keyframes cliffFlameBurst {
  0% { transform: scale(0.88); filter: brightness(1.6); }
  100% { transform: scale(1); filter: brightness(1.06); }
}
@keyframes cliffHandBounce {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-3px, -4px) scale(0.92); }
}
@keyframes cliffShardFloat {
  0%, 100% { transform: translateY(0) rotate(-6deg); }
  50% { transform: translateY(-2.5px) rotate(-2deg); }
}

.astrolabe-cliffhanger-backdrop {
  position: absolute;
  inset: 0;
  z-index: 88;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: #090807;
  overflow: hidden;
}

.astrolabe-cliffhanger-backdrop.show {
  display: flex;
}

.astrolabe-cliffhanger-card {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 440px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  padding: 0 12px 12px;
  border-radius: 0;
  border: none;
  background:
    linear-gradient(180deg, rgba(10, 9, 8, 0) 0%, rgba(12, 10, 9, 0.78) 24%, rgba(14, 11, 10, 0.96) 42%, rgba(16, 11, 9, 0.94) 86%, rgba(28, 12, 9, 0.92) 100%);
  color: #f6ecd6;
  text-align: center;
}

.astrolabe-cliffhanger-card::-webkit-scrollbar {
  display: none;
}

/* Full-Bleed Top Zhuge Liang + Glowing Astrolabe CG Header */
.cliff-hero-banner {
  position: relative;
  margin: 0 -12px;
  height: 168px;
  overflow: hidden;
  background: #100c08;
}

.cliff-hero-banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  display: block;
}

.cliff-hero-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(8, 7, 6, 0.1) 0%, rgba(10, 8, 7, 0.06) 46%, rgba(14, 11, 9, 0.88) 88%, #100d0b 100%);
  pointer-events: none;
}

/* Floating Gold Calligraphy Title overlapping bottom of hero art */
.cliff-title-stack {
  position: relative;
  z-index: 4;
  margin-top: -46px;
  margin-bottom: 3px;
}

.cliff-main-callig {
  margin: 0;
  font-family: "Ma Shan Zheng", "Noto Serif SC", Georgia, serif;
  font-size: 1.48rem;
  font-weight: 900;
  line-height: 1.14;
  letter-spacing: 0.06em;
  background: linear-gradient(180deg, #fffbe6 0%, #f8d684 44%, #c98a2c 88%, #8f5710 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 3px 10px rgba(0, 0, 0, 0.95)) drop-shadow(0 0 18px rgba(245, 180, 66, 0.45));
}

/* Crimson-Gold Shard Ribbon centered on top edge of obsidian frame */
.cliff-ribbon-pill {
  position: relative;
  z-index: 6;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 2px auto -13px;
  padding: 4px 20px;
  border-radius: 6px;
  background: linear-gradient(180deg, #8e1e18 0%, #5a0f0c 58%, #3c0907 100%);
  border: 1.5px solid #e7bf72;
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.8),
    inset 0 1px 0 rgba(255, 238, 194, 0.55),
    0 0 18px rgba(208, 60, 36, 0.35);
  font-family: "Noto Serif SC", Georgia, serif;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.07em;
  color: #fff3d2;
}

.cliff-ribbon-pill::before,
.cliff-ribbon-pill::after {
  content: "◆";
  font-size: 0.5rem;
  color: #f3ce7f;
  opacity: 0.9;
}

/* Main Obsidian Filigree Panel */
.cliff-obsidian-panel {
  position: relative;
  z-index: 3;
  padding: 19px 10px 9px;
  border-radius: 12px;
  border: 1.5px solid rgba(226, 186, 112, 0.72);
  background:
    radial-gradient(ellipse at 50% 0%, rgba(212, 165, 74, 0.14) 0%, transparent 45%),
    linear-gradient(180deg, rgba(24, 20, 17, 0.96) 0%, rgba(16, 14, 13, 0.98) 100%);
  box-shadow:
    0 16px 36px rgba(0, 0, 0, 0.82),
    inset 0 0 0 1px rgba(255, 238, 196, 0.1);
}

.cliff-source-subtitle {
  margin: 0 0 8px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #d8c8ad;
  letter-spacing: 0.04em;
}

/* Rule Preview Strip ("◆ 预知卷贰新法则 ◆") */
.cliff-rules-box {
  position: relative;
  margin-bottom: 8px;
  padding: 11px 7px 7px;
  border-radius: 9px;
  border: 1px solid rgba(214, 174, 102, 0.38);
  background: linear-gradient(180deg, rgba(32, 26, 20, 0.85) 0%, rgba(20, 17, 14, 0.92) 100%);
}

.cliff-rules-heading {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  padding: 0 9px;
  background: #171310;
  font-family: "Noto Serif SC", Georgia, serif;
  font-size: 0.69rem;
  font-weight: 800;
  color: #e8c47a;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.cliff-rules-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.cliff-rule-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 6px;
  border-radius: 7px;
  background: rgba(14, 12, 10, 0.72);
  border: 1px solid rgba(226, 186, 112, 0.25);
  text-align: left;
}

.cliff-rule-icon-box {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border-radius: 6px;
  border: 1px solid rgba(242, 198, 112, 0.65);
  background: radial-gradient(circle at 50% 45%, rgba(245, 168, 52, 0.32), rgba(20, 14, 10, 0.95));
  box-shadow: 0 0 10px rgba(245, 168, 52, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.cliff-rule-icon-box img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.cliff-rule-copy strong {
  display: block;
  font-size: 0.73rem;
  font-weight: 800;
  color: #f8e5bd;
  line-height: 1.18;
}

.cliff-rule-copy small {
  display: block;
  margin-top: 1px;
  font-size: 0.59rem;
  color: #afa28d;
  line-height: 1.18;
}

/* Golden-Framed Interactive Step ① -> Step ② Sandtable Section */
.cliff-sandtable-tray {
  position: relative;
  padding: 8px 8px 8px;
  border-radius: 10px;
  border: 1.5px solid rgba(228, 186, 108, 0.62);
  background:
    radial-gradient(ellipse at 50% 60%, rgba(212, 134, 48, 0.12) 0%, transparent 65%),
    linear-gradient(180deg, rgba(22, 19, 16, 0.94) 0%, rgba(14, 12, 11, 0.98) 100%);
  box-shadow: inset 0 0 22px rgba(0, 0, 0, 0.78);
}

.cliff-steps-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  margin-bottom: 7px;
}

.cliff-step-pill {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 6px;
  border-radius: 7px;
  border: 1px solid rgba(186, 158, 110, 0.24);
  background: rgba(14, 12, 10, 0.65);
  text-align: left;
  opacity: 0.58;
  transition: all 0.2s ease;
}

.cliff-step-pill.active {
  opacity: 1;
  border-color: rgba(246, 206, 122, 0.78);
  background: linear-gradient(135deg, rgba(138, 42, 22, 0.36), rgba(32, 24, 16, 0.9));
  box-shadow: 0 0 12px rgba(235, 168, 66, 0.25);
}

.cliff-step-pill.done {
  opacity: 0.95;
  border-color: rgba(134, 239, 172, 0.5);
  background: rgba(20, 44, 30, 0.45);
}

.cliff-step-num {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #f59e0b, #9a3412);
  border: 1px solid #fde68a;
  color: #fffbeb;
  font-size: 0.64rem;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cliff-step-pill.done .cliff-step-num {
  background: radial-gradient(circle at 35% 30%, #4ade80, #166534);
  border-color: #bbf7d0;
}

.cliff-step-text b {
  display: block;
  font-size: 0.67rem;
  color: #fae5b8;
  line-height: 1.15;
}

.cliff-step-text span {
  display: block;
  font-size: 0.54rem;
  color: #b7aa94;
  line-height: 1.18;
}

.cliff-step-arrow {
  color: #e6ba64;
  font-size: 0.8rem;
  font-weight: 900;
  flex: 0 0 auto;
}

/* 3x4 Living Sandtable Grid */
.cliff-mini-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  margin: 0 auto;
  max-width: 266px;
}

.cliff-mini-tile {
  position: relative;
  aspect-ratio: 1 / 1;
  padding: 0;
  border-radius: 7px;
  border: 1.5px solid rgba(164, 146, 116, 0.3);
  background: #1b1815;
  color: #f8f1df;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.cliff-tile-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
  filter: brightness(0.68) contrast(1.06);
  pointer-events: none;
}

.cliff-tile-fog-txt {
  position: relative;
  z-index: 2;
  font-size: 0.62rem;
  font-weight: 700;
  color: rgba(206, 198, 184, 0.44);
  letter-spacing: 0.06em;
  pointer-events: none;
}

.cliff-tile-sprite {
  position: relative;
  z-index: 2;
  width: 78%;
  height: 78%;
  object-fit: contain;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.9));
  pointer-events: none;
}

.cliff-mini-tile.revealed {
  border-color: rgba(218, 178, 108, 0.48);
}

.cliff-mini-tile.target-glow {
  border-color: #7dd3fc;
  animation: cliffTargetHalo 1.2s ease-in-out infinite;
  z-index: 3;
}

.cliff-mini-tile.shifted-flash {
  border-color: #fde047;
  box-shadow: 0 0 18px rgba(251, 146, 60, 0.85), inset 0 0 14px rgba(251, 146, 60, 0.45);
  animation: cliffFlameBurst 0.36s ease-out;
}

.cliff-mini-tile.chained-row {
  border-color: rgba(249, 115, 22, 0.85);
  box-shadow: inset 0 0 14px rgba(220, 38, 38, 0.42);
}

.cliff-mini-tile.chained-row.fire-active {
  border-color: #fde047;
  box-shadow: 0 0 18px rgba(249, 115, 22, 0.92), inset 0 0 18px rgba(234, 88, 12, 0.65);
}

.cliff-mini-tile.chained-row.fire-active::after {
  content: "";
  position: absolute;
  left: -6px;
  right: -6px;
  top: 52%;
  height: 4px;
  z-index: 4;
  background: repeating-linear-gradient(90deg, #fef08a 0 6px, #ea580c 6px 10px);
  box-shadow: 0 0 12px #f97316, 0 0 6px #fef08a;
  pointer-events: none;
}

.cliff-mini-tile.portal-node {
  border-color: rgba(167, 139, 250, 0.92);
  box-shadow: 0 0 14px rgba(139, 92, 246, 0.6), inset 0 0 12px rgba(56, 189, 248, 0.4);
}

.cliff-mini-tile.quadrant-key-pulse {
  border-color: #fde047;
  box-shadow: 0 0 16px rgba(253, 224, 71, 0.78), inset 0 0 14px rgba(250, 204, 21, 0.38);
}

.cliff-tile-caption {
  position: absolute;
  left: 2px;
  right: 2px;
  bottom: 2px;
  z-index: 4;
  padding: 1px 2px;
  border-radius: 3px;
  background: rgba(10, 9, 8, 0.84);
  font-size: 0.54rem;
  font-weight: 800;
  color: #fef3c7;
  line-height: 1.15;
  white-space: nowrap;
}

.cliff-tile-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  z-index: 5;
  padding: 1px 4px;
  border-radius: 4px;
  font-size: 0.5rem;
  font-weight: 900;
  line-height: 1.15;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.75);
}

.cliff-tile-badge.badge-shift { background: linear-gradient(180deg, #0284c7, #0c4a6e); border: 1px solid #7dd3fc; color: #f0f9ff; }
.cliff-tile-badge.badge-hp { background: linear-gradient(180deg, #b91c1c, #7f1d1d); border: 1px solid #fca5a5; color: #fff5f5; }
.cliff-tile-badge.badge-fire { background: linear-gradient(180deg, #ea580c, #9a3412); border: 1px solid #fde047; color: #fffbeb; }
.cliff-tile-badge.badge-tap { background: linear-gradient(180deg, #facc15, #b45309); border: 1px solid #fef9c3; color: #1c1204; }

.cliff-tap-hand {
  position: absolute;
  right: 2px;
  bottom: 11px;
  z-index: 6;
  font-size: 0.94rem;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.9));
  animation: cliffHandBounce 0.9s ease-in-out infinite;
  pointer-events: none;
}

.cliff-result-stamp {
  margin-top: 5px;
  font-family: "Ma Shan Zheng", "Noto Serif SC", Georgia, serif;
  font-size: 0.96rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: #fde047;
  text-shadow: 0 0 12px rgba(234, 88, 12, 0.95), 0 2px 6px rgba(0, 0, 0, 0.95);
}

/* Floating Cloud-Scroll Permanent Blessing Plaque */
.cliff-blessing-box {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 8px 0 9px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1.5px solid rgba(232, 190, 108, 0.68);
  background:
    radial-gradient(ellipse at 14% 50%, rgba(245, 190, 74, 0.26) 0%, transparent 45%),
    linear-gradient(135deg, rgba(36, 26, 16, 0.96) 0%, rgba(20, 16, 13, 0.98) 100%);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.72), inset 0 1px 0 rgba(255, 240, 192, 0.2);
  text-align: left;
}

.cliff-shard-talisman {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 8px;
  background: linear-gradient(145deg, #fff5c8 0%, #eab346 42%, #8e5612 100%);
  border: 1.5px solid #fff7d6;
  box-shadow: 0 0 16px rgba(246, 196, 78, 0.75), inset 0 1px 2px rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Noto Serif SC", Georgia, serif;
  font-size: 1rem;
  font-weight: 900;
  color: #361c04;
  animation: cliffShardFloat 3s ease-in-out infinite;
}

.cliff-blessing-head {
  font-family: "Noto Serif SC", Georgia, serif;
  font-size: 0.75rem;
  font-weight: 900;
  color: #fae09e;
  margin-bottom: 1px;
  letter-spacing: 0.03em;
}

.cliff-blessing-desc {
  font-size: 0.64rem;
  line-height: 1.35;
  color: #d6c8b0;
}

/* Sculpted Pointed-Tip Crimson-Gold CTA Button */
.cliff-cta-btn {
  position: relative;
  z-index: 3;
  width: 92%;
  min-height: 44px;
  margin: 0 auto;
  padding: 8px 18px;
  border-radius: 22px;
  border: 1.5px solid #f4ce7c;
  background:
    radial-gradient(ellipse at 50% 100%, rgba(251, 146, 60, 0.45) 0%, transparent 65%),
    linear-gradient(180deg, #b8291d 0%, #7f1410 55%, #4d0a08 100%);
  color: #fff6dc;
  font-family: "Noto Serif SC", Georgia, serif;
  font-size: 0.9rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  cursor: pointer;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow:
    0 10px 26px rgba(176, 32, 22, 0.65),
    0 0 18px rgba(246, 198, 92, 0.36),
    inset 0 1px 0 rgba(255, 244, 206, 0.65);
  transition: transform 0.14s ease, filter 0.16s ease, box-shadow 0.2s ease;
}

.cliff-cta-btn .cliff-cta-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
  mix-blend-mode: screen;
  pointer-events: none;
}

.cliff-cta-btn span {
  position: relative;
  z-index: 2;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.85);
}

.cliff-cta-btn:not(:disabled):hover {
  transform: translateY(-1px) scale(1.01);
  filter: brightness(1.08);
}

.cliff-cta-btn:disabled {
  border-color: rgba(186, 162, 122, 0.42);
  background: linear-gradient(180deg, #2b241e 0%, #1a1613 100%);
  color: #a89b86;
  font-size: 0.82rem;
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.7);
  cursor: not-allowed;
}

.cliff-cta-btn:disabled .cliff-cta-art {
  display: none;
}








/* ==================== AAA DARK-GOLD CG MAIN LOBBY & DRAWERS ==================== */
.game-device {
  min-height: 764px;
  border-color: rgba(224, 186, 118, 0.44);
  box-shadow:
    0 28px 68px rgba(0, 0, 0, 0.86),
    0 0 0 1px rgba(255, 236, 190, 0.08),
    inset 0 1px 0 rgba(255, 246, 220, 0.14);
}

#hubScreen.hub-screen {
  position: relative;
  min-height: 762px;
  background: #0e1015;
  justify-content: space-between;
  overflow: hidden;
  padding: 0;
}

/* Full-Bleed 9:16 Cross-Fading CG Key Art Stage */
.hub-cg-stage {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: #0d1016;
}

.hub-cg-layer {
  position: absolute;
  inset: -1.5%;
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  opacity: 0;
  transform: scale(1.035);
  transition: opacity 0.52s cubic-bezier(0.22, 1, 0.36, 1), transform 5.5s ease-out;
  will-change: opacity, transform;
}

.hub-cg-layer.active {
  opacity: 1;
  transform: scale(1);
}

/* Precision Scrim: preserves hero face/astrolabe & bottom peach-blossom valley while giving middle cards deep contrast */
.hub-cg-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      180deg,
      rgba(8, 10, 15, 0.52) 0%,
      rgba(10, 12, 18, 0.08) 12%,
      rgba(10, 13, 20, 0.04) 38%,
      rgba(12, 15, 22, 0.56) 52%,
      rgba(13, 16, 23, 0.66) 71%,
      rgba(12, 14, 20, 0.18) 84%,
      rgba(8, 10, 15, 0.72) 100%
    ),
    radial-gradient(circle at 82% 18%, rgba(255, 214, 132, 0.12) 0%, transparent 42%);
}

/* Subtle Floating Battlefield Embers & Peach Petals */
.hub-ember-particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hub-ember-particles span {
  position: absolute;
  bottom: 12%;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff3c4 0%, #f59e0b 65%, transparent 100%);
  box-shadow: 0 0 6px rgba(251, 191, 36, 0.85);
  opacity: 0;
  animation: hubEmberRise 6.8s linear infinite;
}

.hub-ember-particles span:nth-child(1) { left: 14%; animation-delay: 0s; animation-duration: 6.2s; }
.hub-ember-particles span:nth-child(2) { left: 28%; animation-delay: 1.4s; animation-duration: 7.4s; width: 4px; height: 4px; }
.hub-ember-particles span:nth-child(3) { left: 46%; animation-delay: 2.7s; animation-duration: 5.9s; }
.hub-ember-particles span:nth-child(4) { left: 64%; animation-delay: 0.8s; animation-duration: 6.9s; }
.hub-ember-particles span:nth-child(5) { left: 81%; animation-delay: 3.3s; animation-duration: 7.2s; }
.hub-ember-particles span:nth-child(6) { left: 9%; bottom: 8%; width: 5px; height: 3px; background: #fda4af; box-shadow: 0 0 4px rgba(251, 113, 133, 0.55); animation-delay: 1.9s; animation-duration: 8.2s; }
.hub-ember-particles span:nth-child(7) { left: 73%; animation-delay: 4.1s; animation-duration: 6.4s; }
.hub-ember-particles span:nth-child(8) { left: 37%; animation-delay: 5.0s; animation-duration: 7.6s; }

@keyframes hubEmberRise {
  0% { transform: translate(0, 0) scale(0.7); opacity: 0; }
  18% { opacity: 0.82; }
  75% { opacity: 0.45; }
  100% { transform: translate(22px, -280px) scale(0.25); opacity: 0; }
}

/* ==================== TOP SOVEREIGN BAR ==================== */
.hub-top-hud {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
  padding: 10px 10px 0;
}

.hub-lord-cluster {
  background: none;
  border: none;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  color: inherit;
  flex-shrink: 0;
  text-align: left;
}

.hub-lord-avatar-ring {
  position: relative;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.72), 0 0 12px rgba(232, 188, 106, 0.28);
}

.hub-lord-avatar-ring img {
  width: 44px;
  height: 44px;
  margin: 3px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.lord-dragon-bezel {
  position: absolute;
  inset: -3px;
  width: 56px;
  height: 56px;
  pointer-events: none;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.85));
}

.hub-lord-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 68px;
}

.hub-lord-name {
  font-family: var(--font-serif);
  font-size: 0.78rem;
  font-weight: 700;
  color: #f7efe0;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.95);
  white-space: nowrap;
}

.hub-lord-name span {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.75rem;
  color: #ffe7b3;
}

.hub-lord-xp-track {
  width: 68px;
  height: 5px;
  border-radius: 999px;
  background: rgba(12, 13, 18, 0.82);
  border: 1px solid rgba(222, 184, 114, 0.45);
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.9);
}

.hub-lord-xp-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #b87c2a 0%, #f6ce76 65%, #fff5d6 100%);
  box-shadow: 0 0 6px rgba(246, 206, 118, 0.75);
}

.hub-top-right-col {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 7px;
  min-width: 0;
  flex: 1;
}

.hub-res-pills-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  flex-wrap: nowrap;
}

.hub-res-pill {
  height: 24px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 4px 0 6px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(20, 22, 29, 0.82) 0%, rgba(11, 13, 18, 0.88) 100%);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(221, 185, 118, 0.46);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 245, 214, 0.12);
  color: #f6eedc;
  font-size: 0.71rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.16s ease, transform 0.12s ease;
}

.hub-res-pill:hover {
  border-color: #f3ce82;
  transform: translateY(-1px);
}

.hub-res-pill .res-svg-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.7));
}

.hub-res-pill .stam-pill-prefix {
  font-weight: 600;
  font-size: 0.66rem;
  color: #dfd4be;
}

.hub-res-plus {
  font-style: normal;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  color: #f5d38c;
  background: radial-gradient(circle, rgba(218, 172, 88, 0.28) 0%, rgba(45, 34, 18, 0.72) 100%);
  border: 1px solid rgba(232, 193, 120, 0.52);
}

/* 3 Horizontal Smoked-Glass Circular Gold Icon Buttons */
.hub-quick-icons-row {
  display: flex;
  align-items: center;
  gap: 7px;
  padding-right: 2px;
}

.hub-round-btn {
  width: 37px;
  height: 37px;
  border-radius: 50%;
  padding: 2px 0 1px;
  background: radial-gradient(circle at 50% 25%, rgba(44, 42, 38, 0.84) 0%, rgba(15, 16, 21, 0.92) 100%);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(222, 185, 118, 0.48);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.62), inset 0 1px 0 rgba(255, 242, 204, 0.16);
  color: #ebd094;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  cursor: pointer;
  transition: transform 0.14s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.hub-round-btn:hover {
  transform: translateY(-1px);
  border-color: #ffe29e;
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.72), 0 0 10px rgba(238, 195, 110, 0.34);
}

.hub-round-btn svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.hub-round-btn span {
  font-size: 0.53rem;
  font-weight: 600;
  line-height: 1.05;
  color: #e6dac3;
  letter-spacing: 0.02em;
}

.hub-round-btn.muted-sfx {
  opacity: 0.68;
}

/* ==================== MASTER CALLIGRAPHY EMBLEM ==================== */
.hub-hero-stage-spacer {
  position: relative;
  z-index: 4;
  flex: 1 1 auto;
  min-height: 196px;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 0 12px 10px;
  pointer-events: none;
}

.hub-master-logo {
  pointer-events: auto;
  background: none;
  border: none;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transform: translateY(-12px);
  transition: transform 0.2s ease, filter 0.2s ease;
}

.hub-master-logo:hover {
  transform: translateY(-14px) scale(1.02);
  filter: brightness(1.08);
}

.hub-cinnabar-seal {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 22px;
  padding: 3px 2px;
  border-radius: 5px;
  background: linear-gradient(180deg, #b92d22 0%, #7d1710 100%);
  border: 1px solid rgba(248, 206, 156, 0.65);
  box-shadow:
    0 3px 10px rgba(0, 0, 0, 0.75),
    inset 0 0 0 1px rgba(120, 20, 14, 0.8);
  color: #f9ebd2;
  font-family: "Noto Serif SC", var(--font-serif);
  font-size: 0.68rem;
  line-height: 1.08;
}

.hub-cinnabar-seal b {
  display: block;
  font-weight: 900;
}

.hub-calligraphy-box {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hub-calligraphy-box h1 {
  margin: 0;
  font-family: "Ma Shan Zheng", "STKaiti", "Kaiti SC", "KaiTi", "Noto Serif SC", var(--font-serif);
  font-size: 3.05rem;
  font-weight: 400;
  line-height: 0.96;
  letter-spacing: 0.06em;
  color: #f4d38b;
  background: linear-gradient(180deg, #fff8dc 0%, #f3cf82 42%, #c99441 78%, #f7de9c 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter:
    drop-shadow(0 2px 0 rgba(58, 34, 8, 0.95))
    drop-shadow(0 6px 14px rgba(0, 0, 0, 0.88));
}

.hub-logo-clouds {
  width: 158px;
  height: 16px;
  margin-top: -2px;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.85));
}

/* ==================== LOWER COMMAND CONSOLE ==================== */
.hub-lower-console {
  position: relative;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 11px;
  padding: 0 12px 10px;
}

/* 4-Commander Arch Portrait Carousel */
.hub-carousel-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.hub-carousel-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 4px;
}

.hub-chevron-btn {
  width: 22px;
  height: 44px;
  padding: 0;
  background: none;
  border: none;
  color: #e4bf78;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.9));
  transition: transform 0.14s ease, color 0.14s ease;
}

.hub-chevron-btn:hover {
  color: #fff1c2;
  transform: scale(1.14);
}

.hub-chevron-btn svg {
  width: 15px;
  height: 24px;
}

.hero-arch-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  align-items: center;
}

.hero-arch-card {
  position: relative;
  height: 96px;
  border-radius: 36px 36px 13px 13px;
  overflow: hidden;
  background: #14171f;
  border: 1.2px solid rgba(196, 160, 98, 0.52);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.68), inset 0 1px 0 rgba(255, 240, 200, 0.18);
  cursor: pointer;
  padding: 0;
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.2s ease, box-shadow 0.2s ease;
}

.hero-arch-card:hover {
  transform: translateY(-2px);
  border-color: rgba(242, 205, 132, 0.82);
}

.hero-arch-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 14%;
  display: block;
  transition: transform 0.28s ease, filter 0.22s ease;
}

.hero-arch-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 12, 18, 0.04) 42%, rgba(10, 11, 15, 0.86) 100%);
  pointer-events: none;
}

.hero-arch-card.selected {
  transform: translateY(-3px) scale(1.06);
  border: 1.8px solid #ffe6a3;
  box-shadow:
    0 0 16px rgba(255, 192, 76, 0.82),
    0 0 30px rgba(234, 132, 28, 0.45),
    0 8px 20px rgba(0, 0, 0, 0.78),
    inset 0 0 14px rgba(255, 224, 138, 0.42);
  z-index: 2;
}

.hero-arch-card.selected::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(125deg, transparent 25%, rgba(255, 244, 204, 0.28) 50%, transparent 75%);
  background-size: 220% 220%;
  animation: cgGoldSweep 3.2s ease-in-out infinite;
  z-index: 2;
  pointer-events: none;
}

@keyframes cgGoldSweep {
  0%, 100% { background-position: 0% 0%; }
  50% { background-position: 100% 100%; }
}

.hero-arch-card.locked img {
  filter: saturate(0.55) brightness(0.76);
}

.hero-arch-name {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 5px;
  z-index: 3;
  text-align: center;
  font-family: "Noto Serif SC", var(--font-serif);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #f3ead8;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.96);
}

.hero-arch-card.selected .hero-arch-name {
  color: #fff6dc;
  text-shadow: 0 0 8px rgba(255, 198, 88, 0.75), 0 1px 4px rgba(0, 0, 0, 0.98);
}

.hero-arch-tag {
  position: absolute;
  top: 5px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  font-size: 0.52rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 999px;
  background: rgba(15, 16, 22, 0.82);
  border: 1px solid rgba(235, 192, 112, 0.55);
  color: #f6d58e;
  white-space: nowrap;
}

.hero-arch-card.binder-more-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: radial-gradient(circle at 50% 35%, rgba(62, 48, 28, 0.75) 0%, rgba(16, 18, 24, 0.94) 100%);
}

.hero-arch-card.binder-more-card::after {
  display: none;
}

.hero-arch-card.binder-more-card b {
  font-family: "Noto Serif SC", var(--font-serif);
  font-size: 0.78rem;
  color: #f3d28d;
}

.hero-arch-card.binder-more-card small {
  font-size: 0.58rem;
  color: #b7ab96;
}

.hub-carousel-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.hub-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  padding: 0;
  border: none;
  background: rgba(214, 198, 172, 0.34);
  cursor: pointer;
  transition: transform 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.hub-dot.active {
  background: #f5d287;
  transform: scale(1.22);
  box-shadow: 0 0 6px rgba(245, 210, 135, 0.8);
}

/* ==================== 3 CHAMFERED DARK-GOLD FEATURE CARDS ==================== */
.hub-trio-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.hub-feature-card {
  position: relative;
  height: 118px;
  padding: 0;
  border: 1px solid rgba(218, 181, 114, 0.56);
  border-radius: 10px;
  /* Subtle beveled corners visual feel with inner gold rim & warm bronze bottom glow */
  background: #14161d;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  box-shadow:
    0 10px 22px rgba(0, 0, 0, 0.68),
    inset 0 1px 0 rgba(255, 244, 210, 0.26),
    inset 0 -18px 26px rgba(196, 138, 56, 0.2);
  transition: transform 0.16s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

/* Chamfered gilded corner ticks inside each card */
.hub-feature-card::before {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 7px;
  border: 1px solid rgba(238, 204, 140, 0.18);
  pointer-events: none;
  z-index: 3;
}

.hub-feature-card:hover {
  transform: translateY(-2px);
  border-color: #f8da94;
  box-shadow:
    0 12px 26px rgba(0, 0, 0, 0.78),
    0 0 14px rgba(232, 184, 96, 0.28),
    inset 0 -22px 28px rgba(218, 158, 68, 0.3);
}

.hub-feature-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 78%;
  object-fit: cover;
  object-position: center 32%;
  transition: transform 0.32s ease;
}

.hub-feature-card:hover img {
  transform: scale(1.05);
}

.hub-fcard-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      180deg,
      rgba(14, 16, 22, 0.02) 0%,
      rgba(16, 17, 22, 0.28) 46%,
      rgba(22, 19, 17, 0.92) 72%,
      rgba(34, 26, 18, 0.97) 100%
    );
  z-index: 1;
}

.hub-fcard-copy {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 6px 9px;
  gap: 2px;
}

.hub-fcard-copy strong {
  font-family: "Noto Serif SC", var(--font-serif);
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #f6eedc;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.92);
}

.hub-fcard-copy small {
  font-size: 0.62rem;
  color: #b7aa92;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

/* 3D Glossy Ruby Notification Jewel */
.cg-ruby-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffb4b8 0%, #ef233c 48%, #800f1d 100%);
  border: 1px solid rgba(255, 228, 180, 0.72);
  box-shadow: 0 0 8px rgba(239, 35, 60, 0.85);
  z-index: 4;
}

.cg-ruby-dot[hidden] {
  display: none !important;
}

/* ==================== SLEEK CLOUD-WING RUBY EXPEDITION CTA ==================== */
.hub-expedition-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 2px 0 2px;
}

.hub-world-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 11px;
  border-radius: 999px;
  background: rgba(14, 16, 22, 0.72);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(224, 186, 118, 0.44);
  color: #efe4ce;
  font-size: 0.68rem;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.55);
  transition: border-color 0.16s ease, background 0.16s ease;
}

.hub-world-chip:hover {
  background: rgba(28, 25, 22, 0.86);
  border-color: #f7d68c;
}

.hub-world-chip .hwc-prefix {
  font-size: 0.58rem;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(186, 54, 38, 0.65);
  border: 1px solid rgba(248, 196, 152, 0.45);
  color: #fdebd2;
}

.hub-world-chip b {
  font-family: "Noto Serif SC", var(--font-serif);
  font-weight: 700;
  color: #fae6b8;
  letter-spacing: 0.04em;
}

.hub-world-chip .hwc-caret {
  font-style: normal;
  font-size: 0.62rem;
  color: #d8b574;
}

.cg-cta-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 0;
}

.cg-expedition-btn {
  position: relative;
  width: 244px;
  height: 54px;
  border-radius: 999px;
  border: 1.5px solid #f4cf82;
  background:
    radial-gradient(ellipse at 50% 92%, rgba(255, 154, 62, 0.58) 0%, rgba(188, 38, 24, 0.92) 46%, rgba(92, 15, 12, 0.97) 100%);
  box-shadow:
    0 10px 26px rgba(0, 0, 0, 0.8),
    0 0 22px rgba(235, 118, 42, 0.42),
    inset 0 2px 5px rgba(255, 232, 190, 0.42),
    inset 0 -3px 10px rgba(255, 166, 72, 0.48);
  color: #f9e4b2;
  font-family: "Noto Serif SC", var(--font-serif);
  font-size: 1.32rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  cursor: pointer;
  padding: 0 22px;
  transition: transform 0.14s ease, filter 0.16s ease, box-shadow 0.16s ease;
}

.cg-expedition-btn:hover:not(:disabled) {
  transform: translateY(-1px) scale(1.015);
  filter: brightness(1.07);
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.85),
    0 0 28px rgba(248, 154, 62, 0.6),
    inset 0 2px 6px rgba(255, 240, 200, 0.55);
}

.cg-expedition-btn:active:not(:disabled) {
  transform: translateY(1px) scale(0.99);
}

.cg-expedition-btn:disabled {
  filter: grayscale(0.65) brightness(0.75);
  cursor: not-allowed;
}

.cg-expedition-btn .cta-wing-svg {
  position: absolute;
  inset: -7px -18px;
  width: calc(100% + 36px);
  height: calc(100% + 14px);
  pointer-events: none;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.78));
}

.cg-expedition-btn .cta-swords-svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 4px rgba(62, 10, 6, 0.85));
}

.cg-expedition-btn .cta-label-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.05;
}

.cg-expedition-btn .cta-sub-caption {
  font-family: var(--font-sans);
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #ffe3b8;
  margin-top: 2px;
}

.cg-reset-run-pill {
  height: 36px;
  padding: 0 11px;
  border-radius: 999px;
  background: rgba(18, 20, 26, 0.84);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(218, 180, 112, 0.46);
  color: #e6cfa0;
  font-family: "Noto Serif SC", var(--font-serif);
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.65);
}

.cg-reset-run-pill:hover {
  border-color: #f7d68c;
  color: #fff3d1;
}

/* ==================== SMOKED-OBSIDIAN BOTTOM DOCK ==================== */
.hub-bottom-dock {
  position: relative;
  z-index: 6;
  height: 62px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: linear-gradient(180deg, rgba(18, 20, 26, 0.88) 0%, rgba(10, 11, 15, 0.97) 100%);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(224, 186, 118, 0.45);
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.65);
}

.hub-dock-tab {
  position: relative;
  background: none;
  border: none;
  padding: 6px 4px 5px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: #bfb299;
  cursor: pointer;
  transition: color 0.16s ease, background 0.16s ease;
}

.hub-dock-tab + .hub-dock-tab::before {
  content: "";
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(218, 184, 122, 0.22), transparent);
}

.hub-dock-tab:hover {
  color: #f5dfb0;
}

.hub-dock-tab.active {
  color: #ffe39f;
  background: radial-gradient(ellipse at 50% 0%, rgba(242, 188, 88, 0.24) 0%, transparent 72%);
}

.hub-dock-flare {
  position: absolute;
  top: -5px;
  left: 14%;
  right: 14%;
  height: 6px;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 70%, #fff6d1 0%, #f3be5e 48%, transparent 78%);
  filter: drop-shadow(0 0 6px rgba(255, 204, 96, 0.9));
}

.hub-dock-tab .dock-svg {
  width: 24px;
  height: 24px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.75));
}

.hub-dock-tab.active .dock-svg {
  filter: drop-shadow(0 0 8px rgba(251, 198, 92, 0.65));
}

.hub-dock-tab span {
  font-family: "Noto Serif SC", var(--font-serif);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.hub-dock-tab .dock-dot {
  top: 7px;
  right: 26%;
}

/* ==================== DARK-GOLD CG MODALS (征程 / 阵法 / 任务 / 背包) ==================== */
.modal-card {
  background:
    radial-gradient(circle at 50% 0%, rgba(218, 174, 94, 0.12) 0%, transparent 55%),
    linear-gradient(180deg, #1b1d25 0%, #12141a 100%);
  border: 1px solid rgba(224, 186, 118, 0.52);
  box-shadow:
    0 24px 56px rgba(0, 0, 0, 0.88),
    inset 0 1px 0 rgba(255, 244, 212, 0.16);
}

.cg-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 9px;
  margin-bottom: 10px;
  border-bottom: 1px solid rgba(224, 186, 118, 0.24);
}

.cg-drawer-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cg-drawer-title h3 {
  margin: 0;
  font-family: "Noto Serif SC", var(--font-serif);
  font-size: 1.04rem;
  color: #f8e5b8;
  letter-spacing: 0.06em;
}

.cg-campaign-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 9px;
  max-height: 450px;
  overflow-y: auto;
  padding-right: 2px;
}

.cg-camp-card {
  position: relative;
  height: 78px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(206, 168, 102, 0.42);
  background: #14161e;
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 0 14px;
  text-align: left;
  transition: transform 0.15s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.cg-camp-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  transition: transform 0.3s ease;
}

.cg-camp-card:hover:not(.locked) img {
  transform: scale(1.04);
}

.cg-camp-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(11, 13, 18, 0.94) 0%, rgba(14, 16, 22, 0.72) 48%, rgba(14, 16, 22, 0.18) 100%);
}

.cg-camp-card.selected {
  border: 1.6px solid #ffe299;
  box-shadow: 0 0 16px rgba(246, 190, 82, 0.48), inset 0 0 12px rgba(255, 216, 128, 0.22);
}

.cg-camp-card.locked {
  opacity: 0.56;
  cursor: not-allowed;
}

.cg-camp-card.locked img {
  filter: grayscale(0.75) brightness(0.65);
}

.cg-camp-info {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.cg-camp-title-row {
  display: flex;
  align-items: center;
  gap: 7px;
}

.cg-camp-num {
  font-size: 0.62rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(212, 166, 86, 0.22);
  border: 1px solid rgba(235, 195, 118, 0.52);
  color: #f9dfa2;
}

.cg-camp-title-row strong {
  font-family: "Noto Serif SC", var(--font-serif);
  font-size: 0.96rem;
  color: #f8efe0;
  letter-spacing: 0.05em;
}

.cg-camp-sub {
  font-size: 0.68rem;
  color: #c7baa3;
}

.cg-camp-badge {
  position: absolute;
  top: 7px;
  right: 9px;
  z-index: 2;
  font-size: 0.58rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(18, 20, 26, 0.84);
  border: 1px solid rgba(232, 190, 112, 0.55);
  color: #f7d996;
}

.cg-camp-badge.cleared {
  border-color: rgba(110, 231, 183, 0.55);
  color: #a7f3d0;
}

/* Zhenfa Tactical Drawer */
.cg-zhenfa-hero-card {
  display: flex;
  gap: 11px;
  align-items: center;
  padding: 10px;
  border-radius: 11px;
  background: linear-gradient(135deg, rgba(34, 30, 25, 0.9) 0%, rgba(18, 20, 27, 0.95) 100%);
  border: 1px solid rgba(220, 182, 112, 0.38);
  margin-bottom: 10px;
}

.cg-zhenfa-hero-card > img {
  width: 68px;
  height: 82px;
  border-radius: 10px;
  object-fit: cover;
  object-position: center 15%;
  border: 1.5px solid #e5bd73;
  flex-shrink: 0;
}

.cg-zhenfa-hero-meta {
  flex: 1;
  min-width: 0;
}

.cg-zhenfa-hero-meta h4 {
  margin: 0 0 4px;
  font-family: "Noto Serif SC", var(--font-serif);
  font-size: 0.94rem;
  color: #fae5b6;
}

.cg-zhenfa-stats-row {
  display: flex;
  gap: 9px;
  font-size: 0.72rem;
  color: #bfb39d;
  margin-bottom: 5px;
}

.cg-zhenfa-stats-row b {
  color: #fff3d6;
  margin-left: 2px;
}

.cg-zhenfa-loadout-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.cg-skill-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}

.cg-skill-item {
  padding: 7px 10px;
  border-radius: 8px;
  background: rgba(15, 17, 23, 0.85);
  border: 1px solid rgba(214, 178, 112, 0.24);
}

.cg-skill-item.active-sk {
  border-color: rgba(245, 188, 86, 0.52);
  background: linear-gradient(90deg, rgba(54, 38, 18, 0.55) 0%, rgba(16, 18, 24, 0.88) 100%);
}

.cg-skill-item-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.76rem;
  font-weight: 700;
  color: #f7e3b5;
  margin-bottom: 2px;
}

.cg-skill-item p {
  margin: 0;
  font-size: 0.66rem;
  line-height: 1.38;
  color: #b8ac97;
}

.cg-quest-card,
.cg-relic-mini {
  padding: 9px 11px;
  border-radius: 9px;
  background: rgba(16, 18, 24, 0.86);
  border: 1px solid rgba(216, 180, 112, 0.3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.cg-quest-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.cg-bag-relics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  max-height: 280px;
  overflow-y: auto;
  margin-bottom: 12px;
}

.cg-relic-mini {
  justify-content: flex-start;
  padding: 7px 8px;
}

.cg-relic-mini img {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
}

.cg-relic-mini div {
  min-width: 0;
}

.cg-relic-mini b {
  display: block;
  font-size: 0.71rem;
  color: #f6e1b3;
}

.cg-relic-mini small {
  display: block;
  font-size: 0.58rem;
  color: #aca08c;
  line-height: 1.25;
}

/* ==================== V2 POLISH: 3D CALLIGRAPHY, SCULPTED RUBY CTA & PORTRAIT CLARITY ==================== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hub-master-logo {
  transform: translateY(-20px);
  gap: 4px;
}

.hub-master-logo:hover {
  transform: translateY(-22px) scale(1.02);
}

.hub-cinnabar-seal {
  margin-top: -10px;
}

.hub-callig-img {
  width: 184px;
  height: auto;
  display: block;
  filter: drop-shadow(0 5px 14px rgba(0, 0, 0, 0.9));
}

/* Override legacy .hero-pick-card.locked img 0.42 opacity so Guan Yu, Zhuge Liang & Lu Bu CG art shines richly */
.hero-arch-card.hero-pick-card img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  border-radius: 0 !important;
  opacity: 1 !important;
  filter: none !important;
}

.hero-arch-card.hero-pick-card.locked img {
  opacity: 0.94 !important;
  filter: saturate(0.9) brightness(0.88) contrast(1.04) !important;
}

.hero-arch-tag {
  top: 4px;
  right: 5px;
  left: auto;
  transform: none;
  font-size: 0.48rem;
  padding: 1px 4px;
  background: rgba(12, 14, 19, 0.76);
  border-color: rgba(232, 190, 112, 0.44);
}

.hub-feature-card img {
  height: 82%;
  filter: contrast(1.06) brightness(1.06);
}

/* 3D Sculpted Cloud-Wing Ruby Pill Button Shell */
.cg-expedition-btn {
  width: 262px;
  height: 76px;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 28px;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.82)) drop-shadow(0 0 18px rgba(238, 120, 42, 0.36));
}

.cg-expedition-btn:hover:not(:disabled) {
  transform: translateY(-1px) scale(1.02);
  box-shadow: none !important;
  filter: brightness(1.07) drop-shadow(0 10px 22px rgba(0, 0, 0, 0.88)) drop-shadow(0 0 24px rgba(250, 152, 56, 0.52));
}

.cg-expedition-btn .cta-bg-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  z-index: 0;
}

.cg-expedition-btn .cta-swords-svg,
.cg-expedition-btn > span,
.cg-expedition-btn .cta-label-wrap {
  position: relative;
  z-index: 2;
}

.cg-expedition-btn .cta-swords-svg {
  width: 26px;
  height: 26px;
  filter: drop-shadow(0 2px 4px rgba(48, 8, 4, 0.92));
}

.cg-expedition-btn > span,
.cg-expedition-btn .cta-label-wrap > span {
  text-shadow: 0 2px 6px rgba(45, 6, 4, 0.95), 0 0 10px rgba(255, 200, 108, 0.35);
}

/* ==================== PHASE 2: DARK-GOLD CG BATTLE HUD, ASTROLABE & CARD BINDER ==================== */
.dungeon-hud {
  background: linear-gradient(180deg, rgba(16, 18, 25, 0.94) 0%, rgba(11, 13, 18, 0.92) 100%);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(224, 186, 118, 0.4);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.65);
}

.hud-avatar-wrap {
  border-radius: 12px;
  border: 1.6px solid #e7c074;
  background: #12151d;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.7), 0 0 10px rgba(232, 188, 102, 0.25);
}

.hud-avatar-wrap img,
.speech-avatar-frame img,
.hero-cutin-portrait,
.foil-portrait-stage img,
.binder-card-art img {
  object-fit: cover !important;
  object-position: center 14% !important;
}

.stage-plaque-btn {
  background: linear-gradient(180deg, rgba(28, 26, 23, 0.9) 0%, rgba(15, 16, 22, 0.94) 100%);
  border: 1px solid rgba(222, 184, 114, 0.45);
  box-shadow: inset 0 1px 0 rgba(255, 244, 210, 0.14);
}

.speech-bar {
  background: linear-gradient(90deg, rgba(20, 22, 30, 0.94) 0%, rgba(14, 16, 22, 0.92) 100%);
  border: 1px solid rgba(218, 180, 112, 0.36);
  border-left: 3px solid #c93728;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.58);
}

/* Boss Showdown CG Stage */
.boss-showdown-stage {
  background:
    radial-gradient(circle at 22% 45%, rgba(212, 72, 38, 0.22) 0%, transparent 55%),
    linear-gradient(180deg, rgba(22, 18, 22, 0.95) 0%, rgba(13, 14, 19, 0.97) 100%) !important;
  border: 1px solid rgba(228, 186, 112, 0.48) !important;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.78), inset 0 1px 0 rgba(255, 240, 200, 0.16) !important;
}

.boss-giant-portrait {
  object-fit: cover !important;
  object-position: center 14% !important;
  border-radius: 12px;
  border: 1.5px solid rgba(242, 198, 116, 0.65);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.8);
}

/* Eight-Trigram Stone Board Dark-Gold Polish */
.dungeon-grid {
  background: rgba(14, 16, 22, 0.88);
  border: 1px solid rgba(220, 182, 112, 0.44);
  box-shadow:
    inset 0 2px 12px rgba(0, 0, 0, 0.84),
    0 14px 32px rgba(0, 0, 0, 0.72),
    0 0 0 1px rgba(255, 238, 196, 0.08);
}

.tile.revealed {
  background: radial-gradient(circle at 50% 42%, rgba(46, 48, 58, 0.45) 0%, rgba(16, 18, 24, 0.9) 100%);
  border-color: rgba(218, 182, 116, 0.2);
}

/* Tactical Command Order Bar & Mechanical 3-Reel Astrolabe */
.command-order-bar {
  background: linear-gradient(180deg, rgba(20, 22, 29, 0.92) 0%, rgba(12, 14, 19, 0.96) 100%) !important;
  border-top: 1px solid rgba(220, 182, 112, 0.34) !important;
  border-bottom: 1px solid rgba(220, 182, 112, 0.22) !important;
}

.cmd-skill-btn {
  background: linear-gradient(180deg, #9e271c 0%, #63130d 100%) !important;
  border: 1px solid rgba(246, 202, 132, 0.58) !important;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 236, 192, 0.3) !important;
}

.cmd-tactic-btn {
  background: linear-gradient(180deg, rgba(32, 31, 35, 0.95) 0%, rgba(16, 18, 24, 0.98) 100%) !important;
  border: 1px solid rgba(218, 180, 112, 0.4) !important;
}

.fate-slot-console {
  background: linear-gradient(180deg, rgba(18, 20, 27, 0.96) 0%, rgba(11, 13, 18, 0.98) 100%) !important;
  border-top: 1px solid rgba(222, 184, 114, 0.35) !important;
}

.slot-reels-frame {
  background: #0c0e13;
  border: 1px solid rgba(222, 184, 114, 0.46);
  box-shadow: inset 0 4px 10px rgba(0, 0, 0, 0.92), 0 0 12px rgba(218, 174, 92, 0.14);
}

.slot-reel-window {
  background: radial-gradient(circle at 50% 50%, #2b2722 0%, #171820 78%, #0e1015 100%);
  border: 1px solid rgba(216, 176, 102, 0.52);
  box-shadow:
    inset 0 6px 8px rgba(0, 0, 0, 0.72),
    inset 0 -6px 8px rgba(0, 0, 0, 0.72);
}

.spin-pull-btn {
  background: radial-gradient(ellipse at 50% 90%, rgba(255, 148, 58, 0.48) 0%, #a8261b 50%, #5e110c 100%);
  border: 1px solid #f0c978;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.72), inset 0 1px 0 rgba(255, 236, 190, 0.35);
}

.dungeon-dock {
  background: linear-gradient(180deg, rgba(16, 18, 24, 0.96) 0%, rgba(10, 11, 15, 0.99) 100%);
  border-top: 1px solid rgba(222, 184, 114, 0.34);
}

.spell-slot {
  background: rgba(14, 16, 22, 0.92);
  border-color: rgba(214, 178, 112, 0.18);
}

.spell-slot.filled {
  background: linear-gradient(180deg, rgba(32, 30, 34, 0.94) 0%, rgba(17, 19, 25, 0.96) 100%);
  border-color: rgba(222, 184, 114, 0.42);
}

/* 24-General Card Binder Dark-Gold Obsidian Upgrade */
.binder-overlay {
  background:
    radial-gradient(circle at 50% 0%, rgba(218, 174, 92, 0.14) 0%, transparent 48%),
    linear-gradient(180deg, #161820 0%, #0e1015 100%) !important;
}


/* ==================== PHASE 3: FULL-GAME AAA DARK-GOLD UE5 CG OVERHAUL ==================== */

/* 1. Outer Obsidian Stage & Sculpted Brushed-Gold Device Bezel */
html, body {
  background:
    radial-gradient(circle at 50% 0%, #1d202b 0%, #0d0f15 58%, #07080c 100%);
}

.game-device {
  background-color: #101218;
  border: 1px solid rgba(228, 190, 118, 0.48);
  box-shadow:
    0 28px 68px rgba(0, 0, 0, 0.88),
    0 0 0 1px rgba(255, 240, 200, 0.08),
    inset 0 1px 0 rgba(255, 245, 216, 0.16);
}

/* 2. Dark-Obsidian & Brushed Champagne-Gold Imperial Decree Modals (Replaces Cream Scroll Paper) */
.modal-backdrop {
  background: rgba(6, 7, 11, 0.82);
  backdrop-filter: blur(8px);
}

.modal-card,
.modal-card.scroll-paper {
  background:
    radial-gradient(circle at 50% 0%, rgba(228, 184, 102, 0.16) 0%, transparent 54%),
    linear-gradient(180deg, #1b1e27 0%, #11131a 100%) !important;
  color: #efe4ce !important;
  border: 1px solid rgba(232, 192, 118, 0.56) !important;
  box-shadow:
    0 26px 64px rgba(0, 0, 0, 0.92),
    inset 0 0 0 1px rgba(255, 242, 206, 0.12),
    inset 0 1px 0 rgba(255, 246, 218, 0.22) !important;
}

.scroll-painting-wrap {
  border: 1px solid rgba(232, 192, 118, 0.54);
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.78);
}

.scroll-stamp {
  background: linear-gradient(180deg, #c93728 0%, #861b11 100%);
  border: 1px solid rgba(255, 224, 168, 0.62);
  color: #fff8eb;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.72);
}

.scroll-title-block {
  border-bottom: 1px solid rgba(224, 186, 118, 0.24);
  padding-bottom: 8px;
}

.scroll-era {
  color: #d9b572 !important;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.scroll-heading {
  color: #fdf0d2 !important;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.85);
}

.scroll-prose {
  color: #e0d4be !important;
}

.scroll-quote-row {
  background: linear-gradient(90deg, rgba(46, 33, 22, 0.72) 0%, rgba(17, 19, 26, 0.9) 100%);
  border: 1px solid rgba(224, 186, 118, 0.3);
  border-left: 3px solid #d43c2b;
  border-radius: 8px;
  padding: 8px 11px;
}

.scroll-quote-row img {
  width: 46px;
  height: 46px;
  border-radius: 8px;
  object-fit: cover !important;
  object-position: center 14% !important;
  padding: 0;
  border: 1px solid rgba(235, 196, 120, 0.58);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.72);
}

.scroll-quote-row b {
  color: #fae0a4 !important;
}

.scroll-quote-row p {
  color: #ede1cb !important;
}

.scroll-stats-grid {
  background: rgba(13, 15, 21, 0.84);
  border: 1px solid rgba(220, 182, 112, 0.28);
  color: #bfb29b !important;
}

.scroll-stats-grid b {
  color: #fde8b9 !important;
}

.modal-card.scroll-paper .modal-header {
  border-bottom-color: rgba(224, 186, 118, 0.24) !important;
}

.modal-card.scroll-paper .modal-header h3 {
  color: #fae5b6 !important;
}

.modal-card.scroll-paper .modal-header p {
  color: #bcae96 !important;
}

.campaign-overview-item {
  border-bottom-color: rgba(224, 186, 118, 0.18);
}

.campaign-overview-item img {
  border-color: rgba(232, 192, 118, 0.5);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.65);
}

.campaign-overview-item b {
  color: #fae6b8 !important;
}

.campaign-overview-item span {
  color: #bdb099 !important;
}

/* Sculpted Ruby-Lacquer & Brushed-Obsidian Action Buttons Across Modals & Drawers */
.btn-cinnabar {
  background:
    radial-gradient(ellipse at 50% 92%, rgba(255, 148, 56, 0.42) 0%, transparent 62%),
    linear-gradient(180deg, #b82d20 0%, #7d1810 56%, #570f0a 100%) !important;
  border: 1px solid rgba(246, 206, 134, 0.68) !important;
  color: #fff6e4 !important;
  box-shadow:
    0 5px 14px rgba(0, 0, 0, 0.72),
    inset 0 1px 0 rgba(255, 240, 200, 0.36) !important;
  text-shadow: 0 2px 5px rgba(38, 6, 4, 0.9);
}

.btn-cinnabar:hover:not(:disabled) {
  filter: brightness(1.08);
  border-color: #ffe39e !important;
}

.btn-stone,
.quiet-btn {
  background: linear-gradient(180deg, rgba(34, 36, 46, 0.94) 0%, rgba(18, 20, 27, 0.98) 100%);
  border: 1px solid rgba(220, 182, 112, 0.38);
  color: #f0e3ca;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 244, 214, 0.1);
}

.btn-stone:hover:not(:disabled),
.quiet-btn:hover:not(:disabled) {
  border-color: rgba(242, 202, 126, 0.72);
  color: #fff5df;
}

.choice-btn {
  background: linear-gradient(180deg, rgba(28, 30, 39, 0.92) 0%, rgba(16, 18, 25, 0.96) 100%);
  border: 1px solid rgba(220, 182, 112, 0.3);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.choice-btn:hover:not(:disabled) {
  background: linear-gradient(180deg, rgba(44, 38, 32, 0.95) 0%, rgba(22, 22, 29, 0.98) 100%);
  border-color: rgba(245, 204, 126, 0.72);
}

.buy-btn {
  background: linear-gradient(180deg, #3c2e1c 0%, #221a11 100%);
  border: 1px solid rgba(235, 194, 116, 0.55);
  color: #fde6ad;
}

/* 3. AAA PBR Medallion Framing for All Square CG Icons & Portraits */
.modal-header img,
.clean-row-left img,
.trophy-modal-banner img,
.trophy-choice-left img,
.beast-item img,
.cg-relic-mini img {
  object-fit: cover !important;
  object-position: center 22%;
  padding: 0 !important;
  border-radius: 7px;
  border: 1px solid rgba(226, 188, 116, 0.46);
  background: #101218;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.68);
}

/* Board Cells: Translucent Smoked Obsidian + Gilded CG Entity Framing */
.dungeon-grid {
  background: rgba(12, 14, 20, 0.74);
  backdrop-filter: blur(5px);
  border: 1.5px solid rgba(224, 186, 116, 0.5);
}

.tile.revealed {
  background: radial-gradient(circle at 50% 42%, rgba(36, 39, 50, 0.62) 0%, rgba(13, 15, 21, 0.92) 100%);
  border: 1px solid rgba(222, 184, 114, 0.26);
}

.tile.revealed .entity-sprite,
.tile.revealed .pickup-sprite {
  width: 90%;
  height: 90%;
  object-fit: cover;
  object-position: center 22%;
  border-radius: 6px;
  border: 1px solid rgba(224, 186, 118, 0.3);
  box-shadow:
    inset 0 1px 0 rgba(255, 244, 214, 0.18),
    0 2px 6px rgba(0, 0, 0, 0.75);
  filter: contrast(1.04) saturate(1.05);
}

.tile.monster-tile .entity-sprite {
  width: 92%;
  height: 92%;
  object-position: center 16%;
  border-color: rgba(232, 108, 86, 0.5);
}

.tile.monster-tile.boss-tile .entity-sprite {
  border: 1.5px solid #f6d07c;
  box-shadow: 0 0 10px rgba(246, 194, 92, 0.45);
}

.prop-badge,
.siege-tag,
.door-tag {
  z-index: 7;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.88);
}

/* HUD, Command Bar, Astrolabe Reels & Bottom Dock CG Icon Polish */
.stat-inline img,
.stamina-bar-label img,
.mission-progress-pill img,
.tiger-token-pill img,
.wine-pack-btn img {
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid rgba(228, 190, 118, 0.35);
}

.obj-slot {
  padding: 2px;
  background: #101218;
  border-color: rgba(222, 184, 114, 0.26);
  overflow: hidden;
}

.obj-slot img {
  object-fit: cover;
  border-radius: 5px;
  opacity: 0.34;
}

.obj-slot.obtained {
  border-color: #f6cf78;
  box-shadow: 0 0 10px rgba(246, 207, 120, 0.45);
}

.obj-slot.obtained img {
  opacity: 1;
  filter: none;
}

.cmd-skill-btn img,
.cmd-tactic-btn img {
  width: 19px;
  height: 19px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid rgba(242, 202, 126, 0.48);
}

.slot-symbol-cell {
  padding: 3px;
}

.slot-symbol-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 5px;
  border: 1px solid rgba(224, 186, 118, 0.4);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.7);
  filter: contrast(1.05) saturate(1.06);
}

.lt-companion-slot {
  overflow: visible;
  background: #12141c;
  border: 1px solid rgba(224, 186, 118, 0.34);
}

.lt-companion-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover !important;
  object-position: center 15% !important;
  border-radius: 6px;
}

.relic-slot {
  background: #11131a;
  border-color: rgba(220, 182, 112, 0.22);
  overflow: hidden;
}

.relic-slot.filled {
  background: #181a24;
  border-color: rgba(236, 196, 118, 0.58);
}

.relic-slot img {
  width: 24px;
  height: 24px;
  object-fit: cover;
  border-radius: 5px;
}

.spell-slot img {
  width: 25px;
  height: 25px;
  object-fit: cover;
  border-radius: 5px;
  border: 1px solid rgba(226, 188, 116, 0.38);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.65);
}

/* 4. Tightened Vertical Proportions so Boss Showdown + 4x5 Board + Astrolabe + Dock Fit Cleanly */
.dungeon-hud {
  padding: 6px 12px;
}

.hud-avatar-wrap {
  width: 46px;
  height: 46px;
}

.speech-bar {
  margin: 4px 12px 0;
  padding: 5px 9px;
}

.boss-showdown-stage {
  margin: 6px 12px 2px;
  padding: 6px 10px 7px;
  min-height: 116px;
}

.boss-stage-main {
  min-height: 94px;
  gap: 10px;
}

.boss-portrait-hitbox {
  width: 108px;
  height: 94px;
}

.boss-giant-portrait {
  width: 118px;
  height: 108px;
  bottom: -1px;
}

.boss-speech-bubble {
  padding: 3px 7px;
  font-size: 0.66rem;
  min-height: 28px;
}

.boss-dragon-hp-wrap {
  margin-top: 4px;
}

.boss-dragon-hp-outer {
  height: 14px;
}

.board-stage {
  padding: 3px 12px;
}

.dungeon-grid.grid-4x5 {
  width: min(100%, 296px);
}

.command-order-bar {
  padding: 4px 12px !important;
}

.fate-slot-console {
  margin: 0 12px 4px;
  padding: 5px 9px;
}

.slot-reel-window,
.slot-symbol-cell {
  width: 48px;
  height: 48px;
}

.dungeon-dock {
  padding: 5px 12px 7px;
  gap: 5px;
}

.spell-slot {
  height: 42px;
}

/* 5. 24-General Card Binder, Mounts Bay, Garrison Map & 3D Foil Inspector CG Polish */
.binder-header {
  background: linear-gradient(180deg, rgba(24, 26, 35, 0.96) 0%, rgba(14, 16, 22, 0.96) 100%);
  border-bottom: 1px solid rgba(226, 188, 116, 0.34);
}

.binder-card {
  background: linear-gradient(180deg, #20232e 0%, #12141c 100%);
  border: 1px solid rgba(220, 182, 112, 0.38);
  padding: 5px;
}

.binder-card.foil-tier-2 {
  background: linear-gradient(165deg, #2d261d 0%, #161821 55%, #292015 100%);
  border-color: #f3c870;
}

.binder-card.foil-tier-3 {
  background: linear-gradient(155deg, #3e1b18 0%, #181720 50%, #3a2914 100%);
  border-color: #fde047;
}

.binder-card.card-unowned {
  background: linear-gradient(180deg, #171922 0%, #0f1117 100%);
  border-color: rgba(168, 146, 108, 0.24);
}

.binder-card-art {
  padding: 3px 2px;
  overflow: hidden;
}

.binder-card-art img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 106px;
  border-radius: 7px;
  border: 1px solid rgba(228, 190, 118, 0.42);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.72);
}

/* Fix Solid Black Square Bug: Moody Shadowed Bronze CG Portraits for Unowned Generals */
.binder-card.card-unowned .binder-card-art img {
  filter: grayscale(0.86) brightness(0.44) contrast(1.08) sepia(0.16) !important;
  opacity: 0.9 !important;
  border-color: rgba(168, 146, 108, 0.26) !important;
}

.card-unowned-seal {
  background: rgba(12, 14, 20, 0.88);
  border: 1px solid rgba(220, 182, 112, 0.38);
  color: #cbbba0;
}

.foil-card-3d {
  background: linear-gradient(165deg, #242633 0%, #13151d 55%, #221c16 100%);
  border: 2px solid #dfba70;
}

.foil-portrait-stage {
  background: #0f1117;
  border: 1px solid rgba(232, 192, 118, 0.45);
}

.foil-portrait-stage img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  border-radius: 11px;
}

.foil-card-3d.card-unowned .foil-portrait-stage img {
  filter: grayscale(0.84) brightness(0.46) contrast(1.08) sepia(0.15) !important;
}

.ceremony-front {
  background: linear-gradient(165deg, #262530 0%, #13151d 100%);
}

.ceremony-front img {
  width: 100%;
  height: 116px;
  max-height: 116px;
  max-width: 100%;
  object-fit: cover !important;
  object-position: center 15% !important;
  border-radius: 8px;
  border: 1px solid rgba(245, 204, 122, 0.52);
}

.ceremony-slot.single-large .ceremony-front img {
  height: 162px;
  max-height: 162px;
}

.mount-card {
  background: linear-gradient(170deg, #212430 0%, #12141c 100%);
  border: 1px solid rgba(220, 182, 112, 0.38);
}

.mount-art-box {
  background: #0e1016;
  border: 1px solid rgba(224, 186, 118, 0.34);
  overflow: hidden;
  padding: 0;
}

.mount-art-box img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
  object-position: center 36%;
  border-radius: 8px;
}

.mount-card.locked .mount-art-box img {
  filter: grayscale(0.82) brightness(0.46) contrast(1.08);
}

.stronghold-card {
  background:
    radial-gradient(circle at 85% 15%, rgba(218, 178, 102, 0.14), transparent 55%),
    linear-gradient(175deg, #20232e 0%, #12141c 100%);
  border: 1px solid rgba(220, 182, 112, 0.36);
}

.sh-prefect-row {
  background: rgba(11, 13, 18, 0.78);
  border-color: rgba(220, 182, 112, 0.22);
}

/* v4 + CG 3A Merge Guard: progressive-unlock hidden state always takes priority */
.feature-locked-hidden,
.hub-res-pill.feature-locked-hidden,
.hub-feature-card.feature-locked-hidden,
.hub-astrolabe-badge.feature-locked-hidden,
.command-order-bar.feature-locked-hidden,
.slot-console.feature-locked-hidden,
.spell-slots-bar.feature-locked-hidden,
.board-rule-indicator.feature-locked-hidden {
  display: none !important;
}
.hub-trio-cards {
  display: flex;
  gap: 8px;
}
.hub-trio-cards > .hub-feature-card {
  flex: 1 1 0;
}
.stamina-bar-outer .hud-stam-timer {
  font-style: normal;
  font-size: 0.62rem;
  font-weight: 700;
  color: rgba(247, 232, 198, 0.85);
  white-space: nowrap;
}
.stamina-bar-outer.idle-regen-active .hud-stam-timer {
  color: #86efac;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.85);
}

