/* ==========================================================================
   Matches Page Styles
   ========================================================================== */

/* Layout */
.hh-matches,
.hh-messages-inbox {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 800px;
    margin: 0 auto;
    padding: 0.85rem;
    width: 100%;
}

.hh-matches-header {
    text-align: center;
    padding: 0.7rem 0 0.1rem;
    margin-bottom: 0.25rem;
}

.hh-matches-heading-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.hh-matches-refresh-btn {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--hh-text-secondary);
    background: var(--hh-surface-soft);
    border: 1px solid var(--hh-glass-border);
    border-radius: 12px;
    cursor: pointer;
}

.hh-matches-refresh-btn:hover:not(:disabled) {
    color: var(--hh-primary);
    border-color: rgba(var(--hh-primary-rgb), 0.45);
}

.hh-matches-refresh-btn:focus-visible,
.hh-dialog-status:focus-visible,
.hh-matches-route-status:focus-visible,
.hh-matches-title:focus-visible,
.hh-matches-refresh-notice:focus-visible {
    outline: 3px solid var(--hh-primary);
    outline-offset: 3px;
}

.hh-matches-refresh-btn:disabled {
    cursor: wait;
    opacity: 0.6;
}

.hh-matches-route-status,
.hh-matches-refreshing,
.hh-matches-refresh-notice {
    border-radius: var(--hh-radius-md);
    font-size: 0.85rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.hh-matches-route-status,
.hh-matches-route-status.success {
    padding: 0.65rem 0.8rem;
    color: var(--hh-success);
    background: rgba(var(--hh-success-rgb), 0.1);
    border: 1px solid rgba(var(--hh-success-rgb), 0.28);
}

.hh-matches-route-status.error {
    color: var(--hh-danger);
    background: rgba(var(--hh-danger-rgb), 0.08);
    border-color: rgba(var(--hh-danger-rgb), 0.28);
}

.hh-matches-route-status.empty {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.hh-matches-refreshing,
.hh-matches-refresh-notice {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.65rem 0.75rem;
}

.hh-matches-refreshing {
    color: var(--hh-text-secondary);
    background: var(--hh-surface-soft);
    border: 1px solid var(--hh-glass-border);
}

.hh-matches-refreshing .mud-icon-root {
    animation: hh-matches-spin 1s linear infinite;
}

.hh-matches-refresh-notice {
    color: var(--hh-warning);
    background: rgba(var(--hh-warning-rgb), 0.1);
    border: 1px solid rgba(var(--hh-warning-rgb), 0.28);
}

.hh-matches-refresh-notice.error {
    color: var(--hh-danger);
    background: rgba(var(--hh-danger-rgb), 0.08);
    border-color: rgba(var(--hh-danger-rgb), 0.28);
}

.hh-matches-refresh-notice span {
    flex: 1;
    min-width: 0;
}

.hh-matches-refresh-notice .btn-secondary {
    flex: 0 0 auto;
    min-height: 44px;
}

@keyframes hh-matches-spin {
    to { transform: rotate(360deg); }
}

.hh-matches-title {
    font-size: 1.9rem;
    font-weight: 800;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--hh-text-primary);
}

.hh-matches-subtitle {
    margin: 0.45rem auto 0;
    max-width: 100%;
    color: var(--hh-text-muted);
    font-size: 0.82rem;
    line-height: 1.5;
}

.hh-matches-empty {
    text-align: center;
    padding: 2.2rem 1.4rem;
}

.hh-empty-actions {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-top: 1rem;
}

/* ── Compact Nudge Panel (collapsible) ── */
.hh-nudge-panel {
    border: 1px solid rgba(var(--hh-warning-rgb), 0.2);
    border-radius: var(--hh-radius-lg);
    overflow: hidden;
}

.hh-nudge-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.65rem 0.85rem;
    background: transparent;
    border: none;
    color: var(--hh-text-primary);
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    min-height: 44px;
}

