/* ==========================================================
   Perfume Studio v1.0
   Part 1
   Reset / Variables / Layout
========================================================== */

/* ==========================================================
   Reset
========================================================== */

*,
*::before,
*::after{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

html{

    scroll-behavior:smooth;

}

body{

    font-family:
        "Pretendard",
        "Noto Sans KR",
        sans-serif;

    background:#F6F5F2;

    color:#2E2E2E;

    line-height:1.6;

}

/* ==========================================================
   Variables
========================================================== */

:root{

    --primary:#C9A66B;
    --primary-hover:#B89155;

    --background:#F6F5F2;

    --surface:#FFFFFF;

    --surface-alt:#FAFAF8;

    --border:#E6E2DA;

    --text:#2F2F2F;

    --subtext:#777777;

    --danger:#D56A6A;

    --radius:18px;

    --shadow:
        0 10px 30px rgba(0,0,0,.05);

}

/* ==========================================================
   App
========================================================== */

.app{

    max-width:1500px;

    margin:0 auto;

    padding:40px;

}

/* ==========================================================
   Header
========================================================== */

.app-header{

    display:flex;

    justify-content:space-between;

    align-items:center;

    margin-bottom:40px;

}

.header-content h1{

    font-size:2.5rem;

    font-weight:700;

    color:var(--text);

}

.header-content p{

    margin-top:8px;

    color:var(--subtext);

}

/* ==========================================================
   Library Button
========================================================== */

.library-link{

    text-decoration:none;

    background:var(--primary);

    color:white;

    padding:14px 22px;

    border-radius:12px;

    font-weight:600;

    transition:.25s;

}

.library-link:hover{

    background:var(--primary-hover);

    transform:translateY(-2px);

}

/* ==========================================================
   Layout
========================================================== */

.studio-layout{

    display:grid;

    grid-template-columns:

        minmax(0,1fr)

        minmax(0,1fr);

    gap:32px;

    align-items:start;

}

/* ==========================================================
   Editor
========================================================== */

.editor{

    display:flex;

    flex-direction:column;

    gap:28px;

}

/* ==========================================================
   Card
========================================================== */

.editor-card{

    background:var(--surface);

    border:1px solid var(--border);

    border-radius:var(--radius);

    padding:30px;

    box-shadow:var(--shadow);

}

.editor-card h2{

    font-size:1.35rem;

    margin-bottom:8px;

}

.editor-card>p{

    color:var(--subtext);

    margin-bottom:22px;

}

/* ==========================================================
   Field
========================================================== */

.field{

    width:100%;

    padding:14px 18px;

    margin-bottom:18px;

    border-radius:12px;

    border:1px solid var(--border);

    background:white;

    font-size:1rem;

    transition:.2s;

    outline:none;

}

.field:focus{

    border-color:var(--primary);

    box-shadow:

        0 0 0 4px rgba(201,166,107,.15);

}

.field-textarea{

    min-height:150px;

    resize:vertical;

}

/* ==========================================================
   Divider
========================================================== */

.divider{

    height:1px;

    background:var(--border);

    margin:28px 0;

}

/* ==========================================================
   Button
========================================================== */

.button{

    display:inline-flex;

    align-items:center;

    justify-content:center;

    gap:8px;

    border:none;

    border-radius:12px;

    cursor:pointer;

    transition:.25s;

    font-size:.95rem;

    font-weight:600;

    padding:12px 20px;

}

.button-primary{

    background:var(--primary);

    color:white;

}

.button-primary:hover{

    background:var(--primary-hover);

}

.button-secondary{

    background:#ECE8DF;

    color:#555;

}

.button-secondary:hover{

    background:#DFD9CD;

}

/* ==========================================================
   Utility
========================================================== */

.hidden{

    display:none !important;

}

.text-center{

    text-align:center;

}

.mt-20{

    margin-top:20px;

}

.mb-20{

    margin-bottom:20px;

}
/* ==========================================================
   Perfume Studio v1.0
   Part 2
   Builder
========================================================== */


/* ==========================================================
   Builder Section
========================================================== */

.builder-section{

    display:flex;

    flex-direction:column;

    gap:18px;

    padding:26px 0;

    border-top:1px solid var(--border);

}

.builder-section:first-of-type{

    border-top:none;

    padding-top:0;

}

.builder-header{

    display:flex;

    justify-content:space-between;

    align-items:flex-start;

    gap:20px;

}

.builder-header h3{

    font-size:1rem;

    font-weight:700;

    letter-spacing:.08em;

    color:var(--text);

}

.builder-header small{

    display:block;

    margin-top:6px;

    color:var(--subtext);

}


/* ==========================================================
   Add Button
========================================================== */

.builder-add{

    display:inline-flex;

    align-items:center;

    justify-content:center;

    gap:8px;

    padding:10px 18px;

    border:1px dashed var(--primary);

    border-radius:999px;

    background:#FFFDF8;

    color:#8C6A2E;

    cursor:pointer;

    font-size:.9rem;

    font-weight:600;

    transition:.25s;

}

.builder-add:hover{

    background:var(--primary);

    color:white;

    border-color:var(--primary);

    transform:translateY(-2px);

}


/* ==========================================================
   Tag Container
========================================================== */

.builder-tags{

    display:flex;

    flex-wrap:wrap;

    gap:12px;

    min-height:56px;

    padding:4px 0;

}


/* ==========================================================
   Note Chip
========================================================== */

.note-chip{

    display:inline-flex;

    align-items:center;

    gap:10px;

    padding:10px 16px;

    background:#FAF7F0;

    border:1px solid #E7DCC8;

    border-radius:999px;

    transition:.2s;

}

.note-chip:hover{

    background:#F5EFDF;

    border-color:#D8C49B;

}

.note-chip__icon{

    font-size:1rem;

}

.note-chip__name{

    font-size:.92rem;

    font-weight:600;

    color:#3A3A3A;

}


/* ==========================================================
   Remove Button
========================================================== */

.note-chip__remove{

    width:22px;

    height:22px;

    border:none;

    border-radius:50%;

    background:#D7C6A2;

    color:white;

    cursor:pointer;

    font-size:.8rem;

    line-height:22px;

    transition:.2s;

}

.note-chip__remove:hover{

    background:#B88E4A;

}


/* ==========================================================
   Empty Builder
========================================================== */

.builder-empty{

    display:flex;

    align-items:center;

    justify-content:center;

    min-height:56px;

    border:2px dashed var(--border);

    border-radius:14px;

    color:var(--subtext);

    font-size:.9rem;

    background:#FCFCFB;

}


/* ==========================================================
   Ingredient Counter
========================================================== */

.builder-count{

    display:inline-flex;

    align-items:center;

    justify-content:center;

    min-width:28px;

    height:28px;

    padding:0 10px;

    border-radius:999px;

    background:#EFE8D8;

    color:#7A5B2A;

    font-size:.8rem;

    font-weight:700;

}


/* ==========================================================
   Drag Placeholder
========================================================== */

.note-placeholder{

    width:120px;

    height:42px;

    border:2px dashed var(--primary);

    border-radius:999px;

    background:rgba(201,166,107,.08);

}


/* ==========================================================
   Animation
========================================================== */

.note-chip{

    animation:fadeUp .25s ease;

}

@keyframes fadeUp{

    from{

        opacity:0;

        transform:translateY(8px);

    }

    to{

        opacity:1;

        transform:translateY(0);

    }

}
/* ==========================================================
   Perfume Studio v1.0
   Part 3
   Preview / Footer / Responsive
========================================================== */


/* ==========================================================
   Preview Panel
========================================================== */

.preview-panel{

    position:sticky;

    top:24px;

}


#previewContainer{

    width:100%;

}
}

