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

:root {
  --bg:      #080808;
  --surface: #111111;
  --border:  #2a2a2a;
  --border2: #3a3a3a;
  --text:    #e0e0e0;
  --muted:   #666666;
  --accent:  #ffffff;
  --panel-w: 260px;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  height: 100vh;
  overflow: hidden;
}

/* ── Toolbar ─────────────────────────────────────────────────────────────── */

#toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  height: 48px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  z-index: 20;
}

.toolbar-label {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

#seed-input {
  background: var(--bg);
  border: 1px solid var(--border2);
  color: var(--text);
  padding: 5px 10px;
  border-radius: 3px;
  font-size: 13px;
  font-family: 'Courier New', monospace;
  width: 170px;
  transition: border-color 0.15s;
}
#seed-input:focus { outline: none; border-color: #666; }

#nav-input {
  background: var(--bg);
  border: 1px solid var(--border2);
  color: var(--text);
  padding: 5px 10px;
  border-radius: 3px;
  font-size: 13px;
  font-family: 'Courier New', monospace;
  width: 120px;
  transition: border-color 0.15s;
}
#nav-input:focus { outline: none; border-color: #e07000; }

#nav-status {
  font-size: 11px;
  font-family: monospace;
  color: #e07000;
  min-width: 56px;
}

.toolbar-sep {
  width: 1px;
  height: 24px;
  background: var(--border);
}

#floor-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.icon-btn {
  background: var(--bg);
  border: 1px solid var(--border2);
  color: var(--text);
  min-width: 28px;
  height: 28px;
  padding: 0 7px;
  border-radius: 3px;
  cursor: pointer;
  font-size: 11px;
  font-family: 'Courier New', monospace;
  letter-spacing: 0.03em;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s, background 0.15s;
  white-space: nowrap;
}
.icon-btn:hover { background: #1a1a1a; border-color: #555; }
.icon-btn.active { border-color: var(--accent); color: var(--accent); }

#floor-label {
  font-size: 13px;
  font-family: monospace;
  min-width: 56px;
  text-align: center;
  color: var(--text);
}

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

/* ── Layout ──────────────────────────────────────────────────────────────── */

#app {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

#main-area {
  display: flex;
  flex: 1;
  overflow: hidden;
}

#canvas-wrap {
  flex: 1;
  position: relative;
  overflow: hidden;
}

.floater {
  position: absolute;
  font-size: 12px;
  font-weight: 700;
  color: #c8922a;
  pointer-events: none;
  transform: translate(-50%, -50%);
  animation: floatUp 1.4s ease-out forwards;
  white-space: nowrap;
  font-family: monospace;
}

@keyframes floatUp {
  0%   { opacity: 1;   transform: translate(-50%, -50%); }
  100% { opacity: 0;   transform: translate(-50%, calc(-50% - 48px)); }
}

#main-canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
}
#main-canvas:active { cursor: grabbing; }

/* ── Panels ──────────────────────────────────────────────────────────────── */

.side-panel {
  width: var(--panel-w);
  background: var(--surface);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex-shrink: 0;
}
.side-panel.hidden { display: none; }

.panel-header {
  padding: 12px 16px;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.panel-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.tab-btn {
  flex: 1;
  padding: 8px 0;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

.panel-body {
  padding: 12px 16px;
  overflow-y: auto;
  flex: 1;
}

/* ── Stats panel ─────────────────────────────────────────────────────────── */

.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 0;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}
.stat-row:last-child { border-bottom: none; }
.stat-name { color: var(--text); }
.stat-count {
  font-family: monospace;
  font-size: 13px;
  color: var(--muted);
}

.stat-section {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #444;
  padding: 10px 0 4px;
  border-bottom: 1px solid #1a1a1a;
  margin-bottom: 2px;
}
.stat-section:first-child { padding-top: 2px; }

.emp-list {
  margin: 6px 0 2px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.emp-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--muted);
}
.emp-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.emp-more {
  font-size: 10px;
  color: #444;
  margin-top: 2px;
}

