:root{--bg:#eeeeec;--text:#101114;--muted:#6f7178;--line:rgba(17,24,39,.10);--glass:rgba(255,255,255,.64);--orange:#f45108;--green:#12a36d;--yellow:#eab308;--blue:#2563eb;--danger:#dc2626;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Prompt,"Noto Sans Thai",sans-serif;color:var(--text);background:linear-gradient(155deg,#eeeeec,#fafaf8 42%,#ddddda)}*{box-sizing:border-box}body{margin:0;font-size:14px;-webkit-font-smoothing:antialiased}.hidden{display:none!important}.phone-shell{max-width:460px;margin:0 auto;min-height:100vh;padding:16px 14px 96px}.top{height:58px;display:flex;align-items:center;gap:10px}.avatar{width:36px;height:36px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(135deg,#dff77e,#9ed900);font-weight:950}.top small{display:block;color:var(--muted)}.top b{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.settings-btn{margin-left:auto;width:42px;height:42px;border-radius:16px;border:1px solid rgba(255,255,255,.72);background:var(--glass);backdrop-filter:blur(22px);font-size:22px;font-weight:900}.glass-card,.hero-card{background:var(--glass);border:1px solid rgba(255,255,255,.72);border-radius:26px;padding:16px;margin:14px 0;box-shadow:0 18px 50px rgba(24,24,27,.10),inset 0 1px 0 rgba(255,255,255,.75);backdrop-filter:blur(26px) saturate(150%)}.hero-card{display:flex;justify-content:space-between;align-items:center;background:linear-gradient(135deg,rgba(244,81,8,.96),rgba(255,111,0,.74));color:#fff;min-height:148px}.hero-card p{margin:0;color:rgba(255,255,255,.78)}.hero-card h1{margin:5px 0;font-size:30px;letter-spacing:-.06em}.badge{display:inline-flex;border-radius:999px;background:rgba(255,255,255,.24);color:#fff;padding:7px 12px;font-weight:900}.activity-card h2,.glass-card h2{margin:0 0 12px;font-size:18px;letter-spacing:-.04em}.rings{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.ring{height:92px;border-radius:22px;background:rgba(255,255,255,.62);display:grid;place-items:center;text-align:center;position:relative;overflow:hidden;border:1px solid rgba(255,255,255,.7)}.ring:before{content:"";width:58px;height:58px;border-radius:50%;position:absolute;border:7px solid currentColor;opacity:.88}.ring b{position:relative;font-size:22px;letter-spacing:-.04em}.ring span{position:relative;font-size:11px;color:var(--muted);align-self:start;margin-top:-18px}.orange{color:var(--orange)}.green{color:var(--green)}.yellow{color:var(--yellow)}.muted{color:var(--muted)}label{display:block;margin:12px 0;font-weight:800}input,select,textarea{width:100%;border:1px solid var(--line);border-radius:16px;padding:12px 13px;margin-top:6px;background:rgba(255,255,255,.62);font:inherit}.check{display:flex;gap:10px;align-items:center}.check input{width:auto}.primary,button{border:0;border-radius:16px;padding:12px 15px;font-weight:900;font:inherit;cursor:pointer}.primary{background:#151720;color:#fff;width:100%}.big{font-size:18px;min-height:56px;margin-top:12px}.ghost{background:rgba(255,255,255,.55);color:#111;border:1px solid var(--line)}.auth-card{margin-top:40px}.auth-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:10px}.auth-actions button{background:rgba(255,255,255,.58);border:1px solid var(--line)}.section-head{display:flex;justify-content:space-between;gap:12px;align-items:center}.list{display:grid;gap:10px}.row{padding:13px;border:1px solid rgba(255,255,255,.75);border-radius:20px;background:rgba(255,255,255,.52);box-shadow:0 8px 24px rgba(24,24,27,.05)}.row b{display:block}.row small{color:var(--muted);line-height:1.45}.row button{margin-top:9px;background:#151720;color:#fff;width:100%;border-radius:14px}.collapsible summary{font-weight:900;cursor:pointer}.cookie{position:fixed;left:14px;right:14px;bottom:14px;background:rgba(20,22,28,.90);color:#fff;border-radius:22px;padding:14px;display:flex;gap:12px;align-items:center;justify-content:space-between;box-shadow:0 18px 50px rgba(0,0,0,.25);backdrop-filter:blur(20px);z-index:30}.cookie p{margin:4px 0;color:#d1d5db}.cookie button{background:#fff;color:#111827;white-space:nowrap}.dialog-backdrop{position:fixed;inset:0;background:rgba(17,24,39,.34);display:grid;place-items:end center;z-index:50;backdrop-filter:blur(8px)}.dialog{width:min(430px,100%);background:rgba(255,255,255,.86);border:1px solid rgba(255,255,255,.78);border-radius:28px 28px 0 0;padding:22px;box-shadow:0 -20px 80px rgba(0,0,0,.24);backdrop-filter:blur(28px)}.dialog h2{margin:0 0 8px}.dialog p{color:var(--muted)}.dialog>div{display:flex;gap:10px}.dialog button{flex:1}.settings-overlay{position:fixed;inset:0;background:rgba(17,24,39,.26);z-index:40;backdrop-filter:blur(8px)}.settings-menu{position:fixed;left:12px;right:12px;bottom:12px;background:rgba(255,255,255,.78);border:1px solid rgba(255,255,255,.80);border-radius:30px;padding:14px;box-shadow:0 24px 80px rgba(0,0,0,.20);z-index:41;backdrop-filter:blur(30px) saturate(150%)}.settings-head{display:flex;align-items:center;justify-content:space-between;padding:4px 4px 12px}.settings-menu button{width:100%;text-align:center;background:rgba(255,255,255,.58);border:1px solid var(--line);margin:5px 0}.settings-menu .danger-menu{background:rgba(220,38,38,.12);color:#991b1b}.profile-panel h3{margin:4px 0 8px}@media(min-width:780px){.phone-shell{max-width:980px}.portal-grid{display:grid;grid-template-columns:1fr 1fr}.hero-card{min-height:180px}.settings-menu{left:auto;right:18px;top:70px;bottom:auto;width:340px;border-radius:26px}.dialog{border-radius:28px;width:430px}}@media(max-width:430px){body{font-size:13px}.phone-shell{padding:12px 12px 90px}.rings{gap:8px}.ring{height:84px}.hero-card h1{font-size:26px}.cookie{display:block}.cookie button{width:100%;margin-top:10px}.auth-actions{grid-template-columns:1fr}}

/* Patch 011: member profile sheet sizing and bilingual controls */
.settings-btn{display:grid;place-items:center;line-height:1;padding:0;color:#14161c}
.settings-btn span{display:block;transform:translateY(-2px);font-size:18px;letter-spacing:1px}
.settings-menu{max-height:min(82vh,720px);overflow:auto}
.settings-head{align-items:center}
.close-x{width:34px!important;height:34px!important;min-width:34px;padding:0!important;border-radius:14px!important;display:grid!important;place-items:center!important;font-size:18px!important;line-height:1!important;background:rgba(255,255,255,.62)!important;color:#111!important}
.profile-panel label{margin:9px 0;font-size:12px;color:#2f3238}.profile-panel input,.profile-panel select,.profile-panel textarea{padding:10px 12px;border-radius:14px}.profile-panel textarea{resize:vertical}.profile-panel input[readonly]{background:rgba(245,245,245,.70);color:#6b7280}.profile-panel .primary{color:#fff!important;background:#151720!important}.profile-panel .ghost{color:#111!important}.profile-panel h3{font-size:18px}.settings-menu button{font-weight:850}.settings-menu .primary{color:#fff}.settings-menu .ghost{color:#111}
@media(min-width:780px){.settings-menu{width:min(360px,calc(100vw - 36px));max-height:calc(100vh - 96px);right:22px;top:78px}.profile-panel h3{margin-top:0}.phone-shell{max-width:900px}.hero-card{min-height:160px}.hero-card h1{font-size:28px}.glass-card,.hero-card{border-radius:24px}}
@media(max-width:430px){.settings-menu{left:10px;right:10px;bottom:10px;max-height:86vh}.settings-btn{width:40px;height:40px}.close-x{width:32px!important;height:32px!important}.profile-panel label{margin:8px 0}.profile-panel input,.profile-panel select,.profile-panel textarea{padding:10px 11px}.hero-card{min-height:132px}.hero-card h1{font-size:24px}.big{font-size:16px}}

/* Patch 012: complete member i18n + centered desktop profile editor */
.settings-menu.profile-mode .profile-panel{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  gap:10px 16px;
  align-items:start;
}
.settings-menu.profile-mode .profile-panel h3,
.settings-menu.profile-mode .profile-panel #phoneHelp,
.settings-menu.profile-mode .profile-panel #profileMsg{
  grid-column:1 / -1;
}
.settings-menu.profile-mode .profile-panel .profile-field-wide{
  grid-column:1 / -1;
}
.settings-menu.profile-mode .profile-panel label{
  margin:0;
}
.settings-menu.profile-mode .profile-panel #saveProfileBtn,
.settings-menu.profile-mode .profile-panel #backSettingsBtn{
  margin-top:4px;
  min-height:44px;
}
.settings-menu.profile-mode .profile-panel #saveProfileBtn{
  color:#fff!important;
  background:#151720!important;
}
.settings-menu.profile-mode .profile-panel #backSettingsBtn{
  color:#111!important;
  background:rgba(255,255,255,.64)!important;
}

