/* Blitz Hunt: page-specific styles on top of styles.css (fonts, colours, header). */
.hunt-page .research-badge { margin-left: auto; }
.hunt { padding: 16px 0 40px; max-width: 1000px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.hunt-note { margin: 8px 0 0; font: 700 11px/1.4 var(--mono); color: var(--muted); }
@media (max-width: 640px) { .hunt-note { padding: 0 14px; } .hunt-about { padding: 0 14px; } }

.stage { position: relative; border: 4px solid #000; overflow: hidden; background: #3cbcfc; }
#hunt-canvas {
  display: block; width: 100%; cursor: crosshair; touch-action: manipulation;
  -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent;
}
#hunt-canvas.portrait { height: calc(100vh - 44px); height: calc(100svh - 44px); min-height: 400px; }
.stage:fullscreen { border: 0; background: #000; }
.hud-button {
  position: absolute; left: 54px; top: 0; width: 26px; height: 18px; padding: 0; display: grid; place-items: center;
  color: #fcfcfc; background: #000; border: 0; cursor: pointer; z-index: 2;
}
#fs-button { left: 84px; }
#skip-button { left: 114px; width: auto; padding: 0 6px; font: 700 10px/18px var(--mono); letter-spacing: .04em; }
.hud-button[aria-pressed="true"] { color: #d82800; }

.overlay { position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; padding: 14px; background: rgba(0, 0, 0, .45); }
.overlay[hidden] { display: none; }
/* 8-bit dialog: black box, white double border */
.dialog {
  width: min(560px, 100%); max-height: 100%; overflow: auto;
  padding: 18px 20px; color: #fcfcfc; background: #000;
  border: 4px solid #fcfcfc; outline: 4px solid #000; box-shadow: inset 0 0 0 4px #000, inset 0 0 0 6px #58d854;
  font: 700 13px/1.5 var(--mono); text-align: center;
}
.dialog h2 { margin: 0 0 8px; font: 700 24px/1.15 var(--mono); letter-spacing: .02em; text-transform: uppercase; }
.dialog h2 em { font-style: normal; color: #f8b800; }
.dialog p { margin: 6px 0; }
.dialog .small { font-size: 11px; color: #bcbcbc; }
.dialog button {
  margin-top: 12px; padding: 10px 22px; cursor: pointer; color: #000;
  font: 700 14px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase;
  background: #f8b800; border: 3px solid #fcfcfc; box-shadow: 0 0 0 3px #000;
}
.dialog button:active { transform: translateY(2px); }
.dialog table { width: 100%; margin-top: 10px; border-collapse: collapse; font-size: 12px; }
.dialog th, .dialog td { padding: 4px 6px; border-bottom: 1px solid #505050; text-align: right; }
.dialog th:first-child, .dialog td:first-child { text-align: left; }
.dialog td.total { color: #f8b800; }
.dialog td.bad { color: #fc7460; }
.dialog td small { color: #bcbcbc; font-size: 10px; }
.dialog .table-wrap { width: 100%; }
.dialog .crown { vertical-align: -1px; margin-right: 4px; }
.dialog .winner .crown { width: 27px; height: 15px; vertical-align: -2px; }
.dialog .wrong-line { margin: 8px 0 4px; font: 700 20px/1.2 var(--mono); letter-spacing: .03em; }
.dialog .left { text-align: left; }
.dialog details { margin-top: 10px; }
.dialog details summary { cursor: pointer; color: #f8b800; }
.dialog details p { margin: 6px 0; }

.hunt-legend { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; font-size: 13px; line-height: 1.45; color: var(--ink); }
.hunt-legend em { color: var(--muted); font-style: normal; font-family: var(--mono); font-size: 11px; }
.hunt-legend .dot { display: inline-block; width: 10px; height: 10px; margin-right: 8px; border: 2px solid var(--ink); }
.dot.blitz { background: #2f5bff; }
.dot.jev { background: #f87800; }
.dot.human { background: #fcfcfc; }
.dot.luna { background: #f878f8; }

/* API access form, right below the game. */
.signup { margin-top: 18px; padding: 14px 16px; background: var(--card); border: var(--border); box-shadow: 4px 4px 0 var(--ink); font-size: 13px; line-height: 1.5; color: var(--ink); }
.signup h2 { margin: 0 0 4px; font: 700 14px/1.3 var(--mono); text-transform: uppercase; letter-spacing: .04em; }
.signup p { margin: 4px 0; }
.signup form { display: grid; grid-template-columns: repeat(3, 1fr); align-items: end; gap: 8px 12px; margin-top: 10px; }
.signup label { display: flex; flex-direction: column; gap: 3px; font: 700 11px/1.3 var(--mono); }
.signup label small { font-weight: 400; color: var(--muted); }
.signup label.wide { grid-column: 1 / -1; }
.signup label.trap { position: absolute; left: -9999px; }
.signup input, .signup textarea { padding: 6px 8px; font: 13px/1.4 var(--sans); color: var(--ink); background: var(--paper); border: var(--border); border-radius: 0; }
.signup textarea { resize: vertical; }
.signup button { justify-self: start; padding: 7px 14px; font: 700 12px/1.2 var(--mono); text-transform: uppercase; letter-spacing: .04em; color: #000; background: #f8b800; border: var(--border); box-shadow: 2px 2px 0 var(--ink); cursor: pointer; }
.signup button:disabled { opacity: .6; cursor: default; }
.signup-status { align-self: center; grid-column: 2 / -1; font: 700 12px/1.3 var(--mono); color: var(--error); }
.signup-done { grid-column: 1 / -1; font: 700 14px/1.4 var(--mono); }
.signup .small-note { font-size: 12px; color: var(--muted); }
@media (max-width: 640px) {
  .signup { margin: 18px 14px 0; }
  .signup form { grid-template-columns: 1fr; }
  .signup-status { grid-column: 1; }
}

.hunt-about { margin-top: 22px; font-size: 13px; line-height: 1.5; color: var(--ink); }
.hunt-about h2 { margin: 18px 0 6px; font: 700 14px/1.3 var(--mono); text-transform: uppercase; letter-spacing: .04em; }
.hunt-about p, .hunt-about li { margin: 4px 0; }
.hunt-about ol, .hunt-about ul { padding-left: 20px; }
.hunt-about a, .dialog a { color: inherit; text-decoration: underline; }
.cost-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.cost-table th, .cost-table td { padding: 4px 6px; border-bottom: 1px solid #ccc; text-align: left; vertical-align: top; }
.hunt-about .hunt-legend { padding: 0; }
.hunt-about .small-note { font-size: 12px; color: var(--muted); }
.dialog table.cost th, .dialog table.cost td { text-align: left; }

.dialog h3 { margin: 14px 0 6px; font: 700 14px/1.2 var(--mono); text-transform: uppercase; color: #f8b800; }
.dialog .links a { color: #bcbcbc; }
.dialog tr.out td { color: #7c7c7c; text-align: left; }
.dialog tr.out td:first-child { color: #7c7c7c; }
.meter { display: grid; gap: 6px; text-align: left; }
.meter-row { display: grid; grid-template-columns: 52px 1fr 104px; align-items: center; gap: 8px; }
.meter-name { font-size: 11px; }
.meter-track { height: 12px; background: #202020; border: 2px solid #505050; }
.meter-bar { display: block; height: 100%; width: 0; transition: width 1.4s steps(14); }
.meter-value { font-size: 11px; text-align: right; }
.meter-notes { text-align: left; }

@media (max-width: 640px) {
  /* phone: slim top bar, then a full-height, full-bleed game; the explanation is below the fold */
  .hunt-page .site-header { min-height: 36px; gap: 10px; border-bottom-width: 2px; }
  .hunt-page .brand-mark { width: 22px; height: 22px; box-shadow: none; border-radius: 6px; }
  .hunt-page .brand-name { font-size: 15px; }
  .hunt-page .research-badge { padding: 5px 8px; font-size: 9px; }
  .hunt { width: 100%; padding: 0 0 32px; }
  .stage { border-width: 3px 0; }
  .dialog { padding: 14px; font-size: 12px; }
  .dialog h2 { font-size: 19px; }
  .dialog table { font-size: 10px; }
  .dialog th, .dialog td { padding: 3px 2px; }
  .dialog td small { font-size: 9px; }
  .dialog .wrong-line { font-size: 16px; }
  .hunt-note { font-size: 10px; }
}

/* Call-to-action: fixed bottom-right, above the game and its dialogs; on phones it sits in a reserved HUD band. */
.cta { position: fixed; right: 8px; bottom: 8px; z-index: 5; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.cta-button {
  display: block; padding: 4px 8px; color: #000; background: #f8b800; text-decoration: none; text-align: center;
  font: 700 10px/1.25 var(--mono); letter-spacing: .04em; text-transform: uppercase;
  border: 2px solid #fcfcfc; box-shadow: 0 0 0 2px #000;
}
.cta-button small { display: block; font: 700 9px/1.2 var(--mono); text-transform: none; letter-spacing: 0; color: #503000; }
.cta-button:active { transform: translateY(1px); }
.cta[hidden], .cta-link[hidden] { display: none; }
.cta-link { padding: 1px 5px; color: #fcfcfc; background: #000; font: 700 10px/1.3 var(--mono); text-decoration: underline; }
