
/* ── Layout ── */
body.ogf-active { overflow: hidden; }
#main-content { display: flex; flex-direction: column; height: 100dvh; }

/* ── Intro strip ── */
.ogf-intro {
  flex: none;
  margin-top: 66px;
  padding: 10px 20px 8px;
  background: #0a0a0a;
  border-bottom: 1px solid rgba(250,104,12,0.15);
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  position: relative;
  z-index: 10;
}
.ogf-crumb {
  font-family: var(--font-caption, "Pixelify Sans", monospace);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: rgba(250,104,12,0.8);
  text-transform: uppercase;
  white-space: nowrap;
}
.ogf-headline {
  margin: 0;
  font-weight: 400;
  font-family: var(--font-caption, "Pixelify Sans", monospace);
  font-size: 13px;
  letter-spacing: 0.08em;
  color: #f0ede6;
  text-transform: uppercase;
  white-space: nowrap;
}
.ogf-headline span { color: #fa680c; }
.ogf-stats {
  display: flex;
  gap: 16px;
  margin-left: auto;
}
.ogf-stat {
  font-family: var(--font-caption, "Pixelify Sans", monospace);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: rgba(240,237,230,0.4);
  white-space: nowrap;
}
.ogf-stat b { color: rgba(240,237,230,0.75); font-weight: 400; }

/* ── Grid world ── */
.ogf-world {
  flex: 1 1 0;
  position: relative;
  overflow: hidden;
  background: #05040a;
  min-height: 0;
}
#ogf-canvas {
  position: absolute;
  inset: 0;
  display: block;
  cursor: var(--cursor-graphic);
  touch-action: none;
}

/* ── HUD ── */
.ogf-hud {
  position: absolute;
  top: 12px;
  left: 12px;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 5;
}
.ogf-hud__label {
  font-family: var(--font-caption, "Pixelify Sans", monospace);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: rgba(250,104,12,0.5);
  text-transform: uppercase;
}
.ogf-hud__row {
  font-family: var(--font-caption, "Pixelify Sans", monospace);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: rgba(240,237,230,0.45);
  text-transform: uppercase;
  line-height: 1.6;
}
.ogf-hud__row span { color: rgba(240,237,230,0.7); }

