.hub.is-board .stack-left,
.hub.is-board .avatar-rail,
.hub.is-market .stack-left,
.hub.is-market .avatar-rail,
.hub.is-pass .stack-left,
.hub.is-pass .avatar-rail {
  display: none;
}

.hub.is-board .hub-stage,
.hub.is-market .hub-stage,
.hub.is-pass .hub-stage {
  grid-template-columns: minmax(0, 1fr);
  padding: 0 14px 8px 6px;
}

.tab-panel[data-panel="board"].is-on,
.tab-panel[data-panel="market"].is-on,
.tab-panel[data-panel="pass"].is-on {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
}

#board-root,
#market-root {
  flex: 1;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.lb-wrap,
.mk-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  height: 100%;
  min-height: 0;
}

.hud-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(3, 252, 182, 0.22);
}

.hud-top h2 {
  font-family: var(--font-brand);
  font-size: 28px;
  letter-spacing: 0.14em;
  line-height: 1;
}

.hud-top p {
  color: var(--mute);
  font-size: 12px;
  margin-top: 4px;
}

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

.hud-tools input,
.hud-tools select {
  height: 32px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(6, 8, 12, 0.7);
  color: #fff;
  padding: 0 8px;
  font-size: 12px;
}

.hud-tools button,
.chip-btn {
  height: 32px;
  border: 1px solid rgba(3, 252, 182, 0.35);
  border-radius: 8px;
  background: transparent;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0 10px;
  cursor: pointer;
}

.hud-tools button.is-on,
.chip-btn.is-on {
  background: var(--accent);
  color: #111;
}

.lb-split {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr) 220px;
  gap: 10px;
  min-height: 0;
  flex: 1;
}

.lb-heat {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
}

.heat-card {
  position: relative;
  flex: 1;
  min-height: 90px;
  padding: 12px 12px 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    repeating-linear-gradient(
      -18deg,
      rgba(3, 252, 182, 0.05) 0 8px,
      transparent 8px 16px
    ),
    rgba(10, 10, 14, 0.55);
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 0 100%);
}

.heat-card.is-empty { opacity: 0.45; }
.heat-card .place {
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--accent);
}
.heat-card .who {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}
.heat-card img,
.lb-av {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(3, 252, 182, 0.2);
}
.heat-card h3 { font-size: 16px; }
.heat-card .hrs { font-family: var(--font-brand); font-size: 22px; }

.lb-table {
  min-height: 0;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(8, 8, 12, 0.55);
}

.lb-line {
  display: grid;
  grid-template-columns: 48px 36px minmax(0, 1fr) 88px 70px 28px;
  gap: 6px;
  align-items: center;
  padding: 7px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 12px;
  cursor: pointer;
}
.lb-line:hover { background: rgba(3, 252, 182, 0.08); }
.lb-line.is-me { outline: 1px solid var(--accent); }
.lb-line.is-watch { background: rgba(255, 210, 70, 0.08); }
.lb-line .rk { font-variant-numeric: tabular-nums; color: var(--accent); font-weight: 800; }
.lb-line button {
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
}

.lb-side {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  overflow: auto;
}

.side-box {
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
}
.side-box h4 {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mute);
  margin-bottom: 8px;
}
.side-box p, .side-box li { font-size: 12px; color: rgba(255,255,255,.8); line-height: 1.45; }
.side-box ul { padding-left: 16px; }

.mk-tabs { display: flex; gap: 6px; }
.mk-body {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 10px;
  min-height: 0;
  flex: 1;
}
.mk-rail {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  overflow: auto;
}
.mk-panel {
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(8, 10, 14, 0.6);
}
.mk-panel h3 {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mute);
  margin-bottom: 8px;
}
.mk-panel .row { display: flex; flex-wrap: wrap; gap: 6px; }
.mk-panel input,
.mk-panel select {
  flex: 1;
  min-width: 70px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(6, 8, 12, 0.7);
  color: #fff;
  padding: 0 8px;
}
.mk-panel button {
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #111;
  font-weight: 800;
  padding: 0 10px;
  cursor: pointer;
}
.mk-redeem p {
  font-size: 12px;
  color: var(--mute);
  line-height: 1.4;
  margin-bottom: 8px;
}
.term-row button.ghost {
  background: transparent;
  border: 1px solid rgba(255,255,255,.2);
  color: #fff;
  font-weight: 600;
}

.term-list {
  min-height: 0;
  overflow: auto;
  font-family: ui-monospace, Consolas, monospace;
  border: 1px solid rgba(3, 252, 182, 0.18);
  background:
    linear-gradient(180deg, rgba(3, 252, 182, 0.05), transparent 48px),
    rgba(4, 6, 8, 0.72);
}
.lb-wrap,
.mk-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 4px;
}

