:root {
  --bg: #0e1016;
  --bg-elev: #161922;
  --bg-panel: #1c2030;
  --grid-empty: #12141a;
  --grid-empty-alt: #181b24;
  --line: #2a2f3d;
  --line-strong: #3a4155;
  --text: #f4f2eb;
  --muted: #c8c4d4;
  --gold: #d4b22e;
  --gold-bright: #ffe566;
  --gold-dim: #2a2614;
  --ink-on-gold: #0c0a04;
  --btn-text: #f4f2eb;
  --danger: #e85d5d;
  --ok: #3dd68c;
  --topbar-h: 0px;
  --dock-w: min(340px, 94vw);
  --drawer-w: min(320px, 88vw);
  --radius: 0;
  --font: "Comic Neue", "Comic Sans MS", cursive;
  --shadow: 4px 4px 0 #000;
  --pixel: 2px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  border-radius: 0 !important;
}

html {
  margin: 0;
}

body.app {
  margin: 0;
  height: 100%;
  overflow: hidden;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 400;
  color: var(--text);
  background: var(--bg);
  image-rendering: pixelated;
  -webkit-font-smoothing: none;
  touch-action: none;
}

body:not(.app) {
  margin: 0;
  min-height: 100%;
  overflow: auto;
  overflow-x: hidden;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 400;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  touch-action: auto;
}

a {
  color: var(--gold-bright);
}

.material-symbols-outlined {
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
  vertical-align: middle;
  font-size: 20px;
  font-weight: 400;
}

strong,
b,
h1, h2, h3, h4,
.btn,
.brand-text strong,
.price-card strong,
.credit-chip strong {
  font-weight: 400 !important;
}

/*  -  -  Pixel logo  -  -  */
.pixel-logo {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  image-rendering: pixelated;
  display: block;
}

.brand-mark {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 2px solid var(--gold);
  background: var(--grid-empty);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  overflow: hidden;
}

.brand-mark .pixel-logo {
  width: 100%;
  height: 100%;
}

/* Splash intro */
.splash {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: var(--bg);
  transition: opacity 0.35s steps(6), visibility 0.35s;
}

.splash.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash-inner {
  text-align: center;
  animation: splash-pop 0.45s steps(6) both;
}

.splash-logo {
  width: 72px;
  height: 72px;
  margin: 0 auto 14px;
  border: 3px solid var(--gold-bright);
  box-shadow: 6px 6px 0 #000;
  animation: splash-logo 0.5s steps(5) both;
}

.splash-logo .pixel-logo {
  width: 100%;
  height: 100%;
}

.splash-name {
  margin: 0;
  font-size: 28px;
  color: var(--gold-bright);
  letter-spacing: 0.04em;
  text-shadow: 3px 3px 0 #000;
}

.splash-sub {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  animation: splash-fade 0.55s steps(3) both;
}

@keyframes splash-pop {
  0% { transform: scale(0.6); opacity: 0; }
  60% { transform: scale(1.05); opacity: 1; }
  100% { transform: scale(1); }
}

@keyframes splash-logo {
  0% { transform: translateY(12px) scale(0.5); filter: brightness(0.5); }
  100% { transform: none; filter: none; }
}

@keyframes splash-fade {
  0%, 40% { opacity: 0; }
  100% { opacity: 1; }
}

/* Logo tip balloon after intro zoom */
.zoom-tip {
  position: fixed;
  left: 64px;
  top: 12px;
  z-index: 55;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  pointer-events: none;
  animation: zoom-tip-in 0.35s steps(5) both;
}

.zoom-tip[hidden] {
  display: none !important;
}

.zoom-tip.is-hiding {
  animation: zoom-tip-out 0.35s steps(4) both;
}

.zoom-tip-mascot {
  width: 48px;
  height: 48px;
  border: 3px solid #1a1408;
  background: var(--grid-empty);
  box-shadow: 3px 3px 0 #000;
  flex-shrink: 0;
  image-rendering: pixelated;
}

.zoom-tip-mascot .pixel-logo {
  width: 100%;
  height: 100%;
}

.zoom-tip-balloon {
  position: relative;
  max-width: min(260px, 72vw);
  padding: 10px 12px;
  background: #fff8dc;
  color: #0c0a04;
  border: 3px solid #1a1408;
  box-shadow:
    inset -2px -2px 0 #c2a633,
    inset 2px 2px 0 #fff,
    3px 3px 0 #000;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  image-rendering: pixelated;
}

.zoom-tip-balloon::before {
  content: "";
  position: absolute;
  left: -10px;
  top: 14px;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 6px 10px 6px 0;
  border-color: transparent #1a1408 transparent transparent;
}

.zoom-tip-balloon::after {
  content: "";
  position: absolute;
  left: -6px;
  top: 16px;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 4px 7px 4px 0;
  border-color: transparent #fff8dc transparent transparent;
}

.zoom-tip-balloon p {
  margin: 0;
}

