:root {
  --hangman-ink: #253b3b;
  --hangman-ink-soft: #4b5e59;
  --hangman-cream: #fff4cf;
  --hangman-parchment: #f5dfad;
  --hangman-parchment-dark: #d9b86f;
  --hangman-wood: #8a4e2d;
  --hangman-wood-dark: #553421;
  --hangman-teal: #216b67;
  --hangman-teal-dark: #164c4a;
  --hangman-gold: #f2bd4c;
  --hangman-coral: #c94f3d;
  --hangman-success: #216b4d;
  --hangman-danger: #9f3d35;
  --hangman-shadow: 0 18px 40px rgba(25, 58, 55, 0.2);
}

.hangman-page {
  position: relative;
  isolation: isolate;
  min-height: calc(100vh - 9rem);
  min-height: calc(100svh - 9rem);
  overflow-x: clip;
  overflow-y: visible;
  padding-block: clamp(1.5rem, 3vw, 2.25rem) clamp(3rem, 7vw, 5rem);
  color: var(--hangman-ink);
  background:
    linear-gradient(180deg, rgba(178, 226, 222, 0.2), rgba(255, 231, 173, 0.7) 44%, rgba(78, 126, 83, 0.28)),
    radial-gradient(circle at 15% 18%, rgba(255, 246, 196, 0.9) 0 8rem, transparent 18rem),
    #a9d8cd;
}

.hangman-page::before,
.hangman-page::after {
  position: absolute;
  z-index: -1;
  right: -8rem;
  bottom: -4rem;
  left: -8rem;
  height: 19rem;
  content: "";
  background: #527859;
  clip-path: polygon(0 66%, 7% 38%, 13% 58%, 21% 23%, 28% 63%, 37% 35%, 46% 64%, 56% 26%, 64% 56%, 72% 33%, 81% 66%, 91% 28%, 100% 62%, 100% 100%, 0 100%);
  opacity: 0.26;
}

.hangman-page::after {
  bottom: -7rem;
  transform: scaleX(-1);
  background: #285a50;
  opacity: 0.22;
}

