/* ============================================================
   369craft — antique naturalist plate theme
   Aged parchment, sepia ink, muted botanical accents,
   old-print engraving typography. No image assets — the paper
   grain is an inline SVG turbulence filter.
   ============================================================ */

:root {
  --pixel-font: 'IM Fell English', Georgia, 'Times New Roman', serif;
  --logo-font: 'IM Fell English SC', Georgia, 'Times New Roman', serif;

  --paper: #e9dfc6;
  --paper-hi: #f3ead4;
  --paper-lo: #d8c9a4;
  --ink: #3a2d1c;
  --ink-soft: #5c4a33;
  --oxblood: #7c3128;
  --olive: #5d6b3e;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0.23 0 0 0 0 0.18 0 0 0 0 0.11 0 0 0 0.09 0'/%3E%3C/filter%3E%3Crect width='100' height='100' filter='url(%23n)'/%3E%3C/svg%3E");
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #14100a;
  font-family: var(--pixel-font);
  user-select: none;
  -webkit-user-select: none;
}

#game {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  /* the aged-print color grade for the whole 3D world */
  filter: sepia(0.26) saturate(0.78) contrast(0.95) brightness(1.02);
}

/* sepia vignette over the world (HUD and menus sit above it) */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 8;
  background:
    var(--grain),
    radial-gradient(ellipse at center, transparent 52%, rgba(58, 42, 22, 0.36) 100%);
  mix-blend-mode: multiply;
}

.hidden { display: none !important; }

/* ======================= overlays ======================= */

.overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
}

#pause-menu, #options-menu {
  background: rgba(8, 10, 18, 0.82);
  z-index: 30;
  pointer-events: auto;
}

.fable-menu-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: min(420px, 88vw);
  max-height: 92vh;
  overflow-y: auto;
  padding: 28px 32px 24px;
  border-radius: 12px;
  background: rgba(12, 14, 22, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.55);
}
.fable-menu-panel.wide { width: min(520px, 92vw); }

.fable-menu-title {
  font-family: 'VT323', var(--pixel-font);
  font-size: 38px;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: #f0e8d8;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
  margin-bottom: 4px;
  text-align: center;
}

.fable-menu-buttons {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  width: 100%;
}

#pause-menu .mc-button,
#options-menu .mc-button {
  font-family: 'VT323', var(--pixel-font);
  font-size: 24px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #f0e8d8;
  background: linear-gradient(#4a5568, #2d3748 55%, #1a202c);
  border: 2px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  min-width: 0;
  width: 100%;
  padding: 10px 20px;
}
#pause-menu .mc-button:hover,
#options-menu .mc-button:hover {
  background: linear-gradient(#5a6578, #3d4758 55%, #2a3040);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
}
#pause-menu .mc-button.fable-btn-primary {
  font-size: 28px;
  letter-spacing: 4px;
  background: linear-gradient(#c9a227, #a8841a 55%, #8a6a10);
  border-color: rgba(255, 220, 120, 0.5);
  color: #1a1408;
  text-shadow: 0 1px 0 rgba(255, 240, 200, 0.5);
}
#pause-menu .mc-button.fable-btn-primary:hover {
  background: linear-gradient(#e0b830, #c9a020 55%, #a88818);
  color: #0a0804;
}
#options-menu .mc-button.small {
  font-size: 18px;
  letter-spacing: 1px;
  padding: 8px 12px;
  width: auto;
  min-width: 0;
}

.fable-opt-rows {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 18px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
}
#options-menu .opt-row {
  color: #e8e0d0;
  font-size: 17px;
}
#options-menu .opt-row label { color: #c9a227; }
#options-menu .opt-row input[type="range"] {
  accent-color: #c9a227;
}
#options-menu .opt-row.checks {
  justify-content: center;
  gap: 8px;
}

#controls-menu {
  background: rgba(8, 10, 18, 0.82);
  z-index: 30;
  pointer-events: auto;
}

.controls-window {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: min(580px, 92vw);
  max-height: 92vh;
  overflow-y: auto;
  padding: 24px 28px 20px;
  border-radius: 12px;
  background: rgba(12, 14, 22, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.55);
}

.controls-title {
  font-family: 'VT323', var(--pixel-font);
  font-size: 38px;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: #f0e8d8;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
  margin-bottom: 2px;
}

.controls-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 32px;
  width: 100%;
  color: #e8e0d0;
  font-size: 18px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 16px 20px;
}
.controls-grid span:nth-child(odd) { color: #c9a227; }
.controls-grid span:nth-child(even) {
  color: #f0e8d8;
  font-family: 'VT323', var(--pixel-font);
  font-size: 20px;
  letter-spacing: 1px;
  text-align: right;
}
.controls-note {
  color: rgba(240, 232, 216, 0.72);
  font-style: italic;
  font-size: 15px;
  line-height: 1.45;
  text-align: center;
  margin: 0;
  max-width: 480px;
}

#controls-menu .mc-button {
  font-family: 'VT323', var(--pixel-font);
  font-size: 24px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #f0e8d8;
  background: linear-gradient(#4a5568, #2d3748 55%, #1a202c);
  border: 2px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  min-width: min(280px, 70vw);
  padding: 9px 20px;
}
#controls-menu .mc-button:hover {
  background: linear-gradient(#5a6578, #3d4758 55%, #2a3040);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
}

/* Bedwars lobby — hero art with bottom glass panel */
#title-screen {
  pointer-events: auto;
  background:
    linear-gradient(to bottom, rgba(8, 10, 18, 0.15) 0%, rgba(8, 10, 18, 0.35) 55%, rgba(8, 10, 18, 0.72) 100%),
    url('./textures/lobby-hero.png') center top / cover no-repeat;
  background-color: #1a1410;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
}

/* procedural pixel curios scattered on the page */
.t-deco {
  position: absolute;
  image-rendering: pixelated;
  pointer-events: none;
  z-index: 0;
  filter: drop-shadow(2px 3px 0 rgba(74, 58, 38, 0.18));
}
.td-moth-big { top: 3%; left: 5%; width: 170px; transform: rotate(-10deg); }
.td-wheel { top: 33%; left: 3%; width: 180px; transform: rotate(8deg); }
.td-stein { bottom: 3%; left: 5%; width: 150px; transform: rotate(-3deg); }
.td-moth-red { top: 13%; right: 6%; width: 130px; transform: rotate(-8deg); }
.td-bf-blue { bottom: 9%; right: 9%; width: 105px; transform: rotate(6deg); }
.td-swallow { bottom: 1%; left: 47%; width: 120px; transform: rotate(-4deg); }
.td-card-king { top: 37%; right: 7%; width: 130px; transform: rotate(9deg); }
.td-card-boat { top: 41%; right: 1.5%; width: 130px; transform: rotate(18deg); }

/* ======================= buttons ======================= */