.hh-nudge-header-left {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-width: 0;
    overflow-wrap: anywhere;
}

.hh-nudge-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 10px;
    background: rgba(var(--hh-warning-rgb), 0.2);
    color: var(--hh-warning);
    font-size: 0.7rem;
    font-weight: 700;
}

.hh-nudge-chevron {
    color: var(--hh-text-muted);
    transition: transform 0.2s ease;
}

.hh-nudge-list {
    display: flex;
    flex-direction: column;
    padding: 0 0.55rem 0.55rem;
    gap: 0.35rem;
}

.hh-nudge-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.6rem;
    border-radius: 10px;
    border: 1px solid var(--hh-glass-border);
    background: var(--hh-surface-soft-alt);
    transition: border-color 0.2s ease;
}

.hh-nudge-row.urgency-high {
    border-color: rgba(var(--hh-danger-rgb), 0.35);
}

.hh-nudge-row.urgency-medium {
    border-color: rgba(var(--hh-warning-rgb), 0.3);
}

.hh-nudge-row-content {
    flex: 1;
    min-width: 0;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    width: 100%;
    padding: 0;
    color: inherit;
    text-align: left;
    font: inherit;
    background: transparent;
    border: 0;
    min-height: 44px;
}

.hh-nudge-row-content:focus-visible {
    outline: 3px solid var(--hh-primary);
    outline-offset: 3px;
    border-radius: 6px;
}

.hh-nudge-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--hh-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hh-nudge-body {
    font-size: 0.72rem;
    color: var(--hh-text-muted);
    white-space: normal;
    overflow-wrap: anywhere;
}

.hh-nudge-row-actions {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-shrink: 0;
}

.hh-nudge-quick-btn,
.hh-nudge-dismiss-btn {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    border: 1px solid var(--hh-glass-border);
    background: transparent;
    color: var(--hh-text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.hh-nudge-quick-btn:hover {
    background: rgba(var(--hh-primary-rgb), 0.12);
    border-color: rgba(var(--hh-primary-rgb), 0.3);
    color: var(--hh-primary);
}

.hh-nudge-dismiss-btn:hover {
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--hh-text-primary);
}

/* ── Wingman inline banner ── */
.hh-wingman-inline {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.85rem;
    cursor: pointer;
    border: 1px solid var(--hh-glass-border);
    border-radius: var(--hh-radius-lg);
    transition: border-color 0.2s ease, background 0.2s ease;
    color: inherit;
    text-decoration: none;
    width: 100%;
    font: inherit;
    text-align: left;
}

.hh-voice-match-picker-list {
    display: grid;
    gap: 0.65rem;
    margin: 1rem 0;
    max-height: min(50vh, 24rem);
    overflow-y: auto;
}

.hh-voice-match-picker-list .btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.hh-wingman-inline:focus-visible {
    outline: 3px solid var(--hh-primary);
    outline-offset: 3px;
}

.hh-wingman-inline:hover {
    border-color: rgba(var(--hh-warning-rgb), 0.35);
    background: var(--hh-dark-elevated);
}

.hh-wingman-inline-text {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--hh-warning);
}

.hh-wingman-inline-cta {
    margin-left: auto;
    font-size: 0.75rem;
    color: var(--hh-text-muted);
    font-weight: 500;
}

.hh-wingman-inline-arrow {
    color: var(--hh-text-muted);
}

/* Matches List */
.hh-matches-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

.hh-match-card {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
    padding: 0.85rem;
    cursor: default;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1), background 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    background: var(--hh-dark-surface);
    border: 1px solid var(--hh-glass-border);
    border-radius: var(--hh-radius-lg);
}

.hh-conversation-card {
    width: 100%;
    color: inherit;
    text-decoration: none;
}

.hh-conversation-card:focus-visible {
    outline: 3px solid var(--hh-primary);
    outline-offset: 3px;
}