@media(min-width:780px){
  .settings-menu.profile-mode{
    left:50%;
    right:auto;
    top:50%;
    bottom:auto;
    width:min(760px,calc(100vw - 48px));
    max-height:calc(100vh - 56px);
    transform:translate(-50%,-50%);
    border-radius:28px;
    padding:18px 20px 20px;
  }
  .settings-menu.profile-mode .settings-head{
    padding:2px 2px 14px;
  }
  .settings-menu.profile-mode .profile-panel h3{
    font-size:20px;
    margin:0 0 4px;
  }
  .settings-menu.profile-mode .profile-panel input,
  .settings-menu.profile-mode .profile-panel select,
  .settings-menu.profile-mode .profile-panel textarea{
    min-height:44px;
  }
}

@media(max-width:779px){
  .settings-menu.profile-mode{
    left:10px;
    right:10px;
    top:auto;
    bottom:10px;
    width:auto;
    max-height:88vh;
    transform:none;
  }
  .settings-menu.profile-mode .profile-panel{
    grid-template-columns:1fr;
    gap:0;
  }
  .settings-menu.profile-mode .profile-panel h3,
  .settings-menu.profile-mode .profile-panel #phoneHelp,
  .settings-menu.profile-mode .profile-panel #profileMsg,
  .settings-menu.profile-mode .profile-panel .profile-field-wide{
    grid-column:auto;
  }
}

