[hidden] { display: none !important; }
.select2-hidden-accessible { transition: none !important; }
main, footer { overflow-wrap: anywhere; }
main :is(.neu-card, .tutor-card, .tutor-card-info, .auth-card, .form-group, .directory-panel, .tutor-card-tag),
main :is(.tutor-card, .profile-page, .search-row) div { min-width: 0; }
main :is(input, select, textarea, img, fieldset, .select2-container) { max-width: 100%; }
main textarea { resize: vertical; }
main .tutor-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.tutor-card-footer, .onboarding-actions, .profile-page [style*="display: flex"] { flex-wrap: wrap; }
.tutor-card-tag, .neu-badge { white-space: normal; max-width: 100%; }
.profile-page .neu-card { padding: clamp(1rem, 4vw, 3rem) !important; }
.directory-controls { margin-block: 1rem 2rem; }
.search-row, .discovery-tools { display: flex; gap: .75rem; align-items: flex-start; margin-bottom: 1rem; }
.search-row input { min-width: 0; flex: 1; }
.discovery-tools { flex-wrap: wrap; }
.directory-panel summary { width: fit-content; cursor: pointer; }
.directory-panel[open] { flex: 1 1 100%; }
.directory-panel[open] summary { margin-bottom: .75rem; }
.directory-panel label, .place-picker small { display: block; }
.directory-panel label { flex: 1 1 9rem; }
.directory-panel select { display: block; width: 100%; margin-block: .35rem; }
.signup-role { border: 0; padding: 0; margin: 0 0 1.25rem; }
.signup-role label, .registration-plan > label { display: flex; align-items: center; gap: .6rem; min-height: 44px; }
.registration-plan { margin: 1rem 0; }
.registration-plan summary { cursor: pointer; text-decoration: underline; }
.place-picker { position: relative; }
.place-picker .locate-place, .place-picker small, .country-select + input, .form-group .select2-container + input { margin-top: .6rem; }
.place-search { position: relative; }
.place-results { box-shadow: var(--neu-shadow-sm); max-height: min(40dvh, 18rem); overscroll-behavior: contain; overflow-y: auto; background: var(--bg-card); border: 1px solid rgba(108, 92, 231, 0.28); border-radius: .65rem; margin-top: .25rem; }
.place-results button { display: block; width: 100%; padding: .75rem .9rem; text-align: left; color: var(--text-primary); background: transparent; border: 0; border-bottom: 1px solid rgba(163, 177, 198, 0.18); cursor: pointer; font-size: .92rem; line-height: 1.35; }
.place-results button:last-child { border-bottom: 0; }
.place-results button:hover, .place-results button:focus-visible { background: #edeafb; color: #322779; }

.wa-field-wrapper.wa-locked { opacity: .65; filter: grayscale(.6); pointer-events: none; user-select: none; }
.wa-field-wrapper.wa-locked input, .wa-field-wrapper.wa-locked .select2-selection { background: #d5dce4 !important; color: #636e72 !important; cursor: not-allowed; }
.contact-match { display: inline-flex; align-items: center; gap: .55rem; min-height: 44px; cursor: pointer; }
.contact-match input { width: 1.1rem; height: 1.1rem; accent-color: var(--accent-primary); }

#photo-preview-wrapper { margin: 0 auto .75rem; border: 0; overflow: hidden; }
.avatar-clickable { cursor: pointer; position: relative; transition: transform .2s ease, box-shadow .2s ease; }
.avatar-clickable:hover { transform: scale(1.04); box-shadow: var(--neu-shadow); }
.photo-viewer-modal:not([open]) { display: none; }
.photo-viewer-modal { margin: 0; border: 0; width: 100%; max-width: none; height: 100%; max-height: none; box-sizing: border-box; position: fixed; inset: 0; background: rgba(11, 15, 25, 0.92); backdrop-filter: blur(8px); z-index: 100000; display: flex; flex-direction: column; justify-content: space-between; padding: 1.25rem; }
.photo-viewer-header { display: flex; align-items: center; justify-content: space-between; color: #fff; max-width: 960px; width: 100%; margin: 0 auto; }
.photo-viewer-title { font-size: 1.15rem; font-weight: 600; }
.photo-viewer-close { background: rgba(255, 255, 255, 0.12); border: 0; color: #fff; width: 42px; height: 42px; border-radius: 50%; font-size: 1.75rem; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.photo-viewer-close:hover { background: rgba(255, 255, 255, 0.25); }
.photo-viewer-body { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 0; padding: 1rem 0; }
.photo-viewer-body img { max-width: min(92vw, 760px); max-height: 76vh; border-radius: 1rem; object-fit: contain; box-shadow: 0 12px 48px rgba(0, 0, 0, 0.7); }
.photo-viewer-initial { width: min(60vw, 220px); height: min(60vw, 220px); border-radius: 50%; background: var(--accent-gradient); display: flex; align-items: center; justify-content: center; font-size: 5.5rem; font-weight: 800; color: #fff; box-shadow: 0 12px 48px rgba(0, 0, 0, 0.5); }
.photo-viewer-actions { display: flex; justify-content: center; gap: .75rem; padding-bottom: .5rem; }
.chat-bubble { max-width: 85%; border-radius: .8rem; padding: .7rem 1rem; box-shadow: var(--neu-shadow-sm); }
.chat-bubble.mine { background: var(--accent-gradient); color: white; }
.reveal, .reveal-left, .reveal-right, .reveal-scale { opacity: 1; transform: none; }

.skip-link { position: fixed; top: .5rem; left: .5rem; z-index: 10000; transform: translateY(-160%); padding: .6rem 1rem; background: white; border-radius: .5rem; }
.skip-link:focus { transform: none; }
:is(a, button, input, select, textarea, summary, [role="combobox"]):focus-visible {
    outline: 3px solid #5941ac; outline-offset: 3px;
}
.site-footer { background: #22283b; color: #f3f4ff; padding: 1.5rem 0 .6rem; margin-top: auto; }
.site-footer-main, .feedback-actions, .site-footer-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; }
.site-footer-main { justify-content: space-between; padding-bottom: 1rem; }
.site-footer a { display: inline-flex; align-items: center; gap: .55rem; min-height: 44px; color: inherit; }
.site-footer a:hover { text-decoration: underline; text-underline-offset: .23em; }
.site-footer a:focus-visible { outline-color: #b7b1ff; }
.site-footer :is(svg, i) { width: 1.05rem; height: 1.05rem; flex: none; }
.site-footer .site-footer-brand { display: flex; width: fit-content; font: 750 1.45rem var(--font-display); letter-spacing: -.035em; }
.site-footer-brand > span > span, .site-footer-brand svg { color: #bcb5ff; }
.site-footer .site-footer-email { max-width: 100%; font-size: .9rem; color: #d2d8ea; }
.site-footer .feedback-actions a { padding: .5rem .85rem; border: 1px solid #69738b; border-radius: .7rem; font-size: .88rem; font-weight: 600; }
.site-footer .feedback-actions a:hover { background: #333b53; }
.site-footer-meta { justify-content: space-between; border-top: 1px solid #485168; padding-top: .4rem; font-size: .85rem; color: #d2d8ea; }
.site-footer-meta small { font-size: inherit; }
.directory-empty { grid-column: 1 / -1; justify-self: center; text-align: center; width: min(100%, 32rem); padding: clamp(1rem, 5vw, 2.4rem); }
.directory-empty h2 { font-size: var(--text-xl); }
.auth-title { font-size: var(--text-2xl); margin-bottom: .65rem; }
.password-help { display: inline-flex; align-items: center; min-height: 44px; font-size: .9rem; }
.recovery-setting { display: flex; align-items: baseline; flex-wrap: wrap; gap: .4rem 1rem; padding: .75rem 0; margin-bottom: 1rem; }
.recovery-setting a, .recovery-field + button { min-height: 44px; display: inline-flex; align-items: center; }
.recovery-field input[type="password"] { width: 100%; padding: .8rem; font: inherit; border: 1px solid #82909d; border-radius: .6rem; background: var(--bg-card); }
@media (max-width: 768px) {
    .nav-links { max-height: calc(100dvh - 6rem); overflow-y: auto; }
    .site-footer-main { align-items: flex-start; flex-direction: column; }
    .auth-card, .onboarding-card, .checkout-card { padding: 1.25rem; }
    .onboarding-container, .auth-container { width: 100%; min-width: 0; }
    .directory-panel .filter-row { display: grid; grid-template-columns: minmax(0, 1fr); }
    .directory-panel .filter-row > * { min-width: 0; }
    .discovery-tools :is(button,summary), .locate-place, .onboarding-actions a, .onboarding-actions button { min-height: 44px; }
    .form-group :is(input, select, textarea), .search-row input { font-size: 16px; }
    .hero-actions, .hero-stats { flex-wrap: wrap; }
    .floating-back-btn { display: none; }
    .tutor-card { padding: 1rem; }
    .directory-panel[open] { padding-bottom: .75rem; }
}
