/* Shared layout, typography and action styles. Loaded after legacy page styles. */
.directory-member-name { color: inherit; text-decoration: none; }
.directory-member-name:hover { color: var(--action-primary); }
.directory-member-detail { grid-column: 1 / -1; min-width: 0; padding-top: 12px; border-top: 1px solid var(--line); }
.directory-message-line { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.directory-message-line time { flex: 0 0 auto; margin-left: auto; color: var(--muted); font-size: 11px; white-space: nowrap; }
.directory-message-preview { display: block; flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); font-size: 13px; line-height: 1.6; text-decoration: none; }
.directory-message-preview:hover { color: var(--action-primary); }
.directory-message-meta { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-top: 12px; color: var(--muted); font-size: 11px; }
.directory-unread { padding: 3px 8px; border-radius: 999px; background: #f9e8ef; color: var(--action-primary); font-weight: 600; }
.app-shell .member-directory .online-member-grid .connection-row { position: relative; grid-template-columns: 64px minmax(0, 1fr); padding: 22px 18px; transition: border-color .16s, box-shadow .16s; }
.app-shell .online-member-grid .connection-row:has(.online-member-menu[open]) { z-index: 3; }
.app-shell .online-member-grid .connection-row:hover { border-color: #d2bfcc; box-shadow: 0 8px 24px #49314410; }
.app-shell .online-member-grid .connection-avatar { width: 64px; height: 64px; }
.app-shell .online-member-grid .online-member-info { padding-right: 24px; }
.online-member-menu { position: absolute; top: 8px; right: 8px; }
.online-member-menu summary { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; list-style: none; color: #766572; cursor: pointer; }
.online-member-menu summary::-webkit-details-marker { display: none; }
.online-member-menu summary:hover, .online-member-menu[open] summary { background: #f8edf3; color: var(--action-primary); }
.online-member-menu summary:focus-visible { outline: 2px solid var(--action-primary); outline-offset: 2px; }
.online-member-menu-items { position: absolute; right: 0; top: 40px; width: 170px; padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: 0 12px 32px #30203026; }
.online-member-menu-items form { margin: 0; }
.app-shell .online-member-menu-items .online-menu-item { display: flex; align-items: center; gap: 10px; width: 100%; min-width: 0; min-height: 44px; margin: 0; padding: 10px 12px; border: 0; border-radius: 8px; background: #fff; color: var(--ink); font: 500 13px/1.4 var(--font-ui); text-align: left; text-decoration: none; cursor: pointer; }
.app-shell .online-member-menu-items .online-menu-item:hover { background: #f8f4f7; }
.app-shell .online-member-menu-items .online-menu-block { color: var(--action-danger); }
.app-shell .online-member-menu-items .online-menu-block:hover { background: #fff1f2; }
.online-action-notice { margin: 0 0 18px; padding: 12px 16px; border: 1px solid #cbe2d5; border-radius: 10px; color: #187047; background: #f0f8f3; }
.app-shell .page-content:has(.member-directory), .app-shell .dating-workspace.member-directory { max-width: 1120px; }
.app-shell .member-directory .online-heading { max-width: none; }
.online-results-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; margin-bottom: 20px; }
.online-results-toolbar p { margin: 0; color: var(--muted); font-size: 13px; }
.online-page-size { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0; }
.online-page-size label { color: var(--muted); font-size: 13px; }
.online-page-size select { width: 78px; min-height: 44px; padding: 8px; border: 1px solid #d8d0dc; border-radius: 10px; color: var(--ink); background: #fff; font: inherit; }
.app-shell .online-page-size .dating-outline { min-width: 72px; padding: 10px 14px; }
.app-shell .member-directory .online-member-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); align-items: stretch; gap: 16px; overflow: visible; background: transparent; border: 0; border-radius: 0; box-shadow: none; }
.app-shell .online-member-grid .connection-row { grid-template-columns: 55px minmax(0, 1fr); gap: 14px; align-content: start; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: var(--shadow); }
.online-member-info { min-width: 0; overflow-wrap: anywhere; }
.app-shell .online-member-grid :is(.chat-now, .online-message-sent) { grid-column: 2; justify-self: start; min-height: 44px; max-width: 100%; margin: 0; }
.app-shell .online-member-grid .online-message-sent { display: inline-flex; align-items: center; text-align: left; }
.online-member-grid > .dating-empty { grid-column: 1 / -1; }
.online-pagination { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.online-pagination button:disabled { opacity: .45; cursor: default; }
.online-page-numbers { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; }
.online-page-number { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 8px; border: 1px solid #d8d0dc; border-radius: 10px; color: var(--ink); background: #fff; text-decoration: none; }
.online-page-number.current { color: #fff; background: var(--action-primary); border-color: var(--action-primary); font-weight: 600; }
.online-page-number:hover { border-color: var(--action-primary); }
.online-page-ellipsis { padding: 4px; color: var(--muted); }
@media (max-width: 480px) { .online-page-size { width: 100%; }.online-pagination .online-page-numbers { order: 3; width: 100%; }.online-pagination { justify-content: space-between; } }
.smart-single-profile { overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.smart-single-profile .smart-profile-header { padding-right: 24px; }
.smart-single-profile .smart-profile-photo { height: 360px; object-fit: contain; background: #f6f0f5; }
.smart-profile-navigation { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 18px; }
.smart-profile-navigation > span { color: var(--muted); text-align: center; font-size: 13px; }
.smart-profile-navigation .dating-outline { min-width: 92px; padding: 10px 14px; }
.smart-profile-navigation button:disabled { opacity: .45; cursor: default; }
.smart-profile-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin: 0 0 24px; }
.smart-profile-facts dt, .smart-profile-body .smart-detail-label { color: var(--muted); font-size: 13px; font-weight: 600; margin: 0 0 6px; }
.smart-profile-facts dd { margin: 0; color: var(--ink); }
.smart-single-profile .profile-intent { margin: 0 0 24px; }
.smart-profile-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.smart-profile-gallery img { width: 100%; height: 190px; object-fit: contain; background: #f6f0f5; border-radius: 10px; }
@media (max-width: 480px) { .smart-single-profile .smart-profile-photo { height: 280px; }.smart-profile-navigation .dating-outline { min-width: 78px; padding: 10px; }.smart-profile-gallery img { height: 150px; } }
.app-shell .smart-heading .smart-filters-trigger { flex: 0 0 auto; min-width: 0; }
.smart-dialog { box-sizing: border-box; width: min(660px, calc(100vw - 28px)); max-height: calc(100dvh - 32px); margin: auto; padding: 0; overflow-y: auto; border: 1px solid var(--line); border-radius: 18px; color: var(--ink); background: #fff; box-shadow: 0 24px 85px #25142355; }
.smart-dialog::backdrop { background: #20131eb3; }
.smart-dialog > h2 { margin: 0; padding: 24px 58px 20px 24px; font-size: 23px; }
.smart-dialog-close { position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: #fff; color: var(--ink); font-size: 26px; cursor: pointer; z-index: 1; }
.app-shell .smart-dialog .preference-card { border: 0; border-radius: 0; box-shadow: none; }
.smart-dialog .auth-feedback:empty, .smart-profile-status:empty { display: none; }
.smart-dialog .city-results { max-height: 160px; }
.smart-profile-dialog { width: min(550px, calc(100vw - 28px)); }
.smart-profile-photo { display: block; width: 100%; height: 310px; object-fit: cover; object-position: center 30%; }
.smart-profile-body { padding: 24px; }
.smart-profile-header { padding: 24px 64px 20px 24px; }
.smart-profile-header h2 { margin: 0 0 8px; font-size: 25px; line-height: 1.3; overflow-wrap: anywhere; }
.smart-profile-dialog > h2[hidden] { display: none; }
.smart-profile-location { margin: 0; color: var(--muted); overflow-wrap: anywhere; }
.smart-profile-body .profile-bio { white-space: pre-line; overflow-wrap: anywhere; }
.smart-profile-status { margin: 0; padding: 0 24px 24px; }
.smart-profile-fallback { margin: 0 24px 24px; }
.app-shell .smart-profile-fallback[hidden] { display: none; }
.smart-empty { grid-column: 1 / -1; }
body:has(.smart-dialog[open]) { overflow: hidden; }
@media (max-width: 480px) {
    .app-shell .smart-heading h1 { font-size: 23px; }
    .app-shell .smart-heading .smart-filters-trigger { max-width: 42%; padding: 10px; font-size: 12px; }
    .smart-dialog > h2 { font-size: 21px; padding-left: 18px; }
    .app-shell .smart-dialog .preference-row { padding: 18px; }
    .smart-profile-photo { height: 250px; }
    .smart-profile-body { padding: 18px; }
    .smart-profile-header { padding: 20px 60px 18px 18px; }
    .smart-profile-header h2 { font-size: 23px; }
}
.app-shell .discover-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.app-shell .discover-heading h1 { margin: 0; }
.app-shell .discover-heading .match-preferences-trigger { flex: 0 0 auto; width: auto; height: auto; min-height: 44px; margin: 0; padding: 10px 14px; }
.app-shell .discover-name > div { min-width: 0; }
.app-shell .discover-name p { white-space: normal; overflow-wrap: anywhere; line-height: 1.6; }
@media (max-width: 480px) { .app-shell .discover-heading h1 { font-size: 25px; }.app-shell .discover-heading .match-preferences-trigger { min-width: 0; max-width: 52%; padding: 10px; font-size: 12px; } }
.app-shell .online-heading { align-items: center; gap: 16px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.app-shell .online-heading h1 { display: flex; align-items: center; gap: 12px; margin: 0; }
.online-heading-dot { width: 10px; height: 10px; flex: 0 0 10px; border-radius: 50%; background: #187047; box-shadow: 0 0 0 5px #eaf5ee; }
.app-shell .online-heading .online-filters-trigger { flex: 0 0 auto; width: auto; height: 44px; min-width: 104px; margin: 0; padding: 10px 16px; }
@media (max-width: 480px) { .app-shell .online-heading { gap: 12px; }.app-shell .online-heading h1 { font-size: 25px; }.app-shell .online-heading .online-filters-trigger { min-width: 92px; padding: 10px 12px; } }
:root {
    --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --action-primary: #a73960;
    --action-primary-hover: #872e4e;
    --action-message: #176b64;
    --action-message-hover: #10554f;
    --action-success: #187047;
    --action-danger: #b42335;
    --ink: #302a35;
    --muted: #706977;
    --line: #e8e3e9;
    --shadow: 0 8px 28px rgba(45, 30, 48, .055);
}
body { font-family: var(--font-ui); font-size: 14px; line-height: 1.55; }
body :is(input, select, textarea, button) { font-family: var(--font-ui); }
body :is(h1, h2, h3, h4, .user-name) { font-family: var(--font-ui); letter-spacing: -.025em; }
body :is(.page-heading h1, .dating-page-title h1, .profile-details h1) { font-size: clamp(26px, 2.4vw, 34px); line-height: 1.25; font-weight: 700; }
body :is(.edit-account-form h2, .signup-form.auth-card h2, .dating-empty h2, .profile-detail-body h1) { font-size: clamp(23px, 2vw, 28px); line-height: 1.3; }
body :is(.discover-name h2, .room-name h3) { font-size: 22px; line-height: 1.3; }
body :is(.eyebrow, .profile-kicker) { font-size: 11px; letter-spacing: .1em; }
.app-shell :is(.main-content, .main-content *, dialog, dialog *) { box-sizing: border-box; }
.app-shell .main-content { width: calc(100% - 238px); max-width: none; margin: 0 0 0 238px; padding: 36px clamp(24px, 4vw, 64px) 60px; }
.app-shell .page-content { width: 100%; max-width: 860px; min-width: 0; margin: 0 auto; }
.app-shell .dating-workspace { width: 100%; max-width: 740px; margin: 0 auto; }
.app-shell .dating-page-discover { max-width: 580px; }
.app-shell :is(.dating-page-search, .dating-page-booster) { max-width: 680px; }
.app-shell .dating-page-message-detail { max-width: 800px; }
.app-shell :is(.page-heading, .dating-page-title) { margin: 0 auto 24px; max-width: 740px; }
.app-shell .profile-hero { max-width: 740px; grid-template-columns: 144px minmax(0, 1fr); gap: 28px; padding: 28px; border-radius: 18px; }
.app-shell .profile-hero .profile-picture img { width: 144px; height: 164px; object-fit: cover; border-radius: 14px; }
.app-shell .edit-account-form { max-width: 640px; padding: 28px; border-radius: 18px; }
.app-shell :is(.post-form-container, .post-box, .box, .room-box, .messages-container, .notification-container) { width: 100%; max-width: 660px; margin-left: auto; margin-right: auto; }
.app-shell :is(.result-box, .search-error) { width: 100%; max-width: 560px; margin: 0 auto; }
.app-shell :is(.photo-grid, .visitor-grid, .profile-detail-card) { max-width: 780px; margin-left: auto; margin-right: auto; }
.app-shell :is(.discover-card, .preference-card, .connection-list, .conversation-list, .dating-empty) { border-radius: 18px; box-shadow: var(--shadow); }
.app-shell .discover-photo { height: 380px; min-height: 0; }
.app-shell .discover-photo img { object-position: center 30%; }
.app-shell .discover-body { padding: 24px; }
.app-shell .discover-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.app-shell .discover-actions form { flex: 0 0 auto; }
.app-shell .preference-row { gap: 20px; padding: 20px 24px; }
.app-shell .preference-row > div:first-child { flex: 1; min-width: 0; }
.app-shell .preference-row .city-picker { flex: 1.2; min-width: 0; }
.app-shell .city-filter-card { align-items: start; }
.app-shell .city-filter-card .city-picker { min-width: 0; }
.app-shell .account-actions { align-items: center; flex-direction: row; gap: 10px; }
.app-shell .profile-meta .personal-detail { overflow-wrap: anywhere; min-width: 0; }

/* Standard text buttons use a 44px target and content-based width. */
body :is(.dating-primary, .dating-outline, .decision-button, .message-profile, .chat-now,
    .action-button, .join-button, .edit-button, .change-password-button, .delete-account-button,
    .custom-file-upload-post, .social-auth-button, .links button, .links .view, .links .follow) {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    width: auto; min-width: 112px; max-width: 100%; min-height: 44px;
    padding: 10px 18px; margin-top: 0; border: 1px solid transparent; border-radius: 10px;
    font-family: var(--font-ui); font-size: 13px; line-height: 1.4; font-weight: 600;
    text-align: center; text-decoration: none; white-space: normal; cursor: pointer;
    box-shadow: none; transition: background-color .16s, border-color .16s, color .16s;
}
body :is(.dating-primary, .decision-button.like, .edit-button) {
    color: #fff; background: var(--action-primary); border-color: var(--action-primary); box-shadow: none;
}
body :is(.dating-primary, .decision-button.like, .edit-button):hover { color: #fff; background: var(--action-primary-hover); border-color: var(--action-primary-hover); transform: none; }
body :is(.dating-outline, .decision-button.pass, .change-password-button, .action-button.message-button, .action-button.comment-button, .custom-file-upload-post) {
    color: #514858; background: #fff; border-color: #d8d0dc;
}
body :is(.dating-outline, .decision-button.pass, .change-password-button, .action-button.message-button, .action-button.comment-button, .custom-file-upload-post):hover {
    color: #302a35; background: #f5f2f6; border-color: #b9adbf; transform: none;
}
body :is(.message-profile, .chat-now, .join-button) { color: #fff; background: var(--action-message); border-color: var(--action-message); }
body :is(.message-profile, .chat-now, .join-button):hover { color: #fff; background: var(--action-message-hover); border-color: var(--action-message-hover); transform: none; }
body .action-button.add-friend-button { color: #fff; background: var(--action-success); border-color: var(--action-success); }
body .action-button.add-friend-button:hover { background: #125735; }
body :is(.delete-account-button, .action-button.remove-friend-button) { color: var(--action-danger); background: #fff4f4; border-color: #efbdc4; }
body :is(.delete-account-button, .action-button.remove-friend-button):hover { color: #fff; background: var(--action-danger); border-color: var(--action-danger); }
.app-shell .account-actions :is(.edit-button, .change-password-button, .delete-account-button) { width: auto; min-height: 44px; padding: 10px 16px; }
.app-shell .account-actions .edit-button { background: var(--action-primary); }
.app-shell .account-actions .delete-account-button { color: var(--action-danger); background: #fff4f4; }
.app-shell .account-actions .delete-account-button:hover { color: #fff; background: var(--action-danger); }
body .first-message-dialog .dating-primary { background: var(--action-message); border-color: var(--action-message); }
.app-shell .preference-card .dating-primary.full { display: flex; width: fit-content; min-width: 180px; margin: 22px 24px; }
body .match-preferences-footer .dating-primary.full { width: auto; min-width: 180px; margin: 0; }
body .match-preferences-footer { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
body .first-message-dialog .dating-primary.full { width: auto; min-width: 160px; margin-top: 18px; }
body :is(#submit-button, #post-button) { width: auto; min-width: 140px; max-width: 100%; min-height: 44px; padding: 10px 22px; border: 1px solid var(--action-primary); border-radius: 10px; color: #fff; background: var(--action-primary); font: 600 14px/1.4 var(--font-ui); box-shadow: none; }
body :is(#submit-button, #post-button):hover { background: var(--action-primary-hover); }
.auth-shell :is(#submit-button, .social-auth-button) { width: 100%; }
.app-shell .discover-actions :is(.decision-button, .message-profile) { width: 136px; }
.app-shell .links { justify-content: center; }
.app-shell .links :is(button, .view, .follow) { min-width: 86px; border-radius: 10px; }
body :is(.dating-primary, .dating-outline, .chat-now, .decision-button, .action-button, button, input[type='submit']):disabled { opacity: .5; cursor: not-allowed; box-shadow: none; transform: none; }
body :is(a, button, input, select, textarea):focus-visible { outline: 3px solid #9472b0; outline-offset: 3px; }
body :is(.first-message-close, .match-preferences-close, .match-preferences-trigger, .dating-icon-button) { min-width: 40px; min-height: 40px; }
.app-shell .item-send { width: 44px; min-width: 44px; height: 44px; flex: 0 0 44px; background: var(--action-message); }
.app-shell .item-send:hover { background: var(--action-message-hover); }
body :is(.account-field, .preference-row) :is(input:not([type='checkbox']):not([type='hidden']), select, textarea) { font-size: 14px; }
/* Align form controls and keep utility actions on the same baseline. */
.app-shell .edit-account-form { text-align: left; }
.app-shell .edit-account-form .account-field { text-align: left; }
.app-shell .edit-account-form .account-field :is(input:not([type='checkbox']):not([type='hidden']):not([type='file']), select, textarea) { width: 100%; min-height: 44px; padding: 11px 12px; border: 1px solid #ddd5e0; border-radius: 9px; background: #fff; }
.app-shell .edit-account-form .account-field textarea { min-height: 110px; resize: vertical; }
.app-shell .photo-upload-field .custom-file-upload { display: inline-flex; width: auto; min-height: 44px; margin: 0; padding: 10px 16px; }
.app-shell .post-form-container .action-buttons { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.app-shell .post-form-container .action-buttons :is(#post-button, .custom-file-upload-post) { margin-top: 0; margin-bottom: 0; min-height: 44px; padding: 10px 18px; }
.app-shell #post-button { text-transform: capitalize; }
@media (max-width: 1000px) and (min-width: 768px) {
    .app-shell .main-content { padding: 28px 24px 48px; }
    .app-shell .profile-hero { grid-template-columns: 112px minmax(0, 1fr); gap: 20px; padding: 22px; }
    .app-shell .profile-hero .profile-picture img { width: 112px; height: 132px; }
    .app-shell .preference-row:not(.age-row) { flex-direction: column; align-items: stretch; }
}
@media (max-width: 767px) {
    .app-shell .main-content { width: 100%; margin: 0; padding: 24px 16px 40px; }
    .app-shell .profile-hero { grid-template-columns: 1fr; gap: 18px; padding: 24px 18px; }
    .app-shell .profile-hero .profile-picture img { width: 112px; height: 128px; }
    .app-shell .edit-account-form { padding: 24px 20px; }
    .app-shell .discover-photo { height: clamp(260px, 80vw, 380px); }
    .app-shell .discover-body { padding: 20px 16px; }
    .app-shell .discover-actions { gap: 8px; flex-wrap: nowrap; }
    .app-shell .discover-actions form { flex: 1; }
    .app-shell .discover-actions :is(.decision-button, .message-profile) { width: 100%; min-width: 0; padding: 10px; gap: 6px; }
    .app-shell .discover-actions > .message-profile { flex: 1; }
    .app-shell .discover-actions :is(.decision-button, .message-profile) span { display: inline; }
    .app-shell .preference-row { padding: 20px; gap: 14px; }
    .app-shell .preference-row .city-picker { width: 100%; }
    .app-shell .preference-card .dating-primary.full { margin: 20px; max-width: calc(100% - 40px); }
    .app-shell .account-actions { flex-wrap: wrap; }
    .app-shell .account-actions :is(.edit-button, .change-password-button, .delete-account-button) { min-width: 120px; }
    .app-shell .links { gap: 6px; }
    .app-shell .links :is(button, .view, .follow) { min-width: 68px; padding: 9px 12px; }
    body :is(.signup-form, .edit-account-form, .preference-card) :is(input:not([type='checkbox']), select, textarea) { font-size: 16px; }
}