.hh-match-profile-link {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.6rem;
    color: inherit;
    text-decoration: none;
    border-radius: var(--hh-radius-md);
}

.hh-match-profile-link:focus-visible {
    outline: 3px solid var(--hh-primary);
    outline-offset: 3px;
    box-shadow: 0 0 0 6px rgba(var(--hh-primary-rgb), 0.2);
}

.hh-match-profile-link .hh-match-meta {
    margin-left: 0;
}

@media (hover: hover) {
    .hh-match-card:hover {
        transform: translateY(-2px);
        box-shadow: var(--hh-shadow-md);
        border-color: var(--hh-glass-border-highlight);
        background: var(--hh-dark-elevated);
    }
}

.hh-match-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid var(--hh-glass-border-highlight);
    background: var(--hh-dark-elevated);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

@media (hover: hover) {
    .hh-match-card:hover .hh-match-avatar {
        border-color: var(--hh-primary);
    }
}

.hh-match-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hh-avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--hh-text-muted);
    background: rgba(var(--hh-primary-rgb), 0.08);
}

.hh-match-info {
    flex: 1;
    min-width: 0;
}

.hh-match-name {
    font-size: 0.98rem;
    font-weight: 700;
    margin: 0 0 0.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--hh-text-primary);
}

.hh-match-preview {
    font-size: 0.8rem;
    color: var(--hh-text-secondary);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hh-match-preview.hh-new-match {
    color: var(--hh-primary);
    font-weight: 500;
}

.hh-match-mode-badge,
.hh-match-contact-badge {
    display: inline-flex;
    align-items: center;
    margin-right: 0.4rem;
    margin-bottom: 0.25rem;
    padding: 0.18rem 0.5rem;
    border-radius: var(--hh-radius-full);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
}

.hh-match-mode-badge {
    color: var(--hh-accent);
    background: rgba(var(--hh-accent-rgb, 100, 180, 255), 0.16);
    border: 1px solid rgba(var(--hh-accent-rgb, 100, 180, 255), 0.3);
}

.hh-match-contact-badge {
    color: var(--hh-success);
    background: rgba(var(--hh-success-rgb), 0.16);
    border: 1px solid rgba(var(--hh-success-rgb), 0.32);
}

.hh-match-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    flex-shrink: 0;
    margin-left: 3.5rem;
}

.hh-match-time {
    font-size: 0.75rem;
    color: var(--hh-text-muted);
    font-weight: 500;
}