@keyframes zoom-tip-in {
  from {
    opacity: 0;
    transform: translate(-6px, -4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes zoom-tip-out {
  to {
    opacity: 0;
    transform: translate(-4px, -2px);
  }
}

@media (max-width: 899px) {
  .zoom-tip {
    left: 8px;
    top: 8px;
  }

  .zoom-tip-mascot {
    width: 40px;
    height: 40px;
  }

  .zoom-tip-balloon {
    font-size: 13px;
    padding: 8px 10px;
  }
}

/* Corner leaderboard */
.corner-btn {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 45;
  width: 44px;
  height: 44px;
  appearance: none;
  border: 3px solid #1a1408;
  background: #c2a633;
  color: #1a1408;
  display: grid;
  place-items: center;
  cursor: pointer;
  image-rendering: pixelated;
  box-shadow:
    inset -3px -3px 0 #8a7420,
    inset 3px 3px 0 #f2c94c,
    3px 3px 0 #000;
  animation: corner-in 0.45s steps(5) 1.1s both;
}

.corner-btn:hover {
  background: #f2c94c;
}

.corner-btn:active {
  transform: translate(2px, 2px);
  box-shadow:
    inset 3px 3px 0 #8a7420,
    inset -1px -1px 0 #f2c94c,
    1px 1px 0 #000;
}

@keyframes corner-in {
  from { transform: translateX(-60px); opacity: 0; }
  to { transform: none; opacity: 1; }
}

.leader-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--drawer-w);
  z-index: 46;
  background: var(--bg-elev);
  border-right: 2px solid var(--line-strong);
  box-shadow: 6px 0 0 #000;
  transform: translateX(-105%);
  transition: transform 0.28s steps(8);
  display: flex;
  flex-direction: column;
}

.leader-drawer.is-open {
  transform: translateX(0);
}

.drawer-scrim {
  position: fixed;
  inset: 0;
  z-index: 44;
  background: rgba(0, 0, 0, 0.45);
  border: 0;
  padding: 0;
  cursor: pointer;
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-bottom: 2px solid var(--line);
}

.drawer-head h2 {
  margin: 0;
  font-size: 18px;
  color: var(--gold-bright);
}

.drawer-body {
  padding: 14px;
  overflow: auto;
  flex: 1;
}

.pow-soon {
  margin: 0 0 14px;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text);
  background: #12151c;
  border: 2px solid var(--line);
  border-left: 4px solid var(--gold);
}

.stack-credits {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 2px solid var(--line);
}

.stack-credits h3 {
  margin: 0 0 6px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 400;
}

.stack-credits p {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}

.stack-credits a {
  color: var(--gold-bright);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.stack-credits a:hover {
  color: #fff8dc;
}

/* HUD credit */
.hud-credit {
  position: fixed;
  left: 12px;
  bottom: 12px;
  z-index: 30;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 6px 6px 10px;
  background: var(--bg-elev);
  border: 2px solid var(--gold);
  box-shadow: 3px 3px 0 #000;
  color: var(--gold-bright);
  font-size: 14px;
}

.hud-credit .unit {
  color: var(--muted);
  font-size: 11px;
}

.hud-credit .btn {
  margin-left: 4px;
}

/* Mobile-only bottom bar */
.mobile-bar {
  display: none;
}

@media (max-width: 899px) {
  .mobile-bar {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    align-items: stretch;
    justify-content: space-around;
    gap: 5px;
    padding: 7px 6px calc(7px + env(safe-area-inset-bottom, 0px));
    background:
      repeating-linear-gradient(
        90deg,
        transparent,
        transparent 3px,
        rgba(242, 201, 76, 0.05) 3px,
        rgba(242, 201, 76, 0.05) 4px
      ),
      #161922;
    border-top: 3px solid #1a1408;
    box-shadow:
      0 -3px 0 #000,
      inset 0 2px 0 #3a4155;
    image-rendering: pixelated;
  }

  .mbar-btn {
    appearance: none;
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 5px 2px 4px;
    border: 3px solid #1a1408;
    background: #3a4155;
    color: #f4f2eb;
    font-family: var(--font);
    font-size: 9px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    image-rendering: pixelated;
    box-shadow:
      inset -2px -2px 0 #1a1e2a,
      inset 2px 2px 0 #5a6278,
      2px 2px 0 #000;
  }

  .mbar-btn .material-symbols-outlined {
    font-size: 20px;
    color: var(--gold-bright);
    line-height: 1;
  }

  .mbar-btn:hover {
    background: #4a5268;
  }

  .mbar-btn:active {
    transform: translate(1px, 1px);
    background: #c2a633;
    color: #1a1408;
    box-shadow:
      inset 2px 2px 0 #8a7420,
      inset -1px -1px 0 #f2c94c,
      1px 1px 0 #000;
  }

  .mbar-btn:active .material-symbols-outlined {
    color: #1a1408;
  }

  .mbar-credit {
    flex: 1.15;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 4px 4px;
    background: #ffe566;
    border: 3px solid #1a1408;
    color: #0c0a04;
    font-size: 15px;
    font-weight: 700;
    image-rendering: pixelated;
    box-shadow:
      inset -2px -2px 0 #c2a633,
      inset 2px 2px 0 #fff3a8,
      2px 2px 0 #000;
    text-shadow: none;
  }

  .mbar-credit .doge-sym {
    font-size: 13px;
    font-weight: 700;
    color: #0c0a04;
    line-height: 1;
  }

  .mbar-credit strong {
    line-height: 1.15;
    font-weight: 700;
    font-size: 16px;
    color: #0c0a04;
    letter-spacing: 0.02em;
  }

  .corner-btn,
  .hud-credit {
    display: none !important;
  }

  .zoom-cluster {
    bottom: calc(72px + env(safe-area-inset-bottom, 0px));
    right: 8px;
  }

  .board-hint {
    bottom: calc(76px + env(safe-area-inset-bottom, 0px));
    left: 8px;
    right: 72px;
  }

  .lock-bar {
    bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  }

  .leader-drawer {
    bottom: calc(64px + env(safe-area-inset-bottom, 0px));
  }

  .toast-host {
    bottom: calc(78px + env(safe-area-inset-bottom, 0px));
  }
}

.lock-bar {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(232, 93, 93, 0.95);
  border: 2px solid #fff;
  color: #fff;
  font-size: 13px;
  box-shadow: 4px 4px 0 #000;
  white-space: nowrap;
  max-width: 92vw;
}

.lock-bar[hidden] {
  display: none !important;
}

/*  -  -  Top bar (removed)  -  -  */
.topbar {
  display: none !important;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-text strong {
  font-family: var(--font);
  font-size: 15px;
  letter-spacing: 0.02em;
  line-height: 1.1;
  color: var(--gold-bright);
}

.brand-text small {
  color: var(--muted);
  font-size: 11px;
}

.topnav {
  display: none;
  gap: 4px;
  margin-left: 6px;
}

.topnav-btn {
  appearance: none;
  border: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  padding: 6px 10px;
  cursor: pointer;
}

.topnav-btn:hover {
  color: var(--text);
  border-color: var(--line);
  background: var(--bg-panel);
}

.top-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.credit-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 8px;
  background: var(--bg-panel);
  border: 2px solid var(--line-strong);
  font-size: 13px;
}

.credit-chip .unit {
  color: var(--gold);
}

.btn {
  appearance: none;
  border: 3px solid #1a1408;
  background: #3a4155;
  color: #f4f2eb;
  font-family: var(--font);
  font-size: 14px;
  padding: 10px 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
  image-rendering: pixelated;
  box-shadow:
    inset -3px -3px 0 #1a1e2a,
    inset 3px 3px 0 #5a6278,
    3px 3px 0 #000;
  text-transform: none;
  letter-spacing: 0.02em;
}

.btn:hover {
  border-color: #1a1408;
  color: #fff8dc;
  background: #4a5268;
  filter: none;
}

.btn:active {
  transform: translate(2px, 2px);
  box-shadow:
    inset 3px 3px 0 #1a1e2a,
    inset -1px -1px 0 #5a6278,
    1px 1px 0 #000;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow:
    inset -2px -2px 0 #1a1e2a,
    inset 2px 2px 0 #5a6278,
    2px 2px 0 #000;
}

.btn-gold {
  background: #c2a633;
  color: #1a1408;
  border-color: #1a1408;
  box-shadow:
    inset -3px -3px 0 #8a7420,
    inset 3px 3px 0 #f2c94c,
    3px 3px 0 #000;
}

.btn-gold:hover {
  background: #d4b22e;
  color: #1a1408;
  border-color: #1a1408;
  filter: none;
}

.btn-gold:active {
  box-shadow:
    inset 3px 3px 0 #8a7420,
    inset -1px -1px 0 #f2c94c,
    1px 1px 0 #000;
}

.btn-ghost {
  background: #1c2030;
  box-shadow:
    inset -2px -2px 0 #0a0c12,
    inset 2px 2px 0 #3a4155,
    2px 2px 0 #000;
}

.btn-block {
  width: 100%;
}

.icon-btn {
  appearance: none;
  border: 3px solid #1a1408;
  background: #3a4155;
  color: #f4f2eb;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow:
    inset -2px -2px 0 #1a1e2a,
    inset 2px 2px 0 #5a6278,
    2px 2px 0 #000;
  image-rendering: pixelated;
}

.icon-btn:hover {
  border-color: #1a1408;
  background: #4a5268;
}

.icon-btn:active {
  transform: translate(1px, 1px);
}

/*  -  -  Board  -  -  */
.board-viewport {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 7px,
      rgba(255, 255, 255, 0.015) 7px,
      rgba(255, 255, 255, 0.015) 8px
    ),
    var(--bg);
  cursor: grab;
  z-index: 1;
}