/* Patch 013: reviews and coach-aware session cards */
.collapsible details>summary{display:flex;align-items:center;justify-content:space-between;gap:10px;cursor:pointer;list-style:none;font-weight:850}.collapsible details>summary::-webkit-details-marker{display:none}.collapsible details>summary:after{content:'⌄';font-size:18px;transition:.2s}.collapsible details[open]>summary:after{transform:rotate(180deg)}.collapsible details>summary small{margin-left:auto;margin-right:8px}.row-main{min-width:0;flex:1}.session-row{align-items:center}.coach-mini{width:44px;height:58px;border-radius:13px;object-fit:cover;flex:0 0 auto;background:#e9e9e7}.review-button{background:#fff7e9!important;color:#b84100!important;border:1px solid rgba(244,81,8,.22)!important}.review-modal{position:fixed;z-index:41;left:50%;top:50%;transform:translate(-50%,-50%);width:min(460px,calc(100% - 28px));padding:18px;border-radius:26px;background:rgba(250,250,249,.88);border:1px solid rgba(255,255,255,.75);box-shadow:0 28px 90px rgba(20,20,24,.25);backdrop-filter:blur(30px) saturate(155%)}.review-modal label{display:grid;gap:7px;font-weight:750}.review-modal textarea{width:100%;border:1px solid rgba(20,20,24,.1);border-radius:15px;padding:12px;background:rgba(255,255,255,.62);resize:vertical}.review-stars{display:flex;justify-content:center;gap:6px;margin:18px 0}.review-stars button{border:0;background:transparent;color:#c8c8c5;font-size:34px;padding:2px;cursor:pointer;line-height:1}.review-stars button.active{color:#f4b400}.review-modal>.primary{width:100%;margin-top:14px}.review-modal small{display:block;margin-top:8px;text-align:center}.row button{flex:0 0 auto}
@media(max-width:640px){.review-modal{left:10px;right:10px;bottom:calc(10px + env(safe-area-inset-bottom));top:auto;transform:none;width:auto;border-radius:28px}.session-row{display:grid;grid-template-columns:44px 1fr}.session-row>button{grid-column:1/-1;width:100%}.row:not(.session-row){flex-wrap:wrap}.row:not(.session-row) .row-main{flex-basis:100%}}

/* Patch 015: square member profile photo and production-sized profile editor */
.avatar{
  border-radius:10px;
  overflow:hidden;
  background-position:center;
  background-size:cover;
  background-repeat:no-repeat;
  flex:0 0 auto;
}
.avatar.has-photo span,
.profile-photo-preview.has-photo span{display:none}
.profile-photo-editor{
  display:grid;
  grid-template-columns:88px minmax(0,1fr);
  gap:14px;
  align-items:center;
  padding:12px;
  border:1px solid var(--line);
  border-radius:18px;
  background:rgba(255,255,255,.42);
}
.profile-photo-preview{
  width:88px;
  aspect-ratio:1;
  border-radius:18px;
  display:grid;
  place-items:center;
  overflow:hidden;
  background:linear-gradient(135deg,#dff77e,#9ed900);
  background-position:center;
  background-size:cover;
  background-repeat:no-repeat;
  font-size:28px;
  font-weight:950;
}
.photo-picker{
  display:inline-flex!important;
  width:auto;
  align-items:center;
  justify-content:center;
  margin:8px 0 5px!important;
  padding:9px 12px;
  border-radius:13px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.68);
  color:#111;
  cursor:pointer;
}
.photo-picker input{display:none}
.profile-photo-editor small{display:block;line-height:1.4}
@media(min-width:780px){
  .settings-menu.profile-mode{width:min(820px,calc(100vw - 56px))}
}
@media(max-width:520px){
  .profile-photo-editor{grid-template-columns:72px minmax(0,1fr);padding:10px}
  .profile-photo-preview{width:72px;border-radius:16px}
}

/* Patch 018: password/OTP segmented login and reset flow */
.auth-method{display:grid;grid-template-columns:1fr 1fr;gap:4px;padding:4px;margin:14px 0 6px;border:1px solid var(--line);border-radius:16px;background:rgba(255,255,255,.42)}
.auth-method button{min-height:40px;padding:8px 10px;border-radius:12px;background:transparent;color:var(--muted)}
.auth-method button.active{background:rgba(255,255,255,.9);color:var(--text);box-shadow:0 4px 14px rgba(24,24,27,.08)}
.reset-card{width:min(520px,100%);margin:40px auto 0}
.reset-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:12px}.reset-actions button{width:100%}
button[disabled]{opacity:.58;cursor:wait;pointer-events:none}
@media(max-width:430px){.reset-actions{grid-template-columns:1fr}}

