.discovery-toolbar { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.character-search { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; border: 1px solid #c9cebf; border-radius: 12px; background: var(--white); padding: 0 14px; }
.character-search > span { color: var(--muted); flex-shrink: 0; }
.character-search input { margin: 0; padding: 14px 0; border: 0; background: transparent; min-width: 0; font-size: 12px; }
.character-search:focus-within { outline: 2px solid #809366; outline-offset: 2px; }
.character-search input:focus-visible { outline: none; }
.discovery-scopes { display: flex; align-items: center; gap: 4px; padding: 4px; border-radius: 12px; background: var(--sage); }
.scope-button { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; padding: 9px 13px; border-radius: 9px; background: transparent; font-size: 12px; white-space: nowrap; }
.scope-button svg { width: 15px; height: 15px; }
.scope-button.active { background: var(--white); color: var(--olive); box-shadow: 0 2px 5px #3446380a; }
#discovery-filters { flex-wrap: wrap; overflow: visible; margin-bottom: 12px; }
#discovery-filters .filter-chip { min-height: 40px; }
.discovery-count { color: var(--muted); font-size: 11px; margin: 0 0 18px; }
.card-media { position: relative; }
.card-media .portrait-button { width: 100%; display: block; }
.favorite-button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-width: 40px; min-height: 40px; border: 1px solid #cdd3c4; border-radius: 10px; background: var(--white); color: var(--olive); }
.favorite-button svg { width: 18px; height: 18px; }
.favorite-button[aria-pressed="true"] svg { fill: currentColor; }
.favorite-button:hover { background: var(--sage); }
.card-favorite { position: absolute; top: 10px; right: 10px; background: #fffefae8; border-color: #fffefa; border-radius: 50%; box-shadow: 0 2px 8px #282b2610; }
.card-media .card-label { max-width: calc(100% - 69px); white-space: normal; line-height: 1.5; }
.profile-dialog { width: min(860px, calc(100% - 32px)); padding: 0; }
.profile-content { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); }
.profile-art { position: relative; min-height: 560px; overflow: hidden; background: var(--sage); }
.profile-art .portrait { object-position: 50% 25%; }
.profile-copy { padding: 28px; min-width: 0; }
.profile-copy .eyebrow { margin-bottom: 10px; }
.profile-copy .dialog-heading { gap: 10px; }
.profile-copy h2 { overflow-wrap: anywhere; }
.profile-subtitle { font-size: 14px; line-height: 1.7; margin: 14px 0 10px; overflow-wrap: anywhere; }
.profile-section { margin-top: 23px; }
.profile-section h3 { font-size: 12px; margin-bottom: 8px; }
.profile-section p { font-size: 12px; line-height: 1.9; color: #565e51; white-space: pre-wrap; overflow-wrap: anywhere; }
.profile-greeting { margin: 23px 0 15px; max-width: none; }
.profile-greeting p { font-size: 12px; }
.profile-favorite { padding: 9px 13px; font-size: 12px; }
.favorite-feedback { font-size: 11px; line-height: 1.7; color: #565e51; margin-top: 8px; overflow-wrap: anywhere; }
.favorite-feedback:empty { display: none; }
.profile-dialog { overscroll-behavior: contain; }
body:has(dialog[open]) { overflow: hidden; }
.profile-actions { display: grid; gap: 9px; margin-top: 23px; }
.profile-actions .button { justify-content: center; }
@media (max-width: 700px) {
  .discovery-toolbar { flex-direction: column; align-items: stretch; gap: 12px; }
  .discovery-scopes { align-self: flex-start; }
  .profile-content { display: block; }
  .profile-art { min-height: 0; height: 240px; }
  .profile-art .portrait { object-position: 50% 28%; }
  .profile-copy { padding: 23px; }
  .profile-section { margin-top: 19px; }
}
@media (max-width: 400px) {
  .card-media .card-label { font-size: 7px; left: 7px; top: 9px; padding: 4px; max-width: calc(100% - 55px); }
  .card-favorite { top: 7px; right: 6px; }
}
