/* /css/tools/idphoto.css */
*{box-sizing:border-box}

.idphoto-tool{
    max-width:1240px;
    margin:0 auto;
    padding:30px 16px 70px;
    color:#1f2937;
    font-family:"Pretendard","Noto Sans KR","Malgun Gothic",sans-serif;
}

.idphoto-tool button,
.idphoto-tool input,
.idphoto-tool select{
    font-family:inherit;
}

.idphoto-hero{
    position:relative;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:30px;
    background:#fff;
    border:1px solid #dde6f2;
    border-radius:24px;
    padding:30px 30px;
    box-shadow:0 14px 35px rgba(15,23,42,.06);
    margin-bottom:16px;
    overflow:hidden;
}

.idphoto-hero-text{
    min-width:0;
}

.idphoto-badge{
    display:inline-flex;
    align-items:center;
    height:32px;
    padding:0 13px;
    border-radius:999px;
    background:#eef5ff;
    color:#2563eb;
    font-size:13px;
    font-weight:900;
    letter-spacing:1.2px;
    margin-bottom:14px;
}

.idphoto-hero h1{
    margin:0;
    color:#0f172a;
    font-size:38px;
    line-height:1.25;
    letter-spacing:-1.6px;
    font-weight:900;
}

.idphoto-hero p{
    max-width:650px;
    margin:12px 0 0;
    color:#64748b;
    font-size:16px;
    line-height:1.75;
}

.idphoto-hero-visual{
    position:relative;
    flex:0 0 230px;
    height:138px;
    border-radius:22px;
    padding:24px 22px;
    color:#fff;
    overflow:hidden;
    background:linear-gradient(135deg,#2563eb,#06b6d4);
    box-shadow:0 18px 34px rgba(37,99,235,.22);
}

.idphoto-visual-circle{
    position:absolute;
    top:-34px;
    right:-24px;
    width:96px;
    height:96px;
    border-radius:50%;
    background:rgba(255,255,255,.22);
}

.idphoto-visual-icon{
    width:46px;
    height:46px;
    border:3px solid rgba(255,255,255,.92);
    border-radius:14px;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:19px;
    font-weight:900;
    margin-bottom:14px;
}

.idphoto-hero-visual strong{
    display:block;
    font-size:20px;
    font-weight:900;
    margin-bottom:5px;
}

.idphoto-hero-visual em{
    display:block;
    font-style:normal;
    font-size:14px;
    font-weight:700;
    color:rgba(255,255,255,.88);
}

.idphoto-notice,
.idphoto-privacy-note{
    display:flex;
    gap:10px;
    align-items:flex-start;
    border-radius:16px;
    padding:13px 16px;
    line-height:1.65;
    font-size:14px;
    margin-bottom:12px;
}

.idphoto-notice{
    background:#fff7ed;
    border:1px solid #fed7aa;
    color:#9a3412;
}

.idphoto-privacy-note{
    background:#eefcf6;
    border:1px solid #bbf7d0;
    color:#166534;
    margin-bottom:18px;
}

.idphoto-notice strong,
.idphoto-privacy-note strong{
    white-space:nowrap;
}

.idphoto-layout{
    display:grid;
    grid-template-columns:340px 1fr;
    gap:20px;
    align-items:start;
}

.idphoto-left,
.idphoto-right{
    display:flex;
    flex-direction:column;
    gap:18px;
}

.idphoto-card{
    background:#fff;
    border:1px solid #e5eaf2;
    border-radius:22px;
    padding:21px;
    box-shadow:0 12px 32px rgba(15,23,42,.07);
}

.idphoto-work-card{
    position:sticky;
    top:16px;
    min-height:620px;
}

.idphoto-work-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
    margin-bottom:8px;
}

.idphoto-key-hint{
    flex:0 0 auto;
    border-radius:999px;
    padding:7px 11px;
    background:#f1f5f9;
    color:#475569;
    font-size:12px;
    font-weight:800;
}

