@font-face {
  font-family: HolidayGameSans;
  src: url('/games/holiday-court/fonts/holiday-game.woff2?v=4') format('woff2');
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
}
:root {
  --paper: #e9e4ff;
  --ink: #31234f;
  --muted: #62537b;
  --line: #d8cfed;
  --purple: #7053c9;
  --gold: #ffd66a;
  --gold-hover: #ffcb46;
  --field: #fffefd;
  --red: #795094;
  font-family: HolidayGameSans, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  scrollbar-color: #ad96db #e9e4ff;
  scrollbar-width: thin;
}
* {
  box-sizing: border-box;
}
body {
  display: flow-root;
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 10% 8%, #fff2cc 0, transparent 45%),
    radial-gradient(ellipse at 92% 82%, #d5efff 0, transparent 50%),
    var(--paper);
}
button,
input {
  font: inherit;
}
button,
a,
input,
summary {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: default;
}
a {
  color: inherit;
  text-underline-offset: 3px;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--purple);
  outline-offset: 4px;
}
input {
  caret-color: var(--purple);
}
::selection {
  background: var(--gold);
  color: var(--ink);
}
[hidden] {
  display: none !important;
}
.skip-link {
  position: absolute;
  left: 12px;
  top: -70px;
  z-index: 20;
  background: var(--ink);
  color: white;
  padding: 14px;
}
.skip-link:focus {
  top: 12px;
}
.game-stars {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.game-stars .button-icon {
  position: absolute;
  color: #e6b74a;
  fill: #ffde86;
  width: 32px;
  height: 32px;
}
.game-stars svg:nth-child(1) {
  left: 8%;
  top: 22%;
  transform: rotate(12deg);
}
.game-stars svg:nth-child(2) {
  right: 9%;
  top: 13%;
  width: 22px;
  height: 22px;
}
.game-stars svg:nth-child(3) {
  right: 14%;
  bottom: 18%;
  transform: rotate(-15deg);
}
.game-stars svg:nth-child(4) {
  left: 16%;
  bottom: 16%;
  width: 20px;
  height: 20px;
}
main {
  position: relative;
  width: calc(100% - 40px);
  max-width: 900px;
  margin: 56px auto 0;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 0 48px;
  align-items: center;
  outline: none;
}
main:has(#result-panel:not([hidden])) {
  max-width: 440px;
  grid-template-columns: 1fr;
}
.intro-heading {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.intro h1 {
  font-size: 54px;
  line-height: 1.12;
  letter-spacing: -0.02em;
  font-weight: 900;
  margin: 0;
  paint-order: stroke fill;
  -webkit-text-stroke: 4px white;
  text-shadow: 0 4px 12px #31234f19;
}
.intro h1 span {
  display: block;
}
.court-mascots {
  width: 100%;
  height: auto;
  display: block;
  margin: 10px 0 0;
  filter: drop-shadow(0 6px 9px #4c31631f);
}
.intro p {
  font-size: 15px;
  line-height: 1.8;
  margin: 10px 0 0;
  color: var(--muted);
}
#question-panel {
  background: var(--field);
  border-radius: 16px;
  padding: 26px;
  box-shadow: 0 16px 38px #6043911c;
}
.progress-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 12px;
}
#progress-label {
  font-weight: 800;
  background: #efe9ff;
  color: #6344ac;
  border-radius: 8px;
  padding: 6px 9px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.progress-note {
  color: var(--muted);
  font-size: 11px;
}
.progress {
  display: flex;
  gap: 7px;
  padding: 0;
  margin: 0 0 22px;
  list-style: none;
}
.progress li {
  height: 7px;
  flex: 1;
  background: #e9e1f6;
  border-radius: 4px;
}
.progress .done {
  background: var(--purple);
}
.progress .current {
  background: var(--gold);
}
fieldset {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
  width: 100%;
}
legend {
  text-wrap: balance;
  font-size: 25px;
  font-weight: 850;
  line-height: 1.4;
  letter-spacing: -0.02em;
  padding: 0;
  width: 100%;
}
.question-hint {
  margin: 7px 0 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}
.options {
  display: grid;
  gap: 9px;
}
.option {
  --choice: #416f9d;
  --tint: #edf5ff;
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  min-height: 74px;
  background: var(--tint);
  border: 2px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  transition:
    background 0.15s,
    border-color 0.15s;
}
.option:nth-child(2) {
  --choice: #417553;
  --tint: #eef8ed;
}
.option:nth-child(3) {
  --choice: #896325;
  --tint: #fff7df;
}
.option:nth-child(4) {
  --choice: #805397;
  --tint: #f5edff;
}
.option:hover {
  border-color: var(--choice);
}
.option:has(input:checked) {
  border-color: var(--choice);
  background: var(--tint);
}
.option:has(input:focus-visible) {
  outline: 3px solid var(--purple);
  outline-offset: 3px;
}
.option input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.option-letter {
  display: grid;
  place-items: center;
  flex: 0 0 30px;
  height: 30px;
  border-radius: 9px;
  background: white;
  color: var(--choice);
  font-size: 14px;
  font-weight: 850;
}
.option:has(input:checked) .option-letter {
  background: var(--choice);
  color: white;
}
.option-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
  flex: 1;
}
.option-label {
  font-size: 15px;
  line-height: 1.45;
  font-weight: 750;
}
.option-hint {
  font-size: 11px;
  line-height: 1.45;
  color: var(--muted);
}
.choice-check {
  width: 18px;
  flex: 0 0 18px;
  color: var(--choice);
  opacity: 0;
}
.choice-check .button-icon {
  width: 18px;
  height: 18px;
}
.option:has(input:checked) .choice-check {
  opacity: 1;
}
.question-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 20px;
}
.primary-button,
.secondary-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 52px;
  border-radius: 13px;
  padding: 14px 16px;
  border: 0;
  font-size: 14px;
  line-height: 1.4;
  font-weight: 850;
  text-decoration: none;
}
.primary-button {
  background: var(--gold);
  color: var(--ink);
  box-shadow: 0 5px 12px #8d68351a;
}
.primary-button:hover {
  background: var(--gold-hover);
}
.primary-button:active {
  box-shadow: 0 2px 6px #8d68351a;
}
.primary-button:disabled {
  color: #766a8c;
  background: #e9e2f4;
  box-shadow: none;
}
.secondary-button {
  background: white;
  color: #6040a4;
}
.secondary-button:hover {
  background: #f7f2ff;
}
#next-button {
  flex: 1;
  justify-content: space-between;
}
#back-button {
  flex: 0 0 54px;
}
.text-button {
  min-height: 44px;
  padding: 10px 0;
  border: 0;
  background: transparent;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}
