:root {
  color-scheme: light;
  --ink: #214e49;
  --muted: #718580;
  --paper: #fffdf7;
  --line: #ddd4b9;
  --green: #469a77;
  --green-dark: #287259;
  --blue: #397d9b;
  --gold: #edb34a;
  --red: #d86c60;
  --sand: #f2dfa4;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-width: 320px;
  overflow-x: hidden;
}

html {
  background: #f3f4e8;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 8%, rgba(237, 179, 74, .18), transparent 26rem),
    radial-gradient(circle at 92% 17%, rgba(57, 125, 155, .16), transparent 31rem),
    linear-gradient(180deg, #f1f5e9, #fbf6ea 63%, #edf3e9);
}

button {
  min-height: 46px;
  color: inherit;
  font: inherit;
}

button:focus-visible {
  outline: 4px solid rgba(237, 179, 74, .45);
  outline-offset: 3px;
}

.app {
  width: min(1120px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 22px 0 50px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  font-weight: 900;
  letter-spacing: .04em;
  text-decoration: none;
}

.brand:focus-visible {
  border-radius: 18px;
  outline: 4px solid #f0c35a;
  outline-offset: 4px;
}

.brand-mark {
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  border: 2px solid #fff4d6;
  border-radius: 18px;
  color: white;
  background: var(--blue);
  box-shadow: 0 5px 0 #285e72;
  font-size: 27px;
}

.sound-button,
.small-button {
  padding: 0 18px;
  border: 2px solid var(--line);
  border-radius: 15px;
  background: var(--paper);
  cursor: pointer;
  font-weight: 900;
}

.sound-button:hover,
.small-button:hover {
  border-color: #9fc3b2;
  background: #f5fbf7;
}

.hero,
.panel {
  border: 3px solid var(--line);
  border-radius: 38px;
  background: rgba(255, 253, 247, .97);
  box-shadow: 0 18px 42px rgba(64, 78, 58, .11);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, .88fr) minmax(440px, 1.12fr);
  gap: 36px;
  padding: 48px;
}

.eyebrow {
  margin: 0 0 11px;
  color: var(--green-dark);
  font-family: Georgia, serif;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 18px;
  font-size: clamp(44px, 6vw, 68px);
  line-height: .98;
  letter-spacing: -.04em;
}

.lead {
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.52;
}

.note {
  display: flex;
  gap: 10px;
  margin: 0 0 26px;
  padding: 13px 15px;
  border: 1px solid #e1cc84;
  border-radius: 16px;
  color: #6f5a25;
  background: #fff5cf;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
}

.hero-actions,
.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.primary-button,
.secondary-button {
  min-height: 58px;
  padding: 0 26px;
  border-radius: 18px;
  cursor: pointer;
  font-weight: 900;
}

.primary-button {
  border: 0;
  color: white;
  background: var(--green);
  box-shadow: 0 8px 0 var(--green-dark);
}

.primary-button:hover {
  background: #4fa781;
}

.primary-button:active {
  transform: translateY(3px);
  box-shadow: 0 5px 0 var(--green-dark);
}

.secondary-button {
  border: 2px solid var(--line);
  background: var(--paper);
}

.secondary-button:hover {
  border-color: #9fc3b2;
  background: #f5fbf7;
}

.hero-map {
  position: relative;
  min-height: 390px;
  padding: 19px;
  overflow: hidden;
  border: 3px solid white;
  border-radius: 31px;
  background: #b9dce3;
  box-shadow: 0 18px 29px rgba(43, 91, 108, .2);
}

.russia-svg {
  display: block;
  width: 100%;
  height: auto;
}

.map-water {
  fill: #b9dce3;
}

.map-grid {
  fill: none;
  stroke: rgba(255,255,255,.52);
  stroke-width: 1.5;
  stroke-dasharray: 5 9;
}

.russia-land {
  fill: #d8dda0;
  stroke: #647e62;
  stroke-width: 3.4;
  stroke-linejoin: round;
}

.russia-island {
  fill: #d8dda0;
  stroke: #647e62;
  stroke-width: 3.4;
  stroke-linejoin: round;
}

.map-river {
  fill: none;
  stroke: #4c9fc1;
  stroke-width: 3.5;
  stroke-linecap: round;
}

.map-mountains {
  fill: none;
  stroke: #877357;
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 2 10;
}

.map-lake {
  fill: #4c9fc1;
  stroke: #eff2d2;
  stroke-width: 3;
}

.hero-route {
  fill: none;
  stroke: #f6ce57;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 7 6;
}

.hero-pin {
  fill: #265f68;
  stroke: #fff8df;
  stroke-width: 3;
}

.map-passport {
  position: absolute;
  right: 24px;
  bottom: 20px;
  width: 144px;
  padding: 15px;
  border: 3px solid #d1b870;
  border-radius: 10px;
  color: #755d25;
  background: var(--sand);
  box-shadow: 0 8px 15px rgba(73, 58, 26, .22);
  transform: rotate(-4deg);
  text-align: center;
}

.map-passport strong,
.map-passport span {
  display: block;
}

.map-passport strong {
  font-family: Georgia, serif;
  letter-spacing: .12em;
}

.map-passport span {
  margin-top: 8px;
  font-size: 11px;
  font-weight: 900;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin: 52px 0 18px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(34px, 4vw, 50px);
  line-height: 1.04;
}

.section-heading > p {
  max-width: 390px;
  margin-bottom: 4px;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.4;
  text-align: right;
}

.route-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.route-card {
  display: flex;
  min-height: 318px;
  flex-direction: column;
  padding: 27px;
  border: 3px solid var(--line);
  border-radius: 30px;
  background: var(--paper);
  box-shadow: 0 12px 0 #d8d1b9;
}

.route-icon {
  display: grid;
  width: 65px;
  height: 65px;
  margin-bottom: 25px;
  place-items: center;
  border-radius: 21px;
  color: white;
  background: var(--route-color);
  font-size: 34px;
  font-weight: 900;
}

.route-card h3 {
  margin-bottom: 9px;
  font-size: 25px;
  line-height: 1.15;
}

.route-card > p:not(.eyebrow) {
  color: var(--muted);
  font-weight: 700;
  line-height: 1.45;
}

.route-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px dashed var(--line);
}

