/* =========================================================================
   暗渊 · ECHOES OF THE ABYSS
   Gothic dark-fantasy interface. 1600x900 design stage.
   ========================================================================= */
:root {
  --ink: #08060a;
  --ink-2: #0e0b10;
  --ink-3: #151017;
  --panel: rgba(12, 9, 14, 0.88);
  --panel-2: rgba(9, 7, 11, 0.94);
  --gold: #d8b16a;
  --gold-soft: #f2d9a5;
  --gold-bright: #ffe3a5;
  --gold-dim: rgba(216, 177, 106, 0.28);
  --line: rgba(216, 177, 106, 0.2);
  --line-bright: rgba(240, 205, 143, 0.45);
  --red: #b42b3d;
  --red-bright: #ff5b6e;
  --blood: #7e1827;
  --teal: #7fddd0;
  --text: #e8dfd2;
  --muted: #958c81;
  --muted-2: #6e675f;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.65);
  --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", Georgia, serif;
  --sans: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", "Segoe UI", sans-serif;
  --display: "Palatino Linotype", "Book Antiqua", Georgia, var(--serif);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  user-select: none;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 45%, rgba(50, 21, 30, 0.22), transparent 55%),
    #000;
  pointer-events: none;
}
button {
  border: 0;
  background: none;
  color: inherit;
  font-family: inherit;
  cursor: pointer;
  outline: none;
}
button:focus-visible { outline: 1px solid var(--gold-soft); outline-offset: 3px; }
svg { display: block; }
.hidden { display: none !important; }
kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border: 1px solid rgba(232, 218, 194, 0.25);
  border-bottom-color: rgba(232, 218, 194, 0.45);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.04);
  color: #e7ddce;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}
#app {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}
#stage {
  position: absolute;
  width: 1600px;
  height: 900px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  transform-origin: center center;
  overflow: hidden;
  background: #050407;
  box-shadow: 0 0 120px rgba(0, 0, 0, 0.9);
}
#game { position: absolute; inset: 0; width: 1600px; height: 900px; display: block; }
.fx-grain, .fx-lines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 6;
}
.fx-grain {
  opacity: 0.07;
  background:
    repeating-radial-gradient(circle at 17% 33%, rgba(255,255,255,.28) 0 0.6px, transparent 0.8px 3px),
    repeating-radial-gradient(circle at 73% 67%, rgba(255,255,255,.2) 0 0.5px, transparent 0.7px 4px);
  background-size: 9px 11px, 13px 17px;
  mix-blend-mode: overlay;
}
.fx-lines {
  opacity: 0.12;
  background: repeating-linear-gradient(0deg, transparent 0 3px, rgba(0, 0, 0, 0.3) 3px 4px);
  mix-blend-mode: multiply;
}
.screen {
  position: absolute;
  inset: 0;
  z-index: 20;
}
.hidden { display: none !important; }

/* =========================================================================
   SHARED: BUTTONS / PANELS / TYPOGRAPHY
   ========================================================================= */
