/* Everwell Mynds: member profile (app/profile.html) and settings (app/settings.html).
   Classes start with pf- (profile) or set- (settings) so they do not touch other pages.
   The display settings at the bottom apply on every page. */

/* ---------- page head ---------- */
.pf-head{display:flex;align-items:center;justify-content:space-between;gap:16px}
.pf-head h1{font-size:clamp(34px,4.4vw,48px);letter-spacing:-.8px}
.pf-head h1 i{color:var(--accent)}
.pf-head-actions{display:flex;align-items:center;gap:10px}
.pf-top-actions{display:none}
.set-head-actions .app-actions{display:flex}
.pf-back{margin-top:12px;min-height:44px;display:inline-flex;align-items:center;gap:6px;font-weight:600;color:var(--accent-deep)}
.pf-back svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}

/* ---------- profile card ---------- */
.pf-card{margin-top:20px;padding:24px}
.pf-top{display:flex;flex-wrap:wrap;align-items:center;gap:16px}
.pf-photo{width:72px;height:72px;flex:none;border-radius:50%;background:var(--ink);color:var(--paper);display:flex;align-items:center;justify-content:center;font-family:var(--serif);font-size:28px;line-height:1}
.pf-photo-stone{background:var(--stone);color:var(--ink)}
.pf-who{flex:1 1 200px;min-width:0}
.pf-name{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px}
.pf-name h2{font-size:32px;line-height:1.1;overflow-wrap:anywhere}
.pf-handle{margin-top:4px;display:flex;flex-wrap:wrap;align-items:center;gap:4px 12px;font-size:15px;line-height:20px;color:var(--muted)}
.pf-btns{display:flex;flex-wrap:wrap;gap:8px}
.pf-btns .btn{height:44px}
.pf-bio{margin-top:16px;max-width:56ch;overflow-wrap:anywhere}
.pf-stats{margin:16px 0 0;padding:16px 0 0;border-top:1px solid var(--hair);display:flex;flex-wrap:wrap;gap:8px 32px}
.pf-stats div{display:flex;align-items:baseline;gap:8px;font-size:15px;color:var(--muted)}
.pf-stats dt{order:2}
.pf-stats dd{margin:0;font-family:var(--serif);font-size:30px;line-height:1;color:var(--ink)}
.pf-stats-note{margin-top:8px;font-size:13px;line-height:18px;color:var(--muted)}
.pf-follow-btn{min-width:112px}
.pf-follow-btn.btn-light{color:var(--ink)}

