:root {
  --ink: #18202a;
  --muted: #6a7280;
  --line: #e7dfd4;
  --soft: #f8f5f0;
  --panel: #ffffff;
  --gold: #b8873a;
  --gold-soft: #fff4dc;
  --shadow: 0 18px 50px rgba(22, 28, 36, 0.12);
  --radius: 20px;
  --wood: #d7a86b;
  --wood-dark: #946837;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: linear-gradient(135deg, #fbfaf7 0%, #f3eee6 100%);
  color: var(--ink);
}
button, input, select { font: inherit; }
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  padding: 28px clamp(16px, 4vw, 52px) 18px;
}
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(28px, 4vw, 48px); line-height: 1; margin-bottom: 12px; }
h2 { font-size: 20px; margin-bottom: 14px; }
h3 { font-size: 14px; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 16px; }
.eyebrow { color: var(--gold); text-transform: uppercase; letter-spacing: .2em; font-size: 12px; font-weight: 800; margin-bottom: 8px; }
.subtext, .note, .caption { color: var(--muted); line-height: 1.5; }
.studio-shell {
  display: grid;
  grid-template-columns: minmax(310px, 390px) minmax(0, 1fr);
  gap: 20px;
  padding: 0 clamp(16px, 4vw, 52px) 48px;
}
.control-panel, .preview-panel { min-width: 0; }
.panel-card, .preview-panel, .preview-card, .quote-output {
  background: rgba(255,255,255,.92);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(20, 24, 30, 0.06);
}
.panel-card { padding: 18px; margin-bottom: 14px; }
.preview-panel { padding: 22px; }
.preview-topbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.preview-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 16px; }
.large-preview { grid-row: span 2; }
.preview-card { padding: 18px; min-height: 260px; overflow: hidden; }
label { display: block; color: #3b4350; font-weight: 700; font-size: 13px; margin: 12px 0; }
input, select {
  width: 100%;
  border: 1px solid #ded8cf;
  border-radius: 12px;
  padding: 11px 12px;
  background: #fff;
  color: var(--ink);
  margin-top: 7px;
}
.grid-two, .admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.drop-zone {
  border: 1.5px dashed #d6c5a8;
  border-radius: 16px;
  padding: 18px;
  text-align: center;
  background: #fffaf2;
  cursor: pointer;
}
.drop-zone input { display: none; }
.drop-zone span { display: inline-block; background: var(--gold); color: white; padding: 10px 18px; border-radius: 999px; margin-bottom: 8px; }
.drop-zone small { display: block; color: var(--muted); line-height: 1.4; }
.choice-stack label {
  border: 1px solid #e8e0d7;
  border-radius: 14px;
  padding: 12px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: #fff;
  cursor: pointer;
}
.choice-stack input { width: auto; margin-top: 2px; }
.segmented { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.segmented button, .primary-btn, .ghost-btn, .link-btn, .round-btn {
  border: 1px solid #d9cdbb;
  border-radius: 12px;
  padding: 11px 12px;
  cursor: pointer;
  background: white;
  color: var(--ink);
}
.segmented button.active, .primary-btn {
  background: var(--gold);
  color: white;
  border-color: var(--gold);
}
.ghost-btn { background: rgba(255,255,255,.78); }
.link-btn { border: 0; color: var(--gold); background: transparent; padding: 4px; font-weight: 800; text-decoration: underline; text-underline-offset: 4px; }
.round-btn { width: 42px; height: 42px; border-radius: 50%; font-size: 24px; line-height: 1; }
.button-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.summary-card dl { margin: 0; }
.summary-card div { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid #efe9e2; padding: 10px 0; }
dt { color: var(--muted); }
dd { margin: 0; font-weight: 800; text-align: right; }
.hidden { display: none !important; }
.front-preview {
  width: min(100%, 540px);
  aspect-ratio: 4 / 3;
  margin: 4px auto 16px;
  display: grid;
  place-items: center;
  padding: 28px;
  border-radius: 6px;
  background: transparent;
  perspective: 900px;
  transition: all .25s ease;
}
.front-preview.has-frame {
  background: linear-gradient(135deg, #9c6f39, #e2b779 40%, #7a5129 100%);
  border: 10px ridge #bb8c4f;
  box-shadow: 16px 24px 28px rgba(30, 24, 17, 0.22);
}
.front-preview.no-frame { padding: 0; }
.artwork-face {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #86a9c8 0%, #eef2f4 42%, #8aad69 43%, #31572c 100%);
  background-size: cover;
  background-position: center;
  box-shadow: 10px 14px 24px rgba(24, 32, 42, .28);
  transform: rotateY(-2deg) rotateX(1deg);
  border: 1px solid rgba(0,0,0,.12);
}
.front-preview.gallery .artwork-face { box-shadow: 14px 17px 0 rgba(70, 54, 35, .45), 18px 28px 32px rgba(24, 32, 42, .25); }
.front-preview.normal .artwork-face { box-shadow: 12px 16px 0 var(--side-colour, #fff), 18px 28px 32px rgba(24, 32, 42, .25); }
.side-preview {
  width: 320px;
  height: 210px;
  margin: 24px auto 20px;
  position: relative;
  perspective: 700px;
}
.side-art-front, .side-depth-face {
  position: absolute;
  top: 24px;
  height: var(--side-art-h, 124px);
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(0,0,0,.12);
}
.side-art-front {
  left: 34px;
  width: var(--side-art-w, 150px);
  background: linear-gradient(135deg, #86a9c8, #eef2f4 42%, #8aad69 43%, #31572c);
  transform: rotateY(-18deg);
  box-shadow: 0 16px 24px rgba(20,24,30,.22);
  z-index: 2;
}
.side-depth-face {
  left: calc(34px + var(--side-art-w, 150px) - 2px);
  width: var(--depth-w, 46px);
  transform-origin: left center;
  transform: rotateY(58deg);
  background: var(--side-colour, #fff);
  z-index: 1;
}
.side-preview.gallery .side-depth-face { background: linear-gradient(135deg, #86a9c8, #eef2f4 42%, #8aad69 43%, #31572c); background-size: cover; }
.back-preview {
  width: min(100%, 350px);
  aspect-ratio: 4 / 3;
  margin: 6px auto 16px;
  border: 14px solid var(--wood);
  border-radius: 4px;
  background: #f1dfc3;
  position: relative;
  box-shadow: inset 0 0 0 3px var(--wood-dark), 8px 12px 20px rgba(24, 32, 42, .18);
}
.support-bar {
  position: absolute;
  background: linear-gradient(90deg, #e6bc7d, #c8904c, #e8c58e);
  border: 1px solid #a06e32;
  box-shadow: 0 2px 5px rgba(35, 20, 8, .16);
}
.support-bar.vertical { top: 0; bottom: 0; width: 14px; transform: translateX(-50%); }
.support-bar.horizontal { left: 0; right: 0; height: 14px; transform: translateY(-50%); }
.quote-output { padding: 18px; margin-top: 16px; }
.quote-table { width: 100%; border-collapse: collapse; margin-top: 12px; }
.quote-table th, .quote-table td { border-bottom: 1px solid #eee4d8; text-align: left; padding: 10px; vertical-align: top; }
.quote-table th { color: var(--muted); width: 38%; }
.admin-panel, .modal {
  position: fixed;
  inset: 0;
  background: rgba(16, 18, 24, .46);
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
}
.admin-inner, .modal-card {
  background: #fff;
  border-radius: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  width: min(960px, 96vw);
  max-height: 90vh;
  overflow: auto;
  padding: 22px;
}
.admin-header, .modal-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 16px; }
.structure-guide-grid { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 14px; }
.guide-item { border: 1px solid #ece4dc; border-radius: 16px; padding: 14px; background: #fffdf9; text-align: center; }
.mini-back { width: 100%; aspect-ratio: 1.25 / 1; border: 8px solid var(--wood); background: #fbf7ed; position: relative; margin: 10px 0; box-shadow: inset 0 0 0 2px var(--wood-dark); }
.mini-back.square { aspect-ratio: 1 / 1; }
.mini-back.wide { aspect-ratio: 1.6 / 1; }
.mini-back .support-bar.vertical { width: 8px; }
.mini-back .support-bar.horizontal { height: 8px; }
@media (max-width: 980px) {
  .studio-shell, .preview-grid { grid-template-columns: 1fr; }
  .large-preview { grid-row: auto; }
  .structure-guide-grid { grid-template-columns: repeat(2, minmax(140px, 1fr)); }
}
@media (max-width: 600px) {
  .app-header, .preview-topbar { flex-direction: column; }
  .grid-two, .admin-grid, .segmented, .structure-guide-grid { grid-template-columns: 1fr; }
}
@media print {
  body { background: #fff; }
  .control-panel, .preview-topbar, .preview-grid, .app-header, .admin-panel, .modal { display: none !important; }
  .studio-shell { display: block; padding: 0; }
  .preview-panel { border: none; box-shadow: none; }
  .quote-output { display: block !important; border: none; box-shadow: none; }
}


/* V70 merge: link back to main frame designer */
.header-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;justify-content:flex-end}
.ghost-link{border:1px solid rgba(120,82,35,.28);background:#fff;color:#5f3b12;text-decoration:none;border-radius:999px;padding:10px 14px;font-weight:800;box-shadow:0 8px 20px rgba(60,35,10,.08)}
.ghost-link:hover{background:#fff8ec}

/* V72 structure module cleanup */
.guide-chart-image{display:block;width:100%;height:auto;border:1px solid var(--line);border-radius:18px;background:#fff;box-shadow:0 12px 32px rgba(24,32,42,.08)}
.modal-card{width:min(1180px,96vw)}
.upload-count-note{display:block;margin-top:8px;color:var(--muted);font-weight:700;font-size:12px;line-height:1.4}

/* V73: make the 60-degree Gallery wrap depth artwork visibly continue around the side */
.side-preview.gallery .side-depth-face{
  border-left:0;
  box-shadow: inset 10px 0 18px rgba(0,0,0,.18), 8px 12px 18px rgba(20,24,30,.18);
}
.side-preview.gallery .side-art-front::after{
  content:"";
  position:absolute;
  top:0;
  right:-9px;
  width:10px;
  height:100%;
  background:rgba(0,0,0,.16);
}


/* V74: depth/height-sensitive live stretcher preview */
.front-preview .artwork-face{
  width: var(--art-w, 250px);
  height: var(--art-h, 180px);
  max-width: 92%;
  max-height: 78%;
}
.front-preview.gallery .artwork-face{
  box-shadow: var(--depth-offset, 14px) var(--depth-offset, 14px) 0 rgba(70,54,35,.45), 18px 28px 32px rgba(24,32,42,.25);
}
.front-preview.normal .artwork-face{
  box-shadow: var(--depth-offset, 12px) var(--depth-offset, 12px) 0 var(--side-colour, #fff), 18px 28px 32px rgba(24,32,42,.25);
}
.side-preview::after{
  content: attr(data-depth-label);
  position:absolute;
  left:34px;
  bottom:0;
  font-size:12px;
  color:#5f3b12;
  font-weight:800;
}
.side-depth-face::after{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(90deg, rgba(0,0,0,.16), rgba(255,255,255,.12));
  pointer-events:none;
}


/* V77: larger live preview and real stretcher-depth visual, not shadow-only */
.preview-card.large-preview{
  min-height: 540px;
}
.front-preview{
  width: min(100%, 820px);
  aspect-ratio: 16 / 10;
  min-height: 420px;
  padding: 22px;
}
.front-preview.no-frame{
  padding: 16px;
}
.front-preview .artwork-face{
  position: relative;
  z-index: 2;
  overflow: visible;
  box-shadow: none !important;
  transform: rotateY(-4deg) rotateX(1deg);
}
.front-preview .artwork-face::before,
.front-preview .artwork-face::after{
  content:"";
  position:absolute;
  pointer-events:none;
  z-index:-1;
  border:1px solid rgba(0,0,0,.16);
}
/* right stretcher depth face */
.front-preview .artwork-face::before{
  top: var(--front-depth-top, 10px);
  right: calc(-1 * var(--front-depth, 26px));
  width: var(--front-depth, 26px);
  height: 100%;
  transform: skewY(28deg);
  transform-origin:left top;
  background: var(--front-side-bg, var(--side-colour, #fff));
}
/* bottom stretcher depth face */
.front-preview .artwork-face::after{
  left: var(--front-depth-left, 10px);
  bottom: calc(-1 * var(--front-depth, 26px));
  width: 100%;
  height: var(--front-depth, 26px);
  transform: skewX(28deg);
  transform-origin:left top;
  background: var(--front-bottom-bg, var(--side-colour, #fff));
}
.front-preview.gallery .artwork-face::before,
.front-preview.gallery .artwork-face::after{
  background-image: inherit;
  background-size: cover;
  background-position: right center;
  filter: brightness(.88);
}
.front-preview.normal .artwork-face::before,
.front-preview.normal .artwork-face::after{
  filter: brightness(.96);
}
.front-preview .artwork-face{
  filter: drop-shadow(18px 28px 26px rgba(24,32,42,.20));
}
.side-preview{
  width: min(100%, 520px);
  height: 320px;
  margin-top: 10px;
}
.side-art-front, .side-depth-face{
  top: 42px;
}
.side-art-front{
  left: 48px;
}
.side-depth-face{
  left: calc(48px + var(--side-art-w, 250px) - 2px);
}
.side-preview::after{
  left:48px;
  bottom:20px;
}
.side-preview.gallery .side-depth-face{
  background-image: inherit;
}

/* V78: no-crop artwork and corrected stretcher geometry */
.front-preview{
  width: min(100%, 920px);
  aspect-ratio: 16 / 9;
  min-height: 480px;
  padding: 26px 34px 44px 26px;
  align-items: center;
  justify-items: center;
  overflow: visible;
}
.front-preview .artwork-face{
  background-size: contain !important;
  background-repeat: no-repeat !important;
  background-position: center center !important;
  background-color: #f7f2ea;
  max-width: calc(100% - var(--front-depth, 28px) - 12px);
  max-height: calc(100% - var(--front-depth, 28px) - 18px);
  transform: none !important;
  border: 1px solid rgba(0,0,0,.18);
  filter: drop-shadow(18px 26px 24px rgba(24,32,42,.18));
}
.front-preview .artwork-face::before{
  top: 0;
  right: calc(-1 * var(--front-depth, 26px));
  width: var(--front-depth, 26px);
  height: 100%;
  transform: skewY(18deg);
  transform-origin: left top;
  z-index: -1;
  border-left: 0;
}
.front-preview .artwork-face::after{
  left: 0;
  bottom: calc(-1 * var(--front-depth, 26px));
  width: 100%;
  height: var(--front-depth, 26px);
  transform: skewX(18deg);
  transform-origin: left top;
  z-index: -1;
  border-top: 0;
}
.front-preview.gallery .artwork-face::before,
.front-preview.gallery .artwork-face::after{
  background-image: var(--artwork-image-url, none) !important;
  background-repeat: no-repeat !important;
  background-size: cover !important;
  background-position: center center !important;
  filter: brightness(.86);
}
.front-preview.normal .artwork-face::before,
.front-preview.normal .artwork-face::after{
  background-image: none !important;
  background-color: var(--side-colour, #fff) !important;
}
.side-preview{
  width: min(100%, 620px);
  height: 360px;
  overflow: visible;
}
.side-art-front{
  background-size: contain !important;
  background-repeat: no-repeat !important;
  background-position: center center !important;
  background-color: #f7f2ea;
  border: 1px solid rgba(0,0,0,.18);
  transform: rotateY(-16deg);
}
.side-depth-face{
  background-color: var(--side-colour, #fff) !important;
  background-size: cover !important;
  background-repeat: no-repeat !important;
  background-position: center center !important;
  border: 1px solid rgba(0,0,0,.18);
}
.side-preview.gallery .side-depth-face{
  background-image: var(--artwork-image-url, none) !important;
  filter: brightness(.86);
}
.side-preview:not(.gallery) .side-depth-face{
  background-image: none !important;
}
.side-preview.gallery .side-art-front::after{
  display:none;
}


/* V79: fitted actual image-ratio preview and corrected stretcher corner join */
.front-preview .artwork-face{
  background-size: contain !important;
  background-repeat: no-repeat !important;
  background-position: center center !important;
  overflow: visible !important;
}
.front-preview .artwork-face::before{
  top: 0 !important;
  right: calc(-1 * var(--front-depth, 26px)) !important;
  width: var(--front-depth, 26px) !important;
  height: calc(100% + var(--front-depth, 26px)) !important;
  transform: none !important;
  clip-path: polygon(0 0, 100% 14px, 100% 100%, 0 calc(100% - var(--front-depth, 26px)));
  transform-origin: left top !important;
  border-left: 0 !important;
  z-index: -1 !important;
}
.front-preview .artwork-face::after{
  left: 0 !important;
  bottom: calc(-1 * var(--front-depth, 26px)) !important;
  width: calc(100% + var(--front-depth, 26px)) !important;
  height: var(--front-depth, 26px) !important;
  transform: none !important;
  clip-path: polygon(0 0, calc(100% - var(--front-depth, 26px)) 0, 100% 100%, var(--front-depth, 26px) 100%);
  transform-origin: left top !important;
  border-top: 0 !important;
  z-index: -2 !important;
}
.front-preview.normal .artwork-face::before,
.front-preview.normal .artwork-face::after{
  background-color: var(--side-colour, #fff) !important;
}
.front-preview.gallery .artwork-face::before,
.front-preview.gallery .artwork-face::after{
  background-image: var(--artwork-image-url, none) !important;
  background-size: cover !important;
  background-repeat: no-repeat !important;
  filter: brightness(.86);
}
.front-preview.gallery .artwork-face::before{ background-position: right center !important; }
.front-preview.gallery .artwork-face::after{ background-position: bottom center !important; }
.side-art-front{
  background-size: contain !important;
  background-repeat: no-repeat !important;
  background-position: center center !important;
}


/* V80: remove unwanted white border around uploaded artwork and add language switcher */
.language-switcher{
  display:flex;
  flex-direction:column;
  gap:4px;
  font-weight:800;
  color:#5f3b12;
  font-size:12px;
}
.language-switcher select{
  border:1px solid rgba(120,82,35,.28);
  background:#fff;
  color:#18202a;
  border-radius:999px;
  padding:9px 12px;
  font-weight:800;
}
.front-preview .artwork-face,
.side-preview .side-art-front{
  background-color: transparent !important;
  background-size: 100% 100% !important;
  background-repeat: no-repeat !important;
  background-position: center center !important;
  border: 0 !important;
}
.front-preview .artwork-face{
  outline: 1px solid rgba(0,0,0,.10);
}
.side-preview .side-art-front{
  outline: 1px solid rgba(0,0,0,.10);
}
.front-preview .artwork-face::before,
.front-preview .artwork-face::after{
  outline: none !important;
}
.front-preview .artwork-face::before{
  clip-path: polygon(0 0, 100% 14px, 100% 100%, 0 calc(100% - var(--front-depth, 26px))) !important;
}
.front-preview .artwork-face::after{
  clip-path: polygon(0 0, calc(100% - var(--front-depth, 26px)) 0, 100% 100%, var(--front-depth, 26px) 100%) !important;
}
.front-preview.normal .artwork-face::before,
.front-preview.normal .artwork-face::after,
.side-preview:not(.gallery) .side-depth-face{
  background-color: var(--side-colour, #fff) !important;
}
.side-preview .side-depth-face{
  border:0 !important;
  outline:1px solid rgba(0,0,0,.10);
}

/* V82: cleaner stretcher corner join and no default material selection support */
.front-preview .artwork-face::before{
  height: calc(100% + var(--front-depth, 26px)) !important;
  clip-path: polygon(0 0, 100% 12px, 100% 100%, 0 100%) !important;
  z-index: -1 !important;
}
.front-preview .artwork-face::after{
  width: 100% !important;
  clip-path: polygon(0 0, 100% 0, calc(100% - var(--front-depth, 26px)) 100%, var(--front-depth, 26px) 100%) !important;
  z-index: -2 !important;
}
.front-preview.normal .artwork-face::before,
.front-preview.normal .artwork-face::after{
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.06);
}

/* V83: repaired stretcher geometry.
   Front and 60-degree previews now use clean, independent shapes so improving one view does not break the other. */
.front-preview .artwork-face{
  transform: none !important;
  filter: drop-shadow(16px 24px 24px rgba(24,32,42,.18)) !important;
  overflow: visible !important;
  background-size: 100% 100% !important;
  background-repeat: no-repeat !important;
  background-position: center center !important;
}
.front-preview .artwork-face::before{
  top: 0 !important;
  right: calc(-1 * var(--front-depth, 26px)) !important;
  width: var(--front-depth, 26px) !important;
  height: 100% !important;
  clip-path: polygon(0 0, 100% var(--front-perspective, 12px), 100% calc(100% + var(--front-depth, 26px)), 0 100%) !important;
  transform: none !important;
  border: 0 !important;
  outline: 1px solid rgba(0,0,0,.10) !important;
  z-index: -1 !important;
}
.front-preview .artwork-face::after{
  left: 0 !important;
  bottom: calc(-1 * var(--front-depth, 26px)) !important;
  width: calc(100% + var(--front-depth, 26px)) !important;
  height: var(--front-depth, 26px) !important;
  clip-path: polygon(0 0, 100% var(--front-depth, 26px), calc(100% - var(--front-depth, 26px)) 100%, var(--front-perspective, 12px) 100%) !important;
  transform: none !important;
  border: 0 !important;
  outline: 1px solid rgba(0,0,0,.10) !important;
  z-index: -2 !important;
}
.front-preview.normal .artwork-face::before,
.front-preview.normal .artwork-face::after{
  background: var(--side-colour, #fff) !important;
}
.front-preview.gallery .artwork-face::before,
.front-preview.gallery .artwork-face::after{
  background-image: var(--artwork-image-url, none) !important;
  background-size: cover !important;
  background-repeat: no-repeat !important;
  filter: brightness(.86) !important;
}
.front-preview.gallery .artwork-face::before{background-position:right center !important;}
.front-preview.gallery .artwork-face::after{background-position:bottom center !important;}

.side-preview{
  width: min(100%, 560px) !important;
  height: 330px !important;
  perspective: none !important;
}
.side-preview .side-art-front{
  left: 44px !important;
  top: 44px !important;
  transform: skewY(-3deg) !important;
  transform-origin: right center !important;
  border: 0 !important;
  outline: 1px solid rgba(0,0,0,.10) !important;
  background-size: 100% 100% !important;
  background-repeat: no-repeat !important;
  background-position: center center !important;
  box-shadow: 0 18px 24px rgba(20,24,30,.16) !important;
  z-index: 2 !important;
}
.side-preview .side-depth-face{
  top: 44px !important;
  left: calc(44px + var(--side-art-w, 250px) - 1px) !important;
  height: var(--side-art-h, 150px) !important;
  width: var(--depth-w, 46px) !important;
  transform: skewY(-3deg) !important;
  transform-origin: left center !important;
  border: 0 !important;
  outline: 1px solid rgba(0,0,0,.10) !important;
  box-shadow: inset 8px 0 16px rgba(0,0,0,.20), 10px 14px 18px rgba(20,24,30,.14) !important;
  z-index: 1 !important;
}
.side-preview:not(.gallery) .side-depth-face{
  background-image: none !important;
  background-color: var(--side-colour, #fff) !important;
}
.side-preview.gallery .side-depth-face{
  background-image: var(--artwork-image-url, none) !important;
  background-size: cover !important;
  background-position: right center !important;
  background-repeat: no-repeat !important;
  filter: brightness(.86) !important;
}
.side-preview::after{left:44px !important;bottom:24px !important;}

.admin-structure-shortcut{display:inline-flex;align-items:center;gap:8px;border:1px solid rgba(120,82,35,.28);background:#fff8ec;color:#5f3b12;text-decoration:none;border-radius:999px;padding:10px 14px;font-weight:800;margin-left:8px;}

/* V84 locked surgical fix: remove ONLY the Gallery Wrap front-preview bottom shelf.
   All other functions and previews remain unchanged. */
.front-preview.gallery .artwork-face::after{
  display: none !important;
  content: none !important;
  background-image: none !important;
  background: transparent !important;
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
}

/* V85 locked surgical fix: remove the front-preview bottom depth strip for BOTH Normal Stretcher and Gallery Wrap.
   Keep the right-side depth face and all quote/admin/designer functions unchanged. */
.front-preview .artwork-face::after{
  display: none !important;
  content: none !important;
  background-image: none !important;
  background: transparent !important;
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
}

/* V86: clear stretcher creation workflow. Keep all existing preview/admin/quote functions locked. */
.stretcher-status {
  margin: 14px 0 12px;
  padding: 12px 14px;
  border-radius: 16px;
  font-size: 0.95rem;
  line-height: 1.45;
}
.stretcher-status.pending {
  background: #fff8e8;
  border: 1px solid #ead39a;
  color: #6f4b11;
}
.stretcher-status.created {
  background: #edf9ef;
  border: 1px solid #9ed2aa;
  color: #184f25;
}
.structure-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.structure-actions button[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}
.quotation-basket {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #e7dfd4;
  border-radius: 18px;
  background: #fffaf2;
}
.quotation-basket h3 {
  margin: 0 0 6px;
  color: #18202a;
}
.quotation-basket p {
  margin: 0 0 10px;
  color: #6a7280;
}
.quotation-basket dl {
  margin: 0;
}
.quotation-basket dl div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid #efe9e2;
  padding: 8px 0;
}
.quotation-basket dt {
  color: #6a7280;
}
.quotation-basket dd {
  margin: 0;
  font-weight: 800;
  text-align: right;
  color: #121820;
}

/* V87 locked change: same-page stretcher quotation and preview background control only. */
:root { --live-preview-bg: #FFFFF0; }
.preview-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 10px;
  max-width: 520px;
}
.preview-bg-control {
  margin: 0;
  min-width: 130px;
  font-size: 12px;
}
.preview-bg-control select,
.preview-bg-control input {
  margin-top: 4px;
  padding: 8px 9px;
  border-radius: 10px;
}
.preview-card {
  background: var(--live-preview-bg) !important;
}
.same-page-quote {
  background: rgba(255,255,255,.96);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(20, 24, 30, 0.06);
  margin-top: 18px;
  padding: 20px;
}
.quote-form-header,
.received-quote-main {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}
.quote-preview-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 16px 0;
}
.quote-preview-row article {
  border: 1px solid #eee4d8;
  border-radius: 16px;
  background: #fffaf2;
  padding: 12px;
}
.quote-preview-row img {
  display: block;
  width: 100%;
  max-height: 260px;
  object-fit: contain;
  background: #FFFFF0;
  border-radius: 12px;
  border: 1px solid #efe5d7;
}
.quote-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
textarea {
  width: 100%;
  border: 1px solid #ded8cf;
  border-radius: 12px;
  padding: 11px 12px;
  background: #fff;
  color: var(--ink);
  margin-top: 7px;
  resize: vertical;
  font: inherit;
}
.quote-extra-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 10px;
  margin: 10px 0 14px;
}
.quote-extra-preview img {
  width: 100%;
  height: 88px;
  object-fit: contain;
  background: #FFFFF0;
  border: 1px solid #eee4d8;
  border-radius: 12px;
}
.quote-submit-status {
  margin: 12px 0 0;
  color: #184f25;
  font-weight: 800;
}
.received-quote-card {
  border: 1px solid #e7dfd4;
  border-radius: 18px;
  padding: 16px;
  background: #fffaf2;
}
.received-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}
.received-actions a {
  text-decoration: none;
  display: inline-block;
}
.received-details {
  margin: 12px 0 0;
}
.received-details div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid #efe9e2;
  padding: 9px 0;
}
@media (max-width: 760px) {
  .quote-form-header,
  .received-quote-main,
  .preview-tools { flex-direction: column; align-items: stretch; }
  .quote-preview-row,
  .quote-form-grid { grid-template-columns: 1fr; }
}

/* V88 locked change: stronger custom background and multi-stretcher basket display only. */
.multi-stretcher-list,
.received-details {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}
.basket-line {
  background: #fffaf2;
  border: 1px solid #efe5d7;
  border-radius: 12px;
  padding: 9px 11px;
  color: #18202a;
}
#frontPreview,
#sidePreview,
#backPreview {
  background-color: var(--live-preview-bg, #FFFFF0);
}
#clearStretcherBasket {
  white-space: nowrap;
}

/* V89 locked layout fix: remove 60-degree preview card from the user flow and place back structure next to front preview. */
.preview-grid{
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, .85fr) !important;
  align-items: stretch;
}
.preview-card.large-preview{
  grid-row: auto !important;
  min-height: 520px;
}
.front-live-card + .preview-card{
  min-height: 520px;
}
.back-preview{
  min-height: 300px;
  margin-top: 46px;
}
.same-page-quote .quote-preview-row img{
  min-height: 180px;
}
#receivedQuotePreview.hidden{display:none!important;}
@media (max-width: 980px){
  .preview-grid{grid-template-columns:1fr!important;}
  .front-live-card + .preview-card{min-height:320px;}
}


/* V90 locked change: keep stretcher summary clean after removing ready-message copy. */
.stretcher-status.hidden {
  display: none !important;
}
.quotation-basket {
  padding: 12px 14px;
}
.quotation-basket dl div:first-child {
  border-top: 0;
}

/* V185: Structure Studio dedicated unit panel. Frame Designer untouched. */
.v185-hidden-cm-fields{
  display:none !important;
}
.v185-structure-unit-panel{
  border:1px solid #e2d1b8;
  background:#fffaf2;
  border-radius:18px;
  padding:14px;
  margin:8px 0 14px;
}
.v185-structure-unit-title{
  font-weight:800;
  color:#1f2937;
  margin-bottom:10px;
}
.v185-structure-unit-row{
  display:grid;
  grid-template-columns:1fr 1fr auto;
  gap:10px;
  align-items:end;
}
.v185-structure-unit-row label,
.v185-structure-unit-switch{
  display:flex;
  flex-direction:column;
  gap:6px;
  font-size:13px;
  font-weight:700;
  color:#1f2937;
}
.v185-structure-unit-row input{
  width:100%;
  border:1px solid #d7c3a5;
  border-radius:12px;
  padding:11px 12px;
  background:#fff;
  font-size:15px;
  font-weight:800;
  color:#111827;
}
.v185-structure-unit-buttons{
  display:inline-flex;
  border:1px solid #d7c3a5;
  border-radius:14px;
  overflow:hidden;
  background:#fff;
}
.v185-structure-unit-buttons button{
  border:0;
  background:#fff;
  padding:11px 13px;
  font-weight:800;
  cursor:pointer;
}
.v185-structure-unit-buttons button.active{
  background:#111827;
  color:#fff;
}
.v185-structure-unit-help{
  margin:10px 0 0;
  font-size:12px;
  color:#6b7280;
  line-height:1.4;
}
@media(max-width:720px){
  .v185-structure-unit-row{grid-template-columns:1fr 1fr;}
  .v185-structure-unit-switch{grid-column:1 / -1; align-items:flex-start;}
}