.board-viewport.is-panning {
  cursor: grabbing;
}

.board-viewport::after {
  display: none;
}

.board-world {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: 0 0;
  will-change: transform;
}

#war-canvas {
  display: block;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  background: var(--grid-empty);
  box-shadow: 4px 4px 0 #000, 0 0 0 2px var(--line-strong);
  cursor: crosshair;
}

.board-hint {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  margin: 0;
  padding: 6px 12px;
  background: var(--bg-elev);
  border: 2px solid var(--line-strong);
  color: var(--muted);
  font-size: 12px;
  pointer-events: none;
  z-index: 2;
  white-space: nowrap;
  max-width: 92vw;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 2px 2px 0 #000;
}

.zoom-cluster {
  position: fixed;
  right: 12px;
  bottom: 12px;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  background: #1c2030;
  border: 3px solid #1a1408;
  box-shadow:
    inset -2px -2px 0 #0a0c12,
    inset 2px 2px 0 #3a4155,
    3px 3px 0 #000;
}

.zoom-btn {
  appearance: none;
  border: 2px solid #1a1408;
  width: 32px;
  height: 32px;
  background: #3a4155;
  color: #f4f2eb;
  font-family: var(--font);
  font-size: 16px;
  cursor: pointer;
  box-shadow:
    inset -2px -2px 0 #1a1e2a,
    inset 2px 2px 0 #5a6278;
  image-rendering: pixelated;
}

.zoom-btn:hover {
  border-color: #1a1408;
  color: #fff8dc;
  background: #4a5268;
}

.zoom-btn:active {
  transform: translate(1px, 1px);
  box-shadow: inset 2px 2px 0 #1a1e2a;
}

#zoom-label {
  min-width: 3.2em;
  text-align: center;
  font-size: 11px;
  color: var(--muted);
}

/*  -  -  Pixel dock  -  -  */
.pixel-dock {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: var(--dock-w);
  z-index: 45;
  background: var(--bg-elev);
  border-left: 2px solid var(--line-strong);
  box-shadow: -4px 0 0 #000;
  transform: translateX(105%);
  transition: transform 0.2s steps(6);
  display: flex;
  flex-direction: column;
}

