* { box-sizing: border-box; }
body { margin:0; background:#070707; }
.hcv-wrap { --bg:#070707; --panel:#101010; --border:#2a2a2a; --text:#f3f0e9; --muted:#a9a196; --accent:#b9965e; background:var(--bg); color:var(--text); font-family:Inter,Arial,sans-serif; min-height:100vh; }
.hcv-layout { display:grid; grid-template-columns:340px 1fr; gap:18px; padding:18px; }
.hcv-sidebar { border-right:1px solid var(--border); padding-right:18px; max-height:calc(100vh - 36px); overflow:auto; }
.hcv-title { font-family:Georgia,serif; letter-spacing:.14em; font-size:29px; margin:0; }
.hcv-subtitle { color:var(--accent); font-family:Georgia,serif; font-style:italic; margin:4px 0 18px; }
.hcv-status { color:#a9d18e; font-size:12px; line-height:1.35; margin:8px 0 14px; padding:8px; border:1px solid #25351d; background:#0b1208; border-radius:4px; }
.hcv-stage { border:1px solid var(--border); background:#000; border-radius:4px; overflow:hidden; }
.hcv-canvas { width:100%; display:block; background:#000; }
.hcv-actions { display:flex; gap:10px; justify-content:center; padding:12px; border-top:1px solid var(--border); flex-wrap:wrap; }
.hcv-btn { background:#141414; color:var(--text); border:1px solid var(--border); border-radius:4px; padding:10px 14px; text-transform:uppercase; letter-spacing:.06em; cursor:pointer; }
.hcv-btn:hover,.hcv-btn.active { border-color:var(--accent); }
.hcv-btn.primary { width:100%; background:linear-gradient(180deg,#c4aa79,#9d7d4c); color:#111; border:0; margin-top:4px; }
.hcv-section { margin:0 0 18px; }
.hcv-section-head { display:flex; justify-content:space-between; align-items:center; gap:8px; margin-bottom:8px; }
.hcv-section-title { font-size:13px; text-transform:uppercase; letter-spacing:.08em; font-weight:700; }
.hcv-section-head input[type="color"], .hcv-color-row input[type="color"] { width:42px; height:34px; padding:0; border:1px solid var(--border); background:transparent; }
.hcv-color-row { display:flex; align-items:center; justify-content:space-between; gap:10px; margin:8px 0; font-size:13px; color:var(--muted); }
.hcv-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(115px,1fr)); gap:8px; }
.hcv-card { border:1px solid var(--border); border-radius:4px; padding:6px; background:#0d0d0d; cursor:pointer; text-align:center; color:var(--text); }
.hcv-card.active { border-color:var(--accent); box-shadow:0 0 0 1px rgba(185,150,94,.45); }
.hcv-thumb { width:100%; aspect-ratio:1.45; object-fit:cover; background:#050505; border-radius:3px; display:block; }
.hcv-card span { display:block; font-size:12px; margin-top:6px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.hcv-swatches { display:grid; grid-template-columns:repeat(6,34px); gap:10px; margin-top:10px; }
.hcv-swatch { width:34px; height:34px; border-radius:50%; border:1px solid var(--border); cursor:pointer; }
.hcv-note { color:#8f8a82; font-size:11px; line-height:1.35; margin-top:6px; }
.hcv-warning { color:#d7b16a; font-size:12px; line-height:1.35; margin:12px 0; }
input[type="range"] { width:100%; }
@media (max-width:950px){ .hcv-layout{grid-template-columns:1fr;} .hcv-sidebar{border-right:0;padding-right:0;max-height:none;} }

/* v8: keep the preview and controls within reach on desktop and mobile. */
.hcv-wrap { --bg:#0c0c0c; --panel:#131211; --border:#35302a; --accent:#d0b88d; }
.hcv-brand { height:86px; padding:0 32px; display:flex; align-items:center; justify-content:space-between; gap:20px; border-bottom:1px solid var(--border); }
.hcv-brand-name { font:34px Georgia,serif; letter-spacing:.2em; }
.hcv-brand-studio { display:inline-block; margin-left:14px; color:var(--accent); letter-spacing:.22em; font-size:10px; }
.hcv-local { color:var(--muted); font-size:10px; letter-spacing:.13em; }
.hcv-layout { grid-template-columns:380px minmax(0,1fr); padding:26px 32px; gap:32px; max-width:1600px; margin:auto; }
.hcv-sidebar { max-height:calc(100vh - 138px); scrollbar-width:thin; scrollbar-color:#5b4d3a transparent; padding-right:20px; }
.hcv-title { font-size:31px; letter-spacing:0; font-weight:400; }
.hcv-subtitle { margin:7px 0 20px; font-size:15px; }
.hcv-status { white-space:pre-line; color:#c5cbb8; border-color:#333b2c; background:#151811; line-height:1.55; padding:10px; }
.hcv-section { border-top:1px solid var(--border); padding-top:17px; }
.hcv-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:7px; }
.hcv-card span { white-space:normal; min-height:28px; font-size:11px; line-height:1.3; }
.hcv-thumb { aspect-ratio:1.25; object-fit:contain; }
.hcv-preview-label { font-size:11px; letter-spacing:.12em; color:var(--accent); display:flex; justify-content:space-between; gap:10px; margin:5px 0 16px; }
.hcv-preview-label span { color:var(--muted); letter-spacing:0; }
.hcv-stage { background:#070707; }
.hcv-canvas { height:calc(100vh - 282px); min-height:300px; max-height:850px; object-fit:contain; width:100%; }
.hcv-actions { padding:16px; }
.hcv-disclaimer { color:#a9a196; font-size:11px; line-height:1.5; text-align:center; margin:14px 20px; }
.hcv-save-status { text-align:center; font-size:12px; color:var(--muted); line-height:1.5; }
.hcv-save-status:not(:empty) { padding:0 12px 12px; }
.hcv-save-status a { color:var(--accent); }
.hcv-note { color:#aaa299; line-height:1.5; }
.hcv-btn { font-size:11px; }
.hcv-btn:focus-visible,.hcv-card:focus-visible,.hcv-swatch:focus-visible,input:focus-visible { outline:2px solid #ead8b0; outline-offset:3px; }
.hcv-swatches { grid-template-columns:repeat(6,34px); }
input[type="range"],input[type="checkbox"] { accent-color:#d0b88d; }
#hcv-opacity-value { float:right; color:var(--accent); font-weight:400; }
@media(max-width:950px) {
  .hcv-brand { padding:0 18px; height:76px; }
  .hcv-local { display:none; }
  .hcv-layout { grid-template-columns:1fr; padding:18px; gap:20px; }
  .hcv-layout main { grid-row:1; }
  .hcv-sidebar { max-height:none; padding:0; border:0; }
  .hcv-canvas { height:48vh; min-height:240px; }
  .hcv-preview-label span { display:none; }
  .hcv-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