.mc-button {
  font-family: var(--pixel-font);
  font-size: 21px;
  letter-spacing: 1px;
  color: var(--ink);
  background: linear-gradient(var(--paper-hi), #e0d2b0);
  border: 2px solid var(--ink);
  box-shadow: inset 0 0 0 1px rgba(255, 252, 240, 0.55), 2px 3px 0 rgba(40, 30, 16, 0.35);
  padding: 7px 18px;
  min-width: 300px;
  cursor: pointer;
}
.mc-button:hover {
  background: var(--ink);
  color: var(--paper);
  box-shadow: inset 0 0 0 1px rgba(255, 252, 240, 0.2), 2px 3px 0 rgba(40, 30, 16, 0.35);
}
.mc-button:active { transform: translateY(1px); }
.mc-button.small { min-width: 0; font-size: 18px; padding: 5px 12px; white-space: nowrap; }
.mc-button.toggle { min-width: 230px; }

/* ======================= title screen ======================= */

.title-stack {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: min(620px, 94vw);
  padding: 0 0 clamp(24px, 5vh, 48px);
  z-index: 1;
}

.lobby-panel {
  width: 100%;
  padding: 20px 24px 16px;
  border-radius: 12px;
  background: rgba(12, 14, 22, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
}

.mc-logo {
  font-family: var(--logo-font);
  font-size: clamp(54px, 11vw, 104px);
  color: #443628;
  letter-spacing: 2px;
  line-height: 1;
  text-shadow:
    0 1px 0 rgba(255, 252, 240, 0.55),
    3px 4px 0 rgba(58, 45, 28, 0.3),
    5px 7px 0 rgba(58, 45, 28, 0.14);
}

.mc-sublogo {
  font-family: 'VT323', var(--pixel-font);
  font-size: clamp(20px, 3.4vw, 30px);
  color: #4a3a26;
  letter-spacing: 5px;
  text-transform: uppercase;
  margin-top: -4px;
}

.ca-badge.ca-live {
  font-family: 'Courier New', ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0;
  word-break: break-all;
  max-width: 280px;
  line-height: 1.35;
  cursor: pointer;
  transform: rotate(-1deg);
}
.ca-badge {
  font-family: var(--logo-font);
  font-size: 20px;
  letter-spacing: 3px;
  color: var(--oxblood);
  border: 2px solid var(--oxblood);
  outline: 1px solid var(--oxblood);
  outline-offset: 2px;
  padding: 4px 16px;
  margin-top: 4px;
  transform: rotate(-2deg);
  animation: ca-pulse 2.2s ease-in-out infinite;
}
@keyframes ca-pulse {
  0%, 100% { opacity: 0.78; }
  50% { opacity: 1; }
}

/* torn parchment banner pinned at the sublogo's right end */
.wave-clock {
  font-family: 'VT323', var(--pixel-font);
  font-size: 19px;
  letter-spacing: 1px;
  color: var(--olive);
  background: rgba(233, 223, 198, 0.7);
  border: 1px solid rgba(93, 107, 62, 0.55);
  padding: 3px 14px;
  margin-top: 2px;
}
.wave-clock b { color: var(--oxblood); }
.wave-clock:empty { display: none; }

.find-feed {
  font-style: italic;
  font-size: 14px;
  color: var(--ink-soft);
  text-align: center;
  line-height: 1.4;
}
.find-feed:empty { display: none; }

/* The Ledger of Legends — title-screen leaderboard, full wallets */
.lol-head {
  font-family: 'IM Fell English SC', Georgia, serif;
  font-style: normal;
  font-size: 18px;
  color: var(--ink);
  letter-spacing: .02em;
  margin-bottom: 1px;
}
.lol-cap {
  font-size: 10px;
  font-style: italic;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 5px 0 1px;
}
.lol-row {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 7px;
  font-style: normal;
  margin: 1px 0;
}
.lol-rank { flex: none; width: 14px; text-align: center; }
.lol-addr {
  font-family: 'Courier New', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: -.2px;
  color: var(--ink);
  word-break: break-all;
  max-width: 320px;
}
.sol-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dotted currentColor;
  cursor: pointer;
}
.sol-link:hover, .sol-link:active { color: #9a6b1c; border-bottom-color: #9a6b1c; }
a.lol-addr {
  text-decoration: none;
  cursor: pointer;
  border-bottom: 1px dotted var(--ink-soft);
  pointer-events: auto;
}
a.lol-addr:hover, a.lol-addr:active {
  color: #9a6b1c;
  border-bottom-color: #9a6b1c;
}
.lol-sol {
  flex: none;
  font-family: 'IM Fell English SC', Georgia, serif;
  font-size: 13px;
  color: #9a6b1c;
  white-space: nowrap;
}

/* ink-drawn plate decorations */
.plate-deco {
  position: absolute;
  color: var(--ink);
  opacity: 0.5;
  pointer-events: none;
}
.deco-bf-tl {
  top: auto;
  bottom: -36px;
  left: -16px;
  transform: rotate(-14deg);
  animation: deco-flutter 5.5s ease-in-out infinite;
}
.deco-bf-bl {
  bottom: -54px;
  left: 40%;
  transform: rotate(10deg);
  opacity: 0.38;
  animation: deco-flutter 7s ease-in-out infinite reverse;
}
.deco-fern-br {
  bottom: -50px;
  right: -10px;
  transform: rotate(6deg);
  opacity: 0.42;
}
@keyframes deco-flutter {
  0%, 100% { translate: 0 0; rotate: 0deg; }
  50% { translate: 2px -4px; rotate: 5deg; }
}

.menu-buttons {
  margin-top: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

/* lobby buttons — readable on dark hero art */
.title-stack .mc-button {
  position: relative;
  font-family: 'VT323', var(--pixel-font);
  font-size: 26px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #f0e8d8;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
  background: linear-gradient(#4a5568, #2d3748 55%, #1a202c);
  border: 2px solid rgba(255, 255, 255, 0.25);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 4px 12px rgba(0, 0, 0, 0.4);
  padding: 9px 20px;
  min-width: min(420px, 78vw);
}
.title-stack .mc-button:hover {
  background: linear-gradient(#5a6578, #3d4758 55%, #2a3040);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
}
.title-stack .mc-button.primary-cta {
  font-size: 32px;
  letter-spacing: 4px;
  padding: 12px 24px;
  background: linear-gradient(#c9a227, #a8841a 55%, #8a6a10);
  border-color: rgba(255, 220, 120, 0.5);
  color: #1a1408;
  text-shadow: 0 1px 0 rgba(255, 240, 200, 0.5);
  box-shadow:
    inset 0 0 0 1px rgba(255, 240, 180, 0.3),
    0 4px 16px rgba(0, 0, 0, 0.5);
}
.title-stack .mc-button.primary-cta:hover {
  background: linear-gradient(#e0b830, #c9a020 55%, #a88818);
  color: #0a0804;
}
.title-stack .mc-button.primary-cta:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.title-stack .mc-button.small {
  min-width: 0;
  font-size: 20px;
  letter-spacing: 2px;
  padding: 8px 14px;
}
.title-stack .mc-button::before { display: none; }
.title-stack .mc-button:active { transform: translateY(2px); }

.seed-row { display: flex; gap: 10px; align-items: stretch; }

/* riveted steel seed plate */
#seed-input {
  font-family: 'VT323', var(--pixel-font);
  font-size: 20px;
  letter-spacing: 1px;
  width: 200px;
  background: linear-gradient(#c2c2c4, #969698);
  color: #26262a;
  border: 3px solid #3a3a3e;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.3), 3px 4px 0 rgba(58, 45, 28, 0.3);
  padding: 6px 10px;
  outline: none;
}
#seed-input::placeholder { color: #54545a; }
#seed-input:focus { border-color: #1c1c20; }


/* ======================= menus ======================= */

.menu-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 26px 26px 22px;
  background: var(--paper);
  background-image: var(--grain);
  border: 2px solid var(--ink);
  box-shadow:
    inset 0 0 0 4px var(--paper),
    inset 0 0 0 5px var(--ink),
    inset 0 0 50px rgba(120, 90, 40, 0.22),
    0 14px 40px rgba(0, 0, 0, 0.5);
}
.menu-stack.wide { width: min(580px, 92vw); }

.menu-title {
  font-family: var(--logo-font);
  font-size: 30px;
  color: var(--ink);
  text-shadow: 0 1px 0 rgba(255, 252, 240, 0.6);
  margin-bottom: 10px;
}

.opt-row {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: var(--ink);
  font-size: 19px;
}
.opt-row input[type="range"] {
  width: 100%;
  accent-color: var(--oxblood);
  cursor: pointer;
}
.opt-row.checks {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 8px 0;
}

/* ======================= loading ======================= */

#loading-screen {
  background:
    linear-gradient(rgba(8, 10, 18, 0.72), rgba(8, 10, 18, 0.88)),
    url('./textures/lobby-hero.png') center / cover no-repeat;
  background-color: #1a1410;
  z-index: 25;
  pointer-events: auto;
}

.loading-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  width: min(480px, 88vw);
  padding: 32px 36px 28px;
  border-radius: 12px;
  background: rgba(12, 14, 22, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.55);
}

.loading-text {
  font-family: 'VT323', var(--pixel-font);
  color: #f0e8d8;
  font-size: 42px;
  letter-spacing: 6px;
  text-transform: uppercase;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

.loading-bar {
  width: 100%;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.35);
  padding: 2px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4);
}

#loading-fill {
  height: 100%;
  width: 0%;
  border-radius: 2px;
  background: linear-gradient(90deg, #a8841a, #ffd54a, #c9a227);
  box-shadow: 0 0 8px rgba(255, 213, 74, 0.45);
  transition: width 0.15s linear;
}

.loading-tip {
  color: rgba(240, 232, 216, 0.72);
  font-style: italic;
  font-size: 16px;
  line-height: 1.45;
  text-align: center;
  max-width: 380px;
}

/* ======================= HUD ======================= */

#hud { position: fixed; inset: 0; pointer-events: none; z-index: 10; }

#crosshair {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 22px;
  height: 22px;
  transform: translate(-50%, -50%);
  mix-blend-mode: difference;
}
#crosshair::before, #crosshair::after {
  content: '';
  position: absolute;
  background: #ddd;
}
#crosshair::before { left: 50%; top: 0; width: 2px; height: 100%; transform: translateX(-50%); }
#crosshair::after { top: 50%; left: 0; height: 2px; width: 100%; transform: translateY(-50%); }

/* --------- diviner's compass --------- */

#compass {
  position: absolute;
  top: calc(12px + env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  width: 104px;
  height: 104px;
  padding: 4px;
  background: var(--paper);
  border: 2px solid var(--ink);
  box-shadow: inset 0 0 0 1px rgba(255, 252, 240, 0.5), 2px 3px 0 rgba(40, 30, 16, 0.35);
  opacity: 0.95;
}
#minimap-canvas {
  width: 100%;
  height: 100%;
  display: block;
  image-rendering: pixelated;
}
.mm-north {
  position: absolute;
  top: 2px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--logo-font);
  font-size: 11px;
  color: var(--ink);
  background: rgba(233, 223, 198, 0.8);
  padding: 0 4px;
  line-height: 1.1;
}
body.touch #compass { width: 76px; height: 76px; padding: 3px; }

