:root {
  color-scheme: dark;
  font-family: "Trebuchet MS", "Arial Rounded MT Bold", system-ui, sans-serif;
  --ink: #070b18;
  --navy: #11182b;
  --navy-2: #18223d;
  --navy-3: #24304d;
  --paper: #fff4cf;
  --paper-deep: #eadba9;
  --white: #fffaf0;
  --muted: #b9c2d8;
  --slime: #66def3;
  --slime-deep: #269fc4;
  --yellow: #f4cf4f;
  --orange: #f58a45;
  --pink: #ef78a7;
  --purple: #9569dc;
  --green: #69ce83;
  --blue: #4c8ee8;
  --outline: #050816;
  --shadow: rgba(2, 5, 14, 0.62);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
  background: var(--ink);
}

body {
  min-height: 100dvh;
  margin: 0;
  overflow-x: hidden;
  color: var(--white);
  background:
    radial-gradient(circle at 12% 8%, rgba(102, 222, 243, 0.12), transparent 25rem),
    radial-gradient(circle at 88% 54%, rgba(149, 105, 220, 0.1), transparent 27rem),
    linear-gradient(145deg, #18213c 0%, #0b1123 56%, #070b18 100%);
}

button,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  border: 3px solid var(--outline);
  border-radius: 10px;
  color: var(--outline);
  font-weight: 900;
  background: var(--yellow);
  box-shadow: 3px 4px 0 var(--outline);
  transform: translateY(-180%);
}

.skip-link:focus {
  transform: translateY(0);
}

.page-decor {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.decor-grid {
  position: absolute;
  inset: 0;
  opacity: 0.32;
  background-image:
    linear-gradient(rgba(122, 145, 188, 0.08) 2px, transparent 2px),
    linear-gradient(90deg, rgba(122, 145, 188, 0.08) 2px, transparent 2px);
  background-size: 72px 46px;
  mask-image: linear-gradient(to bottom, black, transparent 82%);
}

.decor-blob {
  position: absolute;
  border: 5px solid rgba(5, 8, 22, 0.6);
  border-radius: 48% 52% 55% 45% / 60% 42% 58% 40%;
  background: rgba(102, 222, 243, 0.07);
}

.blob-one {
  top: 17%;
  left: -170px;
  width: 320px;
  height: 250px;
  rotate: -14deg;
}

.blob-two {
  right: -150px;
  bottom: 12%;
  width: 300px;
  height: 210px;
  background: rgba(239, 120, 167, 0.05);
  rotate: 11deg;
}

.decor-spark {
  position: absolute;
  color: rgba(244, 207, 79, 0.12);
  font-size: 4rem;
  text-shadow: 4px 4px 0 rgba(5, 8, 22, 0.45);
}

.spark-one {
  top: 10%;
  right: 5%;
  rotate: 12deg;
}

.spark-two {
  bottom: 18%;
  left: 4%;
  font-size: 2.4rem;
  rotate: -9deg;
}

.site-header,
#daily-six-app,
.site-footer {
  width: min(1160px, calc(100% - 34px));
  margin-inline: auto;
}

.site-header {
  min-height: 76px;
  padding-top: max(12px, env(safe-area-inset-top));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  transform: rotate(-1deg);
}

.mini-jelly {
  position: relative;
  width: 45px;
  height: 40px;
  border: 4px solid var(--outline);
  border-radius: 58% 42% 49% 51% / 58% 58% 42% 42%;
  display: grid;
  place-items: center;
  color: #07334a;
  font-size: 1.25rem;
  font-weight: 1000;
  background: var(--slime);
  box-shadow: 0 5px 0 var(--slime-deep);
}

.mini-jelly::after {
  position: absolute;
  right: 5px;
  bottom: -9px;
  width: 10px;
  height: 13px;
  border: 3px solid var(--outline);
  border-top: 0;
  border-radius: 0 0 50% 50%;
  content: "";
  background: var(--slime);
}

.back-link > span:last-child {
  display: grid;
  line-height: 0.9;
}

.back-link strong {
  font-size: 1.05rem;
}

.back-link small {
  color: var(--slime);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.today-chip {
  margin: 0;
  padding: 8px 12px;
  border: 3px solid var(--outline);
  border-radius: 11px 14px 10px 13px;
  display: grid;
  gap: 1px;
  color: #293149;
  text-align: right;
  background: var(--paper);
  box-shadow: 3px 4px 0 var(--outline);
  rotate: 1deg;
}

.today-chip span {
  color: #6c6e75;
  font-size: 0.58rem;
  font-weight: 1000;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.today-chip strong {
  font-size: 0.78rem;
}

body[data-view="home"] .site-header {
  min-height: 54px;
  padding-top: max(4px, env(safe-area-inset-top));
}

body[data-view="home"] .mini-jelly {
  width: 36px;
  height: 32px;
  border-width: 3px;
  font-size: 0.98rem;
  box-shadow: 0 3px 0 var(--slime-deep);
}

body[data-view="home"] .mini-jelly::after {
  right: 4px;
  bottom: -7px;
  width: 9px;
  height: 11px;
  border-width: 2px;
  border-top: 0;
}

body[data-view="home"] .today-chip {
  padding: 4px 9px;
}

body[data-view="home"] .back-link {
  gap: 8px;
}

body[data-view="home"] .back-link strong {
  font-size: 0.95rem;
}

body[data-view="home"] .back-link small {
  font-size: 0.68rem;
}

body[data-view="home"] .today-chip strong {
  font-size: 0.72rem;
}

#daily-six-app {
  min-height: calc(100dvh - 178px);
  padding: 24px 0 64px;
}

body[data-view="home"] #daily-six-app {
  min-height: 0;
  padding: 0 0 48px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--slime);
  font-size: 0.72rem;
  font-weight: 1000;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.home-hero {
  min-height: 390px;
  padding: 12px clamp(0px, 3vw, 30px) 38px;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(280px, 0.78fr);
  align-items: center;
  gap: 20px;
}

.hero-copy {
  position: relative;
  z-index: 2;
}

.hero-status {
  position: relative;
  z-index: 4;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 12px;
}

.hero-today-chip {
  display: none;
  justify-self: center;
  text-align: center;
}

.hero-copy h1 {
  width: max-content;
  max-width: 100%;
  margin: 0;
  color: var(--paper);
  font-size: clamp(3.5rem, 7.8vw, 6.4rem);
  font-weight: 1000;
  line-height: 0.76;
  letter-spacing: -0.085em;
  text-shadow:
    -4px -4px 0 var(--outline),
    4px -4px 0 var(--outline),
    -4px 4px 0 var(--outline),
    4px 4px 0 var(--outline),
    7px 8px 0 #293653;
  rotate: -1.4deg;
}

.hero-copy h1 span {
  position: relative;
  color: var(--slime);
  font-size: 0.73em;
  letter-spacing: -0.045em;
}

.hero-copy h1 span::after {
  position: absolute;
  right: -20px;
  bottom: -8px;
  left: 3px;
  z-index: -1;
  height: 25px;
  border: 4px solid var(--outline);
  border-radius: 60% 40% 55% 45%;
  content: "";
  background: #257f9c;
  rotate: 1deg;
}

.hero-rule {
  max-width: 600px;
  margin: 30px 0 18px;
  color: var(--white);
  font-size: clamp(1.08rem, 2vw, 1.42rem);
  font-weight: 900;
  line-height: 1.45;
}

.daily-progress {
  width: max-content;
  max-width: 100%;
  padding: 12px 15px;
  border: 3px solid rgba(5, 8, 22, 0.75);
  border-radius: 15px 11px 16px 12px;
  display: flex;
  align-items: center;
  gap: 13px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 900;
  background: rgba(29, 41, 70, 0.88);
  box-shadow: 4px 5px 0 rgba(5, 8, 22, 0.55);
}

.daily-progress strong {
  color: var(--yellow);
  font-size: 1.22rem;
}

.progress-divider {
  width: 3px;
  height: 26px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.11);
}

.result-button {
  margin-top: 18px;
}

.hero-status .result-button {
  margin-top: 0;
}

.hero-jelly {
  position: relative;
  min-height: 330px;
  display: grid;
  place-items: end center;
}

.hero-jelly img {
  position: relative;
  z-index: 3;
  width: min(92%, 330px);
  filter: drop-shadow(0 17px 0 rgba(3, 7, 17, 0.32));
}

.hero-blob {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 75%;
  border: 5px solid var(--outline);
  border-radius: 51% 49% 45% 55% / 59% 48% 52% 41%;
  background:
    radial-gradient(circle at 25% 24%, rgba(255, 255, 255, 0.24), transparent 9%),
    var(--purple);
  box-shadow: 9px 11px 0 rgba(3, 7, 17, 0.5);
  rotate: 3deg;
}

.jelly-speech {
  position: absolute;
  z-index: 5;
  top: 9%;
  right: -5%;
  max-width: 155px;
  padding: 11px 13px;
  border: 4px solid var(--outline);
  border-radius: 17px 15px 18px 13px;
  color: #253047;
  font-size: 0.76rem;
  font-weight: 1000;
  line-height: 1.3;
  text-align: center;
  background: var(--paper);
  box-shadow: 4px 5px 0 var(--outline);
  rotate: 3deg;
}

.jelly-speech::after {
  position: absolute;
  right: 31%;
  bottom: -15px;
  width: 20px;
  height: 18px;
  border-right: 4px solid var(--outline);
  border-bottom: 4px solid var(--outline);
  content: "";
  background: var(--paper);
  transform: skewY(35deg) rotate(23deg);
}

.floating-star {
  position: absolute;
  z-index: 4;
  color: var(--yellow);
  font-size: 2.25rem;
  text-shadow: 3px 3px 0 var(--outline);
  animation: star-float 2.8s ease-in-out infinite;
}

.star-one {
  top: 18%;
  left: -3%;
  rotate: -13deg;
}

.star-two {
  right: 5%;
  bottom: 7%;
  font-size: 1.5rem;
  animation-delay: -1.1s;
  rotate: 15deg;
}

.game-board {
  padding: clamp(24px, 4vw, 48px);
  border: 5px solid var(--outline);
  border-radius: 28px 22px 31px 24px;
  color: var(--white);
  background:
    linear-gradient(rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0)),
    #202b48;
  box-shadow: 10px 13px 0 var(--shadow), inset 4px 4px 0 rgba(255, 255, 255, 0.06);
  rotate: -0.2deg;
}

.board-heading {
  margin-bottom: 28px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.board-heading h2,
.how-to-card h2 {
  margin: 0;
  color: var(--paper);
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  letter-spacing: -0.055em;
}

.board-heading > p {
  max-width: 300px;
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
  text-align: right;
}

.game-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 23px;
}

.game-card {
  --accent: var(--slime);
  position: relative;
  min-width: 0;
  min-height: 335px;
  padding: 13px;
  border: 5px solid var(--outline);
  border-radius: 20px 17px 23px 16px;
  display: flex;
  flex-direction: column;
  text-align: left;
  cursor: pointer;
  background: #131c33;
  box-shadow: 7px 9px 0 rgba(3, 7, 17, 0.6), inset 3px 3px 0 rgba(255, 255, 255, 0.05);
  transition: transform 160ms ease, filter 160ms ease, box-shadow 160ms ease;
  rotate: calc((var(--card-index) - 2.5) * 0.18deg);
}

.game-card::before {
  position: absolute;
  inset: -1px;
  z-index: 0;
  border: 2px solid color-mix(in srgb, var(--accent) 38%, transparent);
  border-radius: 15px 13px 18px 12px;
  content: "";
  pointer-events: none;
}

.game-card > * {
  position: relative;
  z-index: 1;
}

.game-card.is-complete {
  background: color-mix(in srgb, #172039 86%, var(--accent));
  box-shadow: 7px 9px 0 rgba(3, 7, 17, 0.6), 0 0 22px color-mix(in srgb, var(--accent) 22%, transparent);
}

.card-topline,
.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.card-number {
  color: var(--accent);
  font-size: 0.67rem;
  font-weight: 1000;
  letter-spacing: 0.12em;
}

.card-status {
  padding: 4px 7px;
  border: 2px solid var(--outline);
  border-radius: 8px 6px 9px 7px;
  color: #182238;
  font-size: 0.58rem;
  font-weight: 1000;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  background: var(--accent);
  box-shadow: 2px 2px 0 var(--outline);
}

.card-art {
  position: relative;
  height: 158px;
  margin: 9px 0 13px;
  border: 3px solid var(--outline);
  border-radius: 15px 12px 17px 11px;
  display: grid;
  place-items: end center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 25%, color-mix(in srgb, var(--accent) 28%, transparent), transparent 42%),
    #1c2845;
}

.card-art::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  box-shadow: inset 0 0 35px rgba(2, 6, 17, 0.65);
}

.card-art-backdrop {
  position: absolute;
  right: -10%;
  bottom: -30%;
  left: -10%;
  height: 62%;
  border: 3px solid var(--outline);
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 74%, #ffffff 4%);
  opacity: 0.62;
  rotate: -3deg;
}

.card-art > .card-cover {
  position: relative;
  z-index: 2;
  width: 135px;
  height: 140px;
  object-fit: contain;
  object-position: center;
  filter: drop-shadow(0 8px 0 rgba(4, 8, 18, 0.34));
}

.card-mascot {
  position: absolute;
  z-index: 4;
  top: 10px;
  right: 10px;
  width: 43px;
  height: 43px;
  border: 3px solid var(--outline);
  border-radius: 12px 9px 13px 10px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--paper);
  box-shadow: 3px 4px 0 var(--outline);
  rotate: 5deg;
}

.card-mascot > img {
  position: absolute;
  top: -8%;
  left: 50%;
  width: 145%;
  height: 145%;
  max-width: none;
  object-fit: contain;
  filter: none;
  transform: translateX(-50%);
}

.card-copy {
  display: grid;
  gap: 5px;
}

.card-copy strong {
  color: var(--paper);
  font-size: 1.35rem;
  font-weight: 1000;
  letter-spacing: -0.045em;
}

.card-copy small {
  color: var(--muted);
  font-size: 0.79rem;
  font-weight: 800;
}

.card-footer {
  min-height: 29px;
  margin-top: auto;
  padding-top: 12px;
}

.ready-label {
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 1000;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.card-arrow {
  width: 29px;
  height: 27px;
  border: 3px solid var(--outline);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--outline);
  font-weight: 1000;
  background: var(--accent);
}

.stars {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.star {
  color: var(--yellow);
  font-size: 1.15rem;
  line-height: 1;
  text-shadow: 2px 2px 0 var(--outline);
}

.star.is-empty {
  color: #65708a;
  text-shadow: 1px 1px 0 var(--outline);
}

.stars-animated .star.is-earned {
  animation: star-pop 520ms cubic-bezier(0.18, 0.89, 0.33, 1.45) both;
  animation-delay: calc(var(--star-index) * 130ms);
}

.how-to-card {
  margin: 38px 18px 0;
  padding: 25px 28px;
  border: 4px solid var(--outline);
  border-radius: 20px 15px 23px 17px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
  color: #2b3142;
  background: var(--paper);
  box-shadow: 7px 9px 0 rgba(3, 7, 17, 0.48);
  rotate: 0.5deg;
}

@media (min-width: 761px) {
  body[data-view="home"] .home-fold {
    min-height: calc(100dvh - 54px);
    padding: 10px 0 18px;
    display: grid;
    align-content: center;
    gap: 10px;
  }

  body[data-view="home"] .home-hero {
    min-height: 165px;
    padding: 0 18px 12px;
    grid-template-columns: minmax(0, 1fr) 180px;
    grid-template-areas:
      "copy jelly"
      "status jelly";
    column-gap: 24px;
    row-gap: 6px;
  }

  body[data-view="home"] .hero-copy {
    grid-area: copy;
  }

  body[data-view="home"] .hero-status {
    grid-area: status;
    grid-template-columns: max-content max-content;
    justify-content: start;
    justify-items: start;
    gap: 12px;
  }

  body[data-view="home"] .hero-jelly {
    grid-area: jelly;
  }

  body[data-view="home"] .hero-copy h1 {
    font-size: clamp(3.2rem, 5vw, 4.55rem);
  }

  body[data-view="home"] .hero-copy h1 span::after {
    right: -13px;
    bottom: -5px;
    height: 18px;
    border-width: 3px;
  }

  body[data-view="home"] .hero-rule {
    margin: 14px 0 9px;
    font-size: 1rem;
    line-height: 1.25;
  }

  body[data-view="home"] .daily-progress {
    padding: 7px 10px;
    gap: 10px;
    font-size: 0.72rem;
  }

  body[data-view="home"] .daily-progress strong {
    font-size: 1.02rem;
  }

  body[data-view="home"] .progress-divider {
    height: 21px;
  }

  body[data-view="home"] .result-button {
    min-height: 40px;
    margin-top: 0;
    padding: 7px 11px;
  }

  body[data-view="home"] .hero-jelly {
    min-height: 155px;
  }

  body[data-view="home"] .hero-jelly img {
    width: min(88%, 150px);
    filter: drop-shadow(0 9px 0 rgba(3, 7, 17, 0.32));
  }

  body[data-view="home"] .hero-blob {
    height: 72%;
    border-width: 4px;
    box-shadow: 6px 7px 0 rgba(3, 7, 17, 0.5);
  }

  body[data-view="home"] .jelly-speech {
    top: 2%;
    right: -4%;
    max-width: 122px;
    padding: 7px 9px;
    border-width: 3px;
    font-size: 0.64rem;
    box-shadow: 3px 4px 0 var(--outline);
  }

  body[data-view="home"] .jelly-speech::after {
    bottom: -12px;
    width: 16px;
    height: 15px;
    border-width: 3px;
  }

  body[data-view="home"] .floating-star {
    font-size: 1.55rem;
    text-shadow: 2px 2px 0 var(--outline);
  }

  body[data-view="home"] .star-two {
    font-size: 1.08rem;
  }

  body[data-view="home"] .game-board {
    padding: 16px 18px 18px;
  }

  body[data-view="home"] .board-heading {
    margin-bottom: 10px;
  }

  body[data-view="home"] .board-heading .eyebrow {
    margin-bottom: 3px;
  }

  body[data-view="home"] .board-heading h2 {
    font-size: clamp(1.5rem, 2.5vw, 2rem);
  }

  body[data-view="home"] .board-heading > p {
    font-size: 0.72rem;
  }

  body[data-view="home"] .game-card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }

  body[data-view="home"] .game-card {
    min-height: 205px;
    padding: 8px;
    border-width: 4px;
    border-radius: 16px 14px 18px 13px;
    box-shadow: 5px 6px 0 rgba(3, 7, 17, 0.6), inset 2px 2px 0 rgba(255, 255, 255, 0.05);
  }

  body[data-view="home"] .card-status {
    padding: 3px 5px;
    border-width: 2px;
    font-size: 0.52rem;
  }

  body[data-view="home"] .card-art {
    height: 82px;
    margin: 5px 0 7px;
  }

  body[data-view="home"] .card-art > .card-cover {
    width: 80px;
    height: 82px;
    filter: drop-shadow(0 5px 0 rgba(4, 8, 18, 0.34));
  }

  body[data-view="home"] .card-mascot {
    top: 5px;
    right: 5px;
    width: 32px;
    height: 32px;
    border-width: 2px;
    box-shadow: 2px 3px 0 var(--outline);
  }

  body[data-view="home"] .card-copy {
    gap: 2px;
  }

  body[data-view="home"] .card-copy strong {
    font-size: 1rem;
    line-height: 1.05;
  }

  body[data-view="home"] .card-copy small {
    font-size: 0.66rem;
    line-height: 1.2;
  }

  body[data-view="home"] .card-footer {
    min-height: 25px;
    padding-top: 5px;
  }

  body[data-view="home"] .ready-label {
    font-size: 0.59rem;
  }

  body[data-view="home"] .card-arrow {
    width: 26px;
    height: 25px;
    border-width: 2px;
  }
}

