:root {
  --ink: #174f43;
  --muted: #647b76;
  --paper: #fffaf1;
  --line: #dfd2af;
  --green: #3ca184;
  --green-dark: #187b66;
  --coral: #f57664;
  --yellow: #f5c34f;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: #fbf5e5 radial-gradient(#ead9ae 1.3px, transparent 1.3px) 0 0 / 20px 20px;
  font-family: Arial, sans-serif;
}
button, a { font: inherit; }
button:focus-visible, a:focus-visible { outline: 4px solid #f7bb48; outline-offset: 4px; }
.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 #d9caa6; border-radius: 18px; background: #fff0b7; box-shadow: 0 5px 0 #d9cba9; }
.brand-icon svg { width: 39px; height: 39px; fill: #fff; stroke: var(--ink); stroke-width: 3; 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, .22); }
.hero { display: grid; grid-template-columns: 48% 52%; min-height: 510px; }
.hero-copy { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: 52px; }
.eyebrow { margin: 0; color: #a75e29; font: 900 14px/1.2 Georgia, serif; letter-spacing: .14em; }
.hero h1, .section-head h2, .route-copy h3, .play-head h2, .object-card h3, .answers h3, .result h2 { font-family: Georgia, "Times New Roman", serif; }
.hero h1 { margin: 18px 0 22px; font-size: clamp(46px, 5vw, 67px); line-height: .98; letter-spacing: -.035em; }
.hero-copy > p:not(.eyebrow) { margin: 0 0 30px; color: var(--muted); font-size: 22px; line-height: 1.48; }
.hero-art { min-height: 510px; }
.hero-art img { display: block; width: 100%; height: 100%; object-fit: cover; }
.primary, .secondary { padding: 18px 25px; border-radius: 19px; font-weight: 900; font-size: 18px; cursor: pointer; }
.primary { border: 0; 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: 20px; margin: 24px 0 42px; padding: 21px 27px; border: 2px dashed var(--line); border-radius: 25px; background: rgba(255, 250, 241, .94); }
.rule-mark { display: grid; flex: 0 0 49px; width: 49px; height: 49px; place-items: center; border-radius: 17px; color: #fff; background: var(--green); font: 900 29px Georgia, serif; box-shadow: 0 5px 0 var(--green-dark); }
.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: 20px; 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 { display: grid; height: 218px; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; padding: 25px 20px; background: var(--route); }
.route-preview span { display: flex; min-width: 0; flex-direction: column; align-items: center; justify-content: center; gap: 8px; border-radius: 21px; background: rgba(255,255,255,.9); }
.route-preview svg { width: 54px; height: 54px; fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.route-preview b { font-size: 13px; text-align: center; }
.route-copy { display: flex; flex: 1; flex-direction: column; padding: 28px 28px 25px; }
.route-copy h3 { min-height: 68px; margin: 10px 0 12px; font-size: 31px; line-height: 1.05; }
.route-copy > p:not(.eyebrow) { min-height: 64px; margin: 0 0 22px; color: var(--muted); line-height: 1.45; }
.route-progress { height: 10px; margin-top: auto; overflow: hidden; border-radius: 99px; background: #e7eddc; }
.route-progress i, .progress i { display: block; height: 100%; border-radius: inherit; background: var(--green); }
.route-copy button { display: grid; width: 100%; grid-template-columns: 1fr auto auto; align-items: center; gap: 16px; margin-top: 17px; padding: 18px 20px; border: 0; border-radius: 18px; color: #fff; background: var(--green); box-shadow: 0 6px 0 var(--green-dark); 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: 48px; height: 48px; border: 2px solid var(--line); border-radius: 16px; color: var(--ink); background: #fff; font-size: 24px; cursor: pointer; }
.play-head h2 { margin: 6px 0 0; font-size: 38px; }
.round { display: grid; min-width: 70px; height: 58px; place-items: center; border: 2px solid #c4ddd4; border-radius: 19px; background: #fff; font-size: 15px; }
.round b { font-size: 24px; }
.progress { height: 11px; margin: 25px 0; overflow: hidden; border-radius: 99px; background: #e4eadb; }
.task-layout { display: grid; grid-template-columns: .72fr 1.28fr; gap: 22px; align-items: stretch; }
.object-card, .answers { min-width: 0; padding: 25px; border: 2px solid #c5ddd4; border-radius: 28px; background: #eff8f3; }
.object-stage { display: grid; height: 330px; margin: 14px 0 17px; place-items: center; border-radius: 23px; background: #fff; }
.object-stage img { display: block; width: 84%; height: 84%; object-fit: contain; }
.object-card h3 { margin: 0; font-size: 31px; text-align: center; }
.answers { display: flex; flex-direction: column; border-color: #e6ce91; background: #fff6d8; }
.answers h3 { margin: 9px 0 19px; font-size: 34px; }
.place-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.place-option { display: flex; min-width: 0; min-height: 168px; flex-direction: column; align-items: center; justify-content: center; gap: 7px; padding: 13px 9px; border: 2px solid #ded4b6; border-radius: 21px; color: var(--ink); background: var(--place); box-shadow: 0 5px 0 #d8cfb5; cursor: pointer; }
.place-option svg { width: 54px; height: 54px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.place-option b { font-size: 18px; }
.place-option small { color: var(--muted); font-size: 13px; text-align: center; }
.place-option:hover { transform: translateY(-2px); }
.place-option.is-wrong { border-color: #f1a596; background: #ffe8e2; animation: shake .25s; }
.place-option.is-correct { border-color: var(--green); color: #fff; background: var(--green); box-shadow: 0 5px 0 var(--green-dark); }
.hint { align-self: center; margin-top: 21px; padding: 14px 24px; border: 2px solid #e7bf53; border-radius: 17px; color: var(--ink); background: #fff0b5; font-weight: 900; cursor: pointer; }
.hint:disabled { opacity: .48; cursor: default; }
.feedback { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 17px; margin-top: 22px; padding: 18px 20px; border: 2px solid #c9ddd3; border-radius: 23px; background: #eef7f2; }
.feedback > span { display: grid; width: 52px; height: 52px; place-items: center; border-radius: 16px; background: #fff; font-size: 27px; }
.feedback b { font-size: 20px; }
.feedback p { margin: 4px 0 0; color: var(--muted); line-height: 1.4; }
.feedback button { padding: 15px 21px; border: 0; border-radius: 16px; color: #fff; background: var(--green); box-shadow: 0 5px 0 var(--green-dark); font-weight: 900; cursor: pointer; }
.feedback.is-wrong { border-color: #f0afa1; background: #fff0eb; }
.feedback.is-hint { border-color: #e6c562; background: #fff5cd; }
.result { padding: 70px 30px; text-align: center; }
.result > span { display: block; margin-bottom: 14px; font-size: 65px; }
.result h2 { margin: 15px 0 14px; font-size: 48px; }
.result > p:not(.eyebrow) { color: var(--muted); font-size: 20px; }
.result-actions { display: flex; justify-content: center; gap: 15px; margin-top: 30px; }
@keyframes shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr 44%; min-height: 440px; }
  .hero-copy { padding: 38px; }
  .hero-art { min-height: 440px; }
  .hero h1 { font-size: clamp(43px, 6.4vw, 58px); }
  .route-grid { gap: 12px; }
  .route-preview { height: 185px; padding: 18px 12px; }
  .route-preview svg { width: 44px; height: 44px; }
  .route-copy { padding: 22px 19px; }
  .route-copy h3 { font-size: 27px; }
  .task-layout { grid-template-columns: .8fr 1.2fr; }
  .place-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .place-option { min-height: 140px; }
}

@media (max-width: 700px) {
  .app { width: min(100% - 18px, 1120px); margin-top: 10px; }
  .game-head { align-items: flex-start; }
  .brand-icon { flex-basis: 48px; width: 48px; height: 48px; }
  .brand b { font-size: 17px; }
  .brand small { font-size: 12px; }
  .age { padding: 10px 12px; font-size: 14px; }
  .hero { grid-template-columns: 1fr; }
  .hero-copy { padding: 34px 27px; }
  .hero h1 { font-size: 45px; }
  .hero-art { min-height: 300px; }
  .rule { align-items: flex-start; padding: 19px; }
  .section-head { align-items: flex-start; flex-direction: column; }
  .section-head h2 { font-size: 41px; }
  .section-head > p { margin: 0; }
  .route-grid { grid-template-columns: 1fr; }
  .route-preview { height: 185px; }
  .route-copy h3, .route-copy > p:not(.eyebrow) { min-height: 0; }
  .play-card { padding: 17px; }
  .play-head { grid-template-columns: auto 1fr; }
  .play-head h2 { font-size: 28px; }
  .round { grid-column: 1 / -1; width: 100%; height: 42px; }
  .task-layout { grid-template-columns: 1fr; }
  .object-stage { height: 265px; }
  .place-grid { grid-template-columns: 1fr; }
  .place-option { display: grid; min-height: 94px; grid-template-columns: 66px 1fr; grid-template-rows: auto auto; justify-items: start; text-align: left; }
  .place-option svg { grid-row: 1 / 3; }
  .feedback { grid-template-columns: auto 1fr; }
  .feedback button { grid-column: 1 / -1; width: 100%; }
  .result { padding: 50px 20px; }
  .result h2 { font-size: 38px; }
  .result-actions { align-items: stretch; flex-direction: column; }
}

@media (max-width: 390px) {
  .hero h1 { font-size: 40px; }
  .hero-copy > p:not(.eyebrow) { font-size: 19px; }
  .route-preview b { font-size: 12px; }
  .object-card, .answers { padding: 18px; }
}