.route-progress {
  color: var(--route-color);
  font-size: 14px;
  font-weight: 900;
}

.route-start {
  min-height: 48px;
  padding: 0 20px;
  border: 0;
  border-radius: 15px;
  color: white;
  background: var(--route-color);
  box-shadow: 0 5px 0 color-mix(in srgb, var(--route-color) 72%, black);
  cursor: pointer;
  font-weight: 900;
}

.route-start:hover {
  filter: brightness(1.07);
}

.route-start:active {
  transform: translateY(2px);
  box-shadow: 0 3px 0 color-mix(in srgb, var(--route-color) 72%, black);
}

.journal {
  margin-top: 42px;
  padding: 25px;
  border: 2px solid #d4dfcf;
  border-radius: 26px;
  background: #edf5e9;
}

.journal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.journal-head h2 {
  margin: 0;
  font-size: 26px;
}

.stamp-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 8px;
}

.stamp {
  display: grid;
  min-height: 46px;
  place-items: center;
  border: 2px solid #c9d3c2;
  border-radius: 10px;
  color: #8fa08c;
  background: rgba(255,255,255,.72);
  font-size: 12px;
  font-weight: 900;
}

.stamp.done {
  border-color: #6fba96;
  color: white;
  background: var(--green);
}

.game-shell {
  padding: 30px;
}

.game-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 22px;
}

.game-header h1 {
  margin: 0 0 4px;
  font-size: clamp(31px, 4vw, 46px);
}

.game-header p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.progress-row {
  display: flex;
  align-items: center;
  gap: 11px;
}

.progress-track {
  width: min(320px, 34vw);
  height: 13px;
  overflow: hidden;
  border-radius: 99px;
  background: #e7e4d7;
}

.progress-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--green);
}

.progress-text {
  min-width: 48px;
  font-weight: 900;
}

.clue-card {
  margin-bottom: 15px;
  padding: 18px 21px;
  border: 2px solid #e2ca78;
  border-radius: 20px;
  background: #fff5ce;
}

.clue-card p {
  margin: 0;
  color: #6f5924;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.4;
}

.expedition-layout {
  display: grid;
  grid-template-columns: minmax(470px, 1.15fr) minmax(330px, .85fr);
  gap: 20px;
}

.map-panel,
.answer-panel {
  border: 2px solid var(--line);
  border-radius: 27px;
}

.map-panel {
  position: relative;
  min-height: 350px;
  overflow: hidden;
  background: #b9dce3;
}

.map-panel .russia-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.map-point {
  pointer-events: none;
}

.map-point-ring {
  fill: none;
  stroke: transparent;
  stroke-width: 0;
}

.map-point-shadow {
  fill: rgba(29, 64, 67, .38);
}

.map-point-disc {
  fill: #285f68;
  stroke: #fff5d6;
  stroke-width: 7;
}

.map-point text {
  fill: white;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  font-size: 27px;
  font-weight: 900;
}

.map-point.hinted .map-point-ring {
  stroke: rgba(245, 195, 58, .78);
  stroke-width: 12;
}

.map-point.correct .map-point-ring {
  stroke: rgba(115, 205, 143, .78);
  stroke-width: 12;
}

.map-point.correct .map-point-disc {
  fill: var(--green);
}

.map-point.wrong .map-point-disc {
  fill: var(--red);
}

.answer-panel {
  padding: 24px;
  background: #fbfaf3;
}

