/* 앱 UI — 모바일 우선, 360px에서 가로 넘침 없음 */
*{box-sizing:border-box}
body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Apple SD Gothic Neo","Noto Sans KR","Malgun Gothic",sans-serif;line-height:1.65;color:#14202b;background:#f7faf9}
main{max-width:760px;margin:0 auto;padding:16px 14px 40px}
h1{font-size:1.55rem;line-height:1.3;margin:.2em 0 .3em}
h2{font-size:1.16rem;margin:1.8em 0 .5em}
h3{font-size:1.02rem;margin:1.2em 0 .3em}
a{color:#0f766e}
.updated{font-size:.82rem;color:#5b6b73;margin:0 0 10px}
.lead{color:#3f4f57}
.badge{background:#e6fffa;border:1px solid #99f6e4;color:#115e59;border-radius:10px;padding:9px 12px;font-size:.94rem;margin:0 0 12px}
.banner{background:#fff7ed;border:1px solid #fed7aa;border-radius:10px;padding:10px 12px;margin:0 0 10px;font-size:.92rem}
.tool-card{background:#fff;border:1px solid #d5e3df;border-radius:14px;padding:14px;margin:14px 0;box-shadow:0 1px 2px rgba(15,23,42,.04)}
.tool-card h2{margin-top:0}
label{display:block;font-weight:700;font-size:.9rem;margin:12px 0 4px}
input,select,button{font:inherit}
input[type=file],input[type=number],select{width:100%;min-height:46px;padding:9px 10px;border:1px solid #b9cbc6;border-radius:9px;background:#fff}
input[type=range]{width:100%;min-height:36px;accent-color:#0f766e}
button,.btn{display:inline-block;min-height:46px;padding:10px 16px;border-radius:9px;border:1px solid #0f766e;background:#0f766e;color:#fff;font-weight:700;cursor:pointer;text-decoration:none;text-align:center}
button:disabled{opacity:.55;cursor:not-allowed}
button.secondary{background:#fff;color:#0f766e}
button + button,.btn + button{margin-left:8px}
.grid{display:grid;grid-template-columns:1fr;gap:10px}
#crop-wrap{display:flex;justify-content:center;align-items:center;min-height:240px;padding:6px 0}
.crop{position:relative;overflow:hidden;background:#e2e8f0;touch-action:none;border-radius:6px;max-width:100%;cursor:grab}
.crop img{position:absolute;left:0;top:0;max-width:none;user-select:none;-webkit-user-drag:none;pointer-events:none}
.empty{border:1px dashed #b9cbc6;border-radius:10px;padding:26px 12px;text-align:center;color:#64748b;width:100%}
.guide{position:absolute;left:0;right:0;height:14px;margin-top:-7px;cursor:ns-resize;touch-action:none;z-index:2}
.guide.vleft,.guide.vright{top:0;bottom:0;left:0;right:auto;width:14px;height:auto;margin:0 0 0 -7px;cursor:ew-resize}
.guide::after{content:"";position:absolute;left:0;right:0;top:6px;height:2px;background:#e11d48;box-shadow:0 0 0 1px rgba(255,255,255,.7)}
.guide.vleft::after,.guide.vright::after{left:6px;right:auto;top:0;bottom:0;width:2px;height:auto}
.guide::before{content:"";position:absolute;right:4px;top:0;width:12px;height:12px;border-radius:50%;background:#e11d48;border:2px solid #fff}
.guide.vleft::before,.guide.vright::before{top:4px;right:auto;left:0}
.measure{margin:10px 0;font-size:.93rem;min-height:1.5em}
.pill{display:inline-block;padding:1px 8px;border-radius:999px;font-size:.8rem;font-weight:700}
.pill.ok{background:#dcfce7;color:#166534}
.pill.bad{background:#fee2e2;color:#991b1b}
.result{display:grid;grid-template-columns:1fr;gap:12px;border-top:1px solid #e2e8f0;margin-top:14px;padding-top:14px}
.result .mini img,.preview{max-width:180px;max-height:240px;border:1px solid #d5e3df;border-radius:6px;background:#fff}
.check{list-style:none;padding:0;margin:8px 0}
.check li{padding:4px 0 4px 22px;position:relative;font-size:.92rem}
.check li::before{content:"✓";position:absolute;left:0;font-weight:800}
.check li.bad::before{content:"!";color:#b91c1c}
.check li.ok::before{color:#15803d}
.note{font-size:.85rem;color:#5b6b73}
.tool-err{color:#b91c1c;font-size:.88rem;min-height:0;margin:4px 0}
.hint{font-size:.85rem;color:#5b6b73}
.big-line{font-weight:700;margin:10px 0}
.row{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.sheet-wrap{display:flex;justify-content:center;margin:12px 0}
#ps-preview{max-width:100%;height:auto;border:1px solid #94a3b8;background:#fff}
.check-preview{display:flex;justify-content:center;margin:10px 0}
#sc-preview{max-width:100%;height:auto;border:1px solid #d5e3df;border-radius:6px}
.cards{display:grid;grid-template-columns:1fr;gap:10px;margin:10px 0}
.card{display:flex;flex-direction:column;gap:2px;background:#fff;border:1px solid #d5e3df;border-radius:12px;padding:12px;text-decoration:none;color:#14202b}
.card span{font-size:.88rem;color:#5b6b73}
.affiliate{margin:18px 0;padding:12px;border:1px solid #e2e8f0;border-radius:10px;background:#fff;font-size:.9rem}
.affiliate p{margin:6px 0 0;font-size:.78rem;color:#64748b}
.actions{margin:8px 0 0}
@media(min-width:680px){.grid{grid-template-columns:1fr 1fr}.cards{grid-template-columns:repeat(3,1fr)}}
