@font-face{font-family:Jua;src:url("./jua.woff2") format("woff2");font-display:swap}
:root{font-family:"Malgun Gothic","Apple SD Gothic Neo",system-ui,sans-serif;background:#f8f6ea;color:#263e34;--ink:#263e34;--green:#315c49;--muted:#536759;--title:Jua,"Malgun Gothic",system-ui,sans-serif}
*{box-sizing:border-box}
body{margin:0;min-height:100dvh;background:radial-gradient(ellipse at 98% 0,#e8efd8,transparent 47%),radial-gradient(ellipse at 0 95%,#fbecdc,transparent 37%),#f8f6ea}
button{font:inherit;cursor:pointer;color:inherit;touch-action:manipulation}
button:focus-visible{outline:3px solid #51348a;outline-offset:4px}
[hidden]{display:none!important}
h1,h2,p{margin:0}
.top,main{width:min(1030px,calc(100% - 34px));margin-inline:auto}
.top{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:72px}
.brand{display:flex;align-items:center;gap:10px;font:1.65rem var(--title)}
.brand-mark{width:41px;height:41px;display:grid;place-items:center;border-radius:15px;background:#dbe9cf;color:#38684d;font:1.5rem system-ui}
.listen{border:1px solid #d2dec9;border-radius:15px;background:#fffdf5;padding:8px 14px;min-height:44px;font-weight:800}
.listen span{color:#41795c}
.intro{position:relative;isolation:isolate;overflow:hidden;background:#e5eed8;border:1px solid #d9e8cc;border-radius:28px;padding:22px clamp(18px,4vw,42px) 24px}
.intro::before,.intro::after{content:"";position:absolute;z-index:-1;pointer-events:none;border-radius:50%;width:35%;height:155%;right:-4%;bottom:-88%;background:#cdddab;transform:rotate(-15deg)}
.intro::after{right:8%;bottom:-115%;width:30%;background:#d7e7b3}
.intro h1{font:clamp(32px,5.2vw,58px)/1.1 var(--title);letter-spacing:-.045em}
.intro h1 em{font-style:normal;color:#396d4d}
.intro p{margin-top:5px;font-weight:650;color:var(--muted)}
.intro-flower{position:absolute;right:9%;top:15%;font-size:clamp(38px,7vw,78px);color:#f5e5a8;text-shadow:2px 2px #8daa77;transform:rotate(13deg)}
.toolbar{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:17px 0 13px;flex-wrap:wrap}
.modes{display:flex;flex-wrap:wrap;gap:6px;padding:4px;border:1px solid #e1e6d8;background:#eeeee2;border-radius:18px}
.modes button{display:flex;align-items:center;justify-content:center;gap:8px;min-height:43px;border:0;background:transparent;border-radius:13px;padding:7px 15px;font-weight:850}
.modes button b{font:1.4rem/1 var(--title)}
.modes button[aria-pressed=true]{background:var(--green);color:white;box-shadow:0 2px 4px #18452928}
.progress{display:flex;align-items:center;gap:7px;font-weight:800;color:var(--muted)}
.progress span:first-child{margin-right:4px}
.progress-dot{width:12px;height:12px;border:1px solid #a9bda0;border-radius:50%;background:#f8faf0}
.progress-dot.current{background:#f6dfa0;border-color:#a48223;outline:2px solid #f7e9bd}
.progress-dot.done{background:#4b7856;border-color:#4b7856}
.layout{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(250px,1fr);gap:14px;padding-bottom:20px}
.card{border-radius:26px;background:#fffdf7;border:1px solid #e7e7d9;box-shadow:0 7px 12px #3856410b;padding:clamp(17px,3vw,29px)}
.problem-card{display:grid;justify-items:center;align-content:center;min-height:344px}
.equation{display:flex;align-items:center;justify-content:center;gap:clamp(7px,2vw,21px);font:clamp(49px,7vw,76px)/1.13 var(--title);font-variant-numeric:tabular-nums}
.op{color:#658568}
.blank{display:grid;place-items:center;min-width:1.03em;min-height:1.03em;padding:0 .09em;border:2px dashed #b7a0cf;border-radius:19px;color:#684291;background:#f1e7f7}
.blank.done{border-style:solid;border-color:#8bb28a;color:#356447;background:#ecf5e2}
.picture{width:100%;margin-top:25px;display:flex;align-items:center;justify-content:center;gap:12px;min-height:113px}
.fruit-group{display:grid;justify-items:center;align-content:center;gap:8px;background:#f7f1db;border:1px solid #efe6c7;border-radius:19px;padding:13px 11px 8px;min-width:70px}
.fruit-group.green{background:#ecf2db;border-color:#e3ebcd}
.fruit-group.taken{background:#f0eee4;border-color:#e9e4d6}
.fruit-row{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:7px;max-width:240px;min-height:35px}
.fruit{width:clamp(20px,3.4vw,36px);height:clamp(22px,3.5vw,37px);position:relative;margin-top:5px;border-radius:44% 48% 47% 43%;background:radial-gradient(circle at 30% 24%,#ffaba0,transparent 37%),#dc6e66;box-shadow:inset -2px -3px #a84c424d}
.fruit::before{content:"";position:absolute;top:-5px;left:49%;height:9px;width:3px;border-radius:2px;background:#725341;transform:rotate(15deg)}
.fruit::after{content:"";position:absolute;top:-5px;left:53%;width:9px;height:6px;border-radius:80% 10% 80% 10%;background:#649368;transform:rotate(-15deg)}
.green .fruit{background:radial-gradient(circle at 26% 24%,#dbe8ac,transparent 38%),#9bbb68;box-shadow:inset -2px -3px #60834b45}
.taken .fruit{background:#e5c8bb;box-shadow:none;opacity:.83}
.slash{position:absolute;inset:44% -5% auto;height:3px;background:#8a6251;border-radius:2px;transform:rotate(-45deg);z-index:1}
.empty{color:#665a48;font-weight:800;padding:0 4px}
.fruit-label{font-size:.91rem;font-weight:800;color:#576449}
.picture-sign{font:1.7rem var(--title);color:#527357}
.picture-caption{text-align:center;margin-top:12px;color:var(--muted);font-weight:650}
.answers{display:grid;align-content:center;gap:13px}
.answers h2{font:clamp(26px,3.5vw,37px)/1.16 var(--title)}
.choices{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.choice{min-height:76px;border:2px solid #e2d2ef;border-radius:17px;background:#f5ecfa;color:#593b81;font:clamp(32px,5vw,54px)/1 var(--title);box-shadow:0 3px #e9dbef}
.choice:hover:not(:disabled){background:#ecddf7}
.choice:disabled{cursor:default}
.choice.correct{background:#e4efdb;border-color:#8eaf83;color:#305a40;box-shadow:0 3px #d8e7cd}
.choice.tried{background:#f5f1ea;border-color:#e9e3d8;color:#756b61;box-shadow:none}
.message{min-height:3.4em;line-height:1.6;color:var(--muted);font-weight:700}
.next{min-height:49px;border:0;border-radius:14px;background:#315c49;color:white;padding:9px 19px;font-size:1.04rem;font-weight:850;width:100%}
.complete{padding:32px;text-align:center;margin-bottom:20px}
.complete h2{font:clamp(34px,5vw,52px) var(--title);margin:7px 0}
.complete p{color:var(--muted);font-weight:750}
.complete .next{max-width:260px;margin-top:20px}
.bloom{font-size:clamp(49px,9vw,96px);letter-spacing:.08em;color:#729b69;animation:bloom .5s ease-out both}
@keyframes bloom{from{transform:scale(.7);opacity:0}to{transform:scale(1);opacity:1}}
@media(max-width:675px){
  .layout{grid-template-columns:1fr;gap:11px}
  .problem-card{min-height:0}
  .choice{min-height:63px}
  .picture{margin-top:13px;min-height:90px}
  .intro-flower{opacity:.55}
  .answers{gap:8px}
}
@media(max-height:545px) and (orientation:landscape){
  .top{min-height:51px}
  .intro{padding-block:10px}
  .intro h1{font-size:35px}
  .toolbar{margin:8px 0}
  .problem-card{min-height:220px}
  .card{padding:14px}
  .picture{margin-top:10px;min-height:80px}
  .choice{min-height:60px}
}
@media(prefers-reduced-motion:reduce){.bloom{animation:none}}
