:root {
  --ink: #1d5147;
  --muted: #607973;
  --paper: #fffaf1;
  --line: #dfd1ad;
  --green: #3ca184;
  --deep: #197861;
  --coral: #f47562;
  --yellow: #f4bf45;
  --mint: #e3f3ea;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: #fbf4df radial-gradient(#eadbb9 1.1px, transparent 1.1px);
  background-size: 22px 22px;
  font-family: Arial, "Segoe UI", sans-serif;
}
button,
a {
  font: inherit;
}
.app {
  width: min(1120px, calc(100% - 32px));
  margin: 22px auto 46px;
}
.game-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 17px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}
.brand-icon {
  display: grid;
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  place-items: center;
  border: 2px solid #dccda7;
  border-radius: 18px;
  background: #fff0b7;
  box-shadow: 0 5px 0 #d9cba9;
}
.brand-icon svg {
  width: 40px;
  height: 40px;
  fill: none;
  stroke: var(--deep);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.brand > span:last-child {
  display: grid;
  gap: 2px;
}
.brand b {
  font-size: 21px;
}
.brand small {
  color: var(--muted);
}
.age {
  padding: 12px 18px;
  border: 2px solid var(--line);
  border-radius: 20px;
  background: #fff;
  font-weight: 900;
}
.screen {
  display: none;
}
.screen.is-active {
  display: block;
}
.hero,
.route-card,
.play-card,
.result {
  overflow: hidden;
  border: 2px solid var(--line);
  border-radius: 36px;
  background: var(--paper);
  box-shadow: 0 11px 0 rgba(177, 154, 102, 0.22);
}
.hero {
  display: grid;
  grid-template-columns: 48% 52%;
  min-height: 530px;
}
.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 55px;
}
.eyebrow {
  margin: 0;
  color: #aa642a;
  font:
    900 14px/1.2 Georgia,
    serif;
  letter-spacing: 0.14em;
}
.hero h1,
.section-head h2,
.route-copy h3,
.play-head h2,
.fragment-card h3,
.answers h3,
.result h2 {
  font-family: Georgia, "Times New Roman", serif;
}
.hero h1 {
  margin: 18px 0 22px;
  font-size: clamp(50px, 5.8vw, 74px);
  line-height: 0.96;
  letter-spacing: -0.035em;
}
.hero-copy > p:not(.eyebrow) {
  margin: 0 0 30px;
  color: var(--muted);
  font-size: 22px;
  line-height: 1.5;
}
.hero-art {
  min-height: 530px;
}
.hero-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.primary,
.secondary {
  padding: 18px 25px;
  border: 0;
  border-radius: 19px;
  font-weight: 900;
  font-size: 18px;
  cursor: pointer;
}
.primary {
  color: #fff;
  background: var(--coral);
  box-shadow: 0 7px 0 #c74e3f;
}
.secondary {
  border: 2px solid var(--green);
  color: var(--ink);
  background: #fff;
}
.rule {
  display: flex;
  align-items: center;
  gap: 22px;
  margin: 24px 0 42px;
  padding: 22px 28px;
  border: 2px dashed var(--line);
  border-radius: 26px;
  background: rgba(255, 250, 241, 0.9);
}
.rule-loupe {
  position: relative;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border: 6px solid var(--green);
  border-radius: 50%;
}
.rule-loupe:after {
  content: "";
  position: absolute;
  width: 20px;
  height: 6px;
  right: -17px;
  bottom: -9px;
  border-radius: 5px;
  background: var(--green);
  transform: rotate(45deg);
}
.rule b {
  font-size: 20px;
}
.rule p {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.45;
}
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 18px;
}
.section-head h2 {
  margin: 8px 0 0;
  font-size: 50px;
}
.section-head > p {
  color: var(--muted);
}
.route-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}
.route-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  border-radius: 29px;
}
.route-preview {
  position: relative;
  display: flex;
  height: 220px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 22px;
  background: var(--route);
}
.route-preview span {
  position: relative;
  display: grid;
  width: 30%;
  height: 150px;
  place-items: center;
  border-radius: 21px;
  background: #fff;
}
.route-preview img {
  width: 88%;
  height: 88%;
  object-fit: contain;
}
.route-preview .mini-loupe {
  position: absolute;
  right: 18px;
  bottom: 18px;
  width: 44px;
  height: 44px;
  border: 5px solid #fff;
  border-radius: 50%;
  background: transparent;
  box-shadow: 0 0 0 4px var(--green);
}
.route-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 27px;
}
.route-copy h3 {
  margin: 10px 0;
  font-size: 33px;
  line-height: 1.05;
}
.route-copy > p:not(.eyebrow) {
  min-height: 72px;
  margin: 0 0 20px;
  color: var(--muted);
  line-height: 1.45;
}
.route-progress {
  height: 11px;
  margin-top: auto;
  border-radius: 20px;
  background: #e5ecdc;
  overflow: hidden;
}
.route-progress i,
.progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
}
.route-copy button {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  margin-top: 17px;
  padding: 18px;
  border: 0;
  border-radius: 18px;
  color: #fff;
  background: var(--green);
  box-shadow: 0 7px 0 var(--deep);
  font-weight: 900;
  text-align: left;
  cursor: pointer;
}
.play-card {
  padding: 30px;
}
.play-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
}
.play-head > button {
  width: 52px;
  height: 52px;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  font-size: 25px;
  cursor: pointer;
}
.play-head h2 {
  margin: 6px 0 0;
  font-size: 39px;
}
.round {
  display: grid;
  width: 72px;
  height: 62px;
  place-items: center;
  border: 2px solid #beddd3;
  border-radius: 18px;
  background: #fff;
  text-align: center;
}
.round b {
  display: block;
  font-size: 24px;
}
.progress {
  height: 12px;
  margin: 22px 0;
  border-radius: 99px;
  background: #e6eddd;
  overflow: hidden;
}
.task-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.78fr) minmax(0, 1.35fr);
  gap: 22px;
}
.fragment-card,
.answers {
  padding: 23px;
  border: 2px solid #c5dfd5;
  border-radius: 28px;
  background: #e8f5ee;
}
.fragment-card {
  text-align: center;
}
.fragment-stage {
  position: relative;
  display: grid;
  height: 310px;
  place-items: center;
  margin: 12px 0;
  border-radius: 24px;
  background: #fff;
  overflow: hidden;
}
.fragment-stage > div {
  width: 100%;
  height: 100%;
  background-color: #fff;
  background-repeat: no-repeat;
  background-size: var(--zoom) auto;
  background-position: var(--x) var(--y);
}
.loupe-ring {
  position: absolute;
  width: 235px;
  height: 235px;
  border: 12px solid #fff7da;
  border-radius: 50%;
  box-shadow:
    0 0 0 7px var(--deep),
    0 13px 0 rgba(35, 80, 69, 0.17);
  pointer-events: none;
}
.loupe-ring:after {
  content: "";
  position: absolute;
  width: 90px;
  height: 22px;
  right: -72px;
  bottom: -34px;
  border: 7px solid #fff7da;
  border-radius: 20px;
  background: var(--deep);
  transform: rotate(42deg);
}
.fragment-card h3 {
  margin: 18px 0 5px;
  font-size: 28px;
}
.fragment-card > p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
}
.answers {
  border-color: #ead396;
  background: #fff5d8;
}
.answers h3 {
  margin: 10px 0 18px;
  font-size: 31px;
}
.option-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.option-grid button {
  min-width: 0;
  padding: 10px;
  border: 3px solid #dfd4b9;
  border-radius: 20px;
  background: #fff;
  cursor: pointer;
  transition:
    transform 0.15s,
    border-color 0.15s;
}
.option-grid button:hover {
  transform: translateY(-2px);
  border-color: #83baa9;
}
.option-grid button:disabled {
  cursor: default;
}
.option-grid span {
  display: flex;
  height: 126px;
  align-items: center;
  justify-content: center;
}
.option-grid img {
  width: 93%;
  height: 93%;
  object-fit: contain;
}
.option-grid b {
  display: block;
  min-height: 40px;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.2;
}
.option-grid button.wrong {
  border-color: var(--coral);
  background: #fff0ec;
  animation: nudge 0.25s;
}
.option-grid button.correct {
  border-color: var(--green);
  background: #e1f5ea;
  box-shadow: 0 5px 0 var(--deep);
}
.option-grid button.hinted {
  border-color: var(--yellow);
  box-shadow: 0 0 0 4px rgba(244, 191, 69, 0.25);
}
.hint {
  width: 100%;
  margin-top: 15px;
  padding: 14px;
  border: 2px solid #e4bd56;
  border-radius: 18px;
  background: #fff0b8;
  color: #765410;
  font-weight: 900;
  cursor: pointer;
}
.hint:disabled {
  opacity: 0.55;
  cursor: default;
}
.feedback {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 17px;
  margin-top: 21px;
  padding: 18px 20px;
  border: 2px solid #acd4c4;
  border-radius: 22px;
  background: #e7f5ed;
}
.feedback > span {
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  border-radius: 16px;
  background: #fff;
  font-size: 24px;
}
.feedback b {
  font-size: 19px;
}
.feedback p {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.4;
}
.feedback button {
  padding: 14px 21px;
  border: 0;
  border-radius: 16px;
  color: #fff;
  background: var(--green);
  font-weight: 900;
  cursor: pointer;
}
.feedback.is-error {
  border-color: #efb1a5;
  background: #fff0ec;
}
.feedback.is-hint {
  border-color: #e5c562;
  background: #fff5cb;
}
.result {
  max-width: 790px;
  margin: 45px auto;
  padding: 58px;
  text-align: center;
  background: linear-gradient(135deg, #fffdf8 0 58%, #e1f3ea 58%);
}
.result > span {
  font-size: 68px;
}
.result h2 {
  margin: 12px 0 15px;
  font-size: 54px;
}
.result > p:not(.eyebrow) {
  color: var(--muted);
  font-size: 20px;
  line-height: 1.5;
}
.result-actions {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 27px;
}
@keyframes nudge {
  50% {
    transform: translateX(6px);
  }
}
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
  }
  .hero-art {
    min-height: 430px;
  }
  .route-grid {
    grid-template-columns: 1fr;
  }
  .route-card {
    display: grid;
    grid-template-columns: 38% 62%;
  }
  .route-preview {
    height: auto;
    min-height: 260px;
  }
  .task-layout {
    grid-template-columns: 1fr;
  }
  .fragment-stage {
    height: 360px;
  }
  .option-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .option-grid span {
    height: 115px;
  }
  .option-grid b {
    font-size: 15px;
  }
  .loupe-ring {
    width: 260px;
    height: 260px;
  }
}
@media (max-width: 650px) {
  .app {
    width: min(100% - 20px, 1120px);
    margin-top: 12px;
  }
  .brand-icon {
    flex-basis: 48px;
    width: 48px;
    height: 48px;
  }
  .brand-icon svg {
    width: 34px;
    height: 34px;
  }
  .brand b {
    font-size: 16px;
  }
  .brand small {
    font-size: 12px;
  }
  .age {
    padding: 9px 11px;
    font-size: 13px;
  }
  .hero,
  .play-card {
    border-radius: 27px;
  }
  .hero-copy {
    padding: 36px 24px;
  }
  .hero h1 {
    font-size: 45px;
  }
  .hero-copy > p:not(.eyebrow) {
    font-size: 18px;
  }
  .hero-art {
    min-height: 315px;
  }
  .rule {
    align-items: flex-start;
    padding: 19px;
  }
  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .section-head h2 {
    font-size: 42px;
  }
  .route-card {
    display: block;
  }
  .route-preview {
    height: 210px;
    min-height: 0;
  }
  .route-copy {
    padding: 24px;
  }
  .play-card {
    padding: 18px 12px;
  }
  .play-head {
    grid-template-columns: auto 1fr;
  }
  .round {
    grid-column: 2;
    justify-self: end;
    width: auto;
    height: auto;
    padding: 8px 13px;
  }
  .play-head h2 {
    font-size: 30px;
  }
  .fragment-card,
  .answers {
    padding: 15px;
  }
  .fragment-stage {
    height: 290px;
  }
  .loupe-ring {
    width: 210px;
    height: 210px;
  }
  .option-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .option-grid span {
    height: 105px;
  }
  .feedback {
    grid-template-columns: auto 1fr;
  }
  .feedback button {
    grid-column: 1/-1;
    width: 100%;
  }
  .result {
    padding: 38px 20px;
  }
  .result h2 {
    font-size: 43px;
  }
  .result-actions {
    flex-direction: column;
  }
}
