*{box-sizing:border-box}body{margin:0;background:#0c1012;color:#edf3ee;font-family:Inter,-apple-system,BlinkMacSystemFont,'Apple SD Gothic Neo','Malgun Gothic',sans-serif}button,input,select{font:inherit}button,select{cursor:pointer}button:focus-visible,a:focus-visible,select:focus-visible,input:focus-visible{outline:3px solid #b9ee73;outline-offset:4px}header{height:86px;display:flex;align-items:center;justify-content:space-between;padding:0 5vw;border-bottom:1px solid #29302e}.brand{color:inherit;text-decoration:none;font-size:20px;font-weight:750;display:flex;align-items:center;gap:10px}.brand span{background:#c8ef91;color:#172918;border-radius:50%;width:32px;height:32px;display:grid;place-items:center}.small{font-size:14px;color:#8e9a94}main{max-width:1500px;margin:auto;display:grid;grid-template-columns:320px 1fr;gap:5vw;padding:48px 5vw}aside{padding-top:12px}.eyebrow{font-size:12px;letter-spacing:1.5px;color:#b9de88}h1{font-size:38px;line-height:1.32;letter-spacing:-1.8px;margin:18px 0}.intro{color:#97a49b;line-height:1.8;font-size:16px;margin-bottom:32px}label{display:block;font-size:14px;margin:20px 0 10px;color:#bbc7bd}label span{float:right;color:#849387}input,select{width:100%;border:1px solid #39433c;border-radius:10px;background:#18201c;color:#f2f7ef;padding:13px}input{font-size:27px;font-weight:650;letter-spacing:-1px}.presets{display:flex;gap:6px;margin-top:10px}.presets button{flex:1;background:transparent;border:1px solid #39433c;color:#b7c3bb;border-radius:7px;padding:9px 0;font-size:14px}.presets button:hover{background:#293728}.primary{background:#c8ef91;color:#192814;border:0;width:100%;padding:16px 18px;border-radius:10px;font-weight:750}.primary span{float:right;font-size:21px}#error{color:#ffb3a9;font-size:14px;min-height:8px}.privacy{font-size:12px;color:#8e9b92;margin-top:18px}.play{border:1px solid #35443c;border-radius:22px;overflow:hidden;background:#12271f;min-width:0;box-shadow:0 28px 80px #0005}.stage-head{padding:25px 28px;display:flex;justify-content:space-between;align-items:center}.stage-head p{color:#a5beac;font-size:14px;margin:0 0 8px}.stage-head h2{font-size:34px;letter-spacing:-1px;margin:0}.pill{font-size:12px;color:#bdd0c2;border:1px solid #4b6454;border-radius:30px;padding:8px 12px}.toolbar{display:flex;justify-content:space-between;align-items:center;padding:0 24px 18px;gap:10px}.modes{background:#0b1b14;padding:4px;border-radius:9px;display:flex}.modes button{border:0;background:transparent;color:#9eb1a4;border-radius:6px;padding:10px 14px;font-size:14px}.modes button[aria-pressed=true]{background:#e2ecd9;color:#233823;font-weight:700}.text-button{background:none;border:0;color:#bdd0c2;font-size:14px}#world{height:480px;position:relative;background:radial-gradient(ellipse at 50% 30%,#274e38,#11271e 80%);overflow:hidden;border-top:1px solid #ffffff0a}canvas{width:100%;height:100%;display:block;touch-action:none}.hint{position:absolute;top:20px;left:0;width:100%;text-align:center;color:#b0c8b6;font-size:14px;pointer-events:none}footer{padding:16px 24px;display:flex;justify-content:space-between;gap:15px;flex-wrap:wrap;font-size:12px;color:#9cb3a3;background:#10221a}footer span:first-child{color:#d2e3c9;font-size:14px}#countPanel{position:absolute;inset:0;padding:22px;touch-action:pan-y}#countPanel[hidden]{display:none}.count-stats{display:flex;justify-content:space-between;font-size:14px;color:#a3b7a8}.count-stats strong{display:block;font-size:22px;color:#e5f2dc;margin-top:8px}#note{display:flex;flex-direction:column;position:absolute;top:130px;left:50%;margin-left:-150px;width:300px;height:150px;align-items:flex-start;justify-content:space-between;padding:18px 22px;border:6px double #83794d;background:#d8cf93;color:#47452c;box-shadow:0 8px 0 #adac88,0 13px 0 #646f52,0 20px 28px #0005;touch-action:none;transform:rotate(-5deg);border-radius:5px}#note small{font-size:11px;letter-spacing:2px}#note strong{font-size:40px}#note>span{position:absolute;right:23px;top:38px;font-size:58px;opacity:.3}#note em{font-size:13px;font-style:normal}.count-bottom{display:flex;gap:12px;position:absolute;bottom:58px;left:22px;right:22px}.count-bottom select{width:auto;flex:1;font-size:14px}.count-bottom button{background:#c8ef91;border:0;border-radius:9px;padding:10px 15px;color:#1b301d;font-size:14px}#complete{position:absolute;bottom:12px;left:0;right:0;text-align:center;font-size:14px;color:#c8ef91}button:hover{filter:brightness(1.08)}@media(max-width:900px){main{grid-template-columns:1fr;padding:24px 18px;gap:26px}header{height:65px;padding:0 20px}aside{padding:0}h1{font-size:29px;margin:10px 0}h1 br{display:none}.intro{margin:6px 0 16px;font-size:14px}.intro br{display:none}.eyebrow{display:none}form{display:grid;grid-template-columns:1fr 2fr;gap:10px}label{margin:0;align-self:end}label[for=kind]{grid-column:1;grid-row:1}label[for=amount]{grid-column:2;grid-row:1}#kind{grid-column:1;grid-row:2}#amount{grid-column:2;grid-row:2;min-width:0;font-size:23px}.presets{grid-column:1/3;margin:0}#error{grid-column:1/3;margin:0;min-height:0}.primary{grid-column:1/3}.privacy{margin-bottom:0}.stage-head{padding:21px}.stage-head h2{font-size:29px}.toolbar{padding:0 14px 15px}.modes button{padding:10px}#world{height:430px}footer{padding:14px 18px}.pill{padding:7px;font-size:12px}}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto}}
/* A live top sheet, a gently fanned stack, and outgoing counted sheets. */
#countPanel{perspective:1000px;isolation:isolate;user-select:none;-webkit-user-select:none}
#note,#countPanel .stack-note,#countPanel .counted-sheet{top:140px;left:50%;margin-left:calc(clamp(230px,72vw,300px)/-2);width:clamp(230px,72vw,300px);height:150px;transform-origin:35% 65%;backface-visibility:hidden;will-change:transform;box-shadow:0 2px 2px #0002,0 12px 22px #0004;transform:rotate(-4deg);cursor:grab;filter:none}
#note{z-index:5;transition:opacity .16s;outline-offset:8px}
#note.held{cursor:grabbing;box-shadow:0 24px 34px #0006}
#noteStack{position:absolute;inset:0;pointer-events:none;z-index:1;transition:opacity .15s}
#countPanel .stack-note,#countPanel .counted-sheet{display:flex;flex-direction:column;position:absolute;align-items:flex-start;justify-content:space-between;padding:18px 22px;border:6px double #83794d;background:linear-gradient(115deg,#dfd8a3,#c7bf87);color:#47452c;border-radius:5px;pointer-events:none}
#countPanel .stack-note{transform:translate(calc(var(--layer) * -4px - 3px),calc(var(--layer) * 5px + 6px)) rotate(calc(-6deg - var(--layer) * 2deg));filter:brightness(calc(.94 - var(--layer) * .05));box-shadow:0 2px 0 #a8a680,0 5px 5px #0002}
#countPanel .stack-note small,#countPanel .counted-sheet small{font-size:11px;letter-spacing:2px}
#countPanel .stack-note strong,#countPanel .counted-sheet strong{font-size:40px}
#countPanel .stack-note>span,#countPanel .counted-sheet>span{position:absolute;right:23px;top:38px;font-size:58px;opacity:.3}
#countPanel .stack-note em,#countPanel .counted-sheet em{font-size:13px;font-style:normal}
#countPanel .counted-sheet{z-index:6}
#note{background:linear-gradient(115deg,#e6deb0 0%,#d8cf93 58%,#c9be80 100%)}
#countProgress{height:3px;position:absolute;top:104px;left:22px;right:22px;background:#ffffff10;border-radius:3px;overflow:hidden}
#countProgress>span{display:block;width:0;height:100%;background:#c8ef91;transition:width .18s ease-out}
.count-stats{position:relative;z-index:10;pointer-events:none}
.count-stats strong{font-variant-numeric:tabular-nums}
.count-bottom{z-index:10}
#complete{z-index:10;pointer-events:none}
@media(prefers-reduced-motion:reduce){#countProgress>span,#note,#noteStack{transition:none}}
/* The counting surface takes over the viewport. */
body.counting header{height:56px}
body.counting main{display:block;padding:0;max-width:none}
body.counting aside{display:none}
body.counting .play{border:0;border-radius:0;min-height:calc(100dvh - 56px);box-shadow:none}
body.counting .stage-head{padding:14px 24px}
body.counting .stage-head p{margin-bottom:4px}
body.counting .stage-head h2{font-size:27px}
body.counting .toolbar{padding-bottom:12px}
body.counting #world{height:calc(100dvh - 214px);min-height:400px}
body.counting footer{display:none}
body.counting #note,body.counting #countPanel .stack-note,body.counting #countPanel .counted-sheet{width:min(84vw,740px);height:clamp(190px,34vh,340px);margin-left:calc(min(84vw,740px)/-2);top:50%;margin-top:calc(clamp(190px,34vh,340px)/-2);padding:28px 32px;border-width:9px;font-size:18px}
body.counting #note strong,body.counting #countPanel .stack-note strong,body.counting #countPanel .counted-sheet strong{font-size:clamp(46px,10vw,100px);letter-spacing:-2px}
body.counting #note>span,body.counting #countPanel .stack-note>span,body.counting #countPanel .counted-sheet>span{font-size:clamp(64px,15vw,140px);top:28%;right:8%}
body.counting #note em,body.counting #countPanel .stack-note em,body.counting #countPanel .counted-sheet em{font-size:14px}
body.counting #countProgress{top:87px}
body.counting .count-bottom{bottom:30px;max-width:740px;margin:auto}
body.counting #complete{bottom:0;margin:0;font-size:12px}
.paper-curl{position:absolute;z-index:7;pointer-events:none;transform-style:preserve-3d;perspective:1100px;transform-origin:35% 65%;will-change:transform}
.paper-strip{position:absolute;top:0;height:100%;transform-origin:left center;transform-style:preserve-3d;will-change:transform}
.paper-strip-window{position:absolute;inset:0;overflow:hidden;backface-visibility:visible;box-shadow:0 8px 15px #0002}
.paper-strip-window:after{content:'';position:absolute;inset:0;background:linear-gradient(90deg,#fff5,#0003);opacity:var(--shade,0);pointer-events:none}
.paper-strip-window .paper-copy{position:absolute!important;top:0!important;left:0!important;margin:0!important;transform:none!important;filter:none!important;opacity:1!important;box-shadow:none!important;pointer-events:none!important}
@media(max-width:600px){body.counting .stage-head{padding:10px 18px}body.counting .stage-head h2{font-size:24px}body.counting .stage-head p{font-size:12px}body.counting #world{height:calc(100dvh - 197px);min-height:400px}body.counting #note,body.counting #countPanel .stack-note,body.counting #countPanel .counted-sheet{padding:20px}body.counting .count-stats strong{font-size:18px}}
/* Photographic cotton-paper engraving shared by the live sheet and curl strips. */
#note,#countPanel .stack-note,#countPanel .counted-sheet,body.counting #note,body.counting #countPanel .stack-note,body.counting #countPanel .counted-sheet{background:#d9c580 url('assets/banknote-50000.png') center/100% 100% no-repeat;border:1px solid #aa8c4c;border-radius:2px;padding:0;overflow:hidden}
#note>small,#note>span,#note>em,#countPanel .stack-note>small,#countPanel .stack-note>span,#countPanel .stack-note>em,#countPanel .counted-sheet>small,#countPanel .counted-sheet>span,#countPanel .counted-sheet>em{display:none}
#note strong,#countPanel .stack-note strong,#countPanel .counted-sheet strong,body.counting #note strong,body.counting #countPanel .stack-note strong,body.counting #countPanel .counted-sheet strong{position:absolute;left:50%;top:12%;transform:translateX(-50%);font-size:clamp(14px,3vw,24px);letter-spacing:0;background:#f5edcfeb;border:1px solid #a68a50;border-radius:2px;padding:5px 10px;white-space:nowrap;color:#57452e}
#note strong:before,#countPanel .stack-note strong:before,#countPanel .counted-sheet strong:before{content:'이번에 셀 금액 ';font-size:12px;font-weight:400}
#note[data-exact-note=true] strong,#countPanel .stack-note[data-exact-note=true] strong,#countPanel .counted-sheet[data-exact-note=true] strong{visibility:hidden}
body.counting #note,body.counting #countPanel .stack-note,body.counting #countPanel .counted-sheet{height:calc(min(84vw,740px) / 2.15);margin-top:calc(min(84vw,740px) / -4.3)}
.paper-strip-window .paper-copy{margin-top:0!important}
#noteStack .stack-note{box-shadow:0 1px 0 #f7e9c8,0 2px 0 #a39b7d,0 3px 0 #e6d9b8,0 5px 8px #0003}
#bundleProgress{position:absolute;top:94px;left:22px;right:22px;text-align:center;font-size:13px;color:#d5dfbb;margin:0;pointer-events:none}
#bundleShelf{position:absolute;bottom:99px;left:22px;right:22px;display:flex;align-items:center;gap:14px;pointer-events:none;z-index:9}
#bundleShelf[hidden]{display:none}#bundleItems{display:flex;padding-left:6px}#bundleSummary{font-size:12px;color:#d9e4c8;background:#11271ed9;padding:6px;border-radius:5px}
.saved-cash{display:block;position:relative;width:52px;height:25px;margin-left:-6px;transform:rotate(-9deg);background:url('assets/banknote-50000.png') center/cover;border:1px solid #c1a875;box-shadow:0 2px #d7caaa,0 4px #928873,0 5px 9px #0006}
.saved-cash:after{content:'';position:absolute;left:43%;top:-1px;width:18%;height:100%;background:#e9e4db;border:1px solid #bbb19a}
.saved-cash.roll{width:30px;height:38px;border-radius:45% / 14%;background-image:linear-gradient(90deg,#0008,transparent 35%,#fff4 55%,#0009),url('assets/banknote-50000.png');box-shadow:0 5px 9px #0006}
.saved-cash.roll:after{left:-2px;top:43%;width:calc(100% + 4px);height:5px;background:#c77843;border:1px solid #8d4926;border-radius:30%}
#wrapDialog{width:min(92vw,530px);max-height:92dvh;overflow:auto;background:#132a20;color:#eff3e7;border:1px solid #66836c;border-radius:24px;padding:28px;text-align:center;box-shadow:0 30px 100px #0008}
#wrapDialog::backdrop{background:#030b07c9;backdrop-filter:blur(7px)}#wrapDialog h2{font-size:27px;margin:10px 0}#wrapDescription{color:#afc5b4;font-size:15px}.wrap-preview{height:200px;display:grid;place-items:center;perspective:800px;overflow:visible}
.wrap-cash{width:260px;max-width:75vw;height:121px;position:relative;background:url('assets/banknote-50000.png') center/100% 100%;transform:rotate(-7deg);box-shadow:0 2px #e1d5b5,0 4px #a79b7e,0 6px #e1d5b5,0 8px #9b8f73,0 12px 22px #0007;transition:width 1s cubic-bezier(.3,.1,.25,1),height 1s,border-radius 1s,transform 1s,box-shadow 1s}
.paper-band{position:absolute;left:37%;top:-3%;width:26%;height:106%;display:flex;flex-direction:column;justify-content:center;background:linear-gradient(90deg,#ccc5b7,#fff9ed 40%,#ddd5c5);color:#5b564a;font-size:12px;font-weight:700;border:1px solid #ada393;transform:scaleY(0);transform-origin:top;box-shadow:2px 0 3px #0003}.paper-band small{font-size:9px;margin-top:8px}.rubber-band{position:absolute;left:-3%;top:43%;width:106%;height:13%;border:2px solid #9c542c;border-radius:30%;background:linear-gradient(#ce925e,#ab6135,#dba074);transform:scaleX(0);box-shadow:0 3px 3px #0005}
.wrap-preview.strap .paper-band{animation:strap-wrap .9s both}.wrap-preview.roll .wrap-cash{width:84px;height:140px;border-radius:48% / 12%;transform:rotate(12deg);background-image:linear-gradient(90deg,#34200899,transparent 35%,#fff6 53%,#53380faa),url('assets/banknote-50000.png');box-shadow:inset 0 6px 2px #e9dcaa,inset 0 -5px 3px #6a532b,8px 12px 20px #0007}
.wrap-preview.roll .rubber-band{animation:rubber-wrap .55s .85s both}@keyframes strap-wrap{0%{transform:scaleY(0) rotateX(65deg)}70%{transform:scaleY(1.07) rotateX(-10deg)}100%{transform:scaleY(1) rotateX(0)}}@keyframes rubber-wrap{0%{transform:scaleX(1.8);opacity:0}30%{opacity:1;transform:scaleX(1.5)}75%{transform:scaleX(.9)}100%{transform:scaleX(1)}}
#wrapChoices{display:flex;gap:12px}#wrapChoices[hidden],#finishWrap[hidden]{display:none}#wrapChoices button,#finishWrap{flex:1;border:1px solid #789665;border-radius:12px;background:#d2ecaa;color:#24321d;padding:15px 10px;font-size:15px;font-weight:700}#wrapChoices button+button{background:#283d2c;color:#e7ecd9}#wrapChoices small{display:block;font-size:11px;font-weight:400;margin-top:6px;letter-spacing:1px}#finishWrap{width:100%}#wrapStatus{font-size:13px;min-height:20px;margin:18px 0 0;color:#d0dfbd}
@media(max-height:700px){#bundleShelf{bottom:90px}.wrap-cash{width:220px;height:102px}.wrap-preview{height:160px}#wrapDialog{padding:20px}}
@media(prefers-reduced-motion:reduce){.wrap-cash{transition:none}.wrap-preview.strap .paper-band,.wrap-preview.roll .rubber-band{animation:none;transform:none}}
body.game .stage-head{display:none}body.game #world{height:calc(100dvh - 115px);min-height:480px}body.game .toolbar{padding:12px 15px}body.game .count-stats,body.game #countProgress,body.game #bundleProgress,body.game #bundleShelf,body.game .count-bottom,body.game #complete{display:none!important}
#gameHud{position:absolute;top:24px;left:24px;right:24px;display:flex;justify-content:space-between;color:#adc3b1;font-size:14px}#gameHud[hidden],#gameTools[hidden]{display:none}#gameHud strong{font-size:24px;color:#eaf5df;margin-left:7px;font-variant-numeric:tabular-nums}#gameTools{position:absolute;bottom:20px;left:18px;right:18px;text-align:center;z-index:10}#gameTools p{color:#dfebd5;font-size:15px;line-height:1.6}#gameTools small{font-size:13px;color:#adc3b1}#gameTools>div{display:flex;gap:8px;max-width:620px;margin:auto}#gameTools button{flex:1;border:1px solid #819868;background:#d2ecaa;color:#20321b;border-radius:12px;padding:15px 8px;font-size:14px;font-weight:700}#gameTools #gameTap{background:#203b2b;color:#e2edd8}button:disabled{cursor:default;filter:none;opacity:.45}
body.game #note,body.game #countPanel .stack-note,body.game #countPanel .counted-sheet{top:43%}#gameWrap{position:absolute;inset:0;z-index:30;display:flex;flex-direction:column;align-items:center;justify-content:center;background:#11261ef5;color:#e5f5d0}#gameWrap h2{font-size:28px}#gameWrap p{color:#bdd4ad}#gameWrap .wrap-preview{width:100%;height:210px}
#gameResult{background:#152b20;color:#e7f3de;width:min(92vw,480px);border:1px solid #67815e;border-radius:22px;padding:28px}#gameResult::backdrop{background:#000b;backdrop-filter:blur(5px)}#gameResult h2{font-size:25px}#gameFailure{font-size:16px;line-height:1.7;color:#c4d5b7}#finalScore{font-size:36px;color:#c8ef91;display:block;margin:20px 0}#gameResult h3{font-size:16px}#gameRecords{font-size:14px;padding-left:24px;line-height:2;color:#c3d6b6}#recordNotice{font-size:12px;color:#a2b393}#gameRetry{width:100%;background:#c8ef91;border:0;border-radius:12px;padding:15px;color:#20321b;font-weight:700}@media(max-width:420px){.modes button{font-size:12px;padding:9px 8px}.toolbar .text-button{font-size:12px}}