/* ── Settings panel ──────────────────────────────────────────────────────── */

.setting-group {
  margin-bottom: 16px;
}

.setting-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}
.setting-label span { color: var(--text); font-family: monospace; }

input[type=range] {
  width: 100%;
  accent-color: var(--accent);
  height: 2px;
  cursor: pointer;
}

.pill-group {
  display: flex;
  gap: 4px;
}
.pill {
  flex: 1;
  padding: 4px 0;
  background: var(--bg);
  border: 1px solid var(--border2);
  color: var(--muted);
  font-size: 12px;
  font-family: monospace;
  border-radius: 3px;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.1s, color 0.1s;
}
.pill.active { border-color: var(--accent); color: var(--accent); }

/* ── Room type rows ──────────────────────────────────────────────────────── */

.rt-row { padding: 7px 0; border-bottom: 1px solid var(--border); }
.rt-row:last-child { border-bottom: none; }
.rt-header { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.rt-toggle {
  width: 14px; height: 14px; border: 1px solid var(--border2);
  border-radius: 2px; background: var(--bg); cursor: pointer; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; color: var(--accent);
}
.rt-toggle.checked { background: var(--accent); color: #000; }
.rt-name { font-size: 12px; flex: 1; }
.rt-weight-row { display: flex; align-items: center; gap: 6px; }
.rt-weight-row input[type=range] { flex: 1; }
.rt-weight-val { font-size: 11px; font-family: monospace; color: var(--muted); min-width: 20px; text-align: right; }

/* ── Number inputs ────────────────────────────────────────────────────────── */

.number-row { display: flex; align-items: center; gap: 6px; }
.number-row input[type=number] {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border2);
  color: var(--text);
  padding: 4px 8px;
  border-radius: 3px;
  font-size: 12px;
  font-family: monospace;
}
.number-row input[type=number]:focus { outline: none; border-color: #666; }
.number-unit { font-size: 11px; color: var(--muted); }

/* ── Detail panel ────────────────────────────────────────────────────────── */

.side-panel-left {
  border-left: none;
  border-right: 1px solid var(--border);
}

#detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

#detail-id {
  font-size: 13px;
  font-weight: 700;
  font-family: monospace;
  color: var(--accent);
  word-break: break-all;
  line-height: 1.4;
}

#detail-close {
  background: none; border: none;
  color: var(--muted); cursor: pointer; font-size: 13px;
  flex-shrink: 0; padding: 0; line-height: 1;
}
#detail-close:hover { color: var(--text); }

#detail-panel p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
}
#detail-panel p:first-child { margin-top: 0; }
#detail-panel p span { color: var(--text); }

/* ── Claim ───────────────────────────────────────────────────────────────── */

#detail-claim { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }

