:root {
  --bg: #070912;
  --bg-soft: #0d1120;
  --panel: #121829;
  --panel-2: #161d31;
  --line: #232c44;
  --text: #e8edf6;
  --muted: #9aa6bd;
  --accent: #6b8bff;
  --accent-2: #c06bff;
  --good: #66d17a;
  --bad: #e2584a;
  --warn: #e7c14a;
  --radius: 14px;
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
  --glass-bg: rgba(14, 18, 32, 0.62);
  --glass-bg-strong: rgba(18, 24, 41, 0.78);
  --glass-border: rgba(255, 255, 255, 0.09);
  --glass-border-bright: rgba(255, 255, 255, 0.14);
  --glass-highlight: rgba(255, 255, 255, 0.06);
  --glass-blur: blur(18px) saturate(1.35);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  margin: 0;
  min-height: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(ellipse 70% 45% at 50% -15%, rgba(107, 139, 255, 0.07), transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Inter, sans-serif;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* Shared glass surfaces */
.panel,
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 var(--glass-highlight);
}
.glass-card {
  position: relative;
  overflow: hidden;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: calc(var(--radius) + 2px);
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 var(--glass-highlight);
  transition:
    border-color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}
.glass-card:hover {
  border-color: var(--glass-border-bright);
  transform: translateY(-2px);
  box-shadow:
    0 14px 40px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(107, 139, 255, 0.08),
    inset 0 1px 0 var(--glass-highlight);
}

/* ---- top bar ---- */
.topbar {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--glass-border);
  background: rgba(7, 9, 18, 0.72);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-weight: 800;
  letter-spacing: 0.14em;
}
.brand-home {
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  color: inherit;
  font: inherit;
  text-align: left;
  border-radius: 6px;
  transition: color 0.15s ease, opacity 0.15s ease;
}
.brand-home:hover {
  color: var(--text);
}
.brand-home:hover .brand-mark {
  color: var(--accent-bright, var(--accent));
}
.brand-home:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.brand-mark {
  color: var(--accent);
}
.brand-tag {
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 2px 6px;
  border-radius: 999px;
}

.steps {
  display: flex;
  gap: 8px;
  margin-left: auto;
}
.step {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.step:hover {
  color: var(--text);
  border-color: var(--accent);
}
.step.active {
  color: #fff;
  border-color: var(--accent);
  background: linear-gradient(180deg, rgba(107, 139, 255, 0.25), rgba(107, 139, 255, 0.08));
}
.step.locked {
  opacity: 0.4;
  cursor: not-allowed;
}

.engine-badge {
  font-size: 11px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 10px;
  font-variant-numeric: tabular-nums;
}

/* ---- layout ---- */
.app {
  flex: 1 0 auto;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px 24px 48px;
}
.app:has(.landing-guest, .landing-home) {
  padding-top: 0;
}

.footer {
  flex-shrink: 0;
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  padding: 20px 16px 24px;
  border-top: 1px solid var(--line);
  background: var(--bg);
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.footer-brand {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: lowercase;
  color: var(--text);
}
.footer-copy {
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--muted);
}

/* ---- boot ---- */
.boot {
  display: grid;
  place-items: center;
  gap: 16px;
  height: 50vh;
  color: var(--muted);
}
.boot.error {
  color: var(--bad);
}
.boot.error pre {
  max-width: 600px;
  white-space: pre-wrap;
  background: var(--panel);
  padding: 12px;
  border-radius: 8px;
  color: var(--muted);
}
.spinner {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 3px solid var(--line);
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---- buttons ---- */
.btn {
  font: inherit;
  border-radius: 10px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  cursor: pointer;
  transition: transform 0.08s ease, border-color 0.15s ease, background 0.15s ease;
}
.btn:hover {
  border-color: var(--accent);
}
.btn:active {
  transform: translateY(1px);
}
.btn.primary {
  background: linear-gradient(180deg, var(--accent), #4f6ef0);
  border-color: transparent;
  color: #fff;
  font-weight: 700;
}
.btn.primary[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}
.btn.ghost {
  background: transparent;
}
.btn.big {
  padding: 13px 22px;
  font-size: 16px;
}
.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 8px;
}

/* ---- landing ---- */
.landing {
  padding-top: 0;
}
.hero {
  display: grid;
  gap: 18px;
  max-width: 640px;
}
.hero-title {
  font-size: clamp(34px, 6vw, 56px);
  line-height: 1.12;
  margin: 0;
  letter-spacing: -0.02em;
  padding-bottom: 0.06em;
  overflow: visible;
  background: linear-gradient(120deg, #fff 30%, #b7c6ff 70%, #d8b6ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.55;
  margin: 0;
}
.hero-actions {
  display: flex;
  gap: 12px;
}
.seed-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}
.seed-label {
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--muted);
  text-transform: uppercase;
}
.seed-input {
  font: inherit;
  font-variant-numeric: tabular-nums;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 10px;
  padding: 9px 12px;
  width: 220px;
}
.seed-input:focus {
  outline: none;
  border-color: var(--accent);
}

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}
.fact {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}
.fact-title {
  font-weight: 700;
  margin-bottom: 6px;
}
.fact-body {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

/* ---- builder ---- */
.builder {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 22px;
  align-items: start;
}
@media (min-width: 901px) {
  .builder > .panel-head {
    grid-column: 1 / -1;
  }
  .builder > .builder-main {
    grid-column: 1;
    grid-row: 2;
  }
  .builder > .sidebar {
    grid-column: 2;
    grid-row: 2;
    align-self: start;
  }
}
@media (max-width: 900px) {
  .builder {
    grid-template-columns: 1fr;
  }
}
.panel-head h2 {
  margin: 0 0 4px;
}
.builder > .panel-head .hint {
  margin-bottom: 0;
}
.hint {
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 14px;
  line-height: 1.4;
}
.panel-subhead {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

.builder-main {
  overflow: visible;
  min-width: 0;
}

/* Board defines height; hand column (filters + hand) on the left. */
.builder-playfield {
  display: grid;
  grid-template-columns: minmax(268px, 36%) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  overflow: visible;
}

/* Hand left of board (3-wide), search row below. */
.builder .builder-playfield {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
.builder .builder-board-row {
  display: grid;
  grid-template-columns: minmax(248px, 34%) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  min-width: 0;
}
.builder .builder-hand-column {
  min-width: 0;
  min-height: 0;
}
.builder .hand-wrap.hand-panel {
  width: 100%;
}
.builder .hand-panel-surface {
  max-height: none;
  min-height: 0;
  overflow: hidden;
  height: 100%;
}
.builder .hand-scroll {
  min-height: 200px;
  max-height: none;
}
.builder .hand {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.builder .hand-filter-panel {
  width: 100%;
  padding: 8px 10px;
}
.builder .hand-filter-panel-inner {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.builder .hand-filter-search {
  flex: 1 1 200px;
  min-width: 0;
}
.builder .hand-filter-slot {
  flex: 1 1 100%;
}
.builder .hand-filter-chips {
  flex-wrap: wrap;
}
@media (max-width: 900px) {
  .builder .builder-board-row {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .builder .hand-scroll {
    min-height: min(40vh, 360px);
    max-height: min(52vh, 480px);
  }
}

.builder-hand-column {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  min-height: 0;
}

.hand-filter-panel {
  flex-shrink: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 10px 8px;
}
.hand-filter-panel-inner {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.hand-filter-search {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--bg) 70%, var(--panel));
  color: var(--text);
  font-size: 13px;
  padding: 8px 11px;
  outline: none;
}
.hand-filter-search::placeholder {
  color: var(--muted);
}
.hand-filter-search:focus {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 18%, transparent);
}

.board-area {
  min-width: 0;
  overflow: visible;
}

.board {
  display: grid;
  grid-template-columns: 28px repeat(3, minmax(118px, 1fr));
  gap: 14px;
  align-items: stretch;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 20px 32px;
  overflow: visible;
}
.builder .board,
.builder .hand {
  perspective: none;
}
.row-label {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  text-align: center;
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--muted);
  align-self: center;
}

.hand-wrap.hand-panel {
  width: 100%;
  min-width: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  margin: 0;
  overflow: visible;
  background: transparent;
  border: none;
  padding: 0;
}
.hand-panel-surface {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 10px 12px;
  overflow: visible;
}
.hand-wrap.hand-panel .panel-subhead {
  flex-shrink: 0;
  margin-bottom: 8px;
  padding: 0 4px;
}
.hand-panel-head {
  display: grid;
  gap: 6px;
  margin-bottom: 2px;
  flex-shrink: 0;
}
.hand-panel-headline {
  margin: 0;
}
.hand-filter-slot {
  min-width: 0;
}
.hand-filter-chips {
  gap: 6px;
}
.hand-filter-chip {
  font-size: 11px;
  padding: 5px 10px;
  letter-spacing: 0.02em;
}
.hand-filter-empty {
  margin: 0;
  padding: 12px 4px;
  min-width: 100%;
  text-align: center;
}
.hand-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px 8px 16px;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--line) 80%, transparent) transparent;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.hand-scroll .card-scene.card-draggable {
  touch-action: pan-y;
}
.board .card-scene.card-draggable,
.board-slot .card-scene.card-draggable {
  touch-action: none;
}
.builder.is-card-dragging .hand-scroll {
  overflow-y: hidden;
}
.builder.is-card-dragging .hand-scroll .card-scene {
  touch-action: none;
}
.hand-scroll::-webkit-scrollbar {
  width: 6px;
}
.hand-scroll::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--line) 80%, transparent);
  border-radius: 999px;
}
.hand {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 2px 0 4px;
  overflow: visible;
}
.hand .card-scene {
  flex-shrink: 0;
  width: 100%;
}
@media (max-width: 900px) {
  .card-scene.is-dragging {
    opacity: 0.5;
  }
  .card-ghost {
    z-index: 10050;
    filter: drop-shadow(0 18px 36px rgba(0, 0, 0, 0.75));
  }
  .card-ghost .card-inner {
    transform: rotateY(-2deg) rotateX(4deg) scale(1.1) !important;
    box-shadow:
      0 20px 48px rgba(0, 0, 0, 0.65),
      0 0 0 2px rgba(107, 139, 255, 0.35);
  }
  .board-slot.is-drop-target,
  .card-scene.empty.is-drop-target {
    box-shadow:
      0 0 0 3px rgba(74, 222, 128, 0.45) inset,
      0 0 28px rgba(74, 222, 128, 0.25);
  }
}

