@font-face{font-family:'DM Sans';src:url('./fonts/dm-sans.woff2') format('woff2');font-weight:400;font-display:swap}
@font-face{font-family:'DM Sans';src:url('./fonts/dm-sans-semibold.woff2') format('woff2');font-weight:500 700;font-display:swap}
@font-face{font-family:Fraunces;src:url('./fonts/fraunces.woff2') format('woff2');font-weight:500;font-display:swap}
@font-face{font-family:'Happy Sans';src:url('./fonts/sans.woff') format('woff');font-display:swap}
@font-face{font-family:'Happy Serif';src:url('./fonts/serif.woff') format('woff');font-display:swap}
:root{font-family:'DM Sans',Arial,sans-serif;color:#252e28;background:#fff;--green:#3f5145;--soft:#edf2e8;--sage:#dce6d9;--line:#c7d2c5;--muted:#606b62;font-synthesis:none;color-scheme:light}
*{box-sizing:border-box}[hidden]{display:none!important}body{margin:0}button,input,textarea,select{font:inherit}button{cursor:pointer;border:1px solid var(--line);border-radius:8px;min-height:44px;padding:11px 15px;color:var(--green);background:#fff;font-size:14px;font-weight:500;transition:background .16s,border-color .16s}button:hover:not(:disabled){background:var(--soft);border-color:var(--green)}button:disabled{opacity:.5;cursor:default}button:focus-visible,input:focus-visible,textarea:focus-visible,summary:focus-visible,.conversation:focus-visible{outline:3px solid #8e653a;outline-offset:3px}::selection{background:var(--sage)}
.studio-header{max-width:1440px;margin:auto;padding:7px 36px;display:flex;gap:14px;align-items:center;font-size:12px;color:var(--muted);border-bottom:1px solid #e7ebe5}.brand{font-size:18px;color:var(--green);font-weight:600;letter-spacing:-1px;text-decoration:none}.brand span{font-size:11px;vertical-align:top}.prototype{margin-left:auto;font-size:11px}.embedded .studio-header{padding-top:6px;padding-bottom:6px}.embedded .brand{display:none}
main{max-width:1440px;margin:auto;padding:16px 36px 30px}.eyebrow{font-size:11px;font-weight:600;letter-spacing:1.7px;color:var(--green);margin:0 0 10px}
.studio{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(350px,1fr);gap:28px;align-items:start}.workspace,aside{min-width:0}h2{font-size:15px;line-height:1.3;font-weight:600;margin:0}.sectionline{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin-bottom:8px}.sectionline span{font-size:12px;color:var(--muted)}
.products{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}.product-choice{position:relative;display:flex;flex-direction:row;align-items:center;text-align:left;gap:8px;padding:7px 10px;border:2px solid #e5eae2;background:#fff;min-width:0}.product-choice[aria-pressed=true]{border-color:var(--green);background:var(--soft)}.product-choice[aria-pressed=true]::after{content:'✓';position:absolute;right:4px;top:4px;border-radius:50%;background:var(--green);color:white;width:14px;height:14px;font-size:10px;line-height:14px}.product-thumb{width:42px;height:42px;flex-shrink:0;object-fit:contain;background:#fff;border-radius:4px;display:block}.product-choice span{font-size:13px;font-weight:600;line-height:1.3}.product-choice small{display:block;font-size:11px;font-weight:400;margin-top:3px;color:var(--muted)}
.canvas{position:relative;background:#fff;margin-top:10px;min-height:320px;border-radius:12px;overflow:hidden;display:grid;place-items:center;padding:10px 24px 12px;border:1px solid #edf0ea}.candle-figure{margin:0;width:100%;min-width:0}.product-photo-stage{position:relative;width:100%;max-width:400px;min-height:200px;margin:auto;background:#fff}.product-photo-stage>img,#product-preview{display:block;width:100%;height:auto;max-height:440px;object-fit:contain}figcaption{font-size:11px;color:var(--muted);text-align:center;margin-top:7px}.candle{width:200px;height:240px;background:var(--jar,#343432);margin:auto;border-radius:12px;position:relative}.jar-label{position:absolute;top:30%;left:8%;width:84%}.jar-label svg{display:block;width:100%;height:auto}.workspace-bottom{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-top:9px;font-size:11px;color:var(--muted)}.workspace-bottom p{margin:0}.fine{font-size:11px;line-height:1.6;color:var(--muted);margin:10px 0 0}
.chat{background:var(--soft);border:1px solid #e0e7da;border-radius:12px;padding:16px}.chat-heading{display:flex;align-items:center;justify-content:space-between;gap:14px}.chat-heading .eyebrow{font-size:11px;letter-spacing:1.2px;margin-bottom:7px}.chat-heading h2{font-size:17px;font-weight:600}.ai-state{flex-shrink:0;border:1px solid #cdd7c8;border-radius:20px;background:#fff;padding:6px 8px;font-size:11px;color:var(--green)}.ai-state::before{content:'';display:inline-block;width:6px;height:6px;background:#587859;border-radius:50%;margin-right:5px}.chat-intro{font-size:13px;line-height:1.6;color:var(--muted);margin:12px 0 17px}.conversation{height:120px;margin-top:12px;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#a9baa1 transparent;padding:2px 7px 4px 0;display:flex;flex-direction:column;gap:12px;font-size:13px;line-height:1.55;overflow-wrap:anywhere}.message{max-width:95%;padding:9px 12px;border-radius:10px;background:#fff;border:1px solid #e1e7dc;flex-shrink:0}.message.user{align-self:flex-end;background:var(--green);color:#fff;border-color:var(--green)}.message-label{display:block;font-size:11px;font-weight:600;letter-spacing:.25px;margin-bottom:5px}.message p{margin:0}.message.user .message-label{color:#d9e6d3}.message.assistant .message-label{color:var(--green)}
label{display:block;font-size:12px;font-weight:600;margin:12px 0 6px}input,textarea,select{font-size:16px;border:1px solid #bcc8b8;border-radius:8px;background:#fff;color:#252e28;padding:12px;display:block;width:100%}textarea{resize:vertical;min-height:82px;max-height:200px;line-height:1.55}.primary{display:flex;align-items:center;justify-content:center;gap:14px;background:var(--green);border-color:var(--green);color:#fff;width:100%;margin-top:10px;min-height:47px}.primary:hover:not(:disabled){background:#2e4035;border-color:#2e4035}.primary span{font-size:20px}.examples{display:flex;gap:6px;flex-wrap:wrap;margin-top:10px;align-items:center}.examples>span{font-size:11px;color:var(--muted);width:100%}.examples button{padding:6px 9px;min-height:34px;font-size:11px;border-color:#ccd6c7;background:transparent}#cancel-job{width:100%;margin-top:8px;background:transparent}
.generation-overlay{position:absolute;inset:0;background:#ffffffd9;backdrop-filter:blur(3px);z-index:2;display:grid;place-items:center;padding:18px}.generation-card{width:min(100%,300px);padding:27px 20px;text-align:center;border:1px solid var(--line);border-radius:14px;background:var(--soft);box-shadow:0 12px 32px #28392b12}.generation-card strong{display:block;font-family:Fraunces,Georgia,serif;font-size:25px;font-weight:500;line-height:1.2}.generation-card p{font-size:12px;color:var(--muted);line-height:1.65}.generation-card button{font-size:11px;background:transparent}.loading-ring{display:block;width:28px;height:28px;border:2px solid #c9d5c2;border-top-color:var(--green);border-radius:50%;animation:spin .9s linear infinite;margin:0 auto 17px}.loading-ring.small{display:inline-block;flex-shrink:0;width:15px;height:15px;margin:0}.generation-status{display:flex;align-items:center;gap:9px;font-size:12px;color:var(--green);font-weight:500;margin-top:12px;padding:11px;background:var(--sage);border-radius:7px}@keyframes spin{to{transform:rotate(360deg)}}
.order{display:grid;grid-template-columns:1fr 92px;align-items:center;gap:3px 15px;margin-top:14px;padding:0 2px}.price-summary{grid-column:1;margin:0;font-size:15px;font-weight:500;color:var(--green)}.order label{grid-column:2;grid-row:1;margin:0;font-size:11px;align-self:start}.order input{grid-column:2;grid-row:2;width:92px;padding:8px 10px}.order>.fine{grid-column:1;grid-row:2;margin:0;font-size:11px;max-width:260px}details{border-top:1px solid #dce3d7;margin-top:14px;padding-top:10px}summary{cursor:pointer;font-size:12px;font-weight:500;color:var(--green);padding:3px 0}.library{margin-top:14px}.draft-list{display:flex;flex-wrap:wrap;gap:8px;padding-top:13px}.draft-entry{text-align:left;max-width:220px;overflow-wrap:anywhere}.draft-entry strong{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:12px;font-weight:500}.draft-entry span{font-size:11px;display:block;margin-top:4px}.draft-entry[aria-pressed=true]{background:var(--soft);border-color:var(--green)}#history-list{display:flex;flex-wrap:wrap;gap:6px;padding-top:10px}#history-list button{max-width:100%;font-size:11px;overflow-wrap:anywhere}.check{display:flex;gap:8px;align-items:flex-start;font-size:12px;font-weight:400;line-height:1.5}.check input{width:18px;height:18px;flex-shrink:0;accent-color:var(--green);margin:0}#error:not(:empty){background:#fff0ed;border:1px solid #e7c4bc;color:#822f21;border-radius:8px;padding:12px;font-size:13px;line-height:1.5;margin-top:14px}.job-entry{font-size:12px;overflow-wrap:anywhere;padding-top:12px}.job-entry img{max-width:130px;display:block;margin:10px 0}.job-entry button{font-size:12px}
@media(min-width:1100px){.workspace{position:sticky;top:20px}}
@media(max-width:1000px){main{padding:14px 24px 26px}.studio{gap:22px;grid-template-columns:minmax(0,1.1fr) minmax(320px,1fr)}.canvas{padding:12px 8px}.chat{padding:18px}.product-thumb{width:34px;height:34px}.product-choice small{font-size:11px}.sectionline span{display:none}.chat-heading h2{font-size:17px}}
@media(max-width:760px){.studio{grid-template-columns:1fr;gap:16px}.studio-header{padding:6px 16px;gap:10px}.studio-header>span{font-size:11px}.brand{font-size:20px}main{padding:12px 16px 25px}.products{gap:7px}.product-thumb{width:30px;height:34px}.product-choice{padding:5px 6px;gap:4px;justify-content:center}.product-choice span{font-size:12px}.product-choice small{font-size:11px}.canvas{min-height:220px;padding:8px}.product-photo-stage{max-width:255px}.product-photo-stage>img,#product-preview{max-height:370px}.workspace-bottom{font-size:11px}.workspace>.fine{font-size:11px}.chat{padding:15px}.chat-heading h2{font-size:17px}.conversation{height:110px}.library,.history-panel{margin-top:15px;padding-top:12px}.order{padding:0 5px}.generation-card{max-width:270px}}
@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}.loading-ring{border-style:dotted}}

.style-picker{margin-bottom:12px}.style-picker h2{margin-bottom:8px}.styles{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}.style-choice{padding:4px 4px 7px;border:2px solid var(--line);background:white;text-align:left;min-width:0;border-radius:10px}.style-choice img{display:block;width:100%;height:58px;object-fit:cover;border-radius:4px;margin-bottom:5px}.style-choice strong{font-size:13px;display:block;padding:0 4px}.style-choice small{font-size:11px;font-weight:400;line-height:1.4;display:none;padding:3px 4px 0;color:var(--muted)}.style-choice[aria-pressed=true]{border-color:var(--green);background:var(--soft)}.style-choice[aria-pressed=true] strong::after{content:' ✓';float:right}.format-notice{margin:15px 0 0;padding:13px 16px;background:var(--soft);border:1px solid var(--line);border-radius:9px;font-size:13px;line-height:1.6;color:var(--green)}.product-choice[data-pending=true]{outline:2px dashed var(--green);outline-offset:3px}.message.system{background:transparent;border-style:dashed}.style-picker .fine{margin-top:7px}@media(max-width:760px){.style-picker{margin-bottom:12px}.style-choice small{font-size:11px}.style-choice strong{font-size:12px}.format-notice{font-size:12px}.styles{gap:7px}}

.field-error:empty{display:none}.field-error{font-size:13px;line-height:1.5;color:#822f21;margin:8px 0 0;overflow-wrap:anywhere}.order #quantity-error{grid-column:1/-1;grid-row:3}.field-error:focus-visible,#error:focus-visible{outline:3px solid #8e653a;outline-offset:3px}[aria-invalid=true]{border-color:#822f21}input,textarea,.field-error,#error{scroll-margin-block:24px}

.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}.studio-header #new-design{min-height:36px;padding:7px 11px;font-size:12px;flex-shrink:0}.style-choice strong{line-height:1.25}.style-choice[aria-pressed=true]{box-shadow:inset 0 0 0 1px var(--green)}
@media(max-width:1000px){.product-choice{gap:5px;padding:6px}.product-choice small{display:none}.sectionline span{display:block}}
@media(max-width:760px){.product-choice small{display:none}.product-choice{min-height:48px}.studio-header .brand{display:none}.studio-header #new-design{min-height:40px;font-size:11px;padding:7px 9px}.prototype{font-size:10px}.style-choice img{height:48px}.workspace .library,.workspace .history-panel{margin-top:9px;padding-top:6px}.workspace>.fine{margin-top:5px}.chat-form{margin:0}}

/* Fixed templates: exact copy replaces the open-ended conversation. */
.fixed-template-mode .format-notice { margin: 8px 0; padding: 10px 12px; font-size: 12px; }
.fixed-template-mode .chat { margin-top: 0; }

/* Six alternatives stay beside the product, with one large chosen preview. */
.variant-picker { margin-top: 16px; }
.variant-picker .sectionline { margin-bottom: 8px; }
.variant-picker h2 { font-size: 15px; }
#variant-selection { font-size: 12px; }
.variant-grid { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 7px; }
.variant-choice { position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 7px; min-width: 0; padding: 7px 5px; background: #fff; border: 2px solid #e1e7df; border-radius: 8px; color: #3e5043; }
.variant-choice img { width: 100%; height: 96px; object-fit: contain; }
.variant-choice span { font-size: 10px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.variant-choice[aria-pressed="true"] { border-color: #3e5043; background: #edf2e8; }
.variant-choice[aria-pressed="true"]::after { content: '✓'; position: absolute; right: 3px; top: 3px; color: #fff; background: #3e5043; width: 18px; height: 18px; border-radius: 50%; font-size: 12px; line-height: 18px; }
.variant-choice:disabled { cursor: default; opacity: .55; }
.variant-picker .fine { margin: 8px 0 0; }
@media(max-width:720px) { .variant-grid { grid-template-columns: repeat(3,minmax(0,1fr)); } .variant-choice img { height: 90px; } }

/* Quiet, optional adjustments for the selected Happysoy composition. */
.fine-controls{border:1px solid var(--line);border-radius:10px;margin:12px 0;background:#fff;padding:0 16px}.fine-controls>summary{font-size:14px;font-weight:600;padding:14px 0;cursor:pointer;color:var(--green)}.fine-controls>p{margin:0 0 12px}.line-controls{display:grid;gap:13px;margin:16px 0 22px}.line-control label{display:block;font-size:12px;font-weight:600;line-height:1.5;margin:0;overflow-wrap:anywhere}.line-control>div{display:flex;align-items:center;gap:14px}.line-control input[type=range]{min-width:0;flex:1;width:100%;height:32px;margin:0;accent-color:var(--green);padding:0}.line-control output{width:48px;flex:none;font-size:12px;text-align:right;font-variant-numeric:tabular-nums}.fine-controls fieldset{border:0;padding:0;margin:0 0 16px;min-width:0}.fine-controls legend{font-size:13px;font-weight:600;margin-bottom:9px}.motif-choices{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px}.motif-choices button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;padding:9px 2px;min-width:0;min-height:72px;font-size:10px;line-height:1.2}.motif-choices svg,.no-motif{width:25px;height:25px}.no-motif{font-size:23px;line-height:25px}.fine-controls button[aria-pressed=true]{background:var(--soft);border-color:var(--green);box-shadow:inset 0 0 0 1px var(--green)}.motif-position>div{display:flex;gap:6px}.motif-position button{flex:1;padding:9px;font-size:12px}#reset-fine{font-size:12px;margin:0 0 12px;min-height:40px;padding:8px 11px}.fine-controls .fine{font-size:11px;line-height:1.5}
@media(max-width:380px){.motif-choices{grid-template-columns:repeat(4,minmax(0,1fr))}}

.fine-hint{position:relative;display:block;margin:10px 0 0 12px;padding:9px 12px;border-radius:8px;background:#943b3e;color:#fff;font-size:12px;font-weight:600;line-height:1.45}.fine-hint::before{content:"";position:absolute;top:-4px;left:15px;width:9px;height:9px;background:#943b3e;transform:rotate(45deg)}.fine-controls[open] .fine-hint{display:none}

.line-control{padding:10px;border:1px solid var(--line);border-radius:8px;background:#fafbf8}.line-control .line-heading{display:flex;gap:6px;margin-bottom:6px}.line-heading label{flex:1}.line-grip{cursor:grab;font-size:24px;line-height:32px;padding:0 4px;color:var(--muted)}.line-grip:active{cursor:grabbing}.line-heading .move-line{width:36px;min-height:36px;padding:4px;font-size:18px}.line-control input[type=text]{display:block;width:100%;min-width:0;margin:0 0 5px;padding:8px 10px;font-size:14px;border:1px solid var(--line);border-radius:6px;background:white}.line-control.line-drop{border:2px solid var(--green);background:var(--soft)}.line-edit-actions{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 20px}.line-edit-actions button{font-size:12px;padding:9px 11px}#apply-lines{background:var(--green);color:white}.fine-controls #line-edit-status:empty{display:none}

.line-grip{touch-action:none;user-select:none}

@media(max-width:600px){.line-control input[type=text]{font-size:16px}}

/* Compact font controls and a pastel palette confined to the ornament. */
.line-control .line-font{gap:10px;margin:6px 0}.line-font label{flex:none}.line-font select{min-width:0;width:100%;padding:8px;font:inherit;font-size:13px;background:white;border:1px solid var(--line);border-radius:6px;color:var(--ink)}
#add-line{margin:0 0 10px;padding:9px 12px;font-size:13px;border-style:dashed}.color-choices{display:flex;flex-wrap:wrap;gap:6px}.color-choices button{display:flex;align-items:center;gap:6px;padding:7px 9px;min-height:36px;font-size:11px}.palette-swatch{display:block;flex:none;width:18px;height:18px;border-radius:50%;border:1px solid #0002}
@media(max-width:600px){.line-font select{font-size:16px}}

.motif-size>div{display:flex;align-items:center;gap:14px}.motif-size input[type=range]{min-width:0;flex:1;width:100%;height:36px;margin:0;padding:0;accent-color:var(--green)}.motif-size output{width:48px;flex:none;font-size:12px;text-align:right;font-variant-numeric:tabular-nums}

.font-pair-picker{margin:0 0 16px}.font-pair-picker h3{font-size:13px;font-weight:600;line-height:1.4;margin:0 0 8px}.font-pairs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.font-pair-choice{position:relative;padding:8px 5px;background:white;border:1px solid var(--line);border-radius:8px;min-width:0;color:var(--green)}.font-pair-choice img{display:block;width:100%;height:72px;object-fit:contain}.font-pair-choice[aria-pressed=true]{border-color:var(--green);box-shadow:inset 0 0 0 1px var(--green);background:#f7f9f3}.font-pair-choice[aria-pressed=true]::after{content:'✓';position:absolute;top:2px;right:4px;font-size:11px;font-weight:700}.font-pair-picker .fine{margin:7px 0 0;font-size:11px}
@media(max-width:450px){.font-pairs{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Both purchase actions stay visible without a separate approval panel. */
.cart-action{margin:12px 0}.cart-action .cart-button{margin:0;min-height:48px;font-weight:600}.cart-note{margin:6px 2px 0}.cart-action-bottom{margin:16px 0 0}.cart-button[aria-busy=true]{cursor:progress}

/* Keep the complete candle names legible in narrow product tiles. */
.product-choice span{min-width:0;overflow-wrap:normal}.product-choice{flex-wrap:wrap}@media(max-width:760px){.product-choice{flex-direction:column;flex-wrap:nowrap;text-align:center;gap:3px}.product-choice span{font-size:11px;line-height:1.25}}

/* Scene photos fill the preview; label and photo share one projected canvas. */
.canvas.scene-preview{padding:0;min-height:0;border:0;background:#deddd1}
.scene-preview .product-photo-stage{max-width:none;min-height:0;background:transparent}
.scene-preview .product-photo-stage>img,.scene-preview #product-preview{width:100%;height:auto;max-height:none;object-fit:cover}
@media(max-width:760px){.scene-preview .product-photo-stage>img,.scene-preview #product-preview{aspect-ratio:1;object-position:54% center}}