.pixel-dock.is-open {
  transform: translateX(0);
}

.dock-scrim {
  position: fixed;
  inset: 0;
  z-index: 44;
  background: rgba(0, 0, 0, 0.5);
  border: 0;
  padding: 0;
  cursor: pointer;
}

.dock-handle {
  display: none;
}

.dock-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 14px 12px;
  border-bottom: 2px solid var(--line-strong);
  background:
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 3px,
      rgba(242, 201, 76, 0.04) 3px,
      rgba(242, 201, 76, 0.04) 4px
    ),
    var(--bg-panel);
}

.dock-id .dock-kicker {
  display: block;
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.dock-head h2 {
  margin: 4px 0 0;
  font-family: var(--font);
  font-size: 22px;
  letter-spacing: 0.02em;
  color: var(--gold-bright);
}

.dock-body {
  padding: 12px;
  overflow: auto;
  flex: 1;
  -webkit-user-select: text;
  user-select: text;
  touch-action: pan-y;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.wiz-rail {
  list-style: none;
  margin: 0;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  background: #0a0c12;
  border: 2px solid var(--line-strong);
  box-shadow: inset 0 0 0 1px #1a1e2a, 2px 2px 0 #000;
}

.wiz-rail-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 0;
  opacity: 0.45;
  transition: opacity 0.15s steps(2);
}

.wiz-rail-item.is-on,
.wiz-rail-item.is-done {
  opacity: 1;
}

.wiz-dot {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  background: var(--bg-panel);
  border: 2px solid var(--line-strong);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  box-shadow: 2px 2px 0 #000;
}

.wiz-rail-item.is-on .wiz-dot {
  background: #ffe566;
  color: #0c0a04;
  border-color: #1a1408;
  text-shadow: none;
  box-shadow:
    inset -2px -2px 0 #c2a633,
    inset 2px 2px 0 #fff3a8,
    2px 2px 0 #000;
}

.wiz-rail-item.is-done .wiz-dot {
  background: #1a2a1a;
  border-color: var(--ok);
  color: #7dffb2;
}

.wiz-lab {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.wiz-rail-item.is-on .wiz-lab {
  color: var(--gold-bright);
}

.wiz-rail-sep {
  width: 12px;
  height: 2px;
  flex-shrink: 0;
  background: var(--line-strong);
  align-self: center;
  margin-bottom: 14px;
}

.wiz-block {
  margin: 0;
  padding: 10px;
  background: var(--bg-panel);
  border: 2px solid var(--line);
  box-shadow: 2px 2px 0 #000;
}

.wiz-block-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 10px;
}

.wiz-block-num {
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--gold);
}

.wiz-block-head h3 {
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff8dc;
}

.coord-board {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.coord-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 8px;
  background: #0a0c12;
  border: 2px solid var(--line-strong);
  box-shadow: inset -2px -2px 0 #000;
  text-align: center;
}

.coord-lbl {
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--muted);
}

.coord-val {
  width: 100%;
  border: 0;
  background: transparent;
  font-size: 26px;
  line-height: 1;
  color: var(--gold-bright);
  font-family: var(--font);
  font-variant-numeric: tabular-nums;
  text-align: center;
  padding: 0;
  margin: 0;
  outline: none;
  -moz-appearance: textfield;
}

.coord-val::-webkit-outer-spin-button,
.coord-val::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.coord-val:focus {
  color: #fff8dc;
}

.price-board {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background:
    repeating-conic-gradient(from 0deg at 50% 50%, #12141a 0% 25%, #0a0c12 0% 50%) 0 0 / 8px 8px;
  border: 2px solid var(--gold);
  box-shadow: 3px 3px 0 #000, inset 0 0 0 1px #3a3418;
}

.price-tag {
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--muted);
  writing-mode: horizontal-tb;
}

.price-line {
  margin: 0;
  font-size: 32px;
  line-height: 1;
  color: var(--gold-bright);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.price-doge {
  margin-left: 4px;
  font-size: 18px;
  color: #fff8dc;
}

.dock-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 2px;
}

