.profile-center { display: grid; gap: 18px; color: var(--mem-ink); }
.profile-heading,
.profile-detail-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; }
.profile-heading span { color: var(--mem-coral); font: 900 12px/1 var(--mem-display); letter-spacing: .12em; }
.profile-heading h1,
.profile-detail-heading h1 { margin: 5px 0 0; font: 950 clamp(34px, 6vw, 62px)/.95 var(--mem-display); letter-spacing: -.04em; }
.profile-heading p,
.profile-detail-heading p { max-width: 58ch; margin: 8px 0 0; color: var(--mem-muted); font-weight: 700; }
.profile-detail-heading > button { flex:0 0 auto; align-self: start; min-height: 44px; padding: 8px 13px; border: 2px solid var(--mem-ink); border-radius: 10px; background: var(--mem-cream); color: var(--mem-ink); font-weight: 900; white-space:nowrap; }
.profile-identity { display: grid; grid-template-columns: 62px minmax(0, 1fr); grid-template-areas:"avatar editor" "avatar status"; align-items: center; gap: 8px 13px; padding: 16px; border: 3px solid var(--mem-ink); border-radius: 18px; background: var(--mem-mint); box-shadow: 0 7px 18px rgba(20, 42, 70, .13); }
.profile-avatar { grid-area:avatar; display: grid; width: 58px; height: 58px; place-items: center; padding: 0; overflow:hidden; border: 3px solid var(--mem-ink); border-radius: 50%; background: var(--mem-yellow); color:var(--mem-ink); font: 950 20px/1 var(--mem-display); }
.profile-identity-editor{grid-area:editor;min-width:0}
.profile-identity-editor>label { display: block; margin-bottom:5px; min-width: 0; font-size: 11px; font-weight: 900; }
.profile-name-row{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:9px}
.profile-identity input,
.profile-tools input { box-sizing: border-box; width: 100%; min-height: 42px; padding: 8px 11px; border: 2px solid var(--mem-ink); border-radius: 10px; background: var(--mem-cream); color: var(--mem-ink); font: 850 16px/1.2 var(--mem-display); }
.profile-name-row > button { min-height: 44px; padding: 8px 13px; border: 2px solid var(--mem-ink); border-radius: 10px; background: var(--mem-yellow); color: var(--mem-ink); font-weight: 900; }
.profile-entry-list { overflow: hidden; border: 3px solid var(--mem-ink); border-radius: 18px; background: var(--mem-cream); box-shadow: 0 7px 18px rgba(20, 42, 70, .12); }
.profile-entry-list > button { display: flex; width: 100%; min-height: 76px; align-items: center; justify-content: space-between; gap: 18px; padding: 15px 18px; border: 0; border-bottom: 2px solid var(--mem-ink); border-radius: 0; background: transparent; color: var(--mem-ink); text-align: left; }
.profile-entry-list > button:last-child { border-bottom: 0; }
.profile-entry-list > button:hover { background: color-mix(in srgb, var(--mem-sky) 28%, var(--mem-cream)); }
.profile-entry-list span,
.profile-setting-row > span { display: grid; min-width: 0; gap: 4px; }
.profile-entry-list strong { font: 950 18px/1.1 var(--mem-display); }
.profile-entry-list small,
.profile-setting-row small { overflow: hidden; color: var(--mem-muted); font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.profile-entry-list b { flex: 0 0 auto; font-size: 12px; }
.profile-service,
.profile-list-panel,
.profile-settings { overflow: hidden; border: 3px solid var(--mem-ink); border-radius: 18px; background: var(--mem-cream); }
.profile-service header,
.profile-list-panel > header,
.profile-settings > header { display: flex; min-height: 42px; align-items: center; justify-content: space-between; padding: 0 15px; border-bottom: 2px solid var(--mem-ink); background: var(--mem-coral-soft); font-size: 12px; letter-spacing: .04em; }
.profile-service button,
.profile-service a { display: flex; box-sizing: border-box; width: calc(100% - 28px); min-height: 50px; align-items: center; justify-content: space-between; margin: 0 14px; padding: 10px 2px; border: 0; border-bottom: 1px solid rgba(20, 42, 70, .3); border-radius: 0; background: transparent; color: var(--mem-ink); font-weight: 850; text-decoration: none; }
.profile-service button:last-child { border-bottom: 0; }
.profile-service span { color: var(--mem-muted); font-size: 11px; }
.profile-tools { display: grid; gap: 10px; }
.profile-filter-rail { display: flex; gap: 7px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-color: var(--mem-ink) transparent; }
.profile-filter-rail button,
.profile-sort button { flex: 0 0 auto; min-height: 34px; padding: 7px 10px; border: 2px solid var(--mem-ink); border-radius: 9px; background: var(--mem-cream); color: var(--mem-ink); font-weight: 850; }
.profile-filter-rail button.active { background: var(--mem-yellow); }
.profile-sort { display: flex; align-items: center; gap: 7px; color: var(--mem-muted); font-size: 11px; font-weight: 850; }
.profile-sort button { min-height: 30px; border: 0; background: rgba(20, 42, 70, .08); }
.profile-sort button.active { background: var(--mem-ink); color: var(--mem-cream); }
.profile-backing-list { padding: 0 15px; }
.profile-backing-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; border-bottom: 2px solid var(--mem-ink); }
.profile-backing-row:last-child { border-bottom: 0; }
.profile-backing-open { display: grid; min-width: 0; gap: 4px; padding: 15px 0; border: 0; background: transparent; color: var(--mem-ink); text-align: left; }
.profile-backing-open strong { overflow: hidden; font: 950 18px/1.1 var(--mem-display); text-overflow: ellipsis; white-space: nowrap; }
.profile-backing-open span,
.profile-backing-open small { overflow: hidden; color: var(--mem-muted); font-size: 11px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.profile-remove,
.profile-more { min-height: 34px; padding: 7px 9px; border: 2px solid var(--mem-ink); border-radius: 9px; background: var(--mem-cream); color: var(--mem-ink); font-size: 11px; font-weight: 900; }
.profile-row-arrow { font-weight: 950; }
.profile-more { display: block; width: calc(100% - 30px); margin: 0 15px 15px; background: var(--mem-mint); }
.profile-empty { padding: 40px 18px; text-align: center; }
.profile-empty strong { font: 950 19px/1.15 var(--mem-display); }
.profile-empty p { margin: 8px auto 0; color: var(--mem-muted); font-weight: 700; }
.profile-setting-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 16px; min-height: 72px; padding: 12px 15px; border-bottom: 2px solid var(--mem-ink); }
.profile-setting-row:last-child { border-bottom: 0; }
.profile-setting-row strong { font: 900 15px/1.2 var(--mem-display); }
.profile-stepper,
.profile-segment { display: flex; align-items: center; gap: 5px; }
.profile-stepper button,
.profile-segment button,
.profile-toggle { min-height: 34px; padding: 7px 10px; border: 2px solid var(--mem-ink); border-radius: 9px; background: var(--mem-cream); color: var(--mem-ink); font-weight: 900; }
.profile-stepper b { min-width: 56px; text-align: center; }
.profile-segment button.active,
.profile-toggle.active { background: var(--mem-mint); }
.player-favorite-button { display:grid; place-items:center; align-self:center; width:42px; min-width:42px; height:42px; min-height:42px; padding:0; border:2px solid var(--mem-cream); border-radius:10px; background:transparent; color:var(--mem-cream); font:900 25px/1 var(--mem-body); box-shadow:none; transform:none; }
.player-favorite-button.active { border-color:var(--mem-yellow); background:transparent; color:var(--mem-yellow); }
.player-favorite-button:disabled { opacity:.45; cursor:default; }
.backing-result-actions { display: flex; align-items: center; gap: 8px; }
.backing-favorite-action { min-height: 36px; padding: 7px 10px; border: 2px solid var(--mem-ink); border-radius: 9px; background: var(--mem-cream); color: var(--mem-ink); font-weight: 900; }
.backing-favorite-action.active { background: var(--mem-yellow); }
@media (max-width: 640px) {
  .profile-center { gap: 14px; }
  .profile-detail-heading{display:grid;grid-template-columns:minmax(0,1fr);align-items:start;gap:10px}
  .profile-detail-heading>button{justify-self:start}
  .profile-identity { grid-template-columns: 52px minmax(0, 1fr); grid-template-areas:"avatar editor" "status status"; align-items:start; padding:14px; }
  .profile-avatar { width: 48px; height: 48px; }
  .profile-name-row{grid-template-columns:minmax(0,1fr) auto;gap:7px}
  .profile-setting-row { grid-template-columns: 1fr; gap: 9px; }
  .profile-stepper,
  .profile-segment { justify-self: start; }
  .player-favorite-button { width:42px; min-width:42px; height:42px; min-height:42px; font-size:23px; }
}
@media (max-width:370px) { .player-favorite-button { width:40px; min-width:40px; height:40px; min-height:40px; } }
.profile-account-state{grid-area:status;color:var(--mem-secondary);font-size:10px;font-weight:750}
.profile-account-login{grid-column:2/-1;justify-self:start;min-height:36px;padding:6px 10px;border:2px solid var(--mem-ink);border-radius:8px;background:var(--mem-yellow);color:var(--mem-ink);font-weight:850}
.profile-details-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px;padding:17px;border:3px solid var(--mem-ink);border-radius:18px;background:var(--mem-cream);box-shadow:0 7px 18px rgba(20,42,70,.12)}
.profile-details-form>label{display:grid;gap:6px;color:var(--mem-ink);font-size:11px;font-weight:900}
.profile-details-form input:not([type="checkbox"]),.profile-details-form select{box-sizing:border-box;width:100%;min-height:44px;padding:8px 10px;border:2px solid var(--mem-ink);border-radius:9px;background:#fff;color:var(--mem-ink);font:800 15px/1.2 var(--mem-body)}
.profile-details-form .profile-consent{grid-column:1/-1;display:flex;align-items:center;gap:10px;padding:11px;border:2px solid var(--mem-ink);border-radius:10px;background:var(--mem-mint)}
.profile-consent input{width:20px;height:20px;accent-color:var(--mem-coral)}
.profile-consent span{display:grid;gap:3px}.profile-consent small{color:var(--mem-secondary)}
.profile-account-identities{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 0;border-top:2px solid var(--mem-ink);border-bottom:2px solid var(--mem-ink);font-size:11px}.profile-account-identities span{color:var(--mem-secondary);font-weight:750;text-align:right}
.profile-details-form output{align-self:center;min-height:20px;color:#1d684f;font-size:11px;font-weight:800}
.profile-details-form>button{justify-self:end;min-height:44px;padding:8px 14px;border:2px solid var(--mem-ink);border-radius:9px;background:var(--mem-yellow);color:var(--mem-ink);font-weight:900}
@media(max-width:640px){.profile-details-form{grid-template-columns:1fr}.profile-account-identities{align-items:flex-start;flex-direction:column}.profile-account-identities span{text-align:left}.profile-details-form>button{justify-self:stretch}}
