:root{
  --bg:#f4f1ec;
  --panel:#ffffff;
  --text:#242321;
  --muted:#77736c;
  --line:#e5dfd5;
  --accent:#1f1f1d;
  --accent2:#b57742;
  --shadow:0 18px 45px rgba(0,0,0,.12);
  --pf-frame-drop-shadow:
    0 3px 5px rgba(0,0,0,.40),
    4px 10px 10px rgba(0,0,0,.30);
  --radius:18px;
}

*{box-sizing:border-box}
html,body{margin:0}
body{
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans KR",Arial,sans-serif;
  background:#fff;
  color:var(--text);
  overflow:hidden;
}

button,input,textarea{font:inherit}
button{cursor:pointer}

.topbar{
  max-width:1500px;
  min-height:118px;
  margin:0 auto;
  padding:20px 28px 16px;
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:20px;
}
.eyebrow{
  margin:0 0 7px;
  color:#9a5b2f;
  font-size:13px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
}
h1{
  margin:0;
  font-size:clamp(25px,2.8vw,40px);
  letter-spacing:-.04em;
}
.brand-home-link{
  display:inline-block;
  color:inherit;
  text-decoration:none;
}
.brand-home-link:focus-visible{
  outline:2px solid currentColor;
  outline-offset:4px;
  border-radius:2px;
}
.lead{
  margin:8px 0 0;
  color:var(--muted);
  font-size:14px;
  line-height:1.5;
}
.top-actions{display:flex;gap:8px;white-space:nowrap;flex-wrap:wrap;justify-content:flex-end}
.primary,.ghost,.view-btn,.spec-toggle{
  border:1px solid var(--line);
  border-radius:999px;
  padding:10px 14px;
  background:#fff;
  color:var(--text);
}
.primary{
  background:var(--accent);
  color:#fff;
  border-color:var(--accent);
}
.ghost:hover,.view-btn:hover,.spec-toggle:hover{background:#f7f4ef}
.wide{width:100%;justify-content:center}

.app{
  max-width:1500px;
  height:calc(100vh - 118px);
  margin:0 auto;
  padding:0 28px 28px;
  display:grid;
  grid-template-columns:390px minmax(0,1fr);
  gap:22px;
  overflow:hidden;
}

.panel{
  height:100%;
  overflow-y:auto;
  overscroll-behavior:contain;
  padding-right:6px;
  display:flex;
  flex-direction:column;
  gap:16px;
}
.panel::-webkit-scrollbar{width:8px}
.panel::-webkit-scrollbar-track{background:transparent}
.panel::-webkit-scrollbar-thumb{background:#c9c0b3;border-radius:999px}

.card{
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:0 4px 18px rgba(0,0,0,.04);
  padding:18px;
}

.section-title{
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom:14px;
}
.section-title span{
  width:26px;height:26px;
  border-radius:50%;
  background:#1f1f1d;
  color:#fff;
  display:grid;
  place-items:center;
  font-size:13px;
  font-weight:800;
}
.section-title h2{
  margin:0;
  font-size:18px;
  letter-spacing:-.03em;
}

.section-title-with-action{
  justify-content:space-between;
  gap:12px;
}
.section-title-main{
  display:flex;
  align-items:center;
  gap:10px;
}
.section-action-btn{
  border:1px solid #1f1f1d;
  background:#1f1f1d;
  color:#fff;
  border-radius:999px;
  padding:8px 13px;
  font-size:12px;
  font-weight:850;
  cursor:pointer;
  white-space:nowrap;
}
.section-action-btn[hidden]{display:none}

.sample-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:8px;
  margin-bottom:12px;
}
.sample-btn,.bg-btn,.color-btn{
  border:1px solid var(--line);
  background:#fff;
  border-radius:13px;
  overflow:hidden;
  padding:0;
  text-align:left;
}
.sample-btn.active,.bg-btn.active,.color-btn.active{
  outline:3px solid #1f1f1d;
  outline-offset:1px;
}
.sample-btn img{
  width:100%;
  aspect-ratio:1/1;
  object-fit:cover;
  display:block;
}
.sample-btn span,.bg-btn span{
  display:block;
  padding:7px 8px;
  font-size:12px;
  font-weight:700;
}

.upload-box{
  display:flex;
  flex-direction:column;
  gap:4px;
  border:1px dashed #bcb4a7;
  background:#faf7f1;
  border-radius:14px;
  padding:13px;
  margin:10px 0 13px;
  cursor:pointer;
}
.upload-box input{display:none}
.upload-box small{color:var(--muted)}
.bg-upload-box{margin:12px 0 14px}
.space-background-actions{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:7px;
  margin:-6px 0 14px;
}
.space-background-actions[hidden]{display:none}
.space-background-actions button{
  min-width:0;
  padding:8px 6px;
  font-size:11px;
  line-height:1.25;
}

.form-row{margin:12px 0}
.form-row.two{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}
.form-row label{
  display:block;
  font-size:13px;
  color:var(--muted);
  position:relative;
}
.form-row input[type="text"],
.form-row input[type="email"],
.form-row input[type="tel"],
.form-row input[type="number"]{
  width:100%;
  margin-top:6px;
  border:1px solid var(--line);
  border-radius:12px;
  padding:12px 40px 12px 12px;
}
.form-row em{
  position:absolute;
  right:12px;
  bottom:12px;
  font-style:normal;
  color:#9c958d;
}
.form-row input[type="range"]{width:100%; margin-top:9px}
.form-row strong{float:right; color:var(--text)}

.quick-size{
  display:flex;
  flex-direction:column;
  gap:7px;
}
.quick-size-row{
  display:flex;
  flex-wrap:wrap;
  gap:7px;
}
.quick-size button{
  border:1px solid var(--line);
  background:#fff;
  border-radius:999px;
  padding:8px 11px;
  font-size:13px;
}
.quick-size-action-row button{
  width:auto;
}
.quick-size-full-row{
  margin-top:2px;
}
.quick-size-full-row .frame-size-open-btn{
  width:100%;
  border-color:#1f1f1d;
  background:#1f1f1d;
  color:#fff;
  font-weight:850;
}
.quick-size-full-row .frame-size-open-btn:hover{
  background:#3a3935;
}
.quick-size button.active{
  background:#1f1f1d;
  color:#fff;
  border-color:#1f1f1d;
}
.quick-size button.size-custom:not(.active){
  border-color:#d7a96e;
  background:#fff8ec;
  color:#865100;
}
.quick-size button.size-unavailable{
  opacity:.34;
  cursor:not-allowed;
}
.frame-size-status{
  min-height:0;
  margin:4px 0 10px;
  padding:8px 10px;
  border:1px solid #d9e9de;
  border-radius:11px;
  background:#f4fbf6;
  color:#24603a;
  font-size:12px;
  line-height:1.45;
}
.frame-size-status:empty{display:none}
.frame-size-status.is-custom{
  border-color:#efd4ad;
  background:#fff8ec;
  color:#80511d;
}
.frame-size-status.is-unavailable{
  border-color:#efc4bc;
  background:#fff3f1;
  color:#9a3528;
}
.frame-size-status.is-unknown{
  border-color:#ddd8d0;
  background:#f8f6f2;
  color:#6d675f;
}
.hint{
  color:var(--muted);
  font-size:12px;
  line-height:1.45;
  margin:7px 0 0;
}
.email-note{margin-top:6px}
.memo-label{display:block;font-size:13px;color:var(--muted);margin-bottom:7px}
.memo-input{
  width:100%;
  min-height:92px;
  resize:vertical;
  border:1px solid var(--line);
  border-radius:14px;
  padding:12px;
  line-height:1.5;
}

.bg-grid{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:8px;
}
.bg-btn img{
  width:100%;
  aspect-ratio:4/3;
  object-fit:cover;
  display:block;
}

.color-group-title{
  margin:16px 0 8px;
  font-size:14px;
  font-weight:900;
}
.color-group-title:first-child{margin-top:0}
.color-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:8px;
}
.color-btn img{
  width:100%;
  aspect-ratio:1.35/1;
  object-fit:cover;
  display:block;
}
.color-btn span{
  display:block;
  padding:6px 7px;
  font-size:11px;
  font-weight:800;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.preview-area{
  min-width:0;
  height:100%;
  overflow:hidden;
  display:flex;
  flex-direction:column;
}
.view-toolbar{
  background:#fff;
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:10px 12px;
  margin-bottom:12px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:14px;
  flex:0 0 auto;
}
.view-toolbar>div{display:flex;gap:8px;flex-wrap:wrap}
.view-btn{
  padding:8px 12px;
  line-height:1.1;
}
.view-btn.active{
  background:#1f1f1d;
  color:#fff;
  border-color:#1f1f1d;
}
#viewNotice{
  margin:0;
  color:var(--muted);
  font-size:13px;
  text-align:right;
}