.btn-insert {
  min-height: 44px;
  font-size: 15px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.btn-insert.is-pulse {
  animation: insert-blink 0.8s steps(2) infinite;
}

@keyframes insert-blink {
  0%,
  100% {
    background: #c2a633;
    box-shadow:
      inset -3px -3px 0 #8a7420,
      inset 3px 3px 0 #f2c94c,
      3px 3px 0 #000;
  }
  50% {
    background: #f2c94c;
    box-shadow:
      inset -3px -3px 0 #c2a633,
      inset 3px 3px 0 #fff3a8,
      3px 3px 0 #000;
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn-insert.is-pulse {
    animation: none;
    outline: 2px solid #fff3a8;
  }
}

/* Doge meme rain */
.doge-rain {
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  overflow: hidden;
}

.doge-meme {
  position: absolute;
  font-family: var(--font);
  font-size: clamp(16px, 3.5vw, 28px);
  font-weight: 400;
  text-shadow: 2px 2px 0 #000;
  white-space: nowrap;
  animation: doge-float 1.4s ease-out forwards;
  will-change: transform, opacity;
  contain: layout style;
}

@keyframes doge-float {
  0% {
    transform: translateY(0) scale(0.85);
    opacity: 0;
  }
  15% {
    opacity: 1;
    transform: translateY(-6px) scale(1);
  }
  100% {
    transform: translateY(-72px) scale(1);
    opacity: 0;
  }
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.pix-swatch {
  height: 36px;
  border: 2px solid var(--line-strong);
  margin-bottom: 10px;
  background: #333;
  box-shadow: inset -2px -2px 0 #000;
}

.pix-meta {
  margin: 0 0 10px;
}

.pix-meta div {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 8px;
  padding: 5px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.pix-meta dt {
  color: var(--muted);
}

.pix-meta dd {
  margin: 0;
}

.price-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  background: var(--gold-dim);
  border: 2px solid var(--gold);
  margin-bottom: 12px;
  box-shadow: 3px 3px 0 #000;
}

.price-card span {
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold-bright);
}

.price-card strong {
  font-family: var(--font);
  font-size: 26px;
  color: var(--gold-bright);
}

.color-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 12px;
}

#color-picker {
  width: 42px;
  height: 42px;
  border: 2px solid var(--line-strong);
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.swatches {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
  flex: 1;
}

.swatch {
  aspect-ratio: 1;
  border: 2px solid #000;
  cursor: pointer;
  padding: 0;
}

.swatch.is-active {
  outline: 2px solid var(--gold-bright);
  outline-offset: 1px;
}

.lock-banner,
.lock-timer {
  margin: 10px 0;
  padding: 8px 10px;
  background: rgba(232, 93, 93, 0.12);
  border: 2px solid var(--danger);
  color: #ffb4b4;
  font-size: 12px;
  text-align: center;
}

.dock-section {
  margin-top: 16px;
}

.dock-section h3 {
  margin: 0 0 8px;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.hist-list,
.hot-list,
.feed,
.leaderboard,
.ledger-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.hist-list li,
.feed li {
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}

.feed li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.feed .dot {
  width: 10px;
  height: 10px;
  flex-shrink: 0;
  border: 1px solid #000;
}

.hot-item,
.lb-btn {
  width: 100%;
  appearance: none;
  border: 3px solid #1a1408;
  background: #3a4155;
  color: #f4f2eb;
  padding: 8px 10px;
  margin-bottom: 6px;
  cursor: pointer;
  text-align: left;
  font: inherit;
  image-rendering: pixelated;
  box-shadow:
    inset -2px -2px 0 #1a1e2a,
    inset 2px 2px 0 #5a6278,
    2px 2px 0 #000;
}

.hot-item:hover,
.lb-btn:hover {
  border-color: #1a1408;
  background: #4a5268;
  color: #fff8dc;
}

.hot-item:active,
.lb-btn:active {
  transform: translate(1px, 1px);
  box-shadow:
    inset 2px 2px 0 #1a1e2a,
    1px 1px 0 #000;
}

.hot-id {
  display: block;
  color: var(--gold-bright);
  font-size: 13px;
}

.lb-btn {
  display: grid;
  grid-template-columns: 2.2rem 1fr auto;
  gap: 8px;
  align-items: center;
}

.rank {
  color: var(--gold);
}

.muted {
  color: var(--muted);
}

.lead {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

/*  -  -  Modals  -  -  */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.65);
}

.modal-backdrop.is-open {
  display: flex;
}

.modal {
  width: min(420px, 100%);
  max-height: min(90vh, 640px);
  overflow: auto;
  background: var(--bg-elev);
  border: 2px solid var(--line-strong);
  box-shadow: 6px 6px 0 #000;
}

.modal-lg {
  width: min(520px, 100%);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 2px solid var(--line);
}

.modal-head h2 {
  margin: 0;
  font-size: 18px;
  color: var(--gold-bright);
}

.modal-body {
  padding: 14px;
  overflow-x: hidden;
}

.pack-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.pack {
  appearance: none;
  border: 2px solid var(--line);
  background: var(--bg-panel);
  color: var(--text);
  font: inherit;
  padding: 12px 8px;
  cursor: pointer;
  box-shadow: 2px 2px 0 #000;
}

.pack.is-on {
  border-color: var(--gold-bright);
  background: var(--gold-dim);
  color: var(--gold-bright);
}

.pay-amount {
  text-align: center;
  font-size: 28px;
  color: var(--gold-bright);
  margin: 8px 0 12px;
}

.pay-paused {
  text-align: center;
  padding: 8px 4px 4px;
}

.pay-paused .material-symbols-outlined {
  font-size: 40px;
  color: var(--muted);
  margin-bottom: 8px;
}

.pay-paused p {
  margin: 0 0 16px;
  font-size: 15px;
  line-height: 1.45;
  color: var(--text);
}

.qr-box {
  display: grid;
  place-items: center;
  padding: 12px;
  background: #fff;
  border: 2px solid #000;
  margin: 0 auto 12px;
  width: fit-content;
}

.address-box {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
  background: var(--bg-panel);
  border: 2px solid var(--line);
  padding: 8px;
}

.address-box code {
  flex: 1;
  font-size: 11px;
  word-break: break-all;
  color: var(--text);
}

.status-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  margin: 10px 0;
}

