:root {
  color-scheme: light;
  --ink: #24484c;
  --muted: #5e7470;
  --teal: #257b7b;
  --teal-dark: #155d60;
  --coral: #e97a62;
  --sage: #8bae91;
  --yellow: #efc45d;
  --cream: #fff8e6;
  --paper: #fffdf6;
  --line: #d8e1cf;
  --shadow: 0 8px 0 rgba(55, 85, 70, .055);
  font-family: "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  font-size: 16px;
  font-synthesis: none;
}
* { box-sizing: border-box; }
html { min-width: 280px; scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--cream); line-height: 1.5; }
button, input, select { font: inherit; }
button { color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button:disabled { cursor: default; }
button:focus-visible, a:focus-visible { outline: 3px solid var(--teal-dark); outline-offset: 5px; }
[hidden] { display: none !important; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.14; }
.app-shell { width: min(1180px, calc(100% - 64px)); margin: 0 auto; padding-bottom: 28px; }
.site-header { min-height: 94px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid #dedfc9; }
.brand { display: flex; align-items: center; gap: 10px; padding: 10px 0; min-height: 48px; border: 0; background: none; font-weight: 800; font-size: 1.05rem; letter-spacing: -.025em; text-align: left; }
.brand::before { content: ""; width: 30px; height: 30px; flex: 0 0 30px; border: 2px solid var(--ink); border-radius: 9px 7px 9px 7px; background: linear-gradient(90deg, transparent 45%, var(--ink) 45% 52%, transparent 52%), linear-gradient(transparent 45%, var(--ink) 45% 52%, transparent 52%), var(--yellow); transform: rotate(-5deg); }
.star-pill { display: flex; align-items: center; gap: 8px; flex-shrink: 0; min-height: 44px; padding: 8px 15px; border: 1px solid #d2dcca; border-radius: 100px; background: var(--paper); font-weight: 800; font-size: .92rem; }
.star-pill::before { content: "★"; color: #bd882a; font-size: 1.3rem; line-height: 1; }
.hero-grid { display: grid; grid-template-columns: 1fr 1.04fr; align-items: center; gap: clamp(28px, 5vw, 72px); padding: 42px 0 32px; }
.hero-copy { max-width: 540px; }
.eyebrow { display: block; color: var(--teal-dark); font-size: .74rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 13px; }
.hero-title { max-width: 550px; font-size: clamp(2.65rem, 5.6vw, 4.75rem); font-weight: 800; letter-spacing: -.065em; line-height: .99; }
.hero-title em, .hero-title span { color: var(--teal); font-style: normal; }
.hero-note { max-width: 440px; margin-top: 22px; font-size: 1.07rem; line-height: 1.65; color: var(--muted); }
.hero-art { width: 100%; height: auto; aspect-ratio: 680 / 460; border-radius: 25px; }
.settings { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 20px 24px; margin: 3px 0 25px; border: 1px solid var(--line); border-radius: 20px; background: #f7f9ed; }
.section-label { min-width: 0; }
.section-label h2 { font-size: 1.04rem; font-weight: 800; letter-spacing: -.02em; }
.section-label p { font-size: .85rem; color: var(--muted); margin-top: 5px; }
.limit-pills { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.limit-pills button { flex: 0 0 auto; min-width: 67px; min-height: 44px; padding: 9px 15px; border: 1px solid #c4d5c6; border-radius: 12px; background: var(--paper); font-weight: 800; font-size: .88rem; transition: background .15s, border-color .15s, transform .15s; }
.limit-pills button:hover { border-color: var(--teal); background: #eaf3e8; }
.limit-pills button[aria-pressed="true"], .limit-pills button.is-active, .limit-pills button.active { background: var(--teal); color: #fffdf6; border-color: var(--teal); box-shadow: 0 3px 0 #185d60; }
.games-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.game-card { --card-color: #c6ded1; min-width: 0; display: flex; align-items: flex-start; flex-direction: column; text-align: left; position: relative; padding: 15px 16px 18px; border: 1.5px solid #d7ddca; border-radius: 22px; background: var(--paper); box-shadow: var(--shadow); transition: transform .18s, border-color .18s, box-shadow .18s; }
.game-card:nth-child(2) { --card-color: #f6d3bd; }
.game-card:nth-child(3) { --card-color: #f6e4af; }
.game-card:nth-child(4) { --card-color: #c8e0df; }
.game-card:hover { transform: translateY(-4px); border-color: var(--teal); box-shadow: 0 12px 0 rgba(55, 85, 70, .055); }
.game-card:active { transform: translateY(0); }
.card-art { position: relative; display: block; width: 100%; height: 105px; margin-bottom: 17px; overflow: hidden; border-radius: 13px; background-color: var(--card-color); }
.card-art::before, .card-art::after { position: absolute; content: ""; display: block; }
.art-place { background-image: linear-gradient(var(--ink), var(--ink)), repeating-linear-gradient(90deg, transparent 0 27px, var(--ink) 27px 29px, transparent 29px 34px); background-size: calc(100% - 36px) 2px, calc(100% - 36px) 14px; background-position: center 67px, center 61px; background-repeat: no-repeat; }
.art-place::before { width: 28px; height: 33px; border: 2px solid var(--ink); background: var(--coral); border-radius: 7px 7px 3px 7px; top: 21px; left: calc(50% - 12px); transform: rotate(6deg); }
.art-place::after { width: 2px; height: 15px; background: var(--ink); left: calc(50% + 3px); top: 53px; transform: rotate(6deg); }
.art-hidden::before { width: 60px; height: 57px; top: 23px; left: calc(50% - 31px); border: 2px solid var(--ink); border-radius: 5px 10px 7px 5px; background: var(--paper); transform: rotate(-7deg); box-shadow: 7px 7px 0 #d5ac91; }
.art-hidden::after { content: "?"; top: 25px; left: calc(50% - 10px); font-size: 2.45rem; font-weight: 800; line-height: 1.4; color: var(--teal); transform: rotate(-7deg); }
.art-distance { background-image: linear-gradient(var(--ink), var(--ink)), repeating-linear-gradient(90deg, transparent 0 28px, var(--ink) 28px 30px, transparent 30px 35px); background-size: calc(100% - 38px) 2px, calc(100% - 38px) 11px; background-position: center 71px, center 66px; background-repeat: no-repeat; }
.art-distance::before { width: 96px; height: 38px; top: 23px; left: calc(50% - 48px); border: 3px solid var(--teal); border-bottom: 0; border-radius: 60px 60px 0 0; }
.art-distance::after { width: 11px; height: 11px; top: 50px; left: calc(50% + 42px); border-right: 3px solid var(--teal); border-bottom: 3px solid var(--teal); transform: rotate(45deg); }
.art-detective { background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20120%20134%22%3E%3Cg%20stroke%3D%22%2324484c%22%20stroke-width%3D%222.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22m46%20109-1%2015m28-15%202%2015%22%20fill%3D%22none%22%20stroke-width%3D%228%22%2F%3E%3Cpath%20d%3D%22m37%20125%2015-1%202%205H36Zm32-1%2015%201%201%204H68Z%22%20fill%3D%22%2324484c%22%2F%3E%3Cpath%20d%3D%22M40%2072c10-7%2027-7%2039%200l9%2038-55%201Z%22%20fill%3D%22%23257b7b%22%2F%3E%3Cpath%20d%3D%22m47%2072%2012%2017%2013-18m-13%2018%201%2021%22%20fill%3D%22none%22%20stroke%3D%22%23fff3d3%22%20stroke-width%3D%222%22%2F%3E%3Ccircle%20cx%3D%2261%22%20cy%3D%2246%22%20r%3D%2219%22%20fill%3D%22%23f2c9a7%22%2F%3E%3Cpath%20d%3D%22M43%2045c-4-1-6%204-3%208l4%201m35-9c4-1%206%204%203%208l-4%201%22%20fill%3D%22%23f2c9a7%22%2F%3E%3Cpath%20d%3D%22m38%2035%208-18%2028-1%209%2019%22%20fill%3D%22%23d2a34c%22%2F%3E%3Cpath%20d%3D%22m44%2028%2033-1%22%20stroke%3D%22%238c6c3b%22%20stroke-width%3D%225%22%2F%3E%3Cpath%20d%3D%22m32%2036%2055-1%22%20stroke%3D%22%2324484c%22%20stroke-width%3D%227%22%2F%3E%3Cpath%20d%3D%22m32%2035%2055-1%22%20stroke%3D%22%23efc45d%22%20stroke-width%3D%224%22%2F%3E%3Ccircle%20cx%3D%2254%22%20cy%3D%2245%22%20r%3D%222%22%20fill%3D%22%2324484c%22%20stroke%3D%22none%22%2F%3E%3Ccircle%20cx%3D%2268%22%20cy%3D%2245%22%20r%3D%222%22%20fill%3D%22%2324484c%22%20stroke%3D%22none%22%2F%3E%3Cpath%20d%3D%22M55%2055q6%205%2012-1%22%20fill%3D%22none%22%20stroke-width%3D%222%22%2F%3E%3Cpath%20d%3D%22m46%2052%204%201m22-1%204-1%22%20stroke%3D%22%23e39376%22%20stroke-width%3D%223%22%2F%3E%3Cpath%20d%3D%22m38%2078-11%2015%209%207m43-21%209%2012%22%20fill%3D%22none%22%20stroke%3D%22%23257b7b%22%20stroke-width%3D%2210%22%2F%3E%3Cpath%20d%3D%22m38%2078-11%2015%209%207m43-21%209%2012%22%20fill%3D%22none%22%2F%3E%3Cpath%20d%3D%22m76%2078%2022-3%205%2031-23%204Z%22%20fill%3D%22%23e97a62%22%2F%3E%3Cpath%20d%3D%22m83%2084%2010-1m-9%207%2010-1m-9%207%208-1%22%20stroke%3D%22%23fff7df%22%20stroke-width%3D%222%22%2F%3E%3Cpath%20d%3D%22M85%2093c-3-4-8-3-9%201-1%205%206%208%2010%205%22%20fill%3D%22%23f2c9a7%22%2F%3E%3Cpath%20d%3D%22m32%2097%2010-1c5%205%203%2010-2%2010l-8-3Z%22%20fill%3D%22%23f2c9a7%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E"); background-size: auto 96%; background-position: center bottom; background-repeat: no-repeat; }
.art-detective::before, .art-detective::after { content: none; }
.card-number { margin-bottom: 6px; color: var(--teal); font-size: .7rem; font-weight: 800; letter-spacing: .12em; }
.card-title { display: block; margin-bottom: 9px; font-size: 1.25rem; font-weight: 800; line-height: 1.2; letter-spacing: -.035em; }
.card-description { display: block; flex: 1; color: var(--muted); font-size: .87rem; line-height: 1.55; }
.card-cta { display: flex; align-items: center; justify-content: space-between; width: 100%; margin-top: 19px; color: var(--teal-dark); font-size: .87rem; font-weight: 800; }
.card-cta::after { content: "↗"; font-size: 1.35rem; line-height: 1; }
.game-screen { padding-top: 28px; max-width: 950px; margin-inline: auto; }
.game-head { position: relative; padding-right: 140px; margin-bottom: 23px; }
.game-head .eyebrow { margin-bottom: 8px; }
.game-head h2 { font-size: clamp(1.8rem, 4vw, 2.65rem); letter-spacing: -.045em; }
.back-button { position: absolute; right: 0; top: 5px; min-height: 44px; padding: 9px 14px; border: 1px solid #c9d6c4; border-radius: 12px; background: var(--paper); font-size: .85rem; font-weight: 800; }
.back-button:hover { background: #edf4e6; }
.round-bar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 17px; border: 1px solid var(--line); border-radius: 17px; background: #f8faef; margin-bottom: 27px; }
#progress { font-size: .86rem; font-weight: 800; }
.round-bar .limit-pills { gap: 5px; }
.round-bar .limit-pills button { min-width: 56px; padding: 9px 11px; }
#instruction { text-align: center; font-size: clamp(1.25rem, 3vw, 1.65rem); letter-spacing: -.025em; max-width: 780px; margin: 0 auto; }
#detail { text-align: center; color: var(--muted); font-size: .96rem; margin: 10px auto 20px; max-width: 700px; }
.scene { min-width: 0; position: relative; padding: 25px; margin-top: 22px; border: 1.5px solid var(--line); border-radius: 24px; background: var(--paper); box-shadow: var(--shadow); }
.scene:empty { min-height: 160px; }
.task-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; text-align: center; color: var(--muted); font-size: 1rem; margin-bottom: 8px; }
.prompt-number { display: inline-flex; align-items: center; justify-content: center; min-width: 66px; min-height: 61px; padding: 4px 16px; border: 2px solid var(--ink); border-radius: 13px 11px 14px 10px; background: var(--yellow); color: var(--ink); font-size: 2rem; line-height: 1.1; font-weight: 800; box-shadow: 3px 3px 0 #e9dfbd; transform: rotate(-2deg); }
.clue-note { width: fit-content; max-width: 100%; margin: 8px auto 18px; padding: 12px 18px; border-radius: 12px; background: #edf4e8; color: var(--teal-dark); text-align: center; font-size: 1.02rem; font-weight: 800; }
.numberline-scroll { max-width: 100%; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; scrollbar-color: #a6bba3 #edf1e3; scrollbar-width: thin; padding-bottom: 11px; margin: 15px auto 0; -webkit-overflow-scrolling: touch; }
.numberline-scroll::-webkit-scrollbar { height: 8px; }
.numberline-scroll::-webkit-scrollbar-track { background: #edf1e3; border-radius: 12px; }
.numberline-scroll::-webkit-scrollbar-thumb { background: #a6bba3; border-radius: 12px; }
.numberline-track { --count: 11; position: relative; isolation: isolate; display: grid; grid-template-columns: repeat(var(--count), minmax(42px, 1fr)); min-width: calc(var(--count) * 42px); min-height: 149px; margin: 0 auto; }
.numberline-track::before { content: ""; position: absolute; z-index: -1; left: 21px; right: 21px; top: 88px; height: 3px; border-radius: 5px; background: var(--ink); }
.tick { position: relative; min-width: 0; width: 100%; min-height: 147px; padding: 0; border: 0; background: transparent; border-radius: 10px; font-weight: 800; transition: background .15s; }
button.tick:not(:disabled):hover { background: #eef4e5; }
.tick:focus-visible { outline-offset: -3px; }
.tick-stem { position: absolute; width: 2px; height: 18px; left: calc(50% - 1px); top: 80px; background: var(--ink); border-radius: 2px; }
.tick-label { display: inline-flex; align-items: center; justify-content: center; position: absolute; top: 106px; left: 50%; transform: translateX(-50%); min-width: 34px; min-height: 30px; border-radius: 7px; line-height: 1.1; font-size: .94rem; }
.tick.is-anchor .tick-stem { width: 3px; height: 23px; top: 77px; }
.tick.is-anchor .tick-label { font-size: 1.04rem; }
.tick-flag { position: absolute; top: 24px; left: 50%; transform: translateX(-50%); display: inline-flex; align-items: center; justify-content: center; min-width: 32px; min-height: 36px; padding: 3px 8px; border: 2px solid var(--ink); border-radius: 9px 8px 8px 8px; background: var(--yellow); color: var(--ink); font-size: 1.02rem; line-height: 1.1; white-space: nowrap; }
.tick-flag::after { content: ""; position: absolute; width: 2px; height: 23px; top: calc(100% + 2px); left: calc(50% - 1px); background: var(--ink); }
.tick.is-target .tick-flag { background: #f8d4c4; }
.tick.is-correct .tick-flag, .tick.is-end .tick-flag { background: #cee4cc; border-color: #477752; }
.tick.is-start .tick-flag { background: #cae1df; }
.tick.is-current .tick-label { background: var(--teal); color: white; }
.tick.is-walked .tick-label { background: #e1edda; }
.tick.is-walked .tick-stem { background: #568666; }
.tick.is-correct .tick-label { background: #d8ebd4; color: #275d3e; }
.tick.is-eliminated .tick-label { color: #b7c0b3; text-decoration: line-through; }
.tick.is-eliminated .tick-stem { background: #d3dacb; }
.tick.is-wrong .tick-label { color: #a6473b; background: #fae2d8; }
.choice-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: 590px; margin: 24px auto 4px; gap: 12px; }
.choice, .number-choice { min-width: 0; min-height: 64px; padding: 12px 8px; border: 1.5px solid #c7d6c4; border-bottom-width: 4px; border-radius: 14px; background: #f5f8ec; font-size: 1.5rem; line-height: 1.1; font-weight: 800; transition: background .15s, transform .15s, border-color .15s; }
.choice:hover:not(:disabled), .number-choice:hover:not(:disabled) { background: #e3f0df; border-color: var(--teal); transform: translateY(-2px); }
.choice.is-correct, .number-choice.is-correct { border-color: #558865; background: #d9ecd5; color: #235a3c; }
.choice.is-wrong, .number-choice.is-wrong { border-color: #cf8470; background: #fbe4dc; color: #9b493c; }
.choice:disabled:not(.is-correct):not(.is-wrong), .number-choice:disabled:not(.is-correct):not(.is-wrong) { opacity: .55; }
.detective-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(57px, 1fr)); gap: 9px; max-width: 720px; margin: 23px auto 5px; }
.number-choice { min-height: 57px; font-size: 1.18rem; padding: 10px 4px; }
.helper-row { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px; margin: 20px 0 2px; }
.helper-button, .secondary-button { min-height: 44px; border: 1px solid #bacdba; border-radius: 11px; padding: 10px 16px; color: var(--teal-dark); background: #f2f7e9; font-size: .87rem; font-weight: 800; }
.helper-button:hover, .secondary-button:hover { background: #e4efdc; }
.status-note { color: var(--muted); font-size: .86rem; text-align: center; max-width: 680px; margin: 13px auto 0; }
.feedback { min-height: 53px; padding: 15px 12px 8px; margin: 10px auto 0; text-align: center; font-size: 1rem; font-weight: 800; line-height: 1.5; max-width: 730px; }
.feedback.good, .feedback.success, .feedback.is-correct { color: #346d49; }
.feedback.bad, .feedback.error, .feedback.is-wrong { color: #ad5344; }
.next-row { display: flex; justify-content: center; margin: 8px 0 20px; }
#next, .primary-button { min-height: 48px; border: 1px solid var(--teal-dark); border-bottom-width: 4px; border-radius: 13px; padding: 11px 24px; background: var(--teal); color: #fffdf6; font-size: .95rem; font-weight: 800; line-height: 1.3; }
#next:hover, .primary-button:hover { background: var(--teal-dark); }
#next:active, .primary-button:active { transform: translateY(2px); border-bottom-width: 2px; }
.example-card { max-width: 720px; margin: 0 auto; text-align: center; padding: 14px 15px 20px; }
.example-kicker { display: inline-block; margin-bottom: 14px; padding: 6px 11px; border-radius: 8px; color: var(--teal-dark); background: #e6efde; font-size: .75rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.example-card h3 { font-size: clamp(1.4rem, 3.5vw, 1.9rem); letter-spacing: -.035em; margin-bottom: 14px; }
.example-card p { max-width: 590px; margin-inline: auto; color: var(--muted); line-height: 1.7; }
.example-card strong { color: var(--ink); }
.example-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 11px; margin-top: 24px; }
.round-summary { max-width: 620px; margin: 18px auto; text-align: center; padding: 18px; border: 1px solid #d1ddc7; border-radius: 15px; background: #f2f7e9; color: var(--teal-dark); }
.finish-card { max-width: 650px; margin: 10px auto; text-align: center; padding: 18px 10px 24px; }
.finish-card h3 { font-size: clamp(1.7rem, 4vw, 2.5rem); letter-spacing: -.04em; margin-bottom: 14px; }
.finish-card p { color: var(--muted); max-width: 490px; margin: 10px auto; }
.finish-card .primary-button, .finish-card .secondary-button { margin-top: 14px; }
footer, .site-footer { text-align: center; padding: 27px 12px 0; margin-top: 22px; color: #6c7a6b; font-size: .75rem; line-height: 1.7; }
footer a { color: var(--teal-dark); text-underline-offset: 3px; }
.brand > span { display: none; }
.brand small { font-size: .63em; letter-spacing: .08em; }
.hero-copy > p:not(.eyebrow):not(.hero-note) { margin-top: 24px; line-height: 1.7; color: var(--muted); }
.section-label { color: var(--teal-dark); font-size: .7rem; font-weight: 800; letter-spacing: .12em; }
.settings h2 { margin-top: 6px; font-size: 1.25rem; letter-spacing: -.03em; }
.card-art > * { visibility: hidden; }
.card-art { color: transparent; }
.card-cta::after { content: none; }
.auto-setting { display: flex; align-items: center; justify-content: center; gap: 9px; margin: 14px auto; font-size: .86rem; color: var(--muted); }
.auto-setting input { width: 19px; height: 19px; accent-color: var(--teal); }
.line-scroll-hint { font-size: .78rem; color: var(--muted); margin: 8px auto 18px; text-align: center; }
.challenge-context, .clue-note { text-align: center; margin: 14px auto; color: var(--muted); }
.clue-note { padding: 13px; max-width: 670px; background: #f6f2e3; border-radius: 12px; }
.detective-example { display: grid; gap: 11px; margin-top: 20px; }
.detective-example p { width: 100%; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #f4f7eb; }
.guess-history { max-width: 620px; max-height: 160px; overflow: auto; margin: 20px auto; padding: 14px 14px 14px 38px; font-size: .85rem; line-height: 1.8; background: #f6f7ef; border-radius: 12px; }
.tick-flag { min-width: 30px; padding-inline: 6px; }
.tick.is-end .tick-flag { background: #f8d4c4; border-color: #b75743; }
.tick.is-current .tick-label { background: var(--teal); color: white; }
.choice small { display: block; margin-top: 5px; font-size: .68rem; }
.feedback.hint { color: var(--teal-dark); }
.feedback.retry { color: #9b493c; }
.finish-stars { color: #b58125; font-size: 2rem; letter-spacing: .12em; }
.home-note { margin: 23px auto 0; max-width: 900px; color: var(--muted); text-align: center; font-size: .88rem; }
.helper-button:disabled { opacity: .55; cursor: default; }
@media (min-width: 1200px) { .hero-grid { min-height: 382px; } }
@media (max-width: 950px) {
  .app-shell { width: min(100% - 40px, 850px); }
  .hero-grid { gap: 22px; padding: 34px 0 28px; }
  .hero-title { font-size: clamp(2.5rem, 6vw, 3.8rem); }
  .hero-note { font-size: .96rem; margin-top: 17px; }
  .games-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
  .game-card { padding: 16px 18px 20px; }
  .card-art { height: 110px; }
  .settings { padding: 18px 20px; }
}
@media (max-width: 620px) {
  .app-shell { width: calc(100% - 30px); padding-bottom: 18px; }
  .site-header { min-height: 75px; gap: 10px; }
  .brand { font-size: .92rem; gap: 8px; }
  .brand::before { width: 26px; height: 26px; flex-basis: 26px; }
  .star-pill { padding: 7px 10px; font-size: .8rem; gap: 5px; }
  .star-pill::before { font-size: 1.1rem; }
  .hero-grid { grid-template-columns: 1fr; gap: 21px; padding: 29px 0 24px; }
  .hero-copy { max-width: 490px; }
  .eyebrow { font-size: .68rem; letter-spacing: .11em; margin-bottom: 11px; }
  .hero-title { max-width: 420px; font-size: clamp(2.7rem, 10.5vw, 4rem); }
  .hero-note { max-width: 460px; margin-top: 17px; font-size: .96rem; line-height: 1.6; }
  .hero-art { width: min(100%, 440px); justify-self: center; }
  .settings { flex-direction: column; align-items: flex-start; gap: 14px; padding: 17px; margin-bottom: 19px; border-radius: 17px; }
  .settings .limit-pills { justify-content: flex-start; width: 100%; }
  .settings .limit-pills button { flex: 1; min-width: 58px; padding-inline: 10px; }
  .games-grid { gap: 11px; }
  .game-card { padding: 11px 11px 15px; border-radius: 17px; }
  .card-art { height: 94px; border-radius: 10px; margin-bottom: 13px; }
  .card-title { font-size: 1.05rem; margin-bottom: 8px; }
  .card-description { font-size: .8rem; line-height: 1.5; }
  .card-number { font-size: .64rem; }
  .card-cta { font-size: .78rem; margin-top: 15px; }
  .game-screen { padding-top: 23px; }
  .game-head { display: flex; flex-wrap: wrap; align-items: center; gap: 9px 15px; padding: 0; margin-bottom: 17px; }
  .game-head .eyebrow { width: 100%; margin: 0; }
  .game-head h2 { flex: 1; min-width: 135px; font-size: 1.8rem; }
  .back-button { position: static; flex-shrink: 0; padding: 9px 11px; font-size: .76rem; }
  .round-bar { padding: 12px; gap: 10px; flex-wrap: wrap; margin-bottom: 23px; }
  #progress { font-size: .8rem; }
  .round-bar .limit-pills { gap: 5px; }
  .round-bar .limit-pills button { min-width: 48px; font-size: .8rem; padding-inline: 8px; }
  #instruction { font-size: 1.25rem; }
  #detail { font-size: .88rem; margin-bottom: 17px; }
  .scene { padding: 18px 10px; border-radius: 18px; margin-top: 17px; }
  .task-banner { gap: 9px; font-size: .9rem; }
  .prompt-number { min-width: 56px; min-height: 53px; font-size: 1.8rem; padding-inline: 12px; }
  .clue-note { padding: 11px 13px; font-size: .93rem; }
  .choice-grid { gap: 8px; margin-top: 18px; }
  .choice { min-height: 59px; border-radius: 11px; font-size: 1.3rem; }
  .detective-grid { grid-template-columns: repeat(auto-fit, minmax(48px, 1fr)); gap: 7px; }
  .number-choice { min-height: 52px; border-radius: 10px; font-size: 1.06rem; }
  .helper-row { gap: 8px; margin-top: 16px; }
  .helper-button { font-size: .8rem; padding-inline: 12px; }
  .status-note { font-size: .8rem; }
  .feedback { padding-inline: 4px; font-size: .91rem; }
  .example-card { padding: 8px 5px 16px; }
  .example-card p { font-size: .93rem; line-height: 1.65; }
  .example-actions { gap: 9px; margin-top: 21px; }
  .example-actions button { flex: 1 1 auto; }
  footer, .site-footer { font-size: .68rem; padding-top: 20px; }
}
@media (max-width: 360px) {
  .app-shell { width: calc(100% - 24px); }
  .brand { font-size: .83rem; }
  .brand::before { width: 23px; height: 23px; flex-basis: 23px; }
  .star-pill { padding-inline: 8px; font-size: .74rem; }
  .hero-title { font-size: 2.65rem; }
  .games-grid { gap: 9px; }
  .game-card { padding-inline: 10px; }
  .card-title { font-size: 1rem; }
  .card-description { font-size: .76rem; }
  .round-bar { align-items: flex-start; }
  .round-bar .limit-pills { width: 100%; justify-content: flex-start; }
  .round-bar .limit-pills button { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Numero detective: una piccola indagine, con indizi e candidati sempre leggibili. */
.detective-stage {
  display: flex;
  align-items: center;
  gap: 19px;
  position: relative;
  max-width: 800px;
  margin: 0 auto 20px;
  padding: 21px 23px;
  border: 1.5px solid #d7dec8;
  border-radius: 20px 23px 20px 19px;
  background: #f9f4df;
}
.detective-mascot { display: block; width: 96px; height: auto; flex: 0 0 96px; transform: rotate(-4deg); transform-origin: center 80%; }
.detective-mascot svg { display: block; width: 100%; height: auto; }
.detective-brief { flex: 1; min-width: 0; }
.detective-brief .case-label { display: inline-block; margin-bottom: 7px; color: var(--teal-dark); font-size: .66rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.detective-brief h3 { font-size: clamp(1.3rem, 2.6vw, 1.6rem); line-height: 1.15; letter-spacing: -.035em; }
.detective-brief p { max-width: 430px; margin-top: 8px; color: var(--muted); font-size: .9rem; line-height: 1.55; }
.detective-range { display: inline-flex; flex: 0 0 auto; flex-direction: column; justify-content: center; align-items: center; gap: 2px; max-width: 180px; min-height: 65px; padding: 11px 16px; border: 1.5px solid #c4d6bd; border-radius: 14px 12px 15px 12px; background: #edf4e5; color: var(--teal-dark); font-size: 1.1rem; font-weight: 800; line-height: 1.3; text-align: center; }
.detective-range small, .detective-range span { font-size: .72rem; font-weight: 700; letter-spacing: .01em; }
.detective-range strong { font-size: 1.24rem; }
.detective-stage.has-clue { border-color: #b7cbb5; background: #f3f6e8; }
.detective-stage.has-clue .detective-mascot { transform: rotate(4deg); }
.detective-stage.is-found { border-color: #93b296; background: #eaf3e2; }
.detective-stage.is-found .detective-range { background: #f9e7aa; border-color: #d4b660; }
.detective-stage.is-found .detective-mascot { transform: rotate(-7deg); }
.detective-clue { display: flex; align-items: center; justify-content: flex-start; gap: 14px; max-width: 720px; margin: 0 auto 18px; padding: 15px 19px; border: 1.5px solid #c1d3ba; border-radius: 16px; background: #eff5e9; color: var(--teal-dark); }
.detective-clue .clue-arrow { display: inline-flex; flex: 0 0 47px; width: 47px; height: 47px; align-items: center; justify-content: center; border: 1.5px solid #abc6a9; border-radius: 13px 12px 14px 12px; background: #fffdf3; font-size: 1.85rem; font-weight: 800; line-height: 1; }
.detective-clue .clue-copy { min-width: 0; }
.detective-clue .clue-copy strong { display: block; font-size: 1.12rem; line-height: 1.25; letter-spacing: -.02em; }
.detective-clue .clue-copy small { display: block; margin-top: 5px; font-size: .84rem; line-height: 1.45; color: #5c7165; }
.detective-clue.clue-down { background: #fff0e4; border-color: #e7c1a9; color: #9d5240; }
.detective-clue.clue-down .clue-arrow { background: #fffaf1; border-color: #e1b39a; }
.detective-clue.clue-down .clue-copy small { color: #82695b; }
.detective-clue.clue-found { background: #e4f0df; border-color: #9cbd9a; color: #2f683f; }
.detective-clue.clue-found .clue-arrow { background: #f8e4a0; border-color: #ceac4c; color: #547b43; }
.detective-board { max-width: 760px; min-width: 0; margin: 0 auto; padding: 20px; border: 1.5px solid #d9dfcb; border-radius: 19px; background: repeating-linear-gradient(0deg, transparent 0 30px, #d9e1d04d 30px 31px), #fbfcf2; }
.detective-board .detective-grid { margin: 0 auto; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(54px, 1fr)); }
.detective-brief .detective-range { margin: 10px 0 0; }
.detective-board .detective-status { margin: 0 auto 14px; }
.detective-board .number-choice { position: relative; min-height: 65px; padding: 13px 5px 10px; border: 1.5px solid #a8c3a7; border-bottom-width: 4px; border-radius: 13px 12px 14px 12px; background: #fffdf5; color: var(--teal-dark); box-shadow: 0 2px 0 #deead7; font-size: 1.3rem; font-weight: 800; }
.detective-board .number-choice:not(:disabled):hover { border-color: var(--teal); background: #e5f0de; transform: translateY(-3px); }
.detective-board .number-choice:not(:disabled):active { transform: translateY(0); }
.detective-board .number-choice:focus-visible { outline-offset: 3px; }
.detective-board .number-choice:disabled { opacity: 1; }
.detective-board .number-label { display: inline-block; line-height: 1.15; }
.detective-board .number-stamp { display: none; position: absolute; top: 4px; right: 4px; align-items: center; justify-content: center; width: 19px; height: 19px; border-radius: 50%; background: #e4e7d9; color: #728271; font-size: .85rem; line-height: 1; }
.detective-board .number-choice.is-ruled-out { border: 1.5px dashed #bdc7b3; background: #f0f2e7; box-shadow: none; color: #76816f; }
.detective-board .number-choice.is-ruled-out .number-label { text-decoration: line-through; text-decoration-thickness: 1.5px; text-decoration-color: #83907c; }
.detective-board .number-choice.is-ruled-out .number-stamp { display: inline-flex; }
.detective-board .number-choice.is-latest { border: 2px solid #db8d70; border-bottom-width: 4px; background: #fce6d8; box-shadow: 0 2px 0 #f1d6c4; color: #9a503d; }
.detective-board .number-choice.is-latest .number-stamp { display: inline-flex; background: #e99c82; color: #6e3c2e; }
.detective-board .number-choice.is-latest .number-label { text-decoration-color: #bb6d55; }
.detective-board .number-choice.is-correct { border: 2px solid #4f8760; border-bottom-width: 4px; background: #d8ebcd; box-shadow: 0 2px 0 #bdd8b5; color: #2b603c; transform: rotate(-3deg); }
.detective-board .number-choice.is-correct .number-label { text-decoration: none; }
.detective-board .number-choice.is-correct .number-stamp { display: inline-flex; background: #497e57; color: #fffdf5; }
.detective-status { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 9px 19px; max-width: 720px; margin: 15px auto 0; color: #5a7265; font-size: .81rem; line-height: 1.5; text-align: center; }
.detective-status strong { color: var(--teal-dark); font-weight: 800; }
.detective-status > span { display: inline-flex; align-items: center; gap: 5px; }
.detective-status > span + span::before { content: ""; display: inline-block; width: 5px; height: 5px; margin-right: 8px; border-radius: 50%; background: #b5c3a6; }
.detective-found { position: relative; display: flex; align-items: center; gap: 14px; max-width: 620px; margin: 20px auto 4px; padding: 17px 42px 17px 18px; border: 1.5px solid #ddbf65; border-radius: 17px 20px 17px 18px; background: #fcf0c6; color: #625125; text-align: left; }
.detective-found > svg, .detective-found .found-badge { display: block; flex: 0 0 48px; width: 48px; height: 48px; }
.detective-found strong { display: block; margin-bottom: 4px; color: #365e44; font-size: 1.05rem; line-height: 1.3; }
.detective-found p, .detective-found small { display: block; font-size: .86rem; line-height: 1.5; }
.detective-found::before, .detective-found::after { content: "★"; position: absolute; color: #bd8d2b; line-height: 1; pointer-events: none; }
.detective-found::before { top: 13px; right: 15px; font-size: 19px; transform: rotate(13deg); }
.detective-found::after { top: 41px; right: 24px; font-size: 11px; transform: rotate(-15deg); }
.detective-example-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; max-width: 700px; margin: 23px auto 5px; }
.detective-example-step { display: flex; flex-direction: column; align-items: flex-start; gap: 11px; min-width: 0; position: relative; padding: 16px; border: 1px solid #d1dec5; border-radius: 14px; background: #f3f7e9; text-align: left; }
.detective-example-step:nth-child(2) { background: #fff0e3; border-color: #ebcfb5; }
.detective-example-step:nth-child(3) { background: #edf4e6; border-color: #bfd5b5; }
.detective-example-step > span { display: inline-flex; align-items: center; justify-content: center; min-width: 31px; height: 31px; padding: 3px 8px; border: 1.5px solid var(--teal-dark); border-radius: 9px 8px 10px 8px; background: #d7e8ce; color: var(--teal-dark); font-size: .95rem; font-weight: 800; transform: rotate(-4deg); }
.detective-example-step:nth-child(2) > span { background: #f8c8ae; border-color: #a65c44; color: #854a37; transform: rotate(3deg); }
.detective-example-step:nth-child(3) > span { background: #efcf78; border-color: #a08b3c; color: #6c5e26; }
.detective-example-step p { margin: 0; padding: 0; border: 0; background: none; color: #526e5d; font-size: .84rem; line-height: 1.6; }
.detective-example-step p strong { color: var(--ink); }
.detective-notebook { max-width: 720px; margin: 18px auto 0; overflow: hidden; border: 1px solid #d4ddc8; border-radius: 13px; background: #f7f8ed; text-align: left; }
.detective-notebook summary { min-height: 46px; padding: 12px 16px; color: var(--teal-dark); font-size: .85rem; font-weight: 800; cursor: pointer; touch-action: manipulation; }
.detective-notebook summary::marker { color: #6b936d; }
.detective-notebook summary:hover { background: #edf3e3; }
.detective-notebook summary:focus-visible { outline: 3px solid var(--teal-dark); outline-offset: -4px; border-radius: 11px; }
.detective-notebook[open] summary { border-bottom: 1px solid #dce4d1; }
.detective-notebook ol, .detective-notebook ul { margin: 0; padding: 14px 18px 15px 37px; color: #61715e; font-size: .82rem; line-height: 1.7; }
.detective-notebook li + li { margin-top: 6px; }
.detective-notebook li::marker { color: #5b805d; font-weight: 800; }
.detective-notebook .guess-history { max-width: none; margin: 0; border: 0; border-radius: 0; background: none; }
.finish-card > .detective-mascot { width: 96px; height: auto; margin: 0 auto 18px; transform: none; }
.detective-parity { display: flex; align-items: center; gap: 17px; max-width: 720px; margin: 0 auto 18px; padding: 16px 19px; border: 1.5px solid #dec887; border-radius: 16px; background: #fff5d7; color: var(--teal-dark); }
.detective-parity .parity-dots { display: flex; flex: 0 0 auto; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px; max-width: 119px; min-height: 54px; padding: 8px; border-radius: 11px; background: #fffdf1; }
.detective-parity .dot-pair { display: inline-flex; align-items: center; gap: 4px; padding: 5px 4px; border: 1px solid #c5d4b5; border-radius: 8px; background: #edf3e2; }
.detective-parity .parity-dot { display: block; flex: 0 0 12px; width: 12px; height: 12px; border: 1.5px solid #2a6e6c; border-radius: 50%; background: #68a5a0; }
.detective-parity .parity-dot.is-lone { border-color: #b77b2e; background: var(--yellow); margin-inline: 3px; }
.detective-parity .parity-caption { flex-basis: 100%; color: #6e7057; text-align: center; font-size: .63rem; line-height: 1.2; }
.detective-parity .parity-copy { min-width: 0; }
.detective-parity .parity-copy .case-label { display: block; margin-bottom: 5px; color: #866a2e; font-size: .64rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.detective-parity .parity-copy strong { display: block; font-size: 1.08rem; line-height: 1.3; letter-spacing: -.02em; }
.detective-parity .parity-copy small { display: block; margin-top: 5px; color: #6e7057; font-size: .82rem; line-height: 1.5; }
.detective-questions { max-width: 760px; margin: 0 auto 19px; padding: 20px; border: 1.5px solid #c7d6bd; border-radius: 18px 21px 18px 19px; background: #f4f7e8; }
.detective-questions .question-heading { margin-bottom: 16px; }
.detective-questions .question-heading .case-label { display: block; margin-bottom: 6px; color: #647e59; font-size: .64rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.detective-questions .question-heading h3 { color: var(--teal-dark); font-size: 1.18rem; line-height: 1.25; letter-spacing: -.025em; }
.detective-questions .question-parity { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.detective-questions .question-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 0; min-height: 48px; padding: 10px 13px; border: 1.5px solid #9ebd9c; border-bottom-width: 3px; border-radius: 12px 11px 13px 11px; background: #fffdf4; color: var(--teal-dark); font-size: .89rem; font-weight: 800; line-height: 1.35; text-align: center; }
.detective-questions .question-button:not(:disabled):hover { border-color: var(--teal); background: #e7f0dd; }
.detective-questions .question-button:not(:disabled):active { transform: translateY(1px); }
.detective-questions .question-button:focus-visible { outline: 3px solid var(--teal-dark); outline-offset: 3px; }
.detective-questions .question-button.is-asked { border-color: #6b936b; background: #e1edda; color: #386344; }
.detective-questions .question-button.is-asked::after { content: "✓"; flex: 0 0 18px; display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; background: #56805c; color: #fffdf4; font-size: .74rem; line-height: 1; }
.detective-questions .question-button:disabled { opacity: .65; }
.detective-questions .question-button.is-asked:disabled { opacity: 1; }
.detective-questions .question-compare { display: grid; grid-template-columns: minmax(0, 1fr) 104px; align-items: center; gap: 12px; margin-top: 17px; padding-top: 17px; border-top: 1px dashed #c5d3b7; }
.detective-questions .question-compare > label { color: #536f58; font-size: .86rem; font-weight: 800; line-height: 1.4; }
.detective-questions #question-number { width: 100%; min-width: 0; min-height: 46px; padding: 9px 12px; border: 1.5px solid #b5c8a8; border-radius: 11px; background: #fff8df; color: var(--teal-dark); font-size: 1.05rem; font-weight: 800; cursor: pointer; }
.detective-questions #question-number:focus-visible { outline: 3px solid var(--teal-dark); outline-offset: 3px; }
.detective-questions .question-comparisons { display: grid; grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.detective-response { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px 13px; max-width: 720px; margin: 0 auto 18px; padding: 17px 19px; border: 1.5px solid #dec88a; border-radius: 16px; background: #fff4d5; }
.detective-response .response-label { grid-column: 1 / -1; color: #8c7032; font-size: .63rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.detective-response > strong { min-width: 0; color: var(--teal-dark); font-size: 1.06rem; line-height: 1.35; letter-spacing: -.02em; }
.detective-response .response-answer { display: inline-flex; align-items: center; justify-content: center; min-width: 51px; min-height: 38px; padding: 7px 12px; border: 1.5px solid #7ca47a; border-radius: 11px 10px 12px 10px; background: #dcebd2; color: #356540; font-size: 1rem; font-weight: 800; line-height: 1.2; }
.detective-response .response-answer.is-yes { border-color: #7ca47a; background: #dcebd2; color: #356540; }
.detective-response .response-answer.is-no { border-color: #dfad95; background: #f9dfd0; color: #98513c; }
.detective-response p { grid-column: 1 / -1; margin: 0; color: #777151; font-size: .84rem; line-height: 1.6; }
.detective-empty-notebook { max-width: 720px; margin: 16px auto 0; padding: 13px 17px; border: 1px dashed #c6d1b7; border-radius: 12px; background: #f8f9ef; color: #6e7b61; font-size: .82rem; line-height: 1.6; text-align: center; }
@media (max-width: 480px) {
  .detective-questions { padding: 15px 12px; margin-bottom: 16px; border-radius: 15px; }
  .detective-questions .question-heading { margin-bottom: 13px; }
  .detective-questions .question-heading h3 { font-size: 1.08rem; }
  .detective-questions .question-heading .case-label { font-size: .59rem; letter-spacing: .09em; }
  .detective-questions .question-parity { gap: 8px; }
  .detective-questions .question-button { min-height: 47px; padding: 10px 9px; gap: 5px; font-size: .81rem; border-radius: 10px; }
  .detective-questions .question-button.is-asked::after { flex-basis: 16px; width: 16px; height: 16px; font-size: .68rem; }
  .detective-questions .question-compare { grid-template-columns: minmax(0, 1fr) 80px; gap: 10px; margin-top: 14px; padding-top: 14px; }
  .detective-questions .question-compare > label { font-size: .8rem; }
  .detective-questions #question-number { min-height: 45px; padding-inline: 9px; font-size: .98rem; }
  .detective-questions .question-comparisons { grid-template-columns: 1fr; gap: 8px; }
  .detective-response { gap: 7px 10px; padding: 14px 12px; border-radius: 13px; }
  .detective-response > strong { font-size: .96rem; }
  .detective-response .response-answer { min-width: 45px; min-height: 36px; padding: 6px 9px; font-size: .93rem; border-radius: 9px; }
  .detective-response .response-label { font-size: .58rem; letter-spacing: .08em; }
  .detective-response p { font-size: .77rem; }
  .detective-empty-notebook { padding: 12px 13px; font-size: .76rem; }
}
@media (max-width: 480px) {
  .detective-parity { gap: 12px; padding: 13px 12px; margin-bottom: 15px; border-radius: 13px; }
  .detective-parity .parity-dots { width: 66px; flex-basis: 66px; gap: 5px; padding: 7px 4px; }
  .detective-parity .parity-copy .case-label { font-size: .59rem; letter-spacing: .08em; }
  .detective-parity .parity-copy strong { font-size: .99rem; }
  .detective-parity .parity-copy small { font-size: .75rem; }
}
@media (max-width: 700px) {
  .detective-stage { flex-wrap: wrap; gap: 13px 16px; padding: 19px; }
  .detective-mascot { flex-basis: 82px; width: 82px; }
  .detective-range { min-height: 41px; max-width: none; flex-direction: row; gap: 7px; margin-left: 98px; padding: 8px 13px; border-radius: 10px; font-size: .95rem; }
  .detective-range strong { font-size: 1.08rem; }
  .detective-board { padding: 15px; }
}
@media (max-width: 480px) {
  .detective-stage { padding: 16px 13px; gap: 12px; margin-bottom: 16px; border-radius: 16px; }
  .detective-mascot { flex-basis: 70px; width: 70px; }
  .detective-brief { flex-basis: calc(100% - 82px); }
  .detective-brief .case-label { font-size: .6rem; letter-spacing: .1em; margin-bottom: 6px; }
  .detective-brief h3 { font-size: 1.19rem; }
  .detective-brief p { font-size: .81rem; margin-top: 7px; }
  .detective-range { margin-left: 82px; padding: 7px 10px; min-height: 38px; font-size: .84rem; flex-wrap: wrap; }
  .detective-range small, .detective-range span { font-size: .68rem; }
  .detective-clue { gap: 11px; padding: 12px; margin-bottom: 15px; border-radius: 13px; }
  .detective-clue .clue-arrow { flex-basis: 41px; width: 41px; height: 44px; font-size: 1.6rem; border-radius: 11px; }
  .detective-clue .clue-copy strong { font-size: 1rem; }
  .detective-clue .clue-copy small { font-size: .76rem; margin-top: 4px; }
  .detective-board { padding: 11px; border-radius: 15px; }
  .detective-board .detective-grid { grid-template-columns: repeat(auto-fit, minmax(47px, 1fr)); gap: 8px; }
  .detective-board .number-choice { min-height: 59px; padding-top: 14px; font-size: 1.12rem; border-radius: 11px; }
  .detective-board .number-stamp { width: 16px; height: 16px; font-size: .72rem; top: 3px; right: 3px; }
  .detective-status { gap: 6px 11px; margin-top: 12px; font-size: .74rem; }
  .detective-status > span + span::before { margin-right: 4px; width: 4px; height: 4px; }
  .detective-found { gap: 11px; padding: 14px 35px 14px 13px; border-radius: 14px; }
  .detective-found > svg, .detective-found .found-badge { width: 39px; height: 39px; flex-basis: 39px; }
  .detective-found strong { font-size: .95rem; }
  .detective-found p, .detective-found small { font-size: .77rem; }
  .detective-found::before { right: 12px; top: 12px; font-size: 16px; }
  .detective-found::after { right: 18px; top: 35px; font-size: 10px; }
  .detective-example-steps { grid-template-columns: 1fr; gap: 9px; margin-top: 19px; }
  .detective-example-step { flex-direction: row; align-items: center; padding: 12px; gap: 12px; border-radius: 12px; }
  .detective-example-step > span { flex: 0 0 31px; }
  .detective-example-step p { font-size: .81rem; }
}
@media (prefers-reduced-motion: reduce) {
  .detective-stage .detective-mascot, .detective-board .number-choice { transition: none; animation: none; }
  .detective-board .number-choice:not(:disabled):hover { transform: none; }
}

/* Scegli con calma: una tacca visibile, poi la conferma della risposta. */
.numberline-place .numberline-track {
  grid-template-columns: repeat(var(--count), minmax(56px, 1fr));
  min-width: calc(var(--count) * 56px);
}
.numberline-place .numberline-track::before {
  z-index: 1;
  pointer-events: none;
  left: calc(100% / var(--count) / 2);
  right: calc(100% / var(--count) / 2);
}
.numberline-place button.tick {
  border: 2px solid var(--paper);
  background: #f8faf2;
  box-shadow: inset 0 0 0 1px #dbe4d0;
  border-radius: 12px;
}
.numberline-place button.tick:not(:disabled):hover {
  background: #eaf3df;
  box-shadow: inset 0 0 0 1px #8bad80;
}
.numberline-place .tick.is-selected {
  background: #fff0ce;
  box-shadow: inset 0 0 0 2px #bd8d2b;
}
.numberline-place .tick.is-selected .tick-flag {
  min-width: 40px;
  min-height: 40px;
  top: 20px;
  padding-inline: 6px;
  background: var(--yellow);
  font-size: 1.25rem;
}
.numberline-place .tick.is-selected .tick-stem { background: var(--teal-dark); }
.numberline-place .tick-flag { z-index: 2; }
.tick-dot {
  position: absolute;
  z-index: 2;
  top: 89px;
  left: 50%;
  width: 13px;
  height: 13px;
  transform: translate(-50%, -50%);
  border: 2px solid var(--paper);
  border-radius: 50%;
  background: var(--teal-dark);
  box-shadow: 0 0 0 1px var(--teal-dark);
  pointer-events: none;
}
.numberline-place .tick.is-correct {
  background: #e7f2df;
  box-shadow: inset 0 0 0 2px #558865;
}
.numberline-place .tick.is-correct .tick-flag { background: #cee4cc; }
.numberline-place .tick.is-wrong {
  background: #fff0e7;
  box-shadow: inset 0 0 0 2px #c77b63;
}
.placement-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.4fr);
  align-items: stretch;
  gap: 12px;
  max-width: 720px;
  margin: 20px auto 0;
}
.move-button {
  min-width: 0;
  min-height: 56px;
  padding: 11px 12px;
  border: 1.5px solid #abc4a8;
  border-bottom-width: 4px;
  border-radius: 13px;
  background: #edf5e5;
  color: var(--teal-dark);
  font-size: .97rem;
  line-height: 1.3;
  font-weight: 800;
}
.move-button:hover:not(:disabled) { background: #e0eed5; border-color: var(--teal); }
.move-button:active:not(:disabled) { transform: translateY(2px); border-bottom-width: 2px; }
.move-button:disabled { background: #f1f3e9; border-color: #d6dfcd; color: #80917f; }
.check-answer { min-width: 0; min-height: 56px; white-space: normal; }
.primary-button.check-answer:disabled {
  border-color: #a4b8ae;
  background: #b6c9bd;
  color: #f8fcf4;
}
.placement-note {
  max-width: 650px;
  margin: 12px auto 0;
  color: var(--muted);
  text-align: center;
  font-size: .88rem;
  line-height: 1.55;
}

/* Il numero nascosto si legge su tutta la linea, anche sul telefono. */
.numberline-full {
  width: 100%;
  min-width: 0;
  padding-inline: 18px;
  overflow: visible;
}
.numberline-full .numberline-track {
  width: 100%;
  min-width: 0;
  grid-template-columns: repeat(var(--count), minmax(0, 1fr));
}
.numberline-full .numberline-track::before {
  left: calc(100% / var(--count) / 2);
  right: calc(100% / var(--count) / 2);
}
.numberline-full .tick { border-radius: 0; }
.numberline-full .tick:not(.is-target) .tick-dot { display: none; }
.numberline-full .tick-label { min-width: 30px; font-size: .88rem; }
.numberline-full .tick.is-anchor .tick-label { font-size: .96rem; }
.numberline-full .tick-flag {
  min-width: 34px;
  min-height: 39px;
  top: 21px;
  padding: 3px 5px;
  background: #f8d4c4;
  font-size: 1.15rem;
}
.numberline-full .tick.is-target .tick-stem { width: 3px; left: calc(50% - 1.5px); background: #a5553d; }
.numberline-full .tick.is-target .tick-dot { background: #b96346; box-shadow: 0 0 0 1px #a5553d; }
.numberline-full .tick.is-correct .tick-flag { background: #cee4cc; }
.numberline-full .tick.is-correct .tick-dot { background: #477752; box-shadow: 0 0 0 1px #477752; }
.choice.is-selected {
  border-color: var(--teal-dark);
  background: #dcecdf;
  box-shadow: 0 0 0 2px var(--teal-dark);
  color: var(--teal-dark);
}
.choice.is-selected.is-wrong { border-color: #c77b63; background: #fbe4dc; box-shadow: 0 0 0 2px #c77b63; color: #9b493c; }
.choice.is-selected.is-correct { border-color: #558865; background: #d9ecd5; box-shadow: 0 0 0 2px #558865; color: #235a3c; }
.answer-check { display: flex; flex-direction: column; align-items: center; justify-content: center; margin: 18px auto 0; }
.answer-check .check-answer { width: min(100%, 330px); }

@media (max-width: 620px) {
  .placement-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-top: 16px; }
  .placement-controls .check-answer { grid-column: 1 / -1; }
  .placement-controls .move-button { padding-inline: 8px; font-size: .9rem; }
  .placement-note { font-size: .81rem; }
  .numberline-full .tick-label { font-size: .82rem; }
  .numberline-full .tick.is-anchor .tick-label { font-size: .9rem; }
  .numberline-full + .line-scroll-hint { font-size: .76rem; }
}
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