#compass-dist {
  position: absolute;
  top: 108px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'VT323', var(--pixel-font);
  font-size: 18px;
  letter-spacing: 1px;
  color: var(--paper-hi);
  background: rgba(20, 16, 10, 0.5);
  padding: 0 8px;
  white-space: nowrap;
}
#compass-dist.near { color: #f0d9a0; }
body.touch #compass-dist { top: 80px; font-size: 15px; }

/* sits to the RIGHT of the minimap, clear of the buttons at the far edge */
#goal-banner {
  position: absolute;
  top: calc(14px + env(safe-area-inset-top));
  left: calc(50% + 64px);
  max-width: calc(50% - 64px - 76px);
  text-align: left;
  line-height: 1.3;
  font-family: var(--pixel-font);
  font-style: italic;
  font-size: 16px;
  color: var(--ink);
  background: rgba(233, 223, 198, 0.92);
  border: 1px solid #a8842f;
  box-shadow: 0 0 10px rgba(212, 170, 60, 0.45), 2px 3px 0 rgba(40, 30, 16, 0.3);
  padding: 4px 10px;
  pointer-events: none;
  animation: ca-pulse 2s ease-in-out infinite;
}
#goal-banner b { color: var(--oxblood); font-style: normal; }
body.touch #goal-banner {
  top: calc(14px + env(safe-area-inset-top));
  left: calc(50% + 46px);
  max-width: calc(50% - 46px - 64px);
  font-size: 13px;
  padding: 3px 8px;
}
@keyframes compass-near {
  0%, 100% { filter: drop-shadow(2px 3px 2px rgba(20, 14, 6, 0.45)); }
  50% { filter: drop-shadow(0 0 10px rgba(232, 198, 110, 0.95)); }
}

/* --------- hotbar --------- */

#hotbar {
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  background: rgba(233, 223, 198, 0.82);
  border: 2px solid var(--ink);
  outline: 1px solid rgba(233, 223, 198, 0.5);
  outline-offset: 1px;
}

.hotbar-slot {
  width: 54px;
  height: 54px;
  border: 2px solid rgba(58, 45, 28, 0.30);
  border-right-width: 1px;
  border-left-width: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.hotbar-slot img { width: 44px; height: 44px; image-rendering: auto; }
.hotbar-slot .slot-num {
  position: absolute;
  top: 1px;
  left: 4px;
  font-size: 13px;
  color: var(--ink-soft);
}
.hotbar-slot.selected {
  border: 3px solid var(--ink);
  outline: 2px solid rgba(243, 234, 212, 0.9);
  z-index: 2;
}

#item-name {
  position: absolute;
  bottom: 76px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--paper-hi);
  font-style: italic;
  font-size: 23px;
  text-shadow: 1px 2px 0 rgba(20, 14, 6, 0.85);
  opacity: 0;
  transition: opacity 0.4s ease;
}

/* --------- debug (F3) --------- */

#debug {
  position: absolute;
  top: 6px;
  left: 6px;
  color: var(--paper-hi);
  font-size: 16px;
  line-height: 1.3;
  text-shadow: 1px 1px 0 #1a140a;
  background: rgba(40, 31, 16, 0.55);
  padding: 6px 10px;
  white-space: pre;
}

/* --------- permanent map button (desktop; touch uses tb-guide) --------- */

#map-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 50px;
  height: 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  font-family: var(--logo-font);
  font-size: 24px;
  line-height: 1;
  color: var(--oxblood);
  background: rgba(233, 223, 198, 0.92);
  border: 2px solid var(--ink);
  box-shadow: inset 0 0 0 1px rgba(255, 252, 240, 0.5), 2px 3px 0 rgba(40, 30, 16, 0.35);
  pointer-events: auto;
  cursor: pointer;
}

.hud-btn-label,
.tb-label {
  display: block;
  font-family: 'VT323', var(--pixel-font);
  font-size: 12px;
  letter-spacing: 1px;
  line-height: 1;
  color: var(--ink-soft);
}
#map-btn:hover { background: var(--paper-hi); }
body.touch #map-btn { display: none; }

#quest-btn {
  position: absolute;
  top: 76px;
  right: 12px;
  width: 50px;
  height: 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  font-family: var(--logo-font);
  font-size: 24px;
  line-height: 1;
  color: #8a6a20;
  background: rgba(233, 223, 198, 0.92);
  border: 2px solid var(--ink);
  box-shadow: inset 0 0 0 1px rgba(255, 252, 240, 0.5), 2px 3px 0 rgba(40, 30, 16, 0.35);
  pointer-events: auto;
  cursor: pointer;
}
#quest-btn:hover { background: var(--paper-hi); }
body.touch #quest-btn { display: none; }

