:root {
  color-scheme: dark;
  font: 16px/1.5 "Courier New", monospace;
  color: #f5f5f5;
  background: #000;
  --phosphor: #fff;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background: repeating-linear-gradient(0deg, #0003 0 1px, transparent 1px 4px);
}
main { width: min(65rem, calc(100% - 2rem)); margin: auto; padding: clamp(2rem, 7vh, 5rem) 0; }
h1 {
  font-weight: inherit;
  font-size: clamp(1.7rem, 6.5vw, 4.8rem);
  line-height: 1.1;
  margin: 0 0 2rem;
}
label { display: block; margin-bottom: .55rem; }
.terminal {
  position: relative;
  display: flex; align-items: center; gap: .65rem;
  background: #080808; border: 1px solid #626262; padding-inline: .8rem;
}
.terminal:focus-within { border-color: var(--phosphor); }
input {
  width: 100%; min-width: 0; padding: .95rem 0; border: 0;
  outline: none; background: transparent; color: inherit; font: inherit;
  caret-color: var(--phosphor);
  caret-shape: block;
}
/* Paint the opening caret even when the browser suppresses autofocus or blinking. */
#opening-caret {
  position: absolute;
  inset-inline-start: .8rem;
  top: 50%;
  width: 1ch;
  height: 1em;
  transform: translateY(-50%);
  background: var(--phosphor);
  pointer-events: none;
  animation: caret-blink 1s step-end infinite;
}
.terminal:has(#opening-caret:not([hidden])) input { caret-color: transparent; }
@keyframes caret-blink { 50% { opacity: 0; } }
#lake-suggestions {
  margin: 0; padding: 0; list-style: none;
  background: #080808; border: 1px solid #626262; border-top: 0;
  max-height: 17rem; overflow-y: auto;
}
#lake-suggestions li { padding: .55rem .8rem; cursor: pointer; }
#lake-suggestions li:hover, #lake-suggestions [aria-selected="true"] {
  color: #080808; background: var(--phosphor);
}
input::selection { color: #080808; background: var(--phosphor); }
#status { min-height: 1.5em; color: #bbb; margin: .7rem 0 1.25rem; }
#result { border: 1px solid #626262; background: #080808; }
#result header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .75rem; padding: 1rem 1.2rem; border-bottom: 1px solid #626262; }
h2, #board-size { margin: 0; }
h2 { font-size: 1.35rem; font-weight: inherit; }
#board-size { color: #bbb; }
button { font: inherit; color: var(--phosphor); background: #161616; border: 1px solid #626262; padding: .45em .75em; cursor: pointer; }
button:focus-visible { outline: 2px solid var(--phosphor); outline-offset: 3px; }
#board-model { height: clamp(16rem, 55vh, 36rem); }
canvas { display: block; width: 100%; height: 100%; touch-action: none; }
[hidden] { display: none !important; }

.wood-options button[aria-pressed="true"] { color: #080808; background: var(--phosphor); }

.wood-options { display: flex; flex-wrap: wrap; gap: .5rem; }

.checkout-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: .35em .75em;
  color: #080808;
  background: var(--phosphor);
  text-decoration: none;
}
.checkout-link:hover { text-decoration: underline; }
.checkout-link:focus-visible { outline: 2px solid var(--phosphor); outline-offset: 3px; }

.terminal button { min-height: 44px; flex: 0 0 auto; }

.board-details { display: grid; justify-items: start; gap: .55rem; }
