#experience.profile-experience[open]{width:min(860px,calc(100% - 32px));max-width:860px;max-height:calc(100dvh - 32px);overflow:hidden;display:flex;flex-direction:column;padding:26px 30px}
#experience.profile-experience>.dialog-heading{flex:none;margin-bottom:14px}
#experience.profile-experience>#experience-content{min-height:0;overflow:auto;overscroll-behavior:contain;padding:0 8px 76px 0;scrollbar-width:thin;scrollbar-color:#c9b7da55 transparent}
.profile-form{display:grid;gap:22px}
.profile-identity{display:flex;align-items:center;gap:18px;padding:2px 0 18px;border-bottom:1px solid var(--line)}
.profile-identity h2{font-size:28px}
.profile-identity p{margin-top:5px}
.profile-avatar{width:76px;height:76px;flex:none;overflow:hidden}
.profile-avatar img{width:100%;height:100%;object-fit:cover;border-radius:50%}
.profile-link{padding:8px 14px 0 0;color:var(--mint);font-size:13px}
.profile-section{display:grid;gap:12px;padding-bottom:18px;border-bottom:1px solid var(--line)}
.profile-section h3{font-size:18px;letter-spacing:-.02em}
.profile-section-copy{margin:-7px 0 0;font-size:13px}
.profile-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.profile-fields>label{display:grid;gap:7px;color:var(--muted);font-size:13px}
.profile-fields input{width:100%;min-height:44px;padding:10px 12px;border:1px solid var(--line);border-radius:12px;background:#130c2222;color:var(--ink);font:inherit;font-size:14px;color-scheme:dark}
body.light .profile-fields input{background:#fff8;color-scheme:light}
.profile-theme-row{display:flex;justify-content:space-between;align-items:center;gap:14px;padding-top:4px;color:var(--muted);font-size:14px}
.profile-theme-row button{display:flex;gap:12px;align-items:center;padding:9px 12px;border:1px solid var(--line);border-radius:12px;color:var(--ink)}
.profile-theme-row .profile-theme-switch{display:flex;align-items:center;gap:9px;padding:6px 9px;border:1px solid var(--line);border-radius:999px;background:#ffffff08;color:var(--muted);transition:background .2s,border-color .2s}
.profile-theme-switch [data-theme-label]{font-size:11px;white-space:nowrap;transition:color .2s,opacity .2s;opacity:.68}
.profile-theme-switch [data-theme-label].is-current{color:var(--ink);opacity:1;font-weight:600}
.profile-theme-track{position:relative;display:block;width:35px;height:20px;flex:none;border:1px solid var(--line);border-radius:999px;background:#17102055;transition:background .25s}
.profile-theme-track i{position:absolute;top:2px;left:2px;width:14px;height:14px;border-radius:50%;background:#bea4d3;box-shadow:0 1px 5px #09051155;transition:transform .25s cubic-bezier(.2,.7,.2,1),background .25s}
.profile-theme-switch[aria-checked="true"] .profile-theme-track{background:#a5ddc32b}
.profile-theme-switch[aria-checked="true"] .profile-theme-track i{transform:translateX(15px);background:#a5ddc3}
.profile-theme-row .profile-theme-switch:focus-visible{outline:2px solid var(--mint);outline-offset:3px}
.profile-section fieldset{margin:0;padding:0;border:0}
.profile-section legend{margin-bottom:9px;color:var(--muted);font-size:13px}
.profile-check-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.profile-choice{display:flex;align-items:flex-start;gap:9px;min-height:42px;padding:10px 11px;border:1px solid var(--line);border-radius:12px;background:#ffffff08;font-size:13px;line-height:1.4;cursor:pointer}
.profile-choice input{accent-color:var(--purple);margin:2px 0 0;flex:none}
.profile-toggle{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:11px 12px;border:1px solid var(--line);border-radius:12px;background:#ffffff08}
.profile-toggle strong,.profile-toggle small{display:block}
.profile-toggle strong{font-size:14px;font-weight:500}
.profile-toggle small{margin-top:4px;color:var(--muted);font-size:12px}
.profile-toggle input{accent-color:var(--purple);width:18px;height:18px;flex:none}
.profile-push-row{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:12px;padding:11px 12px;border:1px solid var(--line);border-radius:12px;background:#ffffff08}
.profile-push-row strong,.profile-push-row small{display:block}.profile-push-row strong{font-size:14px;font-weight:500}.profile-push-row small{margin-top:4px;color:var(--muted);font-size:12px;line-height:1.4}.profile-push-row>[data-profile-push-toggle]{white-space:nowrap}.profile-push-row>[data-profile-push-test]{display:none!important;white-space:nowrap}
.profile-plan{grid-template-columns:1fr auto;align-items:center}
.profile-plan p{margin:5px 0;font-size:15px;color:var(--ink)}
.profile-plan small{font-size:12px;color:var(--muted)}
.profile-plan .outline{white-space:nowrap;font-size:13px;padding:10px 13px;border:1px solid var(--line);border-radius:12px}
.profile-form-actions{display:flex;justify-content:flex-end;padding:12px 0 8px;background:transparent}
.profile-form-actions .energy-claim{min-width:220px}
#experience.profile-experience[open]{width:min(760px,calc(100% - 32px));max-width:760px;max-height:calc(100dvh - 40px);padding:20px 22px}
#experience.profile-experience>.dialog-heading{margin-bottom:10px}
#experience.profile-experience>#experience-content{min-width:0;width:100%;padding:0 6px 20px 0;overflow-y:auto;overflow-x:hidden}
.profile-form{gap:13px}
.profile-form,.profile-form>*{min-width:0;max-width:100%}
.profile-identity{gap:14px;padding:0 0 13px}
.profile-avatar{width:62px;height:62px}
.profile-identity h2{font-size:24px}
.profile-identity p{margin-top:2px;font-size:13px}
.profile-avatar-actions{display:flex;gap:14px;flex-wrap:wrap}
.profile-link{padding-top:5px;font-size:12px}
.profile-section{gap:9px;padding-bottom:12px}
.profile-section h3{font-size:16px}
.profile-fields{gap:9px}
.profile-fields>label{gap:5px;font-size:12px}
.profile-fields input{min-height:40px;padding:8px 10px;font-size:13px}
.profile-theme-row{padding-top:0;font-size:13px}
.profile-theme-row button{padding:7px 10px}
.profile-accordion{display:block}
.profile-accordion>summary{display:flex;justify-content:space-between;align-items:center;gap:16px;list-style:none;cursor:pointer}
.profile-accordion>summary::-webkit-details-marker{display:none}
.profile-accordion>summary strong,.profile-accordion>summary small{display:block}
.profile-accordion>summary strong{font-size:16px;font-weight:600;letter-spacing:-.02em}
.profile-accordion>summary small{margin-top:3px;color:var(--muted);font-size:12px}
.profile-accordion>summary i{font-style:normal;color:var(--muted);font-size:20px;transition:transform .2s}
.profile-accordion[open]>summary i{transform:rotate(180deg)}
.profile-accordion>summary:focus-visible{outline:2px solid var(--mint);outline-offset:4px;border-radius:8px}
.profile-accordion-content{display:grid;gap:10px;padding-top:13px}
.profile-accordion-content,.profile-check-grid,.profile-choice,.profile-toggle{min-width:0;max-width:100%}
.profile-choice>span,.profile-toggle>span{min-width:0;overflow-wrap:anywhere}
.profile-accordion-content .profile-section-copy{margin:-2px 0 0}
.profile-accordion-content fieldset{margin:0;padding:0;border:0}
.profile-accordion-content legend{margin-bottom:7px;font-size:12px}
.profile-accordion-content .profile-check-grid{gap:6px}
.profile-accordion-content .profile-choice{min-height:36px;padding:8px 9px;font-size:12px}
.profile-accordion-content .profile-toggle{width:100%;box-sizing:border-box;padding:9px 10px}
.profile-toggle strong{font-size:13px}
.profile-toggle small{font-size:11px}
.profile-plan{grid-template-columns:1fr auto}
.profile-plan p{margin:2px 0;font-size:14px}
.profile-plan small{font-size:11px}
.profile-plan .outline{font-size:12px;padding:8px 10px}
.profile-form-actions{padding:3px 0 0}
.profile-form-actions .energy-claim{min-width:180px;min-height:42px;padding:10px 14px}
@media(max-width:700px){#experience.profile-experience[open]{width:calc(100% - 20px);max-height:calc(100dvh - 20px);padding:15px 16px}.profile-form{gap:10px}.profile-fields{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.profile-fields input{min-width:0}.profile-check-grid{grid-template-columns:1fr}.profile-identity h2{font-size:21px}.profile-avatar{width:54px;height:54px}.profile-plan{grid-template-columns:1fr auto;gap:8px}.profile-plan .outline{justify-self:start;white-space:normal}.profile-form-actions .energy-claim{width:100%}.profile-push-row{grid-template-columns:minmax(0,1fr) auto;gap:8px}.profile-push-row>[data-profile-push-test]{grid-column:2}}
@media(max-width:380px){.profile-fields{grid-template-columns:1fr}.profile-plan{grid-template-columns:1fr}}

/* Profile is a bottom-navigation destination, so it shares the full-screen page
   treatment used by the artifact store and other player sections. */
#experience.profile-experience.activity-fullscreen-experience[open]{position:fixed!important;inset:0!important;margin:0!important;transform:none!important;display:flex!important;flex-direction:column!important;box-sizing:border-box!important;width:100vw!important;width:100dvw!important;min-width:0!important;max-width:none!important;height:100vh!important;height:100dvh!important;min-height:100vh!important;min-height:100dvh!important;max-height:100vh!important;max-height:100dvh!important;padding:calc(18px + env(safe-area-inset-top)) max(20px,env(safe-area-inset-right)) calc(18px + env(safe-area-inset-bottom)) max(20px,env(safe-area-inset-left))!important;overflow:hidden!important;border:0!important;outline:0!important;border-radius:0!important;box-shadow:none!important;clip-path:none!important;background:linear-gradient(130deg,#604e72,#392b50)!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
#experience.profile-experience.activity-fullscreen-experience[open]::backdrop{background:transparent!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
#experience.profile-experience.activity-fullscreen-experience[open]>.dialog-heading{flex:none!important;margin:0 0 14px!important}
#experience.profile-experience.activity-fullscreen-experience[open]>.glass-edge{display:none!important}
#experience.profile-experience.activity-fullscreen-experience[open]>#experience-content{flex:1 1 auto!important;min-height:0!important;width:100%!important;max-width:none!important;box-sizing:border-box!important;overflow-x:hidden!important;overflow-y:auto!important;padding:0 12px calc(16px + env(safe-area-inset-bottom)) 0!important;scrollbar-gutter:stable;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
@media(min-width:701px){#experience.profile-experience.activity-fullscreen-experience[open]>.dialog-heading{width:min(100%,900px)!important;max-width:900px!important;align-self:center!important;margin-inline:auto!important}#experience.profile-experience.activity-fullscreen-experience[open]>#experience-content{width:min(100%,900px)!important;max-width:900px!important;align-self:center!important;margin-inline:auto!important}}
@media(max-width:700px){#experience.profile-experience.activity-fullscreen-experience[open]{padding:calc(14px + env(safe-area-inset-top)) max(14px,env(safe-area-inset-right)) calc(12px + env(safe-area-inset-bottom)) max(14px,env(safe-area-inset-left))!important}#experience.profile-experience.activity-fullscreen-experience[open]>.dialog-heading{margin-bottom:10px!important}#experience.profile-experience.activity-fullscreen-experience[open]>#experience-content{padding-right:8px!important;padding-bottom:calc(12px + env(safe-area-inset-bottom))!important}}


dialog.avatar-crop-dialog{width:min(420px,calc(100% - 32px));max-width:420px;max-height:calc(100dvh - 32px);overflow:auto;padding:22px;border:1px solid var(--line);border-radius:24px;background:linear-gradient(130deg,#604e72f5,#392b50f5);color:var(--ink);box-shadow:0 30px 100px #0e052980}
.avatar-crop-heading{display:flex;align-items:center;justify-content:space-between;gap:14px}.avatar-crop-heading strong{font-size:20px;letter-spacing:-.025em}.avatar-crop-hint{margin:10px 0 0;color:var(--muted);font-size:13px;line-height:1.5}
.avatar-crop-viewport{width:min(72vw,280px);aspect-ratio:1;margin:22px auto 18px;overflow:hidden;border:1px solid #ffffff4d;border-radius:50%;background:#120b20;touch-action:none;cursor:grab;user-select:none;-webkit-user-select:none;box-shadow:0 10px 35px #10091b66,inset 0 0 0 4px #ffffff12}.avatar-crop-viewport.is-dragging{cursor:grabbing}.avatar-crop-viewport img{display:block;width:100%;height:100%;max-width:none;object-fit:cover;transform-origin:50% 50%;pointer-events:none}
.avatar-crop-zoom{display:grid;grid-template-columns:1fr auto;gap:10px;align-items:center;color:var(--muted);font-size:13px}.avatar-crop-zoom span{color:var(--ink);font-variant-numeric:tabular-nums}.avatar-crop-zoom input{grid-column:1/-1;width:100%;margin:0;accent-color:var(--mint)}
.avatar-crop-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:20px}.avatar-crop-actions button{min-height:42px;padding:9px 14px;border:1px solid var(--line);border-radius:13px;color:var(--ink);font:inherit;font-size:13px}.avatar-crop-cancel{background:#ffffff08}.avatar-crop-save{background:var(--mint);border-color:transparent!important;color:#20152c!important;font-weight:650!important}
body.light dialog.avatar-crop-dialog{background:linear-gradient(130deg,#f7f1fa,#ede8f4);color:var(--ink);box-shadow:0 30px 100px #24133233}.avatar-crop-viewport{background:#241a32}
@media(max-width:480px){dialog.avatar-crop-dialog{width:calc(100% - 28px);padding:19px}.avatar-crop-viewport{width:min(72vw,260px)}.avatar-crop-actions button{flex:1}}

/* Profile save uses the same primary action as the player's activity screens. */
#experience.profile-experience .profile-form-actions .energy-claim{
  justify-content:center;
  min-height:51px;
  padding:14px 24px;
  border:1px solid #b6a4ce8c;
  border-radius:14px;
  background:linear-gradient(135deg,#7c6a94,#705b88);
  color:#fff;
  font:inherit;
  font-size:15px;
  font-weight:600;
  line-height:1.3;
  box-shadow:0 6px 16px #170d2830;
  transform:none;
  transition:background .15s,border-color .15s,box-shadow .15s;
}
#experience.profile-experience .profile-form-actions .energy-claim:hover:not(:disabled){
  border-color:#cbbbdc;
  background:linear-gradient(135deg,#75618d,#655079);
}
#experience.profile-experience .profile-form-actions .energy-claim:active:not(:disabled){
  background:#655079;
  box-shadow:inset 0 2px 4px #24163830;
  transform:none;
}
#experience.profile-experience .profile-form-actions .energy-claim:focus-visible{
  outline:2px solid var(--mint);
  outline-offset:3px;
}
#experience.profile-experience .profile-form-actions .energy-claim:disabled{
  opacity:.65;
  cursor:default;
  box-shadow:none;
}