/* ---- quest list ---- */
.quests-window { max-width: min(560px, 96vw); }
#quest-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-height: 52vh;
  overflow-y: auto;
  padding: 4px 2px;
}
.q-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  background: var(--paper-hi);
  border: 2px solid var(--ink-soft);
}
.q-row.q-hunter { border-color: #a8842f; box-shadow: inset 0 0 14px rgba(212, 170, 60, 0.18); }
.q-row.q-legend { border-color: var(--oxblood); box-shadow: inset 0 0 16px rgba(124, 49, 40, 0.16); }
.q-prize {
  font-family: var(--logo-font);
  font-size: 28px;
  color: var(--ink);
  min-width: 74px;
  text-align: center;
}
.q-prize small { font-size: 15px; }
.q-legend .q-prize { color: var(--oxblood); }
.q-hunter .q-prize { color: #8a6a20; }
.q-info { flex: 1; display: flex; flex-direction: column; line-height: 1.2; }
.q-info b { font-family: var(--logo-font); font-size: 16px; color: var(--ink); font-weight: normal; }
.q-info i { font-size: 14px; color: var(--ink-soft); }
.q-empty { font-style: italic; font-size: 15px; color: var(--ink-soft); text-align: center; padding: 6px; }
.q-row.q-free .q-prize { color: var(--olive); font-size: 24px; }
.q-row.q-active { background: #f6efdd; box-shadow: inset 0 0 0 2px var(--olive); }
.q-row.q-locked { opacity: 0.6; }
.q-sealed {
  font-family: 'VT323', var(--pixel-font);
  font-size: 16px;
  color: var(--ink-soft);
  white-space: nowrap;
  padding: 0 6px;
}
body.touch #tb-quests {
  top: calc(64px + env(safe-area-inset-top));
  right: calc(12px + env(safe-area-inset-right));
  width: 48px;
  height: 52px;
  font-size: 24px;
  line-height: 1;
  flex-direction: column;
  gap: 1px;
  font-family: var(--logo-font);
  color: #f0d9a0;
  border-color: rgba(232, 198, 110, 0.7);
}

/* --------- live bounty tracker --------- */

#bounty-tracker {
  position: absolute;
  top: 12px;
  left: 12px;
  font-family: 'VT323', var(--pixel-font);
  font-size: 17px;
  line-height: 1.25;
  letter-spacing: 1px;
  color: var(--ink);
  background: rgba(233, 223, 198, 0.85);
  border: 1px solid var(--ink-soft);
  box-shadow: 2px 3px 0 rgba(40, 30, 16, 0.3);
  padding: 5px 12px;
  pointer-events: auto;
  cursor: pointer;
}
#bounty-tracker:empty { display: none; }
#bounty-tracker b { color: var(--oxblood); }
body.touch #bounty-tracker {
  top: calc(64px + env(safe-area-inset-top));
  left: calc(10px + env(safe-area-inset-left));
  font-size: 13px;
  max-width: 158px;
  white-space: normal;
}

/* --------- water / effects --------- */

#underwater-overlay {
  position: absolute;
  inset: 0;
  background: rgba(44, 74, 80, 0.30);
  opacity: 0;
  transition: opacity 0.2s;
}

#damage-vignette {
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 120px rgba(150, 44, 24, 0.85);
  opacity: 0;
  transition: opacity 0.1s;
}

/* ======================= picker ======================= */

#picker { background: rgba(32, 25, 14, 0.5); pointer-events: auto; }

.picker-window {
  background: var(--paper);
  background-image: var(--grain);
  border: 2px solid var(--ink);
  box-shadow:
    inset 0 0 0 4px var(--paper),
    inset 0 0 0 5px var(--ink),
    inset 0 0 50px rgba(120, 90, 40, 0.22),
    0 14px 40px rgba(0, 0, 0, 0.5);
  padding: 16px 18px;
  max-width: min(640px, 94vw);
}

.picker-title {
  font-family: var(--logo-font);
  font-size: 23px;
  color: var(--ink);
  margin-bottom: 10px;
}
.picker-hint { font-family: var(--pixel-font); font-style: italic; font-size: 15px; color: var(--ink-soft); }

#picker-grid {
  display: grid;
  grid-template-columns: repeat(9, 52px);
  gap: 4px;
  max-height: 52vh;
  overflow-y: auto;
  padding: 6px;
  background: var(--paper-lo);
  border: 2px solid var(--ink-soft);
  box-shadow: inset 2px 2px 0 rgba(90, 70, 40, 0.35), inset -2px -2px 0 rgba(255, 250, 235, 0.5);
}

.picker-cell {
  width: 52px;
  height: 52px;
  background: #d2c29a;
  border: 1px solid #b3a178;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
}
.picker-cell:hover { background: #c2ae82; border-color: var(--ink-soft); }
.picker-cell img { width: 42px; height: 42px; }

.picker-hotbar {
  margin-top: 12px;
  display: flex;
  justify-content: center;
  gap: 4px;
}
.picker-hotbar .hotbar-slot {
  background: #d2c29a;
  border: 2px solid var(--ink-soft);
  cursor: pointer;
}
.picker-hotbar .hotbar-slot.selected { border-color: var(--ink); background: #c2ae82; }

.picker-done { display: block; margin: 12px auto 0; }

/* tooltip */
.picker-cell::after {
  content: attr(data-name);
  position: absolute;
  bottom: 105%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--paper-hi);
  border: 1px solid var(--ink);
  color: var(--ink);
  font-size: 16px;
  padding: 2px 8px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  z-index: 5;
}
.picker-cell:hover::after { opacity: 1; }

/* scrollbars */
#picker-grid::-webkit-scrollbar { width: 12px; }
#picker-grid::-webkit-scrollbar-track { background: #c2b186; }
#picker-grid::-webkit-scrollbar-thumb { background: #8a7450; border: 2px solid #6e5c3e; }

/* ======================= wayfarer's grimoire ======================= */

#grimoire { background: rgba(32, 25, 14, 0.66); pointer-events: auto; z-index: 24; }

.grimoire-window {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  max-width: min(960px, 96vw);
  max-height: 94vh;
  overflow-y: auto;
  padding: 22px 18px 18px;
  background: var(--paper);
  background-image: var(--grain);
  border: 2px solid var(--ink);
  box-shadow:
    inset 0 0 0 4px var(--paper),
    inset 0 0 0 5px var(--ink),
    inset 0 0 60px rgba(120, 90, 40, 0.25),
    0 18px 50px rgba(0, 0, 0, 0.55);
}

.grimoire-title {
  font-family: var(--logo-font);
  font-size: 32px;
  color: var(--ink);
  text-shadow: 0 1px 0 rgba(255, 252, 240, 0.6);
}
.grimoire-sub { font-style: italic; font-size: 17px; color: var(--ink-soft); margin-top: -6px; }

.grimoire-cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  padding: 8px 2px;
}

.g-card {
  position: relative;
  width: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  padding: 14px 12px 12px;
  background: var(--paper-hi);
  background-image: var(--grain);
  border: 2px solid var(--ink);
  box-shadow:
    inset 0 0 0 3px var(--paper-hi),
    inset 0 0 0 4px rgba(74, 58, 38, 0.55),
    3px 5px 0 rgba(58, 45, 28, 0.3);
  transform: rotate(var(--tilt, 0deg));
  transition: transform 0.2s ease;
}
.g-card:hover { transform: rotate(0deg) translateY(-4px) scale(1.03); z-index: 2; }
.g-card-gold { border-color: var(--oxblood); }
.g-card-gold .g-num { color: var(--oxblood); border-color: var(--oxblood); }

.g-num {
  position: absolute;
  top: 6px;
  left: 8px;
  font-family: var(--logo-font);
  font-size: 15px;
  color: var(--ink-soft);
  border: 1px solid var(--ink-soft);
  border-radius: 50%;
  width: 24px;
  height: 24px;
  line-height: 22px;
}

.g-art {
  width: 86px;
  height: 76px;
  color: var(--ink);
  opacity: 0.8;
  margin-top: 2px;
}
.g-card-gold .g-art { color: #8a6a20; opacity: 0.9; }

.g-name {
  font-family: var(--logo-font);
  font-size: 19px;
  color: var(--ink);
  line-height: 1.1;
}

.g-text {
  font-size: 14.5px;
  line-height: 1.35;
  color: var(--ink-soft);
  min-height: 76px;
}
.g-text b { color: var(--oxblood); }

.g-word {
  font-family: 'VT323', var(--pixel-font);
  font-size: 18px;
  letter-spacing: 2px;
  color: var(--ink);
  border: 1px dashed var(--ink-soft);
  padding: 2px 12px;
}
.g-word-gold { color: #8a6a20; border-color: #8a6a20; }

.g-travel { margin-top: 2px; width: 100%; }

.grimoire-note { font-style: italic; font-size: 15px; color: var(--ink-soft); }

.comp-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; }
.comp-label { font-size: 17px; color: var(--ink); }
.comp-sel {
  background: var(--olive) !important;
  color: var(--paper-hi) !important;
  border-color: var(--ink) !important;
}
.comp-hint { font-style: italic; font-size: 14px; color: var(--olive); margin-top: -4px; }

@media (max-width: 560px) {
  .grimoire-window { padding: 16px 10px 14px; }
  .grimoire-title { font-size: 25px; }
  .grimoire-cards { gap: 10px; }
  .g-card { width: 165px; }
  .g-text { font-size: 13px; min-height: 84px; }
}

/* ======================= character select ======================= */

#char-select { background: rgba(32, 25, 14, 0.7); pointer-events: auto; z-index: 25; }

.charsel-window { max-width: min(620px, 96vw); }

.charsel-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  padding: 6px 0;
}

