:root {
  color-scheme: dark;
  --bg: #242527;
  --panel: #303033;
  --muted: #bdbac3;
  --green: #69ff32;
  --gold: #ffb000;
  --line: #515157;
  --red: #ff6671;
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: #fff;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  background: #414147;
  color: #fff;
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 12px 16px;
  min-height: 44px;
  font-weight: 650;
}
button:hover {
  filter: brightness(1.12);
}
button:disabled {
  opacity: 0.42;
  cursor: default;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}
button.primary {
  background: var(--green);
  color: #14200d;
}
button.danger {
  color: #ff9ba3;
  border-color: #80505a;
}
a {
  color: var(--green);
}
input,
select,
textarea {
  max-width: 100%;
  min-width: 0;
  padding: 11px;
  border: 1px solid #66626c;
  border-radius: 10px;
  background: #242426;
  color: white;
  font-size: 16px;
}
input[type="checkbox"] {
  accent-color: var(--green);
  width: 23px;
  height: 23px;
}
input[type="color"] {
  width: 55px;
  height: 44px;
  padding: 3px;
}
input[type="number"] {
  font-variant-numeric: tabular-nums;
}
textarea {
  width: 100%;
  resize: vertical;
}
h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}
h1 {
  font-size: 27px;
  margin: 12px 0;
}
h2 {
  font-size: 21px;
}
p {
  line-height: 1.55;
}
small,
.muted {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
#app {
  max-width: 740px;
  margin: auto;
  min-height: 100svh;
  background: var(--panel);
  padding: env(safe-area-inset-top) 16px env(safe-area-inset-bottom);
  display: flex;
  flex-direction: column;
}
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 0 6px;
}
.brand {
  display: flex;
  align-items: baseline;
  gap: 5px;
  color: #fff;
  text-decoration: none;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.7px;
}
.brand img {
  align-self: center;
}
.brand span {
  color: var(--green);
  margin-left: -5px;
}
.top-actions {
  display: flex;
  gap: 6px;
}
.top-actions button {
  padding: 4px;
  min-width: 44px;
  font-size: 25px;
  background: transparent;
  border: 1px solid #68666d;
}
#main {
  flex: 1;
  min-width: 0;
}
.boot {
  text-align: center;
  padding: 100px 0;
}
.game {
  position: relative;
  max-width: 620px;
  margin: auto;
}
.game-hint {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  min-height: 36px;
  margin: 0;
  padding: 6px 36px;
}
.board {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  direction: ltr;
  isolation: isolate;
  touch-action: manipulation;
}
.disc {
  position: absolute;
  inset: 1%;
  border: 0;
  border-radius: 50%;
  background: var(--player);
  cursor: pointer;
  padding: 0;
  transition: background 0.35s;
}
.disc:after {
  content: "";
  position: absolute;
  inset: 17.35%;
  border-radius: 50%;
  background: var(--panel);
}
.clock-face {
  position: absolute;
  inset: 0;
  pointer-events: none;
  transition: transform 0.45s cubic-bezier(0.22, 0.61, 0.36, 1);
  direction: ltr;
}
.clock-name {
  position: absolute;
  top: 30%;
  left: 24%;
  width: 52%;
  height: 12%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-weight: 800;
  font-size: clamp(21px, 6vw, 38px);
  line-height: 1.05;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.clock-time {
  position: absolute;
  top: 43%;
  left: 17%;
  width: 66%;
  text-align: center;
  font-size: clamp(46px, 13vw, 88px);
  font-weight: 500;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  letter-spacing: -2px;
  line-height: 1.1;
  white-space: nowrap;
}
.clock-play {
  position: absolute;
  top: 61%;
  left: 44%;
  width: 12%;
  aspect-ratio: 1;
  background: white;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: black;
  font-size: clamp(20px, 6vw, 36px);
  line-height: 1;
  padding-left: 4px;
}
.pointer {
  position: absolute;
  left: 47%;
  top: 75%;
  width: 6%;
  height: 5%;
  background: var(--player);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  pointer-events: auto;
  touch-action: none;
}
.seat {
  position: absolute;
  z-index: 3;
  width: 38px;
  height: 38px;
  min-height: 38px;
  padding: 0;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: var(--seat);
  color: #080808;
  border: 2px solid transparent;
  box-shadow: 0 1px 4px #0004;
  font-size: 18px;
  line-height: 34px;
  text-align: center;
}
.seat.light-text {
  color: white;
}
.seat.active {
  border-color: #fff;
  box-shadow: 0 0 0 2px #1b1b1c;
}
.seat.unconfirmed {
  box-shadow: 0 0 0 3px #ff6671;
}
.seat.confirmed:after {
  content: "✓";
  position: absolute;
  right: -5px;
  bottom: -4px;
  font-size: 12px;
  background: #202021;
  color: white;
  border-radius: 50%;
  width: 19px;
  height: 19px;
  line-height: 19px;
}
.quick {
  position: absolute;
  z-index: 4;
  color: var(--gold);
  background: transparent;
  padding: 2px;
  min-width: 44px;
  font-size: 22px;
}
.quick.off {
  color: #aaa3ad;
}
.quick.tl {
  top: 0;
  left: 0;
}
.quick.tr {
  top: 0;
  right: 0;
}
.quick.bl {
  bottom: 0;
  left: 0;
}
.quick.br {
  bottom: 0;
  right: 0;
}
.statusline {
  display: flex;
  justify-content: center;
  gap: 8px;
  align-items: center;
  min-height: 43px;
  margin: 6px 0;
}
.statusline button {
  padding: 6px 15px;
}
.statusline span {
  font-size: 11px;
  color: var(--muted);
}
#nav {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3px;
  padding: 12px 0 18px;
}
#nav button {
  background: transparent;
  border-radius: 12px;
  padding: 8px 2px;
  color: #ddd9e1;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.2px;
  min-width: 0;
}
#nav button span {
  display: block;
  font-size: 23px;
  margin-bottom: 5px;
}
#nav button.active {
  background: #454349;
  color: var(--green);
}
.page {
  padding: 8px 0 18px;
}
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin: 4px 0 16px;
}
.page-header h1 {
  margin: 0;
}
.stack {
  display: grid;
  gap: 12px;
}
.row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.row > * {
  min-width: 0;
}
.grow {
  flex: 1;
}
.full {
  width: 100%;
}
.card {
  background: #38383e;
  border: 1px solid #505056;
  border-radius: 18px;
  padding: 16px;
}
.player-card {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: #3c3c42;
  border-radius: 16px;
  border: 1px solid #55515d;
}
.player-card strong {
  font-size: clamp(22px, 6vw, 30px);
  line-height: 1.1;
  display: block;
  overflow-wrap: anywhere;
}
.player-card .total {
  font-size: 26px;
  font-weight: 750;
  min-width: 4ch;
  text-align: end;
  font-variant-numeric: tabular-nums;
}
.badge {
  display: grid;
  place-items: center;
  background: var(--seat);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  color: #111;
  font-weight: 800;
}
.badge.light-text {
  color: white;
}
.editor-board {
  max-width: 440px;
  margin: auto;
}
.editor-board .seat {
  cursor: grab;
  touch-action: none;
}
.editor-board .disc {
  opacity: 0.8;
}
.editor-center {
  position: absolute;
  inset: 30%;
  display: grid;
  place-items: center;
  text-align: center;
  pointer-events: none;
  font-size: 13px;
  color: var(--muted);
}
.player-fields {
  display: grid;
  gap: 13px;
}
.field {
  display: grid;
  gap: 6px;
}
.field > span {
  font-size: 14px;
  color: #d1cdd5;
}
.swatches {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.swatch {
  width: 38px;
  height: 38px;
  min-height: 38px;
  border: 2px solid white;
  padding: 0;
  border-radius: 50%;
  background: var(--seat);
}
.score-players {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 8px 0 20px;
}
.score-player {
  background: #3a3a40;
  border: 2px solid var(--red);
  padding: 12px 5px;
  min-width: 0;
}
.score-player.selected {
  outline: 2px solid white;
  outline-offset: 2px;
}
.score-player.complete {
  border-color: #68666d;
}
.score-player .badge {
  margin: 0 auto 6px;
}
.score-player .score-name {
  display: block;
  font-size: 20px;
  font-weight: 800;
  overflow-wrap: anywhere;
  line-height: 1.2;
  min-height: 24px;
}
.score-player .score-number {
  display: block;
  font-variant-numeric: tabular-nums;
  min-width: 4ch;
  font-size: 23px;
  margin-top: 6px;
}
.score-entry {
  text-align: center;
}
.score-entry h2 {
  font-size: 30px;
  margin: 8px 0 16px;
}
.score-value {
  width: 8ch;
  text-align: center;
  font-size: 42px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  margin: 12px auto;
}
.steppers {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin: 10px 0;
}
.stepper {
  display: grid;
  gap: 5px;
}
.stepper button {
  font-size: 18px;
  background: #49474d;
}
.input-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.input-row button {
  font-size: 26px;
  color: var(--gold);
  background: transparent;
}
.trophy {
  font-size: 30px;
  display: block;
}
.score-actions {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}
.tiles {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0;
  max-height: 240px;
  overflow: auto;
}
.tile {
  background: #f8f1da;
  color: #1e1d1b;
  border-radius: 7px;
  padding: 7px 11px;
  min-width: 38px;
  min-height: 40px;
  font-size: 22px;
  font-weight: 800;
}
.tile small {
  font-size: 12px;
  color: #555;
}
.checkrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid #515057;
}
.checkrow label {
  flex: 1;
}
.settings-section {
  margin: 20px 0 10px;
}
.settings-section h3 {
  color: var(--gold);
  margin-bottom: 7px;
}
.sound-file {
  width: 100%;
  font-size: 13px;
}
.summary-banner {
  text-align: center;
  padding: 20px 8px;
}
.summary-banner .big-trophy {
  font-size: 64px;
}
.summary-banner h1 {
  font-size: 36px;
}
.table-scroll {
  overflow: auto;
  max-width: 100%;
  margin: 12px 0;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-variant-numeric: tabular-nums;
  font-size: 14px;
}
th,
td {
  padding: 12px 9px;
  text-align: end;
  border-bottom: 1px solid #55515a;
  white-space: nowrap;
}
th:first-child,
td:first-child {
  text-align: start;
}
details {
  border-top: 1px solid #55515a;
  padding: 13px 0;
}
summary {
  cursor: pointer;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
dialog {
  max-width: min(560px, calc(100% - 24px));
  width: 100%;
  max-height: 88dvh;
  border: 1px solid #64616a;
  border-radius: 22px;
  padding: 20px;
  background: #333337;
  color: #fff;
  box-shadow: 0 20px 100px #0009;
}
dialog::backdrop {
  background: #111b;
  backdrop-filter: blur(4px);
}
.dialog-head {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: -20px;
  background: #333337;
  z-index: 5;
  padding: 4px 0 10px;
}
.dialog-head h2 {
  margin: 0;
}
.dialog-head button {
  font-size: 25px;
  padding: 2px 12px;
  background: #48464d;
}
#dialog-body {
  padding-top: 8px;
}
#toast {
  position: fixed;
  z-index: 100;
  bottom: max(24px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  background: #fcf8ee;
  color: #252426;
  border: 1px solid #aaa;
  border-radius: 16px;
  box-shadow: 0 8px 40px #0005;
  padding: 15px 20px;
  max-width: calc(100% - 24px);
  width: max-content;
  font-size: 14px;
}
#toast[hidden] {
  display: none;
}
.error {
  color: #ff9fa5;
}
.notice {
  padding: 12px;
  border-left: 3px solid var(--gold);
  background: #46413a;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.5;
}
.expired.pulse .disc {
  animation: pulse 1.5s ease-in-out infinite;
}
.expired.blink .disc {
  animation: blink 0.9s steps(2, end) infinite;
}
@keyframes pulse {
  50% {
    filter: brightness(0.72);
  }
}
@keyframes blink {
  50% {
    opacity: 0.4;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
  }
}
@media (min-width: 760px) {
  body {
    padding: 20px;
  }
  #app {
    border-radius: 28px;
    min-height: calc(100svh - 40px);
    padding-left: 30px;
    padding-right: 30px;
    border: 1px solid #48464c;
  }
  .top {
    padding-top: 20px;
  }
  .game {
    max-width: 540px;
  }
  .game-hint {
    font-size: 14px;
  }
  .score-players {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}
