/* Extends the existing toolbox; cream/orange belongs to the exported collage. */
.cc-pane { --cc-ink:#29231e; --cc-muted:#6c5b4c; --cc-line:#dfd4c5; --cc-paper:#faf7f1; --cc-orange:#a63d13; color:var(--cc-ink); }
.cc-pane [hidden] { display:none !important; }
.cc-pane button,.cc-pane input,.cc-pane select,.cc-pane textarea { font:inherit; }
.cc-pane button { min-height:44px; padding:10px 16px; border:1px solid var(--cc-line); background:#fff; color:var(--cc-ink); border-radius:9px; cursor:pointer; }
.cc-pane button:hover { background:#fff1df; border-color:var(--cc-orange); }
.cc-pane button:disabled { cursor:wait; opacity:.6; }
.cc-pane :focus-visible { outline:3px solid #bb572c; outline-offset:3px; }
.cc-pane ::selection { background:#ffdbb2; color:#29231e; }
.cc-pane input,.cc-pane textarea { caret-color:var(--cc-orange); }
.cc-pane label { display:flex; flex-direction:column; gap:8px; font-size:14px; font-weight:600; min-width:0; }
.cc-pane input:not([type=checkbox]):not([type=range]),.cc-pane select,.cc-pane textarea { width:100%; box-sizing:border-box; padding:11px 12px; color:var(--cc-ink); background:#fff; border:1px solid var(--cc-line); border-radius:8px; font-size:16px; min-height:44px; }
.cc-pane input::placeholder,.cc-pane textarea::placeholder { color:#796a5d; }
.cc-pane textarea { resize:vertical; line-height:1.6; }
.cc-pane .cc-primary { background:var(--cc-orange); color:#fff; border-color:var(--cc-orange); font-weight:650; }
.cc-pane .cc-primary:hover { background:#84300e; }
.cc-toolbar,.cc-work-head,.cc-intro,.cc-generate-row { display:flex; justify-content:space-between; align-items:center; gap:20px; flex-wrap:wrap; }
.cc-toolbar { margin-top:18px; }
.cc-toolbar label { flex:1; max-width:430px; }
.cc-status { line-height:1.6; margin:18px 0; color:var(--cc-muted); }
.cc-pane .is-error { color:#a42b20; }
.cc-intro { margin:28px 0 22px; }
.cc-intro h3,.cc-work-head h3 { margin:0 0 8px; font-size:26px; letter-spacing:-.02em; }
.cc-intro p,.cc-work-head p { margin:0; line-height:1.6; color:var(--cc-muted); }
.cc-intro>span { font-size:13px; color:var(--cc-muted); font-variant-numeric:tabular-nums; }
@font-face { font-family:CollageHeadline; src:url('/assets/xhs-collage/fonts/ZCOOLKuaiLe-Regular.ttf') format('truetype'); font-display:swap; }
.cc-stage-demo { height:360px; margin-bottom:28px; position:relative; overflow:hidden; background:#f8f2e6; border-radius:12px; }
.cc-stage-demo::before { content:""; position:absolute; width:43%; height:94%; right:2%; top:3%; background:url('/assets/xhs-collage/previews/products.png?v=reference2') center/contain no-repeat; transform:rotate(3deg); }
.cc-demo-wiring::before { background-image:url('/assets/xhs-collage/previews/wiring.png?v=reference2'); }
.cc-demo-installation::before { background-image:url('/assets/xhs-collage/previews/installation.png?v=reference2'); }
.cc-demo-scenes::before { background-image:url('/assets/xhs-collage/previews/scenes.png?v=reference2'); }
.cc-stage-demo>div { position:relative; display:flex; flex-direction:column; align-items:flex-start; justify-content:center; padding:26px 30px; width:60%; height:100%; box-sizing:border-box; }
.cc-stage-demo strong,.cc-stage-demo b { font-family:CollageHeadline,"PingFang SC",sans-serif; font-size:clamp(22px,2.6vw,36px); font-weight:400; line-height:1.35; }
.cc-stage-demo b { color:#bd4105; margin:5px 0 12px; text-decoration:underline; text-decoration-color:#f2c029; text-decoration-thickness:5px; text-underline-offset:8px; }
.cc-stage-demo span { font-size:16px; padding:6px 14px; background:#ffe5bd; border-radius:30px; }
.cc-stage-demo small { margin-top:16px; color:#695747; }
.cc-form-row { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; }
.cc-form-row label>span { font-weight:400; color:var(--cc-muted); display:inline; }
.cc-stage-field { border:0; padding:0; margin:28px 0; min-width:0; }
.cc-stage-field legend { font-size:16px; font-weight:650; margin-bottom:12px; }
.cc-stages { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; }
.cc-pane .cc-stage { padding:0 0 14px; overflow:hidden; text-align:left; border-radius:12px; }
.cc-stage-photo { display:block; aspect-ratio:3/4; background-size:cover; background-position:center; }
.cc-photo-0 { background-image:url('/assets/xhs-collage/previews/products.png?v=reference2'); }
.cc-photo-1 { background-image:url('/assets/xhs-collage/previews/wiring.png?v=reference2'); }
.cc-photo-2 { background-image:url('/assets/xhs-collage/previews/installation.png?v=reference2'); }
.cc-photo-3 { background-image:url('/assets/xhs-collage/previews/scenes.png?v=reference2'); }
.cc-stage strong,.cc-stage>span:last-child { display:block; margin:10px 12px 0; }
.cc-stage>span:last-child { font-size:12px; color:var(--cc-muted); margin-top:5px; }
.cc-pane .cc-stage.is-selected { outline:2px solid var(--cc-orange); outline-offset:2px; background:#fff4e6; }
.cc-muted { font-size:13px; line-height:1.6; color:var(--cc-muted); }
.cc-upload { padding:20px; background:var(--cc-paper); border-radius:12px; margin:20px 0; }
.cc-pane .cc-checkbox { display:flex; flex-direction:row; align-items:center; font-weight:400; font-size:14px; line-height:1.5; }
.cc-checkbox input { width:18px; height:18px; flex-shrink:0; accent-color:var(--cc-orange); }
.cc-more { border-block:1px solid var(--cc-line); padding:18px 0; margin:24px 0; }
.cc-pane summary { cursor:pointer; min-height:28px; }
.cc-more[open]>div { margin:18px 0; }
.cc-generate-row p { flex:1; min-width:220px; max-width:650px; }
.cc-generate-row button { min-width:200px; }
.cc-brand-edit { display:grid; grid-template-columns:2fr 1fr auto; align-items:end; gap:18px; padding:24px 0; }
.cc-brand-edit>span { font-size:13px; color:var(--cc-muted); padding-bottom:12px; }
.cc-pages { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:14px; margin:0 0 28px; }
.cc-pane .cc-page { padding:5px; text-align:left; background:var(--cc-paper); border-radius:8px; }
.cc-page img { width:100%; aspect-ratio:3/4; object-fit:contain; display:block; }
.cc-page span { display:block; padding:7px 3px; font-size:12px; }
.cc-pane .cc-page.is-selected { outline:2px solid var(--cc-orange); outline-offset:2px; }
.cc-edit-grid { display:grid; grid-template-columns:minmax(0,1.1fr) minmax(300px,1fr); gap:28px; align-items:start; }
.cc-preview-wrap { position:sticky; top:18px; }
.cc-preview-wrap>img { width:100%; display:block; aspect-ratio:3/4; background:var(--cc-paper); box-shadow:0 12px 32px rgba(60,39,16,.12); }
.cc-controls { display:flex; flex-direction:column; gap:16px; }
.cc-controls h4 { font-size:18px; margin:0; }
.cc-controls>p:empty { display:none; }
.cc-controls details { padding:12px 0; border-block:1px solid var(--cc-line); }
.cc-controls details label { margin-top:12px; }
.cc-controls input[type=range] { width:100%; accent-color:var(--cc-orange); }
.cc-secondary-actions,.cc-background-action,.cc-downloads { display:flex; gap:10px; flex-wrap:wrap; align-items:center; }
.cc-file-label input { font-size:13px!important; }
.cc-export { margin-top:36px; padding-top:22px; border-top:1px solid var(--cc-line); }
.cc-export h4 { font-size:20px; margin:0 0 16px; }
.cc-export>label { margin-top:22px; }
.cc-card-cover { background:#f6f0e5; padding:20px; color:#211d19; position:relative; }
.cc-card-cover>strong { font-size:24px; line-height:1.3; position:relative; z-index:1; }
.cc-card-cover>strong>b { color:#ba4512; }
.cc-card-cover>img { position:absolute; width:48%!important; height:145%!important; right:-4%; top:-12%; object-fit:cover; transform:rotate(7deg); }
.cc-card-cover>strong { font-family:CollageHeadline,"PingFang SC",sans-serif; font-weight:400; max-width:58%; }
@media(max-width:760px) {
 .cc-stages { grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
 .cc-edit-grid { grid-template-columns:minmax(0,1fr); }
 .cc-preview-wrap { position:static; }
 .cc-brand-edit { grid-template-columns:minmax(0,1fr); gap:12px; }
 .cc-pages { gap:7px; overflow-x:auto; grid-template-columns:repeat(5,minmax(95px,1fr)); padding:4px; }
 .cc-stage-demo { height:235px; }.cc-stage-demo>div { width:61%; padding:15px; }.cc-stage-demo::before { width:39%; right:0; }.cc-stage-demo strong,.cc-stage-demo b { font-size:20px; }
 .cc-form-row { grid-template-columns:minmax(0,1fr); gap:14px; }
 .cc-intro h3 { font-size:24px; }
 .cc-generate-row button { width:100%; }
 .cc-downloads button { flex:1 1 140px; }
}
@media(prefers-reduced-motion:reduce) { .cc-pane * { scroll-behavior:auto; } }
/* The host has pill-button rules; stage cards and page previews keep rectangular photos. */
#xhs #xhsCollagePane button.cc-stage { border-radius:12px !important; }
#xhs #xhsCollagePane button.cc-page { border-radius:8px !important; }