/* ── Toolbar (top-right) ── */
.ogf-toolbar {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 10;
}
.ogf-search-wrap {
  display: flex;
  align-items: center;
  background: rgba(10,10,10,0.92);
  border: 1px solid rgba(250,104,12,0.2);
  padding: 0 8px;
  gap: 6px;
  width: 220px;
}
.ogf-search-wrap input {
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-caption, "Pixelify Sans", monospace);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: rgba(240,237,230,0.8);
  text-transform: uppercase;
  padding: 7px 0;
  flex: 1;
  min-width: 0;
}
.ogf-search-wrap input::placeholder { color: rgba(240,237,230,0.25); }
.ogf-search-wrap .ogf-search-icon {
  font-size: 12px;
  color: rgba(250,104,12,0.5);
  flex: none;
}
.ogf-zoom-btns {
  display: flex;
  gap: 4px;
  justify-content: flex-end;
}
.ogf-zbtn {
  font-family: var(--font-caption, "Pixelify Sans", monospace);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: rgba(240,237,230,0.7);
  background: rgba(10,10,10,0.92);
  border: 1px solid rgba(250,104,12,0.2);
  padding: 4px 9px;
  cursor: var(--cursor-hover);
  text-transform: uppercase;
  transition: border-color 0.15s, color 0.15s;
  user-select: none;
  line-height: 1;
}
.ogf-zbtn:hover { border-color: rgba(250,104,12,0.6); color: #fa680c; }
.ogf-zbtn:active { background: rgba(250,104,12,0.1); }

/* ── Search results dropdown ── */
.ogf-search-results {
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  right: 0;
  background: rgba(10,10,10,0.97);
  border: 1px solid rgba(250,104,12,0.25);
  display: none;
  z-index: 20;
}
.ogf-search-results.open { display: block; }
.ogf-search-result-item {
  padding: 8px 10px;
  font-family: var(--font-caption, "Pixelify Sans", monospace);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: rgba(240,237,230,0.7);
  cursor: var(--cursor-hover);
  border-bottom: 1px solid rgba(250,104,12,0.08);
  text-transform: uppercase;
}
.ogf-search-result-item:hover { background: rgba(250,104,12,0.08); color: #fa680c; }
.ogf-search-result-item b { color: #fa680c; font-weight: 400; }

/* ── Cell Inspector panel ── */
.ogf-inspector {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 280px;
  max-height: calc(100% - 20px); /* safety clamp only — compact content should never approach this */
  background: rgba(8,7,12,0.97);
  border-top: 1px solid rgba(250,104,12,0.25);
  border-left: 1px solid rgba(250,104,12,0.25);
  transform: translateY(100%);
  transition: transform 0.25s cubic-bezier(0.16,1,0.3,1);
  z-index: 15;
  display: flex;
  flex-direction: column;
}
.ogf-inspector.open { transform: translateY(0); }
.ogf-inspector__head {
  padding: 12px 14px 8px;
  border-bottom: 1px solid rgba(250,104,12,0.1);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex: none;
}
.ogf-inspector__label {
  font-family: var(--font-caption, "Pixelify Sans", monospace);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: rgba(250,104,12,0.55);
  text-transform: uppercase;
  margin-bottom: 4px;
}
.ogf-inspector__coord {
  font-family: var(--font-caption, "Pixelify Sans", monospace);
  font-size: 18px;
  letter-spacing: 0.06em;
  color: #f0ede6;
  line-height: 1;
}
.ogf-inspector__close {
  background: none;
  border: none;
  color: rgba(240,237,230,0.35);
  cursor: var(--cursor-hover);
  font-family: var(--font-caption, "Pixelify Sans", monospace);
  font-size: 14px;
  line-height: 1;
  padding: 2px 4px;
  margin-top: -2px;
}
.ogf-inspector__close:hover { color: rgba(240,237,230,0.8); }
.ogf-inspector__body {
  padding: 10px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1; /* no overflow-y here: the compact card is sized to always fit, never scroll internally */
}
.ogf-inspector__row {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ogf-inspector__key {
  font-family: var(--font-caption, "Pixelify Sans", monospace);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: rgba(240,237,230,0.3);
  text-transform: uppercase;
}
.ogf-inspector__val {
  font-family: var(--font-caption, "Pixelify Sans", monospace);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: rgba(240,237,230,0.85);
  text-transform: uppercase;
}
.ogf-inspector__status-avail { color: rgba(240,237,230,0.55); }
.ogf-inspector__status-claimed { color: #fa680c; }
.ogf-inspector__status-mine { color: #2ecc71; }
.ogf-insp-state {
  margin: 0;
  font-family: var(--font-caption, "Pixelify Sans", monospace);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(240,237,230,0.55);
}
.ogf-inspector__actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}
.ogf-btn-primary {
  font-family: var(--font-caption, "Pixelify Sans", monospace);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: #050200;
  background: #fa680c;
  border: none;
  padding: 10px 16px;
  cursor: var(--cursor-hover);
  text-transform: uppercase;
  transition: background 0.15s;
  text-align: center;
  display: block;
  width: 100%;
}
.ogf-btn-primary:hover { background: #ff8a3c; }
.ogf-btn-secondary {
  font-family: var(--font-caption, "Pixelify Sans", monospace);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: rgba(240,237,230,0.5);
  background: transparent;
  border: 1px solid rgba(250,104,12,0.2);
  padding: 8px 16px;
  cursor: var(--cursor-hover);
  text-transform: uppercase;
  transition: border-color 0.15s, color 0.15s;
  text-align: center;
  display: block;
  width: 100%;
}
.ogf-btn-secondary:hover { border-color: rgba(250,104,12,0.5); color: rgba(240,237,230,0.8); }

/* Profile card inside inspector */
.ogf-profile-swatch {
  width: 20px;
  height: 20px;
  display: inline-block;
  border: 1px solid rgba(255,255,255,0.15);
  vertical-align: middle;
  margin-right: 6px;
  flex: none;
}

/* ── Claim Modal ── */
.ogf-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5,4,10,0.88);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.ogf-modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}
.ogf-modal {
  background: #080710;
  border: 1px solid rgba(250,104,12,0.3);
  width: min(520px, 94vw);
  max-height: 90dvh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  transform: translateY(20px);
  transition: transform 0.25s cubic-bezier(0.16,1,0.3,1);
}
.ogf-modal-overlay.open .ogf-modal { transform: translateY(0); }
.ogf-modal__head {
  padding: 18px 20px 12px;
  border-bottom: 1px solid rgba(250,104,12,0.12);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex: none;
  position: sticky;
  top: 0;
  background: #080710;
  z-index: 2;
}
.ogf-modal__title {
  font-family: var(--font-caption, "Pixelify Sans", monospace);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: #fa680c;
  text-transform: uppercase;
}
.ogf-modal__close {
  background: none;
  border: none;
  color: rgba(240,237,230,0.35);
  cursor: var(--cursor-hover);
  font-family: var(--font-caption, "Pixelify Sans", monospace);
  font-size: 16px;
  line-height: 1;
  padding: 2px 6px;
}
.ogf-modal__close:hover { color: rgba(240,237,230,0.8); }
.ogf-modal__steps {
  display: flex;
  gap: 0;
  border-bottom: 1px solid rgba(250,104,12,0.1);
  flex: none;
}
.ogf-step-tab {
  flex: 1;
  padding: 6px 4px;
  text-align: center;
  font-family: var(--font-caption, "Pixelify Sans", monospace);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: rgba(240,237,230,0.25);
  border-right: 1px solid rgba(250,104,12,0.08);
  text-transform: uppercase;
}
.ogf-step-tab:last-child { border-right: none; }
.ogf-step-tab.active { color: #fa680c; background: rgba(250,104,12,0.06); }
.ogf-step-tab.done { color: rgba(46,204,113,0.6); }
.ogf-modal__body {
  padding: 20px;
  flex: 1;
}
.ogf-field-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}
.ogf-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ogf-field label {
  font-family: var(--font-caption, "Pixelify Sans", monospace);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: rgba(240,237,230,0.4);
  text-transform: uppercase;
}
.ogf-field input,
.ogf-field textarea {
  background: rgba(240,237,230,0.04);
  border: 1px solid rgba(250,104,12,0.2);
  color: rgba(240,237,230,0.9);
  font-family: var(--font-caption, "Pixelify Sans", monospace);
  font-size: 12px;
  letter-spacing: 0.05em;
  padding: 9px 10px;
  outline: none;
  resize: none;
  transition: border-color 0.15s;
}
.ogf-field input:focus,
.ogf-field textarea:focus {
  border-color: rgba(250,104,12,0.5);
}
.ogf-field input::placeholder,
.ogf-field textarea::placeholder { color: rgba(240,237,230,0.2); }
.ogf-field .ogf-field-note {
  font-family: var(--font-caption, "Pixelify Sans", monospace);
  font-size: 12px;
  color: rgba(240,237,230,0.25);
  letter-spacing: 0.05em;
}
.ogf-color-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 6px;
}
.ogf-color-swatch {
  aspect-ratio: 1;
  border: 2px solid transparent;
  cursor: var(--cursor-hover);
  transition: border-color 0.1s;
  position: relative;
}
.ogf-color-swatch.selected { border-color: #fff; }
.ogf-color-swatch:hover { border-color: rgba(255,255,255,0.5); }
.ogf-modal-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  padding-top: 16px;
  border-top: 1px solid rgba(250,104,12,0.1);
}
.ogf-confirm-box {
  background: rgba(250,104,12,0.05);
  border: 1px solid rgba(250,104,12,0.2);
  padding: 16px;
  margin-bottom: 20px;
}
.ogf-confirm-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 5px 0;
  border-bottom: 1px solid rgba(250,104,12,0.08);
}
.ogf-confirm-row:last-child { border-bottom: none; }
.ogf-confirm-key {
  font-family: var(--font-caption, "Pixelify Sans", monospace);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: rgba(240,237,230,0.35);
  text-transform: uppercase;
}
.ogf-confirm-val {
  font-family: var(--font-caption, "Pixelify Sans", monospace);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: rgba(240,237,230,0.85);
  text-transform: uppercase;
}
.ogf-orbi-id-display {
  font-family: var(--font-caption, "Pixelify Sans", monospace);
  font-size: 20px;
  letter-spacing: 0.1em;
  color: #fa680c;
  text-align: center;
  padding: 16px 0 8px;
}

/* ── Success screen ── */
.ogf-success {
  text-align: center;
  padding: 20px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.ogf-success__you {
  font-family: var(--font-caption, "Pixelify Sans", monospace);
  font-size: 28px;
  letter-spacing: 0.08em;
  color: rgba(240,237,230,0.6);
  text-transform: uppercase;
}
.ogf-success__here {
  font-family: var(--font-caption, "Pixelify Sans", monospace);
  font-size: 12px;
  letter-spacing: 0.2em;
  color: rgba(240,237,230,0.35);
  text-transform: uppercase;
}
.ogf-success__id {
  font-family: var(--font-caption, "Pixelify Sans", monospace);
  font-size: 22px;
  letter-spacing: 0.1em;
  color: #fa680c;
}
.ogf-success__coord {
  font-family: var(--font-caption, "Pixelify Sans", monospace);
  font-size: 13px;
  letter-spacing: 0.08em;
  color: rgba(240,237,230,0.5);
}
.ogf-success__done {
  font-family: var(--font-caption, "Pixelify Sans", monospace);
  font-size: 12px;
  letter-spacing: 0.2em;
  color: rgba(46,204,113,0.7);
  text-transform: uppercase;
}

/* ── Entrance animation ── */
.ogf-world { opacity: 0; animation: ogf-fade-in 0.8s 0.1s ease forwards; }
@keyframes ogf-fade-in { to { opacity: 1; } }

/* ── "Coming soon" notice bar ── */
.ogf-notice {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 280px;
  padding: 6px 14px;
  background: rgba(5,4,10,0.85);
  border-top: 1px solid rgba(250,104,12,0.12);
  font-family: var(--font-caption, "Pixelify Sans", monospace);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: rgba(240,237,230,0.25);
  text-transform: uppercase;
  pointer-events: none;
  z-index: 4;
}
.ogf-notice span { color: rgba(250,104,12,0.4); }

/* ── Mobile adaptations ── */
@media (max-width: 767px) {
  .ogf-intro { margin-top: 58px; padding: 8px 14px; gap: 10px; min-width: 0; }
  .ogf-stats { display: none; }
  /* the long unbroken "50,000,000 positions..." tail was the one thing on this page with no mobile rule at all:
     as a single nowrap flex child its full text width forced the whole document wider than the device, which
     pushed the nav's CREATE ORBI/MENU buttons off past the (zoomed-out) right edge. Drop the tail, keep the label. */
  .ogf-headline { white-space: normal; min-width: 0; }
  .ogf-headline span { display: none; }
  .ogf-inspector { width: 100%; border-left: none; border-top: 1px solid rgba(250,104,12,0.25); max-height: 50%; }
  .ogf-toolbar { top: 8px; right: 8px; }
  .ogf-search-wrap { width: 180px; }
  .ogf-notice { right: 0; }
  .ogf-hud { display: none; }
}
@media (max-width: 400px) {
  .ogf-search-wrap { width: 150px; }
}

/* ── Demo mode banner ── */
.ogf-demo-banner {
  background: rgba(250,104,12,0.08);
  border: 1px solid rgba(250,104,12,0.3);
  padding: 12px 14px;
  margin-bottom: 16px;
}
.ogf-demo-banner__title {
  font-family: var(--font-caption, "Pixelify Sans", monospace);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: #fa680c;
  margin-bottom: 6px;
}
.ogf-demo-banner__body {
  font-family: var(--font-caption, "Pixelify Sans", monospace);
  font-size: 12px;
  letter-spacing: 0.05em;
  color: rgba(240,237,230,0.5);
  line-height: 1.5;
}
.ogf-demo-banner--inline {
  padding: 8px 12px;
  margin-bottom: 12px;
  text-align: center;
  font-family: var(--font-caption, "Pixelify Sans", monospace);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: rgba(250,104,12,0.7);
  background: rgba(250,104,12,0.05);
  border: 1px solid rgba(250,104,12,0.2);
}

/* ── Debug mode — hidden from normal visitors, visible with ?debug=1 ── */
.ogf-debug-only { display: none !important; }
:root.ogf-debug-mode .ogf-debug-only { display: block !important; }
:root.ogf-debug-mode .ogf-hud__row.ogf-debug-only { display: block !important; }

/* ── Crown badge — used in inspector and success screen ── */
.ogf-crown-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-caption, "Pixelify Sans", monospace);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: #fa680c;
  padding: 5px 8px;
  border: 1px solid rgba(250,180,60,0.35);
  background: rgba(250,104,12,0.06);
  margin-bottom: 10px;
}
.ogf-crown-badge--large {
  font-size: 12px;
  padding: 8px 12px;
  margin-bottom: 12px;
}