.hero-card {
  width: 102px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 10px 6px 7px;
  background: var(--paper-hi);
  border: 2px solid var(--ink-soft);
  cursor: pointer;
  transition: transform 0.12s ease;
}
.hero-card:hover { transform: translateY(-3px); }
.hero-card img {
  width: 64px;
  height: auto;
  image-rendering: pixelated;
}
.hero-card .hc-name {
  font-family: 'VT323', var(--pixel-font);
  font-size: 16px;
  letter-spacing: 1px;
  color: var(--ink);
}
.hero-card.hero-sel {
  border-color: var(--oxblood);
  background: #f6efdd;
  box-shadow: 0 0 0 2px rgba(124, 49, 40, 0.35), 3px 4px 0 rgba(58, 45, 28, 0.3);
}

.charsel-namerow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}
#username-input {
  font-family: 'VT323', var(--pixel-font);
  font-size: 21px;
  letter-spacing: 1px;
  width: 200px;
  background: var(--paper-hi);
  color: var(--ink);
  border: 2px solid var(--ink-soft);
  padding: 5px 10px;
  outline: none;
}
#username-input:focus { border-color: var(--oxblood); }

@media (max-width: 560px) {
  .hero-card { width: 84px; }
  .hero-card img { width: 52px; }
}

/* ======================= incantation console ======================= */

#console-bar {
  position: fixed;
  left: 50%;
  bottom: 96px;
  transform: translateX(-50%);
  width: min(420px, 80vw);
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--paper);
  background-image: var(--grain);
  border: 2px solid var(--ink);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  padding: 7px 12px;
  z-index: 26;
}
.console-prompt {
  font-family: 'VT323', var(--pixel-font);
  font-size: 22px;
  color: var(--oxblood);
}
#console-input {
  flex: 1;
  font-family: 'VT323', var(--pixel-font);
  font-size: 21px;
  letter-spacing: 1px;
  color: var(--ink);
  background: transparent;
  border: none;
  outline: none;
}

/* ======================= bounty card ======================= */

#bounty-card, #bounty-intro { background: rgba(32, 25, 14, 0.6); pointer-events: auto; }

.intro-text { font-size: 18px; max-width: 360px; line-height: 1.45; }
.intro-text b { color: var(--oxblood); }

/* the 8-second quest sheet */
.intro-sheet { width: min(470px, 94vw); gap: 6px; }
.intro-rows {
  display: flex;
  flex-direction: column;
  gap: 9px;
  width: 100%;
  margin: 8px 0 6px;
  text-align: left;
}
.i-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  border-bottom: 1px dashed rgba(92, 74, 51, 0.3);
  padding-bottom: 7px;
}
.i-row:last-child { border-bottom: none; padding-bottom: 0; }
.i-key {
  flex: 0 0 96px;
  font-family: var(--logo-font);
  font-size: 15px;
  color: var(--oxblood);
  text-align: right;
}
.i-txt { font-size: 15.5px; line-height: 1.3; color: var(--ink); }
.i-txt b { color: var(--oxblood); }
#intro-wave { color: var(--olive); }

.bounty-window {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  width: min(440px, 92vw);
  padding: 30px 26px 24px;
  background: var(--paper);
  background-image: var(--grain);
  border: 2px solid var(--oxblood);
  box-shadow:
    inset 0 0 0 4px var(--paper),
    inset 0 0 0 5px var(--oxblood),
    inset 0 0 60px rgba(120, 90, 40, 0.25),
    0 18px 50px rgba(0, 0, 0, 0.55);
  animation: bounty-in 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes bounty-in {
  from { transform: scale(0.6) rotate(-3deg); opacity: 0; }
  to { transform: scale(1) rotate(0deg); opacity: 1; }
}

.deco-bf-bounty {
  top: 10px;
  right: 12px;
  transform: rotate(12deg);
  opacity: 0.45;
  animation: deco-flutter 5s ease-in-out infinite;
}

.bounty-kicker {
  font-style: italic;
  font-size: 19px;
  color: var(--olive);
  letter-spacing: 2px;
}

.bounty-title {
  font-family: var(--logo-font);
  font-size: 40px;
  line-height: 1;
  color: var(--ink);
  text-shadow: 0 1px 0 rgba(255, 252, 240, 0.6), 2px 2px 0 rgba(58, 45, 28, 0.18);
}

.bounty-sub {
  font-style: italic;
  font-size: 18px;
  color: var(--ink-soft);
}

.bounty-prize-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 2px 12px;
}
.bounty-prize-row::before {
  content: '';
  position: absolute;
  inset: -14px -30px;
  background: radial-gradient(ellipse, rgba(198, 160, 70, 0.45), transparent 70%);
  animation: prize-glow 1.8s ease-in-out infinite;
  pointer-events: none;
}
@keyframes prize-glow {
  0%, 100% { opacity: 0.5; transform: scale(0.96); }
  50% { opacity: 1; transform: scale(1.06); }
}

.bounty-prize {
  position: relative;
  font-family: var(--logo-font);
  font-size: 54px;
  line-height: 1.05;
  color: var(--oxblood);
  text-shadow: 0 1px 0 rgba(255, 252, 240, 0.55);
  animation: ca-pulse 2s ease-in-out infinite;
}

.bounty-spark {
  position: relative;
  font-size: 28px;
  color: #a8842f;
  animation: spark-twinkle 1.4s ease-in-out infinite;
}
.bounty-spark:last-child { animation-delay: 0.7s; }
@keyframes spark-twinkle {
  0%, 100% { opacity: 0.4; transform: scale(0.85) rotate(-8deg); }
  50% { opacity: 1; transform: scale(1.2) rotate(8deg); }
}

.bounty-code-label {
  font-size: 15px;
  letter-spacing: 3px;
  color: var(--ink-soft);
  text-transform: uppercase;
  margin-top: 4px;
}

.bounty-code {
  font-family: var(--logo-font);
  font-size: 26px;
  letter-spacing: 5px;
  color: var(--ink);
  background: var(--paper-hi);
  border: 2px dashed var(--ink-soft);
  padding: 6px 16px;
  user-select: text;
  -webkit-user-select: text;
}

.bounty-note {
  font-size: 16px;
  font-style: italic;
  color: var(--ink-soft);
  max-width: 340px;
}

.bounty-count {
  font-size: 16px;
  color: var(--olive);
  margin-bottom: 4px;
}

.bounty-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.share-btn {
  background: linear-gradient(#2c2c30, #161618);
  color: #f0e7d0;
  border-color: #000;
}
.share-btn:hover { background: #000; color: #fff; }

@media (max-width: 560px) {
  .bounty-title { font-size: 32px; }
  .bounty-prize { font-size: 44px; }
  .bounty-code { font-size: 21px; letter-spacing: 3px; }
}

/* ======================= touch controls ======================= */

.touch-row { display: none; }
body.touch .touch-row { display: block; }
body.touch .picker-hint { display: none; }

#touch-layer {
  position: fixed;
  inset: 0;
  z-index: 12;
  pointer-events: none;
  touch-action: none;
}

.touch-look {
  position: absolute;
  inset: 0;
  pointer-events: auto;
  touch-action: none;
}

.touch-joy-zone {
  position: absolute;
  left: 0;
  bottom: calc(64px + env(safe-area-inset-bottom));
  width: 46%;
  height: 44%;
  pointer-events: auto;
  touch-action: none;
}

.touch-joy-base {
  position: fixed;
  width: 116px;
  height: 116px;
  border-radius: 50%;
  border: 2px solid rgba(233, 223, 198, 0.55);
  background: rgba(40, 31, 16, 0.28);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.touch-joy-nub {
  position: fixed;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(233, 223, 198, 0.6);
  border: 2px solid rgba(58, 45, 28, 0.5);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.touch-btn {
  position: absolute;
  pointer-events: auto;
  touch-action: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--paper-hi);
  font-family: var(--pixel-font);
  background: rgba(40, 31, 16, 0.45);
  border: 2px solid rgba(233, 223, 198, 0.5);
  text-shadow: 1px 1px 0 rgba(20, 14, 6, 0.8);
  user-select: none;
  -webkit-user-select: none;
}
.touch-btn.held { background: rgba(233, 223, 198, 0.35); }

#tb-jump {
  right: calc(20px + env(safe-area-inset-right));
  bottom: calc(132px + env(safe-area-inset-bottom));
  width: 78px;
  height: 78px;
  border-radius: 50%;
  font-size: 36px;
}

#tb-sneak {
  right: calc(112px + env(safe-area-inset-right));
  bottom: calc(104px + env(safe-area-inset-bottom));
  width: 56px;
  height: 56px;
  border-radius: 50%;
  font-size: 26px;
}
#tb-sneak.on {
  background: rgba(93, 107, 62, 0.6);
  border-color: #d8e0b0;
}

