
:root{font-family:system-ui,-apple-system,"Hiragino Kaku Gothic ProN","Yu Gothic",Meiryo,sans-serif;color:#302957;background:#f8f5ff}*{box-sizing:border-box}body{margin:0;min-height:100vh;background:radial-gradient(circle at 15% 0%,#ffe9cb 0,transparent 37%),radial-gradient(circle at 100% 10%,#e3ddff,transparent 43%),#f8f5ff}button,select{font:inherit}button{cursor:pointer;touch-action:manipulation}button:disabled{opacity:.5;cursor:not-allowed}.shell{max-width:560px;margin:auto;padding:16px 16px max(35px,env(safe-area-inset-bottom))}.header{display:flex;justify-content:space-between;align-items:center;gap:10px;margin:8px 0 18px}.brand{font-size:22px;font-weight:900;letter-spacing:-.04em}.subtitle{font-size:12px;color:#756c90}.pill{font-size:13px;background:#fff;padding:9px 12px;border-radius:999px;box-shadow:0 3px 12px #55449e12;font-weight:800}h1{font-size:25px;margin:0 0 8px}p{margin:0}.lead{font-size:14px;color:#706786;line-height:1.6}.card{background:#fff;border-radius:26px;padding:20px;box-shadow:0 10px 30px #6051a012;margin:14px 0}.caption{font-size:13px;color:#756d89;font-weight:700;margin-bottom:9px}.grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.dan{border:2px solid #ece6ff;background:#f9f7ff;border-radius:18px;padding:13px 0;color:#5543a2;font-weight:900;font-size:20px}.dan small{display:block;font-size:11px;margin-top:2px;color:#887cb8}.dan.active{background:#715ee0;color:white;border-color:#715ee0;box-shadow:0 6px 14px #715ee040}.dan.active small{color:#eee9ff}.row{display:flex;gap:10px;align-items:center;justify-content:space-between}.mode{display:flex;gap:8px}.chip{border:0;border-radius:999px;padding:11px 16px;background:#f0edfb;color:#615683;font-weight:800;flex:1}.chip.active{background:#715ee0;color:#fff}.stage{text-align:center;background:linear-gradient(165deg,#f2efff 0%,#fff7e9 100%);border-radius:22px;padding:22px 12px 20px;margin-top:15px}.mascot{font-size:72px;line-height:1.2;filter:drop-shadow(0 5px 3px #a191c538)}.bubble{display:inline-block;background:white;border:2px solid #e2daff;border-radius:19px;padding:8px 15px;font-size:14px;font-weight:800;max-width:100%;margin:12px auto}.expression{font-size:clamp(32px,9vw,49px);font-weight:1000;letter-spacing:-.04em;margin:9px 0}.expression .answer{color:#684fdd}.reading{font-size:22px;font-weight:900;color:#7053c7;min-height:32px}.progress{height:10px;background:#eae4ff;border-radius:99px;overflow:hidden;margin:19px 4px 8px}.progress>div{background:linear-gradient(90deg,#38c7a8,#7dce95);height:100%;border-radius:99px;transition:width .2s}.tiny{font-size:12px;color:#716988}.status{min-height:48px;display:flex;justify-content:center;align-items:center;text-align:center;font-weight:800;line-height:1.5;color:#574c87;padding:8px}.status.good{color:#12866d}.status.bad{color:#b75b3b}.actions{display:grid;grid-template-columns:1fr 1fr;gap:9px}.btn{border:0;border-radius:16px;padding:15px 10px;font-weight:900;font-size:16px}.primary{background:#6c59db;color:white;box-shadow:0 6px 15px #705cdd38}.mint{background:#28b99a;color:#fff}.secondary{background:#eeeafb;color:#6054a6}.outline{background:white;color:#6456aa;border:2px solid #e8e1fa}.wide{grid-column:1/-1}.history{display:grid;grid-template-columns:repeat(9,1fr);gap:5px}.dot{border-radius:8px;background:#f0ecfa;font-weight:900;font-size:12px;color:#8b81a8;text-align:center;padding:8px 0}.dot.done{background:#d8f7e8;color:#18876d}.footer{font-size:12px;line-height:1.7;color:#786f92;margin-top:14px}.hide{display:none!important}.toggle{display:flex;align-items:center;gap:7px;font-size:13px;font-weight:700}.toggle input{accent-color:#6d59da;width:18px;height:18px}.number-answer{display:flex;gap:8px}.number-answer input{width:100%;min-width:0;border:2px solid #e2dbf7;border-radius:14px;font:900 22px system-ui;padding:11px;text-align:center;color:#5746a0}.number-answer button{flex-shrink:0}button:focus-visible,input:focus-visible{outline:3px solid #ffbc54;outline-offset:2px}@media(max-width:360px){.shell{padding:10px}.card{padding:14px}.btn{font-size:14px}.expression{font-size:33px}}

/* Layout details previously declared inline in HTML */
.progress-fill{width:0%}
.answer-panel{margin-top:16px}
.history-controls{margin-top:17px}
.reset-btn{padding:8px 12px;font-size:12px}
