:root {
  --ink: #173f39;
  --muted: #5d736e;
  --paper: #fffaf0;
  --green: #2f7762;
  --green-dark: #225a4b;
  --coral: #c97055;
  --gold: #e4b251;
  --blue: #6382aa;
  --line: rgba(38, 84, 71, 0.14);
  --shadow: 0 20px 48px rgba(52, 65, 49, 0.13);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; overflow-x: hidden; }
body {
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 12%, rgba(230, 176, 77, .18), transparent 25rem),
    radial-gradient(circle at 92% 26%, rgba(84, 144, 127, .14), transparent 27rem),
    #f7f1e7;
  font-family: "Segoe UI", Arial, sans-serif;
}
button { font: inherit; }
button:focus-visible { outline: 4px solid rgba(74, 137, 115, .28); outline-offset: 3px; }

.app {
  width: min(1120px, calc(100% - 32px));
  margin: 28px auto 38px;
}

.game-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
  padding: 12px 18px;
  border: 1px solid rgba(54, 107, 90, .12);
  border-radius: 22px;
  background: rgba(255, 252, 245, .84);
  box-shadow: 0 10px 24px rgba(49, 72, 60, .07);
  backdrop-filter: blur(10px);
}
.game-brand { display: flex; align-items: center; gap: 13px; min-width: 0; }
.game-brand > span:last-child { display: grid; gap: 2px; }
.game-brand strong { font-size: 20px; line-height: 1.12; }
.game-brand small { color: var(--muted); font-size: 13px; }
.game-icon { display: grid; width: 48px; height: 48px; flex: 0 0 auto; place-items: center; border-radius: 16px; background: linear-gradient(145deg, #e6f2e9, #f9e8bd); box-shadow: inset 0 0 0 1px rgba(49,116,95,.12); }
.game-icon svg { width: 36px; height: 36px; }
.game-icon svg > path:first-child { fill: #fff8e8; stroke: #357562; stroke-width: 2.4; }
.game-icon svg > path:nth-child(2) { fill: #e6b554; stroke: #8b6932; stroke-width: 1.3; }
.game-icon .icon-pencil { fill: #c86f57; stroke: #844936; stroke-width: 1.4; }
.age-pill { flex: 0 0 auto; padding: 8px 14px; color: #fff; border-radius: 999px; background: var(--green); font-size: 13px; font-weight: 850; }

.screen { display: none; animation: screen-in .32s ease both; }
.screen.is-active { display: block; }
@keyframes screen-in { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }

.eyebrow { margin: 0 0 8px; color: #7b6942; font-size: 12px; font-weight: 900; letter-spacing: .13em; }
h1, h2, h3, p { margin-top: 0; }

.home-screen {
  position: relative;
  overflow: hidden;
  min-height: 584px;
  padding: 60px 56px 31px;
  border: 1px solid var(--line);
  border-radius: 34px;
  background: linear-gradient(105deg, rgba(255,252,242,.98) 0 49%, rgba(231,240,231,.9) 49% 100%);
  box-shadow: var(--shadow);
}
.home-screen::after { content: ""; position: absolute; right: -80px; bottom: -145px; width: 610px; height: 340px; border-radius: 50%; background: #d9c590; opacity: .58; }
.hero-copy { position: relative; z-index: 3; width: min(51%, 505px); }
h1 { margin-bottom: 18px; font-size: clamp(37px, 5vw, 63px); line-height: 1; letter-spacing: -.045em; }
.hero-copy > p:not(.eyebrow) { max-width: 480px; margin-bottom: 24px; color: #49625d; font-size: 18px; line-height: 1.58; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.hero-facts span { padding: 7px 11px; border: 1px solid rgba(49,116,95,.16); border-radius: 999px; background: rgba(255,255,255,.72); color: var(--green-dark); font-size: 13px; font-weight: 780; }

.primary-button, .secondary-button, .hint-button, .next-button {
  min-height: 50px;
  padding: 0 20px;
  border: 0;
  border-radius: 16px;
  cursor: pointer;
  font-weight: 850;
  transition: transform .16s ease, filter .16s ease;
}
.primary-button, .next-button { color: #fff; background: linear-gradient(145deg, #367c66, #275e4e); box-shadow: 0 11px 22px rgba(38,95,78,.22); }
.primary-button:hover, .secondary-button:hover, .hint-button:hover, .next-button:hover { transform: translateY(-2px); filter: saturate(1.06); }

.hero-workbench { position: absolute; z-index: 2; top: 28px; right: 15px; width: 47%; height: 445px; }
.hero-workbench::before { content: ""; position: absolute; left: 7%; right: 4%; bottom: 43px; height: 120px; border-radius: 20px; background: #8a6b4e; box-shadow: 0 18px 0 #73583f, 0 25px 26px rgba(47,46,34,.18); transform: rotate(-2deg); }
.hero-bear { position: absolute; right: 2%; top: 8px; width: 218px; filter: drop-shadow(0 12px 9px rgba(45,60,48,.16)); }
.hero-rocket { position: absolute; left: 2%; top: 2px; width: 150px; transform: rotate(-6deg); filter: drop-shadow(0 10px 7px rgba(45,60,48,.13)); }
.hero-word { position: absolute; z-index: 2; left: 9%; bottom: 78px; display: flex; gap: 7px; transform: rotate(-2deg); }
.hero-word span { display: grid; width: 54px; height: 60px; place-items: center; border: 2px solid #ebca82; border-radius: 13px; color: var(--ink); background: #fff7e3; box-shadow: 0 6px 0 #c2a269; font-size: 27px; font-weight: 950; }
.hero-word .is-odd { color: #fff; border-color: #e6a08b; background: #c96e55; box-shadow: 0 6px 0 #8d4d3b; transform: translateY(-10px) rotate(4deg); }
.hero-workbench > .hero-pencil { position: absolute; z-index: 3; left: 43%; bottom: 33px; width: 122px; height: 18px; border-radius: 999px 5px 5px 999px; background: #e6b249; box-shadow: inset -19px 0 #c86e55, 0 6px 10px rgba(57,46,31,.18); transform: rotate(14deg); }

.how-strip { position: relative; z-index: 4; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 52px; }
.how-strip article { display: flex; min-height: 76px; align-items: center; gap: 12px; padding: 13px 15px; border: 1px solid rgba(50,103,85,.13); border-radius: 18px; background: rgba(255,252,245,.9); box-shadow: 0 8px 20px rgba(49,69,57,.07); }
.how-strip article > b { display: grid; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; border-radius: 13px; color: #fff; background: var(--coral); }
.how-strip article span { display: grid; gap: 3px; }
.how-strip strong { font-size: 14px; }
.how-strip small { color: var(--muted); line-height: 1.3; }

.routes-screen, .play-screen { padding: 30px; border: 1px solid var(--line); border-radius: 32px; background: rgba(255,251,243,.96); box-shadow: var(--shadow); }
.section-title, .task-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 24px; }
.section-title h2, .task-head h2, .result-copy h2 { margin-bottom: 0; font-size: clamp(28px, 4vw, 44px); line-height: 1.04; letter-spacing: -.03em; }
.section-title > p { margin: 0; color: var(--muted); font-weight: 750; }

.route-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; }
.route-card { display: flex; min-width: 0; min-height: 410px; flex-direction: column; padding: 17px; border: 1px solid color-mix(in srgb, var(--accent) 23%, transparent); border-radius: 24px; background: linear-gradient(160deg, #fffdf7, var(--soft)); box-shadow: 0 12px 26px rgba(48,69,57,.08); }
.route-preview { display: flex; height: 145px; align-items: end; justify-content: center; gap: 4px; padding: 12px; overflow: hidden; border-radius: 19px; background: linear-gradient(180deg, rgba(255,255,255,.78), rgba(255,255,255,.28)); }
.route-preview span { display: grid; width: 31%; height: 108px; place-items: center; }
.route-preview img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 7px 6px rgba(44,60,48,.13)); }
.route-preview span:nth-child(2) { transform: translateY(-11px); }
.route-copy { min-height: 119px; padding: 19px 5px 8px; }
.route-copy h3 { margin-bottom: 7px; font-size: 23px; line-height: 1.08; }
.route-copy > p:last-child { margin-bottom: 0; color: var(--muted); line-height: 1.42; }
.route-progress { display: flex; align-items: center; gap: 10px; margin: auto 4px 14px; }
.route-progress > span { height: 9px; flex: 1; overflow: hidden; border-radius: 999px; background: rgba(33,81,67,.11); }
.route-progress i { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.route-progress b { flex: 0 0 auto; color: var(--accent); font-size: 12px; }
.route-card > button { display: flex; min-height: 49px; align-items: center; justify-content: space-between; padding: 0 17px; border: 0; border-radius: 15px; color: #fff; background: var(--accent); cursor: pointer; font-weight: 850; }
.text-button { margin-top: 22px; padding: 9px 0; border: 0; color: var(--green-dark); background: none; cursor: pointer; font-weight: 800; }

.task-head { justify-content: flex-start; margin-bottom: 14px; }
.task-head > div { flex: 1; }
.round-button { display: grid; width: 48px; height: 48px; flex: 0 0 auto; place-items: center; border: 1px solid var(--line); border-radius: 16px; color: var(--ink); background: #fff; cursor: pointer; font-size: 22px; font-weight: 900; }
.counter { padding: 8px 13px; border-radius: 999px; color: var(--green-dark); background: #e8f1eb; font-weight: 850; }
.task-progress { height: 8px; margin-bottom: 17px; overflow: hidden; border-radius: 999px; background: #e5e7dd; }
.task-progress span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--green), var(--gold)); transition: width .25s ease; }

.clue-strip { display: grid; grid-template-columns: 132px 1fr 150px; gap: 17px; align-items: center; min-height: 160px; margin-bottom: 16px; padding: 15px 18px; border: 1px solid var(--line); border-radius: 23px; background: linear-gradient(125deg, #eef5e9, #fffaf0); box-shadow: 0 9px 22px rgba(48,66,55,.06); }
.clue-picture { display: grid; height: 126px; place-items: center; border-radius: 19px; background: rgba(255,255,255,.78); box-shadow: inset 0 0 0 1px rgba(50,100,83,.09); }
.clue-picture img { width: 92%; height: 92%; object-fit: contain; filter: drop-shadow(0 7px 6px rgba(45,60,48,.13)); }
.clue-copy h3 { margin-bottom: 7px; font-size: 25px; }
.clue-copy > p:last-child { margin-bottom: 0; color: #48635d; font-size: 15px; line-height: 1.48; }
.inspection-badge { display: grid; gap: 5px; padding: 15px; border-radius: 17px; color: #fff; background: #68775b; box-shadow: inset 0 0 0 1px rgba(255,255,255,.14); }
.inspection-badge span { color: #f2df9e; font-size: 10px; font-weight: 900; letter-spacing: .14em; }
.inspection-badge b { font-size: 17px; }
.inspection-badge small { color: rgba(255,255,255,.78); line-height: 1.3; }

.repair-workspace { display: grid; grid-template-columns: minmax(0,1.08fr) minmax(390px,.92fr); gap: 16px; }
.repair-card, .grid-card { min-width: 0; border: 1px solid var(--line); border-radius: 24px; background: #fffdf8; box-shadow: 0 10px 24px rgba(48,66,55,.07); }
.repair-card { display: flex; min-height: 435px; flex-direction: column; padding: 20px; }
.repair-heading, .grid-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.repair-heading h3 { margin-bottom: 0; font-size: 23px; }
.repair-heading > span { max-width: 190px; color: var(--muted); font-size: 12px; text-align: right; }

.word-row { display: flex; min-height: 98px; align-items: center; justify-content: center; gap: clamp(4px,.7vw,8px); margin: 21px 0 16px; padding: 14px 10px 19px; border-radius: 19px; background: #796146; box-shadow: inset 0 5px 13px rgba(42,32,23,.19); }
.word-letter { position: relative; display: grid; width: clamp(39px,5vw,55px); height: clamp(51px,6vw,64px); flex: 0 1 55px; place-items: center; border: 2px solid #efd495; border-radius: 12px; color: var(--ink); background: linear-gradient(145deg,#fffdf5,#f6e7c4); box-shadow: 0 7px 0 #b99a62, 0 10px 12px rgba(39,31,24,.18); cursor: pointer; font-size: clamp(21px,3vw,29px); font-weight: 950; transition: transform .14s ease, background .14s ease; }
.word-letter:hover:not(:disabled) { transform: translateY(-3px); }
.word-letter.is-locked { color: #fff; border-color: #87ba9b; background: #4a876f; box-shadow: 0 7px 0 #2e624e; cursor: default; }
.word-letter.is-locked::after { content: "✓"; position: absolute; top: -8px; right: -7px; display: grid; width: 19px; height: 19px; place-items: center; border-radius: 50%; color: #fff; background: #2d654f; font-size: 11px; }
.word-letter.is-chosen { color: #fff; border-color: #f2c183; background: var(--coral); box-shadow: 0 7px 0 #8a4938, 0 0 0 4px rgba(222,161,82,.3); transform: translateY(-5px); }
.word-letter.is-wrong { border-color: #d56d5b; background: #ffe0d5; animation: soft-wrong .42s ease; }
@keyframes soft-wrong { 25% { transform: translateX(-3px); } 50% { transform: translateX(3px); } 75% { transform: translateX(-2px); } }

.replacement-box { margin-bottom: 14px; padding: 13px 15px; border: 1px solid rgba(78,117,142,.16); border-radius: 16px; background: #edf3f8; }
.replacement-box[hidden] { display: none; }
.replacement-box p { margin-bottom: 10px; color: #46647c; font-size: 13px; font-weight: 850; }
.replacement-options { display: grid; grid-template-columns: repeat(3,1fr); gap: 9px; }
.replacement-option { min-height: 52px; border: 2px solid #bfd0df; border-radius: 13px; color: #294d68; background: #fff; cursor: pointer; font-size: 24px; font-weight: 950; }
.replacement-option:hover { border-color: #6487a6; background: #f5f9fc; }
.replacement-option.is-wrong { color: #8c4637; border-color: #d77861; background: #ffe4db; animation: soft-wrong .42s ease; }

.feedback { display: grid; gap: 3px; min-height: 66px; margin-top: auto; padding: 12px 15px; border-left: 5px solid #d7ad55; border-radius: 13px; background: #fff3d6; }
.feedback b { font-size: 14px; }
.feedback span { color: #536a65; font-size: 13px; line-height: 1.36; }
.feedback[data-tone="success"] { border-left-color: #3b8166; background: #e4f2e7; }
.feedback[data-tone="error"] { border-left-color: #c86f57; background: #fde8e1; }
.feedback[data-tone="hint"] { border-left-color: #607fa8; background: #e8eef8; }
.repair-actions { display: grid; grid-template-columns: 1fr; gap: 9px; margin-top: 13px; }
.hint-button { color: #34546e; background: #e4edf6; box-shadow: inset 0 0 0 1px rgba(62,98,126,.15); }
.repair-actions button[hidden] { display: none; }

.grid-card { padding: 18px; }
.grid-heading { margin-bottom: 13px; }
.grid-heading span { color: #79673e; font-size: 12px; font-weight: 900; letter-spacing: .13em; }
.grid-heading small { color: var(--muted); text-align: right; }
.crossword-grid-wrap { display: grid; min-height: 330px; align-items: center; justify-content: center; padding: 11px; overflow: hidden; border-radius: 18px; background: linear-gradient(rgba(255,255,255,.47),rgba(255,255,255,.47)), repeating-linear-gradient(0deg,transparent 0 23px,rgba(70,110,89,.06) 24px), #edf1e5; }
.crossword-grid { --cell-size: min(35px, calc((100vw - 120px) / var(--cols))); display: grid; grid-template-columns: repeat(var(--cols),var(--cell-size)); grid-template-rows: repeat(var(--rows),var(--cell-size)); gap: 3px; }
.crossword-cell, .crossword-gap { position: relative; width: var(--cell-size); height: var(--cell-size); }
.crossword-cell { display: grid; place-items: center; border: 2px solid #b7b196; border-radius: 7px; color: var(--ink); background: #fffaf0; font-size: clamp(13px,1.8vw,19px); font-weight: 900; transition: background .18s ease, border-color .18s ease; }
.crossword-cell.is-active { border-color: #d39a40; background: #fff1c7; }
.crossword-cell.is-filled { border-color: #4c8a71; background: #dff0e4; }
.crossword-cell.is-locked-active { box-shadow: inset 0 0 0 2px #fff, 0 0 0 2px rgba(61,125,100,.25); }
.cell-number { position: absolute; top: 2px; left: 3px; color: #77664b; font-size: 7px; line-height: 1; }
.clue-tabs { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px; margin-top: 12px; }
.clue-tab { display: flex; min-width: 0; min-height: 37px; align-items: center; justify-content: center; padding: 6px 8px; overflow: hidden; border: 1px solid var(--line); border-radius: 11px; color: var(--muted); background: #f7f4e9; cursor: pointer; font-size: 12px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.clue-tab.is-active { color: #fff; border-color: var(--green); background: var(--green); }
.clue-tab.is-solved { color: var(--green-dark); border-color: rgba(49,116,95,.2); background: #e1efe5; }
.clue-tab:disabled { cursor: default; opacity: 1; }

.result-screen { display: none; grid-template-columns: .92fr 1.08fr; min-height: 510px; overflow: hidden; border: 1px solid var(--line); border-radius: 32px; background: #fffaf0; box-shadow: var(--shadow); }
.result-screen.is-active { display: grid; }
.result-toybox { position: relative; min-height: 420px; background: linear-gradient(155deg,#d9ecdf,#f2dca8); }
.result-toybox::before { content: ""; position: absolute; left: 10%; right: 10%; bottom: 9%; height: 130px; border-radius: 20px 20px 32px 32px; background: #927051; box-shadow: inset 0 -18px rgba(88,61,39,.18); }
.result-object { position: absolute; z-index: 2; width: 40%; height: 40%; object-fit: contain; filter: drop-shadow(0 11px 8px rgba(44,60,48,.15)); }
.result-object:nth-child(1) { left: 9%; top: 13%; }
.result-object:nth-child(2) { right: 8%; top: 22%; }
.result-object:nth-child(3) { left: 29%; bottom: 8%; }
.result-copy { display: flex; flex-direction: column; justify-content: center; padding: clamp(34px,6vw,70px); }
.result-copy > p:not(.eyebrow) { margin: 18px 0 22px; color: var(--muted); font-size: 18px; line-height: 1.55; }
.result-facts { display: flex; gap: 11px; margin-bottom: 28px; }
.result-facts span { padding: 9px 13px; border-radius: 12px; color: var(--green-dark); background: #e6efe6; font-weight: 750; }
.result-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.secondary-button { color: var(--green-dark); background: #e8eee5; }

@media (max-width: 930px) {
  .home-screen { min-height: 680px; padding: 45px 34px 28px; }
  .hero-copy { width: 59%; }
  .hero-workbench { top: 65px; right: 0; width: 43%; }
  .hero-bear { width: 180px; }
  .hero-word span { width: 44px; }
  .how-strip { margin-top: 86px; }
  .repair-workspace { grid-template-columns: 1fr; }
  .repair-card { min-height: 390px; }
  .crossword-grid-wrap { min-height: 360px; }
  .crossword-grid { --cell-size: min(43px, calc((100vw - 118px) / var(--cols))); }
}

@media (max-width: 760px) {
  .app { width: min(1120px, calc(100% - 20px)); margin-top: 14px; }
  .game-head { padding: 10px 12px; border-radius: 18px; }
  .game-brand strong { font-size: 17px; }
  .game-brand small { display: none; }
  .game-icon { width: 42px; height: 42px; }
  .age-pill { padding: 7px 10px; font-size: 12px; }
  .home-screen { min-height: 0; padding: 34px 24px 24px; border-radius: 25px; background: linear-gradient(180deg,#fffaf0 0 55%,#e7f0e5 55%); }
  .hero-copy { width: 100%; }
  h1 { font-size: clamp(38px,10.8vw,54px); }
  .hero-copy > p:not(.eyebrow) { font-size: 16px; }
  .hero-workbench { position: relative; top: auto; right: auto; width: 100%; height: 290px; margin-top: 14px; }
  .hero-bear { width: 144px; }
  .hero-rocket { width: 105px; }
  .hero-word { left: 4%; bottom: 72px; }
  .hero-word span { width: 43px; height: 49px; font-size: 22px; }
  .how-strip { grid-template-columns: 1fr; margin-top: 3px; }
  .routes-screen, .play-screen { padding: 20px 15px; border-radius: 25px; }
  .section-title { align-items: flex-start; }
  .section-title > p { max-width: 100px; text-align: right; }
  .route-grid { grid-template-columns: 1fr; }
  .route-card { min-height: 355px; }
  .route-copy { min-height: 100px; }
  .task-head h2 { font-size: 27px; }
  .clue-strip { grid-template-columns: 105px 1fr; min-height: 150px; padding: 13px; }
  .clue-picture { height: 110px; }
  .clue-copy h3 { font-size: 20px; }
  .clue-copy > p:last-child { font-size: 13px; }
  .inspection-badge { grid-column: 1 / -1; grid-template-columns: auto auto 1fr; align-items: center; padding: 10px 13px; }
  .inspection-badge small { text-align: right; }
  .repair-card { min-height: 360px; padding: 16px 12px; }
  .repair-heading { align-items: start; }
  .word-row { gap: 4px; padding-inline: 5px; }
  .word-letter { width: auto; min-width: 0; height: 52px; flex-basis: 48px; border-radius: 10px; font-size: 21px; }
  .grid-card { padding: 14px 10px; }
  .crossword-grid-wrap { min-height: 310px; padding: 8px; }
  .crossword-grid { --cell-size: min(39px, calc((100vw - 70px) / var(--cols))); gap: 2px; }
  .crossword-cell { border-width: 1.5px; border-radius: 6px; }
  .result-screen.is-active { grid-template-columns: 1fr; }
  .result-toybox { min-height: 270px; }
  .result-copy { padding: 30px 24px; }
}

@media (max-width: 430px) {
  .game-brand strong { font-size: 15px; }
  .age-pill { font-size: 11px; }
  .home-screen { padding-inline: 19px; }
  .hero-facts span { font-size: 11px; }
  .section-title { display: block; }
  .section-title > p { max-width: none; margin-top: 8px; text-align: left; }
  .task-head { gap: 9px; }
  .task-head h2 { font-size: 23px; }
  .round-button { width: 42px; height: 42px; }
  .counter { padding-inline: 9px; font-size: 12px; }
  .clue-strip { grid-template-columns: 82px 1fr; gap: 10px; }
  .clue-picture { height: 92px; border-radius: 15px; }
  .inspection-badge { font-size: 12px; }
  .repair-heading > span { display: none; }
  .word-row { min-height: 78px; margin-top: 16px; }
  .word-letter { height: 47px; font-size: 18px; box-shadow: 0 5px 0 #b99a62; }
  .word-letter.is-locked { box-shadow: 0 5px 0 #2e624e; }
  .grid-heading { display: block; }
  .grid-heading small { display: block; margin-top: 4px; text-align: left; }
  .clue-tabs { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

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

/* Самостоятельная композиция зеркального кроссворда. */
.game-icon .icon-mirror { fill: #d9eee7; stroke: #3e7767; stroke-width: 2; stroke-linejoin: round; }
.game-icon .icon-shine { fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; }
.game-icon .icon-stamp { fill: #f3d89b; stroke: #8c6940; stroke-width: 2; }
.game-icon .icon-letter { fill: none; stroke: #b76151; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.hero-mirror { position: absolute; z-index: 2; top: 28px; right: 15px; width: 47%; height: 445px; overflow: hidden; border-radius: 48% 48% 28px 28px; background: linear-gradient(180deg,#cce5df 0 65%,#d6c792 65% 75%,#987152 75%); box-shadow: inset 0 0 0 1px rgba(45,92,75,.1); }
.hero-mirror::before { content: ""; position: absolute; left: -8%; right: -8%; bottom: -48px; height: 160px; border-radius: 50% 50% 0 0; background: #8d674b; box-shadow: inset 0 15px #caa873; }
.hero-glow { position: absolute; top: 30px; right: 38px; width: 68px; height: 68px; border-radius: 50%; background: #f0c15e; box-shadow: 0 0 0 14px rgba(243,198,95,.21); }
.hero-frame { position: absolute; z-index: 2; left: 50%; top: 34px; width: 230px; height: 286px; padding: 13px; border-radius: 50% 50% 25px 25px; background: #8c684b; box-shadow: inset 0 0 0 4px #bc9566, 0 14px 18px rgba(52,51,39,.18); transform: translateX(-50%); }
.hero-frame i { display: block; width: 100%; height: 100%; border-radius: inherit; background: linear-gradient(135deg,rgba(255,255,255,.72),rgba(160,205,200,.44) 47%,rgba(255,255,255,.35) 48% 56%,rgba(117,170,169,.38)); box-shadow: inset 0 0 0 2px rgba(255,255,255,.68); }
.hero-book { position: absolute; z-index: 3; left: 2%; bottom: 88px; width: 130px; height: 120px; object-fit: contain; filter: drop-shadow(0 9px 7px rgba(45,60,48,.15)); }
.hero-rocket { position: absolute; z-index: 3; right: 1%; bottom: 91px; width: 122px; height: 145px; object-fit: contain; filter: drop-shadow(0 9px 7px rgba(45,60,48,.15)); }
.hero-stamps { position: absolute; z-index: 5; left: 6%; right: 6%; bottom: 31px; display: flex; justify-content: center; gap: 5px; perspective: 500px; }
.hero-stamps b { display: grid; width: 48px; height: 51px; place-items: center; border: 2px solid #efd08e; border-radius: 11px; color: var(--ink); background: #fff3cf; box-shadow: 0 6px 0 #8c684b; font-size: 23px; }
.hero-stamps .is-reflected { color: #a65348; transform: rotateY(180deg) translateY(-7px); }

.mirror-stage { display: grid; min-height: 196px; align-content: center; justify-items: center; gap: 11px; margin: 18px 0 16px; padding: 22px 10px 18px; overflow: hidden; border-radius: 23px 23px 16px 16px; background: radial-gradient(ellipse at 50% 76%,rgba(255,255,255,.68) 0 31%,transparent 32%),linear-gradient(145deg,#dceee8,#f6e5d5); box-shadow: inset 0 0 0 1px rgba(50,100,83,.1); }
.mirror-stage::before { content: ""; width: 57%; height: 7px; margin-bottom: -7px; border-radius: 50%; background: rgba(71,116,101,.17); filter: blur(4px); }
.mirror-stage .word-row { width: 100%; min-height: 95px; margin: 0; background: linear-gradient(180deg,#83aaa2,#5f827b); box-shadow: inset 0 4px 13px rgba(33,61,54,.18),0 9px 18px rgba(54,65,50,.09); perspective: 700px; }
.mirror-stage > p { margin: 0; color: #526c66; font-size: 13px; font-weight: 850; }
.word-letter { padding: 0; perspective: 500px; }
.word-letter > span { display: grid; width: 100%; height: 100%; place-items: center; transition: transform .28s ease; transform-style: preserve-3d; }
.word-letter.is-mirrored > span { transform: rotateY(180deg); }
.word-letter.is-fixed { color: #fff; border-color: #83b69f; background: #4a876f; box-shadow: 0 7px 0 #2e624e,0 10px 12px rgba(39,61,48,.16); cursor: default; }
.word-letter.is-fixed::after { content: "✓"; position: absolute; top: -8px; right: -7px; display: grid; width: 19px; height: 19px; place-items: center; border-radius: 50%; color: #fff; background: #2d654f; font-size: 11px; }
.word-letter.is-wrong { border-color: #d56d5b; background: #ffe0d5; }
.crossword-cell.is-preview { color: #8b613f; border-color: #d8aa5b; background: #fff0c6; }
.clue-picture img.is-scene { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; filter: none; }

.result-mirror { position: relative; min-height: 420px; overflow: hidden; background: linear-gradient(180deg,#cbe4df 0 57%,#c8d595 57% 69%,#aa7d58 69%); }
.result-mirror > span { position: absolute; left: 50%; top: 37px; width: 190px; height: 250px; border: 13px solid #8a674b; border-radius: 50% 50% 22px 22px; background: linear-gradient(135deg,rgba(255,255,255,.74),rgba(135,190,185,.48)); box-shadow: inset 0 0 0 3px #c2a173,0 13px 18px rgba(45,56,45,.18); transform: translateX(-50%); }
.result-mirror img { position: absolute; z-index: 2; width: 38%; height: 35%; object-fit: contain; filter: drop-shadow(0 10px 7px rgba(44,60,48,.16)); }
.result-mirror img:nth-of-type(1) { left: 3%; top: 13%; }.result-mirror img:nth-of-type(2) { right: 3%; top: 18%; }.result-mirror img:nth-of-type(3) { left: 31%; bottom: 4%; }

@media (max-width: 930px) {
  .hero-mirror { top: 65px; right: 0; width: 43%; }
  .hero-frame { width: 190px; height: 250px; }
  .hero-book { width: 105px; }.hero-rocket { width: 100px; }
}

@media (max-width: 760px) {
  .hero-mirror { position: relative; top: auto; right: auto; width: 100%; height: 300px; margin-top: 14px; border-radius: 32px 32px 22px 22px; }
  .hero-frame { top: 19px; width: 180px; height: 218px; }
  .hero-book { bottom: 72px; width: 105px; height: 105px; }.hero-rocket { bottom: 75px; width: 98px; height: 120px; }
  .hero-stamps { bottom: 23px; }.hero-stamps b { width: 44px; height: 46px; font-size: 20px; }
  .mirror-stage { min-height: 170px; padding-inline: 5px; }
  .mirror-stage .word-row { min-height: 82px; }
  .result-mirror { min-height: 270px; }
}

@media (max-width: 430px) {
  .hero-mirror { height: 270px; }
  .hero-frame { width: 158px; height: 194px; }
  .hero-book { left: -1%; width: 89px; }.hero-rocket { right: -2%; width: 86px; }
  .hero-stamps { left: 2%; right: 2%; bottom: 18px; gap: 3px; }.hero-stamps b { width: 40px; height: 42px; font-size: 18px; }
  .mirror-stage { margin-top: 14px; padding-inline: 3px; }
  .mirror-stage .word-row { gap: 2px; padding-inline: 3px; }
  .mirror-stage .word-letter { width: 28px; height: 45px; flex: 0 1 28px; min-width: 0; padding: 0; font-size: 15px; }
  .crossword-grid { --cell-size: min(32px, calc((100vw - 112px) / var(--cols))); }
  .word-letter.is-fixed { box-shadow: 0 5px 0 #2e624e; }
}