.text-button:hover {
  text-decoration: underline;
  color: var(--ink);
}
.question-footnote {
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  margin: 15px 0 0;
}
.result-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 19px;
}
.result-heading h1 {
  font-size: 27px;
  font-weight: 850;
  line-height: 1.4;
  letter-spacing: -0.02em;
  margin: 0 0 5px;
}
.result-heading p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.65;
  margin: 0;
}
.verdict-card {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 63 / 88;
  width: 100%;
  border-radius: 12px;
  background: #e5e9ed;
  box-shadow: 0 18px 36px #49357226;
  overflow: hidden;
}
.card-image {
  display: block;
  width: 100%;
  height: auto;
  grid-area: 1 / 1;
}
.card-copy {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.card-state {
  grid-area: 1 / 1;
  padding: 24px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}
.card-failed {
  aspect-ratio: auto;
  display: block;
  background: var(--field);
  box-shadow: none;
}
.card-failed .card-copy {
  position: static;
  width: auto;
  height: auto;
  padding: 20px;
  margin: 0;
  clip-path: none;
  white-space: normal;
  font-size: 13px;
  line-height: 1.7;
}
.card-failed .card-copy h2 {
  font-size: 20px;
  margin: 0 0 12px;
}
.card-failed .card-state {
  color: var(--red);
  padding: 0 20px 20px;
  text-align: left;
}
.result-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 21px;
}
.save-hint {
  text-align: center;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
  margin: 13px 0 22px;
}
.evidence {
  border-top: 1px solid #cbbce1;
  border-bottom: 1px solid #cbbce1;
}
.evidence summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 52px;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
  list-style: none;
}
.evidence summary::-webkit-details-marker {
  display: none;
}
.evidence[open] summary svg {
  transform: rotate(45deg);
}
.evidence ol {
  margin: 0;
  padding: 0 0 8px;
  list-style: none;
  counter-reset: proof;
}
.evidence li {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 7px;
  counter-increment: proof;
  margin: 0 0 14px;
  font-size: 12px;
  line-height: 1.7;
}
.evidence li::before {
  content: '0' counter(proof);
  color: var(--purple);
  font-weight: 800;
}
.evidence li p {
  margin: 4px 0 0;
  color: var(--muted);
}
.restart-button {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  width: 100%;
  margin-top: 14px;
  padding: 10px;
  min-height: 44px;
  background: transparent;
  border: 0;
  color: var(--muted);
  font-size: 12px;
}
.restart-button:hover {
  color: var(--ink);
  text-decoration: underline;
}
.status {
  grid-column: 1 / -1;
  margin: 12px 0 0;
  color: #71418b;
  font-size: 13px;
  line-height: 1.6;
  text-align: center;
}
.status:empty {
  display: none;
}
.notice {
  padding: 14px;
  background: #fff2d3;
  font-size: 13px;
}
footer {
  position: relative;
  text-align: center;
  margin: 32px 20px 0;
  padding-bottom: max(24px, env(safe-area-inset-bottom));
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}
footer > span {
  color: var(--ink);
  font-weight: 750;
  font-size: 12px;
}
footer p {
  margin: 6px 0 2px;
}
footer a {
  display: inline-block;
  min-height: 44px;
  padding: 13px 8px;
}
dialog {
  width: min(390px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  overflow: auto;
  border: 0;
  border-radius: 16px;
  padding: 20px;
  background: #fffefd;
  color: var(--ink);
  box-shadow: 0 22px 60px #25144238;
}
dialog::backdrop {
  background: #251c4c80;
}
.dialog-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.dialog-heading h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 850;
}
dialog p,
dialog label {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}
dialog img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 14px 0;
}
dialog input {
  display: block;
  width: 100%;
  margin: 8px 0 16px;
  padding: 14px;
  background: #f5f0ff;
  border: 1px solid var(--line);
  border-radius: 9px;
  font-size: 12px;
}
dialog .primary-button {
  width: 100%;
}
.button-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  vertical-align: middle;
}
.restart-button .button-icon {
  width: 16px;
  height: 16px;
}
.verdict-card.is-revealing {
  animation: card-arrives 0.48s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes card-arrives {
  from {
    opacity: 0.75;
    filter: blur(2px);
    transform: perspective(800px) translateY(12px) rotateY(-6deg);
  }
  to {
    opacity: 1;
    filter: blur(0);
    transform: perspective(800px) translateY(0) rotateY(0);
  }
}
@media (max-width: 760px) {
  .game-stars {
    display: none;
  }
  main {
    max-width: 440px;
    margin-top: 18px;
    grid-template-columns: 1fr;
    gap: 0;
  }
  .intro {
    margin-bottom: 17px;
  }
  .intro-heading {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }
  .intro h1 {
    font-size: 34px;
    -webkit-text-stroke-width: 3px;
  }
  .court-mascots {
    width: 48%;
    max-width: 165px;
    margin: 0;
  }
  .intro p {
    font-size: 12px;
    line-height: 1.7;
    margin-top: 3px;
  }
  #question-panel {
    padding: 18px;
  }
  legend {
    font-size: 22px;
  }
  .progress {
    margin-bottom: 18px;
  }
  .progress-heading {
    margin-bottom: 10px;
  }
  .option {
    min-height: 69px;
    padding: 11px 10px;
    gap: 9px;
  }
  .option-letter {
    flex-basis: 27px;
    height: 29px;
    font-size: 13px;
  }
  .option-label {
    font-size: 14px;
  }
  .option-hint {
    font-size: 11.5px;
  }
  .options {
    gap: 8px;
  }
  .question-actions {
    margin-top: 16px;
  }
  .result-heading h1 {
    font-size: 25px;
  }
}
@media (max-width: 370px) {
  main {
    width: calc(100% - 32px);
  }
  #question-panel {
    padding: 16px;
  }
  .intro h1 {
    font-size: 32px;
  }
  .court-mascots {
    max-width: 145px;
  }
  .option {
    gap: 8px;
    padding-inline: 9px;
  }
  .option-letter {
    flex-basis: 25px;
  }
  .choice-check {
    width: 16px;
    flex-basis: 16px;
  }
  .choice-check .button-icon {
    width: 16px;
    height: 16px;
  }
  .result-heading h1 {
    font-size: 23px;
  }
  .result-actions .primary-button,
  .result-actions .secondary-button {
    padding-inline: 10px;
    font-size: 13px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