.hud-top,
.heat-card,
.lb-table,
.side-box,
.mk-panel,
.term-list {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(28px) saturate(180%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.hud-top {
  padding: 12px 14px;
  border-radius: 20px;
}

.heat-card {
  clip-path: none;
  border-radius: 22px;
}

.lb-table,
.term-list { border-radius: 18px; }

.term-row {
  display: grid;
  grid-template-columns: 48px 64px minmax(0, 1fr) 72px 72px;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12px;
}

.item-shot {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: contain;
  background: rgba(0, 0, 0, 0.25);
}

.item-shot.ph { display: block; }

.cat-shots { display: flex; flex-wrap: wrap; gap: 6px; }
.cat-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 11px;
}
.cat-chip img { width: 18px; height: 18px; object-fit: contain; }
.term-row .sku { color: var(--accent); letter-spacing: 0.08em; }
.term-row button {
  height: 26px;
  border: 0;
  border-radius: 6px;
  background: #fff;
  color: #111;
  font-weight: 700;
  cursor: pointer;
}
.term-empty { padding: 24px; color: var(--mute); }

.ow-box { display: none !important; }

.ban-veil {
  position: absolute;
  inset: 0;
  z-index: 40;
  background: rgba(8, 6, 10, 0.82);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 24px;
}
.ban-veil h2 { color: #ff5b7a; }

.hub-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(3, 252, 182, 0.2);
  border: 1px solid rgba(3, 252, 182, 0.4);
}

.dash-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.dash-chips button {
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 12px;
  cursor: pointer;
}
.dash-ops {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr 1fr;
  gap: 10px;
}
.dash-ops form,
.dash-ops .box {
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(8, 8, 12, 0.4);
}
.dash-ops label {
  display: block;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mute);
  margin-bottom: 6px;
}
.dash-ops input {
  width: 100%;
  height: 32px;
  margin-bottom: 6px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(6, 8, 12, 0.6);
  color: #fff;
  padding: 0 8px;
}
.dash-ops button {
  height: 30px;
  margin: 0 4px 4px 0;
  border: 1px solid rgba(3, 252, 182, 0.35);
  background: transparent;
  color: var(--accent);
  border-radius: 8px;
  padding: 0 10px;
  font-size: 11px;
  cursor: pointer;
}
.dash-ops ul { padding-left: 16px; font-size: 12px; color: var(--mute); line-height: 1.5; }

.card-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: radial-gradient(120% 80% at 50% 110%, #2c2a3a 0%, #16151e 48%, #0e0d14 100%);
  color: #f4f7fb;
  font-family: "Segoe UI", sans-serif;
  perspective: 1400px;
}
.pcard-scene {
  width: min(380px, 86vw);
  height: min(540px, 86vh);
  perspective: 1400px;
}
.pcard-flip {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  cursor: pointer;
}
.pcard-scene.is-flip .pcard-flip { transform: rotateY(180deg); }
.pcard-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 28px 60px rgba(0,0,0,.45), 0 0 0 1px rgba(3,252,182,.2);
}
.pcard-front {
  padding: 28px 24px;
  background:
    linear-gradient(160deg, rgba(3,252,182,.16), transparent 42%),
    linear-gradient(180deg, #1a1924, #101018);
  display: flex;
  flex-direction: column;
}
.pcard-back {
  transform: rotateY(180deg);
  background: #101018;
}
.pcard-back img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pcard-kicker { color: #03fcb6; letter-spacing: 0.22em; font-size: 11px; text-transform: uppercase; }
.pcard-av { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; margin: 18px 0 10px; border: 2px solid rgba(3,252,182,.4); }
.pcard-front h1 { margin: 0 0 4px; font-size: 30px; letter-spacing: -0.03em; }
.pcard-hub { opacity: 0.6; margin-bottom: 18px; }
.pcard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: auto; }
.pcard-grid div { background: rgba(255,255,255,.05); border-radius: 14px; padding: 12px; border: 1px solid rgba(255,255,255,.08); }
.pcard-grid span { display: block; font-size: 10px; opacity: 0.55; text-transform: uppercase; letter-spacing: .12em; }
.pcard-note { margin-top: 16px; font-size: 12px; opacity: 0.5; }
.pcard-hint { margin-top: 10px; font-size: 11px; color: #03fcb6; letter-spacing: .12em; text-transform: uppercase; }
.pcard-back-link { display: inline-block; margin-top: 18px; color: #03fcb6; }

@media (max-width: 1100px) {
  .lb-split,
  .mk-body,
  .dash-ops { grid-template-columns: 1fr; }
}
