.hh-settings-back {
    display: inline-flex;
    align-items: center;
    background: none;
    border: none;
    color: var(--hh-text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    margin-right: 0.5rem;
    border-radius: 50%;
    transition: background 0.2s;
}

.hh-settings-back:hover {
    background: var(--hh-surface-soft-hover);
}

@media (min-width: 769px) {
    .hh-settings-back {
        display: none;
    }
}

.hh-settings {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    animation: fadeIn 0.5s ease-out;
    max-width: 720px;
    margin: 0 auto;
    width: 100%;
}

.hh-settings-subtitle {
    margin: 0.4rem 0 0;
    color: var(--hh-text-muted);
    font-size: 0.95rem;
}

.hh-settings-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    align-items: start;
}

.hh-settings-section {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
    overflow: hidden;
    height: 100%;
}

.hh-settings-section--wide {
    grid-column: auto;
}

.hh-settings-section--compact {
    min-height: 100%;
}

.hh-settings-section-header {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 1.15rem;
    border-bottom: 1px solid var(--hh-glass-border);
    background: transparent;
}

.hh-settings-section-title {
    min-width: 0;
}

.hh-settings-section-header h2 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--hh-text-muted);
    font-weight: 600;
}

.hh-settings-row {
    padding: 1.15rem 1.5rem;
    border-bottom: 1px solid rgba(var(--hh-primary-rgb), 0.05);
    transition: background 0.2s ease;
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 0.55rem;
}

.hh-settings-row:last-child {
    border-bottom: none;
}

.hh-settings-row:hover {
    background: rgba(var(--hh-primary-rgb), 0.03);
}

.hh-settings-row-message {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 0;
    padding-top: 0.25rem;
    background: transparent;
}

.hh-settings-row-message:hover {
    background: transparent;
}

.hh-settings-row-stack {
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 0.85rem;
}

.hh-settings-advanced-card {
    background: rgba(var(--hh-primary-rgb), 0.035);
    border-top: 1px dashed rgba(var(--hh-primary-rgb), 0.22);
}

.hh-settings-advanced-copy {
    margin: 0;
    color: var(--hh-text-muted);
    font-size: 0.81rem;
    line-height: 1.45;
}

.hh-settings-advanced-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.hh-theme-row {
    align-items: flex-start;
}

.hh-settings-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--hh-text-secondary);
    font-size: 0.9375rem;
    min-width: 0;
}

.hh-settings-value {
    font-size: 0.9375rem;
    color: var(--hh-text-primary);
    font-weight: 500;
    text-align: left;
    overflow-wrap: anywhere;
}

.hh-settings-value.dim {
    color: var(--hh-text-muted);
    font-weight: 400;
}

.hh-settings-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    min-width: 0;
    width: 100%;
}

.hh-settings-action-stacked {
    flex-direction: column;
    align-items: flex-end;
    gap: 0.35rem;
}

.hh-settings-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    background: none;
    border: none;
    color: var(--hh-primary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    min-height: 44px;
    border-radius: 6px;
    transition: all 0.2s ease;
    min-width: 5.5rem;
}

.hh-settings-link-label {
    cursor: pointer;
}

.hh-settings-file-picker {
    position: relative;
    overflow: hidden;
}

.hh-settings-file-picker input[type="file"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.hh-settings-file-picker:focus-within {
    outline: 3px solid var(--hh-primary);
    outline-offset: 2px;
}

.hh-settings-file-picker:has(input:disabled) {
    cursor: not-allowed;
    opacity: 0.55;
}

.hh-settings-link:hover {
    background: rgba(var(--hh-primary-rgb), 0.1);
}

.hh-settings-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.3rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.8125rem;
    font-weight: 500;
    min-width: 6.5rem;
    white-space: nowrap;
}

.hh-settings-badge.success {
    background: rgba(var(--hh-success-rgb), 0.12);
    color: var(--hh-success);
    border: 1px solid rgba(var(--hh-success-rgb), 0.2);
}

.hh-settings-badge.warning {
    background: rgba(var(--hh-danger-rgb), 0.12);
    color: var(--hh-danger);
    border: 1px solid rgba(var(--hh-danger-rgb), 0.2);
}

.hh-settings-badge.neutral {
    background: var(--hh-surface-soft-alt);
    color: var(--hh-text-muted);
    border: 1px solid var(--hh-glass-border);
}

