.hunt-panel {
  display: grid;
  gap: 18px;
  min-height: calc(100vh - 56px);
}

.hunt-header,
.query-console,
.dashboard-placeholder {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(0, 87, 153, 0.88), rgba(3, 18, 31, 0.94));
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35), inset 0 0 32px rgba(0, 174, 255, 0.08);
}

.hunt-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: var(--subpage-header-gap, 18px);
  align-items: center;
  min-height: calc(var(--subpage-header-min-height, 188px) * 0.7);
  height: calc(var(--subpage-header-min-height, 188px) * 0.7);
  padding: var(--subpage-header-padding, clamp(18px, 4vw, 28px));
}

.hunt-header .hunt-copy {
  grid-column: 1;
  justify-self: start;
  text-align: left;
}

.hunt-header .page-logo {
  grid-column: var(--subpage-logo-column, 2);
  width: var(--subpage-logo-width, min(270px, 63vw));
  margin-inline: auto;
  justify-self: var(--subpage-logo-alignment, center);
}

.hunt-header .game-actions {
  grid-column: var(--subpage-actions-column, 3);
  justify-self: end;
}

.hunt-header .ghost-link {
  min-height: var(--subpage-button-height, 30px);
  text-decoration: none;
  text-align: center;
  justify-content: center;
  border-color: rgba(0, 87, 153, 0.35);
  box-shadow:
    0 5px 0 rgba(0, 42, 74, 0.95),
    0 10px 18px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);
  transform: translateY(-3px);
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

.hunt-header .ghost-link:hover {
  transform: translateY(-5px);
  box-shadow:
    0 7px 0 rgba(0, 42, 74, 0.95),
    0 14px 24px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.hunt-header .ghost-link:active {
  transform: translateY(1px);
  box-shadow:
    0 1px 0 rgba(0, 42, 74, 0.95),
    0 6px 12px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.hunt-header .lead {
  margin-bottom: 0;
  font-size: 87.5%;
}

.hunt-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.query-console,
.dashboard-placeholder {
  display: grid;
  gap: 14px;
  align-content: start;
  padding: clamp(18px, 3vw, 24px);
}

.query-console {
  grid-template-rows: auto 1fr;
  height: calc(var(--subpage-header-min-height, 188px) * 0.7);
}

.query-row {
  display: grid;
  grid-template-columns: minmax(0, 9fr) minmax(120px, 1fr);
  gap: 12px;
  min-height: 0;
}

.query-console textarea {
  min-height: 0;
}

.query-row .primary-action {
  align-self: center;
  justify-self: end;
  width: 85%;
  height: 40%;
}

.query-console span,
.dashboard-placeholder span {
  color: var(--muted);
  font-size: 0.64rem;
  line-height: 1;
  font-weight: 800;
}

.dashboard-placeholder strong {
  color: #ffffff;
  font-size: clamp(1.2rem, 3vw, 2rem);
  font-weight: 800;
}

.dashboard-placeholder p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.logs-console {
  min-height: min(62vh, 720px);
}

.log-results {
  display: grid;
  gap: 2.5px;
  max-height: none;
  height: 100%;
  overflow: auto;
}

.log-row {
  display: grid;
  grid-template-columns: 18px repeat(var(--log-field-count, 1), minmax(140px, max-content));
  min-width: max-content;
  gap: 12px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(3, 18, 31, 0.52);
  font-size: 0.64rem;
  line-height: 1;
}

.log-row:not(.header) {
  min-height: 0;
  padding-block: 0;
  font-size: 0.64rem;
  line-height: 1;
}

.log-select {
  display: flex;
  align-items: center;
}

.log-select input {
  width: 12px;
  height: 12px;
  margin: 0;
}

.log-row.header {
  font-weight: 800;
  color: var(--cyan);
  font-size: 1.92rem;
  line-height: 1.1;
}

.log-row strong {
  font-size: inherit;
}

.start-button {
  min-height: calc(var(--subpage-button-height, 30px) * 0.85);
  padding: 0 18px;
  border: 1px solid rgba(4, 120, 87, 0.55);
  border-radius: 8px;
  background: #16a34a;
  color: #ffffff;
  font-weight: 800;
  box-shadow: 0 5px 0 rgba(4, 78, 46, 0.95), 0 10px 18px rgba(0, 0, 0, 0.28);
}

.hunt-timer {
  color: #ffffff;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 900px) {
  .hunt-panel {
    grid-template-columns: 1fr;
    min-height: calc(100vh - 28px);
  }

  .hunt-header {
    grid-template-columns: 1fr;
    align-items: stretch;
    height: auto;
  }

  .hunt-header .hunt-copy,
  .hunt-header .page-logo,
  .hunt-header .game-actions {
    grid-column: auto;
    justify-self: center;
  }

  .hunt-header .hunt-copy {
    text-align: center;
  }
}

@media (max-width: 640px) {
  .query-row {
    grid-template-columns: 1fr;
  }

  .log-row {
    grid-template-columns: 1fr;
  }
}


/* guided tutorial */
.tutorial-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(0, 0, 0, 0.42);
}

.tutorial-highlight {
  position: fixed;
  border: 4px solid #ef4444;
  border-radius: 999px;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.18);
  pointer-events: none;
}

.tutorial-arrow {
  position: fixed;
  width: 36px;
  height: 56px;
  border-left: 5px solid #ef4444;
  transform: rotate(28deg);
  pointer-events: none;
}

.tutorial-arrow::after {
  content: "";
  position: absolute;
  left: -11px;
  bottom: -2px;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 16px solid #ef4444;
}

.tutorial-card {
  position: fixed;
  width: min(360px, calc(100vw - 36px));
  padding: 16px;
  border-radius: 12px;
  background: #ffffff;
  color: #002a4a;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.32);
}

.tutorial-card strong { display: block; margin-bottom: 8px; }
.tutorial-card p { margin: 0 0 14px; line-height: 1.35; }
.tutorial-actions { display: flex; justify-content: flex-end; gap: 8px; }