.stage-wrap{
  background:#1b1a18;
  border-radius:22px;
  overflow:hidden;
  box-shadow:var(--shadow);
  position:relative;
  width:100%;
  aspect-ratio:4/3;
  max-height:calc(100vh - 220px);
  flex:0 1 auto;
  user-select:none;
}
.stage{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  z-index:1;
  transform-origin:50% 50%;
  transition:transform .45s cubic-bezier(.2,.85,.2,1), transform-origin .45s cubic-bezier(.2,.85,.2,1);
}
.bg-image{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center;
  display:block;
  transform-origin:50% 50%;
  transition:transform .25s ease;
}
.frame-box{
  position:absolute;
  left:50%;
  top:43%;
  transform:translate(-50%,-50%);
  box-sizing:border-box;
  border-style:solid;
  border-color:var(--frame-color,#111);
  background:#fff;
  overflow:hidden;
  cursor:grab;
  box-shadow:
    var(--pf-frame-drop-shadow),
    inset 0 1px 0 rgba(255,255,255,.26),
    inset 0 -1px 0 rgba(0,0,0,.24);
}
.frame-box:active{cursor:grabbing}
.frame-box::before{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background:linear-gradient(135deg, rgba(255,255,255,.08), rgba(255,255,255,0) 38%, rgba(0,0,0,.10));
  z-index:1;
}
.art-image{
  position:relative;
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  background:#eee;
}
.glass{
  position:absolute;
  inset:0;
  pointer-events:none;
  z-index:2;
  background:
    linear-gradient(135deg, rgba(255,255,255,.16) 0%, rgba(255,255,255,0) 26%),
    linear-gradient(25deg, rgba(255,255,255,0) 68%, rgba(255,255,255,.08) 73%, rgba(255,255,255,0) 77%);
  opacity:.55;
}

.seller-price-status{
  position:absolute;
  right:18px;
  top:18px;
  z-index:21;
  max-width:min(380px,calc(100% - 36px));
  padding:11px 15px;
  border:1px solid rgba(255,255,255,.62);
  border-radius:999px;
  background:rgba(255,255,255,.88);
  color:#145b32;
  box-shadow:0 10px 28px rgba(0,0,0,.17);
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
  font-size:14px;
  font-weight:900;
}
.seller-price-status[hidden]{display:none}
.seller-price-status.is-unavailable{color:#865100;background:rgba(255,247,232,.90)}
.seller-price-status.is-custom{color:#865100;background:rgba(255,247,232,.94)}

.spec-overlay{
  position:absolute;
  right:18px;
  bottom:18px;
  z-index:20;
  width:min(380px, calc(100% - 36px));
  background:rgba(255,255,255,.56);
  border:1px solid rgba(255,255,255,.55);
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
  border-radius:18px;
  padding:12px 14px 14px;
  box-shadow:0 14px 35px rgba(0,0,0,.16);
  transition:background .25s ease, opacity .25s ease, width .25s ease;
}
.spec-overlay:hover{background:rgba(255,255,255,.82)}
.spec-head{display:flex;align-items:center;justify-content:space-between;gap:10px}
.spec-head h3{margin:0;font-size:15px}
.spec-toggle{
  width:34px;height:34px;padding:0;border-radius:50%;
  display:grid;place-items:center;font-size:18px;line-height:1;
  background:rgba(255,255,255,.72)
}
.spec-body{margin-top:10px}
.spec-overlay dl{
  display:grid;
  grid-template-columns:86px 1fr;
  gap:6px 10px;
  margin:0;
  font-size:13px;
}
.spec-overlay dt{color:rgba(36,35,33,.66)}
.spec-overlay dd{margin:0;font-weight:900}
.warning{
  margin:10px 0 0;
  padding:9px;
  border-radius:12px;
  background:rgba(255,247,232,.68);
  color:#725126;
  font-size:12px;
  line-height:1.35;
}
.spec-overlay.collapsed{
  width:auto;
  min-width:0;
  padding:10px 12px;
}
.spec-overlay.collapsed .spec-body{display:none}
.spec-overlay.collapsed .spec-head h3{font-size:14px}

.footer{display:none}

.gallery-store-modal{
  position:fixed;
  inset:0;
  z-index:5000;
  display:grid;
  place-items:center;
  padding:20px;
  background:rgba(22,20,18,.52);
}
.gallery-store-modal[hidden]{display:none}
.gallery-store-dialog{
  width:min(600px,100%);
  border:1px solid var(--line);
  border-radius:20px;
  background:#fff;
  padding:22px;
  box-shadow:0 24px 70px rgba(0,0,0,.26);
}
.gallery-store-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
}
.gallery-store-head strong{font-size:21px}
.gallery-store-head p{margin:6px 0 0;color:var(--muted);font-size:13px;line-height:1.5}
.gallery-name-field{display:block;margin-top:20px;color:var(--muted);font-size:13px;font-weight:750}
.gallery-name-field input{
  width:100%;
  margin-top:7px;
  border:1px solid var(--line);
  border-radius:12px;
  padding:12px;
}
.gallery-store-summary{
  margin-top:12px;
  padding:12px 14px;
  border-radius:12px;
  background:#f7f4ef;
  color:#4e4942;
  font-size:13px;
  line-height:1.6;
}
.gallery-store-status{min-height:20px;margin:10px 0 0;color:var(--muted);font-size:12px}
.gallery-store-status.error{color:#a33a28;font-weight:750}
.gallery-store-status.success{color:#246b38;font-weight:750}
.gallery-store-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:14px;flex-wrap:wrap}

@media (max-width: 980px){
  body{overflow:auto}
  .topbar{
    min-height:auto;
    display:block;
    padding:18px 16px 12px;
  }
  .top-actions{margin-top:12px;justify-content:flex-start}
  .top-actions button{padding:8px 12px;font-size:13px}
  .app{
    height:auto;
    grid-template-columns:1fr;
    padding:0 16px 24px;
    overflow:visible;
  }
  .panel{
    order:2;
    height:auto;
    overflow:visible;
    padding-right:0;
  }
  .preview-area{
    order:1;
    height:auto;
    overflow:visible;
    position:sticky;
    top:0;
    z-index:10;
    background:var(--bg);
    padding-bottom:12px;
  }
  .view-toolbar{padding:8px 10px; margin-bottom:10px}
  .view-btn{padding:6px 10px; font-size:13px}
  .stage-wrap{max-height:none}
  #viewNotice{text-align:left;margin-top:8px;font-size:12px}
  .spec-overlay{
    right:10px;
    bottom:10px;
    padding:10px 11px 11px;
    width:min(270px, calc(100% - 20px));
  }
  .spec-overlay.collapsed{width:auto;padding:8px 10px}
  .spec-toggle{width:30px;height:30px;font-size:16px}
}

.send-status{
  margin:10px 0 0;
  min-height:20px;
  font-size:13px;
  line-height:1.45;
  color:var(--muted);
}
.send-status.success{color:#246b38;font-weight:800}
.send-status.error{color:#a33a28;font-weight:800}
button.loading{opacity:.65;pointer-events:none}

.solid-bg-panel{
  border:1px solid var(--line);
  background:#fff;
  border-radius:16px;
  padding:12px;
  margin:12px 0 14px;
}
.solid-bg-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
}
.color-picker-label{
  display:flex;
  align-items:center;
  gap:8px;
  font-size:12px;
  font-weight:800;
  color:var(--muted);
}
.color-picker-label input[type="color"]{
  appearance:none;
  width:42px;
  height:32px;
  border:1px solid var(--line);
  border-radius:10px;
  padding:2px;
  background:#fff;
  cursor:pointer;
}
.color-picker-label input[type="color"]::-webkit-color-swatch-wrapper{padding:0}
.color-picker-label input[type="color"]::-webkit-color-swatch{border:0;border-radius:8px}
.texture-row{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:7px;
}
.texture-row button{
  padding:8px 9px;
  font-size:12px;
  font-weight:800;
  border-radius:999px;
}
.texture-row button.active{
  background:#1f1f1d;
  color:#fff;
  border-color:#1f1f1d;
}
.stage{
  --solid-bg-color:#eee8dd;
  --texture-opacity:.42;
  background:var(--solid-bg-color);
}
.stage.solid-bg::before{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  z-index:0;
  opacity:var(--texture-opacity);
}
.stage.solid-bg.texture-none::before{
  opacity:0;
}
.stage.solid-bg.texture-wallpaper::before{
  background:
    radial-gradient(circle at 18% 20%, rgba(255,255,255,.25), rgba(255,255,255,0) 20%),
    radial-gradient(circle at 76% 72%, rgba(0,0,0,.08), rgba(0,0,0,0) 24%),
    repeating-linear-gradient(90deg, rgba(255,255,255,.10) 0 1px, rgba(0,0,0,.035) 1px 2px, transparent 2px 7px),
    repeating-linear-gradient(0deg, rgba(255,255,255,.06) 0 1px, transparent 1px 6px);
}
.stage.solid-bg.texture-paper::before{
  background:
    repeating-linear-gradient(12deg, rgba(255,255,255,.13) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(88deg, rgba(0,0,0,.045) 0 1px, transparent 1px 5px),
    radial-gradient(circle at 35% 45%, rgba(255,255,255,.18), rgba(255,255,255,0) 28%);
}
.stage.solid-bg.texture-concrete::before{
  background:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,.18), rgba(255,255,255,0) 26%),
    radial-gradient(circle at 78% 25%, rgba(0,0,0,.09), rgba(0,0,0,0) 30%),
    radial-gradient(circle at 60% 82%, rgba(0,0,0,.07), rgba(0,0,0,0) 32%),
    repeating-linear-gradient(135deg, rgba(255,255,255,.05) 0 2px, rgba(0,0,0,.035) 2px 3px, transparent 3px 9px);
}
.bg-image{z-index:0}
.frame-box{z-index:2}

.eyebrow:empty{display:none}

.texture-strength{
  margin-top:10px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.texture-strength>span{
  font-size:12px;
  font-weight:900;
  color:var(--muted);
}
.strength-row{
  display:flex;
  gap:6px;
}
.strength-row button{
  padding:7px 11px;
  font-size:12px;
  font-weight:900;
  border-radius:999px;
}
.strength-row button.active{
  background:#1f1f1d;
  color:#fff;
  border-color:#1f1f1d;
}

.stage.solid-bg::before{display:none}
.texture-image{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center;
  display:none;
  pointer-events:none;
  z-index:1;
  transform-origin:50% 50%;
  transition:transform .25s ease;
}
.stage.solid-bg .texture-image{display:block}
.stage.solid-bg.texture-none .texture-image{display:none}
.frame-box{z-index:3}

.stage{
  --texture-strength:.6;
}
.texture-image{
  opacity:var(--texture-strength);
}




.save-guide-card{
  border-color:#e7e2da;
}
.save-guide-main{
  margin:0 0 8px;
  padding:13px 14px;
  border-radius:14px;
  background:#f7f4ee;
  color:#2b2925;
  font-size:14px;
  font-weight:850;
  line-height:1.55;
}


.mat-toggle,
.mat-width-row{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
.mat-toggle button,
.mat-width-row button{
  border:1px solid var(--line);
  background:#fff;
  border-radius:999px;
  padding:8px 12px;
  font-size:13px;
  font-weight:850;
}
.mat-toggle button.active,
.mat-width-row button.active{
  background:#1f1f1d;
  border-color:#1f1f1d;
  color:#fff;
}
.mat-options{
  margin-top:13px;
  padding-top:13px;
  border-top:1px solid var(--line);
  opacity:.42;
  pointer-events:none;
}
.mat-card.mat-on .mat-options{
  opacity:1;
  pointer-events:auto;
}
.mat-option-title{
  margin:0 0 8px;
  font-size:12px;
  font-weight:900;
  color:var(--muted);
}
.mat-option-title:not(:first-child){margin-top:13px}
.mat-color-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:7px;
}
.mat-color-grid button{
  display:flex;
  align-items:center;
  gap:8px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#fff;
  padding:8px 9px;
  font-size:12px;
  font-weight:850;
  text-align:left;
}
.mat-color-grid button span{
  width:20px;
  height:20px;
  border-radius:50%;
  background:var(--mat-swatch);
  border:1px solid rgba(0,0,0,.18);
  box-shadow:inset 0 1px 1px rgba(255,255,255,.38);
  flex:0 0 20px;
}
.mat-color-grid button.active{
  border-color:#1f1f1d;
  box-shadow:0 0 0 2px rgba(31,31,29,.08);
}
.mat-area{
  position:relative;
  width:100%;
  height:100%;
  background:#fff;
  overflow:hidden;
}
.art-window{
  position:absolute;
  left:50%;
  top:50%;
  transform:translate(-50%,-50%);
  overflow:hidden;
  background:#eee;
}
.frame-box:not(.mat-on) .mat-area{
  background:#fff;
}
.frame-box:not(.mat-on) .art-window{
  inset:0;
  width:100%;
  height:100%;
  transform:none;
}
.frame-box:not(.mat-on) .art-image{
  position:relative;
  width:100%;
  height:100%;
  left:auto;
  top:auto;
  transform:none;
}
.frame-box.mat-on .mat-area{
  background:var(--mat-color,#eee6d6);
}
.frame-box.mat-on .art-image{
  position:absolute;
  left:50%;
  top:50%;
  transform:translate(-50%,-50%);
  width:auto;
  height:auto;
  max-width:none;
}

















/* Mat cut bevel line v1.12
   Finalized corner method:
   - top/bottom strips do not overrun excessively
   - four corner patches close the exact corner cells
   - side strips stay only on the vertical section
*/
.mat-bevel-cut{
  display:none;
  position:absolute;
  left:50%;
  top:50%;
  transform:translate(-50%,-50%);
  pointer-events:none;
  z-index:5;
  overflow:visible;
  box-sizing:border-box;
}
.mat-cut-line,
.mat-cut-corner{
  position:absolute;
  display:block;
  pointer-events:none;
  box-sizing:border-box;
}
.frame-box.mat-on.detail-view:not(.mat-black) .mat-bevel-cut{
  display:block;
}
.frame-box.mat-on.detail-view:not(.mat-black) .cut-left,
.frame-box.mat-on.detail-view:not(.mat-black) .cut-right{
  z-index:1;
  top:0;
  width:var(--mat-bevel-side-px, 1px);
  height:100%;
  background:#d9d9d9;
}
.frame-box.mat-on.detail-view:not(.mat-black) .cut-left{
  left:calc(-1 * var(--mat-bevel-side-px, 1px));
}
.frame-box.mat-on.detail-view:not(.mat-black) .cut-right{
  right:calc(-1 * var(--mat-bevel-side-px, 1px));
}
.frame-box.mat-on.detail-view:not(.mat-black) .cut-top{
  z-index:2;
  left:0;
  top:calc(-1 * var(--mat-bevel-top-px, 1px));
  width:100%;
  height:var(--mat-bevel-top-px, 1px);
  background:#b0b0b0;
}
.frame-box.mat-on.detail-view:not(.mat-black) .cut-bottom{
  z-index:2;
  left:0;
  bottom:calc(-1 * var(--mat-bevel-bottom-px, 1px));
  width:100%;
  height:var(--mat-bevel-bottom-px, 1px);
  background:#ffffff;
}
.frame-box.mat-on.detail-view:not(.mat-black) .mat-cut-corner{
  z-index:3;
  width:var(--mat-bevel-side-px, 1px);
}
.frame-box.mat-on.detail-view:not(.mat-black) .corner-tl,
.frame-box.mat-on.detail-view:not(.mat-black) .corner-tr{
  top:calc(-1 * var(--mat-bevel-top-px, 1px));
  height:var(--mat-bevel-top-px, 1px);
  background:#b0b0b0;
}
.frame-box.mat-on.detail-view:not(.mat-black) .corner-bl,
.frame-box.mat-on.detail-view:not(.mat-black) .corner-br{
  bottom:calc(-1 * var(--mat-bevel-bottom-px, 1px));
  height:var(--mat-bevel-bottom-px, 1px);
  background:#ffffff;
}
.frame-box.mat-on.detail-view:not(.mat-black) .corner-tl,
.frame-box.mat-on.detail-view:not(.mat-black) .corner-bl{
  left:calc(-1 * var(--mat-bevel-side-px, 1px));
}
.frame-box.mat-on.detail-view:not(.mat-black) .corner-tr,
.frame-box.mat-on.detail-view:not(.mat-black) .corner-br{
  right:calc(-1 * var(--mat-bevel-side-px, 1px));
}


/* Collapsible option cards */
.card-toggle-head{
  align-items:center;
}
.card-toggle-head h2{
  flex:1;
}
.card-collapse-btn{
  margin-left:auto;
  border:1px solid var(--line);
  background:#fff;
  border-radius:999px;
  padding:6px 10px;
  font-size:12px;
  font-weight:850;
  color:var(--muted);
}
.collapsible-card.collapsed .collapsible-body{
  display:none;
}

/* Real mat color list */
.mat-color-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:7px;
  max-height:340px;
  overflow:auto;
  padding-right:3px;
}
.mat-color-grid button{
  display:flex;
  align-items:center;
  gap:8px;
  min-height:42px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#fff;
  padding:8px 9px;
  font-size:12px;
  font-weight:850;
  text-align:left;
}
.mat-color-grid button span{
  width:22px;
  height:22px;
  border-radius:50%;
  background:var(--mat-swatch);
  border:1px solid rgba(0,0,0,.20);
  box-shadow:
    inset 0 1px 1px rgba(255,255,255,.38),
    0 0 0 1px rgba(255,255,255,.4);
  flex:0 0 22px;
}
.mat-color-grid button strong{
  display:block;
  line-height:1.2;
  font-size:11.5px;
  word-break:keep-all;
}
.mat-color-grid button.active{
  border-color:#1f1f1d;
  box-shadow:0 0 0 2px rgba(31,31,29,.10);
}


.save-guide-actions{
  display:grid;
  grid-template-columns:1fr;
  gap:8px;
  margin-top:14px;
}
.save-guide-actions button{
  width:100%;
  justify-content:center;
}
@media (min-width: 1180px){
  .save-guide-actions{
    grid-template-columns:1fr 1fr;
  }
}


.multiline-save-btn{
  display:inline-flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:1px;
  line-height:1.15;
  min-height:48px;
}
.multiline-save-btn span{
  display:block;
  white-space:nowrap;
}
.save-guide-actions .multiline-save-btn{
  min-height:52px;
}


/* v1.20 subtle depth pass
   목적: 그림자를 진하게 만들기보다 외부/내부 깊이 위치를 분리한다.
*/
.frame-box{
  box-shadow:
    var(--pf-frame-drop-shadow),
    inset 0 1px 0 rgba(255,255,255,.24),
    inset 0 -1px 0 rgba(0,0,0,.22);
}
.frame-box::after{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  z-index:3;
  box-shadow:
    inset 0 2px 3px rgba(255,255,255,.08),
    inset -2px -3px 5px rgba(0,0,0,.15),
    inset 2px 1px 3px rgba(255,255,255,.05);
}
.mat-area::before{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  z-index:2;
  box-shadow:
    inset 0 3px 4px rgba(0,0,0,.13),
    inset 3px 0 4px rgba(0,0,0,.07),
    inset 0 -2px 3px rgba(255,255,255,.08);
}
.frame-box.mat-on .art-window{
  z-index:4;
  box-shadow:
    0 1px 3px rgba(0,0,0,.15),
    0 0 0 1px rgba(255,255,255,.18);
}
.frame-box.mat-on .art-window::after{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  z-index:4;
  box-shadow:
    inset 0 2px 3px rgba(0,0,0,.09),
    inset 1px 0 2px rgba(0,0,0,.05),
    inset 0 -1px 1px rgba(255,255,255,.08);
}
.frame-box:not(.mat-on) .art-window::after{
  display:none;
}


/* v1.21 subtle glass reflection */
.glass{
  position:absolute;
  inset:0;
  pointer-events:none;
  z-index:4;
  opacity:var(--glass-opacity,.20);
  mix-blend-mode:screen;
  background:
    linear-gradient(135deg,
      rgba(255,255,255,.62) 0%,
      rgba(255,255,255,.08) 18%,
      rgba(255,255,255,0) 42%,
      rgba(255,255,255,.05) 70%,
      rgba(255,255,255,.28) 76%,
      rgba(255,255,255,0) 84%),
    linear-gradient(25deg,
      rgba(255,255,255,0) 64%,
      rgba(255,255,255,.26) 70%,
      rgba(255,255,255,0) 76%);
}
.frame-box.glass-off .glass{
  opacity:0;
}
.frame-box.glass-strong .glass{
  opacity:var(--glass-opacity,.34);
}
.glass-option-block{
  margin-top:14px;
  padding-top:12px;
  border-top:1px solid var(--line);
}
.glass-effect-row{
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  gap:7px;
}
.glass-effect-row button{
  min-height:36px;
  border:1px solid var(--line);
  background:#fff;
  border-radius:11px;
  font-size:12px;
  font-weight:850;
}
.glass-effect-row button.active{
  border-color:#1f1f1d;
  background:#1f1f1d;
  color:#fff;
}
.glass-hint{
  margin-top:8px;
}


/* v1.22 glass visibility adjustment
   v1.21이 너무 약해 보였기 때문에 기본 반사도 실제로 보이도록 조정.
*/
.glass{
  opacity:var(--glass-opacity,.34);
  mix-blend-mode:screen;
  background:
    linear-gradient(135deg,
      rgba(255,255,255,.80) 0%,
      rgba(255,255,255,.24) 15%,
      rgba(255,255,255,0) 38%,
      rgba(255,255,255,.06) 63%,
      rgba(255,255,255,.42) 74%,
      rgba(255,255,255,.12) 82%,
      rgba(255,255,255,0) 92%),
    linear-gradient(24deg,
      rgba(255,255,255,0) 54%,
      rgba(255,255,255,.30) 65%,
      rgba(255,255,255,.06) 72%,
      rgba(255,255,255,0) 81%);
}
.glass::before,
.glass::after{
  content:"";
  position:absolute;
  top:-12%;
  bottom:-12%;
  pointer-events:none;
  transform:skewX(-24deg);
  background:rgba(255,255,255,.20);
}
.glass::before{
  left:12%;
  width:16%;
  opacity:.58;
}
.glass::after{
  left:58%;
  width:8%;
  opacity:.30;
}
.frame-box.glass-off .glass,
.frame-box.glass-off .glass::before,
.frame-box.glass-off .glass::after{
  opacity:0;
}
.frame-box.glass-strong .glass::before{
  opacity:.78;
}
.frame-box.glass-strong .glass::after{
  opacity:.48;
}


/* v1.26 ambient correction test at 20%
   프레임 / 매트 / 작품 이미지 모두 같은 20% 공간 분위기 보정 테스트.
   고객 조작 옵션은 노출하지 않음.
*/
.art-window{
  isolation:isolate;
}
.art-image{
  z-index:1;
}
.art-window::before{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  z-index:2;
  background:var(--ambient-art-overlay, rgba(232,232,232,0));
  mix-blend-mode:normal;
}
.frame-box.mat-on .art-window::before{
  z-index:2;
}
.frame-box.mat-on.detail-view:not(.mat-black) .mat-bevel-cut{
  z-index:5;
}


/* v1.28 glass reflection policy
   유리 반사는 고객 조작 옵션에서 제외.
   FRAME_CONFIG.glassEffect 내부값으로만 관리한다.
   현재 알루미늄 슬림 8mm는 'soft', 향후 유리 없는 액자는 'off' 지정.
*/

/* v1.29 floating frame model
   띄움액자는 작품과 동일한 보드가 L형 몰딩 안쪽에 떠 있는 구조로 표현한다.
*/
.floating-hint{
  margin:8px 0 12px;
}
.floating-color-grid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:8px;
}
.floating-color-btn{
  border:1px solid var(--line);
  background:#fff;
  border-radius:13px;
  overflow:hidden;
  padding:0;
  text-align:left;
}
.floating-color-btn.active{
  outline:3px solid #1f1f1d;
  outline-offset:1px;
}
.floating-color-btn img{
  width:100%;
  aspect-ratio:1/1;
  object-fit:cover;
  display:block;
}
.floating-color-btn span{
  display:block;
  padding:6px 7px;
  font-size:11px;
  font-weight:850;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.mat-card.mat-disabled{
  opacity:.62;
}
.mat-card.mat-disabled .collapsible-body{
  position:relative;
}
.mat-card.mat-disabled .mat-options,
.mat-card.mat-disabled .mat-toggle{
  pointer-events:none;
}
.mat-card.mat-disabled .collapsible-body::after{
  content:"원목띄움액자는 매트를 사용하지 않습니다. 매트 설정은 알루미늄액자 선택 시 사용할 수 있습니다.";
  display:block;
  margin-top:10px;
  padding:10px 12px;
  border-radius:12px;
  background:#f7f4ef;
  color:#6f675f;
  font-size:12px;
  font-weight:850;
  line-height:1.35;
}
.frame-box.floating-on{
  background:var(--frame-color,#111);
  box-shadow:
    var(--pf-frame-drop-shadow),
    inset 0 1px 0 rgba(255,255,255,.20),
    inset 0 -2px 0 rgba(0,0,0,.24);
}
.frame-box.floating-on::before{
  background:
    linear-gradient(135deg, rgba(255,255,255,.16), rgba(255,255,255,0) 32%, rgba(0,0,0,.18)),
    repeating-linear-gradient(0deg, rgba(255,255,255,.055) 0 1px, rgba(0,0,0,.055) 1px 2px, transparent 2px 9px);
  z-index:1;
  opacity:.75;
}
.frame-box.floating-on .mat-area{
  position:relative;
  z-index:2;
  background:#050505;
  overflow:hidden;
  box-sizing:border-box;
  padding:0;
}
.frame-box.floating-on .mat-area::before{
  z-index:1;
  background:none;
  box-shadow:none;
}
.frame-box.floating-on .art-window{
  position:absolute;
  inset:0;
  z-index:4;
  width:100%;
  height:100%;
  box-sizing:border-box;
  border:var(--floating-gap-px, 2px) solid #050505;
  background:#050505;
  overflow:hidden;
  box-shadow:none;
}
.frame-box.floating-on .art-window::after{
  content:none;
  display:none;
}
.frame-box.floating-on .art-image{
  position:relative;
  width:100%;
  height:100%;
  left:auto;
  top:auto;
  transform:none;
}
.frame-box.floating-on .glass,
.frame-box.floating-on .glass::before,
.frame-box.floating-on .glass::after{
  opacity:0;
}


/* V2.1 partner image selector */
.partner-sample-panel{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.partner-sample-current{
  width:100%;
  border:1px solid var(--line);
  border-radius:16px;
  overflow:hidden;
  background:#fff;
  cursor:pointer;
  padding:0;
  text-align:left;
  color:inherit;
  font:inherit;
}
.partner-sample-current img{
  width:100%;
  aspect-ratio:4/3;
  object-fit:cover;
  display:block;
  background:#eee;
}
.partner-sample-info{
  padding:9px 10px 10px;
}
.partner-sample-info strong{
  display:block;
  font-size:13px;
  line-height:1.3;
}
.partner-sample-info span{
  display:block;
  margin-top:2px;
  color:var(--muted);
  font-size:12px;
}
.partner-sample-open{
  width:100%;
  min-height:44px;
  border:1px solid #1f1f1d;
  border-radius:999px;
  background:#1f1f1d;
  color:#fff;
  font-weight:850;
  cursor:pointer;
}
.partner-sample-open:hover{
  transform:translateY(-1px);
}
.partner-image-modal[hidden]{
  display:none;
}
.partner-image-modal{
  position:fixed;
  inset:0;
  z-index:9999;
  background:rgba(19,18,16,.56);
  padding:22px;
  display:flex;
  align-items:stretch;
  justify-content:center;
}
.partner-image-dialog{
  width:min(1180px, 100%);
  max-height:100%;
  background:#fbfaf7;
  border-radius:24px;
  overflow:hidden;
  display:flex;
  flex-direction:column;
  box-shadow:0 26px 80px rgba(0,0,0,.34);
}
.partner-image-head{
  position:sticky;
  top:0;
  z-index:2;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:16px 18px;
  border-bottom:1px solid var(--line);
  background:rgba(255,255,255,.96);
}
.partner-image-head strong{
  display:block;
  font-size:20px;
  letter-spacing:-.03em;
}
.partner-image-head p{
  margin:3px 0 0;
  color:var(--muted);
  font-size:13px;
}
.partner-image-actions{
  display:flex;
  align-items:center;
  gap:8px;
  white-space:nowrap;
}
.partner-category-filters{
  display:flex;
  gap:7px;
  overflow-x:auto;
  padding:12px 18px 0;
}
.partner-category-filters button{
  border:1px solid var(--line);
  background:#fff;
  border-radius:999px;
  padding:7px 12px;
  font-size:12px;
  font-weight:800;
  white-space:nowrap;
  cursor:pointer;
}
.partner-category-filters button.active{
  background:#1f1f1d;
  border-color:#1f1f1d;
  color:#fff;
}
.partner-image-grid{
  padding:18px;
  overflow:auto;
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(150px, 1fr));
  gap:13px;
}
.partner-image-item{
  position:relative;
  border:2px solid transparent;
  background:#fff;
  border-radius:15px;
  overflow:hidden;
  padding:0;
  text-align:left;
  cursor:pointer;
  box-shadow:0 3px 12px rgba(0,0,0,.06);
}
.partner-image-item img{
  width:100%;
  aspect-ratio:1/1;
  object-fit:cover;
  display:block;
  background:#eee;
}
.partner-image-caption{
  padding:9px 10px 10px;
}
.partner-image-caption strong{
  display:block;
  font-size:12px;
  line-height:1.25;
}
.partner-image-caption span{
  display:block;
  margin-top:3px;
  font-size:11px;
  color:var(--muted);
}
.partner-image-item.active{
  border-color:#1f1f1d;
  box-shadow:0 0 0 3px rgba(31,31,29,.13), 0 8px 18px rgba(0,0,0,.10);
}
.partner-image-item.active::after{
  content:"✓";
  position:absolute;
  top:8px;
  right:8px;
  width:26px;
  height:26px;
  border-radius:999px;
  display:grid;
  place-items:center;
  background:#1f1f1d;
  color:#fff;
  font-weight:900;
  font-size:15px;
}
@media (max-width:640px){
  .partner-image-modal{
    padding:8px;
  }
  .partner-image-dialog{
    border-radius:18px;
  }
  .partner-image-head{
    align-items:flex-start;
    flex-direction:column;
    padding:14px;
  }
  .partner-image-actions{
    width:100%;
  }
  .partner-image-actions button{
    flex:1;
  }
  .partner-category-filters{
    padding:10px 14px 0;
  }
  .partner-image-grid{
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap:10px;
    padding:14px;
  }
}

body.modal-open{overflow:hidden;}


/* V2.2 partner iframe mode
   업체 wrapper 헤더가 제목/안내를 담당하므로 iframe 내부의 큰 메인 타이틀은 숨긴다. */
body.partner-mode .topbar{
  min-height:auto;
  padding:18px 28px 12px;
  justify-content:flex-end;
}
body.partner-mode .topbar > div:first-child{
  display:none;
}
body.partner-mode .app{
  height:calc(100vh - 66px);
}
@media (max-width:980px){
  body.partner-mode .topbar{
    padding:12px 16px 8px;
  }
  body.partner-mode .top-actions{
    margin-top:0;
  }
}


.mat-card.mat-disabled .card-collapse-btn{
  opacity:.55;
  cursor:not-allowed;
}


/* V2.4 mobile partner wrapper fix
   업체 헤더가 접힌 뒤 iframe 내부에서 미리보기 영역이 상단에 남고 옵션이 아래로 흐르도록 모바일 partner-mode 높이를 다시 auto로 보정한다. */
@media (max-width:980px){
  body.partner-mode .app{
    height:auto;
    min-height:calc(100vh - 52px);
    overflow:visible;
  }
  body.partner-mode .preview-area{
    position:sticky;
    top:0;
    z-index:10;
  }
}


/* V2.6 image modal usability fix
   카테고리 필터는 잘리지 않게 하고, 썸네일은 작품 확인이 가능한 최소 크기를 유지한다.
   팝업 전체가 아니라 본문 그리드 영역만 세로 스크롤되도록 정리한다. */
.partner-image-dialog{
  height:min(860px, calc(100vh - 32px));
}
.partner-image-head{
  flex:0 0 auto;
}
.partner-category-filters{
  flex:0 0 auto;
  min-height:48px;
  padding:12px 18px 10px;
  overflow-x:auto;
  overflow-y:hidden;
  scrollbar-gutter:stable;
}
.partner-category-filters button{
  flex:0 0 auto;
  min-height:32px;
  line-height:1.2;
}
.partner-image-grid{
  flex:1 1 auto;
  min-height:0;
  overflow-y:auto;
  overflow-x:hidden;
  grid-template-columns:repeat(auto-fill, minmax(190px, 1fr));
  align-content:start;
}
.partner-image-item img{
  aspect-ratio:4/3;
}
@media (max-width:900px){
  .partner-image-grid{
    grid-template-columns:repeat(auto-fill, minmax(160px, 1fr));
  }
}
@media (max-width:640px){
  .partner-image-dialog{
    height:calc(100dvh - 16px);
  }
  .partner-category-filters{
    min-height:46px;
    padding:10px 14px 8px;
  }
  .partner-image-grid{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }
}


/* V2.7 image modal card height fix
   작품 수가 많아져도 카드가 팝업 높이에 맞춰 납작해지지 않도록
   각 작품 카드와 이미지 영역의 최소 높이를 고정하고, 그리드 본문만 세로 스크롤한다. */
.partner-image-dialog{
  height:min(880px, calc(100vh - 32px));
}
.partner-image-grid{
  flex:1 1 auto;
  min-height:0;
  overflow-y:auto;
  overflow-x:hidden;
  grid-template-columns:repeat(auto-fill, minmax(180px, 1fr));
  grid-auto-rows:max-content;
  align-content:start;
}
.partner-image-item{
  display:flex;
  flex-direction:column;
  min-height:188px;
}
.partner-image-item img{
  flex:0 0 132px;
  height:132px;
  width:100%;
  aspect-ratio:auto;
  object-fit:cover;
}
.partner-image-caption{
  display:block;
  flex:0 0 auto;
  min-height:52px;
}
.partner-image-caption strong{
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}
.partner-image-caption span{
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
@media (max-width:900px){
  .partner-image-grid{
    grid-template-columns:repeat(auto-fill, minmax(160px, 1fr));
  }
  .partner-image-item{
    min-height:178px;
  }
  .partner-image-item img{
    flex-basis:122px;
    height:122px;
  }
}
@media (max-width:640px){
  .partner-image-dialog{
    height:calc(100dvh - 16px);
  }
  .partner-image-grid{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }
  .partner-image-item{
    min-height:166px;
  }
  .partner-image-item img{
    flex-basis:108px;
    height:108px;
  }
}


/* V2.8 spec long filename fix */
.spec-overlay dd{
  min-width:0;
  word-break:break-all;
}


/* V2.9 quick size and artwork picker refinements */
.quick-size{
  flex-wrap:wrap;
}
.partner-image-item img{
  aspect-ratio:1/1;
  height:auto;
  min-height:0;
  flex:0 0 auto;
}
.partner-image-item{
  min-height:auto;
}
.partner-image-caption{
  min-height:52px;
}
@media (max-width:900px){
  .partner-image-item img{
    height:auto;
    flex-basis:auto;
  }
}
@media (max-width:640px){
  .partner-image-item img{
    height:auto;
    flex-basis:auto;
  }
}


/* V2.16: 2160mm 배경 100%는 화면 빈 공간이 보이지 않는 최소 채움 기준이다. */
.bg-image{
  object-fit:cover;
  object-position:center;
}


/* V2.19 upload guide modal */
.upload-guide-modal[hidden]{display:none}
.upload-guide-modal{
  position:fixed;
  inset:0;
  z-index:10000;
  background:rgba(19,18,16,.58);
  padding:22px;
  display:flex;
  align-items:center;
  justify-content:center;
}
.upload-guide-dialog{
  width:min(560px, 100%);
  max-height:100%;
  overflow:auto;
  background:#fbfaf7;
  border-radius:22px;
  box-shadow:0 26px 80px rgba(0,0,0,.34);
  border:1px solid rgba(255,255,255,.45);
}
.space-guide-dialog{
  width:min(760px, 100%);
}
.upload-guide-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:16px 18px;
  border-bottom:1px solid var(--line);
  background:rgba(255,255,255,.96);
}
.upload-guide-head strong{
  font-size:18px;
  letter-spacing:-.03em;
}
.upload-guide-body{
  padding:18px;
  color:var(--text);
  font-size:14px;
  line-height:1.55;
}
.upload-guide-body p{
  margin:0 0 8px;
}
.space-guide-image{
  width:100%;
  aspect-ratio:4/3;
  object-fit:cover;
  display:block;
  border-radius:16px;
  border:1px solid var(--line);
  margin-bottom:14px;
  background:#eee;
}
.upload-guide-actions{
  display:flex;
  justify-content:flex-end;
  gap:8px;
  padding:0 18px 18px;
}

/* V2.40: 사용자 공간 사진을 4:3 배경으로 맞추는 편집 단계 */
.space-crop-modal{
  z-index:10020;
}
.space-crop-dialog{
  width:min(980px,100%);
  max-height:calc(100vh - 32px);
  overflow:auto;
  background:#fbfaf7;
  border-radius:22px;
  box-shadow:0 26px 80px rgba(0,0,0,.38);
  border:1px solid rgba(255,255,255,.45);
}
.space-crop-body{
  padding:16px 18px 10px;
}
.space-crop-instruction{
  margin:0 0 12px;
  color:var(--text);
  font-size:14px;
  line-height:1.45;
  text-align:center;
}
.space-crop-frame{
  position:relative;
  width:min(820px,100%);
  aspect-ratio:4/3;
  margin:0 auto;
  overflow:hidden;
  border-radius:16px;
  background:#242321;
  border:1px solid rgba(0,0,0,.18);
  box-shadow:0 10px 32px rgba(0,0,0,.18);
}
.space-crop-frame canvas{
  display:block;
  width:100%;
  height:100%;
  cursor:grab;
  touch-action:none;
  outline:none;
}
.space-crop-frame canvas:active{
  cursor:grabbing;
}
.space-crop-frame canvas:focus-visible{
  box-shadow:inset 0 0 0 3px rgba(255,178,76,.95);
}
.space-crop-guides{
  position:absolute;
  inset:0;
  pointer-events:none;
}
.space-crop-guide{
  position:absolute;
  left:0;
  right:0;
  border-top:1px solid rgba(255,255,255,.82);
  filter:drop-shadow(0 1px 1px rgba(0,0,0,.75));
}
.space-crop-guide-1{top:20%;border-top-width:3px}
.space-crop-guide-2{top:40%}
.space-crop-guide-3{top:60%}
.space-crop-guide-4{top:80%;border-top-width:3px}
.space-crop-guide span{
  position:absolute;
  right:10px;
  top:5px;
  padding:2px 7px 3px;
  border-radius:999px;
  background:rgba(22,21,19,.68);
  color:#fff;
  font-size:11px;
  font-style:normal;
  font-weight:850;
  letter-spacing:-.02em;
}
.space-crop-guide-4 span{
  top:auto;
  bottom:5px;
}
.space-crop-zoom{
  display:grid;
  grid-template-columns:42px 58px 42px minmax(180px,1fr);
  align-items:center;
  gap:8px;
  width:min(620px,100%);
  margin:14px auto 0;
}
.space-crop-zoom button{
  min-width:0;
  padding:8px;
  font-size:18px;
  line-height:1;
}
.space-crop-zoom strong{
  text-align:center;
  font-variant-numeric:tabular-nums;
}
.space-crop-zoom input{
  width:100%;
}
.space-crop-status{
  min-height:20px;
  margin:7px 0 0;
  color:var(--muted);
  font-size:12px;
  text-align:center;
}
.space-crop-status.error{
  color:#b12828;
  font-weight:750;
}
.space-crop-actions{
  display:flex;
  align-items:center;
  gap:8px;
  padding:4px 18px 18px;
}
.space-crop-action-spacer{
  flex:1 1 auto;
}
@media (max-width:700px){
  .space-background-actions{
    grid-template-columns:1fr;
  }
  .space-crop-modal{
    padding:10px;
  }
  .space-crop-dialog{
    max-height:calc(100vh - 20px);
    border-radius:16px;
  }
  .space-crop-body{
    padding:13px 12px 8px;
  }
  .space-crop-zoom{
    grid-template-columns:40px 54px 40px;
  }
  .space-crop-zoom input{
    grid-column:1/-1;
  }
  .space-crop-actions{
    flex-wrap:wrap;
    padding:4px 12px 14px;
  }
  .space-crop-action-spacer{
    display:none;
  }
}


/* V2.25 partner config visibility safety */
.partner-config-hidden{display:none!important}

/* V2.26 canvas frame option
   캔버스액자는 작품 크기와 완성 외경이 동일하므로 별도 몰딩/유리 없이 표면과 가장자리 입체감만 표현한다. */
.canvas-hint,
.diasec-hint{
  margin:8px 0 12px;
}
.canvas-finish-grid,
.diasec-finish-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:8px;
}
.canvas-finish-btn,
.diasec-finish-btn{
  border:1px solid var(--line);
  background:#fff;
  border-radius:13px;
  overflow:hidden;
  padding:0;
  text-align:left;
}
.canvas-finish-btn.active,
.diasec-finish-btn.active{
  outline:3px solid #1f1f1d;
  outline-offset:1px;
}
.canvas-finish-btn img,
.diasec-finish-btn img{
  width:100%;
  aspect-ratio:1/1;
  object-fit:cover;
  display:block;
}
.canvas-finish-btn span,
.diasec-finish-btn span{
  display:block;
  padding:6px 7px;
  font-size:11px;
  font-weight:850;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

/* V2.38 DB-driven frame catalog */
.frame-more-btn{
  width:100%;
  margin-top:10px;
  min-height:40px;
  border:1px solid #1f1f1d;
  border-radius:999px;
  background:#fff;
  color:#1f1f1d;
  font-weight:900;
  cursor:pointer;
}
.frame-more-btn:hover{
  background:#f2efe9;
}
.frame-catalog-modal[hidden]{display:none}
.frame-catalog-modal{
  position:fixed;
  inset:0;
  z-index:10000;
  display:flex;
  align-items:stretch;
  justify-content:center;
  padding:22px;
  background:rgba(19,18,16,.58);
}
.frame-catalog-dialog{
  width:min(1080px, 100%);
  max-height:100%;
  display:flex;
  flex-direction:column;
  overflow:hidden;
  border-radius:24px;
  background:#fbfaf7;
  box-shadow:0 26px 80px rgba(0,0,0,.34);
}
.frame-catalog-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:16px 18px;
  border-bottom:1px solid var(--line);
  background:rgba(255,255,255,.96);
}
.frame-catalog-head strong{
  display:block;
  font-size:20px;
  letter-spacing:-.03em;
}
.frame-catalog-head p{
  margin:3px 0 0;
  color:var(--muted);
  font-size:13px;
}
.frame-catalog-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(150px, 1fr));
  gap:13px;
  padding:18px;
  overflow:auto;
}
.frame-catalog-item{
  position:relative;
  overflow:hidden;
  padding:0;
  border:2px solid transparent;
  border-radius:15px;
  background:#fff;
  text-align:left;
  cursor:pointer;
  box-shadow:0 3px 12px rgba(0,0,0,.06);
}
.frame-catalog-item img{
  display:block;
  width:100%;
  aspect-ratio:1/1;
  object-fit:cover;
  background:#eee;
}
.frame-catalog-item span{
  display:block;
  padding:9px 10px 10px;
}
.frame-catalog-item strong{
  display:block;
  font-size:12px;
  line-height:1.3;
}
.frame-catalog-item small{
  display:block;
  margin-top:3px;
  color:var(--muted);
  font-size:11px;
}
.frame-catalog-item.active{
  border-color:#1f1f1d;
  box-shadow:0 0 0 3px rgba(31,31,29,.13), 0 8px 18px rgba(0,0,0,.10);
}
.frame-catalog-item.active::after{
  content:"✓";
  position:absolute;
  top:8px;
  right:8px;
  width:26px;
  height:26px;
  display:grid;
  place-items:center;
  border-radius:999px;
  background:#1f1f1d;
  color:#fff;
  font-size:15px;
  font-weight:900;
}
@media (max-width:640px){
  .frame-catalog-modal{padding:8px}
  .frame-catalog-dialog{border-radius:18px}
  .frame-catalog-head{
    align-items:flex-start;
    flex-direction:column;
    padding:14px;
  }
  .frame-catalog-grid{
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap:10px;
    padding:14px;
  }
}
.frame-size-modal[hidden]{display:none}
.frame-size-modal{
  position:fixed;
  inset:0;
  z-index:10020;
  display:flex;
  align-items:stretch;
  justify-content:center;
  padding:22px;
  background:rgba(19,18,16,.62);
}
.frame-size-dialog{
  width:min(1040px,100%);
  max-height:100%;
  display:flex;
  flex-direction:column;
  overflow:hidden;
  border-radius:24px;
  background:#fbfaf7;
  box-shadow:0 26px 80px rgba(0,0,0,.34);
}
.frame-size-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:16px 18px;
  border-bottom:1px solid var(--line);
  background:rgba(255,255,255,.97);
}
.frame-size-head strong{
  display:block;
  font-size:20px;
  letter-spacing:-.03em;
}
.frame-size-head p{
  margin:3px 0 0;
  color:var(--muted);
  font-size:13px;
}
.frame-size-summary{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:12px 18px;
  border-bottom:1px solid var(--line);
  background:#f5f2ec;
}
.frame-size-summary p{
  margin:0;
  color:#4f4b45;
  font-size:13px;
  line-height:1.45;
}
.frame-size-summary #frameSizeRangeText{
  text-align:right;
  color:#746e65;
}
.frame-size-keep-current{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin:14px 18px 0;
  padding:13px 14px;
  border:1px solid #e7c38f;
  border-radius:14px;
  background:#fff6e7;
}
.frame-size-keep-current[hidden]{display:none}
.frame-size-keep-current strong{font-size:14px;color:#6f4518}
.frame-size-keep-current p{margin:3px 0 0;color:#805b30;font-size:12px;line-height:1.4}
.frame-size-keep-current button{flex:0 0 auto}
.frame-size-groups{
  flex:1 1 auto;
  min-height:0;
  display:flex;
  flex-direction:column;
  gap:13px;
  padding:14px 18px 20px;
  overflow:auto;
}
.frame-size-group{
  flex:0 0 auto;
  border:1px solid var(--line);
  border-radius:16px;
  background:#fff;
  overflow:hidden;
}
.frame-size-group.is-best{
  border-color:#bda78d;
  box-shadow:0 0 0 2px rgba(181,119,66,.10);
}
.frame-size-group-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:10px 12px;
  border-bottom:1px solid #eee9e1;
  background:#faf8f4;
}
.frame-size-group-head strong{font-size:14px}
.frame-size-group-head small{color:var(--muted);font-size:11px}
.frame-size-buttons{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(210px,1fr));
  gap:8px;
  padding:11px;
}
.frame-size-item{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  min-height:45px;
  padding:8px 10px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#fff;
  color:var(--text);
  text-align:left;
}
.frame-size-item:hover:not(:disabled){background:#f5f2ec}
.frame-size-item.active{
  border-color:#1f1f1d;
  box-shadow:0 0 0 2px rgba(31,31,29,.10);
}
.frame-size-item.is-custom{border-color:#ead0a8;background:#fffaf1}
.frame-size-item:disabled{opacity:.42;cursor:not-allowed;background:#f1eee9}
.frame-size-item-name{min-width:0;font-size:12px;font-weight:800;line-height:1.3}
.frame-size-empty{
  margin:0;
  padding:28px 18px;
  color:var(--muted);
  text-align:center;
}
.frame-option-size-unavailable{
  opacity:.46;
}
.frame-option-size-unavailable:hover{
  opacity:.72;
}
.frame-option-size-custom{
  box-shadow:inset 0 0 0 2px rgba(181,119,66,.32);
}

.image-check-popup-modal[hidden]{display:none}
.image-check-popup-modal{
  position:fixed;
  inset:0;
  z-index:10040;
  display:flex;
  align-items:stretch;
  justify-content:center;
  padding:14px;
  background:rgba(19,18,16,.68);
}
.image-check-popup-dialog{
  width:min(1480px,100%);
  height:100%;
  max-height:100%;
  min-height:0;
  display:flex;
  flex-direction:column;
  overflow:hidden;
  border-radius:22px;
  background:#fbfaf7;
  box-shadow:0 26px 90px rgba(0,0,0,.38);
}
.image-check-popup-head{
  flex:0 0 auto;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  min-height:66px;
  padding:11px 16px 11px 20px;
  border-bottom:1px solid var(--line);
  background:#fff;
}
.image-check-popup-head strong{
  display:block;
  font-size:18px;
  letter-spacing:-.03em;
}
.image-check-popup-head p{
  margin:3px 0 0;
  color:var(--muted);
  font-size:12px;
  line-height:1.35;
}
.image-check-popup-head p.is-error{
  color:#a43b2f;
  font-weight:750;
}
.image-check-popup-body{
  flex:1 1 auto;
  min-height:0;
  position:relative;
  background:#f4f1ec;
}
.image-check-popup-body iframe{
  display:block;
  width:100%;
  height:100%;
  min-height:0;
  border:0;
  background:#f4f1ec;
}
@media (max-width:640px){
  .frame-size-modal{padding:8px}
  .frame-size-dialog{border-radius:18px}
  .frame-size-head{align-items:flex-start;padding:14px}
  .frame-size-head strong{font-size:18px}
  .frame-size-summary{align-items:flex-start;flex-direction:column;padding:11px 14px}
  .frame-size-summary #frameSizeRangeText{text-align:left}
  .frame-size-keep-current{align-items:stretch;flex-direction:column;margin:12px 14px 0}
  .frame-size-groups{padding:12px 14px 16px}
  .frame-size-buttons{grid-template-columns:1fr}
  .image-check-popup-modal{padding:5px}
  .image-check-popup-dialog{border-radius:15px}
  .image-check-popup-head{
    min-height:58px;
    padding:9px 10px 9px 14px;
  }
  .image-check-popup-head strong{font-size:16px}
  .image-check-popup-head p{font-size:11px}
  .image-check-popup-head .ghost{padding:8px 11px}
}
.mat-card.mat-disabled .collapsible-body::after{
  content:"원목띄움액자, 캔버스액자, 디아섹액자는 매트를 사용하지 않습니다. 매트 설정은 알루미늄액자 선택 시 사용할 수 있습니다.";
}
.frame-box.canvas-on{
  background:transparent;
  border-width:0 !important;
  overflow:visible;
  box-shadow:var(--pf-frame-drop-shadow);
}
.frame-box.canvas-on::before,
.frame-box.canvas-on::after{
  content:none;
  display:none;
}
.frame-box.canvas-on .mat-area{
  position:relative;
  z-index:2;
  background:transparent;
  overflow:hidden;
  box-shadow:none;
}
.frame-box.canvas-on .mat-area::before{
  content:none;
  display:none;
}
.frame-box.canvas-on .art-window{
  position:absolute;
  inset:0;
  z-index:4;
  width:100%;
  height:100%;
  transform:none;
  border:0;
  background:#eee;
  overflow:hidden;
  box-shadow:none;
}
.frame-box.canvas-on .art-image{
  position:relative;
  width:100%;
  height:100%;
  left:auto;
  top:auto;
  transform:none;
  object-fit:cover;
}
.frame-box.canvas-on .art-window::after{
  content:"";
  display:block;
  position:absolute;
  inset:0;
  z-index:3;
  pointer-events:none;
  background:
    linear-gradient(to bottom, rgba(255,255,255,.20) 0, rgba(255,255,255,.08) 3px, rgba(255,255,255,0) 12px, rgba(0,0,0,0) calc(100% - 14px), rgba(0,0,0,.15) calc(100% - 4px), rgba(0,0,0,.24) 100%),
    linear-gradient(to right, rgba(0,0,0,.11) 0, rgba(0,0,0,.045) 4px, rgba(0,0,0,0) 13px, rgba(0,0,0,0) calc(100% - 13px), rgba(0,0,0,.055) calc(100% - 4px), rgba(0,0,0,.14) 100%);
  opacity:.88;
}
.frame-box.canvas-on.canvas-gloss .art-window::after{
  background:
    radial-gradient(circle at 24% 20%, rgba(255,255,255,.18) 0%, rgba(255,255,255,.10) 14%, rgba(255,255,255,.035) 32%, rgba(255,255,255,0) 58%),
    linear-gradient(to bottom, rgba(255,255,255,.20) 0, rgba(255,255,255,.08) 3px, rgba(255,255,255,0) 12px, rgba(0,0,0,0) calc(100% - 14px), rgba(0,0,0,.15) calc(100% - 4px), rgba(0,0,0,.24) 100%),
    linear-gradient(to right, rgba(0,0,0,.11) 0, rgba(0,0,0,.045) 4px, rgba(0,0,0,0) 13px, rgba(0,0,0,0) calc(100% - 13px), rgba(0,0,0,.055) calc(100% - 4px), rgba(0,0,0,.14) 100%);
  opacity:.92;
}
.frame-box.canvas-on .glass,
.frame-box.canvas-on .glass::before,
.frame-box.canvas-on .glass::after{
  opacity:0;
}


/* V2.29 diasec frame option
   디아섹액자는 작품 크기와 완성 외경이 동일하고, 캔버스처럼 감기는 가장자리 효과 없이 평면 아크릴 표면만 표현한다. */
.frame-box.diasec-on{
  background:transparent;
  border-width:0 !important;
  overflow:visible;
  box-shadow:var(--pf-frame-drop-shadow);
}
.frame-box.diasec-on::before,
.frame-box.diasec-on::after{
  content:none;
  display:none;
}
.frame-box.diasec-on .mat-area{
  position:relative;
  z-index:2;
  background:transparent;
  overflow:hidden;
  box-shadow:none;
}
.frame-box.diasec-on .mat-area::before{
  content:none;
  display:none;
}
.frame-box.diasec-on .art-window{
  position:absolute;
  inset:0;
  z-index:4;
  width:100%;
  height:100%;
  transform:none;
  border:0;
  background:#eee;
  overflow:hidden;
  box-shadow:none;
}
.frame-box.diasec-on .art-image{
  position:relative;
  width:100%;
  height:100%;
  left:auto;
  top:auto;
  transform:none;
  object-fit:cover;
}
.frame-box.diasec-on .art-window::after{
  content:none;
  display:none;
}
.frame-box.diasec-on.diasec-gloss .art-window::after{
  content:"";
  display:block;
  position:absolute;
  inset:0;
  z-index:3;
  pointer-events:none;
  background:url("assets/diasec_types/diasec_highlight.png") center center / 100% 100% no-repeat;
  opacity:1;
}
.frame-box.diasec-on .glass,
.frame-box.diasec-on .glass::before,
.frame-box.diasec-on .glass::after{
  opacity:0;
}
