/* My profile belongs to one opaque dialog, using the MARPS settings material. */
#page-profile.on { padding: 32px 24px; gap: 0; }
#page-profile .prf-dialog {
  position: relative;
  width: 100%; max-width: 760px; flex-shrink: 0;
  border-radius: 28px; background: var(--bg2);
  box-shadow: 0 24px 72px rgba(24,24,27,.18);
  color: var(--t); font-family: var(--font-ui);
}
/* Focus lands on the dialog on open; the visible ring belongs to controls. */
#page-profile .prf-dialog:focus { outline: none; }
#page-profile .prf-panel {
  max-width: none; margin: 0; padding: 28px;
  border: 0; border-radius: 0; background: transparent; box-shadow: none;
  backdrop-filter: none; -webkit-backdrop-filter: none; animation: none;
}
#page-profile .prf-panel-id { padding-right: 88px; border-bottom: 1px solid var(--border); }
#page-profile .prf-close {
  position: absolute; top: 28px; right: 28px;
  border: 1px solid var(--border); border-radius: 50%;
  background: var(--bg2); box-shadow: 0 2px 8px rgba(24,24,27,.035);
}
#page-profile .prf-ava { width: 52px; height: 52px; border-radius: 18px; background: var(--accent-soft); color: var(--a); font: 650 21px var(--font-ui); }
#page-profile .prf-name { font: 700 22px/1.3 var(--font-ui); letter-spacing: -.02em; overflow-wrap: anywhere; }
#page-profile .prf-id-sub { font: 400 14px/1.5 var(--font-ui); overflow-wrap: anywhere; }
#page-profile .prf-tabs { margin: 0 0 24px; padding: 5px; border-radius: 999px; background: var(--bg3); }
#page-profile .prf-tab { min-height: 44px; border-radius: 999px; font: 500 15px/1.4 var(--font-ui); }
#page-profile .prf-tab.on { font-weight: 500; box-shadow: 0 3px 12px rgba(24,24,27,.06); }
#page-profile .prf-form { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 20px 24px; max-width: none; }
#page-profile .prf-field { min-width: 0; gap: 8px; }
#page-profile .prf-field-wide { grid-column: 1/-1; }
#page-profile .prf-label { color: var(--t); font: 600 14px/1.45 var(--font-ui); }
#page-profile .prf-text-composer {
  min-width: 0; border: 1px solid var(--border); border-radius: 18px;
  background: var(--bg3); overflow: hidden;
  transition: background .18s ease, border-color .18s ease, box-shadow .18s ease;
}
#page-profile .prf-text-composer:hover { border-color: var(--border-hover); }
#page-profile .prf-text-composer:focus-within { background: var(--bg2); border-color: #c9ccd3; box-shadow: 0 6px 22px rgba(24,24,27,.07); }
#page-profile .prf-text-composer:has(:focus-visible) { outline: 2px solid var(--a); outline-offset: 3px; }
#page-profile .prf-text-composer .prf-input {
  display: block; width: 100%; height: 50px; min-height: 50px; padding: 0 16px;
  border: 0; border-radius: 0; background: transparent; box-shadow: none;
  color: var(--t); font: 400 15px/1.5 var(--font-ui);
}
#page-profile .prf-input::placeholder { color: var(--t2); opacity: 1; }
#page-profile .prf-select, #page-profile .ds-select-trigger { height: 52px; min-height: 52px; border-radius: var(--ws-control-radius); border-color: var(--ws-line); background-color: var(--ds-surface); box-shadow: var(--ws-shadow); font: 400 15px/1.5 var(--font-ui); }
#page-profile .prf-account-field { padding-top: 20px; border-top: 1px solid var(--border); }
#page-profile .prf-account-field .prf-text-composer { background: transparent; }
#page-profile .prf-input[readonly] { color: var(--t2); cursor: default; }
#page-profile .prf-security-row { grid-column: 1/-1; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
#page-profile .prf-security-row p { margin: 4px 0 0; color: var(--t2); font: 400 14px/1.5 var(--font-ui); }
#page-profile .prf-label-link { min-height: 44px; padding: 0 16px; border: 1px solid var(--border); border-radius: 999px; background: var(--bg2); color: var(--t); font: 500 14px/1.4 var(--font-ui); white-space: nowrap; }
#page-profile .prf-form-foot { grid-column: 1/-1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin: 0; padding: 20px 0 0; }
#page-profile .prf-form-actions { display: flex; gap: 10px; margin-left: auto; }
#page-profile :is(.prf-apply, .prf-cancel) { height: 48px; min-height: 48px; padding: 0 22px; border-radius: 999px; font: 500 15px/1.4 var(--font-ui); }
#page-profile .prf-apply:disabled { background: var(--a); color: #fff; opacity: .65; }
#page-profile .prf-status { color: var(--t2); font: 400 14px/1.45 var(--font-ui); max-width: 36ch; }
#page-profile .prf-status[data-state=error] { color: var(--red); }
#page-profile .prf-status:empty { display: none; }
#page-profile .prf-erasure { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border); }
#page-profile .prf-erasure summary { display: flex; align-items: center; justify-content: space-between; min-height: 44px; cursor: pointer; list-style: none; color: var(--t2); font: 500 14px/1.4 var(--font-ui); }
#page-profile .prf-erasure summary::-webkit-details-marker { display: none; }
#page-profile .prf-erasure svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
#page-profile .prf-erasure[open] svg { transform: rotate(180deg); }
#page-profile .prf-erasure p { color: var(--t2); font: 400 14px/1.5 var(--font-ui); }
#page-profile .prf-delete { display: inline-flex; align-items: center; min-height: 44px; margin: 0; padding: 0 16px; border: 1px solid var(--border); border-radius: 999px; background: transparent; font: 500 14px/1.4 var(--font-ui); }
#page-profile .prf-pers-block { margin: 0; padding: 24px 0; border-bottom: 1px solid var(--border); }
#page-profile .prf-pers-block:first-child { padding-top: 0; }
#page-profile .prf-pers-block:last-child { border: 0; padding-bottom: 0; }
#page-profile .prf-sound-row { padding: 0; border: 0; }
#page-profile :is(.prf-section-h, .prf-sound-t) { font: 600 16px/1.4 var(--font-ui); letter-spacing: -.01em; text-transform: none; color: var(--t); }
#page-profile .prf-sound-d { font: 400 14px/1.5 var(--font-ui); }
#page-profile .prf-unavailable { color: var(--t2); font: 400 13px/1.4 var(--font-ui); }
#page-profile .prf-theme-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
#page-profile .prf-theme { min-height: 56px; border-radius: 18px; text-align: left; }
#page-profile .prf-theme-l { font: 500 15px/1.4 var(--font-ui); }
#page-profile .prf-theme-foot { margin: 0; }
#page-profile .prf-pane.on { animation: none; }
#page-profile input::selection { background: var(--accent-soft); }
#page-profile input { caret-color: var(--a); }
@media (max-width: 760px) {
  #page-profile.on { padding: 16px 12px; }
  #page-profile .prf-dialog { border-radius: 24px; }
  #page-profile .prf-panel { padding: 24px 20px; }
  #page-profile .prf-panel-id { padding-right: 76px; }
  #page-profile .prf-id { flex-wrap: nowrap; gap: 12px; }
  #page-profile .prf-ava { width: 44px; height: 44px; flex-shrink: 0; border-radius: 16px; }
  #page-profile .prf-close { top: 24px; right: 20px; }
  #page-profile .prf-name { font-size: 20px; }
  #page-profile .prf-form { grid-template-columns: minmax(0,1fr); gap: 20px; }
  #page-profile .prf-text-composer .prf-input, #page-profile .prf-select, #page-profile .ds-select-trigger { font-size: 16px; }
  #page-profile .prf-security-row { align-items: flex-start; flex-direction: column; gap: 12px; }
  #page-profile .prf-form-foot { flex-direction: column; align-items: stretch; }
  #page-profile .prf-form-actions { margin: 0; }
  #page-profile .prf-form-actions button { flex: 1; padding: 0 14px; }
  #page-profile .prf-theme-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  #page-profile .prf-dialog *, #page-profile .prf-dialog *::after { animation: none; transition: none; }
}