.hh-match-countdown {
    font-size: 0.75rem;
    color: var(--hh-warning);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.hh-match-countdown.urgent {
    color: var(--hh-danger);
    animation: pulse 1.5s ease infinite;
}

.hh-match-arrow {
    background: var(--hh-surface-soft);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--hh-text-muted);
    transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

@media (hover: hover) {
    .hh-match-card:hover .hh-match-arrow {
        background: var(--hh-primary);
        color: var(--hh-text-inverse);
        transform: translateX(2px);
    }
}

/* Match Card Actions -- compact row */
.hh-match-card .hh-match-actions {
    width: 100%;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.42rem;
    padding-top: 0.62rem;
    border-top: 1px solid var(--hh-glass-border);
}

.hh-match-card .hh-action-btn {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border-radius: 10px;
    box-shadow: none;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--hh-text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
    flex-direction: row;
    font-size: 0.875rem;
    text-decoration: none;
}

@media (hover: hover) {
    .hh-match-card .hh-action-btn:hover {
        background: rgba(255, 255, 255, 0.08);
        border-color: rgba(255, 255, 255, 0.15);
        color: var(--hh-text-primary);
        transform: translateY(-1px);
    }
}

.hh-match-card .hh-action-btn:focus-visible {
    outline: 2px solid var(--hh-accent);
    outline-offset: 2px;
}

.hh-match-card .hh-action-btn.practice {
    color: hsl(38, 90%, 60%);
    border-color: rgba(255, 180, 0, 0.2);
}

.hh-match-card .hh-action-btn.chat {
    color: var(--hh-primary-light, var(--hh-primary));
    border-color: rgba(var(--hh-primary-rgb), 0.3);
}

.hh-match-card .hh-action-btn.chat:hover {
    background: rgba(var(--hh-primary-rgb), 0.16);
    border-color: rgba(var(--hh-primary-rgb), 0.5);
    color: var(--hh-primary-light, var(--hh-primary));
}

.hh-match-card .hh-action-btn.practice:hover {
    background: rgba(255, 180, 0, 0.15);
    color: hsl(38, 95%, 65%);
    box-shadow: 0 0 12px rgba(255, 180, 0, 0.15);
}

.hh-match-card .hh-action-btn.debrief {
    color: hsl(210, 80%, 65%);
    border-color: rgba(100, 180, 255, 0.2);
}

.hh-match-card .hh-action-btn.debrief:hover {
    background: rgba(100, 180, 255, 0.15);
    color: hsl(210, 90%, 70%);
    box-shadow: 0 0 12px rgba(100, 180, 255, 0.15);
}

.hh-match-card .hh-action-btn.safety {
    color: hsl(165, 70%, 68%);
    border-color: rgba(var(--hh-security-rgb), 0.3);
}

.hh-match-card .hh-action-btn.safety:hover {
    background: rgba(var(--hh-security-rgb), 0.18);
    border-color: rgba(var(--hh-security-rgb), 0.5);
    color: hsl(165, 80%, 75%);
    box-shadow: 0 0 12px rgba(var(--hh-security-rgb), 0.16);
}

.hh-match-card .hh-action-btn.unmatch {
    margin-left: auto;
    color: var(--hh-text-muted);
}

.hh-match-card .hh-action-btn.unmatch:hover {
    color: var(--hh-danger);
    border-color: rgba(var(--hh-danger-rgb), 0.3);
    background: rgba(var(--hh-danger-rgb), 0.1);
}

/* Modal */
.hh-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 15, 19, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    z-index: var(--hh-z-overlay);
    animation: fadeIn 0.2s ease;
}

.hh-modal {
    padding: 2rem;
    width: 100%;
    max-width: 100%;
    margin: 0;
    text-align: center;
    border: 1px solid var(--hh-glass-border-highlight);
    box-shadow: var(--hh-shadow-lg);
    border-radius: 20px 20px 0 0;
    padding-bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px));
    animation: slideUpSheet 0.32s cubic-bezier(0.33, 1, 0.68, 1) forwards;
    overscroll-behavior: contain;
    touch-action: none;
}

dialog.hh-native-dialog.hh-modal {
    position: fixed;
    inset: auto 0 0;
    margin: 0;
    background: var(--hh-dark-elevated);
    touch-action: auto;
}

.hh-modal::before {
    content: '';
    display: block;
    width: 40px;
    height: 5px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2.5px;
    margin: 0 auto 1rem;
}

.hh-modal h3 {
    margin-bottom: 1rem;
    color: var(--hh-text-primary);
}

.hh-modal p {
    color: var(--hh-text-secondary);
    font-size: 0.9375rem;
    margin-bottom: 2rem;
}

.hh-modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.hh-modal-actions > button,
.hh-modal-actions > a {
    min-height: 44px;
}

.hh-modal-actions button:disabled,
.hh-safety-check-item input:disabled {
    cursor: wait;
    opacity: 0.65;
}

.hh-dialog-status {
    margin: 0 0 1rem;
    padding: 0.7rem 0.8rem;
    border-radius: var(--hh-radius-md);
    font-size: 0.85rem;
    line-height: 1.45;
}

.hh-dialog-status.error {
    color: var(--hh-danger);
    background: rgba(var(--hh-danger-rgb), 0.1);
    border: 1px solid rgba(var(--hh-danger-rgb), 0.28);
}

