.pole-game {
  --pole-ink: #272b49;
  --pole-quiet: #534d63;
  --pole-line: #d7c6b8;
  --pole-raspberry: #713d58;
  color: var(--pole-ink);
  margin-bottom: 30px;
}

.pole-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 12px 24px;
  margin-bottom: clamp(16px, 2.5vw, 27px);
}

.pole-header h1 {
  color: var(--pole-ink);
  font-size: clamp(2.55rem, 5.3vw, 4.15rem);
  line-height: 1.02;
  margin: 0 0 4px;
}

.pole-header p {
  color: var(--pole-quiet);
  font-size: clamp(.9rem, 1.55vw, 1.06rem);
}

.pole-book {
  display: grid;
  grid-template-columns: minmax(0, 1.58fr) minmax(0, 1fr);
  border: 1px solid #90809a;
  border-radius: 14px;
  background: #fbf2e4;
  box-shadow: 0 3px #e1d2c5, 0 5px #f3e6d6, 0 7px #d3c0b4, 0 21px 36px #302b421a;
  overflow: hidden;
}

.pole-illustration {
  position: relative;
  isolation: isolate;
  align-self: stretch;
  width: 100%;
  min-width: 0;
  min-height: 420px;
  aspect-ratio: 960 / 680;
  background: #222c52;
  overflow: hidden;
}

.pole-illustration::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset -12px 0 20px -11px #1d183d9e;
}

