:root {
  color-scheme: dark;
  font-family: "Barlow", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  background: #05070d;
  color: #f6f7fb;
  --font-display: "Barlow Condensed", "Arial Narrow", Impact, sans-serif;
  --background: #05070d;
  --surface: rgb(13 17 29 / 88%);
  --surface-solid: #0d111d;
  --surface-raised: #151b2b;
  --surface-hover: #1b2439;
  --border: rgb(156 181 223 / 22%);
  --border-strong: rgb(160 201 255 / 38%);
  --text: #f6f7fb;
  --muted: #a8b2c7;
  --muted-strong: #c7cfdd;
  --aether: #67e8ff;
  --aether-deep: #1ba6d2;
  --aether-violet: #9e77ff;
  --aether-pink: #f15cc0;
  --essence: #f7c85c;
  --essence-hot: #ff8a48;
  --danger: #ff6577;
  --success: #6ce7a1;
  --perfect: var(--essence);
  --shadow: 0 1.4rem 4rem rgb(0 0 0 / 42%);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--background);
}

body {
  position: relative;
  isolation: isolate;
  min-width: 320px;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 7% 4%, rgb(31 175 214 / 18%), transparent 24rem),
    radial-gradient(circle at 92% 12%, rgb(133 76 240 / 20%), transparent 27rem),
    radial-gradient(circle at 52% 104%, rgb(237 65 157 / 10%), transparent 32rem),
    linear-gradient(160deg, #060913 0%, #090b16 48%, #04050a 100%);
  color: var(--text);
}

body::before,
body::after {
  position: fixed;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  content: "";
}

body::before {
  opacity: 0.3;
  background-image:
    linear-gradient(rgb(112 197 255 / 7%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(112 197 255 / 7%) 1px, transparent 1px);
  background-size: 3.5rem 3.5rem;
  mask-image: linear-gradient(to bottom, black, transparent 74%);
}

body::after {
  opacity: 0.18;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 3px,
    rgb(255 255 255 / 3%) 4px
  );
}

::selection {
  background: var(--aether-violet);
  color: white;
}

button {
  font: inherit;
  touch-action: manipulation;
}

.site-header,
.app-shell {
  width: min(100% - 1.25rem, 74rem);
  margin-inline: auto;
}

.site-header {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  padding-block: 1rem 0.9rem;
}

.site-header::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--aether), var(--aether-violet) 42%, var(--aether-pink) 72%, transparent);
  box-shadow: 0 0 1.1rem rgb(103 232 255 / 42%);
  content: "";
}

.brand-lockup {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: clamp(0.5rem, 1.4vw, 0.85rem);
}

.brand-logo {
  width: clamp(3.35rem, 7vw, 5rem);
  height: clamp(3.35rem, 7vw, 5rem);
  flex: 0 0 auto;
  object-fit: contain;
  filter: drop-shadow(0 0 0.75rem rgb(103 232 255 / 18%)) drop-shadow(0 0 1rem rgb(158 119 255 / 14%));
}

.brand-copy {
  min-width: 0;
}

.eyebrow,
.puzzle-date,
.kicker,
.clue-number,
.game-label {
  margin-top: 0;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  line-height: 1.1;
  text-transform: uppercase;
}

.eyebrow {
  overflow: hidden;
  margin-bottom: 0.18rem;
  color: var(--aether);
  text-overflow: ellipsis;
  white-space: nowrap;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 800;
}