.hangman-sky {
  position: absolute;
  z-index: -1;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.hangman-sky__cloud {
  position: absolute;
  width: 13rem;
  height: 3.2rem;
  border-radius: 999px;
  background: rgba(255, 250, 222, 0.34);
  filter: blur(1px);
  animation: hangman-cloud-drift 24s ease-in-out infinite alternate;
}

.hangman-sky__cloud::before,
.hangman-sky__cloud::after {
  position: absolute;
  bottom: 0;
  border-radius: 50%;
  content: "";
  background: inherit;
}

.hangman-sky__cloud::before { left: 2rem; width: 5rem; height: 5rem; }
.hangman-sky__cloud::after { right: 2rem; width: 7rem; height: 7rem; }
.hangman-sky__cloud--one { top: 6rem; left: -4rem; }
.hangman-sky__cloud--two { top: 17rem; right: -5rem; animation-delay: -9s; animation-direction: alternate-reverse; }

.hangman-layout {
  display: grid;
  gap: clamp(1rem, 2.5vw, 1.6rem);
  width: min(1240px, calc(100% - 2rem));
}

.hangman-hero {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(0.8rem, 2vw, 1.4rem);
  min-height: 9rem;
  padding: clamp(1.1rem, 3vw, 1.8rem) clamp(1.2rem, 4vw, 2.4rem);
  overflow: hidden;
  border: 5px solid #653a25;
  border-radius: 1.4rem;
  color: #fff9df;
  background:
    linear-gradient(90deg, transparent 0 12%, rgba(255, 255, 255, 0.07) 12% 13%, transparent 13% 65%, rgba(255, 255, 255, 0.06) 65% 66%, transparent 66%),
    linear-gradient(180deg, #a76336, #7f452b 47%, #6c3b27 53%, #8c5030);
  box-shadow: inset 0 0 0 2px rgba(242, 189, 76, 0.48), inset 0 -8px 0 rgba(68, 35, 23, 0.22), var(--hangman-shadow);
}

.hangman-hero::before,
.hangman-hero::after {
  position: absolute;
  top: 50%;
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 50%;
  content: "";
  transform: translateY(-50%);
  background: radial-gradient(circle at 35% 35%, #f4d78f, #80552e 62%, #3c2a20 64%);
  box-shadow: 0 0 0 4px rgba(63, 36, 24, 0.2);
}

.hangman-hero::before { left: 0.55rem; }
.hangman-hero::after { right: 0.55rem; }

.hangman-hero__crest {
  display: grid;
  width: clamp(4.3rem, 9vw, 6.1rem);
  aspect-ratio: 1;
  place-items: center;
  border: 3px solid #f1ca69;
  border-radius: 50%;
  background: #2a6561;
  box-shadow: inset 0 0 0 5px #174f4b, 0 5px 0 rgba(61, 32, 20, 0.26);
}

.hangman-hero__crest svg { width: 68%; fill: none; stroke: #f5d77d; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }

.hangman-kicker,
.hangman-puzzle__overline,
.hangman-adventure__eyebrow,
.hangman-journal__eyebrow {
  margin: 0 0 0.2rem;
  color: #f3cc70;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hangman-hero h1 {
  max-width: none;
  margin: 0 0 0.35rem;
  color: #fff8d9;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4.6vw, 3.75rem);
  line-height: 0.95;
  letter-spacing: -0.035em;
  text-shadow: 0 4px 0 rgba(67, 34, 21, 0.38);
}

.hangman-hero__lead {
  max-width: 47rem;
  margin: 0;
  color: #f9eaca;
  font-size: clamp(0.9rem, 1.6vw, 1.06rem);
  font-weight: 650;
  line-height: 1.45;
}

.hangman-hero__runes {
  align-self: stretch;
  display: flex;
  align-items: center;
  padding-left: 1.4rem;
  border-left: 2px solid rgba(245, 211, 125, 0.35);
  color: #f5d37d;
  font-family: Georgia, serif;
  font-size: clamp(0.85rem, 1.5vw, 1.1rem);
  writing-mode: vertical-rl;
}

.hangman-game {
  display: grid;
  grid-template-columns: minmax(20rem, 0.88fr) minmax(0, 1.25fr);
  overflow: hidden;
  border: 5px solid rgba(70, 48, 31, 0.9);
  border-radius: 1.75rem;
  background: #386b5c;
  box-shadow: var(--hangman-shadow), inset 0 0 0 2px rgba(247, 207, 112, 0.2);
}

.hangman-adventure {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-width: 0;
  padding: clamp(0.8rem, 2vw, 1.15rem);
  background:
    radial-gradient(circle at 20% 8%, rgba(251, 220, 139, 0.18), transparent 13rem),
    #2e665c;
}

.hangman-adventure__heading {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.2rem 0.3rem 0.8rem;
  color: white;
}

.hangman-adventure__heading h2 {
  margin: 0;
  color: #fff5d4;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.35rem, 3vw, 1.8rem);
}

.hangman-attempts {
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 0 0.45rem;
  min-width: 7rem;
  padding: 0.35rem 0.7rem;
  border: 2px solid rgba(246, 213, 132, 0.5);
  border-radius: 999px;
  color: #fff7dc;
  background: rgba(22, 72, 68, 0.75);
}

.hangman-attempts > span { grid-row: 1 / 3; font-family: Georgia, serif; font-size: 1.65rem; font-weight: 900; line-height: 1; }
.hangman-attempts small { max-width: 4rem; font-size: 0.64rem; font-weight: 800; line-height: 1.05; text-transform: uppercase; }

.hangman-illustration {
  position: relative;
  aspect-ratio: 16 / 9;
  align-self: center;
  min-width: 0;
  overflow: hidden;
  border: 3px solid #e5bb60;
  border-radius: 1.25rem;
  background: #6fb8cb;
  box-shadow: inset 0 0 0 4px rgba(66, 50, 31, 0.28), 0 12px 25px rgba(18, 53, 48, 0.3);
}

.hangman-scene {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hangman-scene__background,
.hangman-idun__image,
.hangman-scene__gallows-art {
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

.hangman-scene__background {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 58%;
}

.hangman-idun {
  position: absolute;
  z-index: 2;
  bottom: 1%;
  left: 2%;
  width: 30%;
  aspect-ratio: 1;
}

.hangman-idun__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 160ms ease-out;
}

.hangman-idun[data-idun-state="neutral"] [data-idun-image="neutral"],
.hangman-idun[data-idun-state="worried"] [data-idun-image="worried"],
.hangman-idun[data-idun-state="happy"] [data-idun-image="happy"],
.hangman-idun[data-idun-state="sad"] [data-idun-image="sad"] {
  opacity: 1;
}

.hangman-scene__gallows {
  position: absolute;
  z-index: 1;
  right: 3%;
  bottom: 2%;
  width: 38%;
  aspect-ratio: 1;
}

.hangman-scene__gallows-art,
.hangman-figure {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hangman-scene__gallows-art {
  object-fit: contain;
}

.hangman-figure {
  overflow: visible;
  fill: none;
  stroke: #241812;
  stroke-width: 10;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 1.5px rgba(255, 246, 211, 0.92)) drop-shadow(0 2px 2px rgba(32, 28, 20, 0.3));
}

.hangman-mist {
  position: absolute;
  right: -15%;
  bottom: -8%;
  left: -15%;
  height: 20%;
  border-radius: 50%;
  background: rgba(234, 239, 210, 0.18);
  filter: blur(12px);
  animation: hangman-mist 7s ease-in-out infinite alternate;
}

.hangman-stage {
  opacity: 0;
  transition: opacity 180ms ease-out;
}

.hangman-stage.is-visible { opacity: 1; }
.hangman-layout[data-round-status="won"] .hangman-illustration { box-shadow: inset 0 0 0 4px rgba(66, 50, 31, 0.28), 0 0 0 5px rgba(246, 207, 98, 0.52), 0 12px 25px rgba(18, 53, 48, 0.3); }

.hangman-progress { padding: 0.8rem 0.2rem 0.1rem; }
.hangman-progress__label { display: flex; justify-content: space-between; margin-bottom: 0.45rem; color: #f9edcb; font-size: 0.76rem; font-weight: 800; letter-spacing: 0.02em; }
.hangman-progress__runes { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0.35rem; }
.hangman-progress__runes span { display: grid; aspect-ratio: 1.65; place-items: center; border: 2px solid rgba(239, 209, 135, 0.32); border-radius: 0.45rem; color: rgba(255, 244, 213, 0.65); background: rgba(19, 69, 62, 0.7); font-family: Georgia, serif; transition: 180ms ease; }
.hangman-progress__runes span.is-active { border-color: #efb84d; color: #5b3324; background: #f3c35c; box-shadow: 0 0 0 2px rgba(255, 229, 150, 0.18); transform: translateY(-2px); }

.hangman-puzzle {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: stretch;
  gap: clamp(0.9rem, 2vw, 1.25rem);
  padding: clamp(1rem, 3.2vw, 2.25rem);
  background:
    linear-gradient(rgba(115, 80, 43, 0.055) 1px, transparent 1px),
    radial-gradient(circle at 88% 90%, rgba(190, 114, 49, 0.16), transparent 14rem),
    #f7e6b8;
  background-size: 100% 2.35rem, auto, auto;
}

.hangman-puzzle::before {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  box-shadow: inset 16px 0 25px rgba(91, 55, 29, 0.12), inset 0 0 50px rgba(160, 104, 45, 0.11);
}

.hangman-puzzle__plank {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.75rem;
  width: min(100%, 35rem);
  margin-inline: auto;
  padding: 0.75rem clamp(0.8rem, 2vw, 1.3rem);
  border: 3px solid #603823;
  border-radius: 0.75rem;
  color: #fff0c7;
  text-align: center;
  background: linear-gradient(180deg, #a86135, #79432a);
  box-shadow: inset 0 0 0 2px rgba(242, 189, 76, 0.25), 0 8px 0 rgba(93, 55, 34, 0.16);
}

.hangman-puzzle__plank h2 { margin: 0; color: #fff8dd; font-family: Georgia, serif; font-size: clamp(1.2rem, 2.5vw, 1.6rem); }
.hangman-puzzle__overline { color: #f2ca6c; font-size: 0.62rem; }
.hangman-puzzle__plank > span { color: #f3cf70; }

.hangman-message {
  position: relative;
  display: flex;
  min-height: 3.6rem;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1rem;
  border: 2px dashed rgba(91, 64, 35, 0.32);
  border-radius: 0.8rem;
  color: var(--hangman-ink);
  background: rgba(255, 250, 222, 0.6);
  font-weight: 800;
  line-height: 1.35;
  text-align: center;
}

.hangman-message:empty { display: none; }
.hangman-message[data-tone="success"] { border-color: rgba(33, 107, 77, 0.45); color: var(--hangman-success); background: rgba(211, 235, 188, 0.64); }
.hangman-message[data-tone="danger"] { border-color: rgba(159, 61, 53, 0.38); color: var(--hangman-danger); background: rgba(247, 206, 172, 0.58); }

.hangman-word-wrap { position: relative; display: grid; min-height: 5rem; place-items: center; }
.hangman-word { position: relative; z-index: 1; display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(0.35rem, 1vw, 0.6rem); }

.hangman-word__letter {
  position: relative;
  display: inline-flex;
  min-width: clamp(2.4rem, 4.7vw, 3.25rem);
  min-height: clamp(3.15rem, 6vw, 4rem);
  align-items: center;
  justify-content: center;
  padding: 0.3rem;
  border: 3px solid #8d5a34;
  border-radius: 0.65rem;
  color: #fdf3ce;
  background:
    linear-gradient(90deg, transparent 46%, rgba(255,255,255,.08) 48% 52%, transparent 54%),
    linear-gradient(180deg, #a9653b, #74432b);
  box-shadow: inset 0 0 0 2px rgba(246, 204, 107, 0.2), 0 5px 0 #5c3726, 0 8px 11px rgba(87, 52, 30, 0.22);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.3rem, 3.5vw, 1.95rem);
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.hangman-word__letter[data-letter-state="hidden"] { color: #e8ca82; }
.hangman-word__letter[data-letter-state="missed"] { border-color: #9d4336; color: #fff3d8; background: linear-gradient(180deg, #c66549, #934133); box-shadow: inset 0 0 0 2px rgba(255, 232, 183, 0.22), 0 5px 0 #713228, 0 8px 11px rgba(87, 52, 30, 0.22); }
.hangman-word__letter[data-letter-state="missed"]::after { position: absolute; right: 0.2rem; bottom: 0.15rem; width: 0.42rem; height: 0.42rem; border: 2px solid #ffe4a2; border-radius: 50%; content: ""; }
.hangman-word__letter--space { min-width: clamp(0.5rem, 1.5vw, 1rem); border: 0; background: transparent; box-shadow: none; }

.hangman-keyboard-wrap { position: relative; margin-top: auto; }
.hangman-keyboard-wrap > p { margin: 0 0 0.55rem; color: #6a563d; font-size: 0.74rem; font-weight: 900; letter-spacing: 0.12em; text-align: center; text-transform: uppercase; }
.hangman-keyboard { display: grid; grid-template-columns: repeat(10, minmax(2.3rem, 1fr)); gap: clamp(0.35rem, 0.8vw, 0.55rem); }

.hangman-key {
  position: relative;
  min-height: 2.75rem;
  border: 2px solid #b4894f;
  border-radius: 0.55rem;
  color: #324d48;
  background: linear-gradient(180deg, #fff7d6, #ecd59e);
  box-shadow: 0 4px 0 #c19b61, 0 6px 8px rgba(87, 62, 30, 0.17);
  font-family: inherit;
  font-size: 0.94rem;
  font-weight: 900;
  text-transform: uppercase;
  transition: transform 130ms ease, box-shadow 130ms ease, background 160ms ease;
}

.hangman-key:hover:not(:disabled),
.hangman-key:focus-visible { transform: translateY(-2px); box-shadow: 0 6px 0 #c19b61, 0 8px 11px rgba(87, 62, 30, 0.2); }
.hangman-key:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 2px 0 #c19b61; }
.hangman-key[data-state="correct"] { border-color: #3f7b5a; color: #173f31; background: linear-gradient(180deg, #bfe1a7, #8fc17f); box-shadow: 0 4px 0 #518753; }
.hangman-key[data-state="wrong"] { border-color: #a75d47; color: #722f29; background: linear-gradient(180deg, #f1b18f, #d98064); box-shadow: 0 4px 0 #a44f3f; }
.hangman-key:disabled { cursor: default; opacity: 0.78; }

.hangman-key:focus-visible,
.hangman-next-round:focus-visible,
.hangman-wiki:focus-visible,
#journal-title:focus-visible { outline: 4px solid #1b6f79; outline-offset: 3px; }

.hangman-next-round {
  position: relative;
  align-self: center;
  min-height: 3.25rem;
  margin-top: 0.2rem;
  border: 3px solid #633a24;
  border-radius: 999px;
  padding: 0.7rem 1.3rem;
  color: #fff7d9;
  background: linear-gradient(180deg, #2f8278, #1d5f5b);
  box-shadow: inset 0 0 0 2px rgba(242, 204, 107, 0.28), 0 5px 0 #164440, 0 9px 16px rgba(32, 64, 55, 0.2);
  font: inherit;
  font-weight: 900;
}

.hangman-next-round:hover { filter: brightness(1.07); transform: translateY(-1px); }
.hangman-next-round[hidden] { display: none; }
.hangman-error { margin: 0; color: var(--hangman-danger); font-weight: 800; text-align: center; }

.hangman-confetti { position: absolute; z-index: 3; inset: -7rem -2rem -10rem; overflow: hidden; pointer-events: none; }
.hangman-confetti-piece { position: absolute; top: 2rem; width: 0.75rem; height: 1rem; border-radius: 0.2rem; opacity: 0; background: var(--color, #de7248); }
.hangman-confetti-piece--leaf { width: 0.85rem; height: 1.25rem; border-radius: 80% 0 80% 0; background: #5e9b62; }
.hangman-confetti.is-active .hangman-confetti-piece { animation: hangman-confetti 1800ms ease-out forwards; }

/* Explorer journal result */
.hangman-result {
  position: relative;
  display: none;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  scroll-margin-top: 5.5rem;
  overflow: hidden;
  border: 6px solid #70452a;
  border-radius: 1.5rem;
  background: #e7c982;
  box-shadow: var(--hangman-shadow), inset 0 0 0 2px rgba(255, 240, 190, 0.45);
}

.hangman-result.is-visible { display: grid; animation: hangman-journal-open 500ms cubic-bezier(0.2, 0.8, 0.2, 1); }
.hangman-journal__page { position: relative; min-width: 0; padding: clamp(1.2rem, 4vw, 2.4rem); background: radial-gradient(circle at 20% 15%, rgba(255,255,255,.35), transparent 12rem), linear-gradient(rgba(123,81,41,.06) 1px, transparent 1px), #f4dfaa; background-size: auto, 100% 2.25rem, auto; }
.hangman-journal__page::after { position: absolute; inset: 0; content: ""; pointer-events: none; box-shadow: inset 0 0 55px rgba(120, 74, 34, 0.17); }
.hangman-journal__page--map { border-right: 2px solid rgba(104, 67, 35, 0.3); }
.hangman-journal__page--facts { display: flex; flex-direction: column; justify-content: center; padding-left: clamp(2.5rem, 6vw, 4.5rem); }
.hangman-journal__binding { position: absolute; z-index: 4; top: 0; bottom: 0; left: 50%; width: 1.2rem; transform: translateX(-50%); background: linear-gradient(90deg, rgba(87,50,28,.22), rgba(255,244,203,.45), rgba(87,50,28,.22)); box-shadow: 0 0 15px rgba(79, 48, 27, .2); }
.hangman-journal__binding span { position: absolute; left: 50%; width: 1.8rem; height: 0.65rem; border-radius: 999px; transform: translateX(-50%); background: #70452d; box-shadow: inset 0 2px 0 #a97b4d; }
.hangman-journal__binding span:nth-child(1) { top: 12%; }.hangman-journal__binding span:nth-child(2) { top: 36%; }.hangman-journal__binding span:nth-child(3) { top: 61%; }.hangman-journal__binding span:nth-child(4) { top: 85%; }

.hangman-journal__heading { position: relative; z-index: 1; display: flex; align-items: center; gap: 0.8rem; margin-bottom: 0.75rem; }
.hangman-journal__heading h2 { margin: 0; color: #4b3627; font-family: Georgia, serif; font-size: clamp(1.35rem, 3vw, 2rem); }
.hangman-journal__eyebrow { color: #9c532f; }
.hangman-journal__compass { display: grid; width: 3.4rem; aspect-ratio: 1; flex: 0 0 auto; place-items: center; border: 2px solid #9b643a; border-radius: 50%; color: #9b5331; font-size: 2rem; background: rgba(255, 244, 205, 0.4); }
.hangman-map { position: relative; z-index: 1; padding: 0.6rem; border: 2px solid rgba(114, 75, 41, 0.35); border-radius: 0.8rem; background: rgba(255, 246, 211, 0.55); transform: rotate(-0.6deg); box-shadow: 0 7px 14px rgba(99, 65, 35, 0.14); }
.hangman-map svg { display: block; width: min(100%, 21rem); max-height: 29rem; margin-inline: auto; }
.hangman-map__frame { background: #d8eff8; }
.hangman-map__caption { position: relative; z-index: 1; margin: 0.7rem 0 0; color: #755b42; font-size: 0.72rem; font-style: italic; text-align: center; }
.hangman-marker { fill: #c84d3d; stroke: #fff8db; stroke-width: 4; filter: drop-shadow(0 2px 2px rgba(71,37,24,.5)); }
.hangman-marker-ring { fill: rgba(207, 73, 58, 0.22); stroke: #cc5845; stroke-width: 2; animation: hangman-marker-pulse 1.8s ease-out infinite; transform-box: fill-box; transform-origin: center; }

.hangman-journal__stamp { align-self: flex-end; margin-bottom: -1.1rem; padding: 0.45rem 0.7rem; border: 3px double rgba(168, 70, 48, 0.65); color: rgba(157, 58, 43, 0.72); text-align: center; transform: rotate(5deg); }
.hangman-journal__stamp span { display: block; font-size: 0.55rem; font-weight: 900; letter-spacing: .18em; }.hangman-journal__stamp strong { display: block; font-size: 0.82rem; letter-spacing: .08em; }
.hangman-answer { position: relative; z-index: 1; margin: 0 0 0.6rem; color: #3c4f45; font-family: Georgia, serif; font-size: clamp(2.4rem, 6vw, 4.3rem); font-weight: 900; line-height: 0.95; letter-spacing: -0.04em; }
.hangman-description { position: relative; z-index: 1; margin-bottom: 1.3rem; color: #4f4d3e; font-size: clamp(0.95rem, 1.8vw, 1.08rem); font-weight: 600; }
.hangman-facts-list { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; margin: 0 0 1.2rem; }
.hangman-facts-list > div { padding: 0.75rem; border: 2px solid rgba(121, 77, 38, 0.24); border-radius: 0.65rem; background: rgba(255, 246, 210, 0.42); }
.hangman-facts-list dt { color: #945032; font-size: 0.7rem; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; }
.hangman-facts-list dd { margin: 0.2rem 0 0; color: #354a42; font-family: Georgia, serif; font-size: 1.05rem; font-weight: 800; line-height: 1.25; }
.hangman-journal__note { position: relative; z-index: 1; display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1.15rem; padding: 0.75rem; border-left: 4px solid #ca7b42; background: rgba(226, 183, 101, 0.22); transform: rotate(-0.4deg); }
.hangman-journal__note span { color: #9c5638; font-family: Georgia, serif; font-size: 1.5rem; }.hangman-journal__note p { margin: 0; color: #66533d; font-size: 0.82rem; font-style: italic; font-weight: 700; }
.hangman-wiki { position: relative; z-index: 1; display: inline-flex; align-self: flex-start; align-items: center; justify-content: center; gap: 0.4rem; min-height: 3rem; border: 3px solid #614129; border-radius: 999px; padding: 0.65rem 1.1rem; color: #fff6d8; background: #2a6b63; box-shadow: 0 4px 0 #184b47; font-weight: 900; line-height: 1.25; text-decoration: none; }
.hangman-wiki:hover { filter: brightness(1.08); }

@keyframes hangman-cloud-drift { to { transform: translateX(5rem); } }
@keyframes hangman-mist { to { transform: translateX(8%) scale(1.05); opacity: .6; } }
@keyframes hangman-confetti { 0% { opacity: 0; transform: translate3d(0, 0, 0) rotate(0); } 12% { opacity: 1; } 100% { opacity: 0; transform: translate3d(var(--drift), 20rem, 0) rotate(var(--spin)); } }
@keyframes hangman-journal-open { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes hangman-marker-pulse { 0% { opacity: .9; transform: scale(.7); } 75%, 100% { opacity: 0; transform: scale(1.65); } }

@media (max-width: 940px) {
  .hangman-game { grid-template-columns: minmax(17rem, 0.82fr) minmax(0, 1.18fr); }
  .hangman-keyboard { grid-template-columns: repeat(8, minmax(2.25rem, 1fr)); }
  .hangman-hero__runes { display: none; }
  .hangman-hero { grid-template-columns: auto minmax(0, 1fr); }
}

@media (max-width: 760px) {
  .hangman-layout { width: min(100% - 1rem, 42rem); }
  .hangman-page { padding-top: 1.5rem; }
  .hangman-hero { min-height: 0; border-width: 4px; border-radius: 1.1rem; }
  .hangman-hero__crest { width: 4.25rem; }
  .hangman-game { grid-template-columns: 1fr; border-width: 4px; border-radius: 1.2rem; }
  .hangman-adventure { grid-template-columns: minmax(0, 1fr); }
  .hangman-illustration { width: min(100%, 31rem); margin-inline: auto; }
  .hangman-scene__gallows { width: 40%; }
  .hangman-puzzle { min-height: 34rem; }
  .hangman-result { grid-template-columns: 1fr; border-width: 4px; }
  .hangman-journal__page--map { border-right: 0; border-bottom: 2px solid rgba(104, 67, 35, 0.3); }
  .hangman-journal__binding { display: none; }
  .hangman-journal__page--facts { padding-left: clamp(1.5rem, 6vw, 2.5rem); }
  .hangman-map svg { max-height: 25rem; }
}

@media (max-width: 520px) {
  .hangman-page { padding-top: 0.35rem; padding-bottom: 2rem; }
  .hangman-layout { width: calc(100% - 0.75rem); gap: 0.4rem; }
  .hangman-hero {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.55rem;
    padding: 0.3rem 0.55rem;
    border-width: 2px;
    border-radius: 0.75rem;
    text-align: left;
  }
  .hangman-hero__crest { width: 2.2rem; margin-inline: 0; border-width: 2px; box-shadow: inset 0 0 0 3px #174f4b, 0 3px 0 rgba(61, 32, 20, 0.26); }
  .hangman-hero h1 { margin: 0; font-size: clamp(1.05rem, 5vw, 1.3rem); line-height: 1; text-shadow: 0 2px 0 rgba(67, 34, 21, 0.38); }
  .hangman-kicker,
  .hangman-hero__lead { display: none; }
  .hangman-game { border-width: 3px; border-radius: 0.9rem; }
  .hangman-adventure { grid-template-columns: minmax(0, 1fr); padding: 0.3rem; }
  .hangman-adventure__heading { align-items: center; gap: 0.5rem; padding: 0 0 0.25rem; }
  .hangman-adventure__heading h2 { font-size: 1rem; line-height: 1.1; }
  .hangman-adventure__eyebrow { display: none; }
  .hangman-attempts { min-width: 5.35rem; padding: 0.15rem 0.45rem; border-width: 1px; }
  .hangman-attempts > span { font-size: 1.2rem; }
  .hangman-attempts small { max-width: none; font-size: 0.54rem; }
  .hangman-illustration { display: grid; width: 100%; height: clamp(8.5rem, 39vw, 10rem); place-items: center; border-width: 2px; border-radius: 0.65rem; }
  .hangman-scene__gallows { width: auto; height: 92%; }
  .hangman-progress { padding: 0.25rem 0.1rem 0; }
  .hangman-progress__label { display: none; }
  .hangman-progress__runes { gap: 0.2rem; }
  .hangman-progress__runes span { aspect-ratio: 2.6; border-width: 1px; font-size: 0.8rem; }
  .hangman-puzzle { min-height: 0; gap: 0.3rem; padding: 0.3rem; }
  .hangman-puzzle__plank { gap: 0.3rem; padding: 0.25rem 0.4rem; border-width: 2px; box-shadow: inset 0 0 0 1px rgba(242, 189, 76, 0.25), 0 3px 0 rgba(93, 55, 34, 0.16); }
  .hangman-puzzle__plank h2 { font-size: 1rem; line-height: 1.15; }
  .hangman-puzzle__overline { margin-bottom: 0; font-size: 0.52rem; letter-spacing: 0.1em; }
  .hangman-message { min-height: 2rem; padding: 0.3rem 0.5rem; border-width: 1px; border-radius: 0.5rem; font-size: 0.78rem; line-height: 1.25; }
  .hangman-word-wrap { min-height: 2.4rem; }
  .hangman-word { width: 100%; flex-wrap: nowrap; gap: 0.15rem; }
  .hangman-word__letter { min-width: 0; min-height: 2.35rem; flex: 1 1 0; padding: 0.15rem; border-width: 2px; border-radius: 0.4rem; font-size: clamp(0.85rem, 4vw, 1.15rem); box-shadow: inset 0 0 0 1px rgba(246, 204, 107, 0.2), 0 3px 0 #5c3726, 0 5px 7px rgba(87, 52, 30, 0.22); }
  .hangman-word__letter--space { min-width: 0.3rem; flex: 0 0 0.3rem; }
  .hangman-keyboard-wrap > p { display: none; }
  .hangman-keyboard { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0.25rem; }
  .hangman-key { min-height: 2.75rem; }
  .hangman-puzzle__plank > span { display: none; }
  .hangman-puzzle__plank { grid-template-columns: 1fr; }
  .hangman-next-round { min-height: 2.75rem; margin-top: 0; padding: 0.45rem 1rem; }
  .hangman-facts-list { grid-template-columns: 1fr; }
  .hangman-journal__stamp { margin-bottom: 0.5rem; }
  .hangman-answer { font-size: clamp(2.2rem, 14vw, 3.4rem); }
}

@media (max-width: 520px) and (max-height: 700px) {
  .hangman-hero__crest { width: 2rem; }
  .hangman-illustration { height: 7.75rem; }
}

@media (prefers-reduced-motion: reduce) {
  .hangman-sky__cloud,
  .hangman-mist,
  .hangman-confetti.is-active .hangman-confetti-piece,
  .hangman-marker-ring,
  .hangman-result.is-visible {
    animation: none;
  }

  .hangman-key,
  .hangman-idun__image,
  .hangman-stage,
  .hangman-progress__runes span { transition: none; }
}