.idphoto-step-title{
    display:flex;
    align-items:center;
    gap:9px;
}

.idphoto-step-num{
    width:28px;
    height:28px;
    border-radius:10px;
    background:#2563eb;
    color:#fff;
    font-weight:900;
    font-size:14px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    flex:0 0 auto;
}

.idphoto-step-title h2{
    margin:0;
    font-size:21px;
    letter-spacing:-.4px;
}

.idphoto-card-desc{
    margin:8px 0 16px;
    color:#64748b;
    font-size:14px;
    line-height:1.6;
}

.idphoto-upload-box{
    display:block;
    border:2px dashed #cbd5e1;
    border-radius:20px;
    padding:25px 14px;
    text-align:center;
    background:#f8fafc;
    transition:.2s;
    cursor:pointer;
}

.idphoto-upload-box:hover{
    border-color:#2563eb;
    background:#eff6ff;
}

.idphoto-upload-icon{
    width:58px;
    height:58px;
    margin:0 auto 10px;
    border-radius:18px;
    background:linear-gradient(135deg,#dbeafe,#cffafe);
    color:#1d4ed8;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:16px;
    font-weight:900;
    letter-spacing:-.5px;
}

.idphoto-upload-box strong{
    display:block;
    font-size:17px;
    margin-bottom:5px;
}

.idphoto-upload-box em{
    display:block;
    font-style:normal;
    font-size:13px;
    color:#64748b;
}

#photoFile{display:none}

.idphoto-message{
    display:none;
    margin-top:14px;
    border-radius:16px;
    padding:14px;
    line-height:1.7;
    font-size:14px;
    word-break:break-word;
}

.idphoto-file-info{background:#f1f5f9;color:#334155}
.idphoto-error-box{background:#fef2f2;border:1px solid #fecaca;color:#991b1b}
.idphoto-success-box{background:#ecfdf5;border:1px solid #bbf7d0;color:#166534}
.idphoto-status-box{background:#eff6ff;border:1px solid #bfdbfe;color:#1e40af}

.idphoto-preset-grid{
    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap:9px;
}

.idphoto-preset-btn,
.idphoto-tool-btn,
.idphoto-bg-btn{
    border:1px solid #dbe3ef;
    background:#f8fafc;
    border-radius:15px;
    padding:13px 10px;
    cursor:pointer;
    transition:.18s;
    color:#0f172a;
}

.idphoto-preset-btn{text-align:left}
.idphoto-tool-btn,.idphoto-bg-btn{text-align:center}

.idphoto-preset-btn:hover,
.idphoto-tool-btn:hover,
.idphoto-bg-btn:hover{
    border-color:#93c5fd;
    background:#eff6ff;
}

.idphoto-preset-btn.active,
.idphoto-tool-btn.active,
.idphoto-bg-btn.active{
    border-color:#2563eb;
    background:#eff6ff;
    box-shadow:inset 0 0 0 1px #2563eb;
}

.idphoto-preset-btn strong,
.idphoto-tool-btn strong,
.idphoto-bg-btn strong{
    display:block;
    font-size:14px;
    margin-bottom:4px;
}

.idphoto-preset-btn span,
.idphoto-tool-btn span,
.idphoto-bg-btn span{
    display:block;
    font-size:12px;
    color:#64748b;
    line-height:1.45;
}

.idphoto-guide-box{
    background:#eff6ff;
    border:1px solid #bfdbfe;
    color:#1e40af;
    border-radius:16px;
    padding:13px 15px;
    font-size:14px;
    line-height:1.6;
    margin:12px 0 14px;
}

.idphoto-editor-board{
    display:grid;
    grid-template-columns:260px 1fr;
    gap:16px;
    align-items:stretch;
}

.idphoto-tool-panel{
    background:#f8fafc;
    border:1px solid #e2e8f0;
    border-radius:20px;
    padding:15px;
    display:flex;
    flex-direction:column;
    gap:14px;
}

.idphoto-tool-section{
    border-bottom:1px solid #e2e8f0;
    padding-bottom:14px;
}

.idphoto-tool-section.last{
    border-bottom:0;
    padding-bottom:0;
}

.idphoto-tool-title{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:8px;
    margin-bottom:10px;
}

.idphoto-tool-title strong{
    font-size:14px;
    color:#0f172a;
}

.idphoto-tool-title span{
    font-size:11px;
    color:#64748b;
}

.idphoto-field{
    display:flex;
    flex-direction:column;
    gap:7px;
    min-width:0;
}

.idphoto-field label{
    font-size:13px;
    font-weight:900;
    color:#334155;
}

.idphoto-field input[type="text"],
.idphoto-field select{
    height:44px;
    width:100%;
    border:1px solid #cbd5e1;
    border-radius:13px;
    padding:0 12px;
    font-size:14px;
    outline:none;
    background:#fff;
}

.idphoto-field input[type="text"]:focus,
.idphoto-field select:focus{
    border-color:#2563eb;
    box-shadow:0 0 0 3px rgba(37,99,235,.12);
}

.idphoto-range-row{
    display:flex;
    align-items:center;
    gap:9px;
    min-width:0;
}

.idphoto-range-row input[type="range"]{
    flex:1;
    min-width:0;
}

.idphoto-range-value{
    min-width:42px;
    text-align:right;
    font-weight:900;
    color:#2563eb;
    font-size:13px;
}

.idphoto-button-grid{
    display:grid;
    gap:8px;
    margin-top:12px;
}

.idphoto-button-grid.two{
    grid-template-columns:repeat(2,1fr);
}

.idphoto-bg-choice-row{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:8px;
}

.idphoto-bg-btn{
    padding:11px 6px;
}

.idphoto-bg-btn strong{font-size:12px}
.idphoto-bg-btn span{font-size:10px}

.idphoto-tool-row{
    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap:8px;
}

.idphoto-tool-btn{
    padding:12px 8px;
}

.idphoto-tool-btn strong{
    font-size:13px;
    margin-bottom:2px;
}

.idphoto-tool-btn span{font-size:11px}

.idphoto-compact-options{
    display:grid;
    grid-template-columns:1fr;
    gap:12px;
    margin-top:12px;
}

.idphoto-check-help{
    display:flex;
    align-items:center;
    gap:7px;
    margin-top:11px;
    font-size:12px;
    color:#64748b;
    line-height:1.5;
}

.idphoto-btn{
    border:0;
    border-radius:14px;
    padding:13px 16px;
    font-size:14px;
    font-weight:900;
    cursor:pointer;
    transition:.18s;
    white-space:nowrap;
}

.idphoto-btn.green{
    background:#16a34a;
    color:#fff;
}

.idphoto-btn.green:hover{background:#15803d}

.idphoto-btn.gray{
    background:#e2e8f0;
    color:#334155;
}

.idphoto-btn.gray:hover{background:#cbd5e1}

.idphoto-btn:disabled{
    background:#cbd5e1;
    color:#64748b;
    cursor:not-allowed;
}

.idphoto-preview-area{
    background:#f8fafc;
    border:1px solid #e2e8f0;
    border-radius:20px;
    padding:18px;
    min-height:520px;
    display:flex;
    align-items:center;
    justify-content:center;
}

.idphoto-preview-stage{
    width:100%;
    min-height:470px;
    display:flex;
    align-items:center;
    justify-content:center;
}

.idphoto-canvas-wrap{
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:14px;
    width:100%;
}

.idphoto-canvas-frame{
    background:
        linear-gradient(45deg,#e5e7eb 25%,transparent 25%),
        linear-gradient(-45deg,#e5e7eb 25%,transparent 25%),
        linear-gradient(45deg,transparent 75%,#e5e7eb 75%),
        linear-gradient(-45deg,transparent 75%,#e5e7eb 75%);
    background-size:22px 22px;
    background-position:0 0,0 11px,11px -11px,-11px 0;
    border-radius:16px;
    padding:18px;
    box-shadow:0 16px 36px rgba(15,23,42,.12);
}

#previewCanvas{
    display:block;
    max-width:100%;
    border-radius:8px;
    background:#fff;
    cursor:grab;
    touch-action:none;
}

#previewCanvas.dragging{cursor:grabbing}

.idphoto-frame-info{
    font-size:13px;
    color:#64748b;
    text-align:center;
    line-height:1.6;
}

.idphoto-empty-preview{
    width:100%;
    color:#94a3b8;
    font-size:15px;
    text-align:center;
    line-height:1.7;
}

.idphoto-save-panel{
    margin-top:16px;
    background:#f8fafc;
    border:1px solid #e2e8f0;
    border-radius:18px;
    padding:15px;
}

.idphoto-save-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    margin-bottom:12px;
}

.idphoto-save-head strong{
    font-size:15px;
    color:#0f172a;
}

.idphoto-save-head span{
    font-size:12px;
    color:#64748b;
}

.idphoto-save-grid{
    display:grid;
    grid-template-columns:130px 1fr 1.25fr;
    gap:12px;
    align-items:end;
}

.idphoto-summary-grid{
    display:grid;
    grid-template-columns:repeat(5,1fr);
    gap:10px;
    margin-top:14px;
}

.idphoto-summary-item{
    background:#fff;
    border:1px solid #e2e8f0;
    border-radius:15px;
    padding:13px;
    min-width:0;
}

.idphoto-summary-item span{
    display:block;
    font-size:12px;
    color:#64748b;
    margin-bottom:5px;
}

.idphoto-summary-item strong{
    display:block;
    font-size:15px;
    color:#0f172a;
    word-break:break-word;
}

.idphoto-action-row{
    display:flex;
    gap:10px;
    flex-wrap:wrap;
    margin-top:14px;
}

.idphoto-download-main{
    flex:1;
    min-width:220px;
}

@media (max-width:1100px){
    .idphoto-layout{grid-template-columns:1fr}
    .idphoto-work-card{position:static}
}

@media (max-width:900px){
    .idphoto-editor-board{grid-template-columns:1fr}
    .idphoto-preview-area{min-height:auto}
    .idphoto-preview-stage{min-height:420px}
    .idphoto-compact-options.two-line{grid-template-columns:1fr 1fr}
    .idphoto-save-grid{grid-template-columns:1fr 1fr}
    .idphoto-save-grid .file-name-field{grid-column:1 / -1}
    .idphoto-summary-grid{grid-template-columns:repeat(2,1fr)}
}

@media (max-width:760px){
    .idphoto-tool{padding:22px 12px 56px}
    .idphoto-hero{
        padding:26px 22px;
        border-radius:22px;
        flex-direction:column;
        align-items:flex-start;
        gap:18px;
    }
    .idphoto-hero h1{font-size:30px}
    .idphoto-hero-visual{
        width:100%;
        flex:auto;
        height:128px;
    }
    .idphoto-notice,
    .idphoto-privacy-note{display:block}
    .idphoto-notice strong,
    .idphoto-privacy-note strong{display:block;margin-bottom:4px}
    .idphoto-work-head{align-items:flex-start;flex-direction:column}
    .idphoto-key-hint{width:100%;text-align:center}
    .idphoto-preset-grid,
    .idphoto-bg-choice-row,
    .idphoto-tool-row,
    .idphoto-button-grid.two,
    .idphoto-compact-options.two-line,
    .idphoto-save-grid,
    .idphoto-summary-grid{
        grid-template-columns:1fr;
    }
    .idphoto-btn{width:100%}
    .idphoto-preview-stage{min-height:360px}
    .idphoto-canvas-frame{padding:14px}
    .idphoto-save-head{align-items:flex-start;flex-direction:column}
}
