:root {
  color-scheme: dark;
  font-family: Arial, Helvetica, sans-serif;
  color: #f5f7ff;
  background: #020317;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: #f5f7ff;
  background:
    radial-gradient(circle at 50% -8%, #174675 0, #0a2144 24%, #06152e 45%, #020317 78%);
}


/* Shared 2026 CaptNemo header — copied from the current games.html template */
.capt-modern-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: rgba(3,17,27,.84);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(103,213,245,.22);
  font-family: Arial, Helvetica, sans-serif;
  transition: background .25s ease;
}

.capt-modern-header.scrolled { background: rgba(3,17,27,.96); }

.capt-modern-nav {
  width: min(1120px, calc(100% - 32px));
  min-height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.capt-modern-brand {
  display: inline-flex;
  align-items: center;
  padding: 8px 0;
  text-decoration: none;
}

.capt-modern-brand img {
  display: block;
  max-height: 42px;
  width: auto;
  border: 0;
}

.capt-modern-menu {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin: 0;
  padding: 0;
}

.capt-modern-menu > li { position: relative; margin: 0; padding: 0; }

.capt-modern-menu > li > a,
.capt-modern-dropdown-toggle {
  display: block;
  padding: 22px 12px;
  color: #d8edf5 !important;
  text-decoration: none !important;
  font-size: .92rem;
  font-weight: 600;
  letter-spacing: .02em;
  white-space: nowrap;
}

.capt-modern-menu > li > a:hover,
.capt-modern-menu > li > a:focus,
.capt-modern-dropdown-toggle:hover,
.capt-modern-dropdown-toggle:focus {
  color: #fff !important;
  background: rgba(255,255,255,.055);
  outline: none;
}

.capt-modern-caret {
  display: inline-block;
  margin-left: 5px;
  border-top: 4px solid currentColor;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  vertical-align: .15em;
}

.capt-modern-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% - 1px);
  right: 0;
  min-width: 220px;
  margin: 0;
  padding: 7px 0;
  list-style: none;
  background: #081d2a;
  border: 1px solid rgba(103,213,245,.24);
  border-radius: 0 0 9px 9px;
  box-shadow: 0 14px 32px rgba(0,0,0,.38);
  overflow: hidden;
  z-index: 10000;
}

.capt-modern-dropdown.open .capt-modern-dropdown-menu,
.capt-modern-dropdown:hover .capt-modern-dropdown-menu { display: block; }

.capt-modern-dropdown-menu li { margin: 0; padding: 0; }

.capt-modern-dropdown-menu a {
  display: block;
  padding: 10px 15px;
  color: #d8edf5 !important;
  text-decoration: none !important;
  font-size: .9rem;
  white-space: nowrap;
}

.capt-modern-dropdown-menu a:hover,
.capt-modern-dropdown-menu a:focus {
  color: #fff !important;
  background: rgba(103,213,245,.12);
  outline: none;
}

.capt-modern-menu-button {
  display: none;
  border: 1px solid rgba(103,213,245,.25);
  border-radius: 6px;
  background: rgba(10,35,50,.82);
  color: #fff;
  padding: 8px 10px;
  font: inherit;
  cursor: pointer;
}

.games-footer {
  margin-top: 42px;
  padding-top: 22px;
  border-top: 1px solid rgba(142,167,216,.2);
  color: #8295b8;
  font-size: .88rem;
  text-align: center;
  font-family: Arial, Helvetica, sans-serif;
}

.app-shell {
  width: min(1120px, 94vw);
  margin: 0 auto;
  padding: 108px 0 54px;
}

.app-shell > header {
  color: #e8d9bc;
  text-align: center;
  margin-bottom: 12px;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.4rem);
  letter-spacing: .14em;
  text-transform: uppercase;
}

.subtitle {
  margin: 6px 0 0;
  opacity: .75;
}

.controls,
.transcript {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  align-items: center;
  justify-content: center;
  color: #eadfc8;
  margin: 14px 0;
}

.controls button {
  appearance: none;
  border: 1px solid #8e6e45;
  background: #2c2118;
  color: #f3e4c6;
  padding: 9px 14px;
  border-radius: 6px;
  cursor: pointer;
  font: inherit;
}

