/* HomeSketch 3D — scoped styles. Mirrors the BusyDayKit palette (navy, orange, electric blue, glass panels). */
:root, html[data-theme="dark"] {
  --hs-bg: #081224; --hs-surface: rgba(15, 32, 60, .92); --hs-surface2: #142b4a; --hs-solid: #0f203c;
  --hs-ink: #f2f6ff; --hs-muted: #a6b6d1; --hs-stroke: #2b4363; --hs-brand: #ff942f; --hs-brand-ink: #141921;
  --hs-blue: #70b0ff; --hs-danger: #ff6b6b; --hs-ok: #5fd08a; --hs-shadow: 0 12px 40px rgba(0, 4, 18, .4);
  --hs-canvas: #0b1a33; --hs-focus: #9fd0ff; color-scheme: dark;
}
html[data-theme="light"] {
  --hs-bg: #f5f7fc; --hs-surface: rgba(255, 255, 255, .94); --hs-surface2: #edf2fb; --hs-solid: #ffffff;
  --hs-ink: #0a1e41; --hs-muted: #55657d; --hs-stroke: #cdd8ea; --hs-brand: #e8690b; --hs-brand-ink: #ffffff;
  --hs-blue: #2569ed; --hs-danger: #c62828; --hs-ok: #1b8a4b; --hs-shadow: 0 12px 40px rgba(9, 29, 66, .14);
  --hs-canvas: #e7eef9; --hs-focus: #1d5ccb; color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--hs-bg); color: var(--hs-ink); font: 14px/1.4 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-text-size-adjust: 100%; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--hs-focus); outline-offset: 2px; }
.hs-skip { position: absolute; left: -999px; top: 4px; background: var(--hs-brand); color: var(--hs-brand-ink); padding: 8px 12px; border-radius: 8px; z-index: 100; }
.hs-skip:focus { left: 8px; }
[hidden] { display: none !important; }
.hs-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- layout ---------- */
.hs-app { --tb-w: 128px; --props-w: 320px; display: grid; height: 100dvh; width: 100%; grid-template-columns: var(--tb-w) minmax(0, 1fr) var(--props-w); grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  grid-template-areas: "head head head" "ban ban ban" "tool opt props" "tool stage props" "foot foot foot"; }
.hs-header { grid-area: head; display: flex; align-items: center; gap: 12px; padding: 6px 12px; background: var(--hs-surface); border-bottom: 1px solid var(--hs-stroke); backdrop-filter: blur(12px); min-width: 0; }
.hs-back { color: var(--hs-ink); text-decoration: none; font-weight: 600; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--hs-stroke); white-space: nowrap; min-height: 40px; display: inline-flex; align-items: center; }
.hs-back:hover { border-color: var(--hs-brand); color: var(--hs-brand); }
.hs-brand { display: flex; align-items: center; gap: 8px; font-weight: 700; letter-spacing: .01em; white-space: nowrap; }
.hs-brand b { color: var(--hs-brand); }
.hs-title { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.hs-namebtn { all: unset; cursor: pointer; font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-radius: 6px; padding: 0 4px; }
.hs-namebtn:hover { background: var(--hs-surface2); }
.hs-namebtn:focus-visible { outline: 2px solid var(--hs-focus); }
.hs-status { font-size: 12px; color: var(--hs-muted); padding: 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hs-status[data-state="dirty"] { color: var(--hs-brand); }
.hs-hdr-actions { display: flex; align-items: center; gap: 6px; }
.hs-sep { width: 1px; height: 24px; background: var(--hs-stroke); margin: 0 4px; }
.hs-banner { grid-area: ban; background: #5a3a05; color: #ffe4b5; padding: 8px 12px; font-size: 13px; }

.hs-toolbar { grid-area: tool; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 8px; align-content: start; overflow-y: auto; background: var(--hs-surface); border-right: 1px solid var(--hs-stroke); }
.hs-tool { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 54px; padding: 4px 2px; border-radius: 12px; border: 1px solid transparent; background: transparent; cursor: pointer; color: var(--hs-ink); font-size: 11px; line-height: 1.1; }
.hs-tool:hover { background: var(--hs-surface2); }
.hs-tool[aria-pressed="true"] { background: var(--hs-brand); color: var(--hs-brand-ink); border-color: var(--hs-brand); box-shadow: 0 4px 16px rgba(255, 148, 47, .35); }
.hs-tool-ic svg { display: block; }
.hs-tool-lb { text-align: center; }

.hs-optbar { grid-area: opt; display: flex; align-items: center; gap: 12px; padding: 6px 12px; min-height: 44px; background: var(--hs-surface); border-bottom: 1px solid var(--hs-stroke); }
.hs-hint { margin: 0; flex: 1; color: var(--hs-muted); font-size: 13px; min-width: 0; }
.hs-opts { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.hs-opt { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--hs-muted); }
.hs-opt .hs-input { width: auto; min-width: 120px; }
.hs-chk { gap: 4px; }

.hs-stage { grid-area: stage; position: relative; display: grid; min-height: 0; min-width: 0; outline: none; }
.hs-stage[data-view="2d"] { grid-template-columns: 1fr; } .hs-stage[data-view="2d"] .hs-pane3d { display: none; }
.hs-stage[data-view="3d"] { grid-template-columns: 1fr; } .hs-stage[data-view="3d"] .hs-pane2d { display: none; }
.hs-stage[data-view="split"] { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.hs-pane { position: relative; min-width: 0; min-height: 0; overflow: hidden; background: var(--hs-canvas); }
.hs-stage[data-view="split"] .hs-pane3d { border-left: 2px solid var(--hs-stroke); }
.hs-pane canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; outline: none; }
.hs-zoom { position: absolute; right: 12px; bottom: 12px; display: flex; flex-direction: column; gap: 6px; }
.hs-zoom .hs-iconbtn { background: var(--hs-surface); border: 1px solid var(--hs-stroke); box-shadow: var(--hs-shadow); font-size: 20px; }
.hs-3dctl { position: absolute; left: 10px; top: 10px; right: 10px; display: flex; flex-direction: column; gap: 6px; pointer-events: none; }
.hs-3drow { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; pointer-events: auto; }
.hs-3dctl .hs-btn, .hs-3dctl .hs-input, .hs-3dctl .hs-opt { background: var(--hs-surface); }
.hs-3dctl .hs-opt { padding: 4px 8px; border-radius: 10px; border: 1px solid var(--hs-stroke); }
.hs-3dctl .hs-input { width: auto; min-width: 0; }
.hs-3dhelp { position: absolute; left: 12px; bottom: 8px; margin: 0; font-size: 12px; color: var(--hs-muted); pointer-events: none; text-shadow: 0 1px 2px var(--hs-canvas); }
.hs-nowebgl { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px; background: var(--hs-canvas); }
.hs-lenbox { position: absolute; z-index: 5; width: 130px; padding: 6px 8px; border-radius: 8px; border: 2px solid var(--hs-brand); background: var(--hs-solid); font-weight: 600; }
.hs-lenhint { position: absolute; z-index: 5; font-size: 11px; color: var(--hs-muted); background: var(--hs-solid); padding: 2px 6px; border-radius: 6px; }

.hs-props { grid-area: props; display: flex; flex-direction: column; min-height: 0; background: var(--hs-surface); border-left: 1px solid var(--hs-stroke); }
.hs-props-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid var(--hs-stroke); gap: 8px; }
.hs-props-title { display: flex; flex-direction: column; min-width: 0; }
.hs-props-title small { color: var(--hs-muted); }
.hs-props-toggle { display: none; }
.hs-props-body { padding: 4px 14px 24px; overflow-y: auto; flex: 1; min-height: 0; }
.hs-sec { margin: 16px 0 6px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--hs-muted); font-weight: 700; }
.hs-field { display: grid; grid-template-columns: 1fr 1.1fr; align-items: center; gap: 4px 10px; margin: 6px 0; }
.hs-field > label { color: var(--hs-ink); }
.hs-fieldctl { display: flex; align-items: center; gap: 4px; }
.hs-hint-small, .hs-field .hs-hint { grid-column: 1 / -1; color: var(--hs-muted); font-size: 12px; }
.hs-field.hs-check { grid-template-columns: 1fr; }
.hs-field.hs-check label { display: flex; align-items: center; gap: 8px; min-height: 32px; }
.hs-field.hs-info { grid-template-columns: 1fr auto; }
.hs-infolab { color: var(--hs-muted); } .hs-infoval { font-weight: 600; }
.hs-suffix { font-size: 12px; color: var(--hs-muted); min-width: 22px; }
.hs-input { width: 100%; min-height: 36px; padding: 6px 9px; border-radius: 10px; border: 1px solid var(--hs-stroke); background: var(--hs-solid); color: var(--hs-ink); }
.hs-input:hover { border-color: var(--hs-blue); }
.hs-note { color: var(--hs-ink); font-size: 13px; margin: 8px 0; } .hs-note-dim { color: var(--hs-muted); font-size: 12px; }
.hs-warns { margin-top: 8px; display: grid; gap: 6px; }
.hs-warn { background: rgba(255, 148, 47, .14); border: 1px solid var(--hs-brand); border-radius: 10px; padding: 6px 10px; font-size: 13px; }
.hs-swatches { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 4px; }
.hs-field:has(.hs-swatches) { grid-template-columns: 1fr; }
.hs-swatch { width: 28px; height: 28px; border-radius: 8px; border: 2px solid var(--hs-stroke); cursor: pointer; padding: 0; }
.hs-swatch.on { border-color: var(--hs-brand); box-shadow: 0 0 0 2px var(--hs-brand); }
.hs-colorpick { width: 34px; height: 30px; padding: 0; border: 1px solid var(--hs-stroke); border-radius: 8px; background: none; }
.hs-link { background: none; border: 0; color: var(--hs-blue); cursor: pointer; text-decoration: underline; padding: 0; }

/* ---------- buttons ---------- */
.hs-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; padding: 6px 14px; border-radius: 10px; border: 1px solid var(--hs-stroke); background: var(--hs-surface2); color: var(--hs-ink); cursor: pointer; font-weight: 600; text-decoration: none; }
.hs-btn:hover { border-color: var(--hs-blue); }
.hs-btn:disabled { opacity: .45; cursor: not-allowed; }
.hs-btn-sm { min-height: 34px; padding: 4px 11px; font-size: 13px; }
.hs-btn-primary { background: var(--hs-brand); border-color: var(--hs-brand); color: var(--hs-brand-ink); }
.hs-btn-primary:hover { filter: brightness(1.08); border-color: var(--hs-brand); }
.hs-btn-danger { color: var(--hs-danger); border-color: var(--hs-danger); background: transparent; }
.hs-btn[aria-pressed="true"] { border-color: var(--hs-brand); }
.hs-btnrow { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.hs-iconbtn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; border: 1px solid transparent; background: transparent; cursor: pointer; color: var(--hs-ink); padding: 0; }
.hs-iconbtn:hover:not(:disabled) { background: var(--hs-surface2); }
.hs-iconbtn:disabled { opacity: .35; cursor: not-allowed; }
.hs-seg { display: inline-flex; border: 1px solid var(--hs-stroke); border-radius: 10px; overflow: hidden; }
.hs-seg button { background: transparent; border: 0; padding: 0 14px; min-height: 36px; cursor: pointer; font-weight: 600; color: var(--hs-muted); }
.hs-seg button[aria-pressed="true"] { background: var(--hs-blue); color: #04122a; }
.hs-foot { grid-area: foot; margin: 0; padding: 4px 12px; font-size: 11px; color: var(--hs-muted); background: var(--hs-surface); border-top: 1px solid var(--hs-stroke); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hs-only-mobile { display: none; }

/* ---------- toasts, modal, tutorial ---------- */
.hs-toasts { position: fixed; left: 50%; bottom: 76px; transform: translateX(-50%); z-index: 400; display: grid; gap: 8px; width: min(92vw, 520px); pointer-events: none; }
.hs-toast { background: var(--hs-solid); border: 1px solid var(--hs-stroke); border-left: 4px solid var(--hs-blue); border-radius: 12px; padding: 10px 14px; box-shadow: var(--hs-shadow); transition: opacity .25s; pointer-events: auto; }
.hs-toast-ok { border-left-color: var(--hs-ok); } .hs-toast-warn { border-left-color: var(--hs-brand); } .hs-toast-error { border-left-color: var(--hs-danger); }
.hs-toast.out { opacity: 0; }
.hs-overlay { position: fixed; inset: 0; z-index: 300; background: rgba(2, 8, 20, .62); display: grid; place-items: center; padding: 16px; backdrop-filter: blur(3px); }
.hs-modal { width: min(520px, 100%); max-height: min(86dvh, 760px); display: flex; flex-direction: column; background: var(--hs-solid); border: 1px solid var(--hs-stroke); border-radius: 18px; box-shadow: var(--hs-shadow); }
.hs-modal.wide { width: min(680px, 100%); }
.hs-modal-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--hs-stroke); }
.hs-modal-head h2 { margin: 0; font-size: 18px; }
.hs-modal-body { padding: 16px 18px; overflow-y: auto; }
.hs-modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--hs-stroke); }
.hs-lead { margin-top: 0; font-size: 15px; }
.hs-welcome-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hs-welcome-card, .hs-export-row { display: flex; flex-direction: column; gap: 4px; text-align: left; padding: 14px; border-radius: 14px; border: 1px solid var(--hs-stroke); background: var(--hs-surface2); cursor: pointer; text-decoration: none; color: var(--hs-ink); }
.hs-welcome-card:hover, .hs-export-row:hover { border-color: var(--hs-brand); }
.hs-welcome-card span, .hs-export-row span { color: var(--hs-muted); font-size: 13px; }
.hs-exports { display: grid; gap: 8px; }
.hs-projlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.hs-projlist li { border: 1px solid var(--hs-stroke); border-radius: 14px; padding: 10px 12px; background: var(--hs-surface2); }
.hs-projinfo { display: flex; flex-direction: column; } .hs-projinfo small, .hs-empty { color: var(--hs-muted); }
.hs-keys { width: 100%; border-collapse: collapse; } .hs-keys th { text-align: left; font-weight: 600; padding: 3px 12px 3px 0; white-space: nowrap; } .hs-keys td { color: var(--hs-muted); }
.hs-tutorial { position: fixed; right: 16px; bottom: 56px; z-index: 250; width: min(340px, calc(100vw - 32px)); background: var(--hs-solid); border: 1px solid var(--hs-brand); border-radius: 16px; padding: 14px 16px; box-shadow: var(--hs-shadow); }
.hs-tutorial p { margin: 6px 0; }
.hs-tut-step { font-size: 11px; color: var(--hs-brand); text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.hs-fatal { position: fixed; inset: 0; z-index: 500; display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--hs-bg); padding: 24px; text-align: center; gap: 6px; }
.hs-fatal a { color: var(--hs-brand); }