.question {
  margin: 6px 0 17px;
  font-size: clamp(25px, 3vw, 33px);
  line-height: 1.15;
}

.answers {
  display: grid;
  gap: 11px;
}

.place-option {
  display: grid;
  min-height: 84px;
  grid-template-columns: 48px 1fr;
  align-items: center;
  gap: 13px;
  padding: 13px 15px;
  border: 3px solid #ddd9ca;
  border-radius: 18px;
  background: white;
  box-shadow: 0 5px 0 #d9d5c5;
  cursor: pointer;
  text-align: left;
}

.place-option:hover {
  border-color: #83b4c4;
  background: #f3fafb;
}

.place-option.correct {
  border-color: var(--green);
  color: #226d55;
  background: #e9f7ef;
  box-shadow: 0 5px 0 #9bceb6;
}

.place-option.wrong {
  border-color: #e58c83;
  color: #9b3f37;
  background: #fff0ee;
  box-shadow: 0 5px 0 #e1b0aa;
}

.place-option:disabled {
  cursor: default;
}

.option-number {
  display: grid;
  width: 45px;
  height: 45px;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--blue);
  font-size: 18px;
  font-weight: 900;
}

.option-copy strong,
.option-copy span {
  display: block;
}

.option-copy strong {
  font-size: 18px;
}

.option-copy span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.feedback-zone {
  min-height: 101px;
  margin-top: 16px;
}

.feedback {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 85px;
  padding: 15px 18px;
  border: 2px solid #d5e0d1;
  border-radius: 18px;
  background: #eff7ed;
}

.feedback.error {
  border-color: #ecc2bc;
  background: #fff3f1;
}

.feedback strong,
.feedback span {
  display: block;
}

.feedback span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
}

.hint {
  min-height: 85px;
  padding: 17px 18px;
  border: 2px solid #e8d18b;
  border-radius: 18px;
  color: #70551c;
  background: #fff8dc;
  font-weight: 800;
  line-height: 1.45;
}

.game-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 7px;
}

.result {
  padding: 57px 44px;
  text-align: center;
}

.result-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 23px;
  padding: 15px 23px;
  border-radius: 20px;
  color: white;
  background: var(--blue);
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.result h1 {
  max-width: 830px;
  margin-right: auto;
  margin-left: auto;
}

.result-summary {
  color: var(--muted);
  font-size: 19px;
  font-weight: 800;
}

.stars {
  margin: 23px 0;
  color: var(--gold);
  font-size: 51px;
  letter-spacing: .12em;
}

.result-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 29px 0;
}

.stat {
  padding: 20px 12px;
  border: 2px solid #d7e2d3;
  border-radius: 20px;
  background: #eff7ed;
}

.stat strong,
.stat span {
  display: block;
}

.stat strong {
  font-size: 34px;
}

.stat span {
  color: var(--muted);
  font-weight: 800;
}

.result-actions {
  justify-content: center;
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .route-grid {
    grid-template-columns: 1fr;
  }

  .route-card {
    min-height: 235px;
  }

  .expedition-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 650px) {
  .app {
    width: min(1120px, calc(100% - 20px));
    padding-top: 12px;
  }

  .brand small {
    display: none;
  }

  .sound-button {
    width: 48px;
    padding: 0;
    font-size: 0;
  }

  .sound-button::before {
    font-size: 20px;
    content: "♪";
  }

  .hero,
  .game-shell,
  .result {
    padding: 23px 17px;
    border-radius: 28px;
  }

  h1 {
    font-size: 41px;
  }

  .lead {
    font-size: 16px;
  }

  .hero-map {
    min-height: 300px;
    padding: 7px;
  }

  .map-passport {
    right: 11px;
    bottom: 11px;
    width: 120px;
    padding: 10px;
  }

  .section-heading {
    display: block;
    margin-top: 37px;
  }

  .section-heading > p {
    margin-top: 12px;
    text-align: left;
  }

  .route-card {
    min-height: 275px;
    padding: 22px;
  }

  .stamp-grid {
    grid-template-columns: repeat(6, 1fr);
  }

  .game-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .progress-row,
  .progress-track {
    width: 100%;
  }

  .clue-card p {
    font-size: 16px;
  }

  .map-panel {
    min-height: 210px;
  }

  .answer-panel {
    padding: 21px 13px;
  }

  .place-option {
    min-height: 79px;
  }

  .feedback {
    align-items: stretch;
    flex-direction: column;
  }

  .feedback .primary-button {
    width: 100%;
  }

  .game-actions {
    flex-direction: column-reverse;
  }

  .game-actions button {
    width: 100%;
  }

  .result-stats {
    grid-template-columns: 1fr;
  }

  .result-actions {
    flex-direction: column;
  }

  .result-actions button {
    width: 100%;
  }
}

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