.controls button:hover { background: #3a2a1d; }
.controls input { vertical-align: middle; }

.transcript {
  justify-content: flex-start;
  background: rgba(0,0,0,.22);
  padding: 10px 14px;
  border-radius: 8px;
  line-height: 1.5;
}

.transcript > div { flex: 1 1 420px; }

.board {
  position: relative;
  font-family: Georgia, "Times New Roman", serif;
  aspect-ratio: 1.72 / 1;
  min-height: 520px;
  border: 9px solid #4b301a;
  border-radius: 26px;
  overflow: hidden;
  background:
    linear-gradient(rgba(255,255,255,.05), rgba(0,0,0,.06)),
    repeating-linear-gradient(92deg, rgba(85,45,15,.05) 0 2px, rgba(255,255,255,.025) 2px 8px),
    #d6b47c;
  box-shadow:
    inset 0 0 0 3px #9b7441,
    inset 0 0 40px rgba(70,35,10,.35),
    0 12px 30px rgba(0,0,0,.45);
  user-select: none;
}

.board::before {
  content: "MYSTIC TALKING BOARD";
  position: absolute;
  left: 50%;
  top: 10%;
  transform: translateX(-50%);
  font-weight: 700;
  font-size: clamp(1rem, 2vw, 1.7rem);
  letter-spacing: .15em;
  white-space: nowrap;
}

.corner {
  position: absolute;
  top: 20%;
  font-size: clamp(1.6rem, 3.7vw, 3.1rem);
  font-weight: 700;
  letter-spacing: .12em;
}
.yes { left: 7%; }
.no { right: 7%; }

.letters,
.numbers {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 89%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.letters span,
.numbers span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.8em;
  height: 1.8em;
  font-weight: 700;
  font-size: clamp(1.25rem, 2.9vw, 2.45rem);
}

.top-row { top: 39%; }
.bottom-row { top: 52%; }
.numbers { top: 68%; width: 68%; }
.numbers span { font-size: clamp(1.1rem, 2.4vw, 2rem); }

.farewell {
  position: absolute;
  left: 50%;
  bottom: 10%;
  transform: translateX(-50%);
  font-weight: 700;
  letter-spacing: .2em;
  font-size: clamp(1.4rem, 3.1vw, 2.5rem);
}

.planchette {
  position: absolute;
  width: clamp(86px, 12vw, 132px);
  aspect-ratio: 1.08 / 1;
  left: 50%;
  top: 82%;
  transform: translate(-50%, -50%);
  transition-property: left, top;
  transition-timing-function: cubic-bezier(.36,.02,.25,1);
  z-index: 20;
  filter: drop-shadow(0 7px 5px rgba(0,0,0,.36));
}

.planchette::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #7e4f29;
  clip-path: polygon(50% 0%, 100% 64%, 79% 100%, 21% 100%, 0% 64%);
  border-radius: 24% 24% 30% 30%;
  /* Cut a real viewing hole through the planchette body. */
  -webkit-mask: radial-gradient(circle at 50% 54%, transparent 0 17%, #000 18%);
  mask: radial-gradient(circle at 50% 54%, transparent 0 17%, #000 18%);
}

.window {
  position: absolute;
  width: 35%;
  aspect-ratio: 1;
  left: 50%;
  top: 54%;
  transform: translate(-50%, -50%);
  background: transparent;
  border: 5px solid #4e2e16;
  border-radius: 50%;
  z-index: 1;
  box-shadow: 0 0 0 1px rgba(255,255,255,.14), inset 0 0 6px rgba(0,0,0,.18);
  pointer-events: none;
}

[data-target].active {
  text-shadow: 0 0 12px #fff4c2;
}

.hint {
  color: #bcad94;
  text-align: center;
  font-size: .9rem;
}

code { color: #e4d2af; }

@media (max-width: 700px) {
  .board { min-height: 420px; }
  .board::before { top: 8%; }
  .top-row { top: 38%; }
  .bottom-row { top: 52%; }
  .numbers { top: 67%; width: 76%; }
}

.question-entry {
  width: min(760px, 100%);
  margin: 14px auto;
  color: #eadfc8;
}

.question-entry > label {
  display: block;
  margin-bottom: 7px;
  font-weight: 700;
  letter-spacing: .04em;
}

.question-entry-row {
  display: flex;
  gap: 10px;
}

.question-entry input {
  min-width: 0;
  flex: 1 1 auto;
  border: 1px solid #8e6e45;
  background: #211811;
  color: #f3e4c6;
  padding: 11px 13px;
  border-radius: 6px;
  font: inherit;
  outline: none;
}

.question-entry input:focus {
  border-color: #c69a60;
  box-shadow: 0 0 0 2px rgba(198, 154, 96, .18);
}

.question-entry input::placeholder {
  color: #a99980;
}

.question-entry button {
  appearance: none;
  border: 1px solid #8e6e45;
  background: #2c2118;
  color: #f3e4c6;
  padding: 9px 18px;
  border-radius: 6px;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.question-entry button:hover { background: #3a2a1d; }
.question-entry button:disabled,
.controls button:disabled,
.question-entry input:disabled {
  opacity: .55;
  cursor: default;
}

@media (max-width: 540px) {
  .question-entry-row { flex-direction: column; }
  .question-entry button { width: 100%; }
}


@media (max-width: 880px) {
  .capt-modern-nav {
    min-height: 62px;
    flex-wrap: wrap;
    padding: 8px 0;
  }

  .capt-modern-menu-button { display: block; }

  .capt-modern-menu {
    display: none;
    flex: 0 0 100%;
    width: 100%;
    align-items: stretch;
    flex-direction: column;
    border-top: 1px solid rgba(103,213,245,.22);
    padding-top: 7px;
  }

  .capt-modern-menu.open { display: flex; }

  .capt-modern-menu > li > a,
  .capt-modern-dropdown-toggle { padding: 11px 8px; }

  .capt-modern-dropdown-menu {
    position: static;
    min-width: 0;
    border-radius: 7px;
    box-shadow: none;
    margin: 0 0 5px 12px;
  }

  .capt-modern-dropdown:hover .capt-modern-dropdown-menu { display: none; }
  .capt-modern-dropdown.open .capt-modern-dropdown-menu { display: block; }
}

@media (max-width: 620px) {
  .app-shell { padding-top: 94px; }
}