.spin {
  animation: spin 1s steps(8) infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/*  -  -  Wizard  -  -  */
.wizard-body {
  min-height: 220px;
}

.wiz-dots {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-bottom: 14px;
}

.wiz-dots span {
  width: 10px;
  height: 10px;
  background: var(--line-strong);
  border: 1px solid #000;
}

.wiz-dots span.is-on {
  background: var(--gold-bright);
}

.wizard-step {
  display: none;
}

.wizard-step.is-active {
  display: block;
}

.wizard-step h3 {
  margin: 0 0 8px;
  font-size: 18px;
  color: var(--gold-bright);
}

.wizard-step p {
  margin: 0 0 16px;
  line-height: 1.5;
  color: var(--text);
}

.wiz-nav {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

[hidden] {
  display: none !important;
}

.toast-host {
  position: fixed;
  left: 50%;
  bottom: 72px;
  transform: translateX(-50%);
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: none;
  width: min(360px, 92vw);
}

.toast {
  background: var(--bg-panel);
  border: 2px solid var(--gold);
  color: var(--text);
  padding: 10px 12px;
  font-size: 13px;
  box-shadow: 3px 3px 0 #000;
  animation: toast-in 0.2s steps(4);
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.ledger-list li {
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}

.ledger-list {
  overflow-x: hidden;
  max-width: 100%;
}

.ledger-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.ledger-label {
  color: var(--text);
}

.ledger-meta {
  color: var(--muted);
  font-size: 11px;
}

.txid-field {
  display: flex;
  align-items: center;
  gap: 0;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  border: 2px solid var(--line);
  background: #0a0c12;
  overflow: hidden;
}

.txid-field input {
  flex: 1 1 auto;
  min-width: 0;
  width: 0;
  border: 0;
  background: transparent;
  color: var(--gold-bright);
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 11px;
  padding: 8px 10px;
  outline: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.txid-copy {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 36px;
  height: 34px;
  border: 0;
  border-left: 2px solid var(--line);
  background: #12151c;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
}

.txid-copy .material-symbols-outlined {
  font-size: 18px;
  line-height: 1;
}

.txid-copy:hover {
  color: var(--gold-bright);
  background: #1a1e2a;
}

.txid-short {
  font-size: 11px;
  color: var(--gold-bright);
}

@media (min-width: 900px) {
  .topnav {
    display: flex;
  }

  .dock-scrim {
    display: none !important;
  }
}

@media (max-width: 899px) {
  .pixel-dock {
    top: auto;
    left: 0;
    right: 0;
    bottom: calc(64px + env(safe-area-inset-bottom, 0px));
    width: 100%;
    max-height: min(62dvh, calc(100dvh - 88px - env(safe-area-inset-bottom, 0px)));
    border-left: 0;
    border-top: 3px solid #1a1408;
    /* Fully off-screen: 100% of dock + bar height (110% left a peek above the bar) */
    transform: translateY(calc(100% + 72px + env(safe-area-inset-bottom, 0px)));
    box-shadow: 0 -4px 0 #000;
    visibility: hidden;
    pointer-events: none;
    transition:
      transform 0.2s steps(6),
      visibility 0.2s steps(2);
  }

  .pixel-dock.is-open {
    transform: translateY(0);
    visibility: visible;
    pointer-events: auto;
  }

  .dock-handle {
    display: block;
    width: 44px;
    height: 4px;
    margin: 6px auto 0;
    background: var(--line-strong);
    box-shadow: 0 1px 0 #000;
  }

  .dock-head {
    padding: 4px 10px 6px;
    border-bottom: 2px solid var(--line-strong);
  }

  .dock-id .dock-kicker {
    font-size: 9px;
    letter-spacing: 0.12em;
  }

  .dock-head h2 {
    font-size: 15px;
    margin: 2px 0 0;
  }

  .dock-head .icon-btn {
    width: 30px;
    height: 30px;
  }

  .dock-body {
    padding: 6px 8px 8px;
    gap: 6px;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-content: start;
  }

  .dock-body > .wiz-rail {
    grid-column: 1 / -1;
    order: 0;
    display: flex;
    padding: 4px 6px;
    gap: 2px;
  }

  .wiz-dot {
    width: 22px;
    height: 22px;
    font-size: 11px;
  }

  .wiz-lab {
    font-size: 9px;
  }

  .wiz-rail-sep {
    width: 8px;
    margin-bottom: 12px;
  }

  .dock-body > .wiz-block:first-of-type {
    order: 1;
  }

  .dock-body > .wiz-block-color {
    order: 2;
  }

  .dock-body > .wiz-block-pay {
    grid-column: 1 / -1;
    order: 3;
  }

  .dock-body > .dock-actions {
    grid-column: 1 / -1;
    order: 4;
  }

  .dock-body > #lock-banner,
  .dock-body > #step-status {
    grid-column: 1 / -1;
    order: 5;
  }

  .wiz-block {
    padding: 6px;
    box-shadow: 2px 2px 0 #000;
    min-width: 0;
  }

  .wiz-block-head {
    margin-bottom: 4px;
    gap: 5px;
  }

  .wiz-block-head h3 {
    font-size: 10px;
  }

  .wiz-block-num {
    font-size: 9px;
  }

  .coord-board {
    gap: 4px;
  }

  .coord-cell {
    padding: 5px 2px;
  }

  .coord-lbl {
    font-size: 9px;
  }

  .coord-val {
    font-size: 18px;
  }

  .price-board {
    padding: 6px 8px;
  }

  .price-tag {
    font-size: 10px;
  }

  .price-line {
    font-size: 22px;
  }

  .price-doge {
    font-size: 14px;
  }

  .color-row {
    gap: 4px;
    margin-bottom: 0;
    align-items: center;
  }

  #color-picker {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
  }

  .swatches {
    gap: 3px;
    grid-template-columns: repeat(4, 1fr);
  }

  .dock-actions {
    gap: 5px;
    margin-top: 0;
  }

  .btn-insert,
  #place-btn {
    min-height: 42px;
    font-size: 14px;
    padding: 8px 10px;
  }

  .dock-more {
    display: none;
  }

  /* Welcome wizard: all steps readable on a phone */
  .modal.modal-lg {
    max-height: min(88dvh, calc(100dvh - 24px));
    width: min(100%, calc(100vw - 16px));
    margin: 8px;
  }

  .wizard-body {
    min-height: 0;
    max-height: min(70dvh, calc(100dvh - 120px));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }

  .wizard-step h3 {
    font-size: 16px;
  }

  .wizard-step p {
    margin: 0 0 12px;
    font-size: 14px;
    line-height: 1.4;
  }

  .wiz-nav {
    position: sticky;
    bottom: 0;
    padding-top: 8px;
    background: linear-gradient(transparent, var(--bg-elev) 30%);
  }

  .wiz-nav .btn {
    flex: 1;
    min-height: 42px;
  }
}

/* Admin shell (collapsible sidebar) */
.admin-page {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
}

.admin-shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: 100vh;
  transition: grid-template-columns 0.2s ease;
}

