@import url('https://fonts.googleapis.com/css2?family=M+PLUS+Rounded+1c:wght@500;700;800;900&display=swap');
:root{font-family:'M PLUS Rounded 1c',system-ui,sans-serif;color:#251d3a;background:#f9f7ff;font-synthesis:none;--purple:#7046e8;--purple-dark:#5432bd;--orange:#ff8b3d;--ink:#251d3a}*{box-sizing:border-box}body{margin:0;min-width:320px;min-height:100vh;background:radial-gradient(circle at 8% 0%,#eee7ff 0,transparent 36%),radial-gradient(circle at 95% 90%,#fff0e5 0,transparent 34%),#fbfaff}button{font:inherit}.app{position:relative;min-height:100dvh;overflow:hidden;padding:24px}.ambient{position:fixed;border:1px solid #dcd3f7;border-radius:50%;pointer-events:none;opacity:.55}.ambient.one{width:260px;height:260px;left:-130px;top:12%}.ambient.two{width:180px;height:180px;right:-100px;bottom:5%;border-color:#ffd9c0}.panel{position:relative;width:min(100%,560px);margin:0 auto;z-index:1}.home{min-height:calc(100dvh - 48px);display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center}.brand-mark{display:flex;width:68px;height:68px;border-radius:22px;transform:rotate(-5deg);background:var(--purple);box-shadow:0 10px 22px #7046e83b;color:white;align-items:center;justify-content:center;gap:4px;font-size:23px;font-weight:900}.brand-mark span:last-child{color:#ffd8bd}.eyebrow{margin:20px 0 4px;font-size:11px;font-weight:900;letter-spacing:.24em;color:var(--purple)}h1{margin:0;font-weight:900;line-height:.93;font-size:clamp(52px,14vw,76px);letter-spacing:-.07em}.home h1 em{font-style:normal;color:var(--orange)}.intro{max-width:390px;margin:22px 0 28px;color:#6e667e;font-size:14px}.setting{width:100%;margin:0 0 16px;text-align:left}.setting-title{display:block;margin:0 0 7px 4px;font-size:12px;font-weight:800;color:#6b6378}.setting-title small{font-weight:500}.segmented{display:grid;grid-template-columns:repeat(3,1fr);gap:5px;padding:5px;border-radius:16px;background:#eeeaf6}.segmented.modes{grid-template-columns:1fr 1fr}.segmented button{padding:11px 7px;border:0;border-radius:12px;background:transparent;color:#777083;font-size:12px;font-weight:900;cursor:pointer}.segmented button.active{background:white;color:var(--purple);box-shadow:0 3px 10px #3e2b6914}.primary{width:100%;padding:16px 22px;border:0;border-radius:17px;background:linear-gradient(135deg,var(--purple),#815af1);box-shadow:0 12px 24px #7046e83d;color:white;font-weight:900;font-size:17px;cursor:pointer;transition:.15s transform}.primary:active,.product-card:active{transform:scale(.98)}.primary span{float:right}.mini-best{display:grid;grid-template-columns:1fr auto;width:100%;margin-top:16px;padding:11px 14px;border-radius:14px;background:#fff;border:1px solid #ece7f4;text-align:left;font-size:11px;color:#756d81}.mini-best strong{color:var(--purple);font-size:14px}.mini-best small{grid-column:1/-1;margin-top:3px}.keyboard-hint{font-size:10px;color:#aaa2b5;margin:14px 0 0}.game{position:relative;z-index:1;display:flex;flex-direction:column;min-height:calc(100dvh - 48px);max-width:900px;margin:auto}.game-header{display:flex;align-items:center;gap:16px}.quit{flex:0 0 38px;height:38px;border:0;border-radius:50%;background:white;color:#8d8499;font-size:25px;cursor:pointer}.progress-wrap{flex:1}.progress-meta{display:flex;align-items:center;justify-content:space-between}.progress-meta strong{font-size:18px}.progress-meta strong span{font-size:12px;color:#9a92a5}.progress-meta time{font-size:12px;font-weight:800;color:#786f86;font-variant-numeric:tabular-nums}.progress{height:6px;margin-top:7px;border-radius:8px;background:#e9e4f2;overflow:hidden}.progress i{display:block;height:100%;border-radius:8px;background:linear-gradient(90deg,var(--purple),var(--orange));transition:width .25s}.game-title{text-align:center;margin:auto 0 20px}.game-title p{margin:0;color:#837a90;font-size:13px}.game-title h2{font-size:clamp(25px,7vw,38px);margin:2px 0;font-weight:900;letter-spacing:-.04em}.cards{display:grid;grid-template-columns:1fr 54px 1fr;align-items:center;gap:0}.product-card{position:relative;display:flex;min-height:330px;padding:25px;flex-direction:column;align-items:center;justify-content:center;border:2px solid transparent;border-radius:28px;background:#fff;box-shadow:0 12px 35px #2c164c14;cursor:pointer;overflow:hidden;transition:.14s transform,.14s border,.14s background}.product-card.purple{border-color:#ded4fb}.product-card.orange{border-color:#ffe0cb}.side-label{position:absolute;top:20px;left:20px;display:grid;width:35px;height:35px;place-items:center;border-radius:11px;color:white;font-weight:900}.purple .side-label{background:var(--purple)}.orange .side-label{background:var(--orange)}.item-count,.item-price{line-height:1;white-space:nowrap}.item-count strong{font-size:clamp(58px,11vw,92px);letter-spacing:-.07em}.item-price strong{font-size:clamp(42px,8vw,68px);letter-spacing:-.06em}.product-card small{font-size:17px;margin-left:5px;font-weight:900}.divider{margin:11px 0;color:#9b93a7;font-size:12px}.tap-hint{position:absolute;bottom:18px;font-size:10px;font-weight:800;color:#a29aaa}.versus{position:relative;z-index:2;display:grid;width:48px;height:48px;margin:auto;border-radius:50%;place-items:center;background:var(--ink);color:white;font-size:12px;font-weight:900;box-shadow:0 5px 15px #281a4147}.product-card.correct{border-color:#22b67a;background:#effcf6;animation:pop .25s}.product-card.correct:after{content:'✓';position:absolute;right:16px;top:15px;font-size:27px;color:#18a66d}.product-card.wrong{border-color:#ed5d69;background:#fff1f2;animation:shake .25s}.product-card.wrong:after{content:'×';position:absolute;right:16px;top:10px;font-size:35px;color:#de4855}.mode-label{text-align:center;margin:auto 0 0;font-size:10px;font-weight:800;color:#aaa2b3;letter-spacing:.12em}@keyframes pop{50%{transform:scale(1.025)}}@keyframes shake{25%{transform:translateX(-5px)}75%{transform:translateX(5px)}}.result{padding:32px 0 70px;text-align:center}.result .eyebrow{margin-top:0}.trophy{width:58px;height:58px;display:grid;place-items:center;margin:8px auto 12px;border-radius:50%;background:#fff1e8;color:var(--orange);font-size:28px}.result h1{font-size:clamp(30px,8vw,45px);letter-spacing:-.04em}.result-mode{font-size:11px;color:#857c92;font-weight:800}.record{margin:24px 0 14px;padding:21px;border-radius:24px;background:var(--ink);color:white}.record>span{display:block;font-size:11px;color:#cfc6db}.record strong{display:block;font-size:56px;line-height:1.1;color:#ffd1b3;letter-spacing:-.06em}.record strong small{font-size:15px;margin-left:4px}.record p{margin:4px 0 0;font-size:10px;color:#aaa0b7}.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.stats>div{padding:14px 5px;border:1px solid #e9e4ef;border-radius:17px;background:white}.stats span{display:block;font-size:10px;color:#80788b}.stats strong{font-size:25px}.stats small{font-size:11px}.actions{display:grid;gap:9px;margin:20px 0 28px}.secondary{padding:14px;border:1px solid #ded7e8;border-radius:15px;background:white;color:var(--purple);font-weight:900;cursor:pointer}.text-button{border:0;background:transparent;color:#837b8f;font-size:12px;text-decoration:underline;cursor:pointer}.answer-list{text-align:left}.answer-list h2{font-size:18px}.answer-list article{margin:10px 0;padding:15px;border-radius:18px;background:white;border-left:4px solid #2db57e;box-shadow:0 5px 15px #33214b0b}.answer-list article.ng{border-left-color:#ed5b68}.answer-head{display:flex;justify-content:space-between;align-items:center}.answer-head strong{font-size:13px}.answer-head strong span{margin-left:5px;color:#26a873}.ng .answer-head strong span{color:#df4c58}.answer-head time{font-size:11px;font-weight:800;color:#7c7488}.answer-products{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin:10px 0 6px}.answer-products>div{position:relative;display:grid;padding:9px 8px 8px 35px;border-radius:11px;background:#f7f4fa}.answer-products b{position:absolute;left:10px;top:10px}.answer-products span{font-size:11px;font-weight:800}.answer-products small{font-size:10px;color:#77707f}.answer-products .winner{background:#f0ebff;outline:1px solid #d8cafb}.answer-list article>p{margin:5px 0 0;font-size:10px;color:#77707f}
@media(max-width:600px){.app{padding:17px}.home{min-height:calc(100dvh - 34px)}.brand-mark{width:56px;height:56px;border-radius:18px}.home .eyebrow{margin-top:13px}.home h1{font-size:52px}.intro{margin:13px 0 20px;font-size:12px}.setting{margin-bottom:10px}.primary{padding:14px}.mini-best{margin-top:10px}.game{min-height:calc(100dvh - 34px)}.game-title{margin:auto 0 12px}.cards{grid-template-columns:1fr;grid-template-rows:1fr 34px 1fr}.product-card{width:100%;min-height:0;height:min(31dvh,230px);padding:15px;border-radius:22px}.product-card .side-label{top:12px;left:13px;width:30px;height:30px}.item-count strong{font-size:min(17vw,72px)}.item-price strong{font-size:min(12vw,52px)}.divider{margin:6px}.tap-hint{bottom:9px}.versus{width:40px;height:40px}.mode-label{margin-top:auto;padding-top:8px}.result{padding-top:12px}.record{margin-top:18px}.answer-products span{font-size:10px}}
@media(max-height:700px) and (max-width:600px){.game-title{margin:9px 0 6px}.game-title h2{font-size:23px}.product-card{height:27dvh}.item-count strong{font-size:48px}.item-price strong{font-size:36px}.tap-hint{display:none}.mode-label{display:none}}
@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}