.preview-panel h2{

    font-size:1.4rem;

    font-weight:700;

}


/* ==========================================================
   Preview Card
========================================================== */

#previewContainer{

    background:#ffffff;

    border:1px solid var(--border);

    border-radius:24px;

    box-shadow:

        0 15px 40px rgba(0,0,0,.06);

    overflow:hidden;

}

/* ==========================================================
   Preview Body
========================================================== */

#preview{

   #preview{

    padding:

        24px 32px 36px;


    display:flex;

    flex-direction:column;

    gap:28px;

}

    display:flex;

    flex-direction:column;

    gap:28px;

}


/* ==========================================================
   Perfume Title
========================================================== */

.preview-title{

    text-align:center;

    padding-bottom:24px;

    border-bottom:1px solid var(--border);

}

.preview-title h2{

    font-size:2rem;

    margin-bottom:8px;

    color:var(--text);

}

.preview-title p{
 font-size:1rem;
    color:var(--subtext);

}


/* ==========================================================
   Preview Section
========================================================== */

.preview-section{

    display:flex;

    flex-direction:column;

    gap:14px;

}

.preview-section h3{

    font-size:1rem;

    font-weight:700;

    letter-spacing:.08em;

    color:var(--text);

}


/* ==========================================================
   Preview Tags
========================================================== */

.preview-tags{

    display:flex;

    flex-wrap:wrap;

    gap:10px;

}


/* ==========================================================
   Preview Chip
========================================================== */