@media (max-width: 360px) {
  #app {
    padding-left: 10px;
    padding-right: 10px;
  }
  .brand {
    font-size: 20px;
  }
  .seat {
    width: 34px;
    height: 34px;
    min-height: 34px;
    line-height: 30px;
    font-size: 16px;
  }
  .clock-time {
    font-size: 43px;
  }
  .score-player .score-name {
    font-size: 18px;
  }
}
@media (max-height: 650px) and (min-width: 500px) {
  .game {
    max-width: 370px;
  }
  .clock-time {
    font-size: 55px;
  }
  .clock-name {
    font-size: 24px;
  }
}
:where([hidden]) {
  display: none !important;
}
:root .icon {
  width: 24px;
  height: 24px;
  vertical-align: middle;
  flex-shrink: 0;
}
.top-actions .icon {
  width: 25px;
  height: 25px;
}
.trophy .icon {
  width: 38px;
  height: 38px;
  color: var(--gold);
}
.big-trophy .icon {
  width: 76px;
  height: 76px;
  color: var(--gold);
}
.quick .icon {
  width: 23px;
  height: 23px;
}
.game {
  min-height: calc(100svh - 175px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.game .board {
  flex-shrink: 0;
}
.input-row [data-action="dictate"] {
  min-width: 44px;
  padding: 8px;
}
.input-row [data-action="dictate"] .icon {
  width: 30px;
  height: 30px;
}
.web-entry {
  margin: 16px 0;
}
@media (min-width: 760px) {
  .game {
    min-height: calc(100svh - 220px);
  }
}
.editor-face {
  transition: none;
  pointer-events: none;
}
.editor-face .pointer {
  pointer-events: none;
}
.clock-play {
  top: 59%;
}
.pointer {
  top: 72%;
  height: 3%;
  left: 47.25%;
  width: 5.5%;
}