.hh-dialog-status.success {
    color: var(--hh-success);
    background: rgba(var(--hh-success-rgb), 0.1);
    border: 1px solid rgba(var(--hh-success-rgb), 0.28);
}

.hh-dialog-status.empty {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.hh-unmatch-confirm-btn {
    background: var(--hh-danger);
    color: white;
    border: none;
    padding: 0.875rem 2rem;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.9375rem;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
    box-shadow: 0 4px 12px rgba(var(--hh-danger-rgb), 0.3);
}

.hh-unmatch-confirm-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(var(--hh-danger-rgb), 0.4);
}

.hh-safety-flow-modal {
    max-width: 520px;
    text-align: left;
}

.hh-safety-flow-subtitle {
    margin-bottom: 1rem !important;
}

.hh-safety-flow-progress {
    margin: -0.3rem 0 0.9rem !important;
    color: var(--hh-text-muted);
    font-size: 0.78rem;
}

.hh-safety-checklist {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    margin-bottom: 1rem;
}

.hh-safety-check-item {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 0.35rem 0.2rem;
    gap: 0.55rem;
    color: var(--hh-text-primary);
    font-size: 0.88rem;
}

.hh-safety-check-item input {
    width: 1.25rem;
    height: 1.25rem;
    margin: 0;
}

.hh-safety-contact-row {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.65rem;
    border-radius: 9px;
    background: rgba(var(--hh-primary-rgb), 0.09);
    border: 1px solid rgba(var(--hh-primary-rgb), 0.22);
    color: var(--hh-text-secondary);
    font-size: 0.82rem;
    margin-bottom: 1rem;
    max-width: 100%;
    min-width: 0;
    overflow-wrap: anywhere;
}

.hh-safety-contact-hint {
    margin: -0.55rem 0 1rem !important;
    font-size: 0.78rem !important;
    line-height: 1.45;
    color: var(--hh-text-muted) !important;
}

.hh-safety-date-mode-active {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin: 0 0 1rem;
    padding: 0.75rem;
    border: 1px solid rgba(var(--hh-success-rgb), 0.32);
    border-radius: var(--hh-radius-md);
    background: rgba(var(--hh-success-rgb), 0.1);
}

.hh-safety-date-mode-active > div {
    flex: 1 1 15rem;
    min-width: 0;
}

.hh-safety-date-mode-active h4,
.hh-safety-date-mode-active p {
    margin: 0;
}

.hh-safety-date-mode-active h4 {
    color: var(--hh-success);
    font-size: 0.9rem;
}

.hh-safety-date-mode-active p {
    margin-top: 0.25rem;
    color: var(--hh-text-secondary);
    font-size: 0.8rem;
    line-height: 1.45;
}

.hh-safety-date-mode-active .btn-primary {
    min-height: 44px;
    flex: 0 1 auto;
}

.hh-safety-date-mode-locked {
    display: flex;
    align-items: center;
    min-height: 44px;
    color: var(--hh-text-muted);
    font-size: 0.78rem;
    line-height: 1.4;
}

.hh-safety-flow-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: flex-start;
}

.hh-safety-flow-actions > button {
    width: 100%;
}

.hh-safety-flow-secondary {
    margin-top: 0.65rem;
    justify-content: flex-start;
}

/* Guest State */
.hh-matches-guest {
    text-align: center;
    padding: 4rem 2rem;
    max-width: 400px;
    margin: 2rem auto;
}

.hh-guest-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    color: var(--hh-primary);
}

.hh-guest-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.hh-guest-actions .btn-primary,
.hh-guest-actions .btn-secondary {
    white-space: nowrap;
    min-width: 0;
    padding: var(--hh-spacing-md) var(--hh-spacing-lg);
}