@media (min-width: 1180px) {
  body[data-view="home"] .site-header .today-chip {
    display: none;
  }

  body[data-view="home"] .home-fold {
    height: calc(100dvh - 54px);
    min-height: 680px;
    padding: 0 0 14px;
    grid-template-rows: 170px auto;
    align-content: start;
    gap: 10px;
  }

  body[data-view="home"] .home-hero {
    min-height: 0;
    height: 170px;
    padding: 0 18px 8px;
    grid-template-columns: minmax(0, 1fr) minmax(240px, 270px) minmax(0, 1fr);
    grid-template-areas: "copy status jelly";
    gap: 28px;
  }

  body[data-view="home"] .hero-copy {
    align-self: center;
    min-width: 0;
  }

  body[data-view="home"] .hero-copy > .eyebrow {
    margin-bottom: 2px;
  }

  body[data-view="home"] .hero-copy h1 {
    font-size: 4.15rem;
  }

  body[data-view="home"] .hero-rule {
    max-width: 420px;
    margin: 9px 0 0;
    font-size: 0.95rem;
    line-height: 1.15;
  }

  body[data-view="home"] .hero-status {
    align-self: center;
    grid-template-columns: 1fr;
    justify-content: center;
    justify-items: center;
    gap: 8px;
  }

  body[data-view="home"] .hero-today-chip {
    min-width: 104px;
    padding: 5px 10px;
    display: grid;
  }

  body[data-view="home"] .daily-progress {
    padding: 5px 9px;
  }

  body[data-view="home"] .result-button {
    min-height: 36px;
    margin-top: 0;
    padding: 5px 10px;
  }

  body[data-view="home"] .hero-jelly {
    width: min(250px, 100%);
    min-height: 160px;
    justify-self: center;
  }

  body[data-view="home"] .hero-jelly img {
    width: min(92%, 190px);
  }

  body[data-view="home"] .hero-blob {
    right: auto;
    left: 50%;
    width: min(230px, 88%);
    transform: translateX(-50%);
  }

  body[data-view="home"] .jelly-speech {
    right: calc(50% - 125px);
  }

  body[data-view="home"] .game-board {
    width: 100%;
    height: clamp(450px, 64dvh, 560px);
    min-height: 0;
    padding: 20px 20px 24px;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
  }

  body[data-view="home"] .board-heading {
    margin-bottom: 14px;
  }

  body[data-view="home"] .game-card-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
    height: 100%;
    align-items: center;
  }

  body[data-view="home"] .game-card {
    height: min(100%, 330px);
    min-height: 255px;
    padding: 9px;
  }

  body[data-view="home"] .card-art {
    height: 135px;
    margin: 7px 0 10px;
  }

  body[data-view="home"] .card-art > .card-cover {
    width: min(124px, 86%);
    height: 130px;
  }

  body[data-view="home"] .card-mascot {
    width: 34px;
    height: 34px;
  }
}

@media (min-width: 1180px) and (max-height: 720px) {
  body[data-view="home"] .home-fold {
    grid-template-rows: 155px auto;
  }

  body[data-view="home"] .home-hero {
    height: 155px;
  }

  body[data-view="home"] .hero-copy h1 {
    font-size: 3.65rem;
  }

  body[data-view="home"] .hero-jelly {
    min-height: 146px;
  }

  body[data-view="home"] .hero-jelly img {
    width: min(90%, 170px);
  }

  body[data-view="home"] .hero-blob {
    width: min(208px, 86%);
  }

  body[data-view="home"] .game-card {
    height: min(100%, 300px);
  }

  body[data-view="home"] .card-art {
    height: 120px;
  }

  body[data-view="home"] .card-art > .card-cover {
    width: min(112px, 86%);
    height: 115px;
  }
}

@media (max-width: 760px) {
  body[data-view="home"] #daily-six-app {
    padding: 12px 0 48px;
  }
}

.how-to-stamp {
  width: 70px;
  height: 70px;
  border: 5px solid var(--outline);
  border-radius: 20px 16px 22px 15px;
  display: grid;
  place-items: center;
  color: var(--outline);
  font-size: 2.5rem;
  font-weight: 1000;
  background: var(--yellow);
  box-shadow: 4px 5px 0 var(--outline);
  rotate: -5deg;
}

.how-to-card .eyebrow {
  color: #267f9e;
}

.how-to-card h2 {
  color: #20283d;
  font-size: clamp(1.35rem, 3vw, 2rem);
}

.how-to-card p:last-child {
  margin: 7px 0 0;
  color: #626678;
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.5;
}

.star-key {
  min-width: 125px;
  display: grid;
  gap: 5px;
  color: #7f5400;
  font-size: 0.8rem;
  font-weight: 1000;
}