/* ---------- mobile ---------- */
@media (max-width: 820px) {
  .hs-app { --tb-h: 68px; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto minmax(0, 1fr) auto;
    grid-template-areas: "head" "ban" "opt" "stage" "tool"; height: 100dvh; }
  .hs-only-desktop { display: none !important; } .hs-only-mobile { display: inline-grid; }
  .hs-header { gap: 6px; padding: 4px 8px; padding-top: max(4px, env(safe-area-inset-top)); }
  .hs-back-t, .hs-brand { display: none; }
  .hs-title { min-width: 70px; }
  .hs-status { font-size: 11px; }
  .hs-back { padding: 8px 12px; min-width: 44px; justify-content: center; }
  .hs-hdr-actions { gap: 2px; }
  .hs-iconbtn { width: 42px; height: 42px; }
  .hs-seg button { min-height: 40px; padding: 0 12px; }
  .hs-toolbar { display: flex; overflow-x: auto; overflow-y: hidden; gap: 4px; padding: 6px 6px max(6px, env(safe-area-inset-bottom)); border-right: 0; border-top: 1px solid var(--hs-stroke); -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
  .hs-tool { flex: 0 0 64px; min-height: 56px; }
  .hs-optbar { padding: 4px 10px; min-height: 36px; flex-wrap: wrap; gap: 6px; }
  .hs-hint { font-size: 12px; }
  .hs-opt .hs-input { min-width: 96px; }
  .hs-foot { display: none; }
  .hs-props { position: fixed; left: 0; right: 0; bottom: calc(var(--tb-h) + env(safe-area-inset-bottom)); z-index: 60; max-height: 58dvh; border-left: 0; border-top: 2px solid var(--hs-brand); border-radius: 18px 18px 0 0; box-shadow: 0 -10px 30px rgba(0, 4, 18, .35); }
  .hs-props.collapsed .hs-props-body { display: none; }
  .hs-props-toggle { display: inline-grid; }
  .hs-props:not(.collapsed) .hs-props-toggle svg { transform: rotate(180deg); }
  .hs-props-head { padding: 6px 12px; min-height: 48px; }
  .hs-zoom { bottom: 64px; }
  .hs-3dhelp { display: none; }
  .hs-3dctl { left: 6px; right: 6px; top: 6px; }
  .hs-3drow { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
  .hs-3drow > * { flex: 0 0 auto; }
  .hs-field { grid-template-columns: 1fr 1fr; } .hs-input { min-height: 42px; font-size: 16px; }
  .hs-welcome-grid { grid-template-columns: 1fr; }
  .hs-toasts { bottom: calc(var(--tb-h) + 70px); }
  .hs-tutorial { bottom: calc(var(--tb-h) + 70px); right: 8px; }
  .hs-btn { min-height: 44px; } .hs-btn-sm { min-height: 40px; }
}
@media (max-width: 400px) {
  #hs-theme { display: none; } .hs-seg button { padding: 0 9px; } .hs-title { min-width: 40px; } .hs-back { min-width: 40px; padding: 8px; }
}
@media (max-width: 820px) and (orientation: landscape) and (max-height: 520px) {
  .hs-props { max-height: 70dvh; }
}
@media (min-width: 821px) and (max-width: 1100px) { .hs-app { --props-w: 270px; --tb-w: 116px; } .hs-brand-t { display: none; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }

/* ---------- print: only the generated plan sheet ---------- */
#hs-print { display: none; }

/* ---------- insert flyouts (library.js) ---------- */
.hs-tool.has-menu { position: relative; }
.hs-tool.has-menu::after { content: ""; position: absolute; right: 7px; top: 7px; width: 5px; height: 5px; border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; transform: rotate(-45deg); opacity: .65; }
.hs-flyout { position: fixed; z-index: 80; width: min(336px, calc(100vw - 16px)); background: var(--hs-solid); border: 1px solid var(--hs-stroke); border-radius: 14px; box-shadow: var(--hs-shadow); padding: 10px; overflow-y: auto; overscroll-behavior: contain; }
.hs-fly-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.hs-fly-head strong { font-size: 14px; }
.hs-fly-x { width: 32px; height: 32px; font-size: 20px; line-height: 1; }
.hs-fly-tabs { display: flex; gap: 4px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; margin-bottom: 4px; }
.hs-fly-tab { flex: 0 0 auto; border: 1px solid var(--hs-stroke); background: transparent; border-radius: 999px; padding: 5px 11px; font-size: 12px; cursor: pointer; white-space: nowrap; }
.hs-fly-tab:hover { background: var(--hs-surface2); }
.hs-fly-tab[aria-selected="true"] { background: var(--hs-brand); border-color: var(--hs-brand); color: var(--hs-brand-ink); font-weight: 600; }
.hs-fly-hint { margin: 0 0 8px; font-size: 12px; color: var(--hs-muted); }
.hs-fly-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.hs-fly-item { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 3px 5px; border-radius: 10px; border: 1px solid var(--hs-stroke); background: var(--hs-surface2); cursor: pointer; min-height: 76px; }
.hs-fly-item:hover { border-color: var(--hs-blue); }
.hs-fly-item[aria-pressed="true"] { border-color: var(--hs-brand); box-shadow: inset 0 0 0 1px var(--hs-brand); }
.hs-thumb { display: block; border-radius: 6px; background: var(--hs-canvas); }
.hs-fly-lb { font-size: 11px; line-height: 1.15; text-align: center; overflow-wrap: anywhere; }
@media (max-width: 820px) { .hs-flyout { width: auto; max-width: none; } .hs-fly-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } .hs-fly-item { min-height: 70px; } }
@media (max-width: 420px) { .hs-fly-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---------- contextual action bar (ctxbar.js) ---------- */
.hs-ctxbar { position: absolute; z-index: 20; display: flex; align-items: center; gap: 2px; padding: 4px; max-width: calc(100% - 12px); background: var(--hs-solid); border: 1px solid var(--hs-stroke); border-radius: 12px; box-shadow: var(--hs-shadow); }
.hs-cx-name { font-size: 11px; font-weight: 600; color: var(--hs-muted); padding: 0 8px 0 6px; white-space: nowrap; max-width: 130px; overflow: hidden; text-overflow: ellipsis; }
.hs-cx-btn { display: inline-grid; place-items: center; flex: 0 0 auto; width: 34px; height: 34px; border-radius: 9px; border: 0; background: transparent; cursor: pointer; color: var(--hs-ink); }
.hs-cx-btn:hover:not(:disabled) { background: var(--hs-surface2); }
.hs-cx-btn[aria-pressed="true"] { background: var(--hs-brand); color: var(--hs-brand-ink); }
.hs-cx-btn.danger:hover:not(:disabled) { background: var(--hs-danger); color: #fff; }
.hs-cx-btn:disabled { opacity: .35; cursor: not-allowed; }
.hs-cx-pop { position: absolute; min-width: 190px; max-height: 260px; overflow-y: auto; background: var(--hs-solid); border: 1px solid var(--hs-stroke); border-radius: 12px; box-shadow: var(--hs-shadow); padding: 6px; margin: 6px 0; }
.hs-cx-item { display: block; width: 100%; text-align: left; padding: 7px 10px; border-radius: 8px; border: 0; background: transparent; cursor: pointer; font-size: 13px; }
.hs-cx-item:hover { background: var(--hs-surface2); }
.hs-cx-item[aria-checked="true"] { color: var(--hs-brand); font-weight: 700; }
.hs-cx-field { display: grid; grid-template-columns: 70px 1fr 22px; align-items: center; gap: 6px; padding: 3px 4px; font-size: 12px; }
.hs-cx-field em { font-style: normal; color: var(--hs-muted); }
.hs-cx-field .hs-input { min-height: 32px; padding: 3px 8px; min-width: 0; }
@media (max-width: 820px) { .hs-ctxbar { overflow-x: auto; scrollbar-width: none; } .hs-cx-name { display: none; } .hs-cx-pop { position: fixed; left: 8px !important; right: 8px; bottom: calc(var(--tb-h) + 64px) !important; top: auto !important; max-height: 36dvh; } }
@media print {
  body.hs-printing { overflow: visible; height: auto; background: #fff; }
  body.hs-printing > *:not(#hs-print) { display: none !important; }
  body.hs-printing #hs-print { display: block !important; color: #111; padding: 0; }
  body.hs-printing #hs-print img { width: 100%; height: auto; page-break-inside: avoid; }
  body.hs-printing #hs-print table { width: 100%; border-collapse: collapse; margin-top: 12px; font: 12px sans-serif; }
  body.hs-printing #hs-print th, body.hs-printing #hs-print td { border-bottom: 1px solid #bbb; padding: 4px 6px; text-align: left; }
  body.hs-printing .hs-print-note { font: 11px sans-serif; color: #444; margin-top: 12px; }
  @page { margin: 12mm; }
}