/* ── Desktop (≥769px) ── */
@media (min-width: 769px) {
    .hh-matches,
    .hh-messages-inbox {
        gap: 1.5rem;
        padding: 1rem;
    }

    .hh-matches-header {
        padding: 1rem 0;
        margin-bottom: 1rem;
    }

    .hh-matches-title {
        font-size: 2.5rem;
        gap: 1rem;
    }

    .hh-matches-subtitle {
        font-size: 0.88rem;
        max-width: 560px;
    }

    .hh-matches-list {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: 1rem;
    }

    .hh-match-card {
        padding: 1.25rem;
        gap: 1rem;
    }

    .hh-match-avatar {
        width: 56px;
        height: 56px;
    }

    .hh-match-name {
        font-size: 1.0625rem;
    }

    .hh-match-preview {
        font-size: 0.875rem;
    }

    .hh-match-meta {
        align-items: flex-end;
        margin-left: 0;
    }

    .hh-match-card .hh-match-actions {
        padding-top: 0.75rem;
        gap: 0.5rem;
    }

    .hh-match-card .hh-action-btn {
        width: 44px;
        height: 44px;
    }

    .hh-nudge-row-content {
        flex-direction: row;
        align-items: center;
        gap: 0.5rem;
    }

    .hh-nudge-body {
        flex: 1;
    }

    .hh-modal-overlay {
        align-items: center;
    }

    .hh-modal {
        max-width: 400px;
        width: 90%;
        margin: 1rem;
        border-radius: var(--hh-radius-card);
        padding-bottom: 2rem;
        animation-name: scaleIn;
        overscroll-behavior: auto;
        touch-action: auto;
    }

    dialog.hh-native-dialog.hh-modal {
        inset: 0;
        margin: auto;
    }

    .hh-modal::before {
        display: none;
    }
}

@media (max-width: 480px) {
    .hh-matches,
    .hh-messages-inbox {
        padding-inline: 0.55rem;
    }

    .hh-matches-heading-row {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .hh-matches-title {
        flex: 1 1 10rem;
        flex-wrap: wrap;
        min-width: 0;
        font-size: clamp(1.35rem, 8vw, 1.75rem);
        gap: 0.5rem;
        overflow-wrap: anywhere;
        text-align: left;
    }

    .hh-matches-refresh-notice {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .hh-matches-refresh-notice .btn-secondary {
        width: 100%;
    }

    .hh-modal-actions > button {
        flex: 1 1 100%;
        width: 100%;
    }

    .hh-safety-flow-actions,
    .hh-safety-flow-secondary {
        width: 100%;
    }

    .hh-safety-flow-actions {
        grid-template-columns: 1fr;
    }

    .hh-safety-date-mode-active .btn-primary {
        width: 100%;
    }

    .hh-match-card .hh-match-actions {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(44px, 1fr));
    }

    .hh-match-card .hh-action-btn {
        width: 100%;
        min-width: 44px;
    }

    .hh-match-card .hh-action-btn.unmatch {
        margin-left: 0;
    }

    .hh-nudge-row {
        flex-wrap: wrap;
    }

    .hh-nudge-row-content {
        flex: 1 1 100%;
        min-width: 44px;
    }

    .hh-nudge-row-actions {
        flex-wrap: wrap;
        justify-content: flex-end;
        width: 100%;
    }

    .hh-wingman-inline {
        flex-wrap: wrap;
        min-width: 0;
    }

    .hh-wingman-inline-text,
    .hh-wingman-inline-cta {
        flex: 1 1 8rem;
        min-width: 0;
        max-width: 100%;
        overflow-wrap: anywhere;
        white-space: normal;
    }

    .hh-wingman-inline-cta {
        margin-left: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hh-matches-refreshing .mud-icon-root {
        animation: none;
    }
}

/* ── Extra-small screens (<375px) ── */
@media (max-width: 374px) {
    .hh-match-avatar {
        width: 42px;
        height: 42px;
    }

    .hh-match-name {
        font-size: 0.92rem;
    }

    .hh-match-card .hh-action-btn {
        width: 44px;
        height: 44px;
    }
}