.hh-danger-section {
    border: 1px solid rgba(var(--hh-danger-rgb), 0.15);
}

.hh-danger-text {
    color: var(--hh-danger);
}

.hh-delete-confirm {
    flex-direction: column;
    align-items: flex-end;
}

.hh-delete-confirm-copy {
    max-width: 34rem;
    margin: 0;
    color: var(--hh-text-muted);
    font-size: 0.82rem;
    line-height: 1.45;
    text-align: right;
}

.hh-phone-inline {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.hh-settings-phone-hint {
    flex-basis: 100%;
    color: var(--hh-text-muted);
    font-size: 0.78rem;
    line-height: 1.35;
    text-align: right;
}

.hh-settings-toggle-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--hh-text-secondary);
    font-size: 0.82rem;
}

.hh-inline-input {
    background: var(--hh-input-bg);
    border: 1px solid var(--hh-glass-border-highlight);
    border-radius: 8px;
    color: var(--hh-text-primary);
    padding: 0.35rem 0.65rem;
    font-size: 0.875rem;
    width: 130px;
    outline: none;
    transition: border-color 0.2s ease;
}

.hh-inline-input:focus {
    border-color: var(--hh-primary);
}

.hh-inline-input:focus-visible {
    outline: 2px solid var(--hh-accent);
    outline-offset: 2px;
}

.hh-inline-input-danger {
    border-color: rgba(var(--hh-danger-rgb), 0.45);
}

.hh-inline-input-danger:focus {
    border-color: var(--hh-danger);
}

.hh-settings-inline-message {
    color: var(--hh-primary);
    font-size: 0.8125rem;
}

.hh-settings-inline-message.error {
    color: var(--hh-danger);
}

.hh-feedback-panel {
    padding-top: 1rem;
    padding-bottom: 1rem;
    background: transparent;
    /* Override the desktop 2-column grid — feedback is always stacked */
    grid-template-columns: 1fr !important;
}

.hh-feedback-help {
    color: var(--hh-text-muted);
    font-size: 0.85rem;
    margin: 0;
}

.hh-feedback-categories {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.hh-feedback-chip {
    font-size: 0.8rem;
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
}

.hh-feedback-chip.btn-primary {
    background: rgba(var(--hh-primary-rgb), 0.15);
    color: var(--hh-primary-light);
    border: 1px solid rgba(var(--hh-primary-rgb), 0.4);
}

.hh-feedback-chip.btn-secondary {
    background: transparent;
    border: 1px solid var(--hh-glass-border-highlight);
    color: var(--hh-text-secondary);
}

.hh-feedback-textarea {
    resize: vertical;
    min-height: 96px;
    width: 100%;
}

.hh-feedback-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.75rem;
}

.hh-feedback-footer .btn-primary {
    justify-content: center;
    padding: var(--hh-spacing-sm) var(--hh-spacing-lg);
    font-size: 0.875rem;
}

.hh-feedback-count {
    color: var(--hh-text-muted);
    font-size: 0.75rem;
    margin-right: auto;
}

.hh-feedback-status {
    margin-top: 0.15rem;
    font-size: 0.85rem;
}

/* ── Desktop (≥641px) ── */
@media (min-width: 641px) {
    .hh-settings-row.hh-ui-row-split {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 1rem;
    }

    .hh-settings-action {
        width: auto;
        justify-content: flex-end;
    }

    .hh-settings-value {
        text-align: right;
    }

    .hh-feedback-footer .btn-primary {
        width: auto;
    }
}
.hh-category-erasure-panel {
    display: grid;
    gap: 0.9rem;
    width: 100%;
}

.hh-category-erasure-panel fieldset {
    border: 0;
    display: grid;
    gap: 0.65rem;
    margin: 0;
    padding: 0;
}

.hh-category-erasure-option {
    align-items: flex-start;
    cursor: pointer;
    display: grid;
    gap: 0.65rem;
    grid-template-columns: auto 1fr;
}

.hh-category-erasure-option span {
    display: grid;
    gap: 0.15rem;
}

.hh-category-erasure-option small,
.hh-category-erasure-warning {
    color: var(--hh-text-secondary);
}

.hh-category-erasure-warning {
    border-inline-start: 3px solid var(--hh-warning);
    display: grid;
    gap: 0.35rem;
    padding-inline-start: 0.75rem;
}

.hh-category-erasure-warning p {
    margin: 0;
}
