:root{color-scheme:light;--ink:#39493d;--muted:#5e6d57;--paper:#fffdf3;--line:#a8b69b;--mint:#d6e8b4;--yellow:#fae9c3;font:14px/1.55 system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI','PingFang TC','Microsoft JhengHei',sans-serif;color:var(--ink);background:var(--paper)}
*{box-sizing:border-box}body{margin:0;background:radial-gradient(#d4d8bd .7px,transparent .7px);background-size:20px 20px}button,input,select{font:inherit;color:inherit}button,a,select{touch-action:manipulation}button{cursor:pointer;min-height:44px}button:disabled{cursor:default;opacity:.5}button:focus-visible,a:focus-visible,select:focus-visible{outline:3px solid #a85e26;outline-offset:4px}a{color:inherit;text-underline-offset:4px}button:hover:not(:disabled){filter:brightness(.97)}[hidden]{display:none!important}
.topbar{max-width:1120px;margin:auto;padding:18px 28px;display:flex;justify-content:space-between;align-items:center;gap:14px}.topbar img{display:block;width:185px;height:auto}.language>span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}select{appearance:none;-webkit-appearance:none;background:#fffdf7 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='m1 1 5 5 5-5' stroke='%2339493d' stroke-width='1.5' fill='none'/%3E%3C/svg%3E") no-repeat right 16px center;border:1px solid #c5ceb8;border-radius:22px;padding:10px 40px 10px 14px;min-height:44px;max-width:150px}
main{max-width:1080px;margin:auto;padding:0 28px 35px}.intro{text-align:center;margin:8px 0 28px}.preview-label{font-size:10px;letter-spacing:.12em;color:var(--muted);font-weight:650}.intro h1{font-size:32px;line-height:1.2;letter-spacing:-.04em;margin:12px 0}.intro>p:last-child{font-size:13px;color:var(--muted);margin:10px 0}
.game-switch{display:grid;grid-template-columns:1fr 1fr;gap:22px;margin:0 0 27px}.game-switch button{position:relative;display:flex;align-items:center;gap:16px;text-align:left;min-width:0;padding:20px 23px;border:2px solid #52634c;border-radius:18px 25px 20px 24px;background:#fffaf0;box-shadow:3px 4px 0 #b5bda5;transform:rotate(-.7deg)}.game-switch button:nth-child(2){transform:rotate(.6deg)}.game-switch button[aria-pressed=true]{background:#cce6c7;box-shadow:4px 5px 0 #52634c}.game-switch button::before{content:'';position:absolute;left:46%;top:-9px;width:57px;height:17px;background:#f0dbaab0;border:1px solid #dbc79a80;transform:rotate(-4deg)}.game-switch strong{display:block;font-size:23px;line-height:1.2;letter-spacing:-.035em;overflow-wrap:anywhere}.game-switch small{display:block;font-size:12px;margin-top:7px;line-height:1.4}.game-switch button>span:last-child{min-width:0}.game-symbol{flex-shrink:0;display:grid;place-items:center;width:48px;height:48px;border-radius:16px;border:2px solid #52634c;background:#fff1cf;font-size:33px;font-weight:700;line-height:1}
.rounds{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px;margin-bottom:23px}.rounds button{border:1px solid #b7c3a7;border-radius:13px;background:#fffdf7;padding:7px;color:#50634a}.rounds button[aria-current=step]{background:#d6e8b4;border:2px solid #52634c;box-shadow:0 3px 0 #aab98f}.round-mark{margin-left:6px;font-size:12px}
.puzzle-head{display:flex;justify-content:space-between;gap:15px;align-items:baseline}.puzzle-head p{font-size:11px;font-weight:650;letter-spacing:.06em;margin:0}.puzzle-head h2{font-size:26px;margin:8px 0 10px;line-height:1.25;letter-spacing:-.025em}.puzzle-head>span{flex-shrink:0;font-size:11px;background:#edf1d9;border:1px solid #aab98f;padding:4px 9px;border-radius:14px}.instructions{line-height:1.8;max-width:870px;color:#4e6449;font-size:13px;margin:0 0 9px}.bounds{font-size:11px;color:#667358;margin:0 0 20px}
.play-panel{background:#f8fbeb;border:2px solid #52634c;border-radius:20px 29px 22px 26px;box-shadow:5px 6px 0 #ccd7b6;padding:25px 27px}.checkpoint-rule{border:1px solid #b9a36e;background:#fff0c9;color:#614d29;padding:10px 14px;border-radius:12px;margin:0 0 20px;font-size:13px}.label{font-weight:650;font-size:13px;margin:20px 0 10px}.instruction-strip,.replacement-cards,.number-actions,.operation-cards{display:flex;flex-wrap:wrap;gap:10px}.instruction-strip button,.replacement-cards button,.operation-cards button{position:relative;flex:1;min-width:60px;border:1.5px solid #7c9067;border-radius:13px;background:#fffdf3;padding:10px 13px;box-shadow:2px 3px 0 #c5d3af}.instruction-strip small{display:block;font-size:10px;color:var(--muted);margin-bottom:4px}.instruction-strip strong,.replacement-cards strong,.operation-cards strong{font-size:24px;line-height:1.3}.instruction-strip button[aria-pressed=true]{outline:3px solid #a66c30;outline-offset:2px}.instruction-strip .changed,.replacement-cards button[aria-pressed=true]{background:#d8ecc2;border-color:#52634c}.replacement-cards button{flex:0 1 84px;background:var(--yellow)}.replacement-cards button:disabled{opacity:.55}.attempt-status{min-height:24px;font-size:13px;margin:20px 0 12px;line-height:1.7}.won{background:#d9ebc9;border:1px solid #86a16e;padding:13px 16px;border-radius:13px;font-weight:600}.notice{color:#785021}
.timeline-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin-top:20px}.timeline{border:1.5px solid #adb99c;border-radius:17px;padding:17px;background:#fffdf5;min-width:0}.timeline h3{display:flex;justify-content:space-between;gap:10px;align-items:center;margin:0 0 13px;font-size:18px}.goal{font-size:12px;font-weight:500;background:#f1e2b7;border:1px solid #c5b179;border-radius:10px;padding:4px 9px}.goal.good{background:#d6e8b4;border-color:#94a77e}.timeline table{width:100%;border-collapse:collapse;table-layout:fixed;font-size:13px;text-align:center}.timeline th{font-weight:500;color:var(--muted);font-size:11px;padding:5px 2px 9px;border-bottom:1px solid #c9d2ba;overflow-wrap:anywhere}.timeline td{padding:10px 2px;border-bottom:1px solid #e2e6d8}.timeline tr.diff td:last-child{font-weight:750;background:#e6efcf}.timeline tr.check td:last-child{box-shadow:inset 0 0 0 2px #b49552}.timeline tr.check small{display:block;font-size:9px;line-height:1.35;color:#786230}.timeline tr:last-child td{border-bottom:0}.bad-number{color:#985332}
.borrow-top{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin-bottom:20px}.value-card,.debt-card{padding:20px;border:1.5px solid #52634c;border-radius:18px;background:#e5efca;text-align:center;box-shadow:3px 4px 0 #b7c49d}.debt-card{background:#fae9c3}.value-card p,.debt-card p{margin:0;font-size:12px}.big-value{display:block;font-size:60px;line-height:1.3;font-weight:750;letter-spacing:-.04em}.debt-card .big-value{font-size:43px;line-height:1.8}.debt-caption{min-height:20px;font-size:11px;margin-top:7px}.number-actions{margin-bottom:22px}.number-actions button{flex:1;background:#fae9c3;border:1.5px solid #9c8c5f;box-shadow:2px 3px 0 #d5c59b;border-radius:12px;padding:11px 16px;font-weight:650}.operation-cards button{background:#e5efca;min-height:75px}.operation-cards button:nth-child(2n){background:#fae9c3}.operation-cards button:disabled{opacity:1;background:#edf0e6;color:#647259;border-style:dashed;box-shadow:none}.operation-cards small{display:block;font-size:10px;margin-top:5px}.card-count{font-size:11px;color:var(--muted);margin:13px 0 0}.borrow-layout{display:grid;grid-template-columns:minmax(0,1fr) 245px;gap:22px}.step-history{border:1px solid #bdc7ac;background:#fffdf5;border-radius:17px;padding:17px;min-width:0}.step-history h3{margin:0 0 12px;font-size:13px}.step-history ol{padding-left:23px;font-size:13px;line-height:2.2;margin:0}.step-history li{overflow-wrap:anywhere}.empty-history{font-size:12px;color:var(--muted)}
.bottom-actions{border-top:1px solid #c7d2b6;display:flex;gap:10px;flex-wrap:wrap;margin-top:23px;padding-top:18px}.bottom-actions button{border:1px solid #9fad90;background:#fffdf3;border-radius:12px;padding:9px 15px}.bottom-actions .next{margin-left:auto;background:#d6e8b4;border-color:#52634c}.help{margin:23px 0 0;border:1.5px solid #b5a778;background:#fff4d8;border-radius:16px;padding:18px}.help-buttons{display:flex;flex-wrap:wrap;gap:10px}.help button{border:1px solid #b5a778;background:#f2deab;border-radius:11px;padding:9px 15px}.help .secondary{background:#fffaf0}.help-note{font-size:11px;color:#665e43;margin:11px 0 0}.help-output{margin:12px 0 0;padding:12px;background:#fffdf4;border:1px solid #d0c49b;border-radius:11px;font-size:13px;line-height:1.8;overflow-wrap:anywhere}.help-output:empty{display:none}.assisted{font-size:10px;color:#786231;margin-top:10px}.privacy{font-size:11px;color:var(--muted);text-align:center;margin:30px 0 0}footer{margin-top:25px;border-top:1px solid #d5dbc9;padding-top:18px;display:flex;justify-content:space-between;gap:20px;font-size:12px}footer p{margin:0;color:var(--muted)}footer a{flex-shrink:0}#storage-error{background:#ffe6ca;border:1px solid #b89060;border-radius:10px;padding:12px;font-size:12px}
@media(max-width:760px){.borrow-layout{grid-template-columns:1fr}.step-history{margin-top:0}.game-switch strong{font-size:21px}.game-switch button{padding:18px 16px;gap:12px}.game-symbol{width:40px;height:40px;font-size:28px}.timeline-grid{gap:12px}.timeline{padding:13px}}
@media(max-width:560px){main{padding:0 16px 25px}.topbar{padding:16px;gap:10px}.topbar img{width:145px}.language select{width:119px;font-size:13px;padding-left:12px;padding-right:35px}.intro h1{font-size:26px}.intro>p:last-child{font-size:12px;line-height:1.7}.game-switch{gap:13px;margin-top:25px}.game-switch button,.game-switch button:nth-child(2){transform:none;display:block;padding:15px 12px}.game-symbol{width:36px;height:36px;margin-bottom:12px;font-size:25px}.game-switch strong{font-size:20px;line-height:1.25}.game-switch small{font-size:11px}.game-switch button::before{left:42%;width:40px}.rounds{gap:7px}.play-panel{padding:20px 15px;box-shadow:3px 4px 0 #ccd7b6}.puzzle-head h2{font-size:23px}.puzzle-head{gap:8px}.instructions{font-size:13px}.bounds{font-size:11px}.instruction-strip,.replacement-cards{gap:9px}.instruction-strip button{min-width:60px;padding:9px}.replacement-cards button{flex:1 1 55px;padding:9px}.instruction-strip strong,.replacement-cards strong{font-size:23px}.timeline-grid{grid-template-columns:1fr}.timeline{padding:16px}.timeline th{font-size:12px}.timeline td{font-size:14px}.borrow-top{gap:12px}.value-card,.debt-card{padding:14px 10px}.big-value{font-size:50px}.debt-card .big-value{font-size:36px}.number-actions{gap:9px}.number-actions button{padding:10px 8px;font-size:13px}.operation-cards{gap:9px}.operation-cards button{padding:10px;min-width:60px}.bottom-actions button{font-size:12px;padding:9px 12px}.help{padding:15px}footer{flex-direction:column;gap:12px}.round-mark{margin-left:3px;font-size:10px}}
@media(prefers-reduced-motion:no-preference){.timeline tr.diff td:last-child{animation:changed .35s ease-out}@keyframes changed{from{background:#f6df9d}to{background:#e6efcf}}}

.goal-strip{display:flex;flex-wrap:wrap;gap:12px;margin:0 0 15px}.goal-strip>div{flex:1;min-width:180px;border:1px solid #a9b994;background:#e5efca;border-radius:12px;padding:10px 14px;font-size:13px}.goal-strip strong{margin-right:9px;font-size:20px}.goal-strip b{font-size:20px}.goal-strip [aria-hidden]{margin:0 8px;font-size:19px}
