/* Account pages (/signup, /login, /profile).
   Sizes use --u = one pixel of the client's 816px-wide reference screenshot, so the profile
   keeps the same proportions at any width. Small text has a readable floor via max(). */
:root{
  --bg:#141414;--surface:#2b2b2b;--surface-2:#202020;--line:#525252;--divider:#2d2d2d;
  --text:#fff;--muted:#8d8d8d;--icon:#8a8a8a;--red:#d7323f;--red-h:#e5434f;
  --u:min(calc(100vw / 816), calc(600px / 816));
  --sans:"Open Sans",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  --display:"Poppins",var(--sans);
  --btn-font:max(12.5px, calc(19 * var(--u)));
}
*{box-sizing:border-box;margin:0;padding:0}
html,body{background:var(--bg);color:var(--text);font-family:var(--sans);-webkit-font-smoothing:antialiased;-webkit-tap-highlight-color:transparent}
body{min-height:100vh;min-height:100dvh}
a{color:inherit}
button{font:inherit;color:inherit;background:none;border:0;cursor:pointer}
:focus-visible{outline:2px solid #fff;outline-offset:2px}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* Top bar */
.ws-bar{max-width:600px;margin:0 auto;padding:14px 16px 10px;display:flex;align-items:center}
.ws-logo{font-family:Georgia,"Times New Roman",serif;font-size:1.2rem;font-weight:700;text-decoration:none;letter-spacing:-.01em}
.ws-logo span{color:var(--red)}

.acct-loading{display:grid;place-items:center;min-height:60vh}
.spinner{width:28px;height:28px;border-radius:50%;border:3px solid #333;border-top-color:#fff;animation:spin .8s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}

/* ---------- Profile ---------- */
.pf{max-width:600px;margin:0 auto;padding-bottom:calc(80 * var(--u))}
.pf-rule{height:max(1px, calc(3 * var(--u)));background:var(--divider);margin:0 calc(26 * var(--u))}
.pf-head{display:flex;align-items:center;padding:calc(16 * var(--u)) calc(39 * var(--u)) 0 calc(26 * var(--u))}

.pf-avatar{position:relative;flex:none;width:calc(146 * var(--u));height:calc(146 * var(--u));border-radius:50%;background:var(--surface);display:grid;place-items:center;font-family:var(--display);font-weight:800;font-size:calc(66 * var(--u));line-height:1}
.pf-avatar>img{width:100%;height:100%;border-radius:50%;object-fit:cover}
.pf-avatar-add{position:absolute;right:0;bottom:calc(-1 * var(--u));width:calc(52 * var(--u));height:calc(52 * var(--u));border-radius:50%;background:var(--red);border:calc(5 * var(--u)) solid var(--bg);display:grid;place-items:center;color:#fff}
.pf-avatar-add svg{width:62%;height:62%}

.pf-stats{flex:1;display:flex;justify-content:space-between;margin-left:calc(62 * var(--u))}
.pf-stat{display:flex;flex-direction:column;align-items:center;line-height:1.15}
.pf-stat strong{font-size:calc(39 * var(--u));font-weight:700}
.pf-stat span{font-size:calc(27 * var(--u));font-weight:700;margin-top:calc(6 * var(--u))}

.pf-name{font-size:max(13px, calc(27 * var(--u)));font-weight:700;line-height:1.3;margin:calc(18 * var(--u)) calc(26 * var(--u)) 0;overflow-wrap:anywhere}

.pf-about{padding:0 calc(26 * var(--u))}
.pf-bio{font-size:max(13px, calc(22 * var(--u)));line-height:1.45;margin-top:calc(8 * var(--u));white-space:pre-line;overflow-wrap:anywhere}
.pf-links{list-style:none;margin-top:calc(8 * var(--u));display:flex;flex-direction:column;gap:calc(4 * var(--u))}
.pf-links a{display:inline-flex;align-items:center;gap:6px;font-size:max(13px, calc(21 * var(--u)));font-weight:600;color:#e0e0e0;text-decoration:none}
.pf-links a:hover{text-decoration:underline}
.pf-links i{display:inline-flex;width:1em;height:1em;color:var(--muted)}
.pf-chips{display:flex;gap:calc(16 * var(--u));margin-top:calc(19 * var(--u))}
.pf-chip{display:inline-flex;align-items:center;gap:.5em;height:2.75em;padding:0 .9em;border:max(1px, calc(2 * var(--u))) solid var(--line);border-radius:.72em;font-size:var(--btn-font);font-weight:600}
.pf-chip-plus{font-size:1.15em;line-height:1}

.pf-actions{display:grid;grid-template-columns:1fr 1fr;gap:calc(33 * var(--u));padding:0 calc(22 * var(--u)) 0 calc(26 * var(--u));margin-top:calc(18 * var(--u))}
.pf-btn{height:3.3em;border:max(1px, calc(2 * var(--u))) solid var(--line);border-radius:.74em;font-size:var(--btn-font);font-weight:600;transition:background .15s}
.pf-chip:hover,.pf-btn:hover{background:#1e1e1e}

.pf-dash{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:calc(32 * var(--u)) calc(22 * var(--u)) 0 calc(26 * var(--u));min-height:calc(101 * var(--u));padding:calc(14 * var(--u)) calc(32 * var(--u));background:var(--surface);border-radius:calc(12 * var(--u))}
.pf-dash-title{font-size:max(13px, calc(27 * var(--u)));font-weight:700;letter-spacing:.045em;line-height:1.25}
.pf-dash-sub{font-size:max(12px, calc(24 * var(--u)));font-weight:600;letter-spacing:.03em;color:var(--muted);line-height:1.3;margin-top:calc(4 * var(--u))}
.pf-dash-amount{font-size:max(14px, calc(29 * var(--u)));font-weight:700;letter-spacing:.02em}

.pf-tabs{--tab:0;position:relative;display:grid;grid-template-columns:repeat(3,1fr);margin-top:calc(23 * var(--u));border-bottom:max(1px, calc(2 * var(--u))) solid var(--divider)}
.pf-tab{height:calc(85 * var(--u));min-height:44px;display:grid;place-items:center;color:var(--icon)}
.pf-tab[aria-selected="true"]{color:#fff}
.pf-tab svg{width:max(20px, calc(38 * var(--u)));height:max(20px, calc(38 * var(--u)))}
.pf-tab-bar{position:absolute;left:0;bottom:calc(-1 * max(1px, calc(2 * var(--u))));width:calc(100% / 3);height:max(2px, calc(4 * var(--u)));background:#fff;transform:translateX(calc(var(--tab) * 100%));transition:transform .25s ease}

.pf-empty{display:flex;flex-direction:column;align-items:center;text-align:center;padding:calc(74 * var(--u)) 20px 0}
.pf-empty-art{width:calc(185 * var(--u));height:auto;min-width:96px}
.pf-empty h2{font-family:var(--display);font-size:max(17px, calc(36 * var(--u)));font-weight:700;margin-top:calc(52 * var(--u));line-height:1.25}
.pf-empty p{font-size:max(13px, calc(26 * var(--u)));font-weight:600;color:var(--muted);margin-top:calc(14 * var(--u));letter-spacing:.01em}
.pf-upload{margin-top:calc(34 * var(--u));height:3.4em;padding:0 2.6em;background:var(--red);border-radius:.68em;font-size:var(--btn-font);font-weight:600;color:#fff;transition:background .15s}
.pf-upload:hover{background:var(--red-h)}

/* Left-edge drawer tab */
.pf-drawer-tab{position:fixed;left:0;top:68%;width:max(22px, calc(40 * var(--u)));height:max(88px, calc(185 * var(--u)));background:#2f2f2f;border-radius:0 calc(26 * var(--u)) calc(26 * var(--u)) 0;display:grid;place-items:center;color:#b5b5b5;z-index:20}
.pf-drawer-tab svg{width:45%;height:22%}
.pf-drawer-scrim{position:fixed;inset:0;background:rgba(0,0,0,.55);opacity:0;pointer-events:none;transition:opacity .2s;z-index:30}
.pf-drawer{position:fixed;top:0;bottom:0;left:0;width:min(280px, 80vw);background:#1b1b1b;padding:72px 12px 24px;display:flex;flex-direction:column;gap:4px;transform:translateX(-100%);transition:transform .25s ease;z-index:31}
.pf-drawer-wrap.open .pf-drawer{transform:none}
.pf-drawer-wrap.open .pf-drawer-scrim{opacity:1;pointer-events:auto}
.pf-drawer-item{display:block;text-align:left;padding:14px 16px;border-radius:10px;font-size:15px;font-weight:600;text-decoration:none}
.pf-drawer-item:hover{background:#262626}
.pf-drawer-item.danger{color:#ff6b74;margin-top:auto}

/* ---------- Edit sheet ---------- */
.ed-overlay{position:fixed;inset:0;background:rgba(0,0,0,.6);display:flex;align-items:flex-end;justify-content:center;z-index:50}
.ed-sheet{width:100%;max-width:600px;max-height:92vh;overflow-y:auto;background:#1c1c1c;border-radius:18px 18px 0 0;padding:10px 20px calc(24px + env(safe-area-inset-bottom));display:flex;flex-direction:column;animation:sheet-up .22s ease}
@keyframes sheet-up{from{transform:translateY(40px);opacity:0}}
.ed-handle{width:40px;height:4px;border-radius:2px;background:#444;margin:0 auto 10px}
.ed-top{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}
.ed-top h2{font-size:16px;font-weight:700}
.ed-cancel{font-size:15px;color:#ccc;padding:8px 0}
.ed-save{font-size:15px;font-weight:700;color:#fff;background:var(--red);padding:8px 16px;border-radius:8px}
.ed-save:disabled{opacity:.6;cursor:default}
.ed-sheet label{display:flex;justify-content:space-between;font-size:13px;font-weight:600;color:var(--muted);margin:16px 0 6px}
.ed-sheet input,.ed-sheet textarea{width:100%;background:#111;border:1px solid #3a3a3a;border-radius:10px;padding:12px;color:#fff;font:inherit;font-size:16px;resize:vertical}
.ed-sheet input:focus,.ed-sheet textarea:focus{outline:none;border-color:#888}
.ed-links{display:flex;flex-direction:column;gap:8px}
.ed-link-row{display:flex;gap:8px}
.ed-remove{flex:none;width:44px;border:1px solid #3a3a3a;border-radius:10px;font-size:20px;color:#aaa}
.ed-add{align-self:flex-start;margin-top:10px;font-size:14px;font-weight:600;color:#ddd;padding:6px 0}
.ed-error{color:#ff6b74;font-size:14px;margin-top:12px;min-height:1em}

/* ---------- Login / signup ---------- */
.lg{max-width:420px;margin:0 auto;padding:8vh 16px 40px}
.lg-card{background:var(--surface-2);border:1px solid #2c2c2c;border-radius:18px;padding:36px 28px;text-align:center}
.lg-card h1{font-family:var(--display);font-size:26px;font-weight:700;line-height:1.2}
.lg-text{color:var(--muted);font-size:15px;font-weight:600;line-height:1.5;margin-top:10px}
.lg-google{display:flex;align-items:center;justify-content:center;gap:12px;width:100%;height:52px;margin-top:28px;background:#fff;color:#1f1f1f;border-radius:12px;font-size:16px;font-weight:600;transition:background .15s}
.lg-google:hover{background:#ececec}
.lg-google:disabled{opacity:.7;cursor:default}
.lg-g{display:inline-flex;width:22px;height:22px}
.lg-ref{margin-top:18px;text-align:left}
.lg-ref label{display:block;font-size:13px;font-weight:600;color:var(--muted);margin-bottom:6px}
.lg-ref label span{font-weight:400;color:#6f6f6f}
.lg-ref-input{width:100%;height:48px;background:#111;border:1px solid #3a3a3a;border-radius:12px;padding:0 14px;color:#fff;font:inherit;font-size:16px;letter-spacing:.04em}
.lg-ref-input::placeholder{color:#5f5f5f;letter-spacing:0}
.lg-ref-input:focus{outline:none;border-color:#888}
.lg-error{color:#ff6b74;font-size:14px;line-height:1.45;margin-top:14px;min-height:1em}
.lg-error:empty{margin-top:0}
.lg-legal{font-size:12.5px;color:#777;line-height:1.5;margin-top:18px}
.lg-legal a,.lg-switch a{color:#ddd;font-weight:600}
.lg-switch{text-align:center;color:var(--muted);font-size:14px;font-weight:600;margin-top:20px}

.toast{position:fixed;left:50%;bottom:calc(24px + env(safe-area-inset-bottom));transform:translate(-50%,20px);background:#f2f2f2;color:#111;font-size:14px;font-weight:600;padding:12px 18px;border-radius:10px;opacity:0;pointer-events:none;transition:opacity .2s,transform .2s;z-index:60;max-width:calc(100vw - 32px)}
.toast.show{opacity:1;transform:translate(-50%,0)}

@media (prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}}
