/* Header tool and four palette previews; colors are committed only on Save. */
.hb-theme-control { display: flex; align-items: center; flex: none; }
.hb-theme-trigger, .hb-theme-panel button { font: inherit; cursor: pointer; }
.hb-theme-trigger { display: inline-flex; align-items: center; justify-content: center; gap: 9px; height: 38px; padding: 0 12px; border: 1px solid #e6ebf5; border-radius: 10px; background: #fff; color: #536580; font-size: 13px; white-space: nowrap; line-height: 1; }
.hb-theme-trigger:hover, .hb-theme-trigger[aria-expanded="true"] { color: var(--hb-primary); border-color: var(--hb-primary-border); background: var(--hb-primary-soft); }
.hb-theme-dot { width: 15px; height: 15px; border-radius: 50%; background: var(--hb-primary); box-shadow: inset 0 0 0 3px #ffffff70; }
.hb-theme-chevron { width: 6px; height: 6px; border-bottom: 1.5px solid currentColor; border-right: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); }
.hb-theme-panel, .hb-theme-toast { box-sizing: border-box; font-family: "Segoe UI", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif; }
.hb-theme-panel { position: fixed; z-index: 1100; width: 356px; max-width: calc(100vw - 24px); max-height: calc(100svh - 24px); overflow: auto; padding: 20px; border: 1px solid #e6ebf5; border-radius: 16px; background: #fff; box-shadow: 0 12px 44px #1728461f, 0 2px 8px #17284608; color: #263b5c; line-height: 1.5; scrollbar-width: none; }
.hb-theme-panel[hidden], .hb-theme-toast[hidden] { display: none; }
.hb-theme-heading { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 18px; }
.hb-theme-heading h2 { margin: 0 0 4px; color: #263b5c; font-size: 16px; line-height: 24px; font-weight: 600; }
.hb-theme-heading p { margin: 0; color: #8594ad; font-size: 12px; line-height: 20px; }
.hb-theme-panel .hb-theme-close { width: 28px; height: 28px; padding: 0; border: 0; border-radius: 7px; background: transparent; color: #8b98ac; font-size: 23px; line-height: 24px; }
.hb-theme-panel .hb-theme-close:hover { background: #f3f6fd; color: #263b5c; }
.hb-theme-options { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; min-width: 0; padding: 0; margin: 0; border: 0; }
.hb-theme-option { position: relative; display: block; min-width: 0; cursor: pointer; }
.hb-theme-option > input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.hb-theme-option-body { display: block; padding: 7px; border: 1px solid #e6ebf5; border-radius: 10px; background: #fff; }
.hb-theme-option:hover .hb-theme-option-body { border-color: var(--theme-color); }
.hb-theme-option > input:checked + .hb-theme-option-body { border-color: var(--theme-color); box-shadow: 0 0 0 1px var(--theme-color); background: var(--theme-soft); }
.hb-theme-option > input:focus-visible + .hb-theme-option-body { outline: 3px solid var(--hb-primary-focus); outline-offset: 3px; }
.hb-theme-preview { display: flex; height: 65px; overflow: hidden; border: 1px solid #17284608; border-radius: 5px; background: #f4f6fa; }
.hb-theme-preview-side { display: flex; flex-direction: column; gap: 5px; width: 25px; flex: none; padding: 10px 5px; background: #fff; }
.hb-theme-preview-side i { display: block; height: 4px; border-radius: 2px; background: #dfe5ee; }
.hb-theme-preview-side i:first-child { height: 7px; margin-bottom: 3px; background: var(--theme-color); }
.hb-theme-preview-content { flex: 1; padding: 7px; min-width: 0; }
.hb-theme-preview-top { display: block; width: 45%; height: 4px; margin: 0 0 6px; background: #cbd4e1; border-radius: 2px; }
.hb-theme-preview-cards { display: flex; gap: 4px; }
.hb-theme-preview-cards i { width: 33%; height: 13px; border-top: 3px solid var(--theme-color); border-radius: 2px; background: #fff; }
.hb-theme-preview svg { display: block; width: 100%; height: 24px; margin-top: 4px; background: #ffffffc0; }
.hb-theme-preview path { stroke: var(--theme-color); stroke-width: 2; }
.hb-theme-option-caption { display: flex; align-items: center; gap: 6px; padding-top: 9px; color: #42516d; font-size: 11px; font-weight: 500; line-height: 20px; white-space: nowrap; }
.hb-theme-check { margin-left: auto; visibility: hidden; color: var(--theme-color); font-size: 14px; font-weight: 700; }
.hb-theme-option > input:checked + .hb-theme-option-body .hb-theme-check { visibility: visible; }
.hb-theme-footer { display: flex; align-items: center; justify-content: flex-end; gap: 9px; margin-top: 20px; padding-top: 16px; border-top: 1px solid #edf1f8; }
.hb-theme-footer button { height: 34px; min-width: 68px; padding: 0 16px; border: 1px solid #dfe5ef; border-radius: 8px; background: #fff; color: #536580; font-size: 12px; }
.hb-theme-footer .hb-theme-cancel:hover { border-color: var(--hb-primary-border); color: var(--hb-primary); }
.hb-theme-footer .hb-theme-save { border-color: var(--hb-primary); background: var(--hb-primary); color: #fff; }
.hb-theme-footer .hb-theme-save:hover { border-color: var(--hb-primary-hover); background: var(--hb-primary-hover); }
.hb-theme-trigger:focus-visible, .hb-theme-panel button:focus-visible { outline: 3px solid var(--hb-primary-focus); outline-offset: 3px; }
.hb-theme-toast { position: fixed; top: 92px; left: 50%; z-index: 1200; transform: translateX(-50%); max-width: calc(100vw - 24px); padding: 11px 18px; border: 1px solid #e6ebf5; border-radius: 10px; background: #fff; box-shadow: 0 6px 24px #1728461a; color: #42516d; font-size: 13px; }
.hb-theme-toast::before { content: '✓'; margin-right: 8px; color: var(--hb-primary); }
.hb-theme-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.hb-shell-a-active .hb-shell-a-crumb { max-width: calc(100% - 485px); }
@media (min-width: 901px) and (max-width: 1100px) { .hb-shell-a-active .hb-shell-a-crumb { max-width: calc(100% - 420px); } }
@media (max-width: 900px) { .hb-theme-trigger { width: 38px; padding: 0; } .hb-theme-trigger-label, .hb-theme-chevron { display: none; } }
@media (max-width: 380px) { .hb-theme-panel { padding: 16px; } .hb-theme-options { gap: 10px; } .hb-theme-option-caption { gap: 4px; font-size: 10px; } }
