.profile-page { width: min(1100px, calc(100% - 56px)); padding: 42px 0 60px; }
.profile-back { color: var(--muted); font-size: 16px; }
.profile-back:hover { color: var(--brand-red); }
.profile-page h1 { margin: 22px 0 35px; font: 400 36px/1.2 var(--serif); }
.profile-header { display: flex; align-items: center; gap: 30px; }
.profile-avatar-wrap { position: relative; flex: 0 0 130px; }
.profile-avatar { display: grid; place-items: center; width: 130px; height: 130px; overflow: hidden; border-radius: 50%; background: #eee3e0; }
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-avatar img.profile-avatar-placeholder { width: 52px; height: 52px; opacity: .7; }
.profile-avatar-edit { position: absolute; right: -4px; bottom: 0; display: grid; place-items: center; width: 40px; height: 40px; padding: 9px; border: 1px solid var(--line); border-radius: 50%; background: var(--paper); color: var(--ink); }
.profile-avatar-edit svg, .profile-settings svg, .profile-settings img { width: 21px; height: 21px; }
.profile-identity { min-width: 0; }
.profile-identity h2 { margin: 0; font: 500 clamp(24px, 3vw, 34px)/1.2 var(--serif); overflow-wrap: anywhere; }
.profile-identity p { margin: 8px 0 0; color: var(--muted); font-size: 18px; }
.profile-studio { margin-left: auto; border-radius: 7px; font-family: var(--serif); }
.profile-settings-heading { margin-top: 48px; border-bottom: 1px solid var(--line); }
.profile-settings-heading h2 { display: inline-block; margin: 0 0 -1px; padding: 0 14px 13px 0; border-bottom: 2px solid var(--ink); font: 600 17px var(--serif); }
.profile-settings { margin-top: 24px; padding: 0 18px; border: 1px solid var(--line); border-radius: 10px; }
.profile-settings button { display: flex; align-items: center; gap: 18px; width: 100%; min-height: 54px; padding: 12px 4px; border: 0; background: transparent; color: var(--ink); text-align: left; font: 500 15px var(--serif); }
.profile-settings button + button { border-top: 1px solid var(--line); }
.profile-settings button span { margin-left: auto; font: 24px var(--body-font); }
.profile-settings button:hover { color: var(--brand-red); }
.profile-page-message, .profile-error { color: #ad2929; font-size: 16px; }
.profile-page-message:empty, .profile-error:empty { display: none; }
.profile-dialog { width: min(460px, calc(100% - 32px)); max-height: calc(100% - 32px); padding: 36px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--ink); overflow-y: auto; }
.profile-dialog::backdrop { background: #19141180; backdrop-filter: blur(5px); }
.profile-dialog h2 { margin: 0 32px 24px 0; font: 500 24px var(--serif); }
.profile-dialog-close { position: absolute; top: 10px; right: 12px; width: 36px; height: 36px; padding: 0; border: 0; background: transparent; color: var(--muted); font: 30px/1 system-ui, sans-serif; }
.profile-dialog form { display: flex; flex-direction: column; }
.profile-dialog label { margin: 0 0 7px; font: 600 13px var(--serif); }
.profile-dialog input:not([type="range"]), .profile-dialog textarea { width: 100%; padding: 11px; border: 1px solid var(--line); border-radius: 6px; background: #fffdfc; color: var(--ink); font: 17px var(--body-font); }
.profile-dialog input + label, .profile-dialog textarea + label, .profile-dialog small + label { margin-top: 18px; }
.profile-dialog textarea { resize: vertical; }
.profile-dialog small { margin-top: 6px; color: var(--muted); font-size: 14px; }
.profile-primary, .profile-secondary { display: inline-flex; justify-content: center; align-items: center; min-height: 44px; padding: 10px 16px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); background: transparent; font: 600 13px var(--serif); }
.profile-primary { border-color: var(--brand-red); background: var(--brand-red); color: white; }
.profile-dialog form .profile-primary { margin-top: 22px; }
.profile-primary:disabled, .profile-secondary:disabled { opacity: .6; cursor: wait; }
.avatar-help { color: var(--muted); font-size: 16px; line-height: 1.4; }
.avatar-stage { position: relative; aspect-ratio: 1; overflow: hidden; border-radius: 8px; background: #e8ddda; margin: 18px 0; }
.avatar-stage canvas { width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
.avatar-stage canvas:active { cursor: grabbing; }
.avatar-mask { position: absolute; inset: 0; border: 2px solid #ffffffb0; border-radius: 50%; box-shadow: 0 0 0 500px #19141170; pointer-events: none; }
.avatar-dialog input[type="range"] { display: block; width: 100%; accent-color: var(--brand-red); }
.avatar-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.profile-signin { padding: 50px 0; text-align: center; }
.profile-signin p { color: var(--muted); font-size: 19px; }
@media (max-width: 650px) { .profile-page { width: calc(100% - 36px); padding-top: 30px; } .profile-header { flex-wrap: wrap; gap: 20px; } .profile-avatar-wrap, .profile-avatar { width: 96px; height: 96px; flex-basis: 96px; } .profile-avatar img.profile-avatar-placeholder { width: 40px; height: 40px; } .profile-studio { flex-basis: 100%; margin-left: 0; } .profile-dialog { padding: 30px 24px; } }
.profile-dialog form[hidden], .profile-password-success[hidden] { display: none; }