/* ---------- small "More" links on phones ---------- */
.pf-more{display:none;margin-top:16px;padding:16px}
.pf-more h2{font-family:var(--sans);font-size:12px;line-height:16px;font-weight:700;letter-spacing:1.2px;text-transform:uppercase;color:var(--muted)}
.pf-more ul{margin:12px 0 0;padding:0;list-style:none;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.pf-more a{min-height:48px;padding:0 10px;border:1px solid var(--hair);border-radius:10px;display:flex;align-items:center;gap:6px;font-size:14px;line-height:18px;font-weight:600}
.pf-more svg{width:18px;height:18px;flex:none;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}

/* ---------- tabs with a small count next to each label ---------- */
.pf-tabs{margin-top:24px}
.pf-tabbar{display:flex;align-items:stretch;gap:0 24px;border-bottom:1px solid var(--hair);overflow-x:auto;scrollbar-width:none}
.pf-tabbar::-webkit-scrollbar{display:none}
.pf-tablist{display:flex;gap:0 24px}
.pf-tab{flex:none;height:46px;padding:0;border:0;border-bottom:3px solid transparent;background:none;color:var(--muted);font-size:16px;font-weight:500;display:inline-flex;align-items:center;gap:6px;white-space:nowrap}
.pf-tab[aria-selected="true"]{border-bottom-color:var(--accent);color:var(--ink);font-weight:600}
.pf-tab-link:hover{color:var(--ink)}
.pf-n{min-width:22px;height:20px;padding:0 6px;border-radius:10px;background:var(--stone);color:var(--ink);font-size:12px;line-height:20px;font-weight:700;text-align:center}
.pf-tab[aria-selected="true"] .pf-n{background:var(--ink);color:#fff}
.pf-list{margin-top:16px;display:flex;flex-direction:column;gap:16px}

/* ---------- right side ---------- */
.pf-side{padding:20px 24px 24px}
.pf-side h2{font-size:24px;line-height:1.1;letter-spacing:0}
.pf-side h2 i{color:var(--accent)}
.pf-streak{margin-top:12px;display:flex;align-items:baseline;gap:8px}
.pf-streak b{font-family:var(--serif);font-weight:400;font-size:40px;line-height:1}
.pf-streak span{font-size:15px;line-height:20px;font-weight:600}
.pf-week{margin:16px 0 0;padding:0;list-style:none;display:flex;justify-content:space-between;gap:4px}
.pf-week li{display:flex;flex-direction:column;align-items:center;gap:6px;font-size:12px;line-height:14px;font-weight:600;color:var(--muted)}
.pf-week i{width:30px;height:30px;border-radius:50%;border:1px solid var(--hair);background:var(--paper);display:flex;align-items:center;justify-content:center;font-style:normal}
.pf-week .done i{border-color:var(--stone);background:var(--stone);color:var(--ink)}
.pf-week .today{color:var(--ink)}
.pf-week .today i{border-color:var(--ink);background:var(--ink);color:#fff}
.pf-week svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2.6;stroke-linecap:round;stroke-linejoin:round}
.pf-people{margin:12px 0 0;padding:0;list-style:none}
.pf-people li{padding:10px 0;display:flex;align-items:center;justify-content:space-between;gap:10px}
.pf-people li+li{border-top:1px solid var(--hair)}
.pf-person{min-width:0;min-height:44px;display:flex;align-items:center;gap:10px}
.pf-person b{display:block;font-weight:600;font-size:15px}
.pf-person small{display:block;font-size:13px;line-height:18px;color:var(--muted)}
.pf-people .pf-follow-btn{min-width:100px;height:40px;padding:0 14px;font-size:14px}
.pf-active-name{margin-top:12px;font-size:16px;line-height:22px;font-weight:600}
.pf-active-row{margin-top:8px;display:flex;align-items:baseline;justify-content:space-between;gap:12px;font-size:13px;line-height:18px}
.pf-active-row b{font-weight:700;color:var(--accent-deep)}
.pf-active-row span{color:var(--muted)}
.pf-bar{margin-top:8px;height:8px;border-radius:4px;background:var(--stone);overflow:hidden}
.pf-bar span{display:block;width:12.4%;height:8px;border-radius:4px;background:var(--ink)}
.pf-side .btn-block{margin-top:16px}

/* ---------- settings ---------- */
.set-main{max-width:760px}
.set-device-note{margin-top:12px;padding:10px 14px;border-radius:10px;background:var(--stone);font-size:14px;line-height:20px}
.set-jump{margin-top:16px;display:flex;gap:8px;overflow-x:auto;scrollbar-width:none;padding-bottom:2px}
.set-jump::-webkit-scrollbar{display:none}
.set-jump a{flex:none;height:40px;padding:0 14px;border:1px solid var(--hair);border-radius:20px;background:var(--card);display:inline-flex;align-items:center;font-size:14px;font-weight:600}
.set-jump a:hover{border-color:var(--ink);color:var(--ink)}
.set-stack{margin-top:16px;display:flex;flex-direction:column;gap:16px}
.set-card{padding:22px 24px 24px;scroll-margin-top:20px}
.set-card h2{font-size:28px;line-height:1.1}
.set-card h3{font-family:var(--sans);font-size:16px;line-height:22px;font-weight:700;letter-spacing:0}
.set-plain{margin-top:6px;font-size:15px;line-height:22px;color:var(--muted)}
.set-form{display:flex;flex-direction:column;gap:14px;margin-top:16px}
.set-form .input{height:48px;background:var(--paper)}
.set-form textarea.input{height:auto;padding:12px 14px;line-height:1.45;resize:vertical}
.set-form .input[aria-invalid="true"]{border-color:var(--accent-deep);box-shadow:inset 0 0 0 1px var(--accent-deep)}
.set-help{font-size:13px;line-height:18px;color:var(--muted);font-weight:400}
.set-error{padding:8px 12px;border-radius:10px;background:var(--accent-wash);color:var(--accent-deep);font-size:14px;line-height:20px;font-weight:600}
.set-note{margin-top:12px;padding:10px 12px;border-radius:10px;background:var(--stone);font-size:14px;line-height:20px}
.set-form .set-note{margin-top:0}
.set-btns{display:flex;flex-wrap:wrap;gap:8px}
.set-sub{margin-top:24px;padding-top:20px;border-top:1px solid var(--hair)}
.set-photo-row{margin-top:16px;display:flex;align-items:center;gap:16px}
.set-photo-text{display:flex;flex-direction:column;align-items:flex-start;gap:4px;font-size:14px;color:var(--muted)}
.set-photo-text b{font-size:15px;color:var(--ink)}
.set-photo-text .btn{margin-top:6px;height:40px}
.set-plan{margin-top:10px;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px 16px}
.set-plan b{display:block;font-weight:600}
.set-plan div>span{display:block;margin-top:2px;font-size:14px;line-height:20px;color:var(--muted)}
.set-rows{margin-top:12px;display:flex;flex-direction:column}
.set-row{min-height:56px;padding:6px 0;border-bottom:1px solid var(--hair);display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:16px;line-height:1.35;font-weight:500}
.set-row:last-child{border-bottom:0}
.set-row small{display:block;margin-top:2px;font-size:13px;line-height:18px;font-weight:400;color:var(--muted)}
.set-switch{width:52px;height:44px;flex-shrink:0;padding:0;border:0;background:none;display:flex;align-items:center;justify-content:flex-end}
.set-switch span{width:48px;height:28px;padding:2px;border:1px solid var(--muted);border-radius:14px;background:var(--hair);display:flex;align-items:center;transition:background .15s}
.set-switch span::after{content:"";width:22px;height:22px;border-radius:50%;background:#fff;box-shadow:var(--lift-sm);transition:transform .15s}
.set-switch[aria-checked="true"] span{background:var(--ink);border-color:var(--ink)}
.set-switch[aria-checked="true"] span::after{transform:translateX(20px)}
.set-choices{margin:16px 0 0;padding:0;border:0;display:flex;flex-direction:column;gap:8px;min-width:0}
.set-choices legend{padding:0;margin-bottom:8px;font-size:13px;line-height:18px;font-weight:600}
.set-choices-row{flex-direction:row;flex-wrap:wrap}
.set-choices-row .set-choice{flex:1 1 120px}
.set-choice{position:relative;min-height:56px;padding:8px 14px;border:1px solid var(--hair);border-radius:10px;background:var(--card);display:flex;align-items:center;gap:12px;cursor:pointer}
.set-choice input{width:20px;height:20px;flex:none;margin:0;accent-color:var(--ink)}
.set-choice span{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.set-choice b{font-size:15px;line-height:20px;font-weight:600}
.set-choice small{font-size:13px;line-height:18px;color:var(--muted)}
.set-choice:has(input:checked){border-color:var(--ink);box-shadow:inset 0 0 0 1px var(--ink)}
.set-choice:has(input:focus-visible){outline:3px solid #2B5FA8;outline-offset:2px}
.set-big1{font-size:17px!important}
.set-big2{font-size:19px!important}
.set-out{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px}
.set-link{min-height:44px;display:inline-flex;align-items:center;font-weight:600;color:var(--accent-deep);text-decoration:underline;text-underline-offset:3px}
.set-saved{position:fixed;left:50%;bottom:28px;z-index:40;margin:0;padding:10px 16px;border-radius:22px;background:var(--ink);color:#fff;font-size:14px;font-weight:600;box-shadow:var(--lift-ink);transform:translate(-50%,12px);opacity:0;pointer-events:none;transition:opacity .2s,transform .2s}
.set-saved.is-on{opacity:1;transform:translate(-50%,0)}
.set-saved:empty{padding:0}

/* ---------- sizes ---------- */
@media (max-width:1220px){
  .pf-top-actions{display:block}
  body[data-page="app/profile"] .app-rail .app-actions{display:none}
}
@media (max-width:980px){
  .pf-more{display:block}
  .set-saved{bottom:calc(92px + env(safe-area-inset-bottom,0px))}
  .set-main{max-width:none}
}
@media (max-width:640px){
  .pf-card{padding:16px}
  .pf-photo{width:60px;height:60px;font-size:24px}
  .pf-name h2{font-size:28px}
  .pf-btns{flex:1 1 100%}
  .pf-btns .btn{flex:1 1 0;padding:0 12px}
  .pf-tabbar,.pf-tablist{gap:0 16px}
  .pf-tab{font-size:15px}
  .pf-side{padding:16px 16px 20px}
  .set-card{padding:18px 16px 20px}
  .set-card h2{font-size:26px}
  .set-out .btn{flex:1 1 100%}
}

/* ---------- real data states ---------- */
.pf-loading{margin-top:20px;color:var(--muted);font-size:15px}
.pf-empty{margin-top:16px;padding:22px 24px;display:flex;flex-direction:column;align-items:flex-start;gap:8px}
.pf-empty h2{font-size:26px;line-height:1.1}
.pf-empty h2 i{color:var(--accent)}
.pf-empty p{max-width:52ch;color:var(--muted)}
.pf-empty .btn{margin-top:6px}
.pf-list .pf-empty{margin-top:0}
.pf-private .lock-ico{width:40px;height:40px;border-radius:50%;background:var(--stone);display:flex;align-items:center;justify-content:center}
.pf-private .lock-ico svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.pf-bio-empty{color:var(--muted);font-size:15px}
.pf-bio-empty a{color:var(--accent-deep);text-decoration:underline;text-underline-offset:3px}
.pf-msg{margin-top:12px;padding:8px 12px;border-radius:10px;background:var(--accent-wash);color:var(--accent-deep);font-size:14px;line-height:20px;font-weight:600}
.pf-photo img{display:block}
.pf-list-inner{display:flex;flex-direction:column;gap:16px}
.pf-list-inner:empty{display:none}
.pf-more-btn{align-self:center;height:44px}
.pf-post-focus{box-shadow:0 0 0 2px var(--accent)}
.pf-att-photo,.pf-att-video{display:block;max-width:100%;max-height:520px;border-radius:12px;background:var(--stone);object-fit:cover}
.pf-att-file{font-weight:600;color:var(--accent-deep);text-decoration:underline;text-underline-offset:3px}
.pf-requests{margin-top:16px;padding:20px 24px}
.pf-requests h2{font-size:24px;line-height:1.1}
.pf-requests h2 i{color:var(--accent)}
.pf-req-help{margin-top:4px;font-size:14px;color:var(--muted)}
.pf-requests .pf-people li{flex-wrap:wrap}
.pf-req-btns{display:flex;gap:8px}
.pf-req-btns .btn{height:40px;padding:0 14px;font-size:14px}
.pf-req-done{font-size:14px;font-weight:600;color:var(--muted)}
.pf-req-err{flex-basis:100%;color:var(--accent-deep);font-size:13px;font-weight:600}
.set-error.is-ok,.set-note.is-ok{background:var(--stone);color:var(--ink)}
.set-photo-row .pf-photo img{width:100%;height:100%;border-radius:50%;object-fit:cover}
@media (max-width:640px){.pf-requests,.pf-empty{padding:16px}}

/* ---------- display settings (Settings > Display), every page ---------- */
html[data-ewm-text="large"] body{zoom:1.1}
html[data-ewm-text="larger"] body{zoom:1.2}
html[data-ewm-motion="reduce"]{scroll-behavior:auto}
html[data-ewm-motion="reduce"] *,html[data-ewm-motion="reduce"] *::before,html[data-ewm-motion="reduce"] *::after{animation:none!important;transition:none!important}