.btn {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 54px;
  padding: 0 28px;
  border: 1px solid var(--gold-dim);
  color: var(--text);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(0, 0, 0, 0.08));
  font-size: 14px;
  letter-spacing: 0.14em;
  transition: border-color 0.25s ease, background 0.25s ease, transform 0.25s ease, color 0.25s ease;
  overflow: hidden;
}
.btn::before, .btn::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  border-color: var(--gold);
  border-style: solid;
  opacity: 0.65;
  pointer-events: none;
  transition: opacity 0.25s;
}
.btn::before { left: -1px; top: -1px; border-width: 1px 0 0 1px; }
.btn::after { right: -1px; bottom: -1px; border-width: 0 1px 1px 0; }
.btn:hover { border-color: var(--line-bright); color: #fff4de; }
.btn:hover::before, .btn:hover::after { opacity: 1; }
.btn:active { transform: translateY(1px); }
.btn-main { position: relative; z-index: 1; font-family: var(--serif); font-size: 18px; letter-spacing: 0.22em; }
.btn-sub {
  position: relative;
  z-index: 1;
  font-family: var(--display);
  font-size: 8px;
  letter-spacing: 0.3em;
  color: var(--muted);
}
.btn-primary {
  border-color: rgba(219, 161, 107, 0.45);
  background:
    linear-gradient(90deg, rgba(110, 23, 35, 0.15), rgba(155, 40, 55, 0.55), rgba(110, 23, 35, 0.15)),
    linear-gradient(180deg, rgba(53, 17, 25, 0.85), rgba(20, 8, 12, 0.92));
  box-shadow: inset 0 0 25px rgba(255, 88, 103, 0.08), 0 10px 35px rgba(0, 0, 0, 0.4);
}
.btn-primary::before, .btn-primary::after { border-color: var(--gold-soft); width: 16px; height: 16px; }
.btn-primary .btn-main { color: #fff1d9; text-shadow: 0 1px 12px rgba(255, 119, 112, 0.5); }
.btn-primary .btn-sub { color: rgba(229, 190, 158, 0.5); }
.btn-primary:hover {
  border-color: var(--gold-soft);
  background:
    linear-gradient(90deg, rgba(143, 34, 48, 0.18), rgba(191, 53, 68, 0.65), rgba(143, 34, 48, 0.18)),
    linear-gradient(180deg, rgba(66, 20, 30, 0.92), rgba(27, 9, 14, 0.95));
}
.btn-primary .btn-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 15%, rgba(255, 218, 167, 0.2) 45%, transparent 70%);
  transform: translateX(-120%);
  animation: btn-shine 5.5s ease-in-out infinite;
}
@keyframes btn-shine {
  0%, 55% { transform: translateX(-130%); }
  78%, 100% { transform: translateX(130%); }
}
.btn-ghost {
  min-height: 50px;
  padding: 0 22px;
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: 0.14em;
  color: #c5b9a7;
  background: rgba(7, 5, 9, 0.35);
  border-color: rgba(185, 158, 120, 0.2);
}
.btn-ghost:hover { background: rgba(30, 22, 28, 0.6); }
.btn-line {
  flex-direction: row;
  gap: 14px;
  min-height: 46px;
  padding: 0 18px;
  border-color: rgba(216, 177, 106, 0.25);
  background: rgba(255, 255, 255, 0.02);
  font-size: 13px;
  letter-spacing: 0.1em;
}
.btn-line:hover { background: rgba(216, 177, 106, 0.07); }
.btn-line.danger { color: #d99c9c; border-color: rgba(186, 74, 81, 0.35); }
.btn-line.danger:hover { background: rgba(139, 31, 42, 0.2); color: #ffd5d5; }
.btn-line small { color: var(--muted-2); font-size: 10px; letter-spacing: 0.04em; }
.btn-small { min-height: 38px; padding: 0 22px; }
.btn-hero { min-width: 356px; min-height: 82px; }
.btn-hero .btn-main { font-size: 24px; letter-spacing: 0.32em; }
.btn-hero .btn-sub { font-size: 9px; }
.icon-btn {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(216, 177, 106, 0.16);
  background: rgba(8, 6, 10, 0.5);
  color: #b8ac9d;
  transition: all 0.2s ease;
}
.icon-btn svg, .hud-icon-btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.icon-btn:hover { color: var(--gold-soft); border-color: var(--line-bright); background: rgba(216, 177, 106, 0.08); }
.bar { height: 6px; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.06); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #8f6a36, var(--gold)); box-shadow: 0 0 12px rgba(216, 177, 106, 0.5); transition: width 0.3s ease; }
.bar.slim { height: 3px; background: rgba(255,255,255,.04); border: 0; }
.panel {
  position: relative;
  background:
    linear-gradient(140deg, rgba(27, 20, 27, 0.9), rgba(11, 8, 12, 0.94) 45%, rgba(8, 6, 9, 0.92)),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.012) 0 1px, transparent 1px 8px);
  border: 1px solid rgba(216, 177, 106, 0.14);
  box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.5), 0 15px 50px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(5px);
}
.panel::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(216, 177, 106, 0.06);
  pointer-events: none;
}
.panel-corner, .frame-corner {
  position: absolute;
  width: 18px;
  height: 18px;
  border-color: rgba(224, 191, 134, 0.6);
  border-style: solid;
  z-index: 2;
  pointer-events: none;
}
.panel-corner.tl, .frame-corner.tl { left: -1px; top: -1px; border-width: 1px 0 0 1px; }
.panel-corner.tr, .frame-corner.tr { right: -1px; top: -1px; border-width: 1px 1px 0 0; }
.panel-corner.bl, .frame-corner.bl { left: -1px; bottom: -1px; border-width: 0 0 1px 1px; }
.panel-corner.br, .frame-corner.br { right: -1px; bottom: -1px; border-width: 0 1px 1px 0; }
.panel-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 22px 22px 18px;
  border-bottom: 1px solid rgba(216, 177, 106, 0.1);
}
.heading-mark {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(216, 177, 106, 0.28);
  color: var(--gold);
  font-family: var(--display);
  font-size: 12px;
  transform: rotate(45deg);
}
.heading-mark::first-letter { transform: rotate(-45deg); }
.panel-heading > div { flex: 1; }
.panel-heading h3 { font-family: var(--serif); font-size: 20px; letter-spacing: 0.14em; font-weight: 700; }
.panel-heading p { margin-top: 4px; color: var(--muted-2); font-family: var(--display); font-size: 8px; letter-spacing: 0.25em; }
.level-chip { color: var(--gold); font-family: var(--display); font-size: 10px; letter-spacing: 0.1em; border: 1px solid rgba(216,177,106,.22); padding: 5px 9px; background: rgba(0,0,0,.25); }
.level-chip b { font-size: 15px; margin-left: 3px; }
.mini-text-btn {
  position: relative;
  color: var(--gold);
  font-size: 11px;
  letter-spacing: 0.06em;
  padding: 6px 0 6px 12px;
}
.mini-text-btn::before { content: "◈"; position: absolute; left: 0; top: 6px; font-size: 8px; }
.mini-text-btn:hover { color: #fff0d2; }
.close-btn {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(216, 177, 106, 0.22);
  color: #b3a695;
  font-size: 16px;
  transition: all .2s;
}
.close-btn:hover { color: #fff0dc; border-color: var(--line-bright); background: rgba(216, 177, 106, .07); transform: rotate(90deg); }

/* =========================================================================
   TITLE
   ========================================================================= */
.title-screen {
  z-index: 30;
  padding: 48px 0 0 92px;
  background: linear-gradient(90deg, rgba(247, 242, 228, .42) 0%, rgba(247, 242, 228, .12) 46%, transparent 74%);
  overflow: hidden;
}
.title-screen::before {
  content: "";
  position: absolute;
  left: 58px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(180deg, transparent 5%, rgba(33, 28, 24, .25) 22%, rgba(33, 28, 24, .08) 70%, transparent 96%);
}
.title-screen::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 760px;
  height: 300px;
  background: radial-gradient(ellipse at left bottom, rgba(113, 21, 35, 0.2), transparent 65%);
  pointer-events: none;
}
.title-brandline {
  display: flex;
  align-items: center;
  gap: 13px;
  color: rgba(90, 78, 62, 0.8);
  font-family: var(--display);
  font-size: 10px;
  letter-spacing: 0.28em;
}
.brand-diamond { width: 4px; height: 4px; background: #b03a2e; transform: rotate(45deg); }
.title-lockup { position: relative; width: 700px; margin-top: 34px; animation: title-rise 1.2s cubic-bezier(.2,.8,.2,1) both .1s; }
@keyframes title-rise {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
/* red seal replacing the emblem (ink title) */
.title-seal {
  width: 78px;
  height: 78px;
  margin-bottom: 18px;
  background: #b03a2e;
  border-radius: 12px;
  color: #f4ede0;
  font-family: KaiTi, STKaiti, SimSun, serif;
  font-size: 54px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: rotate(-3deg);
  box-shadow: 0 6px 18px rgba(176,58,46,.25), inset 0 0 0 3px rgba(120,30,24,.5), inset 0 0 0 5px rgba(244,237,224,.2);
  animation: emblem-float 7s ease-in-out infinite;
}
@keyframes emblem-float {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-6px) rotate(1deg); }
}
.title-eyebrow { font-family: var(--display); font-size: 10px; letter-spacing: 0.42em; color: rgba(90, 78, 62, .65); margin-left: 3px; }
.title-cn {
  position: relative;
  margin: 3px 0 2px -8px;
  font-family: KaiTi, STKaiti, SimSun, serif;
  font-size: 196px;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: 0.1em;
  color: #211c18;
  text-shadow: 3px 3px 0 rgba(33,28,24,.1), 0 12px 34px rgba(33,28,24,.16);
}
.title-cn i { display: inline-block; font-style: normal; }
.title-cn i:first-child { transform: rotate(-4deg); }
.title-cn i:last-child { transform: rotate(2.5deg); }
.title-cn::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 330px;
  bottom: -6px;
  height: 3px;
  background: linear-gradient(90deg, transparent, rgba(33,28,24,.75) 20%, rgba(176,58,46,.85) 62%, transparent);
  filter: blur(.4px);
}
.title-en {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-top: 12px;
  color: rgba(74, 66, 56, .75);
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: 0.38em;
}
.title-en i { width: 24px; height: 1px; background: rgba(33, 28, 24, .3); }
.title-desc {
  margin-top: 22px;
  color: #4a4238;
  font-family: var(--serif);
  font-size: 15px;
  line-height: 2;
  letter-spacing: 0.08em;
  text-shadow: 0 1px 0 rgba(247, 242, 228, .8);
}
.title-actions { display: flex; align-items: stretch; gap: 12px; margin-top: 34px; animation: title-rise 1s ease both .35s; }
.title-actions .btn-primary { align-self: stretch; }
/* ink-style title buttons */
#title-screen .btn { border-radius: 8px; font-family: var(--serif); }
#title-screen .btn-primary {
  background: #211c18;
  border-color: rgba(176, 58, 46, .85);
  color: #f4ede0;
  box-shadow: 5px 7px 0 rgba(33, 28, 24, .16);
}
#title-screen .btn-primary:hover { background: #33291f; }
#title-screen .btn-primary .btn-glow { display: none; }
#title-screen .btn-ghost {
  background: rgba(247, 242, 228, .55);
  border: 1.5px solid rgba(33, 28, 24, .4);
  color: #332b23;
  box-shadow: none;
}
#title-screen .btn-ghost:hover { background: rgba(33, 28, 24, .1); }
#title-screen .btn-ghost small { color: #b03a2e; }
.title-save-note { margin-top: 18px; color: rgba(90, 78, 62, .75); font-size: 11px; letter-spacing: 0.08em; animation: fade-in 1s ease both .6s; }
.title-metrics {
  display: flex;
  gap: 0;
  margin-top: 30px;
  width: 520px;
  border-top: 1px solid rgba(33, 28, 24, .18);
  border-bottom: 1px solid rgba(33, 28, 24, .1);
  animation: fade-in 1s ease both .8s;
}
.title-metrics div { flex: 1; padding: 14px 20px 13px 0; display: flex; align-items: baseline; gap: 9px; }
.title-metrics div + div { padding-left: 24px; border-left: 1px solid rgba(33, 28, 24, .14); }
.title-metrics strong { font-family: var(--display); font-size: 32px; font-weight: 400; color: #332b23; letter-spacing: .06em; text-shadow: none; }
.title-metrics span { color: #6a5f4e; font-size: 11px; letter-spacing: .1em; }
.title-footer {
  position: absolute;
  left: 92px;
  right: 64px;
  bottom: 28px;
  display: flex;
  align-items: center;
  gap: 14px;
  color: rgba(90, 78, 62, .7);
  font-size: 10px;
  letter-spacing: 0.06em;
  border-top: 1px solid rgba(33, 28, 24, .1);
  padding-top: 14px;
}
.title-footer i { color: rgba(33, 28, 24, .28); font-style: normal; }
.title-footer .copyright { margin-left: auto; font-family: var(--display); letter-spacing: .18em; color: rgba(90, 78, 62, .45); }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* =========================================================================
   CAMP
   ========================================================================= */
.camp-screen {
  z-index: 25;
  padding: 18px 44px 0;
  background:
    linear-gradient(180deg, rgba(5, 4, 7, 0.94) 0%, rgba(5, 4, 8, 0.74) 26%, rgba(5, 4, 8, 0.62) 62%, rgba(5, 4, 7, 0.92) 100%),
    radial-gradient(ellipse at 50% 52%, rgba(111, 51, 31, .08), transparent 62%);
  animation: fade-in .6s ease both;
}
.camp-header {
  height: 62px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  border-bottom: 1px solid rgba(216, 177, 106, 0.12);
}
.camp-brand { display: flex; gap: 13px; align-items: flex-start; }
.mini-sigil {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  border: 1px solid rgba(216, 177, 106, .3);
  transform: rotate(45deg);
  margin-top: 4px;
  font-size: 14px;
  background: rgba(216,177,106,.03);
}
.camp-brand h2 { font-family: var(--serif); font-size: 24px; letter-spacing: .18em; font-weight: 700; }
.camp-brand p { margin-top: 4px; font-family: var(--display); font-size: 8px; letter-spacing: .35em; color: var(--muted-2); }
.camp-resources { display: flex; align-items: center; gap: 22px; }
.res-item { display: flex; align-items: center; gap: 9px; min-width: 90px; }
.res-icon { color: var(--gold); font-size: 12px; }
.res-item small { display: block; color: var(--muted-2); font-size: 9px; letter-spacing: .1em; margin-bottom: 2px; }
.res-item strong { font-family: var(--display); font-weight: 400; font-size: 19px; letter-spacing: .05em; color: #ecdbc0; }
.res-item.gold strong { color: var(--gold-soft); }
.camp-resources .icon-btn { margin-left: 4px; }
.camp-main {
  height: 706px;
  display: grid;
  grid-template-columns: 354px minmax(480px, 1fr) 390px;
  gap: 20px;
  padding-top: 14px;
}
.hero-panel { display: flex; flex-direction: column; overflow: hidden; }
.camp-portrait-wrap { position: relative; flex: 1; margin: 0 12px; border: 1px solid rgba(120,100,80,.4); background: #e2d8c0; overflow: hidden; min-height: 260px; }
#camp-portrait { width: 100%; height: 100%; object-fit: cover; display: block; }
.portrait-scan {
  position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(0deg, transparent 0 4px, rgba(0,0,0,.18) 4px 5px);
  mix-blend-mode: multiply; opacity: .5;
}
.portrait-caption { position: absolute; left: 14px; bottom: 12px; right: 14px; display: flex; align-items: flex-end; justify-content: space-between; z-index: 2; }
.portrait-caption span { color: var(--gold-soft); font-family: var(--serif); font-size: 15px; letter-spacing: .16em; text-shadow: 0 2px 8px #000; }
.portrait-caption small { color: rgba(228, 203, 167, .38); font-size: 8px; letter-spacing: .18em; }
.xp-row { display: flex; align-items: center; gap: 10px; padding: 14px 22px 6px; color: var(--muted-2); font-size: 9px; letter-spacing: .08em; }
.xp-row .bar { flex: 1; }
.xp-row em { font-style: normal; font-family: var(--display); color: #ad9e8b; font-size: 9px; letter-spacing: .04em; white-space: nowrap; }
.core-stats { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid rgba(216, 177, 106, .1); margin-top: 8px; }
.core-stats div { padding: 12px 0 13px; text-align: center; border-right: 1px solid rgba(216, 177, 106, .07); border-bottom: 1px solid rgba(216, 177, 106, .07); }
.core-stats div:nth-child(3n) { border-right: 0; }
.core-stats span { display: block; color: var(--muted-2); font-size: 9px; letter-spacing: .08em; margin-bottom: 3px; }
.core-stats b { font-family: var(--display); font-weight: 400; font-size: 17px; color: #dfd1bd; letter-spacing: .03em; }
.camp-center { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.camp-launch { flex: 1; padding: 14px 44px 10px; display: flex; flex-direction: column; align-items: center; text-align: center; overflow: hidden; }
.camp-launch::after {
  content: "";
  position: absolute;
  left: 50%; top: 0; transform: translateX(-50%);
  width: 640px; height: 350px;
  background: radial-gradient(ellipse at 50% 20%, rgba(142, 47, 58, .13), transparent 70%);
  pointer-events: none;
}
.gate-visual { position: relative; width: 300px; height: 140px; margin-top: -10px; flex: none; }
.gate-ring {
  position: absolute;
  left: 50%; top: 48%;
  width: 258px; height: 258px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px solid rgba(216, 177, 106, .16);
  box-shadow: 0 0 45px rgba(122, 43, 54, .12), inset 0 0 40px rgba(122, 43, 54, .1);
}
.gate-ring::before, .gate-ring::after {
  content: ""; position: absolute; border-radius: 50%; border: 1px dashed rgba(216, 177, 106, .12);
}
.gate-ring::before { inset: 16px; }
.gate-ring::after { inset: 42px; border-style: solid; border-color: rgba(255, 225, 179, .06); }
.ring-a { animation: gate-spin 42s linear infinite; }
.ring-b { width: 300px; height: 300px; border-style: dashed; opacity: .35; animation: gate-spin-rev 64s linear infinite; }
@keyframes gate-spin { from { transform: translate(-50%, -50%) rotate(0); } to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes gate-spin-rev { from { transform: translate(-50%, -50%) rotate(360deg); } to { transform: translate(-50%, -50%) rotate(0); } }
.gate-runes {
  position: absolute; left: 50%; top: 48%;
  transform: translate(-50%, -50%);
  width: 225px; height: 225px;
  border-radius: 50%;
  display: flex; align-items: flex-start; justify-content: center;
  color: rgba(224, 185, 126, .28);
  font-size: 11px;
  letter-spacing: .45em;
  padding-top: 4px;
  text-indent: .45em;
}
.gate-arch {
  position: absolute; left: 50%; bottom: 12px; width: 144px; height: 186px; transform: translateX(-50%);
  border: 1px solid rgba(226, 193, 137, .12);
  border-bottom: 0;
  border-radius: 72px 72px 0 0;
  background: radial-gradient(ellipse at 50% 75%, rgba(154, 56, 68, .22), rgba(12, 7, 11, .1) 60%);
  box-shadow: 0 0 60px rgba(139, 33, 51, .15);
}
.gate-arch::before {
  content: ""; position: absolute; inset: 12px; border: 1px solid rgba(216,177,106,.1); border-bottom: 0; border-radius: 60px 60px 0 0;
}
.gate-sword { position: absolute; left: 50%; bottom: 12px; width: 60px; height: 220px; transform: translateX(-50%); filter: drop-shadow(0 0 24px rgba(175, 48, 66, .35)); opacity: .9; }
.gate-sword svg { width: 100%; height: 100%; }
.camp-kicker { margin-top: 4px; font-family: var(--display); font-size: 8px; letter-spacing: .38em; color: rgba(209, 176, 133, .45); z-index: 1; }
.zone-name { margin-top: 2px; font-family: var(--serif); font-size: 30px; font-weight: 700; letter-spacing: .22em; color: #f0ddc0; text-shadow: 0 2px 0 #1b0c11, 0 8px 30px rgba(178, 66, 73, .25); z-index: 1; }
.zone-en { margin-top: 3px; font-family: var(--display); font-size: 9px; letter-spacing: .38em; color: rgba(216, 177, 106, .48); z-index: 1; }
.zone-intro { margin-top: 8px; max-width: 560px; color: #92877b; font-size: 11px; line-height: 1.55; letter-spacing: .03em; z-index: 1; min-height: 34px; }
.layer-select { display: flex; align-items: center; gap: 15px; margin-top: 8px; z-index: 1; }
.layer-label { color: var(--muted-2); font-size: 10px; letter-spacing: .1em; }
.step-btn {
  width: 32px; height: 32px;
  border: 1px solid rgba(216, 177, 106, .25);
  color: var(--gold);
  font-family: var(--display);
  font-size: 18px;
  line-height: 1;
  transition: all .2s;
  background: rgba(0,0,0,.2);
}
.step-btn:hover:not(:disabled) { background: rgba(216, 177, 106, .1); border-color: var(--gold); }
.step-btn:disabled { opacity: .25; cursor: not-allowed; }
.floor-readout { min-width: 112px; display: flex; align-items: baseline; justify-content: center; gap: 4px; }
.floor-readout small { font-family: var(--display); font-size: 8px; letter-spacing: .2em; color: var(--muted-2); align-self: center; margin-right: 4px; }
.floor-readout strong { font-family: var(--display); font-weight: 400; font-size: 30px; line-height: .9; color: var(--gold-soft); letter-spacing: .02em; }
.floor-readout span { color: var(--muted); font-size: 11px; }
.btn-descend { min-width: 390px; min-height: 56px; margin-top: 12px; z-index: 1; }
.btn-descend .btn-main { font-size: 19px; letter-spacing: .25em; }
.unlock-note { margin-top: 6px; color: var(--muted-2); font-size: 10px; letter-spacing: .06em; z-index: 1; }
.camp-collection { width: 100%; max-width: 420px; margin-top: auto; padding-top: 8px; z-index: 1; }
.camp-collection-head { display: flex; justify-content: space-between; margin-bottom: 7px; font-size: 10px; color: var(--muted); letter-spacing: .08em; }
.camp-collection-head em { font-style: normal; font-family: var(--display); color: var(--gold); letter-spacing: .04em; }
.camp-tips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: rgba(216, 177, 106, .1); border: 1px solid rgba(216, 177, 106, .08); }
.tip { background: rgba(8, 6, 10, .78); padding: 8px 12px; display: flex; gap: 10px; align-items: flex-start; }
.tip p { font-size: 11px; line-height: 1.5; }
.tip-icon { color: var(--gold); font-size: 11px; margin-top: 2px; }
.tip p { color: var(--muted-2); font-size: 10px; line-height: 1.65; }
.tip b { color: #c5b39d; font-weight: 500; margin-right: 2px; }
.loadout-panel { display: flex; flex-direction: column; overflow: hidden; }
.equip-list { flex: 1; display: flex; flex-direction: column; justify-content: space-evenly; padding: 10px 16px; gap: 8px; }
.equip-slot {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 78px;
  padding: 8px 12px;
  border: 1px solid rgba(216, 177, 106, .12);
  background: linear-gradient(90deg, rgba(255,255,255,.022), transparent 75%);
  transition: border-color .2s, background .2s;
  cursor: default;
}
.equip-slot:hover { border-color: rgba(216,177,106,.28); background: linear-gradient(90deg, rgba(216,177,106,.06), transparent 75%); }
.equip-slot::before { content: ""; position: absolute; left: 0; top: 16px; bottom: 16px; width: 2px; background: var(--rc, rgba(216,177,106,.2)); box-shadow: 0 0 8px var(--rc, transparent); opacity: .8; }
.equip-icon { width: 52px; height: 52px; flex: none; display: flex; align-items: center; justify-content: center; background: radial-gradient(circle, rgba(255,255,255,.035), transparent 70%); }
.equip-icon .item-icon-svg { width: 100%; height: 100%; filter: drop-shadow(0 3px 8px rgba(0,0,0,.5)); }
.equip-info { flex: 1; min-width: 0; }
.equip-info .slot-name { display: block; color: var(--muted-2); font-size: 9px; letter-spacing: .1em; margin-bottom: 3px; }
.equip-info strong { display: block; font-family: var(--serif); font-size: 14px; font-weight: 500; color: var(--rc, #ddd0bc); letter-spacing: .06em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.equip-info small { display: block; color: var(--muted-2); font-size: 9px; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.equip-slot .equip-set { align-self: flex-start; font-size: 8px; color: var(--sc, var(--muted)); border: 1px solid var(--sc, rgba(255,255,255,.1)); padding: 2px 5px; opacity: .7; white-space: nowrap; }
.equip-slot.empty { opacity: .55; border-style: dashed; }
.equip-slot.empty .equip-icon { color: #4f4843; font-family: var(--display); font-size: 20px; }
.equip-slot.empty .equip-info strong { color: #70675e; font-family: var(--sans); font-size: 12px; font-weight: 400; }
.loadout-footer { border-top: 1px solid rgba(216,177,106,.1); padding: 16px 20px; display: flex; align-items: center; gap: 16px; }
.power-row { flex: 1; }
.power-row span { display: block; font-size: 9px; color: var(--muted-2); letter-spacing: .1em; margin-bottom: 3px; }
.power-row strong { font-family: var(--display); font-size: 26px; font-weight: 400; color: var(--gold-soft); letter-spacing: .04em; }
.loadout-footer .btn { min-height: 40px; padding: 0 14px; font-size: 11px; }
.loadout-footer kbd { margin-left: 2px; color: var(--gold); border-color: rgba(216,177,106,.25); }
.camp-footer {
  height: 70px;
  margin-top: 14px;
  border-top: 1px solid rgba(216,177,106,.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.footer-nav { display: flex; flex: 1 1 auto; flex-wrap: wrap; gap: 14px 26px; row-gap: 4px; }
.text-nav { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; text-align: left; color: #b7ab9b; transition: color .2s; flex: none; white-space: nowrap; }
.text-nav span { font-family: var(--serif); font-size: 13px; letter-spacing: .12em; white-space: nowrap; }
.text-nav small { font-family: var(--display); font-size: 7px; letter-spacing: .22em; color: var(--muted-2); white-space: nowrap; }
.text-nav:hover { color: var(--gold-soft); }
.footer-chapter { display: flex; align-items: center; gap: 10px; color: var(--muted-2); font-family: var(--display); font-size: 8px; letter-spacing: .2em; flex: none; white-space: nowrap; }
.footer-chapter i { display: block; width: 34px; height: 1px; background: rgba(216,177,106,.25); }
.footer-chapter b { color: rgba(213, 185, 143, .55); font-family: var(--serif); font-size: 11px; font-weight: 400; letter-spacing: .16em; }
.reset-link { font-size: 9px; color: rgba(142, 128, 118, .5); letter-spacing: .06em; border-bottom: 1px dashed rgba(142,128,118,.25); padding-bottom: 2px; }
.reset-link:hover { color: #d99595; border-color: #d99595; }

/* =========================================================================
   HUD
   ========================================================================= */
#hud { position: absolute; inset: 0; z-index: 15; pointer-events: none; animation: fade-in .35s ease both; }
#hud button { pointer-events: auto; }
.hud-left { position: absolute; left: 28px; top: 24px; display: flex; gap: 14px; align-items: flex-start; filter: drop-shadow(0 5px 18px rgba(0,0,0,.65)); }
.hud-portrait-frame {
  position: relative;
  width: 106px; height: 106px;
  border: 1px solid rgba(216, 177, 106, .4);
  background: #08060a;
  padding: 3px;
  clip-path: polygon(13px 0, 100% 0, 100% calc(100% - 13px), calc(100% - 13px) 100%, 0 100%, 0 13px);
}
#hud-portrait { width: 100%; height: 100%; display: block; clip-path: polygon(11px 0, 100% 0, 100% calc(100% - 11px), calc(100% - 11px) 100%, 0 100%, 0 11px); }
.portrait-ornament { position: absolute; inset: -5px; border: 1px solid rgba(216, 177, 106, .15); clip-path: polygon(15px 0, 100% 0, 100% calc(100% - 15px), calc(100% - 15px) 100%, 0 100%, 0 15px); pointer-events: none; }
.hud-level { position: absolute; left: 0; bottom: -8px; min-width: 48px; padding: 2px 8px; background: #0c090d; border: 1px solid rgba(216,177,106,.45); color: var(--muted); font-size: 8px; letter-spacing: .08em; z-index: 2; }
.hud-level b { color: var(--gold-soft); font-family: var(--display); font-size: 14px; font-weight: 400; margin-left: 2px; }
.hud-vitals { width: 330px; margin-top: 3px; }
.hud-name-row { display: flex; align-items: baseline; gap: 10px; margin-bottom: 7px; }
.hud-name-row strong { font-family: var(--serif); font-size: 20px; font-weight: 600; letter-spacing: .14em; color: #f1e3cd; text-shadow: 0 2px 8px #000; }
.hud-name-row span { font-size: 9px; color: var(--gold); letter-spacing: .08em; border-left: 1px solid rgba(216,177,106,.25); padding-left: 10px; opacity: .75; }
.health-bar { position: relative; height: 20px; background: rgba(3,3,5,.82); border: 1px solid rgba(233, 213, 180, .18); box-shadow: inset 0 2px 8px rgba(0,0,0,.65); overflow: hidden; }
.health-bar::before { content: ""; position: absolute; inset: 2px; background: repeating-linear-gradient(90deg, transparent 0 31px, rgba(0,0,0,.18) 31px 32px); z-index: 3; pointer-events: none; }
.health-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 100%; background: linear-gradient(90deg, #681326, #b1283c 45%, #e74150 75%, #ff6972); box-shadow: inset 0 1px 0 rgba(255, 208, 187, .28); transition: width .16s linear; z-index: 2; }
.health-shield { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: linear-gradient(90deg, rgba(119,217,255,.3), rgba(152,237,255,.65)); z-index: 1; transition: width .2s linear; }
.health-text { position: absolute; inset: 0; z-index: 4; display: flex; align-items: center; justify-content: center; font-family: var(--display); font-size: 11px; letter-spacing: .12em; color: rgba(255, 242, 222, .8); text-shadow: 0 1px 3px #000; }
.bar-cap { position: absolute; top: 0; width: 7px; height: 100%; background: var(--gold); z-index: 5; opacity: .7; clip-path: polygon(0 0, 100% 50%, 0 100%); }
.bar-cap.left { left: 0; }
.bar-cap.right { right: 0; transform: scaleX(-1); }
.rage-row { display: flex; align-items: center; gap: 8px; margin-top: 5px; }
.rage-label { font-size: 8px; letter-spacing: .16em; color: #9f7c60; }
.rage-bar { position: relative; flex: 1; height: 7px; background: rgba(3,3,5,.75); border: 1px solid rgba(190, 135, 113, .15); overflow: hidden; }
.rage-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #5f2a22, #b65a35, #ffd073); box-shadow: 0 0 12px rgba(255, 146, 56, .3); transition: width .15s linear; }
.rage-bar em { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); color: rgba(255, 226, 192, .55); font-size: 7px; font-style: normal; z-index: 2; }
.xp-thin { height: 2px; margin-top: 3px; background: rgba(255,255,255,.035); }
.xp-thin i { display: block; height: 100%; width: 0; background: rgba(197, 172, 137, .45); transition: width .25s ease; }
.hud-center { position: absolute; left: 50%; top: 23px; transform: translateX(-50%); text-align: center; width: 470px; text-shadow: 0 2px 8px #000; }
.depth-label { display: flex; align-items: center; justify-content: center; gap: 8px; font-family: var(--display); font-size: 10px; letter-spacing: .24em; color: rgba(203, 178, 143, .75); }
.depth-label b { font-family: var(--serif); font-size: 15px; font-weight: 600; letter-spacing: .16em; color: #ecdbc2; }
.depth-label i { width: 18px; height: 1px; background: rgba(216,177,106,.25); }
.depth-label em { font-style: normal; color: #ffd68f; font-family: var(--serif); font-size: 13px; letter-spacing: .12em; }
.objective-row { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 8px; font-size: 11px; letter-spacing: .1em; color: #d8cbbb; }
.objective-mark { color: var(--red-bright); font-size: 7px; transform: rotate(45deg); }
.objective-row p { font-family: var(--serif); font-size: 15px; font-weight: 600; letter-spacing: .1em; color: #f0dfc7; }
.objective-alive { font-family: var(--display); font-size: 10px; letter-spacing: .08em; color: rgba(228, 201, 159, .72); border-left: 1px solid rgba(216,177,106,.2); padding-left: 9px; }
.wave-dots { display: flex; align-items: center; justify-content: center; gap: 5px; margin-top: 7px; }
.wave-dots span { width: 26px; height: 3px; background: rgba(255,255,255,.12); }
.wave-dots span.done { background: var(--gold); box-shadow: 0 0 8px rgba(216,177,106,.45); }
.wave-dots span.current { background: #ff6a76; box-shadow: 0 0 10px rgba(255, 91, 105, .35); }
.wave-dots i { width: 1px; height: 8px; background: rgba(216,177,106,.25); margin: 0 4px; }
.wave-dots b { font-family: var(--display); font-size: 7px; font-weight: 400; letter-spacing: .12em; color: rgba(180, 150, 120, .45); }
.hud-right { position: absolute; right: 28px; top: 24px; display: flex; align-items: center; gap: 10px; }
.hud-gold { min-width: 92px; height: 42px; display: flex; align-items: center; justify-content: flex-end; gap: 7px; padding: 0 13px; background: linear-gradient(90deg, transparent, rgba(4,3,6,.5)); border-bottom: 1px solid rgba(216,177,106,.15); }
.hud-gold span { color: var(--gold); font-size: 10px; }
.hud-gold b { font-family: var(--display); font-weight: 400; color: var(--gold-soft); font-size: 21px; letter-spacing: .04em; }
.hud-icon-btn { width: 42px; height: 42px; position: relative; display: inline-flex; align-items: center; justify-content: center; border: 1px solid rgba(216,177,106,.16); background: rgba(6,5,8,.52); color: #b4a696; transition: all .2s; }
.hud-icon-btn small { position: absolute; right: 3px; bottom: 2px; font-family: var(--display); font-size: 6px; color: rgba(216,177,106,.35); }
.hud-icon-btn:hover { color: var(--gold-soft); border-color: rgba(216,177,106,.4); background: rgba(18,13,17,.8); }
.boss-bar {
  position: absolute; left: 50%; top: 112px; transform: translateX(-50%);
  width: 690px; z-index: 3;
  padding: 0 4px;
  animation: boss-bar-in .45s ease both;
}
@keyframes boss-bar-in { from { opacity: 0; transform: translate(-50%, -10px); } to { opacity: 1; transform: translate(-50%, 0); } }
.boss-headline { display: flex; align-items: flex-end; gap: 12px; margin-bottom: 5px; padding: 0 4px; }
.boss-skull { color: #e6b06f; font-size: 16px; opacity: .85; }
.boss-headline > div { flex: 1; display: flex; align-items: baseline; gap: 10px; }
.boss-headline small { font-family: var(--display); font-size: 7px; letter-spacing: .26em; color: rgba(216,177,106,.45); }
.boss-headline strong { font-family: var(--serif); font-size: 18px; font-weight: 600; letter-spacing: .14em; color: #f0d7b4; text-shadow: 0 2px 10px #000; }
.boss-headline em { font-style: normal; font-family: var(--display); font-size: 8px; letter-spacing: .18em; color: #d68e86; border: 1px solid rgba(203, 123, 113, .3); padding: 3px 8px; }
.boss-track { position: relative; height: 14px; background: rgba(3,2,4,.86); border: 1px solid rgba(188, 95, 91, .4); box-shadow: 0 0 25px rgba(163, 34, 48, .18), inset 0 2px 8px rgba(0,0,0,.7); overflow: hidden; }
.boss-track::before { content: ""; position: absolute; inset: 3px; z-index: 3; background: repeating-linear-gradient(90deg, transparent 0 77px, rgba(0,0,0,.3) 77px 78px); }
.boss-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 100%; background: linear-gradient(90deg, #3f0b13, #8b1e2b 35%, #d03846 72%, #ff6b70); transition: width .18s linear; z-index: 2; }
.boss-shine { position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 230, 198, .18), transparent); transform: translateX(-100%); animation: boss-shine 4.5s ease-in-out infinite; z-index: 3; }
@keyframes boss-shine { 0%, 55% { transform: translateX(-100%); } 90%, 100% { transform: translateX(100%); } }
.boss-track span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--display); font-size: 9px; color: rgba(255, 225, 210, .7); z-index: 4; letter-spacing: .12em; text-shadow: 0 1px 3px #000; }
#boss-title { text-align: center; margin-top: 4px; font-family: var(--display); font-size: 7px; letter-spacing: .32em; color: rgba(189, 156, 127, .38); }
.combo-hud { position: absolute; right: 42px; bottom: 226px; text-align: right; opacity: 0; transform: translateX(15px); transition: opacity .15s, transform .15s; pointer-events: none; }
.combo-hud.show { opacity: 1; transform: translateX(0); }
.combo-hud.pop .combo-digit { animation: combo-pop .18s ease; }
@keyframes combo-pop { 0% { transform: scale(1.3); } 100% { transform: scale(1); } }
.combo-digit { display: flex; align-items: baseline; justify-content: flex-end; gap: 8px; }
.combo-digit span { font-family: var(--display); font-size: 58px; line-height: .9; color: #f9e4bd; text-shadow: 0 3px 0 #4d1720, 0 0 24px rgba(255, 176, 97, .25); }
.combo-digit small { font-family: var(--display); font-size: 9px; letter-spacing: .2em; color: var(--gold); writing-mode: vertical-rl; }
.combo-hud p { margin-top: 3px; font-family: var(--display); font-size: 7px; letter-spacing: .28em; color: rgba(216,177,106,.36); }
.hud-bottom { position: absolute; left: 0; right: 0; bottom: 16px; display: flex; align-items: flex-end; justify-content: center; gap: 24px; }
.potion-area { position: absolute; left: 38px; bottom: 4px; }
.potion-slot { position: relative; width: 72px; height: 84px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: 1px solid rgba(142, 227, 183, .22); background: linear-gradient(180deg, rgba(16, 34, 26, .6), rgba(5, 8, 6, .75)); color: #9cf2b9; transition: all .2s; }
.potion-slot:hover { border-color: rgba(142, 255, 183, .55); box-shadow: 0 0 22px rgba(94,255,153,.12); }
.potion-icon { width: 36px; height: 36px; }
.potion-icon svg { width: 100%; height: 100%; }
.potion-count { position: absolute; right: 4px; bottom: 3px; font-family: var(--display); font-size: 13px; color: #eaffdf; }
.potion-slot kbd { position: absolute; left: 4px; top: 3px; min-width: 15px; width: 15px; height: 15px; padding: 0; border: 0; background: transparent; font-size: 7px; color: rgba(181, 231, 190, .4); }
.skillbar { display: flex; align-items: flex-end; gap: 8px; position: relative; }
.skillbar::before {
  content: ""; position: absolute; left: 50%; bottom: -10px; transform: translateX(-50%);
  width: 590px; height: 135px;
  background: radial-gradient(ellipse at 50% 100%, rgba(9, 7, 10, .88), transparent 68%);
  z-index: -1; pointer-events: none;
}
.skill-slot {
  position: relative;
  width: 88px; height: 88px;
  border: 1px solid rgba(216, 177, 106, .28);
  background:
    radial-gradient(circle at 50% 30%, rgba(125, 48, 49, .22), transparent 65%),
    linear-gradient(180deg, #181118, #0a070b);
  overflow: hidden;
  box-shadow: inset 0 0 22px rgba(0,0,0,.65), 0 6px 18px rgba(0,0,0,.35);
}
.skill-slot::before { content: ""; position: absolute; inset: 3px; border: 1px solid rgba(255, 222, 172, .08); pointer-events: none; z-index: 4; }
.skill-slot.basic { border-color: rgba(216,177,106,.42); }
.skill-key { position: absolute; left: 5px; top: 4px; z-index: 5; font-family: var(--display); font-size: 9px; letter-spacing: .05em; color: rgba(238, 217, 184, .6); }
.skill-art { position: absolute; inset: 11px 11px 18px; color: #d7ab8f; opacity: .85; filter: drop-shadow(0 0 10px rgba(191, 78, 76, .15)); }
.skill-art svg { width: 100%; height: 100%; }
.skill-name { position: absolute; left: 0; right: 0; bottom: 3px; text-align: center; font-family: var(--serif); font-size: 9px; letter-spacing: .06em; color: rgba(215, 194, 168, .6); z-index: 5; }
.skill-cd { position: absolute; left: 0; right: 0; bottom: 0; height: 0%; background: rgba(2, 2, 4, .8); z-index: 3; pointer-events: none; transition: height .08s linear; }
.skill-timer { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 6; font-family: var(--display); font-size: 20px; color: #f2e0c6; text-shadow: 0 2px 8px #000; opacity: 0; }
.skill-slot.cooldown .skill-timer { opacity: 1; }
.skill-slot.cooldown .skill-art { opacity: .35; filter: grayscale(1); }
.skill-slot.ultimate { width: 102px; height: 102px; border-color: rgba(198, 160, 106, .2); background: radial-gradient(circle at 50% 42%, rgba(93, 34, 86, .26), transparent 65%), linear-gradient(180deg, #151019, #08060b); }
.skill-slot.ultimate .skill-art { color: #d5abd7; opacity: .55; }
.skill-ready { position: absolute; left: 0; right: 0; bottom: 15px; text-align: center; z-index: 5; font-family: var(--display); font-size: 7px; letter-spacing: .2em; color: #ffde9e; opacity: 0; text-shadow: 0 0 10px rgba(255, 183, 94, .8); }
.skill-slot.ultimate.ready { border-color: rgba(255, 207, 130, .65); box-shadow: 0 0 26px rgba(255, 167, 85, .15), inset 0 0 22px rgba(125, 58, 112, .25); }
.skill-slot.ultimate.ready .skill-art { opacity: 1; color: #ffe2ab; animation: ult-breathe 1.6s ease-in-out infinite; }
.skill-slot.ultimate.ready .skill-ready { opacity: 1; }
@keyframes ult-breathe { 0%,100% { filter: drop-shadow(0 0 8px rgba(255,190,120,.4)); transform: scale(1); } 50% { filter: drop-shadow(0 0 20px rgba(255,190,120,.8)); transform: scale(1.04); } }
.hud-controls { position: absolute; right: 38px; bottom: 4px; text-align: right; color: rgba(192, 174, 154, .56); font-size: 10px; line-height: 2; letter-spacing: .04em; }
.hud-controls kbd { min-width: 16px; height: 16px; padding: 0 4px; font-size: 7px; margin: 0 2px; border-color: rgba(216,177,106,.15); color: rgba(216, 194, 158, .55); background: transparent; }
.hud-tip { position: absolute; left: 50%; bottom: 134px; transform: translateX(-50%); color: rgba(239, 214, 177, .7); font-family: var(--serif); font-size: 12px; letter-spacing: .12em; text-shadow: 0 2px 10px #000; opacity: 0; transition: opacity .3s; }
.hud-tip.show { opacity: 1; }
.loot-feed { position: absolute; right: 28px; top: 300px; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }

/* =========================================================================
   BANNER / BOSS INTRO / TOASTS / LEVELUP
   ========================================================================= */
.banner {
  position: absolute;
  left: 50%; top: 250px;
  transform: translate(-50%, 0);
  width: 760px;
  text-align: center;
  z-index: 35;
  pointer-events: none;
  animation: banner-in .6s cubic-bezier(.16,.84,.3,1) both;
}
@keyframes banner-in {
  from { opacity: 0; transform: translate(-50%, 15px); filter: blur(4px); }
  to { opacity: 1; transform: translate(-50%, 0); filter: blur(0); }
}
.banner.out { animation: banner-out .45s ease forwards; }
@keyframes banner-out { to { opacity: 0; transform: translate(-50%, -12px); } }
.banner-flare { position: absolute; left: 50%; top: 20px; width: 620px; height: 200px; transform: translateX(-50%); background: radial-gradient(ellipse at 50% 45%, rgba(165, 48, 61, .18), transparent 68%); z-index: -1; }
.banner-kicker { font-family: var(--display); font-size: 10px; letter-spacing: .48em; color: rgba(216, 177, 106, .7); text-indent: .48em; }
.banner h2 { margin-top: 10px; font-family: var(--serif); font-size: 48px; font-weight: 700; letter-spacing: .2em; text-indent: .2em; color: #f5e3c7; text-shadow: 0 2px 0 #3d1219, 0 0 26px rgba(255, 106, 112, .25), 0 12px 30px #000; }
.banner-rule { display: flex; align-items: center; justify-content: center; gap: 9px; margin-top: 12px; }
.banner-rule i { width: 95px; height: 1px; background: linear-gradient(90deg, transparent, rgba(216,177,106,.55)); }
.banner-rule i:last-child { transform: scaleX(-1); }
.banner-rule span { width: 5px; height: 5px; background: var(--gold); transform: rotate(45deg); box-shadow: 0 0 10px rgba(216,177,106,.5); }
.banner-sub { margin-top: 9px; color: rgba(219, 196, 169, .72); font-size: 11px; letter-spacing: .14em; }
.banner-note { margin-top: 10px; max-width: 620px; margin-left: auto; margin-right: auto; color: rgba(153, 140, 128, .58); font-family: var(--serif); font-size: 12px; line-height: 1.9; letter-spacing: .05em; }
.banner.big { top: 220px; }
.banner.big h2 { font-size: 64px; }
.banner.wave h2 { font-size: 35px; }
.boss-intro {
  position: absolute; inset: 0; z-index: 45;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
  overflow: hidden;
  animation: boss-veil-in .3s ease both;
}
@keyframes boss-veil-in { from { opacity: 0; } to { opacity: 1; } }
.boss-intro-veil { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 45%, rgba(24, 7, 15, .2), rgba(3,2,5,.72) 60%), linear-gradient(90deg, transparent, rgba(55, 15, 27, .25), transparent); backdrop-filter: blur(1px); }
.boss-intro-lines { position: absolute; left: 0; right: 0; top: 50%; height: 180px; transform: translateY(-50%); border-top: 1px solid rgba(211, 137, 118, .2); border-bottom: 1px solid rgba(211, 137, 118, .12); background: repeating-linear-gradient(90deg, transparent 0 160px, rgba(255, 255, 255, .015) 160px 161px); }
.boss-intro-content { position: relative; text-align: center; animation: boss-content-in .7s cubic-bezier(.16,.84,.3,1) both; }
@keyframes boss-content-in { from { opacity: 0; transform: scale(1.08); filter: blur(6px); } to { opacity: 1; transform: scale(1); filter: blur(0); } }
.boss-intro-kicker { color: #ff7a73; font-family: var(--display); font-size: 9px; letter-spacing: .4em; text-indent: .4em; text-shadow: 0 0 20px rgba(255, 58, 72, .5); }
.boss-intro-content h2 { margin-top: 14px; font-family: var(--serif); font-size: 54px; font-weight: 700; letter-spacing: .16em; text-indent: .16em; color: #f7e1c8; text-shadow: 0 2px 0 #1c070a, 0 0 40px rgba(190, 34, 55, .35); }
.boss-intro-en { margin-top: 9px; font-family: var(--display); font-size: 10px; letter-spacing: .44em; color: rgba(216, 177, 106, .5); }
.boss-intro-quote { margin-top: 26px; color: rgba(204, 180, 154, .72); font-family: var(--serif); font-size: 15px; font-style: italic; letter-spacing: .07em; }
.boss-intro-sigil { position: absolute; right: 11%; top: 50%; transform: translateY(-50%); color: rgba(185, 44, 58, .12); font-size: 260px; text-shadow: 0 0 60px rgba(255, 26, 54, .1); }
.toast-stack { position: absolute; right: 32px; bottom: 132px; width: 340px; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; z-index: 60; pointer-events: none; }
.toast {
  width: 100%;
  min-height: 64px;
  display: flex; align-items: center; gap: 11px;
  padding: 9px 12px;
  background: linear-gradient(90deg, rgba(12, 9, 13, .94), rgba(14, 10, 15, .82));
  border: 1px solid rgba(216, 177, 106, .18);
  border-left: 2px solid var(--rc, var(--gold));
  box-shadow: 0 10px 30px rgba(0,0,0,.4), inset 0 0 30px rgba(255,255,255,.015);
  animation: toast-in .32s cubic-bezier(.16,.84,.3,1) both;
  position: relative;
}
.toast.out { animation: toast-out .3s ease forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: translateX(0); } }
@keyframes toast-out { to { opacity: 0; transform: translateX(30px); } }
.toast-icon { width: 46px; height: 46px; flex: none; }
.toast-icon .item-icon-svg { width: 100%; height: 100%; }
.toast-copy { flex: 1; min-width: 0; }
.toast-copy small { display: block; font-size: 8px; letter-spacing: .1em; color: var(--rc, var(--gold)); text-transform: uppercase; }
.toast-copy strong { display: block; margin-top: 2px; font-family: var(--serif); font-size: 14px; font-weight: 500; letter-spacing: .04em; color: #f0e0c8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.toast-copy span { display: block; margin-top: 2px; font-size: 9px; color: var(--muted-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.toast em { align-self: flex-start; font-style: normal; font-size: 7px; letter-spacing: .08em; color: #ffd987; border: 1px solid rgba(255,205,112,.35); padding: 2px 4px; }
.toast.simple { min-height: 44px; border-left-color: var(--gold); }
.toast.simple .toast-copy strong { font-family: var(--sans); font-size: 12px; }
.levelup-pop {
  position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%);
  z-index: 70; text-align: center; pointer-events: none;
  animation: levelup-in 1.8s ease both;
  text-shadow: 0 2px 18px #000;
}
@keyframes levelup-in {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.7); filter: blur(8px); }
  18% { opacity: 1; transform: translate(-50%, -50%) scale(1.02); filter: blur(0); }
  76% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -56%) scale(.98); }
}
.levelup-pop span { font-family: var(--display); font-size: 13px; letter-spacing: .44em; color: var(--gold); text-indent: .44em; }
.levelup-pop strong { display: block; margin-top: 4px; font-family: var(--display); font-size: 74px; font-weight: 400; color: #ffeac5; line-height: 1; letter-spacing: .08em; }
.levelup-pop strong b { font-weight: 400; }
.levelup-pop p { margin-top: 7px; font-family: var(--serif); font-size: 13px; letter-spacing: .16em; color: rgba(236, 214, 181, .7); }
.screen-flash { position: absolute; inset: 0; z-index: 90; background: #fff; opacity: 0; pointer-events: none; transition: opacity .35s ease-out; }

/* =========================================================================
   MODALS
   ========================================================================= */
.modal { position: absolute; inset: 0; z-index: 80; }
.modal-veil { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 45%, rgba(11, 7, 12, .52), rgba(2, 2, 4, .91) 76%); backdrop-filter: blur(5px); }
.modal-frame {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 1420px; height: 826px;
  background:
    linear-gradient(135deg, rgba(25, 19, 24, .97), rgba(10, 8, 11, .985) 42%, rgba(15, 11, 15, .97)),
    repeating-linear-gradient(0deg, rgba(255,255,255,.012) 0 1px, transparent 1px 5px);
  border: 1px solid rgba(216, 177, 106, .26);
  box-shadow: 0 50px 120px rgba(0,0,0,.7), inset 0 0 120px rgba(0,0,0,.45);
  display: flex; flex-direction: column;
  animation: modal-in .4s cubic-bezier(.16,.84,.3,1) both;
}
@keyframes modal-in { from { opacity: 0; transform: translate(-50%, -46%) scale(.985); filter: blur(4px); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); filter: blur(0); } }
.modal-frame::before { content: ""; position: absolute; inset: 8px; border: 1px solid rgba(216,177,106,.06); pointer-events: none; z-index: 0; }
.modal-header { height: 84px; flex: none; border-bottom: 1px solid rgba(216, 177, 106, .16); display: flex; align-items: center; justify-content: space-between; padding: 0 30px; position: relative; z-index: 2; }
.modal-title { display: flex; align-items: center; gap: 14px; }
.title-mark { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border: 1px solid rgba(216,177,106,.28); color: var(--gold); font-family: var(--display); font-size: 15px; transform: rotate(45deg); background: rgba(216,177,106,.025); }
.modal-title h2 { font-family: var(--serif); font-size: 26px; letter-spacing: .18em; font-weight: 700; color: #f2e3ca; }
.modal-title p { margin-top: 4px; font-family: var(--display); font-size: 8px; letter-spacing: .3em; color: var(--muted-2); }
.modal-header-right { display: flex; align-items: center; gap: 20px; }
.bag-gold { display: flex; align-items: baseline; gap: 7px; }
.bag-gold span { color: var(--gold); font-size: 10px; }
.bag-gold b { font-family: var(--display); font-size: 22px; font-weight: 400; color: var(--gold-soft); }
.bag-gold small { font-size: 9px; color: var(--muted-2); }
.codex-header-progress { text-align: right; }
.codex-header-progress span { display: block; color: var(--muted-2); font-size: 8px; letter-spacing: .1em; margin-bottom: 2px; }
.codex-header-progress b { font-family: var(--display); font-weight: 400; font-size: 18px; color: var(--gold-soft); }
.modal-footer { height: 49px; flex: none; border-top: 1px solid rgba(216, 177, 106, .1); display: flex; align-items: center; justify-content: space-between; padding: 0 30px; color: var(--muted-2); font-size: 9px; letter-spacing: .05em; position: relative; z-index: 2; }
.modal-footer kbd { margin-right: 4px; }

/* Bag */
.bag-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 310px minmax(560px, 1fr) 360px; grid-template-rows: minmax(0, 1fr); position: relative; z-index: 2; }
.bag-left { border-right: 1px solid rgba(216,177,106,.1); padding: 18px 18px 16px; display: flex; flex-direction: column; min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(216,177,106,.35) rgba(0,0,0,.14); }
.bag-left::-webkit-scrollbar { width: 8px; }
.bag-left::-webkit-scrollbar-thumb { background: rgba(216,177,106,.28); border-radius: 4px; }
.bag-left::-webkit-scrollbar-track { background: rgba(0,0,0,.14); }
.bag-portrait-frame { position: relative; height: 270px; flex: none; border: 1px solid rgba(216,177,106,.11); overflow: hidden; background: #070509; position: sticky; top: 0; z-index: 3; box-shadow: 0 6px 14px rgba(0,0,0,.35); }
#bag-portrait { width: 100%; height: 100%; object-fit: cover; display: block; }
.bag-equip-head { display: flex; align-items: center; justify-content: space-between; margin: 15px 3px 7px; color: #c9b99f; font-size: 11px; letter-spacing: .12em; }
.bag-equip-head em { font-style: normal; font-family: var(--display); font-size: 10px; color: var(--gold); }
.bag-equip-list { display: flex; flex-direction: column; gap: 3px; flex: none; }
.bag-equip-list .equip-slot { min-height: 46px; padding: 4px 8px; background: transparent; border: 0; border-bottom: 1px solid rgba(255,255,255,.045); gap: 8px; }
.bag-equip-list .equip-slot:hover { background: rgba(255,255,255,.02); }
.bag-equip-list .equip-slot::before { top: 9px; bottom: 9px; width: 1px; }
.bag-equip-list .equip-icon { width: 34px; height: 34px; }
.bag-equip-list .equip-info .slot-name { font-size: 8px; margin-bottom: 1px; }
.bag-equip-list .equip-info strong { font-size: 11px; }
.bag-equip-list .equip-info small { display: none; }
.bag-equip-list .equip-slot .equip-set { display: none; }
.bag-stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin-top: 14px; flex: 1 0 auto; align-content: start; border-top: 1px solid rgba(216,177,106,.08); }
.bag-stats-grid div { display: flex; justify-content: space-between; padding: 4px 7px 4px 0; border-bottom: 1px solid rgba(255,255,255,.035); font-size: 10px; color: var(--muted-2); }
.bag-stats-grid div:nth-child(2n) { padding-left: 10px; border-left: 1px solid rgba(255,255,255,.035); }
.bag-stats-grid b { font-family: var(--display); font-weight: 400; font-size: 11px; color: #d7c8b2; }
.bag-center { display: flex; flex-direction: column; min-width: 0; min-height: 0; border-right: 1px solid rgba(216,177,106,.1); }
.bag-toolbar { display: flex; align-items: center; justify-content: space-between; padding: 17px 20px 11px; flex: none; }
.filter-tabs { display: flex; gap: 0; border: 1px solid rgba(216,177,106,.14); }
.filter-tabs button { height: 30px; padding: 0 14px; font-size: 10px; color: var(--muted); letter-spacing: .07em; border-right: 1px solid rgba(216,177,106,.1); transition: all .2s; }
.filter-tabs button:last-child { border-right: 0; }
.filter-tabs button:hover { color: var(--gold-soft); background: rgba(216,177,106,.04); }
.filter-tabs button.active { color: #f4e3c7; background: rgba(167, 54, 65, .22); }
.sort-row { display: flex; align-items: center; gap: 14px; color: var(--muted-2); font-size: 9px; letter-spacing: .05em; }
.sort-row em { font-style: normal; font-family: var(--display); color: rgba(216,177,106,.55); }
.bag-grid-wrap { flex: 1; overflow-y: auto; padding: 0 18px 18px; min-height: 0; scrollbar-width: thin; scrollbar-color: rgba(216,177,106,.35) rgba(0,0,0,.14); }
.bag-grid-wrap::-webkit-scrollbar { width: 8px; }
.bag-grid-wrap::-webkit-scrollbar-thumb { background: rgba(216,177,106,.28); border-radius: 4px; }
.bag-grid-wrap::-webkit-scrollbar-track { background: rgba(0,0,0,.14); }
.bag-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.bag-item {
  position: relative;
  text-align: left;
  min-height: 132px;
  border: 1px solid rgba(216,177,106,.12);
  background: linear-gradient(180deg, rgba(255,255,255,.025), rgba(0,0,0,.08));
  padding: 9px 9px 8px;
  transition: border-color .18s, background .18s, transform .18s;
  overflow: hidden;
}
.bag-item::before { content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 2px; background: linear-gradient(90deg, var(--rc), transparent 85%); opacity: .65; }
.bag-item:hover { border-color: var(--rc); background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(0,0,0,.14)); transform: translateY(-1px); }
.bag-item.selected { border-color: var(--rc); background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(0,0,0,.14)); box-shadow: inset 0 0 22px color-mix(in srgb, var(--rc) 8%, transparent); }
.bag-item.equipped { opacity: .78; }
.bag-item-icon { width: 65px; height: 65px; margin: 0 auto; display: flex; align-items: center; justify-content: center; }
.bag-item-icon .item-icon-svg { width: 100%; height: 100%; filter: drop-shadow(0 4px 8px rgba(0,0,0,.4)); }
.bag-item-name { display: block; margin-top: 1px; font-family: var(--serif); font-size: 12px; font-weight: 500; letter-spacing: .02em; color: var(--rc); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; }
.bag-item-meta { display: block; margin-top: 3px; text-align: center; font-family: var(--display); font-size: 8px; color: var(--muted-2); letter-spacing: .04em; }
.bag-item-meta em { font-style: normal; color: var(--rc); opacity: .85; }
.equipped-pin, .better-pin { position: absolute; top: 4px; right: 4px; font-size: 7px; letter-spacing: .04em; padding: 2px 4px; border: 1px solid rgba(216,177,106,.28); color: var(--gold); background: rgba(7,5,8,.7); }
.better-pin { left: 4px; right: auto; color: #91efb4; border-color: rgba(121,231,156,.35); }
.bag-item.empty { display: flex; align-items: center; justify-content: center; min-height: 90px; border-style: dashed; opacity: .25; cursor: default; }
.empty-state { text-align: center; padding: 80px 0; color: var(--muted-2); }
.empty-state span { font-size: 42px; color: rgba(216,177,106,.25); }
.empty-state p { margin-top: 12px; color: #a99a87; font-family: var(--serif); font-size: 15px; letter-spacing: .1em; }
.empty-state small { display: block; margin-top: 7px; font-size: 10px; color: var(--muted-2); }
.bag-detail { padding: 0; overflow: hidden; min-height: 0; display: flex; flex-direction: column; }
.detail-placeholder { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--muted-2); }
.detail-placeholder span { font-size: 44px; color: rgba(216,177,106,.24); }
.detail-placeholder p { margin-top: 14px; font-family: var(--serif); font-size: 15px; letter-spacing: .1em; }
.detail-placeholder small { margin-top: 7px; font-size: 10px; color: var(--muted-2); }
.detail-head { display: flex; gap: 14px; align-items: center; padding-bottom: 15px; border-bottom: 1px solid rgba(216,177,106,.12); }
.detail-icon { width: 88px; height: 88px; flex: none; border: 1px solid color-mix(in srgb, var(--rc) 35%, transparent); background: radial-gradient(circle, color-mix(in srgb, var(--rc) 14%, transparent), rgba(0,0,0,.1)); display: flex; align-items: center; justify-content: center; }
.detail-icon .item-icon-svg { width: 92%; height: 92%; }
.rarity-tag { display: inline-block; font-size: 8px; color: var(--rc); border: 1px solid color-mix(in srgb, var(--rc) 40%, transparent); padding: 2px 5px; margin-bottom: 6px; letter-spacing: .08em; }
.detail-titles h3 { font-family: var(--serif); font-size: 20px; font-weight: 500; color: var(--rc); letter-spacing: .04em; line-height: 1.25; }
.detail-titles p { margin-top: 4px; color: var(--muted-2); font-size: 10px; letter-spacing: .05em; }
.detail-score-row { display: flex; align-items: center; justify-content: space-between; margin: 14px 0 8px; }
.detail-score { display: flex; align-items: baseline; gap: 7px; }
.detail-score span { font-size: 9px; color: var(--muted-2); }
.detail-score b { font-family: var(--display); font-weight: 400; font-size: 26px; color: #ecd9bc; }
.compare-pill { font-size: 9px; padding: 3px 7px; border: 1px solid rgba(255,255,255,.1); color: var(--muted); }
.compare-pill.up { color: #89e7a3; border-color: rgba(105,220,135,.35); background: rgba(55,129,73,.1); }
.compare-pill.down { color: #e18888; border-color: rgba(219,102,102,.28); background: rgba(139,47,47,.08); }
.detail-stat-list { border-top: 1px solid rgba(255,255,255,.04); margin-top: 9px; }
.detail-stat-list .stat-line { display: flex; align-items: center; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,.035); font-size: 11px; color: #b3a696; }
.detail-stat-list .stat-line b { font-family: var(--display); font-weight: 400; color: #e4d5bf; letter-spacing: .02em; }
.detail-stat-list .stat-line.base b { color: #d9c4a7; }
.detail-stat-list .affix-line { color: #91c9a4; }
.detail-stat-list .affix-line b { color: #9edcb3; }
.affix-tag { display: inline-block; margin-left: 4px; font-size: 7px; color: rgba(146, 203, 166, .6); border: 1px solid rgba(146, 203, 166, .18); padding: 1px 3px; vertical-align: 1px; }
.detail-subhead { display: flex; justify-content: space-between; align-items: center; margin-top: 17px; color: #c8b9a2; font-family: var(--serif); font-size: 12px; letter-spacing: .08em; }
.detail-subhead em { font-style: normal; font-family: var(--display); font-size: 9px; color: var(--gold); }
.set-bonus-list { margin-top: 7px; border: 1px solid rgba(216,177,106,.1); background: rgba(0,0,0,.15); padding: 8px 10px; }
.set-bonus-item { display: flex; gap: 8px; align-items: flex-start; padding: 5px 0; color: var(--muted-2); font-size: 9px; line-height: 1.5; }
.set-bonus-item .bonus-dot { width: 5px; height: 5px; margin-top: 4px; border-radius: 50%; flex: none; background: rgba(255,255,255,.12); }
.set-bonus-item.active { color: #b2d8b8; }
.set-bonus-item.active .bonus-dot { background: #8fe1a3; box-shadow: 0 0 7px rgba(104,224,135,.7); }
.set-bonus-item b { font-family: var(--display); font-weight: 400; color: #d0bc9f; min-width: 33px; }
.set-bonus-item.active b { color: #91dba1; }
.detail-actions { display: flex; gap: 6px; flex-wrap: wrap; flex: none; position: relative; z-index: 8; padding: 12px 20px 14px; background: rgba(9,7,10,.97); border-top: 1px solid rgba(216,177,106,.14); box-shadow: 0 -14px 30px rgba(0,0,0,.28); }
.detail-actions .btn { flex: 1 1 45%; min-height: 42px; font-size: 12px; letter-spacing: .08em; }
.detail-actions .btn-primary { flex-basis: 100%; min-height: 48px; }
.detail-actions .btn-main { font-size: 14px; }
.detail-note { margin-top: 10px; color: var(--muted-2); font-size: 9px; line-height: 1.7; }
.upgrade-row { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; border-top: 1px solid rgba(255,255,255,.04); padding-top: 10px; }
.upgrade-row span { font-size: 9px; color: var(--muted-2); }
.upgrade-row b { font-family: var(--display); font-weight: 400; font-size: 13px; color: var(--gold-soft); }
.detail-actions .btn:disabled { opacity: .35; cursor: not-allowed; }
.detail-actions .danger-btn { border-color: rgba(183,65,75,.25); color: #b88383; flex-basis: 100%; min-height: 34px; font-size: 10px; }
.detail-actions .danger-btn:hover { color: #ffc1c1; border-color: rgba(255,90,100,.5); background: rgba(120,20,30,.12); }
.equip-tag-current { color: var(--gold); font-size: 8px; border: 1px solid rgba(216,177,106,.3); padding: 2px 5px; }

/* Codex */
.codex-frame { width: 1380px; height: 830px; }
.codex-progressbar { height: 4px; flex: none; background: rgba(255,255,255,.04); position: relative; z-index: 2; margin: 0 30px; }
.codex-progressbar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #7b2635, var(--gold)); box-shadow: 0 0 12px rgba(216,177,106,.35); transition: width .4s; }
.codex-progressbar span { position: absolute; right: 0; top: 7px; font-family: var(--display); font-size: 9px; color: var(--muted-2); letter-spacing: .05em; }
.codex-body { flex: 1; display: grid; grid-template-columns: 1.3fr 1fr; gap: 0; min-height: 0; position: relative; z-index: 2; }
.codex-list { padding: 22px 22px; display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: 92px; gap: 9px; overflow-y: auto; border-right: 1px solid rgba(216,177,106,.1); align-content: start; }
.codex-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 12px;
  border: 1px solid rgba(216,177,106,.1);
  background: linear-gradient(90deg, color-mix(in srgb, var(--sc) 5%, transparent), rgba(0,0,0,.06));
  text-align: left;
  transition: all .2s;
  overflow: hidden;
}
.codex-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--sc); opacity: .5; }
.codex-card:hover { border-color: color-mix(in srgb, var(--sc) 55%, transparent); background: linear-gradient(90deg, color-mix(in srgb, var(--sc) 10%, transparent), rgba(0,0,0,.06)); }
.codex-card.active { border-color: var(--sc); background: linear-gradient(90deg, color-mix(in srgb, var(--sc) 13%, transparent), rgba(0,0,0,.08)); }
.codex-card-icon { width: 64px; height: 64px; flex: none; opacity: .9; }
.codex-card-icon .item-icon-svg { width: 100%; height: 100%; }
.codex-card-body { flex: 1; min-width: 0; }
.codex-card-body strong { display: block; font-family: var(--serif); font-size: 14px; font-weight: 500; color: color-mix(in srgb, var(--sc) 50%, #f1e2cc); letter-spacing: .06em; text-shadow: 0 1px 4px rgba(0,0,0,.55); }
.codex-card.active .codex-card-body strong { color: var(--sc); }
.codex-card-body small { display: block; margin-top: 3px; font-family: var(--display); font-size: 7px; letter-spacing: .18em; color: var(--muted-2); }
.codex-mini-bar { display: flex; gap: 3px; margin-top: 7px; }
.codex-mini-bar i { width: 13px; height: 3px; background: rgba(255,255,255,.08); }
.codex-mini-bar i.on { background: var(--sc); box-shadow: 0 0 6px color-mix(in srgb, var(--sc) 50%, transparent); }
.codex-card-progress { align-self: flex-start; font-family: var(--display); font-size: 10px; color: #c0ad95; }
.codex-detail { padding: 24px 28px; overflow-y: auto; min-height: 0; }
.codex-banner { position: relative; display: flex; align-items: center; gap: 18px; border: 1px solid color-mix(in srgb, var(--sc) 22%, transparent); background: linear-gradient(100deg, color-mix(in srgb, var(--sc) 9%, transparent), rgba(0,0,0,.08)); padding: 16px 18px; }
.codex-banner-icon { width: 82px; height: 82px; flex: none; }
.codex-banner-icon .item-icon-svg { width: 100%; height: 100%; }
.codex-banner h2 { font-family: var(--serif); font-size: 26px; font-weight: 600; letter-spacing: .12em; color: var(--sc); }
.codex-banner p { margin-top: 5px; font-family: var(--display); font-size: 8px; letter-spacing: .24em; color: var(--muted-2); }
.codex-banner small { display: block; margin-top: 7px; font-size: 9px; color: var(--muted); letter-spacing: .06em; }
.codex-lore { padding: 15px 0 13px; color: #988b7d; font-family: var(--serif); font-size: 12px; line-height: 1.9; letter-spacing: .04em; border-bottom: 1px solid rgba(216,177,106,.09); }
.codex-pieces { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; margin-top: 14px; }
.codex-piece { text-align: center; border: 1px solid rgba(255,255,255,.06); padding: 6px 3px; }
.codex-piece .codex-piece-icon { width: 48px; height: 48px; margin: 0 auto; opacity: .25; filter: grayscale(1); }
.codex-piece.owned .codex-piece-icon { opacity: 1; filter: none; }
.codex-piece span { display: block; margin-top: 3px; font-size: 8px; color: #a99a88; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.codex-piece.owned span { color: var(--sc); }
.codex-piece em { display: block; margin-top: 2px; font-style: normal; font-size: 7px; color: var(--muted-2); }
.codex-bonuses { margin-top: 16px; }
.codex-bonuses h3 { font-family: var(--serif); font-size: 12px; color: #cbb9a0; letter-spacing: .1em; font-weight: 400; margin-bottom: 7px; }
.codex-bonus { display: flex; gap: 9px; align-items: flex-start; border-bottom: 1px solid rgba(255,255,255,.035); padding: 6px 0; color: var(--muted-2); font-size: 9px; line-height: 1.6; }
.codex-bonus b { flex: none; font-family: var(--display); font-weight: 400; font-size: 9px; color: #c6b397; width: 29px; }
.codex-bonus.active { color: #acd7b1; }
.codex-bonus.active b { color: #8edb9e; }
.codex-special { margin-top: 12px; border: 1px dashed color-mix(in srgb, var(--sc) 35%, transparent); padding: 10px 11px; color: var(--sc); font-size: 10px; line-height: 1.6; }

/* Help */
.help-frame { width: 1180px; height: 690px; }
.help-body { flex: 1; display: grid; grid-template-columns: 1fr 1.17fr .95fr; min-height: 0; position: relative; z-index: 2; }
.help-body > section { padding: 26px 28px; border-right: 1px solid rgba(216,177,106,.1); }
.help-body > section:last-child { border-right: 0; }
.help-body h3 { font-family: var(--serif); font-size: 17px; font-weight: 500; letter-spacing: .12em; color: #dfc7a6; margin-bottom: 17px; }
.key-row { display: flex; align-items: center; gap: 5px; min-height: 36px; border-bottom: 1px solid rgba(255,255,255,.035); }
.key-row span { margin-left: 8px; font-size: 10px; color: var(--muted); line-height: 1.5; }
.help-systems ul { list-style: none; }
.help-systems li { position: relative; padding: 0 0 13px 15px; color: #a39789; font-size: 11px; line-height: 1.8; }
.help-systems li::before { content: "◆"; position: absolute; left: 0; top: 3px; font-size: 6px; color: rgba(216,177,106,.55); }
.help-systems b { color: #d1bea4; font-weight: 500; }
.help-set-list { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.help-set-list span { display: block; padding: 8px 9px; border: 1px solid rgba(216,177,106,.09); background: rgba(255,255,255,.018); color: #b2a28f; font-family: var(--serif); font-size: 11px; letter-spacing: .06em; }

/* Pause */
.pause-modal { z-index: 85; }
.pause-frame {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 500px;
  padding: 40px 44px 32px;
  text-align: center;
  background: linear-gradient(140deg, rgba(24,17,23,.97), rgba(8,6,10,.985));
  border: 1px solid rgba(216,177,106,.3);
  box-shadow: 0 40px 100px rgba(0,0,0,.7), inset 0 0 80px rgba(0,0,0,.4);
  animation: modal-in .3s ease both;
}
.pause-frame::before { content: ""; position: absolute; inset: 7px; border: 1px solid rgba(216,177,106,.08); pointer-events: none; }
.pause-kicker { font-family: var(--display); font-size: 8px; letter-spacing: .4em; color: rgba(216,177,106,.5); }
.pause-frame h2 { margin-top: 8px; font-family: var(--serif); font-size: 38px; font-weight: 700; letter-spacing: .22em; text-indent: .22em; color: #f1dfc5; }
.pause-sub { margin-top: 9px; color: var(--muted-2); font-family: var(--serif); font-size: 11px; letter-spacing: .04em; }
.pause-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 27px; }
.pause-actions .btn { width: 100%; }
.pause-actions .btn-primary { min-height: 62px; }
.pause-footer { display: flex; justify-content: center; gap: 30px; margin-top: 23px; padding-top: 17px; border-top: 1px solid rgba(216,177,106,.1); }
.pause-footer .text-nav { align-items: center; }

/* Result */
.result-screen { position: absolute; inset: 0; z-index: 88; display: flex; align-items: center; justify-content: center; }
.result-veil { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 45%, rgba(24, 15, 18, .4), rgba(2, 2, 4, .93) 72%); backdrop-filter: blur(4px); }
.result-glow { position: absolute; left: 50%; top: 46%; width: 1000px; height: 650px; transform: translate(-50%, -50%); background: radial-gradient(ellipse, rgba(144, 72, 44, .14), transparent 65%); pointer-events: none; }
.result-panel {
  position: relative;
  width: 1080px;
  max-height: 820px;
  padding: 36px 48px 28px;
  text-align: center;
  background: linear-gradient(180deg, rgba(21, 15, 18, .94), rgba(8, 6, 9, .97));
  border: 1px solid rgba(216, 177, 106, .28);
  box-shadow: 0 40px 100px rgba(0,0,0,.65), inset 0 0 100px rgba(0,0,0,.4);
  animation: result-in .6s cubic-bezier(.16,.84,.3,1) both;
}
.result-panel::before { content: ""; position: absolute; inset: 8px; border: 1px solid rgba(216,177,106,.07); pointer-events: none; }
@keyframes result-in { from { opacity: 0; transform: translateY(18px) scale(.985); filter: blur(6px); } to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); } }
.result-kicker { font-family: var(--display); font-size: 10px; letter-spacing: .5em; color: var(--gold); text-indent: .5em; }
.result-title { margin-top: 6px; font-family: var(--serif); font-size: 50px; font-weight: 700; letter-spacing: .2em; text-indent: .2em; color: #f3e2c8; text-shadow: 0 3px 0 #270b0f, 0 0 30px rgba(255,171,95,.15); }
.result-screen.defeat .result-kicker { color: #e2898f; }
.result-screen.defeat .result-title { color: #e6c7c7; text-shadow: 0 3px 0 #23070c, 0 0 30px rgba(214,67,83,.2); }
.result-sub { margin-top: 7px; color: #a89580; font-family: var(--serif); font-size: 12px; letter-spacing: .12em; }
.result-badges { display: flex; justify-content: center; gap: 8px; margin-top: 15px; flex-wrap: wrap; }
.result-badge { font-size: 9px; letter-spacing: .06em; padding: 4px 9px; border: 1px solid rgba(216,177,106,.25); color: var(--gold); background: rgba(216,177,106,.04); }
.result-badge.green { color: #8fe0a1; border-color: rgba(116,220,139,.3); }
.result-badge.red { color: #e78d98; border-color: rgba(212,102,114,.3); }
.result-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; background: rgba(216,177,106,.1); border: 1px solid rgba(216,177,106,.1); margin-top: 22px; }
.result-stats div { background: rgba(10,8,11,.85); padding: 13px 8px; }
.result-stats span { display: block; font-size: 8px; color: var(--muted-2); letter-spacing: .1em; margin-bottom: 3px; }
.result-stats b { font-family: var(--display); font-weight: 400; font-size: 23px; color: #e6d3b7; }
.result-loot-wrap { margin-top: 24px; text-align: left; }
.result-loot-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 9px; padding-bottom: 7px; border-bottom: 1px solid rgba(216,177,106,.1); }
.result-loot-head span { font-family: var(--serif); color: #d8c4a8; font-size: 14px; letter-spacing: .1em; }
.result-loot-head em { font-style: normal; font-family: var(--display); font-size: 9px; color: var(--gold); }
.result-loot { display: flex; gap: 8px; min-height: 156px; overflow: hidden; }
.result-item { position: relative; flex: 1; max-width: 250px; min-width: 0; border: 1px solid rgba(216,177,106,.15); background: linear-gradient(180deg, rgba(255,255,255,.026), rgba(0,0,0,.1)); padding: 11px 10px 9px; text-align: center; }
.result-item::before { content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 2px; background: linear-gradient(90deg, var(--rc), transparent); }
.result-icon { width: 82px; height: 82px; margin: 0 auto; }
.result-icon .item-icon-svg { width: 100%; height: 100%; }
.result-item strong { display: block; margin-top: 2px; font-family: var(--serif); font-size: 13px; font-weight: 500; color: var(--rc); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.result-item small { display: block; margin-top: 3px; font-size: 8px; color: var(--muted-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.result-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--muted-2); border: 1px dashed rgba(216,177,106,.12); min-height: 156px; }
.result-empty span { font-size: 28px; color: rgba(216,177,106,.25); }
.result-empty p { margin-top: 8px; font-size: 11px; }
.result-actions { display: flex; justify-content: center; gap: 10px; margin-top: 24px; }
.result-actions .btn-primary { min-width: 310px; }
.result-actions .btn-line { min-width: 170px; }
.result-hint { margin-top: 12px; color: var(--muted-2); font-size: 9px; letter-spacing: .04em; min-height: 13px; }

/* scrollbars */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: rgba(0,0,0,.2); }
::-webkit-scrollbar-thumb { background: rgba(216,177,106,.18); border: 2px solid rgba(0,0,0,.2); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(216,177,106,.3); }

/* rotate hint */
.rotate-hint { position: absolute; inset: 0; z-index: 120; display: flex; flex-direction: column; align-items: center; justify-content: center; background: #070509; color: var(--gold); }
.rotate-hint p { font-family: var(--serif); font-size: 26px; letter-spacing: .2em; }
.rotate-hint small { margin-top: 10px; color: var(--muted-2); font-size: 11px; }

/* utility */
.text-gold { color: var(--gold); }
.text-muted { color: var(--muted); }
.mono { font-family: var(--display); }


/* ===== late polish & dynamic components ===== */
.equip-slot { width: 100%; text-align: left; font: inherit; color: inherit; }
button.equip-slot { appearance: none; }
.bag-item { font-family: inherit; color: inherit; }
.wave-dots b.current { color: #ff8190; text-shadow: 0 0 8px rgba(255,90,110,.35); }
.boss-bar.phase-two .boss-headline em { color: #ffb18f; border-color: rgba(255,126,105,.45); }
.boss-bar.phase-two .boss-track { border-color: rgba(255,111,100,.55); box-shadow: 0 0 32px rgba(207, 39, 58, .25), inset 0 2px 8px rgba(0,0,0,.7); }
.boss-bar.phase-two .boss-fill { background: linear-gradient(90deg, #4a0c13, #a72c2c 35%, #f05c4a 72%, #ffd177); }
#hud.low-hp .health-bar { border-color: rgba(255, 99, 99, .5); box-shadow: 0 0 20px rgba(255, 42, 53, .16), inset 0 2px 8px rgba(0,0,0,.65); }
#hud.low-hp .health-fill { animation: low-hp-pulse 1.2s ease-in-out infinite; }
@keyframes low-hp-pulse { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.4); } }
.skill-slot.cooldown .skill-name { color: rgba(158, 146, 133, .35); }
.skill-slot.ready-glow { box-shadow: 0 0 24px rgba(255, 186, 103, .2); }
.result-item { flex: 1 1 0; }
.result-item:nth-child(5) { max-width: 250px; }
.text-nav.active { color: var(--gold-soft); }
@media (max-height: 760px) {
  .title-cn { font-size: 98px; }
}


/* boss encounter declutter */
#hud.boss-mode .objective-row,
#hud.boss-mode .wave-dots { opacity: 0; visibility: hidden; }
#hud.boss-mode .boss-bar { top: 88px; }
#hud.boss-mode .hud-center { width: 620px; }
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

.skill-slot, .potion-slot { pointer-events: auto; cursor: pointer; }
.skill-slot:hover { border-color: rgba(248, 216, 164, .5); box-shadow: inset 0 0 22px rgba(0,0,0,.65), 0 0 26px rgba(220, 177, 116, .08); }
.skill-slot:active { transform: translateY(1px); }

.detail-scroll { flex: 1; overflow-y: auto; min-height: 0; padding: 20px 20px 10px; scrollbar-width: thin; scrollbar-color: rgba(216,177,106,.35) rgba(0,0,0,.14); }
.detail-scroll::-webkit-scrollbar { width: 8px; }
.detail-scroll::-webkit-scrollbar-thumb { background: rgba(216,177,106,.28); border-radius: 4px; }
.detail-scroll::-webkit-scrollbar-track { background: rgba(0,0,0,.14); }
.detail-placeholder { height: 100%; margin: 20px; }
.detail-actions .btn { min-height: 40px; }

#stage, #game { touch-action: none; }
.detail-scroll { scrollbar-color: rgba(216,177,106,.35) rgba(0,0,0,.12); }
.detail-actions .danger-btn { flex-basis: 45%; min-height: 40px; }
.detail-actions .btn-line { flex: 1 1 45%; }


/* =========================================================================
   TOUCH / MOBILE
   ========================================================================= */
.touch-ui { display: none; position: absolute; inset: 0; pointer-events: none; z-index: 5; }
body.touch .touch-ui { display: block; }
body.touch .hud-bottom { display: none !important; }
body.touch .hud-controls { display: none; }
body.touch .hud-right { transform: scale(1.06); transform-origin: top right; gap: 9px; }
body.touch .hud-icon-btn { width: 84px; height: 84px; }
body.touch .hud-icon-btn svg { width: 32px; height: 32px; }
body.touch .hud-icon-btn small { font-size: 9px; }
body.touch .hud-gold { min-width: 78px; height: 62px; }
body.touch .hud-gold b { font-size: 24px; }
body.touch .hud-right { gap: 8px; }
body.touch .hud-name-row strong { font-size: 23px; }
body.touch .hud-name-row span { font-size: 10px; }
body.touch .health-bar { height: 24px; }
body.touch .health-text { font-size: 13px; }
body.touch .objective-row p { font-size: 21px; }
body.touch .objective-alive { font-size: 12px; }
body.touch .depth-label { font-size: 12px; }
body.touch .depth-label b { font-size: 18px; }
body.touch .depth-label em { font-size: 15px; }
body.touch .objective-row { gap: 10px; margin-top: 11px; }
body.touch .hud-left { transform: scale(1.04); transform-origin: top left; }
body.touch .hud-center { transform: translateX(-50%) scale(1.06); transform-origin: top center; }
body.touch .boss-bar { transform: translateX(-50%) scale(1.06); transform-origin: top center; }
body.touch .combo-hud { top: 175px; bottom: auto; right: 28px; transform: scale(.86); transform-origin: top right; }
body.touch .combo-hud.show { transform: scale(.86); }
body.touch .toast-stack { bottom: 385px; right: 28px; width: 300px; }
body.touch .hud-tip { bottom: 375px; }
body.touch .levelup-pop { top: 38%; }

.touch-joystick {
  position: absolute; left: 48px; bottom: 66px;
  width: 226px; height: 226px;
  border-radius: 50%;
  pointer-events: auto; touch-action: none;
  background:
    radial-gradient(circle at 50% 48%, rgba(27, 25, 32, .34) 0 30%, rgba(8, 7, 11, .22) 62%, rgba(3, 3, 5, .08) 72%),
    radial-gradient(circle at 50% 50%, transparent 0 63%, rgba(216, 177, 106, .08) 64%, transparent 70%);
  border: 1px solid rgba(219, 184, 126, .22);
  box-shadow: 0 12px 40px rgba(0, 0, 0, .25), inset 0 0 30px rgba(223, 192, 140, .035);
  transition: border-color .2s, box-shadow .2s;
  -webkit-user-select: none; user-select: none;
}
.touch-joystick.active { border-color: rgba(255, 221, 166, .6); box-shadow: 0 0 35px rgba(212, 166, 94, .12), inset 0 0 40px rgba(220, 179, 122, .06); }
.joy-halo { position: absolute; inset: 22px; border-radius: 50%; border: 1px solid rgba(216, 177, 106, .12); background: radial-gradient(circle at 50% 50%, transparent 38%, rgba(255,255,255,.018) 39%, transparent 60%); }
.joy-halo::after { content: ""; position: absolute; inset: 25px; border-radius: 50%; border: 1px dashed rgba(216, 177, 106, .11); }
.joy-cross { position: absolute; inset: 0; border-radius: 50%; opacity: .44; }
.joy-cross::before, .joy-cross::after { content: ""; position: absolute; background: linear-gradient(90deg, transparent, rgba(216,177,106,.28), transparent); }
.joy-cross::before { left: 34px; right: 34px; top: 50%; height: 1px; }
.joy-cross::after { top: 34px; bottom: 34px; left: 50%; width: 1px; background: linear-gradient(0deg, transparent, rgba(216,177,106,.28), transparent); }
.joy-knob {
  position: absolute; left: 50%; top: 50%;
  width: 96px; height: 96px; border-radius: 50%;
  transform: translate(-50%, -50%);
  background:
    radial-gradient(circle at 38% 32%, rgba(255, 237, 207, .25), transparent 30%),
    radial-gradient(circle at 50% 50%, #332a2d 0 48%, #171319 72%);
  border: 1px solid rgba(238, 207, 155, .55);
  box-shadow: 0 8px 22px rgba(0,0,0,.5), inset 0 0 20px rgba(255, 199, 122, .08);
  z-index: 2;
}
.joy-knob i { position: absolute; left: 50%; top: 50%; width: 20px; height: 20px; transform: translate(-50%,-50%) rotate(45deg); border: 1px solid rgba(255, 223, 172, .65); background: rgba(216,177,106,.16); }
.joy-knob i::after { content: ""; position: absolute; inset: 4px; background: rgba(255, 220, 159, .5); }
.touch-joystick em { position: absolute; left: 0; right: 0; bottom: 16px; text-align: center; font-family: var(--display); font-size: 12px; letter-spacing: .3em; font-style: normal; color: rgba(223, 192, 147, .38); text-indent: .3em; }

.touch-actions { position: absolute; right: 34px; bottom: 32px; width: 455px; height: 365px; pointer-events: none; }
.touch-btn {
  position: absolute; pointer-events: auto; touch-action: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  border-radius: 50%;
  color: #ebdcc5;
  border: 1px solid rgba(222, 186, 128, .38);
  background:
    radial-gradient(circle at 50% 30%, rgba(255, 218, 164, .08), transparent 55%),
    radial-gradient(circle at 50% 52%, rgba(44, 32, 37, .92), rgba(8, 7, 10, .9) 72%);
  box-shadow: 0 12px 30px rgba(0,0,0,.38), inset 0 0 28px rgba(0,0,0,.55);
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  transition: transform .08s ease, filter .08s ease, border-color .15s;
}
.touch-btn::before { content: ""; position: absolute; inset: 7px; border-radius: 50%; border: 1px solid rgba(255, 225, 181, .11); pointer-events: none; }
.touch-btn .touch-ico { position: relative; z-index: 2; width: 48%; height: 48%; color: #d8b990; filter: drop-shadow(0 0 8px rgba(232,190,130,.13)); }
.touch-btn .touch-ico svg { width: 100%; height: 100%; display: block; }
.touch-name { position: relative; z-index: 2; margin-top: 2px; font-family: var(--serif); font-size: 18px; font-weight: 500; letter-spacing: .1em; color: rgba(244, 224, 196, .82); }
.touch-btn:active, .touch-btn.pressed { transform: scale(.94); filter: brightness(1.28); border-color: rgba(255, 218, 156, .72); }
.touch-attack {
  right: 8px; bottom: 0; width: 170px; height: 170px;
  background:
    radial-gradient(circle at 48% 28%, rgba(255, 187, 132, .18), transparent 50%),
    radial-gradient(circle at 50% 52%, #5b2029, #170b10 72%);
  border-color: rgba(236, 182, 125, .65);
  box-shadow: 0 14px 38px rgba(0,0,0,.4), 0 0 36px rgba(191, 62, 69, .12), inset 0 0 40px rgba(255, 126, 95, .07);
}
.touch-attack .touch-ico { width: 52%; height: 52%; color: #ffe3bb; }
.touch-attack .touch-name { font-size: 24px; color: rgba(255, 240, 218, .95); letter-spacing: .18em; }
.touch-ring { position: absolute; inset: 11px; border-radius: 50%; border: 1px solid rgba(255, 226, 180, .18); }
.touch-ring::before { content: ""; position: absolute; inset: -1px; border-radius: 50%; border-top: 1px solid rgba(255, 233, 194, .5); transform: rotate(-38deg); }
.touch-dash { right: 204px; bottom: 6px; width: 116px; height: 116px; }
.touch-skill { right: 199px; bottom: 143px; width: 126px; height: 126px; border-color: rgba(197, 162, 230, .34); }
.touch-skill .touch-ico { color: #d6c1f0; }
.touch-ult { right: 55px; bottom: 198px; width: 124px; height: 124px; border-color: rgba(255, 212, 151, .3); }
.touch-ult .touch-ico { color: #f1d3a0; opacity: .6; }
.touch-ult.ready { border-color: rgba(255, 222, 159, .8); box-shadow: 0 0 38px rgba(255, 186, 97, .2), inset 0 0 30px rgba(141, 71, 115, .25); }
.touch-ult.ready .touch-ico { opacity: 1; animation: touch-ult-pulse 1.6s ease-in-out infinite; }
@keyframes touch-ult-pulse { 0%,100% { filter: drop-shadow(0 0 6px rgba(255,198,121,.3)); } 50% { filter: drop-shadow(0 0 18px rgba(255,198,121,.8)); } }
.touch-ready { position: relative; z-index: 2; display: none; margin-top: 1px; font-family: var(--display); font-size: 10px; letter-spacing: .2em; color: #ffdf9d; }
.touch-ult.ready .touch-ready { display: block; }
.touch-potion { right: 324px; bottom: 154px; width: 86px; height: 86px; color: #91e7b0; border-color: rgba(116, 220, 158, .32); }
.touch-potion .touch-ico { color: #8df2b0; width: 48%; height: 48%; }
.touch-potion .touch-name { font-size: 14px; color: rgba(159, 235, 185, .68); }
.touch-count { position: absolute; right: 5px; bottom: 8px; z-index: 3; font-family: var(--display); font-weight: 400; font-size: 20px; color: #ecffe2; }
.touch-potion.empty { opacity: .38; }
.touch-cd { position: absolute; left: 0; right: 0; bottom: 0; height: 0%; z-index: 1; background: rgba(3, 3, 5, .78); pointer-events: none; }
.touch-timer { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 4; font-family: var(--display); font-size: 30px; color: #f5e8d2; text-shadow: 0 2px 8px #000; opacity: 0; }
.touch-btn.cooldown .touch-timer { opacity: 1; }
.touch-btn.cooldown .touch-ico { opacity: .28; filter: grayscale(1); }
.touch-btn.pressed .touch-ring { border-color: rgba(255, 244, 218, .5); }
.touch-hint {
  position: absolute; left: 62px; bottom: 315px;
  color: rgba(226, 202, 167, .62); font-size: 17px; letter-spacing: .06em;
  text-shadow: 0 2px 8px #000; pointer-events: none;
  animation: touch-hint-fade 6s ease forwards;
}
@keyframes touch-hint-fade { 0%, 70% { opacity: .85; } 100% { opacity: 0; } }

.impact-flash {
  position: absolute; inset: 0; z-index: 3; pointer-events: none; opacity: 0;
  background:
    radial-gradient(ellipse at 50% 50%, transparent 38%, rgba(255, 214, 155, .21) 78%, rgba(255, 191, 123, .36) 100%);
  mix-blend-mode: screen;
}
body.touch .impact-flash { background: radial-gradient(ellipse at 50% 50%, transparent 30%, rgba(255, 211, 147, .26) 76%, rgba(255, 176, 102, .42) 100%); }

.rotate-hint {
  position: fixed; inset: 0; z-index: 300;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background:
    radial-gradient(ellipse at 50% 45%, rgba(58, 31, 37, .35), transparent 58%),
    #070509;
  color: var(--gold);
}
.rotate-hint .rotate-glyph {
  display: flex; align-items: center; justify-content: center;
  width: 92px; height: 92px; margin-bottom: 18px;
  border: 1px solid rgba(216, 177, 106, .28); border-radius: 50%;
  font-family: var(--display); font-size: 48px; color: #e4c58f;
  animation: rotate-hint-spin 2.8s ease-in-out infinite;
}
@keyframes rotate-hint-spin { 0%, 20% { transform: rotate(0deg); } 55%, 100% { transform: rotate(90deg); } }
.rotate-hint p { font-family: var(--serif); font-size: clamp(24px, 6vw, 38px); letter-spacing: .2em; text-indent: .2em; color: #f2d9b0; }
.rotate-hint small { margin-top: 12px; padding: 0 32px; color: rgba(196, 177, 152, .62); font-size: clamp(12px, 3.2vw, 16px); line-height: 1.8; text-align: center; letter-spacing: .05em; }

@media (hover: none), (pointer: coarse) {
  .hud-controls { display: none; }
}


/* =========================================================================
   MOBILE PORTRAIT / FULLSCREEN / FIXED CONTROLS — v2
   ========================================================================= */
html, body { overscroll-behavior: none; }
#app { overflow: hidden; }

body.touch {
  --atk: clamp(78px, 20vh, 98px);
  --joy: clamp(100px, 26vh, 140px);
  --safe-r: max(14px, env(safe-area-inset-right));
  --safe-b: max(16px, env(safe-area-inset-bottom));
}
body.touch.portrait {
  --atk: clamp(78px, 19vw, 100px);
  --joy: clamp(98px, 25vw, 122px);
  --safe-r: max(12px, env(safe-area-inset-right));
  --safe-b: max(18px, env(safe-area-inset-bottom));
}
body.touch .hud-right { display: none !important; }
body.touch.portrait .hud-left,
body.touch.portrait .hud-center,
body.touch.portrait .boss-bar,
body.touch.portrait .combo-hud,
body.touch.portrait .toast-stack,
body.touch.portrait .hud-tip,
body.touch.portrait .loot-feed { display: none !important; }

/* the controls live outside the scaled 1600x900 stage now */
body.touch .touch-ui,
body.touch.playing .touch-ui {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: none;
  pointer-events: none;
}
body.touch.playing .touch-ui:not(.hidden) { display: block; }
.touch-ui .touch-joystick {
  position: fixed;
  left: max(16px, env(safe-area-inset-left));
  bottom: var(--safe-b);
  width: var(--joy);
  height: var(--joy);
  border-width: 1px;
}
.touch-ui .touch-actions {
  position: fixed;
  inset: 0;
  width: auto;
  height: auto;
  pointer-events: none;
}
.touch-ui .touch-btn {
  position: fixed;
  width: var(--atk);
  height: var(--atk);
  border-radius: 50%;
  box-shadow: 0 8px 20px rgba(0,0,0,.42), inset 0 0 20px rgba(0,0,0,.55);
}
.touch-ui .touch-attack { right: var(--safe-r); bottom: var(--safe-b); }
.touch-ui .touch-skill {
  right: calc(var(--safe-r) + var(--atk) * 1.02);
  bottom: calc(var(--safe-b) + var(--atk) * 0.02);
  width: calc(var(--atk) * 0.72);
  height: calc(var(--atk) * 0.72);
}
.touch-ui .touch-dash {
  right: calc(var(--safe-r) + var(--atk) * 1.06);
  bottom: calc(var(--safe-b) + var(--atk) * 0.78);
  width: calc(var(--atk) * 0.64);
  height: calc(var(--atk) * 0.64);
}
.touch-ui .touch-ult {
  right: calc(var(--safe-r) + var(--atk) * 0.26);
  bottom: calc(var(--safe-b) + var(--atk) * 1.12);
  width: calc(var(--atk) * 0.68);
  height: calc(var(--atk) * 0.68);
}
.touch-ui .touch-potion {
  right: calc(var(--safe-r) + var(--atk) * 1.82);
  bottom: calc(var(--safe-b) + var(--atk) * 0.06);
  width: calc(var(--atk) * 0.52);
  height: calc(var(--atk) * 0.52);
}
.touch-ui .touch-attack .touch-ico { width: 52%; height: 52%; }
.touch-ui .touch-attack .touch-name {
  font-size: clamp(14px, 2.5vh, 18px);
  letter-spacing: .14em;
}
.touch-ui .touch-skill .touch-ico,
.touch-ui .touch-dash .touch-ico,
.touch-ui .touch-ult .touch-ico { width: 46%; height: 46%; }
.touch-ui .touch-name { font-size: clamp(10px, 1.6vh, 13px); }
.touch-ui .touch-potion .touch-name { font-size: clamp(8px, 1.25vh, 10px); }
.touch-ui .touch-count { font-size: clamp(13px, 2.1vh, 17px); right: 5px; bottom: 5px; }
.touch-ui .touch-timer { font-size: clamp(16px, 3vh, 23px); }
.touch-ui .touch-ready { font-size: clamp(6px, 1.1vh, 8px); }
.touch-ui .touch-joystick em { font-size: clamp(8px, 1.4vh, 10px); bottom: 10px; }
.touch-ui .touch-hint {
  left: calc(max(18px, env(safe-area-inset-left)) + 4px);
  bottom: calc(var(--safe-b) + var(--joy) + 12px);
  font-size: clamp(10px, 1.6vh, 12px);
}
body.touch.portrait .touch-hint {
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(var(--safe-b) + var(--joy) + 14px);
  white-space: nowrap;
}
body.touch.portrait .touch-ui .touch-joystick {
  left: max(14px, env(safe-area-inset-left));
}
body.touch.portrait .touch-ui .touch-actions { inset: 0; }
body.touch.portrait .touch-ui .touch-attack { right: var(--safe-r); bottom: var(--safe-b); }
body.touch.portrait .touch-ui .touch-skill {
  right: calc(var(--safe-r) + var(--atk) * 1.0);
  bottom: calc(var(--safe-b) + var(--atk) * 0.0);
}
body.touch.portrait .touch-ui .touch-dash {
  right: calc(var(--safe-r) + var(--atk) * 1.02);
  bottom: calc(var(--safe-b) + var(--atk) * 0.78);
}
body.touch.portrait .touch-ui .touch-ult {
  right: calc(var(--safe-r) + var(--atk) * 0.22);
  bottom: calc(var(--safe-b) + var(--atk) * 1.12);
}
body.touch.portrait .touch-ui .touch-potion {
  right: calc(var(--safe-r) + var(--atk) * 1.78);
  bottom: calc(var(--safe-b) + var(--atk) * 0.24);
}

body.mobile-paused .touch-ui,
body.mobile-paused .mobile-tools,
body.mobile-paused .mobile-hud { opacity: 0; pointer-events: none; }

/* compact portrait HUD */
.mobile-hud {
  position: fixed;
  display: none;
  left: max(10px, env(safe-area-inset-left));
  top: max(8px, env(safe-area-inset-top));
  width: calc(100% - 106px);
  z-index: 76;
  pointer-events: none;
  color: #e9d8bc;
  font-family: "Microsoft YaHei", sans-serif;
  text-shadow: 0 2px 8px #000;
}
body.touch.playing.portrait .mobile-hud { display: block; }
.mh-row { display: flex; align-items: flex-start; gap: 10px; }
.mh-left { width: 54%; min-width: 0; }
.mh-name { display: flex; align-items: baseline; gap: 7px; }
.mh-name strong { font-size: 14px; letter-spacing: .05em; }
.mh-name span { font-size: 9px; color: #c8b18e; }
.mh-name span b { font-size: 11px; color: #f0d4a3; }
.mh-hp {
  position: relative;
  height: 13px;
  margin-top: 4px;
  border: 1px solid rgba(235,209,166,.25);
  background: rgba(4,3,6,.7);
  overflow: hidden;
}
.mh-hp i {
  display: block; height: 100%; width: 100%;
  background: linear-gradient(90deg, #7d1a2d, #d5404f);
  transition: width .16s linear;
}
.mh-hp span {
  position: absolute; inset: 0; text-align: center; line-height: 13px;
  font-size: 8px; letter-spacing: .08em; color: #ffe9dc;
}
.mh-rage {
  height: 4px; margin-top: 3px; background: rgba(4,3,6,.7);
  border: 1px solid rgba(235,209,166,.16);
}
.mh-rage i { display: block; height: 100%; width: 0; background: linear-gradient(90deg,#9a6a2c,#ffd27a); }
.mh-mid { flex: 1; text-align: right; min-width: 0; }
.mh-mid strong { display: block; font-size: 12px; color: #f0d3a5; letter-spacing: .08em; }
.mh-mid span { display: block; margin-top: 3px; font-size: 9px; color: rgba(225,203,173,.65); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mh-boss {
  display: none;
  margin-top: 5px; padding-top: 4px; border-top: 1px solid rgba(235,209,166,.18);
}
.mh-boss > span { display: block; font-size: 10px; color: #eecbac; }
.mh-boss > div { height: 5px; margin-top: 3px; background: rgba(4,3,6,.7); border: 1px solid rgba(235,209,166,.18); }
.mh-boss i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg,#681220,#e34b5c); }

/* fixed tools over the game */
.mobile-tools {
  position: fixed;
  display: none;
  right: max(10px, env(safe-area-inset-right));
  top: max(8px, env(safe-area-inset-top));
  z-index: 80;
  grid-template-columns: repeat(2, 38px);
  gap: 5px;
}
body.touch.playing .mobile-tools { display: grid; }
.mt-btn {
  width: 38px; height: 38px; padding: 0;
  border-radius: 8px;
  border: 1px solid rgba(213,179,123,.35);
  background: rgba(9,7,12,.8);
  color: #e7d2af;
  font-family: "Microsoft YaHei", sans-serif;
  font-size: 15px; line-height: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
}
.mt-btn small { font-size: 7px; color: rgba(226,203,170,.55); transform: scale(.9); }
.mt-btn:active { background: rgba(76,38,44,.9); border-color: rgba(255,216,152,.7); }
body.touch.portrait #mt-bag { display: none; }

/* portrait start shell */
.portrait-shell {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  padding: max(28px, env(safe-area-inset-top)) 28px max(28px, env(safe-area-inset-bottom));
  text-align: center;
  background:
    radial-gradient(ellipse at 50% 28%, rgba(112,53,72,.28), transparent 60%),
    radial-gradient(ellipse at 50% 100%, rgba(60,74,76,.12), transparent 60%),
    #070509;
  color: #e7d2b0;
}
body.touch.portrait:not(.playing):not(.mobile-result-open) .portrait-shell { display: flex; }
.ps-sigil {
  width: 74px; height: 74px; margin-bottom: 14px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(219,179,112,.4); transform: rotate(45deg);
  color: #d9b675; font-size: 28px;
}
.ps-sigil::first-letter { transform: rotate(-45deg); }
.ps-kicker { font-family: var(--display); font-size: 9px; letter-spacing: .28em; color: rgba(215,181,132,.55); }
.portrait-shell h1 {
  margin: 8px 0 2px;
  font-family: var(--serif); font-size: clamp(42px, 13vw, 64px); font-weight: 500;
  letter-spacing: .08em; color: #f0d4ac;
}
.ps-sub { margin: 0; font-size: 11px; letter-spacing: .2em; color: rgba(211,186,151,.55); }
.ps-progress {
  margin: 22px 0 18px; padding: 8px 14px;
  font-size: 10px; letter-spacing: .08em; color: rgba(224,201,168,.66);
  border-top: 1px solid rgba(214,177,112,.16); border-bottom: 1px solid rgba(214,177,112,.16);
}
.ps-btn {
  width: min(320px, 86vw);
  min-height: 46px;
  margin: 5px auto;
  border: 1px solid rgba(212,177,113,.4);
  background: rgba(18,13,18,.82);
  color: #e8d2ae;
  font-family: "Microsoft YaHei", sans-serif;
  font-size: 14px; letter-spacing: .08em;
  border-radius: 4px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
}
.ps-btn small { margin-top: 2px; font-family: var(--display); font-size: 7px; letter-spacing: .2em; color: rgba(214,181,132,.48); }
.ps-btn.ps-primary {
  background: linear-gradient(180deg, rgba(107,31,43,.95), rgba(50,15,23,.95));
  border-color: rgba(236,193,129,.58);
  min-height: 58px; font-size: 17px;
}
.ps-row { display: flex; gap: 8px; justify-content: center; width: min(320px, 86vw); }
.ps-row .ps-btn { flex: 1; width: auto; min-height: 38px; font-size: 11px; margin: 5px 0; }
.ps-btn.danger { color: #ff9a9a; border-color: rgba(210,90,96,.4); }
.ps-btn.ps-ghost { border-color: rgba(212,177,113,.16); background: transparent; color: rgba(219,193,157,.55); font-size: 11px; min-height: 36px; }
.ps-note { max-width: 320px; margin-top: 18px; font-size: 10px; line-height: 1.8; color: rgba(205,182,151,.44); }

/* mobile pause / result */
.mobile-pause, .mobile-result {
  position: fixed; inset: 0; z-index: 210; display: none;
  align-items: center; justify-content: center;
  padding: 18px;
  background: rgba(4,3,7,.9);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
body.mobile-paused .mobile-pause { display: flex; }
body.mobile-result-open .mobile-result { display: flex; }
.mp-panel, .mr-panel {
  width: min(360px, 92vw);
  max-height: 92dvh;
  overflow-y: auto;
  padding: 22px 18px;
  border: 1px solid rgba(212,177,113,.32);
  background: linear-gradient(160deg, rgba(30,21,29,.98), rgba(7,6,10,.99));
  box-shadow: 0 20px 80px rgba(0,0,0,.65);
  text-align: center;
}
.mp-kicker { font-family: var(--display); font-size: 8px; letter-spacing: .24em; color: rgba(215,181,132,.5); }
.mp-panel h2, .mr-panel h2 {
  margin: 8px 0 5px; font-family: var(--serif); font-size: 30px; font-weight: 500; letter-spacing: .1em; color: #f0d5ad;
}
.mp-sub { margin: 0; font-size: 10px; color: rgba(214,190,158,.55); }
.mp-weapon {
  margin: 16px auto 10px; padding: 8px 10px; width: 100%;
  border: 1px solid rgba(200,166,110,.16); font-size: 11px; color: #d9bd92;
}
.mobile-toast {
  position: fixed; left: 50%; bottom: 22%; transform: translateX(-50%);
  z-index: 260; display: none; padding: 8px 14px; max-width: 80vw;
  background: rgba(10,8,13,.92); border: 1px solid rgba(218,178,115,.4);
  color: #f0d5ad; font-size: 12px; text-align: center; pointer-events: none;
  border-radius: 3px;
}
.mobile-toast.show { display: block; }
.mr-stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 5px; margin: 16px 0 10px; }
.mr-stats div { padding: 7px 2px; background: rgba(255,255,255,.025); border: 1px solid rgba(210,177,120,.1); }
.mr-stats span { display: block; font-size: 8px; color: rgba(210,186,153,.5); }
.mr-stats b { display: block; margin-top: 3px; font-family: var(--display); font-size: 16px; color: #eed3a8; }
.mr-loot { display: flex; gap: 5px; justify-content: center; flex-wrap: wrap; margin-bottom: 12px; }
.mr-loot .mr-item {
  width: 45px; height: 45px; display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(218,179,112,.25); background: rgba(255,255,255,.02);
}
.mr-loot .mr-item svg { width: 32px; height: 32px; }
.mobile-result .ps-btn { width: 100%; }
body.touch.portrait .mobile-result { align-items: center; padding-top: 18px; }

/* hide the old rotate blocker in the new portrait flow */
.rotate-hint { display: none !important; }

body.touch.portrait #result-screen { display: none !important; }
body.touch.portrait .modal { -webkit-backdrop-filter: blur(2px); }
body.fullscreen, body.fullscreen #app { background: #030305; }
@media (display-mode: fullscreen) {
  body { min-height: 100dvh; }
}

body.touch.portrait {
  background:
    radial-gradient(ellipse at 50% 8%, rgba(104,54,68,.16), transparent 55%),
    radial-gradient(ellipse at 50% 74%, rgba(60,86,84,.11), transparent 58%),
    linear-gradient(180deg, #070509 0%, #0b080d 55%, #070509 100%);
}

@media (max-height: 660px) {
  .portrait-shell { justify-content: flex-start; }
}


/* =========================================================================
   EQUIPMENT TYPOGRAPHY +50% — bag / loadout / item detail
   ========================================================================= */
.equip-info .slot-name { font-size: 13.5px; }
.equip-info strong { font-size: 21px; }
.equip-info small { font-size: 13.5px; }
.equip-slot .equip-set { font-size: 12px; }
.equip-slot.empty .equip-info strong { font-size: 18px; }

.bag-equip-head { font-size: 16.5px; }
.bag-equip-head em { font-size: 15px; }
.bag-equip-list .equip-info .slot-name { font-size: 12px; }
.bag-equip-list .equip-info strong { font-size: 16.5px; }
.bag-stats-grid div { font-size: 15px; }
.bag-stats-grid b { font-size: 16.5px; }

.bag-item-name { font-size: 18px; line-height: 1.25; }
.bag-item-meta { font-size: 12px; }
.equipped-pin, .better-pin { font-size: 10.5px; }
.rarity-tag { font-size: 12px; }
.filter-tabs button { font-size: 15px; }
.sort-row { font-size: 13.5px; }

.detail-placeholder p { font-size: 22.5px; }
.detail-placeholder small { font-size: 15px; }
.detail-titles h3 { font-size: 30px; }
.detail-titles p { font-size: 15px; }
.detail-score span { font-size: 13.5px; }
.detail-score b { font-size: 39px; }
.compare-pill { font-size: 13.5px; }
.detail-stat-list .stat-line { font-size: 16.5px; line-height: 1.45; }
.affix-tag { font-size: 10.5px; }
.detail-subhead { font-size: 18px; }
.detail-subhead em { font-size: 13.5px; }
.set-bonus-item { font-size: 13.5px; }
.set-bonus-item b { min-width: 50px; }
.detail-note { font-size: 13.5px; }
.upgrade-row span { font-size: 13.5px; }
.upgrade-row b { font-size: 19.5px; }
.detail-actions .btn { font-size: 18px; }
.detail-actions .btn-main { font-size: 21px; }
.detail-actions .danger-btn { font-size: 15px; }
.equip-tag-current { font-size: 12px; }
.empty-state p { font-size: 22.5px; }
.empty-state small { font-size: 15px; }

/* keep the enlarged loadout type inside the bag column */
.bag-portrait-frame { height: 228px; }
.bag-stats-grid { min-height: 0; }


/* =========================================================================
   Q-VERSION THEME — chunky outlines, rounded cards, toy-like dark fantasy
   ========================================================================= */
:root {
  --ink: #120c18;
  --ink-2: #1a1022;
  --ink-3: #24152c;
  --panel: rgba(31, 20, 38, .9);
  --panel-2: rgba(22, 14, 28, .94);
  --gold: #f0c97b;
  --gold-soft: #ffe6b7;
  --gold-bright: #fff1cf;
  --gold-dim: rgba(240, 201, 123, .28);
  --line: rgba(240, 201, 123, .3);
  --line-bright: rgba(255, 231, 181, .65);
  --red: #e04b5f;
  --red-bright: #ff8291;
  --blood: #9b2538;
  --teal: #8ff0e4;
  --text: #fff0d8;
  --muted: #cdb79f;
  --muted-2: #9d8777;
  --serif: "YouYuan", "Microsoft YaHei", "PingFang SC", sans-serif;
  --display: "Trebuchet MS", "Microsoft YaHei", "PingFang SC", sans-serif;
}
body { background: #171021; }

/* buttons and cards */
.btn { border-radius: 16px; border-width: 2px; background: linear-gradient(180deg, rgba(48,31,54,.95), rgba(21,13,28,.96)); box-shadow: 0 6px 0 rgba(10,5,14,.45), 0 10px 22px rgba(0,0,0,.28); }
.btn::before, .btn::after { display: none; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 7px 0 rgba(10,5,14,.4), 0 14px 26px rgba(0,0,0,.3); }
.btn:active { transform: translateY(3px); box-shadow: 0 3px 0 rgba(10,5,14,.45); }
.btn-primary { background: linear-gradient(180deg, #d95768, #9e2b42 55%, #651a2e); border-color: #ffe0a6; }
.btn-primary:hover { background: linear-gradient(180deg, #e86a79, #b1334c 55%, #752039); }
.btn-line { border-color: rgba(240,201,123,.38); background: rgba(35,23,42,.72); }
.btn-main { font-family: var(--serif); font-weight: 700; }
.btn-sub { font-family: var(--display); }

.icon-btn, .hud-icon-btn, .mini-text-btn, .step-btn { border-radius: 13px; border-width: 2px; background: rgba(34,21,42,.82); }
.icon-btn:hover, .hud-icon-btn:hover, .step-btn:hover { background: rgba(63,38,64,.9); }

.panel { border-radius: 24px; border: 2px solid rgba(240,201,123,.3); background: linear-gradient(160deg, rgba(46,29,52,.92), rgba(19,12,26,.95)); box-shadow: 0 18px 48px rgba(0,0,0,.35), inset 0 0 0 2px rgba(255,230,183,.04); }
.panel::before, .panel-corner { display: none; }
.panel-heading h3 { font-size: 24px; font-family: var(--serif); }
.heading-mark { border-radius: 10px; transform: none; background: rgba(240,201,123,.1); }
.level-chip { border-radius: 10px; }
.mini-sigil { color: var(--gold); }

/* title */
.title-cn { color: #211c18; text-shadow: 3px 3px 0 rgba(33,28,24,.1), 0 12px 34px rgba(33,28,24,.16); }
.title-brandline { color: rgba(90, 78, 62, .8); }
.title-actions .btn { border-radius: 8px; }
.title-metrics { border: 2px solid rgba(33,28,24,.18); border-radius: 12px; background: rgba(247,242,228,.5); padding: 0 20px; }
.title-metrics div { padding: 14px 8px; }
.title-footer { border-top-color: rgba(33,28,24,.12); }

/* camp */
.camp-header { border-bottom: 2px solid rgba(240,201,123,.2); }
.camp-portrait-wrap { border: 3px solid rgba(240,201,123,.4); border-radius: 22px; background: #24152c; }
.camp-portrait-wrap canvas { border-radius: 18px; }
.camp-launch { border-radius: 26px; }
.zone-name { color: #ffe6b9; text-shadow: 0 3px 0 rgba(74,25,38,.55); }
.layer-select { border-radius: 16px; background: rgba(28,17,35,.65); border: 2px solid rgba(240,201,123,.18); padding: 6px 10px; }
.step-btn { width: 34px; height: 34px; }
.btn-descend { border-radius: 18px; }
.equip-slot { border-radius: 14px; border: 2px solid rgba(240,201,123,.14); background: rgba(42,27,48,.4); }
.equip-slot:hover { border-color: rgba(240,201,123,.45); background: rgba(66,40,67,.52); }
.camp-tips { border-radius: 16px; overflow: hidden; border: 2px solid rgba(240,201,123,.14); }
.tip { background: rgba(29,18,36,.78); }
.text-nav { border-radius: 10px; }
.camp-footer { border-top: 2px solid rgba(240,201,123,.16); }

/* HUD cards */
.hud-left { background: linear-gradient(180deg, rgba(35,22,42,.7), rgba(20,12,27,.2)); border: 2px solid rgba(240,201,123,.22); border-radius: 20px; padding: 8px 12px 9px 8px; }
.hud-portrait-frame { border-radius: 18px; overflow: hidden; border: 2px solid rgba(255,224,166,.55); }
.hud-level { border-radius: 8px; border-width: 2px; }
.hud-name-row strong { font-family: var(--serif); font-size: 22px; color: #fff0d4; }
.health-bar { height: 18px; border-radius: 10px; overflow: hidden; border: 2px solid rgba(255,226,178,.65); background: #2b1628; }
.health-fill { background: linear-gradient(90deg, #d8425c, #ff7c82 60%, #ffb07a); }
.health-text { font-size: 10px; line-height: 14px; }
.bar-cap { display: none; }
.rage-bar { height: 9px; border-radius: 6px; overflow: hidden; border: 1px solid rgba(255,226,178,.42); }
.rage-bar i { background: linear-gradient(90deg, #e7b35b, #ffe6a0); }
.hud-center { background: linear-gradient(180deg, rgba(35,22,42,.68), rgba(20,12,27,.12)); border: 2px solid rgba(240,201,123,.2); border-radius: 18px; padding: 7px 18px 9px; width: 500px; }
.depth-label { font-size: 10px; }
.objective-row p { font-family: var(--serif); font-size: 15px; }
.hud-gold { border: 2px solid rgba(240,201,123,.22); border-radius: 14px; background: rgba(27,17,34,.68); height: 38px; }
.hud-right { gap: 7px; }
.hud-icon-btn { width: 38px; height: 38px; border-radius: 12px; }
.skill-slot { border-radius: 16px; border-width: 2px; background: linear-gradient(180deg, rgba(49,31,57,.95), rgba(17,11,24,.98)); box-shadow: 0 6px 0 rgba(8,4,12,.5), 0 8px 18px rgba(0,0,0,.25); }
.skill-slot::before { border-radius: 12px; inset: 4px; }
.skill-key { border-radius: 5px; background: rgba(16,9,21,.55); padding: 0 3px; }
.skill-name { font-size: 10px; color: rgba(255,226,187,.72); }
.skill-slot.ultimate { border-radius: 22px; }
.hud-bottom { gap: 18px; }
.combo-digit span { color: #ffe9bf; text-shadow: 0 4px 0 #8d2a42, 0 0 24px rgba(255,190,100,.3); }

/* boss bar */
.boss-bar { border-radius: 12px; overflow: hidden; border: 2px solid rgba(255,226,178,.4); }
.boss-fill, .boss-bar i { border-radius: 8px; }

/* modals / bag */
.modal-veil { background: radial-gradient(ellipse at 50% 45%, rgba(64,33,65,.45), rgba(9,5,15,.9) 78%); }
.modal-frame { border-radius: 26px; border: 2px solid rgba(240,201,123,.32); overflow: hidden; }
.modal-header { height: 82px; border-bottom: 2px solid rgba(240,201,123,.18); }
.modal-title h2 { font-family: var(--serif); font-size: 28px; }
.title-mark { border-radius: 10px; transform: none; }
.filter-tabs { border-radius: 14px; overflow: hidden; border: 2px solid rgba(240,201,123,.18); }
.filter-tabs button { font-family: var(--serif); }
.bag-item { border-radius: 14px; border-width: 2px; background: linear-gradient(180deg, rgba(48,32,55,.72), rgba(19,12,25,.82)); }
.bag-item::before { border-radius: 14px 14px 0 0; }
.bag-item-icon { border-radius: 12px; }
.bag-detail { border-radius: 0 18px 18px 0; }
.detail-icon { border-radius: 16px; }
.detail-actions .btn { border-radius: 12px; }
.detail-actions { border-top: 2px solid rgba(240,201,123,.18); }
.bag-equip-list .equip-slot { border-radius: 10px; }
.bag-portrait-frame { border-radius: 18px; border: 2px solid rgba(240,201,123,.22); }
.set-bonus-list { border-radius: 12px; border-width: 2px; }
.rarity-tag, .compare-pill, .equip-tag-current { border-radius: 8px; }
.modal-footer { border-top: 2px solid rgba(240,201,123,.12); }

/* toasts / banners / result */
.toast, .banner, .result-panel, .loot-feed .loot-item { border-radius: 12px; }
.result-panel { border-width: 2px; border-radius: 22px; }
.result-title { font-family: var(--serif); }

/* mobile theme */
.portrait-shell { background: radial-gradient(ellipse at 50% 18%, rgba(152,82,101,.3), transparent 58%), radial-gradient(ellipse at 50% 100%, rgba(97,116,124,.15), transparent 62%), #171021; }
.ps-btn { border-radius: 14px; border-width: 2px; background: rgba(43,27,49,.92); }
.ps-btn.ps-primary { border-radius: 18px; }
.mp-panel, .mr-panel { border-radius: 22px; border-width: 2px; }
.mt-btn { border-radius: 11px; border-width: 2px; background: rgba(30,19,38,.9); }
.touch-btn { border-width: 2px; }
.mobile-hud .mh-hp, .mobile-hud .mh-rage { border-radius: 6px; overflow: hidden; }
.mh-hp i, .mh-rage i { border-radius: 4px; }
.mobile-toast { border-radius: 12px; border-width: 2px; }


/* 3D prototype link on the title screen */
.btn-3d-link { text-decoration: none; color: #9ff3e8 !important; border-color: rgba(146,238,227,.42); display: inline-flex; align-items: center; gap: 6px; }
.btn-3d-link small { font-family: Consolas, monospace; font-size: 8px; letter-spacing: .08em; padding: 2px 5px; border-radius: 5px; color: #12201f; background: #8ff0e4; }
.btn-3d-link:hover { background: rgba(48,79,74,.55); border-color: rgba(146,238,227,.7); }


/* ===== XP bar / party / equipment grades ===== */
.hud-xp-row { padding: 7px 0 0; gap: 7px; font-size: 8px; letter-spacing: .12em; color: rgba(220,200,170,.75); }
.hud-xp-row .bar { height: 9px; border-radius: 5px; background: linear-gradient(90deg,#263b58,#171d2a); border: 1px solid rgba(160,200,235,.42); box-shadow: inset 0 1px 4px rgba(0,0,0,.5),0 0 8px rgba(110,160,220,.12); overflow: hidden; }
.hud-xp-row .bar i { background: linear-gradient(90deg, #5f80b0, #9fd2ff 60%, #e5f6ff); box-shadow: 0 0 8px rgba(170,215,255,.35); }
.hud-xp-row em { font-size: 8px; color: #c9b79f; }
.party-hud { position: absolute; left: 28px; top: 168px; width: 284px; display: flex; flex-direction: column; gap: 6px; pointer-events: none; }
.party-member { display: flex; align-items: center; gap: 8px; padding: 5px 9px; border-radius: 11px; border: 1px solid rgba(240,201,123,.16); background: linear-gradient(90deg, rgba(28,17,35,.82), rgba(20,12,27,.55)); backdrop-filter: blur(4px); }
.party-member .pm-dot { width: 22px; height: 22px; border-radius: 8px; flex: none; border: 1px solid rgba(255,230,190,.3); box-shadow: inset 0 0 10px rgba(0,0,0,.45); }
.party-member .pm-info { flex: 1; min-width: 0; }
.party-member .pm-name { display: flex; justify-content: space-between; gap: 6px; font-size: 9px; color: #ead7b9; letter-spacing: .04em; }
.party-member .pm-name small { color: rgba(205,185,157,.55); font-size: 7px; }
.party-member .pm-hp { height: 4px; margin-top: 3px; border-radius: 3px; background: rgba(255,255,255,.06); overflow: hidden; }
.party-member .pm-hp i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg,#a23a4d,#ff8a8d); border-radius: 3px; }
.party-member .pm-ai { font-family: Consolas,monospace; font-size: 6px; color: rgba(145,238,227,.55); letter-spacing: .08em; }
.party-hud.empty { display: none; }
.mh-xp { position: relative; height: 4px; margin-top: 3px; border-radius: 3px; overflow: hidden; background: rgba(255,255,255,.07); }
.mh-xp i { display: block; height: 100%; width: 0; background: linear-gradient(90deg,#7098c7,#b9e3ff); }
.mh-xp span { position: absolute; right: 3px; top: -1px; font-size: 6px; color: rgba(220,238,255,.75); }

/* equipment grade */
.grade-tag { display: inline-flex; align-items: center; gap: 3px; padding: 1px 5px; border-radius: 5px; font-family: var(--display); font-size: 8px; letter-spacing: .07em; border: 1px solid currentColor; }
.grade-tag.locked { color: #ff838a !important; }
.grade-req { color: #d8b47d; font-size: 10px; }
.grade-req.locked { color: #ff7d86; }
.bag-item.locked { opacity: .72; border-color: rgba(255,110,120,.32) !important; }
.bag-item.locked::after { content: '等级不足'; position: absolute; right: 6px; bottom: 6px; font-size: 8px; color: #ff9097; background: rgba(30,8,14,.82); border: 1px solid rgba(255,100,110,.3); border-radius: 4px; padding: 1px 4px; }
.bag-item.locked .bag-item-icon { filter: grayscale(.55) brightness(.75); }
.detail-locked { margin: 8px 0; padding: 8px 10px; border-radius: 8px; border: 1px solid rgba(255,110,120,.32); background: rgba(90,16,26,.22); color: #ff9a9d; font-size: 10px; }
.btn:disabled { opacity: .45; cursor: not-allowed; filter: grayscale(.5); }
.camp-team-note { font-size: 9px; color: rgba(205,185,157,.55); padding: 2px 0 0; }
@media (max-width: 760px) {
  .party-hud { display: none; }
  .party-member { padding: 4px 7px; }
  .party-member .pm-name { font-size: 8px; }
}

.hero-panel .xp-row .bar { height: 7px; border-radius: 5px; background: #1b1322; border: 1px solid rgba(205,178,139,.18); overflow: hidden; }
.hero-panel .xp-row .bar i { background: linear-gradient(90deg,#6f8fbd,#b9e3ff); box-shadow: 0 0 8px rgba(150,205,255,.25); }
.mh-xp { height: 6px !important; background: rgba(255,255,255,.08) !important; border: 1px solid rgba(205,178,139,.16); }


/* ===== shop / stones ===== */
.res-item.stones .res-icon { color: #c6a6ff; }
.res-item.stones strong { color: #e5d4ff; }
.hud-gold .hud-stone-count { display: inline-flex; align-items: center; gap: 3px; margin-left: 8px; padding-left: 8px; border-left: 1px solid rgba(240,201,123,.18); font-style: normal; color: #d9c2ff; font-size: 10px; }
.hud-gold .hud-stone-count b { color: #f0e5ff; font-size: 11px; }
.bag-stones { display: flex; align-items: baseline; gap: 5px; margin-left: 16px; color: #b9a3df; font-size: 10px; }
.bag-stones b { color: #e8d8ff; font-size: 14px; font-family: var(--display); }
.bag-stones small { color: var(--muted-2); font-size: 8px; }
.shop-modal { z-index: 90; }
.shop-frame { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); width: min(1080px, 94vw); max-height: 88vh; display: flex; flex-direction: column; overflow: hidden; border-radius: 24px; border: 2px solid rgba(240,201,123,.4); background: linear-gradient(160deg,rgba(45,28,52,.98),rgba(18,11,26,.99)); box-shadow: 0 30px 90px rgba(0,0,0,.6); }
.shop-header { display: flex; align-items: center; gap: 22px; padding: 20px 26px; border-bottom: 1px solid rgba(240,201,123,.16); }
.shop-kicker { font-family: Consolas,monospace; font-size: 8px; letter-spacing: .22em; color: rgba(217,192,155,.55); }
.shop-header h2 { font-family: var(--serif); font-size: 30px; font-weight: 400; color: #ffe5bd; margin-top: 3px; }
.shop-wallet { margin-left: auto; display: flex; gap: 16px; font-family: var(--display); font-size: 12px; color: #d7c4a8; }
.shop-wallet b { color: #ffe6ae; font-size: 15px; }
.shop-wallet span:nth-child(2) b { color: #e0ccff; }
.shop-body { overflow: auto; padding: 20px 26px 24px; }
.shop-section { margin-bottom: 22px; }
.shop-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.shop-section-head h3 { font-family: var(--serif); font-size: 18px; font-weight: 400; color: #ffe0b5; }
.shop-section-head p { margin-top: 3px; font-size: 10px; color: rgba(205,185,155,.6); }
.shop-limit { font-size: 10px; color: #c8b18e; white-space: nowrap; }
.shop-limit b { color: #ffe3ac; }
.shop-stone-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 14px; border: 1px solid rgba(180,145,255,.28); background: linear-gradient(90deg,rgba(68,48,96,.38),rgba(27,18,38,.65)); }
.stone-glyph { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border-radius: 12px; border: 1px solid rgba(203,171,255,.45); color: #e3cbff; font-size: 24px; background: radial-gradient(circle at 35% 30%,rgba(150,105,220,.55),rgba(24,14,38,.95)); }
.stone-info { flex: 1; }
.stone-info strong { display: block; font-family: var(--serif); font-size: 15px; color: #f6e6ff; }
.stone-info small { display: block; margin-top: 3px; font-size: 9px; color: rgba(210,190,175,.65); }
.shop-stone-card .btn { flex: none; }
.shop-potion-grid { display: grid; grid-template-columns: repeat(5,1fr); gap: 8px; }
.shop-potion { position: relative; padding: 11px 10px; border-radius: 12px; border: 1px solid rgba(240,201,123,.18); background: rgba(34,22,42,.55); text-align: center; }
.shop-potion.current { border-color: rgba(146,238,227,.5); background: rgba(36,64,62,.3); }
.shop-potion.locked { opacity: .5; }
.shop-potion .potion-roman { font-family: var(--display); font-size: 10px; color: #d8b98e; letter-spacing: .12em; }
.shop-potion .potion-name { display: block; margin-top: 4px; font-family: var(--serif); font-size: 13px; color: #ffe9c8; }
.shop-potion .potion-heal { display: block; margin: 3px 0 7px; font-size: 9px; color: rgba(199,179,153,.65); }
.shop-potion .btn { width: 100%; height: 29px; padding: 0; font-size: 9px; border-radius: 8px; }
.shop-potion .potion-owned { font-size: 9px; color: #9fe8dc; padding: 7px 0; }
.shop-footer { display: flex; justify-content: space-between; gap: 20px; padding: 10px 26px; border-top: 1px solid rgba(240,201,123,.1); font-size: 9px; color: rgba(185,166,143,.5); }
@media (max-width:760px) {
  .shop-frame { width: calc(100vw - 16px); max-height: 90vh; }
  .shop-header { padding: 12px 14px; gap: 8px; }
  .shop-header h2 { font-size: 22px; }
  .shop-wallet { gap: 8px; font-size: 10px; }
  .shop-body { padding: 12px 14px 16px; }
  .shop-potion-grid { grid-template-columns: repeat(2,1fr); }
  .shop-stone-card { flex-wrap: wrap; }
  .shop-footer { display: none; }
  .bag-stones { margin-left: 8px; }
}


/* ===== real-player co-op room ===== */
.coop-modal { z-index: 92; }
.coop-frame { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); width: min(720px, 94vw); border-radius: 22px; border: 2px solid rgba(146,238,227,.4); background: linear-gradient(160deg,rgba(28,38,45,.98),rgba(13,16,25,.99)); box-shadow: 0 28px 90px rgba(0,0,0,.62); overflow: hidden; }
.coop-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid rgba(146,238,227,.14); }
.coop-kicker { font-family: Consolas,monospace; font-size: 8px; letter-spacing: .22em; color: rgba(146,238,227,.55); }
.coop-header h2 { font-family: var(--serif); font-size: 28px; font-weight: 400; color: #e8fffb; margin-top: 3px; }
.coop-body { padding: 20px 24px 24px; }
.coop-lead { font-size: 12px; line-height: 1.8; color: rgba(213,196,171,.78); margin-bottom: 16px; }
.coop-field { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.coop-field span { font-size: 10px; color: var(--muted); width: 58px; }
.coop-field input, .coop-link-row input { flex: 1; height: 38px; border-radius: 10px; border: 1px solid rgba(146,238,227,.25); background: rgba(8,12,18,.65); padding: 0 12px; color: #eafffb; font-family: var(--sans); font-size: 12px; outline: none; }
.coop-field input:focus, .coop-link-row input:focus { border-color: rgba(146,238,227,.6); }
.coop-note { margin-top: 12px; font-size: 9px; line-height: 1.7; color: rgba(174,190,185,.5); }
.coop-error { margin-top: 10px; font-size: 10px; color: #ff8f98; min-height: 14px; }
.coop-room-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.coop-label { display: block; font-family: Consolas,monospace; font-size: 8px; letter-spacing: .2em; color: rgba(146,238,227,.5); }
#coop-code { display: block; margin-top: 2px; font-family: var(--display); font-size: 30px; letter-spacing: .18em; color: #d8fff8; }
.coop-status { display: flex; align-items: center; gap: 6px; font-size: 10px; color: #b8d8d2; }
.coop-status i { width: 7px; height: 7px; border-radius: 50%; background: #7fe6d8; box-shadow: 0 0 10px rgba(127,230,216,.6); }
.coop-link-row { display: flex; gap: 8px; margin-bottom: 14px; }
.coop-link-row input { font-family: Consolas,monospace; font-size: 10px; }
.coop-members { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.coop-member { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 10px; border: 1px solid rgba(146,238,227,.16); background: rgba(24,36,42,.42); }
.coop-member .cm-av { width: 28px; height: 28px; border-radius: 9px; border: 1px solid rgba(255,255,255,.2); background: radial-gradient(circle at 35% 30%,var(--cm),rgba(10,16,22,.95)); }
.coop-member strong { font-family: var(--serif); font-size: 13px; color: #ecfdf9; font-weight: 400; }
.coop-member small { margin-left: auto; font-family: Consolas,monospace; font-size: 8px; color: #82d7ce; }
.coop-member.host small { color: #f0c97b; }
.coop-actions { display: flex; gap: 8px; justify-content: flex-end; }
@media(max-width:760px){ .coop-frame{width:calc(100vw - 16px)} .coop-header{padding:14px 16px} .coop-body{padding:14px 16px 18px} .coop-header h2{font-size:22px} #coop-code{font-size:24px} }

.camp-map-label{display:block;margin:6px 0 4px;font-size:9px;letter-spacing:.14em;color:rgba(225,207,178,.46)}
.camp-floor-select{width:100%;height:30px;margin-bottom:6px;padding:0 10px;border:1px solid rgba(218,190,145,.24);border-radius:6px;background:rgba(9,12,14,.72);color:#e9dcc4;font-size:11px;outline:none}
.camp-floor-select:focus{border-color:rgba(236,198,124,.65)}
.camp-floor-select option{background:#11151a;color:#e9dcc4}
@media(max-width:760px){.camp-floor-select{height:30px;font-size:10px}}