.claim-btn {
  width: 100%;
  padding: 7px 0;
  background: var(--bg);
  border: 1px solid #c8922a;
  color: #c8922a;
  font-size: 12px;
  font-family: monospace;
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.15s;
}
.claim-btn:hover { background: rgba(200, 146, 42, 0.1); }
.claim-btn:disabled { border-color: #333; color: #444; cursor: default; }
.claim-btn:disabled:hover { background: none; }

.claim-owned {
  font-size: 11px;
  font-family: monospace;
  color: #c8922a;
  text-align: center;
  padding: 6px 0;
  border: 1px solid #3a2a10;
  border-radius: 3px;
}

/* ── Owned panel ─────────────────────────────────────────────────────────── */

.owned-summary {
  display: flex;
  justify-content: space-around;
  padding: 14px 12px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.owned-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.owned-val {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  font-family: monospace;
}
.owned-cap { color: #333; font-size: 13px; }
.owned-lbl {
  font-size: 9px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.owned-income { color: #c8922a; }

#owned-body { padding: 0; overflow-y: auto; flex: 1; }

.owned-group-label {
  padding: 8px 12px 4px;
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #3a3a3a;
  border-bottom: 1px solid var(--border);
}

.owned-row {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.1s;
}
.owned-row:hover { background: #161616; }
.owned-row:last-child { border-bottom: none; }

.owned-row-id {
  font-size: 10px;
  font-family: 'Courier New', monospace;
  color: #888;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.owned-row-sub {
  font-size: 9px;
  color: #3a3a3a;
  white-space: nowrap;
}
.owned-row-ent {
  font-size: 11px;
  font-family: monospace;
  white-space: nowrap;
}
.owned-row-cap { color: #333; }
.owned-row-inc {
  font-size: 11px;
  font-family: monospace;
  color: #c8922a;
  min-width: 44px;
  text-align: right;
}

/* ── Leaderboard ─────────────────────────────────────────────────────────── */

.lb-leader {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 12px;
  border-bottom: 1px solid var(--border);
  border-left: 3px solid transparent;
}

.lb-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #000;
  flex-shrink: 0;
}

.lb-avatar-sm {
  width: 20px;
  height: 20px;
  font-size: 10px;
}

.lb-leader-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.lb-leader-name {
  font-size: 13px;
  font-weight: 600;
}

.lb-leader-stat {
  font-size: 10px;
  color: var(--muted);
}

.lb-row {
  display: grid;
  grid-template-columns: 20px 20px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-bottom: 1px solid var(--border);
}

.lb-row-me { background: rgba(200,146,42,0.05); }
.lb-row:last-child { border-bottom: none; }

.lb-rank {
  font-size: 10px;
  color: #444;
  font-family: monospace;
  text-align: right;
}

.lb-name {
  font-size: 11px;
  color: #aaa;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lb-nums {
  font-size: 10px;
  font-family: monospace;
  color: #555;
  white-space: nowrap;
}

/* ── Entity roster ───────────────────────────────────────────────────────── */

#roster-filters {
  display: flex;
  gap: 4px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.roster-filter {
  flex: 1;
  padding: 3px 0;
  background: var(--bg);
  border: 1px solid var(--border2);
  color: var(--muted);
  font-size: 10px;
  font-family: monospace;
  border-radius: 3px;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.1s;
}
.roster-filter.active { border-color: var(--accent); }

#roster-body { padding: 0; overflow-y: auto; flex: 1; }

.roster-row {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.1s;
}
.roster-row:hover { background: #161616; }
.roster-row:last-child { border-bottom: none; }

.entity-badge {
  font-size: 9px;
  font-family: 'Courier New', monospace;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.roster-name {
  font-size: 12px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.roster-room {
  font-size: 9px;
  font-family: 'Courier New', monospace;
  color: #3a3a3a;
  white-space: nowrap;
}
.roster-empty {
  padding: 24px 16px;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

/* ── Debug panel ─────────────────────────────────────────────────────────── */

#debug-panel {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 320px;
  background: rgba(0,0,0,0.88);
  border: 1px solid #2a2a2a;
  border-radius: 4px;
  padding: 8px 0 4px;
  font-family: 'Courier New', monospace;
  font-size: 11px;
  color: #888;
  pointer-events: all;
  z-index: 50;
}
#debug-panel.hidden { display: none; }

.dbg-section {
  padding: 6px 12px 3px;
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #3a3a3a;
  border-top: 1px solid #1a1a1a;
  margin-top: 4px;
}
.dbg-section:first-child { border-top: none; margin-top: 0; }

.dbg-row {
  display: flex;
  justify-content: space-between;
  padding: 2px 12px;
  gap: 12px;
}
.dbg-row span:first-child { color: #555; }
.dbg-row span:last-child  { color: #aaa; text-align: right; }
.dbg-gold { color: #c8922a !important; }
.dbg-small { font-size: 9px; }
.dbg-small span:last-child { color: #666 !important; }

.dbg-hint {
  text-align: center;
  font-size: 9px;
  color: #2a2a2a;
  padding: 6px 0 2px;
}

/* ── HUD ─────────────────────────────────────────────────────────────────── */

#hud {
  position: absolute;
  bottom: 16px;
  left: 16px;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 3px;
  background: rgba(0,0,0,0.55);
  padding: 8px 10px;
  border-radius: 3px;
  border: 1px solid #1e1e1e;
}
.hud-row {
  display: flex;
  gap: 10px;
  align-items: baseline;
}
.hud-label {
  font-size: 9px;
  font-family: 'Courier New', monospace;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  min-width: 44px;
}
.hud-row span:last-child {
  font-size: 12px;
  font-family: 'Courier New', monospace;
  color: #aaa;
}
#hud-credits { color: #c8922a !important; font-size: 13px !important; }

/* ── Compass ─────────────────────────────────────────────────────────────── */

#compass {
  position: absolute;
  bottom: 16px;
  right: 16px;
  width: 56px;
  height: 56px;
  pointer-events: none;
}
#compass svg { width: 100%; height: 100%; }
#compass text {
  font-family: 'Courier New', monospace;
  font-size: 9px;
  fill: #555;
  font-weight: 600;
}
#compass .cn { fill: #bbb; }

/* ── Info overlay ────────────────────────────────────────────────────────── */

/* ── Profile overlay ─────────────────────────────────────────────────────── */

.profile-btn {
  width: 26px !important;
  height: 26px !important;
  border-radius: 50% !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  font-family: monospace !important;
  padding: 0 !important;
  transition: background 0.2s, color 0.2s;
}

#profile-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 56px 12px 0 0;
  pointer-events: none;
}
#profile-overlay.hidden { display: none; }

#profile-box {
  width: 260px;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 4px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.7);
  pointer-events: all;
  overflow: hidden;
}

#profile-avatar-preview {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  font-family: monospace;
  color: #000;
  margin: 16px auto 8px;
  background: #c8922a;
}

#profile-username-input {
  width: 100%;
  padding: 6px 8px;
  background: var(--bg);
  border: 1px solid var(--border2);
  border-radius: 3px;
  color: var(--text);
  font-size: 13px;
  font-family: monospace;
}
#profile-username-input:focus { outline: none; border-color: #555; }

#profile-color-swatches {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.color-swatch {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
  transition: border-color 0.1s, transform 0.1s;
}
.color-swatch:hover  { transform: scale(1.15); }
.color-swatch.active { border-color: #fff; }

#profile-body { padding: 0 14px 16px; }

.profile-secured {
  font-size: 11px;
  font-family: monospace;
  color: #3cb450;
}

#profile-username-status {
  font-size: 11px;
  color: #dc3232;
  min-height: 14px;
  margin-top: 4px;
}

.profile-anon-note {
  font-size: 10px;
  color: var(--muted);
  margin: 0 0 8px;
  line-height: 1.5;
}

.profile-email-row {
  display: flex;
  gap: 6px;
}

.profile-email-row input {
  flex: 1;
  padding: 5px 8px;
  background: var(--bg);
  border: 1px solid var(--border2);
  border-radius: 3px;
  color: var(--text);
  font-size: 12px;
  font-family: monospace;
}
.profile-email-row input:focus { outline: none; border-color: #555; }

.profile-email-row button {
  padding: 5px 10px;
  background: var(--bg);
  border: 1px solid var(--border2);
  border-radius: 3px;
  color: var(--text);
  font-size: 11px;
  font-family: monospace;
  cursor: pointer;
  white-space: nowrap;
}
.profile-email-row button:hover { border-color: #555; }

#profile-email-status {
  font-size: 10px;
  color: var(--muted);
  margin-top: 5px;
  min-height: 14px;
}

.profile-recover-toggle {
  background: none;
  border: none;
  color: #444;
  font-size: 10px;
  cursor: pointer;
  padding: 4px 0 0;
  text-decoration: underline;
  font-family: monospace;
}
.profile-recover-toggle:hover { color: #888; }

#info-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 56px 12px 0 0;
  pointer-events: none;
}
#info-overlay.hidden { display: none; }

#info-box {
  width: 320px;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 4px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.7);
  pointer-events: all;
  overflow: hidden;
}

.overlay-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
#info-close {
  background: none; border: none;
  color: var(--muted); cursor: pointer; font-size: 13px; padding: 0;
}
#info-close:hover { color: var(--text); }

#info-body { padding: 12px 14px; }

.info-term {
  margin-bottom: 10px;
}
.info-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 2px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.info-desc {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
}

.info-id-example {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 8px 10px;
  margin-top: 4px;
}
.info-id-grid {
  display: flex;
  align-items: flex-start;
  gap: 2px;
}
.info-id-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.info-id-cell code {
  font-family: 'Courier New', monospace;
  font-size: 12px;
  color: var(--text);
}
.info-id-cell span {
  font-size: 9px;
  color: #555;
  white-space: nowrap;
  border-top: 1px solid #333;
  padding-top: 3px;
  width: 100%;
  text-align: center;
}
.info-id-sep {
  font-family: 'Courier New', monospace;
  font-size: 12px;
  color: var(--muted);
  padding: 0 1px;
  line-height: 1.4;
}

/* ── Welcome overlay ─────────────────────────────────────────── */
#welcome-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: #080808;
  display: flex;
  align-items: center;
  justify-content: center;
}
#welcome-overlay.hidden { display: none; }

#welcome-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  max-width: 380px;
  width: 100%;
  padding: 0 24px;
  text-align: center;
}