.admin-shell.is-collapsed {
  grid-template-columns: 64px minmax(0, 1fr);
}

.admin-sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.85rem 0.65rem;
  background: #12151d;
  border-right: 2px solid var(--line-strong);
  box-sizing: border-box;
  z-index: 5;
}

.admin-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0.35rem 0.4rem 0.75rem;
  border-bottom: 2px solid var(--line);
  margin-bottom: 0.35rem;
}

.admin-sidebar-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  min-width: 0;
}

.admin-sidebar-brand-text strong {
  color: var(--gold-bright);
  font-weight: 400;
}

.admin-sidebar-brand-text span {
  color: var(--muted);
  font-size: 12px;
}

.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  overflow: auto;
}

.admin-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0.55rem 0.55rem;
  color: var(--text);
  text-decoration: none;
  border: 2px solid transparent;
}

.admin-nav-link:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.03);
}

.admin-nav-link.is-active {
  border-color: var(--gold);
  background: rgba(194, 166, 51, 0.12);
  color: var(--gold-bright);
}

.admin-sidebar-foot {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 0.5rem;
  border-top: 2px solid var(--line);
}

.admin-sidebar-foot .btn {
  justify-content: flex-start;
  width: 100%;
}

.admin-shell.is-collapsed .admin-nav-label,
.admin-shell.is-collapsed .admin-sidebar-brand-text {
  display: none;
}

.admin-shell.is-collapsed .admin-nav-link,
.admin-shell.is-collapsed .admin-sidebar-foot .btn {
  justify-content: center;
  padding-left: 0.4rem;
  padding-right: 0.4rem;
}

.admin-mobile-menu {
  display: none;
}

.admin-main.admin {
  max-width: none;
  width: 100%;
  margin: 0;
  min-height: 100vh;
}

.admin-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.65rem;
}

.admin-stat {
  border: 2px solid var(--line-strong);
  background: var(--bg-panel);
  padding: 0.65rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.admin-stat span {
  color: var(--muted);
  font-size: 12px;
}

.admin-stat strong {
  font-size: 1.15rem;
  color: var(--gold-bright);
  font-weight: 400;
}

.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.75rem 0;
  align-items: center;
}

.admin-toolbar input[type="search"],
.admin-toolbar select {
  flex: 1;
  min-width: 160px;
  padding: 0.55rem 0.65rem;
  border: 2px solid var(--line-strong);
  background: var(--bg-panel);
  color: var(--text);
  font: inherit;
}

.admin-build-inline {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  align-items: flex-start;
}

@media (max-width: 860px) {
  .admin-shell {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: min(260px, 86vw);
    transform: translateX(-105%);
    transition: transform 0.2s ease;
    box-shadow: 6px 0 0 #000;
  }

  .admin-shell.is-sidebar-open .admin-sidebar {
    transform: translateX(0);
  }

  .admin-shell.is-collapsed {
    grid-template-columns: 1fr;
  }

  .admin-mobile-menu {
    display: inline-flex;
  }
}

/* Admin shared helpers */
.admin {
  max-width: 720px;
  margin: 0 auto;
  padding: 1.25rem 1.25rem 3rem;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  overflow: visible;
}

.admin label {
  display: block;
  margin: 0.85rem 0 0.3rem;
  color: var(--muted);
  font-size: 13px;
}

.admin input,
.admin textarea {
  width: 100%;
  padding: 0.65rem;
  border: 2px solid var(--line-strong);
  background: var(--bg-panel);
  color: var(--text);
  font: inherit;
  box-sizing: border-box;
}

.admin .card {
  background: var(--bg-elev);
  border: 2px solid var(--line-strong);
  padding: 1rem;
  margin-top: 1rem;
  box-shadow: 4px 4px 0 #000;
}

.admin .card h2 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  color: var(--gold-bright);
  display: flex;
  align-items: center;
  gap: 6px;
}

.admin .flash {
  background: rgba(61, 214, 140, 0.12);
  border: 2px solid var(--ok);
  padding: 0.75rem;
  margin-bottom: 1rem;
}

.admin .err {
  background: rgba(232, 93, 93, 0.12);
  border: 2px solid var(--danger);
  padding: 0.75rem;
  margin-bottom: 1rem;
  color: #ffb4b4;
}

.admin code.block {
  display: block;
  background: var(--bg-panel);
  border: 2px dashed var(--line-strong);
  padding: 0.65rem;
  word-break: break-all;
  font-size: 0.78rem;
  margin: 0.4rem 0 1rem;
}

.admin .brand-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--line);
}

.admin .brand-bar .brand {
  display: flex;
  gap: 10px;
  align-items: center;
}

.admin .brand-bar h1 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--gold-bright);
}

.admin .brand-bar p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.admin .brand-actions {
  display: flex;
  gap: 8px;
}

.admin-table-wrap {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  border: 2px solid var(--line);
  background: #0a0c12;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  min-width: 720px;
}

.admin-table th,
.admin-table td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.admin-table th {
  background: var(--bg-panel);
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 10px;
  position: sticky;
  top: 0;
}

