/* 탄지(彈指) — 수묵 UI */
:root {
  --paper: #efe3c8;
  --paper-2: #e3d3b0;
  --paper-3: #cdb78d;
  --ink: #1b1a17;
  --ink-2: #2c2924;
  --ink-soft: rgba(27, 26, 23, 0.6);
  --gold: #c9a24a;
  --gold-l: #f1d489;
  --gold-d: #7a5a1c;
  --ally: #2d6d7a;
  --ally-d: #123239;
  --ally-l: #8fc7cf;
  --foe: #b8322a;
  --foe-d: #5e130f;
  --foe-l: #f09a86;
  --qi: #3d8fb0;
  --font-hanja: 'Noto Serif KR', 'Noto Serif CJK KR', serif;
  --font-brush: 'Nanum Brush Script', 'Noto Serif KR', serif;
  --font-body: 'Noto Serif KR', 'Apple SD Gothic Neo', serif;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}
html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #0f0e0c;
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  overscroll-behavior: none;
  touch-action: manipulation;
}
button {
  font-family: inherit;
  color: inherit;
  cursor: pointer;
  border: 0;
  background: none;
  padding: 0;
}

#app {
  position: relative;
  width: min(100vw, calc(100dvh * 0.6));
  height: 100%;
  margin: 0 auto;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 40%, #f3e9d2 0%, #e6d6b3 60%, #c8b084 100%);
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.6);
}
#app::before {
  /* 한지 결 */
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image: repeating-linear-gradient(17deg, rgba(120, 95, 55, 0.05) 0 1px, transparent 1px 7px),
    repeating-linear-gradient(-63deg, rgba(255, 255, 255, 0.12) 0 1px, transparent 1px 11px);
  z-index: 0;
}

#rotate-hint {
  display: none;
}
@media (orientation: landscape) and (max-height: 500px) {
  #rotate-hint {
    display: flex;
    position: fixed;
    inset: 0;
    z-index: 999;
    align-items: center;
    justify-content: center;
    background: #1b1a17;
    color: var(--gold-l);
    font-size: 20px;
  }
}

/* ── 부팅 ───────────────────────── */
.boot {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: var(--ink);
  color: var(--gold-l);
  z-index: 50;
  transition: opacity 0.6s;
}
.boot-glyph {
  font-family: var(--font-hanja);
  font-weight: 900;
  font-size: 88px;
  animation: breathe 1.6s ease-in-out infinite;
}
.boot-text {
  font-size: 14px;
  opacity: 0.7;
  letter-spacing: 0.2em;
}
@keyframes breathe {
  50% {
    opacity: 0.5;
    transform: scale(0.96);
  }
}

/* ── 화면 공통 ─────────────────── */
.screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  z-index: 1;
  animation: screenIn 0.45s ease-out;
}
@keyframes screenIn {
  from {
    opacity: 0;
    transform: scale(1.02);
  }
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 26px;
  font-family: var(--font-hanja);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.12em;
  color: var(--paper);
  background: linear-gradient(180deg, #3a342c, #1b1a17);
  border: 2px solid var(--gold);
  border-radius: 6px;
  box-shadow: 0 3px 0 #0b0a09, 0 6px 16px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 240, 200, 0.2);
  transition: transform 0.08s, filter 0.15s;
}
.btn:active {
  transform: translateY(2px) scale(0.98);
  box-shadow: 0 1px 0 #0b0a09, 0 3px 8px rgba(0, 0, 0, 0.35);
}
.btn.primary {
  background: linear-gradient(180deg, #d0463b, #8e2119);
  border-color: var(--gold-l);
  color: #fff4dc;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.4);
}
.btn.ghost {
  background: rgba(27, 26, 23, 0.06);
  color: var(--ink);
  border-color: rgba(27, 26, 23, 0.4);
  box-shadow: none;
}
.btn[disabled] {
  filter: grayscale(1) brightness(0.8);
  opacity: 0.6;
  pointer-events: none;
}
.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 18px;
  color: var(--paper);
  background: rgba(27, 26, 23, 0.75);
  border: 1.5px solid var(--gold);
}

/* ── 타이틀 ────────────────────── */
.title-screen {
  align-items: center;
  justify-content: space-between;
  padding: calc(var(--safe-t) + 24px) 24px calc(var(--safe-b) + 22px);
  overflow: hidden;
}
.title-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}
.title-bg svg {
  position: absolute;
  left: 0;
  width: 100%;
}
.title-bg .mist {
  position: absolute;
  width: 140%;
  height: 30%;
  left: -20%;
  background: radial-gradient(ellipse, rgba(255, 255, 255, 0.55), transparent 65%);
  filter: blur(8px);
  animation: drift 16s ease-in-out infinite alternate;
}
@keyframes drift {
  to {
    transform: translateX(12%);
  }
}
.title-top {
  margin-top: 4vh;
  text-align: center;
  position: relative;
}
.title-kicker {
  font-size: 13px;
  letter-spacing: 0.5em;
  color: var(--ink-soft);
  margin-bottom: 8px;
}
.title-main {
  font-family: var(--font-hanja);
  font-weight: 900;
  font-size: clamp(88px, 30vw, 150px);
  line-height: 0.95;
  color: var(--ink);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-shadow: 2px 3px 0 rgba(27, 26, 23, 0.12);
  animation: inkIn 1.4s ease-out both;
}
@keyframes inkIn {
  from {
    opacity: 0;
    filter: blur(14px);
    transform: scale(1.12);
  }
}
.title-seal {
  position: absolute;
  right: -34px;
  bottom: 8px;
  width: 50px;
  height: 50px;
  background: var(--foe);
  color: #fbe9c9;
  font-family: var(--font-hanja);
  font-weight: 900;
  font-size: 15px;
  line-height: 1.05;
  display: grid;
  place-items: center;
  border-radius: 4px;
  transform: rotate(-6deg);
  box-shadow: inset 0 0 0 3px #fbe9c9, inset 0 0 0 5px var(--foe);
  animation: stamp 0.5s 1.1s cubic-bezier(0.2, 1.8, 0.4, 1) both;
}
@keyframes stamp {
  from {
    opacity: 0;
    transform: rotate(-6deg) scale(2.4);
  }
}
.title-sub {
  margin-top: 14px;
  font-family: var(--font-brush);
  font-size: 30px;
  color: var(--ink-2);
  animation: fadeUp 0.8s 0.8s both;
}
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}
.title-menu {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: min(300px, 86%);
  animation: fadeUp 0.8s 1.2s both;
}
.title-foot {
  font-size: 12px;
  color: var(--ink-soft);
  text-align: center;
  letter-spacing: 0.1em;
}
.title-record {
  display: flex;
  gap: 14px;
  justify-content: center;
  margin-bottom: 6px;
  font-size: 14px;
  color: var(--ink-2);
}
.title-record b {
  font-family: var(--font-hanja);
  color: var(--foe);
}

/* 흩날리는 꽃잎 */
.petal {
  position: absolute;
  top: -20px;
  width: 10px;
  height: 7px;
  background: #f2a7b8;
  border-radius: 60% 0 60% 0;
  opacity: 0.8;
  animation: fall linear infinite;
  pointer-events: none;
}
@keyframes fall {
  to {
    transform: translate(-80px, 110vh) rotate(720deg);
  }
}

/* ── 무림인 선택 ────────────────── */
.select-screen {
  padding-top: var(--safe-t);
}
.sel-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px 6px;
}
.sel-head h2 {
  flex: 1;
  margin: 0;
  font-family: var(--font-hanja);
  font-size: 20px;
  letter-spacing: 0.2em;
}
.sel-head .icon-btn {
  flex: none;
}
.carousel {
  flex: 1;
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  gap: 12px;
  padding: 6px 28px 10px;
  min-height: 0;
}
.carousel::-webkit-scrollbar {
  display: none;
}
.hero-card {
  flex: 0 0 calc(100% - 20px);
  scroll-snap-align: center;
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 250, 235, 0.92), rgba(233, 219, 187, 0.95));
  border: 2px solid var(--ink);
  box-shadow: 0 10px 24px rgba(27, 26, 23, 0.25), inset 0 0 0 5px rgba(255, 250, 235, 0.9), inset 0 0 0 6px rgba(27, 26, 23, 0.35);
  overflow: hidden;
  min-height: 0;
  position: relative;
}
.hero-card .hc-scroll {
  overflow-y: auto;
  padding: 16px 16px 14px;
  flex: 1;
  scrollbar-width: none;
}
.hero-card .hc-scroll::-webkit-scrollbar {
  display: none;
}
.hc-top {
  display: flex;
  gap: 14px;
  align-items: center;
}
.medal {
  --c: var(--gold);
  position: relative;
  flex: none;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 40% 35%, #3a3530, #141210 70%);
  box-shadow: 0 0 0 4px var(--c), 0 0 0 7px var(--gold), 0 0 0 9px var(--gold-d), 0 6px 14px rgba(0, 0, 0, 0.35);
}
.medal span {
  font-family: var(--font-hanja);
  font-weight: 900;
  font-size: 50px;
  color: #fff4d8;
  text-shadow: 0 0 12px var(--c), 0 0 2px var(--c);
}
.medal.sm {
  width: 38px;
  height: 38px;
  box-shadow: 0 0 0 2px var(--c), 0 0 0 4px var(--gold), 0 3px 8px rgba(0, 0, 0, 0.35);
}
.medal.sm span {
  font-size: 21px;
}
.hc-names .alias {
  font-family: var(--font-hanja);
  font-weight: 900;
  font-size: 30px;
  letter-spacing: 0.08em;
  line-height: 1.1;
}
.hc-names .alias small {
  font-size: 14px;
  font-weight: 400;
  color: var(--ink-soft);
  margin-left: 6px;
  letter-spacing: 0.1em;
}
.hc-names .name {
  font-size: 16px;
  margin-top: 4px;
}
.hc-names .name em {
  font-style: normal;
  color: var(--ink-soft);
  font-size: 13px;
  margin-left: 4px;
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.tag {
  font-size: 11.5px;
  padding: 3px 8px;
  border-radius: 99px;
  background: rgba(27, 26, 23, 0.08);
  border: 1px solid rgba(27, 26, 23, 0.25);
}
.tag.hp {
  background: rgba(184, 50, 42, 0.1);
  border-color: rgba(184, 50, 42, 0.4);
  color: var(--foe-d);
}
.hc-intro {
  margin: 14px 0 12px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink-2);
  padding-left: 10px;
  border-left: 3px solid var(--c, var(--gold));
}
.box {
  border: 1px solid rgba(27, 26, 23, 0.25);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 10px;
  background: rgba(255, 255, 255, 0.35);
}
.box h4 {
  margin: 0 0 4px;
  font-size: 13px;
  letter-spacing: 0.08em;
  display: flex;
  align-items: center;
  gap: 6px;
}
.box h4 .lbl {
  font-size: 10.5px;
  padding: 1px 6px;
  border-radius: 3px;
  color: #fff;
  background: var(--ink);
}
.box h4 .lbl.ult {
  background: var(--foe);
}
.box p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ink-2);
}
.box .hanja {
  font-family: var(--font-hanja);
  font-weight: 900;
  color: var(--foe-d);
}
.skill-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.skill-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 4px 7px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(27, 26, 23, 0.2);
  position: relative;
}
.skill-chip:active {
  background: rgba(201, 162, 74, 0.25);
}
.skill-chip .disc {
  width: 40px;
  height: 40px;
  font-size: 20px;
}
.skill-chip .nm {
  font-size: 11.5px;
  letter-spacing: -0.02em;
  text-align: center;
  line-height: 1.2;
}
.skill-chip .cost {
  position: absolute;
  top: 4px;
  left: 4px;
}

.disc {
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-family: var(--font-hanja);
  font-weight: 900;
  color: #e9f3ef;
  background: radial-gradient(circle at 35% 30%, var(--ally-l), var(--ally) 40%, var(--ally-d));
  box-shadow: inset 0 0 0 2px var(--gold), 0 2px 4px rgba(0, 0, 0, 0.35);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}
.disc.form {
  box-shadow: inset 0 0 0 2px var(--gold), inset 0 0 0 7px rgba(0, 0, 0, 0), 0 2px 4px rgba(0, 0, 0, 0.35);
  border-radius: 30%;
}
.gem {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-hanja);
  font-size: 13px;
  font-weight: 900;
  color: #fff;
  background: radial-gradient(circle at 35% 30%, #9fe0f5, var(--qi) 55%, #174a60);
  box-shadow: 0 0 0 1.5px #e7f6fb, 0 1px 3px rgba(0, 0, 0, 0.5);
}

.sel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 2px 0 8px;
}
.sel-dots i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(27, 26, 23, 0.25);
  transition: all 0.2s;
}
.sel-dots i.on {
  width: 20px;
  border-radius: 4px;
  background: var(--ink);
}
.sel-foot {
  padding: 10px 14px calc(var(--safe-b) + 14px);
  background: linear-gradient(180deg, rgba(27, 26, 23, 0), rgba(27, 26, 23, 0.08) 20%);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.row .lab {
  font-size: 12.5px;
  width: 44px;
  color: var(--ink-soft);
  flex: none;
}
.seg {
  display: flex;
  flex: 1;
  border: 1.5px solid var(--ink);
  border-radius: 8px;
  overflow: hidden;
}
.seg button {
  flex: 1;
  padding: 9px 0;
  font-size: 14px;
  font-family: var(--font-hanja);
  font-weight: 700;
  background: rgba(255, 255, 255, 0.3);
}
.seg button + button {
  border-left: 1px solid rgba(27, 26, 23, 0.3);
}
.seg button.on {
  background: var(--ink);
  color: var(--gold-l);
}
.opp-pick {
  display: flex;
  flex: 1;
  gap: 6px;
}
.opp-pick button {
  flex: 1;
  height: 42px;
  border-radius: 8px;
  border: 1.5px solid rgba(27, 26, 23, 0.35);
  background: rgba(255, 255, 255, 0.35);
  font-family: var(--font-hanja);
  font-weight: 900;
  font-size: 19px;
}
.opp-pick button.on {
  border-color: var(--foe);
  background: var(--foe);
  color: #fbe9c9;
  box-shadow: 0 2px 8px rgba(184, 50, 42, 0.4);
}
.opp-pick button small {
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-body);
}