.preview-chip{

   <strong> display:flex;

    align-items:center;

    gap:8px;

    padding:10px 16px;

    background:#F7F4ED;

    border:1px solid #E5DAC4;

    border-radius:999px;

    font-size:.9rem;

    font-weight:600;

    color:#5C4722;</strong>

}


/* ==========================================================
   Story
========================================================== */

.preview-story{

   padding:22px;


    border-radius:18px;


    background:#FCFAF5;


    border:

        1px solid #EDE2CE;


    line-height:1.9;


    color:#555;


    font-size:.95rem;
}


/* ==========================================================
   Empty Preview
========================================================== */

.preview-empty{

    display:flex;

    flex-direction:column;

    justify-content:center;

    align-items:center;

    min-height:520px;

    text-align:center;

    color:var(--subtext);

    padding:40px;

}

.preview-empty h3{

    margin-bottom:12px;

    font-size:1.5rem;

}

.preview-empty p{

    max-width:280px;

}


/* ==========================================================
   Footer
========================================================== */

.app-footer{

    margin-top:60px;

    padding:24px;

    text-align:center;

    color:var(--subtext);

    border-top:1px solid var(--border);

}


/* ==========================================================
   Scrollbar
========================================================== */

::-webkit-scrollbar{

    width:10px;

}

::-webkit-scrollbar-track{

    background:#EFEFEF;

}

::-webkit-scrollbar-thumb{

    background:#C9C9C9;

    border-radius:999px;

}

::-webkit-scrollbar-thumb:hover{

    background:#AFAFAF;

}


/* ==========================================================
   Responsive
========================================================== */

@media (max-width:1200px){

    .studio-layout{

        grid-template-columns:1fr;

    }

    .preview-panel{

        position:static;

    }

}


@media (max-width:768px){

    .app{

        padding:20px;

    }

    .app-header{

        flex-direction:column;

        align-items:flex-start;

        gap:20px;

    }

    .builder-header{

        flex-direction:column;

        align-items:flex-start;

    }

    .library-link{

        width:100%;

        text-align:center;

    }

    .preview-title h2{

        font-size:1.6rem;

    }

}
/* ==========================================================
   Preview Header
========================================================== */


.preview-header{

    display:flex;

    justify-content:space-between;

    align-items:center;

    margin-bottom:16px;

}


.preview-header h2{

    font-size:1.4rem;

    font-weight:700;

}
/* ==========================================================
   Preview Brand
========================================================== */


.preview-brand{

    text-align:center;

    padding:24px 0 18px;

    font-size:.7rem;

    letter-spacing:.45em;

    color:var(--theme-brand,#b89155);

    font-weight:700;

}
/* ==========================================================
   Perfume Studio Luxury Theme
   Override
========================================================== */


/* =========================
   Global spacing
========================= */

.app{

    max-width:1400px;

    margin:0 auto;

    padding:40px 60px;

}



.studio-layout{

    gap:48px;

    align-items:start;

}


/* =========================
   Editor Cards
========================= */


.editor-card{

    background:

        rgba(255,255,255,.85);


    border:

        1px solid #eee2cf;


    border-radius:24px;


    padding:32px;


    box-shadow:

        0 12px 35px rgba(80,60,30,.06);


    margin-bottom:28px;

}


.editor-card h2{

    font-family:

        "Noto Serif KR",
        serif;


    font-size:1.25rem;


    color:#3b3328;


    margin-bottom:18px;

}



/* =========================
   Inputs
========================= */


.field{


    height:42px;


    border-radius:12px;


    border:1px solid #e6dccb;


    background:#fffdf9;


    padding:0 16px;


    font-size:.9rem;


}



.field:focus{


    outline:none;


    border-color:#c9a15a;


    box-shadow:

        0 0 0 3px rgba(201,161,90,.15);

}



.field-textarea{

    min-height:120px;

    padding-top:14px;

}



/* =========================
   Preview Panel
========================= */


.preview-panel{


    position:sticky;


    top:30px;


}



.preview-header{


    display:flex;


    justify-content:space-between;


    align-items:center;


    margin-bottom:22px;

}



.preview-header h2{


    font-family:

        "Noto Serif KR",
        serif;


    font-size:1.25rem;


}



/* =========================
   Header Actions
========================= */


.preview-header-actions{


    display:flex;


    align-items:center;


    gap:10px;

}



/* =========================
   Save Button
========================= */


#savePreviewPNG{


    background:#c9a15a;


    color:white;


    border:none;


    border-radius:12px;


    padding:

        10px 18px;


    font-size:.8rem;


    font-weight:600;


}