#welcome-name-display {
  font-family: 'Courier New', monospace;
  font-size: 28px;
  font-weight: bold;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text);
  line-height: 1.1;
}

#welcome-tagline {
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.05em;
  margin-top: -4px;
}

#welcome-rules {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #888;
  font-size: 13px;
  letter-spacing: 0.02em;
  margin: 4px 0;
}
#welcome-rules div { color: #777; }

#welcome-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
}

#welcome-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Courier New', monospace;
  font-size: 18px;
  font-weight: bold;
  color: #fff;
  flex-shrink: 0;
}

#welcome-name-input {
  width: 100%;
  box-sizing: border-box;
  background: #111;
  border: 1px solid #333;
  border-radius: 6px;
  color: var(--text);
  font-family: 'Courier New', monospace;
  font-size: 14px;
  padding: 9px 12px;
  text-align: center;
  outline: none;
}
#welcome-name-input:focus { border-color: #555; }
#welcome-name-input::placeholder { color: #444; }

#welcome-colors {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

#welcome-enter {
  width: 100%;
  padding: 11px;
  background: #e0e0e0;
  border: none;
  border-radius: 6px;
  color: #111;
  font-family: 'Courier New', monospace;
  font-size: 14px;
  font-weight: bold;
  letter-spacing: 0.05em;
  cursor: pointer;
  margin-top: 4px;
}
#welcome-enter:hover { background: #fff; }

#welcome-note {
  font-size: 11px;
  color: #444;
  margin-top: -4px;
}

.welcome-name-status {
  font-size: 11px;
  color: #dc3232;
  min-height: 14px;
  margin-top: -6px;
  text-align: center;
}

/* ── Explore hint ────────────────────────────────────────────── */
.explore-hint {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.75);
  border: 1px solid #333;
  border-radius: 6px;
  padding: 8px 16px;
  font-family: 'Courier New', monospace;
  font-size: 12px;
  color: #999;
  letter-spacing: 0.04em;
  pointer-events: none;
  white-space: nowrap;
  opacity: 1;
  transition: opacity 0.8s ease;
}
.explore-hint-out { opacity: 0; }