.star-key span {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.star-key b {
  color: #444958;
}

.chunky-button,
.text-button,
.dev-panel button,
.dev-panel select {
  min-height: 46px;
  border: 3px solid var(--outline);
  border-radius: 13px 10px 15px 11px;
  cursor: pointer;
  font-weight: 1000;
}

.chunky-button {
  min-height: 52px;
  padding: 10px 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: #2f2105;
  background: var(--yellow);
  box-shadow: 4px 5px 0 var(--outline);
  transition: transform 150ms ease, filter 150ms ease;
}

.chunky-button:disabled {
  cursor: default;
  filter: grayscale(0.55) brightness(0.72);
  box-shadow: 2px 3px 0 var(--outline);
}

.text-button {
  padding: 8px 13px;
  color: var(--paper);
  background: #26324e;
  box-shadow: 3px 4px 0 var(--outline);
}

.game-view {
  padding-top: 8px;
}

.game-nav {
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.game-date {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.game-heading {
  padding: 20px clamp(5px, 2vw, 22px) 26px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 22px;
}

.game-heading h1 {
  margin: 0;
  color: var(--paper);
  font-size: clamp(2.7rem, 6vw, 5.2rem);
  font-weight: 1000;
  line-height: 0.95;
  letter-spacing: -0.075em;
  text-shadow: 5px 6px 0 rgba(3, 7, 17, 0.55);
}

.game-heading p:last-child {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: clamp(0.95rem, 2vw, 1.18rem);
  font-weight: 800;
}

.failed-answer-reveal {
  width: calc(100% - clamp(10px, 4vw, 44px));
  margin: -8px auto 18px;
  padding: 10px 13px;
  border: 4px solid var(--outline);
  border-radius: 15px 11px 17px 12px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  color: #202739;
  background: var(--yellow);
  box-shadow: 5px 6px 0 var(--outline);
  rotate: -0.25deg;
}

.failed-answer-reveal:focus-visible {
  outline: 4px solid var(--slime);
  outline-offset: 4px;
}

.failed-answer-stamp {
  width: 39px;
  height: 39px;
  border: 3px solid var(--outline);
  border-radius: 9px 7px 10px 8px;
  display: grid;
  place-items: center;
  color: var(--paper);
  font-size: 1.35rem;
  font-weight: 1000;
  background: var(--pink);
  box-shadow: 2px 3px 0 var(--outline);
}

.failed-answer-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.failed-answer-copy small,
.failed-answer-note {
  font-size: 0.57rem;
  font-weight: 1000;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.failed-answer-copy h2 {
  margin: 0;
  font-size: clamp(1.05rem, 3vw, 1.45rem);
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.failed-answer-note {
  padding: 6px 8px;
  border: 2px solid var(--outline);
  border-radius: 999px;
  text-align: center;
  background: rgba(255, 255, 255, 0.4);
}

.guess-tracker {
  min-width: 190px;
  padding: 12px 14px;
  border: 4px solid var(--outline);
  border-radius: 16px 12px 18px 13px;
  display: grid;
  gap: 8px;
  background: var(--paper);
  box-shadow: 4px 5px 0 var(--outline);
  rotate: 1deg;
}

.guess-label {
  color: #5c6170;
  font-size: 0.62rem;
  font-weight: 1000;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.guess-pips {
  display: flex;
  gap: 9px;
}

.guess-pip {
  width: 38px;
  height: 32px;
  border: 3px solid var(--outline);
  border-radius: 54% 46% 50% 50% / 59% 57% 43% 41%;
  display: grid;
  place-items: center;
  background: var(--slime);
  box-shadow: 0 4px 0 var(--slime-deep);
}

.guess-pip i {
  width: 5px;
  height: 6px;
  border-radius: 50%;
  background: var(--outline);
  box-shadow: 11px 0 0 var(--outline);
  translate: -5px 0;
}

.guess-pip.is-used {
  background: #8b93a4;
  box-shadow: 0 4px 0 #555d70;
  opacity: 0.52;
}

.guess-pip.is-used i {
  width: 17px;
  height: 3px;
  border-radius: 0;
  box-shadow: none;
  rotate: -10deg;
  translate: 0;
}

.game-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.55fr);
  align-items: stretch;
  gap: 24px;
}

.choice-panel,
.reaction-panel {
  border: 5px solid var(--outline);
  box-shadow: 8px 10px 0 var(--shadow);
}

.choice-panel {
  min-height: 490px;
  padding: clamp(18px, 3.5vw, 34px);
  border-radius: 25px 19px 29px 21px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 0%, rgba(102, 222, 243, 0.09), transparent 50%),
    #202b48;
}

.reaction-panel {
  min-height: 490px;
  border-radius: 21px 25px 20px 28px;
  display: grid;
  grid-template-rows: minmax(220px, 0.9fr) auto;
  overflow: hidden;
  background: var(--paper);
  rotate: 0.4deg;
}

.reaction-art {
  position: relative;
  display: grid;
  place-items: end center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 36%, rgba(255, 255, 255, 0.22), transparent 34%),
    var(--purple);
}

.reaction-panel.reaction-shocked .reaction-art,
.reaction-panel.reaction-wrong .reaction-art {
  background-color: var(--pink);
}

.reaction-panel.reaction-celebrate .reaction-art {
  background-color: var(--green);
}

.reaction-blob {
  position: absolute;
  right: -12%;
  bottom: -38%;
  left: -12%;
  height: 76%;
  border: 4px solid var(--outline);
  border-radius: 50%;
  background: rgba(16, 25, 47, 0.2);
}

.reaction-art img {
  position: relative;
  z-index: 2;
  width: min(92%, 280px);
  max-height: 265px;
  object-fit: contain;
  object-position: bottom;
  filter: drop-shadow(0 13px 0 rgba(3, 7, 17, 0.28));
}

.reaction-copy {
  min-height: 220px;
  padding: 24px 22px 25px;
  color: #2a3040;
}

.feedback-kicker {
  margin: 0 0 6px;
  color: #397d95;
  font-size: 0.65rem;
  font-weight: 1000;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.reaction-copy h2 {
  margin: 0;
  color: #202739;
  font-size: clamp(1.45rem, 3vw, 2rem);
  line-height: 1;
  letter-spacing: -0.05em;
}

.reaction-copy > p:not(.feedback-kicker) {
  margin: 11px 0 0;
  color: #606576;
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.5;
}

.reaction-copy .stars {
  margin-top: 17px;
}

.reaction-copy .star {
  font-size: 2rem;
  text-shadow: 2px 3px 0 var(--outline);
}

.reaction-copy .chunky-button {
  width: 100%;
  margin-top: 19px;
}

.direction-hint {
  color: #3154b9 !important;
  font-size: clamp(2.2rem, 5vw, 3.4rem) !important;
  text-transform: uppercase;
}

.clue-list {
  margin: 13px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
  list-style: none;
}

.clue-list li {
  padding: 9px 10px;
  border: 2px solid #252a39;
  border-radius: 9px 7px 10px 8px;
  color: #3d4354;
  font-size: 0.78rem;
  font-weight: 900;
  background: #e7dba9;
  box-shadow: 2px 3px 0 #252a39;
}

.option-grid,
.number-grid,
.door-grid {
  width: 100%;
  display: grid;
}

.option-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.creature-grid,
.treasure-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.number-grid {
  width: min(100%, 420px);
  grid-template-columns: repeat(4, minmax(44px, 1fr));
  gap: 10px;
}

.number-grid-15,
.number-grid-25 {
  width: min(100%, 510px);
  grid-template-columns: repeat(5, minmax(44px, 1fr));
}

.door-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

.choice {
  position: relative;
  min-width: 0;
  min-height: 130px;
  padding: 11px 8px 10px;
  border: 4px solid var(--outline);
  border-radius: 17px 13px 19px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: var(--white);
  text-align: center;
  cursor: pointer;
  background: #2b3858;
  box-shadow: 4px 6px 0 rgba(3, 7, 17, 0.63), inset 2px 2px 0 rgba(255, 255, 255, 0.06);
  transition: transform 140ms ease, filter 140ms ease, background 140ms ease;
}

.choice:nth-child(3n + 1) {
  rotate: -0.6deg;
}

.choice:nth-child(3n + 2) {
  rotate: 0.5deg;
}

.choice-label {
  position: relative;
  z-index: 3;
  font-size: 0.76rem;
  font-weight: 1000;
}

.choice-mark {
  position: absolute;
  z-index: 6;
  top: 7px;
  right: 7px;
  width: 27px;
  height: 27px;
  border: 3px solid var(--outline);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--outline);
  font-weight: 1000;
  background: var(--pink);
  box-shadow: 2px 2px 0 var(--outline);
}

.choice.is-correct {
  background: #2f7250;
  box-shadow: 4px 6px 0 rgba(3, 7, 17, 0.63), 0 0 23px rgba(105, 206, 131, 0.55);
}

.choice.is-answer-reveal {
  background: #2f7250;
  box-shadow: 4px 6px 0 rgba(3, 7, 17, 0.63), 0 0 0 4px var(--yellow), 0 0 25px rgba(244, 207, 79, 0.55);
  animation: choice-correct 580ms cubic-bezier(0.18, 0.89, 0.33, 1.4) both;
}

.choice.is-correct .choice-mark,
.choice.is-answer-reveal .choice-mark {
  background: var(--green);
}

.choice.is-wrong {
  filter: grayscale(0.6) brightness(0.62);
  text-decoration: line-through;
  text-decoration-thickness: 2px;
}

.choice:disabled {
  cursor: default;
}

.choice.just-wrong {
  animation: choice-shake 430ms ease both;
}

.choice.just-correct {
  animation: choice-correct 580ms cubic-bezier(0.18, 0.89, 0.33, 1.4) both;
}

.choice-number {
  min-height: 68px;
  aspect-ratio: 1;
  padding: 4px;
  border-radius: 14px 11px 16px 12px;
}

.number-face {
  font-size: clamp(1.1rem, 3vw, 1.6rem);
  font-weight: 1000;
  line-height: 1;
}

.choice-number .choice-label {
  display: none;
}

.choice-number .choice-mark {
  top: -7px;
  right: -7px;
  width: 23px;
  height: 23px;
  font-size: 0.72rem;
}

.color-pot {
  position: relative;
  width: 64px;
  height: 62px;
  border: 4px solid var(--outline);
  border-radius: 48% 52% 18px 18px;
  background: var(--swatch);
  box-shadow: inset 9px -8px 0 rgba(0, 0, 0, 0.12), 3px 4px 0 rgba(3, 7, 17, 0.35);
}

.color-pot::before {
  position: absolute;
  top: -8px;
  right: -7px;
  left: -7px;
  height: 15px;
  border: 4px solid var(--outline);
  border-radius: 50%;
  content: "";
  background: color-mix(in srgb, var(--swatch) 82%, white);
}

.color-pot i {
  position: absolute;
  top: 12px;
  left: 10px;
  width: 11px;
  height: 21px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.28);
  rotate: 20deg;
}

.rune-stone {
  position: relative;
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  background: transparent;
}

.rune-glyph-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.potion-workbench,
.rune-forge {
  width: 100%;
  display: grid;
  gap: 18px;
}

.potion-stage {
  position: relative;
  height: 118px;
  display: grid;
  place-items: end center;
}

.potion-cauldron {
  position: relative;
  width: 142px;
  height: 76px;
  border: 5px solid var(--outline);
  border-radius: 12px 12px 70px 70px;
  display: block;
  background: #566078;
  box-shadow: inset -14px -11px 0 rgba(0, 0, 0, 0.18), 5px 7px 0 rgba(3, 7, 17, 0.42);
}

.potion-cauldron::before {
  position: absolute;
  z-index: 2;
  top: -15px;
  right: -10px;
  left: -10px;
  height: 24px;
  border: 5px solid var(--outline);
  border-radius: 50%;
  content: "";
  background: linear-gradient(90deg, var(--green), var(--slime), var(--pink));
  box-shadow: inset 0 5px 0 rgba(255, 255, 255, 0.22);
}

.potion-cauldron i,
.potion-cauldron b {
  position: absolute;
  bottom: -18px;
  width: 18px;
  height: 29px;
  border: 5px solid var(--outline);
  border-top: 0;
  content: "";
  background: #566078;
}

.potion-cauldron i { left: 18px; rotate: 8deg; }
.potion-cauldron b { right: 18px; rotate: -8deg; }

.potion-bubbles {
  position: absolute;
  top: 0;
  left: 50%;
  width: 120px;
  height: 70px;
  translate: -50% 0;
}

.potion-bubbles i {
  position: absolute;
  bottom: 0;
  width: 19px;
  height: 19px;
  border: 3px solid var(--outline);
  border-radius: 50%;
  background: var(--slime);
  animation: potion-bubble 1.8s ease-in-out infinite;
}

.potion-bubbles i:nth-child(1) { left: 10px; animation-delay: -0.8s; }
.potion-bubbles i:nth-child(2) { left: 53px; width: 13px; height: 13px; animation-delay: -1.3s; }
.potion-bubbles i:nth-child(3) { right: 8px; background: var(--pink); animation-delay: -0.3s; }

.potion-instructions,
.weapon-stage > p {
  margin: 0;
  display: grid;
  gap: 3px;
  color: var(--paper);
  text-align: center;
}

.potion-instructions strong,
.weapon-stage > p strong {
  font-size: 1rem;
  font-weight: 1000;
}

.potion-instructions span,
.weapon-stage > p span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.potion-slots {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 11px;
}

.potion-slot,
.potion-ingredient,
.rune-choice {
  position: relative;
  min-width: 0;
  border: 4px solid var(--outline);
  color: var(--paper);
  cursor: pointer;
  background: #2b3858;
  box-shadow: 4px 5px 0 rgba(3, 7, 17, 0.58);
  transition: transform 140ms ease, filter 140ms ease, background 140ms ease;
}

.potion-slot {
  min-height: 139px;
  padding: 18px 6px 9px;
  border-radius: 16px 12px 18px 13px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.potion-slot.is-active {
  background: #394b78;
  box-shadow: 4px 5px 0 var(--outline), 0 0 0 3px var(--slime);
  transform: translateY(-3px);
}

.potion-slot.is-locked {
  cursor: default;
  background: #2f7250;
  box-shadow: 4px 5px 0 rgba(3, 7, 17, 0.58), 0 0 22px rgba(105, 206, 131, 0.48);
  animation: potion-perfect 1.7s ease-in-out infinite alternate;
}

.slot-number {
  position: absolute;
  top: 5px;
  left: 7px;
  color: var(--slime);
  font-size: 0.62rem;
  font-weight: 1000;
}

.potion-slot b,
.potion-ingredient b,
.rune-choice .choice-label {
  font-size: 0.7rem;
  font-weight: 1000;
}

.potion-slot em,
.potion-ingredient em,
.rune-choice em {
  color: var(--slime);
  font-size: 0.56rem;
  font-style: normal;
  font-weight: 1000;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.potion-slot-color {
  scale: 0.74;
  margin: -5px 0 -8px;
}

.empty-slot {
  width: 55px;
  height: 55px;
  border: 3px dashed #7b87a4;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #8995b1;
  font-size: 1.5rem;
  font-weight: 1000;
}

.potion-palette {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.potion-ingredient {
  min-height: 112px;
  padding: 9px 4px;
  border-radius: 15px 11px 17px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.potion-ingredient .color-pot {
  scale: 0.72;
  margin: -7px 0 -10px;
}

.potion-ingredient.is-selected {
  background: #435686;
  box-shadow: 4px 5px 0 var(--outline), 0 0 0 3px var(--yellow);
  transform: translateY(-3px);
}

.potion-ingredient.is-miss,
.rune-choice.is-miss {
  cursor: default;
  filter: grayscale(0.82) brightness(0.54);
  text-decoration: line-through;
}

.potion-ingredient.is-miss::after,
.rune-choice.is-miss::after {
  position: absolute;
  inset: 11% 47%;
  width: 4px;
  content: "";
  background: var(--pink);
  box-shadow: 0 0 0 2px var(--outline);
  rotate: -38deg;
}

.potion-ingredient.is-locked {
  cursor: default;
  background: #2f7250;
  filter: brightness(0.8);
}

.potion-submit,
.rune-submit {
  width: min(330px, 100%);
  margin-inline: auto;
}

.feedback-key {
  padding: 10px;
  border: 2px solid #43506d;
  border-radius: 11px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  color: var(--muted);
  font-size: 0.59rem;
  font-weight: 800;
  text-align: center;
  background: rgba(8, 14, 29, 0.3);
}

.feedback-key span { display: grid; gap: 2px; }
.feedback-key b { color: var(--paper); text-transform: uppercase; }

.attempt-log {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 9px;
  list-style: none;
}

.attempt-log > li {
  padding: 10px;
  border: 2px solid #43506d;
  border-radius: 11px 8px 12px 9px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  color: var(--paper);
  background: rgba(8, 14, 29, 0.36);
}

.attempt-log > li > strong {
  font-size: 0.63rem;
  text-transform: uppercase;
}

.attempt-results {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.potion-result,
.rune-result {
  min-width: 62px;
  padding: 6px;
  border: 2px solid var(--outline);
  border-radius: 8px 6px 9px 7px;
  display: grid;
  place-items: center;
  gap: 2px;
  color: #20283d;
  background: var(--paper);
  box-shadow: 2px 2px 0 var(--outline);
}

.potion-result i {
  width: 18px;
  height: 18px;
  border: 2px solid var(--outline);
  border-radius: 50%;
  background: var(--swatch);
}

.potion-result b,
.rune-result b { font-size: 0.56rem; }

.potion-result em,
.rune-result em {
  font-size: 0.52rem;
  font-style: normal;
  font-weight: 1000;
  text-transform: uppercase;
}

.result-perfect { background: #bff0c9; animation: potion-perfect 1.2s ease-in-out infinite alternate; }
.result-hit { background: #b9e7ef; animation: potion-hit 1.1s ease-in-out infinite; }
.result-miss { background: #d9c7d0; filter: grayscale(0.55) brightness(0.78); }

.weapon-stage {
  padding: 14px;
  border: 3px solid var(--outline);
  border-radius: 17px 13px 19px 14px;
  background:
    radial-gradient(circle at 50% 45%, rgba(102, 222, 243, 0.16), transparent 38%),
    #18233d;
  box-shadow: inset 3px 3px 0 rgba(255, 255, 255, 0.04);
}

.weapon {
  position: relative;
  min-height: 178px;
  margin-top: 8px;
  display: grid;
  place-items: center;
}

.weapon-blade {
  position: absolute;
  width: 58px;
  height: 150px;
  border: 5px solid var(--outline);
  background: linear-gradient(90deg, #8594a8 0 45%, #d5e0e8 46% 62%, #707e93 63%);
  clip-path: polygon(50% 0, 100% 20%, 84% 100%, 16% 100%, 0 20%);
  filter: drop-shadow(6px 7px 0 rgba(3, 7, 17, 0.45));
}

.weapon-grip {
  position: absolute;
  bottom: 0;
  width: 99px;
  height: 25px;
  border: 5px solid var(--outline);
  border-radius: 10px;
  background: var(--yellow);
  box-shadow: 0 27px 0 -6px #7a4d31, 0 27px 0 -1px var(--outline);
}

.weapon-sockets {
  position: relative;
  z-index: 3;
  width: 170px;
  display: flex;
  justify-content: space-between;
  gap: 57px;
}

.weapon-socket {
  width: 58px;
  min-height: 73px;
  padding: 5px;
  border: 4px dashed #6f7a95;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #8d99b4;
  background: #26334f;
}

.weapon-socket b { font-size: 0.52rem; }
.weapon-socket em { display: none; }

.weapon-socket.is-filled {
  border-style: solid;
  border-color: var(--outline);
  color: var(--slime);
  background: #39536b;
  box-shadow: 0 0 20px rgba(102, 222, 243, 0.62);
  animation: rune-engrave 1.4s ease-in-out infinite alternate;
}

.weapon-socket.is-filled b { color: var(--paper); }
.weapon-socket.is-revealed { color: var(--yellow); filter: saturate(0.72); }

.rune-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 11px;
}

.rune-choice {
  min-height: 126px;
  padding: 8px 5px;
  border-radius: 16px 12px 18px 13px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.rune-choice .rune-stone {
  scale: 0.78;
  margin: -6px 0 -7px;
}

.rune-choice.is-selected {
  background: #4a3d70;
  box-shadow: 4px 5px 0 var(--outline), 0 0 0 3px var(--yellow);
  transform: translateY(-3px);
}

.rune-choice.is-discovered {
  cursor: default;
  background: #2f7250;
  box-shadow: 4px 5px 0 rgba(3, 7, 17, 0.58), 0 0 20px rgba(102, 222, 243, 0.5);
}

.rune-choice.is-discovered .rune-stone {
  box-shadow: inset -10px -9px 0 rgba(0, 0, 0, 0.13), 0 0 19px var(--slime);
}

@keyframes potion-bubble {
  0% { opacity: 0; transform: translateY(12px) scale(0.7); }
  35% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-54px) scale(1.15); }
}

@keyframes potion-perfect {
  from { filter: brightness(1); }
  to { filter: brightness(1.15); }
}

@keyframes potion-hit {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px) rotate(1deg); }
}

@keyframes rune-engrave {
  from { filter: brightness(0.94); }
  to { filter: brightness(1.2); }
}

/* Daily Potion keeps its compact single-panel workbench. */
.game-view-potion .game-layout {
  width: min(100%, 760px);
  margin-inline: auto;
  grid-template-columns: minmax(0, 1fr);
}

.game-view-potion .choice-panel {
  min-height: 0;
  padding: 18px;
}

.game-view-potion .reaction-panel:not(.is-complete) {
  display: none;
}

.game-view-potion .reaction-panel.is-complete {
  min-height: 0;
  grid-template-columns: 145px minmax(0, 1fr);
  grid-template-rows: auto;
  rotate: 0deg;
}

.game-view-potion .reaction-panel.is-complete .reaction-art {
  min-height: 170px;
}

.game-view-potion .reaction-panel.is-complete .reaction-copy {
  min-height: 0;
  padding: 18px;
}

.word-puzzle {
  width: min(100%, 620px);
  margin-inline: auto;
  gap: 8px;
}

.puzzle-minihead {
  min-height: 52px;
  padding: 7px 9px;
  border: 3px solid var(--outline);
  border-radius: 13px 10px 15px 11px;
  display: grid;
  grid-template-columns: 43px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  color: var(--paper);
  background: #17223c;
  box-shadow: 3px 4px 0 rgba(3, 7, 17, 0.5);
}

.puzzle-minihead > span:nth-child(2) {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.puzzle-minihead strong {
  font-size: 0.74rem;
  font-weight: 1000;
}

.puzzle-minihead small {
  color: var(--muted);
  font-size: 0.59rem;
  font-weight: 800;
}

.puzzle-minihead > b {
  padding: 5px 7px;
  border: 2px solid var(--outline);
  border-radius: 8px;
  color: #20283d;
  font-size: 0.65rem;
  background: var(--yellow);
  box-shadow: 2px 2px 0 var(--outline);
}

.mini-cauldron {
  position: relative;
  width: 38px;
  height: 27px;
  border: 3px solid var(--outline);
  border-radius: 5px 5px 20px 20px;
  display: block;
  background: #59657a;
  box-shadow: inset -6px -4px 0 rgba(0, 0, 0, 0.16);
}

.mini-cauldron::before {
  position: absolute;
  top: -7px;
  right: -4px;
  left: -4px;
  height: 10px;
  border: 3px solid var(--outline);
  border-radius: 50%;
  content: "";
  background: linear-gradient(90deg, var(--green), var(--slime), var(--pink));
}

.mini-cauldron i,
.mini-cauldron b {
  position: absolute;
  bottom: -7px;
  width: 6px;
  height: 8px;
  border: 2px solid var(--outline);
  border-top: 0;
  content: "";
  background: #59657a;
}

.mini-cauldron i { left: 5px; }
.mini-cauldron b { right: 5px; }

.mini-weapon {
  position: relative;
  width: 40px;
  height: 40px;
  display: block;
  rotate: 42deg;
}

.mini-weapon i {
  position: absolute;
  top: 1px;
  left: 15px;
  width: 11px;
  height: 29px;
  border: 3px solid var(--outline);
  background: #c9d4df;
  clip-path: polygon(50% 0, 100% 20%, 85% 100%, 15% 100%, 0 20%);
}

.mini-weapon b {
  position: absolute;
  bottom: 4px;
  left: 5px;
  width: 31px;
  height: 8px;
  border: 3px solid var(--outline);
  background: var(--yellow);
}

.puzzle-legend {
  display: grid;
  gap: 5px;
  color: #20283d;
  font-size: 0.58rem;
  font-weight: 1000;
  text-align: center;
  text-transform: uppercase;
}

.potion-legend { grid-template-columns: repeat(3, 1fr); }
.rune-legend { grid-template-columns: repeat(2, 1fr); }

.puzzle-legend span {
  padding: 5px 3px;
  border: 2px solid var(--outline);
  border-radius: 8px 6px 9px 7px;
  display: grid;
  gap: 1px;
  box-shadow: 2px 2px 0 var(--outline);
}

.puzzle-legend strong {
  font: inherit;
}

.puzzle-legend small {
  font-size: 0.48rem;
  font-weight: 900;
  line-height: 1;
  text-transform: none;
}

.legend-perfect { background: #8edea1; }
.legend-hit { background: #f3d66d; }
.legend-miss { color: var(--paper); background: #586176; }

.puzzle-feedback-strip {
  min-height: 47px;
  padding: 4px 9px;
  border: 2px solid #44516d;
  border-radius: 11px 8px 12px 9px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  color: var(--paper);
  background: rgba(10, 17, 34, 0.48);
}

.puzzle-feedback-strip img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  object-position: bottom;
  filter: drop-shadow(2px 3px 0 rgba(3, 7, 17, 0.35));
}

.puzzle-feedback-strip span {
  display: grid;
  gap: 2px;
}

.puzzle-feedback-strip strong {
  font-size: 0.71rem;
  font-weight: 1000;
}

.puzzle-feedback-strip small {
  color: var(--muted);
  font-size: 0.58rem;
  font-weight: 800;
}

.puzzle-attempts {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 5px;
  list-style: none;
}

.puzzle-row {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: stretch;
  gap: 5px;
}

.row-number {
  border: 2px solid #44516d;
  border-radius: 7px 5px 8px 6px;
  display: grid;
  place-items: center;
  color: #8c98b5;
  font-size: 0.56rem;
  font-weight: 1000;
  background: #172139;
}

.puzzle-row.is-current .row-number {
  color: #20283d;
  border-color: var(--outline);
  background: var(--slime);
}

.tile-row {
  display: grid;
  gap: 5px;
}

.potion-attempts .tile-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rune-attempts .tile-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.puzzle-tile {
  position: relative;
  min-width: 0;
  min-height: 62px;
  padding: 4px 3px;
  border: 3px solid var(--outline);
  border-radius: 10px 7px 11px 8px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 1px;
  color: var(--paper);
  text-align: center;
  background: #293653;
  box-shadow: 2px 3px 0 rgba(3, 7, 17, 0.52);
}

button.puzzle-tile { cursor: pointer; }

.puzzle-tile b {
  max-width: 100%;
  overflow: hidden;
  font-size: 0.62rem;
  font-weight: 1000;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.puzzle-tile em {
  font-size: 0.49rem;
  font-style: normal;
  font-weight: 1000;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.puzzle-tile.is-future {
  min-height: 43px;
  border-color: #47536d;
  color: #68758f;
  background: #1a253e;
  box-shadow: none;
}

.puzzle-tile.is-current {
  border-color: #667491;
  background: #25324e;
}

.puzzle-tile.is-active,
.puzzle-tile.is-draft {
  border-color: var(--yellow);
  box-shadow: 0 0 0 2px var(--outline), 0 0 14px rgba(244, 207, 79, 0.42);
}

.puzzle-tile.is-perfect,
.puzzle-tile.is-hit,
.puzzle-tile.is-locked {
  color: #172139;
  background: #81d99a;
}

.potion-tile.is-hit {
  color: #3b2b08;
  background: #f0d068;
}

.puzzle-tile.is-miss {
  color: var(--paper);
  background: #555e70;
  filter: grayscale(0.45);
}

.puzzle-tile.is-result {
  animation: puzzle-tile-flip 420ms ease both;
}

.puzzle-tile.is-result:nth-child(2) { animation-delay: 80ms; }
.puzzle-tile.is-result:nth-child(3) { animation-delay: 160ms; }

.tile-swatch,
.ingredient-dot {
  width: 23px;
  height: 23px;
  border: 2px solid var(--outline);
  border-radius: 50%;
  display: block;
  background: var(--swatch);
  box-shadow: inset 4px -3px 0 rgba(0, 0, 0, 0.12);
}

.tile-empty {
  color: #8793ad;
  font-size: 1.1rem;
  font-style: normal;
  font-weight: 1000;
}

.puzzle-keyboard {
  gap: 6px;
}

.word-puzzle .potion-palette {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.word-puzzle .potion-ingredient {
  min-height: 51px;
  padding: 4px 2px;
  border-width: 3px;
  border-radius: 10px 7px 11px 8px;
  display: grid;
  grid-template-columns: auto minmax(0, auto);
  align-content: center;
  gap: 4px;
}

.word-puzzle .potion-ingredient em {
  grid-column: 1 / -1;
}

.word-puzzle .potion-ingredient.is-miss::after {
  display: none;
}

.word-puzzle .potion-submit,
.word-puzzle .rune-submit {
  min-height: 47px;
}

.rune-lock-strip {
  min-height: 62px;
  padding: 5px 8px;
  border: 3px solid var(--outline);
  border-radius: 13px 10px 15px 11px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  color: var(--paper);
  background: #19243e;
}

.rune-lock-strip .weapon-sockets {
  position: static;
  z-index: auto;
  width: auto;
  display: flex;
  gap: 5px;
}

.rune-lock-strip .weapon-socket {
  width: 50px;
  min-height: 50px;
  padding: 3px;
  border-width: 3px;
  border-radius: 11px 8px 12px 9px;
  align-content: center;
  gap: 1px;
}

.rune-lock-strip .weapon-socket b {
  color: var(--paper);
  font-size: 0.48rem;
}

.rune-lock-strip > span:last-child {
  display: grid;
  gap: 2px;
}

.rune-lock-strip > span:last-child strong {
  font-size: 0.72rem;
}

.rune-lock-strip > span:last-child small {
  color: var(--muted);
  font-size: 0.57rem;
  font-weight: 800;
}

.rune-tile.is-draft {
  color: var(--paper);
  background: #493d70;
}

.rune-tile.is-locked-note {
  color: #172139;
  background: #a8dab4;
}

.word-puzzle .rune-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
}

.word-puzzle .rune-choice {
  min-height: 65px;
  padding: 3px 2px;
  border-width: 3px;
  border-radius: 10px 7px 11px 8px;
  gap: 1px;
}

.word-puzzle .rune-choice .rune-stone {
  width: 38px;
  height: 35px;
  margin: 0;
  border-width: 3px;
  scale: 1;
}

.word-puzzle .rune-choice .choice-label {
  font-size: 0.54rem;
}

.word-puzzle .rune-choice em {
  font-size: 0.45rem;
}

.word-puzzle .rune-choice.is-miss::after {
  inset-block: 8%;
}

/* Daily Rune: the weapon carries progress; the two groups stay independent. */
.game-view-rune .choice-panel {
  padding: clamp(15px, 2.4vw, 24px);
}

.rune-forge {
  width: 100%;
  max-width: 780px;
  margin-inline: auto;
  display: grid;
  gap: 17px;
}

.rune-forge-workspace {
  display: grid;
  grid-template-columns: minmax(104px, 0.82fr) minmax(230px, 1.65fr) minmax(104px, 0.82fr);
  align-items: stretch;
  gap: 13px;
}

.rune-weapon-stage {
  position: relative;
  min-width: 0;
  min-height: 382px;
  border: 4px solid var(--outline);
  border-radius: 24px 18px 27px 20px;
  overflow: hidden;
  isolation: isolate;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 52%, rgba(244, 207, 79, 0.18), transparent 31%),
    radial-gradient(circle at 50% 104%, rgba(244, 154, 58, 0.28), transparent 46%),
    linear-gradient(145deg, #34415d, #121b30 72%);
  box-shadow: inset 4px 4px 0 rgba(255, 255, 255, 0.05), 5px 7px 0 rgba(3, 7, 17, 0.44);
}

.rune-weapon-stage::before,
.rune-weapon-stage::after {
  position: absolute;
  z-index: -1;
  content: "";
}

.rune-weapon-stage::before {
  inset: 14px;
  border: 2px dashed rgba(118, 139, 181, 0.35);
  border-radius: 18px 14px 20px 15px;
}

.rune-weapon-stage::after {
  bottom: -27px;
  left: 50%;
  width: 72%;
  height: 76px;
  border: 4px solid var(--outline);
  border-radius: 50%;
  background: #10182a;
  translate: -50% 0;
  box-shadow: 0 -8px 24px rgba(244, 154, 58, 0.18);
}

.rune-weapon-label {
  position: absolute;
  z-index: 6;
  top: 14px;
  left: 15px;
  margin: 0;
  padding: 7px 10px;
  border: 3px solid var(--outline);
  border-radius: 11px 8px 12px 9px;
  display: grid;
  gap: 1px;
  color: #20283d;
  background: var(--yellow);
  box-shadow: 3px 4px 0 var(--outline);
  rotate: -1deg;
}

.rune-weapon-label span {
  font-size: 0.48rem;
  font-weight: 1000;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.rune-weapon-label strong {
  font-family: "Trebuchet MS", "Arial Black", sans-serif;
  font-size: 0.88rem;
  line-height: 1;
}

.rune-forge-aura {
  position: absolute;
  z-index: 0;
  top: 50%;
  left: 50%;
  width: min(84%, 320px);
  aspect-ratio: 1;
  border-radius: 50%;
  translate: -50% -47%;
  background: radial-gradient(circle, rgba(244, 207, 79, 0.22), rgba(244, 154, 58, 0.1) 42%, transparent 70%);
  filter: blur(4px);
}

.rune-weapon-art {
  position: absolute;
  z-index: 1;
  inset: 28px 9px 4px;
  width: calc(100% - 18px);
  height: calc(100% - 32px);
  object-fit: contain;
  object-position: center;
  filter: drop-shadow(6px 8px 0 rgba(3, 7, 17, 0.42));
  user-select: none;
}

.rune-weapon-sockets {
  position: absolute;
  z-index: 4;
  top: 56%;
  left: 50%;
  padding: 7px 8px;
  border: 4px solid var(--outline);
  border-radius: 17px 13px 18px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  translate: -50% -50%;
  background: linear-gradient(180deg, #b97b31, #6f431f);
  box-shadow: inset 0 3px 0 rgba(255, 231, 151, 0.32), 4px 5px 0 rgba(3, 7, 17, 0.5);
}

.rune-weapon-socket {
  position: relative;
  width: 47px;
  height: 47px;
  border: 4px solid var(--outline);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #72809d;
  background:
    radial-gradient(circle at 40% 35%, rgba(255, 255, 255, 0.1), transparent 24%),
    #202b45;
  box-shadow: inset 0 0 0 3px #586781, 3px 4px 0 rgba(3, 7, 17, 0.48);
}

.rune-weapon-socket.socket-1.is-empty {
  border-color: #66def3;
}

.rune-weapon-socket.socket-2.is-empty {
  border-color: var(--yellow);
}

.rune-weapon-socket b {
  font-size: 0.68rem;
  font-weight: 1000;
}

.rune-weapon-socket .rune-glyph-socket {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 5px rgba(102, 222, 243, 0.6));
}

.rune-weapon-socket.is-selected {
  border-color: var(--yellow);
  background: #44375f;
  box-shadow: inset 0 0 0 3px #715a8e, 0 0 0 2px var(--outline), 0 0 18px rgba(244, 207, 79, 0.58);
}

.rune-weapon-socket.is-selected .rune-glyph-socket {
  filter: brightness(1.08) drop-shadow(0 0 8px rgba(102, 222, 243, 0.86));
}

.rune-weapon-socket.is-locked {
  color: #12223a;
  border-color: var(--outline);
  background: #67c981;
  box-shadow: inset 0 0 0 3px #b8efc1, 0 0 0 2px var(--outline), 0 0 24px rgba(102, 222, 243, 0.86);
  animation: rune-socket-glow 1.2s ease-in-out infinite alternate;
}

.rune-weapon-socket.is-locked .rune-glyph-socket {
  filter: brightness(1.16) saturate(1.08) drop-shadow(0 0 8px #66def3);
}

.rune-weapon-socket.is-locked::before,
.rune-weapon-socket.is-locked::after {
  position: absolute;
  color: var(--yellow);
  font-size: 0.74rem;
  content: "✦";
  filter: drop-shadow(0 0 5px rgba(244, 207, 79, 0.8));
}

.rune-weapon-socket.is-locked::before { top: -12px; left: -9px; }
.rune-weapon-socket.is-locked::after { right: -10px; bottom: -10px; scale: 0.74; }

.rune-weapon-socket.is-revealed {
  border-color: var(--yellow);
  background: #75512d;
  box-shadow: inset 0 0 0 3px #c68a43, 0 0 17px rgba(244, 207, 79, 0.48);
}

.rune-weapon-socket.is-revealed .rune-glyph-socket {
  filter: brightness(1.08) drop-shadow(0 0 8px rgba(244, 207, 79, 0.8));
}

.rune-group {
  position: relative;
  min-width: 0;
  align-self: stretch;
  margin: 0;
  padding: 11px 9px 10px;
  border: 3px solid var(--outline);
  border-radius: 17px 13px 19px 14px;
  color: var(--paper);
  background: #17223a;
  box-shadow: 4px 5px 0 rgba(3, 7, 17, 0.5);
}

.rune-group-left {
  border-color: #66def3;
}

.rune-group-right {
  border-color: var(--yellow);
  border-radius: 13px 18px 14px 20px;
}

.rune-group legend {
  max-width: calc(100% - 8px);
  padding: 0 6px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--paper);
}

.rune-group legend > span {
  width: 23px;
  height: 23px;
  border: 2px solid var(--outline);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #20283d;
  font-size: 0.57rem;
  font-weight: 1000;
  background: var(--yellow);
}

.rune-group-left legend > span {
  background: #66def3;
}

.rune-group legend strong {
  overflow: hidden;
  font-size: 0.7rem;
  font-weight: 1000;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rune-group legend em {
  width: 100%;
  margin-top: -2px;
  text-align: center;
  color: var(--slime);
  font-size: 0.52rem;
  font-style: normal;
  font-weight: 1000;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.rune-group-choices {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: repeat(4, minmax(82px, 1fr));
  gap: 7px;
}

.rune-group .rune-choice {
  min-height: 82px;
  padding: 4px 3px;
  border-width: 3px;
  border-radius: 13px 9px 15px 10px;
  gap: 2px;
  color: var(--paper);
  background: #2c3855;
  box-shadow: 3px 4px 0 rgba(3, 7, 17, 0.5);
}

.rune-group-arrow {
  position: absolute;
  z-index: 8;
  top: 50%;
  width: 31px;
  height: 27px;
  border: 3px solid var(--outline);
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #18233a;
  font-family: "Arial Black", sans-serif;
  font-size: 1rem;
  line-height: 1;
  background: var(--yellow);
  box-shadow: 2px 3px 0 rgba(3, 7, 17, 0.55);
  translate: 0 -50%;
}

.rune-group-left .rune-group-arrow {
  right: -29px;
  background: #66def3;
}

.rune-group-right .rune-group-arrow {
  left: -29px;
}

.rune-group .rune-choice .rune-stone {
  width: 46px;
  height: 46px;
  margin: 0;
  scale: 1;
}

.rune-group .rune-choice .rune-glyph-picker {
  width: 100%;
  height: 100%;
  filter: drop-shadow(2px 3px 0 rgba(3, 7, 17, 0.36));
}

.rune-group .rune-choice .choice-label {
  color: var(--paper);
  font-size: 0.55rem;
}

.rune-group .rune-choice em {
  min-height: 0.7rem;
  color: var(--yellow);
  font-size: 0.47rem;
}

.rune-group .rune-choice.is-selected {
  border-color: var(--outline);
  color: var(--paper);
  background: #55437f;
  box-shadow: 3px 4px 0 var(--outline), 0 0 0 3px var(--yellow), 0 0 16px rgba(244, 207, 79, 0.35);
  transform: translateY(-3px);
}

.rune-group .rune-choice.is-selected .rune-glyph-picker {
  filter: brightness(1.1) drop-shadow(0 0 7px rgba(102, 222, 243, 0.72));
}

.rune-group .rune-choice.is-locked {
  cursor: default;
  color: #172139;
  background: #4c9b66;
  box-shadow: 3px 4px 0 rgba(3, 7, 17, 0.55), 0 0 20px rgba(102, 222, 243, 0.56);
}

.rune-group .rune-choice.is-locked .rune-stone {
  background: transparent;
  box-shadow: none;
}

.rune-group .rune-choice.is-locked .rune-glyph-picker {
  filter: brightness(1.16) saturate(1.08) drop-shadow(0 0 8px rgba(102, 222, 243, 0.9));
}

.rune-group .rune-choice.is-locked .choice-label,
.rune-group .rune-choice.is-locked em {
  color: #f0fff3;
}

.rune-group .rune-choice.is-broken {
  cursor: default;
  color: #fff0e5;
  background: #873c42;
  box-shadow: 3px 4px 0 rgba(3, 7, 17, 0.55), inset 0 0 0 2px rgba(246, 125, 78, 0.46);
}

.rune-group .rune-choice.is-broken::before {
  position: absolute;
  z-index: 5;
  top: 3px;
  right: 5px;
  width: 21px;
  height: 21px;
  border: 2px solid var(--outline);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--paper);
  font-size: 0.82rem;
  font-weight: 1000;
  line-height: 1;
  content: "×";
  background: #e65f58;
  box-shadow: 1px 2px 0 var(--outline);
}

.rune-group .rune-choice.is-broken .rune-stone {
  rotate: 7deg;
  background: transparent;
  filter: none;
}

.rune-group .rune-choice.is-broken .rune-stone::before,
.rune-group .rune-choice.is-broken .rune-stone::after {
  position: absolute;
  z-index: 3;
  width: 4px;
  border-radius: 2px;
  content: "";
  background: var(--outline);
  transform-origin: top;
}

.rune-group .rune-choice.is-broken .rune-stone::before {
  top: -2px;
  left: 24px;
  height: 46px;
  rotate: 24deg;
  clip-path: polygon(0 0, 100% 0, 45% 27%, 100% 47%, 35% 67%, 100% 100%, 0 100%, 55% 69%, 0 49%, 60% 26%);
}

.rune-group .rune-choice.is-broken .rune-stone::after {
  top: 14px;
  left: 11px;
  height: 29px;
  rotate: -62deg;
  clip-path: polygon(0 0, 100% 0, 35% 38%, 100% 63%, 20% 100%, 0 100%, 65% 62%, 0 39%);
}

.rune-group .rune-choice.is-broken .rune-glyph-picker {
  filter: grayscale(0.78) sepia(0.18) brightness(0.58);
  opacity: 0.62;
}

.rune-group .rune-choice.is-revealed {
  cursor: default;
  background: #7b5732;
  box-shadow: 3px 4px 0 rgba(3, 7, 17, 0.55), 0 0 15px rgba(244, 207, 79, 0.4);
}

.rune-group .rune-choice.is-revealed .rune-glyph-picker {
  filter: brightness(1.08) drop-shadow(0 0 7px rgba(244, 207, 79, 0.66));
}

.rune-group.is-locked .rune-choice:not(.is-locked):not(.is-broken) {
  opacity: 0.42;
}

.rune-submit {
  width: min(330px, 100%);
  min-height: 54px;
  margin-inline: auto;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.rune-submit span {
  font-size: 1.1rem;
}

.rune-weapon-stage.is-sparking .rune-weapon-socket.is-locked {
  animation: rune-lock-pop 650ms cubic-bezier(0.2, 0.9, 0.2, 1.18) both, rune-socket-glow 1.2s 650ms ease-in-out infinite alternate;
}

.rune-weapon-stage.is-smashing {
  animation: rune-forge-shake 420ms ease both;
}

@keyframes rune-socket-glow {
  from { filter: brightness(0.94); }
  to { filter: brightness(1.18); }
}

@keyframes rune-lock-pop {
  0% { scale: 0.55; rotate: -12deg; }
  65% { scale: 1.18; rotate: 4deg; }
  100% { scale: 1; rotate: 0deg; }
}

@keyframes rune-forge-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px) rotate(-0.4deg); }
  55% { transform: translateX(5px) rotate(0.5deg); }
  78% { transform: translateX(-2px); }
}

@keyframes puzzle-tile-flip {
  0% { opacity: 0.4; transform: rotateX(82deg) scale(0.94); }
  60% { transform: rotateX(-7deg) scale(1.03); }
  100% { opacity: 1; transform: rotateX(0) scale(1); }
}

.creature-art {
  position: relative;
  width: min(100%, 104px);
  height: 96px;
  display: block;
}

.creature-art::before {
  position: absolute;
  inset: 11px 8px 0;
  border: 4px solid var(--outline);
  border-radius: 50% 50% 38% 42%;
  content: "";
  background: var(--green);
  box-shadow: inset -10px -7px 0 rgba(0, 0, 0, 0.12), 3px 4px 0 rgba(3, 7, 17, 0.34);
}

.creature-art::after {
  position: absolute;
  top: 32px;
  left: 28px;
  width: 7px;
  height: 8px;
  border-radius: 50%;
  content: "";
  background: var(--outline);
  box-shadow: 21px 0 0 var(--outline);
}

.creature-art i,
.creature-art b {
  position: absolute;
  z-index: 3;
  display: block;
}

.creature-slime::before {
  top: 22px;
  border-radius: 56% 44% 20% 20%;
  background: #62d982;
}

.creature-bat::before {
  inset: 19px 24px 5px;
  background: #8a73bd;
}

.creature-bat i,
.creature-bat b {
  top: 22px;
  width: 31px;
  height: 36px;
  border: 4px solid var(--outline);
  background: #8a73bd;
  clip-path: polygon(100% 0, 100% 100%, 0 66%, 28% 39%, 0 8%);
}

.creature-bat i {
  left: 2px;
}

.creature-bat b {
  right: 2px;
  scale: -1 1;
}

.creature-bat::after {
  top: 34px;
}

.creature-skeleton::before {
  inset: 5px 16px 12px;
  border-radius: 48% 52% 42% 44%;
  background: #e6e1cf;
}

.creature-skeleton::after {
  top: 28px;
  left: 28px;
  box-shadow: 21px 0 0 var(--outline), 10px 18px 0 -2px var(--outline);
}

.creature-goblin::before {
  background: #81b85b;
}

.creature-goblin i,
.creature-goblin b {
  top: 20px;
  width: 24px;
  height: 21px;
  border: 4px solid var(--outline);
  background: #81b85b;
  clip-path: polygon(0 50%, 100% 0, 100% 100%);
}

.creature-goblin i {
  left: 1px;
}

.creature-goblin b {
  right: 1px;
  scale: -1 1;
}

.creature-mushroom::before {
  inset: 33px 26px 2px;
  border-radius: 8px 8px 18px 18px;
  background: #e5d6bd;
}

.creature-mushroom i {
  top: 5px;
  left: 7px;
  width: 69px;
  height: 39px;
  border: 4px solid var(--outline);
  border-radius: 52% 48% 16px 16px;
  background: var(--orange);
  box-shadow: inset -10px -7px 0 rgba(0, 0, 0, 0.11);
}

.creature-mushroom::after {
  top: 45px;
  left: 33px;
  box-shadow: 13px 0 0 var(--outline);
}

.creature-ghost::before {
  inset: 4px 14px 0;
  border-radius: 50% 50% 8px 8px;
  background: #d9e4ef;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 81% 83%, 65% 100%, 48% 82%, 29% 100%, 14% 82%, 0 100%);
}

.creature-ghost::after {
  top: 29px;
  left: 28px;
  box-shadow: 21px 0 0 var(--outline);
}

.creature-art.creature-image-art::before,
.creature-art.creature-image-art::after {
  display: none;
  content: none;
}

.creature-image-art img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: center;
}

@media (min-width: 761px) {
  .creature-image-art img {
    transform: scale(1.2);
  }
}

.treasure-pedestal {
  position: relative;
  width: min(100%, 108px);
  height: 100px;
  display: grid;
  place-items: center;
}

.treasure-image-art img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: center;
}

@media (min-width: 761px) {
  .treasure-image-art img {
    transform: scale(1.2);
  }
}

.treasure-pedestal > b {
  position: absolute;
  right: 7px;
  bottom: 0;
  left: 7px;
  height: 21px;
  border: 4px solid var(--outline);
  border-radius: 50%;
  background: #8c765f;
  box-shadow: 2px 4px 0 rgba(3, 7, 17, 0.36);
}

.treasure-art {
  position: relative;
  z-index: 2;
  display: block;
  filter: drop-shadow(3px 4px 0 rgba(3, 7, 17, 0.38));
}

.treasure-sword {
  width: 17px;
  height: 58px;
  border: 4px solid var(--outline);
  background: #d5dbe3;
  clip-path: polygon(50% 0, 100% 18%, 100% 73%, 50% 100%, 0 73%, 0 18%);
  rotate: 10deg;
}

.treasure-sword::after {
  position: absolute;
  right: -14px;
  bottom: 10px;
  left: -14px;
  height: 8px;
  border: 3px solid var(--outline);
  content: "";
  background: var(--yellow);
}

.treasure-potion {
  width: 45px;
  height: 48px;
  margin-top: 8px;
  border: 4px solid var(--outline);
  border-radius: 14px 14px 18px 18px;
  background: linear-gradient(transparent 28%, var(--pink) 29%);
}

.treasure-potion::before {
  position: absolute;
  top: -13px;
  left: 9px;
  width: 18px;
  height: 14px;
  border: 4px solid var(--outline);
  background: #d7d1a4;
  content: "";
}

.treasure-crown {
  width: 61px;
  height: 48px;
  margin-top: 9px;
  border: 4px solid var(--outline);
  background: var(--yellow);
  clip-path: polygon(0 8%, 25% 44%, 50% 0, 75% 44%, 100% 8%, 88% 100%, 12% 100%);
}

.treasure-gem {
  width: 50px;
  height: 54px;
  margin-top: 4px;
  border: 4px solid var(--outline);
  background: var(--slime);
  clip-path: polygon(50% 0, 95% 31%, 75% 100%, 25% 100%, 5% 31%);
}

.treasure-key {
  width: 20px;
  height: 59px;
  border: 5px solid var(--outline);
  border-radius: 50% 50% 4px 4px;
  background: var(--yellow);
  rotate: 18deg;
}

.treasure-key::after {
  position: absolute;
  right: -12px;
  bottom: 5px;
  width: 16px;
  height: 8px;
  border: 4px solid var(--outline);
  content: "";
  background: var(--yellow);
}

.treasure-coin {
  width: 53px;
  height: 53px;
  margin-top: 5px;
  border: 6px double var(--outline);
  border-radius: 50%;
  background: var(--yellow);
}

.treasure-coin::after {
  display: block;
  margin-top: 7px;
  color: #8b5b05;
  font-size: 1.15rem;
  font-style: normal;
  font-weight: 1000;
  text-align: center;
  content: "J";
}

.choice-door {
  min-height: 185px;
  padding-inline: 5px;
}

.choice-door:is(.is-open, .is-wrong, .is-correct, .is-answer-reveal) {
  min-height: 220px;
  padding-block: 10px;
}

/* Door reveals are rewards, so an opened wrong door stays vivid and readable. */
.choice-door.is-wrong {
  color: var(--white);
  background: #9b3344;
  filter: none;
  text-decoration: none;
  box-shadow:
    4px 6px 0 rgba(3, 7, 17, 0.63),
    0 0 0 3px rgba(255, 111, 121, 0.44),
    0 0 24px rgba(212, 55, 75, 0.4);
}

.choice-door.is-wrong .choice-mark {
  color: var(--white);
  background: #e94f61;
}

.door-stage {
  position: relative;
  isolation: isolate;
  width: 98px;
  height: 132px;
  display: grid;
  place-items: end center;
  perspective: 420px;
}

.door-reveal {
  position: absolute;
  inset: 7px 9px 5px;
  border: 5px solid var(--outline);
  border-radius: 26px 26px 7px 7px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #2e1d39;
  opacity: 0;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.54);
  transition: opacity 120ms ease;
}

.door-reveal::before {
  width: 12px;
  height: 14px;
  border-radius: 50%;
  content: "";
  background: var(--pink);
  box-shadow: 25px 0 0 var(--pink), 12px 27px 0 7px rgba(102, 222, 243, 0.22);
  translate: -12px -4px;
}

.door-reveal i,
.door-reveal b {
  position: absolute;
  bottom: 12px;
  width: 17px;
  height: 17px;
  border: 3px solid var(--outline);
  border-radius: 50%;
  background: var(--yellow);
}

.door-reveal i {
  left: 15px;
}

.door-reveal b {
  right: 15px;
}

.door-reveal > img,
.door-reveal-image {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  transform: scale(1.005);
}

.door-art,
.door-frame-art {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.door-art {
  z-index: 4;
  filter: drop-shadow(4px 5px 0 rgba(3, 7, 17, 0.42));
  transform-origin: 18% 52%;
  backface-visibility: hidden;
}

.door-frame-art {
  z-index: 3;
  opacity: 0;
  filter: drop-shadow(3px 4px 0 rgba(3, 7, 17, 0.4));
}

.door-art img,
.door-frame-art img,
.door-closed-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: center bottom;
  user-select: none;
}

.choice-door:is(.is-open, .is-wrong, .is-correct, .is-answer-reveal) .door-stage {
  width: min(100%, 126px);
  height: auto;
  aspect-ratio: 1122 / 1402;
}

.choice-door:is(.is-open, .is-wrong, .is-correct, .is-answer-reveal) .door-reveal {
  inset: 7px 8px 5px;
  border-radius: 18px 15px 8px 10px;
  opacity: 1;
  box-shadow:
    inset 0 0 20px rgba(0, 0, 0, 0.26),
    3px 4px 0 rgba(3, 7, 17, 0.34);
}

.choice-door.is-open .door-reveal,
.choice-door.is-wrong .door-reveal,
.choice-door.is-correct .door-reveal,
.choice-door.is-answer-reveal .door-reveal {
  opacity: 1;
}

.choice-door.is-correct .door-reveal,
.choice-door.is-answer-reveal .door-reveal {
  background: #8d6815;
}

.choice-door.is-correct .door-reveal::before,
.choice-door.is-answer-reveal .door-reveal::before {
  width: auto;
  height: auto;
  color: var(--yellow);
  font-size: 2.2rem;
  font-weight: 1000;
  line-height: 1;
  content: "★";
  background: transparent;
  box-shadow: none;
  text-shadow: 3px 3px 0 var(--outline);
  translate: 0 -7px;
}

.choice-door:is(.is-open, .is-wrong, .is-correct, .is-answer-reveal) .door-frame-art {
  opacity: 1;
  -webkit-mask:
    linear-gradient(#000 0 0) top / 100% 19% no-repeat,
    linear-gradient(#000 0 0) bottom / 100% 14% no-repeat,
    linear-gradient(#000 0 0) left / 19% 100% no-repeat,
    linear-gradient(#000 0 0) right / 19% 100% no-repeat;
  mask:
    linear-gradient(#000 0 0) top / 100% 19% no-repeat,
    linear-gradient(#000 0 0) bottom / 100% 14% no-repeat,
    linear-gradient(#000 0 0) left / 19% 100% no-repeat,
    linear-gradient(#000 0 0) right / 19% 100% no-repeat;
}

/* Tiny keeps its storybook proportions when opened instead of growing into a tall door. */
.door-stage-tiny .door-art {
  transform-origin: 26% 70%;
}

.choice-door:is(.is-open, .is-wrong, .is-correct, .is-answer-reveal) .door-stage-tiny .door-reveal {
  inset: 49% 22% 8% 27%;
  border-width: 4px;
  border-radius: 22px 22px 7px 7px;
}

.choice-door:is(.is-open, .is-wrong, .is-correct, .is-answer-reveal) .door-stage-tiny .door-frame-art {
  -webkit-mask:
    linear-gradient(#000 0 0) left 2% top 40% / 96% 20% no-repeat,
    linear-gradient(#000 0 0) left 2% bottom 2% / 96% 12% no-repeat,
    linear-gradient(#000 0 0) left 2% top 52% / 25% 46% no-repeat,
    linear-gradient(#000 0 0) right 2% top 52% / 25% 46% no-repeat;
  mask:
    linear-gradient(#000 0 0) left 2% top 40% / 96% 20% no-repeat,
    linear-gradient(#000 0 0) left 2% bottom 2% / 96% 12% no-repeat,
    linear-gradient(#000 0 0) left 2% top 52% / 25% 46% no-repeat,
    linear-gradient(#000 0 0) right 2% top 52% / 25% 46% no-repeat;
}

.choice-door:is(.is-open, .is-wrong, .is-correct, .is-answer-reveal) .door-art {
  opacity: 0.92;
  transform: translateX(-7%) perspective(900px) rotateY(-67deg);
}

.choice-door.just-wrong .door-art {
  animation: door-open 900ms ease both;
}

.choice-door.just-correct .door-art {
  animation: door-open-correct 620ms ease forwards;
}

.choice-door.just-wrong .door-reveal,
.choice-door.just-correct .door-reveal {
  animation: door-reveal-in 460ms 120ms ease-out both;
}

.door-state-label {
  position: relative;
  z-index: 4;
  margin-top: -4px;
  padding: 3px 8px 2px;
  border: 2px solid var(--outline);
  border-radius: 999px;
  color: var(--outline);
  font-size: 0.56rem;
  font-weight: 1000;
  line-height: 1.2;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: #d7dce7;
  box-shadow: 2px 2px 0 var(--outline);
}

.choice-door.is-wrong .door-state-label {
  color: var(--white);
  background: #e94f61;
}

.choice-door:is(.is-correct, .is-answer-reveal) .door-state-label {
  background: var(--yellow);
}

.results-view {
  position: relative;
  min-height: 690px;
  padding: 25px 0;
  display: grid;
  place-items: center;
}

.results-card {
  position: relative;
  z-index: 3;
  width: min(850px, 100%);
  padding: clamp(25px, 5vw, 52px);
  border: 6px solid var(--outline);
  border-radius: 30px 23px 34px 25px;
  color: #242b3e;
  background: var(--paper);
  box-shadow: 12px 15px 0 rgba(3, 7, 17, 0.6);
  rotate: -0.35deg;
}

.results-view.is-perfect .results-card {
  box-shadow: 12px 15px 0 rgba(3, 7, 17, 0.6), 0 0 44px rgba(244, 207, 79, 0.54);
  animation: perfect-glow 1.8s ease-in-out infinite alternate;
}

.results-heading {
  text-align: center;
}

.results-heading .eyebrow {
  color: #307c97;
}

.results-heading h1 {
  margin: 0;
  color: #1c2438;
  font-size: clamp(2.5rem, 7vw, 5.3rem);
  line-height: 0.9;
  letter-spacing: -0.075em;
}

.results-view.is-perfect .results-heading h1 {
  color: #6f4800;
  text-shadow: 3px 3px 0 #f2c949;
}

.results-heading > p:last-child {
  margin: 13px 0 0;
  color: #656a77;
  font-weight: 800;
}

.results-content {
  margin-top: 28px;
  display: grid;
  grid-template-columns: minmax(210px, 0.8fr) minmax(300px, 1.2fr);
  align-items: center;
  gap: 27px;
}

.results-jelly {
  position: relative;
  min-height: 315px;
  display: grid;
  place-items: end center;
}

.results-jelly span {
  position: absolute;
  inset: 12% 0 0;
  border: 5px solid var(--outline);
  border-radius: 50% 50% 46% 54% / 58% 43% 57% 42%;
  background: var(--purple);
  box-shadow: 7px 8px 0 rgba(3, 7, 17, 0.28);
  rotate: 3deg;
}

.is-perfect .results-jelly span {
  background: var(--yellow);
}

.results-jelly img {
  position: relative;
  z-index: 2;
  width: min(100%, 290px);
  filter: drop-shadow(0 12px 0 rgba(3, 7, 17, 0.23));
}

.score-sheet {
  padding: 17px;
  border: 4px solid var(--outline);
  border-radius: 18px 14px 21px 15px;
  background: #ebe1ba;
  box-shadow: 5px 6px 0 var(--outline);
  rotate: 0.8deg;
}

.score-sheet ol {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
  list-style: none;
}

.score-sheet li {
  min-height: 39px;
  padding: 7px 9px;
  border-bottom: 2px dashed rgba(44, 49, 62, 0.28);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #3f4453;
  font-size: 0.83rem;
  font-weight: 1000;
}

.blue-star-panel {
  position: relative;
  margin-top: 12px;
  padding: 8px 7px 9px;
  border: 3px solid rgba(47, 109, 151, 0.42);
  border-radius: 13px 10px 15px 11px;
  background: rgba(194, 220, 226, 0.52);
}

.blue-star-panel h2 {
  margin: 0 0 5px;
  color: #2a6f91;
  font-size: 0.58rem;
  font-weight: 1000;
  letter-spacing: 0.1em;
  text-align: center;
  text-transform: uppercase;
}

.blue-star-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 5px;
}

.blue-star-achievement {
  min-width: 0;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 3px;
  color: #536676;
  text-align: center;
}

.blue-star-icon {
  position: relative;
  width: 38px;
  height: 35px;
  display: grid;
  place-items: center;
}

.blue-star-outline,
.blue-star-fill {
  grid-area: 1 / 1;
  font-size: 2rem;
  line-height: 1;
}

.blue-star-outline {
  color: #536676;
  text-shadow: 1px 2px 0 rgba(5, 8, 22, 0.26);
}

.blue-star-fill {
  color: #0f78ba;
  opacity: 0;
  filter: drop-shadow(1px 2px 0 #153d60) drop-shadow(0 0 7px rgba(38, 177, 244, 0.64));
  transform: scale(0.76);
}

.blue-star-achievement.is-earned .blue-star-outline {
  opacity: 0;
}

.blue-star-achievement.is-earned .blue-star-fill {
  opacity: 1;
  transform: scale(1);
}

.blue-star-icon::after {
  content: "✦";
  position: absolute;
  top: -5px;
  right: -5px;
  color: #42c7ff;
  font-size: 0.8rem;
  opacity: 0;
  text-shadow: -18px 15px 0 #83dcff, -2px 25px 0 #279bd7;
  transform: scale(0.45) rotate(-18deg);
}

.blue-star-label {
  min-height: 2.1em;
  display: grid;
  place-items: start center;
  color: #52606f;
  font-size: 0.6rem;
  font-weight: 1000;
  line-height: 1.05;
  text-wrap: balance;
}

.blue-star-achievement.is-earned .blue-star-label {
  color: #174f73;
}

.results-view.is-blue-star-reveal .blue-star-achievement {
  animation: blue-star-slot-reveal 220ms ease var(--blue-star-delay) both;
}

.results-view.is-blue-star-reveal .blue-star-achievement.is-earned .blue-star-fill {
  animation: blue-star-earned-pop 540ms cubic-bezier(0.18, 0.88, 0.24, 1.28) var(--blue-star-delay) both;
}

.results-view.is-blue-star-reveal .blue-star-achievement.is-earned .blue-star-outline {
  animation: blue-star-outline-yield 300ms ease var(--blue-star-delay) both;
}

.results-view.is-blue-star-reveal .blue-star-achievement.is-earned .blue-star-icon::after {
  animation: blue-star-spark 520ms ease calc(var(--blue-star-delay) + 90ms) both;
}

.results-view.is-blue-star-reveal .blue-star-panel.is-all-earned {
  animation: blue-star-row-celebrate 620ms ease 1.95s both;
}

.results-view.is-blue-star-reveal .total-score {
  animation: blue-star-total-finish 460ms ease 2.08s both;
}

@keyframes blue-star-slot-reveal {
  0% { opacity: 0.68; transform: translateY(2px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes blue-star-earned-pop {
  0% { color: #536676; opacity: 0; transform: scale(0.72) rotate(-8deg); }
  58% { color: #28adf2; opacity: 1; transform: scale(1.24) rotate(5deg); }
  100% { color: #0f78ba; opacity: 1; transform: scale(1) rotate(0deg); }
}

@keyframes blue-star-outline-yield {
  0% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.18); }
}

@keyframes blue-star-spark {
  0%, 100% { opacity: 0; transform: scale(0.45) rotate(-18deg); }
  45% { opacity: 1; transform: scale(1.15) rotate(7deg); }
}

@keyframes blue-star-row-celebrate {
  0%, 100% { border-color: rgba(47, 109, 151, 0.42); box-shadow: none; transform: scale(1); }
  50% { border-color: #2eacef; box-shadow: 0 0 18px rgba(46, 172, 239, 0.5); transform: scale(1.025); }
}

@keyframes blue-star-total-finish {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.035) rotate(-0.5deg); box-shadow: 4px 6px 0 var(--outline), 0 0 14px rgba(244, 207, 79, 0.62); }
}

.total-score {
  margin-top: 14px;
  padding: 13px 14px;
  border: 4px solid var(--outline);
  border-radius: 13px 10px 15px 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  background: var(--yellow);
  box-shadow: 3px 4px 0 var(--outline);
}

.total-score span {
  font-size: 0.7rem;
  font-weight: 1000;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.total-score strong {
  font-size: 2rem;
  line-height: 1;
}

.total-score small {
  font-size: 0.8rem;
}

.results-actions {
  margin-top: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.share-button {
  min-width: 190px;
  background: var(--slime);
}

.results-actions .text-button {
  color: #32394b;
  background: #ded3ad;
}

.spoiler-note {
  margin: 16px 0 0;
  color: #71737c;
  font-size: 0.7rem;
  font-weight: 800;
  text-align: center;
}

.copy-fallback {
  margin-top: 22px;
  padding: 17px;
  border: 4px solid var(--outline);
  border-radius: 15px 11px 17px 12px;
  background: #e8ddb5;
  box-shadow: 4px 5px 0 var(--outline);
}

.copy-fallback h2 {
  margin: 0;
  color: #202739;
  font-size: 1.35rem;
  letter-spacing: -0.04em;
}

.copy-fallback > p:not(.feedback-kicker) {
  margin: 7px 0 11px;
  color: #606576;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.45;
}

.copy-fallback textarea {
  width: 100%;
  min-height: 245px;
  padding: 12px;
  border: 3px solid var(--outline);
  border-radius: 10px;
  resize: vertical;
  color: #202739;
  font: 800 0.82rem/1.5 ui-monospace, "Cascadia Mono", Consolas, monospace;
  background: #fff9df;
  box-shadow: inset 3px 3px 0 rgba(5, 8, 22, 0.1);
}

.copy-fallback > div {
  margin-top: 11px;
  display: flex;
  gap: 10px;
}

.copy-fallback .chunky-button,
.copy-fallback .text-button {
  flex: 1;
}

.confetti {
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  pointer-events: none;
}

.confetti i {
  --tone: var(--slime);
  position: absolute;
  top: -30px;
  left: var(--confetti-left);
  width: 12px;
  height: 20px;
  border: 2px solid var(--outline);
  background: var(--tone);
  animation: confetti-drop 3.4s linear infinite;
  animation-delay: var(--confetti-delay);
  rotate: calc(var(--confetti-index) * 17deg);
}

.confetti i:nth-child(3n) {
  --tone: var(--yellow);
  border-radius: 50%;
}

.confetti i:nth-child(3n + 1) {
  --tone: var(--pink);
}

.dev-panel {
  margin: 34px 18px 0;
  padding: 16px 18px;
  border: 3px dashed #65708a;
  border-radius: 15px;
  color: var(--muted);
  background: rgba(12, 18, 36, 0.84);
}

.dev-panel summary {
  min-height: 32px;
  cursor: pointer;
  color: var(--slime);
  font-size: 0.75rem;
  font-weight: 1000;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.dev-grid {
  padding-top: 15px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.dev-group {
  min-width: 0;
  padding: 13px;
  border: 2px solid #38435f;
  border-radius: 11px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.dev-group > strong {
  color: var(--paper);
  font-size: 0.8rem;
}

.dev-group > span,
.dev-group label {
  font-size: 0.7rem;
  font-weight: 800;
}

.dev-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.dev-panel button,
.dev-panel select {
  min-height: 44px;
  padding: 7px 9px;
  border-width: 2px;
  color: var(--white);
  font-size: 0.68rem;
  background: #2a3654;
  box-shadow: 2px 3px 0 var(--outline);
}

.dev-panel label {
  display: grid;
  gap: 5px;
}

.answer-list {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
  list-style: none;
}

.answer-list li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.68rem;
}

.answer-list b {
  color: var(--yellow);
}

.site-footer {
  min-height: 102px;
  padding: 28px 32px max(28px, env(safe-area-inset-bottom));
  border: 5px solid var(--outline);
  border-bottom: 0;
  border-radius: 25px 25px 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: #30384d;
  background: var(--paper);
  box-shadow: 0 -8px 0 rgba(3, 7, 17, 0.35);
}

.site-footer a {
  font-weight: 1000;
}

.site-footer p {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 800;
  text-align: right;
}

.toast {
  position: fixed;
  z-index: 999;
  right: 18px;
  bottom: max(18px, env(safe-area-inset-bottom));
  max-width: min(330px, calc(100% - 36px));
  padding: 12px 15px;
  border: 3px solid var(--outline);
  border-radius: 13px 10px 15px 11px;
  color: #263048;
  font-size: 0.8rem;
  font-weight: 1000;
  background: var(--slime);
  box-shadow: 4px 5px 0 var(--outline);
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

button:focus-visible,
a:focus-visible,
select:focus-visible,
summary:focus-visible,
[tabindex="-1"]:focus-visible {
  outline: 4px solid var(--yellow);
  outline-offset: 4px;
}

@media (hover: hover) and (pointer: fine) {
  .game-card:hover:not(:disabled) {
    filter: brightness(1.08);
    transform: translateY(-7px) rotate(0deg);
    box-shadow: 8px 14px 0 rgba(3, 7, 17, 0.57), 0 0 24px color-mix(in srgb, var(--accent) 22%, transparent);
  }

  .choice:hover:not(:disabled) {
    filter: brightness(1.12);
    transform: translateY(-4px) rotate(0deg);
  }

  .potion-slot:hover:not(:disabled),
  .potion-ingredient:hover:not(:disabled),
  .rune-choice:hover:not(:disabled) {
    filter: brightness(1.12);
    transform: translateY(-4px);
  }

  .chunky-button:hover,
  .text-button:hover,
  .dev-panel button:hover {
    filter: brightness(1.09);
    transform: translateY(-2px);
  }

  .back-link:hover {
    transform: rotate(1deg) scale(1.025);
  }
}

@keyframes star-float {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-9px) scale(1.06); }
}

@keyframes star-pop {
  0% { opacity: 0; transform: scale(0.2) rotate(-35deg); }
  65% { opacity: 1; transform: scale(1.28) rotate(8deg); }
  100% { opacity: 1; transform: scale(1) rotate(0); }
}

@keyframes choice-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px) rotate(-2deg); }
  40% { transform: translateX(7px) rotate(2deg); }
  60% { transform: translateX(-5px) rotate(-1deg); }
  80% { transform: translateX(3px); }
}

@keyframes choice-correct {
  0% { transform: scale(1); }
  48% { transform: scale(1.12) rotate(2deg); }
  100% { transform: scale(1.02); }
}

@keyframes door-open {
  0% { opacity: 1; transform: perspective(300px) rotateY(0); }
  58% { opacity: 0.96; transform: translateX(-4%) perspective(900px) rotateY(-56deg); }
  100% { opacity: 0.92; transform: translateX(-7%) perspective(900px) rotateY(-67deg); }
}

@keyframes door-open-correct {
  0% { opacity: 1; transform: perspective(300px) rotateY(0); }
  100% { opacity: 0.92; transform: translateX(-7%) perspective(900px) rotateY(-67deg); }
}

@keyframes door-reveal-in {
  from { filter: brightness(0.65); transform: scale(0.96); }
  to { filter: brightness(1); transform: scale(1); }
}

@keyframes confetti-drop {
  0% { transform: translateY(-30px) rotate(0); opacity: 0; }
  8% { opacity: 1; }
  100% { transform: translateY(760px) rotate(540deg); opacity: 0.86; }
}

@keyframes perfect-glow {
  from { filter: brightness(1); }
  to { filter: brightness(1.06); }
}

@media (max-width: 980px) {
  .home-hero {
    grid-template-columns: minmax(0, 1fr) minmax(250px, 0.68fr);
  }

  .game-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .game-layout {
    grid-template-columns: minmax(0, 1.3fr) minmax(250px, 0.7fr);
  }

  .option-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .creature-grid,
  .treasure-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .door-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dev-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .site-header,
  #daily-six-app,
  .site-footer {
    width: min(100% - 22px, 1160px);
  }

  #daily-six-app {
    padding-top: 12px;
  }

  .home-hero {
    min-height: 0;
    padding: 24px 0 30px;
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-copy h1 {
    margin-inline: auto;
    font-size: clamp(3.35rem, 15vw, 5.4rem);
  }

  .hero-rule {
    margin-inline: auto;
  }

  .daily-progress {
    margin-inline: auto;
  }

  .hero-status {
    margin-inline: auto;
  }

  .hero-jelly {
    width: min(380px, 100%);
    min-height: 290px;
    margin: -8px auto 0;
  }

  .hero-jelly img {
    width: min(78%, 285px);
  }

  .jelly-speech {
    right: 0;
  }

  .game-board {
    padding: 25px 20px 28px;
  }

  .board-heading {
    align-items: start;
  }

  .board-heading > p {
    max-width: 190px;
  }

  .how-to-card {
    grid-template-columns: auto 1fr;
  }

  .star-key {
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, 1fr);
  }

  .game-heading {
    align-items: start;
  }

  .game-layout {
    grid-template-columns: 1fr;
  }

  .choice-panel {
    min-height: 0;
  }

  .reaction-panel {
    min-height: 0;
    grid-template-columns: minmax(150px, 0.8fr) minmax(0, 1.2fr);
    grid-template-rows: auto;
  }

  .reaction-art {
    min-height: 250px;
  }

  .reaction-copy {
    min-height: 250px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .results-content {
    grid-template-columns: minmax(180px, 0.7fr) minmax(280px, 1.3fr);
  }
}

@media (max-width: 560px) {
  .site-header {
    min-height: 70px;
  }

  .today-chip {
    padding: 7px 9px;
  }

  .today-chip span {
    display: none;
  }

  .today-chip strong {
    font-size: 0.69rem;
  }

  .back-link > span:last-child {
    display: none;
  }

  .home-hero {
    gap: 0;
  }

  .hero-copy h1 {
    font-size: clamp(3.25rem, 18vw, 4.8rem);
    text-shadow:
      -3px -3px 0 var(--outline),
      3px -3px 0 var(--outline),
      -3px 3px 0 var(--outline),
      3px 3px 0 var(--outline),
      6px 7px 0 #293653;
  }

  .hero-rule {
    margin-top: 26px;
    font-size: 1rem;
  }

  .daily-progress {
    padding: 10px 11px;
    gap: 9px;
    font-size: 0.72rem;
  }

  .daily-progress strong {
    font-size: 1.05rem;
  }

  .hero-jelly {
    min-height: 245px;
  }

  .jelly-speech {
    top: 1%;
    right: 2%;
    max-width: 124px;
    font-size: 0.65rem;
  }

  .game-board {
    padding: 22px 15px 25px;
    border-width: 4px;
    border-radius: 22px 17px 24px 18px;
  }

  .board-heading {
    display: block;
  }

  .board-heading > p {
    margin-top: 8px;
    text-align: left;
  }

  .game-card-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .game-card {
    min-height: 300px;
    rotate: 0deg;
  }

  .card-art {
    height: 145px;
  }

  .how-to-card {
    margin-inline: 6px;
    padding: 21px 18px;
    grid-template-columns: 1fr;
    text-align: center;
  }

  .how-to-stamp {
    margin-inline: auto;
  }

  .star-key {
    grid-template-columns: 1fr;
    width: min(180px, 100%);
    margin-inline: auto;
    text-align: left;
  }

  .game-nav {
    min-height: 52px;
  }

  .game-date {
    font-size: 0.64rem;
  }

  .game-heading {
    padding: 19px 2px 22px;
    display: grid;
    gap: 17px;
  }

  .failed-answer-reveal {
    width: calc(100% - 4px);
    margin: -6px auto 13px;
    padding: 8px 9px;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 8px;
    rotate: 0deg;
  }

  .failed-answer-stamp {
    width: 34px;
    height: 34px;
    font-size: 1.08rem;
  }

  .failed-answer-copy small,
  .failed-answer-note {
    font-size: 0.5rem;
  }

  .failed-answer-copy h2 {
    font-size: clamp(0.92rem, 4.5vw, 1.15rem);
  }

  .failed-answer-note {
    grid-column: 2;
    width: max-content;
    max-width: 100%;
    margin-top: -3px;
    padding: 3px 6px;
  }

  .game-heading h1 {
    font-size: clamp(2.65rem, 13vw, 4rem);
  }

  .guess-tracker {
    min-width: 0;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    rotate: 0deg;
  }

  .choice-panel {
    padding: 18px 13px;
    border-width: 4px;
  }

  .option-grid,
  .creature-grid,
  .treasure-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px;
  }

  .number-grid {
    gap: 7px;
  }

  .word-puzzle .potion-palette {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .word-puzzle .rune-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .rune-forge {
    gap: 11px;
  }

  .rune-forge-workspace {
    grid-template-columns: minmax(62px, 0.7fr) minmax(138px, 1.45fr) minmax(62px, 0.7fr);
    gap: 5px;
  }

  .rune-weapon-stage {
    min-height: 296px;
    border-width: 3px;
  }

  .rune-weapon-stage::before {
    inset: 8px;
  }

  .rune-weapon-label {
    top: 8px;
    left: 7px;
    padding: 4px 6px;
    border-width: 2px;
    box-shadow: 2px 3px 0 var(--outline);
  }

  .rune-weapon-label span {
    display: none;
  }

  .rune-weapon-label strong {
    font-size: 0.65rem;
  }

  .rune-weapon-art {
    inset: 24px 3px 2px;
    width: calc(100% - 6px);
    height: calc(100% - 26px);
  }

  .rune-weapon-sockets {
    padding: 5px;
    border-width: 3px;
    gap: 4px;
  }

  .rune-weapon-socket {
    width: 34px;
    height: 34px;
    border-width: 3px;
    box-shadow: inset 0 0 0 2px #586781, 2px 3px 0 rgba(3, 7, 17, 0.48);
  }

  .rune-group {
    padding: 8px 3px 7px;
    border-width: 2px;
    box-shadow: 2px 3px 0 rgba(3, 7, 17, 0.5);
  }

  .rune-group legend {
    padding-inline: 1px;
    justify-content: center;
    gap: 3px;
  }

  .rune-group legend > span {
    width: 18px;
    height: 18px;
    border-width: 1px;
    font-size: 0.47rem;
  }

  .rune-group legend strong {
    font-size: 0.5rem;
  }

  .rune-group legend em {
    font-size: 0.4rem;
  }

  .rune-group-choices {
    grid-template-rows: repeat(4, minmax(62px, 1fr));
    gap: 4px;
  }

  .rune-group .rune-choice {
    min-height: 62px;
    padding: 3px 1px;
    border-width: 2px;
  }

  .rune-group .rune-choice .rune-stone {
    width: 32px;
    height: 32px;
  }

  .rune-group .rune-choice .choice-label {
    font-size: 0.45rem;
  }

  .rune-group .rune-choice em {
    font-size: 0.39rem;
  }

  .rune-group-arrow {
    width: 22px;
    height: 22px;
    border-width: 2px;
    border-radius: 8px;
    font-size: 0.72rem;
  }

  .rune-group-left .rune-group-arrow {
    right: -18px;
  }

  .rune-group-right .rune-group-arrow {
    left: -18px;
  }

  .rune-group .rune-choice.is-broken .rune-stone::before {
    left: 17px;
    height: 32px;
  }

  .rune-group .rune-choice.is-broken .rune-stone::after {
    top: 9px;
    left: 7px;
    height: 20px;
  }

  .rune-submit {
    width: min(230px, 100%);
    min-height: 49px;
  }

  .feedback-key {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .feedback-key span {
    grid-template-columns: 58px 1fr;
  }

  .attempt-log > li {
    grid-template-columns: 1fr;
  }

  .attempt-results {
    justify-content: flex-start;
  }

  .door-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px;
  }

  .door-grid .choice:last-child {
    grid-column: 1 / -1;
    width: calc(50% - 6px);
    justify-self: center;
  }

  .choice {
    min-height: 124px;
    border-width: 3px;
  }

  .choice-number {
    min-height: 51px;
  }

  .choice-door {
    min-height: 171px;
  }

  .choice-door:is(.is-open, .is-wrong, .is-correct, .is-answer-reveal) {
    min-height: 205px;
  }

  .choice-door:is(.is-open, .is-wrong, .is-correct, .is-answer-reveal) .door-stage {
    width: min(100%, 118px);
  }

  .reaction-panel {
    border-width: 4px;
    grid-template-columns: 1fr;
  }

  .reaction-art {
    min-height: 225px;
  }

  .reaction-art img {
    max-height: 220px;
  }

  .reaction-copy {
    min-height: 0;
    padding: 22px 20px 24px;
  }

  .results-view {
    min-height: 0;
    padding-top: 12px;
  }

  .results-card {
    padding: 28px 17px;
    border-width: 5px;
  }

  .results-content {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .results-jelly {
    min-height: 235px;
  }

  .results-jelly span {
    inset-inline: 10%;
  }

  .results-jelly img {
    width: min(75%, 240px);
  }

  .score-sheet {
    rotate: 0deg;
  }

  .blue-star-panel {
    padding-inline: 5px;
  }

  .blue-star-row {
    gap: 2px;
  }

  .blue-star-icon {
    width: 34px;
    height: 32px;
  }

  .blue-star-outline,
  .blue-star-fill {
    font-size: 1.8rem;
  }

  .blue-star-label {
    font-size: clamp(0.62rem, 3.25vw, 0.72rem);
  }

  .results-actions {
    flex-direction: column;
  }

  .results-actions .chunky-button,
  .results-actions .text-button {
    width: 100%;
  }

  .site-footer {
    padding-inline: 20px;
    flex-direction: column;
    gap: 9px;
    text-align: center;
  }

  .site-footer p {
    text-align: center;
  }

  .game-view-potion .game-heading,
  .game-view-rune .game-heading {
    padding: 8px 2px 11px;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
  }

  .game-view-potion .game-heading h1,
  .game-view-rune .game-heading h1 {
    font-size: clamp(2.15rem, 10vw, 3rem);
  }

  .game-view-potion .game-heading p:last-child,
  .game-view-rune .game-heading p:last-child {
    font-size: 0.7rem;
  }

  .game-view-potion .guess-tracker,
  .game-view-rune .guess-tracker {
    width: auto;
    min-height: 49px;
    padding: 7px 8px;
    display: grid;
    gap: 3px;
  }

  .game-view-potion .guess-label,
  .game-view-rune .guess-label {
    font-size: 0.52rem;
  }

  .game-view-potion .choice-panel,
  .game-view-rune .choice-panel {
    padding: 9px 8px;
  }

  .word-puzzle {
    gap: 6px;
  }

  .puzzle-minihead {
    min-height: 47px;
    padding: 5px 7px;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    gap: 6px;
  }

  .puzzle-minihead strong {
    font-size: 0.65rem;
  }

  .puzzle-minihead small {
    font-size: 0.52rem;
  }

  .puzzle-feedback-strip {
    min-height: 42px;
    padding-block: 2px;
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .puzzle-feedback-strip img {
    width: 36px;
    height: 36px;
  }

  .puzzle-tile {
    min-height: 55px;
    border-width: 3px;
  }

  .puzzle-tile.is-future {
    min-height: 33px;
  }

  .puzzle-tile b {
    font-size: 0.62rem;
  }

  .puzzle-tile em {
    font-size: 0.6rem;
  }

  .tile-swatch,
  .ingredient-dot {
    width: 19px;
    height: 19px;
  }

  .word-puzzle .potion-ingredient {
    min-height: 47px;
    grid-template-columns: 1fr;
    place-items: center;
    gap: 1px;
  }

  .word-puzzle .potion-ingredient b {
    font-size: 0.64rem;
  }

  .word-puzzle .potion-ingredient .ingredient-dot {
    grid-row: 1;
  }

  .word-puzzle .rune-choice {
    min-height: 58px;
  }

  .word-puzzle .rune-choice .rune-stone {
    width: 34px;
    height: 31px;
  }

  .game-view-potion .reaction-panel.is-complete,
  .game-view-rune .reaction-panel.is-complete {
    grid-template-columns: 78px minmax(0, 1fr);
  }

  .game-view-potion .reaction-panel.is-complete .reaction-art,
  .game-view-rune .reaction-panel.is-complete .reaction-art {
    min-height: 112px;
  }

  .game-view-potion .reaction-panel.is-complete .reaction-art img,
  .game-view-rune .reaction-panel.is-complete .reaction-art img {
    max-height: 106px;
  }

  .game-view-potion .reaction-panel.is-complete .reaction-copy,
  .game-view-rune .reaction-panel.is-complete .reaction-copy {
    padding: 12px;
  }

  .game-view-potion .reaction-panel.is-complete .reaction-copy h2,
  .game-view-rune .reaction-panel.is-complete .reaction-copy h2 {
    font-size: 1.25rem;
  }

  .game-view-potion .reaction-panel.is-complete .reaction-copy > p:not(.feedback-kicker),
  .game-view-rune .reaction-panel.is-complete .reaction-copy > p:not(.feedback-kicker) {
    margin-top: 6px;
    font-size: 0.68rem;
  }

  .game-view-potion .reaction-panel.is-complete .reaction-copy .stars,
  .game-view-rune .reaction-panel.is-complete .reaction-copy .stars {
    margin-top: 8px;
  }

  .game-view-potion .reaction-panel.is-complete .reaction-copy .star,
  .game-view-rune .reaction-panel.is-complete .reaction-copy .star {
    font-size: 1.3rem;
  }

  .game-view-potion .reaction-panel.is-complete .reaction-copy .chunky-button,
  .game-view-rune .reaction-panel.is-complete .reaction-copy .chunky-button {
    min-height: 44px;
    margin-top: 9px;
    padding: 6px 9px;
    font-size: 0.68rem;
  }
}

/* Daily Potion bottle-workbench overhaul */

.treasure-potion-image {
  position: relative;
  z-index: 2;
  width: 72px;
  height: 72px;
  margin-top: -5px;
  object-fit: contain;
  filter: drop-shadow(3px 4px 0 rgba(3, 7, 17, 0.38));
}

.game-view-potion .choice-panel {
  align-items: start;
}

.potion-lab-v2 {
  width: min(100%, 800px);
  display: grid;
  gap: 15px;
}

.potion-bottle-art {
  display: block;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.potion-brief {
  min-height: 62px;
  padding: 7px 10px;
  border: 3px solid #435171;
  border-radius: 15px 11px 16px 12px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  color: var(--paper);
  background: rgba(9, 17, 35, 0.42);
}

.potion-brief > span:nth-child(2) {
  display: grid;
  gap: 3px;
}

.potion-brief strong {
  font-size: 0.78rem;
  font-weight: 1000;
}

.potion-brief small {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 800;
}

.potion-brief > b {
  padding: 5px 8px;
  border: 3px solid var(--outline);
  border-radius: 9px 7px 10px 8px;
  color: var(--outline);
  font-size: 0.68rem;
  background: var(--yellow);
  box-shadow: 2px 3px 0 var(--outline);
}

.potion-current {
  padding: 14px;
  border: 4px solid #4f6083;
  border-radius: 22px 16px 24px 18px;
  background:
    radial-gradient(circle at 50% 18%, rgba(102, 222, 243, 0.13), transparent 46%),
    rgba(12, 22, 44, 0.72);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.035);
}

.potion-section-heading {
  margin-bottom: 11px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  color: var(--paper);
}

.potion-section-heading > div {
  min-width: 0;
}

.potion-section-heading span {
  display: block;
  margin-bottom: 2px;
  color: var(--slime);
  font-size: 0.55rem;
  font-weight: 1000;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.potion-section-heading h2,
.potion-section-heading h3 {
  margin: 0;
  font-size: clamp(1rem, 2.4vw, 1.28rem);
  line-height: 1;
}

.potion-section-heading > small {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.58rem;
  font-weight: 900;
  text-align: right;
}

.potion-section-heading.compact {
  margin-bottom: 8px;
}

.potion-section-heading.compact h2,
.potion-section-heading.compact h3 {
  font-size: 0.92rem;
}

.potion-current-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 23px minmax(0, 1fr) 23px minmax(0, 1fr);
  align-items: center;
  gap: 4px;
}

.potion-order-arrow {
  color: var(--yellow);
  font-size: clamp(1rem, 3vw, 1.55rem);
  font-weight: 1000;
  text-align: center;
  text-shadow: 2px 2px 0 var(--outline);
}

.potion-active-slot {
  position: relative;
  min-width: 0;
  min-height: 174px;
  padding: 18px 7px 8px;
  border: 4px dashed #68799b;
  border-radius: 21px 15px 23px 17px;
  display: grid;
  grid-template-rows: 1fr auto;
  place-items: center;
  gap: 2px;
  color: var(--paper);
  cursor: pointer;
  background: rgba(36, 51, 82, 0.78);
  box-shadow: 4px 5px 0 rgba(3, 7, 17, 0.52);
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.potion-active-slot.is-filled {
  border-style: solid;
}

.potion-active-slot.is-active {
  border-color: var(--yellow);
  box-shadow: 4px 5px 0 rgba(3, 7, 17, 0.52), 0 0 0 3px rgba(244, 207, 79, 0.2);
  translate: 0 -2px;
}

.potion-active-slot.is-confirmed {
  border-color: #b7f2c1;
  border-style: solid;
  color: #172336;
  background: #72d38b;
  box-shadow: 4px 5px 0 rgba(3, 7, 17, 0.52), 0 0 25px rgba(105, 206, 131, 0.34);
}

.potion-active-slot:focus-visible,
.potion-shelf-bottle:focus-visible {
  outline: 4px solid var(--yellow);
  outline-offset: 3px;
}

.potion-active-slot .potion-bottle-art {
  width: min(100%, 136px);
  height: 126px;
}

.potion-active-slot > b {
  position: relative;
  z-index: 2;
  font-size: 0.72rem;
  font-weight: 1000;
}

.potion-slot-number {
  position: absolute;
  z-index: 4;
  top: 7px;
  left: 7px;
  width: 24px;
  height: 24px;
  border: 3px solid var(--outline);
  border-radius: 8px 6px 9px 7px;
  display: grid;
  place-items: center;
  color: var(--outline);
  font-size: 0.58rem;
  font-weight: 1000;
  background: var(--paper);
}

.potion-empty-bottle {
  position: relative;
  width: 82px;
  height: 108px;
  border: 4px dashed #7182a3;
  border-radius: 26px 26px 37px 37px;
  display: grid;
  place-items: center;
  opacity: 0.8;
}

.potion-empty-bottle::before {
  position: absolute;
  top: -14px;
  width: 35px;
  height: 20px;
  border: 4px dashed #7182a3;
  border-bottom: 0;
  border-radius: 9px 9px 0 0;
  content: "";
}

.potion-empty-bottle i {
  color: #7f90b1;
  font-size: 1.5rem;
  font-style: normal;
  font-weight: 1000;
}

.potion-sparkle {
  position: absolute;
  top: 8px;
  right: 8px;
  color: #fff7a3;
  font-size: 1.2rem;
  font-style: normal;
  text-shadow: 0 0 7px white, 2px 2px 0 var(--outline);
  animation: potion-sparkle 900ms ease-in-out infinite alternate;
}

.potion-shelf {
  padding: 3px 2px 0;
}

.potion-shelf-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 9px;
}

.potion-shelf-bottle {
  position: relative;
  min-width: 0;
  min-height: 132px;
  padding: 7px 5px 8px;
  border: 3px solid #4a5a7c;
  border-radius: 18px 13px 20px 15px;
  display: grid;
  grid-template-rows: 1fr auto;
  place-items: center;
  gap: 2px;
  color: var(--paper);
  cursor: pointer;
  background: rgba(34, 48, 78, 0.72);
  box-shadow: 3px 4px 0 rgba(3, 7, 17, 0.48);
  transition: transform 150ms ease, filter 150ms ease, background 150ms ease;
}

.potion-shelf-bottle .potion-bottle-art {
  width: min(100%, 104px);
  height: 98px;
}

.potion-shelf-bottle > b {
  font-size: 0.68rem;
  font-weight: 1000;
}

[data-potion-drag-color]:not(:disabled) {
  cursor: grab;
  touch-action: none;
}

.is-potion-dragging,
.is-potion-dragging * {
  cursor: grabbing !important;
  user-select: none !important;
}

.potion-drag-ghost {
  position: fixed;
  z-index: 1200;
  width: 126px;
  height: 126px;
  pointer-events: none;
  filter: drop-shadow(0 13px 9px rgba(2, 7, 18, 0.46));
  translate: -50% -62%;
  scale: 1.08;
  rotate: -4deg;
}

.potion-drag-ghost img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

[data-potion-drag-color].is-drag-source {
  opacity: 0.34;
  scale: 0.96;
}

.potion-active-slot.is-drop-available {
  border-color: #738eb2;
  background: rgba(50, 75, 111, 0.9);
}

.potion-active-slot.is-drop-target {
  border-color: var(--yellow);
  border-style: solid;
  background: #315f6b;
  box-shadow: 4px 5px 0 rgba(3, 7, 17, 0.52), 0 0 0 5px var(--slime), 0 0 28px rgba(102, 222, 243, 0.58);
  translate: 0 -5px;
  scale: 1.035;
}

.potion-active-slot.is-drop-blocked {
  border-color: #e86572;
  filter: grayscale(0.72) brightness(0.7);
}

.potion-shelf-bottle.is-used {
  filter: grayscale(0.25) brightness(0.62);
}

.potion-shelf-bottle.is-eliminated {
  border-color: #f08b8b;
  filter: saturate(0.75) brightness(0.7);
  background: rgba(126, 37, 47, 0.64);
}

.potion-shelf-bottle.is-confirmed {
  border-color: #9ae8aa;
  filter: none;
  background: rgba(46, 113, 77, 0.75);
}

.potion-shelf-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 25px;
  height: 25px;
  border: 3px solid var(--outline);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--outline);
  font-size: 0.62rem;
  font-style: normal;
  font-weight: 1000;
  background: var(--paper);
  box-shadow: 2px 2px 0 var(--outline);
}

.potion-shelf-badge.is-out {
  color: var(--paper);
  background: #d94e5e;
}

.potion-shelf-badge.is-locked {
  background: var(--green);
}

.potion-lab-v2 .potion-submit {
  width: 100%;
  min-height: 58px;
  font-size: 0.87rem;
}

.potion-history {
  padding-top: 12px;
  border-top: 3px dashed #435171;
}

.potion-history-list {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 7px;
  list-style: none;
}

.potion-history-list > li {
  min-height: 65px;
  padding: 5px 7px;
  border: 2px solid #435171;
  border-radius: 12px 9px 13px 10px;
  display: grid;
  grid-template-columns: 31px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  background: rgba(10, 18, 37, 0.42);
}

.potion-history-number {
  width: 27px;
  height: 27px;
  border: 2px solid #586989;
  border-radius: 8px 6px 9px 7px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.58rem;
}

.potion-history-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.potion-history-result {
  position: relative;
  min-width: 0;
  height: 54px;
  border: 3px solid var(--outline);
  border-radius: 11px 8px 12px 9px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #394563;
}

.potion-history-result.is-correct { background: #67cf83; }
.potion-history-result.is-wrong-place { background: #e89a3d; }
.potion-history-result.is-incorrect { background: #d95864; }

.potion-history-result .potion-bottle-art {
  width: 58px;
  height: 58px;
}

.potion-move-mark {
  position: absolute;
  right: 4px;
  bottom: 3px;
  width: 24px;
  height: 20px;
  border: 2px solid var(--outline);
  border-radius: 7px 5px 8px 6px;
  display: grid;
  place-items: center;
  color: var(--outline);
  font-size: 0.74rem;
  font-style: normal;
  font-weight: 1000;
  background: var(--yellow);
  box-shadow: 1px 2px 0 var(--outline);
}

.potion-history-result.is-new-result {
  animation: potion-result-reveal 420ms cubic-bezier(0.18, 0.89, 0.32, 1.32) both;
  animation-delay: calc(var(--resolve-index) * 150ms);
}

.potion-history-result.is-new-result.is-wrong-place .potion-bottle-art {
  animation: potion-wrong-place 310ms ease-in-out 2;
  animation-delay: calc(180ms + var(--resolve-index) * 150ms);
}

.potion-history-result.is-new-result.is-incorrect .potion-bottle-art {
  animation: potion-crack-pop 360ms cubic-bezier(0.2, 0.9, 0.3, 1.25) both;
  animation-delay: calc(170ms + var(--resolve-index) * 150ms);
}

@keyframes potion-result-reveal {
  0% { opacity: 0; scale: 0.72; rotate: -4deg; }
  65% { opacity: 1; scale: 1.07; }
  100% { opacity: 1; scale: 1; rotate: 0deg; }
}

@keyframes potion-sparkle {
  from { opacity: 0.55; scale: 0.82; rotate: -8deg; }
  to { opacity: 1; scale: 1.12; rotate: 8deg; }
}

@keyframes potion-wrong-place {
  0%, 100% { translate: 0 0; }
  35% { translate: -5px 0; }
  70% { translate: 5px 0; }
}

@keyframes potion-crack-pop {
  0% { scale: 0.78; rotate: -7deg; }
  62% { scale: 1.14; rotate: 5deg; }
  100% { scale: 1; rotate: 0deg; }
}

@media (hover: hover) and (pointer: fine) {
  .potion-active-slot:hover:not(:disabled),
  .potion-shelf-bottle:hover:not(:disabled) {
    transform: translateY(-4px) rotate(-0.6deg);
    filter: brightness(1.08);
  }
}

@media (max-width: 560px) {
  .potion-lab-v2 {
    gap: 10px;
  }

  .potion-brief {
    min-height: 53px;
    padding: 5px 7px;
    grid-template-columns: 39px minmax(0, 1fr) auto;
    gap: 6px;
  }

  .potion-brief strong { font-size: 0.64rem; }
  .potion-brief small { font-size: 0.52rem; }

  .potion-current {
    padding: 9px 7px 8px;
    border-width: 3px;
  }

  .potion-section-heading {
    margin-bottom: 7px;
    gap: 6px;
  }

  .potion-section-heading h2,
  .potion-section-heading h3 {
    font-size: 0.87rem;
  }

  .potion-section-heading > small {
    font-size: 0.48rem;
  }

  .potion-current-row {
    grid-template-columns: minmax(0, 1fr) 13px minmax(0, 1fr) 13px minmax(0, 1fr);
    gap: 2px;
  }

  .potion-order-arrow {
    font-size: 0.82rem;
    text-shadow: 1px 1px 0 var(--outline);
  }

  .potion-active-slot {
    min-height: 119px;
    padding: 14px 3px 5px;
    border-width: 3px;
  }

  .potion-active-slot .potion-bottle-art {
    width: 110px;
    max-width: 118%;
    height: 101px;
  }

  .potion-active-slot > b {
    font-size: 0.57rem;
  }

  .potion-slot-number {
    top: 4px;
    left: 4px;
    width: 20px;
    height: 20px;
    border-width: 2px;
    font-size: 0.5rem;
  }

  .potion-empty-bottle {
    width: 55px;
    height: 72px;
    border-width: 3px;
  }

  .potion-empty-bottle::before {
    top: -10px;
    width: 25px;
    height: 13px;
    border-width: 3px;
    border-bottom: 0;
  }

  .potion-empty-bottle i {
    font-size: 1rem;
  }

  .potion-sparkle {
    top: 5px;
    right: 5px;
    font-size: 0.86rem;
  }

  .potion-shelf-row {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 5px;
  }

  .potion-shelf-bottle {
    grid-column: span 2;
  }

  .potion-shelf-bottle:nth-child(4) {
    grid-column: 2 / span 2;
  }

  .potion-shelf-bottle:nth-child(5) {
    grid-column: 4 / span 2;
  }

  .potion-shelf-bottle {
    min-height: 94px;
    padding: 4px 2px 5px;
    border-width: 3px;
  }

  .potion-shelf-bottle .potion-bottle-art {
    width: 90px;
    max-width: 125%;
    height: 82px;
  }

  .potion-shelf-bottle > b {
    font-size: 0.54rem;
  }

  .potion-shelf-badge {
    top: 3px;
    right: 3px;
    width: 21px;
    height: 21px;
    border-width: 2px;
    font-size: 0.5rem;
  }

  .potion-lab-v2 .potion-submit {
    min-height: 50px;
    font-size: 0.72rem;
  }

  .potion-history {
    padding-top: 8px;
  }

  .potion-history-list > li {
    min-height: 56px;
    grid-template-columns: 25px minmax(0, 1fr);
    gap: 4px;
  }

  .potion-history-number {
    width: 23px;
    height: 23px;
    font-size: 0.5rem;
  }

  .potion-history-row {
    gap: 4px;
  }

  .potion-history-result {
    height: 47px;
    border-width: 2px;
  }

  .potion-history-result .potion-bottle-art {
    width: 50px;
    height: 50px;
  }

  .potion-move-mark {
    right: 2px;
    bottom: 2px;
    width: 20px;
    height: 17px;
    border-width: 2px;
    font-size: 0.6rem;
  }

  .potion-drag-ghost {
    width: 98px;
    height: 98px;
  }
}

@media (max-width: 375px) {
  .number-grid {
    grid-template-columns: repeat(4, minmax(42px, 1fr));
    gap: 5px;
  }

  .number-grid-15,
  .number-grid-25 {
    grid-template-columns: repeat(5, minmax(42px, 1fr));
  }

  .choice-number {
    min-height: 46px;
    border-width: 3px;
  }

  .color-pot,
  .rune-stone {
    scale: 0.9;
  }
}

/* Daily Treasure chest hunt */
@media (min-width: 761px) {
  body[data-game="treasure"] .site-header,
  body[data-game="treasure"] .site-footer {
    display: none;
  }

  body[data-game="treasure"] #daily-six-app {
    min-height: 0;
    padding: 0;
  }

  .game-view-treasure {
    padding-top: 0;
  }

  .game-view-treasure .game-nav {
    min-height: 42px;
  }

  .game-view-treasure .game-heading {
    padding: 2px 6px 10px;
  }

  .game-view-treasure .game-heading h1 {
    font-size: clamp(2.55rem, 4.5vw, 3.75rem);
  }

  .game-view-treasure .game-heading p:last-child {
    margin-top: 4px;
    font-size: 0.9rem;
  }

  .game-view-treasure .guess-tracker {
    min-width: 166px;
    padding: 8px 11px;
    gap: 5px;
  }

  .game-view-treasure .guess-pip {
    width: 32px;
    height: 27px;
  }

  .game-view-treasure .failed-answer-reveal {
    margin-bottom: 8px;
  }
}

.game-view-treasure .game-layout {
  align-items: stretch;
  gap: 16px;
}

.game-view-treasure .choice-panel {
  min-height: 0;
  padding: clamp(10px, 1.4vw, 15px);
  place-items: stretch;
  background:
    radial-gradient(circle at 50% 42%, rgba(244, 207, 79, 0.12), transparent 42%),
    linear-gradient(180deg, #202c49 0%, #18233d 100%);
}

.treasure-hunt {
  width: 100%;
  display: grid;
  align-content: start;
  gap: 9px;
}

.game-view-treasure .reaction-panel {
  min-height: 0;
}

.game-view-treasure .reaction-art img {
  max-height: 210px;
}

.game-view-treasure .reaction-copy {
  min-height: 158px;
  padding: 15px 17px 17px;
}

.game-view-treasure .reaction-copy h2 {
  font-size: clamp(1.35rem, 2.35vw, 1.75rem);
}

.game-view-treasure .reaction-copy > p:not(.feedback-kicker) {
  margin-top: 8px;
  line-height: 1.35;
}

.treasure-clue-panel {
  position: relative;
  width: 100%;
  margin-inline: auto;
  padding: 8px 14px 9px 58px;
  border: 4px solid var(--outline);
  border-radius: 14px 18px 13px 20px;
  color: #2c2c35;
  background:
    linear-gradient(92deg, rgba(160, 118, 45, 0.13), transparent 19%, transparent 82%, rgba(160, 118, 45, 0.15)),
    #fff0bb;
  box-shadow: 4px 5px 0 var(--outline), inset 0 0 0 2px rgba(255, 255, 255, 0.42);
  rotate: -0.2deg;
}

.treasure-clue-panel::before,
.treasure-clue-panel::after {
  content: "";
  position: absolute;
  top: 9px;
  bottom: 9px;
  width: 8px;
  border: 2px solid #7c5520;
  border-radius: 50%;
  background: #d49b3c;
}

.treasure-clue-panel::before { left: 8px; }
.treasure-clue-panel::after { right: 8px; }

.treasure-clue-seal {
  position: absolute;
  top: 50%;
  left: 25px;
  width: 31px;
  height: 31px;
  border: 3px solid var(--outline);
  border-radius: 50% 47% 52% 45%;
  display: grid;
  place-items: center;
  color: #fff4cf;
  font-size: 1rem;
  font-weight: 1000;
  background: #b33c4b;
  box-shadow: 2px 3px 0 rgba(32, 39, 57, 0.45);
  transform: translateY(-50%) rotate(-7deg);
}

.treasure-clue-copy .eyebrow {
  margin-bottom: 2px;
  color: #9b5f18;
}

.treasure-clue-copy h2 {
  margin: 0;
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.05;
}

.treasure-clue-list {
  margin: 4px 0 0;
  padding: 0;
  display: grid;
  gap: 2px;
  list-style: none;
}

.treasure-clue-list li {
  display: grid;
  grid-template-columns: 23px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  color: #4c4235;
  font-size: 0.78rem;
  font-weight: 850;
  line-height: 1.16;
}

.treasure-clue-list li > span {
  width: 23px;
  height: 23px;
  border: 2px solid #5d4423;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff2c5;
  font-size: 0.68rem;
  background: #7b5b31;
}

.treasure-clue-list li.is-latest > span {
  color: #322203;
  background: var(--yellow);
}

.treasure-workbench {
  width: 100%;
  margin-inline: auto;
  display: grid;
  grid-template-columns: clamp(78px, 7.4vw, 96px) minmax(0, 1fr);
  align-items: stretch;
  gap: 9px;
}

.treasure-chest-grid {
  width: 100%;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(6px, 0.85vw, 9px);
}

.treasure-chest {
  position: relative;
  min-width: 0;
  min-height: 100px;
  padding: 3px 4px 5px;
  border: 3px solid #080e20;
  border-radius: 14px 11px 16px 12px;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  align-items: center;
  color: var(--paper);
  cursor: pointer;
  background: #111d36;
  box-shadow: 3px 4px 0 #050a17, inset 0 0 0 2px rgba(255, 255, 255, 0.05);
  overflow: hidden;
  transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease, filter 150ms ease;
}

.treasure-chest:nth-child(3n + 1) { rotate: -0.35deg; }
.treasure-chest:nth-child(3n + 3) { rotate: 0.35deg; }

.treasure-chest:not(:disabled):hover,
.treasure-chest:not(:disabled):focus-visible {
  border-color: var(--yellow);
  transform: translateY(-3px) scale(1.015);
  box-shadow: 4px 7px 0 #050a17, 0 0 0 3px rgba(244, 207, 79, 0.22);
  outline: none;
}

.treasure-chest:disabled {
  opacity: 1;
  cursor: default;
}

.treasure-chest-image {
  position: relative;
  width: 100%;
  height: clamp(76px, 10.5dvh, 104px);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.treasure-chest-image img {
  position: absolute;
  top: 50%;
  left: 50%;
  width: auto;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 7px 0 rgba(3, 7, 17, 0.38));
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.treasure-chest-name {
  z-index: 2;
  justify-self: center;
  margin-top: -3px;
  padding: 2px 7px;
  border: 2px solid #050a17;
  border-radius: 999px;
  color: #dbe6ff;
  font-size: 0.64rem;
  font-weight: 1000;
  letter-spacing: 0.035em;
  background: #283656;
  box-shadow: 1px 2px 0 #050a17;
}

.treasure-chest-state {
  position: absolute;
  top: 7px;
  right: 7px;
  z-index: 3;
  padding: 3px 6px;
  border: 2px solid var(--outline);
  border-radius: 999px;
  color: #25150c;
  font-size: 0.61rem;
  font-weight: 1000;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: #ff8c67;
  box-shadow: 2px 2px 0 var(--outline);
}

.treasure-chest-mimic {
  border-color: #45151d;
  background: #3f1c29;
  box-shadow: 3px 4px 0 #080b16, inset 0 0 0 2px rgba(244, 92, 112, 0.18);
}

.treasure-chest-treasure {
  border-color: #184e32;
  background: #17452f;
  box-shadow: 3px 4px 0 #080b16, 0 0 18px rgba(244, 207, 79, 0.36), inset 0 0 0 2px rgba(105, 206, 131, 0.22);
}

.treasure-chest-treasure .treasure-chest-state {
  background: var(--yellow);
}

.treasure-hunt.is-key-armed .treasure-chest-closed:not(:disabled),
.treasure-chest.is-drop-available {
  border-color: #efc13f;
  box-shadow: 3px 4px 0 #050a17, 0 0 0 3px rgba(244, 207, 79, 0.18);
}

.treasure-chest.is-drop-target {
  transform: translateY(-5px) scale(1.045);
  border-color: #fff2ac;
  box-shadow: 4px 8px 0 #050a17, 0 0 24px rgba(255, 220, 90, 0.72);
  filter: brightness(1.12);
}

.treasure-chest.just-wrong { animation: choice-shake 430ms ease both; }
.treasure-chest.just-correct { animation: choice-correct 520ms ease both; }

.treasure-key-rack {
  min-width: 0;
  padding: 7px 6px 8px;
  border: 3px dashed rgba(244, 207, 79, 0.55);
  border-radius: 15px 12px 17px 13px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 6px;
  background: rgba(7, 13, 29, 0.45);
}

.treasure-key-rack-heading {
  display: grid;
  justify-items: center;
  gap: 1px;
  color: var(--yellow);
  text-align: center;
}

.treasure-key-rack-heading .eyebrow {
  margin: 0;
  color: var(--yellow);
  font-size: 0.58rem;
  letter-spacing: 0.11em;
}

.treasure-key-rack-heading > span {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 900;
  text-transform: uppercase;
}

.treasure-key-list {
  min-height: 0;
  display: grid;
  grid-template-rows: repeat(3, minmax(64px, 1fr));
  gap: 6px;
}

.treasure-key-tool {
  position: relative;
  width: 100%;
  min-width: 0;
  min-height: 64px;
  padding: 2px;
  border: 3px solid var(--outline);
  border-radius: 46% 54% 47% 53% / 55% 47% 53% 45%;
  display: grid;
  place-items: center;
  color: #352306;
  cursor: grab;
  background: #f9d75b;
  box-shadow: 3px 4px 0 var(--outline);
  touch-action: none;
  transition: transform 140ms ease, filter 140ms ease, box-shadow 140ms ease;
}

.treasure-key-tool:disabled {
  cursor: default;
}

.treasure-key-tool:disabled:not(.is-spent) {
  filter: grayscale(0.3) brightness(0.78);
  opacity: 0.7;
}

.treasure-key-tool.is-spent {
  filter: grayscale(0.8) brightness(0.58);
  opacity: 0.56;
}

.treasure-key-tool.is-spent::after {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  color: #ff7182;
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 1000;
  line-height: 1;
  text-shadow: 2px 2px 0 var(--outline), -1px -1px 0 var(--outline);
  content: "×";
  rotate: -8deg;
}

.treasure-key-tool:not(:disabled):hover,
.treasure-key-tool:focus-visible,
.treasure-key-tool.is-armed {
  outline: none;
  transform: rotate(-2deg) translateY(-2px);
  filter: brightness(1.08);
  box-shadow: 4px 7px 0 var(--outline), 0 0 18px rgba(255, 216, 70, 0.55);
}

.treasure-key-tool.is-drag-source {
  cursor: grabbing;
  opacity: 0.55;
}

.treasure-key-tool img {
  position: relative;
  z-index: 2;
  width: clamp(50px, 5.6vw, 68px);
  height: clamp(48px, 6.2vw, 68px);
  object-fit: contain;
  pointer-events: none;
}

.treasure-key-number {
  position: absolute;
  top: 3px;
  left: 4px;
  z-index: 3;
  width: 18px;
  height: 18px;
  border: 2px solid var(--outline);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--outline);
  font-size: 0.58rem;
  font-weight: 1000;
  background: #fff1b1;
  pointer-events: none;
}

.treasure-key-status {
  position: absolute;
  right: 3px;
  bottom: 3px;
  z-index: 3;
  padding: 1px 4px;
  border: 1px solid rgba(21, 27, 45, 0.78);
  border-radius: 999px;
  color: #352306;
  font-size: 0.5rem;
  font-weight: 1000;
  line-height: 1;
  text-transform: uppercase;
  background: rgba(255, 242, 187, 0.9);
  pointer-events: none;
}

.treasure-key-glow {
  position: absolute;
  inset: 8px;
  border-radius: inherit;
  background: radial-gradient(circle, rgba(255, 255, 219, 0.84), transparent 65%);
  opacity: 0;
}

.treasure-key-tool.is-armed .treasure-key-glow {
  opacity: 1;
  animation: treasure-key-pulse 1.1s ease-in-out infinite alternate;
}

.treasure-key-help {
  margin: 0;
  display: grid;
  gap: 2px;
  color: var(--paper);
  text-align: center;
}

.treasure-key-help strong {
  font-size: 0.68rem;
  line-height: 1.05;
}

.treasure-key-help span {
  color: var(--muted);
  font-size: 0.58rem;
  font-weight: 750;
  line-height: 1.15;
}

.treasure-key-drag-ghost {
  position: fixed;
  z-index: 9999;
  width: 92px;
  height: 92px;
  pointer-events: none;
  transform: translate(-50%, -50%) rotate(-12deg);
  filter: drop-shadow(0 10px 0 rgba(3, 7, 17, 0.45));
}

.treasure-key-drag-ghost img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

body.is-treasure-dragging,
body.is-treasure-dragging * {
  cursor: grabbing !important;
}

@keyframes treasure-key-pulse {
  from { transform: scale(0.92); opacity: 0.55; }
  to { transform: scale(1.08); opacity: 1; }
}

@media (max-width: 980px) and (min-width: 761px) {
  .game-view-treasure .game-layout {
    grid-template-columns: minmax(0, 1.4fr) minmax(238px, 0.6fr);
    gap: 16px;
  }

  .treasure-chest {
    min-height: 100px;
  }

  .treasure-chest-image {
    height: clamp(76px, 10.5dvh, 92px);
  }
}

@media (max-width: 560px) {
  .game-view-treasure .choice-panel {
    padding: 13px 8px 15px;
  }

  .treasure-hunt {
    gap: 11px;
  }

  .treasure-clue-panel {
    padding: 11px 12px 12px 53px;
    border-width: 3px;
  }

  .treasure-clue-panel::before { left: 5px; }
  .treasure-clue-panel::after { right: 5px; }

  .treasure-clue-seal {
    left: 17px;
    width: 27px;
    height: 27px;
  }

  .treasure-clue-list li {
    grid-template-columns: 20px minmax(0, 1fr);
    gap: 6px;
    font-size: 0.78rem;
  }

  .treasure-clue-list li > span {
    width: 20px;
    height: 20px;
  }

  .treasure-chest-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .treasure-chest {
    min-height: 95px;
    padding: 3px 2px 5px;
    border-width: 3px;
    border-radius: 10px 8px 12px 9px;
    box-shadow: 2px 3px 0 #050a17;
  }

  .treasure-chest-image {
    height: clamp(66px, 24vw, 88px);
  }

  .treasure-chest-name {
    padding: 2px 5px;
    border-width: 1px;
    font-size: 0.6rem;
  }

  .treasure-chest-state {
    top: 3px;
    right: 3px;
    padding: 2px 4px;
    border-width: 1px;
    font-size: 0.5rem;
    box-shadow: 1px 1px 0 var(--outline);
  }

  .treasure-workbench {
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 5px;
  }

  .treasure-key-rack {
    padding: 5px 3px;
    border-width: 2px;
    gap: 5px;
  }

  .treasure-key-rack-heading > span,
  .treasure-key-help {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .treasure-key-list {
    grid-template-rows: repeat(3, minmax(52px, 1fr));
    gap: 5px;
  }

  .treasure-key-tool {
    min-height: 52px;
    border-width: 2px;
  }

  .treasure-key-tool img {
    width: 46px;
    height: 46px;
  }

  .treasure-key-number {
    top: 2px;
    left: 2px;
    width: 15px;
    height: 15px;
    border-width: 1px;
    font-size: 0.48rem;
  }

  .treasure-key-status {
    right: 1px;
    bottom: 2px;
    padding-inline: 2px;
    font-size: 0.42rem;
  }

  .treasure-key-drag-ghost {
    width: 78px;
    height: 78px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .results-view.is-blue-star-reveal .blue-star-achievement,
  .results-view.is-blue-star-reveal .blue-star-fill,
  .results-view.is-blue-star-reveal .blue-star-outline,
  .results-view.is-blue-star-reveal .blue-star-icon::after,
  .results-view.is-blue-star-reveal .blue-star-panel,
  .results-view.is-blue-star-reveal .total-score {
    animation: none !important;
  }
}