h1 {
  overflow: hidden;
  margin-bottom: 0;
  background: linear-gradient(110deg, #fff 6%, #dff8ff 50%, #b9b2ff 100%);
  background-clip: text;
  color: transparent;
  font-size: clamp(2rem, 8.4vw, 4rem);
  letter-spacing: -0.025em;
  line-height: 0.88;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.header-meta {
  display: grid;
  justify-items: end;
  gap: 0.45rem;
}

.puzzle-date {
  margin-bottom: 0;
  color: var(--muted-strong);
  text-align: right;
  white-space: nowrap;
}

.streak-display {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  padding: 0.28rem 0.35rem 0.28rem 0.7rem;
  border: 1px solid rgb(247 200 92 / 30%);
  border-radius: 999px;
  background: linear-gradient(90deg, rgb(247 200 92 / 11%), rgb(255 138 72 / 7%));
  color: var(--essence);
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  line-height: 1;
  text-transform: uppercase;
  box-shadow: 0 0 1rem rgb(247 200 92 / 8%);
}

.streak-display strong {
  display: inline-grid;
  min-width: 1.65rem;
  min-height: 1.65rem;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--essence), var(--essence-hot));
  color: #171006;
  font-family: "Barlow", sans-serif;
  font-size: 0.76rem;
  font-weight: 900;
  box-shadow: 0 0 0 2px rgb(247 200 92 / 12%), 0 0 1rem rgb(255 138 72 / 20%);
}

.app-shell {
  padding-block: 0.75rem 3rem;
}

.panel {
  position: relative;
  overflow: hidden;
  padding: clamp(1rem, 4.2vw, 2.2rem);
  border: 1px solid var(--border);
  border-radius: 1.05rem;
  background:
    linear-gradient(145deg, rgb(25 32 51 / 78%), rgb(8 11 20 / 92%) 62%),
    var(--surface);
  box-shadow: var(--shadow), inset 0 1px 0 rgb(255 255 255 / 4%);
  backdrop-filter: blur(18px);
}

.panel::before {
  position: absolute;
  z-index: 0;
  top: -9rem;
  left: -7rem;
  width: 22rem;
  height: 16rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgb(54 188 229 / 14%), transparent 68%);
  pointer-events: none;
  content: "";
}

.panel::after {
  position: absolute;
  z-index: 0;
  top: 0.7rem;
  right: 0.7rem;
  width: 2.1rem;
  height: 2.1rem;
  border-top: 2px solid rgb(103 232 255 / 48%);
  border-right: 2px solid rgb(158 119 255 / 44%);
  pointer-events: none;
  content: "";
}

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

.screen-heading {
  max-width: 48rem;
  margin-bottom: 1.35rem;
}

.screen-heading .kicker {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
  color: var(--aether);
}

.screen-heading .kicker::before {
  width: 1.7rem;
  height: 2px;
  background: linear-gradient(90deg, var(--aether), var(--aether-violet));
  box-shadow: 0 0 0.7rem rgb(103 232 255 / 55%);
  content: "";
}

.screen-heading h2,
.bonus-panel h3 {
  margin-bottom: 0.55rem;
  color: #fff;
  font-size: clamp(2rem, 8vw, 3.4rem);
  letter-spacing: -0.02em;
  line-height: 0.98;
}

.screen-heading > p:last-child,
.helper-text {
  max-width: 58rem;
  margin-bottom: 0;
  color: var(--muted);
  font-family: "Barlow", sans-serif;
  font-size: clamp(0.98rem, 2.8vw, 1.08rem);
  font-weight: 400;
  letter-spacing: normal;
  line-height: 1.55;
  text-transform: none;
}

.clue-list,
.card-grid,
.order-choice-list,
.steps-order {
  list-style: none;
  padding: 0;
  margin: 0;
}

.clue-list {
  display: grid;
  gap: 0.8rem;
}

.clue-card {
  position: relative;
  min-height: 7rem;
  overflow: hidden;
  padding: 1.05rem;
  border: 1px solid var(--border);
  border-radius: 0.8rem;
  background:
    linear-gradient(145deg, rgb(27 36 57 / 94%), rgb(15 20 34 / 96%)),
    var(--surface-raised);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 4%), 0 0.8rem 2rem rgb(0 0 0 / 18%);
}

.clue-card::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--aether), var(--aether-violet));
  box-shadow: 0 0 0.9rem rgb(103 232 255 / 38%);
  content: "";
}

.clue-card:nth-child(2)::before {
  background: linear-gradient(90deg, var(--aether-violet), var(--aether-pink));
}

.clue-card:nth-child(3)::before {
  background: linear-gradient(90deg, var(--aether-pink), var(--essence-hot));
}

