/* All commerce styles stay inside this page and its own dialogs. */
.hc-root { --hc-accent:var(--gold,#c9a96a);--hc-muted:var(--muted,#aaa398);--hc-line:rgba(201,169,106,.18);--hc-surface:#171619;--hc-ink:var(--ink,#ece8e1);color:var(--hc-ink);min-width:0; }
.hc-root button,.hc-root input,.hc-root textarea,.hc-root select,.hc-dialog button { font:inherit; }
.hc-layout { display:grid;grid-template-columns:minmax(330px,390px) minmax(0,1fr);gap:22px;align-items:start; }
.hc-editor,.hc-records { min-width:0;border:1px solid var(--hc-line);border-radius:16px;background:linear-gradient(135deg,#1b191df5,#121115f5);box-shadow:0 10px 32px #0002,inset 0 1px 0 #ffffff05; }
.hc-editor { padding:25px; }
.hc-editor-heading { padding-bottom:20px;margin-bottom:21px;border-bottom:1px solid var(--hc-line); }
.hc-eyebrow { font:9px var(--mono,monospace);color:var(--hc-accent);letter-spacing:.16em; }
.hc-root .hc-editor-heading h2 { font-size:22px;font-weight:550;letter-spacing:.02em;margin:10px 0;line-height:1.4; }
.hc-editor-heading p { font-size:11px;line-height:1.9;color:var(--hc-muted);margin:0; }
.hc-section-heading { display:flex;align-items:center;gap:9px;margin:24px 0 13px; }
.hc-form>.hc-section-heading:first-child { margin-top:0; }
.hc-root .hc-section-heading h3 { font-size:12px;font-weight:550;margin:0; }
.hc-step { font:10px var(--mono,monospace);color:var(--hc-accent);opacity:.7; }
.hc-optional { font-size:10px;color:var(--hc-muted);margin-left:auto; }
.hc-drop { border:1px dashed #c9a96a55;background:radial-gradient(ellipse at 50% 0,#c9a96a0a,transparent),#ffffff02;border-radius:11px;padding:25px 12px 19px;text-align:center;transition:border-color .2s,background .2s; }
.hc-drop.is-dragover { background:#c9a96a16;border-color:var(--hc-accent); }
.hc-drop.is-disabled { border-color:#ffffff1a; }
.hc-drop>svg { display:block;margin:0 auto 12px;width:25px;height:25px;color:var(--hc-accent); }
.hc-drop strong { display:block;font-size:13px;font-weight:500;color:var(--hc-accent); }
.hc-drop-hint,.hc-drop-limit { font-size:10px;line-height:1.8;color:var(--hc-muted);margin:10px 0 0; }
.hc-drop-limit { margin:3px 0; }
.hc-drop small { display:block;font-size:10px;color:var(--hc-muted);line-height:1.8; }
.hc-upload-actions { display:flex;justify-content:center;gap:12px;margin-top:16px; }
.hc-button { display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:35px;border-radius:7px;padding:0 12px;font-size:11px!important;line-height:1.5;background:none;border:1px solid transparent;color:inherit;text-decoration:none;transition:background .15s,border-color .15s; }
.hc-button svg { width:15px;height:15px; }
.hc-button-outline { border-color:#c9a96a50;color:var(--hc-accent,#c9a96a);background:#c9a96a04; }
.hc-button-outline:hover:not(:disabled) { background:#c9a96a12;border-color:#c9a96a88; }
.hc-button-primary { background:linear-gradient(120deg,#dec18a,#ba985a);border-color:#c9a96a;color:#211c14;box-shadow:0 4px 16px #c9a96a12; }
.hc-button-primary:hover:not(:disabled) { background:linear-gradient(120deg,#e5cc9d,#c6a263); }
.hc-text-button { display:inline-flex;align-items:center;justify-content:center;gap:5px;white-space:nowrap;background:none;color:var(--hc-accent,#c9a96a);padding:2px 0;font-size:10px!important;line-height:1.8; }
.hc-text-button svg { width:12px;height:12px; }
.hc-text-button:hover { text-decoration:underline;text-underline-offset:3px; }
.hc-icon-button { display:inline-grid;place-items:center;min-width:27px;height:27px;padding:4px;border:0;border-radius:5px;color:var(--hc-muted,#aaa398);background:none; }
.hc-icon-button:hover { color:var(--hc-accent,#c9a96a);background:#c9a96a0c; }
.hc-icon-button[aria-pressed=true] { color:var(--hc-accent);background:#c9a96a16; }
.hc-icon-button[aria-pressed=true] svg { fill:#c9a96a33; }
.hc-icon-button svg { width:14px;height:14px; }
.hc-reference-list { display:grid;gap:8px;margin:12px 0 0; }
.hc-reference { display:grid;grid-template-columns:47px minmax(0,1fr) auto;gap:11px;align-items:center;border:1px solid var(--hc-line);border-radius:8px;padding:8px;background:#ffffff02; }
.hc-ref-preview { width:47px;height:54px;border-radius:5px;overflow:hidden;background:#08090b;display:flex;align-items:center;justify-content:center;flex-direction:column;color:var(--hc-accent);gap:3px; }
.hc-ref-preview img { width:100%;height:100%;object-fit:contain; }
.hc-ref-preview>span { font:7px var(--mono,monospace);letter-spacing:.08em; }
.hc-ref-preview>svg { width:19px;height:19px; }
.hc-ref-body { display:flex;flex-direction:column;align-items:flex-start;gap:3px;min-width:0; }
.hc-ref-label { font-size:11px;color:var(--hc-accent);font-weight:550;padding:0;background:none;line-height:1.5; }
.hc-ref-name { width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10px;color:var(--hc-muted); }
.hc-ref-state { font-size:9px;line-height:1.5;color:#8aa995;overflow-wrap:anywhere; }
.hc-ref-actions { display:flex;flex-direction:column;gap:4px;align-items:center; }
.hc-upload-progress { appearance:none;width:100%;height:3px;border:0;border-radius:3px;overflow:hidden;accent-color:var(--hc-accent);background:#ffffff0a; }
.hc-upload-progress::-webkit-progress-bar { background:#ffffff0a; }
.hc-upload-progress::-webkit-progress-value { background:var(--hc-accent); }
.hc-prompt-wrap { position:relative; }
.hc-prompt { width:100%;display:block;min-height:182px;max-height:480px;resize:vertical;border:1px solid #c9a96a26;border-radius:9px;padding:15px 14px 31px;background:#0d0c0f70;color:var(--hc-ink);font-size:12px!important;line-height:1.9; }
.hc-prompt::placeholder { color:#928b80;opacity:.75; }
.hc-prompt:focus { border-color:#c9a96a88;outline:2px solid #c9a96a10; }
.hc-prompt-count { position:absolute;right:12px;bottom:9px;pointer-events:none;font:9px var(--mono,monospace);color:var(--hc-muted); }
.hc-reference-help { margin:8px 0 0;color:var(--hc-muted);font-size:9px;line-height:1.8; }
.hc-mentions { position:absolute;top:calc(100% + 4px);left:0;right:0;z-index:10;padding:5px;border:1px solid #c9a96a55;border-radius:8px;background:#242126;box-shadow:0 12px 30px #0006;max-height:220px;overflow:auto; }
.hc-mention-option { display:flex;align-items:center;gap:10px;text-align:left;width:100%;padding:10px;border-radius:5px;background:none;color:var(--hc-ink);font-size:11px; }
.hc-mention-option strong { color:var(--hc-accent);font-size:11px;white-space:nowrap; }
.hc-mention-option>span { overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10px;color:var(--hc-muted); }
.hc-mention-option[aria-selected=true],.hc-mention-option:hover { background:#c9a96a13; }
.hc-presets { display:flex;flex-wrap:wrap;gap:6px;margin-top:14px; }
.hc-preset { font-size:10px!important;line-height:1.5;padding:5px 9px;border:1px solid #c9a96a21;border-radius:20px;color:var(--hc-muted);background:#ffffff03; }
.hc-preset:hover { color:var(--hc-accent);border-color:#c9a96a66; }
.hc-root select,.hc-root input[type=search] { border:1px solid #c9a96a25;color:var(--hc-ink);background:#141216;border-radius:7px;min-height:37px;font-size:11px;max-width:100%; }
.hc-root select { padding:8px 10px; }
.hc-root select option { background:#201d22;color:#ece8e1; }
.hc-model { width:100%; }
.hc-root .ui-choice { min-width:0; }
.hc-capabilities { font-size:9px;line-height:1.8;color:var(--hc-muted);margin:10px 0 0; }
.hc-params { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px 12px;margin-top:21px; }
.hc-field { display:flex;flex-direction:column;gap:8px;min-width:0;font-size:10px;color:var(--hc-muted); }
.hc-field select { width:100%; }
.hc-quote { display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;margin-top:24px;padding-top:16px;border-top:1px solid var(--hc-line);font-size:10px;line-height:1.7;color:var(--hc-muted); }
.hc-quote strong { font-size:19px;color:var(--hc-accent);font-weight:550;font-variant-numeric:tabular-nums; }
.hc-quote small { flex-basis:100%;font-size:10px; }
.hc-submit { width:100%;min-height:44px;font-size:12px!important;margin-top:14px; }
.hc-submit>svg { margin-right:2px; }
.hc-billing-note { font-size:9px;color:var(--hc-muted);line-height:1.8;text-align:center;margin:11px 0 0; }
.hc-notice,.hc-pending { border:1px solid #c9a96a3b;background:#c9a96a09;border-radius:7px;color:#cfb47e;padding:11px 12px;font-size:11px;line-height:1.8;overflow-wrap:anywhere;margin-top:13px; }
.hc-root .is-error,.hc-dialog .is-error { color:#e49995; }
.hc-notice.is-error { border-color:#dc838333;background:#bf626209;color:#e3a3a0; }
.hc-records { padding:23px 21px 19px;min-height:785px; }
.hc-records-heading { display:flex;align-items:center;gap:16px;padding-bottom:20px;border-bottom:1px solid var(--hc-line); }
.hc-records-title { display:flex;align-items:baseline;gap:9px;white-space:nowrap; }
.hc-root .hc-records-title h2 { font-size:16px;font-weight:550;line-height:1.4;margin:0; }
.hc-records-title>span { font-size:10px;color:var(--hc-muted);font-variant-numeric:tabular-nums; }
.hc-history-tabs { display:flex;align-items:center;background:#ffffff04;border:1px solid #c9a96a10;border-radius:7px;padding:3px;margin-left:auto; }
.hc-tab { display:inline-flex;align-items:center;gap:5px;white-space:nowrap;min-height:27px;padding:3px 10px;border-radius:5px;background:none;color:var(--hc-muted);font-size:10px!important; }
.hc-tab svg { width:12px;height:12px; }
.hc-tab[aria-pressed=true] { background:#c9a96a15;color:var(--hc-accent); }
.hc-filters { display:flex;align-items:center;gap:9px;margin:18px 0 14px; }
.hc-search { display:flex;align-items:center;flex:1;min-width:0;position:relative; }
.hc-search>svg { position:absolute;left:12px;width:14px;height:14px;color:var(--hc-muted);pointer-events:none; }
.hc-search input { width:100%;padding:8px 12px 8px 34px;outline:none; }
.hc-search input:focus { border-color:#c9a96a77; }
.hc-search input::placeholder { color:#8d857a; }
.hc-filters>select { min-width:100px;font-size:10px; }
.hc-tools { display:flex;align-items:center;flex-wrap:wrap;gap:11px;color:var(--hc-muted); }
.hc-check-label { display:flex;align-items:center;gap:7px;font-size:10px;white-space:nowrap; }
.hc-root input[type=checkbox] { appearance:auto;accent-color:var(--hc-accent);width:14px;height:14px;margin:0;cursor:pointer; }
.hc-selection { font-size:10px;white-space:nowrap; }
.hc-tool-button { display:inline-flex;align-items:center;gap:5px;background:#ffffff03;border:1px solid #c9a96a2b;border-radius:6px;padding:5px 9px;color:var(--hc-muted);font-size:10px!important;min-height:28px; }
.hc-tool-button svg { width:12px;height:12px; }
.hc-tool-button:hover:not(:disabled) { color:var(--hc-accent);border-color:#c9a96a60; }
.hc-history-note { font-size:9px;color:var(--hc-muted);opacity:.75;line-height:1.7;margin:9px 0 18px; }
.hc-history-grid { display:grid;grid-template-columns:repeat(auto-fill,minmax(172px,1fr));gap:13px;align-content:start;min-height:570px; }
.hc-card { min-width:0;display:flex;flex-direction:column;border:1px solid #c9a96a24;border-radius:12px;padding:11px;background:linear-gradient(165deg,#ffffff04,#ffffff01);transition:border-color .18s,transform .18s; }
.hc-card:hover { border-color:#c9a96a57;transform:translateY(-2px); }
.hc-card-top { display:flex;align-items:center;gap:7px;margin-bottom:10px; }
.hc-status { font-size:9px;line-height:1.5;color:#bfa881;background:#c9a96a0b;border:1px solid #c9a96a24;padding:2px 5px;border-radius:5px;white-space:nowrap; }
.hc-status[data-status=completed] { color:#91bba4;background:#73ad8b0c;border-color:#73ad8b25; }
.hc-status[data-status=failed] { color:#df9995;background:#df999509;border-color:#df999523; }
.hc-status[data-status=cancelled] { color:#a69f96;background:#ffffff05;border-color:#ffffff12; }
.hc-card-kind { margin-left:auto;color:var(--hc-muted);font-size:8px;border:1px solid #ffffff15;border-radius:10px;padding:1px 5px; }
.hc-card-preview { display:flex;align-items:center;justify-content:center;position:relative;isolation:isolate;overflow:hidden;width:100%;aspect-ratio:9/11;min-height:150px;border:1px solid #c9a96a18;background:radial-gradient(ellipse at 50% 30%,#c9a96a0c,transparent 75%),#0e0d10;border-radius:8px;padding:0;color:var(--hc-accent); }
.hc-card-preview>img { position:absolute;inset:0;width:100%;height:100%;object-fit:cover;opacity:.52;z-index:-2; }
.hc-card-preview:has(img)::after { content:'';position:absolute;inset:0;background:linear-gradient(0deg,#05050680,transparent 70%);z-index:-1; }
.hc-preview-center { display:flex;flex-direction:column;align-items:center;gap:10px;font-size:10px; }
.hc-play-symbol { display:grid;place-items:center;width:43px;height:43px;border:1px solid #c9a96a55;background:#171419bb;border-radius:50%;font-size:16px;padding-left:2px;box-shadow:0 2px 15px #0002; }
.hc-preview-note { position:absolute;bottom:9px;left:9px;padding:2px 6px;border-radius:4px;font-size:8px;color:#e0d6c3;background:#17141999; }
.hc-card-preview:hover .hc-play-symbol { background:#c9a96a;color:#211b11;border-color:#c9a96a; }
.hc-card-preview.is-processing .hc-play-symbol { animation:hc-pulse 2.5s ease-in-out infinite; }
.hc-card-copy { flex:1;display:flex;flex-direction:column;align-items:flex-start;gap:7px;padding-top:12px;min-height:184px;min-width:0; }
.hc-card-model { display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:11px;line-height:1.65;font-weight:550;min-height:36px; }
.hc-card-prompt { display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:10px;color:var(--hc-muted);line-height:1.85;margin:0;word-break:break-word; }
.hc-card-spec,.hc-card-price { font-size:9px;color:var(--hc-muted);line-height:1.5;font-variant-numeric:tabular-nums; }
.hc-card-price { color:#c6b99f; }
.hc-card-error { display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;font-size:10px;line-height:1.75;color:#e09891;margin:0;overflow-wrap:anywhere; }
.hc-card-id { font:8px var(--mono,monospace);color:var(--hc-muted);opacity:.6;margin-top:auto;padding-top:9px; }
.hc-card-date { font:9px var(--mono,monospace);color:var(--hc-muted);opacity:.85;padding-bottom:10px; }
.hc-card-actions { display:flex;align-items:center;gap:10px;flex-wrap:wrap;border-top:1px solid #c9a96a16;padding-top:9px; }
.hc-card-actions>.hc-icon-button:first-of-type { margin-left:auto; }
.hc-card-actions .hc-icon-button { width:22px;min-width:22px;height:24px; }
.hc-empty { grid-column:1/-1;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:14px;padding:40px 20px;min-height:500px;text-align:center;border:1px dashed #c9a96a1e;border-radius:12px;color:var(--hc-muted); }
.hc-empty>svg { width:31px;height:31px;color:var(--hc-accent);opacity:.6; }
.hc-empty strong { font-size:14px;font-weight:500;color:var(--hc-ink); }
.hc-empty p { font-size:11px;line-height:1.9;max-width:310px;margin:0; }
.hc-grid-warning { grid-column:1/-1;color:#d0b686;font-size:10px;line-height:1.7;border:1px solid #c9a96a22;background:#c9a96a07;border-radius:7px;padding:10px;margin:0; }
.hc-grid-warning button { margin-left:10px; }
.hc-pagination { display:flex;align-items:center;justify-content:flex-end;gap:8px;padding-top:19px;margin-top:19px;border-top:1px solid var(--hc-line); }
.hc-pagination>span { margin-right:auto;font-size:10px;color:var(--hc-muted);font-variant-numeric:tabular-nums; }
.hc-pagination .hc-button { min-height:31px;font-size:10px!important; }
body .hc-dialog { --hc-accent:var(--gold,#c9a96a);--hc-muted:var(--muted,#aaa398);color:var(--ink,#ece8e1);background:linear-gradient(135deg,#242026,#121114);border:1px solid #c9a96a55;border-radius:15px;padding:23px;width:min(780px,calc(100vw - 32px));max-height:88dvh;overflow:auto;box-shadow:0 25px 90px #0009; }
.hc-dialog::backdrop { background:#09080ab8;backdrop-filter:blur(5px); }
.hc-dialog-head { display:flex;align-items:center;justify-content:space-between;gap:16px;border-bottom:1px solid #c9a96a20;padding-bottom:16px;margin-bottom:18px; }
.hc-dialog-head h2 { font-size:17px;font-weight:550;margin:0; }
.hc-dialog>p { font-size:12px;line-height:1.9; }
.hc-dialog>.hc-button { margin-top:15px; }
.hc-detail-video { display:block;width:100%;max-height:48dvh;object-fit:contain;background:#08090b;border-radius:7px; }
.hc-detail-state { display:grid;place-items:center;min-height:130px;background:#ffffff03;border:1px solid #c9a96a1a;border-radius:8px;font-size:14px;color:var(--hc-accent); }
.hc-detail-meta { display:grid;grid-template-columns:75px minmax(0,1fr);gap:10px 15px;font-size:11px;line-height:1.8;margin:20px 0; }
.hc-detail-meta dt { color:var(--hc-muted); }
.hc-detail-meta dd { margin:0;overflow-wrap:anywhere; }
.hc-dialog>h3 { font-size:12px;font-weight:550;margin-top:20px; }
.hc-detail-prompt { white-space:pre-wrap;overflow-wrap:anywhere;padding:13px;background:#ffffff03;border:1px solid #c9a96a1a;border-radius:7px;max-height:250px;overflow:auto; }
.hc-detail-actions { display:flex;flex-wrap:wrap;gap:9px;justify-content:flex-end;margin-top:20px; }
.hc-dialog .hc-card-error { display:block; }
.hc-library-filters { display:flex;align-items:center;gap:10px; }
.hc-library-filters input,.hc-library-filters select { min-width:0;border:1px solid #c9a96a35;background:#171419;color:inherit;border-radius:7px;padding:9px 11px;font-size:11px; }
.hc-library-filters input { flex:1; }
.hc-library-grid { display:grid;grid-template-columns:repeat(auto-fill,minmax(135px,1fr));gap:11px; }
.hc-library-message { font-size:11px;color:var(--hc-muted);margin:14px 0; }
.hc-library-item { min-width:0;display:flex;flex-direction:column;gap:7px;padding:8px;border:1px solid #c9a96a2b;border-radius:9px;background:#ffffff03;color:inherit;text-align:left; }
.hc-library-item:not(:disabled):hover { border-color:#c9a96a80;background:#c9a96a09; }
.hc-library-item>img,.hc-library-video { display:flex;align-items:center;justify-content:center;flex-direction:column;gap:10px;width:100%;height:125px;border-radius:5px;background:#0b0c0e;object-fit:contain;color:var(--hc-accent); }
.hc-library-video { font-size:9px;letter-spacing:.1em; }
.hc-library-item>strong { max-width:100%;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;font-size:10px;font-weight:500; }
.hc-library-item>span { font-size:9px;line-height:1.7;color:var(--hc-muted); }
.hc-library-footer { display:flex;align-items:center;gap:8px;margin-top:18px; }
.hc-library-footer>span { margin-right:auto;font-size:10px;color:var(--hc-muted); }
@keyframes hc-pulse { 50%{opacity:.5;} }
@media(min-width:1800px) { .hc-layout{grid-template-columns:420px minmax(0,1fr);}.hc-history-grid{grid-template-columns:repeat(auto-fill,minmax(190px,1fr));} }
@media(max-width:1250px) { .hc-layout{grid-template-columns:330px minmax(0,1fr);gap:16px;}.hc-editor,.hc-records{padding:19px;}.hc-records-heading{gap:9px;flex-wrap:wrap;}.hc-history-grid{grid-template-columns:repeat(auto-fill,minmax(160px,1fr));}.hc-tools{gap:8px;} }
@media(max-width:960px) { .hc-layout{grid-template-columns:minmax(0,1fr);}.hc-records{min-height:460px;}.hc-history-grid{min-height:280px;}.hc-empty{min-height:280px;}.hc-prompt{min-height:155px;}.hc-params{grid-template-columns:repeat(3,minmax(0,1fr));}.hc-editor-heading{padding-bottom:16px;margin-bottom:18px;}.hc-root .hc-editor-heading h2{font-size:21px;} }
@media(max-width:520px) { .hc-editor,.hc-records{padding:16px;border-radius:12px;}.hc-history-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;}.hc-card{padding:8px;}.hc-card-preview{min-height:132px;}.hc-card-top{gap:5px;}.hc-card-kind{display:none;}.hc-card-actions{gap:6px;}.hc-card-actions .hc-text-button{font-size:9px!important;}.hc-records-title h2{font-size:15px;}.hc-records-heading{gap:11px;}.hc-history-tabs{margin-left:auto;}.hc-filters{flex-wrap:wrap;}.hc-filters>select{width:100%;}.hc-tools{gap:8px;}.hc-selection{margin-left:auto;}.hc-pagination{gap:7px;}.hc-pagination>span{font-size:9px;}.hc-pagination .hc-button{padding:0 8px;}.hc-params{gap:10px;}.hc-field{font-size:9px;}.hc-root select{padding:7px;font-size:10px;}.hc-drop{padding:20px 9px 16px;}.hc-ref-state{font-size:9px;}.hc-drop-limit{font-size:9px;}.hc-dialog .hc-detail-meta{grid-template-columns:60px minmax(0,1fr);gap:9px;font-size:10px;}.hc-dialog .hc-detail-actions{justify-content:flex-start;}.hc-dialog .hc-button{font-size:10px!important;} }
@media(prefers-reduced-motion:reduce) { .hc-root *,.hc-dialog *{animation:none!important;transition:none!important;scroll-behavior:auto!important;} }
