/* ============================================================
   gate.css — Apple TV-style account + Premium gate
   Mobile: floating sheet rises from the bottom.
   Desktop (>=700px): card zooms in from the middle of the screen.
   ============================================================ */

/* Page is hidden until gate.js has mounted its cover (set by the inline
   script in <head>, only for visitors who aren't already known members) */
html.gate-boot{background:#000}
html.gate-boot body > *:not(#puweb-gate){visibility:hidden}
html.gate-on,
html.gate-on body{overflow:hidden !important}
html.gate-on #toast-container{z-index:100001}

#puweb-gate{
  --g-blue:#3f83f8;
  --g-sheet:#1c1c1e;
  --g-card:#2c2c2e;
  --g-text:#fff;
  --g-text2:rgba(235,235,245,.62);
  --g-hair:rgba(255,255,255,.1);
  --g-gold:#f5c842;
  --kb:0px;
  position:fixed;inset:0;z-index:99990;display:none;
  color:var(--g-text);
  font-family:-apple-system,BlinkMacSystemFont,"SF Pro Display","SF Pro Text",system-ui,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  -webkit-font-smoothing:antialiased;
  -webkit-tap-highlight-color:transparent;
}
#puweb-gate.is-mounted{display:block}
#puweb-gate:not(.is-open):not(.is-cover){pointer-events:none}
#puweb-gate *{box-sizing:border-box}

/* ── Backdrop (plain dim: no blur, so the open animation stays on the GPU) ── */
.g-backdrop{position:absolute;inset:0;background:#000;opacity:0;transition:opacity .45s ease;touch-action:none}
#puweb-gate.is-cover .g-backdrop{opacity:1}
#puweb-gate.is-open .g-backdrop{opacity:.62}

/* ── Stage + sheet (mobile first: bottom sheet) ── */
.g-stage{
  position:absolute;left:0;right:0;top:var(--vvt,0px);height:var(--vvh,100%);
  display:flex;align-items:flex-end;justify-content:center;touch-action:none;
  padding:8px 8px calc(8px + env(safe-area-inset-bottom,0px));
}
#puweb-gate.kb-open .g-stage{padding-bottom:8px}
.g-sheet{
  position:relative;width:100%;max-width:440px;
  background:var(--g-sheet);border-radius:40px;overflow:hidden;outline:none;
  box-shadow:0 0 0 .5px rgba(255,255,255,.09);
  transform:translate3d(0,calc(100% + 60px),0);
  transition:transform .6s cubic-bezier(.32,.72,0,1);
  will-change:transform;
}
#puweb-gate.is-open .g-sheet{transform:none}

.g-scroll{
  max-height:calc(100vh - 16px);max-height:calc(var(--vvh,100dvh) - 16px);
  overflow-y:auto;overscroll-behavior:contain;scrollbar-width:none;touch-action:pan-y;-webkit-overflow-scrolling:touch;
  transition:height .45s cubic-bezier(.32,.72,0,1);
}
.g-scroll::-webkit-scrollbar{display:none}

/* ── Desktop: zoom into the middle ── */
@media (min-width:700px){
  .g-stage{align-items:center;padding:24px;top:0;height:100%}
  .g-sheet{
    border-radius:36px;opacity:0;transform:scale(.55);box-shadow:0 0 0 .5px rgba(255,255,255,.09),0 30px 80px rgba(0,0,0,.5);
    transition:transform .55s cubic-bezier(.16,1,.3,1),opacity .3s ease;
  }
  #puweb-gate.is-open .g-sheet{opacity:1;transform:none}
  .g-scroll{max-height:calc(100vh - 48px);max-height:calc(100dvh - 48px)}
}

/* ── Views ── */
.g-view{display:none;padding:36px 24px 26px;text-align:center}
.g-view.on{display:block;animation:gIn .32s cubic-bezier(.32,.72,0,1) both}
@keyframes gIn{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}

.g-logo{display:flex;justify-content:center;margin-bottom:20px}
.g-logo svg{overflow:visible;width:76px;height:76px;filter:drop-shadow(0 10px 22px rgba(79,142,247,.35))}
.g-crown{
  width:76px;height:76px;margin:0 auto 20px;border-radius:21px;display:grid;place-items:center;
  background:linear-gradient(150deg,#ffe699,#e3aa1f);color:#3a2a00;
  box-shadow:0 10px 26px rgba(245,200,66,.3),inset 0 1px 0 rgba(255,255,255,.5);
}
.g-crown svg{width:40px;height:40px}

.g-title{margin:0;font-size:32px;line-height:1.1;font-weight:700;letter-spacing:-.02em;text-wrap:balance}
.g-sub{margin:10px auto 0;max-width:30ch;font-size:17px;line-height:1.35;color:rgba(255,255,255,.92);text-wrap:balance}
.g-sub b{font-weight:600;word-break:break-all}

/* ── Buttons ── */
.g-actions{display:flex;flex-direction:column;gap:12px;margin-top:34px}
.g-btn{
  appearance:none;-webkit-appearance:none;border:0;width:100%;height:56px;border-radius:999px;
  font-family:inherit;font-size:18px;font-weight:600;line-height:1;color:#fff;cursor:pointer;touch-action:manipulation;-webkit-user-select:none;user-select:none;
  transition:transform .18s ease,filter .18s ease,opacity .2s ease;
}
.g-btn:active{transform:scale(.97);filter:brightness(.88)}
#puweb-gate :focus,#puweb-gate :focus-visible{outline:none !important;box-shadow:none !important}
#puweb-gate .g-btn:focus-visible,#puweb-gate .g-link:focus-visible{outline:2px solid #fff !important;outline-offset:3px !important}
.g-btn[disabled]{opacity:.55;pointer-events:none}
.g-primary{background:var(--g-blue)}
.g-secondary{background:rgba(120,120,128,.32)}
.g-gold{background:linear-gradient(180deg,#f8d661,#e8b32b);color:#201700}

.g-link{
  appearance:none;-webkit-appearance:none;display:block;margin:6px auto 0;padding:10px 14px;
  background:none;border:0;font-family:inherit;font-size:18px;font-weight:400;line-height:1.2;color:var(--g-blue);cursor:pointer;touch-action:manipulation;
}
.g-link.dim{color:var(--g-text2)}
.g-link:active{opacity:.6}
.g-row{display:flex;justify-content:center;gap:8px;margin-top:2px}
.g-row .g-link{margin-top:0}

/* ── Form ── */
.g-group{margin-top:26px;background:var(--g-card);border-radius:18px;overflow:hidden;text-align:left}
.g-field{
  display:block;width:100%;height:54px;padding:0 18px;margin:0;
  background:transparent;border:0;border-radius:0;outline:0;
  color:#fff;font-family:inherit;font-size:17px;font-weight:400;line-height:1.2;
  -webkit-appearance:none;appearance:none;caret-color:var(--g-blue);
}
.g-field + .g-field{border-top:.5px solid var(--g-hair)}
.g-field::placeholder{color:rgba(235,235,245,.38)}
.g-field:-webkit-autofill{-webkit-text-fill-color:#fff;-webkit-box-shadow:0 0 0 100px var(--g-card) inset;caret-color:#fff}

.g-form .g-actions{margin-top:22px}
.g-msg{margin-top:14px;font-size:14px;line-height:1.35;color:#ff6961;text-wrap:balance}
.g-msg:empty{display:none}
.g-msg.ok{color:#32d74b}

/* ── Premium page ── */
.g-feats{margin-top:26px;background:var(--g-card);border-radius:18px;text-align:left;overflow:hidden}
.g-feat{display:flex;gap:14px;align-items:flex-start;padding:14px 16px}
.g-feat + .g-feat{border-top:.5px solid var(--g-hair)}
.g-feat-ic{
  flex:none;width:34px;height:34px;border-radius:10px;display:grid;place-items:center;
  background:rgba(245,200,66,.16);color:var(--g-gold);
}
.g-feat-ic svg{width:19px;height:19px}
.g-feat strong{display:block;font-size:16px;line-height:1.25;font-weight:600}
.g-feat span{display:block;margin-top:2px;font-size:14px;line-height:1.3;color:var(--g-text2)}
.g-view[data-view="premium"] .g-actions{margin-top:22px}
.g-fine{margin:18px 0 0;font-size:13px;line-height:1.3;color:var(--g-text2);word-break:break-all}

@media (prefers-reduced-motion:reduce){
  .g-sheet,.g-scroll,.g-backdrop{transition-duration:.01ms !important}
  .g-view.on{animation-duration:.01ms !important}
  .g-sheet{transform:none;opacity:0}
  #puweb-gate.is-open .g-sheet{opacity:1}
}


/* ============================================================
   Site-wide: no focus highlight on text fields
   (removes the purple/blue ring, glow and border tint that appeared
   when focusing any input — forms, search, chat, settings…)
   ============================================================ */
input:focus,input:focus-visible,
textarea:focus,textarea:focus-visible,
select:focus,select:focus-visible,
[contenteditable]:focus,[contenteditable]:focus-visible{
  outline:none !important;outline-offset:0 !important;box-shadow:none !important;
}
.search-wrap:focus-within{
  outline:none !important;
  border-color:var(--border) !important;border-top-color:var(--border-g) !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.07),0 2px 12px rgba(0,0,0,.28) !important;
}
.sp-search:focus-within{
  outline:none !important;box-shadow:none !important;
  border-color:rgba(255,255,255,.09) !important;background:rgba(255,255,255,.05) !important;
}
.chat-input-wrap:focus-within{outline:none !important;box-shadow:none !important;border-color:var(--border) !important}
.auth-field input:focus{border-color:var(--border) !important;box-shadow:none !important}
.settings-input-field:focus{border-color:var(--border-g) !important}
.contact-form input:focus,.contact-form textarea:focus{border-color:rgba(255,255,255,.1) !important}
