:root{color-scheme:light;--ink:#3b3026;--muted:#7e7363;--teal:#214c47;--teal-light:#e6ede5;--copper:#b98643;--line:#dcccaf;--paper:#fff9ed;--error:#9c4a39;--green:#487358;--font:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;--serif:Georgia,"Times New Roman",serif}
*{box-sizing:border-box}body{margin:0;background:#f6eddb;color:var(--ink);font:15px/1.5 var(--font)}button,input,select{font:inherit}button,a,input,select{-webkit-tap-highlight-color:transparent}button{cursor:pointer}button:disabled{cursor:default;opacity:.5}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible{outline:3px solid #bd8e45;outline-offset:4px}button{touch-action:manipulation}a{color:var(--teal)}.game-shell{min-height:100svh;display:grid;grid-template-columns:minmax(320px,42%) 1fr}.shop-scene{position:sticky;top:0;height:100svh;overflow:hidden;background:#b18350 url('assets/shop.png') 25% center/auto 100% no-repeat}.shop-scene:after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,rgba(22,36,25,.16),transparent 30%,transparent 63%,rgba(22,27,19,.8));pointer-events:none}.shop-brand{position:absolute;z-index:2;top:28px;left:30px;display:flex;align-items:center;gap:12px;color:#fff9e9;letter-spacing:.14em;font-size:10px;line-height:1.6;text-shadow:0 1px 6px #3c251d}.shop-brand b{font-size:15px;letter-spacing:.2em}.brand-symbol{font-size:42px;line-height:1;color:#ffe1a1}.scene-caption{position:absolute;z-index:2;bottom:40px;left:36px;color:#fff5df}.scene-caption p{font:italic clamp(24px,2.5vw,38px)/1.2 var(--serif);margin:18px 0 20px}.tiny-line{display:block;width:38px;height:2px;background:#dab67b}.scene-city{font-size:9px;letter-spacing:.15em;opacity:.82}.speaking-light{position:absolute;inset:0;pointer-events:none;box-shadow:inset 0 0 0 0 #f6d49b;z-index:3;transition:box-shadow .4s}.is-speaking .speaking-light{animation:voice-glow 1.4s ease-in-out infinite}.paper-side{min-width:0;display:flex;flex-direction:column;padding:0 clamp(24px,3.2vw,60px);background:radial-gradient(ellipse at 100% 0,rgba(218,182,123,.17),transparent 55%),linear-gradient(110deg,#fff9ee,#f9f0dd)}.topbar{min-height:88px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);gap:14px}.wordmark{text-decoration:none;color:var(--ink);font:bold 23px/1.05 var(--serif);white-space:nowrap}.wordmark span{display:block;font:10px/1.8 var(--font);letter-spacing:.12em;text-transform:uppercase;color:var(--muted);margin-top:4px}.topbar nav{display:flex;gap:3px}.icon-button{border:0;border-radius:50%;background:transparent;color:var(--teal);width:40px;height:40px;display:inline-flex;align-items:center;justify-content:center}.icon-button:hover{background:#e9dfca}.icon{width:21px;height:21px;flex-shrink:0;vertical-align:middle;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.progress-strip{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:15px 0;color:var(--muted);font-size:11px}.progress-strip strong{font-weight:600;color:var(--teal)}.progress-meta{display:flex;gap:14px}.progress-dots{display:flex;gap:4px;align-items:center}.progress-dots i{display:block;width:6px;height:6px;border-radius:50%;background:#dbccb0}.progress-dots i.done{background:var(--teal)}#game{width:100%;max-width:760px;margin:auto;outline:none;flex:1;display:flex;flex-direction:column;justify-content:center;padding:12px 0 30px}.eyebrow{font-size:10px;font-weight:650;letter-spacing:.17em;text-transform:uppercase;color:var(--copper);display:flex;align-items:center;gap:9px;margin-bottom:10px}.eyebrow:before{content:"";width:23px;height:1px;background:var(--copper)}h1,h2,h3,p{margin-top:0}h1,h2{font-family:var(--serif);font-weight:normal;letter-spacing:-.035em}h1{font-size:clamp(35px,3.8vw,57px);line-height:1.05;margin-bottom:17px}h2{font-size:clamp(30px,3vw,44px);line-height:1.12;margin-bottom:10px}h3{font-size:16px;font-weight:650}.lead{color:var(--muted);font-size:15px;line-height:1.7;max-width:500px;margin-bottom:24px}.home-lead{max-width:430px}.home-title em{color:var(--teal);font-weight:normal}.home-steps{list-style:none;padding:0;display:grid;gap:17px;margin:32px 0}.home-steps li{display:flex;align-items:center;gap:14px;font-size:13px}.step-number{width:31px;height:31px;border:1px solid #c9b78e;border-radius:50%;color:var(--copper);display:grid;place-items:center;font:italic 17px var(--serif);flex-shrink:0}.home-note{font-size:12px;color:var(--muted);padding-top:12px;max-width:470px}.home-note strong{font-weight:550;color:var(--ink)}.home-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.primary,.secondary,.quiet-button{border-radius:11px;padding:13px 19px;min-height:48px;border:1px solid transparent;display:inline-flex;align-items:center;justify-content:center;gap:9px;font-weight:600;font-size:13px;text-decoration:none;transition:background .18s,transform .18s,border-color .18s}.primary{background:var(--teal);color:#fff8e7;border-color:var(--teal);box-shadow:0 3px 0 #153d37}.primary:hover:not(:disabled){background:#2e6058;transform:translateY(-1px)}.primary:active:not(:disabled){transform:translateY(1px);box-shadow:0 1px 0 #153d37}.secondary{color:var(--teal);background:#fffaf0;border-color:#c1a57b}.secondary:hover:not(:disabled){background:#f0e7d3;border-color:#9d7f4e}.quiet-button{padding:8px 11px;background:transparent;color:var(--muted);font-size:12px;min-height:36px;font-weight:500}.quiet-button:hover{color:var(--teal);background:#eee4cf}.full-width{width:100%}.small-text{font-size:12px;color:var(--muted)}.level-control{margin:26px 0 18px;display:flex;align-items:center;gap:12px;font-size:12px;color:var(--muted)}select{padding:9px 32px 9px 12px;border:1px solid var(--line);border-radius:8px;color:var(--ink);background:#fff9ed;max-width:100%}.level-badge{font-size:10px;border:1px solid #d6c6a6;border-radius:20px;padding:3px 9px;color:var(--muted);white-space:nowrap}.screen-heading{display:flex;align-items:center;justify-content:space-between;gap:10px}.screen-description{font-size:12px;color:var(--muted);margin-bottom:15px;line-height:1.6}.audio-bar{background:linear-gradient(110deg,#e9eee3,#f2efdf);border:1px solid #d1d8bd;border-radius:14px;padding:13px 15px;display:flex;align-items:center;gap:12px;margin:14px 0 22px}.audio-main{border:0;border-radius:50%;background:var(--teal);color:#fff6df;width:45px;height:45px;display:grid;place-items:center;flex-shrink:0}.audio-main:hover{background:#37665a}.audio-main .icon{width:23px;height:23px}.audio-description{flex:1;min-width:0}.audio-label{font-size:12px;font-weight:600;color:var(--teal)}.waveform{display:flex;align-items:center;gap:3px;height:23px;margin-top:3px}.waveform i{display:block;width:3px;height:8px;border-radius:5px;background:#b6bfa2;transform-origin:center}.waveform i:nth-child(3n){height:15px}.waveform i:nth-child(4n){height:22px}.waveform i:nth-child(5n){height:12px}.audio-bar.playing .waveform i{background:var(--teal);animation:wave .85s ease-in-out infinite alternate}.audio-bar.playing .waveform i:nth-child(3n){animation-delay:-.35s}.audio-bar.playing .waveform i:nth-child(4n){animation-delay:-.6s}.replay-button{font-size:11px;padding:8px;color:var(--teal);border:0;background:transparent;border-radius:6px;display:flex;align-items:center;gap:6px;white-space:nowrap}.replay-button:hover{background:#dfe4d3}.replay-button .icon{width:16px;height:16px}.section-label{display:flex;justify-content:space-between;align-items:center;margin:0 0 11px;font-size:13px;font-weight:650;gap:10px}.section-label .small-text{font-size:10px;font-weight:400}.products-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:0 0 20px}.products-grid.many{grid-template-columns:repeat(4,1fr);gap:8px}.product-tile{position:relative;min-width:0;border:1px solid #d9c9a7;background:#fff9ec;border-radius:13px;box-shadow:0 2px 3px #6d4d2510;overflow:hidden;transition:background .15s,border-color .15s,box-shadow .15s}.product-tile.selected{border-color:var(--teal);background:#edf1e6;box-shadow:inset 0 0 0 1px var(--teal)}.product-toggle{border:0;width:100%;background:transparent;display:flex;align-items:center;justify-content:center;position:relative;padding:8px 6px;min-height:113px;border-radius:12px}.product-toggle:hover{background:#d4bd8b12}.sprite{display:block;width:90px;aspect-ratio:1;background-image:url('assets/groceries.png');background-size:600% 400%;background-repeat:no-repeat;mix-blend-mode:multiply;flex-shrink:0}.tick{position:absolute;left:9px;top:9px;width:17px;height:17px;border:1.5px solid #baa786;border-radius:5px;display:grid;place-items:center;background:#fff9ee;color:transparent;font-size:12px;z-index:1}.selected .tick{background:var(--teal);border-color:var(--teal);color:white}.product-name{display:none;position:absolute;bottom:6px;left:0;right:0;text-align:center;font-size:10px;color:var(--teal);padding:0 5px}.with-labels .product-toggle{padding-bottom:24px}.with-labels .product-name{display:block}.products-grid.many .product-toggle{min-height:91px}.products-grid.many .sprite{width:73px}.quantity-control{display:flex;align-items:center;justify-content:center;gap:12px;padding:0 4px 9px;height:29px;color:var(--teal);font-weight:650;font-size:12px}.quantity-control button{width:25px;height:25px;border:1px solid #c1c9b4;border-radius:50%;background:#f9faef;color:var(--teal);font-size:16px;line-height:1}.quantity-placeholder{height:29px}.amount-label{font-size:12px;font-weight:650;display:block;margin-bottom:8px}.amount-field{display:flex;align-items:center;border:1px solid #c2ab80;border-radius:10px;overflow:hidden;background:#fffaf1;margin-bottom:14px}.amount-field:focus-within{border-color:var(--teal);box-shadow:0 0 0 2px #214c4714}.amount-field input{border:0;outline:0!important;box-shadow:none;background:transparent;padding:12px 15px;width:100%;min-width:0;color:var(--teal);font-size:25px;letter-spacing:.04em;line-height:1.3;font-family:var(--serif);font-variant-numeric:tabular-nums}.amount-field span{font:25px var(--serif);padding-right:17px;color:var(--copper)}.checkout-actions{display:grid;gap:9px}.checkout-actions .primary{font-size:14px;min-height:48px}.checkout-actions .secondary{font-size:12px;min-height:43px;padding:9px}.basket-peek{display:flex;justify-content:center;margin-top:9px}.basket-peek .icon{width:17px;height:17px}.feedback{min-height:22px;font-size:11px;line-height:1.5;color:var(--muted);margin:0 0 10px}.feedback.error{color:var(--error)}.feedback.success{color:var(--green)}.basket-card{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px;margin:24px 0}.basket-item{border:1px solid var(--line);border-radius:13px;background:#fff9ed;display:flex;align-items:center;gap:11px;padding:11px}.basket-item .sprite{width:64px}.basket-item-text{font-size:12px;line-height:1.4;min-width:0}.basket-item-text b{display:block;font-weight:600}.basket-item-text span{font-size:10px;color:var(--muted)}.basket-item-quantity{display:block;margin-top:4px;color:var(--teal)!important;font-weight:650}.hint-box{padding:13px 16px;border-left:2px solid var(--copper);background:#e7d9b52b;font-size:12px;color:var(--muted);line-height:1.6;margin:20px 0}.hint-box strong{color:var(--ink);font-weight:550}.result-emblem{width:64px;height:64px;border-radius:50%;background:#e5eddf;color:var(--green);display:grid;place-items:center;margin-bottom:22px;border:1px solid #b5c6a8}.result-emblem .icon{width:30px;height:30px}.receipt{background:#fffdf5;padding:20px 22px;margin:22px 0;border:1px solid #ddcfb4;position:relative;box-shadow:0 4px 16px #68431609}.receipt:after{content:"";position:absolute;height:6px;bottom:-6px;left:-1px;right:-1px;background:linear-gradient(135deg,#fffdf5 25%,transparent 25%) -6px 0/12px 12px,linear-gradient(225deg,#fffdf5 25%,transparent 25%) -6px 0/12px 12px}.receipt-row{display:flex;justify-content:space-between;gap:15px;font-size:12px;color:var(--muted);padding:5px 0}.receipt-total{display:flex;justify-content:space-between;gap:15px;margin-top:12px;border-top:1px dashed #d0c2a8;padding-top:13px;font-size:13px}.receipt-total strong{font-size:21px;line-height:1;color:var(--teal);font-family:var(--serif);font-weight:normal}.bag-illustration{position:relative;width:160px;height:150px;margin:20px auto 30px;animation:bag-appear .65s ease-out both}.bag-paper{position:absolute;inset:40px 20px 0;background:linear-gradient(110deg,#ce9d59,#e8c98e 60%,#d0a35f);clip-path:polygon(4% 0,95% 0,100% 100%,0 100%);border-radius:0 0 7px 7px;display:flex;align-items:center;justify-content:center;font:36px var(--serif);color:#816238}.bag-handle{position:absolute;top:12px;left:55px;width:52px;height:60px;border:5px solid #a77b42;border-radius:50% 50% 0 0;z-index:2}.bag-spark{position:absolute;color:var(--copper);font-size:26px}.bag-spark.one{top:20px;left:5px}.bag-spark.two{top:0;right:4px;font-size:19px}.collected-screen{text-align:center}.collected-screen .eyebrow{justify-content:center}.collected-screen .lead{margin-left:auto;margin-right:auto}.collected-screen .home-actions{justify-content:center}.mini-stats{display:flex;gap:24px;justify-content:center;margin:23px 0}.mini-stat{display:flex;flex-direction:column;gap:3px}.mini-stat strong{font:29px var(--serif);color:var(--teal)}.mini-stat span{font-size:10px;color:var(--muted)}.page-footer{display:flex;justify-content:space-between;gap:12px;font-size:9px;color:#a3957e;border-top:1px solid #dfd2b8;padding:14px 0 18px}.page-footer span:last-child{white-space:nowrap}dialog{border:1px solid #c7b18c;border-radius:19px;padding:0;max-height:86svh;width:min(640px,calc(100vw - 32px));background:var(--paper);color:var(--ink);box-shadow:0 20px 100px #152f2d55}dialog::backdrop{background:#112c2b85;backdrop-filter:blur(4px)}#modal-content{padding:25px 28px 28px}.modal-heading{display:flex;align-items:center;justify-content:space-between;gap:18px;border-bottom:1px solid var(--line);padding-bottom:15px;margin-bottom:20px}.modal-heading h2{font-size:27px;margin:0}.modal-heading .icon-button{width:32px;height:32px;flex-shrink:0}.modal-copy{font-size:13px;color:var(--muted);line-height:1.75}.modal-copy ol{padding-left:20px}.modal-copy li{padding-bottom:12px}.modal-copy strong{color:var(--ink);font-weight:600}.setting-row{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:14px 0;border-bottom:1px solid #e6dbc5}.setting-row:last-child{border:0}.setting-row label{font-size:12px;font-weight:600}.setting-row small{display:block;font-size:10px;color:var(--muted);margin-top:4px;max-width:300px}.setting-row input[type=checkbox]{width:20px;height:20px;accent-color:var(--teal)}.settings-footnote{margin:20px 0 0;font-size:11px;color:var(--muted)}.review-summary{display:flex;gap:24px;margin-bottom:18px}.review-summary b{display:block;color:var(--teal);font:25px var(--serif)}.review-summary span{font-size:10px;color:var(--muted)}.review-filter{display:flex;align-items:center;gap:8px;font-size:12px;color:var(--muted);margin-bottom:18px}.review-filter input{accent-color:var(--teal)}.history-list{display:grid;gap:9px}.history-entry{border:1px solid var(--line);border-radius:10px;background:#fffbf3;overflow:hidden}.history-entry>summary{list-style:none;cursor:pointer;display:flex;justify-content:space-between;align-items:center;gap:10px;padding:13px 14px;font-size:12px;font-weight:600}.history-entry>summary::-webkit-details-marker{display:none}.history-entry>summary:after{content:'+';font-size:17px;color:var(--copper)}.history-entry[open]>summary:after{content:'−'}.history-status{font-size:10px;font-weight:400;color:var(--green);margin-left:auto}.history-status.errors{color:var(--error)}.history-detail{padding:0 15px 15px;border-top:1px solid #e5d8be}.review-event{margin-top:15px}.review-event h3{font-size:11px;color:var(--copper);text-transform:uppercase;letter-spacing:.08em}.mn-transcript{font-size:13px;line-height:1.75;color:var(--teal);background:#eef0e3;padding:11px 12px;border-radius:7px;margin:10px 0}.review-basket{font-size:11px;color:var(--muted);margin:7px 0}.attempt-row{font-size:11px;padding:9px 11px;background:#f5e8df;border-radius:7px;margin:6px 0;line-height:1.65;color:#8c493b}.review-answer{font-size:12px;color:var(--green);font-weight:550;margin-top:10px}.review-audio{font-size:11px;padding:7px 10px;min-height:32px}.empty-state{text-align:center;font-size:13px;color:var(--muted);padding:28px 20px}.empty-state .icon{width:33px;height:33px;display:block;margin:0 auto 14px;color:var(--copper)}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.storage-notice{padding:8px 12px;background:#f3dfc6;font-size:10px;color:#87542e;border-radius:7px;margin-bottom:10px}.round-screen .mini-stats{justify-content:flex-start}.loading-spinner{width:19px;height:19px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:spin .8s linear infinite}.subtitle-divider{margin:24px 0;border:0;border-top:1px solid var(--line)}
@keyframes wave{from{transform:scaleY(.5)}to{transform:scaleY(1.2)}}@keyframes voice-glow{50%{box-shadow:inset -9px 0 25px #f3d18a77}}@keyframes bag-appear{from{opacity:0;transform:translateY(30px) rotate(-7deg)}to{opacity:1;transform:none}}@keyframes spin{to{transform:rotate(360deg)}}
@media(min-width:1500px){.shop-scene{background-position:28% center}.paper-side{padding-left:70px;padding-right:70px}#game{max-width:650px}.product-toggle{min-height:125px}.sprite{width:100px}.topbar{min-height:100px}}
@media(max-height:850px) and (min-width:881px){.topbar{min-height:72px}.progress-strip{padding:10px 0}#game{padding:8px 0 20px}h1{font-size:45px}h2{font-size:34px}.audio-bar{margin:10px 0 15px;padding:10px 13px}.products-grid{margin-bottom:13px;gap:8px}.product-toggle{min-height:94px}.sprite{width:78px}.products-grid.many .product-toggle{min-height:75px}.products-grid.many .sprite{width:62px}.amount-field input{padding:9px 13px}.page-footer{padding:12px 0}.lead{font-size:14px;margin-bottom:18px}.home-steps{margin:23px 0;gap:13px}}
@media(max-width:1100px) and (min-width:881px){.game-shell{grid-template-columns:37% 63%}.paper-side{padding:0 25px}.scene-caption{left:25px}.shop-scene{background-position:23% center}.topbar{min-height:78px}.product-toggle{min-height:100px}.sprite{width:80px}}
@media(max-width:880px){.game-shell{display:flex;flex-direction:column}.shop-scene{height:290px;min-height:220px;position:relative;width:100%;background-size:auto 175%;background-position:24% 35%}.shop-scene:after{background:linear-gradient(0deg,#172e2680,transparent 55%)}.shop-brand{top:19px;left:23px;font-size:8px}.shop-brand b{font-size:12px}.brand-symbol{font-size:31px}.scene-caption{left:auto;right:22px;bottom:23px;text-align:right}.scene-caption p{font-size:22px;margin-bottom:0}.scene-caption .tiny-line,.scene-city{display:none}.paper-side{padding:0 28px}.topbar{min-height:79px}.wordmark{font-size:25px}.wordmark span{font-size:9px}.progress-strip{padding:14px 0}#game{max-width:650px;padding:16px 0 29px}h1{font-size:49px}h2{font-size:38px}.home-steps{margin:26px 0}.products-grid{gap:10px}.product-toggle{min-height:118px}.sprite{width:98px}.products-grid.many .product-toggle{min-height:98px}.products-grid.many .sprite{width:80px}.page-footer{padding:16px 0}.speaking-light{display:none}}
@media(max-width:500px){.shop-scene{height:205px;min-height:205px;background-size:auto 190%;background-position:20% 28%}.shop-brand{top:16px;left:18px}.scene-caption{right:17px;bottom:17px}.scene-caption p{font-size:19px}.paper-side{padding:0 19px}.topbar{min-height:71px}.wordmark{font-size:23px}.topbar nav{gap:0}.icon-button{width:34px;height:36px}.icon{width:20px;height:20px}.progress-strip{font-size:10px;padding:12px 0}.progress-meta{gap:9px}.progress-dots{display:none}#game{padding-top:10px}h1{font-size:44px}h2{font-size:34px}.lead{font-size:13px;line-height:1.7}.eyebrow{font-size:9px}.audio-bar{margin:12px 0 18px;padding:10px 11px;gap:10px}.audio-main{width:41px;height:41px}.waveform{gap:2px}.waveform i{width:2px}.audio-label{font-size:11px}.replay-button{font-size:10px;gap:4px;padding:6px}.section-label{font-size:12px}.products-grid{gap:8px;margin-bottom:16px}.product-toggle{min-height:99px}.sprite{width:80px}.products-grid.many{grid-template-columns:repeat(3,1fr)}.products-grid.many .product-toggle{min-height:86px}.products-grid.many .sprite{width:70px}.tick{left:7px;top:7px;width:16px;height:16px}.amount-label{font-size:12px}.amount-field input{font-size:24px;padding:10px 13px}.checkout-actions .primary{min-height:47px}.page-footer{font-size:8px;gap:8px}.page-footer span:first-child{max-width:115px}.basket-card{gap:9px;margin:19px 0}.basket-item{padding:9px;gap:5px}.basket-item .sprite{width:53px}.basket-item-text{font-size:11px}.basket-item-text span{font-size:9px}.basket-item-text .basket-item-quantity{font-size:10px}.home-steps li{font-size:12px}.home-note{font-size:11px}.level-control{gap:9px;font-size:11px;flex-wrap:wrap}select{font-size:12px;padding:9px 22px 9px 10px}.home-actions .primary{width:100%}#modal-content{padding:19px 18px 23px}.modal-heading h2{font-size:25px}.setting-row{gap:10px}.setting-row label{font-size:11px}.setting-row small{font-size:9px}.modal-copy{font-size:12px}.mini-stats{gap:22px}.feedback{font-size:10px}.screen-heading h2{font-size:31px}.level-badge{font-size:9px}.product-name{font-size:9px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}
