/* Profile layout and the site's light palette. Dark values live in dark-theme.css. */
article.box.story.profile-page {
  --profile-bg: #fff;
  --profile-surface: #fff;
  --profile-surface-raised: #f8f8f8;
  --profile-border: #e8e8e8;
  --profile-text: #161616;
  --profile-muted: #666b70;
  --profile-accent: var(--primaryColor, #e86a20);
  --profile-cover-glow: rgba(232,106,32,.18);
  --profile-cover-start: #f7f8fa;
  --profile-cover-middle: #f3ede8;
  --profile-cover-end: #f9dcc6;
  --profile-cover-border: rgba(15,15,15,.06);
  --profile-cover-stripe: #9d6950;
  --profile-richtext: #41464b;
  --profile-field-bg: #fff;
  --profile-field-border: #d9dce0;
  --profile-placeholder: #8a8e94;
  --profile-button-text: #fff;
  --profile-button-hover: #d95810;
  --profile-delete: #ae4235;
  background: var(--profile-bg);
  color: var(--profile-text);
  border: 1px solid var(--profile-border);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 24px 70px rgba(25, 32, 42, .08);
  max-width: 980px;
  width: calc(100% - 32px);
}

.profile-page *, .profile-page *::before, .profile-page *::after { box-sizing: border-box; }
.profile-page .profile-hero { position: relative; background: var(--profile-bg); }
.profile-page .profile-cover {
  height: 185px;
  background: radial-gradient(circle at 78% 15%, var(--profile-cover-glow), transparent 32%),
    linear-gradient(125deg, var(--profile-cover-start) 0%, var(--profile-cover-middle) 48%, var(--profile-cover-end) 100%);
  border-bottom: 1px solid var(--profile-cover-border);
}
.profile-page .profile-cover::after {
  content: "";
  display: block;
  height: 100%;
  opacity: .08;
  background: repeating-linear-gradient(105deg, transparent 0 44px, var(--profile-cover-stripe) 45px, transparent 46px 90px);
}
.profile-page .profile-identity {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 24px;
  min-height: 98px;
  padding: 0 36px 22px;
  margin-top: -45px;
}
.profile-page .profile-avatar {
  width: 112px;
  height: 112px;
  flex: 0 0 112px;
  overflow: hidden;
  border: 5px solid var(--profile-bg);
  border-radius: 24px;
  background: var(--profile-surface-raised);
  box-shadow: 0 12px 30px rgba(0,0,0,.12);
}
.profile-page .profile-avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }
.profile-page .profile-identity-text { min-width: 0; padding-bottom: 4px; }
.profile-page .profile-identity h1 { margin: 3px 0 7px; color: var(--profile-text); font-size: clamp(26px, 3.5vw, 38px); font-weight: 800; line-height: 1.14; overflow-wrap: anywhere; }
.profile-page .profile-subline { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; color: var(--profile-muted); font-size: 14px; }
.profile-page .profile-separator { width: 3px; height: 3px; border-radius: 50%; background: var(--profile-muted); }
.profile-page .profile-presence { display: inline-flex; align-items: center; gap: 7px; }
.profile-page .profile-presence::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #9ca2a8; }
.profile-page .profile-presence.is-online::before { background: #35ae72; box-shadow: 0 0 0 3px rgba(53,174,114,.12); }
.profile-page .profile-body { padding: 0 36px 42px; }
.profile-page ul.user_tab {
  position: static;
  display: flex;
  flex-direction: row;
  gap: 28px;
  margin: 0 0 34px;
  padding: 0;
  border-bottom: 1px solid var(--profile-border);
  list-style: none;
}
.profile-page ul.user_tab li { margin: 0; cursor: pointer; }
.profile-page ul.user_tab li a, .profile-page ul.user_tab li.active a {
  display: block;
  padding: 14px 0 15px;
  color: var(--profile-muted);
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  text-decoration: none;
  white-space: nowrap;
}
.profile-page ul.user_tab li.active a, .profile-page ul.user_tab li a.active,
.profile-page ul.user_tab li:hover a, .profile-page ul.user_tab li a:focus-visible {
  color: var(--profile-text);
  border-bottom-color: var(--profile-accent);
  background: none;
}
.profile-page a:focus-visible, .profile-page input:focus-visible, .profile-page textarea:focus-visible, .profile-page select:focus-visible, .profile-page button:focus-visible { outline: 2px solid var(--profile-accent); outline-offset: 3px; }
.profile-page .profile-overview-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 18px; }
.profile-page .profile-card { min-width: 0; padding: 25px; border: 1px solid var(--profile-border); border-radius: 15px; background: var(--profile-surface); }
.profile-page .profile-card-heading { display: flex; align-items: center; gap: 13px; margin-bottom: 22px; }
.profile-page .profile-card-icon { display: grid; place-items: center; width: 43px; height: 43px; flex: 0 0 43px; border-radius: 12px; color: var(--profile-accent); background: rgba(232,106,32,.1); font-size: 22px; }
.profile-page .profile-card h3 { margin: 2px 0 0; color: var(--profile-text); font-size: 19px; font-weight: 750; line-height: 1.3; }
.profile-page .profile-stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.profile-page .profile-stat { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; padding: 18px; border: 1px solid var(--profile-border); border-radius: 12px; background: var(--profile-surface-raised); }
.profile-page .profile-stat strong { color: var(--profile-text); font-size: 32px; line-height: 1.1; font-weight: 800; }
.profile-page .profile-stat > span:nth-child(2) { margin-top: 5px; color: var(--profile-muted); font-size: 13px; }
.profile-page .profile-stat-link { margin-top: 15px; color: var(--profile-accent); font-size: 13px; font-weight: 700; }
.profile-page .profile-stat-link a { color: inherit; text-decoration: none; }
.profile-page .profile-stat-link a:hover { text-decoration: underline; }
.profile-page .profile-ratings { margin-top: 19px; }
.profile-page .profile-ratings > div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-top: 1px solid var(--profile-border); color: var(--profile-muted); font-size: 13px; }
.profile-page .profile-ratings strong { color: var(--profile-text); font-size: 15px; }
.profile-page .usinf { margin: 0; padding: 0; border: 0; list-style: none; }
.profile-page .usinf li { display: flex; justify-content: space-between; gap: 15px; padding: 12px 0; border-bottom: 1px solid var(--profile-border); font-size: 13px; }
.profile-page .usinf li:first-child { padding-top: 0; }
.profile-page .usinf li:last-child { padding-bottom: 0; border-bottom: 0; }
.profile-page .ui-c1, .profile-page .ui-c2 { width: auto; min-width: 0; }
.profile-page .ui-c1 { color: var(--profile-muted); font-weight: 500; }
.profile-page .ui-c2 { color: var(--profile-text); font-weight: 650; text-align: right; overflow-wrap: anywhere; }
.profile-page .profile-about, .profile-page .profile-signature { margin-top: 18px; }
.profile-page .profile-about .profile-card-heading { margin-bottom: 12px; }
.profile-page .profile-richtext { color: var(--profile-richtext); line-height: 1.7; overflow-wrap: anywhere; }
.profile-page .profile-richtext p { margin: 0 0 10px; color: inherit; }
.profile-page .profile-richtext p:last-child { margin-bottom: 0; }
.profile-page .profile-signature h3 { margin-bottom: 12px; }

