:root {
  --bg: #0d0f12;
  --bg-2: #101318;
  --surface: #161a20;
  --surface-2: #1b2028;
  --surface-3: #212733;
  --border: #262c36;
  --border-soft: #1e242d;
  --text: #e6edf3;
  --muted: #8b949e;
  --dim: #5c6672;
  --hp: #e5534b;
  --hp-dark: #7a2a27;
  --xp: #3fb950;
  --xp-dark: #1f5c2c;
  --mp: #a371f7;
  --gold: #d29922;
  --accent: #e5534b;
  --radius: 14px;
  --radius-sm: 10px;
  --mono: ui-monospace, "Roboto Mono", "JetBrains Mono", "SFMono-Regular", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; height: 100%; }

body {
  background: radial-gradient(1200px 600px at 50% -10%, #17202b 0%, var(--bg) 55%) fixed;
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.45;
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
}

button { font-family: inherit; color: inherit; }
.tabnum { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.gold { color: var(--gold); }
.xp { color: var(--xp); }
.mp { color: var(--mp); }
.red { color: var(--hp); }
.icon {
  width: 22px; height: 22px; flex: 0 0 auto;
  fill: none; stroke: currentColor; stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round;
}
.icon-sm { width: 16px; height: 16px; stroke-width: 1.8; }
.icon-lg { width: 28px; height: 28px; }

/* ---------- Shell ---------- */
.app {
  position: relative;
  width: 100%;
  max-width: 520px;
  min-height: 100dvh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, rgba(22, 26, 32, 0.35), rgba(13, 15, 18, 0) 220px);
  border-left: 1px solid transparent;
  border-right: 1px solid transparent;
}
@media (min-width: 700px) {
  .app {
    border-left: 1px solid var(--border-soft);
    border-right: 1px solid var(--border-soft);
    box-shadow: 0 0 80px rgba(0, 0, 0, 0.55);
    min-height: 100dvh;
  }
  body { background: radial-gradient(900px 500px at 50% 0%, #141b24 0%, #08090b 70%) fixed; }
}

.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  padding: calc(10px + var(--safe-top)) 16px 10px;
  background: rgba(13, 15, 18, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-soft);
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-mark { width: 30px; height: 30px; color: var(--gold); }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.brand-title { font-size: 13px; font-weight: 700; letter-spacing: 0.18em; }
.brand-sub { font-size: 10.5px; color: var(--dim); letter-spacing: 0.08em; text-transform: uppercase; }
.wallet { display: flex; gap: 8px; }
.wallet-item {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 9px; border-radius: 9px;
  background: var(--surface); border: 1px solid var(--border);
  font-size: 12.5px; font-weight: 600;
}
.wallet-item .icon { color: var(--gold); }
.wallet-mp .icon { color: var(--mp); }
.wallet-mp { opacity: 0.55; transition: opacity 0.25s; }
.wallet-mp.on { opacity: 1; }

/* ---------- Active action bar ---------- */
.active-bar {
  position: sticky; top: 57px; z-index: 25;
  padding: 10px 16px 12px;
  background: rgba(17, 20, 25, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-soft);
}
.active-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.active-icon {
  width: 34px; height: 34px; border-radius: 9px;
  display: grid; place-items: center;
  background: var(--surface-2); border: 1px solid var(--border);
}
.active-name { font-size: 13.5px; font-weight: 600; line-height: 1.2; }
.active-meta { font-size: 11.5px; color: var(--muted); }
.active-time { margin-left: auto; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.bar {
  height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden;
}
.bar > i {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--xp-dark), var(--xp));
  border-radius: 99px; transition: width 0.12s linear;
}
.bar.hp > i { background: linear-gradient(90deg, var(--hp-dark), var(--hp)); }
.bar.mpbar > i { background: linear-gradient(90deg, #4c2d8a, var(--mp)); }
.bar.gold > i { background: linear-gradient(90deg, #6b4a0d, var(--gold)); }

/* ---------- Main ---------- */
.view {
  flex: 1;
  padding: 14px 16px calc(96px + var(--safe-bottom));
  animation: fade 0.18s ease;
}
@keyframes fade { from { opacity: 0.4; transform: translateY(3px); } to { opacity: 1; transform: none; } }

.section-title {
  display: flex; align-items: baseline; justify-content: space-between;
  margin: 18px 2px 10px;
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim);
  font-weight: 700;
}
.section-title:first-child { margin-top: 2px; }

.card {
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
}
.card + .card { margin-top: 10px; }
.card-title { font-size: 14px; font-weight: 650; }
.card-sub { font-size: 12px; color: var(--muted); }

.hero {
  position: relative; overflow: hidden;
  padding: 16px;
}
.hero::after {
  content: ""; position: absolute; inset: -40% -20% auto auto; width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(229, 83, 75, 0.16), transparent 65%);
  pointer-events: none;
}
.hero-level { display: flex; align-items: baseline; gap: 8px; }
.hero-level b { font-family: var(--mono); font-size: 30px; font-weight: 600; letter-spacing: -0.03em; }
.hero-level span { font-size: 12px; color: var(--muted); }
.hero-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.stat { background: rgba(255, 255, 255, 0.02); border: 1px solid var(--border-soft); border-radius: 10px; padding: 8px 10px; }
.stat b { display: block; font-family: var(--mono); font-size: 16px; font-weight: 600; }
.stat span { font-size: 10.5px; color: var(--dim); text-transform: uppercase; letter-spacing: 0.08em; }

/* ---------- Skill list ---------- */
.skill-card {
  display: flex; align-items: center; gap: 12px;
  width: 100%; text-align: left;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 9px;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.12s, background 0.15s;
}
.skill-card:active { transform: scale(0.992); }
.skill-card.active { border-color: rgba(63, 185, 80, 0.45); background: linear-gradient(180deg, #18231c, var(--surface)); }
.skill-icon {
  width: 42px; height: 42px; border-radius: 11px;
  display: grid; place-items: center;
  background: var(--surface-3); border: 1px solid var(--border);
  color: var(--accent);
  flex: 0 0 auto;
}
.skill-body { flex: 1; min-width: 0; }
.skill-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.skill-name { font-size: 14px; font-weight: 650; }
.skill-lvl { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.skill-lvl b { color: var(--text); font-weight: 600; }
.skill-xp { margin-top: 7px; }
.skill-note { display: flex; justify-content: space-between; margin-top: 5px; font-size: 11px; color: var(--dim); }
.skill-note .do { color: var(--muted); }
.skill-chev { color: var(--dim); margin-left: 2px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 16px;
  border-radius: 11px; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text);
  font-size: 14px; font-weight: 650; cursor: pointer;
  transition: transform 0.1s, filter 0.15s, background 0.15s;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: linear-gradient(180deg, #e8675f, #c9413a); border-color: #f08079; color: #fff; }
.btn-gold { background: linear-gradient(180deg, #d9a62e, #a97c10); border-color: #e9bb4a; color: #151004; }
.btn-mp { background: linear-gradient(180deg, #8f5ef0, #6f43c2); border-color: #a97ef7; color: #fff; }
.btn-ghost { background: transparent; }
.btn-danger { background: rgba(229, 83, 75, 0.12); border-color: rgba(229, 83, 75, 0.4); color: #ff8f88; }
.btn-block { width: 100%; }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: 12.5px; border-radius: 9px; }
.btn[disabled] { opacity: 0.42; pointer-events: none; }

/* ---------- Actions sheet ---------- */
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(5, 6, 8, 0.6);
  backdrop-filter: blur(3px);
  animation: fade 0.15s ease;
}
.sheet {
  position: fixed; left: 50%; bottom: 0; z-index: 61;
  width: 100%; max-width: 520px; transform: translateX(-50%);
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  border-radius: 20px 20px 0 0;
  max-height: 86dvh;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow);
  animation: sheetUp 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
  padding-bottom: var(--safe-bottom);
}
@keyframes sheetUp { from { transform: translate(-50%, 30px); opacity: 0.6; } to { transform: translate(-50%, 0); opacity: 1; } }
.sheet-head {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; border-bottom: 1px solid var(--border-soft);
}
.sheet-title { font-size: 16px; font-weight: 700; }
.sheet-sub { font-size: 12px; color: var(--muted); }
.sheet-close {
  margin-left: auto; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; background: var(--surface-2);
  border: 1px solid var(--border); color: var(--muted); cursor: pointer;
}
.sheet-body { overflow-y: auto; padding: 12px 16px 20px; -webkit-overflow-scrolling: touch; }
.sheet-handle { width: 36px; height: 4px; border-radius: 99px; background: var(--surface-3); margin: 8px auto 0; }

.action-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px; border-radius: 12px;
  border: 1px solid var(--border-soft);
  background: var(--surface);
  margin-bottom: 8px;
}
.action-row.locked { opacity: 0.5; }
.action-row.running { border-color: rgba(63, 185, 80, 0.5); background: linear-gradient(180deg, #16231b, var(--surface)); }
.action-main { flex: 1; min-width: 0; }
.action-name { font-size: 13.5px; font-weight: 650; }
.action-detail { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.action-run { margin-top: 5px; font-size: 11px; color: var(--xp); font-weight: 600; letter-spacing: 0.03em; }
.action-req { font-size: 11px; color: var(--dim); display: flex; align-items: center; gap: 4px; }

/* ---------- Combat ---------- */
.arena {
  position: relative; overflow: hidden;
  background:
    radial-gradient(500px 200px at 50% -30%, rgba(229, 83, 75, 0.18), transparent 70%),
    linear-gradient(180deg, #1a1d24, #12151a);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
}
.arena-vs { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.fighter { flex: 1; min-width: 0; }
.fighter.right { text-align: right; }
.fighter-name { font-size: 14px; font-weight: 700; }
.fighter-lvl { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.hp-line { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 8px 0 5px; font-family: var(--mono); font-size: 12px; }
.fighter.right .hp-line { flex-direction: row-reverse; }
.enemy-mark {
  width: 54px; height: 54px; border-radius: 14px;
  background: radial-gradient(circle at 50% 35%, #3a2226, #1a1114);
  border: 1px solid #4a2a2c;
  display: grid; place-items: center; color: #ff8f88;
  margin: 0 auto;
}
.arena-log {
  margin-top: 14px; border-top: 1px solid var(--border-soft); padding-top: 10px;
  font-family: var(--mono); font-size: 11.5px; line-height: 1.65;
  color: var(--muted);
  max-height: 112px; overflow: hidden;
  display: flex; flex-direction: column-reverse;
}
.arena-log div { animation: fade 0.2s ease; }
.arena-log .hit { color: #d8dee6; }
.arena-log .crit { color: var(--gold); }
.arena-log .hurt { color: #ff9a93; }
.arena-log .kill { color: #7ee08f; }
.arena-log .loot { color: #c9a227; }
.arena-log .relic { color: var(--mp); }
.arena-log .system { color: var(--dim); }
.arena-log .death { color: var(--hp); font-weight: 700; }
.arena-log .eat { color: #8fd3b6; }

.zone-row {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 13px 14px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border-soft);
  margin-bottom: 8px; cursor: pointer; text-align: left;
}
.zone-row.on { border-color: rgba(229, 83, 75, 0.5); background: linear-gradient(90deg, rgba(229, 83, 75, 0.09), var(--surface)); }
.zone-row.locked { opacity: 0.5; }
.zone-icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-3); border: 1px solid var(--border); color: var(--accent); }
.zone-main { flex: 1; }
.zone-name { display: block; font-size: 13.5px; font-weight: 650; }
.zone-sub { display: block; font-size: 11.5px; color: var(--muted); }

.slot-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 7px; margin-bottom: 4px; }
.slot {
  aspect-ratio: 1 / 1; border-radius: 11px;
  border: 1px dashed var(--border);
  background: var(--surface);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--dim); font-size: 9px; letter-spacing: 0.04em; text-transform: uppercase;
  cursor: pointer; padding: 2px;
}
.slot.filled { border-style: solid; border-color: var(--border); color: var(--text); background: var(--surface-2); }
.slot .icon { width: 18px; height: 18px; }
.slot.relic-slot.filled { border-color: rgba(163, 113, 247, 0.5); color: var(--mp); }

/* ---------- Inventory ---------- */
.inv-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.inv-cell {
  position: relative; aspect-ratio: 1 / 1; border-radius: 11px;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border-soft);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  cursor: pointer; padding: 4px;
  transition: border-color 0.15s;
}
.inv-cell:active { border-color: var(--border); }
.inv-cell .icon { width: 24px; height: 24px; }
.inv-cell .nm { font-size: 8.5px; color: var(--muted); text-align: center; line-height: 1.15; max-height: 20px; overflow: hidden; }
.inv-qty {
  position: absolute; right: 5px; top: 4px;
  font-family: var(--mono); font-size: 11px; font-weight: 600;
  color: var(--text);
}
.inv-rarity { position: absolute; left: 6px; top: 6px; width: 5px; height: 5px; border-radius: 50%; background: var(--dim); }
.inv-rarity.t2 { background: #6fa8dc; }
.inv-rarity.t3 { background: #3fb950; }
.inv-rarity.t4 { background: #a371f7; }
.inv-rarity.t5 { background: #d29922; }
.empty-note { text-align: center; color: var(--dim); font-size: 12.5px; padding: 28px 10px; }

/* ---------- Ascension ---------- */
.ascend-hero {
  text-align: center; padding: 24px 16px;
  background:
    radial-gradient(300px 160px at 50% 0%, rgba(163, 113, 247, 0.2), transparent 70%),
    linear-gradient(180deg, #191627, #12141a);
  border: 1px solid #2e2742; border-radius: 16px;
}
.ascend-mp { font-family: var(--mono); font-size: 40px; font-weight: 600; letter-spacing: -0.04em; color: var(--mp); line-height: 1; }
.ascend-cap { font-size: 11px; text-transform: uppercase; letter-spacing: 0.16em; color: var(--muted); margin-top: 6px; }

.mastery-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px; border-radius: 12px;
  border: 1px solid var(--border-soft); background: var(--surface);
  margin-bottom: 8px;
}
.mastery-main { flex: 1; }
.mastery-name { font-size: 13.5px; font-weight: 650; }
.mastery-desc { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.pips { display: flex; gap: 3px; margin-top: 6px; }
.pips i { width: 16px; height: 4px; border-radius: 99px; background: var(--surface-3); }
.pips i.on { background: var(--mp); }

.relic-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.relic-cell {
  padding: 12px 8px; border-radius: 12px; text-align: center;
  background: linear-gradient(180deg, #1b1728, var(--surface));
  border: 1px solid #2b2540;
}
.relic-cell .icon { color: var(--mp); }
.relic-cell .rn { font-size: 10.5px; font-weight: 650; margin-top: 5px; }
.relic-cell .rd { font-size: 9.5px; color: var(--muted); line-height: 1.3; margin-top: 2px; }

/* ---------- More / settings ---------- */
.list-row {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 14px; border-bottom: 1px solid var(--border-soft);
  background: var(--surface); cursor: pointer;
}
.list-row:first-child { border-radius: var(--radius) var(--radius) 0 0; }
.list-row:last-child { border-bottom: 0; border-radius: 0 0 var(--radius) var(--radius); }
.list-group { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin-bottom: 12px; }
.list-row .icon { color: var(--muted); }
.list-main { flex: 1; }
.list-title { font-size: 13.5px; font-weight: 600; }
.list-sub { font-size: 11.5px; color: var(--muted); }
.list-value { font-family: var(--mono); font-size: 13px; color: var(--muted); }

.switch { position: relative; width: 44px; height: 26px; border-radius: 99px; background: var(--surface-3); border: 1px solid var(--border); transition: background 0.15s; cursor: pointer; }
.switch i { position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: var(--muted); transition: transform 0.18s, background 0.18s; }
.switch.on { background: rgba(163, 113, 247, 0.35); border-color: rgba(163, 113, 247, 0.6); }
.switch.on i { transform: translateX(18px); background: var(--mp); }

.range { width: 100%; -webkit-appearance: none; appearance: none; height: 26px; background: transparent; }
.range::-webkit-slider-runnable-track { height: 6px; border-radius: 99px; background: var(--surface-3); border: 1px solid var(--border); }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: var(--hp); border: 2px solid #ff9a93; margin-top: -9px; }
.range::-moz-range-track { height: 6px; border-radius: 99px; background: var(--surface-3); }
.range::-moz-range-thumb { width: 20px; height: 20px; border: 2px solid #ff9a93; border-radius: 50%; background: var(--hp); }

.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.stat-box { background: var(--surface); border: 1px solid var(--border-soft); border-radius: 11px; padding: 11px 12px; }
.stat-box b { display: block; font-family: var(--mono); font-size: 17px; }
.stat-box span { font-size: 11px; color: var(--dim); }

/* ---------- Tabbar ---------- */
.tabbar {
  position: fixed; left: 50%; bottom: 0; z-index: 40;
  transform: translateX(-50%);
  width: 100%; max-width: 520px;
  display: grid; grid-template-columns: repeat(5, 1fr);
  padding: 6px 8px calc(6px + var(--safe-bottom));
  background: linear-gradient(180deg, rgba(13, 15, 18, 0.96), #0d0f12 46%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-soft);
}
.tab {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 7px 0 5px; border: 0; background: transparent;
  color: var(--dim); font-size: 10px; font-weight: 600; letter-spacing: 0.03em;
  cursor: pointer; border-radius: 10px;
  transition: color 0.15s;
}
.tab .icon { width: 21px; height: 21px; }
.tab.active { color: var(--text); }
.tab.active .icon { color: var(--hp); }
.tab:active { background: rgba(255, 255, 255, 0.03); }

/* ---------- Toast ---------- */
.toast-root {
  position: fixed; top: calc(64px + var(--safe-top)); left: 50%; transform: translateX(-50%);
  z-index: 80; display: flex; flex-direction: column; gap: 6px; align-items: center;
  width: min(92vw, 460px); pointer-events: none;
}
.toast {
  padding: 9px 14px; border-radius: 10px; font-size: 12.5px; font-weight: 600;
  background: rgba(27, 32, 40, 0.97); border: 1px solid var(--border);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  animation: toastIn 0.22s ease;
}
.toast.level { border-color: rgba(63, 185, 80, 0.5); color: #9be7a8; }
.toast.relic { border-color: rgba(163, 113, 247, 0.55); color: #c9a9ff; }
.toast.warn { border-color: rgba(210, 153, 34, 0.5); color: #e7c469; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ---------- Modal ---------- */
.modal-backdrop { position: fixed; inset: 0; z-index: 70; background: rgba(5, 6, 8, 0.65); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 20px; animation: fade 0.16s ease; }
.modal {
  width: 100%; max-width: 400px;
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: 18px; padding: 20px;
  box-shadow: var(--shadow);
  animation: sheetUp 0.2s ease;
}
.modal h2 { margin: 0 0 6px; font-size: 18px; letter-spacing: -0.01em; }
.modal p { margin: 0 0 16px; color: var(--muted); font-size: 13px; }
.modal-actions { display: flex; gap: 8px; }
.modal-actions .btn { flex: 1; }

.offline-list { margin: 12px 0 16px; display: grid; gap: 6px; }
.offline-line { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.offline-line b { font-family: var(--mono); font-weight: 600; }

/* ---------- Item detail ---------- */
.item-head { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.item-badge { width: 58px; height: 58px; border-radius: 14px; display: grid; place-items: center; background: var(--surface-3); border: 1px solid var(--border); }
.item-badge .icon { width: 30px; height: 30px; }
.item-name { font-size: 17px; font-weight: 700; }
.item-kind { font-size: 11.5px; color: var(--muted); text-transform: capitalize; }
.kv { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border-soft); font-size: 13px; }
.kv:last-child { border-bottom: 0; }
.kv b { font-family: var(--mono); font-weight: 600; }
.item-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.item-actions .btn.wide { grid-column: span 2; }
.desc { color: var(--muted); font-size: 12.5px; line-height: 1.5; }

.pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 99px; font-size: 10.5px; font-weight: 650; letter-spacing: 0.03em; background: var(--surface-3); color: var(--muted); }
.pill.green { background: rgba(63, 185, 80, 0.14); color: #7ee08f; }
.pill.purple { background: rgba(163, 113, 247, 0.15); color: #c9a9ff; }
.pill.gold { background: rgba(210, 153, 34, 0.14); color: #e7c469; }

.progress-note { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); font-family: var(--mono); margin-top: 6px; }

.split { display: flex; gap: 8px; }
.split > * { flex: 1; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
