/* v0.9.0 — supermarket, one-screen mobile-first interaction */
body[data-screen="supermarket"] .site-wrap{display:flex;flex-direction:column;height:100dvh;min-height:0;overflow:hidden}
body[data-screen="supermarket"] #main{width:100%;max-width:980px;flex:1;min-height:0;display:flex;flex-direction:column;padding-block:3px 6px}
body[data-screen="supermarket"] .footer{display:none}
.smkt-game{--sage:#466d55;--butter:#faf4e8;flex:1;min-height:0;display:flex;flex-direction:column;gap:clamp(4px,1vh,9px);width:100%;max-width:660px;margin:auto;color:#254533;font-family:inherit}
.smkt-header{display:flex;align-items:center;gap:8px;min-height:42px}
.smkt-header>div{flex:1;min-width:0}.smkt-header h1{margin:0;font-size:clamp(16px,3vw,23px);line-height:1.18;color:#264e37}.smkt-header small{font-size:11px;color:#617565}
.smkt-back,.smkt-role{border:1px solid #c7dbca;border-radius:12px;background:#f4fff7;color:#345c41;min-height:36px;font-weight:750;padding:7px 12px}
.smkt-role{font-size:11px}
.smkt-levels{display:flex;gap:5px;max-width:100%;min-height:37px}
.smkt-levels button{flex:1;border-radius:12px;padding:6px 5px;min-height:36px;border:1px solid #d1dfd0;background:white;color:#45614b;font-weight:800}
.smkt-levels button.on{background:#557c61;color:white;border-color:#436849}
.smkt-message{display:flex;align-items:center;gap:8px;min-height:100px;max-height:clamp(88px,17vh,132px);background:#fdf7e9;border:1px solid #eedec4;border-radius:19px;padding:6px 10px;overflow:hidden}
.smkt-message>img{height:clamp(78px,16vh,124px);width:clamp(72px,18vw,110px);object-fit:cover;object-position:center 25%;border-radius:14px;align-self:flex-end}
.smkt-bubble{min-width:0;flex:1;display:flex;align-items:flex-start;flex-direction:column;gap:3px}.smkt-jp{font-size:clamp(13px,3.6vw,20px);font-weight:850;line-height:1.3;overflow-wrap:anywhere;color:#24482e}.smkt-vi{font-size:clamp(11px,2.7vw,14px);line-height:1.2;color:#536257}.smkt-bubble button{border:1px solid #a6c8a8;border-radius:10px;background:white;padding:4px 8px;color:#234c35;font-weight:800;font-size:12px;min-height:29px}
.smkt-shelf{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:clamp(4px,1.3vw,9px);flex:1;min-height:0;align-content:stretch}
.smkt-shelf>button{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:98px;gap:2px;border:2px solid #d2e3cf;border-bottom:6px solid #b3b38b;background:#fffdf8;border-radius:15px;padding:4px 3px;color:#264c36;box-shadow:0 2px 0 #d6cdb7}
.smkt-shelf img{display:block;width:clamp(40px,9vh,83px);height:clamp(39px,10vh,81px);object-fit:contain;flex-shrink:1;min-height:0}
.smkt-shelf b{font-size:clamp(9px,2.2vw,12px);line-height:1.15;max-width:100%;word-break:break-word}.smkt-shelf .japanese{font-weight:850;font-size:clamp(9px,2.35vw,13px);line-height:1.1;max-width:100%;overflow-wrap:anywhere}
.smkt-shelf i{position:absolute;top:3px;right:4px;min-width:20px;height:20px;border-radius:50%;background:#497b5e;color:white;font-size:11px;font-style:normal;font-weight:900;display:grid;place-items:center}
.smkt-basket{background:#fff;border-radius:14px;border:1px solid #cddcc8;padding:6px 9px;min-height:65px;max-height:100px}
.smkt-basket-heading{display:flex;justify-content:space-between;align-items:center;font-size:13px}.smkt-basket-content{min-height:40px;display:flex;align-items:center;gap:6px;overflow-x:auto}.smkt-basket-content>button{height:40px;min-width:86px;display:flex;align-items:center;justify-content:space-around;gap:4px;border:1px solid #cee1d2;border-radius:10px;background:#effaf0;color:#285239;font-size:12px}.smkt-basket-content img{width:30px;height:30px;object-fit:contain}.smkt-basket-content button span{font-size:18px;font-weight:900}.smkt-empty{font-size:12px;color:#667e6d}
.smkt-bottom{display:flex;gap:5px;flex-direction:column;align-items:stretch;min-height:65px;justify-content:flex-end}.smkt-feedback{font-size:12px;color:#536654;line-height:1.15;margin:0;text-align:center}.smkt-feedback.correct{color:#1f8256;font-weight:900}.smkt-feedback.wrong{color:#ac3f35;font-weight:800}.smkt-actions{display:flex;gap:7px}.smkt-actions .btn{flex:1;min-height:38px;margin:0;font-size:13px}
@media(max-height:690px){body[data-screen="supermarket"] .topbar{min-height:42px;padding-top:0;padding-bottom:0}body[data-screen="supermarket"] .topbar .brand small{display:none}.smkt-message{max-height:88px}.smkt-message>img{height:85px}.smkt-game{gap:4px}.smkt-header{min-height:32px}.smkt-header small{display:none}.smkt-levels,.smkt-levels button{min-height:30px}.smkt-shelf>button{min-height:77px}.smkt-shelf img{width:clamp(28px,7vh,62px);height:clamp(28px,8vh,65px)}.smkt-basket{min-height:56px;padding:3px 7px}.smkt-bottom{min-height:54px}}
@media(max-width:355px){.smkt-header h1{font-size:15px}.smkt-role{padding:5px}.smkt-shelf{gap:3px}.smkt-shelf b{font-size:9px}.smkt-shelf .japanese{font-size:9px}}
@media(prefers-reduced-motion:reduce){.smkt-game *{animation:none!important;transition:none!important}}

@media(max-height:640px){.smkt-message{max-height:104px;min-height:0;padding:3px 6px}.smkt-bubble{gap:1px}.smkt-bubble button{min-height:25px;padding:2px 6px}.smkt-basket{min-height:50px}.smkt-basket-content{min-height:30px}.smkt-basket-content>button{height:30px}.smkt-basket-content img{height:24px;width:24px}.smkt-shelf>button{min-height:60px}.smkt-header{min-height:28px}}

/* v0.9.1: picture-only choice cards; never repeat Japanese + Vietnamese on tiles. */
.smkt-lang{border:1px solid #c7dbca;border-radius:12px;background:#fff;color:#345c41;min-height:36px;font-weight:800;padding:5px 8px;font-size:11px;white-space:nowrap}
.smkt-role{min-width:36px;min-height:36px;padding:4px}
.smkt-task{font-size:clamp(13px,3.4vw,19px);font-weight:850;line-height:1.28;overflow-wrap:anywhere;color:#24482e}
.smkt-level-3 .smkt-task{font-size:clamp(12px,3vw,16px)}
.smkt-shelf>button{min-width:0;padding:5px;gap:0;overflow:hidden;touch-action:manipulation}
.smkt-shelf>button.is-selected{background:#f1faeb;border-color:#80a888}
.smkt-shelf img{width:min(100%,clamp(66px,13vh,124px));height:min(100%,clamp(66px,13vh,124px));max-height:100%;flex:1 1 auto;object-fit:contain}
.smkt-shelf i{background:#245f3c;min-width:23px;height:23px}
.smkt-message .smkt-bubble{min-height:0;justify-content:center}
@media(max-height:690px){.smkt-task{font-size:clamp(12px,3vw,16px)}.smkt-level-3 .smkt-task{font-size:clamp(11px,2.8vw,14px)}.smkt-shelf img{width:min(100%,clamp(47px,9vh,92px));height:min(100%,clamp(47px,9vh,92px))}}
@media(max-width:375px){.smkt-lang{padding:5px}.smkt-role{min-width:32px}.smkt-header{gap:4px}.smkt-shelf>button{padding:2px}}

/* v0.9.2 — clickable staff portrait + rotation arrow; 8 shelf items fit in two rows on LV3. */
.smkt-role{position:relative;display:grid;place-items:center;width:48px;height:44px;min-width:48px;min-height:44px;padding:2px;border-radius:14px;background:#fffdf7;overflow:visible;flex-shrink:0;cursor:pointer}
.smkt-role img{display:block;width:37px;height:37px;object-fit:cover;object-position:center 18%;border-radius:50%;border:1px solid #c7dbca;background:#faf4e8}
.smkt-role svg{position:absolute;bottom:-3px;right:-4px;width:22px;height:22px;padding:3px;border-radius:50%;fill:none;stroke:#fff;stroke-width:2.6;stroke-linejoin:round;stroke-linecap:round;background:#416c52;box-shadow:0 1px 3px #0003}
.smkt-level-3 .smkt-shelf{grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));min-height:0;gap:clamp(2px,.7vh,6px)}
.smkt-level-3 .smkt-shelf>button{min-height:0;min-width:0;padding:1px;border-bottom-width:4px}
.smkt-level-3 .smkt-shelf img{min-height:0;max-width:100%;max-height:100%;width:clamp(42px,12vh,86px);height:clamp(42px,12vh,86px);object-fit:contain}
.smkt-level-3 .smkt-shelf i{top:1px;right:1px;min-width:20px;height:20px;font-size:11px}
.smkt-level-3 .smkt-message{min-height:0}
.smkt-level-3 .smkt-basket{max-height:73px;min-height:49px}
.smkt-level-3 .smkt-basket-content{min-height:31px}
.smkt-level-3 .smkt-basket-content>button{min-width:65px;height:35px}
.smkt-level-3 .smkt-basket-content img{width:25px;height:25px}
@media(max-height:720px){.smkt-level-3 .smkt-message{max-height:76px;padding:2px 6px}.smkt-level-3 .smkt-message>img{height:70px;max-width:72px}.smkt-level-3 .smkt-shelf img{width:clamp(36px,9vh,62px);height:clamp(36px,9vh,62px)}.smkt-level-3 .smkt-basket{padding:2px 6px}.smkt-level-3 .smkt-bottom{min-height:51px}}
@media(max-width:380px){.smkt-header{gap:3px}.smkt-role{width:44px;min-width:44px;height:44px}.smkt-role img{width:32px;height:32px}.smkt-header h1{font-size:clamp(13px,3.5vw,16px)}}
