/* Profile detail and editing follow the same bright, photo-first social language. */
body[data-authenticated="true"] .dialog-profile {
  width: 1040px;
  border: 0;
  border-radius: 28px;
  background: var(--surface);
}
body[data-authenticated="true"] .dialog-profile .dialog-top {
  position: sticky;
  top: 0;
  z-index: 4;
  min-height: 68px;
  padding: 14px 28px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.dialog-profile .dialog-top h2 { font-size: 15px; font-weight: 650; }
body[data-authenticated="true"] .concept-profile-layout {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1fr);
  gap: 36px;
  padding: 28px;
  align-items: start;
}
body[data-authenticated="true"] .concept-profile-layout .profile-media { position: sticky; top: 96px; padding: 0; gap: 0; }
.concept-profile-layout .photo-frame { border-radius: 22px; }
body[data-authenticated="true"] .concept-profile-layout .profile-main-photo { width: 100%; max-height: none; border-radius: inherit; aspect-ratio: 4 / 5; }
body[data-authenticated="true"] .concept-profile-layout .profile-description { display: flex; gap: 0; min-width: 0; padding: 5px 0 12px; }
.concept-profile-layout .profile-identity-group { display: grid; gap: 13px; padding-bottom: 26px; }
.concept-profile-layout .discovery-identity { gap: 5px 12px; }
body[data-authenticated="true"] .concept-profile-layout .profile-description h2 { font-size: 31px; line-height: 1.25; letter-spacing: -.04em; }
.concept-profile-layout .birth-line { color: var(--muted); font-size: 12px; }
.concept-profile-layout .profile-facts { gap: 7px 15px; color: var(--muted); font-size: 12px; }
.concept-profile-layout .profile-facts > span { min-width: 0; overflow-wrap: anywhere; }
.concept-profile-layout .profile-facts svg { width: 14px; height: 14px; }
.concept-profile-layout .text-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.concept-profile-layout .text-tags > span { padding: 5px 11px; border-radius: 8px; background: var(--concept-purple-soft, #f4effa); color: var(--concept-purple, #786096); font-size: 11px; line-height: 1.5; }
.concept-profile-layout .text-tags > .profile-mbti { background: var(--soft); color: var(--concept-pink-strong, #b62557); }
.concept-profile-layout .connection { margin: 0; color: var(--muted); font-size: 11px; }
.concept-profile-layout .profile-section { margin: 0; padding: 25px 0; border-top: 1px solid var(--line); }
.concept-profile-layout .profile-section h3 { margin: 0 0 16px; color: var(--ink); font-size: 15px; font-weight: 700; }
.photo-story-notes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.photo-story-notes:has(> figure:last-child:nth-child(2)) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.photo-story-notes:has(> figure:last-child:first-child) { grid-template-columns: minmax(0, 140px); }
.photo-story-notes figure { min-width: 0; margin: 0; }
.photo-story-notes button { display: block; width: 100%; aspect-ratio: 4 / 5; padding: 0; overflow: hidden; border-radius: 11px; }
.photo-story-notes img { height: 100%; object-fit: cover; }
.photo-story-notes figcaption { margin-top: 8px; color: var(--muted); font-size: 11px; line-height: 1.7; word-break: keep-all; overflow-wrap: anywhere; }
.concept-profile-layout .expression-list { gap: 0; }
.concept-profile-layout .expression-list > div { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: baseline; gap: 18px; padding: 11px 0; }
.concept-profile-layout .expression-list dt { color: var(--muted); font-size: 12px; }
.concept-profile-layout .expression-list dd { color: var(--ink); font-size: 13px; text-align: right; }
.concept-profile-layout .prompt-block { border-bottom: 0; }
.concept-profile-layout .prompt-block > p { margin: 0; padding: 0; font-size: 16px; font-weight: 500; line-height: 1.85; }
body[data-authenticated="true"] .concept-profile-layout .friend-intro-quote { padding: 24px 0; }
.concept-profile-layout .friend-intro-quote small { color: var(--muted); }
.concept-profile-layout .photo-stories { gap: 18px 12px; }
.concept-profile-layout .photo-stories img { border-radius: 13px; }
.concept-profile-layout .photo-stories figcaption { font-size: 11px; }
.concept-profile-layout .profile-cta { padding: 8px 0 16px; }
.concept-profile-layout .curiosity-received { margin-bottom: 15px; color: var(--concept-pink-strong, #b62557); font-size: 12px; line-height: 1.7; }
.concept-profile-layout .profile-detail-actions { position: static; margin: 0; padding: 12px 0 0; border: 0; background: transparent; gap: 9px; }
.concept-profile-layout .profile-detail-actions > button { min-height: 48px; border-radius: 14px; font-size: 13px; }
.concept-profile-layout .profile-detail-actions .deck-next { color: var(--muted); border: 0; background: transparent; font-weight: 500; }
.concept-profile-layout .profile-save, .concept-profile-layout .safety-profile-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; align-self: center; color: var(--muted); font-size: 12px; }
.concept-profile-layout .profile-save svg, .concept-profile-layout .safety-profile-button svg { width: 15px; height: 15px; }

body[data-authenticated="true"] .concept-profile-editor { max-width: 1040px; margin-inline: auto; padding-bottom: 0; }
.concept-profile-editor .editor-back-row { margin-bottom: 20px; }
.concept-profile-editor .editor-back { display: inline-flex; align-items: center; gap: 7px; padding: 0; color: var(--muted); font-size: 12px; }
body[data-authenticated="true"] .concept-profile-editor .page-heading { margin-bottom: 38px; }
body[data-authenticated="true"] .concept-profile-editor .page-heading h1 { font-size: 32px; letter-spacing: -.04em; }
.concept-profile-editor .page-heading p { margin-top: 10px; font-size: 13px; }
body[data-authenticated="true"] .concept-profile-editor .editor-grid { grid-template-columns: 310px minmax(0, 1fr); gap: 56px; }
.concept-profile-editor .editor-photos { min-width: 0; }
.editor-section-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.editor-section-icon { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 13px; color: var(--accent); background: var(--soft); }
.editor-section-icon svg { width: 19px; height: 19px; }
body[data-authenticated="true"] .concept-profile-editor .editor-title { margin: 0; font-size: 19px; }
.editor-section-heading p { margin-top: 4px; color: var(--muted); font-size: 11px; }
body[data-authenticated="true"] .concept-profile-editor .upload-grid { gap: 22px 12px; }
.concept-profile-editor .photo-entry-image, .concept-profile-editor .upload-slot { border-radius: 15px; }
.concept-profile-editor .upload-slot { background: var(--concept-cream, #fff9f5); }
body[data-authenticated="true"] .concept-profile-editor .upload-add { border: 1px dashed var(--control-line, var(--line)); border-radius: 15px; color: var(--muted); font-size: 12px; }
.concept-profile-editor .upload-add svg { width: 22px; height: 22px; }
.concept-profile-editor .upload-control { margin-top: 22px; border-radius: 14px; background: var(--surface); }
.concept-profile-editor .photo-entry > label { margin-top: 10px; font-size: 11px; }
.concept-profile-editor .photo-entry > input { border-radius: 10px; background: var(--surface); }
.concept-profile-editor .photo-entry .upload-actions button { font-size: 11px; }
body[data-authenticated="true"] .concept-profile-editor .editor-fields { gap: 34px; }
.concept-profile-editor .editor-fields > .field-note { margin: 0; font-size: 11px; line-height: 1.75; }
body[data-authenticated="true"] .concept-profile-editor .form-section { margin: 0; padding: 0 0 32px; }
body[data-authenticated="true"] .concept-profile-editor .form-section h2 { margin: 0 0 21px; font-size: 19px; letter-spacing: -.025em; }
.concept-profile-editor .editor-section-note { margin: -12px 0 24px; color: var(--muted); font-size: 12px; }
.concept-profile-editor .form-grid { gap: 23px 18px; }
.concept-profile-editor label, .concept-profile-editor .location-picker > label { margin-bottom: 8px; font-size: 12px; }
.concept-profile-editor input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.concept-profile-editor select, .concept-profile-editor textarea { min-height: 48px; padding: 12px 14px; border-radius: 12px; background: var(--surface); border-color: var(--control-line, var(--line)); font-size: 13px; }
.concept-profile-editor textarea { min-height: 104px; }
.editor-field-group { margin-top: 28px; }
.editor-field-group > h3 { margin-bottom: 16px; font-size: 14px; font-weight: 650; }
.concept-profile-editor .location-fields { gap: 20px; }
.concept-profile-editor .interest-heading { gap: 12px; margin-bottom: 18px; }
body[data-authenticated="true"] .concept-profile-editor .interest-heading h2 { margin-bottom: 0; }
.concept-profile-editor .interest-heading > p { white-space: nowrap; color: var(--muted); font-size: 11px; }
.concept-profile-editor .tag-checkboxes { gap: 9px; }
body[data-authenticated="true"] .concept-profile-editor .tag-checkbox { gap: 6px; min-height: 42px; margin: 0; padding: 8px 12px; border-radius: 12px; background: var(--surface); font-size: 12px; }
.concept-profile-editor .tag-checkbox:has(input:checked) { border-color: var(--accent); color: var(--concept-pink-strong, #b62557); background: var(--soft); }
.concept-profile-editor .tag-checkbox input { accent-color: var(--accent); }
.concept-profile-editor .custom-interest-label { margin-top: 22px; }
.concept-profile-editor .expression-fields { margin-top: 25px; }
.concept-profile-editor .expression-fields > fieldset { margin-bottom: 30px; }
.concept-profile-editor .expression-fields legend { margin-bottom: 13px; color: var(--ink); font-size: 13px; font-weight: 600; }
.concept-profile-editor .expression-options { gap: 12px; }
.concept-profile-editor .expression-options label { margin: 0; }
.concept-profile-editor .expression-options span { flex-direction: column; gap: 11px; min-height: 108px; padding: 18px 9px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--muted); font-size: 12px; }
.concept-profile-editor .expression-options span svg { width: 27px; height: 27px; stroke-width: 1.5; }
.concept-profile-editor .expression-options input:checked + span { border-color: var(--accent); background: var(--soft); color: var(--concept-pink-strong, #b62557); }
.concept-profile-editor .expression-options input:disabled + span { opacity: .5; }
.concept-profile-editor .expression-clear { min-height: 40px; font-size: 11px; }
.concept-profile-editor .expression-clear[hidden] { display: none; }
.concept-profile-editor .consent { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.8; }
.concept-profile-editor .editor-save-bar { padding-top: 0; }
.concept-profile-editor .editor-save { min-height: 50px; border-radius: 15px; }

@media (max-width: 1100px) and (min-width: 768px) {
  body[data-authenticated="true"] .concept-profile-editor .editor-grid { grid-template-columns: 250px minmax(0, 1fr); gap: 30px; }
  .concept-profile-editor .form-grid { grid-template-columns: minmax(0, 1fr); }
  .concept-profile-editor .location-fields { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 767px) {
  body[data-authenticated="true"] #dialog.dialog-profile { width: 100%; max-width: 100%; height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0; }
  body[data-authenticated="true"] .dialog-profile .dialog-top { min-height: 60px; padding: 9px 20px; }
  body[data-authenticated="true"] .concept-profile-layout { display: block; padding: 12px 20px 24px; }
  body[data-authenticated="true"] .concept-profile-layout .profile-media { position: static; margin-bottom: 24px; }
  body[data-authenticated="true"] .concept-profile-layout .profile-main-photo { height: min(90vw, 42dvh); aspect-ratio: auto; }
  .concept-profile-layout .photo-frame { border-radius: 21px; }
  body[data-authenticated="true"] .concept-profile-layout .profile-description { padding: 0; }
  body[data-authenticated="true"] .concept-profile-layout .profile-description h2 { font-size: 29px; }
  .concept-profile-layout .profile-identity-group { gap: 12px; padding-bottom: 25px; }
  .concept-profile-layout .profile-section { padding-block: 25px; }
  .concept-profile-layout .profile-detail-actions { padding-bottom: 0; }
  body[data-authenticated="true"] .concept-profile-editor { padding-bottom: 96px; }
  body[data-authenticated="true"] .concept-profile-editor .page-heading { margin-bottom: 30px; }
  body[data-authenticated="true"] .concept-profile-editor .page-heading h1 { font-size: 27px; }
  body[data-authenticated="true"] .concept-profile-editor .editor-grid { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  body[data-authenticated="true"] .concept-profile-editor .editor-grid > aside { max-width: none; padding-bottom: 30px; border-bottom: 1px solid var(--line); }
  body[data-authenticated="true"] .concept-profile-editor .editor-fields { gap: 29px; }
  body[data-authenticated="true"] .concept-profile-editor .upload-grid { gap: 22px 14px; }
  .concept-profile-editor .form-grid { gap: 20px 12px; }
  .concept-profile-editor .location-fields { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  body[data-authenticated="true"] .concept-profile-editor .editor-save-bar { padding: 10px 18px; }
  body[data-authenticated="true"] .concept-profile-editor .editor-save-bar .editor-save { min-height: 48px; }
}
@media (max-width: 360px) {
  body[data-authenticated="true"] .concept-profile-layout { padding-inline: 16px; }
  .concept-profile-editor .form-grid { grid-template-columns: minmax(0, 1fr); }
  .concept-profile-editor .expression-options { gap: 9px; }
  .concept-profile-editor .expression-options span { min-height: 100px; font-size: 11px; }
}