/* DLE owns the form and its field markup; styles stay scoped to this page. */
.profile-page #options .addform { margin: 0; }
.profile-page #options h5 { margin: 28px 0 15px !important; padding-bottom: 13px; border-bottom: 1px solid var(--profile-border); color: var(--profile-text); font-size: 21px; line-height: 1.3; }
.profile-page #options h5:first-child { margin-top: 0 !important; }
.profile-page #options .ui-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 22px; row-gap: 0; margin: 0; padding: 0; }
.profile-page #options .form-group { min-width: 0; margin: 0 0 21px; }
.profile-page #options .profile-form-wide { grid-column: 1 / -1; }
.profile-page #options .form-sep { display: none; }
.profile-page #options label, .profile-page #options legend { display: block; margin-bottom: 8px; color: var(--profile-text); font-size: 14px; font-weight: 650; }
.profile-page #options input[type="text"], .profile-page #options input[type="email"], .profile-page #options input[type="password"], .profile-page #options input[type="file"], .profile-page #options textarea, .profile-page #options select {
  width: 100%; max-width: 100%; min-height: 46px; padding: 11px 13px;
  border: 1px solid var(--profile-field-border) !important; border-radius: 9px;
  background: var(--profile-field-bg) !important; color: var(--profile-text) !important;
  font: inherit;
}
.profile-page #options textarea { min-height: 120px; resize: vertical; }
.profile-page #options input::placeholder, .profile-page #options textarea::placeholder { color: var(--profile-placeholder); }
.profile-page #options input[type="checkbox"] { accent-color: var(--profile-accent); }
.profile-page #options .checkbox { margin-top: 10px; color: var(--profile-muted); font-size: 13px; }
.profile-page #options .checkbox label { display: inline-flex; align-items: center; gap: 8px; color: var(--profile-muted); }
.profile-page #options fieldset { height: 100%; margin: 0; padding: 17px; border: 1px solid var(--profile-border); border-radius: 12px; }
.profile-page #options fieldset legend { width: auto; margin: 0 0 8px; padding: 0 4px; font-size: 13px; }
.profile-page #options .xfields { width: 100%; }
.profile-page #options .xfields td { padding: 6px; color: var(--profile-muted); }
.profile-page #options .sociallog { display: flex; align-items: center; flex-wrap: wrap; gap: 13px; }
.profile-page #options .sociallog a { color: var(--profile-text); }
.profile-page #options .form_submit { display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: 18px; margin-top: 12px; padding-top: 24px; border-top: 1px solid var(--profile-border); }
.profile-page #options .form_submit button { min-height: 45px; padding: 10px 22px; border: 0; border-radius: 9px; background: var(--profile-accent); color: var(--profile-button-text); font-weight: 800; }
.profile-page #options .form_submit button:hover { background: var(--profile-button-hover); }
.profile-page #options .form_submit a { color: var(--profile-delete); }

@media (max-width: 760px) {
  .profile-page .profile-body { padding: 0 20px 28px; }
  .profile-page .profile-identity { padding: 0 20px 20px; }
  .profile-page .profile-overview-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .profile-page { border-radius: 14px; }
  .profile-page .profile-cover { height: 125px; }
  .profile-page .profile-identity { align-items: flex-start; gap: 14px; margin-top: -32px; }
  .profile-page .profile-avatar { width: 72px; height: 72px; flex-basis: 72px; border-width: 4px; border-radius: 17px; }
  .profile-page .profile-identity-text { padding-top: 35px; }
  .profile-page .profile-identity h1 { font-size: 25px; }
  .profile-page .profile-subline { font-size: 12px; }
  .profile-page ul.user_tab { gap: 20px; overflow-x: auto; margin-bottom: 25px; }
  .profile-page ul.user_tab li a { font-size: 13px; }
  .profile-page .profile-card { padding: 19px; }
  .profile-page .profile-stat { padding: 13px; }
  .profile-page .profile-stat strong { font-size: 26px; }
  .profile-page #options .ui-form { grid-template-columns: 1fr; }
}
