:root {
  --profile-bg: #080b09;
  --profile-panel: #101512;
  --profile-panel-raised: #151c17;
  --profile-border: #29362d;
  --profile-text: #edf3ed;
  --profile-muted: #91a096;
  --profile-green: #36e98d;
  --profile-green-dim: #173826;
  --profile-warning: #e7c987;
  --profile-red: #ff9b91;
}

body:has(.profile-app) {
  display: block;
  padding: 0;
  color: var(--profile-text);
  background:
    radial-gradient(ellipse at 50% -18%, rgba(35, 105, 64, .22), transparent 55%),
    var(--profile-bg);
  font-family: "Segoe UI", system-ui, sans-serif;
}
.security-shell:has(.profile-app) { width: 100%; max-width: none; }
.profile-app { width: min(1120px, 100%); margin: 0 auto; padding: 30px 34px 70px; animation: profile-arrive .35s ease both; }
.profile-topline { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 4px 0 25px; border-bottom: 1px solid var(--profile-border); }
.profile-brand { display: flex; align-items: center; gap: 10px; color: var(--profile-text); font-size: 13px; font-weight: 900; letter-spacing: 1.25px; }
.profile-brand-mark { display: grid; width: 29px; height: 29px; place-items: center; border: 1px solid rgba(54,233,141,.45); border-radius: 9px; color: var(--profile-green); font-size: 10px; }
.profile-top-link { color: #b8c6ba; font-size: 12px; }
.profile-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; padding: 35px 0 28px; }
.profile-kicker, .profile-section-kicker { margin: 0 0 8px; color: var(--profile-green); font-size: 10px; font-weight: 800; letter-spacing: 1.65px; text-transform: uppercase; }
.profile-heading h1 { margin: 0; font-size: clamp(30px, 5vw, 43px); line-height: 1.04; letter-spacing: -1.5px; }
.profile-lede { max-width: 540px; margin: 12px 0 0; color: var(--profile-muted); font-size: 14px; line-height: 1.65; }
.profile-heading-mark { width: 118px; height: 74px; flex: 0 0 auto; position: relative; opacity: .85; }
.profile-heading-mark:before, .profile-heading-mark:after { content: ""; position: absolute; border: 1px solid rgba(54,233,141,.32); border-radius: 50%; transform: rotate(-24deg); }
.profile-heading-mark:before { inset: 4px 8px 8px 4px; }
.profile-heading-mark:after { inset: 16px 0 0 21px; border-color: rgba(54,233,141,.18); }
.profile-heading-mark span { position: absolute; top: 28px; left: 52px; width: 8px; height: 8px; border-radius: 50%; background: var(--profile-green); box-shadow: 0 0 0 7px rgba(54,233,141,.09); }
.profile-message { display: none; margin: 0 0 18px; padding: 12px 15px; border: 1px solid var(--profile-border); border-radius: 10px; color: #c5d0c7; background: #0d120e; font-size: 13px; line-height: 1.55; }
.profile-message.show { display: block; }
.profile-message.success { border-color: rgba(54,233,141,.27); color: #a9f0c5; background: rgba(21,72,42,.2); }
.profile-message.error { border-color: rgba(255,155,145,.3); color: #ffc0b9; background: rgba(94,34,31,.17); }
.profile-layout { display: grid; grid-template-columns: minmax(0, 1fr) 278px; align-items: start; gap: 22px; }
.profile-main-column, .profile-side-column { display: grid; gap: 18px; min-width: 0; }
.profile-panel { overflow: hidden; border: 1px solid var(--profile-border); border-radius: 15px; background: linear-gradient(155deg, rgba(18,25,20,.98), rgba(13,17,14,.98)); box-shadow: 0 18px 48px rgba(0,0,0,.12); }
.profile-panel-head { padding: 20px 22px 15px; border-bottom: 1px solid rgba(41,54,45,.72); }
.profile-panel-head h2 { margin: 0; font-size: 16px; letter-spacing: -.25px; }
.profile-panel-head p { margin: 6px 0 0; color: var(--profile-muted); font-size: 12px; line-height: 1.5; }
.profile-panel-body { padding: 19px 22px 22px; }
.profile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px 16px; }
.profile-field { min-width: 0; }
.profile-field.wide { grid-column: 1 / -1; }
.profile-label { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 7px; color: #c4cec6; font-size: 11px; font-weight: 750; letter-spacing: .5px; }
.profile-label small { color: #6f7e72; font-size: 10px; font-weight: 500; letter-spacing: 0; }
.profile-control { width: 100%; min-height: 43px; padding: 10px 12px; border: 1px solid #2b382e; border-radius: 8px; color: var(--profile-text); background: #090d0a; font: inherit; font-size: 13px; transition: border-color .16s, background .16s; }
textarea.profile-control { min-height: 93px; resize: vertical; line-height: 1.5; }
.profile-control::placeholder { color: #59665c; }
.profile-control:focus { border-color: var(--profile-green); outline: 2px solid rgba(54,233,141,.14); outline-offset: 1px; background: #0b100c; }
.profile-control[readonly] { color: #829087; background: #0c100d; cursor: default; }
.profile-hint { margin: 7px 0 0; color: #758279; font-size: 11px; line-height: 1.5; }
.profile-private-note { display: flex; gap: 8px; margin: 0 0 18px; padding: 11px 12px; border: 1px solid rgba(54,233,141,.14); border-radius: 9px; color: #9baa9e; background: rgba(28,62,39,.13); font-size: 11px; line-height: 1.5; }
.profile-private-note strong { color: #cbd7ce; font-weight: 700; }
.profile-status-pill { display: inline-flex; align-items: center; gap: 7px; padding: 5px 9px; border: 1px solid #34443a; border-radius: 99px; color: #a8b4aa; font-size: 11px; }
.profile-status-pill:before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #8a958c; }
.profile-status-pill.verified { border-color: rgba(54,233,141,.3); color: #a7edc1; background: rgba(25,79,47,.2); }
.profile-status-pill.verified:before { background: var(--profile-green); }
.profile-status-pill.unverified { border-color: rgba(231,201,135,.25); color: #dec991; }
.profile-status-pill.unverified:before { background: var(--profile-warning); }
.profile-inline-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.profile-email-value { color: #d9e2da; font-size: 13px; overflow-wrap: anywhere; }
.profile-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; padding: 9px 14px; border: 1px solid var(--profile-border); border-radius: 8px; color: #c5d0c7; background: #151c17; cursor: pointer; font: inherit; font-size: 12px; font-weight: 750; text-decoration: none; transition: transform .16s, border-color .16s, background .16s, opacity .16s; }
.profile-btn:hover:not(:disabled) { border-color: #526557; background: #1a241d; transform: translateY(-1px); text-decoration: none; }
.profile-btn.primary { border-color: var(--profile-green); color: #06140b; background: var(--profile-green); }
.profile-btn.primary:hover:not(:disabled) { border-color: #6af0a7; background: #6af0a7; }
.profile-btn:disabled { opacity: .52; cursor: wait; }
.profile-btn.small { min-height: 34px; padding: 7px 10px; font-size: 11px; }
.profile-btn[hidden] { display: none; }
.profile-savebar { position: sticky; bottom: 12px; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 18px; padding: 12px 14px; border: 1px solid #34463a; border-radius: 12px; background: rgba(13,19,15,.95); box-shadow: 0 12px 35px rgba(0,0,0,.35); backdrop-filter: blur(12px); }
.profile-save-status { color: #91a096; font-size: 11px; }
.profile-save-actions { display: flex; gap: 8px; }
.profile-identity { display: flex; align-items: center; gap: 16px; }
.profile-avatar { display: grid; position: relative; width: 70px; height: 70px; flex: 0 0 auto; overflow: hidden; place-items: center; border: 1px solid #3a4d40; border-radius: 20px; color: var(--profile-green); background: linear-gradient(145deg, #20392a, #121a14); font-size: 24px; font-weight: 850; }
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-identity-copy { min-width: 0; }
.profile-identity-name { overflow-wrap: anywhere; color: #e3ece4; font-size: 14px; font-weight: 750; }
.profile-identity-sub { margin-top: 4px; color: var(--profile-muted); font-size: 11px; line-height: 1.5; }
.profile-upload-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 13px; }
.profile-file-input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; clip: rect(0,0,0,0); }
.profile-toggle-line { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.profile-toggle-copy { color: #d1d9d2; font-size: 12px; font-weight: 700; }
.profile-toggle-copy small { display: block; margin-top: 5px; color: var(--profile-muted); font-size: 11px; font-weight: 400; line-height: 1.55; }
.profile-switch { position: relative; width: 42px; height: 24px; flex: 0 0 auto; }
.profile-switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.profile-switch span { display: block; width: 42px; height: 24px; border: 1px solid #435047; border-radius: 30px; background: #202821; transition: background .16s; pointer-events: none; }
.profile-switch span:after { content: ""; display: block; width: 16px; height: 16px; margin: 3px; border-radius: 50%; background: #87948a; transition: transform .16s, background .16s; }
.profile-switch input:checked + span { border-color: rgba(54,233,141,.6); background: #1c5937; }
.profile-switch input:checked + span:after { transform: translateX(18px); background: #79f2ae; }
.profile-switch input:focus-visible + span { outline: 2px solid var(--profile-green); outline-offset: 3px; }
.profile-activity-links { display: grid; gap: 9px; }
.profile-activity-link { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 13px; border: 1px solid #29372e; border-radius: 9px; color: #d3ddd5; background: #0c110d; text-decoration: none; }
.profile-activity-link:hover { border-color: #4a5d4e; background: #121a14; text-decoration: none; }
.profile-activity-link strong { display: block; font-size: 12px; }
.profile-activity-link small { display: block; margin-top: 4px; color: #839087; font-size: 10px; }
.profile-activity-link em { color: var(--profile-green); font-size: 16px; font-style: normal; }
.profile-following-list { display: grid; gap: 8px; margin-top: 13px; }
.profile-follow-row { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 1px solid #27342b; border-radius: 9px; background: #0d120e; }
.profile-follow-avatar { display: grid; width: 32px; height: 32px; flex: 0 0 auto; place-items: center; border: 1px solid #34493a; border-radius: 10px; color: #a9e9bf; background: #17231a; font-size: 11px; font-weight: 800; }
.profile-follow-name { min-width: 0; overflow: hidden; color: #dce5dd; font-size: 12px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.profile-follow-row a { display: block; min-width: 0; color: inherit; text-decoration: none; }
.profile-follow-row a:hover .profile-follow-name { color: var(--profile-green); }
.profile-following-state { color: #8f9b91; font-size: 11px; line-height: 1.55; }
.profile-unavailable { padding: 10px 11px; border: 1px dashed #36433a; border-radius: 9px; color: #88958b; background: rgba(10,14,11,.5); font-size: 11px; line-height: 1.55; }
.profile-security-link { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 13px; border: 1px solid #29372e; border-radius: 9px; color: #d3ddd5; background: #0c110d; text-decoration: none; }
.profile-security-link:hover { border-color: #4a5d4e; text-decoration: none; }
.profile-security-link strong { font-size: 12px; }
.profile-security-link small { display: block; margin-top: 4px; color: #859187; font-size: 10px; }
.profile-security-link em { color: var(--profile-green); font-size: 16px; font-style: normal; }
.profile-loading { display: grid; gap: 15px; }
.profile-skeleton { height: 86px; border: 1px solid #1e2921; border-radius: 13px; background: linear-gradient(100deg, #0e130f 25%, #151c16 42%, #0e130f 62%); background-size: 200% 100%; animation: profile-shimmer 1.7s ease-in-out infinite; }
.profile-load-error { padding: 24px; border: 1px solid rgba(255,155,145,.25); border-radius: 13px; color: #f1b4ad; background: #17110f; font-size: 13px; line-height: 1.6; }
.profile-footer-note { margin: 18px 2px 0; color: #748077; font-size: 10px; line-height: 1.6; }
#email-change-note:empty { display: none; }
.profile-app a:focus-visible, .profile-app button:focus-visible { outline: 2px solid var(--profile-green); outline-offset: 3px; }
@keyframes profile-arrive { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
@keyframes profile-shimmer { to { background-position: -200% 0; } }
@media (max-width: 800px) { .profile-layout { grid-template-columns: minmax(0,1fr); } .profile-side-column { grid-template-columns: repeat(2,minmax(0,1fr)); align-items: start; } }
@media (max-width: 560px) {
  .profile-app { padding: max(16px, env(safe-area-inset-top)) 15px 42px; }
  .profile-topline { padding-bottom: 18px; }
  .profile-heading { padding: 27px 0 21px; }
  .profile-heading-mark { width: 70px; transform: scale(.72); transform-origin: right center; margin-left: -16px; }
  .profile-grid { grid-template-columns: minmax(0,1fr); gap: 14px; }
  .profile-field.wide { grid-column: auto; }
  .profile-panel-head { padding: 17px 16px 13px; }
  .profile-panel-body { padding: 16px; }
  .profile-side-column { grid-template-columns: minmax(0,1fr); }
  .profile-savebar { align-items: stretch; flex-direction: column; }
  .profile-save-actions .profile-btn { flex: 1; }
  #resend-verification, #request-email-change { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) { .profile-app *, .profile-app *:before, .profile-app *:after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
