.cb-page { width: min(760px, 100%); }
.cb-page *, .cb-page *::before, .cb-page *::after { box-sizing: border-box; }
.cb-page .tool-title-banner { display: flex; width: 100%; max-width: 100%; gap: 12px; }
.cb-title-icon { flex: 0 0 32px; width: 32px; line-height: 1; display: flex; align-items: center; justify-content: center; }
.cb-title-icon svg { display: block; flex: 0 0 28px; }
.cb-page .tool-title-banner h1 { flex: 1 1 auto; min-width: 0; margin: 0; overflow-wrap: anywhere; white-space: normal; }
.cb-color { min-width: 0; margin: 0 0 16px; padding: 16px; border: 1px solid var(--sage-border, #cfd9ce); border-radius: 12px; }
.cb-color legend { font-weight: 700; padding: 0 6px; }
.cb-fields { display: grid; grid-template-columns: 68px minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.cb-fields .ut-field { min-width: 0; }
.cb-fields label { overflow-wrap: anywhere; }
.cb-fields input { width: 100%; min-width: 0; }
.cb-picker { height: 46px; padding: 3px; border: 1px solid #a8b7a4; border-radius: 8px; background: #fff; cursor: pointer; }
.cb-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cb-button { min-height: 44px; padding: 10px 16px; border: 1px solid #9caf88; border-radius: 9px; background: #eef3ea; color: #263c2a; font: inherit; font-weight: 600; cursor: pointer; overflow-wrap: anywhere; max-width: 100%; }
.cb-button:hover { background: #e0ead9; }
.cb-button:disabled { opacity: .5; cursor: default; }
.cb-page :focus-visible { outline: 3px solid #507443; outline-offset: 3px; }
.cb-help, .cb-ratio { font-size: .9rem; line-height: 1.55; color: #4b6049; overflow-wrap: anywhere; }
.cb-ratio { margin: 10px 0 0; }
.cb-error { display: block; color: #9d2626; overflow-wrap: anywhere; }
.cb-page input[aria-invalid="true"] { border-color: #9d2626; }
.cb-preview { height: 100px; width: 100%; border: 1px solid #a8b7a4; border-radius: 12px; margin-bottom: 16px; }
.cb-result { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 12px 0; }
.cb-result output { flex: 1 1 140px; min-width: 0; font-family: monospace; font-size: 1.15rem; overflow-wrap: anywhere; }
.cb-result .cb-button { flex: 0 1 auto; }
.cb-page [hidden] { display: none !important; }
@media (max-width: 480px) {
    .cb-color { padding: 12px; }
    .cb-fields { grid-template-columns: 54px minmax(0, 1fr); gap: 10px; }
    .cb-weight-field { grid-column: 1 / -1; }
    .cb-actions .cb-button { flex: 1 1 120px; }
    .cb-page .tool-title-banner { gap: 8px; }
}