#tb-pause {
  top: calc(10px + env(safe-area-inset-top));
  right: calc(12px + env(safe-area-inset-right));
  width: 48px;
  height: 44px;
  font-size: 17px;
}

#tb-inv {
  top: calc(10px + env(safe-area-inset-top));
  right: calc(70px + env(safe-area-inset-right));
  width: 48px;
  height: 44px;
  font-size: 24px;
}

#tb-guide {
  top: calc(10px + env(safe-area-inset-top));
  right: calc(128px + env(safe-area-inset-right));
  width: 48px;
  height: 52px;
  font-size: 24px;
  line-height: 1;
  flex-direction: column;
  gap: 1px;
  font-family: var(--logo-font);
  color: #f0d9a0;
  border-color: rgba(232, 198, 110, 0.7);
}
#tb-guide .tb-label, #tb-quests .tb-label { color: rgba(240, 231, 208, 0.85); font-size: 11px; }

/* left-side buttons (right side is pause/inv/guide, center is the compass) */
#tb-help {
  top: calc(10px + env(safe-area-inset-top));
  left: calc(12px + env(safe-area-inset-left));
  width: 48px;
  height: 44px;
  font-size: 24px;
}

#tb-photo {
  top: calc(10px + env(safe-area-inset-top));
  left: calc(70px + env(safe-area-inset-left));
  width: 48px;
  height: 44px;
  font-size: 22px;
}

/* ======================= phone layout ======================= */

body.touch #hud { z-index: 14; }       /* hotbar above the touch layer */
body.touch #hotbar { pointer-events: auto; }
body.touch #crosshair { width: 18px; height: 18px; }

@media (max-width: 560px) {
  .hotbar-slot { width: 42px; height: 42px; }
  .hotbar-slot img { width: 34px; height: 34px; }
  .hotbar-slot .slot-num { display: none; }
  #hotbar { bottom: calc(6px + env(safe-area-inset-bottom)); }
  #item-name { bottom: calc(58px + env(safe-area-inset-bottom)); font-size: 19px; }

  .mc-logo { letter-spacing: 1px; }
  .mc-button { min-width: 260px; font-size: 19px; }
  .mc-button.small { font-size: 15px; }
  .title-stack .mc-button { font-size: 22px; min-width: min(330px, 76vw); }
  .title-stack .mc-button.small { font-size: 16px; letter-spacing: 1px; padding: 8px 10px; }
  .title-stack .mc-button::before { width: 54px; height: 54px; left: -24px; }
  .title-stack .mc-button.small::before { display: none; }
  #seed-input { width: 118px; font-size: 16px; }

  /* fewer, smaller curios on a phone */
  .td-moth-big { width: 100px; top: 2%; left: 2%; }
  .td-wheel { width: 96px; top: auto; bottom: 20%; left: 2%; }
  .td-stein { width: 84px; bottom: 4%; left: 4%; }
  .td-moth-red { width: 84px; top: 9%; right: 3%; }
  .td-bf-blue { width: 70px; bottom: 22%; right: 4%; }
  .td-swallow { display: none; }
  .td-card-king { width: 86px; top: auto; bottom: 5%; right: 16%; }
  .td-card-boat { width: 86px; top: auto; bottom: 3%; right: 2%; }
  .menu-stack.wide { width: 94vw; }
  .menu-stack { padding: 20px 14px 18px; }
  .controls-window { width: 94vw; padding: 18px 14px 16px; }
  .controls-grid { font-size: 16px; gap: 4px 16px; padding: 12px 14px; }
  .controls-grid span:nth-child(even) { font-size: 17px; }

  #picker-grid { grid-template-columns: repeat(7, 46px); max-height: 44vh; }
  .picker-cell { width: 46px; height: 46px; }
  .picker-cell img { width: 38px; height: 38px; }
  .picker-window { padding: 12px; }
  .picker-hotbar .hotbar-slot { width: 38px; height: 38px; }
  .picker-hotbar .hotbar-slot img { width: 30px; height: 30px; }
}

#webgl-error .menu-title { color: var(--oxblood); }

/* --------- the Discovery Log (inside the Fast Travel book) --------- */

.disc-head {
  font-family: 'VT323', var(--pixel-font);
  font-size: 18px;
  letter-spacing: 2px;
  color: var(--oxblood);
  margin-top: 10px;
}
.disc-head span { color: var(--ink); }
.disc-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px 7px;
  max-width: 560px;
  margin-top: 6px;
}
.disc-chip {
  font-family: 'VT323', var(--pixel-font);
  font-size: 14px;
  letter-spacing: 1px;
  color: var(--ink-soft);
  background: rgba(233, 223, 198, 0.55);
  border: 1px solid rgba(74, 58, 38, 0.35);
  padding: 1px 8px;
  opacity: 0.55;
}
.disc-chip.on {
  opacity: 1;
  color: var(--oxblood);
  border-color: #a8842f;
  box-shadow: 0 0 6px rgba(212, 170, 60, 0.35);
}

/* --------- the World Map plate --------- */

.map-window { max-width: min(98vw, 920px); }
.map-wrap { position: relative; margin-top: 6px; }
.map-zoom {
  position: absolute;
  right: 10px;
  top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.map-zoom .mc-button.small {
  min-width: 0;
  width: 40px;
  font-size: 22px;
  padding: 2px 0;
  line-height: 1.1;
}
#worldmap-canvas {
  width: min(94vw, 80vh, 760px);
  height: min(94vw, 80vh, 760px);
  touch-action: none;
  image-rendering: pixelated;
  border: 2px solid var(--ink);
  box-shadow: inset 0 0 0 1px rgba(255, 252, 240, 0.5), 2px 3px 0 rgba(40, 30, 16, 0.35);
  background: var(--paper-lo);
  cursor: grab;
}
.map-legend {
  font-family: 'VT323', var(--pixel-font);
  font-size: 15px;
  letter-spacing: 1px;
  color: var(--ink-soft);
  display: flex;
  gap: 16px;
  margin-top: 4px;
}
.map-legend .lg-trial { color: #a8842f; }
.map-legend .lg-wonder { color: var(--oxblood); }
.map-btnrow { display: flex; gap: 10px; margin-top: 8px; }

/* a nameless traveller may not set forth */
#username-input.name-needed {
  border-color: #a03028 !important;
  animation: name-shake 0.4s;
}
@keyframes name-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

/* the public bounty pool, verifiable on-chain */
.pool-line { font-family: 'VT323', var(--pixel-font); font-size: 15px; color: var(--ink-soft); }
.pool-line a { color: var(--oxblood); }
.map-legend .lg-minor { color: var(--olive); }