/* ---- physical 3D cards ---- */
.card-scene {
  position: relative;
  width: 100%;
  aspect-ratio: 5 / 7;
  min-height: 0;
  perspective: 900px;
  transform-style: preserve-3d;
  overflow: visible;
  cursor: grab;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}
/* Builder drag cards: flat, non-interactive face; .card-hit owns all pointer input. */
.card-scene.card-draggable {
  perspective: none;
  transform-style: flat;
  touch-action: none;
  isolation: isolate;
}
.card-scene.card-draggable .card-inner,
.card-scene.card-draggable .card-inner * {
  pointer-events: none !important;
}
.card-hit {
  position: absolute;
  inset: 0;
  z-index: 50;
  border-radius: 14px;
  pointer-events: auto;
  cursor: inherit;
  touch-action: none;
  /* Sub-pixel fill so every browser treats the full face as a hit target. */
  background: rgba(255, 255, 255, 0.001);
  -webkit-tap-highlight-color: transparent;
}
.card-scene.card-draggable .card-info {
  z-index: 60;
  pointer-events: none;
}
.card-scene * {
  user-select: none;
  -webkit-user-select: none;
}
.card-scene.is-hovered {
  z-index: 30;
}
.card-scene:active {
  cursor: grabbing;
}
.card-scene.is-dragging {
  opacity: 0.35;
}
.card-scene.is-used {
  opacity: 0.45;
  filter: saturate(0.7);
}
.card-scene.is-used .card-inner {
  transform: none !important;
}

.card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 14px;
  transform-style: preserve-3d;
  overflow: visible;
  transition: transform 0.14s ease-out, box-shadow 0.14s ease-out;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.1) inset,
    0 -2px 0 rgba(0, 0, 0, 0.35) inset,
    0 10px 24px rgba(0, 0, 0, 0.45),
    0 3px 8px rgba(0, 0, 0, 0.3);
  will-change: transform;
}

.card-edge {
  pointer-events: none;
  position: absolute;
  inset: 0;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--el, #8893a5) 55%, #fff 10%);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4) inset;
  z-index: 2;
}

.card-shine {
  pointer-events: none;
  position: absolute;
  inset: 0;
  border-radius: 14px;
  background: radial-gradient(
    circle at var(--glint-x, 30%) var(--glint-y, 20%),
    rgba(255, 255, 255, 0.22),
    transparent 55%
  );
  z-index: 3;
  opacity: 0.85;
  mix-blend-mode: soft-light;
}

.card-face {
  position: relative;
  z-index: 1;
  height: 100%;
  border-radius: 14px;
  overflow: hidden;
}