#passwordPanel{grid-template-columns:1fr}.exclusive-chip{display:inline-flex;padding:3px 8px;border-radius:999px;background:rgba(126,34,206,.12);color:#7e22ce;font-size:11px;font-weight:800}

/* PATCH 026 EX — iOS/WWDC26-inspired member experience */
:root{--bg:#f5f5f7;--surface:#fff;--surface-secondary:#f0f0f3;--glass:rgba(252,252,253,.82);--text:#1d1d1f;--muted:#6e6e73;--line:rgba(60,60,67,.14);--blue:#007aff;--orange:#ff6b2c;--green:#30a46c;--yellow:#c78500;--danger:#d70015;--focus:rgba(0,122,255,.32);font-family:-apple-system,BlinkMacSystemFont,"SF Pro Text","SF Pro Display","Noto Sans Thai","Segoe UI",sans-serif;background:var(--bg);color:var(--text)}
html{min-height:100%;background:var(--bg);scroll-behavior:smooth}body.member-app{min-height:100%;background:radial-gradient(circle at 85% -5%,rgba(0,122,255,.1),transparent 27rem),var(--bg);font-size:15px;line-height:1.45;letter-spacing:-.012em}button,input,select,textarea{-webkit-tap-highlight-color:transparent}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible{outline:3px solid var(--focus);outline-offset:2px}
.phone-shell{width:100%;max-width:520px;padding:calc(8px + env(safe-area-inset-top)) 16px calc(118px + env(safe-area-inset-bottom))}.top{position:sticky;top:0;z-index:20;height:64px;margin:0 -8px 8px;padding:8px;border-radius:0 0 22px 22px;background:rgba(245,245,247,.72);backdrop-filter:blur(24px) saturate(180%);-webkit-backdrop-filter:blur(24px) saturate(180%)}.top small{font-size:12px;line-height:1.2}.top b{font-size:15px;line-height:1.3}.avatar{width:42px;height:42px;border-radius:14px;background:#dbeafe;color:#075bb5;font-weight:800}.settings-btn{width:44px;height:44px;border-radius:50%;border:1px solid var(--line);background:rgba(255,255,255,.76);box-shadow:0 5px 18px rgba(0,0,0,.06)}
.glass-card,.hero-card{margin:12px 0;padding:20px;border:1px solid var(--line);border-radius:24px;background:var(--surface);box-shadow:0 1px 2px rgba(0,0,0,.03),0 12px 30px rgba(0,0,0,.035);backdrop-filter:none}.hero-card{position:relative;isolation:isolate;overflow:hidden;min-height:154px;align-items:flex-end;background:#1c1c1e;color:#fff;border-color:transparent;box-shadow:0 18px 38px rgba(0,45,110,.15)}.hero-card:after{content:"";position:absolute;z-index:-1;width:220px;height:220px;right:-65px;top:-90px;border-radius:50%;background:radial-gradient(circle at 40% 40%,#5ac8fa,#0a84ff 55%,transparent 70%);opacity:.9}.hero-card p{font-size:13px;color:rgba(255,255,255,.72)}.hero-card h1{margin:6px 0 2px;font-size:clamp(27px,8vw,36px);line-height:1.06;letter-spacing:-.045em}.hero-card #memberCode{color:rgba(255,255,255,.7);font-variant-numeric:tabular-nums}.hero-card .badge{align-self:flex-start;background:rgba(255,255,255,.16);border:1px solid rgba(255,255,255,.2);padding:6px 10px;font-size:11px}
.activity-card h2,.glass-card h2{font-size:20px;letter-spacing:-.025em}.rings{gap:8px}.ring{height:90px;border:0;border-radius:18px;background:var(--surface-secondary);overflow:visible;align-content:center;gap:2px}.ring:before{display:none}.ring b{font-size:23px;font-weight:750;color:var(--text);font-variant-numeric:tabular-nums}.ring span{align-self:auto;margin:0;color:var(--muted);font-size:11px}.ring.orange{box-shadow:inset 0 3px 0 var(--orange)}.ring.green{box-shadow:inset 0 3px 0 var(--green)}.ring.yellow{box-shadow:inset 0 3px 0 var(--yellow)}#eligibilityText{min-height:22px;margin:16px 0 6px;padding:10px 12px;border-radius:14px;background:#eef7ff;color:#075bb5;font-weight:650}
label{font-weight:650;color:#3a3a3c}input,select,textarea{min-height:50px;margin-top:7px;padding:13px 14px;border:1px solid var(--line);border-radius:14px;background:var(--surface-secondary);color:var(--text);font-size:16px;transition:border-color .16s,box-shadow .16s,background .16s}textarea{min-height:92px;resize:vertical}input:focus,select:focus,textarea:focus{border-color:var(--blue);background:var(--surface);box-shadow:0 0 0 4px rgba(0,122,255,.1)}input[readonly]{color:var(--muted);background:#e9e9ed}.primary,button{min-height:44px;border-radius:14px;font-weight:700}.primary{background:var(--blue);color:#fff;box-shadow:none}.primary:active{background:#0062cc;transform:scale(.985)}.big{min-height:58px;margin-top:12px;font-size:18px}.ghost,.auth-actions button{background:var(--surface-secondary);color:var(--text);border:1px solid var(--line)}
.auth-card,#register,#resetPassword{max-width:440px;margin:clamp(24px,10vh,84px) auto 0;padding:24px}.auth-card h1,#register h2,#resetPassword h2{margin:0;font-size:29px;line-height:1.1;letter-spacing:-.04em}.auth-card>p{margin:8px 0 20px;color:var(--muted)}.auth-actions{gap:8px}.auth-actions button{min-height:46px}.row{padding:14px;border:1px solid var(--line);border-radius:17px;background:var(--surface-secondary);box-shadow:none}.row b{font-size:15px}.row small{display:block;margin-top:4px;line-height:1.52}.row button{min-height:42px;background:var(--text);border-radius:12px}.collapsible{padding:4px 18px}.collapsible details>summary{min-height:58px;padding:8px 0;font-size:16px}.collapsible details[open]>summary{border-bottom:1px solid var(--line);margin-bottom:12px}.coach-mini{width:50px;height:62px;border-radius:16px}.exclusive-chip{background:#f0e9ff;color:#6630b8}
.member-dock{position:fixed;z-index:35;left:50%;bottom:calc(10px + env(safe-area-inset-bottom));transform:translateX(-50%);display:grid;grid-template-columns:repeat(3,minmax(72px,1fr));gap:4px;width:min(340px,calc(100% - 28px));padding:7px;border:1px solid rgba(255,255,255,.72);border-radius:25px;background:rgba(247,247,249,.82);box-shadow:0 16px 42px rgba(0,0,0,.16);backdrop-filter:blur(28px) saturate(180%);-webkit-backdrop-filter:blur(28px) saturate(180%)}.member-dock button{display:grid;justify-items:center;gap:2px;min-height:52px;padding:5px 8px;border-radius:18px;background:transparent;color:var(--muted);font-size:10px;font-weight:650}.member-dock button.active,.member-dock button:active{background:rgba(0,122,255,.1);color:var(--blue)}.member-dock svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}.member-dock .dock-checkin{color:var(--blue)}
.settings-overlay{background:rgba(0,0,0,.26);backdrop-filter:blur(3px)}.settings-menu{inset:0;max-height:none;padding:calc(12px + env(safe-area-inset-top)) 18px calc(18px + env(safe-area-inset-bottom));border:0;border-radius:0;background:var(--bg);box-shadow:none;backdrop-filter:none;overflow:auto}.settings-head{position:sticky;top:calc(-12px - env(safe-area-inset-top));z-index:2;margin:calc(-12px - env(safe-area-inset-top)) -18px 10px;padding:calc(14px + env(safe-area-inset-top)) 18px 12px;background:rgba(245,245,247,.88);border-bottom:1px solid var(--line);backdrop-filter:blur(22px)}.settings-head b{font-size:22px;letter-spacing:-.03em}.close-x{border-radius:50%!important;background:var(--surface-secondary)!important;color:var(--text)!important}#settingsList{display:grid;gap:10px;max-width:520px;margin:28px auto}.settings-menu #settingsList button{min-height:54px;margin:0;text-align:left;padding:0 16px;background:var(--surface);border-color:var(--line);font-size:16px}.settings-menu #settingsList button:after{content:"›";float:right;color:var(--muted);font-size:22px;font-weight:400}.settings-menu #settingsList .danger-menu{text-align:center;color:var(--danger);background:var(--surface)}.settings-menu #settingsList .danger-menu:after{content:""}.settings-menu.profile-mode .profile-panel{display:grid;grid-template-columns:1fr;gap:4px;max-width:620px;margin:0 auto;padding-bottom:24px}.profile-panel h3{font-size:28px;letter-spacing:-.04em}.profile-photo-editor{grid-template-columns:78px 1fr;padding:14px;background:var(--surface);border-radius:20px}.profile-photo-preview{width:78px;border-radius:21px;background:#dbeafe;color:#075bb5}.photo-picker{min-height:42px;background:var(--surface-secondary);color:var(--text)}.settings-menu.profile-mode .profile-panel #saveProfileBtn,.settings-menu.profile-mode .profile-panel #backSettingsBtn{min-height:52px;margin-top:8px}
.review-modal,.dialog{background:rgba(252,252,253,.94);border:1px solid rgba(255,255,255,.8);box-shadow:0 24px 80px rgba(0,0,0,.24)}.cookie{bottom:calc(88px + env(safe-area-inset-bottom));border-radius:18px;background:rgba(28,28,30,.92)}button[disabled]{opacity:.48}.is-busy{position:relative;color:transparent!important}.is-busy:after{content:"";position:absolute;inset:0;margin:auto;width:20px;height:20px;border:2px solid rgba(255,255,255,.45);border-top-color:#fff;border-radius:50%;animation:member-spin .7s linear infinite}@keyframes member-spin{to{transform:rotate(360deg)}}
@media(min-width:780px){.phone-shell{max-width:940px;padding-inline:28px}.top{margin-inline:0;padding-inline:4px;background:transparent;backdrop-filter:none}#portal:not(.hidden){display:grid;grid-template-columns:minmax(0,1.05fr) minmax(340px,.95fr);gap:16px;align-items:start}#portal .hero-card{grid-column:1/-1;margin-bottom:0}.activity-card{grid-row:2/span 3}.collapsible{margin:0}.settings-menu,.settings-menu.profile-mode{left:50%;right:auto;top:50%;bottom:auto;width:min(720px,calc(100vw - 48px));max-height:calc(100vh - 48px);transform:translate(-50%,-50%);border:1px solid var(--line);border-radius:28px;padding:20px;background:var(--bg);box-shadow:0 30px 100px rgba(0,0,0,.22)}.settings-head{top:-20px;margin:-20px -20px 10px;padding:20px;border-radius:28px 28px 0 0}}
@media(max-width:390px){.phone-shell{padding-inline:12px}.glass-card,.hero-card{padding:17px;border-radius:22px}.rings{gap:6px}.ring{height:84px}.auth-card,#register,#resetPassword{padding:20px}.hero-card h1{font-size:25px}}@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}@media(prefers-color-scheme:dark){:root{--bg:#000;--surface:#1c1c1e;--surface-secondary:#2c2c2e;--glass:rgba(28,28,30,.82);--text:#f5f5f7;--muted:#aeaeb2;--line:rgba(255,255,255,.13);--focus:rgba(10,132,255,.44);--blue:#0a84ff}body.member-app{background:radial-gradient(circle at 85% -5%,rgba(10,132,255,.2),transparent 27rem),#000}.top,.settings-head{background:rgba(0,0,0,.7)}.settings-btn{background:rgba(44,44,46,.76)}.hero-card{background:#1c1c1e}.member-dock{background:rgba(28,28,30,.82);border-color:rgba(255,255,255,.12)}#eligibilityText{background:rgba(10,132,255,.14);color:#64d2ff}input[readonly]{background:#242426}.dialog,.review-modal{background:rgba(28,28,30,.96)}.photo-picker{color:var(--text)}}

/* PATCH 026 EX2 — production circular controls */
.settings-btn{
  box-sizing:border-box!important;
  display:grid!important;
  place-items:center!important;
  flex:0 0 44px!important;
  width:44px!important;
  min-width:44px!important;
  max-width:44px!important;
  height:44px!important;
  min-height:44px!important;
  max-height:44px!important;
  aspect-ratio:1/1;
  padding:0!important;
  border-radius:50%!important;
  line-height:1!important;
}
.settings-btn .ellipsis-glyph{
  display:flex!important;
  align-items:center;
  justify-content:center;
  gap:3px;
  width:18px;
  height:10px;
  transform:none!important;
  letter-spacing:normal!important;
}
.settings-btn .ellipsis-glyph i{display:block;width:4px;height:4px;border-radius:50%;background:currentColor}
.close-x{
  box-sizing:border-box!important;
  display:grid!important;
  place-items:center!important;
  flex:0 0 40px!important;
  width:40px!important;
  min-width:40px!important;
  max-width:40px!important;
  height:40px!important;
  min-height:40px!important;
  max-height:40px!important;
  aspect-ratio:1/1!important;
  margin:0!important;
  padding:0!important;
  border-radius:50%!important;
  font-size:21px!important;
  font-weight:500!important;
  line-height:1!important;
}
.settings-head>.close-x{align-self:center}

@media(max-width:390px){
  .settings-btn{flex-basis:42px!important;width:42px!important;min-width:42px!important;max-width:42px!important;height:42px!important;min-height:42px!important;max-height:42px!important}
  .close-x{flex-basis:38px!important;width:38px!important;min-width:38px!important;max-width:38px!important;height:38px!important;min-height:38px!important;max-height:38px!important}
}

/* PATCH 026 EX3 — optically centered close control and resilient mobile assets */
.close-glyph{position:relative!important;display:block!important;flex:0 0 16px!important;width:16px!important;height:16px!important;font-size:0!important;line-height:0!important;transform:none!important}
.close-glyph:before,.close-glyph:after{content:"";position:absolute;left:50%;top:50%;width:14px;height:1.75px;border-radius:999px;background:currentColor;transform-origin:center}
.close-glyph:before{transform:translate(-50%,-50%) rotate(45deg)}
.close-glyph:after{transform:translate(-50%,-50%) rotate(-45deg)}
.close-x{box-sizing:border-box!important;display:grid!important;place-items:center!important;flex:0 0 40px!important;width:40px!important;min-width:40px!important;max-width:40px!important;height:40px!important;min-height:40px!important;max-height:40px!important;aspect-ratio:1/1!important;margin:0!important;padding:0!important;border-radius:50%!important;font-size:0!important;line-height:0!important;transform:none!important}
.settings-head{display:grid;grid-template-columns:minmax(0,1fr) 40px;align-items:center;gap:12px}
.settings-head>.close-x{justify-self:end;align-self:center}
.avatar,.profile-photo-preview{background-position:center;background-size:cover;background-repeat:no-repeat}
.avatar:not(.has-photo) #avatarFallback,.profile-photo-preview:not(.has-photo) #profilePhotoFallback{display:grid}
.coach-mini[hidden]{display:none!important}
button:not(.close-x),input,select,textarea,.row,.glass-card,.hero-card{min-width:0;max-width:100%}
.row-main{min-width:0;overflow-wrap:anywhere}

@media(max-width:430px){
  .phone-shell{width:100%;max-width:100%;overflow-x:hidden}
  .settings-menu{width:100%;max-width:100%;overflow-x:hidden}
  .settings-head{grid-template-columns:minmax(0,1fr) 40px}
  .settings-menu.profile-mode .profile-panel{width:100%;min-width:0}
  .profile-photo-editor{grid-template-columns:78px minmax(0,1fr);width:100%;min-width:0}
  .profile-photo-editor>*{min-width:0;max-width:100%}
  .photo-picker{width:100%;overflow:hidden}
  .session-row{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:10px}
  .session-row>button{min-width:64px;max-width:96px;padding-inline:10px}
}

@media(max-width:350px){
  .close-x{flex-basis:38px!important;width:38px!important;min-width:38px!important;max-width:38px!important;height:38px!important;min-height:38px!important;max-height:38px!important}
  .settings-head{grid-template-columns:minmax(0,1fr) 38px}
  .profile-photo-editor{grid-template-columns:minmax(0,1fr)}
  .session-row{grid-template-columns:auto minmax(0,1fr)}
  .session-row>button{grid-column:1/-1;width:100%;max-width:none}
}

/* PATCH 026 EX4 — authenticated loading shell and complete save feedback */
.member-busy{position:fixed;inset:0;z-index:120;display:grid;place-items:center;padding:18px;background:rgba(245,245,247,.76);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px)}
.member-busy.hidden{display:none!important}
.member-busy-card{display:grid;justify-items:center;gap:9px;width:min(340px,100%);padding:23px;border:1px solid rgba(255,255,255,.82);border-radius:24px;background:rgba(255,255,255,.94);box-shadow:0 24px 80px rgba(0,0,0,.16);text-align:center}
.member-busy-card strong{font-size:16px;color:#1d1d1f}
.member-busy-card small{color:#6e6e73}
.member-spinner{box-sizing:border-box;width:34px;height:34px;border:3px solid rgba(99,99,102,.18);border-top-color:var(--blue);border-radius:50%;animation:member-spin .72s linear infinite}
body.is-member-busy{overflow:hidden;cursor:progress}
body.is-member-busy>.phone-shell,body.is-member-busy>.member-dock,body.is-member-busy>.settings-menu,body.is-member-busy>.review-modal{pointer-events:none;user-select:none}
button.is-busy{cursor:progress!important;opacity:.68}
@keyframes member-spin{to{transform:rotate(360deg)}}
@media(max-width:520px){.member-busy{align-items:end;padding:12px 12px calc(12px + env(safe-area-inset-bottom))}.member-busy-card{padding:20px;border-radius:22px}}
@media(prefers-color-scheme:dark){.member-busy{background:rgba(0,0,0,.72)}.member-busy-card{background:rgba(28,28,30,.96);border-color:rgba(255,255,255,.13)}.member-busy-card strong{color:#f5f5f7}.member-busy-card small{color:#aeaeb2}}

/* PATCH 026 EX4 FIX — auth-gated controls must stay hidden during logged-out state */
.settings-btn.hidden{display:none!important}
#memberDock.hidden{display:none!important}