/* ── 전투 ─────────────────────── */
.battle-screen {
  background: #1b1a17;
}
.hud-top {
  position: relative;
  z-index: 3;
  padding: calc(var(--safe-t) + 5px) 8px 5px;
  background: linear-gradient(180deg, #221f1b, #2d2923);
  border-bottom: 2px solid var(--gold-d);
  color: var(--paper);
  display: flex;
  align-items: center;
  gap: 10px;
}
.hud-bottom {
  position: relative;
  z-index: 3;
  padding: 6px 6px calc(var(--safe-b) + 7px);
  background: linear-gradient(0deg, #1d1a16, #2d2923);
  border-top: 2px solid var(--gold-d);
  color: var(--paper);
}
.pinfo {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.pinfo .dl {
  font-size: 10px;
  padding: 0 5px;
  border-radius: 3px;
  background: rgba(184, 50, 42, 0.6);
  color: #fff;
}
.pinfo .nm {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
}
.pinfo .nm b {
  font-family: var(--font-hanja);
  font-size: 15px;
  letter-spacing: 0.06em;
  color: var(--gold-l);
}
.pinfo .nm .st {
  display: flex;
  gap: 4px;
  margin-left: auto;
}
.st i {
  font-style: normal;
  font-family: var(--font-hanja);
  font-weight: 900;
  font-size: 11px;
  padding: 1px 5px;
  border-radius: 3px;
  line-height: 1.3;
}
.st .sh {
  background: #9a7a22;
  color: #fff6d0;
}
.st .po {
  background: #4f7f2a;
  color: #eaffd8;
}
.st .mk {
  background: #c24f6c;
  color: #fff0f4;
}
.hpbar {
  position: relative;
  height: 15px;
  border-radius: 3px;
  background: #0d0c0a;
  border: 1px solid rgba(241, 212, 137, 0.5);
  overflow: hidden;
}
.hpbar .lag,
.hpbar .fill {
  position: absolute;
  inset: 0 auto 0 0;
  transition: width 0.25s ease-out;
}
.hpbar .lag {
  background: #e8e0c8;
  transition: width 0.8s 0.35s ease-in;
}
.hpbar .fill {
  background: linear-gradient(180deg, #e3584a, #9c231b);
}
.hpbar.ally .fill {
  background: linear-gradient(180deg, #5fb0bf, #1f5561);
}
.hpbar .sh {
  position: absolute;
  inset: 0 auto 0 0;
  background: repeating-linear-gradient(45deg, rgba(241, 212, 137, 0.85) 0 4px, rgba(201, 162, 74, 0.85) 4px 8px);
  opacity: 0.9;
}
.hpbar span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 11px;
  line-height: 1;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 2px #000, 0 0 3px #000;
  letter-spacing: 0.05em;
}
.qi-row {
  display: flex;
  align-items: center;
  gap: 3px;
}
.qi-row .q {
  width: 13px;
  height: 13px;
  transform: rotate(45deg);
  border: 1px solid rgba(159, 224, 245, 0.35);
  background: #10232b;
  transition: background 0.2s, box-shadow 0.2s;
}
.qi-row .q.on {
  background: radial-gradient(circle at 35% 30%, #c8f1ff, var(--qi) 60%, #174a60);
  border-color: #c8f1ff;
  box-shadow: 0 0 6px rgba(120, 210, 240, 0.7);
}
.qi-row .q.lock {
  opacity: 0.25;
}
.qi-row .qn {
  margin-left: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #9fe0f5;
}
.foe-qi .q {
  width: 9px;
  height: 9px;
}

.ult-mini {
  --v: 0%;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: conic-gradient(var(--foe) var(--v), rgba(255, 255, 255, 0.1) 0);
  display: grid;
  place-items: center;
  flex: none;
}
.ult-mini span {
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: #1b1a17;
  display: grid;
  place-items: center;
  font-family: var(--font-hanja);
  font-weight: 900;
  font-size: 15px;
  color: var(--foe-l);
}
.ult-mini.full {
  animation: ultPulse 1s infinite;
}

.arena-wrap {
  position: relative;
  flex: 1;
  min-height: 0;
  background: radial-gradient(ellipse at center, #2d2923, #15130f 75%);
}
#arena {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
  display: block;
}

.prow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  padding: 0 2px;
}
.prow .hpbar {
  flex: 1;
  height: 16px;
}
.prow .st {
  display: flex;
  gap: 3px;
}
.prow .st:empty {
  display: none;
}
.prow .qi-row .q {
  width: 10px;
  height: 10px;
}
.side-col {
  flex: none;
  width: 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.ult-btn {
  --v: 0%;
  position: relative;
  flex: none;
  align-self: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: conic-gradient(#e9b949 var(--v), rgba(255, 255, 255, 0.08) 0);
  display: grid;
  place-items: center;
  transition: transform 0.1s;
}
.ult-btn .in {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 40% 35%, #3a3530, #141210 70%);
  box-shadow: inset 0 0 0 1.5px var(--gold-d);
  font-family: var(--font-hanja);
  font-weight: 900;
  font-size: 22px;
  color: rgba(241, 212, 137, 0.45);
  flex-direction: column;
  line-height: 1;
}
.ult-btn .in small {
  font-size: 9px;
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: 0.1em;
  margin-top: 2px;
}
.ult-btn.ready {
  animation: ultPulse 1s infinite;
}
.ult-btn.ready .in {
  color: #fff3c4;
  text-shadow: 0 0 10px #ffcb52;
  background: radial-gradient(circle at 40% 35%, #b8322a, #5e130f 75%);
}
.ult-btn:active {
  transform: scale(0.93);
}
@keyframes ultPulse {
  50% {
    box-shadow: 0 0 0 4px rgba(255, 203, 82, 0.35), 0 0 24px rgba(255, 203, 82, 0.8);
  }
}

.hand-row {
  display: flex;
  gap: 6px;
  align-items: flex-end;
}
.hand {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  min-width: 0;
}
.card {
  position: relative;
  min-width: 0;
  aspect-ratio: 3 / 3.7;
  border-radius: 8px;
  background: linear-gradient(180deg, #f6ecd6, #dcc79d);
  border: 1.5px solid #5a4415;
  box-shadow: 0 3px 0 #0b0a09, inset 0 0 0 3px rgba(255, 250, 235, 0.8), inset 0 0 0 4px rgba(90, 68, 21, 0.4);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 13% 3px 5%;
  transition: transform 0.16s cubic-bezier(0.3, 1.6, 0.5, 1), box-shadow 0.16s, filter 0.2s;
  touch-action: manipulation;
}
.card .disc {
  width: 60%;
  aspect-ratio: 1;
  font-size: clamp(16px, 5.4vw, 26px);
}
.card .nm {
  font-size: clamp(10px, 2.9vw, 13px);
  font-weight: 700;
  letter-spacing: -0.04em;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card .gem {
  position: absolute;
  top: -6px;
  left: -5px;
  width: 24px;
  height: 24px;
  font-size: 14px;
}
.card .kind {
  position: absolute;
  top: 3px;
  right: 4px;
  font-family: var(--font-hanja);
  font-size: 10px;
  font-weight: 900;
  color: var(--foe);
}
.card.sel {
  transform: translateY(-12px) scale(1.04);
  box-shadow: 0 0 0 2px var(--gold-l), 0 0 18px rgba(255, 210, 110, 0.85), 0 8px 12px rgba(0, 0, 0, 0.4);
}
.card.off {
  filter: grayscale(0.9) brightness(0.6);
}
.card.enter {
  animation: cardIn 0.35s cubic-bezier(0.2, 1.4, 0.5, 1);
}
@keyframes cardIn {
  from {
    transform: translateY(40px) scale(0.6);
    opacity: 0;
  }
}
.next-card {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  color: rgba(239, 227, 200, 0.6);
}
.next-card .disc {
  width: 24px;
  height: 24px;
  font-size: 12px;
  filter: saturate(0.6);
}
.end-btn {
  --t: 100%;
  flex: none;
  width: 56px;
  height: 52px;
  border-radius: 12px;
  position: relative;
  background: linear-gradient(180deg, #d0463b, #8e2119);
  border: 2px solid var(--gold-l);
  color: #fff4dc;
  font-family: var(--font-hanja);
  font-weight: 900;
  font-size: 13px;
  line-height: 1.2;
  box-shadow: 0 3px 0 #0b0a09;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.end-btn::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  height: 4px;
  width: var(--t);
  background: #ffd98a;
  transition: width 0.25s linear;
}
.end-btn.hot {
  animation: ultPulse 0.9s infinite;
}
.end-btn.warn::after {
  background: #ff5a3c;
}
.end-btn[disabled] {
  filter: grayscale(1) brightness(0.55);
}
.end-btn:active {
  transform: translateY(2px);
}
.end-btn .sec {
  font-family: var(--font-body);
  font-size: 11px;
  opacity: 0.85;
}

.menu-btn {
  flex: none;
}

/* 차례 배너 */
.banner {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0;
}
.banner.show {
  animation: banner 1.25s ease-out;
}
.banner .band {
  width: 100%;
  padding: 10px 0 8px;
  text-align: center;
  background: linear-gradient(90deg, transparent, rgba(27, 26, 23, 0.88) 18%, rgba(27, 26, 23, 0.88) 82%, transparent);
  color: var(--paper);
}
.banner .big {
  font-family: var(--font-brush);
  font-size: 44px;
  line-height: 1;
}
.banner.foe .big {
  color: var(--foe-l);
}
.banner.ally .big {
  color: var(--gold-l);
}
.banner .small {
  font-family: var(--font-hanja);
  font-size: 12px;
  letter-spacing: 0.4em;
  opacity: 0.75;
}
@keyframes banner {
  0% {
    opacity: 0;
    transform: translateY(-50%) scaleY(0.2);
  }
  15% {
    opacity: 1;
    transform: translateY(-50%) scaleY(1);
  }
  80% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(-50%) translateX(30px);
  }
}

.toast {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  z-index: 5;
  background: rgba(27, 26, 23, 0.9);
  color: var(--paper);
  border: 1px solid var(--gold);
  border-radius: 99px;
  padding: 8px 16px;
  font-size: 13px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(-4px);
}

.thinking {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 4;
  font-size: 12px;
  color: var(--paper);
  background: rgba(184, 50, 42, 0.8);
  padding: 4px 10px;
  border-radius: 99px;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}
.thinking.show {
  opacity: 1;
}

/* 초식 상세 */
.tip {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: calc(100% + 8px);
  z-index: 6;
  background: rgba(27, 26, 23, 0.95);
  color: var(--paper);
  border: 1.5px solid var(--gold);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.55;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  animation: fadeUp 0.15s;
}
.tip h5 {
  margin: 0 0 4px;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.tip h5 .hj {
  font-family: var(--font-hanja);
  color: var(--gold-l);
}
.tip .stats {
  display: flex;
  gap: 10px;
  margin-top: 6px;
  font-size: 11.5px;
  color: rgba(239, 227, 200, 0.7);
}

/* 절초 연출 */
.cine {
  position: absolute;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  display: none;
  overflow: hidden;
}
.cine.show {
  display: block;
}
.cine .dim {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(10, 8, 6, 0.55), rgba(10, 8, 6, 0.92));
  animation: cineDim 1.7s ease both;
}
@keyframes cineDim {
  0% {
    opacity: 0;
  }
  12%,
  82% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}
.cine .slash {
  position: absolute;
  left: -20%;
  right: -20%;
  top: 44%;
  height: 34%;
  transform: rotate(-8deg);
  background: linear-gradient(180deg, transparent, var(--cc, #b8322a) 12%, var(--cc, #b8322a) 88%, transparent);
  opacity: 0.9;
  animation: cineSlash 1.7s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  mix-blend-mode: multiply;
}
@keyframes cineSlash {
  0% {
    clip-path: inset(0 100% 0 0);
  }
  22% {
    clip-path: inset(0 0 0 0);
  }
  82% {
    clip-path: inset(0 0 0 0);
    opacity: 0.9;
  }
  100% {
    clip-path: inset(0 0 0 100%);
    opacity: 0;
  }
}
.cine .glyph {
  position: absolute;
  left: 50%;
  top: 36%;
  transform: translate(-50%, -50%);
  font-family: var(--font-hanja);
  font-weight: 900;
  font-size: min(62vw, 36dvh);
  color: #fff3d6;
  text-shadow: 0 0 30px var(--cc, #b8322a), 0 0 80px var(--cc, #b8322a);
  animation: cineGlyph 1.7s ease-out both;
}
@keyframes cineGlyph {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(2.2);
    filter: blur(20px);
  }
  25% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    filter: blur(0);
  }
  80% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.05);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.3);
    filter: blur(6px);
  }
}
.cine .txt {
  position: absolute;
  left: 0;
  right: 0;
  top: 58%;
  text-align: center;
  color: #fff;
  animation: cineTxt 1.7s ease-out both;
}
.cine .txt .hj {
  font-family: var(--font-hanja);
  font-weight: 900;
  font-size: 44px;
  letter-spacing: 0.25em;
  text-shadow: 0 2px 0 #000, 0 0 16px rgba(0, 0, 0, 0.8);
}
.cine .txt .ko {
  font-family: var(--font-brush);
  font-size: 32px;
  color: var(--gold-l);
  text-shadow: 0 2px 4px #000;
}
.cine .txt .who {
  margin-top: 6px;
  font-size: 13px;
  letter-spacing: 0.3em;
  opacity: 0.85;
}
@keyframes cineTxt {
  0%,
  15% {
    opacity: 0;
    transform: translateX(-40px);
  }
  32% {
    opacity: 1;
    transform: none;
  }
  82% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateX(40px);
  }
}

/* 결과 */
.result {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 20px;
  background: radial-gradient(ellipse at center, rgba(27, 26, 23, 0.72), rgba(10, 9, 8, 0.94));
  animation: fadeIn 0.6s both;
  color: var(--paper);
}
@keyframes fadeIn {
  from {
    opacity: 0;
  }
}
.result .rtitle {
  font-family: var(--font-brush);
  font-size: 40px;
  color: var(--gold-l);
  animation: fadeUp 0.6s 0.7s both;
}
.result.lose .rtitle {
  color: #cfc6b4;
}
.result .rsub {
  font-size: 13px;
  opacity: 0.75;
  margin-top: -12px;
  animation: fadeUp 0.6s 0.8s both;
}
.result .stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 22px;
  font-size: 14px;
  min-width: 240px;
  padding: 14px 18px;
  border: 1px solid rgba(201, 162, 74, 0.6);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.3);
  animation: fadeUp 0.6s 0.9s both;
}
.result .stats div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.result .stats b {
  color: var(--gold-l);
  font-family: var(--font-hanja);
}
.result .acts {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(280px, 90%);
  animation: fadeUp 0.6s 1.05s both;
}

/* 모달 */
.modal {
  position: absolute;
  inset: 0;
  z-index: 40;
  background: rgba(10, 9, 8, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s;
}
.sheet {
  width: 100%;
  max-width: 340px;
  background: linear-gradient(180deg, #f6ecd6, #e3d3b0);
  border: 2px solid var(--ink);
  border-radius: 12px;
  padding: 18px 16px 16px;
  box-shadow: inset 0 0 0 4px rgba(255, 250, 235, 0.8), inset 0 0 0 5px rgba(27, 26, 23, 0.3), 0 20px 40px rgba(0, 0, 0, 0.5);
  animation: fadeUp 0.25s;
  max-height: 90%;
  overflow-y: auto;
}
.sheet h3 {
  margin: 0 0 14px;
  text-align: center;
  font-family: var(--font-hanja);
  letter-spacing: 0.3em;
  font-size: 19px;
}
.sheet .stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 4px;
  border-bottom: 1px dashed rgba(27, 26, 23, 0.25);
  font-size: 15px;
}
.toggle .sw {
  width: 50px;
  height: 28px;
  border-radius: 99px;
  background: #b9ab8e;
  position: relative;
  transition: background 0.2s;
}
.toggle .sw::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s;
}
.toggle.on .sw {
  background: var(--ally);
}
.toggle.on .sw::after {
  transform: translateX(22px);
}
.skill-detail .big-disc {
  width: 72px;
  height: 72px;
  font-size: 36px;
  margin: 0 auto 8px;
}
.skill-detail .t {
  text-align: center;
  font-size: 18px;
  font-weight: 700;
}
.skill-detail .t .hj {
  display: block;
  font-family: var(--font-hanja);
  font-size: 13px;
  color: var(--ink-soft);
  letter-spacing: 0.2em;
}
.skill-detail p {
  font-size: 14px;
  line-height: 1.6;
  margin: 12px 0;
}
.skill-detail .stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  text-align: center;
  font-size: 11px;
  color: var(--ink-soft);
  border-top: 1px solid rgba(27, 26, 23, 0.2);
  padding-top: 10px;
}
.skill-detail .stats b {
  display: block;
  font-size: 18px;
  color: var(--ink);
  font-family: var(--font-hanja);
}

/* 튜토리얼 */
.coach {
  position: absolute;
  z-index: 25;
  left: 50%;
  transform: translateX(-50%);
  width: min(88%, 320px);
  background: rgba(27, 26, 23, 0.94);
  color: var(--paper);
  border: 1.5px solid var(--gold);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.6;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.5);
  animation: fadeUp 0.3s;
  pointer-events: none;
}
.coach b {
  color: var(--gold-l);
}
.coach .step {
  font-family: var(--font-hanja);
  font-size: 11px;
  color: var(--foe-l);
  letter-spacing: 0.2em;
}
.hand-ghost {
  position: absolute;
  z-index: 26;
  width: 40px;
  height: 40px;
  pointer-events: none;
  font-size: 34px;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.6));
}
.hand-ghost.drag {
  animation: dragDemo 1.8s ease-in-out infinite;
}
@keyframes dragDemo {
  0% {
    transform: translate(0, 0);
    opacity: 0;
  }
  15% {
    opacity: 1;
  }
  60% {
    transform: translate(-18px, 90px);
    opacity: 1;
  }
  75% {
    transform: translate(-18px, 90px);
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}

@media (min-height: 800px) {
  .card .disc {
    font-size: 26px;
  }
}

/* 연환 */
.tip .chain {
  margin-top: 6px;
  padding: 6px 8px;
  border-radius: 6px;
  background: rgba(201, 162, 74, 0.16);
  border: 1px solid rgba(201, 162, 74, 0.5);
  font-size: 12.5px;
}
.tip .chain b {
  color: var(--gold-l);
  font-family: var(--font-hanja);
  margin-right: 4px;
}
.chain-box {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: -4px 0 12px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(201, 162, 74, 0.16);
  border: 1px solid rgba(154, 122, 34, 0.5);
  font-size: 13px;
  line-height: 1.5;
}
.chain-box b {
  font-family: var(--font-hanja);
  color: #7a5a1c;
}
.chain-box.off {
  opacity: 0.6;
}

/* ── 성장·경제 화면 ───────────────── */
.title-row {
  display: flex;
  gap: 10px;
}
.title-row .btn {
  flex: 1;
  padding: 0 10px;
  font-size: 15px;
}
.meta-screen {
  padding-top: var(--safe-t);
  background: transparent;
}
.topbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px 8px;
}
.topbar h2 {
  flex: 1;
  margin: 0;
  font-family: var(--font-hanja);
  font-size: 17px;
  letter-spacing: 0.08em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.money {
  display: flex;
  gap: 6px;
  flex: none;
}
.money span {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 3px 8px 3px 3px;
  border-radius: 99px;
  background: rgba(27, 26, 23, 0.85);
  color: var(--paper);
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.money i,
.rw i {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-style: normal;
  font-family: var(--font-hanja);
  font-weight: 900;
  font-size: 11px;
  color: #fff;
  flex: none;
}
.c-silver {
  background: radial-gradient(circle at 35% 30%, #f4f4f4, #9aa0a6 60%, #5d6166);
  color: #222 !important;
}
.c-jade {
  background: radial-gradient(circle at 35% 30%, #c9f2d8, #3f9d6a 60%, #1c5a38);
}
.c-ticket {
  background: radial-gradient(circle at 35% 30%, #ffb3a6, #b8322a 60%, #5e130f);
}
.c-elixir {
  background: radial-gradient(circle at 35% 30%, #f7e2a6, #b07a1c 60%, #5a3a0a);
}
.c-treasure {
  background: radial-gradient(circle at 35% 30%, #fff, var(--rc, #c9982f) 55%, #2a2520);
}
.meta-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 4px 14px calc(var(--safe-b) + 18px);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sec {
  margin: 8px 0 0;
  font-family: var(--font-hanja);
  font-size: 15px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.sec small {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 11.5px;
  color: var(--ink-soft);
}
.sheet-note {
  margin: 4px 0 8px;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--ink-soft);
}
.run-card {
  border-radius: 14px;
  padding: 14px;
  color: var(--paper);
  background: linear-gradient(160deg, #2d2923, #15130f);
  border: 2px solid var(--gold-d);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3), inset 0 0 0 4px rgba(201, 162, 74, 0.15);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.rc-head {
  display: flex;
  gap: 12px;
  align-items: center;
}
.rc-head b {
  font-family: var(--font-hanja);
  font-size: 20px;
  color: var(--gold-l);
  display: block;
}
.rc-head small {
  font-size: 12px;
  opacity: 0.75;
  line-height: 1.5;
}
.rc-glyph {
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-family: var(--font-hanja);
  font-weight: 900;
  font-size: 30px;
  background: var(--foe);
  color: #fbe9c9;
  box-shadow: inset 0 0 0 3px #fbe9c9, inset 0 0 0 5px var(--foe);
}
.rc-cur {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
}
.rc-cur b,
.foe-sheet b,
.train-head b {
  display: block;
  font-size: 15px;
}
.rc-cur small,
.foe-sheet small,
.train-head small {
  font-size: 11.5px;
  opacity: 0.75;
}
.rc-acts {
  display: flex;
  gap: 8px;
}
.rc-acts .btn {
  flex: 1;
}
.rc-acts .btn.ghost {
  flex: 0 0 auto;
  color: var(--paper);
  border-color: rgba(239, 227, 200, 0.4);
}
.hub-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 16px 8px 14px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 250, 235, 0.9), rgba(233, 219, 187, 0.95));
  border: 2px solid var(--ink);
  box-shadow: 0 4px 0 rgba(27, 26, 23, 0.8);
  transition: transform 0.08s;
}
.tile:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 rgba(27, 26, 23, 0.8);
}
.tile i {
  font-style: normal;
  font-family: var(--font-hanja);
  font-weight: 900;
  font-size: 30px;
  color: var(--foe-d);
}
.tile b {
  font-size: 15px;
}
.tile small {
  font-size: 11.5px;
  color: var(--ink-soft);
}
.hub-stats {
  text-align: center;
  font-size: 12px;
  color: var(--ink-soft);
}

/* 런 지도 */
.map-screen {
  background: linear-gradient(180deg, rgba(40, 50, 48, 0.15), transparent 40%);
}
.run-status {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 12px 8px;
}
.rs-hp {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.rs-hp .hpbar {
  height: 17px;
}
.rs-hp small {
  font-size: 11px;
  color: var(--ink-soft);
}
.item-btn {
  position: relative;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-family: var(--font-hanja);
  font-weight: 900;
  font-size: 16px;
  color: #fff4dc;
  background: radial-gradient(circle at 35% 30%, #e9b949, #8a5a14 70%);
  border: 1.5px solid var(--gold-l);
}
.item-btn b {
  position: absolute;
  right: -6px;
  bottom: -6px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 99px;
  font-size: 10px;
  line-height: 17px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-body);
}
.item-btn b:empty {
  display: none;
}
.runmap {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0 34px;
}
.map-inner {
  position: relative;
}
.map-inner svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.map-inner line {
  stroke: rgba(27, 26, 23, 0.3);
  stroke-width: 2.5;
  stroke-dasharray: 4 5;
  vector-effect: non-scaling-stroke;
}
.map-inner line.walked {
  stroke: var(--foe);
  stroke-dasharray: none;
  stroke-width: 3.5;
}
.node {
  position: absolute;
  transform: translate(-50%, 50%);
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #efe3c8;
  border: 2px solid rgba(27, 26, 23, 0.35);
  color: rgba(27, 26, 23, 0.55);
  opacity: 0.8;
}
.node i {
  font-style: normal;
  font-family: var(--font-hanja);
  font-weight: 900;
  font-size: 22px;
  line-height: 1;
}
.node small {
  font-size: 9.5px;
  margin-top: 1px;
}
.node.n-elite {
  border-style: double;
  border-width: 4px;
}
.node.n-boss {
  width: 76px;
  height: 76px;
  background: #3b2a2a;
  color: #f1d489;
  border: 3px solid var(--gold);
}
.node.n-boss i {
  font-size: 32px;
}
.node.done {
  background: var(--ink);
  color: var(--paper);
  opacity: 0.55;
}
.node.avail {
  opacity: 1;
  color: var(--ink);
  border-color: var(--foe);
  background: #fff6e0;
  box-shadow: 0 0 0 4px rgba(184, 50, 42, 0.2), 0 6px 14px rgba(0, 0, 0, 0.25);
  animation: nodePulse 1.4s ease-in-out infinite;
}
.node.n-boss.avail {
  background: #5e130f;
  color: #ffe7a8;
}
@keyframes nodePulse {
  50% {
    box-shadow: 0 0 0 9px rgba(184, 50, 42, 0.08), 0 6px 14px rgba(0, 0, 0, 0.25);
  }
}
.boss-label {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-hanja);
  font-weight: 900;
  font-size: 14px;
  letter-spacing: 0.2em;
  color: var(--foe-d);
  white-space: nowrap;
}

/* 시트 공통 목록 */
.item-list,
.hero-pick,
.rw-list,
.choice-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.item-row,
.hp-row,
.ch-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(27, 26, 23, 0.2);
}
.item-row[disabled],
.hp-row[disabled],
.ch-row[disabled] {
  opacity: 0.45;
}
.item-row.unknown {
  opacity: 0.55;
}
.ig,
.ch-row > i,
.trait-row > i {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-style: normal;
  font-family: var(--font-hanja);
  font-weight: 900;
  font-size: 20px;
  color: #fff4dc;
  background: #3a3530;
}
.ig-disc {
  width: 36px;
  height: 36px;
  font-size: 18px;
  flex: none;
}
.it,
.hp-row > span,
.ch-row > span {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.it b,
.hp-row b,
.ch-row b {
  font-size: 14px;
}
.it small,
.hp-row small,
.ch-row small {
  font-size: 11.5px;
  color: var(--ink-soft);
  line-height: 1.45;
}
.ic {
  flex: none;
  font-weight: 700;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.hp-row.locked > .medal,
.hp-row.locked > span {
  filter: grayscale(0.9);
  opacity: 0.8;
}
.rw {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-bottom: 1px dashed rgba(27, 26, 23, 0.2);
  font-size: 14px;
}
.rw span {
  flex: 1;
  min-width: 0;
}
.rw small {
  color: var(--ink-soft);
  font-size: 11px;
}
.rw b {
  color: var(--foe-d);
  font-variant-numeric: tabular-nums;
}
.rw-disc {
  width: 22px;
  height: 22px;
  font-size: 11px;
  flex: none;
}
.end-screen .rw,
.result .rw {
  border-color: rgba(239, 227, 200, 0.2);
}
.event-text {
  font-size: 14.5px;
  line-height: 1.7;
  margin: 0 0 12px;
}
.choice-list .btn {
  font-size: 15px;
  min-height: 48px;
  letter-spacing: 0.02em;
  font-family: var(--font-body);
}
.choice-list .btn.ghost,
.gacha-acts .btn.ghost {
  color: var(--ink);
}
.unlock-note {
  margin: 8px 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(184, 50, 42, 0.12);
  font-size: 13px;
}
.foe-sheet,
.train-head {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
}
.trait-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  font-size: 12.5px;
  border-bottom: 1px dashed rgba(27, 26, 23, 0.18);
}
.trait-row > i {
  width: 28px;
  height: 28px;
  font-size: 15px;
  background: var(--foe-d);
}
.trait-row b {
  flex: none;
  font-size: 13px;
}
.trait-row span {
  color: var(--ink-soft);
  line-height: 1.45;
}
.item-list .item-row[disabled] {
  pointer-events: none;
}

/* 도전 */
.ch-row > i {
  background: var(--foe-d);
}

/* 끝 화면 */
.end-screen {
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px 22px calc(var(--safe-b) + 24px);
  background: radial-gradient(ellipse at center, #2d2923, #0f0e0c);
  color: var(--paper);
  overflow-y: auto;
}
.end-seal {
  width: 120px;
  height: 120px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-family: var(--font-hanja);
  font-weight: 900;
  font-size: 84px;
  background: var(--foe);
  color: #fbe9c9;
  box-shadow: inset 0 0 0 6px #fbe9c9, inset 0 0 0 10px var(--foe);
  transform: rotate(-5deg);
  animation: stamp 0.55s 0.2s cubic-bezier(0.2, 1.8, 0.4, 1) both;
}
.end-seal.lose {
  background: #3b3833;
  color: #d8d0c0;
  box-shadow: inset 0 0 0 6px #b8b0a0, inset 0 0 0 10px #3b3833;
}
.end-title {
  margin: 0;
  font-family: var(--font-brush);
  font-size: 38px;
  color: var(--gold-l);
}
.end-sub {
  margin: -6px 0 0;
  font-size: 13px;
  opacity: 0.75;
}
.end-earned {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 22px;
  padding: 12px 18px;
  border: 1px solid rgba(201, 162, 74, 0.5);
  border-radius: 10px;
  font-size: 14px;
  min-width: 240px;
}
.end-earned div {
  display: flex;
  justify-content: space-between;
}
.end-earned b {
  color: var(--gold-l);
}
.end-screen .sheet-note {
  color: rgba(239, 227, 200, 0.7);
}
.end-screen .rw-list {
  width: 100%;
  max-width: 320px;
}

/* 비급각 */
.gacha-art {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 18px 12px;
  text-align: center;
}
.gacha-art .scroll {
  width: 110px;
  padding: 18px 0;
  border-radius: 8px;
  font-family: var(--font-hanja);
  font-weight: 900;
  font-size: 44px;
  line-height: 1.15;
  color: #fbe9c9;
  background: linear-gradient(90deg, #5e130f, #8e2119 20%, #8e2119 80%, #5e130f);
  box-shadow: 0 0 0 4px var(--gold), 0 12px 30px rgba(94, 19, 15, 0.45);
  animation: breathe 3s ease-in-out infinite;
}
.gacha-art p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--ink-2);
}
.pity {
  text-align: center;
}
.gacha-acts {
  display: flex;
  gap: 10px;
}
.gacha-acts .btn {
  flex: 1;
  flex-direction: column;
  gap: 0;
  line-height: 1.2;
  padding: 6px 0;
}
.gacha-acts small {
  font-size: 11px;
  font-family: var(--font-body);
  letter-spacing: 0;
  opacity: 0.85;
}
.link {
  align-self: center;
  font-size: 13px;
  text-decoration: underline;
  color: var(--ink-soft);
  padding: 8px;
}
.rates {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
}
.rates td {
  padding: 6px 4px;
  border-bottom: 1px dashed rgba(27, 26, 23, 0.2);
}
.rates td:last-child {
  text-align: right;
  font-weight: 700;
}
.pull-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}
.pull-grid.one {
  grid-template-columns: minmax(0, 120px);
  justify-content: center;
}
.pc {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 2px 6px;
  border-radius: 8px;
  background: #2d2923;
  color: var(--paper);
  text-align: center;
  opacity: 0;
  transform: rotateY(90deg) scale(0.8);
  transition: transform 0.35s cubic-bezier(0.3, 1.6, 0.5, 1), opacity 0.2s;
  min-width: 0;
}
.pc.show {
  opacity: 1;
  transform: none;
}
.pc i {
  font-style: normal;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-hanja);
  font-weight: 900;
  font-size: 18px;
  background: radial-gradient(circle at 35% 30%, #fff, var(--rc, #8a8272) 55%, #2a2520);
  color: #1b1a17;
}
.pc i.el {
  background: radial-gradient(circle at 35% 30%, #f7e2a6, #b07a1c 60%, #5a3a0a);
  color: #fff;
}
.pc .disc {
  width: 34px;
  height: 34px;
  font-size: 16px;
}
.pc b {
  font-size: 10.5px;
  line-height: 1.2;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pc small {
  font-size: 9.5px;
  opacity: 0.7;
}
.pc.r2 {
  box-shadow: 0 0 0 2px var(--rc), 0 0 12px var(--rc);
}
.pc.r3 {
  box-shadow: 0 0 0 2px var(--rc), 0 0 22px var(--rc);
  background: linear-gradient(160deg, #5a4415, #2d2923);
}

/* 수련 */
.htabs {
  display: flex;
  gap: 8px;
  padding: 0 14px 6px;
}
.htab {
  flex: 1;
  height: 44px;
  border-radius: 10px;
  font-family: var(--font-hanja);
  font-weight: 900;
  font-size: 22px;
  color: var(--c);
  background: rgba(255, 255, 255, 0.4);
  border: 1.5px solid rgba(27, 26, 23, 0.25);
}
.htab.on {
  background: var(--ink);
  border-color: var(--ink);
  box-shadow: 0 3px 0 var(--c);
}
.htab.locked {
  opacity: 0.45;
  filter: grayscale(0.7);
}
.locked-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  padding: 20px 10px;
}
.locked-hero .medal {
  filter: grayscale(0.8);
}
.locked-hero p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.6;
}
.tslots {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.tslot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.5);
  border: 1.5px solid var(--rc, rgba(27, 26, 23, 0.25));
  text-align: left;
  min-width: 0;
}
.tslot.empty {
  border-style: dashed;
}
.tslot i {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-style: normal;
  font-family: var(--font-hanja);
  font-weight: 900;
  background: radial-gradient(circle at 35% 30%, #fff, var(--rc, #bbb) 55%, #2a2520);
}
.tslot span {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.tslot b {
  font-size: 12.5px;
}
.tslot small {
  font-size: 10.5px;
  color: var(--ink-soft);
  line-height: 1.35;
}
.skill-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sk-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(27, 26, 23, 0.18);
}
.sk-row.locked .disc {
  filter: grayscale(1) brightness(0.8);
}
.sk-info .disc {
  width: 40px;
  height: 40px;
  font-size: 19px;
}
.sk-t {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sk-t b {
  font-size: 14px;
}
.sk-t em {
  font-style: normal;
  font-size: 11px;
  color: #b08a2a;
  margin-left: 4px;
  letter-spacing: -0.05em;
}
.sk-t small {
  font-size: 11px;
  color: var(--ink-soft);
}
.mini-btn {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 5px 8px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--gold-l);
  font-weight: 700;
  font-size: 13px;
  min-width: 78px;
}
.mini-btn small {
  font-size: 9.5px;
  font-weight: 400;
  color: var(--paper);
  opacity: 0.8;
}
.mini-btn[disabled] {
  opacity: 0.4;
}
.maxed {
  font-family: var(--font-hanja);
  font-weight: 900;
  font-size: 22px;
  color: var(--foe);
  padding: 0 14px;
}
.deck-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}
.dslot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 2px 6px;
  border-radius: 8px;
  background: linear-gradient(180deg, #f6ecd6, #dcc79d);
  border: 1.5px solid #5a4415;
  min-width: 0;
}
.dslot .disc {
  width: 36px;
  height: 36px;
  font-size: 17px;
}
.dslot small {
  font-size: 10.5px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 전투 HUD 추가 */
.foe-info {
  flex: none;
  border-radius: 50%;
}
.pinfo .traits {
  display: flex;
  gap: 2px;
}
.pinfo .traits i {
  font-style: normal;
  font-family: var(--font-hanja);
  font-weight: 900;
  font-size: 10.5px;
  padding: 0 3px;
  border-radius: 3px;
  background: #5e130f;
  color: #fbe9c9;
}
.prow .item-btn {
  width: 30px;
  height: 30px;
  font-size: 14px;
}

/* 초식 패: 공격 수치·키워드 */
.card .atk {
  position: absolute;
  top: 3px;
  right: 3px;
  min-width: 20px;
  height: 18px;
  padding: 0 4px;
  border-radius: 5px;
  display: grid;
  place-items: center;
  grid-auto-flow: column;
  font-family: var(--font-hanja);
  font-weight: 900;
  font-size: 11.5px;
  color: #fff4dc;
  background: linear-gradient(180deg, #d0463b, #8e2119);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}
.card .atk small {
  font-size: 9px;
  opacity: 0.85;
}
.card .tg {
  font-size: clamp(8.5px, 2.3vw, 10px);
  line-height: 1.1;
  color: var(--foe-d);
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card {
  padding: 11% 3px 5%;
  justify-content: space-between;
}
.card .disc {
  width: 52%;
}
.card .nm {
  margin-top: 2px;
}

/* 예상 피해 · 초식 정보 띠 · 기물 살펴보기 */
.hpbar .pv {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 0;
  background: repeating-linear-gradient(45deg, #fff 0 4px, #ffb3a6 4px 8px);
  animation: pvBlink 0.7s ease-in-out infinite;
  z-index: 1;
}
@keyframes pvBlink {
  50% {
    opacity: 0.35;
  }
}
.hpbar span {
  z-index: 2;
}
.skill-strip,
.inspect {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 6px;
  z-index: 4;
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 5px 9px;
  border-radius: 10px;
  background: rgba(27, 26, 23, 0.9);
  border: 1px solid var(--gold-d);
  color: var(--paper);
  font-size: 12px;
  line-height: 1.45;
  pointer-events: none;
  transition: opacity 0.15s;
}
.skill-strip[hidden],
.inspect[hidden] {
  display: none;
}
.skill-strip.dim {
  opacity: 0.06;
}
.inspect {
  top: 8px;
  bottom: auto;
  flex-direction: column;
  gap: 2px;
}
.ss-disc {
  flex: none;
  width: 34px;
  height: 34px;
  font-size: 17px;
}
.ss-t {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.ss-t b {
  font-size: 13.5px;
  color: var(--gold-l);
}
.ss-t b em {
  font-style: normal;
  font-size: 10px;
  color: #e9b949;
}
.ss-stats {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
.ss-stats i {
  font-style: normal;
  font-family: var(--font-hanja);
  font-weight: 700;
  font-size: 11px;
  padding: 0 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.12);
}
.skill-strip small,
.inspect small {
  opacity: 0.85;
}
.skill-strip small {
  font-size: 11px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.skill-strip .ss-chain {
  -webkit-line-clamp: 1;
}
.skill-strip .ss-t b {
  display: flex;
  align-items: center;
  gap: 6px;
}
.ss-chain {
  color: #f1d489;
}

.ss-break {
  color: #f09a86;
}
.skill-strip .ss-break {
  -webkit-line-clamp: 1;
}

/* 비전 초식 */
.disc.secret {
  background: radial-gradient(circle at 35% 30%, #e2ccff, #6b3fa8 45%, #2a1545);
  box-shadow: inset 0 0 0 2.5px #d9b8ff, 0 0 8px rgba(181, 140, 255, 0.6), 0 2px 4px rgba(0, 0, 0, 0.35);
}
.secret-tag {
  display: inline-block;
  font-family: var(--font-hanja);
  font-weight: 900;
  font-size: 10px;
  padding: 0 4px;
  border-radius: 3px;
  background: #6b3fa8;
  color: #f3e8ff;
  vertical-align: middle;
}
.secret-note {
  font-size: 12px !important;
  color: #6b3fa8;
  margin: 4px 0 0 !important;
}
.sk-row.secret {
  border-color: rgba(107, 63, 168, 0.45);
  background: linear-gradient(90deg, rgba(181, 140, 255, 0.15), rgba(255, 255, 255, 0.45));
}
.mini-btn.secret-lock {
  background: #3a2352;
  color: #e2ccff;
}
.skill-chip.secret {
  border-color: rgba(107, 63, 168, 0.5);
  background: rgba(181, 140, 255, 0.15);
}
.pc.sec {
  background: linear-gradient(160deg, #4a2a6e, #2d2923);
}

/* 런 한정 심득·내상 */
.boon-row {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  align-items: center;
  text-align: left;
  min-height: 20px;
}
.boon-row span {
  font-size: 10.5px;
  color: var(--ink-soft);
}
.boon-row i,
.trait-row.bn > i,
.trait-row.bb > i {
  font-style: normal;
  font-family: var(--font-hanja);
  font-weight: 900;
  font-size: 11px;
  width: 20px;
  height: 20px;
  border-radius: 5px;
  display: grid;
  place-items: center;
  color: #fff4dc;
}
.boon-row i.bn,
.trait-row.bn > i {
  background: #8a6a26;
}
.boon-row i.bb,
.trait-row.bb > i {
  background: #5a2a7e;
}
.trait-row.bn > i,
.trait-row.bb > i {
  width: 28px;
  height: 28px;
  font-size: 15px;
}
.rs-hp small .po {
  color: #4f7f2a;
}
.rs-hp small .ul {
  color: #b8322a;
}
.boon-pick {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.boon-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 12px 6px;
  border-radius: 10px;
  background: linear-gradient(180deg, #2d2923, #15130f);
  color: var(--paper);
  border: 1.5px solid var(--gold);
  text-align: center;
  min-width: 0;
}
.boon-card i {
  font-style: normal;
  font-family: var(--font-hanja);
  font-weight: 900;
  font-size: 26px;
  color: var(--gold-l);
}
.boon-card b {
  font-size: 13.5px;
}
.boon-card small {
  font-size: 11px;
  line-height: 1.4;
  opacity: 0.8;
}
.boon-card:active {
  transform: scale(0.97);
}

/* 규칙 안내 */
.rules {
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-size: 13px;
  line-height: 1.65;
}
.rules h4 {
  margin: 0 0 4px;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.rules h4 i {
  font-style: normal;
  font-family: var(--font-hanja);
  font-weight: 900;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--gold-l);
  font-size: 15px;
}
.rules p,
.rules ul {
  margin: 0;
}
.rules ul {
  padding-left: 18px;
}
.rules li + li {
  margin-top: 3px;
}
.rules .formula {
  margin: 4px 0 6px;
  padding: 7px 10px;
  border-radius: 8px;
  background: rgba(184, 50, 42, 0.1);
  border-left: 3px solid var(--foe);
  font-weight: 700;
  font-size: 13px;
}
.rules .formula small {
  font-weight: 400;
  color: var(--ink-soft);
}
.title-row .btn {
  font-size: 13px;
  letter-spacing: 0.02em;
}

/* 한글 병기 라벨 */
.topbar {
  flex-wrap: wrap;
  row-gap: 6px;
}
.topbar .money {
  flex-basis: 100%;
  justify-content: flex-end;
}
.money em {
  font-style: normal;
  font-weight: 400;
  font-size: 10.5px;
  opacity: 0.8;
  margin-right: 3px;
}
.item-btn.wide {
  width: auto;
  padding: 0 9px;
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.prow .item-btn.wide {
  width: auto;
  font-size: 11.5px;
  padding: 0 7px;
}
.ult-mini span {
  flex-direction: column;
  line-height: 1;
}
.ult-mini small {
  font-family: var(--font-body);
  font-size: 7.5px;
  font-weight: 700;
  color: rgba(239, 227, 200, 0.75);
  margin-top: 1px;
}
.st i {
  font-family: var(--font-body);
  font-size: 10.5px;
}
.pinfo .traits i {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 9.5px;
}
.maxed {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
}
.maxed small {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 700;
}
.chip-tag {
  display: block;
  font-size: 9.5px;
  color: var(--foe-d);
}
.card .atk small {
  font-family: var(--font-body);
  font-size: 8.5px;
  margin-right: 1px;
}
.boon-row i {
  width: auto;
  padding: 0 5px;
  font-family: var(--font-body);
  font-size: 10px;
}

.card .tg b {
  display: block;
  color: #8e2119;
  font-size: clamp(9px, 2.5vw, 10.5px);
}
.prow .hpbar {
  min-width: 110px;
}

/* ── 경제 보완 ───────────────── */
.c-essence {
  background: radial-gradient(circle at 35% 30%, #efe2ff, #8b5cd6 60%, #3a1f6b);
}
.cost-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 10px 0 4px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(27, 26, 23, 0.06);
  border: 1px solid rgba(27, 26, 23, 0.2);
}
.cost-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.cost-row i {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-style: normal;
  font-family: var(--font-hanja);
  font-weight: 900;
  font-size: 11px;
  color: #fff;
}
.cost-row span {
  flex: 1;
}
.cost-row b {
  font-size: 16px;
}
.cost-row small {
  font-size: 11px;
  color: var(--ink-soft);
  min-width: 96px;
  text-align: right;
}
.cost-row.short b,
.cost-row.short small {
  color: var(--foe);
}
.confirm-acts {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}
.confirm-acts .btn {
  flex: 1;
  min-height: 46px;
  font-size: 15px;
}
.confirm-acts .btn.ghost {
  flex: 0 0 34%;
  color: var(--ink);
}
.gtabs {
  display: flex;
  gap: 8px;
  padding: 0 14px 6px;
}
.gtab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 8px 4px;
  border-radius: 10px;
  border: 1.5px solid rgba(27, 26, 23, 0.25);
  background: rgba(255, 255, 255, 0.4);
  font-size: 13px;
  font-weight: 700;
}
.gtab b {
  font-family: var(--font-hanja);
  font-size: 16px;
}
.gtab small {
  font-size: 10.5px;
  font-weight: 400;
  color: var(--ink-soft);
}
.gtab.on {
  background: var(--ink);
  color: var(--gold-l);
  border-color: var(--ink);
}
.gtab.on small {
  color: rgba(239, 227, 200, 0.7);
}
.gacha-art .scroll.treasure {
  background: linear-gradient(90deg, #5a4415, #8a6a26 20%, #8a6a26 80%, #5a4415);
}
.pc i.es {
  background: radial-gradient(circle at 35% 30%, #efe2ff, #8b5cd6 60%, #3a1f6b);
  color: #fff;
}
.mini-btn.brk {
  background: linear-gradient(180deg, #6b3fa8, #3a1f6b);
  color: #f3e8ff;
}
.tlv {
  font-style: normal;
  color: #b8322a;
  font-weight: 900;
}
.htab small {
  display: block;
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 700;
  color: inherit;
  opacity: 0.8;
  margin-top: -2px;
}
.htab {
  height: 52px;
  line-height: 1.1;
}
.tile.badge {
  position: relative;
}
.tile.badge::after {
  content: '받을 보상';
  position: absolute;
  top: 6px;
  right: 6px;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 99px;
  background: var(--foe);
  color: #fff;
}
.col-sum {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}
.col-sum div {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 4px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(27, 26, 23, 0.18);
  font-size: 11px;
  color: var(--ink-soft);
}
.col-sum b {
  font-size: 19px;
  color: var(--ink);
  font-family: var(--font-hanja);
}
.item-row.col .bar {
  display: block;
  height: 5px;
  margin-top: 4px;
  border-radius: 99px;
  background: rgba(27, 26, 23, 0.12);
  overflow: hidden;
}
.item-row.col .bar i {
  display: block;
  height: 100%;
  background: var(--gold);
}
.item-row.col.ready {
  border-color: var(--foe);
  background: rgba(184, 50, 42, 0.08);
}
.item-row.col.claimed {
  opacity: 0.6;
}
.item-row.col em {
  font-style: normal;
  color: #6b3fa8;
}
.sec { flex-wrap: wrap; row-gap: 2px; }

.modal .sheet h3 { letter-spacing: 0.04em; word-break: keep-all; }

/* 전투 툴팁 */
[data-tip] { cursor: pointer; pointer-events: auto; }
.traits i[data-tip], .st i[data-tip] { text-decoration: underline dotted rgba(255,255,255,0.45); text-underline-offset: 2px; }
.ult-mini[data-tip]::after {
  content: '?';
  position: absolute; right: -3px; bottom: -3px;
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--paper); color: var(--ink);
  font: 700 9px/13px var(--font-body); text-align: center;
}
.tip-gauge {
  position: relative; height: 18px; margin: 4px 0 6px;
  border-radius: 99px; background: rgba(27, 26, 23, 0.15); overflow: hidden;
}
.tip-gauge > div { height: 100%; background: linear-gradient(90deg, #b8862b, #e2b64a); }
.tip-gauge span {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 11.5px; font-weight: 700; color: var(--ink);
}
.ult-mini { position: relative; }
.tip-head { display: flex; align-items: center; gap: 10px; }
.tip-head i {
  width: 34px; height: 34px; border-radius: 9px; flex: none; display: grid; place-items: center;
  background: var(--foe-d); color: var(--gold-l); font: normal 900 18px var(--font-hanja);
}
.tip-head b { font-size: 16px; }
.tip-head small { margin-left: 6px; font-weight: 400; font-size: 12px; color: var(--ink-soft); font-family: var(--font-hanja); }
.tip-desc { margin: 8px 0; font-size: 13.5px; line-height: 1.6; }

/* 줄바꿈: 한글은 어절 단위로만 끊고, 칩·수치 라벨은 한 줄 유지 */
html, body, button, input { word-break: keep-all; overflow-wrap: break-word; line-break: strict; }
.st i, .traits i, .money span, .nm .dl, .secret-tag, .qn, .cost-row b, .cost-row small, .cost-row span,
.skill-detail .stats b, .rw-list .rw b, .tip-gauge span, .card .atk, .card .cost, .next-card span,
.mini-btn, .tile small, .pill, .tag, .chip, .badge { white-space: nowrap; }
.st .bu { background: #b8541f; color: #fff0e0; }
.st .fr { background: #3f7fae; color: #e8f6ff; }
.st .se { background: #34466e; color: #e6ecff; }
.st .bl { background: #8e1f2f; color: #ffe6ea; }
.st .ch { background: #2a2f4e; color: #f1d489; }
/* 내상 위험 표시 (기연 선택지) */
.choice-list .warn { display: block; margin-top: 4px; font-size: 12px; font-style: normal; color: #b8322a; font-weight: 700; }
.choice-list .btn.primary .warn, .choice-list .btn:not(.ghost) .warn { color: #ffd2c8; }
.event-text.bane { color: #8e1f1f; font-weight: 700; }
.event-text.boon { color: #6b4f12; font-weight: 700; }

/* 「?」 여정 노드 */
.node.n-mystery { background: #4a3f5e; color: #f1d489; border-style: dashed; }
.node.n-mystery i { font-family: var(--font-body); font-size: 26px; }
.node.was-mystery::after {
  content: '?'; position: absolute; top: -6px; right: -6px; width: 16px; height: 16px; border-radius: 50%;
  background: #4a3f5e; color: #f1d489; font: 700 11px/16px var(--font-body); text-align: center;
}
.reveal { display: flex; align-items: center; justify-content: center; gap: 18px; padding: 10px 0; }
.reveal .rv-q { font: 900 54px var(--font-body); color: #4a3f5e; opacity: 0.35; animation: rvFade 0.6s ease-out both; }
.reveal .rv-a { display: flex; flex-direction: column; align-items: center; gap: 4px; animation: rvPop 0.5s 0.2s cubic-bezier(.2,1.6,.4,1) both; }
.reveal .rv-a i { width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--gold-l); font: normal 900 30px var(--font-hanja); }
.reveal .rv-a b { font-size: 18px; }
.reveal .rv-a small { color: var(--ink-soft); font-size: 12.5px; }
@keyframes rvPop { from { transform: scale(0.3); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes rvFade { from { transform: scale(1.4); opacity: 1; } to { opacity: 0.35; } }
.ch-group { margin: 6px 0 -2px; font-size: 12px; font-weight: 700; color: var(--ink-soft); }

/* 상태 칩은 판 가장자리에 한 줄로 띄워, 이름·체력 막대를 밀어내지 않는다 */
.hud-top .pinfo .nm .st, .hud-bottom .prow .st {
  position: absolute; z-index: 4; display: flex; flex-wrap: wrap; gap: 4px; margin: 0; max-width: calc(100% - 16px);
}
.hud-top .pinfo .nm .st { top: calc(100% + 6px); right: 8px; justify-content: flex-end; }
.hud-bottom .prow .st { bottom: calc(100% + 6px); left: 8px; }
.hud-top .st i, .hud-bottom .st i { font-size: 12px; padding: 2px 6px; box-shadow: 0 1px 3px rgba(0,0,0,0.35); }
.pinfo .nm .traits { min-width: 0; overflow: hidden; flex-shrink: 1; }
.toggle span small { display: block; font-size: 11.5px; color: var(--ink-soft); font-weight: 400; margin-top: 2px; }
.toggle.tut-row .mini-btn { flex: none; }
.gacha-motto { display: inline-block; margin-top: 8px; font-size: 12.5px; color: var(--gold-d); font-style: italic; }

/* ── 표·격자 배치 (수련·행낭·도감·도전) ── */
.htabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.htab { height: 46px; font-size: 19px; }
.htab small { font-size: 9.5px; }
em.up { font-style: normal; color: #2f7d4a; font-weight: 700; font-size: 0.86em; margin-left: 1px; }
.dim { color: var(--ink-soft); font-style: normal; }
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12.5px; background: rgba(255, 255, 255, 0.45); border: 1px solid rgba(27, 26, 23, 0.18); border-radius: 10px; overflow: hidden; }
.tbl th { font-size: 11px; font-weight: 700; color: var(--ink-soft); text-align: center; padding: 6px 4px; background: rgba(27, 26, 23, 0.06); white-space: nowrap; }
.tbl td { padding: 5px 4px; text-align: center; border-top: 1px solid rgba(27, 26, 23, 0.1); vertical-align: middle; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl td:first-child, .tbl th:first-child { text-align: left; padding-left: 8px; }
.tbl tr.locked td { opacity: 0.6; }
.tbl tr.secret td:first-child { box-shadow: inset 3px 0 0 #6b3fa8; }
.tbl .mini-btn { min-width: 50px; padding: 5px 6px; font-size: 12px; }
.tbl td.ok { color: #2f7d4a; font-weight: 700; }
.sk-tbl .sk-name { display: flex; align-items: center; gap: 6px; background: none; border: 0; padding: 0; text-align: left; font: inherit; color: inherit; }
.sk-tbl .sk-name span { display: flex; flex-direction: column; font-weight: 700; font-size: 13px; line-height: 1.2; white-space: normal; }
.sk-tbl .sk-name small { font-weight: 400; font-size: 10.5px; color: var(--ink-soft); }
.tbl-disc { width: 30px !important; height: 30px !important; font-size: 15px !important; flex: none; }
.secret-dot { font-style: normal; font-size: 10px; background: #6b3fa8; color: #fff; border-radius: 3px; padding: 0 3px; margin-right: 3px; }
.brk-lv { font-style: normal; color: #6b3fa8; font-weight: 800; }
.col-tbl td:first-child { white-space: normal; }
.col-tbl td:first-child b { display: block; font-size: 13px; }
.col-tbl td:first-child small { display: block; font-size: 11px; color: var(--ink-soft); margin-top: 1px; }
.col-tbl td.prog { width: 78px; font-size: 11.5px; }
.col-tbl .bar { display: block; height: 5px; margin-top: 3px; border-radius: 3px; background: rgba(27, 26, 23, 0.12); overflow: hidden; }
.col-tbl .bar i { display: block; height: 100%; background: var(--gold); }
.col-tbl tr.ready td { background: rgba(201, 162, 74, 0.16); }
.col-tbl tr.claimed td { opacity: 0.55; }
.qg { font-style: normal; display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 4px; background: var(--ink); color: var(--gold-l); font-family: var(--font-hanja); font-size: 11px; margin-right: 4px; vertical-align: -3px; }
.qlv { font-style: normal; font-size: 10.5px; color: var(--gold-d); margin-left: 2px; }
.kv th { width: 76px; text-align: left !important; vertical-align: top; padding-left: 8px; }
.kv td { text-align: left !important; white-space: normal; line-height: 1.5; }
.grid3, .grid4 { display: grid; gap: 6px; }
.grid3 { grid-template-columns: repeat(3, 1fr); }
.grid4 { grid-template-columns: repeat(4, 1fr); }
.gcell { --rc: var(--gold-d); display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px 7px; border-radius: 10px; background: rgba(255, 255, 255, 0.55); border: 1.5px solid color-mix(in srgb, var(--rc) 60%, transparent); font: inherit; color: var(--ink); min-width: 0; }
.gcell i { font-style: normal; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--rc); font-family: var(--font-hanja); font-weight: 900; font-size: 19px; box-shadow: inset 0 0 0 2px var(--rc); }
.gcell b { font-size: 12px; line-height: 1.2; text-align: center; word-break: keep-all; }
.gcell small { font-size: 10.5px; color: var(--ink-soft); text-align: center; }
.gcell.unknown { opacity: 0.5; border-style: dashed; }
.gcell.unknown i { color: #a09a90; box-shadow: none; }
.gcell.can-up { box-shadow: 0 0 0 2px #2f7d4a55; }
.gcell.can-up::after { content: '강화 가능'; font-size: 9.5px; color: #2f7d4a; font-weight: 700; }
.gcell.sm i { width: 30px; height: 30px; font-size: 16px; }
.gcell.sm b { font-size: 11px; }
.ch-tile { --rc: var(--gold-d); display: flex !important; flex-direction: column; align-items: center; gap: 3px; padding: 9px 4px !important; text-align: center; }
.ch-tile i { width: 38px !important; height: 38px !important; border-radius: 50%; background: var(--rc) !important; }
.ch-tile b { font-size: 12.5px; }
.ch-tile small { font-size: 10.5px; }
.up-preview { display: flex; flex-direction: column; gap: 4px; margin: 0 0 8px; padding: 8px 12px; border-radius: 10px; background: rgba(47, 125, 74, 0.08); }
.up-preview div { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.up-preview span { width: 64px; color: var(--ink-soft); font-size: 12.5px; }
.up-preview i { font-style: normal; color: var(--ink-soft); }
.up-preview b.nx { color: #2f7d4a; }
.up-note { font-size: 12px; color: var(--ink-soft); margin: 8px 0 0; text-align: center; }
.claim-all { width: 100%; margin: 2px 0 4px; }
.claim-all[disabled] { opacity: 0.5; }
.gtabs.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.gtabs.three .gtab b { font-size: 14px; }
.gtabs.three .gtab small { font-size: 10px; }
.perm { margin: 0; }
.confirm-acts.one { justify-content: center; }
.skill-chip { position: relative; }
.skill-chip .gem.lv { position: absolute; top: 4px; right: 4px; left: auto; font-size: 10px; padding: 1px 4px; border-radius: 6px; background: #2f7d4a; color: #fff; width: auto; height: auto; }
.col-sum { gap: 6px !important; }
.col-sum > div { padding: 6px 4px !important; font-size: 11px !important; }
.col-sum > div b { font-size: 18px !important; }

/* 시트 틀 고정, 안쪽만 스크롤 */
.sheet { overflow: hidden; display: flex; flex-direction: column; }
.sheet-in {
  overflow-y: auto; min-height: 0; margin: -4px -6px -4px; padding: 4px 6px 4px;
  scrollbar-width: thin; overscroll-behavior: contain;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 10px, #000 calc(100% - 10px), transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0, #000 10px, #000 calc(100% - 10px), transparent 100%);
}
.hero-card .hc-scroll {
  margin: 7px; padding: 10px 10px 10px;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 12px, #000 calc(100% - 12px), transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0, #000 12px, #000 calc(100% - 12px), transparent 100%);
}

/* 난이도 */
.diff-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 0 2px; }
.dp { display: flex; flex-direction: column; align-items: center; gap: 0; padding: 7px 4px; border-radius: 10px; border: 1.5px solid rgba(241, 212, 137, 0.35); background: rgba(255, 255, 255, 0.06); color: var(--paper); font: inherit; }
.meta-body > .diff-pick .dp, .diff-pick.light .dp { color: var(--ink); border-color: rgba(27,26,23,0.25); background: rgba(255,255,255,0.45); }
.dp b { font-family: var(--font-hanja); font-size: 17px; }
.dp span { font-size: 12px; font-weight: 700; }
.dp small { font-size: 10px; opacity: 0.75; }
.dp.on { background: var(--gold); color: var(--ink) !important; border-color: var(--gold-l); box-shadow: 0 0 0 2px rgba(241, 212, 137, 0.4); }
.dp.on.dp-sungryeon { background: #7b4fb3; color: #fff !important; border-color: #b99be0; }
.dp.on.dp-jeoljeong { background: #a8322a; color: #fff !important; border-color: #f09a86; }
.dp[disabled] { opacity: 0.4; }
.diff-chip { font-style: normal; font-size: 10.5px; font-weight: 700; padding: 0 5px; border-radius: 4px; background: var(--gold); color: var(--ink); margin-right: 4px; }
.diff-chip.dp-sungryeon { background: #7b4fb3; color: #fff; }
.diff-chip.dp-jeoljeong { background: #a8322a; color: #fff; }

/* 경맥 */
.mer-tbl .mname { font-family: var(--font-hanja); font-size: 16px; display: flex; flex-direction: column; line-height: 1.1; }
.mer-tbl .mname span { font-family: var(--font-body); font-size: 11px; color: var(--ink-soft); font-weight: 400; }
.mer-tbl td.mstat { text-align: left; white-space: normal; font-size: 11.5px; line-height: 1.35; }
.mer-tbl td.mstat b { font-size: 14px; }
.mer-tbl td.mcost { font-size: 11px; line-height: 1.35; }
.pips { display: flex; gap: 2px; margin-top: 3px; flex-wrap: wrap; }
.pips i { width: 9px; height: 5px; border-radius: 2px; background: rgba(27, 26, 23, 0.15); }
.pips i.on { background: linear-gradient(90deg, #c9a24a, #f1d489); }
.reset-btn { width: 100%; font-size: 13px; }
/* 화면 연출 */
.juice-layer { position: fixed; inset: 0; pointer-events: none; z-index: 999; }
.jp { position: absolute; width: 7px; height: 7px; border-radius: 2px; transform: translate(-50%, -50%); animation: jpFly 0.7s cubic-bezier(.2,.8,.3,1) forwards; }
.jp.gold { background: #f1d489; box-shadow: 0 0 6px #e2b64a; }
.jp.jade { background: #7fd1a0; box-shadow: 0 0 6px #3aa46a; }
.jp.red { background: #f09a86; box-shadow: 0 0 6px #b8322a; }
@keyframes jpFly { 0% { opacity: 1; transform: translate(-50%, -50%) scale(1.2) rotate(0); } 100% { opacity: 0; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy) + 30px)) scale(0.4) rotate(220deg); } }
.juice-pop { animation: jPop 0.45s cubic-bezier(.2,1.8,.4,1); }
@keyframes jPop { 0% { transform: scale(1); } 40% { transform: scale(1.06); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .jp, .juice-pop { animation: none !important; } }
.gtabs.four { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.gtabs.four .gtab { padding: 7px 2px; }
.gtabs.four .gtab b { font-size: 13px; }
.gtabs.four .gtab small { font-size: 9.5px; }
.merit-card { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 12px; background: linear-gradient(160deg, #2a241c, #1b1a17); color: var(--paper); border: 1.5px solid var(--gold-d); }
.merit-card .sheet-note { color: rgba(239, 227, 200, 0.75); margin: 0; }
.mc-rank { display: flex; align-items: baseline; gap: 10px; }
.mc-rank small { font-size: 11px; opacity: 0.7; }
.mc-rank b { font-family: var(--font-hanja); font-size: 28px; color: var(--gold-l); letter-spacing: 0.08em; }
.mc-rank em { font-style: normal; font-size: 12px; color: var(--gold); }
.mc-bar { position: relative; height: 18px; border-radius: 99px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.mc-bar i { display: block; height: 100%; background: linear-gradient(90deg, #b8862b, #f1d489); }
.mc-bar span { position: absolute; inset: 0; display: grid; place-items: center; font-size: 11px; font-weight: 700; color: #fff; text-shadow: 0 1px 2px #000; }

/* ── 손맛 연출 ── */
button:not([disabled]):active { transform: translateY(1px) scale(0.97); }
.tile, .btn, .mini-btn, .gcell, .ch-row, .node { transition: transform 0.08s ease-out, box-shadow 0.15s; }
.hurt-vignette { position: absolute; inset: 0; pointer-events: none; z-index: 6; opacity: 0; background: radial-gradient(ellipse at 50% 100%, rgba(184, 50, 42, var(--a, 0.5)), transparent 62%); }
.hurt-vignette.on { animation: hurtV 0.5s ease-out; }
@keyframes hurtV { 0% { opacity: 1; } 100% { opacity: 0; } }
.dmg-tally { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); z-index: 7; pointer-events: none; display: flex; align-items: baseline; gap: 6px; padding: 3px 12px; border-radius: 99px; background: rgba(27, 26, 23, 0.8); color: var(--paper); box-shadow: 0 2px 8px rgba(0,0,0,0.3); }
.dmg-tally small { font-size: 11px; opacity: 0.75; }
.dmg-tally b { font-family: var(--font-hanja); font-size: 20px; color: var(--gold-l); font-variant-numeric: tabular-nums; }
.dmg-tally.hot b { color: #ff9a6b; text-shadow: 0 0 8px #e0452f; }
.dmg-tally.bump { animation: tallyBump 0.3s cubic-bezier(.2,1.8,.4,1); }
@keyframes tallyBump { 0% { transform: translateX(-50%) scale(1.35); } 100% { transform: translateX(-50%) scale(1); } }
.ko-stamp { position: absolute; left: 50%; top: 42%; z-index: 9; pointer-events: none; font-family: var(--font-hanja); font-weight: 900; font-size: 120px; line-height: 1; padding: 8px 24px; border: 8px solid currentColor; border-radius: 18px; transform: translate(-50%, -50%) rotate(-12deg); animation: koIn 0.6s cubic-bezier(.2,1.6,.4,1) both; }
.ko-stamp.win { color: #b8322a; background: rgba(255, 244, 220, 0.85); }
.ko-stamp.lose { color: #2c2924; background: rgba(220, 210, 190, 0.85); }
@keyframes koIn { 0% { opacity: 0; transform: translate(-50%, -50%) rotate(-12deg) scale(3); } 60% { opacity: 1; } 100% { opacity: 1; transform: translate(-50%, -50%) rotate(-12deg) scale(1); } }
.arena-wrap.ko-zoom canvas { animation: koZoom 1.5s ease-out; }
@keyframes koZoom { 0% { transform: scale(1); filter: brightness(2.2); } 15% { transform: scale(1.05); filter: brightness(1.1); } 100% { transform: scale(1); filter: none; } }
.fly-card { position: fixed; z-index: 60; pointer-events: none; width: 52px; height: 52px; margin-left: -26px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-hanja); font-weight: 900; font-size: 26px; color: #e9f3ef; background: radial-gradient(circle at 35% 30%, #3f8b99, #123239); box-shadow: 0 0 0 3px #c9a24a, 0 6px 18px rgba(0,0,0,0.4); animation: flyCard 0.5s cubic-bezier(.3,.1,.3,1) forwards; }
.fly-card.charged { box-shadow: 0 0 0 3px #f1d489, 0 0 24px #f1d489; }
@keyframes flyCard { 0% { transform: translateY(0) scale(1); opacity: 1; } 100% { transform: translateY(var(--ty)) scale(0.4); opacity: 0; } }
.rw.rw-in { animation: rwIn 0.35s cubic-bezier(.2,1.4,.4,1) both; }
@keyframes rwIn { 0% { opacity: 0; transform: translateY(10px) scale(0.96); } 100% { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .ko-stamp, .fly-card, .rw.rw-in, .dmg-tally.bump, .arena-wrap.ko-zoom canvas, .hurt-vignette.on { animation: none !important; } .fly-card { display: none; } }
.dmg-tally { top: 46%; left: 8px; transform: none; flex-direction: column; align-items: center; gap: 0; padding: 5px 9px; border-radius: 10px; }
.dmg-tally small { font-size: 10px; }
@keyframes tallyBump { 0% { transform: scale(1.35); } 100% { transform: scale(1); } }
.coach { cursor: pointer; pointer-events: auto; }
.coach .step { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.coach-acts { display: flex; gap: 6px; }
.coach-acts button { font: inherit; font-size: 11.5px; padding: 3px 8px; border-radius: 99px; border: 1px solid rgba(241, 212, 137, 0.5); background: transparent; color: var(--gold-l); }
.coach-acts [data-ok] { width: 26px; padding: 3px 0; }
.coach-hint { display: block; margin-top: 4px; font-size: 10.5px; opacity: 0.6; }

/* 행낭 꾸리기 · 저잣거리 진열 */
.carry-row { display: flex; align-items: center; }
.carry-row.on { border-color: var(--gold, #c9a45a); }
.carry-ctl { display: flex; align-items: center; gap: 6px; flex: none; }
.carry-ctl b { min-width: 1.2em; text-align: center; }
.carry-ctl .btn.sm { padding: 4px 10px; min-width: 34px; }
.carry-count b { color: var(--gold, #c9a45a); }
.item-row.sold { opacity: .45; }
.item-row.sold .ic { text-decoration: none; }

/* ── 손맛 3차 ───────────────────────────── */
/* 결과창: 전장의 KO 도장이 머리로 옮겨 앉는다 (도장은 하나만) */
.ko-stamp.in-result { position: relative; left: auto; top: auto; z-index: 1; font-size: 96px; transform: rotate(-12deg); box-shadow: 0 10px 30px rgba(0,0,0,0.6); }
.ko-stamp.in-result.settle { animation: koSettle 0.45s cubic-bezier(.2,1.5,.4,1) both; }
.ko-stamp.in-result.fresh { animation: koInRes 0.6s cubic-bezier(.2,1.6,.4,1) both; }
@keyframes koSettle { 0% { transform: translateY(40px) rotate(-12deg) scale(1.3); } 100% { transform: rotate(-12deg) scale(1); } }
@keyframes koInRes { 0% { opacity: 0; transform: rotate(-12deg) scale(3); } 60% { opacity: 1; } 100% { transform: rotate(-12deg) scale(1); } }
.result .stats > div.st-in { animation: stIn 0.35s cubic-bezier(.2,1.4,.4,1) both; }
@keyframes stIn { 0% { opacity: 0; transform: translateY(8px); } 100% { opacity: 1; transform: none; } }

/* 체력 막대: 맞으면 흔들리고, 회복하면 초록빛 */
.hpbar.hp-hit { animation: hpHit 0.35s ease-out; }
@keyframes hpHit { 0%,100% { transform: translateX(0); } 20% { transform: translateX(-5px); } 40% { transform: translateX(4px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(1px); } }
.hpbar.hp-heal { animation: hpHeal 0.6s ease-out; }
@keyframes hpHeal { 0% { box-shadow: 0 0 0 0 rgba(120, 230, 140, 0.9); } 100% { box-shadow: 0 0 0 8px rgba(120, 230, 140, 0); } }

/* 내공 구슬: 차오르면 튀고, 쓰면 흩어진다 */
.qi-row .q.gain { animation: qiGain 0.4s cubic-bezier(.2,1.8,.4,1) both; }
@keyframes qiGain { 0% { transform: rotate(45deg) scale(0.2); } 100% { transform: rotate(45deg) scale(1); } }
.qi-row .q.spend { animation: qiSpend 0.35s ease-out; }
@keyframes qiSpend { 0% { transform: rotate(45deg) scale(1.5); background: #fff; box-shadow: 0 0 12px #c8f1ff; } 100% { transform: rotate(45deg) scale(1); } }
.qi-row .q:nth-child(2).gain { animation-delay: 0.04s; } .qi-row .q:nth-child(3).gain { animation-delay: 0.08s; }
.qi-row .q:nth-child(4).gain { animation-delay: 0.12s; } .qi-row .q:nth-child(5).gain { animation-delay: 0.16s; }
.qi-row .q:nth-child(6).gain { animation-delay: 0.2s; } .qi-row .q:nth-child(7).gain { animation-delay: 0.24s; }

/* 절초 게이지: 오를 때 들썩, 가득 차면 크게 튄다 */
.ult-btn.ult-bump { animation: ultBump 0.3s cubic-bezier(.2,1.8,.4,1); }
@keyframes ultBump { 0% { transform: scale(1.14); } 100% { transform: scale(1); } }
.ult-btn.ult-full::after { content: '절초!'; position: absolute; left: 50%; bottom: 100%; transform: translateX(-50%); font-family: var(--font-brush); font-size: 20px; color: #ffe7a8; text-shadow: 0 0 8px #b8322a, 0 2px 0 #000; white-space: nowrap; pointer-events: none; animation: ultTag 1.2s ease-out forwards; }
@keyframes ultTag { 0% { opacity: 0; transform: translate(-50%, 10px) scale(0.6); } 20% { opacity: 1; transform: translate(-50%, -4px) scale(1.15); } 70% { opacity: 1; transform: translate(-50%, -10px) scale(1); } 100% { opacity: 0; transform: translate(-50%, -22px); } }

/* 체력 25% 이하: 붉은 맥동 */
.danger-vignette { position: absolute; inset: 0; pointer-events: none; z-index: 6; opacity: 0; background: radial-gradient(ellipse at 50% 50%, transparent 55%, rgba(160, 20, 15, 0.55)); transition: opacity 0.4s; }
.danger-vignette.on { animation: danger 1.15s ease-in-out infinite; }
@keyframes danger { 0%, 100% { opacity: 0.25; } 12% { opacity: 0.85; } 28% { opacity: 0.4; } 40% { opacity: 0.75; } }

/* 강타(10 이상): 전장이 한 번 쿵 */
.arena-wrap.punch canvas { animation: punch 0.28s cubic-bezier(.2,1.6,.4,1); }
@keyframes punch { 0% { transform: scale(1.045); filter: brightness(1.6) contrast(1.2); } 100% { transform: scale(1); filter: none; } }

/* 재화: 바뀌면 숫자가 굴러가고 번쩍 */
.money span.up { animation: moneyUp 0.6s ease-out; }
.money span.down { animation: moneyDown 0.5s ease-out; }
@keyframes moneyUp { 0% { transform: scale(1.18); box-shadow: 0 0 0 0 rgba(241, 212, 137, 0.9); } 100% { transform: scale(1); box-shadow: 0 0 0 8px rgba(241, 212, 137, 0); } }
@keyframes moneyDown { 0%, 100% { transform: none; } 25% { transform: translateY(2px); color: #ff9a8a; } }

/* 본거지 칸이 차례로 떠오른다 */
.hub-grid .tile { animation: tileIn 0.4s cubic-bezier(.2,1.4,.4,1) both; }
.hub-grid .tile:nth-child(2) { animation-delay: 0.04s; } .hub-grid .tile:nth-child(3) { animation-delay: 0.08s; }
.hub-grid .tile:nth-child(4) { animation-delay: 0.12s; } .hub-grid .tile:nth-child(5) { animation-delay: 0.16s; }
.hub-grid .tile:nth-child(6) { animation-delay: 0.2s; } .hub-grid .tile:nth-child(7) { animation-delay: 0.24s; }
.hub-grid .tile:nth-child(8) { animation-delay: 0.28s; }
@keyframes tileIn { 0% { opacity: 0; transform: translateY(14px) scale(0.94); } 100% { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .ko-stamp.in-result, .result .stats > div.st-in, .hpbar.hp-hit, .hpbar.hp-heal, .qi-row .q.gain, .qi-row .q.spend, .ult-btn.ult-bump,
  .danger-vignette.on, .arena-wrap.punch canvas, .money span.up, .money span.down, .hub-grid .tile { animation: none !important; }
  .ult-btn.ult-full::after { display: none; }
}
.dmg-tally[hidden] { display: none !important; }

/* ── 설정: 화려한 연출 끄기 / 화면 흔들림 끄기 ── */
html.no-fx .jp, html.no-fx .juice-pop, html.no-fx .ko-stamp, html.no-fx .rw.rw-in, html.no-fx .dmg-tally.bump,
html.no-fx .hurt-vignette.on, html.no-fx .result .stats > div.st-in, html.no-fx .hpbar.hp-hit, html.no-fx .hpbar.hp-heal,
html.no-fx .qi-row .q.gain, html.no-fx .qi-row .q.spend, html.no-fx .ult-btn.ult-bump, html.no-fx .danger-vignette.on,
html.no-fx .money span.up, html.no-fx .money span.down, html.no-fx .hub-grid .tile, html.no-fx .node.avail { animation: none !important; }
html.no-fx .fly-card, html.no-fx .ult-btn.ult-full::after, html.no-fx .danger-vignette { display: none; }
html.no-fx .hpbar .lag, html.no-fx .hpbar .fill { transition-duration: 0.12s; transition-delay: 0s; }
html.no-shake .arena-wrap.ko-zoom canvas, html.no-shake .arena-wrap.punch canvas, html.no-shake .hpbar.hp-hit { animation: none !important; }
.toggle .sw { flex: none; margin-left: 10px; }

/* 보상형 광고(시험용) · 교환소 탭 */
.ad-sheet { text-align: center; }
.ad-tag { display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 99px; background: var(--ink); color: var(--paper); margin-bottom: 10px; }
.ad-frame { display: grid; place-items: center; gap: 4px; aspect-ratio: 16 / 10; border-radius: 10px; border: 2px dashed rgba(27, 26, 23, 0.35); background: repeating-linear-gradient(45deg, rgba(27,26,23,.04) 0 10px, transparent 10px 20px); }
.ad-frame b { font-family: var(--font-hanja); font-size: 34px; opacity: .5; }
.ad-frame small { color: var(--ink-soft); }
.ad-bar { height: 6px; border-radius: 99px; background: rgba(27,26,23,.12); overflow: hidden; margin: 12px 0; }
.ad-bar i { display: block; height: 100%; width: 0; background: var(--gold); animation: adBar linear forwards; }
@keyframes adBar { to { width: 100%; } }
.ad-acts { display: flex; gap: 8px; justify-content: center; }
.ad-card { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; border: 2px solid var(--gold); background: linear-gradient(180deg, #fff8e4, #f1e2bd); margin-bottom: 6px; }
.ad-card .ig { flex: none; }
.ad-card .it { flex: 1; min-width: 0; }
.ad-card .it b { display: block; }
.ad-card .it small { color: var(--ink-soft); }
.item-row .ic small { display: block; font-size: 10.5px; font-weight: 400; opacity: .75; }

/* ── 로그인 · 계정 · 우편 ── */
.login-box { display: grid; gap: 8px; width: 100%; }
.login-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.login-row .btn { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 14px; padding-left: 8px; padding-right: 8px; }
.login-row .btn i { font-style: normal; font-weight: 900; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; }
.login-g { background: #fff; color: #333; border-color: #d0d0d0; }
.login-g i { background: #4285f4; color: #fff; }
.login-k { background: #fee500; color: #191600; border-color: #e6cf00; }
.login-k i { background: #191600; color: #fee500; }
.login-box small { text-align: center; color: var(--ink-soft); font-size: 11.5px; }
.title-acc { text-align: center; font-size: 12.5px; color: var(--ink-soft); margin-top: -2px; }
.title-acc b { color: var(--foe); }
.set-sec { margin: 14px 0 4px; font-size: 12px; font-weight: 700; color: var(--ink-soft); letter-spacing: .1em; }
.acc-box { display: grid; gap: 6px; padding: 10px; border-radius: 10px; background: rgba(27, 26, 23, .05); }
.acc-box small { color: var(--ink-soft); }
.acc-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.text-in { width: 100%; box-sizing: border-box; font: inherit; font-size: 16px; padding: 10px 12px; border-radius: 10px; border: 2px solid var(--ink); background: #fffaf0; margin: 6px 0 10px; }
.hp-lock { flex: none; margin-left: auto; font-style: normal; font-family: var(--font-hanja); font-weight: 900; color: #fff; background: #2f7d5b; border-radius: 8px; padding: 4px 8px; font-size: 14px; filter: none; }
.hp-row.locked .hp-lock { filter: grayscale(0) !important; }

/* ── 강호 ── */
.gangho-me { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 16px 0; font-size: 13px; }
.gangho-me small { color: var(--ink-soft); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
.chips .chip { font: inherit; font-size: 13px; padding: 5px 12px; border-radius: 99px; border: 1.5px solid var(--ink); background: transparent; color: var(--ink); }
.chips .chip.on { background: var(--ink); color: var(--paper); }
.boss-pick { font: inherit; font-size: 14px; padding: 6px 8px; border-radius: 8px; border: 1.5px solid var(--ink); background: #fffaf0; max-width: 100%; }
.rank-tbl td:first-child { width: 3em; text-align: center; font-weight: 700; }
.rank-tbl tr.mine td { background: rgba(201, 162, 74, .22); font-weight: 700; }
.rk-h { font-style: normal; font-family: var(--font-hanja); font-weight: 900; margin-right: 6px; }
em.sample { font-style: normal; font-size: 10px; padding: 1px 5px; border-radius: 6px; background: rgba(27, 26, 23, .1); color: var(--ink-soft); vertical-align: middle; }
.net-note { border-left: 3px solid var(--gold); padding-left: 8px; }
.news-list { display: grid; gap: 4px; }
.news-row { display: grid; grid-template-columns: auto 1fr; gap: 2px 8px; padding: 8px 4px; border-bottom: 1px dashed rgba(27, 26, 23, .2); font-size: 13.5px; }
.news-row span { grid-column: 1 / -1; }
.news-row small { grid-column: 1 / -1; color: var(--ink-soft); font-size: 11px; }
.duel-card { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; text-align: center; }
.duel-card > div { padding: 8px 4px; border-radius: 10px; background: rgba(27, 26, 23, .06); }
.duel-card small { display: block; font-size: 11px; color: var(--ink-soft); }
.duel-card b { font-size: 15px; }

/* ── 로그인 (상용 게임식: 소셜 로그인 동등 강조, 게스트는 보조) ── */
.login-box { display: grid; gap: 9px; width: 100%; max-width: 360px; margin: 0 auto; }
.login-cap { text-align: center; font-size: 12.5px; letter-spacing: .12em; color: var(--ink-soft); margin-bottom: 2px; }
.login-btn { position: relative; display: flex; align-items: center; justify-content: center; width: 100%; height: 50px; border-radius: 12px; font: inherit; font-weight: 700; font-size: 15.5px; border: 1px solid transparent; box-shadow: 0 2px 6px rgba(0, 0, 0, .18); cursor: pointer; }
.login-btn i { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 24px; height: 24px; display: grid; place-items: center; font-style: normal; font-weight: 900; font-size: 14px; border-radius: 50%; }
.login-btn:active { transform: translateY(1px); box-shadow: 0 1px 2px rgba(0, 0, 0, .2); }
.login-btn.sm { height: 42px; font-size: 14px; margin-bottom: 6px; }
.login-g { background: #fff; color: #1f1f1f; border-color: #dadce0; }
.login-g i { color: #fff; background: conic-gradient(#ea4335 0 25%, #fbbc05 0 50%, #34a853 0 75%, #4285f4 0); }
.login-k { background: #fee500; color: rgba(0, 0, 0, .85); }
.k-bubble::before { content: ''; width: 18px; height: 15px; border-radius: 50%; background: #191919; display: block; }
.k-bubble::after { content: ''; position: absolute; left: 5px; bottom: 2px; border: 4px solid transparent; border-top-color: #191919; transform: rotate(20deg); }
.login-or { display: flex; align-items: center; gap: 10px; color: var(--ink-soft); font-size: 12px; margin: 4px 0 0; }
.login-or::before, .login-or::after { content: ''; flex: 1; height: 1px; background: rgba(27, 26, 23, .2); }
.login-guest { background: none; border: 0; font: inherit; font-size: 14px; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; padding: 6px; cursor: pointer; }
.login-terms { text-align: center; font-size: 10.5px; color: var(--ink-soft); opacity: .85; }

/* 첫 화면 계정 칩 */
button.title-acc { display: flex; align-items: center; gap: 8px; margin: 2px auto 0; padding: 6px 12px 6px 6px; border-radius: 99px; border: 1px solid rgba(27, 26, 23, .25); background: rgba(255, 250, 235, .7); font: inherit; font-size: 13px; color: var(--ink); cursor: pointer; }
.title-acc small { color: var(--ink-soft); }
.acc-more { font-size: 11.5px; color: var(--ink-soft); margin-left: 2px; }
.acc-ic { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-weight: 900; font-size: 13px; flex: none; color: #fff; background: #5a4a35; font-family: var(--font-hanja); }
.acc-ic.google { background: #4285f4; font-family: inherit; }
.acc-ic.kakao { background: #fee500; color: #191919; font-family: inherit; }
.mail-dot { font-style: normal; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: #e0452f; color: #fff; font-size: 11px; font-weight: 700; display: inline-grid; place-items: center; box-shadow: 0 0 0 2px #fff8e8; }
.acc-card { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; background: rgba(27, 26, 23, .06); }
.acc-card > div { flex: 1; min-width: 0; }
.acc-card small { display: block; color: var(--ink-soft); font-size: 11.5px; word-break: break-all; }
.warn-note { color: #8a3a1f; }
.nick-row { display: flex; gap: 6px; align-items: center; }
.nick-row .text-in { margin: 6px 0 10px; }
.nick-row .mini-btn { flex: none; font-family: var(--font-hanja); font-size: 18px; }

/* 본거지 상단: 우편함·설정 아이콘 */
.hub-icons { display: flex; gap: 6px; margin-left: auto; }
.hub-ic { position: relative; width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid var(--ink); background: #fff8e6; display: grid; place-items: center; cursor: pointer; }
.hub-ic i { font-style: normal; font-family: var(--font-hanja); font-weight: 900; font-size: 17px; color: var(--ink); }
.hub-ic .mail-dot { position: absolute; top: -5px; right: -6px; }
.mail-toast { position: absolute; left: 50%; top: 96px; transform: translateX(-50%); z-index: 20; display: flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 99px; border: 0; background: var(--ink); color: var(--paper); font: inherit; font-size: 13.5px; box-shadow: 0 6px 18px rgba(0, 0, 0, .3); animation: toastIn .35s cubic-bezier(.2, 1.4, .4, 1) both; white-space: nowrap; cursor: pointer; }
.mail-toast i { font-style: normal; font-family: var(--font-hanja); color: var(--gold-l); }
.mail-toast small { color: var(--gold-l); font-weight: 700; }
.mail-toast.out { opacity: 0; transition: opacity .6s; }
@keyframes toastIn { 0% { opacity: 0; transform: translate(-50%, -12px); } 100% { opacity: 1; transform: translate(-50%, 0); } }

/* 복구 창 */
.err-msg { white-space: pre-wrap; word-break: break-all; font-size: 11.5px; padding: 8px; border-radius: 8px; background: rgba(27, 26, 23, .07); max-height: 120px; overflow: auto; }

/* 로그인 전 첫 화면은 로그인만 — 전적 줄도 숨김 */
.title-screen:has(.login-box) .title-foot { display: none; }
/* 좁은 화면(320px 등): 재화 이름 숨기고 칸 글씨 줄임 */
@media (max-width: 360px) {
  .money em { display: none; }
  .money span { padding-right: 6px; font-size: 11.5px; }
  .hub-grid .tile small { font-size: 10.5px; }
  .hub-grid .tile { padding-left: 4px; padding-right: 4px; min-width: 0; }
  .hub-ic { width: 34px; height: 34px; }
}
.hub-grid .tile { min-width: 0; }
.hub-grid .tile small { overflow-wrap: anywhere; text-align: center; }

/* 심득 등급 */
.boon-card { border-color: var(--rc, var(--ink)); }
.boon-card .boon-r { font-style: normal; font-size: 10.5px; color: #fff; background: var(--rc); border-radius: 6px; padding: 1px 6px; justify-self: center; }
.boon-card.r3 { box-shadow: 0 0 0 2px var(--rc), 0 0 16px rgba(201, 152, 47, .55); }
.boon-card.r2 { box-shadow: 0 0 0 1.5px var(--rc); }

/* 본거지 상단 아이콘: 한글 위주 (그림 + 글자) */
.hub-ic { width: auto; height: 40px; border-radius: 12px; padding: 0 10px; display: flex; align-items: center; gap: 4px; }
.hub-ic i { font-family: inherit; font-size: 16px; font-weight: 400; }
.hub-ic span { font-size: 13px; font-weight: 700; color: var(--ink); white-space: nowrap; }
@media (max-width: 360px) { .hub-ic { height: 34px; padding: 0 7px; } .hub-ic span { font-size: 12px; } }

/* 장비 칸 · 무구 · 수련동 */
.tslot { position: relative; }
.slot-tag { position: absolute; top: -8px; left: 10px; font-style: normal; font-size: 10.5px; font-weight: 700; padding: 1px 7px; border-radius: 6px; background: var(--ink); color: var(--paper); }
.kind-tag { font-size: 10px; padding: 0 5px; border-radius: 5px; background: rgba(27, 26, 23, .1); color: var(--ink-soft); font-weight: 400; }
.tslots { gap: 14px; }
.dojo-row.ready { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(201, 162, 74, .35); }
.dojo .mini-btn small { display: block; font-size: 10px; }
.confirm-acts.one .reset-btn { width: 100%; white-space: normal; }
/* 고유 무구 (예전 보물) 표시 */
.kind-tag.uniq { background: rgba(201, 152, 47, .2); color: #8a6414; font-weight: 700; }
.gcell.uniq { box-shadow: inset 0 0 0 1px rgba(201, 152, 47, .55); }
.gcell .kind-tag { display: inline-block; margin-left: 2px; vertical-align: middle; }

/* ── 연철 ── */
.c-iron { background: radial-gradient(circle at 35% 30%, #e9edf0, #6f7c86 60%, #2b3238); color: #fff; }

/* ── 행낭 전면 개편 (2026-10-05) ── */
.bag2 .hero-strip { display: flex; gap: 6px; overflow-x: auto; padding: 4px 16px 8px; scrollbar-width: none; }
.bag2 .hero-strip::-webkit-scrollbar { display: none; }
.bag2 .hs { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 1px; width: 52px; padding: 5px 0 4px; border-radius: 12px; border: 1.5px solid rgba(27, 26, 23, .15); background: rgba(255, 252, 243, .55); font-family: inherit; color: var(--ink); }
.bag2 .hs i { font-style: normal; font-size: 20px; font-weight: 900; color: var(--c); line-height: 1.1; }
.bag2 .hs small { font-size: 10.5px; white-space: nowrap; }
.bag2 .hs.on { background: var(--ink); border-color: var(--ink); color: var(--gold-l); }
.bag2 .hs.on i { color: var(--gold-l); }
.bag2 .hs.locked { opacity: .45; }
.doll { background: rgba(255, 252, 243, .6); border: 1.5px solid rgba(27, 26, 23, .14); border-radius: 16px; padding: 10px; margin-bottom: 12px; }
.doll-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.doll-head > div:not(.medal) { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.doll-head small { color: var(--ink-soft); }
.doll-head small em { font-style: normal; font-weight: 900; color: var(--gold-d); font-size: 15px; }
.doll-head .btn.sm { padding: 6px 10px; font-size: 13px; }
.doll-slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.doll-slot { position: relative; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 13px 4px 6px; border-radius: 12px; border: 2px solid var(--rc, rgba(27, 26, 23, .2)); background: #fffaf0; font-family: inherit; color: var(--ink); min-width: 0; }
.doll-slot.empty { border-style: dashed; background: transparent; }
.doll-slot .slot-tag { position: absolute; top: -9px; left: 6px; font-size: 10.5px; }
.doll-slot > i { font-style: normal; font-size: 19px; font-weight: 900; color: var(--rc, var(--ink-soft)); }
.doll-slot b { font-size: 12.5px; text-align: center; line-height: 1.25; word-break: keep-all; }
.doll-slot small { font-size: 10.5px; color: var(--ink-soft); }
.doll-sum { margin: 8px 0 0; font-size: 12px; color: var(--ink-soft); text-align: center; line-height: 1.4; }
.btabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.slot-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 8px; }
.stab { padding: 8px 4px; border-radius: 10px; border: 1.5px solid rgba(27, 26, 23, .18); background: transparent; font-family: inherit; font-weight: 700; color: var(--ink); }
.stab small { margin-left: 4px; font-weight: 400; color: var(--ink-soft); }
.stab.on { background: var(--ink); color: var(--gold-l); border-color: var(--ink); }
.stab.on small { color: var(--paper-2); }
.gear-tools .chips { margin-bottom: 6px; flex-wrap: wrap; }
.gear-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
@media (max-width: 360px) { .gear-grid { grid-template-columns: repeat(3, 1fr); } }
.gcard { position: relative; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 8px 3px 6px; border-radius: 11px; border: 2px solid var(--rc, rgba(27, 26, 23, .18)); background: #fffaf0; font-family: inherit; color: var(--ink); min-width: 0; }
.gcard.uniq { box-shadow: inset 0 0 0 1.5px rgba(201, 152, 47, .6); background: linear-gradient(#fff6dc, #fffaf0); }
.gcard > i { font-style: normal; font-size: 21px; font-weight: 900; color: var(--rc, var(--ink-soft)); line-height: 1.15; }
.gcard > b { font-size: 11.5px; line-height: 1.2; text-align: center; word-break: keep-all; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gcard .meta { display: flex; gap: 3px; align-items: center; min-height: 14px; font-size: 11px; }
.gcard .meta .kind-tag { font-size: 9px; padding: 0 3px; }
.gcard .own { font-size: 10px; color: var(--ink-soft); white-space: nowrap; }
.gcard .cmp { font-size: 11px; font-weight: 800; }
.gcard .cmp.up { color: #2e7d32; } .gcard .cmp.down { color: #b23a2a; } .gcard .cmp.eq { color: var(--ink-soft); } .gcard .cmp.on { color: var(--gold-d); }
.gcard .new-dot { position: absolute; top: -6px; right: -4px; background: #c0392b; color: #fff; font-size: 9px; font-weight: 800; padding: 1px 4px; border-radius: 6px; }
.gcard .lock { position: absolute; top: 2px; left: 4px; font-size: 10px; }
.gcard.sel { outline: 3px solid #c0392b; outline-offset: -1px; }
.gcard.blocked { opacity: .4; }
.gcard .chk { width: 16px; height: 16px; border-radius: 4px; border: 1.5px solid var(--ink-soft); font-size: 11px; line-height: 14px; color: #c0392b; }
.star { color: #d49b1c; font-size: 11px; letter-spacing: -1px; }
.batch-bar { background: rgba(192, 57, 43, .08); border: 1.5px solid rgba(192, 57, 43, .35); border-radius: 12px; padding: 8px; margin-bottom: 8px; font-size: 13px; }
.batch-bar .chips { margin: 6px 0; }
.batch-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.gear-panel .sheet { max-height: 88vh; overflow-y: auto; }
.cmp-tbl { width: 100%; font-size: 13px; }
.cmp-tbl th, .cmp-tbl td { padding: 4px 6px; text-align: left; }
.cmp-tbl thead th { font-size: 11.5px; color: var(--ink-soft); font-weight: 400; }
.cmp-tbl em.up { color: #2e7d32; font-style: normal; font-weight: 800; } .cmp-tbl em.down { color: #b23a2a; font-style: normal; font-weight: 800; }
.gp-uniq { font-size: 13px; background: rgba(201, 152, 47, .12); border-radius: 10px; padding: 8px; margin: 8px 0; line-height: 1.45; }
.gp-subs { display: flex; flex-direction: column; gap: 4px; font-size: 13px; margin: 6px 0; }
.gp-subs span { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.gp-msg { text-align: center; font-size: 14px; margin: 6px 0; }
.gp-msg .ok { color: #2e7d32; } .gp-msg .fail { color: #b23a2a; }
.gp-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.gp-acts.small { grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); }
.gp-acts .btn { display: flex; flex-direction: column; align-items: center; justify-content: center; white-space: normal; line-height: 1.2; padding: 9px 6px; }
.gp-acts .btn small { font-size: 10.5px; font-weight: 400; opacity: .85; margin-top: 2px; }
.gp-acts.small .btn { font-size: 13px; }
.btn.armed { background: #c0392b !important; color: #fff !important; border-color: #c0392b !important; }
.merge-list { margin-top: 8px; }

/* ── 서사 (2026-10-06) ── */
.story-card { position: fixed; inset: 0; z-index: 400; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 22px; background: radial-gradient(ellipse at 50% 40%, #2a2724 0%, #121110 70%); color: #efe3c8; cursor: pointer; text-align: center; }
.story-card .sc-skip { position: absolute; top: max(14px, env(safe-area-inset-top)); right: 14px; background: transparent; border: 1px solid rgba(239, 227, 200, .3); color: rgba(239, 227, 200, .7); border-radius: 14px; padding: 5px 12px; font-family: inherit; font-size: 13px; }
.story-card .sc-body { max-width: 520px; opacity: 0; transform: translateY(8px); }
.story-card .sc-body.in { animation: scIn .9s ease forwards; }
@keyframes scIn { to { opacity: 1; transform: none; } }
.story-card .sc-title { font-size: 22px; font-weight: 900; letter-spacing: .08em; color: var(--gold-l); margin-bottom: 16px; }
.story-card .sc-title small { display: block; font-size: 13px; font-weight: 400; color: rgba(239, 227, 200, .55); letter-spacing: .3em; margin-top: 4px; }
.story-card .sc-who { font-size: 13px; color: #d78f7f; letter-spacing: .15em; margin-bottom: 10px; }
.story-card .sc-text { font-size: 17px; line-height: 2; margin: 0; word-break: keep-all; }
.story-card .sc-text.voice { font-family: var(--font-hanja, serif); color: #f6e9c6; text-shadow: 0 0 18px rgba(201, 162, 74, .35); }
.story-card .sc-text.big { font-size: 21px; font-weight: 700; }
.story-card .sc-next { margin-top: 22px; font-size: 14px; color: rgba(239, 227, 200, .65); line-height: 1.8; }
.story-card .sc-tap { position: absolute; bottom: max(22px, env(safe-area-inset-bottom)); font-size: 12px; color: rgba(239, 227, 200, .45); animation: scBlink 2s ease-in-out infinite; }
@keyframes scBlink { 50% { opacity: .3; } }
.story-bg { background: #121110; min-height: 100vh; }
.boss-quote { margin: 8px 0; padding: 8px 12px; border-left: 3px solid #8e1f1f; background: rgba(142, 31, 31, .07); font-size: 14px; line-height: 1.6; word-break: keep-all; font-style: italic; }
.end-voice { text-align: center; color: var(--ink-soft); font-style: italic; margin: 4px 0 10px; }
.item-row.locked { opacity: .65; }
/* 전투 대사 말풍선 */
.battle-screen .speech { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); z-index: 30; max-width: 86%; background: rgba(18, 17, 16, .88); color: #f3e7cb; border: 1px solid rgba(201, 162, 74, .5); border-radius: 12px; padding: 8px 14px; font-size: 14px; line-height: 1.5; text-align: center; word-break: keep-all; pointer-events: none; }
.battle-screen .speech b { display: block; font-size: 11px; color: #e7a08f; letter-spacing: .1em; }
.battle-screen .speech b:empty { display: none; }
.battle-screen .speech.show { animation: spIn .35s ease; }
@keyframes spIn { from { opacity: 0; transform: translate(-50%, -6px); } }
/* 심마전: 먹빛 반전, 고요할수록 심마가 옅어진다 */
.mirror-battle { --calm: 0; }
.mirror-battle .foe-info .medal { filter: grayscale(1) invert(.85); opacity: calc(1 - var(--calm) * .18); }
.mirror-battle .hud-top .pinfo .nm b { color: #d9d2c3; letter-spacing: .2em; text-shadow: 0 0 8px rgba(0,0,0,.6); }

/* ── 아이템 칸(타일) 2026-10-07: 등급색 바탕 + 종류 아이콘 ── */
.itile { --ts: 56px; position: relative; display: inline-grid; place-items: center; flex: 0 0 auto; width: var(--ts); height: var(--ts); border-radius: calc(var(--ts) * .18); border: 2px solid #6e6656; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .35), 0 2px 0 rgba(0, 0, 0, .28); overflow: visible; }
.itile.g1 { background: radial-gradient(circle at 50% 38%, #f3ede0 0%, #c9bfa8 60%, #8f8672 100%); border-color: #6e6656; }
.itile.g2 { background: radial-gradient(circle at 50% 38%, #e4f2fa 0%, #8cbfdc 55%, #3d7fa6 100%); border-color: #24506c; }
.itile.g3 { background: radial-gradient(circle at 50% 38%, #fff4d6 0%, #e9c46e 55%, #b4862a 100%); border-color: #7a5a1c; }
.itile.g4 { background: radial-gradient(circle at 50% 38%, #ffe6dc 0%, #e47a62 55%, #a32a22 100%); border-color: #5e130f; animation: tileGlow 2.4s ease-in-out infinite; }
@keyframes tileGlow { 50% { box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .5), 0 0 10px 2px rgba(224, 69, 47, .55); } }
.itile.uniq::after { content: ''; position: absolute; inset: 3px; border-radius: calc(var(--ts) * .14); border: 1.5px solid rgba(255, 236, 170, .95); box-shadow: 0 0 0 1px rgba(122, 90, 28, .6); pointer-events: none; }
.itile .ico { width: 80%; height: 80%; filter: drop-shadow(0 1.5px 0 rgba(0, 0, 0, .25)); position: relative; z-index: 1; }
.itile em { position: absolute; z-index: 2; font-style: normal; font-weight: 900; line-height: 1; white-space: nowrap; pointer-events: none; }
.itile .t-lv { top: -2px; left: -2px; padding: 2px 4px; border-radius: 6px 0 6px 0; background: rgba(27, 26, 23, .85); color: #f1d489; font-size: 10px; }
.itile .t-star { top: 1px; right: 3px; color: #ffd84a; font-size: 9px; text-shadow: 0 0 2px #000, 0 0 2px #000; letter-spacing: -1px; }
.itile .t-cnt { bottom: 1px; right: 3px; color: #fff; font-size: 11px; text-shadow: 0 0 2px #000, 0 0 3px #000; }
.itile .t-eq { bottom: -4px; right: -4px; width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%; background: var(--hc); color: #fff; font-size: 10px; border: 1.5px solid #fffaf0; font-family: var(--font-hanja); }
.itile .t-lock { top: 2px; right: 2px; width: 14px; height: 14px; display: grid; place-items: center; border-radius: 4px; background: rgba(27, 26, 23, .8); color: #f1d489; font-size: 9px; }
.itile .t-lv ~ .t-lock, .itile .t-star ~ .t-lock { top: 13px; }
.itile .t-new { top: -5px; right: -5px; width: 15px; height: 15px; display: grid; place-items: center; border-radius: 50%; background: #e0452f; color: #fff; font-size: 9px; border: 1.5px solid #fffaf0; }
.itile .t-up { bottom: 1px; left: 3px; font-size: 11px; text-shadow: 0 0 2px #fff, 0 0 2px #fff; }
.itile .t-up.p { color: #1f8a3a; } .itile .t-up.m { color: #b23a2a; }

/* ── 행낭 재설계 (2026-10-07): 초상 레일 + 인물 장착 + 분류 아이콘 격자 ── */
.bag3 .meta-body { padding: 0 10px calc(var(--safe-b) + 16px); gap: 10px; }
.inv-top { display: flex; gap: 8px; align-items: stretch; }
.hero-rail { flex: 0 0 50px; align-self: flex-start; position: sticky; top: 0; z-index: 4; display: flex; flex-direction: column; gap: 4px; padding: 2px 0; }
.hero-rail::-webkit-scrollbar { display: none; }
.hr { position: relative; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 4px 0 3px; border-radius: 12px; background: rgba(27, 26, 23, .06); border: 1.5px solid transparent; }
.hr .hr-m { width: 31px; height: 31px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 40% 35%, #3a3530, #141210); color: var(--c); font-family: var(--font-hanja); font-weight: 900; font-size: 17px; box-shadow: 0 0 0 2px #8a6a26; }
.hr small { font-size: 9.5px; white-space: nowrap; color: var(--ink-soft); }
.hr.on { background: var(--ink); border-color: var(--gold); }
.hr.on .hr-m { box-shadow: 0 0 0 2px var(--gold-l), 0 0 10px rgba(241, 212, 137, .6); }
.hr.on small { color: var(--gold-l); font-weight: 700; }
.hr.locked { opacity: .5; }
.hr .hr-up { position: absolute; top: 0; right: 2px; font-style: normal; font-size: 10px; color: #fff; background: #1f8a3a; border-radius: 6px; padding: 1px 3px; }
.hr .hr-lock { position: absolute; top: 24px; right: 4px; font-style: normal; font-size: 9px; color: #f1d489; background: rgba(27, 26, 23, .85); border-radius: 4px; padding: 1px 2px; }
.hr.locked .hr-m { filter: grayscale(.8); }
.doll3 { flex: 1; min-width: 0; background: linear-gradient(180deg, rgba(255, 252, 243, .82), rgba(240, 228, 200, .7)); border: 1.5px solid rgba(122, 90, 28, .35); border-radius: 16px; padding: 8px 8px 10px; box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .35); }
.doll3 .locked-hero { padding: 6px; }
.d-name { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; flex-wrap: wrap; padding: 0 2px 4px; border-bottom: 1px dashed rgba(122, 90, 28, .35); }
.d-name b { font-family: var(--font-hanja); font-size: 15px; }
.d-pow { font-size: 11.5px; color: var(--ink-soft); white-space: nowrap; }
.d-pow em { font-style: normal; font-weight: 900; font-size: 17px; color: var(--gold-d); }
.d-stage { position: relative; display: grid; grid-template-columns: 1fr 1fr 1fr; grid-template-rows: auto auto; align-items: center; justify-items: center; gap: 2px 4px; padding: 8px 0 2px;
  background: radial-gradient(circle at 50% 22%, color-mix(in srgb, var(--c) 22%, transparent) 0%, transparent 34%); }
.d-stage .d-hero { grid-column: 1 / span 3; grid-row: 1; margin-bottom: 6px; }
.d-stage .s-weapon { grid-column: 1; grid-row: 2; }
.d-stage .s-armor { grid-column: 2; grid-row: 2; }
.d-stage .s-acc { grid-column: 3; grid-row: 2; }
.d-hero { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.d-hero .medal { width: 84px; height: 84px; position: relative; z-index: 1; }
.d-hero .d-aura { position: absolute; top: -6px; width: 96px; height: 96px; border-radius: 50%; border: 2px dashed rgba(122, 90, 28, .35); animation: auraSpin 30s linear infinite; }
@keyframes auraSpin { to { transform: rotate(360deg); } }
.d-hero small { font-size: 10.5px; background: var(--ink); color: var(--gold-l); padding: 1px 7px; border-radius: 8px; white-space: nowrap; }
.eq-slot { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; max-width: 100%; }
.eq-slot b { font-size: 11px; max-width: 86px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eq-slot small { font-size: 9.5px; color: var(--ink-soft); white-space: nowrap; }
.eq-slot.empty b { color: var(--ink-soft); }
.itile.empty-tile { background: rgba(27, 26, 23, .06); border: 2px dashed rgba(27, 26, 23, .3); box-shadow: none; }
.itile.empty-tile .ico { opacity: .22; filter: grayscale(1); }
.itile .t-plus { inset: 0; display: grid; place-items: center; font-size: 22px; color: rgba(27, 26, 23, .55); }
.d-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 10px; margin-top: 8px; padding: 6px 8px; background: rgba(27, 26, 23, .05); border-radius: 10px; }
.st-row { display: flex; align-items: baseline; gap: 4px; font-size: 11.5px; min-width: 0; }
.st-row span { color: var(--ink-soft); white-space: nowrap; }
.st-row .v { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; line-height: 1.1; }
.st-row b { font-size: 13px; }
.st-row em { font-style: normal; font-size: 9.5px; white-space: nowrap; }
.st-row em.up { color: #1f8a3a; } .st-row em.down { color: #b23a2a; }
.d-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 8px; }
.d-acts .btn { padding: 8px 6px; font-size: 13px; }
.inv-box { background: linear-gradient(180deg, #3a3128, #2a231c); border-radius: 16px; padding: 8px 8px 10px; box-shadow: inset 0 0 0 2px rgba(201, 162, 74, .35), 0 3px 10px rgba(0, 0, 0, .25); color: #efe3c8; scroll-margin-top: 4px; }
.cat-tabs { position: sticky; top: 0; z-index: 3; display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; padding: 2px 0 6px; background: #3a3128; border-radius: 10px; }
.ctab { position: relative; display: flex; flex-direction: column; align-items: center; gap: 0; padding: 4px 0 3px; border-radius: 9px; background: rgba(255, 255, 255, .06); border: 1.5px solid rgba(201, 162, 74, .25); color: #d9c9a6; }
.ctab .ico { width: 26px; height: 26px; }
.ctab small { font-size: 10.5px; }
.ctab em { position: absolute; top: 1px; right: 3px; font-style: normal; font-size: 9px; color: #b9a982; }
.ctab.on { background: linear-gradient(180deg, #f1d489, #c9a24a); color: var(--ink); border-color: #fff1c4; }
.ctab.on em { color: var(--ink); }
.inv-tools { display: flex; align-items: center; gap: 5px; margin: 2px 0 8px; flex-wrap: wrap; }
.inv-tools .sortbtn { padding: 5px 9px; font-size: 12px; border-radius: 9px; background: #c9a24a; color: var(--ink); font-weight: 700; white-space: nowrap; }
.inv-tools .tgl { padding: 4px 8px; font-size: 11.5px; border-radius: 9px; border: 1.5px solid rgba(201, 162, 74, .45); color: #d9c9a6; }
.inv-tools .tgl.on { background: #efe3c8; color: var(--ink); }
.inv-tools .sp { flex: 1; }
.inv-tools .tool { display: flex; flex-direction: column; align-items: center; width: 38px; padding: 2px 0; border-radius: 9px; background: rgba(255, 255, 255, .08); color: #f1d489; font-family: var(--font-hanja); font-size: 15px; line-height: 1.1; }
.inv-tools .tool small { font-family: var(--font-body); font-size: 9px; color: #d9c9a6; }
.bag3 .batch-bar { background: rgba(255, 255, 255, .08); color: #efe3c8; border-radius: 10px; padding: 8px; margin-bottom: 8px; }
.bag3 .batch-bar .sheet-note { color: #b9a982; }
.bag3 .batch-bar .chip { color: #efe3c8; border-color: rgba(239, 227, 200, .4); }
.inv-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.inv-grid .cell { position: relative; aspect-ratio: 1; display: grid; place-items: center; border-radius: 12px; }
.inv-grid .cell .itile { --ts: 100%; width: 100%; height: 100%; }
.inv-grid .cell.void { background: rgba(0, 0, 0, .25); box-shadow: inset 0 1px 3px rgba(0, 0, 0, .5), inset 0 0 0 1px rgba(201, 162, 74, .12); }
.inv-grid .cell.mine .itile { outline: 2.5px solid #f1d489; outline-offset: 1px; }
.inv-grid .cell:active .itile { transform: scale(.94); }
.inv-grid .cell.sel .itile { outline: 3px solid #e0452f; outline-offset: 1px; }
.inv-grid .cell.blocked { opacity: .35; }
.inv-grid .cell .chk { position: absolute; z-index: 3; bottom: 3px; right: 3px; width: 16px; height: 16px; border-radius: 4px; background: #fffaf0; border: 1.5px solid var(--ink); font-size: 11px; line-height: 13px; text-align: center; color: #c0392b; font-weight: 900; }
.inv-legend { margin: 8px 2px 0; font-size: 10.5px; color: #b9a982; line-height: 1.5; }
.inv-legend .lg { display: inline-block; width: 10px; height: 10px; border-radius: 3px; vertical-align: -1px; }
.lg.g1 { background: #9c937f; } .lg.g2 { background: #3d7fa6; } .lg.g3 { background: #c9982f; } .lg.g4 { background: #b8322a; }
.inv-foot { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 11.5px; color: #d9c9a6; }
.inv-foot .cap { flex: 1; height: 7px; border-radius: 4px; background: rgba(0, 0, 0, .4); overflow: hidden; }
.inv-foot .cap i { display: block; height: 100%; background: linear-gradient(90deg, #c9a24a, #f1d489); }
.inv-foot b.full { color: #ff8a70; }
.bag3 .sheet-note { color: inherit; }
.inv-box > .sheet-note { color: #b9a982; text-align: center; }
/* 상세 창 머리 */
.info-head { display: flex; gap: 12px; align-items: center; margin-bottom: 8px; }
.info-head h3 { margin: 0 0 3px; text-align: left; font-size: 17px; }
.info-head h3 small { font-size: 12px; color: var(--ink-soft); font-weight: 400; }
.info-head p { margin: 2px 0; font-size: 13px; line-height: 1.4; }
.info-head .dim { color: var(--ink-soft); font-size: 11.5px; }
.grade-pill { display: inline-block; padding: 1px 8px; border-radius: 9px; background: var(--rc); color: #fff; font-size: 11.5px; font-weight: 700; }
.gp-pow b { font-size: 17px; color: var(--gold-d); }
.gp-pow em { font-style: normal; font-weight: 800; } .gp-pow em.up { color: #1f8a3a; } .gp-pow em.down { color: #b23a2a; }
.gp-vs { display: flex; align-items: center; gap: 8px; font-size: 12px; background: rgba(27, 26, 23, .06); border-radius: 10px; padding: 5px 8px; margin-bottom: 6px; }
.item-row .itile { margin-right: 8px; }
.bag3 .batch-bar .btn.ghost { color: #efe3c8; border-color: rgba(239, 227, 200, .45); }
.inv-foot .iron { display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
.run-bag { display: flex; justify-content: center; gap: 8px; margin: 4px 0 8px; }
.rw .itile { margin-right: 6px; }
.pc .itile { margin: 2px auto 4px; }
.tcell { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.carry-row .itile { margin-right: 8px; }
.tile { position: relative; }
.tile .tile-badge { position: absolute; top: 6px; right: 6px; font-style: normal; font-size: 10px; font-weight: 900; color: #fff; background: #e0452f; border-radius: 8px; padding: 1px 6px; }
.tile .tile-badge.up { background: #1f8a3a; }

/* 무림인 레일 + 본문 (행낭·수련·경맥 공통) */
.hl { display: flex; gap: 8px; align-items: flex-start; }
.hl-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.hl .hero-rail { top: 2px; }
.hl-main .tbl { font-size: 12px; }
.hl-card { background: linear-gradient(180deg, rgba(255, 252, 243, .82), rgba(240, 228, 200, .7)); border: 1.5px solid rgba(122, 90, 28, .35); border-radius: 16px; padding: 8px 10px 10px; box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .35); }
.hl-card .hc-top { display: flex; align-items: center; gap: 10px; }
.hl-card .hc-top .medal { width: 56px; height: 56px; flex: 0 0 auto; }
.hl-card .hc-top b { font-family: var(--font-hanja); font-size: 15px; }
.hl-card .hc-top small { display: block; font-size: 11px; color: var(--ink-soft); }
.hl-card .hc-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.hl-card .hc-chips span { font-size: 11px; padding: 2px 7px; border-radius: 9px; background: rgba(27, 26, 23, .07); white-space: nowrap; }
.hl-card .hc-chips span b { font-family: inherit; font-size: 12px; }
.hl-card .hc-chips span.on { background: #1f8a3a; color: #fff; }
.inv-foot .cap-add { display: flex; flex-direction: column; align-items: center; line-height: 1.1; padding: 3px 7px; border-radius: 8px; background: #c9a24a; color: var(--ink); font-size: 11.5px; font-weight: 800; white-space: nowrap; }
.inv-foot .cap-add small { font-size: 9px; font-weight: 600; }
.inv-foot .dim { color: #b9a982; }
.inv-foot { flex-wrap: wrap; }
.inv-top { align-items: flex-start; }
.hl-main .sk-tbl { width: 100%; }
.hl-main .sk-tbl th, .hl-main .sk-tbl td { padding-left: 3px; padding-right: 3px; }
.hl-main .sk-tbl .tbl-disc { width: 24px !important; height: 24px !important; font-size: 12px !important; }
.hl-main .sk-tbl td:first-child, .hl-main .sk-tbl th:first-child { padding-left: 5px; }
.hl-main .sk-tbl .sk-name span { font-size: 12px; }
.hl-main .sk-tbl .sk-name { gap: 5px; }
.hl-main .sk-tbl .mini-btn { padding: 5px 7px; }
.hl-main .deck-grid { grid-template-columns: repeat(4, 1fr); }
/* 무림인 열전: 레일 + 한 사람 */
.codex-body { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 10px calc(var(--safe-b) + 16px); }
.codex-screen .hl-main .hero-card { width: 100%; flex: none; margin: 0; scroll-snap-align: none; }
.codex-screen .hl-main .hc-scroll { max-height: none; overflow: visible; }
.codex-screen .hero-rail .hr small { color: inherit; }
/* 무림행 중 장비 */
.run-btns { display: flex; flex-direction: column; gap: 4px; }
.run-gear-note { margin: 0; font-size: 12px; line-height: 1.45; background: rgba(184, 50, 42, .08); border: 1px solid rgba(184, 50, 42, .25); border-radius: 10px; padding: 6px 9px; }
.rail-note { margin: 4px 0 0; font-size: 9.5px; text-align: center; color: var(--ink-soft); }
.rw-equip { margin-top: 10px; padding: 8px; border-radius: 12px; background: rgba(201, 162, 74, .14); border: 1px solid rgba(122, 90, 28, .3); }
.rw-equip p { margin: 0 0 6px; font-size: 12.5px; font-weight: 700; }
.rw-equip p small { font-weight: 400; color: var(--ink-soft); }
.rw-eq-list { display: flex; flex-direction: column; gap: 6px; }
.rw-eq { display: flex; align-items: center; gap: 8px; text-align: left; padding: 5px 8px; border-radius: 10px; background: #fffaf0; border: 1.5px solid rgba(27, 26, 23, .15); }
.rw-eq span { display: flex; flex-direction: column; font-size: 12.5px; }
.rw-eq small { font-size: 11px; color: var(--ink-soft); }
.rw-eq em { font-style: normal; font-weight: 800; } .rw-eq em.up { color: #1f8a3a; } .rw-eq em.down { color: #b23a2a; }
.rw-eq.done { border-color: #c9a24a; background: #fff3d2; }
.hr.on.locked { opacity: 1; }
.hr.on.locked .hr-m { filter: none; }

/* ── 하단 탭 막대 · 하위 탭 (2026-10-07) ── */
.tabbed .meta-body { padding-bottom: 12px; }
.tabbar { flex: 0 0 auto; display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px; padding: 5px 6px calc(var(--safe-b) + 5px); background: linear-gradient(180deg, #2f2820, #1b1712); border-top: 2px solid #c9a24a; box-shadow: 0 -4px 12px rgba(0, 0, 0, .25); z-index: 5; }
.tabbar button { position: relative; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 4px 0 3px; border-radius: 10px; color: #b9a982; }
.tabbar i { font-style: normal; font-family: var(--font-hanja); font-weight: 900; font-size: 20px; line-height: 1.15; }
.tabbar small { font-size: 10.5px; }
.tabbar button.on { background: linear-gradient(180deg, #f1d489, #c9a24a); color: var(--ink); }
.tabbar .tb-dot { position: absolute; top: 1px; right: 14%; min-width: 15px; height: 15px; padding: 0 3px; border-radius: 8px; background: #e0452f; color: #fff; font-style: normal; font-size: 9px; font-weight: 900; line-height: 15px; text-align: center; }
.tabbar .tb-dot.up { background: #1f8a3a; }
.subtabs { flex: 0 0 auto; display: flex; gap: 4px; margin: 0 12px 8px; padding: 3px; border-radius: 12px; background: rgba(27, 26, 23, .1); }
.subtabs button { flex: 1; padding: 7px 4px; border-radius: 9px; font-size: 13px; font-weight: 700; color: var(--ink-soft); white-space: nowrap; }
.subtabs button.on { background: var(--ink); color: var(--gold-l); box-shadow: 0 2px 0 rgba(0, 0, 0, .3); }
.hub-grid2 { grid-template-columns: 1fr 1fr; }
.hub-hint { margin: 8px 2px 0; font-size: 12px; color: var(--ink-soft); text-align: center; }
.store-note { margin: 0 0 2px; font-size: 12px; color: var(--ink-soft); }
.codex-screen .hl-main .hero-card { width: 100%; flex: none; margin: 0; }
.inv-hl .hl-main { gap: 10px; }
.inv-hl .inv-grid { grid-template-columns: repeat(4, 1fr); }
.inv-hl .cat-tabs { grid-template-columns: repeat(4, 1fr); }
/* 난이도 선택 표시 통일 (2026-10-07): 입문도 고른 칸이 분명히 보이게 — 밝은 배경 위 규칙보다 우선 */
.diff-pick .dp { position: relative; }
.diff-pick .dp.on.dp-ipmun { background: linear-gradient(180deg, #e9c46e, #c9a24a) !important; color: var(--ink) !important; border-color: #7a5a1c !important; box-shadow: 0 0 0 2px rgba(201, 162, 74, .55); }
.diff-pick .dp.on.dp-sungryeon { background: #7b4fb3 !important; border-color: #4f2f80 !important; }
.diff-pick .dp.on.dp-jeoljeong { background: #a8322a !important; border-color: #5e130f !important; }
.diff-pick .dp.on::after { content: '✓'; position: absolute; top: 3px; right: 6px; font-size: 12px; font-weight: 900; }

/* ── 錄 · 수행록 (타이틀) ─────────────────── */
.chron-screen .chron-sum div b { font-size: 1.15em; }
.chron-facts { display: grid; gap: 4px; margin: 8px 0 4px; }
.chron-facts div { display: flex; justify-content: space-between; gap: 10px; padding: 7px 10px; border-radius: 10px; background: rgba(255, 255, 255, 0.45); border: 1px solid rgba(27, 26, 23, 0.14); font-size: 0.9em; }
.chron-facts span { color: rgba(27, 26, 23, 0.6); white-space: nowrap; }
.chron-facts b { text-align: right; word-break: keep-all; }
.chron-end { margin: 18px 0 8px; padding: 22px 18px 18px; border-radius: 14px; background: radial-gradient(ellipse at 50% 0%, #2c2a26, #141311 75%); color: #ece2c8; text-align: center; font-family: 'Noto Serif KR', serif; line-height: 1.8; box-shadow: inset 0 0 0 1px rgba(214, 183, 110, 0.25); }
.chron-end .ce-title { font-size: 1.15em; font-weight: 900; color: #d6b76e; letter-spacing: 0.06em; margin-bottom: 12px; }
.chron-end p { margin: 0 0 14px; font-size: 0.92em; word-break: keep-all; }
.chron-end .ce-say { color: #d6b76e; font-weight: 700; font-size: 1em; letter-spacing: 0.02em; }
.chron-end .ce-close { padding-top: 12px; border-top: 1px solid rgba(214, 183, 110, 0.25); font-weight: 700; }
.chron-end .ce-done { color: #f3e7c4; }
.chron-end .btn { margin-top: 4px; min-width: 60%; }

/* ── 江 · 강호 개편: 비무 · 명부 · 소식 (2026-10-07) ─────────── */
.pw { width: .95em; height: .95em; margin-right: 3px; vertical-align: -.08em; color: var(--gold-d); flex: none; }
.gh-season .pw, .pod .pw, .me-row .pw { color: var(--gold-l); }
.gh-me { flex: 0 0 auto; display: flex; align-items: center; gap: 10px; margin: 0 12px 8px; padding: 8px 12px; border-radius: 12px; background: linear-gradient(100deg, rgba(255, 255, 255, .55), rgba(255, 255, 255, .25)); border: 1px solid rgba(27, 26, 23, .16); }
.gh-me .medal.sm { width: 34px; height: 34px; }
.gm-who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.gm-who b { font-size: 14.5px; display: flex; align-items: center; gap: 4px; }
.gm-who small { font-size: 11px; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gm-nick { border: 0; background: rgba(27, 26, 23, .08); border-radius: 6px; padding: 0 5px; font-size: 12px; line-height: 1.5; cursor: pointer; color: var(--ink-soft); }
.gm-stat { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; }
.gm-stat small { font-size: 10px; color: var(--ink-soft); }
.gm-stat b { font-size: 14px; white-space: nowrap; }
.tier-chip { font-style: normal; display: inline-flex; align-items: center; gap: 3px; padding: 0 7px; border-radius: 999px; font-size: 11px; font-weight: 700; line-height: 1.6; color: #fff6dc; background: #6d6253; white-space: nowrap; vertical-align: middle; }
.tier-chip.t1 { background: #2d6d7a; }
.tier-chip.t2 { background: #3b4f9a; }
.tier-chip.t3 { background: #7a3fa8; }
.tier-chip.t4 { background: linear-gradient(120deg, #b8322a, #c9a24a); }
.sec .sec-more { margin-left: auto; border: 0; background: none; font: inherit; font-family: var(--font-body); font-size: 12px; color: var(--gold-d); font-weight: 700; cursor: pointer; }

/* 비무: 시즌 카드 */
.gh-season { --tc: #8a7a62; display: grid; grid-template-columns: auto 1fr; gap: 10px 14px; padding: 14px; border-radius: 14px; color: var(--paper); background: radial-gradient(ellipse at 15% 0%, color-mix(in srgb, var(--tc) 45%, transparent), transparent 60%), linear-gradient(160deg, #2a241c, #15130f); border: 1.5px solid var(--gold-d); box-shadow: inset 0 0 0 1px rgba(241, 212, 137, .12), 0 6px 16px rgba(0, 0, 0, .18); }
.gh-season.t1 { --tc: #2d6d7a; } .gh-season.t2 { --tc: #3b4f9a; } .gh-season.t3 { --tc: #7a3fa8; } .gh-season.t4 { --tc: #b8322a; }
.gs-emb { width: 74px; height: 84px; display: grid; place-items: center; background: linear-gradient(180deg, var(--tc), color-mix(in srgb, var(--tc) 55%, #000)); clip-path: polygon(0 0, 100% 0, 100% 78%, 50% 100%, 0 78%); box-shadow: inset 0 0 0 2px var(--gold); position: relative; }
.gs-emb span { font-family: var(--font-hanja); font-weight: 900; font-size: 40px; color: var(--gold-l); text-shadow: 0 2px 0 rgba(0, 0, 0, .4); margin-top: -8px; }
.gs-main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.gs-main > small { font-size: 11px; color: rgba(239, 227, 200, .65); }
.gs-tier { font-family: var(--font-hanja); font-size: 22px; color: var(--gold-l); letter-spacing: .04em; }
.gs-rating { font-size: 12px; color: rgba(239, 227, 200, .8); }
.gs-rating b { font-size: 18px; color: #fff; margin-right: 2px; }
.gs-rating small { margin-left: 6px; color: rgba(239, 227, 200, .6); }
.gs-bar { height: 7px; border-radius: 99px; background: rgba(255, 255, 255, .12); overflow: hidden; margin-top: 3px; }
.gs-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold-d), var(--gold-l)); border-radius: inherit; }
.gs-stats { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.gs-stats div { padding: 6px 2px; border-radius: 9px; background: rgba(255, 255, 255, .07); text-align: center; }
.gs-stats small { display: block; font-size: 10px; color: rgba(239, 227, 200, .6); }
.gs-stats b { font-size: 13.5px; white-space: nowrap; }
.gs-stats .c-jade, .tier-ladder .c-jade { font-style: normal; color: #6fd3a0; margin-right: 2px; font-family: var(--font-hanja); }
.gs-foot { grid-column: 1 / -1; font-size: 11px; color: rgba(239, 227, 200, .55); text-align: center; }

.gh-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.gh-mode { display: flex; align-items: center; gap: 8px; padding: 10px; border-radius: 12px; background: rgba(255, 255, 255, .5); border: 1.5px solid rgba(27, 26, 23, .16); position: relative; min-width: 0; }
.gh-mode.on { border-color: var(--foe); background: linear-gradient(160deg, #fff6e4, #f1dcc0); box-shadow: 0 0 0 2px rgba(184, 50, 42, .15); }
.gh-mode.locked { opacity: .62; filter: grayscale(.5); }
.gh-mode > i { font-style: normal; flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-family: var(--font-hanja); font-weight: 900; font-size: 19px; color: #fff4d8; background: var(--foe); }
.gh-mode.locked > i { background: #555; }
.gh-mode span { min-width: 0; display: flex; flex-direction: column; }
.gh-mode b { font-size: 13.5px; }
.gh-mode small { font-size: 10.5px; color: var(--ink-soft); line-height: 1.35; word-break: keep-all; }
.gh-mode em { position: absolute; top: -7px; right: 8px; font-style: normal; font-size: 10px; font-weight: 700; padding: 0 6px; border-radius: 99px; background: var(--foe); color: #fff; line-height: 1.6; }
.gh-mode.locked em { background: #6d6253; }

.opp-list { display: grid; gap: 8px; }
.opp-card { display: grid; grid-template-columns: 1fr auto; grid-template-areas: 'who go' 'num go'; gap: 6px 10px; align-items: center; padding: 10px 10px 10px 12px; border-radius: 12px; background: linear-gradient(100deg, rgba(255, 255, 255, .7), rgba(255, 255, 255, .35)); border: 1px solid rgba(27, 26, 23, .16); border-left: 4px solid var(--c); }
.oc-who { grid-area: who; display: flex; align-items: center; gap: 10px; border: 0; background: none; padding: 0; text-align: left; font: inherit; color: inherit; cursor: pointer; min-width: 0; }
.oc-who span { display: flex; flex-direction: column; min-width: 0; }
.oc-who b { font-size: 14.5px; }
.oc-who small { font-size: 11px; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.oc-num { grid-area: num; display: flex; gap: 14px; padding-left: 48px; }
.oc-num span { display: flex; align-items: baseline; gap: 4px; }
.oc-num small { font-size: 10.5px; color: var(--ink-soft); }
.oc-num b { font-size: 13.5px; }
.o-tag { font-style: normal; font-size: 10px; font-weight: 700; padding: 0 5px; border-radius: 5px; color: #fff; line-height: 1.6; }
.o-tag.hard { background: var(--foe); } .o-tag.even { background: #8a7a62; } .o-tag.easy { background: var(--ally); }
.oc-go { grid-area: go; min-width: 76px; padding: 8px 10px !important; display: flex; flex-direction: column; align-items: center; gap: 1px; line-height: 1.2; }
.oc-go b { font-size: 15px; }
.oc-go small { display: flex; flex-direction: column; font-size: 10px; letter-spacing: 0; white-space: nowrap; line-height: 1.25; }
.oc-go em.up { color: #c9f5d6; font-style: normal; } .oc-go em.down { color: #ffd2c8; font-style: normal; }
.ghost-row .medal.sm { margin-right: 4px; }

.tier-ladder { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.tl { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 8px 2px; border-radius: 10px; background: rgba(27, 26, 23, .06); border: 1.5px solid transparent; text-align: center; }
.tl span { font-family: var(--font-hanja); font-weight: 900; font-size: 18px; color: #6d6253; }
.tl.t1 span { color: #2d6d7a; } .tl.t2 span { color: #3b4f9a; } .tl.t3 span { color: #7a3fa8; } .tl.t4 span { color: var(--foe); }
.tl b { font-size: 11.5px; white-space: nowrap; }
.tl small { font-size: 10px; color: var(--ink-soft); }
.tl em { font-style: normal; font-size: 11px; font-weight: 700; }
.tl.past { opacity: .55; }
.tl.on { border-color: var(--gold); background: linear-gradient(180deg, #fff3d4, #f0dcae); box-shadow: 0 2px 8px rgba(122, 90, 28, .25); }

/* 명부: 분류 · 단상 · 목록 · 내 순위 */
.rk-cats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; padding: 4px; border-radius: 14px; background: rgba(27, 26, 23, .08); }
.rk-cat { display: flex; flex-direction: column; align-items: center; gap: 0; padding: 2px 2px 6px; border: 0; border-radius: 10px; background: none; font: inherit; color: var(--ink-soft); cursor: pointer; }
.rk-cat small { font-size: 9.5px; color: var(--gold-d); font-weight: 700; height: 13px; }
.rk-cat i { font-style: normal; font-family: var(--font-hanja); font-weight: 900; font-size: 20px; line-height: 1.15; }
.rk-cat b { font-size: 11px; white-space: nowrap; }
.rk-cat.on { background: linear-gradient(180deg, #2c2924, #1b1a17); color: var(--gold-l); box-shadow: 0 3px 8px rgba(0, 0, 0, .25); }
.rk-cat.on small { color: rgba(241, 212, 137, .7); }
.rk-subs { margin-top: 8px; }
.rk-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 10px 2px 4px; font-size: 12px; color: var(--ink-soft); flex-wrap: wrap; }
.gh-season-strip { display: flex; gap: 8px; font-size: 11.5px; }
.gh-season-strip b { color: var(--foe); }

.podium { display: grid; grid-template-columns: 1fr 1.12fr 1fr; gap: 6px; align-items: end; margin: 26px 0 10px; }
.pod { --bg: #3b4f9a; --rim: #c9d2e6; --cut: polygon(0 0, 100% 0, 100% calc(100% - 14px), 50% 100%, 0 calc(100% - 14px)); position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 26px 4px 22px; border: 0; background: none; font: inherit; color: #fff; cursor: pointer; min-width: 0; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .25)); }
.pod::before { content: ''; position: absolute; inset: 0; clip-path: var(--cut); background: linear-gradient(180deg, color-mix(in srgb, var(--bg) 78%, #fff), var(--bg) 40%, color-mix(in srgb, var(--bg) 70%, #000)); box-shadow: inset 0 0 0 2px var(--rim); }
.pod::after { content: ''; position: absolute; inset: 0; clip-path: var(--cut); background: linear-gradient(var(--rim), var(--rim)) top / 100% 3px no-repeat; box-shadow: inset 0 0 0 2px var(--rim); pointer-events: none; }
.pod > * { position: relative; z-index: 1; }
.pod.p1 { --bg: #b8322a; --rim: #f1d489; padding-top: 34px; padding-bottom: 30px; }
.pod.p3 { --bg: #2d7a52; --rim: #e0a86a; }
.pod.empty { opacity: .35; cursor: default; }
.pod > .pod-crown { position: absolute; top: -18px; left: 50%; transform: translateX(-50%); width: 38px; height: 30px; display: grid; place-items: end center; z-index: 2;
  background: var(--rim); clip-path: polygon(0 35%, 22% 60%, 50% 0, 78% 60%, 100% 35%, 92% 100%, 8% 100%); }
.pod.p1 .pod-crown { width: 46px; height: 36px; top: -20px; background: linear-gradient(180deg, #ffe9a8, #c9a24a); }
.pod-crown span { font-family: var(--font-hanja); font-weight: 900; font-size: 14px; color: #2a2a2a; margin-bottom: 1px; }
.pod .medal { width: 58px; height: 58px; box-shadow: 0 0 0 3px var(--c), 0 0 0 5px var(--rim), 0 4px 10px rgba(0, 0, 0, .35); }
.pod.p1 .medal { width: 70px; height: 70px; }
.pod .medal span { font-size: 30px; }
.pod.p1 .medal span { font-size: 36px; }
.pod-nick { margin-top: 6px; font-size: 14px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-shadow: 0 1px 2px rgba(0, 0, 0, .5); }
.pod.p1 .pod-nick { font-size: 15.5px; }
.pod-hero { font-size: 10px; opacity: .85; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pod-val { margin-top: 4px; padding: 2px 9px; border-radius: 99px; background: rgba(0, 0, 0, .3); font-weight: 900; font-size: 13px; white-space: nowrap; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--rim) 50%, transparent); }
.pod-val small { font-size: 10px; font-weight: 400; margin-left: 2px; opacity: .85; }
.pod.mine .pod-nick::after { content: ' (나)'; font-size: 11px; color: var(--gold-l); }

.rk-list { display: grid; gap: 6px; }
.rk-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 12px 8px 8px; border-radius: 12px; border: 1px solid rgba(27, 26, 23, .14); background: linear-gradient(100deg, rgba(255, 255, 255, .7), rgba(255, 255, 255, .4)); font: inherit; color: inherit; text-align: left; cursor: pointer; }
.rk-row.mine { border-color: var(--gold); background: linear-gradient(100deg, #fff3d4, #f0dcae); }
.rk-no { flex: none; width: 30px; height: 30px; display: grid; place-items: center; font-weight: 900; font-size: 14px; color: #3b4f9a; position: relative; }
.rk-no::before { content: ''; position: absolute; inset: 3px; transform: rotate(45deg); border: 1.5px solid rgba(59, 79, 154, .45); border-radius: 4px; }
.rk-who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rk-who b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rk-who small { font-size: 11px; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rk-val { flex: none; padding: 3px 10px; border-radius: 9px; background: rgba(27, 26, 23, .07); font-weight: 900; font-size: 14px; white-space: nowrap; }
.rk-val small { font-size: 10.5px; font-weight: 400; margin-left: 2px; color: var(--ink-soft); }
.rk-mine { position: sticky; bottom: -1px; margin: 10px -4px 0; padding: 8px 4px calc(var(--safe-b) + 4px); background: linear-gradient(180deg, transparent, var(--paper) 30%); z-index: 3; }
.rk-row.me-row { background: linear-gradient(100deg, #2c2924, #1b1a17); color: var(--paper); border-color: var(--gold-d); box-shadow: 0 -2px 12px rgba(0, 0, 0, .18); }
.rk-row.me-row small { color: rgba(239, 227, 200, .65); }
.rk-row.me-row .rk-no { color: var(--gold-l); }
.rk-row.me-row .rk-no::before { border-color: rgba(241, 212, 137, .5); }
.rk-row.me-row .rk-val { background: rgba(241, 212, 137, .14); color: var(--gold-l); }
.rk-row.me-row.none { cursor: default; }

.rk-sheet .rks-top { display: flex; align-items: center; gap: 18px; margin: 6px 4px 14px; }
.rk-sheet .rks-top .medal { width: 64px; height: 64px; }
.rk-sheet .rks-top .medal span { font-size: 34px; }
.rk-sheet .rks-top b { display: block; font-size: 18px; }
.rk-sheet .rks-top small { color: var(--ink-soft); font-size: 12px; }
.rks-rows { display: grid; gap: 4px; }
.rks-rows div { display: flex; justify-content: space-between; gap: 10px; padding: 7px 10px; border-radius: 9px; background: rgba(27, 26, 23, .06); font-size: 13px; }
.rks-rows span { color: var(--ink-soft); }

/* 소식 */
.seg2 { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 3px; border-radius: 12px; background: rgba(27, 26, 23, .08); margin-bottom: 6px; }
.seg2 button { border: 0; border-radius: 9px; padding: 8px 4px; background: none; font: inherit; font-size: 13px; font-weight: 700; color: var(--ink-soft); cursor: pointer; }
.seg2 button small { font-weight: 400; font-size: 10px; }
.seg2 button.on { background: var(--paper); color: var(--ink); box-shadow: 0 1px 4px rgba(0, 0, 0, .15); }
.news-feed { display: grid; gap: 6px; }
.news-day { margin: 8px 2px 0; font-size: 11.5px; font-weight: 700; color: var(--gold-d); }
.news-card { display: flex; align-items: center; gap: 10px; padding: 9px 12px 9px 9px; border-radius: 12px; background: rgba(255, 255, 255, .55); border: 1px solid rgba(27, 26, 23, .12); }
.news-card > i { font-style: normal; flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-family: var(--font-hanja); font-weight: 900; font-size: 18px; color: #fff4d8; background: var(--k); box-shadow: inset 0 0 0 1.5px rgba(241, 212, 137, .5); }
.news-card > span { flex: 1; min-width: 0; font-size: 13.5px; line-height: 1.4; word-break: keep-all; }
.news-card .nt { font-style: normal; display: block; color: var(--ink-2); }
.news-card > small { flex: none; font-size: 10.5px; color: var(--ink-soft); align-self: flex-start; margin-top: 2px; }

@media (min-width: 720px) {
  .gangho-body { max-width: 760px; margin: 0 auto; width: 100%; }
  .opp-list { grid-template-columns: 1fr; }
}

/* ── 기연 패널 (2026-10-08) ── */
.ev-head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.ev-head h3 { margin: 0; }
.ev-head small { font-size: 11px; color: var(--ink-soft); letter-spacing: .04em; }
.ev-seal { flex: none; width: 46px; height: 46px; border-radius: 10px; display: grid; place-items: center; font-family: var(--font-hanja); font-weight: 900; font-size: 26px; color: #fff4d8; background: radial-gradient(circle at 40% 35%, #b8322a, #5e130f); box-shadow: inset 0 0 0 2px rgba(241, 212, 137, .55), 0 3px 8px rgba(0, 0, 0, .25); transform: rotate(-4deg); }
.ev-story { font-family: var(--font-hanja); line-height: 1.75; }
.ev-heart { margin: 6px 0 0; text-align: center; font-family: var(--font-hanja); font-size: 13px; letter-spacing: .03em; }
.ev-heart.clear { color: #2d6d7a; }
.ev-heart.cling { color: #8e1f1f; }
.end-heart { margin: 2px 0 8px; font-family: var(--font-hanja); font-size: 13.5px; color: var(--ink-soft); text-align: center; }
.end-heart b:first-child { color: #2d6d7a; } .end-heart b:last-child { color: #8e1f1f; }

/* ── 簽 출석 · 課 수행 과제 (2026-10-08) ── */
.coin { width: 22px; height: 22px; border-radius: 50%; display: inline-grid; place-items: center; font-style: normal; font-family: var(--font-hanja); font-weight: 900; font-size: 11.5px; color: #fff; flex: none; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .25), 0 1px 2px rgba(0, 0, 0, .25); }
.c-shard { background: radial-gradient(circle at 35% 30%, #fff1c9, #c9a24a 60%, #7a5a1c); }
.rwc { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; white-space: nowrap; }
.rwc b { font-weight: 800; }
.rwc .itile { flex: none; }

.hub-daily { display: grid; grid-template-columns: 1fr 1.6fr; gap: 8px; margin-top: 10px; }
.hd-card { position: relative; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; border: 1.5px solid rgba(27, 26, 23, .16); background: linear-gradient(160deg, rgba(255, 255, 255, .7), rgba(255, 255, 255, .35)); font: inherit; color: inherit; text-align: left; cursor: pointer; min-width: 0; }
.hd-card.ready { border-color: var(--gold); background: linear-gradient(160deg, #fff6dc, #f1dcae); box-shadow: 0 0 0 3px rgba(201, 162, 74, .18); }
.hd-g { flex: none; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; font-style: normal; font-family: var(--font-hanja); font-weight: 900; font-size: 20px; color: #fff4d8; background: linear-gradient(160deg, #2c2924, #1b1a17); box-shadow: inset 0 0 0 1.5px rgba(241, 212, 137, .45); }
.hd-att .hd-g { background: radial-gradient(circle at 40% 35%, #b8322a, #5e130f); }
.hd-card > span { display: flex; flex-direction: column; min-width: 0; }
.hd-card b { font-size: 14px; }
.hd-card small { font-size: 11px; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hd-card > .tb-dot { position: absolute; top: -6px; right: -4px; }
.hd-pips { display: flex; gap: 4px; margin-top: 4px; }
.hd-pips i, .tkb-pips i { width: 18px; height: 5px; border-radius: 9px; background: rgba(27, 26, 23, .15); }
.hd-pips i.ready { background: var(--gold); } .hd-pips i.on, .tkb-pips i.on { background: #2d6d7a; }

.att-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.att-head h3 { margin: 0; }
.att-head small { font-size: 11.5px; color: var(--ink-soft); }
.att-seal { flex: none; width: 46px; height: 46px; border-radius: 10px; display: grid; place-items: center; font-family: var(--font-hanja); font-weight: 900; font-size: 26px; color: #fff4d8; background: radial-gradient(circle at 40% 35%, #b8322a, #5e130f); box-shadow: inset 0 0 0 2px rgba(241, 212, 137, .55); transform: rotate(-4deg); }
.att-seal.tk { background: linear-gradient(160deg, #2c2924, #1b1a17); }
.att-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.att-cell { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px 10px; border-radius: 12px; background: rgba(255, 255, 255, .55); border: 1.5px solid rgba(27, 26, 23, .14); min-height: 84px; }
.att-cell small { font-size: 10.5px; font-weight: 700; color: var(--ink-soft); }
.att-cell .att-rw { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-align: center; }
.att-cell .rwc { flex-direction: column; gap: 2px; font-size: 11px; }
.att-cell .rwc b { white-space: normal; word-break: keep-all; line-height: 1.2; }
.att-cell .coin { width: 30px; height: 30px; font-size: 15px; }
.att-cell.big { grid-column: span 2; background: linear-gradient(160deg, #fff3d4, #ecd39a); border-color: var(--gold); }
.att-cell.today { border-color: var(--foe); box-shadow: 0 0 0 3px rgba(184, 50, 42, .18); animation: att-pulse 1.4s ease-in-out infinite; }
.att-cell.got { opacity: .6; }
.att-stamp { position: absolute; inset: 0; display: grid; place-items: center; font-style: normal; font-family: var(--font-hanja); font-weight: 900; font-size: 34px; color: rgba(184, 50, 42, .85); transform: rotate(-12deg); pointer-events: none; }
.att-cell.stamping .att-stamp { animation: att-stamp .45s cubic-bezier(.2, 1.6, .4, 1) both; }
@keyframes att-pulse { 50% { box-shadow: 0 0 0 6px rgba(184, 50, 42, .08); } }
@keyframes att-stamp { from { transform: rotate(-12deg) scale(2.4); opacity: 0; } to { transform: rotate(-12deg) scale(1); opacity: 1; } }
.att-go { width: 100%; margin-top: 12px; }

.tk-list { display: grid; gap: 6px; margin-top: 8px; }
.tk-row { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 12px; background: rgba(255, 255, 255, .55); border: 1px solid rgba(27, 26, 23, .14); }
.tk-row.ready { border-color: var(--gold); background: linear-gradient(100deg, #fff6dc, #f3e2b8); }
.tk-row.claimed { opacity: .55; }
.tk-g { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; font-style: normal; font-family: var(--font-hanja); font-weight: 900; font-size: 17px; color: #fff4d8; background: linear-gradient(160deg, #2c2924, #1b1a17); }
.tk-main { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 8px; min-width: 0; }
.tk-main b { grid-column: 1 / -1; font-size: 13.5px; }
.tk-bar { height: 6px; border-radius: 9px; background: rgba(27, 26, 23, .12); overflow: hidden; }
.tk-bar i { display: block; height: 100%; background: linear-gradient(90deg, #2d6d7a, #6fb7c2); border-radius: inherit; }
.tk-row.ready .tk-bar i { background: linear-gradient(90deg, var(--gold-d), var(--gold)); }
.tk-main small { font-size: 10.5px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.tk-rw { display: flex; flex-wrap: wrap; gap: 4px 8px; justify-content: flex-end; }
.tk-btn { min-width: 58px; }
.tk-bonus { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 10px; margin-top: 10px; padding: 12px; border-radius: 14px; color: var(--paper); background: linear-gradient(160deg, #2a241c, #15130f); border: 1.5px solid var(--gold-d); }
.tk-bonus.ready { box-shadow: 0 0 0 3px rgba(201, 162, 74, .3); }
.tk-bonus.claimed { opacity: .6; }
.tkb-l small { font-size: 11px; color: rgba(239, 227, 200, .7); }
.tkb-pips { display: flex; align-items: center; gap: 4px; margin-top: 4px; }
.tkb-pips i { background: rgba(255, 255, 255, .15); }
.tkb-pips i.on { background: var(--gold-l); }
.tkb-pips b { margin-left: 4px; font-size: 12px; }
.tk-bonus .rwc b { color: var(--gold-l); }
.tkb-btn { padding: 8px 14px !important; }
.seg2 .tb-dot { position: static; display: inline-grid; margin-left: 4px; vertical-align: middle; }

/* ── 무림인 숙련 (2026-10-08) ── */
.ms-chip { font-style: normal; display: inline-flex; align-items: center; gap: 3px; margin-left: 4px; padding: 0 6px 0 2px; border-radius: 99px; font-size: 10.5px; font-weight: 700; line-height: 1.7; color: #fff6dc; background: #6d6253; vertical-align: middle; white-space: nowrap; }
.ms-chip i { font-style: normal; font-family: var(--font-hanja); width: 15px; height: 15px; border-radius: 50%; display: grid; place-items: center; background: rgba(0, 0, 0, .25); font-size: 10px; }
.ms-chip.l3, .ms-chip.l4 { background: #2d6d7a; } .ms-chip.l5, .ms-chip.l6 { background: #3b4f9a; } .ms-chip.l7, .ms-chip.l8 { background: #7a3fa8; } .ms-chip.l9, .ms-chip.l10 { background: linear-gradient(120deg, #b8322a, #c9a24a); }
.ms-seal { flex: none; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-hanja); font-weight: 900; font-size: 24px; color: var(--gold-l); background: radial-gradient(circle at 40% 35%, #3a3530, #141210 70%); box-shadow: 0 0 0 3px var(--c, var(--gold)), 0 0 0 5px var(--gold-d); }
.ms-bar { display: block; height: 7px; border-radius: 99px; background: rgba(27, 26, 23, .14); overflow: hidden; margin: 4px 0 2px; }
.ms-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--gold-d), var(--gold-l)); transition: width .7s cubic-bezier(.3, .8, .3, 1); }
.ms-panel { margin-bottom: 10px; padding: 12px; border-radius: 14px; color: var(--paper); background: linear-gradient(160deg, #2a241c, #15130f); border: 1.5px solid var(--gold-d); }
.ms-top { display: flex; align-items: center; gap: 14px; }
.ms-top > div { flex: 1; min-width: 0; }
.ms-top small { display: block; font-size: 11px; color: rgba(239, 227, 200, .65); }
.ms-top > div > b { font-family: var(--font-hanja); font-size: 19px; color: var(--gold-l); }
.ms-top em { font-style: normal; font-size: 12px; color: rgba(239, 227, 200, .75); margin-left: 4px; }
.ms-panel .ms-bar { background: rgba(255, 255, 255, .12); }
.ms-perks { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.ms-perks li { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 6px 2px; border-radius: 9px; background: rgba(255, 255, 255, .06); text-align: center; opacity: .5; }
.ms-perks li.on { opacity: 1; background: rgba(241, 212, 137, .14); box-shadow: inset 0 0 0 1px rgba(241, 212, 137, .4); }
.ms-perks li b { font-size: 13px; color: var(--gold-l); }
.ms-perks li span { font-size: 10px; color: rgba(239, 227, 200, .7); }
.ms-perks li em { font-style: normal; font-size: 10.5px; font-weight: 700; word-break: keep-all; line-height: 1.25; }
.ms-note { margin: 8px 0 0; font-size: 10.5px; color: rgba(239, 227, 200, .55); line-height: 1.5; word-break: keep-all; }
.end-mastery { display: flex; align-items: center; gap: 14px; width: min(100%, 360px); margin: 6px auto 10px; padding: 10px 14px; border-radius: 14px; background: rgba(255, 255, 255, .5); border: 1.5px solid rgba(27, 26, 23, .16); text-align: left; }
.end-mastery > div { flex: 1; min-width: 0; }
.end-mastery small { display: block; font-size: 11.5px; color: var(--ink-soft); }
.end-mastery small b { color: var(--gold-d); }
.end-mastery > div > b { font-family: var(--font-hanja); font-size: 17px; }
.end-mastery em { font-style: normal; font-size: 12px; color: var(--ink-soft); }
.end-mastery.up { border-color: var(--gold); background: linear-gradient(160deg, #fff6dc, #f1dcae); }
.ms-up { font-style: normal; font-size: 11px; font-weight: 800; color: #fff; background: var(--foe); padding: 0 6px; border-radius: 6px; margin-left: 4px; animation: att-pulse 1.4s infinite; }
.ms-perk-new { color: #2d6d7a !important; font-weight: 700; }
.chron-ms { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.cm { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: rgba(255, 255, 255, .5); border: 1px solid rgba(27, 26, 23, .14); min-width: 0; }
.cm > span { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cm b { font-size: 13px; }
.cm small { font-size: 10.5px; color: var(--ink-soft); white-space: nowrap; }
.end-mastery > div > b { color: var(--ink); }
.end-screen .end-heart { color: rgba(239, 227, 200, .7); }
.end-screen .end-heart b:first-child { color: #8fc7cf; } .end-screen .end-heart b:last-child { color: #f09a86; }

/* ── 비무 보상 · 방어 기록 · 복수 (2026-10-08) ── */
.gs-streak { font-style: normal; margin-left: 8px; padding: 1px 8px; border-radius: 99px; font-family: var(--font-body); font-size: 11.5px; font-weight: 800; color: #fff; background: linear-gradient(120deg, #b8322a, #e07b2a); vertical-align: middle; animation: att-pulse 1.6s infinite; }
.new-dot { position: static !important; margin-left: auto; }
.dlog { display: grid; gap: 6px; }
.dl-row { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 12px; background: rgba(255, 255, 255, .55); border: 1px solid rgba(27, 26, 23, .14); border-left: 4px solid #2d6d7a; }
.dl-row.bad { border-left-color: var(--foe); }
.dl-row.new { box-shadow: 0 0 0 2px rgba(201, 162, 74, .45); }
.dl-ic { flex: none; width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; font-family: var(--font-hanja); font-weight: 900; font-size: 13px; color: #fff4d8; background: #2d6d7a; }
.dl-row.bad .dl-ic { background: var(--foe); }
.dl-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.dl-main b { font-size: 13.5px; }
.dl-main small { font-size: 10.5px; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dl-main em.up { font-style: normal; color: #1f7a4a; font-weight: 800; } .dl-main em.down { font-style: normal; color: var(--foe); font-weight: 800; }
.dl-btn { flex: none; min-width: 74px; padding: 6px 10px !important; display: flex; flex-direction: column; align-items: center; line-height: 1.2; }
.dl-btn b { font-size: 14px; } .dl-btn small { font-size: 9.5px; letter-spacing: 0; opacity: .85; white-space: nowrap; }
.dl-btn.revenge { animation: att-pulse 1.6s infinite; }
.dl-done { flex: none; font-style: normal; font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 8px; color: #fff; background: #2d6d7a; }
.dl-done.lost { background: #6d6253; }
.duel-rw { display: grid; gap: 6px; margin-bottom: 8px; }
.duel-rw > div { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 8px 10px; border-radius: 12px; background: rgba(27, 26, 23, .06); }
.duel-rw > div > small { width: 34px; font-size: 11px; font-weight: 700; color: var(--gold-d); }
.duel-rw span { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; }
.duel-rw span.on { font-weight: 800; color: var(--foe); }
.tl .tl-season { font-size: 10.5px; color: #7a3fa8; }
.tl .tl-season small { font-size: 9px; }
.duel-res { text-align: center; font-size: 15px; margin: 4px 0 8px; }
.duel-res.up b { color: #1f7a4a; } .duel-res.down b { color: var(--foe); }
.duel-res em { font-style: normal; color: var(--foe); font-weight: 800; }
.dp-list { display: grid; gap: 6px; }
.dp-row { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; background: rgba(255, 255, 255, .55); border: 1px solid rgba(27, 26, 23, .14); }
.dp-row > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; }
.dp-row small { font-size: 11px; color: var(--ink-soft); }
.tier-emb-sm { flex: none; width: 34px; height: 38px; display: grid; place-items: center; font-family: var(--font-hanja); font-weight: 900; font-size: 18px; color: var(--gold-l); background: #6d6253; clip-path: polygon(0 0, 100% 0, 100% 78%, 50% 100%, 0 78%); }
.tier-emb-sm.t1 { background: #2d6d7a; } .tier-emb-sm.t2 { background: #3b4f9a; } .tier-emb-sm.t3 { background: #7a3fa8; } .tier-emb-sm.t4 { background: #b8322a; }

/* ── 무구 종류 · 강화 성장 (2026-10-08) ── */
.kind-chip { display: inline-block; padding: 0 6px; border-radius: 6px; background: rgba(27, 26, 23, .08); font-size: .92em; }
.gp-kind { margin: 2px 0 0; font-size: 11.5px; color: var(--ink-soft); }
.gp-grow { margin: 8px 0 4px; padding: 10px; border-radius: 12px; background: rgba(27, 26, 23, .06); }
.gp-grow > small { font-size: 11.5px; color: var(--ink-soft); }
.gp-grow > small b { color: var(--gold-d); font-size: 13px; }
.gg-strip { display: grid; grid-template-columns: repeat(15, 1fr); gap: 3px; margin: 6px 0 4px; }
.gg-strip i { height: 14px; border-radius: 4px; background: rgba(27, 26, 23, .12); display: grid; place-items: center; font-style: normal; font-size: 8.5px; font-weight: 800; color: rgba(27, 26, 23, .5); }
.gg-strip i.big { height: 18px; margin-top: -2px; background: rgba(201, 162, 74, .3); }
.gg-strip i.on { background: linear-gradient(180deg, var(--gold-l), var(--gold)); color: #4a3510; }
.gg-strip i.big.on { background: linear-gradient(180deg, #ffd47a, #c9821a); }
.gg-strip i.next { box-shadow: 0 0 0 2px var(--foe); animation: att-pulse 1.4s infinite; }
.gg-next, .gg-mile { margin: 2px 0 0; font-size: 12px; }
.gg-next em { font-style: normal; font-weight: 800; color: #1f7a4a; }
.gg-mile { color: var(--gold-d); }
.gp-msg .gain { display: block; font-size: 12px; color: #1f7a4a; font-weight: 700; }
.gg-strip i.sec { height: 18px; margin-top: -2px; background: rgba(122, 63, 168, .25); color: #5a2f80; }
.gg-strip i.sec.on { background: linear-gradient(180deg, #c9a6ec, #7a3fa8); color: #fff; }
.gg-sec { margin: 4px 0 0; font-size: 12px; color: var(--ink-soft); }
.gg-sec b { color: #7a3fa8; }
.gg-sec.open b { color: #7a3fa8; } .gg-sec.open { color: var(--ink); }
.gg-sec.off { opacity: .55; }
.gg-sec em { font-style: normal; font-weight: 700; color: #7a3fa8; }

/* ── 강호 대전 선공 동전 (2026-10-08) ── */
.turn-toss { position: absolute; inset: 0; z-index: 60; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; pointer-events: none; background: radial-gradient(circle, rgba(20, 18, 15, .55), rgba(20, 18, 15, 0) 70%); animation: tt-fade 2.2s ease forwards; color: #fff4d8; text-shadow: 0 2px 6px rgba(0, 0, 0, .6); }
.tt-coin { width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 40% 35%, #ffe9a8, #c9a24a 60%, #7a5a1c); box-shadow: 0 0 0 4px #7a5a1c, 0 8px 22px rgba(0, 0, 0, .45); animation: tt-flip .9s cubic-bezier(.3, 1.4, .5, 1) both; }
.turn-toss.second .tt-coin { background: radial-gradient(circle at 40% 35%, #e6ebf0, #8f99a3 60%, #4e565e); box-shadow: 0 0 0 4px #4e565e, 0 8px 22px rgba(0, 0, 0, .45); }
.tt-coin span { font-family: var(--font-hanja); font-weight: 900; font-size: 52px; color: #2a1d10; text-shadow: none; }
.turn-toss b { font-family: var(--font-hanja); font-size: 30px; letter-spacing: .1em; }
.turn-toss small { font-size: 13px; }
@keyframes tt-flip { 0% { transform: rotateY(0) scale(.4); } 70% { transform: rotateY(900deg) scale(1.1); } 100% { transform: rotateY(1080deg) scale(1); } }
@keyframes tt-fade { 0%, 80% { opacity: 1; } 100% { opacity: 0; } }

/* ── 비무 두 방식: 대련 · 생사결 (2026-10-08) ── */
.mode-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 6px; }
.mode-card { position: relative; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; gap: 2px 8px; align-items: center; text-align: left; padding: 10px; border-radius: 14px; border: 2px solid rgba(27, 26, 23, .12); background: rgba(255, 252, 244, .7); color: var(--ink); font: inherit; cursor: pointer; transition: transform .12s, border-color .12s; }
.mode-card > i { grid-row: 1 / 3; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-style: normal; font-family: var(--font-hanja); font-weight: 900; font-size: 22px; color: #fff; background: var(--mc); opacity: .55; }
.mode-card > span:first-of-type b { display: block; font-size: 15px; }
.mode-card small { display: block; font-size: 11px; color: var(--ink-soft); line-height: 1.3; }
.mode-card .mc-r { grid-column: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.mode-card .mc-r small { font-size: 10.5px; }
.mode-card.on { border-color: var(--mc); background: linear-gradient(160deg, rgba(255, 252, 244, .95), color-mix(in srgb, var(--mc) 14%, transparent)); box-shadow: 0 4px 14px color-mix(in srgb, var(--mc) 30%, transparent); }
.mode-card.on > i { opacity: 1; }
.mode-card:active { transform: scale(.97); }
.mode-card .tb-dot { position: absolute; top: -5px; right: -5px; }
.mode-desc { margin: 4px 2px 10px; font-size: 12.5px; color: var(--ink-2); line-height: 1.5; }
.turn-rule { display: flex; align-items: center; gap: 10px; margin: 10px 0 4px; padding: 8px 10px; border-radius: 12px; background: rgba(201, 162, 74, .14); border: 1px dashed rgba(122, 90, 28, .35); }
.turn-rule b { display: block; font-size: 13px; }
.turn-rule small { font-size: 11.5px; color: var(--ink-soft); }
.tr-coin { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-hanja); font-weight: 900; font-size: 13px; color: #2a1d10; background: radial-gradient(circle at 40% 35%, #ffe9a8, #c9a24a 60%, #7a5a1c); box-shadow: 0 0 0 2px #7a5a1c; }
.spar-me { display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; align-items: center; padding: 10px; border-radius: 14px; background: color-mix(in srgb, var(--c) 10%, rgba(255, 252, 244, .8)); border: 1px solid color-mix(in srgb, var(--c) 35%, transparent); }
.spar-me > div:first-of-type ~ div, .spar-me b { display: block; }
.spar-me small { display: block; font-size: 11.5px; color: var(--ink-soft); }
.spar-me .sm-acts { grid-column: 1 / 3; display: flex; gap: 6px; justify-content: flex-end; }
.deck-mini { display: inline-flex; flex-wrap: wrap; gap: 2px; margin-top: 4px; }
.deck-mini i { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-family: var(--font-hanja); font-size: 11px; font-weight: 800; color: #fff4d8; background: var(--ink-2); }
.book-card { width: 100%; display: flex; align-items: center; gap: 10px; margin: 12px 0 4px; padding: 10px 12px; border-radius: 14px; border: 1px solid rgba(122, 90, 28, .35); background: linear-gradient(120deg, rgba(255, 245, 220, .9), rgba(201, 162, 74, .18)); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.book-card > i { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; font-style: normal; font-family: var(--font-hanja); font-weight: 900; font-size: 20px; color: #fff4d8; background: #7a5a1c; }
.book-card span { flex: 1; } .book-card b { display: block; } .book-card small { font-size: 11.5px; color: var(--ink-soft); }
.book-card .bc-go { font-style: normal; font-size: 20px; color: var(--ink-soft); }
.gm-tiers { display: inline-flex; gap: 3px; }
/* 대련 덱 편성 */
.sd-count { text-align: center; margin: 4px 0 8px; font-size: 13px; color: var(--foe); }
.sd-count b { font-size: 22px; }
.sd-count.ok { color: #1f7a4a; }
.sd-list { max-height: 52vh; overflow-y: auto; }
.sd-row.on { background: rgba(201, 162, 74, .16); }
.sd-step { display: inline-flex; align-items: center; gap: 6px; flex: none; }
.sd-step b { min-width: 14px; text-align: center; }
.sd-acts { display: flex; gap: 8px; justify-content: center; margin-top: 10px; }
/* 비무록 */
.bk-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.bk-cell { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 6px 2px; border-radius: 12px; background: rgba(27, 26, 23, .05); text-align: center; }
.bk-cell b { font-size: 12px; } .bk-cell small { font-size: 10px; color: var(--ink-soft); }
.bk-cell.dim { opacity: .45; filter: grayscale(.8); }
.bk-cell.won { background: color-mix(in srgb, var(--c) 16%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 45%, transparent); }
.bk-miles { display: flex; flex-direction: column; gap: 6px; }
.bk-mile { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 12px; background: rgba(27, 26, 23, .05); }
.bk-mile > span { flex: 1; min-width: 0; } .bk-mile b { display: block; font-size: 12.5px; } .bk-mile small { font-size: 11px; color: var(--ink-soft); }
.bk-mile.ready { background: rgba(201, 162, 74, .2); box-shadow: inset 0 0 0 1px rgba(201, 162, 74, .6); }
.bk-mile.claimed { opacity: .6; }
.bk-bar { display: block; height: 5px; border-radius: 3px; background: rgba(27, 26, 23, .1); margin-top: 3px; overflow: hidden; }
.bk-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold-l), var(--gold)); }
.sd-row { display: flex; align-items: center; gap: 8px; }
.sd-row .it { flex: 1; min-width: 0; }
.sd-row .it small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sd-step .mini-btn { width: 32px; min-width: 0; height: 32px; padding: 0; flex: none; font-size: 16px; }
/* 도전 횟수 (30분마다 1회 · 옥 구입) */
.charge-bar { display: flex; align-items: center; gap: 10px; margin: 12px 0 2px; padding: 8px 10px; border-radius: 12px; background: rgba(27, 26, 23, .06); }
.charge-bar.empty { background: rgba(184, 50, 42, .1); box-shadow: inset 0 0 0 1px rgba(184, 50, 42, .35); }
.cb-pips { display: flex; gap: 3px; flex-wrap: wrap; max-width: 92px; }
.cb-pips i { width: 12px; height: 12px; border-radius: 3px; transform: rotate(45deg); background: rgba(27, 26, 23, .15); }
.cb-pips i.on { background: linear-gradient(135deg, #e0b552, #b8322a); }
.cb-pips i.extra { background: linear-gradient(135deg, #7fd8b0, #2f7d5b); }
.cb-txt { flex: 1; min-width: 0; } .cb-txt b { display: block; font-size: 13px; } .cb-txt small { font-size: 11px; color: var(--ink-soft); }
.cb-buy { flex: none; padding: 6px 12px; display: flex; flex-direction: column; align-items: center; line-height: 1.2; }
.cb-buy small { font-size: 11px; }
.oc-go.no-charge { filter: grayscale(.7); opacity: .75; }
.turn-rule { cursor: pointer; }
/* 선공 안내 */
.duel-guide h3 { text-align: center; }
.dg-coins { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 8px 0 12px; }
.dg-coins > em { font-style: normal; font-size: 12px; color: var(--ink-soft); }
.dg-c { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.dg-c i { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-family: var(--font-hanja); font-weight: 900; font-size: 30px; color: #2a1d10; background: radial-gradient(circle at 40% 35%, #ffe9a8, #c9a24a 60%, #7a5a1c); box-shadow: 0 0 0 3px #7a5a1c; }
.dg-c.second i { background: radial-gradient(circle at 40% 35%, #e6ebf0, #8f99a3 60%, #4e565e); box-shadow: 0 0 0 3px #4e565e; }
.dg-c small { font-size: 11.5px; color: var(--ink-soft); }
.dg-c.first small { color: #b8322a; } .dg-c.second small { color: #1f7a4a; }

/* ── 江 · 강호 채팅 (본거지 아래 한 줄 + 채팅 창) ── */
.chat-bar { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 10px; border: 0; border-top: 1px solid rgba(201, 162, 74, .45); background: linear-gradient(180deg, #2a241c, #221d17); color: #efe3c4; font: inherit; text-align: left; cursor: pointer; }
.chat-bar .cb-line { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.chat-bar .cb-line small { font-size: 10px; color: #b9a982; }
.chat-bar .cb-line b { font-weight: 500; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-bar .cb-line b em { font-style: normal; font-weight: 800; color: #f1d489; margin-right: 4px; }
.cb-ch { flex: none; width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-style: normal; font-family: var(--font-hanja); font-weight: 900; font-size: 15px; color: #2a1d10; background: linear-gradient(180deg, #f1d489, #c9a24a); }
.cb-new { flex: none; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #e0452f; color: #fff; font-style: normal; font-size: 10.5px; font-weight: 900; line-height: 18px; text-align: center; }
.cb-open { flex: none; color: #b9a982; font-size: 12px; }
.chat-modal { align-items: flex-end; }
.chat-sheet { display: flex; flex-direction: column; width: 100%; max-width: 560px; height: min(78vh, 640px); padding: 10px 12px calc(var(--safe-b, 0px) + 10px); border-radius: 18px 18px 0 0; }
.ch-head { display: flex; align-items: center; gap: 8px; padding-bottom: 8px; border-bottom: 1px solid rgba(27, 26, 23, .12); }
.ch-head b { font-size: 16px; } .ch-head small { flex: 1; font-size: 11.5px; color: var(--ink-soft); }
.ch-x { border: 0; background: none; font-size: 18px; color: var(--ink-soft); cursor: pointer; padding: 4px 8px; }
.ch-list { flex: 1; min-height: 0; overflow-y: auto; padding: 8px 2px; display: flex; flex-direction: column; gap: 6px; overscroll-behavior: contain; }
.ch-day { align-self: center; margin: 6px 0 2px; padding: 1px 10px; border-radius: 10px; background: rgba(27, 26, 23, .07); font-size: 11px; color: var(--ink-soft); }
.ch-msg { align-self: flex-start; max-width: 84%; display: flex; flex-direction: column; gap: 1px; cursor: pointer; }
.ch-msg .ch-who { font-size: 11.5px; font-weight: 800; color: #7a5a1c; }
.ch-msg .ch-text { padding: 6px 10px; border-radius: 4px 12px 12px 12px; background: rgba(255, 252, 244, .95); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); font-size: 14px; line-height: 1.4; word-break: break-all; }
.ch-msg small { font-size: 10px; color: var(--ink-soft); }
.ch-msg.mine { align-self: flex-end; align-items: flex-end; cursor: default; }
.ch-msg.mine .ch-who { display: none; }
.ch-msg.mine .ch-text { border-radius: 12px 4px 12px 12px; background: linear-gradient(180deg, #f6e2a8, #e9cc7a); }
.ch-rule { margin: 4px 0 6px; font-size: 11px; color: var(--ink-soft); text-align: center; }
.ch-form { display: flex; align-items: center; gap: 6px; }
.ch-form .text-in { flex: 1; min-width: 0; }
.ch-form .ch-count { flex: none; font-size: 10.5px; color: var(--ink-soft); }
.ch-form .btn { flex: none; padding: 8px 14px; }
.chat-sheet { max-height: none; overflow: hidden; box-sizing: border-box; }
.ch-head { flex: none; flex-wrap: nowrap; }
.ch-head small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.ch-head b { white-space: nowrap; }
.chat-sheet { padding: 20px 16px calc(var(--safe-b, 0px) + 14px); }
/* 계정 삭제 · 약관 링크 · 새 판 알림 */
.acc-del { display: block; margin: 14px auto 0; border: 0; background: none; color: #b8322a; font: inherit; font-size: 12.5px; text-decoration: underline; cursor: pointer; }
.login-terms a, .legal-row a { color: inherit; text-decoration: underline; }
.update-toast { position: fixed; left: 50%; bottom: calc(var(--safe-b, 0px) + 86px); transform: translateX(-50%); z-index: 200; display: flex; align-items: center; gap: 8px; padding: 9px 14px; border: 1px solid #c9a24a; border-radius: 22px; background: #221d17; color: #efe3c4; font: inherit; font-size: 13px; box-shadow: 0 6px 18px rgba(0, 0, 0, .35); cursor: pointer; }
.update-toast i { font-style: normal; font-family: var(--font-hanja); font-weight: 900; color: #f1d489; }
.update-toast small { color: #b9a982; }
.login-start { display: block; width: min(280px, 80%); margin: 6px auto 2px; font-size: 18px; padding: 14px 0; }
/* 클라우드 저장 */
.cloud-row { display: flex; align-items: center; gap: 10px; margin: 10px 0 4px; padding: 8px 10px; border-radius: 12px; background: rgba(45, 109, 122, .1); }
.cloud-row > i { flex: none; width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; font-style: normal; font-family: var(--font-hanja); font-weight: 900; color: #fff; background: #2d6d7a; }
.cloud-row span { flex: 1; min-width: 0; } .cloud-row b { display: block; font-size: 13px; } .cloud-row small { font-size: 11.5px; color: var(--ink-soft); }
.cloud-picks { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.cloud-pick { display: flex; flex-direction: column; gap: 2px; text-align: left; padding: 12px 14px; border-radius: 14px; border: 2px solid rgba(27, 26, 23, .15); background: rgba(255, 252, 244, .9); font: inherit; color: var(--ink); cursor: pointer; }
.cloud-pick b { font-size: 15px; } .cloud-pick span { font-size: 12.5px; } .cloud-pick small { font-size: 11px; color: var(--ink-soft); }
.cloud-pick:hover, .cloud-pick:focus { border-color: #c9a24a; }
/* ── 채팅 창 (메신저형, 2026-10-12) ── */
.chat-view { position: fixed; left: 0; right: 0; top: 0; height: 100dvh; z-index: 300; display: flex; flex-direction: column; max-width: 640px; margin: 0 auto; background: linear-gradient(180deg, #efe4cc, #e6d8b8); color: var(--ink); overscroll-behavior: contain; }
.cv-head { flex: none; display: flex; align-items: center; gap: 8px; padding: calc(env(safe-area-inset-top, 0px) + 8px) 10px 8px 4px; background: #221d17; color: #efe3c4; box-shadow: 0 2px 8px rgba(0, 0, 0, .2); }
.cv-back { border: 0; background: none; color: #f1d489; font-size: 30px; line-height: 1; padding: 0 8px 4px; cursor: pointer; }
.cv-title { display: flex; flex-direction: column; min-width: 0; }
.cv-title b { font-size: 16px; } .cv-title small { font-size: 11px; color: #b9a982; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-view .ch-list { flex: 1; min-height: 0; overflow-y: auto; padding: 10px 12px 8px; display: flex; flex-direction: column; gap: 3px; -webkit-overflow-scrolling: touch; }
.chat-view .ch-day { align-self: center; margin: 10px 0 6px; padding: 2px 12px; border-radius: 10px; background: rgba(27, 26, 23, .1); font-size: 11px; color: var(--ink-soft); }
.chat-view .ch-empty { margin: auto; color: var(--ink-soft); font-size: 13px; }
.chat-view .ch-msg { align-self: flex-start; max-width: 82%; display: flex; flex-direction: column; gap: 2px; margin-top: 6px; cursor: pointer; }
.chat-view .ch-msg.cont { margin-top: 0; }
.chat-view .ch-msg .ch-who { font-size: 12px; font-weight: 800; color: #7a5a1c; padding-left: 4px; }
.chat-view .cm-row { display: flex; align-items: flex-end; gap: 5px; }
.chat-view .ch-msg .ch-text { padding: 7px 11px; border-radius: 4px 14px 14px 14px; background: #fffdf7; box-shadow: 0 1px 1px rgba(0, 0, 0, .08); font-size: 15px; line-height: 1.45; white-space: pre-wrap; word-break: break-word; }
.chat-view .ch-msg.cont .ch-text { border-radius: 14px; }
.chat-view .ch-msg small { flex: none; font-size: 10px; color: var(--ink-soft); padding-bottom: 2px; }
.chat-view .ch-msg.mine { align-self: flex-end; align-items: flex-end; cursor: default; }
.chat-view .ch-msg.mine .cm-row { flex-direction: row-reverse; }
.chat-view .ch-msg.mine .ch-text { border-radius: 14px 4px 14px 14px; background: #f3d77f; }
.chat-view .ch-msg.mine.cont .ch-text { border-radius: 14px; }
.ch-acts { display: flex; gap: 6px; padding: 2px 0 0 4px; }
.ch-acts button { border: 1px solid rgba(27, 26, 23, .25); border-radius: 12px; background: #fffdf7; padding: 2px 12px; font: inherit; font-size: 12px; cursor: pointer; }
.ch-acts button[data-rep] { color: #b8322a; border-color: rgba(184, 50, 42, .4); }
.cv-newmsg { position: absolute; left: 50%; bottom: 72px; transform: translateX(-50%); border: 0; border-radius: 16px; padding: 6px 14px; background: #221d17; color: #f1d489; font: inherit; font-size: 12.5px; box-shadow: 0 4px 12px rgba(0, 0, 0, .25); cursor: pointer; }
.cv-toast { position: absolute; left: 12px; right: 12px; bottom: 70px; padding: 8px 12px; border-radius: 12px; background: rgba(34, 29, 23, .92); color: #fff4d8; font-size: 13px; text-align: center; }
.cv-compose { flex: none; display: flex; align-items: flex-end; gap: 8px; padding: 8px 10px calc(env(safe-area-inset-bottom, 0px) + 8px); background: #fbf6ea; border-top: 1px solid rgba(27, 26, 23, .12); }
.cv-compose textarea { flex: 1; min-width: 0; resize: none; border: 1px solid rgba(27, 26, 23, .2); border-radius: 20px; padding: 9px 14px; font: inherit; font-size: 16px; line-height: 1.35; max-height: 104px; background: #fff; color: var(--ink); outline: none; }
.cv-compose textarea:focus { border-color: #c9a24a; box-shadow: 0 0 0 2px rgba(201, 162, 74, .25); }
.cv-count { position: absolute; right: 64px; bottom: calc(env(safe-area-inset-bottom, 0px) + 50px); font-size: 10.5px; color: var(--ink-soft); }
.cv-send { flex: none; width: 40px; height: 40px; border: 0; border-radius: 50%; display: grid; place-items: center; background: #b8322a; color: #fff; cursor: pointer; transition: transform .1s, opacity .1s; }
.cv-send svg { width: 20px; height: 20px; margin-left: 2px; }
.cv-send:disabled { opacity: .35; cursor: default; }
.cv-send:not(:disabled):active { transform: scale(.92); }
@media (prefers-color-scheme: dark) { .chat-view .ch-msg .ch-text { color: #1b1a17; } }
.chat-view .ch-list > :first-child { margin-top: auto; }
.rk-refresh { margin: 2px 2px 8px; font-size: 11.5px; color: var(--ink-soft); } .rk-refresh b { color: var(--ink); }