.pole-illustration > svg,
.pole-illustration > img {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.pole-illustration > img {
  object-fit: cover;
}

.pole-page {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: start;
  justify-content: center;
  min-width: 0;
  padding: clamp(26px, 4vw, 58px);
  border-left: 1px solid #b6a3a0;
  background:
    radial-gradient(ellipse at 49% 33%, #fffaf1, transparent 72%),
    linear-gradient(90deg, #cfb69e 0, #f4e5d3 1.25%, #fbf2e4 4%, #fbf2e4 94%, #f5e7d7);
}

.pole-page::before {
  content: "";
  position: absolute;
  pointer-events: none;
  inset: 13px;
  border: 1px solid #d4b9ac;
  border-radius: 4px 8px 8px 4px;
}

.pole-location {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #743e57;
  font: 750 .76rem / 1.25 var(--sans);
  letter-spacing: .11em;
  text-transform: uppercase;
}

.pole-location::before {
  content: "";
  width: 10px;
  height: 10px;
  background: #ab764a;
  clip-path: polygon(50% 0, 60% 34%, 100% 50%, 60% 63%, 50% 100%, 38% 64%, 0 50%, 38% 36%);
}

.pole-page h2 {
  color: var(--pole-ink);
  font-size: clamp(2rem, 3.05vw, 3.3rem);
  line-height: 1.03;
  margin: 8px 0 16px;
  max-width: 16ch;
  text-wrap: balance;
}

.pole-page h2:focus {
  outline: none;
}

.pole-page h2:focus-visible {
  outline: 1px dashed #8d5f74;
  outline-offset: 5px;
}

.pole-page[data-page="cover"] h2 {
  font-size: clamp(2.48rem, 4.45vw, 4.8rem);
  max-width: 12ch;
  margin-bottom: 18px;
}

.pole-page[data-ending="true"] h2 {
  font-size: clamp(2.3rem, 3.95vw, 4.1rem);
}

.pole-copy {
  font-family: var(--serif);
  font-size: clamp(1.05rem, 1.4vw, 1.25rem);
  line-height: 1.53;
  color: #44374f;
}

.pole-actions {
  display: grid;
  width: 100%;
  gap: 9px;
  margin-top: 21px;
}

.pole-choice,
.pole-sound,
.pole-restart {
  min-height: 44px;
  font-family: var(--sans);
  font-weight: 730;
}

.pole-choice {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 17px;
  align-items: center;
  gap: 11px;
  min-height: 53px;
  padding: 10px 13px;
  border: 1px solid #a8848e;
  border-radius: 8px;
  background: #fffaf0;
  color: #57344e;
  text-align: left;
  line-height: 1.24;
  box-shadow: 0 2px #dbbfbd;
  transition: background-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.pole-choice:hover {
  background: #ffedda;
  transform: translateY(-1px);
  box-shadow: 0 4px #dbbfbd;
}

.pole-choice > svg:last-child {
  opacity: .8;
}

.pole-page[data-page="cover"] .pole-choice,
.pole-page[data-ending="true"] .pole-choice,
.pole-challenge:not([hidden]) + .pole-actions[data-task="false"] .pole-choice {
  background: #733f5d;
  color: #fff2df;
  border-color: #60314c;
  box-shadow: 0 2px #bf8c9f;
}

.pole-page[data-page="cover"] .pole-choice:hover,
.pole-page[data-ending="true"] .pole-choice:hover,
.pole-challenge:not([hidden]) + .pole-actions[data-task="false"] .pole-choice:hover {
  background: #873e5e;
}

.pole-challenge {
  width: 100%;
  margin-top: 14px;
}

.pole-sequence {
  display: flex;
  gap: 7px;
}

.pole-note {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px dashed #a18393;
  border-radius: 50%;
  color: #603b53;
  background: #efe3db;
}

.pole-note span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #9f7f90;
}

.pole-note-lit {
  background: #ffdf96;
  border: 1px solid #b8835f;
}

.pole-response {
  min-height: 2.7em;
  color: #664057;
  margin-top: 8px;
  font: 650 .9rem / 1.35 var(--sans);
}

.pole-challenge:not([hidden]) + .pole-actions {
  margin-top: 10px;
}

.pole-actions[data-task="true"] {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pole-actions[data-task="true"] .pole-choice {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 7px 3px;
  gap: 4px;
  min-height: 60px;
  text-align: center;
  font-size: clamp(.74rem, 1.1vw, .94rem);
  background: #f8e9d9;
}

.pole-actions[data-task="true"] .pole-choice:hover {
  background: #ffdaa9;
}

.pole-sound,
.pole-restart {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  padding: 7px 12px;
  border: 1px solid #cbb3bf;
  border-radius: 8px;
  background: #fffaf1;
  color: #603650;
  font-size: .88rem;
  white-space: nowrap;
}

.pole-sound:hover,
.pole-restart:hover {
  background: #f2e4db;
}

.pole-sound > svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pole-sound span {
  font-weight: 550;
}

.pole-footer,
.pole-collection,
.pole-stamps {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.pole-footer {
  justify-content: space-between;
  gap: 9px 15px;
  padding: 17px 2px 2px;
}

.pole-collection {
  gap: 9px 13px;
  color: #58455b;
  font-size: .91rem;
  font-weight: 650;
}

.pole-stamps {
  list-style: none;
  gap: 5px;
  margin: 0;
  padding: 0;
}

.pole-stamp {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  border: 1px dashed #9e8191;
  border-radius: 50%;
  background: #f2e7df;
  color: #8a687f;
}

.pole-stamp-found {
  border-style: solid;
  background: #ffdda2;
  color: #66374f;
}

.np-aurora { animation: np-aurora 11s ease-in-out infinite alternate; }
.np-snow-far { animation: np-drift 7s ease-in-out infinite alternate; }
.np-snow-near { animation: np-drift 5s ease-in-out -2s infinite alternate; }
.np-glimmer, .np-bulb { animation: np-twinkle 3.25s ease-in-out var(--delay, -.35s) infinite alternate; }
.np-float, .np-steam { animation: np-float 4.7s ease-in-out infinite alternate; }
.np-flame { animation: np-float 1.3s ease-in-out infinite alternate; }
.np-tail { transform-origin: 94% 73%; transform-box: fill-box; animation: np-tail 4s ease-in-out infinite alternate; }
.np-blink { transform-origin: center; transform-box: fill-box; animation: np-blink 6s linear infinite; }
.np-juniper-head .np-blink { animation-delay: -2.5s; }

@keyframes np-aurora {
  from { opacity: .57; transform: translate(-18px, 6px); }
  to { opacity: 1; transform: translate(19px, -6px); }
}

@keyframes np-drift {
  from { transform: translate(-13px, -21px); }
  to { transform: translate(16px, 22px); }
}

@keyframes np-twinkle {
  from { opacity: .6; }
  to { opacity: 1; }
}

@keyframes np-float {
  from { transform: translateY(-4px); }
  to { transform: translateY(5px); }
}

@keyframes np-tail {
  from { transform: rotate(-3deg); }
  to { transform: rotate(6deg); }
}

@keyframes np-blink {
  0%, 44%, 49%, 100% { transform: scaleY(1); }
  46% { transform: scaleY(.1); }
}

@media (max-width: 960px) {
  .pole-header {
    display: grid;
    align-items: center;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 12px;
  }
  .pole-header > div { display: contents; }
  .pole-header h1 { grid-column: 1 / -1; }
  .pole-book { grid-template-columns: 1fr; }
  .pole-illustration { min-height: 0; aspect-ratio: 960 / 650; }
  .pole-illustration::after { box-shadow: inset 0 -12px 20px -11px #1d183d9e; }
  .pole-page {
    border: 0;
    border-top: 1px solid #b6a3a0;
    padding: 25px clamp(22px, 6vw, 36px) 27px;
    background: radial-gradient(ellipse at 49% 33%, #fffaf1, #fbf2e4);
  }
  .pole-page::before { inset: 9px; border-radius: 5px; }
  .pole-page h2,
  .pole-page[data-page="cover"] h2 { max-width: 18ch; }
  .pole-page h2 { margin-bottom: 12px; }
  .pole-page[data-page="cover"] h2 { font-size: clamp(2.12rem, 8.5vw, 2.65rem); }
  .pole-choice { padding-inline: 12px; }
  .pole-actions[data-task="true"] .pole-choice { font-size: .9rem; }
}

@media (max-width: 390px) {
  .pole-header h1 { font-size: 2.2rem; }
  .pole-sound { padding-inline: 8px; font-size: .79rem; }
  .pole-sound > svg { width: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  .pole-illustration svg * { animation: none !important; }
  .pole-choice { transition: none; }
}
