:root { color-scheme:light; --ink:#214f46; --muted:#6d7d76; --paper:#fffdf7; --line:#dfd2b8; --green:#3e936f; --green-dark:#2d7359; --coral:#df715d; --gold:#e4b24d; --shadow:0 16px 34px #294a3d1a; }
* { box-sizing:border-box; }
html { min-width:0; background:#edf4e8; }
body { margin:0; overflow-x:hidden; color:var(--ink); background:radial-gradient(circle at 18px 18px,#d4dfcc 1px,transparent 1.5px) 0 0/34px 34px,#edf4e8; font-family:"Segoe UI",Arial,sans-serif; }
button,a { -webkit-tap-highlight-color:transparent; }
button { font:inherit; }
button:focus-visible,a:focus-visible { outline:4px solid #f3c358; outline-offset:3px; }
.app { width:min(1120px,calc(100% - 32px)); margin:42px auto 44px; overflow:hidden; border:1px solid #dfd7c4; border-radius:34px; background:var(--paper); box-shadow:var(--shadow); }
.game-bar { display:flex; min-height:82px; align-items:center; justify-content:space-between; gap:20px; padding:15px 26px; border-bottom:1px solid var(--line); background:#fff; }
.game-brand { display:inline-flex; min-width:0; align-items:center; gap:13px; border-radius:16px; color:var(--ink); text-decoration:none; }
.game-brand:hover strong { color:var(--green); }
.game-brand:hover .game-icon { transform:translateY(-2px); box-shadow:0 7px 14px #4b70552a; }
.game-icon { display:grid; flex:0 0 48px; width:48px; height:48px; place-items:center; border-radius:15px; color:#9a6c22; background:#fff0bd; transition:.18s ease; }
.game-icon svg { width:40px; height:34px; }
.game-icon .tape { fill:#f7d57a; stroke:#9a6c22; stroke-width:2; }
.game-icon path:not(.tape):not(.middle),.game-icon circle { fill:#fff8e8; stroke:#d26855; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.game-icon .middle { fill:#e2f1dc; stroke:#4f946f; stroke-width:2; }
.game-brand>span:last-child { display:grid; min-width:0; gap:2px; }
.game-brand strong { font-size:20px; line-height:1.1; transition:color .18s ease; }
.game-brand small { color:var(--muted); font-size:12px; }
.age-pill,.counter,.riddle-head>span { flex:none; padding:9px 14px; border:1px solid var(--line); border-radius:999px; color:var(--ink); background:#fff; font-size:13px; font-weight:800; }
.screen { display:none; }
.screen.is-active { display:block; }
.eyebrow { margin:0 0 8px; color:#4c9371; font-family:Georgia,serif; font-size:12px; font-weight:900; letter-spacing:1.3px; }
h1,h2,h3,p { overflow-wrap:anywhere; }
h1,h2,h3 { margin:0; font-family:Georgia,"Times New Roman",serif; line-height:1.04; }
h1 { max-width:610px; font-size:clamp(34px,4.5vw,58px); }
h2 { font-size:clamp(29px,3.7vw,43px); }
h3 { font-size:clamp(23px,2.5vw,31px); }
.hero-copy>p:not(.eyebrow),.result-screen>div>p:not(.eyebrow) { max-width:610px; margin:20px 0 0; color:var(--muted); font-size:18px; line-height:1.55; }
.home-screen { position:relative; min-height:610px; grid-template-columns:minmax(0,1.06fr) minmax(370px,.94fr); background:linear-gradient(124deg,#fff4d7 0 48%,#e7f1df 48%); }
.home-screen.is-active { display:grid; }
.hero-copy { align-self:center; padding:58px 24px 155px 50px; }
.hero-scene { align-self:center; margin:40px 34px 120px 12px; overflow:hidden; border-radius:28px; background:#e8ddc5; box-shadow:0 18px 28px #263f3228; aspect-ratio:3/2; }
.hero-scene img { display:block; width:100%; height:100%; object-fit:cover; }
.hero-facts { display:flex; flex-wrap:wrap; gap:10px; margin:24px 0 26px; }
.hero-facts span { padding:10px 15px; border:1px solid var(--line); border-radius:999px; background:#fff; font-weight:800; }
.primary-button,.secondary-button,.route-card button,.check-button,.next-button { min-height:50px; border:0; border-radius:15px; font-weight:900; cursor:pointer; }
.primary-button { padding:14px 24px; color:#fff; background:var(--green); box-shadow:0 6px 0 var(--green-dark); }
.primary-button:hover { background:#48a07c; transform:translateY(-1px); }
.how-strip { position:absolute; right:30px; bottom:28px; left:30px; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.how-strip article { display:flex; min-width:0; min-height:88px; align-items:center; gap:15px; padding:14px; border:1px solid var(--line); border-radius:20px; background:#fffdfaeb; }
.how-strip b { display:grid; flex:0 0 48px; width:48px; height:48px; place-items:center; border-radius:15px; color:#fff; background:var(--coral); font-size:24px; }
.how-strip span { display:grid; min-width:0; gap:4px; }
.how-strip strong { font-size:15px; }
.how-strip small { color:var(--muted); line-height:1.3; }
.routes-screen { padding:44px 32px 36px; }
.section-title { display:flex; align-items:end; justify-content:space-between; gap:20px; margin-bottom:24px; }
.section-title>p { margin:0 0 5px; color:var(--muted); font-weight:800; }
.route-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); align-items:stretch; gap:18px; }
.route-card { display:flex; min-width:0; flex-direction:column; padding:12px; border:1px solid var(--line); border-radius:24px; background:#fff; box-shadow:0 9px 18px #36524116; }
.route-art { display:grid; flex:0 0 130px; place-items:center; overflow:hidden; border-radius:17px; background:#eef3df; }
.route-art img { width:116px; height:108px; object-fit:contain; }
.route-card>p { margin:15px 4px 4px; color:var(--route); font-size:11px; font-weight:900; letter-spacing:.7px; }
.route-card h3 { margin:0 4px; font-size:24px; }
.route-card>span { display:block; margin:8px 4px 0; color:var(--muted); font-size:14px; line-height:1.45; }
.route-meta { display:flex; align-items:end; justify-content:space-between; margin:auto 4px 7px; padding-top:13px; color:var(--muted); font-size:12px; }
.route-meta b { color:var(--ink); }
.route-bar { height:7px; margin:0 4px 13px; overflow:hidden; border-radius:99px; background:#ece8dd; }
.route-bar i { display:block; height:100%; background:var(--route); }
.route-card button { display:flex; align-items:center; justify-content:space-between; padding:0 16px; color:#fff; background:var(--route); }
.route-card button:hover { filter:brightness(1.07); }
.back-link { display:block; margin:26px auto 0; padding:8px 12px; border:0; color:var(--green); background:transparent; font-weight:900; cursor:pointer; }
.play-screen { padding:26px 28px 30px; }
.task-head { display:flex; align-items:center; gap:14px; }
.task-head>div { min-width:0; flex:1; }
.task-head h2 { font-size:32px; }
.round-button { display:grid; flex:0 0 46px; width:46px; height:46px; place-items:center; border:1px solid var(--line); border-radius:50%; color:var(--ink); background:#fff; font-size:22px; cursor:pointer; }
.progress-line { height:8px; margin:17px 0 20px; overflow:hidden; border-radius:99px; background:#e9e5da; }
.progress-line i { display:block; width:0; height:100%; border-radius:inherit; background:linear-gradient(90deg,#4a9a72,#e0b64e); transition:width .25s ease; }
.riddle-head { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:17px 19px; border:1px solid #d9dfc7; border-radius:20px; background:#f0f5df; }
.riddle-head h3 { font-size:27px; }
.workbench { display:grid; grid-template-columns:minmax(250px,.66fr) minmax(0,1.6fr); gap:16px; margin-top:16px; }
.source-card,.cut-card,.control-card { border:1px solid var(--line); border-radius:22px; background:#fff; }
.source-card { display:grid; align-content:start; justify-items:center; padding:17px; text-align:center; }
.source-card>span,.cut-card header span,.open-word small { color:#9b6d22; font-family:Georgia,serif; font-size:11px; font-weight:900; letter-spacing:1px; text-transform:uppercase; }
.source-picture { display:grid; width:100%; min-height:184px; place-items:center; margin:10px 0; border-radius:18px; background:#eef4df; }
.source-picture img { display:block; width:165px; height:165px; object-fit:contain; }
.source-card h3 { white-space:nowrap; font:900 clamp(18px,2vw,31px)/1 "Segoe UI",Arial,sans-serif; letter-spacing:2px; }
.source-card small { margin-top:8px; color:var(--muted); }
.cut-card { padding:17px; }
.cut-card>header { display:flex; align-items:start; justify-content:space-between; gap:16px; }
.cut-card header h3 { max-width:570px; margin-top:5px; font-size:25px; }
.cut-card header small { max-width:160px; color:var(--muted); text-align:right; line-height:1.35; }
.word-tape { display:flex; justify-content:center; gap:5px; min-width:0; margin-top:22px; padding:15px; overflow:hidden; border-radius:18px; background:#fff4d6; }
.word-tape span { display:grid; flex:1 1 0; min-width:0; max-width:64px; min-height:62px; place-items:center; border:2px solid #d5c5a6; border-radius:13px; color:var(--ink); background:#fffdf6; font-size:clamp(19px,2.6vw,30px); font-weight:900; transition:.2s ease; }
.word-tape span.is-cut { opacity:.34; color:#8d7860; border-style:dashed; background:#eadbc2; transform:translateY(5px) rotate(var(--tilt)); }
.word-tape span.is-open { border-color:#64a27c; background:#e6f3df; box-shadow:0 4px 0 #a7cfae; }
.edge-controls { display:grid; grid-template-columns:minmax(130px,.75fr) minmax(150px,1fr) minmax(130px,.75fr); align-items:stretch; gap:10px; margin-top:18px; }
.edge-controls>button { display:flex; min-width:0; min-height:58px; align-items:center; justify-content:center; gap:8px; padding:10px; border:2px solid #dda96c; border-radius:16px; color:#744d1b; background:#fff0d6; font-weight:900; cursor:pointer; }
.edge-controls>button:hover:not(:disabled) { background:#ffe6b8; transform:translateY(-1px); }
.edge-controls>button:disabled { cursor:not-allowed; opacity:.42; }
.edge-controls>button img { width:27px; height:27px; object-fit:contain; }
.open-word { display:grid; place-items:center; padding:9px; border-radius:16px; background:#e8f3e3; text-align:center; }
.open-word strong { font-size:clamp(24px,3.5vw,38px); letter-spacing:3px; }
.cut-summary { display:flex; justify-content:center; gap:20px; margin-top:12px; color:var(--muted); font-size:13px; }
.cut-summary b { color:var(--ink); }
.control-card { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:15px; margin-top:16px; padding:14px 16px; background:#fff9ec; }
.feedback { display:grid; min-height:54px; align-content:center; gap:3px; padding-left:13px; border-left:4px solid #6da880; }
.feedback b { font-size:15px; }
.feedback span { color:var(--muted); font-size:13px; line-height:1.35; }
.feedback[data-tone="error"] { border-color:#dc6a58; }
.feedback[data-tone="hint"] { border-color:#e1ad41; }
.feedback[data-tone="success"] { border-color:#4e9c70; }
.actions { display:flex; flex-wrap:wrap; justify-content:end; gap:8px; }
.actions button { min-height:44px; padding:10px 13px; border-radius:13px; font-weight:900; cursor:pointer; }
.hint-button { border:0; color:#765313; background:#ffe39a; }
.undo-button,.restart-button { border:2px solid #77a88b; color:var(--ink); background:#fff; }
.undo-button:disabled { cursor:not-allowed; opacity:.42; }
.check-button,.next-button { padding-inline:18px!important; color:#fff; background:var(--green); }
.task-tabs { grid-column:1/-1; display:flex; justify-content:center; gap:8px; }
.task-tabs button { width:32px; height:32px; border:1px solid #cfccb9; border-radius:10px; color:var(--ink); background:#fff; font-weight:900; cursor:pointer; }
.task-tabs button.is-active { color:#fff; border-color:var(--green); background:var(--green); }
.task-tabs button.is-done { color:#2f795a; border-color:#75ad86; background:#e8f4e5; }
.result-screen { grid-template-columns:minmax(300px,.82fr) minmax(0,1.18fr); align-items:center; gap:38px; padding:58px 48px; }
.result-screen.is-active { display:grid; }
.result-screen h2 { font-size:clamp(36px,4.7vw,55px); }
.result-scene { position:relative; display:grid; min-height:330px; place-items:center; overflow:hidden; border-radius:28px; background:linear-gradient(#dff1dc 0 58%,#d9bc82 58%); }
.result-scene>span { position:absolute; right:28px; top:28px; width:80px; height:80px; border-radius:50%; background:#ffd064; }
.result-scene>img:not(.reward-art) { z-index:1; width:210px; height:220px; object-fit:contain; }
.reward-art { position:absolute; right:28px; bottom:22px; z-index:2; width:92px; height:92px; object-fit:contain; filter:drop-shadow(0 8px 8px #234c3b38); }
.result-actions { display:flex; flex-wrap:wrap; gap:12px; }
.secondary-button { padding:14px 20px; border:2px solid var(--green); color:var(--ink); background:#fff; }
[hidden] { display:none!important; }
@media (max-width:900px) {
  .home-screen { grid-template-columns:1fr; min-height:0; }
  .hero-copy { padding:46px 38px 22px; }
  .hero-scene { width:min(600px,calc(100% - 76px)); margin:10px auto 146px; }
  .how-strip { right:24px; left:24px; }
  .route-art { flex-basis:110px; }
  .route-art img { height:92px; }
  .workbench { grid-template-columns:minmax(215px,.62fr) minmax(0,1.38fr); }
  .source-picture { min-height:150px; }
  .source-picture img { width:140px; height:140px; }
  .control-card { grid-template-columns:1fr; }
  .actions { justify-content:stretch; }
  .actions button { flex:1 1 auto; }
  .result-screen { grid-template-columns:1fr; }
  .result-scene { min-height:270px; }
}
@media (max-width:700px) {
  .app { width:min(1120px,calc(100% - 16px)); margin:12px auto 24px; border-radius:24px; }
  .game-bar { min-height:70px; padding:11px 13px; }
  .game-icon { flex-basis:42px; width:42px; height:42px; }
  .game-brand strong { font-size:16px; }
  .game-brand small { display:none; }
  .age-pill { padding:7px 9px; font-size:11px; }
  .hero-copy { padding:36px 22px 16px; }
  h1 { font-size:36px; }
  .hero-copy>p:not(.eyebrow) { font-size:16px; }
  .hero-scene { width:calc(100% - 44px); margin-bottom:288px; }
  .how-strip { grid-template-columns:1fr; gap:7px; bottom:18px; }
  .how-strip article { min-height:72px; }
  .routes-screen,.play-screen { padding:24px 14px; }
  .section-title { display:block; }
  .section-title>p { margin-top:10px; }
  .route-grid { grid-template-columns:1fr; }
  .route-art { flex-basis:126px; }
  .task-head { align-items:start; }
  .task-head h2 { font-size:25px; }
  .counter,.riddle-head>span { padding:7px 9px; font-size:11px; }
  .riddle-head { align-items:start; }
  .riddle-head h3 { font-size:23px; }
  .workbench { grid-template-columns:1fr; }
  .source-card { grid-template-columns:120px minmax(0,1fr); align-items:center; text-align:left; }
  .source-card>span,.source-card>small { grid-column:1/-1; }
  .source-picture { width:110px; min-height:110px; margin:8px 0; }
  .source-picture img { width:100px; height:100px; }
  .source-card h3 { font-size:23px; letter-spacing:1px; }
  .cut-card>header { display:block; }
  .cut-card header small { display:block; max-width:none; margin-top:8px; text-align:left; }
  .word-tape { gap:3px; padding:10px 7px; }
  .word-tape span { min-height:50px; border-radius:10px; font-size:20px; }
  .edge-controls { grid-template-columns:1fr 1fr; }
  .open-word { grid-column:1/-1; grid-row:1; }
  .edge-controls>button { min-height:54px; }
  .actions button { flex:1 1 42%; }
  .task-tabs { grid-column:auto; }
  .result-screen { gap:24px; padding:34px 22px; }
  .result-scene { min-height:240px; }
  .result-screen>div>p:not(.eyebrow) { font-size:16px; }
}
@media (max-width:420px) {
  .game-brand { gap:8px; }
  .game-brand strong { font-size:14px; }
  .hero-facts span { padding:8px 11px; font-size:12px; }
  .source-card { grid-template-columns:98px minmax(0,1fr); padding:13px; }
  .source-picture { width:90px; min-height:90px; }
  .source-picture img { width:82px; height:82px; }
  .source-card h3 { font-size:21px; }
  .cut-card { padding:13px; }
  .word-tape span { min-height:46px; font-size:18px; }
  .edge-controls>button { padding:8px 5px; font-size:13px; }
}