/* Phantom wallet + PvP HUD */
.phantom-btn { background: linear-gradient(180deg, #5b21b6 0%, #4c1d95 100%) !important; border-color: #7c3aed !important; }
.phantom-btn.connected { background: linear-gradient(180deg, #166534 0%, #14532d 100%) !important; border-color: #22c55e !important; }
.wallet-status { font-size: 0.85rem; color: rgba(240, 232, 216, 0.75); text-align: center; max-width: 320px; line-height: 1.4; margin: 4px 0; }
.wallet-launch-note { font-size: 0.75rem; color: rgba(240, 232, 216, 0.65); font-style: italic; }

/* Eliminated / death screen — top-level overlay (not inside #hud) */
#death-overlay.death-screen {
  background: rgba(48, 0, 0, 0.62);
  z-index: 40;
  pointer-events: auto;
  animation: death-in 0.4s ease-out;
}
.death-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 32px 36px 28px;
  border-radius: 12px;
  background: rgba(12, 14, 22, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.55);
  max-width: min(520px, 92vw);
  text-align: center;
}
.death-title {
  font-family: 'VT323', var(--pixel-font);
  font-size: 56px;
  color: #e04040;
  text-shadow: 0 3px 8px rgba(0, 0, 0, 0.7);
  letter-spacing: 3px;
  line-height: 1;
}
.death-sub {
  font-family: 'VT323', var(--pixel-font);
  font-size: 24px;
  color: rgba(240, 232, 216, 0.85);
  letter-spacing: 1px;
  line-height: 1.35;
  max-width: 420px;
}
.death-actions {
  display: flex;
  gap: 12px;
  margin-top: 10px;
  flex-wrap: wrap;
  justify-content: center;
  pointer-events: auto;
}
.death-actions.hidden { display: none; }
#death-overlay .mc-button {
  font-family: 'VT323', var(--pixel-font);
  font-size: 22px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #f0e8d8;
  background: linear-gradient(#4a5568, #2d3748 55%, #1a202c);
  border: 2px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  min-width: min(200px, 42vw);
  padding: 10px 18px;
  cursor: pointer;
}
#death-overlay .mc-button:hover {
  background: linear-gradient(#5a6578, #3d4758 55%, #2a3040);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
}
#death-overlay .mc-button.fable-btn-primary {
  background: linear-gradient(#c9a227, #a8841a 55%, #8a6a10);
  border-color: rgba(255, 220, 120, 0.5);
  color: #1a1408;
  text-shadow: 0 1px 0 rgba(255, 240, 200, 0.5);
}
#death-overlay .mc-button.fable-btn-primary:hover {
  background: linear-gradient(#e0b830, #c9a020 55%, #a88818);
  color: #0a0804;
}
@keyframes death-in { from { opacity: 0; } to { opacity: 1; } }

/* Bedwars victory screen */
#victory-overlay.victory-screen {
  background: rgba(8, 20, 12, 0.72);
  z-index: 60;
  pointer-events: auto;
  animation: death-in 0.45s ease-out;
}
.victory-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 36px 40px 30px;
  border-radius: 12px;
  background: rgba(12, 14, 22, 0.92);
  border: 1px solid rgba(212, 166, 64, 0.35);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6), 0 0 48px rgba(212, 166, 64, 0.12);
  max-width: min(520px, 92vw);
  text-align: center;
}
.victory-title {
  font-family: 'VT323', var(--pixel-font);
  font-size: 72px;
  color: #e8c547;
  text-shadow: 0 3px 12px rgba(0, 0, 0, 0.75), 0 0 24px rgba(212, 166, 64, 0.35);
  letter-spacing: 4px;
  line-height: 1;
}
.victory-sub {
  font-family: 'VT323', var(--pixel-font);
  font-size: 28px;
  color: rgba(240, 232, 216, 0.92);
  letter-spacing: 1px;
  line-height: 1.35;
  max-width: 420px;
}
.victory-reward {
  font-family: 'VT323', var(--pixel-font);
  font-size: 22px;
  color: rgba(212, 166, 64, 0.95);
  letter-spacing: 0.5px;
  line-height: 1.4;
}
.victory-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 8px;
  pointer-events: auto;
}
#victory-overlay .mc-button {
  font-family: 'VT323', var(--pixel-font);
  font-size: 22px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #f0e8d8;
  background: linear-gradient(#4a5568, #2d3748 55%, #1a202c);
  border: 2px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  min-width: min(200px, 42vw);
  padding: 10px 18px;
  cursor: pointer;
}
#victory-overlay .mc-button:hover {
  background: linear-gradient(#5a6578, #3d4758 55%, #2a3040);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
}
#victory-overlay .mc-button.fable-btn-primary {
  background: linear-gradient(#c9a227, #a8841a 55%, #8a6a10);
  border-color: rgba(255, 220, 120, 0.5);
  color: #1a1408;
  text-shadow: 0 1px 0 rgba(255, 240, 200, 0.5);
}
#victory-overlay .mc-button.fable-btn-primary:hover {
  background: linear-gradient(#e0b830, #c9a020 55%, #a88818);
  color: #0a0804;
}

