[hidden]{display:none!important}
button,select,input{font:inherit}
button{cursor:pointer}
button:focus-visible,select:focus-visible,label:focus-visible{outline:3px solid #ff4757;outline-offset:4px}
button:disabled{cursor:not-allowed;opacity:.5}
#start{border:0;padding:0;color:inherit;cursor:pointer}
#step-type-select:not([hidden]){display:flex;grid-column:1/9;grid-row:1/9;z-index:50;flex-direction:column;justify-content:center;align-items:center;gap:28px}
.type-options{display:flex;gap:40px;justify-content:center}
.type-card{color:#fff;text-align:center;font-family:Pretendard,Arial,sans-serif}
.type-card canvas{display:block;width:300px;height:450px;background:#000;border-radius:10px}
#camera-select{position:fixed;top:20px;left:20px;z-index:9999;background:#e91e63;color:white;padding:15px;border-radius:8px;font-size:20px;font-weight:bold;border:3px solid white;box-shadow:0 4px 15px rgba(0,0,0,.5);max-width:320px}
#camera_div:not([hidden]){display:flex}
#camera.has-stream{display:block;max-height:min(82vh,850px);object-fit:cover;aspect-ratio:2/3;transform:scaleX(-1)}
#camera.landscape{aspect-ratio:3/2}
#start-button:not([hidden]){display:block}
#timer.active,#progress.active{display:block}
#cancel-shoot{position:fixed;right:25px;bottom:25px;z-index:20;background:#e91e63;color:#fff;border:2px solid #fff;border-radius:14px;padding:12px 18px;font-weight:800;box-shadow:0 4px 12px #0005}
#camera-fallback:not([hidden]){display:flex;grid-column:6/9;grid-row:3/7;align-self:center;justify-self:center;align-items:center;flex-direction:column;gap:10px;z-index:20;padding:20px;max-width:350px;border-radius:18px;background:#ffffffd9;color:#333;text-align:center;font-family:Pretendard,Arial,sans-serif}
#camera-fallback p{line-height:1.5;font-weight:700}
#camera-fallback .button{float:none;margin:4px 0;min-width:220px;max-width:none;text-align:center;cursor:pointer}
#upload-input{position:absolute;width:1px;height:1px;opacity:0;overflow:hidden}
#canvas-wrap:not([hidden]){display:flex}
#canvas-wrap #canvas{display:block;width:min(500px,90%);height:auto;max-height:90vh;aspect-ratio:2/3;object-fit:contain}
.step-side:not([hidden]){display:flex;grid-column:6/9;grid-row:1/9;flex-direction:column;justify-content:center;align-items:center;z-index:20;padding:15px;min-width:0;font-family:Pretendard,Arial,sans-serif}
.step-side h2{color:white;margin:0 0 20px;font-size:2.5rem;font-weight:800;letter-spacing:-1px;text-shadow:2px 2px 5px rgba(0,0,0,.6);text-align:center}
.step-side .button{float:none;margin:8px 0;min-width:220px;max-width:300px;text-align:center}
.step-side .accent-button{background:#e91e63}
.select-box{display:grid;grid-template-columns:repeat(3,1fr);gap:15px;width:100%;max-width:450px;justify-items:center;margin-bottom:20px}
.photo-wrapper{padding:0;border:0;background:transparent;cursor:pointer}
.photo-wrapper.landscape{width:150px;height:100px}
.photo-wrapper.selected .photo-selectable{border-color:#000}
.photo-wrapper .selection-badge{right:5px}
.frame-box{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;margin-bottom:20px;max-width:440px;max-height:58vh;overflow:auto;justify-items:center}
.frame-button{display:block;width:100px;height:150px;object-fit:cover;margin:10px;border:0;padding:0;background:transparent;border-radius:4px;cursor:pointer}
.frame-button img{display:block;width:100%;height:100%;object-fit:cover}
.frame-button.selected{outline:4px solid #ff4757}
.filter-box{display:flex;gap:5px;justify-content:center;flex-wrap:wrap;margin-bottom:20px;max-width:490px}
.filter-item{display:flex;flex-direction:column;align-items:center;gap:8px;margin:8px;padding:0;border:0;background:transparent;color:#fff;font-size:13px;font-weight:700;text-shadow:1px 1px 4px #000;cursor:pointer}
.filter-item canvas{display:block;width:80px;height:120px;border-radius:12px;border:3px solid #ffffffaa;box-shadow:0 4px 10px #0005;object-fit:cover}
.filter-item.selected canvas{border-color:#e91e63;box-shadow:0 0 15px #e91e63cc}
.print-picker{display:flex;gap:20px;align-items:center;margin-bottom:30px}
.print-picker .button{min-width:60px;max-width:60px;padding:1em;font-size:24px;border-radius:20px;margin:0}
#print-count-display{font-size:40px;color:white;font-weight:bold;width:50px;text-align:center;text-shadow:1px 1px 3px #000}
.print-note{color:#ddd;margin-bottom:30px}.step-actions{display:flex;gap:10px;flex-direction:column;align-items:center}.step-actions .button{margin:0}
.web-note{margin-top:18px;color:#fff;text-shadow:1px 1px 3px #000;max-width:300px;text-align:center;line-height:1.4;font-size:13px}
#step-download .button{width:250px;max-width:250px;margin-bottom:10px}
#step-download .restart-button{background:#e91e63;margin-top:15px}
#status:not(:empty){position:fixed;bottom:20px;left:20px;z-index:95;background:#fff;color:#333;border-radius:12px;padding:10px 14px;max-width:min(520px,90vw);font:700 14px/1.4 Pretendard,Arial,sans-serif;box-shadow:0 4px 15px #0003}
#status.error{color:#b92338}
#print-sheet{display:none}
@media(max-width:900px){body{height:auto;min-height:100vh;overflow:auto}.grid-container{min-height:100vh;height:auto;grid-template-columns:1fr;grid-template-rows:auto auto}.type-screen{min-height:100vh}.type-options{gap:14px}.type-card{padding:12px}.type-card canvas{width:min(34vw,240px);height:auto;aspect-ratio:2/3}.type-name{font-size:18px}.type-desc{max-width:230px;line-height:1.4}.step-side:not([hidden]){grid-column:1;grid-row:2;min-height:45vh;padding:30px 16px}.canvas_grid{grid-column:1;grid-row:1;min-height:58vh;padding:22px 0}#canvas-wrap #canvas{width:auto;height:min(52vh,650px);max-width:90vw}.step-side h2{font-size:clamp(25px,5vw,38px)}#camera_div:not([hidden]){grid-column:1;grid-row:1;min-height:100vh}#camera.has-stream{max-height:80vh;max-width:90vw}#start-button:not([hidden]){grid-column:1;grid-row:1;align-self:end;margin:0 auto 6vh}#camera-fallback:not([hidden]){grid-column:1;grid-row:2;margin:10px auto}#camera-select{font-size:14px;padding:10px;max-width:48vw}#progress{top:25px;right:20px;font-size:19px}#timer{font-size:38px;top:20px}}
@media(max-width:900px){#start{grid-column:1;grid-row:1/3;min-height:100vh}#step-type-select:not([hidden]){grid-column:1;grid-row:1/3}}
@media(max-width:560px){#start{background-size:contain;background-color:#000}#start-hint{bottom:12vh;font-size:clamp(17px,5vw,27px);letter-spacing:3px;padding:15px 28px}.type-options{flex-direction:column;gap:12px}.type-card{flex-direction:row;gap:16px;width:min(90vw,400px);text-align:left;flex-wrap:wrap;justify-content:flex-start}.type-card canvas{width:90px;height:135px;flex:none}.type-card .type-name{margin-top:25px;font-size:20px}.type-card .type-desc{font-size:12px;margin-top:-55px;margin-left:106px}.step-title h1{font-size:clamp(27px,7vw,40px)}.select-box{gap:8px}.photo-wrapper{width:min(27vw,120px);height:auto;aspect-ratio:2/3}.photo-wrapper.landscape{width:min(28vw,150px);height:auto;aspect-ratio:3/2}.frame-box{max-height:none}.filter-box{max-width:330px}.filter-item canvas{width:68px;height:102px}#camera_div:not([hidden]){min-height:85vh}#camera.has-stream{max-height:70vh}#start-button:not([hidden]){font-size:20px;letter-spacing:2px;padding:17px 28px;margin-bottom:5vh}}
@media print{@page{size:4in 6in;margin:0}html,body{display:block!important;width:auto!important;height:auto!important;margin:0!important;padding:0!important;background:#fff!important;overflow:visible!important;animation:none!important}.grid-container{display:none!important}#print-sheet{display:block!important;width:4in}#print-sheet img{display:block;width:4in;height:6in;object-fit:fill;break-after:page;page-break-after:always}#print-sheet img:last-child{break-after:auto;page-break-after:auto}}
