* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: #0a174e;
  color: white;
  font-family: "Arial Rounded MT Bold", "Trebuchet MS", Arial, sans-serif;
  min-height: 100vh;
}
body:before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at 15% 30%, #25397a, transparent 65%);
}
header,
main {
  position: relative;
  max-width: 440px;
  margin: auto;
}
header {
  height: 110px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(#438e3b 0 62%, #c5f3ff 63% 67%, transparent 68%);
}
header img {
  width: 145px;
  height: 102px;
  object-fit: contain;
  z-index: 1;
}
header button {
  position: absolute;
  right: 15px;
  top: 49px;
  font-size: 0;
  background: transparent;
  padding: 8px;
  color: white;
}
header button:after {
  content: "☰";
  font-size: 23px;
  font-weight: normal;
}
main {
  padding: 18px 21px 45px;
  min-height: calc(100vh - 110px);
  background: #162c7e url("assets/background-body.svg") center / 100% 100%
    no-repeat;
  box-shadow: 0 0 80px #0005;
}
h1 {
  font-size: 34px;
  line-height: 1.1;
  margin: 16px 0;
  font-weight: 900;
  letter-spacing: -1px;
}
h2 {
  font-size: 25px;
  line-height: 1.15;
  margin: 14px 0;
}
p {
  font-size: 15px;
  line-height: 1.45;
  margin: 14px 0;
}
button,
input,
select {
  font: inherit;
}
button {
  border: 0;
  border-radius: 18px;
  background: #f00051;
  color: white;
  font-weight: bold;
  padding: 16px 24px;
  cursor: pointer;
  min-height: 48px;
  transition:
    transform 0.15s,
    filter 0.15s;
}
button:hover {
  filter: brightness(1.09);
}
button:active {
  transform: scale(0.98);
}
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #ffdc3e;
  outline-offset: 4px;
}
button:disabled {
  opacity: 0.4;
  cursor: default;
}
button.secondary {
  background: #263f91;
  border: 1px solid #ffffff50;
}
.full {
  width: 100%;
  margin-top: 12px;
}
.text-button {
  display: block;
  margin: 10px auto;
  background: transparent;
  font-weight: normal;
  font-size: 13px;
  padding: 10px;
  min-height: 40px;
}
.welcome,
.setup,
.ranking {
  text-align: center;
}
.welcome h1 {
  font-size: 43px;
  margin-top: 12px;
}
.welcome-art {
  height: 290px;
  position: relative;
  margin: 10px -10px;
}
.host {
  height: 260px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 0;
}
.friend {
  position: absolute;
  bottom: 0;
  width: 115px;
  height: 140px;
  object-fit: contain;
  filter: drop-shadow(0 8px 8px #13265c66);
}
.friend.bear {
  left: -2px;
  transform: rotate(-10deg);
}
.friend.unicorn {
  right: -3px;
  transform: rotate(8deg);
}
.actions {
  display: grid;
  gap: 10px;
  margin: 20px 0;
}
.count-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px 20px;
  margin: 50px 0 65px;
}
.snow-card {
  height: 156px;
  border-radius: 28px 22px 30px 22px;
  color: #1d3486;
  background: linear-gradient(#fffef4, #fff0b6);
  position: relative;
  padding: 18px 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-direction: column;
  border: 4px solid transparent;
  isolation: isolate;
}
.snow-card:before {
  content: "";
  position: absolute;
  top: -10px;
  left: -3px;
  right: -3px;
  height: 22px;
  background: white;
  border-radius: 65% 35% 55% 45%;
  box-shadow: 0 6px #c7e5fb;
  z-index: -1;
}
.snow-card b {
  font-size: 55px;
  border-radius: 50%;
  width: 74px;
  height: 74px;
  background: #f6005014;
  color: #f00051;
  display: grid;
  place-items: center;
  line-height: 1;
}
.snow-card span {
  font-size: 18px;
  font-weight: normal;
  white-space: nowrap;
}
.tone-1 {
  background: linear-gradient(#fffff7, #e2ffa6);
}
.tone-2 {
  background: linear-gradient(#fffdfa, #ffcee1);
}
.tone-3 {
  background: linear-gradient(#fffefa, #b5dcff);
}
.snow-card.selected {
  border-color: #f00051;
}
.snow-card.selected b {
  background: #f00051;
  color: white;
}
.setup > input {
  width: 100%;
  height: 59px;
  border: 3px solid #e5f2ff;
  border-radius: 18px;
  background: #fff;
  color: #172f84;
  text-align: center;
  padding: 15px;
  margin: 10px 0 20px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}
.hero-card {
  background: #f4f7ff;
  color: #162d7d;
  border: 3px solid transparent;
  border-radius: 25px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 165px;
}
.hero-card img {
  height: 92px;
  width: 100%;
  object-fit: contain;
}
.hero-card b {
  font-size: 17px;
  margin: 6px 0 3px;
}
.hero-card span {
  font-size: 12px;
  font-weight: normal;
}
.hero-card.selected {
  border-color: #f00051;
  background: #fff2f5;
}
.hero-card:disabled {
  opacity: 0.2;
}
.power-description {
  min-height: 44px;
  font-size: 13px;
  background: #213f90;
  border-radius: 13px;
  padding: 12px;
  margin: 16px 0;
}
.ready-list {
  display: grid;
  gap: 12px;
  margin: 25px 0;
  text-align: left;
}
.ready-list > div {
  display: flex;
  align-items: center;
  gap: 18px;
  background: #fff;
  border-radius: 20px;
  padding: 12px;
  color: #1b3387;
}
.ready-list img {
  width: 60px;
  height: 65px;
  object-fit: contain;
}
.ready-list span {
  display: grid;
  gap: 6px;
}
.ready-list small {
  font-size: 12px;
}
.turn-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 15px;
  background: #243f91;
  border-radius: 18px;
  height: 75px;
}
.turn-avatar {
  height: 62px;
  width: 62px;
  object-fit: contain;
}
.turn-card div {
  display: grid;
  gap: 5px;
  flex: 1;
}
.turn-card small {
  font-size: 12px;
  opacity: 0.7;
}
.turn-card b {
  font-size: 19px;
}
.power-button {
  background: #142c7b;
  border-radius: 12px;
  padding: 5px;
  min-height: 34px;
  width: 43px;
  font-size: 20px;
  color: #ffdc3e;
}
.map {
  position: relative;
  width: 100%;
  aspect-ratio: 365/427;
  margin: 8px 0 0;
}
.map-art {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: rotate(180deg);
}
.map-token {
  position: absolute;
  transform: translate(-50%, -50%);
  border: 2px solid white;
  border-radius: 50%;
  width: 31px;
  height: 31px;
  background: #ffed9e;
  box-shadow: 0 2px 8px #00104799;
  pointer-events: none;
  z-index: 2;
}
.map-token img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.landed {
  position: absolute;
  bottom: 0;
  right: 0;
  padding: 8px 14px;
  border: 2px solid #fff;
  min-height: 40px;
  font-size: 13px;
}
.roll-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  background: #243f91;
  border-radius: 20px;
  padding: 14px 18px;
  margin-top: 10px;
}
.roll-card b {
  font-size: 18px;
}
.roll-card p {
  font-size: 12px;
  margin: 5px 0;
  opacity: 0.8;
}
.dice {
  font-family: Arial;
  font-size: 52px;
  line-height: 1;
  color: white;
  display: block;
  min-width: 55px;
  text-align: center;
}
.scoreboard {
  display: flex;
  gap: 7px;
  margin-top: 24px;
  justify-content: center;
}
.score-item {
  padding: 8px 4px;
  min-width: 0;
  flex: 1;
  border-radius: 15px;
  background: #243d88;
  border: 2px solid transparent;
  display: grid;
  justify-items: center;
  gap: 5px;
}
.score-item.active {
  border-color: #ffdc3e;
}
.score-item img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}
.score-item span {
  font-size: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: 100%;
}
.score-item b {
  font-size: 20px;
}
dialog {
  background: #fff9e9;
  color: #193481;
  border: 4px solid white;
  border-radius: 28px;
  max-width: 390px;
  width: calc(100% - 30px);
  padding: 25px 22px;
  text-align: center;
  max-height: 92dvh;
  overflow: auto;
  box-shadow: 0 20px 80px #0008;
}
dialog::backdrop {
  background: #09153dbb;
  backdrop-filter: blur(4px);
}
dialog p {
  font-size: 17px;
}
dialog .options {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}
dialog .options button {
  color: #21367f;
  background: #fff;
  border: 2px solid #e0dcd2;
}
dialog button {
  width: 100%;
}
dialog button.secondary {
  color: #263d85;
  background: #e9e9ef;
}
.task-top {
  position: relative;
  padding-top: 85px;
}
.task-host {
  position: absolute;
  height: 95px;
  width: 130px;
  object-fit: contain;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
}
.task-top small {
  font-size: 12px;
  opacity: 0.6;
}
.task-top h2 {
  font-size: 28px;
}
.modal-character {
  height: 130px;
  width: 150px;
  object-fit: contain;
}
.timer {
  font-size: 46px;
  color: #f00051;
  margin: 15px;
  font-weight: bold;
}
.result {
  color: #f00051;
  font-size: 26px;
  font-weight: bold;
}
dialog input,
dialog select {
  padding: 13px 10px;
  border: 2px solid #c9d2ec;
  border-radius: 12px;
  background: white;
  color: #18317c;
  width: 100%;
  font-size: 17px;
}
dialog select {
  margin-top: 10px;
}
.note {
  font-size: 12px !important;
  opacity: 0.65;
}
.winner-host {
  width: 180px;
  height: 200px;
  object-fit: contain;
}
.eyebrow {
  font-size: 12px;
  letter-spacing: 1px;
  color: #5167a5;
}
.scene {
  background: #d9efff;
  border-radius: 15px;
  padding: 10px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 5px;
}
.scene button {
  font-size: 26px;
  background: white;
  border-radius: 8px;
  padding: 6px;
  min-height: 45px;
}
.scene button.found {
  opacity: 0.25;
}
.scene-photo {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 16px;
}
.scene-photo > img {
  width: 100%;
  display: block;
}
.hotspot {
  position: absolute;
  min-height: 0;
  background: transparent;
  border-radius: 50%;
  padding: 0;
}
.hotspot.found {
  border: 3px solid #ffe441;
  background: #fff6;
}
.scene-tools {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
.scene-tools button {
  width: 45px;
  height: 45px;
  min-height: 0;
  padding: 4px;
  background: white;
  border: 2px solid #cfd8ef;
}
.scene-tools img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.scene-large {
  width: min(95vw, 1000px);
  max-width: 1000px;
}
.decor-item {
  position: absolute;
  width: 6%;
  pointer-events: none;
}
a {
  color: inherit;
}
@media (min-width: 600px) {
  header {
    margin-top: 25px;
    border-radius: 26px 26px 0 0;
  }
  main {
    border-radius: 0 0 26px 26px;
    margin-bottom: 30px;
    min-height: 760px;
  }
  .welcome-art {
    height: 330px;
  }
  .host {
    height: 300px;
  }
  .setup .count-grid {
    margin-top: 60px;
    margin-bottom: 80px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
.rebus {
  width: 100%;
  height: 145px;
  object-fit: contain;
  background: white;
  border-radius: 15px;
}
.scene-scroll {
  overflow: auto;
  border-radius: 16px;
  overscroll-behavior: contain;
}
.scene-photo {
  min-width: 740px;
}
.scene-object {
  position: absolute;
  transform: translate(-50%, -50%);
  padding: 0 !important;
  border: 0 !important;
  min-height: 0 !important;
  border-radius: 0 !important;
  height: auto !important;
  background: transparent !important;
  aspect-ratio: 1;
  z-index: 1;
  touch-action: manipulation;
}
.scene-object img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}
.scene-object.found {
  filter: drop-shadow(0 0 5px #ffed00);
  opacity: 0.5;
}
.scene-photo > img.decor-item {
  position: absolute;
  pointer-events: none;
  height: auto;
}
.scene-large .task-top {
  padding-top: 60px;
}
.scene-large .task-host {
  height: 80px;
}
.scene-large p {
  margin: 10px 0;
}
.scene-large .actions {
  grid-template-columns: 1fr 1fr;
}
.scene-tools {
  margin: 12px 0;
  justify-content: center;
}
.download {
  display: block;
  text-align: center;
  background: #f00051;
  color: white;
  padding: 16px 24px;
  border-radius: 18px;
  text-decoration: none;
  font-weight: bold;
}
/* Search artwork is clickable; only tree decorations may be dragged. */
.scene-photo > img:not(.decor-item),
.scene-object,
.scene-object img {
  user-select: none;
  -webkit-user-drag: none;
}
.welcome-art {
  overflow-x: clip;
}
.scene-object.background-object {
  height: var(--object-height) !important;
  aspect-ratio: auto;
  z-index: 1;
}
.scene-object:not(.background-object) {
  z-index: 2;
}
.background-object.found {
  outline: 3px solid #ffde42;
  background: #ffde4255 !important;
  opacity: 1;
}
.scene-tools button[aria-pressed="true"] {
  outline: 3px solid #f00051;
}
/* The heading receives initial programmatic focus; target focus remains visible for keyboard use. */
.task-top h2[tabindex="-1"]:focus {
  outline: none;
}

/* Keep the source artwork full bleed at every content height. */
main { background-size: 100% 100%; }
header button { top: 48px; right: 16px; width: 44px; height: 44px; min-height: 44px; min-width: 44px; aspect-ratio: 1; padding: 0; border: 2px solid #fff; border-radius: 50%; background: #14286e; box-shadow: 0 2px 7px #0004; display: grid; place-items: center; z-index: 2; }
header button:after { font-size: 24px; line-height: 1; }
.map { aspect-ratio: 365 / 428; }
.map-token { width: 25px; height: 25px; margin: 0; z-index: 2; pointer-events: none; }

header #rules { max-width: 44px; max-height: 44px; border-radius: 9999px; overflow: hidden; line-height: 0; }
header #rules::after { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