.wallet-status.pulse { animation: name-shake 0.4s; color: #f0a0a0; }
#btn-play-bedwars:disabled { opacity: 0.45; cursor: not-allowed; }
#pvp-hud { position: fixed; top: 12px; left: 12px; z-index: 50; pointer-events: none; display: none; }
#pvp-hp-bar { width: 180px; height: 22px; background: rgba(20, 12, 8, 0.75); border: 2px solid var(--ink); border-radius: 4px; position: relative; overflow: hidden; }
#pvp-hp-fill { height: 100%; width: 100%; background: linear-gradient(90deg, #8b0000, #c0392b); transition: width 0.2s; }
#pvp-hp-label { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 0.75rem; color: #fff; text-shadow: 0 1px 2px #000; }
#realm-count { margin-top: 6px; font-size: 0.8rem; color: var(--parchment); text-shadow: 0 1px 3px #000; background: rgba(20, 12, 8, 0.6); padding: 4px 8px; border-radius: 4px; display: inline-block; }
.realm-status { margin-top: 4px; font-size: 0.72rem; color: #b8e986; text-shadow: 0 1px 3px #000; max-width: 220px; line-height: 1.3; }
#kill-feed { position: fixed; top: 12px; right: 12px; z-index: 50; pointer-events: none; display: none; flex-direction: column; gap: 4px; max-width: 280px; }
.kill-feed-item { font-size: 0.78rem; color: var(--parchment); background: rgba(20, 12, 8, 0.75); border: 1px solid var(--ink); padding: 4px 8px; border-radius: 4px; }

.bedwars-hud { position: fixed; inset: 0; z-index: 50; pointer-events: none; }
.bedwars-hud.hidden { display: none; }

.bw-sidebar {
  position: fixed; top: 8px; right: 8px;
  min-width: 132px; max-width: 160px;
  background: rgba(0, 0, 0, 0.52);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 3px;
  padding: 6px 8px 8px;
  font-size: 0.76rem;
  line-height: 1.25;
}
.bw-sidebar-title {
  text-align: center; font-weight: 700; font-size: 0.8rem;
  color: var(--gold); letter-spacing: 0.06em; text-transform: uppercase;
  margin-bottom: 5px; padding-bottom: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.bw-scoreboard { display: flex; flex-direction: column; gap: 1px; }
.bw-team-row {
  display: grid; grid-template-columns: 10px 1fr auto auto;
  align-items: center; gap: 5px;
  padding: 2px 4px; border-radius: 2px;
  text-transform: capitalize; color: rgba(255, 255, 255, 0.88);
}
.bw-team-row.you { background: rgba(255, 255, 255, 0.14); font-weight: 600; }
.bw-team-row.eliminated { opacity: 0.45; }
.bw-team-dot { width: 8px; height: 8px; border-radius: 1px; background: var(--team-color, #aaa); }
.bw-team-row.red { --team-color: #e44; }
.bw-team-row.blue { --team-color: #48f; }
.bw-team-row.green { --team-color: #5d5; }
.bw-team-row.yellow { --team-color: #ee4; }
.bw-team-row.aqua, .bw-team-row.cyan { --team-color: #4dd; }
.bw-team-row.white { --team-color: #eee; }
.bw-team-row.pink, .bw-team-row.magenta { --team-color: #f6a; }
.bw-team-row.gray, .bw-team-row.grey { --team-color: #aaa; }
.bw-team-bed { font-size: 0.7rem; opacity: 0.85; }
.bw-team-bed.dead { color: #f66; }
.bw-team-count { font-size: 0.68rem; opacity: 0.75; min-width: 1.2em; text-align: right; }

.bw-resources {
  position: fixed; bottom: 68px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 14px; align-items: center;
  background: rgba(20, 12, 8, 0.78); border: 1px solid var(--ink);
  padding: 4px 14px; border-radius: 4px; font-size: 0.82rem; color: var(--parchment);
}
.bw-res.iron { color: #ddd; }
.bw-res.gold { color: #fd4; }
.bw-res.emerald { color: #5f5; }
.bw-res.diamond { color: #6df; }

.bw-queue {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
  z-index: 55; text-align: center;
  background: rgba(20, 12, 8, 0.92); border: 1px solid var(--ink);
  padding: 12px 18px; border-radius: 6px; min-width: 240px; max-width: 320px;
  font-size: 0.82rem; color: var(--parchment); line-height: 1.35;
}
.bw-queue.hidden { display: none; }
.bw-queue-sub { font-size: 0.72rem; opacity: 0.75; }

.bw-gen-hint {
  margin-top: 8px;
  padding: 6px 8px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.25);
  font-family: 'VT323', var(--pixel-font);
  font-size: 17px;
  letter-spacing: 0.5px;
  color: rgba(240, 232, 216, 0.82);
  line-height: 1.35;
  text-align: center;
}
.bw-gen-hint.hidden { display: none; }

body.bedwars-mode #realm-count { display: none; }
body.bedwars-mode #kill-feed { top: auto; bottom: 128px; right: 8px; }
body.bedwars-mode #map-btn,
body.bedwars-mode #quest-btn { display: none !important; }

.bw-shop-window { max-width: 420px; }
.bw-shop-overlay {
  background: rgba(8, 10, 18, 0.72);
  z-index: 35;
  pointer-events: auto;
}
.bw-shop-panel { width: min(480px, 92vw); text-align: center; }
.bw-shop-hint {
  font-family: 'VT323', var(--pixel-font);
  font-size: 20px;
  color: rgba(240, 232, 216, 0.72);
  margin: -4px 0 8px;
  line-height: 1.35;
}
.bw-shop-hint kbd {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  font-family: inherit;
  color: #e8c547;
}
.bw-shop-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 8px 0 12px;
  max-height: min(52vh, 420px);
  overflow-y: auto;
  width: 100%;
}
.bw-shop-item {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: #f0e8d8;
  cursor: pointer;
  text-align: left;
  font-family: 'VT323', var(--pixel-font);
  font-size: 22px;
  letter-spacing: 0.5px;
  transition: background 0.12s, border-color 0.12s, opacity 0.12s;
}
.bw-shop-item:hover:not(:disabled) {
  background: rgba(212, 166, 64, 0.14);
  border-color: rgba(212, 166, 64, 0.45);
}
.bw-shop-item:disabled,
.bw-shop-item.cant-afford {
  opacity: 0.42;
  cursor: not-allowed;
}
.bw-shop-icon {
  width: 32px;
  height: 32px;
  image-rendering: pixelated;
  object-fit: contain;
}
.bw-shop-name { font-size: 24px; }
.bw-shop-cost {
  font-size: 18px;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.35);
  color: rgba(240, 232, 216, 0.88);
  white-space: nowrap;
}
.bw-shop-item.need-iron .bw-shop-cost { color: #c8d0d8; }
.bw-shop-item.need-gold .bw-shop-cost { color: #e8c547; }
.bw-shop-item.need-emerald .bw-shop-cost { color: #5d5; }
.bw-shop-item:not(:disabled):not(.cant-afford) .bw-shop-cost {
  color: #e8c547;
  border: 1px solid rgba(212, 166, 64, 0.35);
}
.hotbar-slot .slot-stack {
  position: absolute; right: 3px; bottom: 2px;
  font-size: 11px; font-weight: bold; color: #fff;
  text-shadow: 1px 1px 0 #000, -1px -1px 0 #000;
  pointer-events: none; z-index: 2;
}
.hotbar-slot.empty { opacity: 0.55; }
#leaderboard-overlay {
  background: rgba(8, 10, 18, 0.82);
  z-index: 30;
  pointer-events: auto;
}

.lb-window {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: min(640px, 92vw);
  max-height: 92vh;
  padding: 24px 28px 20px;
  border-radius: 12px;
  background: rgba(12, 14, 22, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.55);
}

.lb-title {
  font-family: 'VT323', var(--pixel-font);
  font-size: 38px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: #f0e8d8;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
  text-align: center;
  line-height: 1.1;
}

.lb-tabs {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}
.lb-tab.active {
  background: linear-gradient(#c9a227, #a8841a 55%, #8a6a10);
  border-color: rgba(255, 220, 120, 0.5);
  color: #1a1408;
}

.lb-note {
  color: rgba(240, 232, 216, 0.72);
  font-style: italic;
  font-size: 15px;
  line-height: 1.45;
  text-align: center;
  margin: 0;
  max-width: 520px;
}

.lb-body {
  width: 100%;
  max-height: min(52vh, 420px);
  overflow-y: auto;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 4px 0;
}

.lb-body::-webkit-scrollbar { width: 8px; }
.lb-body::-webkit-scrollbar-thumb { background: rgba(201, 162, 39, 0.45); border-radius: 4px; }

.lb-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 17px;
  color: #e8e0d0;
}

.lb-table thead {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(12, 14, 22, 0.98);
}

.lb-table th {
  font-family: 'VT323', var(--pixel-font);
  font-size: 20px;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 400;
  color: #c9a227;
  padding: 10px 12px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  text-align: left;
}

.lb-table td {
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  vertical-align: middle;
}

.lb-table tbody tr:last-child td { border-bottom: none; }
.lb-table tbody tr:hover { background: rgba(255, 255, 255, 0.04); }

.lb-table td.lb-rank {
  width: 36px;
  text-align: center;
  font-family: 'VT323', var(--pixel-font);
  font-size: 22px;
  color: rgba(240, 232, 216, 0.55);
}

.lb-table tr.lb-rank-1 td.lb-rank { color: #ffd54a; }
.lb-table tr.lb-rank-2 td.lb-rank { color: #c0c0c0; }
.lb-table tr.lb-rank-3 td.lb-rank { color: #cd7f32; }

.lb-table tr.lb-you {
  background: rgba(201, 162, 39, 0.15);
  box-shadow: inset 0 0 0 1px rgba(201, 162, 39, 0.35);
}
.lb-table tr.lb-you td { font-weight: 600; color: #fff; }

.lb-table td.lb-traveller { color: #f0e8d8; }
.lb-table td.lb-kills { text-align: center; font-family: 'VT323', var(--pixel-font); font-size: 20px; }
.lb-table td.lb-points {
  text-align: right;
  font-family: 'VT323', var(--pixel-font);
  font-size: 22px;
  color: #ffd54a;
}

.lb-loading, .lb-empty, .lb-error {
  text-align: center;
  padding: 24px 16px;
  font-style: italic;
  color: rgba(240, 232, 216, 0.65);
  font-size: 16px;
}
.lb-error { color: #f0a0a0; font-style: normal; }

.lb-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2px;
}

#leaderboard-overlay .mc-button {
  font-family: 'VT323', var(--pixel-font);
  font-size: 24px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #f0e8d8;
  background: linear-gradient(#4a5568, #2d3748 55%, #1a202c);
  border: 2px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  min-width: min(200px, 42vw);
  padding: 9px 20px;
}
#leaderboard-overlay .mc-button.small {
  font-size: 20px;
  min-width: min(140px, 36vw);
  padding: 8px 16px;
}
#leaderboard-overlay .mc-button:hover {
  background: linear-gradient(#5a6578, #3d4758 55%, #2a3040);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
}

.lb-wallet {
  font-family: 'Courier New', ui-monospace, monospace;
  font-size: 0.82rem;
  color: rgba(240, 232, 216, 0.85);
}
.lb-wallet a {
  color: #c9a227;
  text-decoration: none;
  border-bottom: 1px dotted rgba(201, 162, 39, 0.6);
}
.lb-wallet a:hover { color: #ffd54a; }