/* Full-bleed art placeholder behind all card text */
.card-art {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: grid;
  place-items: center;
  background:
    radial-gradient(130% 95% at 50% 22%, color-mix(in srgb, var(--el, #8893a5) 42%, transparent), transparent 58%),
    radial-gradient(90% 70% at 50% 88%, color-mix(in srgb, var(--el, #8893a5) 18%, transparent), transparent 65%),
    linear-gradient(168deg, color-mix(in srgb, var(--el, #8893a5) 22%, #182032) 0%, #0c101a 48%, #06080f 100%);
}
.card-art-glyph {
  font-size: clamp(52px, 62%, 96px);
  line-height: 1;
  opacity: 0.62;
  filter: drop-shadow(0 10px 28px rgba(0, 0, 0, 0.55));
  user-select: none;
  pointer-events: none;
}
.card-art-vignette {
  pointer-events: none;
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.62) 0%, rgba(0, 0, 0, 0.08) 32%, rgba(0, 0, 0, 0.05) 52%, rgba(0, 0, 0, 0.78) 100%);
}

.card-overlay {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  padding: 7px 8px 9px;
  pointer-events: none;
}
.card-overlay,
.card-overlay *,
.card-ink,
.card-stats-grid,
.card-stats-grid *,
.stat-cell,
.stat-cell * {
  pointer-events: none !important;
}

/* White ink + thin dark outline for legibility on art */
.card-ink {
  color: #fff;
  font-weight: 800;
  -webkit-text-stroke: 0.55px rgba(0, 0, 0, 0.92);
  paint-order: stroke fill;
  text-shadow:
    0 0 1px rgba(0, 0, 0, 0.95),
    0 1px 3px rgba(0, 0, 0, 0.75),
    1px 0 0 rgba(0, 0, 0, 0.85),
    -1px 0 0 rgba(0, 0, 0, 0.85),
    0 -1px 0 rgba(0, 0, 0, 0.85),
    1px 1px 0 rgba(0, 0, 0, 0.8),
    -1px -1px 0 rgba(0, 0, 0, 0.8);
}
.card-ink-sm {
  font-weight: 700;
  -webkit-text-stroke-width: 0.45px;
}

.card-header {
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 6px;
}
.card-header-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  max-width: 62%;
}
.card-targeting-pill {
  font-size: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  line-height: 1.2;
}
.card-clone-badge {
  position: absolute;
  top: 5px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  pointer-events: none;
  font-size: 7px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(8, 10, 18, 0.78);
  border: 1px solid rgba(255, 180, 80, 0.45);
  color: #ffc56d;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
  line-height: 1.35;
}
.card-scene.is-clone .card-edge {
  border-color: color-mix(in srgb, #ffb84d 35%, var(--el, #8893a5) 45%);
}
.card-class-badge {
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.15;
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.card-name {
  font-size: clamp(11px, 1.15vw, 14px);
  line-height: 1.12;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}
.card-scene.card-condensed .card-body {
  justify-content: flex-end;
  gap: 4px;
}
.card-scene.card-condensed .card-stats-grid {
  gap: 4px 8px;
}
.card-scene.card-condensed .stat-label {
  font-size: 8px;
}
.card-scene.card-condensed .stat-now {
  font-size: clamp(11px, 2.8vw, 13px);
}

.card-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px 10px;
}
.stat-cell {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.shop-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

/* ── Defense deck UX (Play + Builder) ── */
.defense-deck-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 12px 0 16px;
}
.defense-deck-card {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
}
.defense-deck-card.is-active {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent);
}
.defense-deck-card.is-empty {
  opacity: 0.92;
}
.defense-deck-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.defense-slot-badge {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.defense-active-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--good) 18%, transparent);
  color: var(--good);
}
.defense-empty-pill {
  font-size: 11px;
  color: var(--muted);
}
.defense-deck-name {
  margin: 0 0 6px;
  font-size: 16px;
}
.defense-deck-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 10px;
}
.defense-record {
  color: var(--text);
  font-weight: 600;
}
.defense-timer {
  margin: 8px 0 10px;
}
.defense-timer-track {
  height: 8px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
  margin-bottom: 6px;
}
.defense-timer-fill {
  height: 100%;
  width: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--good));
  transition: width 0.35s ease;
}
.defense-timer.is-expired .defense-timer-fill {
  background: var(--muted);
  width: 0 !important;
}
.defense-timer-label {
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--good);
}
.defense-timer.is-expired .defense-timer-label {
  color: var(--warn);
}
.defense-deck-actions {
  margin-top: 8px;
}
.defense-deck-empty {
  padding: 16px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  text-align: center;
}
.builder-active-defense {
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 8px;
}
.builder-defense-name {
  margin: 4px 0;
  font-weight: 700;
}
.builder-save-hint {
  margin: 0 0 8px;
  font-size: 12px;
}
.saved-grids-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.saved-grid-name {
  width: 100%;
}
.saved-grid-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.saved-grid-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.saved-grid-load {
  flex: 1 1 auto;
  min-width: 0;
  text-align: left;
}
.saved-grid-meta {
  font-size: 12px;
  white-space: nowrap;
}
.saved-grid-status {
  min-height: 1.2em;
  margin: 0;
}
.stat-cell .stat-label {
  font-size: 7px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.92;
}
.stat-cell .stat-value {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.stat-cell.buff .stat-now {
  color: #b8ffd0;
  -webkit-text-stroke: 0.55px rgba(0, 48, 24, 0.95);
  text-shadow:
    0 0 1px rgba(0, 40, 20, 0.95),
    0 1px 3px rgba(0, 0, 0, 0.75),
    1px 0 0 rgba(0, 48, 24, 0.9),
    -1px 0 0 rgba(0, 48, 24, 0.9),
    0 -1px 0 rgba(0, 48, 24, 0.9);
}
.stat-cell.debuff .stat-now {
  color: #ffd0d0;
  -webkit-text-stroke: 0.55px rgba(64, 8, 8, 0.95);
  text-shadow:
    0 0 1px rgba(48, 8, 8, 0.95),
    0 1px 3px rgba(0, 0, 0, 0.75),
    1px 0 0 rgba(64, 8, 8, 0.9),
    -1px 0 0 rgba(64, 8, 8, 0.9),
    0 -1px 0 rgba(64, 8, 8, 0.9);
}
.stat-cell.debuff .stat-was {
  font-size: 10px;
  text-decoration: line-through;
  opacity: 0.75;
  margin-right: 3px;
}

.card-scene.has-buff .card-edge {
  border-color: color-mix(in srgb, #4ade80 60%, var(--el, #8893a5));
  box-shadow: 0 0 12px rgba(74, 222, 128, 0.25) inset;
}
.card-scene.has-debuff .card-edge {
  border-color: color-mix(in srgb, #f87171 50%, var(--el, #8893a5));
}

.card-scene.empty {
  aspect-ratio: 5 / 7;
  border: 2px dashed var(--line);
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 28px;
  font-weight: 300;
  cursor: default;
  background: rgba(0, 0, 0, 0.15);
  transition: border-color 0.15s, box-shadow 0.15s, color 0.15s;
}
.card-scene.empty.is-drop-target,
.board-slot.is-drop-target {
  border-color: #4ade80;
  color: #4ade80;
  box-shadow:
    0 0 0 2px rgba(74, 222, 128, 0.25) inset,
    0 0 24px rgba(74, 222, 128, 0.15);
}

.card-ghost {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  margin: 0;
  filter: drop-shadow(0 24px 40px rgba(0, 0, 0, 0.65));
}
.card-ghost .card-inner {
  transform: rotateY(-4deg) rotateX(6deg) scale(1.05) !important;
}

.card-info {
  position: absolute;
  right: 7px;
  top: 7px;
  left: auto;
  z-index: 14;
  transform: none;
  transform-style: preserve-3d;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  background: rgba(8, 11, 20, 0.28);
  backdrop-filter: blur(4px);
  color: rgba(255, 255, 255, 0.88);
  font-size: 12px;
  font-weight: 700;
  font-style: italic;
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  opacity: var(--info-opacity, 0.1);
  pointer-events: none;
  touch-action: manipulation;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  transition:
    opacity 0.16s ease,
    background 0.14s ease,
    border-color 0.14s ease,
    transform 0.14s ease;
}
.card-info:focus-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateZ(14px);
  outline: 2px solid rgba(255, 255, 255, 0.5);
  outline-offset: 2px;
}
.card-scene.is-dragging .card-info {
  opacity: 0 !important;
  pointer-events: none;
}
.card-info:hover {
  background: rgba(20, 28, 48, 0.82);
  border-color: rgba(255, 255, 255, 0.48);
  transform: translateZ(14px) scale(1.08);
}
.card-scene.card-draggable:has(.card-info:hover) {
  cursor: pointer;
}
.card-ghost .card-info,
.card-ghost .card-hit {
  display: none;
}

.card-ability-line {
  font-size: 9px;
  line-height: 1.35;
  color: #9aa8bc;
  padding: 4px 6px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.25);
  border-left: 2px solid color-mix(in srgb, var(--el, #8893a5) 60%, transparent);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}

.card-synergy-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}
.synergy-tag {
  font-size: 8px;
  line-height: 1.2;
  padding: 2px 5px;
  border-radius: 4px;
  font-weight: 700;
}
.synergy-tag.positive {
  background: rgba(74, 222, 128, 0.15);
  color: #4ade80;
}
.synergy-tag.negative {
  background: rgba(248, 113, 113, 0.12);
  color: #f87171;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 4px;
  margin-top: auto;
  padding-top: 2px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 8px;
  color: var(--muted);
}
.card-traits {
  color: var(--accent-2);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 55%;
}
.card-trigger,
.card-method {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-method {
  text-align: right;
  color: #8893a5;
}

/* legacy stat helpers (inspector) */
.stat-buff .stat-now {
  color: #4ade80;
  font-weight: 800;
}
.stat-debuff .stat-was {
  text-decoration: line-through;
  color: #f87171;
  opacity: 0.75;
  margin-right: 3px;
}
.stat-debuff .stat-now {
  color: #f87171;
  font-weight: 800;
}
.inspect-synergy .pos .kw-term {
  color: #4ade80;
}
.inspect-synergy .neg .kw-term {
  color: #f87171;
}
.is-was {
  text-decoration: line-through;
  opacity: 0.7;
  margin-right: 4px;
}
.is-value.buff .is-now {
  color: #4ade80;
  font-weight: 800;
}
.is-value.debuff .is-now {
  color: #f87171;
  font-weight: 800;
}

/* element accents */
.el-fire {
  --el: #ff6b3d;
}
.el-ice {
  --el: #53c7ff;
}
.el-lightning {
  --el: #ffd23f;
}
.el-poison {
  --el: #7bd66a;
}
.el-blunt {
  --el: #c9a37a;
}
.el-pierce {
  --el: #b8c2cc;
}
.el-arcane {
  --el: #c06bff;
}
.el-holy {
  --el: #fff0a8;
}

/* ---- sidebar ---- */
.sidebar {
  display: grid;
  gap: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  position: sticky;
  top: 84px;
}
.stat-card {
  text-align: center;
  padding: 14px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(107, 139, 255, 0.16), rgba(107, 139, 255, 0.04));
  border: 1px solid var(--line);
}
.stat-big {
  font-size: 30px;
  font-weight: 800;
  color: #fff;
}
.stat-label {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.counts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.count {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 4px;
}
.count-value {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.count-label {
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.synergy-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.synergy-list li {
  font-size: 13px;
  line-height: 1.35;
  color: var(--text);
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  padding: 8px 10px;
}
.sidebar-actions {
  display: grid;
  gap: 8px;
}

/* ---- battle ---- */
.battle {
  display: grid;
  gap: 18px;
}
.battle-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.labels-faceoff {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
}
.labels-faceoff .vs {
  color: var(--muted);
  font-weight: 400;
}
.lab.def {
  color: var(--bad);
}
.lab.atk {
  color: var(--good);
}
.outcome-pill {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding: 8px 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel);
}
.outcome-pill strong {
  font-size: 18px;
}
.outcome-pill span {
  font-size: 11px;
  color: var(--muted);
}
.outcome-pill.attacker strong {
  color: var(--good);
}
.outcome-pill.defender strong {
  color: var(--bad);
}
.outcome-pill.draw strong {
  color: var(--warn);
}
.outcome-pill.battle-pending {
  border-color: rgba(107, 139, 255, 0.35);
  background: rgba(107, 139, 255, 0.08);
}
.outcome-pill.battle-pending strong {
  color: #9eb4ff;
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.outcome-pill.battle-pending span {
  color: var(--muted);
}
.outcome-pill:not(.battle-pending) {
  animation: outcome-reveal 0.45s ease-out;
}
@keyframes outcome-reveal {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.battle-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
  gap: 16px;
  align-items: start;
}
@media (max-width: 960px) {
  .battle-layout {
    grid-template-columns: 1fr;
  }
  .battle-sidebar {
    order: 2;
  }
}

.battle-sidebar {
  display: grid;
  gap: 12px;
  max-height: min(72vh, 640px);
}
.battle-sidebar .panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.combat-log {
  flex: 1 1 auto;
  min-height: 200px;
}
.combat-log-list {
  flex: 1 1 auto;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 280px;
  padding-right: 4px;
  scrollbar-width: thin;
}
.combat-log-entry {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 8px;
  align-items: baseline;
  font-size: 12px;
  line-height: 1.35;
  padding: 5px 8px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid transparent;
  animation: log-in 0.22s ease-out;
}
@keyframes log-in {
  from {
    opacity: 0;
    transform: translateX(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.combat-log-tick {
  font-variant-numeric: tabular-nums;
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.combat-log-text {
  color: var(--text);
}
.combat-log-entry.tone-damage .combat-log-text {
  color: #ffb89a;
}
.combat-log-entry.tone-heal .combat-log-text {
  color: #66e8a0;
}
.combat-log-entry.tone-chain .combat-log-text {
  color: #7ecbff;
}
.combat-log-entry.tone-ability .combat-log-text {
  color: #c9a0ff;
}
.combat-log-entry.tone-combo .combat-log-text {
  color: #ffe066;
  font-weight: 700;
}

.battle-live-stats {
  flex: 0 0 auto;
}

.live-stats-split {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.live-stats-block {
  background: rgba(0, 0, 0, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 10px 10px 8px;
}

.live-stats-block-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.live-stats-you .live-stats-block-title {
  color: var(--good);
}

.live-stats-cpu .live-stats-block-title {
  color: var(--bad);
}

.live-stats-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 2.75rem 2.75rem;
  column-gap: 10px;
  row-gap: 6px;
  align-items: center;
  font-size: 12px;
}
.live-stats-rows {
  display: contents;
}
.live-stats-head {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding-bottom: 4px;
  border-bottom: 1px solid var(--line);
}
.live-stats-head.stat-dealt {
  color: var(--good);
}
.live-stats-head.stat-taken {
  color: var(--bad);
}
.live-stats-num {
  text-align: right;
}
.live-stat-name {
  min-width: 0;
  overflow: hidden;
  position: relative;
  line-height: 1.3;
  padding-right: 6px;
  color: var(--text);
}
.live-stat-name-text {
  display: block;
  max-width: 20ch;
  overflow: hidden;
  white-space: nowrap;
  mask-image: linear-gradient(
    to right,
    #000 0,
    #000 calc(100% - 14px),
    transparent 100%
  );
  -webkit-mask-image: linear-gradient(
    to right,
    #000 0,
    #000 calc(100% - 14px),
    transparent 100%
  );
}
.live-stats-grid .stat-dealt {
  color: var(--good);
  font-weight: 600;
}
.live-stats-grid .stat-taken {
  color: var(--bad);
  font-weight: 600;
}
.live-stats-grid .stat-cell {
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.live-stats-empty {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
  padding: 8px 4px;
}
.stat-cell {
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.stat-bump {
  animation: stat-bump 0.35s ease-out;
  filter: brightness(1.35);
}
@keyframes stat-bump {
  0% {
    transform: scale(1);
  }
  35% {
    transform: scale(1.18);
    color: #ffe066;
  }
  100% {
    transform: scale(1);
  }
}

.battle-stage {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(107, 139, 255, 0.22);
  min-height: 420px;
  background:
    radial-gradient(ellipse 90% 70% at 50% 40%, rgba(107, 139, 255, 0.1), transparent 65%),
    radial-gradient(ellipse 80% 50% at 50% 100%, rgba(192, 107, 255, 0.06), transparent),
    linear-gradient(175deg, #0a0e1a 0%, #121829 48%, #0a0d18 100%);
  box-shadow:
    inset 0 0 100px rgba(0, 0, 0, 0.55),
    0 0 48px rgba(107, 139, 255, 0.08);
}

.battle-vfx-host {
  position: absolute;
  inset: 0;
  z-index: 35;
  pointer-events: none;
  overflow: hidden;
  border-radius: inherit;
}

.battle-vfx-canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
  pointer-events: none;
}

.battle-arena {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-rows: auto auto auto auto auto;
  gap: 8px;
  padding: 14px 12px 16px;
  max-width: 420px;
  margin: 0 auto;
}
.battle-lane-label {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  text-align: center;
}
.battle-lane-label.def {
  color: var(--bad);
}
.battle-lane-label.atk {
  color: var(--good);
}
.battle-midline {
  height: 2px;
  margin: 6px 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(107, 139, 255, 0.15),
    rgba(192, 107, 255, 0.35),
    rgba(107, 139, 255, 0.15),
    transparent
  );
  box-shadow: 0 0 12px rgba(107, 139, 255, 0.2);
}
.battle-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.battle-card-empty {
  aspect-ratio: 5 / 7;
  border-radius: 12px;
  border: 1px dashed rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.12);
  max-width: 108px;
  margin-inline: auto;
  width: 100%;
}
.battle-card-wrap {
  position: relative;
  overflow: visible;
  max-width: 114px;
  margin-inline: auto;
  width: 100%;
  z-index: 12;
}
.battle-card-motion {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 4px;
  transform-style: preserve-3d;
  will-change: transform;
}
.battle-card-wrap .card-scene.is-hovered {
  z-index: 20;
}
.battle-card-wrap .card-scene {
  cursor: default;
  touch-action: auto;
  flex: 1 1 auto;
  min-width: 0;
}
.battle-card-wrap.is-dead {
  opacity: 0.38;
  filter: saturate(0.55) grayscale(0.35);
}
.battle-card-wrap.is-dead .battle-card-motion {
  transform: none !important;
}
.battle-hp-bar {
  pointer-events: none;
  flex: 0 0 5px;
  width: 5px;
  align-self: stretch;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.62);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06) inset,
    0 0 6px rgba(0, 0, 0, 0.45);
  z-index: 2;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.battle-hp-fill {
  width: 100%;
  height: 100%;
  min-height: 2px;
  border-radius: 2px;
  background: #66d17a;
  transition: height 0.16s ease-out, background 0.12s;
  box-shadow: 0 0 6px color-mix(in srgb, currentColor 40%, transparent);
}
.battle-ended .battle-hp-fill {
  transition: none;
}
.battle-card-wrap .card-scene.battle-hit .card-inner {
  filter: brightness(1.35) saturate(1.15);
  transition: filter 0.08s ease-out;
}
.battle-card-wrap .card-scene.battle-heal .card-inner {
  filter: brightness(1.2) saturate(1.25) hue-rotate(-18deg);
  box-shadow: 0 0 18px rgba(68, 221, 119, 0.35);
  transition: filter 0.12s ease-out, box-shadow 0.12s ease-out;
}

.battle-status-row {
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 3px;
  z-index: 5;
  pointer-events: none;
  max-width: 110%;
}
.battle-status {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 5px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  animation: status-pop 0.28s ease-out;
  white-space: nowrap;
}
@keyframes status-pop {
  from {
    opacity: 0;
    transform: scale(0.7) translateY(4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.battle-status-burn {
  background: rgba(255, 80, 30, 0.85);
  color: #fff3ea;
  box-shadow: 0 0 8px rgba(255, 80, 30, 0.5);
}
.battle-status-cold {
  background: rgba(60, 160, 255, 0.85);
  color: #eef8ff;
  box-shadow: 0 0 8px rgba(60, 160, 255, 0.45);
}
.battle-status-poison {
  background: rgba(60, 200, 80, 0.85);
  color: #eeffee;
}
.battle-status-stun {
  background: rgba(255, 210, 60, 0.9);
  color: #2a2200;
}
.battle-status-bleed {
  background: rgba(200, 40, 60, 0.88);
  color: #ffe8ea;
}
.battle-status-regen,
.battle-status-haste {
  background: rgba(50, 200, 100, 0.82);
  color: #eafff0;
}
.battle-status-barrier,
.battle-status-buff {
  background: rgba(90, 130, 255, 0.85);
  color: #eef2ff;
}
.battle-status-weaken,
.battle-status-negate {
  background: rgba(120, 100, 160, 0.82);
  color: #f0ecff;
}
.battle-status-ability,
.battle-status-element {
  background: rgba(180, 100, 255, 0.82);
  color: #faf0ff;
}

.battle-banner {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(4, 6, 12, 0.62);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s ease;
  z-index: 40;
  border-radius: var(--radius);
}
.battle-banner.show {
  opacity: 1;
  pointer-events: auto;
}
.battle-banner-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 28px 36px;
  background: rgba(8, 10, 18, 0.92);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
  max-width: min(92%, 420px);
  text-align: center;
}
.battle-banner-note {
  font-size: 14px;
  line-height: 1.45;
  color: var(--muted);
  max-width: 36ch;
}
.battle-banner-view {
  margin-top: 4px;
  min-width: 140px;
}
.battle-card-wrap.battle-outmatched {
  opacity: 0.78;
  filter: saturate(0.82);
}
.battle-status-outmatched {
  background: rgba(180, 120, 40, 0.22);
  color: #e8b86d;
  border-color: rgba(232, 184, 109, 0.35);
}
.battle-banner-text {
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.battle-banner-text.win {
  color: var(--good);
}
.battle-banner-text.loss {
  color: var(--bad);
}
.battle-banner-text.draw {
  color: var(--warn);
}
.fb-wrap {
  display: grid;
  gap: 18px;
}
.fb-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.fb-cell {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 8px;
  text-align: center;
  font-size: 12px;
}
.fb-cell.empty {
  opacity: 0.3;
}

.scoreboard {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}
.score-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.score-table th {
  text-align: left;
  color: var(--muted);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 6px 8px;
  border-bottom: 1px solid var(--line);
}
.score-table td {
  padding: 7px 8px;
  border-bottom: 1px solid rgba(35, 44, 68, 0.5);
}
.score-table tbody tr:hover {
  background: var(--panel-2);
}
.battle-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.score-table .side-you {
  color: var(--good);
  font-weight: 600;
}
.score-table .side-cpu {
  color: var(--bad);
}

/* ---- positioning tips ---- */
.tips {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
.tip-text {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted);
}

/* ---- generic modal ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
  animation: fade-in 0.2s ease-out;
}
.modal-content {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 32px;
  max-width: 600px;
  width: 100%;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.5);
  animation: slide-up 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.modal-content h2 { margin: 0; font-size: 24px; color: var(--text); }
.modal-content h3 { margin: 0; font-size: 18px; color: var(--accent); }
.modal-content p { margin: 0; color: var(--muted); line-height: 1.6; }
.modal-section { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.modal-lead {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 15px;
}
.modal-list {
  margin: 0;
  padding-left: 1.2em;
  color: var(--muted);
  line-height: 1.55;
  font-size: 14px;
}
.modal-list li + li {
  margin-top: 6px;
}
.deep-elements-modal {
  max-width: 640px;
  max-height: min(88vh, 720px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--line) 80%, transparent) transparent;
}

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes slide-up { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* ---- card inspector modal ---- */
.inspect-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(4, 6, 12, 0.66);
  backdrop-filter: blur(4px);
  display: grid;
  place-items: center;
  padding: 20px;
  animation: fade-in 0.14s ease;
}
@keyframes fade-in {
  from {
    opacity: 0;
  }
}
.inspect-card {
  width: min(760px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  background:
    radial-gradient(120% 40% at 50% 0%, color-mix(in srgb, var(--el, #8893a5) 26%, transparent), transparent 60%),
    linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid color-mix(in srgb, var(--el, #8893a5) 45%, var(--line));
  border-radius: 16px;
  padding: 22px;
  box-shadow: var(--shadow);
  animation: pop-in 0.16s ease;
}
.inspect-layout {
  display: grid;
  grid-template-columns: minmax(160px, 220px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
@media (max-width: 640px) {
  .inspect-layout {
    grid-template-columns: 1fr;
    justify-items: center;
  }
}
.inspect-art-wrap {
  perspective: 1200px;
  width: 100%;
  max-width: 220px;
  position: sticky;
  top: 0;
}
.inspect-art-wrap .card-scene {
  width: 100%;
  max-width: 220px;
  margin: 0 auto;
  cursor: default;
  touch-action: manipulation;
}
.inspect-art-wrap .card-scene.is-hovered {
  z-index: 2;
}
.inspect-art-wrap .card-info {
  display: none;
}
.inspect-details {
  min-width: 0;
}
@keyframes pop-in {
  from {
    transform: translateY(8px) scale(0.98);
    opacity: 0;
  }
}
.inspect-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.35);
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
}
.inspect-close:hover {
  color: #fff;
  border-color: var(--accent);
}
.inspect-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding-right: 28px;
}
.inspect-title h2 {
  margin: 0 0 4px;
  font-size: 22px;
  line-height: 1.05;
}
.inspect-sub {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.inspect-power {
  text-align: center;
  flex-shrink: 0;
}
.ip-value {
  display: block;
  font-size: 22px;
  font-weight: 800;
  color: var(--warn);
}
.ip-label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.inspect-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 18px 0;
}
.inspect-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 4px;
}
.is-glyph {
  font-size: 14px;
}
.is-value {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.is-label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.inspect-clone {
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(255, 180, 80, 0.08);
  border: 1px solid rgba(255, 180, 80, 0.22);
}
.inspect-clone-ttl {
  margin: 6px 0 0;
  font-size: 15px;
  font-weight: 700;
  color: #ffc56d;
}
.inspect-clone-parent {
  margin: 6px 0 0;
  font-size: 12px;
}
.inspect-ability {
  margin-bottom: 16px;
}
.ability-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--el, var(--accent));
  border-radius: 8px;
  padding: 12px 14px;
}
.kw-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.kw-list li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 11px;
}
.kw-term {
  font-weight: 700;
  font-size: 13px;
}
.kw-text {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.4;
}

/* ---- platform (M14) ---- */
.platform {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 16px 48px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.platform-header h2 {
  margin: 0 0 8px;
}
.platform-sub {
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}
.platform-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow);
}
.platform-input {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 15px;
}
.platform-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.platform-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.platform-user {
  font-weight: 700;
}
.platform-balance {
  color: var(--good);
  font-weight: 600;
}
.platform-status {
  min-height: 1.2em;
  color: var(--muted);
  margin: 0;
}
.platform-empty {
  color: var(--muted);
  margin: 8px 0 0;
}
.platform-inventory-wrap h3 {
  margin: 8px 0 0;
}
.platform-inventory {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 14px;
  perspective: 1200px;
}
.inventory-card-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  overflow: visible;
}
.inventory-card-row .card-scene {
  cursor: pointer;
  touch-action: none;
  max-width: 180px;
  margin: 0 auto;
  width: 100%;
}
.inventory-card-row .card-scene.is-hovered {
  z-index: 40;
}
.card-scene.card-view-only {
  cursor: pointer;
  touch-action: none;
}
.card-scene.card-info-always .card-info {
  opacity: 1 !important;
  pointer-events: auto !important;
}
.card-grid-view {
  perspective: 1200px;
}
.play-builder-section {
  margin-top: 16px;
}
.play-panel {
  max-width: min(1180px, 100%);
  width: 100%;
}
.play-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
}
.play-tab {
  appearance: none;
  -webkit-appearance: none;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 10px 18px;
  border-radius: 999px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.play-tab:hover {
  color: var(--text);
  border-color: var(--accent);
}
.play-tab.is-active {
  color: #fff;
  border-color: var(--accent);
  background: linear-gradient(180deg, rgba(107, 139, 255, 0.28), rgba(107, 139, 255, 0.1));
}
.play-tab-panels {
  display: grid;
  gap: 0;
}
.play-tab-panel[hidden] {
  display: none !important;
}
.play-panel-intro {
  display: grid;
  gap: 8px;
  margin: 0 0 16px;
}
.play-panel-intro h3 {
  margin: 0;
  font-size: 1.1rem;
}
.play-draft-intro {
  gap: 12px;
  margin-bottom: 20px;
}
.play-draft-start {
  justify-self: start;
  min-width: 200px;
}
.play-replay-drawer {
  margin-top: 20px;
}
.play-replay-drawer summary {
  cursor: pointer;
  font-weight: 700;
  padding: 4px 0;
}
.play-replay-body {
  margin-top: 12px;
  display: grid;
  gap: 10px;
  max-width: 420px;
}
.play-builder-shell {
  width: 100%;
  margin: 0 0 20px;
  overflow: visible;
}
.play-builder-shell .builder-embedded {
  width: 100%;
  max-width: none;
  margin: 0;
}

.play-defense-drawer {
  margin-top: 8px;
}
.play-defense-drawer summary,
.play-advanced summary {
  cursor: pointer;
  font-weight: 700;
  padding: 4px 0;
  user-select: none;
}
.play-defense-body {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}
.play-advanced {
  margin-top: 12px;
}
.play-advanced-body {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}
.defense-slot-picker {
  display: grid;
  gap: 8px;
  margin-bottom: 8px;
}
.deck-builder-empty {
  padding: 24px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 12px;
}
.inventory-card-meta {
  font-size: 11px;
  color: var(--warn);
  text-align: center;
}
.platform-inventory-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.platform-inventory-actions .btn {
  font-size: 12px;
  padding: 6px 10px;
}
.platform-card {
  text-align: left;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.platform-card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}
.platform-card-name {
  font-weight: 700;
  margin-bottom: 4px;
}
.platform-card-sub {
  font-size: 13px;
  color: var(--muted);
}
.platform-card-meta {
  margin-top: 8px;
  font-size: 12px;
  color: var(--warn);
}
.discover-stage {
  position: relative;
  min-height: 320px;
}
.discover-overlay {
  position: absolute;
  inset: 0;
  border-radius: 12px;
  overflow: hidden;
  background: radial-gradient(circle at center, rgba(107, 139, 255, 0.14), transparent 72%);
  pointer-events: none;
  display: grid;
  place-items: center;
  opacity: 0;
  transition: opacity 0.35s ease;
}
.discover-overlay.is-active {
  opacity: 1;
}
.discover-overlay.is-done {
  opacity: 0;
}
.discover-reveal-center {
  width: min(200px, 70%);
  perspective: 900px;
}
.discover-reveal-card {
  transform: rotateY(88deg) scale(0.82);
  opacity: 0;
  transition:
    transform 0.65s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.45s ease;
}
.discover-overlay.is-active .discover-reveal-card {
  transform: rotateY(0deg) scale(1);
  opacity: 1;
}
.discover-overlay canvas {
  width: 100% !important;
  height: 100% !important;
}

.market-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 1rem;
}

.market-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
}

.market-row-main {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.market-kind {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.market-price {
  font-weight: 600;
}

.market-meta {
  font-size: 0.85rem;
  color: var(--muted);
}

.play-panel .platform-actions {
  margin-bottom: 0.75rem;
}

/* ---- discover + mint reveal ---- */
.discover-session {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.discover-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.discover-action {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  text-align: left;
  padding: 16px 18px;
  min-height: 96px;
}
.discover-action-title {
  font-size: 1.05rem;
  font-weight: 700;
}
.discover-action-cost {
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 600;
}
.discover-action-desc {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.35;
}
.mint-stage {
  min-height: 420px;
  position: relative;
}
.mint-pixi-stage {
  min-height: 320px;
  position: relative;
}
.mint-pixi-overlay {
  position: absolute;
  inset: 0;
  border-radius: 14px;
  overflow: hidden;
  background: radial-gradient(circle at 50% 40%, rgba(107, 139, 255, 0.16), transparent 68%);
}
.mint-reveal-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 4px 0 8px;
  animation: mintRevealIn 0.45s ease-out;
}
@keyframes mintRevealIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.mint-reveal-kicker {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}
.mint-reveal-name {
  margin: 4px 0 0;
  font-size: 1.45rem;
}
.mint-reveal-sub {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}
.mint-reveal-body {
  display: grid;
  grid-template-columns: minmax(140px, 200px) 1fr;
  gap: 20px;
  align-items: start;
}
@media (max-width: 720px) {
  .mint-reveal-body {
    grid-template-columns: 1fr;
  }
}
.mint-reveal-card-wrap .card-scene {
  max-width: 200px;
  margin: 0 auto;
}
.mint-reveal-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
}
.mint-reveal-tag {
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
}
.mint-reveal-tag.core {
  background: rgba(107, 139, 255, 0.18);
  color: var(--accent);
}
.mint-reveal-tag.clone {
  background: rgba(255, 180, 80, 0.15);
  color: var(--warn);
}
.mint-reveal-ability h4 {
  margin: 0 0 6px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.mint-reveal-ability p {
  margin: 0;
  line-height: 1.5;
}
.mint-reveal-keywords {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.45;
}
.mint-reveal-keywords strong {
  color: var(--text);
}
.mint-reveal-balance {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}
.mint-reveal-foot {
  display: flex;
  justify-content: flex-end;
}
.account-nav {
  flex-wrap: wrap;
}

/* ---- UX overhaul: home, exchange, wallet ---- */
.landing-guest,
.landing-home {
  position: relative;
  isolation: isolate;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding-bottom: 12px;
  overflow-x: visible;
}
.landing-backdrop {
  pointer-events: none;
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 100vw;
  margin-left: -50vw;
  z-index: 0;
  background:
    radial-gradient(ellipse 90% 55% at 50% 0%, rgba(107, 139, 255, 0.22), transparent 58%),
    radial-gradient(ellipse 70% 45% at 92% 18%, rgba(192, 107, 255, 0.14), transparent 52%),
    radial-gradient(ellipse 55% 40% at 4% 42%, rgba(62, 207, 142, 0.08), transparent 50%),
    radial-gradient(ellipse 80% 50% at 50% 100%, rgba(107, 139, 255, 0.1), transparent 55%),
    linear-gradient(180deg, #0a0e1a 0%, var(--bg) 42%, var(--bg) 100%);
}
.landing-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.5), transparent 85%);
}
.landing-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 12px 0 0;
}
.landing-content {
  position: relative;
  z-index: 1;
  display: grid;
  gap: clamp(24px, 3.5vw, 36px);
  max-width: 100%;
  margin: 0;
  padding: 0;
}
.landing-glow {
  display: none;
}
.hero-wide { max-width: 720px; position: relative; }
.hero-kicker {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}
.section-title { margin: 0; font-size: 22px; }
.path-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}
.path-step {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  display: grid;
  gap: 8px;
}
.path-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 13px;
  background: linear-gradient(180deg, rgba(107, 139, 255, 0.35), rgba(107, 139, 255, 0.08));
  border: 1px solid rgba(107, 139, 255, 0.45);
}
.path-step h3 { margin: 0; font-size: 16px; }
.path-step p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.45; }
.landing-cta-band {
  margin-top: 12px;
  padding: 28px;
  border-radius: var(--radius);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line));
  background: linear-gradient(135deg, rgba(107, 139, 255, 0.12), rgba(181, 107, 255, 0.06));
  display: grid;
  gap: 10px;
  text-align: center;
}
.landing-cta-band h3 { margin: 0; }
.landing-cta-band p { margin: 0; color: var(--muted); }
.landing-home .home-title {
  font-size: clamp(28px, 5vw, 42px);
  background: none;
  color: var(--text);
  -webkit-text-fill-color: var(--text);
}
.home-quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin: 0;
}
.home-quick-card {
  text-align: left;
  padding: 18px;
  cursor: pointer;
  color: inherit;
  font: inherit;
  display: grid;
  gap: 6px;
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
}
.home-quick-card:hover {
  border-color: rgba(107, 139, 255, 0.35);
}
.home-quick-badge {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}
.home-quick-title { font-size: 17px; font-weight: 800; }
.home-quick-sub { font-size: 13px; color: var(--muted); }
.home-defense-banner {
  padding: 16px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.home-defense-banner .panel-subhead,
.home-defense-banner p {
  margin: 0;
}
.home-defense-empty { border-style: dashed; }
.home-defense-name { margin: 0; font-weight: 600; }
.topbar-wallet {
  margin-left: auto;
  margin-right: 8px;
  background: linear-gradient(180deg, rgba(107, 139, 255, 0.2), rgba(107, 139, 255, 0.06));
  border: 1px solid rgba(107, 139, 255, 0.45);
  color: var(--good);
  font-weight: 700;
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  font-variant-numeric: tabular-nums;
}
.exchange-page { max-width: 1100px; }
.wallet-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: linear-gradient(120deg, var(--panel), var(--panel-2));
  margin-bottom: 16px;
}
.wallet-value {
  font-size: 26px;
  font-weight: 800;
  color: var(--good);
  font-variant-numeric: tabular-nums;
}
.wallet-strip-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}
.filter-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-chip {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  cursor: pointer;
}
.filter-chip.is-active {
  color: #fff;
  border-color: var(--accent);
  background: linear-gradient(180deg, rgba(107, 139, 255, 0.28), rgba(107, 139, 255, 0.08));
}
.membership-banner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  margin-bottom: 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 197, 109, 0.35);
  background: linear-gradient(120deg, rgba(255, 197, 109, 0.1), rgba(107, 139, 255, 0.06));
}
.shop-grid,
.market-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  perspective: 1200px;
}
.shop-tile,
.market-tile {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.shop-tile:hover,
.market-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}
.shop-tile.rarity-common { --rarity: #9aa8bc; }
.shop-tile.rarity-rare { --rarity: #6b8bff; }
.shop-tile.rarity-epic { --rarity: #b56bff; }
.shop-tile.rarity-legendary { --rarity: #ffb84d; }
.shop-tile { border-top: 3px solid var(--rarity, var(--line)); }
.cosmetic-preview {
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  background: var(--panel-2);
}
.cosmetic-preview-inner {
  width: 72%;
  aspect-ratio: 5 / 7;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(160deg, #1a2238, #0a0e18);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
}
.preview-border-ember .cosmetic-preview-inner { box-shadow: 0 0 0 3px #ff6b3d; }
.preview-border-frost .cosmetic-preview-inner { box-shadow: 0 0 0 3px #7dd3fc; }
.preview-fx-void .cosmetic-preview-inner { box-shadow: 0 0 24px rgba(120, 80, 255, 0.45); }
.shop-tile-body { padding: 14px; flex: 1; }
.shop-tile-actions { padding: 0 14px 14px; }
.shop-tile-actions .btn { width: 100%; }
.market-tile-preview { padding: 8px; display: flex; justify-content: center; }
.market-mini-card { width: 120px !important; max-width: 120px; }
.market-tile-price { font-size: 18px; font-weight: 800; color: var(--good); }
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 24px;
  border: 1px dashed var(--line);
  border-radius: 16px;
}
.equip-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(4, 6, 12, 0.72);
  display: grid;
  place-items: center;
  padding: 20px;
}
.equip-panel {
  width: min(720px, 100%);
  max-height: 85vh;
  overflow-y: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  position: relative;
}
.equip-close {
  position: absolute;
  top: 14px;
  right: 14px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 18px;
  cursor: pointer;
}
.equip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 16px;
}
.equip-picker-tile { cursor: pointer; }
.shop-tile-name,
.market-tile-name {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 800;
}
.shop-tile-kind {
  margin: 0 0 6px;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}
.shop-tile-desc {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
}
.shop-owned-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(76, 217, 140, 0.2);
  border: 1px solid rgba(76, 217, 140, 0.5);
  color: var(--good);
}
.shop-tile.is-owned { opacity: 0.92; }
.cosmetic-rarity-tag {
  position: absolute;
  bottom: 8px;
  left: 8px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid var(--line);
}
.cosmetic-preview { position: relative; }
.cosmetic-preview-glyph {
  font-size: 36px;
  opacity: 0.85;
}
.market-tile-top {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 12px 0;
  align-items: center;
}
.market-tile-body { padding: 10px 14px 14px; flex: 1; display: grid; gap: 8px; }
.market-tile-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.market-tile-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 4px;
}
.market-kind-badge {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--panel-2);
  border: 1px solid var(--line);
}
.market-preview-placeholder {
  width: 120px;
  height: 168px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--panel-2);
  color: var(--muted);
  font-weight: 700;
}
.market-toolbar,
.shop-toolbar {
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
}
.market-filters-row,
.market-element-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.filter-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.market-select { min-width: 160px; }
.exchange-header { margin-bottom: 4px; }
.market-panel.exchange-page {
  max-width: min(1280px, 100%);
}
.toast-status {
  min-height: 1.4em;
  font-size: 13px;
  color: var(--muted);
}
.loading-shimmer {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px;
  color: var(--muted);
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 1; }
}
.empty-state-icon {
  font-size: 32px;
  margin-bottom: 8px;
  opacity: 0.6;
}
.empty-state h3 { margin: 0 0 8px; }
.empty-state p { margin: 0 0 16px; color: var(--muted); }
.membership-banner-text h3 { margin: 0 0 4px; }
.membership-banner-text p { margin: 0; color: var(--muted); font-size: 14px; }
.how-it-works { margin-top: 8px; }
.how-it-works-compact { margin-top: 24px; }
.facts-wide { max-width: 960px; }
.wallet-label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 2px;
}
.tier-pill {
  text-transform: capitalize;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 12px;
}
.tier-member {
  border-color: rgba(255, 197, 109, 0.5);
  color: #ffc56d;
}
.btn.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.home-hero { display: grid; gap: 16px; }
.panel-subhead {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}
.element-chip {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
}
.sp-badge {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
}
.meta-chip {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--panel-2);
  color: var(--muted);
}
.owned-label {
  display: block;
  text-align: center;
  font-size: 13px;
  color: var(--good);
  font-weight: 700;
}
.market-mode-bar {
  margin: 12px 0 8px;
}
.market-content {
  min-height: 120px;
}
.market-sell-intro {
  margin: 0 0 16px;
}
.market-sell-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.market-sell-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  padding: 14px;
  border-radius: 12px;
  background: var(--panel-2);
  border: 1px solid var(--border);
}
@media (min-width: 720px) {
  .market-sell-row {
    grid-template-columns: 120px 1fr  minmax(280px, 340px);
    align-items: start;
  }
}
.market-sell-card {
  display: flex;
  justify-content: center;
}
.market-sell-mini {
  width: 100px !important;
  max-width: 100px;
}
.market-sell-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: center;
}
.market-sell-name {
  margin: 0;
  font-size: 16px;
}
.market-sell-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.market-sell-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.market-sell-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.market-fee-hint {
  margin: 0;
  font-size: 12px;
}
.market-price-input {
  max-width: 140px;
}
.market-tile-owned {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.market-orders-layout {
  display: grid;
  gap: 16px;
  max-width: 480px;
}
.market-orders-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: none;
}
.market-orders-panel h3 {
  margin: 0;
}
.market-order-field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.market-order-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
.market-order-range {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.market-order-range input {
  width: 100%;
  min-width: 0;
}
.market-order-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  cursor: pointer;
}
.market-order-check input {
  margin: 0;
}
.market-orders-cancel {
  margin-top: 0;
}
.market-bid-panel {
  max-width: 360px;
}
/* ---- Liveness: activity feed, stats, fair-play home ---- */
.landing-top-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  gap: 24px;
  align-items: start;
  position: relative;
}
.landing-live-col {
  display: grid;
  gap: 14px;
  position: sticky;
  top: 12px;
}
.fair-play-badges {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  margin: 0;
}
.fair-play-compact {
  margin: 0;
}
.fair-badge {
  padding: 14px 16px;
  display: grid;
  gap: 4px;
  font-size: 13px;
}
.fair-badge strong {
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}
.fair-badge span {
  color: var(--muted);
  line-height: 1.4;
}
.activity-feed-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.activity-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3ecf8e;
  box-shadow: 0 0 8px rgba(62, 207, 142, 0.8);
  animation: activity-pulse 2s ease-in-out infinite;
}
@keyframes activity-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}
.activity-row {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 8px;
  font-size: 13px;
  line-height: 1.4;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.activity-time {
  color: var(--muted);
  font-size: 12px;
}
.activity-text {
  color: var(--text);
}
.activity-feed-status {
  margin: 8px 0 0;
  font-size: 12px;
  min-height: 1.2em;
}

/* Landing widget skeletons (activity feed, site stats, trend charts) */
.widget-skeleton {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
}
.widget-skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.05) 45%,
    rgba(255, 255, 255, 0.08) 50%,
    rgba(255, 255, 255, 0.05) 55%,
    transparent 100%
  );
  transform: translateX(-100%);
  animation: widget-shimmer 1.35s ease-in-out infinite;
}
@keyframes widget-shimmer {
  to {
    transform: translateX(100%);
  }
}
.widget-skeleton-block,
.widget-skeleton-line,
.widget-skeleton-chart {
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}
.widget-skeleton-line {
  height: 11px;
}
.widget-skeleton-line--short {
  width: 58%;
}
.widget-skeleton-value {
  height: 26px;
  width: 72%;
}
.widget-skeleton-label {
  height: 10px;
  width: 88%;
}
.widget-skeleton-title {
  height: 14px;
  width: 40%;
}
.widget-skeleton-chart {
  height: clamp(132px, 18vw, 176px);
  width: 100%;
  margin-top: 12px;
  border-radius: 10px;
}
.activity-skeleton-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}
.widget-skeleton-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
}
.widget-skeleton-copy {
  display: grid;
  gap: 8px;
  min-width: 0;
}
.site-stat-skeleton {
  border: 1px solid var(--glass-border);
  padding: 14px 16px;
  display: grid;
  gap: 10px;
  min-height: 72px;
}
.site-trend-skeleton {
  padding: clamp(16px, 2.5vw, 22px);
  display: grid;
  gap: 8px;
}
.landing-trends-head {
  margin-bottom: 4px;
}

