/* Account settings and their own sheets; no other account section is restyled. */
body.wyl-frontend-preview [data-wyl-account-section="profile"] { --wyl-settings-danger: #a8444b; }
html[data-wyl-theme="dark"] body.wyl-frontend-preview [data-wyl-account-section="profile"] { --wyl-settings-danger: #f19a9e; }
body.wyl-frontend-preview [data-wyl-account-section="profile"] .wyl-account-view-title { margin: 0 0 22px; color: var(--wyl-ink); font: 650 24px/1.4 var(--wyl-ui-font); }
body.wyl-frontend-preview [data-wyl-account-section="profile"] .wyl-profile-group { margin: 0 0 24px; }
body.wyl-frontend-preview [data-wyl-account-section="profile"] .wyl-profile-group > header { min-height: 27px; gap: 8px; margin: 0 0 12px; padding: 0; }
body.wyl-frontend-preview [data-wyl-account-section="profile"] .wyl-profile-group > header > span { width: 20px; height: 24px; color: var(--wyl-muted); }
body.wyl-frontend-preview [data-wyl-account-section="profile"] .wyl-profile-group > header h2 { margin: 0; color: var(--wyl-ink); font: 600 18px/1.5 var(--wyl-ui-font); }
body.wyl-frontend-preview [data-wyl-account-section="profile"] .wyl-icon { width: 18px; height: 18px; flex: 0 0 18px; stroke-width: 1.8; }
body.wyl-frontend-preview [data-wyl-account-section="profile"] .wyl-icon[hidden] { display: none; }
body.wyl-frontend-preview [data-wyl-account-section="profile"] [data-wyl-password-icon] { display: inline-flex; align-items: center; justify-content: center; }
body.wyl-frontend-preview [data-wyl-account-section="profile"] [data-wyl-password-icon][hidden],
body.wyl-frontend-preview [data-wyl-account-section="profile"] [data-wyl-password-match][hidden] { display: none; }
body.wyl-frontend-preview [data-wyl-account-section="profile"] .wyl-profile-list { gap: 0; overflow: hidden; border: 1px solid var(--wyl-line); border-radius: 12px; background: var(--wyl-surface); box-shadow: none; }
body.wyl-frontend-preview [data-wyl-account-section="profile"] .wyl-profile-panel { min-width: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
body.wyl-frontend-preview [data-wyl-account-section="profile"] .wyl-profile-panel + .wyl-profile-panel { border-top: 1px solid var(--wyl-line); }
body.wyl-frontend-preview [data-wyl-account-section="profile"] :is(.wyl-profile-panel summary, .wyl-profile-avatar-trigger) { width: 100%; min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; border: 0; border-radius: 0; background: transparent; color: var(--wyl-ink); text-align: left; transition: background-color .18s ease; }
body.wyl-frontend-preview [data-wyl-account-section="profile"] .wyl-profile-panel summary > span { min-width: 0; display: grid; gap: 4px; }
body.wyl-frontend-preview [data-wyl-account-section="profile"] :is(.wyl-profile-panel summary strong, .wyl-profile-avatar-summary strong) { margin: 0; color: var(--wyl-ink); font: 600 14px/1.5 var(--wyl-ui-font); }
body.wyl-frontend-preview [data-wyl-account-section="profile"] :is(.wyl-profile-panel summary small, .wyl-profile-avatar-summary small) { max-width: none; margin: 0; color: var(--wyl-muted); font-size: 13px; font-weight: 400; line-height: 1.6; overflow-wrap: anywhere; }
body.wyl-frontend-preview [data-wyl-account-section="profile"] .wyl-profile-panel summary small.is-missing { color: var(--wyl-settings-danger); }
body.wyl-frontend-preview [data-wyl-account-section="profile"] :is(.wyl-profile-panel summary > i, .wyl-profile-avatar-trigger > i) { width: 18px; height: 24px; flex: 0 0 18px; display: grid; place-items: center; margin: 0; border: 0; color: var(--wyl-muted); transform: none; transition: transform .18s ease; }
body.wyl-frontend-preview [data-wyl-account-section="profile"] .wyl-profile-panel[open] summary > i { transform: rotate(90deg); }
body.wyl-frontend-preview [data-wyl-account-section="profile"] .wyl-profile-avatar-summary { min-width: 0; display: flex; align-items: center; gap: 12px; }
body.wyl-frontend-preview [data-wyl-account-section="profile"] .wyl-profile-avatar-summary > img { width: 44px; height: 44px; flex: 0 0 44px; border: 1px solid var(--wyl-line); border-radius: 50%; object-fit: cover; box-shadow: none; }
body.wyl-frontend-preview [data-wyl-account-section="profile"] .wyl-profile-avatar-summary > span { min-width: 0; display: grid; gap: 4px; }
body.wyl-frontend-preview [data-wyl-account-section="profile"] :is(.wyl-profile-panel summary, .wyl-profile-avatar-trigger):focus-visible { outline: 2px solid var(--wyl-jade); outline-offset: -3px; background: var(--wyl-surface-soft); }
body.wyl-frontend-preview [data-wyl-account-section="profile"] .wyl-profile-panel-body { padding: 20px; border-top: 1px solid var(--wyl-line); background: var(--wyl-surface); }
body.wyl-frontend-preview [data-wyl-account-section="profile"] .wyl-auth-form { max-width: 660px; gap: 18px; }
body.wyl-frontend-preview [data-wyl-account-section="profile"] .wyl-auth-form label { min-width: 0; gap: 7px; color: var(--wyl-ink-2); font-size: 14px; line-height: 1.5; }
body.wyl-frontend-preview [data-wyl-account-section="profile"] .wyl-auth-form label > span:first-child { font-size: 14px; font-weight: 500; }
body.wyl-frontend-preview [data-wyl-account-section="profile"] .wyl-auth-form :is(input[type="text"], input[type="email"], input[type="password"]) { width: 100%; min-width: 0; height: 48px; min-height: 48px; padding: 11px 12px; border: 1px solid var(--wyl-line); border-radius: 8px; background: var(--wyl-surface-soft); color: var(--wyl-ink); font: 400 16px/1.5 var(--wyl-ui-font); box-shadow: none; caret-color: var(--wyl-jade); }
body.wyl-frontend-preview [data-wyl-account-section="profile"] .wyl-auth-form input::placeholder { color: var(--wyl-muted); opacity: 1; }
body.wyl-frontend-preview [data-wyl-account-section="profile"] .wyl-auth-form input:focus { border-color: var(--wyl-jade); }
body.wyl-frontend-preview [data-wyl-account-section="profile"] .wyl-auth-form input[aria-invalid="true"] { border-color: var(--wyl-settings-danger); }
body.wyl-frontend-preview [data-wyl-account-section="profile"] .wyl-auth-form .wyl-password-field input { padding-right: 58px; }
body.wyl-frontend-preview [data-wyl-account-section="profile"] .wyl-password-field button { inset: 2px 2px 2px auto; width: 44px; min-width: 44px; height: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--wyl-muted); font-size: 13px; }
body.wyl-frontend-preview [data-wyl-account-section="profile"] .wyl-code-field { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 10px; }
body.wyl-frontend-preview [data-wyl-account-section="profile"] .wyl-code-field input { padding-right: 12px; font-variant-numeric: tabular-nums; letter-spacing: .08em; }
body.wyl-frontend-preview [data-wyl-account-section="profile"] .wyl-code-field button { position: static; width: auto; min-width: 128px; min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 12px; border: 1px solid var(--wyl-line); border-radius: 8px; background: var(--wyl-surface); color: var(--wyl-ink-2); font-size: 13px; font-weight: 500; white-space: nowrap; }
body.wyl-frontend-preview [data-wyl-account-section="profile"] .wyl-auth-two { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
body.wyl-frontend-preview [data-wyl-account-section="profile"] .wyl-auth-submit { width: auto; min-width: 128px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; justify-self: start; padding: 10px 18px; border: 1px solid transparent; border-radius: 8px; background: var(--wyl-preview-action); color: var(--wyl-preview-action-ink); font-size: 14px; font-weight: 600; line-height: 1.5; box-shadow: none; transition: filter .18s ease; }
body.wyl-frontend-preview [data-wyl-account-section="profile"] :is(.wyl-auth-submit, .wyl-code-field button):disabled { border-color: var(--wyl-line); background: var(--wyl-surface-soft); color: var(--wyl-muted); opacity: 1; cursor: not-allowed; }
body.wyl-frontend-preview [data-wyl-account-section="profile"] :is(.wyl-auth-inline, .wyl-auth-notice, .wyl-avatar-help) { margin: 0; color: var(--wyl-muted); font-size: 13px; line-height: 1.7; overflow-wrap: anywhere; }
body.wyl-frontend-preview [data-wyl-account-section="profile"] .wyl-auth-inline:empty { display: none; }
body.wyl-frontend-preview [data-wyl-account-section="profile"] :is(.wyl-auth-inline.is-error, .wyl-auth-notice.is-error, .wyl-avatar-help.is-error) { color: var(--wyl-settings-danger); }
body.wyl-frontend-preview [data-wyl-account-section="profile"] .wyl-password-match { margin: -6px 0 0; color: var(--wyl-settings-danger); font-size: 13px; line-height: 1.7; }
body.wyl-frontend-preview [data-wyl-account-section="profile"] .wyl-auth-notice { margin-bottom: 18px; padding: 12px 14px; border-radius: 8px; }
body.wyl-frontend-preview [data-wyl-account-section="profile"] .wyl-profile-signout { width: auto; min-height: 44px; display: inline-flex; align-items: center; justify-content: flex-start; gap: 8px; margin: 0; padding: 0 12px; border: 1px solid var(--wyl-line); border-radius: 8px; background: var(--wyl-surface); color: var(--wyl-ink-2); font-size: 14px; font-weight: 500; text-decoration: none; box-shadow: none; }
body.wyl-frontend-preview [data-wyl-account-section="profile"] .wyl-profile-signout > .wyl-icon:last-child { display: none; }

/* Dialog roots receive the same profile section marker from the preview branch. */
body.wyl-frontend-preview [data-wyl-account-section="profile"] .wys-app-sheet-panel { width: min(520px, calc(100vw - 48px)); max-width: 520px; min-height: 0; max-height: min(760px, calc(100dvh - 48px)); display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--wyl-line); border-radius: 12px; background: var(--wyl-surface); }
body.wyl-frontend-preview [data-wyl-account-section="profile"].wyl-avatar-sheet .wys-app-sheet-panel { width: min(600px, calc(100vw - 48px)); max-width: 600px; }
body.wyl-frontend-preview [data-wyl-account-section="profile"] .wys-app-sheet-head { flex: 0 0 auto; padding: 22px 24px 18px; }
body.wyl-frontend-preview [data-wyl-account-section="profile"] .wys-app-sheet-eyebrow { display: none; }
body.wyl-frontend-preview [data-wyl-account-section="profile"] .wys-app-sheet-heading h2 { margin: 0; padding-right: 56px; color: var(--wyl-ink); font: 650 24px/1.4 var(--wyl-ui-font); }
body.wyl-frontend-preview [data-wyl-account-section="profile"] .wys-app-sheet-heading p { margin-top: 6px; color: var(--wyl-muted); font-size: 13px; line-height: 1.7; }
body.wyl-frontend-preview [data-wyl-account-section="profile"] .wys-app-sheet-close { top: 18px; right: 18px; width: 44px; min-width: 44px; height: 44px; min-height: 44px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 8px; background: var(--wyl-surface-soft); color: var(--wyl-ink-2); }
body.wyl-frontend-preview [data-wyl-account-section="profile"] .wys-app-sheet-body { flex: 1 1 auto; min-height: 0; max-height: none; overflow-y: auto; overscroll-behavior: contain; padding: 0 24px 24px; scrollbar-width: thin; scrollbar-color: var(--wyl-line) transparent; scroll-padding-block: 12px; }
body.wyl-frontend-preview [data-wyl-account-section="profile"] .wyl-profile-panel-body.is-sheet-copy { padding: 0; border: 0; background: transparent; }
body.wyl-frontend-preview [data-wyl-account-section="profile"] .wys-app-sheet-body .wyl-auth-form { max-width: none; }
body.wyl-frontend-preview [data-wyl-account-section="profile"] .wys-app-sheet-body .wyl-auth-submit { width: 100%; justify-self: stretch; }
body.wyl-frontend-preview [data-wyl-account-section="profile"] .wyl-avatar-form { gap: 16px !important; }
body.wyl-frontend-preview [data-wyl-account-section="profile"] .wyl-avatar-editor { grid-template-columns: minmax(0, 1fr) 100px; gap: 20px; }
body.wyl-frontend-preview [data-wyl-account-section="profile"] .wyl-avatar-crop { width: min(100%, 310px); border: 1px solid var(--wyl-line); border-radius: 12px; box-shadow: none; }
body.wyl-frontend-preview [data-wyl-account-section="profile"] .wyl-avatar-crop::after { border-color: var(--wyl-line); border-radius: 12px; box-shadow: none; }
body.wyl-frontend-preview [data-wyl-account-section="profile"] .wyl-avatar-crop > span { font-size: 11px; line-height: 1.6; }
body.wyl-frontend-preview [data-wyl-account-section="profile"] .wyl-avatar-preview-rail { gap: 18px; }
body.wyl-frontend-preview [data-wyl-account-section="profile"] .wyl-avatar-preview strong { color: var(--wyl-muted); font-size: 12px; font-weight: 400; line-height: 1.5; }
body.wyl-frontend-preview [data-wyl-account-section="profile"] .wyl-avatar-preview.is-square > span { width: 80px; height: 80px; border-radius: 10px; }
body.wyl-frontend-preview [data-wyl-account-section="profile"] .wyl-avatar-preview.is-round > span { width: 64px; height: 64px; }
body.wyl-frontend-preview [data-wyl-account-section="profile"] .wyl-avatar-picker { min-height: 72px; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; padding: 12px 14px; border: 1px dashed var(--wyl-line); border-radius: 8px; background: var(--wyl-surface-soft); }
body.wyl-frontend-preview [data-wyl-account-section="profile"] .wyl-avatar-picker > img { width: 28px; height: 28px; }
body.wyl-frontend-preview [data-wyl-account-section="profile"] .wyl-avatar-picker b { color: var(--wyl-ink); font-size: 14px; font-weight: 600; line-height: 1.5; }
body.wyl-frontend-preview [data-wyl-account-section="profile"] .wyl-avatar-picker small { color: var(--wyl-muted); font-size: 12px; line-height: 1.6; }
body.wyl-frontend-preview [data-wyl-account-section="profile"] .wyl-avatar-picker:focus-within { outline: 2px solid var(--wyl-jade); outline-offset: 3px; }
body.wyl-frontend-preview [data-wyl-account-section="profile"] .wyl-avatar-tools button { min-height: 44px; min-width: 56px; border-radius: 8px; font-size: 13px; }
@media (hover: hover) {
  body.wyl-frontend-preview [data-wyl-account-section="profile"] :is(.wyl-profile-panel summary, .wyl-profile-avatar-trigger):hover { background: var(--wyl-surface-soft); }
  body.wyl-frontend-preview [data-wyl-account-section="profile"] :is(.wyl-password-field button, .wyl-code-field button):not(:disabled):hover { background: var(--wyl-surface-soft); color: var(--wyl-jade); }
  body.wyl-frontend-preview [data-wyl-account-section="profile"] .wyl-auth-submit:not(:disabled):hover { filter: brightness(.94); }
  body.wyl-frontend-preview [data-wyl-account-section="profile"] .wyl-profile-signout:hover { color: var(--wyl-settings-danger); border-color: color-mix(in srgb, var(--wyl-settings-danger) 35%, var(--wyl-line)); }
}
@media (max-width: 640px) {
  body.wyl-frontend-preview [data-wyl-account-section="profile"] .wyl-account-view-title { margin-bottom: 18px; font-size: 22px; }
  body.wyl-frontend-preview [data-wyl-account-section="profile"] .wyl-profile-group { margin-bottom: 22px; }
  body.wyl-frontend-preview [data-wyl-account-section="profile"] :is(.wyl-profile-panel summary, .wyl-profile-avatar-trigger) { min-height: 76px; padding: 14px 16px; }
  body.wyl-frontend-preview [data-wyl-account-section="profile"] .wyl-profile-signout { min-height: 44px; }
  body.wyl-frontend-preview [data-wyl-account-section="profile"] .wys-app-sheet-panel,
  body.wyl-frontend-preview [data-wyl-account-section="profile"].wyl-avatar-sheet .wys-app-sheet-panel { width: 100%; max-width: none; min-height: 0; max-height: 90dvh; border-radius: 12px 12px 0 0; }
  body.wyl-frontend-preview [data-wyl-account-section="profile"] .wys-app-sheet-head { padding: 24px 20px 18px; }
  body.wyl-frontend-preview [data-wyl-account-section="profile"] .wys-app-sheet-heading h2 { font-size: 22px; }
  body.wyl-frontend-preview [data-wyl-account-section="profile"] .wys-app-sheet-close { top: 20px; right: 16px; }
  body.wyl-frontend-preview [data-wyl-account-section="profile"] .wys-app-sheet-body { padding: 0 20px calc(20px + env(safe-area-inset-bottom)); }
  body.wyl-frontend-preview [data-wyl-account-section="profile"] .wyl-auth-two { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  body.wyl-frontend-preview [data-wyl-account-section="profile"] .wyl-code-field { gap: 8px; }
  body.wyl-frontend-preview [data-wyl-account-section="profile"] .wyl-code-field button { min-width: 124px; padding-inline: 10px; font-size: 12px; }
  body.wyl-frontend-preview [data-wyl-account-section="profile"] .wyl-avatar-editor { grid-template-columns: minmax(0, 1fr) 72px; gap: 16px; }
  body.wyl-frontend-preview [data-wyl-account-section="profile"] .wyl-avatar-preview.is-square > span { width: 64px; height: 64px; }
  body.wyl-frontend-preview [data-wyl-account-section="profile"] .wyl-avatar-preview.is-round > span { width: 52px; height: 52px; }
}
@media (prefers-reduced-motion: reduce) {
  body.wyl-frontend-preview [data-wyl-account-section="profile"] :is(.wyl-profile-panel summary, .wyl-profile-avatar-trigger, .wyl-profile-panel summary > i, .wyl-auth-submit) { transition: none; }
}
