/* auth-ui.css — owned by the auth builder. Login / join sheet (modal + inline page). Classes: .hm-auth-* / .hm-authpg-* */
html.hm-auth-lock{overflow:hidden}
.hm-auth{position:fixed;inset:0;z-index:110;display:grid;place-items:center;padding:24px}
.hm-auth-bg{position:absolute;inset:0;background:rgba(20,18,17,.55);backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);opacity:0;transition:opacity .35s}
.hm-auth.on .hm-auth-bg{opacity:1}
.hm-auth-dlg{position:relative;width:min(960px,100%);max-height:calc(100dvh - 48px);display:grid;grid-template-columns:1fr 400px;background:#fff;border-radius:var(--r3);box-shadow:0 40px 100px rgba(0,0,0,.35);overflow:hidden;opacity:0;transform:translateY(24px) scale(.98);transition:opacity .35s,transform .45s var(--out)}
.hm-auth.on .hm-auth-dlg{opacity:1;transform:none}
.hm-auth-x{position:absolute;top:14px;left:14px;z-index:5;width:42px;height:42px;border-radius:50%;display:grid;place-items:center;background:rgba(255,255,255,.92);box-shadow:0 2px 12px rgba(0,0,0,.14);transition:transform .2s}
.hm-auth-x:hover{transform:rotate(90deg)}
.hm-auth-x svg{width:18px;height:18px}
.hm-auth-grab,.hm-auth-band{display:none}
.hm-auth-main{overflow-y:auto;padding:40px 48px 30px;display:flex;flex-direction:column;justify-content:center;min-height:600px}
.hm-auth-panel{width:100%;max-width:420px;margin-inline:auto}

/* --- head --- */
.hm-auth-head{text-align:center;margin-bottom:18px}
.hm-auth-ic{width:46px;height:46px;margin:0 auto 10px}
.hm-auth-t{font-family:var(--disp);font-weight:900;font-size:46px;line-height:.92;letter-spacing:-.01em;text-align:center;outline:0}
.hm-auth-t em{font-style:normal;color:var(--red)}
.hm-auth-sub{color:var(--muted);font-size:16.5px;margin-top:8px;text-align:center;line-height:1.45}

/* --- tabs --- */
.hm-auth-tabs{position:relative;display:grid;grid-template-columns:1fr 1fr;background:var(--tile);border-radius:999px;padding:4px;margin-bottom:16px}
.hm-auth-tabs button{position:relative;z-index:1;height:42px;border-radius:999px;font-weight:700;font-size:15.5px;color:var(--muted);transition:color .25s}
.hm-auth-tabs button[aria-selected="true"]{color:var(--ink);font-weight:900}
.hm-auth-tabs i{position:absolute;top:4px;bottom:4px;right:4px;width:calc(50% - 4px);border-radius:999px;background:#fff;box-shadow:0 2px 10px rgba(26,23,21,.1);transition:transform .35s var(--out)}
.hm-auth-tabs button[aria-selected="true"]:nth-child(2)~i{transform:translateX(-100%)}

/* --- google --- */
.hm-auth-google{width:100%;height:54px;border-radius:999px;display:flex;align-items:center;justify-content:center;gap:12px;font-weight:700;font-size:16.5px;background:#fff;box-shadow:inset 0 0 0 1.5px var(--line),0 2px 8px rgba(26,23,21,.05);transition:box-shadow .2s,transform .2s}
.hm-auth-google:hover{box-shadow:inset 0 0 0 1.5px var(--ink);transform:translateY(-1px)}
.hm-auth-google.busy,.hm-auth-go.busy{pointer-events:none;opacity:.75}
.hm-auth-google.busy span::after,.hm-auth-go.busy::after{content:"";width:16px;height:16px;border-radius:50%;border:2px solid currentColor;border-top-color:transparent;display:inline-block;margin-inline-start:10px;vertical-align:-3px;animation:hmAuSpin .7s linear infinite}
@keyframes hmAuSpin{to{transform:rotate(360deg)}}
.hm-auth-or{display:flex;align-items:center;gap:12px;color:var(--muted2);font-size:14px;margin:16px 0 14px}
.hm-auth-or::before,.hm-auth-or::after{content:"";flex:1;height:1px;background:var(--line)}

/* --- fields (floating label) --- */
.hm-auth-form{display:grid;gap:10px}
.hm-auth-row{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.hm-auth-f{position:relative;display:block}
.hm-auth-f input{width:100%;height:56px;border-radius:14px;border:0;background:var(--plate);box-shadow:inset 0 0 0 1.5px var(--line);padding:20px 16px 4px;font-size:17px;outline:0;transition:box-shadow .2s,background .2s;direction:rtl}
.hm-auth-f input[type=email],.hm-auth-f input[type=tel]{direction:ltr;text-align:right}
.hm-auth-f input:focus{background:#fff;box-shadow:inset 0 0 0 2px var(--ink)}
.hm-auth-f span{position:absolute;right:16px;top:17px;color:var(--muted);font-size:16px;pointer-events:none;transition:all .2s var(--ease)}
.hm-auth-f span small{font-size:12.5px;color:var(--muted2)}
.hm-auth-f input:focus+span,.hm-auth-f input:not(:placeholder-shown)+span{top:7px;font-size:12.5px;font-weight:700}
.hm-auth-f.bad input{box-shadow:inset 0 0 0 2px var(--red);background:#fff}
.hm-auth-chk{display:flex;align-items:flex-start;gap:10px;font-size:15px;line-height:1.4;cursor:pointer;padding:2px 0}
.hm-auth-chk input{position:absolute;opacity:0;width:1px;height:1px}
.hm-auth-chk i{flex:0 0 22px;width:22px;height:22px;border-radius:7px;box-shadow:inset 0 0 0 1.5px #cfc6bb;display:grid;place-items:center;background:#fff;transition:.2s}
.hm-auth-chk i svg{width:14px;height:14px;opacity:0;transform:scale(.5);transition:.2s var(--out)}
.hm-auth-chk input:checked+i{background:var(--red);box-shadow:none}
.hm-auth-chk input:checked+i svg{opacity:1;transform:none}
.hm-auth-chk input:focus-visible+i{outline:2px solid var(--red);outline-offset:2px}
.hm-auth-chk.bad i{box-shadow:inset 0 0 0 2px var(--red)}
.hm-auth-err{display:none;color:var(--red);font-weight:700;font-size:14.5px;background:var(--red-soft);border-radius:10px;padding:8px 12px}
.hm-auth-err.on{display:block;animation:hmAuShake .35s}
@keyframes hmAuShake{25%{transform:translateX(4px)}75%{transform:translateX(-4px)}}
.hm-auth-go{width:100%;margin-top:4px;height:56px;font-size:17px}
.hm-auth-go svg{width:18px;height:18px}
.hm-auth-note{display:flex;align-items:center;justify-content:center;gap:8px;color:var(--muted);font-size:14px;margin-top:12px;text-align:center}
.hm-auth-note svg{width:16px;height:16px;flex:0 0 16px}
.hm-auth-foot{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:8px 16px;margin-top:16px;padding-top:14px;border-top:1px solid var(--line);font-size:14.5px;color:var(--muted)}
.hm-auth-foot.c{justify-content:center;border:0;padding-top:4px}
.hm-auth-foot .hm-link{font-size:14.5px;color:var(--ink);font-weight:700}
.hm-auth-foot .hm-link.red{color:var(--red)}
.hm-auth-foot .hm-link[disabled]{color:var(--muted2);text-decoration:none;cursor:default}

/* --- states --- */
.hm-auth-state{text-align:center;animation:hmAuIn .5s var(--out)}
.hm-auth-state.l{text-align:start}
.hm-auth-state.l .hm-auth-t,.hm-auth-state.l .hm-auth-sub{text-align:start}
@keyframes hmAuIn{from{opacity:0;transform:translateY(10px)}}
.hm-auth-mail{position:relative;width:96px;height:96px;margin:0 auto 18px;border-radius:50%;background:var(--red-soft);color:var(--red);display:grid;place-items:center;animation:hmAuFloat 3s ease-in-out infinite}
.hm-auth-mail svg{width:52px;height:52px}
.hm-auth-mail b{position:absolute;top:14px;left:14px;width:20px;height:20px;border-radius:50%;background:var(--red);box-shadow:0 0 0 4px #fff}
@keyframes hmAuFloat{50%{transform:translateY(-5px)}}
.hm-auth-addr{display:inline-block;margin-top:4px;font-weight:900;color:var(--ink);direction:ltr;word-break:break-all}
.hm-auth-steps{display:grid;gap:8px;margin:20px 0 18px;text-align:start;background:var(--tile);border-radius:var(--r2);padding:16px 18px}
.hm-auth-steps li{display:flex;align-items:center;gap:12px;font-size:15.5px}
.hm-auth-steps b{flex:0 0 28px;width:28px;height:28px;border-radius:50%;background:#fff;display:grid;place-items:center;font-family:var(--disp);font-size:18px;color:var(--red)}
.hm-auth-mailbtns{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.hm-auth-mailbtns .hm-btn{width:100%}
.hm-auth-ttl{display:flex;justify-content:center;align-items:center;gap:6px;color:var(--muted);font-size:14px;margin-top:12px}
.hm-auth-ttl svg{width:15px;height:15px}
.hm-auth-proto{margin-top:18px;border:1.5px dashed #d8cdbd;border-radius:16px;padding:12px;display:flex;flex-direction:column;align-items:center;gap:8px}
.hm-auth-proto>span{font-size:12px;font-weight:900;letter-spacing:.08em;color:var(--muted2)}
.hm-auth-proto .hm-btn{white-space:normal;height:auto;min-height:42px;padding:8px 18px}
.hm-auth-help{display:grid;gap:12px;margin:18px 0}
.hm-auth-help li{display:flex;gap:14px;align-items:flex-start;background:var(--plate);border-radius:16px;padding:14px 16px}
.hm-auth-help li>svg{flex:0 0 24px;width:24px;height:24px;color:var(--red);margin-top:2px}
.hm-auth-help b{display:block;font-size:16px}
.hm-auth-help span{display:block;color:var(--muted);font-size:14.5px;line-height:1.45}
.hm-auth-btns{display:grid;gap:10px;margin-top:18px}
.hm-auth-btns .hm-btn{width:100%}
.hm-auth-btns .hm-btn svg{width:20px;height:20px}
.hm-auth-btns .hm-btn:first-child svg path{stroke:none}
.hm-auth-okk{width:96px;height:96px;margin:0 auto 18px}
.hm-auth-okk svg{width:100%;height:100%;fill:none;stroke-linecap:round;stroke-linejoin:round}
.hm-auth-okk circle{stroke:var(--red);stroke-width:3;stroke-dasharray:151;stroke-dashoffset:151;animation:hmAuDraw .6s var(--out) forwards;fill:var(--red-soft)}
.hm-auth-okk path{stroke:var(--red);stroke-width:4;stroke-dasharray:36;stroke-dashoffset:36;animation:hmAuDraw .4s .45s var(--out) forwards}
@keyframes hmAuDraw{to{stroke-dashoffset:0}}
.hm-auth-wins{display:grid;gap:10px;margin-top:20px}
.hm-auth-wins .w{display:flex;align-items:center;gap:14px;background:var(--tile);border-radius:18px;padding:14px 18px;text-align:start;font-size:15.5px}
.hm-auth-wins .w b{font-size:44px;color:var(--red);line-height:.8}
.hm-auth-wins .w svg{flex:0 0 26px;width:26px;height:26px;color:var(--red)}

/* --- aside (benefits over a real photo) --- */
.hm-auth-aside{position:relative;color:#fff;background:var(--night);overflow:hidden;isolation:isolate}
.hm-auth-aside>img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:50% 30%;z-index:-2;transform:scale(1.04);transition:transform 6s var(--ease)}
.hm-auth.on .hm-auth-aside>img{transform:none}
.hm-auth-aside::after{content:"";position:absolute;inset:0;z-index:-1;background:linear-gradient(180deg,rgba(20,18,17,.05) 0%,rgba(20,18,17,.35) 38%,rgba(20,18,17,.93) 70%)}
.hm-auth-asin{position:absolute;inset:auto 0 0 0;padding:32px 34px}
.hm-auth-kick{display:inline-flex;align-items:center;gap:8px;color:var(--stone);font-weight:900;font-size:14.5px}
.hm-auth-kick::before{content:"";width:8px;height:8px;border-radius:50%;background:var(--red)}
.hm-auth-big{font-family:var(--disp);font-weight:900;font-size:64px;line-height:.82;margin:10px 0 18px}
.hm-auth-big em{font-style:normal;color:#fff;background:var(--red);padding:0 10px;border-radius:10px;display:inline-block;line-height:.95}
.hm-auth-aside ul{display:grid;gap:10px}
.hm-auth-aside li{display:flex;align-items:center;gap:12px;font-size:16px;color:#efe7dc}
.hm-auth-aside li b{color:#fff}
.hm-auth-aside li svg{flex:0 0 22px;width:22px;height:22px}
.hm-auth-more{display:inline-block;margin-top:16px;color:var(--stone);font-weight:700;font-size:15px;border-bottom:1px solid currentColor}
.hm-auth-aside.big .hm-auth-big{font-size:84px}

/* --- full page version --- */
.hm-authpg{padding:34px 0 70px}
.hm-authpg-card{display:grid;grid-template-columns:1fr 520px;background:#fff;border-radius:var(--r3);box-shadow:0 30px 80px rgba(26,23,21,.12),0 0 0 1px var(--line);overflow:hidden;min-height:680px}
.hm-authpg-card .hm-auth-main{min-height:0}
.hm-authpg-trust{display:flex;justify-content:center;flex-wrap:wrap;gap:12px 34px;margin-top:22px;color:var(--muted);font-size:15px}
.hm-authpg-trust li{display:flex;align-items:center;gap:8px}
.hm-authpg-trust svg{width:20px;height:20px;color:var(--red)}

/* ---------------- mobile: bottom sheet ---------------- */
@media (max-width:860px){
 .hm-auth{place-items:end stretch;padding:0}
 .hm-auth-dlg{grid-template-columns:1fr;width:100%;max-height:94dvh;border-radius:26px 26px 0 0;overflow-y:auto;transform:translateY(100%);transition:transform .45s var(--out),opacity .2s;display:flex;flex-direction:column}
 .hm-auth.on .hm-auth-dlg{transform:none}
 .hm-auth-dlg>.hm-auth-aside{display:none}
 .hm-auth-grab{display:block;position:absolute;top:8px;left:50%;width:44px;height:5px;margin-left:-22px;border-radius:3px;background:rgba(255,255,255,.7);z-index:4}
 .hm-auth-band{display:flex;flex-direction:column;justify-content:flex-end;order:-1;flex:0 0 auto;height:118px;padding:16px 20px;color:#fff;background:linear-gradient(180deg,rgba(20,18,17,.1),rgba(20,18,17,.85)),url(../img/ui/auth-m.webp) 50% 50%/cover}
 .hm-auth-band b{font-family:var(--disp);font-weight:900;font-size:34px;line-height:.9}
 .hm-auth-band span{font-size:14.5px;color:var(--stone);font-weight:700}
 .hm-auth[data-view="done"] .hm-auth-band,.hm-auth[data-view="sent"] .hm-auth-band,.hm-auth[data-view="help"] .hm-auth-band{display:none}
 .hm-auth[data-view="done"] .hm-auth-x,.hm-auth[data-view="sent"] .hm-auth-x,.hm-auth[data-view="help"] .hm-auth-x{top:12px}
 .hm-auth[data-view="sent"] .hm-auth-grab,.hm-auth[data-view="help"] .hm-auth-grab,.hm-auth[data-view="done"] .hm-auth-grab{background:var(--line)}
 .hm-auth-x{top:12px;width:38px;height:38px}
 .hm-auth-main{min-height:0;padding:20px 20px calc(22px + env(safe-area-inset-bottom));overflow:visible;justify-content:flex-start}
 .hm-auth-head{margin-bottom:14px}
 .hm-auth-head .hm-auth-ic{display:none}
 .hm-auth-t{font-size:38px}
 .hm-auth-sub{font-size:15.5px}
 .hm-auth[data-view="sent"] .hm-auth-main,.hm-auth[data-view="done"] .hm-auth-main,.hm-auth[data-view="help"] .hm-auth-main{padding-top:40px}
 .hm-auth-row{grid-template-columns:1fr}
 .hm-auth-foot{justify-content:center;text-align:center}
 .hm-auth-mail,.hm-auth-okk{width:80px;height:80px}
 .hm-authpg{padding:14px 0 40px}
 .hm-authpg-card{grid-template-columns:1fr;min-height:0;border-radius:24px}
 .hm-authpg-card .hm-auth-aside{order:-1;min-height:168px}
 .hm-authpg-card .hm-auth-asin{padding:18px 20px}
 .hm-authpg-card .hm-auth-aside ul,.hm-authpg-card .hm-auth-more{display:none}
 .hm-auth-aside.big .hm-auth-big{font-size:46px;margin-bottom:0}
 .hm-authpg-card .hm-auth-main{padding:24px 18px 26px}
 .hm-authpg-trust{flex-direction:column;align-items:center;gap:8px;font-size:14.5px}
}
@media (prefers-reduced-motion:reduce){.hm-auth *,.hm-auth{animation:none!important;transition:none!important}}

/* ---- QA pass: 44px tap targets everywhere in the sheet ---- */
.hm-auth-tabs button{height:46px}
.hm-auth-x{width:44px;height:44px}
.hm-auth-chk{min-height:44px;align-items:center;padding:0}
.hm-auth-mailbtns .hm-btn,.hm-auth-proto .hm-btn{height:46px;min-height:46px}
.hm-auth-foot .hm-link,.hm-auth-help .hm-link,.hm-auth-more,.hm-auth-chk .hm-link,.hm-auth-foot a.hm-link{position:relative}
.hm-auth-foot .hm-link::before,.hm-auth-help .hm-link::before,.hm-auth-more::before{content:"";position:absolute;inset:-12px -6px}
.hm-auth-foot{gap:12px 20px}
@media (max-width:860px){.hm-auth-x{width:44px;height:44px}}
@media (max-width:860px) and (min-width:360px){.hm-auth-row{grid-template-columns:1fr 1fr}}

/* ---- signed-in state: what's waiting for a returning member (points value, live order, cart / deal) ---- */
.hm-auth-wins .w.lk{color:var(--ink);transition:background .2s,transform .2s var(--out)}
.hm-auth-wins .w.lk:hover{background:#efe6d8;transform:translateY(-1px)}
.hm-auth-wins .w>span{display:grid;gap:2px;flex:1;min-width:0}
.hm-auth-wins .w strong{font-weight:900;font-size:16px;line-height:1.25}
.hm-auth-wins .w small{font-size:13.5px;color:var(--muted);line-height:1.3}
.hm-auth-wins .w>svg:last-child:not(:first-child){flex:0 0 18px;width:18px;height:18px;color:var(--muted)}
.hm-auth-wins .w.pts{background:var(--red-soft,#f7e8e9)}
.hm-auth-wins .w.pts.lk:hover{background:#f2dcde}
.hm-auth-wins .w.pts strong{color:var(--red)}
.hm-auth-wins .w.pts small{color:var(--ink)}
.hm-auth-wins .w .dot{flex:0 0 26px;display:grid;place-items:center;height:26px}
.hm-auth-wins .w .dot::before{content:"";width:10px;height:10px;border-radius:50%;background:#2f9e63;box-shadow:0 0 0 5px rgba(47,158,99,.18);animation:hmAuPulse 1.8s infinite}
.hm-auth-wins .w[data-live]{background:#edf6f0}
.hm-auth-wins .w[data-live] strong{color:#1f5d3c}
@keyframes hmAuPulse{50%{box-shadow:0 0 0 8px rgba(47,158,99,.06)}}
.hm-auth-name{display:grid;grid-template-columns:1fr auto;gap:10px;align-items:center;margin-top:14px;text-align:start}
.hm-auth-name .hm-btn{height:56px}
.hm-auth-saved{display:flex;align-items:center;justify-content:center;gap:8px;margin-top:14px;color:#1f5d3c;font-weight:800;font-size:15px}
.hm-auth-saved svg{width:18px;height:18px}
.hm-auth-aside.mem .hm-auth-big bdi{color:#fff}
.hm-auth-dlg.is-member .hm-auth-band{display:none}
@media (max-width:860px){
 .hm-auth-wins .w{padding:12px 14px;gap:12px}
 .hm-auth-wins .w b{font-size:36px}
 .hm-auth-wins .w strong{font-size:15px}
 .hm-auth-name{grid-template-columns:1fr}
 .hm-auth-name .hm-btn{height:46px}
}
.hm-auth-proto small{font-size:12.5px;color:var(--muted);text-align:center;line-height:1.4}
.hm-auth-h1k{display:block;font-family:var(--body);font-size:13.5px;font-weight:900;letter-spacing:.04em;line-height:1.2;color:var(--red);margin-bottom:10px}