.site-stats-counters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.landing-stats-card .site-stats-counters {
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}
.site-stat-tile--guest { border-color: color-mix(in srgb, #3ecf8e 35%, var(--line)); }
.site-stat-tile {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 14px 16px;
  display: grid;
  gap: 4px;
}
.site-stat-tile--server { border-color: color-mix(in srgb, #b56bff 35%, var(--line)); }
.site-stat-tile--players { border-color: color-mix(in srgb, #6b8bff 35%, var(--line)); }
.site-stat-tile--listings { border-color: color-mix(in srgb, #3ecf8e 30%, var(--line)); }
.site-stat-tile--visits { border-color: color-mix(in srgb, #e7c14a 30%, var(--line)); }
.site-stat-value {
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.site-stat-label {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}
.site-stats-chart {
  margin-top: 4px;
  min-width: 0;
}
.landing-trends-section {
  width: 100%;
  min-width: 0;
}
.landing-trends-stack {
  display: grid;
  gap: clamp(14px, 2vw, 20px);
  width: 100%;
}
.landing-trends-status {
  margin: 0;
}
.site-trend-card {
  display: grid;
  gap: 16px;
  width: 100%;
  padding: clamp(18px, 2.5vw, 24px);
  min-width: 0;
}
.site-trend-card-head {
  display: grid;
  gap: 8px;
}
.site-trend-card-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 16px;
}
.site-trend-today {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  margin: 0;
}
.site-trend-today-value {
  font-size: clamp(26px, 3.5vw, 34px);
  font-weight: 800;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.site-trend-card--visits .site-trend-today-value { color: #b8a4ff; }
.site-trend-card--guest .site-trend-today-value { color: #6ee7a8; }
.site-trend-card--server .site-trend-today-value { color: #8aa8ff; }
.site-trend-today-label {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.site-trend-card-title {
  margin: 0;
  font-size: clamp(17px, 2vw, 20px);
  font-weight: 700;
  letter-spacing: -0.01em;
}
.site-trend-card--visits .site-trend-card-title { color: #b8a4ff; }
.site-trend-card--guest .site-trend-card-title { color: #6ee7a8; }
.site-trend-card--server .site-trend-card-title { color: #8aa8ff; }
.site-trend-card-summary {
  margin: 0;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.site-trend-card-chart {
  display: grid;
  gap: 10px;
  min-width: 0;
}
.site-trend-chart-wrap {
  position: relative;
  min-width: 0;
}
.site-trend-tooltip {
  position: absolute;
  z-index: 3;
  display: grid;
  gap: 2px;
  padding: 8px 11px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(8, 10, 18, 0.94);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.38);
  pointer-events: none;
  transform: translate(-50%, calc(-100% - 12px));
  opacity: 0;
  transition: opacity 0.14s ease, transform 0.14s ease;
  white-space: nowrap;
}
.site-trend-tooltip:not([hidden]) {
  opacity: 1;
  transform: translate(-50%, calc(-100% - 16px));
}
.site-trend-tooltip-date {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.site-trend-tooltip-value {
  font-size: 16px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.site-trend-point {
  cursor: pointer;
}
.site-trend-point-hit {
  pointer-events: all;
}
.site-trend-point-dot,
.site-trend-point-ring {
  pointer-events: none;
  transition:
    r 0.16s ease,
    opacity 0.16s ease,
    stroke-width 0.16s ease,
    transform 0.16s ease;
  transform-box: fill-box;
  transform-origin: center;
}
.site-trend-point.is-active .site-trend-point-dot {
  r: 7;
  stroke: rgba(255, 255, 255, 0.55);
  stroke-width: 2;
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.35));
}
.site-trend-point.is-active .site-trend-point-ring {
  opacity: 0.55;
  r: 11;
}
.site-trend-point.is-today .site-trend-point-ring {
  opacity: 0.22;
}
.site-trend-svg {
  display: block;
  width: 100%;
  height: clamp(132px, 18vw, 176px);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.24);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.site-trend-day-labels {
  display: grid;
  grid-template-columns: repeat(var(--days, 14), minmax(0, 1fr));
  gap: 4px;
  width: 100%;
  min-width: 0;
}
.site-trend-day-label {
  display: block;
  font-size: 10px;
  line-height: 1.2;
  text-align: center;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  transition: color 0.14s ease, font-weight 0.14s ease;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.site-trend-day-label.is-today {
  color: var(--text);
  font-weight: 700;
}
.site-trend-day-label.is-active {
  color: var(--accent);
  font-weight: 700;
}
.chart-empty {
  margin: 0;
}
.feedback-input {
  width: 100%;
  resize: vertical;
  min-height: 72px;
}
.feedback-panel {
  display: grid;
  gap: 8px;
}
.market-panel.exchange-page {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: stretch;
}
.market-activity-aside {
  width: 100%;
}
.market-activity-aside .activity-feed-inner {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
}
.market-activity-aside .activity-feed-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 8px;
  max-height: none;
  min-height: 0;
  overflow: visible;
}
@media (max-width: 960px) {
  .market-activity-aside .activity-feed-list {
    grid-template-columns: 1fr;
  }
}

.profile-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
}
.profile-stats.compact {
  margin-top: 4px;
}
.profile-stat {
  color: var(--muted);
  font-size: 14px;
}
.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}
.profile-stat-card {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
}
.profile-stat-label {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 4px;
}
.profile-stat-value {
  font-weight: 600;
}
.profile-share-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.profile-share-input {
  flex: 1 1 240px;
}
.profile-section h4 {
  margin: 0 0 8px;
}
.leaderboard-table {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.leaderboard-row {
  display: grid;
  grid-template-columns: 48px 1.4fr 1fr 88px;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-soft);
}
.leaderboard-row.leaderboard-head {
  background: transparent;
  border-color: transparent;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding-top: 0;
}
.leaderboard-player {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.battle-opponent {
  margin-bottom: 12px;
}
.battle-opponent-name {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.battle-your-record {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.linkish {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  padding: 0;
  text-align: left;
}
.linkish:hover {
  text-decoration: underline;
}
.card-leaderboard-host {
  margin: 0;
}
.card-leaderboard-sub {
  margin: 4px 0 0;
  max-width: 48ch;
  line-height: 1.5;
}
.card-leaderboard {
  display: grid;
  gap: 18px;
  min-width: 0;
  padding: clamp(20px, 3vw, 28px);
}
.card-leaderboard-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 20px;
}
.card-leaderboard-intro {
  display: grid;
  gap: 6px;
  min-width: 0;
}
.card-leaderboard-meta {
  margin: 0;
  font-size: 12px;
  white-space: nowrap;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.03);
}
.card-leaderboard-body {
  --leaderboard-row-est: 118px;
  --leaderboard-row-gap: 10px;
  --leaderboard-visible: 5;
  max-height: calc(
    var(--leaderboard-visible) * var(--leaderboard-row-est) +
      (var(--leaderboard-visible) - 1) * var(--leaderboard-row-gap)
  );
  overflow-x: hidden;
  overflow-y: auto;
  margin: 0 -4px;
  padding: 2px 4px 4px;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--line) 80%, transparent) transparent;
}
.card-leaderboard-body::-webkit-scrollbar {
  width: 6px;
}
.card-leaderboard-body::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--line) 80%, transparent);
  border-radius: 999px;
}
.card-leaderboard-list {
  display: grid;
  gap: 10px;
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}
.card-leaderboard-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
}
.card-leaderboard-item.is-gold {
  border-color: color-mix(in srgb, #f0c14b 40%, var(--glass-border));
  background: linear-gradient(145deg, rgba(240, 193, 75, 0.1), rgba(255, 255, 255, 0.02));
}
.card-leaderboard-item.is-silver {
  border-color: color-mix(in srgb, #c0c8d8 35%, var(--glass-border));
}
.card-leaderboard-item.is-bronze {
  border-color: color-mix(in srgb, #c98a5a 35%, var(--glass-border));
}
.card-leaderboard-item-rank {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 15px;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
}
.card-leaderboard-item.is-gold .card-leaderboard-item-rank {
  color: #f0c14b;
  background: color-mix(in srgb, #f0c14b 18%, transparent);
  border-color: color-mix(in srgb, #f0c14b 35%, transparent);
}
.card-leaderboard-item-main {
  display: grid;
  gap: 10px;
  min-width: 0;
}
.card-leaderboard-item-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}
.card-leaderboard-item-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
}
.card-leaderboard-discoverer {
  font-size: 12px;
  margin: 0;
}
.card-leaderboard-view-btn {
  flex-shrink: 0;
}
.card-leaderboard-item-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px 12px;
}
.card-leaderboard-metric {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.card-leaderboard-metric-label {
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.card-leaderboard-metric-value {
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.card-leaderboard-record {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.card-leaderboard-winpct {
  color: var(--good);
}
.card-leaderboard-avgdmg {
  color: var(--accent);
}
.card-leaderboard-name {
  flex: 1 1 auto;
  font-weight: 600;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  -webkit-mask-image: linear-gradient(
    90deg,
    #000 0%,
    #000 calc(100% - 1.75rem),
    transparent 100%
  );
  mask-image: linear-gradient(
    90deg,
    #000 0%,
    #000 calc(100% - 1.75rem),
    transparent 100%
  );
}
.card-leaderboard-empty {
  padding: 8px 0;
}

/* Player leaderboard (landing) */
.player-leaderboard-sub {
  margin: 4px 0 0;
  max-width: 48ch;
  line-height: 1.5;
}
.player-leaderboard {
  display: grid;
  gap: 18px;
  min-width: 0;
  padding: clamp(20px, 3vw, 28px);
}
.player-leaderboard-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 20px;
}
.player-leaderboard-intro {
  display: grid;
  gap: 6px;
  min-width: 0;
}
.player-leaderboard-meta {
  margin: 0;
  font-size: 12px;
  white-space: nowrap;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.03);
}
.player-leaderboard-body {
  --leaderboard-row-est: 104px;
  --leaderboard-row-gap: 10px;
  --leaderboard-visible: 5;
  max-height: calc(
    var(--leaderboard-visible) * var(--leaderboard-row-est) +
      (var(--leaderboard-visible) - 1) * var(--leaderboard-row-gap)
  );
  overflow-x: hidden;
  overflow-y: auto;
  margin: 0 -4px;
  padding: 2px 4px 4px;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--line) 80%, transparent) transparent;
}
.player-leaderboard-body::-webkit-scrollbar {
  width: 6px;
}
.player-leaderboard-body::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--line) 80%, transparent);
  border-radius: 999px;
}
.player-leaderboard-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.player-leaderboard-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
}
.player-leaderboard-item.is-gold {
  border-color: color-mix(in srgb, #f0c14b 40%, var(--glass-border));
}
.player-leaderboard-item.is-silver {
  border-color: color-mix(in srgb, #c0c8d8 35%, var(--glass-border));
}
.player-leaderboard-item.is-bronze {
  border-color: color-mix(in srgb, #c98a5a 35%, var(--glass-border));
}
.player-leaderboard-item-rank {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 15px;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
}
.player-leaderboard-item.is-gold .player-leaderboard-item-rank {
  color: #f0c14b;
  background: color-mix(in srgb, #f0c14b 18%, transparent);
  border-color: color-mix(in srgb, #f0c14b 35%, transparent);
}
.player-leaderboard-item-main {
  display: grid;
  gap: 10px;
  min-width: 0;
}
.player-leaderboard-item-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}
.player-leaderboard-name {
  font-weight: 600;
  font-size: 15px;
  text-align: left;
  min-width: 0;
}
.player-leaderboard-record {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.player-leaderboard-item-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
}
.player-leaderboard-metric {
  display: grid;
  gap: 2px;
}
.player-leaderboard-metric-label {
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.player-leaderboard-metric-value {
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.player-leaderboard-winpct {
  color: var(--good);
}
.player-leaderboard-profile-btn {
  justify-self: start;
}
.player-leaderboard-empty {
  padding: 8px 0;
}

.inspect-provenance {
  margin-top: 8px;
}
.inspect-provenance-user {
  margin: 0 0 4px;
}
.inspect-provenance-mint {
  margin: 0;
}

/* ---- Landing ---- */
.pre-alpha-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding: 0;
  border: none;
  border-radius: 0;
  background: none;
}
.pre-alpha-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--glass-border);
  white-space: nowrap;
}
.pre-alpha-note {
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
}
.landing-guest,
.landing-home {
  display: block;
  padding-top: 0;
}
.landing-section {
  display: grid;
  gap: 16px;
  min-width: 0;
}
.landing-widget-head {
  display: grid;
  gap: 6px;
  margin: 0 0 4px;
}
.landing-widget-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.landing-widget-lead {
  margin: 0;
  max-width: 52ch;
  line-height: 1.5;
  font-size: 14px;
}
.landing-leaderboard-section,
.landing-leaderboards-section,
.landing-feedback-section {
  min-width: 0;
  overflow: visible;
}
.landing-leaderboards-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 2.5vw, 24px);
  align-items: start;
  overflow: visible;
}
.landing-leaderboard-host {
  min-width: 0;
  overflow: visible;
}
.card-leaderboard.panel,
.player-leaderboard.panel {
  overflow: visible;
}
.landing-bento {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(16px, 2.5vw, 24px);
  align-items: stretch;
}
.landing-bento-card {
  min-height: 340px;
  padding: clamp(20px, 3vw, 28px);
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.section-eyebrow {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.section-title {
  margin: 0;
  font-size: clamp(24px, 3vw, 32px);
  letter-spacing: -0.02em;
}
.section-title-sm {
  font-size: clamp(20px, 2.5vw, 26px);
}
.section-lead {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  max-width: 56ch;
  font-size: 15px;
}
.landing-hero {
  display: grid;
  gap: clamp(12px, 1.8vw, 18px);
  padding: 8px 0 12px;
  max-width: min(52rem, 100%);
  border: none;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  animation: landing-fade-up 0.7s ease both;
}
.landing-hero-home {
  max-width: 36rem;
  animation-delay: 0.05s;
}
.landing-hero .wallet-strip {
  margin: 4px 0 0;
  max-width: 28rem;
  background: color-mix(in srgb, var(--panel) 70%, transparent);
  border-color: var(--glass-border);
}
.landing-hero .hero-kicker,
.landing-hero .hero-title,
.landing-hero .hero-headline,
.landing-hero .hero-sub,
.landing-hero .hero-actions {
  margin: 0;
}
.landing-hero .hero-title {
  overflow: visible;
  line-height: 1.12;
  padding-bottom: 0.08em;
}
.landing-hero .hero-brand {
  display: inline-block;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.12;
  padding-bottom: 0.06em;
}
.landing-hero .hero-headline {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--text);
  animation: landing-fade-up 0.75s ease 0.08s both;
}
.landing-hero .hero-sub {
  max-width: none;
  font-size: clamp(0.95rem, 1.5vw, 1.05rem);
  line-height: 1.55;
  color: var(--muted);
  animation: landing-fade-up 0.75s ease 0.14s both;
  white-space: nowrap;
}
@media (max-width: 720px) {
  .landing-hero .hero-sub {
    white-space: normal;
  }
}
.landing-hero .hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 2px;
  animation: landing-fade-up 0.75s ease 0.2s both;
}
.landing-details-link {
  appearance: none;
  -webkit-appearance: none;
  justify-self: start;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  letter-spacing: 0.04em;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: color-mix(in srgb, var(--muted) 45%, transparent);
  transition: color 0.15s ease;
  animation: landing-fade-up 0.75s ease 0.26s both;
}
.landing-details-link:hover {
  color: var(--text);
}
.landing-flow {
  animation: landing-fade-up 0.8s ease 0.28s both;
}
.landing-flow-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 3vw, 28px);
  border-top: 1px solid var(--glass-border);
  border-bottom: 1px solid var(--glass-border);
  padding: clamp(18px, 2.5vw, 24px) 0;
}
.landing-flow-step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
}
.landing-flow-num {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--accent);
  padding-top: 2px;
}
.landing-flow-copy {
  display: grid;
  gap: 4px;
}
.landing-flow-copy strong {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.landing-flow-copy span {
  font-size: 14px;
  line-height: 1.45;
  color: var(--muted);
}
.landing-live {
  display: grid;
  gap: clamp(24px, 3.5vw, 36px);
  animation: landing-fade-up 0.85s ease 0.34s both;
}
.landing-section-head {
  margin-bottom: 4px;
}
@keyframes landing-fade-up {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (prefers-reduced-motion: reduce) {
  .landing-hero,
  .landing-hero .hero-headline,
  .landing-hero .hero-sub,
  .landing-hero .hero-actions,
  .landing-details-link,
  .landing-flow,
  .landing-live {
    animation: none;
  }
}
.landing-content .panel-subhead,
.landing-content .hint,
.landing-content .card-leaderboard-sub,
.landing-content .card-leaderboard-status,
.landing-content .feedback-wall-status,
.landing-content .landing-widget-lead {
  margin: 0;
}
.landing-play-btn {
  min-width: 160px;
}
.how-steps-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.how-step-card {
  display: grid;
  gap: 12px;
  padding: 20px;
  min-height: 0;
}
.how-step-shine {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(107, 139, 255, 0.55) 35%,
    rgba(192, 107, 255, 0.45) 65%,
    transparent
  );
}
.how-step-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.how-step-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 20px;
  background: linear-gradient(145deg, rgba(107, 139, 255, 0.28), rgba(107, 139, 255, 0.06));
  border: 1px solid rgba(107, 139, 255, 0.25);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.how-step-num {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--muted);
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.03);
}
.how-step-card h3 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.01em;
}
.how-step-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}
.principles-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.principle-card {
  padding: 20px;
  display: grid;
  gap: 10px;
  align-content: start;
}
.principle-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
}
.principle-card h3 {
  margin: 0;
  font-size: 16px;
}
.principle-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}
.landing-community {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 16px;
}
.landing-community-card {
  min-height: 0;
  padding: 20px;
  display: flex;
  flex-direction: column;
}
.activity-feed-inner,
.site-stats-inner {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  min-height: 0;
}
.activity-feed-list {
  display: grid;
  gap: 8px;
  flex: 1;
  min-height: 180px;
  max-height: min(360px, 42vh);
  overflow-y: auto;
  padding-right: 4px;
}
.activity-card-body {
  min-width: 0;
}
.activity-card {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
}
.activity-card-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.04);
  font-size: 14px;
}
.activity-card-text {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
}
.activity-card-detail {
  font-size: 12px;
  margin-top: 2px;
}
.activity-card-time {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}
.feedback-wall {
  display: grid;
  gap: 20px;
  padding: clamp(20px, 3vw, 28px);
}
.feedback-wall-header {
  display: grid;
  gap: 6px;
}
.feedback-wall-lead {
  margin: 0;
  max-width: 52ch;
  line-height: 1.55;
}
.feedback-wall-layout {
  display: grid;
  grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
  gap: clamp(16px, 2.5vw, 24px);
  align-items: stretch;
}
.feedback-wall-compose,
.feedback-wall-posts {
  display: grid;
  gap: 14px;
  padding: 18px 20px;
  border-radius: 14px;
  border: 1px solid var(--glass-border);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
  min-width: 0;
}
.feedback-compose-head,
.feedback-posts-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--glass-border);
}
.feedback-compose-title,
.feedback-posts-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
}
.feedback-compose-meta {
  margin: 4px 0 0;
}
.feedback-posts-live {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.feedback-wall-input {
  width: 100%;
  min-height: 140px;
  resize: vertical;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 12px;
  padding: 14px 16px;
  font: inherit;
  line-height: 1.55;
}
.feedback-wall-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent);
}
.feedback-compose-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
}
.feedback-char-count {
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.feedback-wall-feed {
  display: grid;
  gap: 12px;
  max-height: min(520px, 60vh);
  overflow-y: auto;
  padding-right: 6px;
  margin-right: -2px;
}
.feedback-empty {
  margin: 0;
  padding: 24px 12px;
  text-align: center;
}
.feedback-post {
  padding: 16px 18px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--line);
}
.feedback-post-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.feedback-post-author {
  font-weight: 700;
  font-size: 13px;
  color: var(--accent);
}
.feedback-post-time {
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}
.feedback-post-body {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.6;
  font-size: 14px;
}
@media (max-width: 960px) {
  .landing-flow-list {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .landing-bento,
  .landing-community,
  .landing-leaderboards-grid,
  .feedback-wall-layout {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 560px) {
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .site-chart-row-meta {
    white-space: normal;
    text-align: right;
    max-width: 46%;
  }
  .landing-content {
    gap: 28px;
  }
  .card-leaderboard-item-metrics {
    grid-template-columns: 1fr 1fr;
  }
}

/* ---- SEO / static pages ---- */
.hero-brand {
  display: block;
  font-size: clamp(42px, 7vw, 64px);
  letter-spacing: -0.03em;
  line-height: 1.12;
  padding-bottom: 0.06em;
}
.footer-nav {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 2px;
}
.footer-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.footer-nav a:hover {
  color: var(--text);
}
.seo-noscript {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 20px;
  line-height: 1.6;
}
.seo-noscript h1 {
  font-size: 1.5rem;
  margin: 0 0 12px;
}
.seo-noscript p {
  margin: 0 0 12px;
  color: var(--muted);
}
.seo-noscript a {
  color: var(--accent);
}
.seo-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
}
.seo-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--line);
}
.seo-page-brand {
  font-weight: 800;
  letter-spacing: 0.18em;
  color: var(--text);
  text-decoration: none;
}
.seo-page-nav {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.seo-page-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.seo-page-nav a:hover,
.seo-page-nav a[aria-current="page"] {
  color: var(--text);
}
.seo-page-main {
  flex: 1;
  width: min(720px, 100%);
  margin: 0 auto;
  padding: 32px 24px 48px;
}
.seo-page-main h1 {
  margin: 0 0 16px;
  font-size: clamp(28px, 5vw, 40px);
  line-height: 1.1;
}
.seo-page-main h2 {
  margin: 28px 0 10px;
  font-size: 20px;
}
.seo-page-lead {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.6;
}
.seo-page-main ul,
.seo-faq-list {
  margin: 0;
  padding-left: 1.2em;
  color: var(--muted);
  line-height: 1.65;
}
.seo-page-main li,
.seo-faq-list dd {
  margin-bottom: 10px;
}
.seo-faq-list dt {
  margin-top: 20px;
  font-weight: 700;
  color: var(--text);
}
.seo-faq-list dt:first-child {
  margin-top: 0;
}
.seo-faq-list dd {
  margin: 8px 0 0;
  padding: 0;
}
.seo-faq-list a {
  color: var(--accent);
}
.seo-page-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}