#savePreviewPNG:hover{


    background:#b58b43;


}



/* =========================
   Reset Button
========================= */


#resetAllButton{


    background:#F3E9E7;


    color:#a14b3f;


    border:none;


    border-radius:12px;


    padding:
        10px 18px;


    font-size:.8rem;


    font-weight:600;

}


#resetAllButton:hover{


    background:#e9d3cf;


}


/* =========================
   Preview Card
========================= */


#previewContainer{


    background:#fff;


    border:

        1px solid var(--theme-container-border, #eadcc3);


    border-radius:32px;


    padding:0;


    overflow:hidden;


    box-shadow:

        0 20px 60px rgba(70,50,20,.10);


}



.preview-brand{


    text-align:center;


    padding:

        28px 0 20px;


    color:var(--theme-brand,#b89155);


    font-size:.65rem;


    letter-spacing:.5em;


    font-weight:700;

}



#preview{


    padding:

        10px 38px 40px;


}



/* =========================
   Preview Title
========================= */


.preview-title{


    text-align:center;


    font-family:

        "Noto Serif KR",
        serif;


    font-size:1.8rem;


    color:#332b22;


    margin-bottom:8px;


}



.preview-subtitle{


    text-align:center;


    color:#999;


    font-size:.85rem;


}



/* =========================
   Note Sections
========================= */


.preview-section{


    padding:

        24px 0;


    border-bottom:

        1px solid #eee5d8;

}



.preview-section h3{


    font-size:.78rem;


    letter-spacing:.15em;


    color:#4b4033;


    margin-bottom:16px;


}



/* =========================
   Note Chip
========================= */


.preview-chip{


    display:inline-flex;


    align-items:center;


    gap:6px;


    padding:

        6px 12px;


    border-radius:999px;


    background:var(--theme-chip-bg,#faf4e8);


    border:

        1px solid var(--theme-chip-border,#ead8b7);


    color:var(--theme-chip-text,#665032);


    font-size:.72rem;


    font-weight:600;

}



/* =========================
   Empty Note
========================= */


.preview-empty{


    width:34px;


    height:34px;


    display:flex;


    align-items:center;


    justify-content:center;


    border-radius:50%;


    background:#fbf7ef;


    border:

        1px solid #eadcc5;


    color:#b7a78d;


}



/* =========================
   Story
========================= */


.preview-story{


    margin-top:22px;


    padding:18px;


    border-radius:16px;


    background:#fcfaf5;


    border:

        1px solid #eee2cd;


    color:#665;


    font-size:.85rem;


    line-height:1.8;

}
}
#preview.exporting{


    width:420px;


    background:white;


    padding-bottom:30px;


}
/* ==========================================================
   Note Chip Remove Button
========================================================== */


.note-chip{

    display:inline-flex;

    align-items:center;

    gap:8px;

    padding:

        6px 10px 6px 12px;

    border-radius:999px;

    background:#faf4e8;

    border:

        1px solid #ead8b7;

    color:#665032;

    font-size:.72rem;

    font-weight:600;

}



/* 삭제 버튼 */

.remove-note{


    width:18px;

    height:18px;


    display:flex;

    align-items:center;

    justify-content:center;


    padding:0;


    border-radius:50%;


    border:

        1px solid transparent;


    background:transparent;


    color:#b9a487;


    font-size:12px;


    line-height:1;


    cursor:pointer;


    transition:.2s ease;


}



/* 마우스 올렸을 때 */

.remove-note:hover{


    background:#ead8b7;


    color:#fff;


    border-color:#d3b27b;


}
/* ==========================================================
   PNG Export Mode
========================================================== */


#previewContainer.exporting{


    box-shadow:none;


    border-radius:0;


}



#previewContainer.exporting #preview{


    padding:

        40px;


}


/* ==========================================================
   Perfume Studio
   New Preview Layout (banner / two-column body / footer brand)
========================================================== */

#preview{

    padding:0 0 28px;

}

/* ---- Theme Banner ---- */

