* { box-sizing: border-box; }
[hidden] { display: none !important; }
:root { color-scheme: light; font: 16px/1.5 system-ui, sans-serif; color: #20382d; }
body {
  min-height: 100vh; min-height: 100svh; margin: 0; padding: 18px;
  display: grid; place-items: center; background: #eaf0e7;
}
main {
  width: min(100%, 448px); padding: clamp(20px, 5vw, 32px);
  background: #fffdf6; border: 1px solid #c4d1bf; border-radius: 18px;
  box-shadow: 0 8px 32px #33473110;
}
header { display: flex; align-items: center; gap: 9px; font-size: .85rem; font-weight: 700; }
.mark {
  display: grid; place-items: center; width: 26px; height: 26px; border-radius: 7px;
  background: #e6f6aa; color: #264b38; font-size: 20px;
}
h1 { margin: 18px 0 6px; font-size: clamp(24px, 5vw, 32px); line-height: 1.14; letter-spacing: -.035em; }
p { margin: 0; color: #4a5f52; }
section, #retry { margin-top: 18px; }
button { color: inherit; font: inherit; cursor: pointer; touch-action: manipulation; }
button:disabled { opacity: .55; cursor: wait; }
:focus-visible { outline: 3px solid #bd551b; outline-offset: 3px; }
.primary { width: 100%; border: 0; border-radius: 9px; padding: 12px; background: #234d39; color: white; font-weight: 650; }
.primary:hover:enabled { background: #153d28; }
main:has(#live-panel:not([hidden])) { width: min(100%, 760px); }
#board { display: block; width: 100%; aspect-ratio: 600/340; border-radius: 8px; background: #14272f; touch-action: none; }
.under { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; }
#pad { display: flex; gap: 8px; }
#pad button {
  width: 54px; height: 48px; border: 1px solid #c4d1bf; border-radius: 9px; background: #fff;
  font-size: 1.25rem; touch-action: none; user-select: none; -webkit-user-select: none;
}
#pad button.held { background: #e6f6aa; border-color: #8fae3f; }
#timer { font-size: .95rem; font-variant-numeric: tabular-nums; }
#tally { margin-top: 8px; min-height: 1.5em; color: #20382d; font-weight: 650; }
#help { margin-top: 4px; font-size: .85rem; }
@media (max-width: 520px) {
  body { padding: 6px; }
  main { padding: 14px 12px; }
}

/* A try-out round in the landing page's frame: the page around the board is that page's, plain
   and without a card of its own. Only the board keeps the game's colours. This frame cannot read
   the landing page's stylesheet, so the colours and the title face here repeat
   frontend/css/base.css. Only a try-out uses the face, so no other captcha loads it. */
@font-face {
  font-family: "Nunito"; font-style: normal; font-weight: 800; font-display: swap;
  src: url("/fonts/nunito-800.woff2") format("woff2");
}
body.tryout {
  display: block; min-height: 0; padding: 0; background: transparent;
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; color: #1d1a3a;
}
body.tryout main { width: 100%; padding: 0; background: none; border: 0; border-radius: 0; box-shadow: none; }
body.tryout main:has(#live-panel:not([hidden])) { width: 100%; }
body.tryout header { display: none; }
body.tryout h1 { margin: 0 0 4px; font: 800 1.1rem/1.3 "Nunito", ui-rounded, system-ui, sans-serif; letter-spacing: 0; }
body.tryout p { color: #676083; font-size: 0.875rem; }
body.tryout section, body.tryout #retry { margin-top: 12px; }
body.tryout #board { border-radius: 12px; }
body.tryout #tally { margin-top: 6px; color: #1d1a3a; font-weight: 600; }
body.tryout #help { display: none; }
body.tryout :focus-visible { outline: 2px solid #5b3df5; outline-offset: 2px; }
body.tryout .primary {
  width: auto; padding: 9px 20px; border-radius: 999px; background: #5b3df5;
  font: 800 1rem/1.5 "Nunito", ui-rounded, system-ui, sans-serif;
}
body.tryout .primary:hover:enabled { background: #4a2de0; }
body.tryout #pad button { width: 46px; height: 40px; border-color: #d9d1ee; border-radius: 12px; font-size: 1.05rem; }
body.tryout #pad button.held { background: #efeaff; border-color: #5b3df5; }
/* With no board to show (before the first round, while one loads, or when one cannot start) the
   frame is a poster: one filled panel with the words and the button in the middle. */
body.tryout main:not(:has(#live-panel:not([hidden]))) {
  display: grid; place-content: center; justify-items: center; gap: 4px; min-height: 100vh; padding: 24px;
  text-align: center; border-radius: 16px; background-color: #f6f2ff;
  background-image: radial-gradient(#d9d1ee 1px, transparent 1px); background-size: 18px 18px;
}
body.tryout main:not(:has(#live-panel:not([hidden]))) h1 { font-size: 1.3rem; }
body.tryout main:not(:has(#live-panel:not([hidden]))) p { max-width: 26em; color: #5a5377; }