.segmented.difficulties,.segmented.choice-setting{grid-template-columns:repeat(4,1fr)}
.segmented.difficulties button{font-size:10px}
.cards.many{gap:10px}
.cards.choices-2{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:1fr;gap:12px}
.cards.choices-3{grid-template-columns:repeat(3,minmax(0,1fr))}
.cards.choices-4{grid-template-columns:repeat(4,minmax(0,1fr))}
.cards.choices-5{grid-template-columns:repeat(5,minmax(0,1fr))}
.cards.many .product-card{min-height:255px;padding:15px}
.cards.many .item-count strong{font-size:clamp(38px,6vw,64px)}
.cards.many .item-price strong{font-size:clamp(27px,4vw,44px)}
.choice-0{border-color:#ded4fb}.choice-0 .side-label{background:#7046e8}
.choice-1{border-color:#ffe0cb}.choice-1 .side-label{background:#ff8b3d}
.choice-2{border-color:#cceedd}.choice-2 .side-label{background:#20aa73}
.choice-3{border-color:#cde5ff}.choice-3 .side-label{background:#308bd8}
.choice-4{border-color:#f6cfe5}.choice-4 .side-label{background:#d94f98}
.multi-result{grid-template-columns:repeat(2,minmax(0,1fr))}

@media(max-width:600px){
  .segmented.difficulties{grid-template-columns:repeat(2,1fr)}
  .cards.choices-2{grid-template-columns:1fr;grid-template-rows:repeat(2,auto);gap:8px}
  .cards.many{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(3,auto);grid-auto-rows:auto;gap:7px}
  .cards.many .product-card{width:100%;height:min(20dvh,158px);min-height:132px;padding:8px;border-radius:17px}
  .cards.many .product-card .side-label{top:8px;left:8px;width:25px;height:25px;border-radius:8px;font-size:11px}
  .cards.many .item-count strong{font-size:39px}
  .cards.many .item-price strong{font-size:27px}
  .cards.many .product-card small{font-size:11px}
  .cards.many .divider{margin:3px}
  .cards.many .tap-hint{display:none}
  .cards.choices-5 .product-card:last-child{grid-column:1/-1;width:calc(50% - 4px);justify-self:center}
}