.clue-card.is-hidden {
  display: grid;
  min-height: 4.25rem;
  place-items: center;
  border-style: dashed;
  background:
    repeating-linear-gradient(135deg, transparent 0 10px, rgb(103 232 255 / 2%) 10px 20px),
    rgb(10 14 24 / 72%);
  color: #748096;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.clue-card.is-hidden::before {
  opacity: 0.22;
}

.clue-number {
  display: inline-flex;
  margin-bottom: 0.75rem;
  padding: 0.25rem 0.55rem;
  border: 1px solid rgb(103 232 255 / 22%);
  border-radius: 999px;
  background: rgb(103 232 255 / 7%);
  color: var(--aether);
}

.clue-text {
  margin-bottom: 0;
  color: #f1f5fb;
  font-size: clamp(1.04rem, 3.2vw, 1.16rem);
  font-weight: 500;
  line-height: 1.5;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.25rem;
}

.button,
.card-button,
.order-choice {
  min-height: 3.2rem;
  border: 1px solid var(--border-strong);
  border-radius: 0.7rem;
  background: linear-gradient(145deg, rgb(28 36 57 / 94%), rgb(15 20 33 / 96%));
  color: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.button {
  flex: 1 1 12rem;
  padding: 0.8rem 1.1rem;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.button:hover,
.card-button:hover,
.order-choice:hover {
  border-color: rgb(103 232 255 / 72%);
  background: linear-gradient(145deg, rgb(31 47 73 / 98%), rgb(18 27 44 / 98%));
  box-shadow: 0 0 0 1px rgb(103 232 255 / 10%), 0 0.9rem 2rem rgb(0 0 0 / 22%);
}

.button:focus-visible,
.card-button:focus-visible,
.order-choice:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

.button:active,
.card-button:active,
.order-choice:active {
  transform: translateY(1px) scale(0.99);
}

.button.primary {
  border-color: transparent;
  background: linear-gradient(110deg, var(--essence) 0%, #ffad54 48%, var(--essence-hot) 100%);
  color: #171006;
  box-shadow: 0 0.8rem 2.2rem rgb(255 138 72 / 16%), inset 0 1px 0 rgb(255 255 255 / 36%);
}

.button.primary:hover {
  border-color: transparent;
  background: linear-gradient(110deg, #ffe08a 0%, #ffc16b 48%, #ff9c63 100%);
  box-shadow: 0 0 0 1px rgb(255 222 137 / 38%), 0 0.9rem 2.5rem rgb(255 138 72 / 25%);
}

.button:disabled {
  opacity: 0.36;
  filter: saturate(0.5);
  cursor: not-allowed;
  box-shadow: none;
}

.button:disabled:hover {
  border-color: var(--border-strong);
  background: linear-gradient(145deg, rgb(28 36 57 / 94%), rgb(15 20 33 / 96%));
}

.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.card-grid li {
  min-width: 0;
}

.card-button {
  position: relative;
  width: 100%;
  min-height: 7.4rem;
  overflow: hidden;
  padding: 1rem 3rem 1rem 1rem;
  text-align: left;
}

.card-button::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 3px;
  background: linear-gradient(to bottom, var(--aether), var(--aether-violet));
  opacity: 0.42;
  content: "";
}

.card-button::after {
  position: absolute;
  top: 50%;
  right: 1rem;
  display: grid;
  width: 1.8rem;
  height: 1.8rem;
  transform: translateY(-50%);
  place-items: center;
  border: 1px solid rgb(103 232 255 / 25%);
  border-radius: 50%;
  background:
    linear-gradient(var(--aether), var(--aether)) center / 10px 2px no-repeat,
    linear-gradient(var(--aether), var(--aether)) center / 2px 10px no-repeat;
  content: "";
}

.card-button[aria-pressed="true"] {
  border-color: var(--aether);
  background:
    linear-gradient(145deg, rgb(24 58 78 / 98%), rgb(34 28 69 / 98%)),
    var(--surface-raised);
  box-shadow: inset 0 0 0 1px rgb(103 232 255 / 24%), 0 0 1.8rem rgb(65 181 233 / 17%);
}

.card-button[aria-pressed="true"]::before {
  width: 5px;
  opacity: 1;
  box-shadow: 0 0 1rem rgb(103 232 255 / 70%);
}

.card-button[aria-pressed="true"]::after {
  border-color: transparent;
  background: var(--aether);
  box-shadow: 0 0 1rem rgb(103 232 255 / 45%);
}

.game-label {
  display: block;
  color: var(--aether);
}

.card-title {
  display: block;
  margin-top: 0.45rem;
  color: #fff;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 4vw, 1.65rem);
  font-weight: 800;
  letter-spacing: 0.015em;
  line-height: 1.1;
}

.result-banner {
  position: relative;
  overflow: hidden;
  margin-bottom: 1rem;
  padding: 1.15rem 1.2rem 1.2rem;
  border: 1px solid;
  border-left-width: 5px;
  border-radius: 0.8rem;
  background: var(--surface-raised);
}

.result-banner::after {
  position: absolute;
  top: -4rem;
  right: -3rem;
  width: 12rem;
  height: 12rem;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.07;
  filter: blur(1rem);
  content: "";
}

.result-banner.correct {
  border-color: rgb(108 231 161 / 56%);
  background: linear-gradient(135deg, rgb(18 56 44 / 96%), rgb(11 25 26 / 96%));
  color: var(--success);
  box-shadow: 0 0 0 1px rgb(108 231 161 / 8%), 0 0 2rem rgb(46 206 139 / 12%);
}

.result-banner.failed {
  border-color: rgb(255 101 119 / 60%);
  background: linear-gradient(135deg, rgb(63 25 40 / 96%), rgb(29 17 29 / 96%));
  color: var(--danger);
  box-shadow: 0 0 0 1px rgb(255 101 119 / 8%), 0 0 2rem rgb(255 64 104 / 12%);
}

.result-banner.partial {
  border-color: rgb(184 194 211 / 48%);
  background: linear-gradient(135deg, rgb(47 53 65 / 96%), rgb(24 28 37 / 96%));
  color: #d4dae5;
  box-shadow: 0 0 0 1px rgb(184 194 211 / 7%), 0 0 1.8rem rgb(146 160 184 / 9%);
}

.result-banner.perfect {
  border-color: rgb(247 200 92 / 56%);
  background: linear-gradient(135deg, rgb(56 45 18 / 96%), rgb(26 22 11 / 96%));
  color: var(--perfect);
  box-shadow: 0 0 0 1px rgb(247 200 92 / 8%), 0 0 2rem rgb(247 200 92 / 12%);
}

.result-banner h2 {
  position: relative;
  z-index: 1;
  margin-bottom: 0.35rem;
  color: currentColor;
  font-size: clamp(2.2rem, 9vw, 3.7rem);
  letter-spacing: 0.012em;
  line-height: 1;
  text-shadow: 0 2px 0 rgb(0 0 0 / 36%);
}

.result-banner p:last-child {
  position: relative;
  z-index: 1;
  margin-bottom: 0;
  color: #edf1f7;
  font-size: clamp(1rem, 3vw, 1.12rem);
  line-height: 1.5;
}

.result-banner.correct.animate {
  animation: result-arrival 620ms ease-out both;
}

.result-banner.failed.animate {
  animation: result-arrival 620ms ease-out both;
}

.result-banner.partial.animate {
  animation: result-arrival 620ms ease-out both;
}

.result-banner.perfect.animate {
  animation: result-arrival 620ms ease-out both;
}

@keyframes result-arrival {
  0% {
    opacity: 0;
    transform: translateY(-0.4rem) scale(0.985);
    filter: brightness(1.5);
  }

  65% {
    opacity: 1;
    transform: translateY(0) scale(1.006);
  }

  100% {
    transform: scale(1);
    filter: brightness(1);
  }
}

.bonus-panel {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.bonus-panel h3 {
  max-width: 54rem;
  font-size: clamp(1.85rem, 7vw, 3rem);
}

.bonus-panel > .kicker {
  margin-bottom: 0.55rem;
  color: var(--aether);
}

.bonus-panel > .helper-text + .kicker {
  margin-top: 1.6rem;
  padding-top: 1.35rem;
  border-top: 1px solid var(--border);
}

.selection-progress {
  display: inline-flex;
  margin: 1rem 0;
  padding: 0.35rem 0.7rem;
  border: 1px solid rgb(247 200 92 / 24%);
  border-radius: 999px;
  background: rgb(247 200 92 / 7%);
  color: var(--essence);
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.order-choice-list,
.steps-order {
  display: grid;
  gap: 0.8rem;
}

.order-choice-list {
  grid-auto-rows: 1fr;
}

.order-choice-list > li {
  height: 100%;
}

.order-choice {
  width: 100%;
  height: 100%;
  min-height: 7.25rem;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0.9rem;
  padding: 1rem;
  border-width: 1px;
  text-align: left;
}

.order-choice[aria-pressed="true"] {
  border-color: var(--aether);
  background: linear-gradient(145deg, rgb(27 65 85 / 96%), rgb(43 31 78 / 96%));
  box-shadow: inset 0 0 0 1px rgb(103 232 255 / 20%), 0 0 1.6rem rgb(103 232 255 / 13%);
}

.order-rank {
  display: grid;
  width: 2.9rem;
  height: 2.9rem;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgb(163 187 222 / 32%);
  border-radius: 0.65rem;
  background: linear-gradient(145deg, #202941, #131827);
  color: var(--muted-strong);
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 900;
  line-height: 1;
}

.order-choice[aria-pressed="true"] .order-rank {
  border-color: transparent;
  background: linear-gradient(145deg, var(--aether), var(--aether-violet));
  color: #071016;
  box-shadow: 0 0 1rem rgb(103 232 255 / 35%);
}

.order-text {
  margin: 0;
  padding-top: 0.15rem;
  color: #f4f7fb;
  font-size: clamp(1.03rem, 4.4vw, 1.28rem);
  font-weight: 600;
  line-height: 1.4;
}

.final-map-name {
  margin-bottom: 1.5rem;
  background: linear-gradient(100deg, #fff, #bdefff 55%, #c7b9ff);
  background-clip: text;
  color: transparent;
  font-size: clamp(2.7rem, 12vw, 5rem);
  letter-spacing: 0.01em;
  line-height: 0.96;
  text-transform: uppercase;
}

.steps-order li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  min-height: 5rem;
  padding: 0.8rem;
  border: 1px solid var(--border);
  border-radius: 0.7rem;
  background: linear-gradient(145deg, rgb(25 32 50 / 94%), rgb(13 18 30 / 96%));
  color: #eef2f8;
  font-size: clamp(0.98rem, 3vw, 1.08rem);
  line-height: 1.42;
}

.step-tick {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border: 1px solid rgb(108 231 161 / 30%);
  border-radius: 50%;
  background: rgb(108 231 161 / 9%);
  color: var(--success);
  font-size: 1.25rem;
  font-weight: 900;
  line-height: 1;
}

.loading-panel,
.error-panel,
.noscript {
  text-align: center;
}

.loading-panel h2,
.error-panel h2 {
  font-size: clamp(2rem, 8vw, 3.2rem);
}

.error-panel code {
  color: var(--essence);
}

.noscript {
  width: min(100% - 2rem, 45rem);
  margin: 1rem auto;
  color: var(--danger);
}

@media (min-width: 22rem) {
  .site-header,
  .app-shell {
    width: min(100% - 2rem, 74rem);
  }

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

  .card-button {
    min-height: 6.75rem;
  }
}

@media (max-width: 35rem) {
  .site-header {
    grid-template-columns: 1fr;
    gap: 0.45rem;
    padding-block: 0.7rem 0.65rem;
  }

  .app-shell {
    padding-block: 0.5rem 2rem;
  }

  .panel {
    padding: 0.85rem;
  }

  .header-meta {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .streak-display {
    gap: 0.3rem;
    padding: 0.23rem 0.3rem 0.23rem 0.58rem;
    font-size: 0.73rem;
  }

  .streak-display strong {
    min-width: 1.5rem;
    min-height: 1.5rem;
    font-size: 0.7rem;
  }

  .brand-logo {
    width: 3.55rem;
    height: 3.55rem;
  }

  .eyebrow {
    max-width: none;
    font-size: 0.73rem;
    letter-spacing: 0.095em;
  }

  h1 {
    font-size: clamp(2.1rem, 9vw, 2.3rem);
  }

  .screen-heading {
    margin-bottom: 1rem;
  }

  .screen-heading .kicker {
    margin-bottom: 0.4rem;
  }

  .screen-heading h2 {
    margin-bottom: 0.45rem;
    font-size: clamp(1.8rem, 7.5vw, 2.15rem);
    line-height: 1;
  }

  .screen-heading > p:last-child,
  .helper-text {
    font-size: 0.94rem;
    line-height: 1.45;
  }

  .clue-list,
  .order-choice-list,
  .steps-order {
    gap: 0.65rem;
  }

  .clue-card {
    padding: 0.85rem;
  }

  .clue-number {
    margin-bottom: 0.55rem;
  }

  .clue-text {
    font-size: 1rem;
    line-height: 1.4;
  }

  .actions {
    gap: 0.55rem;
    margin-top: 0.85rem;
  }

  .actions .button {
    flex-basis: 100%;
  }

  .button {
    min-height: 3rem;
    padding: 0.7rem 0.8rem;
    font-size: 0.94rem;
    line-height: 1.15;
  }

  .card-grid {
    gap: 0.65rem;
  }

  .card-button {
    padding: 0.85rem 2.6rem 0.85rem 0.85rem;
  }

  .card-button::after {
    right: 0.75rem;
    width: 1.65rem;
    height: 1.65rem;
  }

  .card-title {
    margin-top: 0.35rem;
    font-size: 1.25rem;
  }

  .result-banner {
    padding: 0.9rem 1rem 1rem;
  }

  .result-banner h2 {
    font-size: 2rem;
  }

  .result-banner p:last-child {
    font-size: 0.96rem;
    line-height: 1.4;
  }

  .bonus-panel {
    margin-top: 1.1rem;
    padding-top: 1.1rem;
  }

  .bonus-panel h3 {
    margin-bottom: 0.45rem;
    font-size: clamp(1.65rem, 6.6vw, 2rem);
    line-height: 1;
  }

  .selection-progress {
    margin: 0.75rem 0;
    font-size: 0.84rem;
  }

  .order-choice {
    gap: 0.7rem;
    padding: 0.8rem;
  }

  .order-rank {
    width: 2.65rem;
    height: 2.65rem;
    font-size: 1.15rem;
  }

  .order-text {
    font-size: 1rem;
    line-height: 1.35;
  }

  .final-map-name {
    margin-bottom: 1.1rem;
    font-size: clamp(2.35rem, 10.5vw, 3.2rem);
  }

  .steps-order li {
    gap: 0.6rem;
    min-height: 4.5rem;
    padding: 0.7rem;
    font-size: 0.94rem;
    line-height: 1.35;
  }

  .steps-order .order-rank {
    width: 2.5rem;
    height: 2.5rem;
  }

  .step-tick {
    width: 1.8rem;
    height: 1.8rem;
    font-size: 1.1rem;
  }

  #replay-puzzle {
    font-size: 0.88rem;
    line-height: 1.15;
  }
}

@media (min-width: 22rem) and (max-width: 35rem) {
  .actions .button {
    min-width: 0;
    flex: 1 1 0;
  }
}

@media (min-width: 48rem) {
  .site-header {
    padding-block: 1.4rem 1.1rem;
  }

  .app-shell {
    padding-block: 1rem 4rem;
  }

  .clue-list,
  .order-choice-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .clue-card {
    min-height: 9.25rem;
    padding: 1.2rem;
  }

  .clue-card.is-hidden {
    min-height: 9.25rem;
  }

  .card-button {
    min-height: 8rem;
  }

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

  .order-choice {
    min-height: 11.5rem;
    flex-direction: column;
    padding: 1.2rem;
  }

  .order-text {
    font-size: 1.18rem;
  }

  .steps-order li {
    padding: 1rem;
  }
}

@media (min-width: 68rem) {
  .card-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