.preview-banner{

    position:relative;

    min-height:240px;

    display:flex;

    align-items:flex-end;

    background:linear-gradient(135deg,var(--theme-banner-from,#f8efdc),var(--theme-banner-to,#ecdcb8));

    background-size:cover;

    background-position:center;

}

.preview-banner-overlay{

    position:relative;

    width:100%;

    padding:20px 32px;

}

.preview-perfume-name{

    font-family:"Noto Serif KR",serif;

    font-size:1.6rem;

    font-weight:700;

    color:var(--theme-title-dark,#4b3c22);

}

.preview-banner.has-image{

    background-color:#000;

}

.preview-banner.has-image::before{

    content:"";

    position:absolute;

    inset:0;

    background:linear-gradient(to top,rgba(0,0,0,.65),rgba(0,0,0,0) 70%);

    pointer-events:none;

}

.preview-banner.has-image .preview-perfume-name{

    color:#fff;

}

/* ---- Body: two columns ---- */

.preview-body{

    display:grid;

    grid-template-columns:36% 1px 1fr;

    gap:24px;

    padding:24px 32px 0;

}

.preview-divider{

    background:var(--theme-divider,#eadcc3);

}

/* ---- Left column ---- */

.preview-left{

    display:flex;

    flex-direction:column;

    gap:10px;

}

.preview-character-photo{

    width:100%;

    aspect-ratio:1/1;

    border-radius:16px;

    background:var(--theme-photo-bg,#faf4e8);

    border:1px solid var(--theme-photo-border,#ead8b7);

    background-size:cover;

    background-position:center;

    display:flex;

    align-items:center;

    justify-content:center;

    font-size:2rem;

    color:var(--theme-photo-icon,#c9b183);

}

.preview-character-photo.has-image{

    font-size:0;

}

.preview-character-name{

    font-family:"Noto Serif KR",serif;

    font-size:1.3rem;

    color:var(--theme-title-dark,#332b22);

    margin-top:6px;

}

.preview-character-title{

    color:#999;

    font-size:.82rem;

}

.preview-classification{

    margin-top:2px;

}

.preview-description{

    color:#666;

    font-size:.85rem;

    line-height:1.75;

    margin-top:4px;

}

/* ---- Right column ---- */

.preview-right{

    display:flex;

    flex-direction:column;

    gap:22px;

}

.preview-note-block h4{

    font-size:.78rem;

    letter-spacing:.15em;

    color:var(--theme-section-label,#4b4033);

    margin-bottom:10px;

}

.preview-note-desc{

    margin-top:10px;

    color:#777;

    font-size:.82rem;

    line-height:1.7;

}

/* ---- Footer brand ---- */

.preview-brand{

    border-top:1px solid var(--border);

    margin-top:24px;

}

/* ---- Image Upload (editor) ---- */

.image-upload-row{

    display:flex;

    flex-wrap:wrap;

    gap:24px;

}

.image-upload-field{

    display:flex;

    flex-direction:column;

    gap:8px;

    flex:1;

    min-width:160px;

}

.image-upload-label{

    font-size:.85rem;

    font-weight:600;

    color:var(--text);

}

.image-upload-thumb{

    width:100%;

    max-width:180px;

    aspect-ratio:1/1;

    object-fit:cover;

    border-radius:12px;

    border:1px solid var(--border);

}

.image-upload-remove{

    align-self:flex-start;

    padding:8px 14px;

    font-size:.8rem;

}

.note-desc-field{

    min-height:80px;

}

/* ---- Preview Theme Picker ---- */

.theme-picker{

    margin-top:20px;

    padding:22px 24px;

    background:var(--surface);

    border:1px solid var(--border);

    border-radius:var(--radius);

    box-shadow:var(--shadow);

}

.theme-picker h3{

    font-family:"Noto Serif KR",serif;

    font-size:1rem;

    color:#3b3328;

    margin-bottom:14px;

}

.theme-presets{

    display:flex;

    flex-direction:column;

    gap:12px;

    margin-bottom:16px;

}

.theme-preset-group{

    display:flex;

    align-items:center;

    gap:10px;

    flex-wrap:wrap;

}

.theme-preset-label{

    width:52px;

    flex-shrink:0;

    font-size:.75rem;

    font-weight:600;

    color:var(--subtext);

}

.theme-preset-row{

    display:flex;

    flex-wrap:wrap;

    gap:10px;

}

.theme-swatch{

    width:32px;

    height:32px;

    border-radius:50%;

    border:2px solid var(--surface);

    outline:1px solid var(--border);

    cursor:pointer;

    transition:.2s;

}

.theme-swatch:hover{

    transform:translateY(-2px);

}

.theme-swatch.active{

    outline:2px solid var(--primary);

    outline-offset:2px;

}

.theme-custom{

    display:flex;

    align-items:center;

    gap:10px;

}

.theme-color-input{

    width:42px;

    height:42px;

    padding:2px;

    border:1px solid var(--border);

    border-radius:10px;

    background:white;

    cursor:pointer;

}

.theme-hex-input{

    flex:1;

    margin-bottom:0;

    text-transform:uppercase;

    font-family:monospace;

}

@media (max-width:768px){

    .preview-body{

        grid-template-columns:1fr;

    }

    .preview-divider{

        display:none;

    }

}
