.hcu { --hcu-accent: var(--primary-500, #3b82f6); --hcu-border: #d1d5db; --hcu-text: #111827; --hcu-muted: #6b7280; --hcu-surface: #f9fafb; --hcu-control: #f3f4f6; --hcu-track: #e5e7eb; --hcu-editor: #fff; color: var(--hcu-text); color-scheme: light; width: 100%; font-size: .875rem; }
.hcu.hcu-dark, .dark .hcu:not(.hcu-light), [data-theme="dark"] .hcu:not(.hcu-light) { --hcu-border: #4b5563; --hcu-text: #f3f4f6; --hcu-muted: #9ca3af; --hcu-surface: #1f2937; --hcu-control: #374151; --hcu-track: #374151; --hcu-editor: #111827; color-scheme: dark; }
@media (prefers-color-scheme: dark) {
    :root:not(.light):not(.dark):not([data-theme="light"]) .hcu:not(.hcu-light) { --hcu-border: #4b5563; --hcu-text: #f3f4f6; --hcu-muted: #9ca3af; --hcu-surface: #1f2937; --hcu-control: #374151; --hcu-track: #374151; --hcu-editor: #111827; color-scheme: dark; }
}
.hcu [x-cloak] { display: none !important; }
.hcu-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; width: 100%; box-sizing: border-box; padding: 1.25rem; border: 1px dashed var(--hcu-border); border-radius: .75rem; color: var(--hcu-muted); background: transparent; font: inherit; text-align: start; cursor: pointer; }
.hcu-header:hover { background: var(--hcu-surface); }
.hcu-header:focus-visible { outline: 2px solid var(--hcu-accent); outline-offset: 3px; }
.hcu-header:disabled { cursor: not-allowed; opacity: .55; }
.hcu-browse-label { font-size: .75rem; font-weight: 600; }
.hcu-dragging .hcu-header { border-color: var(--hcu-accent); outline: 2px solid var(--hcu-accent); }
.hcu-button { border: 1px solid var(--hcu-border); border-radius: .5rem; padding: .5rem .75rem; background: var(--hcu-control); color: inherit; cursor: pointer; font-weight: 600; white-space: nowrap; }
.hcu-button:focus-visible, .hcu .fi-icon-btn:focus-visible, .hcu-links a:focus-visible { outline: 2px solid var(--hcu-accent); outline-offset: 3px; }
.hcu-button:disabled { cursor: default; opacity: .5; }
.hcu-input { display: none; }
.hcu-files { display: flex; flex-direction: column; gap: .75rem; margin-top: .75rem; }
.hcu-file { border: 1px solid var(--hcu-border); border-radius: .75rem; overflow: hidden; background: var(--hcu-surface); }
.hcu-file-body { display: flex; align-items: center; gap: 1rem; padding: 1rem; }
.hcu-preview { width: 5rem; aspect-ratio: 4 / 3; height: auto; display: grid; place-items: center; flex-shrink: 0; background: var(--hcu-track); border-radius: .5rem; overflow: hidden; }
.hcu-preview-circle { aspect-ratio: 1; border-radius: 50%; }
.hcu-preview-square { aspect-ratio: 1; border-radius: 0; }
.hcu-preview-rectangle { aspect-ratio: 4 / 3; border-radius: .5rem; }
.hcu-preview img { background: #fff; height: 100%; width: 100%; object-fit: contain; }
.hcu-file-icon { text-transform: uppercase; font-size: .75rem; font-weight: 700; letter-spacing: .05em; padding: .4rem; border: 1px solid currentColor; border-radius: .25rem; opacity: .6; }
.hcu-file-info { flex: 1; min-width: 0; }
.hcu-file-title { display: flex; justify-content: space-between; gap: .75rem; margin-bottom: .75rem; font-weight: 600; }
.hcu-file-title > :first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hcu-size { opacity: .6; font-weight: 400; flex-shrink: 0; font-variant-numeric: tabular-nums; }
.hcu-chunks { display: grid; grid-template-columns: repeat(var(--hcu-columns,20),minmax(0,1fr)); gap: .3rem; width: min(100%, calc(var(--hcu-columns,20) * 2rem + (var(--hcu-columns,20) - 1) * .3rem)); }
.hcu-chunk { aspect-ratio: 1; max-height: 1.8rem; border: 2px solid var(--hcu-border); border-radius: .35rem; transition: background .15s, border-color .15s; }
.hcu-chunk-done { background: var(--hcu-accent); border-color: var(--hcu-accent); }
.hcu-chunk-active { border-color: var(--hcu-accent); background: color-mix(in srgb,var(--hcu-accent) 40%,transparent); animation: hcu-pulse 1s ease-in-out infinite alternate; }
.hcu-control-icon { width: 1rem; height: 1rem; flex-shrink: 0; }
.hcu-controls { display: flex; flex-direction: column; gap: .3rem; align-self: start; }
.hcu-progress { height: .2rem; background: var(--hcu-track); }
.hcu-progress span { display: block; height: 100%; background: var(--hcu-accent); transition: width .15s; }
.hcu-status, .hcu-total { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .25rem .75rem; padding: .65rem 1rem; font-size: .75rem; font-variant-numeric: tabular-nums; }
.hcu-status > :last-child { opacity: .65; }
.hcu-total { padding-inline: .25rem; }
.hcu-error { color: var(--danger-500, #dc2626); font-size: .8rem; margin-top: .5rem; overflow-wrap: anywhere; }
.hcu-file-error { border-color: var(--danger-500, #dc2626); }
.hcu-links { display: flex; gap: .8rem; font-size: .75rem; margin-top: .5rem; }
.hcu-links a, .hcu-links button { display: inline-flex; align-items: center; justify-content: center; padding: .3rem; border: 1px solid var(--hcu-border); border-radius: .35rem; background: var(--hcu-control); color: var(--hcu-text); text-decoration: none; cursor: pointer; }
.hcu-disabled .hcu-header { display: none; }
.hcu-editor { box-sizing: border-box; border: 1px solid var(--hcu-border); border-radius: 1rem; padding: 1.25rem; width: min(36rem, 95vw); background: var(--hcu-editor); color: var(--hcu-text); margin: auto; }
.hcu-editor::backdrop { background: rgba(0,0,0,.6); }
.hcu-editor-body { display: flex; flex-direction: column; gap: 1rem; }
.hcu-editor h3 { font-weight: 600; font-size: 1.1rem; }
.hcu-editor canvas[x-ref="canvas"], .hcu-editor .hcu-drawing-canvas { width: 100%; max-height: 60vh; object-fit: contain; background: repeating-conic-gradient(#aaa 0% 25%,#ddd 0% 50%) 50% / 16px 16px; touch-action: none; }
.hcu-editor label { display: flex; gap: 1rem; align-items: center; }
.hcu-editor input[type="range"] { flex: 1; accent-color: var(--hcu-accent); }
.hcu-editor-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .5rem; }
.hcu-primary { background: var(--hcu-accent); color: #fff; }
@keyframes hcu-pulse { from { opacity: .5; } to { opacity: 1; } }
@media (max-width: 500px) { .hcu-header { align-items: center; flex-direction: column; text-align: center; } .hcu-preview { width: 3rem; } .hcu-file-body { gap: .6rem; padding: .75rem; } .hcu-size { display: none; } .hcu-chunks { gap: .15rem; } .hcu-chunk { border-width: 1px; border-radius: .15rem; } }
@media (prefers-reduced-motion: reduce) { .hcu-chunk-active { animation: none; } .hcu-progress span { transition: none; } }

.hcu-source-buttons { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; margin-top: .75rem; }
.hcu-source-buttons .hcu-button { display: inline-flex; align-items: center; gap: .35rem; }
.hcu-source-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.hcu-source-dialog { width: min(44rem, 95vw); max-height: 90dvh; overflow: auto; }
.hcu-source-section { display: flex; flex-direction: column; gap: 1rem; }
.hcu-source-section label { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.hcu-source-section input[type="url"] { width: 100%; padding: .65rem; border: 1px solid var(--hcu-border); border-radius: .5rem; background: var(--hcu-surface); color: var(--hcu-text); }
.hcu-camera-video { width: 100%; max-height: 55dvh; background: #000; border-radius: .5rem; }
.hcu-editor .hcu-drawing-canvas { align-self: center; width: min(100%, 120vh); height: auto; max-height: none; background: #fff; outline: 1px solid var(--hcu-border); border-radius: .5rem; cursor: crosshair; }
.hcu-map-canvas { width: 100%; max-width: 640px; aspect-ratio: 8 / 5; background: var(--hcu-track); }
.hcu-map-canvas .hcu-map-live-label { max-width: 12rem; padding: .2rem .4rem; border: 1px solid #003da5; border-radius: .35rem; background: #fff; color: #1f2937; box-shadow: 0 1px 3px rgb(0 0 0 / .2); font-size: .75rem; font-weight: 600; line-height: 1.2; white-space: normal; pointer-events: none; transform: translate(12px, -16px); }
.hcu-map-markers { display: flex; flex-direction: column; gap: .5rem; }
.hcu-map-marker-row { display: flex; align-items: end; gap: .5rem; }
.hcu-map-marker-label { display: flex; flex: 1; flex-direction: column; gap: .25rem; min-width: 0; color: var(--hcu-muted); font-size: .75rem; }
.hcu-map-marker-label input { width: 100%; min-width: 0; padding: .65rem; border: 1px solid var(--hcu-border); border-radius: .5rem; background: var(--hcu-surface); color: var(--hcu-text); font: inherit; font-size: .875rem; }
.hcu-source-buttons [aria-pressed="true"] { border-color: var(--hcu-accent); outline: 1px solid var(--hcu-accent); }

.hcu .fi-icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; flex-shrink: 0; border: 0; border-radius: .5rem; background: transparent; color: var(--hcu-text); cursor: pointer; }
.hcu .fi-icon-btn:hover { background: var(--hcu-control); color: var(--hcu-text); }
.hcu .fi-icon-btn svg { width: 1.25rem; height: 1.25rem; }
.hcu .fi-icon-btn:disabled { cursor: default; opacity: .5; }
.hcu-photo-editor { width: min(72rem, 96vw); max-height: 94dvh; overflow: auto; }
.hcu-photo-layout { display: flex; flex-direction: column; gap: 1.5rem; min-width: 0; margin: 0; padding: 0; border: 0; }
.hcu-photo-heading { flex-wrap: wrap; position: sticky; top: -1.25rem; z-index: 3; padding-block: .5rem; background: var(--hcu-editor); }
.hcu-photo-workspace { min-width: 0; display: flex; flex-direction: column; gap: 1rem; }
.hcu-photo-tools { margin-top: 0; }
.hcu-photo-tools [aria-pressed="true"] { outline: 2px solid var(--hcu-accent); outline-offset: 1px; }
.hcu-crop-controls { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem 2rem; }
.hcu-ratio-control { display: flex; flex-direction: column; gap: .5rem; min-width: 0; }
.hcu-crop-control-label { color: var(--hcu-muted); font-size: .75rem; font-weight: 600; }
.hcu-ratio-choices { display: flex; flex-wrap: wrap; gap: .375rem; }
.hcu-ratio-choice { display: flex; align-items: center; gap: .5rem; min-height: 2.5rem; padding: .5rem .75rem; border: 1px solid var(--hcu-border); border-radius: .625rem; background: var(--hcu-control); color: var(--hcu-text); font: inherit; font-size: .8125rem; cursor: pointer; }
.hcu-ratio-choice[aria-pressed="true"] { border-color: var(--hcu-accent); background: color-mix(in srgb, var(--hcu-accent) 12%, var(--hcu-editor)); box-shadow: inset 0 0 0 1px var(--hcu-accent); }
.hcu-ratio-choice:hover { border-color: var(--hcu-accent); }
.hcu-ratio-choice:focus-visible { outline: 2px solid var(--hcu-accent); outline-offset: 3px; }
.hcu-ratio-choice:disabled { opacity: .5; cursor: default; }
.hcu-ratio-icon { display: grid; place-items: center; width: 1.25rem; height: 1.25rem; flex-shrink: 0; }
.hcu-ratio-icon > span { width: var(--hcu-ratio-width); height: var(--hcu-ratio-height); box-sizing: border-box; border: 1.5px solid currentColor; border-radius: .125rem; }
.hcu-ratio-free > span { border-style: dashed; }
.hcu-editor .hcu-zoom-control { display: flex; gap: .75rem; min-height: 2.5rem; flex: 1 1 14rem; max-width: 22rem; }
.hcu-zoom-control input { min-width: 0; width: 100%; }
.hcu-zoom-control output { min-width: 2.5rem; text-align: end; font-variant-numeric: tabular-nums; }
.hcu-photo-stage { position: relative; width: 100%; margin-inline: auto; touch-action: none; }
.hcu-photo-stage canvas { display: block; height: auto; max-height: none; }
.hcu-crop-box { position: absolute; box-sizing: border-box; border: 2px solid #fff; outline: 1px solid #111827; cursor: move; touch-action: none; }
.hcu-crop-box:focus-visible { outline: 3px solid var(--hcu-accent); }
.hcu-crop-box::before, .hcu-crop-box::after { content: ''; position: absolute; inset: 33.333% 0; border-block: 1px solid #ffffff80; pointer-events: none; }
.hcu-crop-box::after { inset: 0 33.333%; border-block: 0; border-inline: 1px solid #ffffff80; }
.hcu-crop-circle { border-radius: 50%; }
.hcu .hcu-crop-handle.fi-icon-btn { position: absolute; width: 1.5rem; height: 1.5rem; color: #003DA5; background: #fff; border: 1px solid #003DA5; border-radius: .25rem; z-index: 1; }
.hcu-photo-adjustments { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.hcu-editor .hcu-photo-adjustment { display: grid; grid-template-columns: minmax(6rem, 1fr) minmax(0, 3fr) 4rem; gap: 1.5rem; width: min(100%, 52rem); box-sizing: border-box; align-self: center; align-items: center; border: 1px solid var(--hcu-border); border-radius: 1.5rem; padding: .4rem 1.25rem; background: var(--hcu-control); }
.hcu-photo-adjustment:focus-within { border-color: var(--hcu-accent); outline: 2px solid var(--hcu-accent); outline-offset: 3px; }
.hcu-adjustment-label { font-weight: 500; }
.hcu-photo-adjustment output { text-align: end; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hcu-adjustment-ruler { position: relative; display: block; min-width: 0; height: 3.5rem; direction: ltr; }
.hcu-adjustment-ruler::before { content: ''; position: absolute; inset: 1.1rem 1.5px .5rem; background: repeating-linear-gradient(to right, var(--hcu-muted) 0 2px, transparent 2px 2.5%); mask-image: linear-gradient(to right, transparent, #000 18%, #000 82%, transparent); pointer-events: none; }
.hcu-adjustment-zero { position: absolute; left: clamp(3px, var(--hcu-zero), calc(100% - 3px)); top: .4rem; width: .3rem; height: .3rem; border-radius: 50%; background: var(--hcu-muted); transform: translateX(-50%); pointer-events: none; }
.hcu-editor .hcu-adjustment-ruler input[type="range"] { position: relative; display: block; appearance: none; -webkit-appearance: none; width: 100%; min-width: 0; height: 100%; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; cursor: ew-resize; }
.hcu-adjustment-ruler input[type="range"]:focus { outline: none; }
.hcu-adjustment-ruler input[type="range"]::-webkit-slider-runnable-track { height: 2.6rem; background: transparent; }
.hcu-adjustment-ruler input[type="range"]::-webkit-slider-thumb { appearance: none; -webkit-appearance: none; width: 3px; height: 2.6rem; border: 0; border-radius: 2px; background: var(--hcu-accent); }
.hcu-adjustment-ruler input[type="range"]::-moz-range-track { height: 2.6rem; background: transparent; }
.hcu-adjustment-ruler input[type="range"]::-moz-range-progress { background: transparent; }
.hcu-adjustment-ruler input[type="range"]::-moz-range-thumb { width: 3px; height: 2.6rem; border: 0; border-radius: 2px; background: var(--hcu-accent); }
.hcu-adjustment-choices { display: flex; gap: .6rem; overflow-x: auto; padding: .25rem .25rem .75rem; }
.hcu-adjustment-choice { display: flex; flex: 1 0 4.5rem; flex-direction: column; align-items: center; gap: .6rem; padding: .25rem; border: 0; background: transparent; color: var(--hcu-muted); font: inherit; font-size: .75rem; cursor: pointer; }
.hcu-adjustment-choice:focus-visible { outline: 2px solid var(--hcu-accent); outline-offset: -2px; border-radius: .75rem; }
.hcu-adjustment-icon { position: relative; display: grid; place-items: center; width: 3.5rem; height: 3.5rem; box-sizing: border-box; border: 2px solid var(--hcu-border); border-radius: 50%; background: var(--hcu-control); color: var(--hcu-text); }
.hcu-adjustment-icon svg { width: 1.6rem; height: 1.6rem; }
.hcu-adjustment-changed::after { content: ''; position: absolute; inset: -2px; border-radius: 50%; background: conic-gradient(var(--hcu-accent) var(--hcu-amount), transparent 0); mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 0); pointer-events: none; }
.hcu-adjustment-choice[aria-pressed="true"] { color: var(--hcu-text); }
.hcu-adjustment-choice[aria-pressed="true"] .hcu-adjustment-icon { border-color: var(--hcu-accent); background: var(--hcu-accent); color: #fff; }
.hcu-adjustment-choice:hover .hcu-adjustment-icon { border-color: var(--hcu-accent); }
.hcu-adjustment-choice:disabled, .hcu-adjustment-ruler input:disabled { opacity: .5; cursor: default; }
.hcu-adjustment-reset { align-self: center; }
@media (max-width: 800px) { .hcu-photo-heading { align-items: start; gap: .5rem; } }
@media (max-width: 500px) { .hcu-editor .hcu-photo-adjustment { grid-template-columns: minmax(0, 1fr) 3.5rem; gap: 0 .5rem; padding: .5rem 1rem; border-radius: 1rem; } .hcu-adjustment-ruler { grid-row: 2; grid-column: 1 / -1; } .hcu-photo-adjustment output { grid-column: 2; grid-row: 1; } }

.hcu-avatar .hcu-header { width: min(100%, 8rem); aspect-ratio: 1; align-self: center; flex-direction: column; justify-content: center; gap: .25rem; padding: .75rem; border-radius: 50%; font-size: .75rem; text-align: center; }
.hcu-panel-single-complete { padding: .75rem; border: 1px dashed var(--hcu-border); border-radius: .75rem; }
.hcu-panel-single-complete .hcu-files { margin-top: 0; }
.hcu-file-name { min-width: 0; overflow: hidden; border: 0; padding: 0; background: none; color: var(--hcu-accent); font: inherit; text-align: start; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.hcu-file-name:hover { text-decoration: underline; }
.hcu-file-name:focus-visible { border-radius: .15rem; outline: 2px solid var(--hcu-accent); outline-offset: 2px; }
.hcu-preview-clickable { cursor: zoom-in; }
.hcu-preview-dialog { width: min(70rem, 96vw); max-width: 96vw; max-height: 94dvh; overflow: auto; border: 1px solid var(--hcu-border); border-radius: .75rem; padding: 1rem; background: var(--hcu-editor); color: var(--hcu-text); }
.hcu-preview-dialog::backdrop { background: rgb(0 0 0 / .65); }
.hcu-preview-dialog-body { display: flex; flex-direction: column; gap: .75rem; min-height: 0; }
.hcu-inline-pdf-wrap { width: 100%; height: 25rem; overflow: auto; border-top: 1px solid var(--hcu-border); }
.hcu-inline-pdf { display: block; width: 100%; height: 100%; min-height: 20rem; border: 0; background: #fff; }
.hcu-preview-heading { position: sticky; top: -1rem; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: .5rem; background: var(--hcu-editor); }
.hcu-preview-heading h3 { min-width: 0; overflow: hidden; margin: 0; font-size: 1rem; text-overflow: ellipsis; white-space: nowrap; }
.hcu-preview-loading { margin: 0; color: var(--hcu-muted); }
.hcu-pdf-frame { width: 100%; height: min(75dvh, 60rem); border: 0; background: #fff; }
.hcu-image-frame { display: block; width: 100%; max-height: 78dvh; object-fit: contain; background: var(--hcu-track); }
.hcu-model-panel { display: flex; flex-direction: column; gap: .75rem; }
.hcu-model-canvas { width: 100%; height: min(70dvh, 50rem); min-height: 20rem; overflow: hidden; background: var(--hcu-track); }
.hcu-preview-download { align-self: flex-start; color: var(--hcu-accent); }

