.sbc-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    padding: 1.5rem;
}

.sbc-header {
    margin-bottom: 1rem;
}

.sbc-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
}

.sbc-subtitle {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

.sbc-prompt-box {
    position: relative;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1.25rem 3.25rem 1.25rem 1.25rem;
}

.sbc-sentence {
    font-size: 1.125rem;
    line-height: 2.4rem;
    color: #374151;
    margin: 0;
}

.sbc-token {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.125rem 0.625rem;
    margin: 0 0.125rem;
    border-radius: 0.5rem;
    background: #fef3c7;
    border: 1px dashed #d97706;
    color: #111827;
    font-weight: 600;
    line-height: 1.75rem;
    cursor: pointer;
    transition: background-color 0.15s ease;
    max-width: 100%;
    overflow-wrap: anywhere;
    text-align: left;
}

.sbc-token:hover {
    background: #fde68a;
}

.sbc-token:focus-visible,
.sbc-pencil:focus-visible,
.sbc-quick-location:focus-visible {
    outline: 2px solid #b45309;
    outline-offset: 2px;
}

.sbc-token-empty {
    background: #fff;
    color: #4b5563;
    font-style: italic;
}

.sbc-token-cv {
    background: #e0e7ff;
    border-color: #6366f1;
}

.sbc-token-cv:hover {
    background: #c7d2fe;
}

.sbc-token-cv:focus-visible {
    outline-color: #4338ca;
}

.sbc-token-editor {
    position: relative;
    display: inline-block;
    min-width: 12rem;
    max-width: 100%;
    vertical-align: middle;
}

.sbc-token-input {
    width: 100%;
    padding: 0.25rem 0.625rem;
    border: 2px solid var(--brand-primary, #232323);
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.5rem;
}

.sbc-suggestions {
    position: absolute;
    z-index: 30;
    left: 0;
    right: 0;
    top: calc(100% + 0.25rem);
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
    max-height: 16rem;
    overflow-y: auto;
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.sbc-suggestions li {
    padding: 0.5rem 0.75rem;
    cursor: pointer;
}

.sbc-suggestions li:hover,
.sbc-suggestions li.active {
    background: #f3f4f6;
}

.sbc-pencil {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 9999px;
    background: #fff;
    border: 1px solid #e5e7eb;
    color: #4b5563;
}

.sbc-pencil:hover {
    color: #111827;
    border-color: #9ca3af;
}

.sbc-prompt-input {
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.75rem;
    font-size: 1rem;
    line-height: 1.5rem;
}

.sbc-section-title {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
}

.sbc-cv-section {
    margin-top: 1rem;
}

.sbc-cv-section .sbc-section-title {
    margin-bottom: 0.5rem;
}

.sbc-extras {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-top: 0.75rem;
}

.sbc-extra {
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    background: #f3f4f6;
    font-size: 0.75rem;
    color: #374151;
    text-transform: capitalize;
}

.sbc-quick-locations {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.sbc-quick-location {
    padding: 0.25rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 9999px;
    background: #fff;
    font-size: 0.875rem;
    color: #374151;
}

.sbc-quick-location:hover {
    border-color: #6b7280;
    color: #111827;
}

.sbc-live {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

.sbc-boards-status {
    margin-top: 1rem;
    font-size: 0.875rem;
    color: #4b5563;
}

.sbc-boards-status strong {
    color: #111827;
}

.sbc-boards-empty {
    color: #b45309;
}

.sbc-error {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    font-size: 0.875rem;
}

.sbc-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    margin-top: 1.25rem;
}

.sbc-manual {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid #f3f4f6;
}

@media (max-width: 640px) {
    .sbc-card {
        padding: 1rem;
    }

    .sbc-sentence {
        font-size: 1rem;
    }

    .sbc-actions .btn {
        width: 100%;
    }
}

.sbc-clauses {
    margin-top: 0.5rem;
}

.sbc-clause {
    margin: 0.25rem 0 0;
    font-size: 1rem;
    line-height: 1.9;
    color: #374151;
}

.sbc-clause-remove {
    margin-left: 0.125rem;
    padding: 0 0.375rem;
    border: 0;
    background: transparent;
    color: #9ca3af;
    font-size: 0.75rem;
    cursor: pointer;
}

.sbc-clause-remove:hover,
.sbc-clause-remove:focus-visible {
    color: #374151;
}

.sbc-menu-anchor {
    position: relative;
    display: inline-block;
    max-width: 100%;
    vertical-align: middle;
}

.sbc-menu {
    right: auto;
    min-width: 12rem;
    max-width: min(24rem, calc(100vw - 3rem));
}

.sbc-menu-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sbc-menu-option::before {
    content: '';
    width: 0.875rem;
    flex: none;
}

.sbc-menu-option[aria-selected="true"] {
    font-weight: 600;
    color: #1d4ed8;
}

.sbc-menu-option[aria-selected="true"]::before {
    content: '\2713';
}

.sbc-chip {
    padding: 0.25rem 0.75rem;
    border: 1px dashed #d1d5db;
    border-radius: 9999px;
    background: #fff;
    font-size: 0.8125rem;
    color: #6b7280;
    cursor: pointer;
}

.sbc-chip:hover,
.sbc-chip:focus-visible {
    border-color: #2563eb;
    color: #1d4ed8;
}

.sbc-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}
