:root{font-family:system-ui,Avenir,Helvetica,Arial,sans-serif;line-height:1.5;font-weight:400;color-scheme:light dark;color:#ffffffde;background-color:#242424;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}a{font-weight:500;color:#646cff;text-decoration:inherit}a:hover{color:#535bf2}body{margin:0;min-width:320px;min-height:100vh}@media(prefers-color-scheme:light){:root{color:#213547;background-color:#fff}a:hover{color:#747bff}}.worksheet-page-root{min-height:100vh;padding:24px 16px;background:radial-gradient(circle at top,#e5e7eb 0,#cbd5f5 40%,#94a3b8);display:flex;flex-direction:column;align-items:center;box-sizing:border-box}.home-root{min-height:100vh;padding:32px 16px;background:radial-gradient(circle at top,#0f172a 0,#020617 45%,#000);display:flex;justify-content:center;align-items:center;box-sizing:border-box}.home-card{max-width:960px;width:100%;padding:28px 24px 30px;border-radius:24px;background:radial-gradient(circle at top,#020617 0 50%,#020617);box-shadow:0 30px 70px #0f172af2,0 0 0 1px #94a3b866;color:#e5e7eb}.home-title{margin:0 0 6px;font-size:28px;font-weight:800;letter-spacing:.16em;text-align:center;text-transform:uppercase;background:linear-gradient(120deg,#fde68a,#f97316,#38bdf8,#a855f7);-webkit-background-clip:text;color:transparent}.home-subtitle{margin:0 0 20px;font-size:14px;text-align:center;color:#cbd5f5}.home-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:18px}.home-item{text-decoration:none;padding:16px 18px;border-radius:18px;border:1px solid rgba(148,163,184,.5);background:radial-gradient(circle at top left,#0f172a 0,#020617 70%);box-shadow:0 18px 40px #0f172ae6,0 0 0 1px #0f172ae6;color:#e5e7eb;display:flex;flex-direction:column;gap:6px;transition:transform .14s ease,box-shadow .14s ease,border-color .14s ease,background .16s ease}.home-item.game{border-color:#60a5fab3}.home-item.worksheet{border-color:#34d399b3}.home-item:hover{transform:translateY(-2px);box-shadow:0 24px 60px #0f172a,0 0 0 1px #f8fafccc;background:radial-gradient(circle at top left,#1f2937 0,#020617 70%)}.home-item-title{font-size:18px;font-weight:700}.home-item-desc{font-size:14px;color:#cbd5f5}.worksheet-actions{width:100%;max-width:920px;display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}@media(max-width:600px){.worksheet-actions{flex-direction:row;gap:12px}}.ws-link{font-size:14px;color:#1d4ed8}.ws-save-btn{border-radius:999px;border:none;padding:6px 16px;font-size:14px;font-weight:600;letter-spacing:.02em;cursor:pointer;background:linear-gradient(135deg,#22c55e,#16a34a);color:#f9fafb;box-shadow:0 10px 25px #16a34a8c,0 0 0 1px #bbf7d0e6}.worksheet-a4{width:794px;height:1123px;background:#fff;box-shadow:0 18px 40px #0f172a66,0 0 0 1px #94a3b899;border-radius:8px;padding:32px 40px;box-sizing:border-box;color:#0f172a}.worksheet-config-panel{width:100%;max-width:920px;margin-bottom:16px;padding:10px 14px;border-radius:999px;background:#ffffffe6;box-shadow:0 10px 25px #0f172a40,0 0 0 1px #94a3b866;display:flex;justify-content:space-between;align-items:center;gap:16px;box-sizing:border-box}.worksheet-header{border-bottom:1px solid #e5e7eb;padding-bottom:10px;margin-bottom:12px}.worksheet-title{margin:0 0 12px;font-size:22px;text-align:center;letter-spacing:.1em}.worksheet-meta-row{display:flex;justify-content:space-between;gap:24px;font-size:14px}.worksheet-field{display:flex;align-items:center;gap:6px;flex:1}.worksheet-input-line{border-bottom:1.5px solid #94a3b8;flex:1;height:20px}.worksheet-input-line.short{max-width:96px}.worksheet-input-line.medium{max-width:140px}.worksheet-config-row{margin-top:10px;padding-top:8px;border-top:1px dashed #e5e7eb;display:flex;justify-content:space-between;align-items:center;gap:16px}.worksheet-config-group{display:flex;flex-wrap:wrap;gap:12px}.worksheet-config-label{display:inline-flex;align-items:center;gap:4px;font-size:13px;color:#475569}.worksheet-config-input{width:72px;padding:2px 6px;border-radius:6px;border:1px solid #cbd5e1;font-size:13px;font-family:inherit}.worksheet-generate-btn{border-radius:999px;border:none;padding:4px 12px;font-size:13px;font-weight:600;cursor:pointer;background:linear-gradient(135deg,#60a5fa,#2563eb);color:#f9fafb;box-shadow:0 8px 18px #2563eb66,0 0 0 1px #bfdbfee6}@media(max-width:600px){.worksheet-config-panel{flex-direction:column;align-items:stretch;border-radius:18px}.worksheet-config-group{width:100%}.worksheet-generate-btn{align-self:flex-end}}.worksheet-body{padding-top:8px}.worksheet-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:48px;row-gap:28px;font-size:22px}.worksheet-problem{display:flex;align-items:center;gap:2px}.ws-num{min-width:24px;text-align:center}.ws-op,.ws-eq{min-width:22px;text-align:center}.ws-answer-line{width:38px;height:38px;border:1.5px solid #94a3b8;border-radius:4px}@media(max-width:900px){.worksheet-a4{width:100%;height:auto;aspect-ratio:210 / 297;padding:24px 20px;transform-origin:top center}.worksheet-grid{grid-template-columns:repeat(2,minmax(0,1fr));column-gap:24px;row-gap:18px;font-size:18px}.ws-answer-line{width:32px;height:32px}}:root{font-family:system-ui,-apple-system,BlinkMacSystemFont,SF Pro Text,Segoe UI,sans-serif;color-scheme:dark light;background:radial-gradient(circle at top,#1f2933 0,#040816 55%,#000);color:#f9fafb}body{margin:0;min-height:100vh;background:transparent}#root{max-width:960px;margin:0 auto}.game-root{background:#0f172aeb;border-radius:24px;padding:24px 24px 28px;box-shadow:0 24px 60px #0f172ad9,0 0 0 1px #94a3b840;-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);position:relative;overflow:hidden}.game-nav{display:flex;justify-content:flex-start;margin-bottom:4px}.game-title{margin:0 0 12px;text-align:center;font-size:26px;font-weight:700;letter-spacing:.04em;background:linear-gradient(120deg,#e5e7eb,#facc15,#38bdf8);-webkit-background-clip:text;color:transparent}.game-timer{display:flex;justify-content:center;align-items:baseline;gap:6px;margin-bottom:18px;font-size:15px;color:#cbd5f5}.timer{font-size:20px;font-weight:700;padding:4px 12px;border-radius:999px;background:radial-gradient(circle at top,#22c55e,#15803d);color:#ecfdf3;min-width:72px;text-align:center;box-shadow:0 0 0 1px #22c55e40}.timer.finished{background:radial-gradient(circle at top,#ef4444,#b91c1c);box-shadow:0 0 0 1px #f8717166}.game-top-panel{border-radius:18px;padding:18px 18px 16px;background:linear-gradient(135deg,#0f172afa,#1e40afe6);box-shadow:inset 0 0 0 1px #94a3b859}.section{margin-bottom:14px}.section:last-child{margin-bottom:0}.section-title{font-size:14px;font-weight:600;color:#e5e7eb;margin-bottom:6px}.number-row{display:flex;flex-wrap:wrap;gap:8px}.number-chip{min-width:40px;height:32px;padding:0 10px;border-radius:999px;display:inline-flex;align-items:center;justify-content:center;font-size:14px;font-weight:600;box-shadow:0 10px 25px #0f172aa6}.number-chip.result{background:radial-gradient(circle at top,#fde68a,#f97316);color:#111827}.number-chip.small{min-width:30px;height:26px;font-size:13px}.number-chip.selected{background:radial-gradient(circle at top,#38bdf8,#1d4ed8);color:#0b1120}.number-chip.unselected{background:#1e40af73;color:#e5e7eb}.hint-text{margin-top:4px;font-size:12px;color:#cbd5f5}.result-info{margin-top:4px;padding-top:8px;border-top:1px dashed rgba(148,163,184,.4)}.result-subtext{margin-top:4px;font-size:13px;color:#e5e7eb;opacity:.92}.result-ok{animation:resultGlowSoft .9s ease-out}.result-good{animation:resultGlowMedium .9s ease-out}.result-great{animation:resultGlowStrong 1s ease-out}.hit-count-highlight{animation:hitPulse .9s ease-out}.result-text{font-size:15px;color:#e5e7eb}.hit-count{font-size:20px;font-weight:800;color:#fbbf24;text-shadow:0 0 12px rgba(251,191,36,.7);padding:0 4px}.game-bottom-panel{margin-top:18px;padding:16px 18px 18px;border-radius:18px;background:radial-gradient(circle at top,#0f172afa,#030712f5);box-shadow:0 20px 45px #0f172ae6,0 0 0 1px #94a3b859}.card-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px;margin-top:10px}@media(max-width:640px){.card-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}.card-button{border-radius:16px;border:none;padding:10px 0;background:radial-gradient(circle at top,#111827,#020617);color:#e5e7eb;font-size:16px;font-weight:600;cursor:pointer;box-shadow:0 16px 30px #0f172ae6,0 0 0 1px #94a3b866;transition:transform .12s ease,box-shadow .12s ease,background .12s ease}.card-button:hover:not(:disabled){transform:translateY(-1px);box-shadow:0 18px 40px #0f172a,0 0 0 1px #f8fafc99}.card-selected{background:radial-gradient(circle at top,#22c55e,#15803d);box-shadow:0 18px 40px #16a34af5,0 0 0 1px #dcfce7cc;color:#ecfdf3}.card-disabled{opacity:.5;cursor:not-allowed}.game-actions{display:flex;justify-content:center;margin-top:18px}.restart-button{border-radius:999px;border:none;padding:8px 20px;font-size:14px;font-weight:600;letter-spacing:.03em;cursor:pointer;background:linear-gradient(135deg,#e5e7eb,#bfdbfe);color:#111827;box-shadow:0 14px 30px #0f172ae6,0 0 0 1px #d1d5dbe6;transition:transform .12s ease,box-shadow .12s ease,filter .12s ease}.restart-button:hover{transform:translateY(-1px);box-shadow:0 20px 45px #0f172a,0 0 0 1px #94a3b8;filter:brightness(1.02)}.confetti-overlay{pointer-events:none;position:absolute;inset:0;overflow:hidden;z-index:10}.confetti-piece{position:absolute;top:-12px;width:7px;height:14px;border-radius:999px;opacity:.95;transform-origin:center;animation-name:confettiFall,confettiSwing;animation-timing-function:linear,ease-in-out;animation-iteration-count:1,infinite}@keyframes confettiFall{0%{transform:translate3d(0,-10px,0) rotate(0);opacity:0}10%{opacity:1}to{transform:translate3d(0,320px,0) rotate(360deg);opacity:0}}@keyframes confettiSwing{0%{transform:translate(0)}50%{transform:translate(16px)}to{transform:translate(-16px)}}@keyframes hitPulse{0%{transform:scale(1);text-shadow:0 0 8px rgba(251,191,36,.5)}40%{transform:scale(1.25);text-shadow:0 0 18px rgba(251,191,36,.8)}to{transform:scale(1);text-shadow:0 0 10px rgba(251,191,36,.6)}}@keyframes resultGlowSoft{0%{box-shadow:inset 0 0 0 1px #4ade8000}to{box-shadow:inset 0 0 0 1px #4ade8099}}@keyframes resultGlowMedium{0%{box-shadow:inset 0 0 0 1px #4ade8000,0 0 #34d39900}to{box-shadow:inset 0 0 0 1px #4ade80cc,0 0 40px #2dd4bf99}}@keyframes resultGlowStrong{0%{box-shadow:inset 0 0 0 1px #facc1500,0 0 #facc1500}to{box-shadow:inset 0 0 0 1px #facc15f2,0 0 55px #facc15e6}}.ribbon-layer{pointer-events:none;position:absolute;inset:0;overflow:hidden;z-index:12}.ribbon-piece{position:absolute;bottom:10px;width:6px;height:46px;border-radius:999px;opacity:0;transform-origin:bottom center;animation-name:ribbonShoot,ribbonTwist;animation-delay:var(--ribbon-delay, 0s);animation-duration:var(--ribbon-duration, 1s),.6s;animation-timing-function:cubic-bezier(.2,.8,.1,1),ease-in-out;animation-iteration-count:1,infinite}.ribbon-piece.from-left{left:4%}.ribbon-piece.from-right{right:4%}.ribbon-cannon{position:absolute;bottom:0;width:28px;height:28px;border-radius:14px;background:radial-gradient(circle at top,#f97316,#b91c1c);box-shadow:0 0 0 1px #f8fafce6,0 0 18px #f87171e6;opacity:.9}.cannon-left{left:1.8%;transform:rotate(36deg)}.cannon-right{right:1.8%;transform:rotate(-36deg)}@keyframes ribbonShoot{0%{opacity:0;transform:translateZ(0) rotate(0) scaleY(.4)}15%{opacity:1}to{opacity:0;transform:translate3d(calc(cos(var(--ribbon-angle, 70deg))*260px),calc(sin(var(--ribbon-angle, 70deg))*260px*-1),0) rotate(380deg) scaleY(1.05)}}@keyframes ribbonTwist{0%{transform:rotateX(0)}50%{transform:rotateX(60deg)}to{transform:rotateX(-60deg)}}
