:root {
  color-scheme: light;
  --ink: #263c3a;
  --muted: #647572;
  --paper: #f5f4ee;
  --card: #fffefa;
  --line: #e2e8e2;
  --green: #2f6d5e;
  --green-dark: #245649;
  --coral: #e68d75;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 8% 8%, #e7eee2 0, transparent 26rem),
    var(--paper);
  color: var(--ink);
}

button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }

.shell { width: min(940px, calc(100% - 32px)); margin: 0 auto; padding: 38px 0 calc(64px + env(safe-area-inset-bottom)); }
.install-prompt { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 0 20px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); box-shadow: 0 12px 36px #263c3a0d; }
.install-prompt h2 { margin-bottom: 4px; font-size: 16px; }
.install-prompt .hint { margin: 0; font-weight: 400; }
.install-prompt-actions { display: flex; flex: 0 0 auto; gap: 8px; }
.new-version { position: sticky; z-index: 30; top: env(safe-area-inset-top); display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; margin: 0 0 16px; padding: 12px 14px; border: 2px solid var(--green); border-radius: 16px; background: white; box-shadow: 0 10px 28px #2f6d5e22; }
.new-version p { margin: 0; color: var(--ink); font-size: 15px; font-weight: 750; line-height: 1.35; }
.new-version .button { flex: 0 0 auto; }
.brand { display: flex; align-items: center; gap: 14px; margin: 0 0 28px 4px; }
.brand-mark { display: block; width: 56px; height: 52px; border-radius: 12px; background: white; object-fit: contain; }
.brand-tagline { margin-bottom: 0; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: 27px; letter-spacing: -0.04em; }
h2 { margin-bottom: 0; font-size: 21px; letter-spacing: -0.025em; }
.eyebrow { margin-bottom: 6px; color: var(--green); font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.card { --card-pad: 26px; margin-bottom: 20px; padding: var(--card-pad); border: 1px solid var(--line); border-radius: 20px; background: var(--card); box-shadow: 0 12px 36px #263c3a0d; }
.auth-card { width: min(460px, 100%); margin: 38px auto; }
.auth-text-button { justify-self: start; padding: 0; border: 0; background: transparent; color: var(--green-dark); font-size: 13px; font-weight: 650; text-decoration: underline; text-underline-offset: 3px; }
.auth-text-button:hover { color: var(--green); }
#auth-submit:disabled { cursor: not-allowed; opacity: .7; }
@media (min-width: 641px) {
  body:has(#auth-panel:not(.hidden)) .brand,
  body:has(#auth-panel:not(.hidden)) footer.site-footer {
    width: min(460px, 100%);
    margin-left: auto;
    margin-right: auto;
  }
}
.tabs { display: flex; gap: 7px; padding: 4px; margin-bottom: 25px; border-radius: 12px; background: #eff3ed; }
.tab { flex: 1; padding: 10px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-weight: 700; }
.tab.active { background: white; color: var(--green-dark); box-shadow: 0 2px 8px #263c3a12; }
.field { display: flex; flex-direction: column; gap: 8px; color: var(--ink); font-size: 13px; font-weight: 700; }
.profile-option-table { display: grid; row-gap: 16px; }
.profile-option-head, .profile-option-row { display: grid; grid-template-columns: minmax(0, 1fr) 8.5rem 6.5rem; column-gap: 16px; align-items: end; }
.profile-option-head span:not(:empty) { color: var(--muted); font-size: 12px; font-weight: 750; line-height: 1.25; text-align: center; }
.option-tick { display: flex; align-items: center; justify-content: center; min-height: 43px; margin: 0; }
.option-tick input { width: 16px; height: 16px; margin: 0; accent-color: var(--green); }
.field input, .field select, .field textarea { width: 100%; padding: 11px 12px; border: 1px solid #d5dfd8; border-radius: 10px; outline: none; background: white; color: var(--ink); font-weight: 450; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px #2f6d5e1c; }
.zodiac-field-value { display: flex; width: 100%; align-items: center; gap: 8px; }
.field .zodiac-field-value input, .field .zodiac-field-value input:focus { padding: 4px 0; border: 0; border-radius: 0; outline: none; background: transparent; box-shadow: none; }
.personality-field-value { display: flex; width: 100%; align-items: center; gap: 8px; }
.field .personality-field-value input { min-width: 0; }
.personality-symbol { display: inline-flex; width: 24px; height: 24px; flex: 0 0 24px; align-items: center; justify-content: center; color: var(--green); }
.personality-symbol svg { display: block; width: 100%; height: 100%; }
#auth-form { display: grid; gap: 16px; }
#auth-form h2 { margin-bottom: 3px; }
.hint, .subtle { color: var(--muted); font-size: 13px; line-height: 1.55; }
.site-footer { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 4px 4px 0; }
.site-footer a, .legal-page a { color: var(--green-dark); font-weight: 650; }
.legal-page h2 { margin: 22px 0 8px; font-size: 18px; }
.legal-page p, .legal-page li { font-size: 15px; line-height: 1.55; }
.legal-page ul { margin-top: 0; padding-left: 1.2em; }
.legal-page .subtle { margin-bottom: 16px; }
.button { min-height: 42px; padding: 10px 16px; border: 0; border-radius: 10px; font-weight: 750; }
a.button { display: inline-flex; align-items: center; justify-content: center; text-align: center; text-decoration: none; }
#phone-code { letter-spacing: .28em; font-variant-numeric: tabular-nums; }
.button.primary { background: var(--green); color: white; }
.button.primary:hover { background: var(--green-dark); }
.button.secondary { border: 1px solid var(--line); background: white; color: var(--ink); }
.message { min-height: 20px; margin: 10px 0 0; color: var(--muted); font-size: 13px; }
.message.error { color: #a63b34; }
.message.success { color: var(--green-dark); }
.welcome-row, .section-heading, .actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.welcome-row { flex-wrap: wrap; align-items: flex-start; margin: 30px 4px 18px; }
.welcome-row h2 { font-size: 27px; }
.looking-for { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px; margin: 10px 0 0; color: var(--ink); font-size: 16px; font-weight: 650; }
#looking-for { flex: 1 0 100%; width: 100%; min-width: 0; }
.looking-for-main { display: flex; flex: 1; min-width: 0; width: 100%; flex-direction: column; align-items: stretch; gap: 8px; }
.looking-for-list { display: flex; width: 100%; flex-direction: column; align-items: flex-start; gap: 8px; }
.looking-for-row { display: flex; align-items: center; gap: 14px; width: 100%; max-width: 100%; }
.looking-for-row .message-bubble,
#looking-for-list > .message-bubble { margin-left: auto; }
.match-looking-for { margin: 12px 0 0; }
.looking-for-choice { display: inline-flex; align-items: center; gap: 10px; padding: 6px 16px 6px 6px; border-radius: 999px; background: #fde8e4; color: #b23b46; font-size: 17px; font-weight: 800; }
button.looking-for-choice { border: 0; cursor: pointer; font: inherit; font-size: 17px; font-weight: 800; }
button.looking-for-choice:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.looking-for-choice[data-type="Friendship"] { background: #e5f4ea; color: #1f7a4d; }
.looking-for-choice[data-type="Work Collaborator"] { background: #e6eefc; color: #2d4f9e; }
.looking-for-choice[data-type="Lonely Chat"] { background: #f3e9fb; color: #6d3d91; }
.looking-for-icon { display: grid; width: 40px; height: 40px; flex: 0 0 40px; place-items: center; border-radius: 50%; background: #e15b64; color: #e15b64; box-shadow: 0 4px 10px #e15b6440; }
.looking-for-choice[data-type="Friendship"] .looking-for-icon,
.connection-type-choice[data-type="Friendship"] .looking-for-icon { background: #2f9e6b; color: #2f9e6b; box-shadow: 0 4px 10px #2f9e6b40; }
.looking-for-choice[data-type="Work Collaborator"] .looking-for-icon,
.connection-type-choice[data-type="Work Collaborator"] .looking-for-icon { background: #3b6fe0; color: #3b6fe0; box-shadow: 0 4px 10px #3b6fe040; }
.looking-for-choice[data-type="Lonely Chat"] .looking-for-icon,
.connection-type-choice[data-type="Lonely Chat"] .looking-for-icon { background: #8b5cb8; color: #8b5cb8; box-shadow: 0 4px 10px #8b5cb840; }
.connection-type-field { min-width: 0; margin: 0; padding: 0; border: 0; }
.connection-type-field legend { margin-bottom: 8px; padding: 0; color: var(--ink); font-size: 13px; font-weight: 700; }
.connection-type-choices { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.connection-type-choice { position: relative; display: flex; min-width: 0; min-height: 98px; flex-direction: column; align-items: center; justify-content: flex-start; gap: 8px; margin: 0; padding: 10px 4px; border: 1px solid var(--line); border-radius: 14px; background: white; color: var(--ink); font-size: 12px; font-weight: 750; line-height: 1.2; text-align: center; cursor: pointer; }
.connection-type-choice input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
.connection-type-choice:has(input:focus-visible) { outline: 2px solid var(--green); outline-offset: 2px; }
.connection-type-choice:has(input:checked),
.connection-type-choice[aria-pressed="true"] { border-color: transparent; }
button.connection-type-choice { font-family: inherit; }
.connection-type-choice[data-type="Dating"]:has(input:checked),
.connection-type-choice[data-type="Dating"][aria-pressed="true"] { background: #fde8e4; color: #b23b46; }
.connection-type-choice[data-type="Friendship"]:has(input:checked),
.connection-type-choice[data-type="Friendship"][aria-pressed="true"] { background: #e5f4ea; color: #1f7a4d; }
.connection-type-choice[data-type="Work Collaborator"]:has(input:checked),
.connection-type-choice[data-type="Work Collaborator"][aria-pressed="true"] { background: #e6eefc; color: #2d4f9e; }
.connection-type-choice[data-type="Lonely Chat"]:has(input:checked),
.connection-type-choice[data-type="Lonely Chat"][aria-pressed="true"] { background: #f3e9fb; color: #6d3d91; }
.connection-type-dialog { width: min(720px, calc(100% - 32px)); }
.looking-for-icon svg { display: block; width: 24px; height: 24px; }
.message-bubble { position: relative; display: inline-grid; width: 72px; height: 72px; flex: 0 0 72px; place-items: center; padding: 0; border: 0; border-radius: 50%; background: var(--green); color: white; cursor: pointer; box-shadow: 0 10px 22px #2f6d5e45; }
.message-bubble.has-unread { background: #e23b4a; box-shadow: 0 10px 22px #e23b4a66; animation: message-flash 1s ease-in-out infinite; }
.message-bubble svg { width: 40px; height: 40px; }
.message-bubble-count { position: absolute; top: -2px; right: -2px; min-width: 22px; height: 22px; padding: 0 5px; border: 2px solid white; border-radius: 999px; background: #7d1220; color: white; font-size: 12px; font-weight: 800; line-height: 18px; }
@keyframes message-flash {
  0%, 100% { transform: scale(1); filter: brightness(1); box-shadow: 0 0 0 0 #e23b4a73; }
  50% { transform: scale(1.12); filter: brightness(1.2); box-shadow: 0 0 0 10px #e23b4a00; }
}
@media (prefers-reduced-motion: reduce) {
  .message-bubble.has-unread,
  .logo-lean-left, .logo-lean-right, .logo-heart, .logo-shake, .logo-nod, .sound,
  .personality-match-box { animation: none; }
  .personality-match-box path { transition: none; }
}
.section-heading { align-items: flex-start; margin-bottom: 12px; }
.section-heading .button { flex: 0 0 auto; }
.status-pill { padding: 6px 10px; border-radius: 999px; background: #f4eee3; color: #796333; font-size: 11px; font-weight: 800; }
.status-pill.saved { background: #e7f2eb; color: var(--green-dark); }
.billing-packages { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.billing-package { min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: white; }
.billing-package.current { border-color: #b7d1c0; background: #f7fbf8; }
.billing-package-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.billing-package-heading h3 { margin: 0; font-size: 16px; }
.billing-prices { margin: 0; padding: 0; list-style: none; }
.billing-prices li { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
.billing-prices strong { font-variant-numeric: tabular-nums; }
.billing-package .hint { margin: 12px 0 0; }
.profile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 20px; }
.span-two { grid-column: 1 / -1; }
.location-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.location-fields > * { min-width: 0; }
.country-combo { position: relative; display: block; }
.country-options { position: absolute; z-index: 6; top: calc(100% + 4px); left: 0; right: 0; max-height: 220px; margin: 0; padding: 6px; overflow: auto; list-style: none; border: 1px solid var(--line); border-radius: 12px; background: white; box-shadow: 0 12px 36px #263c3a1a; }
.country-options button { display: block; width: 100%; min-height: 40px; padding: 8px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); font-weight: 450; text-align: left; cursor: pointer; }
.country-options button[aria-selected="true"], .country-options button:hover { background: #e7f2eb; }
.country-options .country-empty { padding: 8px 10px; color: var(--muted); font-size: 13px; }
.profile-personality { margin: 20px 0 24px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: #fbfcf9; }
.profile-personality .section-heading { align-items: center; margin-bottom: 12px; }
.profile-personality h3 { margin: 0 0 5px; font-size: 16px; }
.profile-personality .hint { margin: 0; font-weight: 400; }
.profile-personality-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.birth-zodiac-row { display: grid; min-width: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 16px; }
.birth-zodiac-pair { display: contents; }
.birth-date-field, .zodiac-field, .gender-field { min-width: 0; }
.gender-field { grid-column: 1; }
.birth-zodiac-row input { min-width: 0; }

.birth-date-part { display: flex; flex-direction: column; gap: 6px; min-width: 0; color: var(--muted); font-size: 12px; font-weight: 750; }
.birth-date-part input, .birth-date-part select { width: 100%; min-width: 0; padding: 11px 12px; font-size: 16px; }
.birth-year-message { margin: 0; }
.birth-year-message:empty { display: none; }
.birth-year-message.error { color: #a63b34; }
.birth-date-rest { display: grid; gap: 8px; }
.height-unit-toggle { display: flex; width: fit-content; gap: 4px; padding: 3px; border-radius: 9px; background: #eff3ed; }
.height-unit-option { padding: 6px 9px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-size: 11px; font-weight: 700; cursor: pointer; }
.height-unit-option[aria-pressed="true"] { background: white; color: var(--green-dark); box-shadow: 0 1px 4px #263c3a1a; }
.height-unit-option:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.height-imperial-fields { display: flex; gap: 8px; }
.height-imperial-fields[hidden] { display: none; }
.height-imperial-fields input { min-width: 0; flex: 1; }
.interests-field { min-width: 0; }
.interests-field > .hint { margin: -4px 0 0; font-weight: 400; }
.interests-field > .button { align-self: flex-start; }
.interest-options, .selected-interests, .profile-interest-list { display: flex; flex-wrap: wrap; gap: 8px; }
.interest-option, .interest-chip, .profile-interest-chip { min-height: 34px; padding: 7px 12px; border: 1px solid #d5dfd8; border-radius: 999px; background: white; color: var(--ink); font-size: 12px; font-weight: 650; }
.interest-option, .interest-chip { cursor: pointer; }
.interest-option[aria-pressed="true"], .interest-chip, .profile-interest-chip { border-color: #b7d1c0; background: #e7f2eb; color: var(--green-dark); }
.interest-option:hover, .interest-chip:hover { border-color: var(--green); }
.interest-option:focus-visible, .interest-chip:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.selected-interests:empty { display: none; }
.profile-interest-list { margin: 0; }
.custom-interest-entry { display: flex; align-items: stretch; gap: 8px; }
.custom-interest-entry input { min-width: 0; flex: 1; }
.custom-interest-entry .button { min-height: 40px; padding: 8px 14px; }
.interests-field > .message { margin: 0; }
.interests-dialog { width: min(640px, calc(100% - 32px)); max-height: min(720px, calc(100% - 32px)); margin: auto; padding: 0; border: 1px solid var(--line); border-radius: 20px; background: var(--card); color: var(--ink); box-shadow: 0 18px 50px #263c3a33; }
#report-dialog form,
#deactivate-dialog form,
#delete-dialog form { display: flex; flex-direction: column; gap: 14px; margin: 0; }
.interests-dialog[open] { display: flex; flex-direction: column; gap: 14px; padding: 22px; overflow: hidden; }
.interests-dialog::backdrop { background: #263c3acc; }
.interests-dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.interests-dialog-heading h3 { margin: 0; font-size: 18px; }
.interests-dialog-heading .dialog-heading-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.interests-dialog .interest-options { min-height: 72px; max-height: min(46vh, 360px); overflow: auto; }
.interests-dialog #interest-search-empty { margin: 0; }
.photo-section { margin: 22px 0; }
.photo-section h3 { margin: 0 0 6px; font-size: 16px; }
.photo-section .hint { margin-bottom: 0; }
.photo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.photo-slot { position: relative; display: flex; min-height: 0; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 7px; overflow: hidden; padding: 8px; border: 1px dashed #cbd8cf; border-radius: 10px; background: #f8faf7; }
.photo-slot-filled { border-style: solid; border-color: #d5dfd8; background: white; }
.photo-slot img:not([hidden]) { width: 100%; height: 140px; border-radius: 7px; background: #eef1ed; object-fit: contain; }
.photo-slot-filled img { cursor: pointer; touch-action: none; user-select: none; -webkit-user-select: none; }
.photo-slot.dragging { opacity: 0.55; }
.photo-slot.drag-over { outline: 2px solid var(--green); outline-offset: 2px; }
.photo-placeholder { display: grid; min-height: 140px; place-items: center; color: var(--muted); font-size: 13px; }
.photo-slot [hidden] { display: none; }
.photo-upload { position: relative; display: block; padding: 6px 5px; border: 1px solid var(--line); border-radius: 7px; background: white; color: var(--green-dark); font-size: 11px; font-weight: 700; text-align: center; cursor: pointer; }
.photo-upload input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; clip-path: inset(50%); }
.photo-upload:focus-within { outline: 2px solid var(--green); outline-offset: 2px; }
.photo-slot-filled .photo-upload { padding: 0; border: 0; background: transparent; }
.photo-slot-filled .photo-upload-label { display: none; }
.photo-remove { position: absolute; z-index: 2; top: 12px; right: 12px; display: grid; width: 28px; height: 28px; place-items: center; padding: 0; border: 2px solid white; border-radius: 50%; background: #e23b4a; color: white; font-size: 20px; font-weight: 700; line-height: 1; box-shadow: 0 2px 6px #263c3a55; }
.photo-remove svg { display: block; width: 14px; height: 14px; }
.photo-remove:focus-visible { outline: 2px solid #7d1220; outline-offset: 2px; }
.photo-slot-status { min-height: 16px; text-align: center; }
.photo-slot-status:empty { display: none; min-height: 0; }
.profile-overview-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 24px; align-items: start; margin-top: 20px; }
.profile-overview-grid .overview-traits { margin-top: 0; }
.overview-photos { min-width: 0; }
.overview-photo-slider { position: relative; display: grid; min-height: 260px; place-items: center; overflow: hidden; border-radius: 14px; background: #eef1ed; }
.overview-main-photo { display: block; width: 100%; max-height: 500px; object-fit: contain; }
.overview-main-photo[hidden], .overview-photo-placeholder[hidden] { display: none; }
.overview-photo-placeholder { display: grid; min-height: 260px; place-items: center; padding: 20px; color: var(--muted); text-align: center; }
.overview-photo-controls { position: absolute; inset: 0; display: flex; align-items: center; justify-content: space-between; padding: 0 12px; pointer-events: none; }
.overview-photo-controls[hidden] { display: none; }
.overview-photo-controls span { position: absolute; bottom: 12px; left: 50%; min-width: 50px; padding: 4px 9px; transform: translateX(-50%); border-radius: 999px; background: #263c3acc; color: white; font-size: 12px; font-weight: 700; text-align: center; }
.overview-photo-arrow { display: grid; width: 40px; height: 40px; place-items: center; padding: 0 0 4px; border: 1px solid #ffffff99; border-radius: 50%; background: #263c3acc; color: white; font-size: 32px; line-height: 1; cursor: pointer; pointer-events: auto; }
.overview-photo-arrow:hover { background: #263c3a; }
.overview-photo-arrow:focus-visible { outline: 3px solid white; outline-offset: 2px; }
.overview-details h3 { margin: 0 0 5px; font-size: 24px; }
.overview-heading { margin-top: 20px; }
.overview-title-row { display: flex; align-items: baseline; justify-content: flex-start; gap: 10px; }
.overview-title-row p { margin: 0; }
.overview-heading h3 { margin: 0; font-size: 24px; }
.overview-heading p { margin: 4px 0 0; }
.overview-heading .overview-title-row p { margin: 0; }
.overview-age { flex: 0 0 auto; color: var(--muted); font-size: 15px; font-weight: 750; white-space: nowrap; }
.overview-about { margin-top: 14px; }
.overview-about h4 { margin: 0 0 6px; color: var(--muted); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.overview-heading .overview-summary { margin-top: 0; white-space: pre-wrap; line-height: 1.6; }
.overview-heading .match-profile-reason { margin-top: 8px; }
.overview-heading + .profile-overview-grid { margin-top: 14px; }
.overview-details p { line-height: 1.6; }
.overview-demographics { margin: 0 0 8px; color: var(--muted); font-size: 13px; }
.overview-details > .overview-bio { margin-top: 0; white-space: pre-wrap; }
.profile-overview-grid + .match-profile-fields { margin-top: 22px; }
.overview-interests { color: var(--muted); font-size: 13px; }
.overview-traits { display: grid; gap: 0; margin-top: 18px; }
.overview-personality { grid-column: 1 / -1; display: grid; }
.overview-traits-heading { margin: 0 0 2px; font-size: 16px; font-weight: 750; }
.overview-personality .overview-trait:first-of-type { padding-top: 8px; }
.overview-trait { display: grid; grid-template-columns: minmax(110px, .7fr) minmax(0, 1.8fr); gap: 14px; align-items: start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.overview-trait.mbti-trait,
.overview-trait.type-trait { grid-template-columns: minmax(120px, .8fr) minmax(0, 1.6fr); }
.overview-trait:first-child { padding-top: 0; }
.overview-trait:last-child { border-bottom: 0; }
.overview-personality .overview-trait:last-child { border-bottom: 1px solid var(--line); }
.overview-trait-type { display: grid; gap: 6px; align-content: start; }
.overview-trait-label { color: var(--muted); font-size: 12px; font-weight: 700; }
.overview-personality-value { display: flex; align-items: center; gap: 7px; color: var(--green-dark) !important; font-size: 15px; }
.overview-personality-value strong { margin-left: 0 !important; }
.overview-zodiac-value { display: flex; align-items: center; gap: 7px; color: var(--green-dark) !important; font-size: 15px !important; font-weight: 750 !important; }
.overview-zodiac-symbol { color: var(--coral) !important; font-size: 21px !important; line-height: 1; }
.match-zodiac-value { display: flex; align-items: center; gap: 7px; }
.match-zodiac-value .overview-zodiac-symbol { font-size: 20px !important; }
.match-personality-type-value { display: flex; align-items: center; gap: 7px; }
.mbti-expansion { min-width: 0; line-height: 1.45; }
.mbti-expansion a { color: var(--green-dark); text-underline-offset: 2px; }
.mbti-nickname { margin: 0; color: var(--green-dark); font-size: 13px; font-weight: 750; line-height: 1.3; }
.mbti-preference-links { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; margin: 0; font-size: 13px; font-weight: 650; line-height: 1.35; }
.overview-trait > .mbti-preference-links,
.match-personality-score > .mbti-preference-links { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; }
.overview-trait > .mbti-preference-links > a,
.match-personality-score > .mbti-preference-links > a { white-space: nowrap; }
.overview-trait-type > .mbti-preference-links,
.match-personality-score-details > .mbti-preference-links { flex-direction: row; flex-wrap: nowrap; align-items: baseline; gap: 0; }
.overview-trait-type > .mbti-preference-links > span,
.match-personality-score-details > .mbti-preference-links > span { white-space: nowrap; }
.overview-trait-type > .mbti-preference-links > span:not(:last-child)::after,
.match-personality-score-details > .mbti-preference-links > span:not(:last-child)::after { content: ",\00a0"; }
.profile-personality .mbti-expansion { margin: 8px 0 0; font-weight: 650; }
#mbti-expansion:not([hidden]),
#enneagram-expansion:not([hidden]),
#zodiac-expansion:not([hidden]) { display: grid; gap: 2px; }
#mbti-expansion .mbti-nickname,
#mbti-expansion .mbti-preference-links,
#enneagram-expansion .mbti-nickname,
#enneagram-expansion .mbti-preference-links,
#zodiac-expansion .mbti-nickname,
#zodiac-expansion .mbti-preference-links { margin: 0; }
.zodiac-field .mbti-expansion { margin: 8px 0 0; font-weight: 650; }
.personality-copy { color: var(--muted); font-size: 14px; line-height: 1.65; font-weight: 450; }
.personality-copy p { margin: 0 0 8px; }
.personality-summary { margin: 0; }
.personality-more { display: inline; margin: 0; padding: 0; border: 0; background: transparent; color: var(--green-dark); font: inherit; font-weight: 750; line-height: inherit; text-decoration: underline; text-underline-offset: 2px; vertical-align: baseline; }
.personality-more:hover, .personality-more:focus-visible { color: var(--green); outline: none; }
.personality-long { display: none; grid-column: 1 / -1; gap: 8px; margin-top: 8px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #f7faf7; }
.personality-long:not([hidden]) { display: grid; }
.personality-long p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; font-weight: 450; }
.mbti-result-layout { display: grid; grid-template-columns: minmax(120px, .8fr) minmax(0, 1.5fr); gap: 12px 14px; align-items: start; }
.mbti-result-type { display: grid; gap: 6px; align-content: start; min-width: 0; }
.mbti-result-code { display: flex; align-items: center; gap: 8px; }
.mbti-result-code .personality-symbol { width: 28px; height: 28px; flex-basis: 28px; }
.mbti-result-code h3 { margin: 0; }
.overview-trait > .personality-copy { font-size: 13px; }
.overview-trait > p { margin: 0; font-size: 13px; line-height: 1.55; }
.overview-actions { position: sticky; top: 0; z-index: 4; display: flex; flex-wrap: wrap; align-items: stretch; gap: 10px; margin: 0 calc(var(--card-pad) * -1); padding: 2px var(--card-pad) 14px; border-bottom: 1px solid var(--line); background: var(--card); }
.overview-actions .button { flex: 1 1 0; min-width: 0; line-height: 1.2; text-align: center; }
.profile-actions .button { flex: 1 1 11rem; min-width: min(100%, 11rem); }
.overview-actions .button:disabled { cursor: not-allowed; opacity: .45; }
.overview-actions .match-type-switch { flex: 1 1 100%; width: 100%; margin: 0; }
.overview-actions .overview-type-switch { flex: 1 1 100%; width: 100%; margin: 4px 0 0; }
.overview-type-switch .hint { margin: 0 0 8px; }
.overview-type-switch .match-type-switch { margin: 0; }
.profile-actions .message { flex: 1 1 100%; margin: 0; }
.profile-actions .message:empty { display: none; }
.welcome-steps { margin: 16px 0; padding-left: 22px; display: grid; gap: 10px; line-height: 1.5; }
.welcome-steps li::marker { color: var(--green); font-weight: 700; }
.home-layout { display: grid; grid-template-columns: 1fr; gap: 12px; margin-top: 18px; }
.home-match-list { display: grid; gap: 12px; }
#preferences-match-list { margin: 16px 0 18px; }
.match-type-switch { display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 16px; }
.match-type-switch .looking-for-choice[aria-pressed="true"] { box-shadow: 0 0 0 3px currentColor; }
.matches-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 14px; }
.home-option { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; width: 100%; min-height: 88px; padding: 18px 22px; border: 1px solid var(--line); border-radius: 14px; background: white; color: var(--ink); text-align: left; }
.home-option strong { font-size: 16px; }
.home-option span { color: var(--muted); font-size: 13px; font-weight: 450; line-height: 1.45; }
.home-option:hover, .home-option:focus-visible { border-color: var(--green); outline: none; box-shadow: 0 0 0 3px #2f6d5e1c; }
.home-option.home-option-primary { flex-direction: row; align-items: center; justify-content: flex-start; gap: 22px; min-height: 168px; padding: 28px 22px; border-color: transparent; border-radius: 18px; background: linear-gradient(135deg, var(--green), var(--green-dark)); color: white; box-shadow: 0 8px 20px #2f6d5e33; text-align: left; }
.home-matches-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; order: 1; }
.matches-logo { display: grid; width: 156px; height: 112px; flex: 0 0 156px; place-items: center; order: 2; border-radius: 24px; background: #fffefa; box-shadow: 0 8px 18px #1d3f3640; }
.matches-logo svg { display: none; width: 144px; height: 100px; overflow: visible; }
.matches-logo[data-type="Dating"] .logo-dating,
.matches-logo[data-type="Friendship"] .logo-friendship,
.matches-logo[data-type="Work Collaborator"] .logo-work,
.matches-logo[data-type="Lonely Chat"] .logo-lonely { display: block; }
.logo-lean-left, .logo-lean-right, .logo-heart, .logo-shake, .logo-nod, .sound { transform-box: fill-box; transform-origin: center; }
.logo-lean-left { animation: logo-lean-left 2.6s ease-in-out infinite; }
.logo-lean-right { animation: logo-lean-right 2.6s ease-in-out infinite; }
.logo-heart { animation: logo-heart 2.6s ease-in-out infinite; }
.logo-shake { animation: logo-shake 1.5s ease-in-out infinite; transform-origin: center; }
.logo-nod { animation: logo-nod 2.4s ease-in-out infinite; transform-origin: center bottom; }
.logo-nod-delay { animation-delay: -1.2s; }
.sound { transform-origin: center bottom; }
.sound-1 { animation: logo-sound 1.6s ease-in-out infinite; }
.sound-2 { animation: logo-sound 1.6s ease-in-out .18s infinite; }
.sound-3 { animation: logo-sound 1.6s ease-in-out .36s infinite; }
@keyframes logo-lean-left { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(7px); } }
@keyframes logo-lean-right { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(-7px); } }
@keyframes logo-heart { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-6px) scale(1.14); } }
@keyframes logo-shake { 0%, 100% { transform: translateY(0); } 18% { transform: translateY(-6px); } 36% { transform: translateY(0); } 54% { transform: translateY(-5px); } 72% { transform: translateY(0); } }
@keyframes logo-nod { 0%, 100% { transform: rotate(0deg); } 50% { transform: rotate(5deg); } }
@keyframes logo-sound { 0%, 100% { opacity: .28; transform: translateY(2px); } 50% { opacity: 1; transform: translateY(-2px); } }
.home-option.home-option-primary strong { font-size: 24px; color: white; }
.home-option.home-option-primary span { color: #ffffffdd; font-size: 15px; }
.home-option.home-option-primary:hover, .home-option.home-option-primary:focus-visible { border-color: transparent; background: linear-gradient(135deg, var(--green), var(--green-dark)); color: white; box-shadow: 0 10px 26px #2f6d5e55, 0 0 0 3px #2f6d5e40; transform: translateY(-1px); }
.home-option.home-option-primary .notification-badge { border: 2px solid white; }
#settings-form { display: grid; gap: 16px; margin-top: 16px; }
#settings-form .actions { margin: 0; }
.card.saved-profiles-panel, .card.blocked-profiles-panel, .card.chat-inbox-panel, .card.chat-conversation-panel, .card.match-profile-detail { margin-top: 0; }
.preference-group { min-width: 0; margin: 0; padding: 16px; border: 1px solid var(--line); border-radius: 12px; }
.preference-group legend { padding: 0 5px; color: var(--ink); font-size: 13px; font-weight: 750; }
.preference-group legend .hint { font-weight: 450; }
.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px 16px; }
.preference-group.is-inactive { opacity: .48; }
.open-limit-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 4px 0 12px; }
.open-limit-choice { display: flex; align-items: center; gap: 12px; min-height: 76px; margin: 0; padding: 12px 14px; border: 2px solid #b7d1c6; border-radius: 16px; background: white; color: var(--ink); font-size: 16px; font-weight: 800; line-height: 1.25; cursor: pointer; }
.open-limit-choice:hover { border-color: var(--green); }
.open-limit-choice:has(input:focus-visible) { outline: 2px solid var(--green); outline-offset: 2px; }
.open-limit-choice:has(input:checked) { border-color: var(--green); background: #f3faf6; box-shadow: 0 8px 18px #2f6d5e24; }
.choice-grid label, .preference-group > label { display: flex; align-items: flex-start; gap: 8px; color: var(--ink); font-size: 13px; line-height: 1.45; }
.choice-grid input, .preference-group input[type="checkbox"], .preference-group input[type="radio"] { width: 16px; height: 16px; margin: 2px 0 0; flex: 0 0 auto; accent-color: var(--green); }
.open-limits .open-limit-choice input { width: 28px; height: 28px; margin: 0; flex: 0 0 28px; accent-color: var(--green); }
.personality-matching-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 6px 0 12px; }
.personality-match-choice { position: relative; display: flex; align-items: center; gap: 12px; min-height: 84px; margin: 0; padding: 12px 14px; border: 2px solid #b7d1c6; border-radius: 16px; background: white; color: var(--ink); font-size: 16px; font-weight: 800; line-height: 1.25; cursor: pointer; }
.personality-match-choice:hover { border-color: var(--green); }
.personality-match-choice:has(input:focus-visible) { outline: 2px solid var(--green); outline-offset: 2px; }
.personality-match-choice:has(input:checked) { border-color: var(--green); background: #f3faf6; box-shadow: 0 8px 18px #2f6d5e24; }
.personality-matching .personality-match-choice input { position: absolute; width: 1px; height: 1px; margin: 0; overflow: hidden; clip: rect(0, 0, 0, 0); }
.personality-match-box { display: grid; width: 42px; height: 42px; flex: 0 0 42px; place-items: center; border: 3px solid var(--green); border-radius: 12px; background: white; color: white; animation: personality-tick-breathe 2.2s ease-in-out infinite; }
.personality-match-box svg { display: block; width: 30px; height: 30px; }
.personality-match-box path { stroke-dasharray: 36; stroke-dashoffset: 36; transition: stroke-dashoffset .28s cubic-bezier(.2, 1.2, .3, 1); }
.personality-match-choice:has(input:checked) .personality-match-box { background: var(--green); border-color: var(--green); animation: personality-tick-live 1.6s ease-in-out infinite; }
.personality-match-choice:has(input:checked) .personality-match-box path { stroke-dashoffset: 0; }
.personality-match-copy { min-width: 0; }
@keyframes personality-tick-breathe {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 #2f6d5e33; }
  50% { transform: scale(1.08); box-shadow: 0 0 0 8px #2f6d5e00; }
}
@keyframes personality-tick-live {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 #2f6d5e73; }
  50% { transform: scale(1.12); box-shadow: 0 0 0 10px #2f6d5e00; }
}
.lonely-chat-choice { display: grid; gap: 10px; }
.lonely-chat-choice[hidden] { display: none; }
.range-control { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px 14px; margin: 5px 0 12px; }
.range-control:last-child { margin-bottom: 0; }
.range-control label { grid-column: 1 / -1; color: var(--muted); font-size: 12px; }
.range-control input[type="range"] { width: 100%; accent-color: var(--green); }
.range-control output { min-width: 58px; color: var(--green-dark); font-size: 13px; font-weight: 750; text-align: right; }
.location-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; }
.location-actions .hint { flex: 1 1 260px; }
.quiz-progress { height: 8px; overflow: hidden; margin: 22px 0 18px; border-radius: 999px; background: #e8eee8; }
.quiz-progress div { width: 0; height: 100%; border-radius: inherit; background: var(--coral); transition: width .2s ease; }
.quiz-question { min-height: 200px; padding: 21px; border: 1px solid var(--line); border-radius: 14px; background: white; }
.quiz-question h3 { margin: 0 0 18px; font-size: 19px; line-height: 1.4; }
.quiz-options { display: grid; gap: 10px; }
.quiz-option { display: flex; align-items: flex-start; gap: 11px; padding: 13px; border: 1px solid var(--line); border-radius: 11px; color: var(--ink); cursor: pointer; font-size: 14px; line-height: 1.45; }
.quiz-option:hover { border-color: var(--green); background: #f5f8f4; }
.quiz-option input { flex: 0 0 auto; width: 17px; height: 17px; margin: 1px 0 0; accent-color: var(--green); }
.quiz-navigation { display: flex; align-items: center; gap: 14px; margin-top: 17px; }
.quiz-navigation .button:disabled { cursor: not-allowed; opacity: .45; }
.type-results { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; margin: 22px 0; }
.type-result { padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: white; }
.type-result h3 { margin: 5px 0 12px; color: var(--green-dark); font-size: 24px; }
.type-result .mbti-result-code h3 { margin: 0; }
.type-result > p:last-child { margin-bottom: 0; color: var(--muted); font-size: 14px; line-height: 1.65; }
.consent { display: flex; align-items: flex-start; gap: 10px; padding: 13px; border: 1px solid var(--line); border-radius: 12px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.consent[hidden] { display: none; }
.consent input { flex: 0 0 auto; width: 17px; height: 17px; accent-color: var(--green); }
.actions { justify-content: flex-start; }
.actions .message { margin: 0; }
.interest-kind-switch { display: flex; gap: 8px; }
.interest-kind-switch.hidden { display: none; }
.interest-kind-switch button { border: 1px solid var(--line); border-radius: 999px; background: white; color: var(--ink); padding: 8px 14px; font: inherit; font-size: 13px; font-weight: 750; cursor: pointer; }
.interest-kind-switch button[aria-pressed="true"] { border-color: transparent; background: var(--green); color: white; }
.selected-interest-group { display: grid; gap: 6px; width: 100%; }
.selected-interest-group h4 { margin: 6px 0 0; font-size: 13px; }
.match-results { display: grid; gap: 10px; }
.match-card { display: flex; width: 100%; justify-content: space-between; gap: 16px; align-items: center; padding: 15px; border: 1px solid var(--line); border-radius: 12px; background: white; color: var(--ink); text-align: left; }
.match-card:hover, .match-card:focus-visible { border-color: var(--green); outline: none; box-shadow: 0 0 0 3px #2f6d5e1c; }
.match-card-photo, .match-card-photo-placeholder { width: 68px; height: 76px; flex: 0 0 68px; border-radius: 9px; background: #e7eee8; }
.match-card-photo { object-fit: cover; }
.match-card-photo-placeholder { display: grid; place-items: center; color: var(--green-dark); font-size: 15px; font-weight: 800; }
.match-card-photo[hidden],
.match-card-photo-placeholder[hidden] { display: none; }
.match-card-text { min-width: 0; flex: 1; }
.match-card-name { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 5px; }
.match-card p.match-card-facts { margin: 0 0 4px; color: var(--ink); font-weight: 650; }
.match-card h3 { margin: 0; font-size: 16px; }
.match-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.saved-indicator { display: inline-flex; align-items: center; padding: 3px 8px; border-radius: 999px; background: #e7f2eb; color: var(--green-dark); font-size: 11px; font-weight: 750; line-height: 1.3; }
.saved-indicator[hidden] { display: none; }
.presence-indicator { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 999px; background: #eef1ee; color: var(--muted); font-size: 11px; font-weight: 750; line-height: 1.3; }
.presence-indicator::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #9aa59c; }
.presence-indicator.online { background: #e7f2eb; color: var(--green-dark); }
.presence-indicator.online::before { background: #2f9e62; }
.score { display: grid; min-width: 62px; height: 62px; place-items: center; border-radius: 50%; background: #e7f2eb; color: var(--green-dark); font-size: 18px; font-weight: 800; }
.match-profile-detail { scroll-margin-top: 20px; }
.saved-profiles-panel, .blocked-profiles-panel { margin-top: 18px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: #fbfcf9; }
.saved-profiles-panel h3, .blocked-profiles-panel h3 { margin: 0; font-size: 17px; }
#saved-profiles-list.match-results,
#blocked-profiles-list.match-results { gap: 18px; }
.saved-profile-group { display: grid; gap: 10px; }
.saved-profile-group h4 { margin: 4px 0 0; }
.saved-profile-item, .match-result-item, .blocked-profile-item { display: flex; align-items: center; gap: 10px; }
.saved-profile-item .match-card, .match-result-item .match-card, .blocked-profile-item .match-card { flex: 1; }
.saved-profile-item .button, .match-result-item .button, .blocked-profile-item .button { flex: 0 0 auto; }
.saved-profile-item .match-action-button { flex: 0 0 48px; }
.blocked-profile-item .match-card { cursor: default; }
.blocked-profile-item .match-card:hover, .blocked-profile-item .match-card:focus-visible { border-color: var(--line); box-shadow: none; }
.blocked-profile-item .match-card-actions .button { min-height: 48px; border-radius: 999px; }
.saved-profile-traits { display: flex; flex-flow: row nowrap; align-items: center; gap: 8px 18px; margin-top: 8px; }
.chat-profile { margin: 0 0 14px; cursor: pointer; }
.chat-profile.hidden { display: none; }
.notification-badge { background: #d93025; border-radius: 999px; color: #fff; display: inline-block; font-size: .75rem; font-weight: 700; line-height: 1; margin-left: 6px; min-width: 20px; padding: 4px 7px; text-align: center; vertical-align: middle; }
.chat-notification { background: #fff4f2; border: 2px solid #d93025; border-radius: 12px; color: #8a1c13; cursor: pointer; font: inherit; font-weight: 700; margin: 0 0 16px; padding: 12px 16px; text-align: left; width: 100%; }
.chat-notification:hover, .chat-notification:focus-visible { background: #ffe5e1; }
.match-card-actions { display: flex; flex: 0 0 auto; flex-wrap: wrap; align-items: center; gap: 8px; }
.request-chat-action { flex: 0 0 auto; width: auto; white-space: nowrap; }
.match-action-button { align-items: center; background: #fff; border: 2px solid; border-radius: 50%; cursor: pointer; display: inline-flex; font-size: 1.3rem; height: 48px; justify-content: center; line-height: 1; padding: 0; width: 48px; }
.match-action-button.save { border-color: #1f9d55; color: #1f9d55; }
.match-action-button.save:hover, .match-action-button.save.active { background: #1f9d55; color: #fff; }
.match-action-button.hide { border-color: #d93025; color: #d93025; }
.match-action-button.hide:hover { background: #d93025; color: #fff; }
.match-action-button:disabled { cursor: default; opacity: .5; }
.saved-profile-trait { display: inline-flex; flex: 0 0 auto; flex-direction: row; align-items: center; gap: 6px; width: max-content; color: var(--ink); font-size: 13px; font-weight: 650; white-space: nowrap; }
.saved-profile-trait .trait-label { flex: 0 0 auto; color: var(--muted); font-size: 11px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.saved-profile-trait .trait-value { display: flex; align-items: center; gap: 6px; min-width: 0; }

.chat-inbox-panel, .chat-conversation-panel { --card-pad: 16px; margin-top: 18px; padding: var(--card-pad); border: 1px solid var(--line); border-radius: 14px; background: #fbfcf9; }
.chat-inbox-panel h3, .chat-conversation-panel h3 { margin: 0; font-size: 17px; }
.chat-inbox-panel h4 { margin: 18px 0 8px; color: var(--green-dark); font-size: 16px; }
.chat-inbox-group h5 { margin: 12px 0 8px; color: var(--muted); font-size: 12px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.chat-inbox-group .match-results { display: grid; gap: 10px; }
.chat-inbox-panel .section-heading { align-items: center; }
.chat-inbox-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px; border: 1px solid var(--line); border-radius: 10px; background: white; }
.chat-inbox-item p { margin: 0; }
.chat-inbox-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.match-chat-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 16px 0 8px; }
.match-chat-actions .message { flex: 1 1 100%; margin: 0; }
.chat-messages { display: flex; min-height: 180px; max-height: 420px; overflow-y: auto; flex-direction: column; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.chat-message { max-width: min(85%, 620px); align-self: flex-start; padding: 10px 12px; border-radius: 12px 12px 12px 3px; background: #eff3ed; overflow-wrap: anywhere; }
.chat-message.own { align-self: flex-end; border-radius: 12px 12px 3px 12px; background: #e7f2eb; }
.chat-message-header { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 12px; margin-bottom: 5px; color: var(--green-dark); font-size: 12px; }
.chat-message-header time { color: var(--muted); font-size: 10px; }
.chat-message p { margin: 0; white-space: pre-wrap; line-height: 1.5; }
.chat-message a { color: var(--green-dark); font-weight: 650; }
#chat-system-note { margin: 12px 0 0; }
.video-call-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; margin: 0 0 12px; }
.video-call-bar .hint { margin: 0; flex: 1 1 220px; }
#start-video-call:disabled { cursor: not-allowed; opacity: .45; }
.video-call-panel { position: fixed; z-index: 40; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(440px, calc(100% - 24px)); max-height: min(80vh, 640px); overflow: auto; padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); box-shadow: 0 16px 40px #263c3a24; }
.video-call-panel h3 { margin: 0 0 4px; font-size: 18px; }
.video-call-panel .hint { margin: 0 0 10px; }
.video-call-frame { position: relative; min-height: 180px; margin-bottom: 10px; overflow: hidden; border-radius: 12px; background: #1c2b28; }
.video-call-remote { display: block; width: 100%; max-height: 360px; background: #1c2b28; object-fit: cover; }
.video-call-local { position: absolute; right: 8px; bottom: 8px; width: 112px; height: 84px; border: 2px solid white; border-radius: 8px; object-fit: cover; }
.video-call-controls { display: flex; flex-wrap: wrap; gap: 8px; }
.video-call-controls .button { flex: 1 1 auto; }
.chat-message-form { display: flex; align-items: flex-end; gap: 12px; margin-top: 12px; }
.chat-message-form .field { flex: 1; margin: 0; }
.chat-message-form .button { flex: 0 0 auto; }
.match-profile-detail > .button { margin: 8px 8px 0 0; }
.section-heading .score { flex: 0 0 auto; }
.match-summary { margin-top: 22px; }
.match-summary .match-profile-reason,
.match-summary #match-profile-distance { margin: 0 0 8px; }
.match-summary .match-personality-scores { margin-top: 8px; }
.match-personality-scores { display: grid; gap: 10px; margin-top: 16px; }
.match-personality-score { display: grid; grid-template-columns: minmax(130px, .7fr) minmax(76px, .35fr) minmax(0, 1.8fr); align-items: center; gap: 18px; min-height: 84px; padding: 14px; border: 1px solid #cfe0d4; border-radius: 12px; background: #f2f7f3; }
.match-personality-score.mbti-score,
.match-personality-score.type-score { align-items: start; }
.match-personality-score-details { display: grid; gap: 4px; min-width: 0; }
.match-personality-score h4 { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.match-personality-score-details p { margin: 0; color: var(--ink); font-size: 16px; font-weight: 750; overflow-wrap: anywhere; }
.match-personality-score-details p.mbti-nickname { color: var(--green-dark); font-size: 13px; font-weight: 750; }
.match-personality-score-details p.mbti-preference-links { color: var(--ink); font-size: 13px; font-weight: 650; }
.match-personality-score .match-personality-score-value { justify-self: center; color: var(--green-dark); font-size: 23px; white-space: nowrap; }
.match-personality-description,
.match-personality-explanation { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; font-weight: 450; }
.match-profile-top { margin-top: 16px; }
.match-profile-top .match-personality-scores { margin-top: 0; align-content: start; }
.match-profile-top .match-personality-score { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 14px; min-height: 0; }
.match-profile-top .match-personality-description,
.match-profile-top .match-personality-explanation { grid-column: 1 / -1; }
.match-profile-reason { margin: 12px 0 0; }
.match-profile-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 18px 0; }
.match-profile-field { padding: 13px; border: 1px solid var(--line); border-radius: 10px; }
.match-profile-field h4 { margin: 0 0 6px; color: var(--muted); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.match-profile-field p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }

@media (max-width: 640px) {
  .shell { width: min(100% - 22px, 940px); padding-top: 22px; }
  .billing-packages { grid-template-columns: 1fr; }
  .install-prompt { align-items: stretch; flex-direction: column; }
  .install-prompt-actions { display: grid; }
  .new-version { align-items: stretch; flex-direction: column; }
  .new-version .button { width: 100%; }
  .card { --card-pad: 19px; padding: 19px; border-radius: 16px; }
  .profile-grid { grid-template-columns: 1fr; }
  .connection-type-choices { gap: 6px; }
  .connection-type-choice { min-height: 92px; padding: 8px 2px; font-size: 11px; }
  .connection-type-choice .looking-for-icon { width: 34px; height: 34px; flex-basis: 34px; }
  .connection-type-choice .looking-for-icon svg { width: 18px; height: 18px; }
  .location-fields { grid-template-columns: 1fr; gap: 12px; }
  .profile-personality .section-heading { align-items: flex-start; }
  .profile-personality-fields { grid-template-columns: 1fr; gap: 12px; }
  .birth-zodiac-row { gap: 12px; }
  .profile-option-table { row-gap: 12px; }
  .profile-option-head, .profile-option-row { grid-template-columns: minmax(0, 1fr) 4.8rem 4.4rem; column-gap: 8px; }
  .profile-option-head span:not(:empty) { font-size: 11px; }
  .interest-options, .selected-interests, .profile-interest-list { gap: 6px; }
  .interests-dialog { width: calc(100% - 22px); max-height: calc(100% - 22px); }
  .interests-dialog[open] { padding: 16px; }
  .interest-option, .interest-chip { min-height: 32px; padding: 6px 9px; font-size: 11px; }
  .photo-grid { gap: 7px; }
  .photo-slot { padding: 6px; }
  .photo-slot img:not([hidden]), .photo-placeholder { height: 100px; min-height: 100px; }
  .photo-upload { padding: 6px 2px; font-size: 10px; }
  .photo-slot-filled .photo-upload { padding: 0; }
  .photo-remove { top: 10px; right: 10px; width: 26px; height: 26px; }
  .photo-remove svg { width: 12px; height: 12px; }
  .type-results { grid-template-columns: 1fr; }
  .mbti-result-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
  .choice-grid { grid-template-columns: 1fr; }
  .personality-matching-choices { grid-template-columns: 1fr; }
  .open-limit-choices { grid-template-columns: 1fr; }
  .personality-match-choice { min-height: 76px; font-size: 17px; }
  .personality-match-box { width: 48px; height: 48px; flex-basis: 48px; }
  .location-actions { align-items: flex-start; flex-direction: column; }
  .span-two { grid-column: auto; }
  .section-heading { flex-direction: column; }
  .profile-overview-grid { grid-template-columns: 1fr; gap: 18px; }
  .overview-trait.mbti-trait,
  .overview-trait.type-trait { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
  .overview-photo-slider { min-height: 220px; }
  .overview-main-photo { max-height: 60vh; }
  .matches-actions { display: grid; grid-template-columns: 1fr; }
  .matches-actions .button { width: 100%; }
  .overview-actions { flex-wrap: wrap; gap: 8px; padding-bottom: 10px; }
  .overview-actions .button { flex: 1 1 100%; width: 100%; padding: 10px 12px; font-size: 15px; line-height: 1.2; }
  .home-option { min-height: 0; }
  .home-option.home-option-primary { min-height: 120px; gap: 12px; padding: 16px; }
  .matches-logo { width: 104px; height: 78px; flex-basis: 104px; border-radius: 16px; }
  .matches-logo svg { width: 96px; height: 68px; }
  .welcome-row { align-items: flex-start; }
  .match-card { align-items: flex-start; }
  .saved-profile-item, .match-result-item, .blocked-profile-item { align-items: stretch; flex-direction: column; }
  .saved-profile-item .button, .match-result-item .button, .blocked-profile-item .button { width: 100%; }
  .match-card-actions .button { width: auto; }
  .saved-profile-traits { flex-wrap: wrap; }
  .chat-inbox-item, .chat-message-form { align-items: stretch; flex-direction: column; }
  .chat-message-form .button { width: 100%; }
  .match-personality-score { grid-template-columns: minmax(100px, .8fr) minmax(64px, .4fr) minmax(0, 1.4fr); gap: 12px; padding: 12px; }
  .match-profile-fields { grid-template-columns: 1fr; }
  #matches-step { display: flex; flex-direction: column; }
  #matches-step > .section-heading,
  #matches-step > .overview-actions,
  #matches-step > #match-message { order: 0; }
  #matches-step > #match-results { order: 1; }
  #matches-step > .subtle { order: 2; margin-top: 16px; }
  #matches-step .overview-actions .button { flex: 1 1 calc(50% - 8px); width: auto; }
}

@media (max-width: 420px) {
  .match-personality-score { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; }
  .match-personality-score .match-personality-score-value { grid-column: 2; grid-row: 1; }
  .match-personality-description,
  .match-personality-explanation { grid-column: 1 / -1; }
}