.admin-table .nowrap {
  white-space: nowrap;
}

.admin-table .txid,
.admin-table .opret {
  display: inline-block;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  color: var(--gold-bright);
}

.admin-table .opret {
  display: block;
  max-width: 220px;
  margin-top: 4px;
  color: #fff8dc;
}

.admin-table .cell-sub {
  margin-top: 3px;
  font-size: 10px;
  color: var(--muted);
  word-break: break-all;
}

.pill {
  display: inline-block;
  padding: 2px 6px;
  border: 2px solid var(--line-strong);
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text);
  background: var(--bg-panel);
}

.pill-ok {
  border-color: var(--ok);
  color: #9dffc8;
  background: rgba(61, 214, 140, 0.12);
}

.pill-wait {
  border-color: var(--gold);
  color: var(--gold-bright);
  background: var(--gold-dim);
}

.pill-muted {
  color: var(--muted);
}

.admin-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 0.85rem;
}

.admin-manual {
  margin: 0 0 1rem;
  padding: 10px;
  border: 2px solid var(--line);
  background: #0a0c12;
}

.admin-manual summary {
  cursor: pointer;
  color: var(--gold-bright);
  font-size: 13px;
}

.admin-manual-form {
  margin-top: 10px;
}

.admin-manual-form label {
  margin-top: 0.5rem;
}

#nick-input {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  font-size: 18px;
  font-family: "Comic Neue", "Comic Sans MS", cursive, sans-serif;
  letter-spacing: 0.02em;
  color: var(--ink);
  background: #0a0c12;
  border: 3px solid var(--gold);
  outline: none;
}

#nick-input:focus {
  border-color: var(--gold-bright);
  box-shadow: 0 0 0 2px rgba(194, 166, 51, 0.35);
}

.admin-table .key-full {
  display: block;
  max-width: 220px;
  word-break: break-all;
  white-space: normal;
  font-size: 11px;
  color: var(--gold-bright);
}

.admin-table .key-full.secret {
  color: #ffb4b4;
}

.secret-details summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.admin-note-list {
  margin: 0.75rem 0 0;
  padding-left: 1.1rem;
  color: var(--muted);
  line-height: 1.55;
  font-size: 13px;
}

.admin-note-list code {
  color: var(--gold-bright);
}

.admin-attest {
  margin: 0 0 1rem;
  padding: 12px;
  border: 2px solid var(--gold);
  background: #0a0c12;
}

.admin-attest h3 {
  margin: 0 0 8px;
  color: var(--gold-bright);
  font-size: 14px;
}

.admin-attest label {
  margin-top: 0.55rem;
}

.attest-field {
  width: 100%;
  padding: 0.55rem;
  border: 2px solid var(--line-strong);
  background: var(--bg-panel);
  color: var(--gold-bright);
  font: inherit;
  font-size: 12px;
  box-sizing: border-box;
  word-break: break-all;
  resize: vertical;
}

.admin-build-fields {
  display: flex;
  gap: 4px;
  margin-bottom: 6px;
}

.admin-build-fields input {
  width: 4.5rem;
  min-width: 0;
  padding: 4px 6px;
  border: 2px solid var(--line-strong);
  background: #0a0c12;
  color: var(--gold-bright);
  font: inherit;
  font-size: 12px;
}

.admin-build-fields input[name="pixel_color"] {
  width: 5.5rem;
}

.admin-build-fields input[name="pixel_nick"] {
  width: 7.5rem;
  flex: 1;
}


.doge-sym {
  font-family: var(--font);
  font-size: 1.05em;
  color: inherit;
  line-height: 1;
}

.hud-credit .doge-sym {
  color: var(--gold-bright);
  font-size: 16px;
}

.lock-tip {
  position: fixed;
  z-index: 70;
  min-width: 180px;
  max-width: min(260px, 80vw);
  padding: 10px 12px;
  background: var(--bg-elev);
  border: 2px solid var(--danger);
  box-shadow: 4px 4px 0 #000;
  color: var(--text);
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.lock-tip[hidden] {
  display: none !important;
}

.lock-tip strong {
  color: #ffb4b4;
  font-size: 13px;
}

.lock-tip span {
  font-size: 12px;
  color: var(--muted);
}

.wizard-banner {
  display: none;
}

.easy-steps {
  display: none;
}

.step-num {
  display: none;
}

.easy-step strong {
  display: none;
}

.step-text {
  display: none;
}

.cost-card {
  display: none;
}

.cost-label {
  display: none;
}

.step-price {
  display: none;
}

.cost-unit {
  display: none;
}

.dock-more {
  margin-top: 4px;
  border-top: 2px solid var(--line);
  padding-top: 10px;
}

.dock-more summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.dock-more[open] summary {
  color: var(--gold-bright);
}

.modal-scroll {
  max-height: min(88vh, 720px);
  display: flex;
  flex-direction: column;
}

.modal-scroll .modal-body,
.pct-modal-body {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  max-height: min(70vh, 560px);
}

.pct-badge-inline {
  display: inline-block;
  border: 2px solid var(--gold);
  background: var(--gold-dim);
  color: var(--gold-bright);
  padding: 4px 10px;
  margin: 0 0 12px;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.pct-pre {
  background: var(--bg-panel);
  border: 2px solid var(--line);
  padding: 10px;
  overflow: auto;
  font-size: 12px;
  box-shadow: 2px 2px 0 #000;
}

.pct-modal-body h3 {
  margin: 1rem 0 0.4rem;
  color: var(--gold);
  font-size: 14px;
}

.pct-modal-body a,
.wizard-body a {
  color: var(--gold-bright);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.pct-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
