/* Parsisho — THE header stylesheet (single source, 2026-10-15).
   Loaded on every page (SPA, games, CMS). Scoped to header.phsh / .phsh-wrap
   so it never depends on each page's own copy of Tailwind. */
header.phsh{position:sticky;top:0;z-index:50;width:100%;background:rgba(255,255,255,.9);
  -webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px);
  border-bottom:1px solid rgba(15,23,42,.08);box-shadow:0 8px 30px rgba(15,23,42,.06);
  font-family:Vazirmatn,system-ui,-apple-system,"Segoe UI",Tahoma,sans-serif;color:#18181b;
  padding-top:env(safe-area-inset-top)}
header.phsh::after{content:"";position:absolute;inset-inline:0;bottom:-1px;height:1.5px;pointer-events:none;
  background:linear-gradient(90deg,rgba(59,130,246,0) 0%,rgba(34,211,238,.85) 20%,rgba(59,130,246,.9) 55%,rgba(139,92,246,.8) 80%,rgba(139,92,246,0) 100%)}
header.phsh *{box-sizing:border-box}
header.phsh a{text-decoration:none;color:inherit}

.phsh-in{max-width:80rem;margin:0 auto;padding-inline:12px}
@media (min-width:640px){.phsh-in{padding-inline:24px}}
.phsh-row{display:flex;align-items:center;justify-content:space-between;gap:6px;height:58px}
@media (min-width:640px){.phsh-row{height:70px;gap:12px}}
@media (min-width:1024px){.phsh-row{height:78px}}

/* ---------- brand (square mark + live wordmark, owner 2026-10-24) ---------- */
.phsh-brand{display:flex;align-items:center;flex:1 1 auto;min-width:0;justify-content:flex-start;gap:8px;text-decoration:none;line-height:1}
.phsh-brand img{display:block;width:56px;height:56px;flex:0 0 auto;object-fit:contain;object-position:center;max-width:none;max-height:none;aspect-ratio:1/1;
  transition:transform .25s cubic-bezier(.22,.61,.36,1);filter:drop-shadow(0 4px 9px rgba(28,92,233,.20))}
.phsh-brand:hover img{transform:translateY(-1px) scale(1.03)}
.phsh-brand span{font-size:19px;font-weight:800;letter-spacing:-.2px;white-space:nowrap;color:inherit}
@media (min-width:640px){.phsh-brand img{width:64px;height:64px}.phsh-brand span{font-size:22px}}
@media (min-width:1024px){.phsh-brand{gap:9px}.phsh-brand img{width:70px;height:70px}.phsh-brand span{font-size:24px}}
@media (max-width:413.98px){.phsh-brand{gap:6px}.phsh-brand img{width:44px;height:44px}.phsh-brand span{font-size:16px}}
@media (prefers-reduced-motion:reduce){.phsh-brand img{transition:none}.phsh-brand:hover img{transform:none}}

/* ---------- main nav ---------- */
.phsh-nav{display:none;align-items:center;flex:0 0 auto;gap:2px}
@media (min-width:1024px){.phsh-nav{display:flex;gap:3px}}
.phsh-nav a{display:flex;align-items:center;gap:6px;padding:4px 7px;height:30px;border-radius:9999px;
  font-size:11.5px;font-weight:600;color:#52525b;border:1px solid transparent;white-space:nowrap;
  transition:background .2s ease,border-color .2s ease,color .2s ease,box-shadow .2s ease,transform .2s ease}
@media (min-width:1024px){.phsh-nav a{padding:7px 11px;height:auto;font-size:14px}}
.phsh-nav a svg{display:none;width:14px;height:14px;padding:4px;box-sizing:content-box;border-radius:9px;
  color:var(--nc,#64748b);background:var(--nt,rgba(148,163,184,.16));transition:background .2s ease,color .2s ease}
@media (min-width:1024px){.phsh-nav a svg{display:block}}
@media (max-width:559.98px){
  .phsh-nav{display:flex;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;-ms-overflow-style:none;min-width:0}
  .phsh-nav::-webkit-scrollbar{display:none}
  .phsh-nav a{width:30px;padding:4px;justify-content:center;font-size:0;line-height:0}
  .phsh-nav a svg{display:block;width:16px;height:16px;padding:0;border-radius:0}
}
@media (max-width:413.98px){.phsh-nav a{width:27px;height:27px;padding:3px}.phsh-nav a svg{width:15px;height:15px}}
.phsh-nav a:hover{background:#fff;border-color:rgba(15,23,42,.07);color:#18181b;transform:translateY(-1px);
  box-shadow:0 10px 22px -14px var(--nc,rgba(15,23,42,.45))}
.phsh-nav a:hover svg{background:var(--nc,#475569);color:#fff}
.phsh-nav a.is-active{background:linear-gradient(135deg,var(--nc2,#2563eb),var(--nc,#3b82f6));color:#fff;border-color:transparent;
  box-shadow:0 10px 24px -12px var(--nc,rgba(37,99,235,.85)),inset 0 1px 0 rgba(255,255,255,.28)}
.phsh-nav a.is-active svg{background:rgba(255,255,255,.22);color:#fff}

/* ---------- search ---------- */
.phsh-search{display:none;position:relative;flex:1 1 auto;max-width:28rem;margin-inline:12px}
@media (min-width:640px){.phsh-search{display:block}}
.phsh-search svg{position:absolute;inset-inline-end:12px;top:50%;transform:translateY(-50%);width:16px;height:16px;color:#a1a1aa;pointer-events:none}
.phsh-search input{width:100%;height:40px;padding:0 40px 0 16px;border-radius:12px;background:#fafafa;
  border:1px solid rgba(0,0,0,.08);font-size:14px;font-family:inherit;color:#3f3f46;outline:none;transition:box-shadow .2s ease,border-color .2s ease}
.phsh-search input::placeholder{color:#a1a1aa}
.phsh-search input:focus{border-color:#a5b4fc;box-shadow:0 0 0 3px rgba(129,140,248,.25)}
.phsh-sbtn{display:flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:12px;
  background:#fafafa;border:1px solid rgba(0,0,0,.08);color:#71717a;cursor:pointer}
@media (min-width:640px){.phsh-sbtn{display:none}}

/* ---------- actions ---------- */
.phsh-acts{display:flex;align-items:center;gap:4px;flex:0 0 auto}
@media (min-width:640px){.phsh-acts{gap:8px}}
.phsh-act{position:relative;display:flex;align-items:center;gap:6px;height:36px;padding:0 8px;border-radius:24px;
  background:linear-gradient(180deg,#fff,#f6fbff);box-shadow:inset 0 0 0 1px rgba(34,211,238,.42),0 1px 2px rgba(15,23,42,.05);
  color:#64748b;border:0;cursor:pointer;font-family:inherit;font-size:13px;
  transition:box-shadow .22s ease,transform .22s ease,background .22s ease}
@media (min-width:640px){.phsh-act{height:40px;padding:0 12px}}
.phsh-act:hover{transform:translateY(-1px);background:linear-gradient(180deg,#fff,#eefaff);
  box-shadow:inset 0 0 0 1px rgba(34,211,238,.95),0 10px 22px -12px rgba(34,211,238,.85)}
.phsh-act:hover svg{color:#0891b2}
.phsh-act svg{width:18px;height:18px;flex:0 0 auto}
@media (min-width:640px){.phsh-act svg{width:20px;height:20px}}
.phsh-lbl{display:none;font-size:12.5px;font-weight:600;white-space:nowrap}
@media (min-width:768px){.phsh-lbl{display:inline}}
.phsh-cart{background:linear-gradient(135deg,#f59e0b,#ea580c);color:#fff;box-shadow:inset 0 0 0 1px rgba(255,255,255,.35),0 10px 22px -13px rgba(234,88,12,.9)}
.phsh-cart svg{color:#fff}
.phsh-cart:hover{background:linear-gradient(135deg,#f59e0b,#ea580c);box-shadow:inset 0 0 0 1px rgba(255,255,255,.6),0 14px 26px -13px rgba(234,88,12,1)}
.phsh-cart:hover svg{color:#fff}
.phsh-login{background:linear-gradient(135deg,#0f63d7,#0ea5e9);color:#fff;font-weight:700;padding:0 14px;
  box-shadow:inset 0 0 0 1px rgba(34,211,238,.75),0 10px 22px -14px rgba(14,165,233,.95)}
.phsh-login:hover{background:linear-gradient(135deg,#0f63d7,#0ea5e9);box-shadow:inset 0 0 0 1px rgba(34,211,238,1),0 14px 26px -14px rgba(14,165,233,1)}
.phsh-login svg{color:#fff}
.phsh-wallet{color:#0f766e;font-weight:700;font-variant-numeric:tabular-nums}
/* owner 2026-10-17: the wallet chip shows the ICON ONLY — the amount lives inside /wallet */
.phsh-wallet b,.phsh-wallet .font-num,.phsh-wallet .phsh-wallet-amt{display:none !important}
.phsh-wallet svg{color:#0d9488}
.phsh-acc{padding-inline:6px}
@media (min-width:640px){.phsh-acc{padding-inline:10px}}
.phsh-av{width:26px;height:26px;border-radius:9999px;object-fit:cover;background:#e4e4e7}
.phsh-name{display:none;font-size:12.5px;font-weight:700;color:#3f3f46;max-width:104px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media (min-width:768px){.phsh-name{display:inline}}
.phsh-admin{background:linear-gradient(135deg,#f59e0b,#b45309);color:#fff;font-weight:700;padding:0 12px;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.35),0 10px 22px -14px rgba(180,83,9,.95)}
.phsh-admin svg{color:#fff}
.phsh-out{color:#b3261e}
.phsh-out:hover{box-shadow:inset 0 0 0 1px rgba(179,38,30,.55),0 10px 22px -12px rgba(179,38,30,.6)}
.phsh-out:hover svg{color:#b3261e}
.phsh-count{position:absolute;inset-inline-start:-4px;top:-4px;min-width:17px;height:17px;padding:0 4px;border-radius:9999px;
  background:#e11d48;color:#fff;font-size:10.5px;font-weight:700;display:flex;align-items:center;justify-content:center}
.phsh-only-sm{display:flex}
@media (min-width:640px){.phsh-only-sm{display:none}}

header.phsh .phsh-brand span{color:#0f172a}
/* ---------- night theme (owner top bar toggles .ph-night) ---------- */
html.ph-night header.phsh,body.ph-night header.phsh{background:rgba(9,14,26,.9);border-bottom-color:rgba(255,255,255,.09);color:#e5e7eb}
html.ph-night header.phsh .phsh-nav a,body.ph-night header.phsh .phsh-nav a{color:#cbd5e1}
html.ph-night header.phsh .phsh-brand span,body.ph-night header.phsh .phsh-brand span{color:#f8fafc}
html.ph-night header.phsh .phsh-name,body.ph-night header.phsh .phsh-name{color:#e2e8f0}
html.ph-night header.phsh .phsh-search input,body.ph-night header.phsh .phsh-search input{background:rgba(255,255,255,.06);border-color:rgba(255,255,255,.12);color:#e5e7eb}
html.ph-night header.phsh .phsh-act,body.ph-night header.phsh .phsh-act{background:linear-gradient(180deg,rgba(255,255,255,.08),rgba(255,255,255,.04));color:#cbd5e1}
html.ph-night header.phsh .phsh-sbtn,body.ph-night header.phsh .phsh-sbtn{background:rgba(255,255,255,.06);border-color:rgba(255,255,255,.12);color:#cbd5e1}
@media (prefers-reduced-motion:reduce){header.phsh *{transition:none !important}}

/* ---------- admin shortcut visibility (owner request 2026-10-15) ----------
   A phone in PORTRAIT does not need the «مدیریت» shortcut: it is hidden there so
   the header row never overflows/clips. It still appears when the phone is
   rotated to landscape, and on tablets/desktops (>=1024px) as before. */
@media (orientation: portrait) and (max-width:1023.98px){
  #ph-admin-btn,.phsh-admin{display:none !important}
}

/* ---------- mini cart (hover/focus on the cart chip) — owner 2026-10-17 ----------
   Small ajax panel with the real cart (items, qty, price, total). The chip itself
   still navigates to /cart; clicking any row / CTA also opens the cart page. */
#phsh-mc{position:fixed;z-index:9998;direction:rtl;width:min(360px,calc(100vw - 16px));
  background:#fff;color:#0f172a;border:1px solid rgba(15,23,42,.10);border-radius:18px;
  box-shadow:0 26px 64px -24px rgba(15,23,42,.5),0 2px 8px rgba(15,23,42,.07);
  opacity:0;transform:translateY(-6px) scale(.985);pointer-events:none;
  transition:opacity .16s ease,transform .16s ease;overflow:hidden;
  font-family:Vazirmatn,system-ui,-apple-system,"Segoe UI",Tahoma,sans-serif;text-align:start}
#phsh-mc.on{opacity:1;transform:none;pointer-events:auto}
#phsh-mc *{box-sizing:border-box}
#phsh-mc a{text-decoration:none;color:inherit}
#phsh-mc .phsh-mc-arrow{position:absolute;top:-6px;width:12px;height:12px;background:#fff;
  border-left:1px solid rgba(15,23,42,.10);border-top:1px solid rgba(15,23,42,.10);transform:rotate(45deg)}
#phsh-mc .phsh-mc-head{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:13px 15px 11px;
  border-bottom:1px solid #eef2f7}
#phsh-mc .phsh-mc-title{display:flex;align-items:center;gap:7px;font-size:13.5px;font-weight:800}
#phsh-mc .phsh-mc-title svg{width:17px;height:17px;color:#ea580c}
#phsh-mc .phsh-mc-badge{display:inline-flex;align-items:center;height:20px;padding:0 8px;border-radius:999px;
  background:#fff1df;color:#c2410c;font-size:11px;font-weight:800}
#phsh-mc .phsh-mc-hint{font-size:10.5px;color:#94a3b8;font-weight:600}
#phsh-mc .phsh-mc-list{max-height:min(300px,48vh);overflow:auto;padding:6px 9px;margin:0;list-style:none}
#phsh-mc .phsh-mc-list::-webkit-scrollbar{width:6px}
#phsh-mc .phsh-mc-list::-webkit-scrollbar-thumb{background:#dbe3ec;border-radius:9px}
#phsh-mc .phsh-mc-item{display:flex;gap:10px;padding:8px 6px;border-radius:12px}
#phsh-mc .phsh-mc-item:hover{background:#f8fafc}
#phsh-mc .phsh-mc-thumb{width:48px;height:48px;flex:0 0 48px;border-radius:11px;overflow:hidden;background:#f1f5f9;
  border:1px solid #e8eef5;display:flex;align-items:center;justify-content:center;color:#cbd5e1}
#phsh-mc .phsh-mc-thumb svg{width:20px;height:20px}
#phsh-mc .phsh-mc-thumb img{width:100%;height:100%;object-fit:cover;display:block}
#phsh-mc .phsh-mc-meta{min-width:0;flex:1 1 auto;display:flex;flex-direction:column;gap:5px;justify-content:center}
#phsh-mc .phsh-mc-name{font-size:11.5px;font-weight:700;line-height:1.6;color:#1e293b;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
#phsh-mc .phsh-mc-line{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:10.5px;color:#64748b}
#phsh-mc .phsh-mc-line b{font-size:11px;font-weight:800;color:#0f172a;white-space:nowrap}
#phsh-mc .phsh-mc-more{padding:0 14px 7px;font-size:10.5px;color:#94a3b8}
#phsh-mc .phsh-mc-foot{padding:9px 11px 11px;border-top:1px solid #eef2f7;background:#fcfdff}
#phsh-mc .phsh-mc-sub{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:11.5px;color:#475569;padding:1px 4px 8px}
#phsh-mc .phsh-mc-sub b{font-size:13.5px;color:#0f172a;white-space:nowrap}
#phsh-mc .phsh-mc-cta{display:flex;align-items:center;justify-content:center;gap:6px;height:38px;border-radius:12px;
  background:linear-gradient(135deg,#f59e0b,#ea580c);color:#fff !important;font-size:12.5px;font-weight:800;
  box-shadow:0 10px 22px -14px rgba(234,88,12,.95)}
#phsh-mc .phsh-mc-cta svg{width:15px;height:15px}
#phsh-mc .phsh-mc-cta:hover{filter:brightness(1.04)}
#phsh-mc .phsh-mc-cta.ghost{background:#fff;color:#0f172a !important;border:1px solid #e2e8f0;box-shadow:none;margin-top:12px}
#phsh-mc .phsh-mc-empty{padding:26px 18px 20px;text-align:center;color:#64748b;font-size:12px;line-height:1.9}
#phsh-mc .phsh-mc-empty b{display:block;color:#0f172a;font-size:13.5px;margin-bottom:2px}
#phsh-mc .phsh-mc-skel{padding:12px 14px;display:flex;flex-direction:column;gap:9px}
#phsh-mc .phsh-mc-skel i{display:block;height:12px;border-radius:8px;
  background:linear-gradient(90deg,#f1f5f9,#e2e8f0,#f1f5f9);background-size:200% 100%;animation:phshMcSh 1.1s linear infinite}
@keyframes phshMcSh{to{background-position:-200% 0}}
html.ph-night #phsh-mc,body.ph-night #phsh-mc{background:#0b1220;color:#e2e8f0;border-color:rgba(148,163,184,.22);
  box-shadow:0 26px 64px -22px rgba(0,0,0,.85),0 2px 8px rgba(0,0,0,.35)}
html.ph-night #phsh-mc .phsh-mc-arrow,body.ph-night #phsh-mc .phsh-mc-arrow{background:#0b1220;border-color:rgba(148,163,184,.22)}
html.ph-night #phsh-mc .phsh-mc-head,body.ph-night #phsh-mc .phsh-mc-head,
html.ph-night #phsh-mc .phsh-mc-foot,body.ph-night #phsh-mc .phsh-mc-foot{border-color:rgba(148,163,184,.16)}
html.ph-night #phsh-mc .phsh-mc-foot,body.ph-night #phsh-mc .phsh-mc-foot{background:#0e1728}
html.ph-night #phsh-mc .phsh-mc-title,body.ph-night #phsh-mc .phsh-mc-title{color:#f8fafc}
html.ph-night #phsh-mc .phsh-mc-item:hover,body.ph-night #phsh-mc .phsh-mc-item:hover{background:rgba(148,163,184,.08)}
html.ph-night #phsh-mc .phsh-mc-name,body.ph-night #phsh-mc .phsh-mc-name{color:#e2e8f0}
html.ph-night #phsh-mc .phsh-mc-line b,body.ph-night #phsh-mc .phsh-mc-line b,
html.ph-night #phsh-mc .phsh-mc-sub b,body.ph-night #phsh-mc .phsh-mc-sub b{color:#f8fafc}
html.ph-night #phsh-mc .phsh-mc-thumb,body.ph-night #phsh-mc .phsh-mc-thumb{background:#111c2e;border-color:rgba(148,163,184,.18)}
html.ph-night #phsh-mc .phsh-mc-cta.ghost,body.ph-night #phsh-mc .phsh-mc-cta.ghost{background:#111c2e;border-color:rgba(148,163,184,.22);color:#e2e8f0 !important}
@media (prefers-reduced-motion:reduce){#phsh-mc{transition:none}#phsh-mc .phsh-mc-skel i{animation:none}}

/* ---------- admin shortcut: phone in PORTRAIT never shows it (owner 2026-10-17) ----------
   Stated again (and stronger) than the 2026-10-15 rule: the chip is only allowed on
   desktop/tablet >=1024px, or on a phone held LANDSCAPE. Nothing else may show it. */
@media (max-width:1023.98px) and (orientation:portrait){
  header.phsh #ph-admin-btn,header.phsh .phsh-admin,#ph-admin-btn,.phsh-admin{display:none !important}
}

/* ---------- phones/tablets (<1024px): ONE refined row ----------
   Owner order (RTL start → end): logo | خانه مزایده بازار هیجان کسب‌وکار | cart · wallet · avatar.
   Every control is the same 34px height so the row reads as one straight line; the avatar is a
   true circle with a hairline ring; the section pills are quiet white chips whose active state
   carries the site blue. Portrait keeps text-only pills (icons would crowd 390px) and hides the
   sign-out chip; landscape has room for icons and shows it. */
header.phsh .phsh-mb{
  max-width:80rem;margin:0 auto;padding:8px 10px;display:flex;align-items:center;
  gap:8px;min-width:0;flex-wrap:nowrap;
}
header.phsh .phsh-mb > .phsh-brand{display:flex;align-items:center;flex:0 0 auto;order:0;margin:0}
header.phsh .phsh-mb > .phsh-brand img{height:44px !important;width:44px !important;max-width:none !important;max-height:none !important;object-fit:contain;display:block}
header.phsh .phsh-mb > .phsh-brand span{font-size:15px;font-weight:800;letter-spacing:-.3px}

header.phsh .phsh-mb-nav{display:flex;align-items:center;gap:3px;flex:1 1 auto;min-width:0;order:1}
header.phsh .phsh-mb-nav a{
  flex:1 1 0;min-width:0;height:34px;padding:0 2px;border-radius:999px;
  display:flex;align-items:center;justify-content:center;gap:4px;
  font-size:clamp(8.4px,2.16vw,10.5px);font-weight:700;letter-spacing:-.1px;line-height:1;
  color:#475569;background:#fff;border:1px solid rgba(15,23,42,.07);
  box-shadow:0 1px 2px rgba(15,23,42,.03);
  white-space:nowrap;overflow:hidden;transition:background .16s ease,color .16s ease,box-shadow .16s ease;
}
header.phsh .phsh-mb-nav a > span{overflow:hidden;text-overflow:ellipsis}
header.phsh .phsh-mb-nav a svg{width:12px;height:12px;flex:0 0 auto;color:#94a3b8;transition:color .16s ease}
header.phsh .phsh-mb-nav a.is-active{
  color:#fff;border-color:transparent;
  background:linear-gradient(135deg,#1d4ed8,#3b82f6);
  box-shadow:0 6px 14px -8px rgba(37,99,235,.85),inset 0 1px 0 rgba(255,255,255,.22);
}
header.phsh .phsh-mb-nav a.is-active svg{color:#fff}
header.phsh .phsh-mb-nav a:hover:not(.is-active){background:#fff;color:#0f172a;box-shadow:0 2px 8px -4px rgba(15,23,42,.22)}

header.phsh .phsh-mb-acts{display:flex;align-items:center;gap:5px;flex:0 0 auto;min-width:0;order:2}
header.phsh .phsh-mb-acts .phsh-act{
  height:34px;min-width:34px;width:34px;padding:0;border-radius:999px;
  display:flex;align-items:center;justify-content:center;position:relative;
  background:#fff;border:1px solid rgba(15,23,42,.07);color:#475569;
  box-shadow:0 1px 2px rgba(15,23,42,.03);
}
header.phsh .phsh-mb-acts .phsh-act svg{width:17px;height:17px}
header.phsh .phsh-mb-acts .phsh-cart{color:#c2410c;border-color:rgba(249,115,22,.26);background:#fff7ed}
header.phsh .phsh-mb-acts .phsh-cart svg{color:#c2410c}
header.phsh .phsh-mb-acts .phsh-wallet{color:#1d4ed8;border-color:rgba(37,99,235,.22);background:#eff6ff}
header.phsh .phsh-mb-acts .phsh-login{width:auto;padding:0 12px;gap:5px;font-size:11.5px;font-weight:800;color:#fff;
  background:linear-gradient(135deg,#1d4ed8,#3b82f6);border-color:transparent}
header.phsh .phsh-mb-acts .phsh-login svg{width:15px;height:15px;color:#fff}
header.phsh .phsh-mb-acts .phsh-out{color:#b3261e;border-color:rgba(179,38,30,.18)}
header.phsh .phsh-mb-acts .phsh-admin{background:linear-gradient(135deg,#f59e0b,#b45309);border-color:transparent;
  box-shadow:0 4px 10px -6px rgba(180,83,9,.9)}
header.phsh .phsh-mb-acts .phsh-admin svg{color:#fff}
header.phsh .phsh-mb-acts .phsh-acc{padding:0;background:#fff}
header.phsh .phsh-mb-acts .phsh-av{width:32px;height:32px;border-radius:50%;object-fit:cover;display:block;
  box-shadow:0 0 0 2px #fff,0 0 0 3px rgba(15,23,42,.10)}
header.phsh .phsh-mb-acts .phsh-count{
  position:absolute;top:-5px;left:auto;right:-5px;min-width:15px;height:15px;padding:0 4px;
  border-radius:999px;background:#f97316;color:#fff;font-size:9.5px;font-weight:800;line-height:15px;
  text-align:center;box-shadow:0 0 0 2px #fff;
}

/* portrait phones: the original pill look, icon ABOVE the label inside every pill so
   all five sections keep both the icon and the full word; sign-out chip stays hidden. */
@media (orientation:portrait) and (max-width:639.98px){
  header.phsh .phsh-mb{padding:4px 8px;gap:5px}
  header.phsh .phsh-mb > .phsh-brand img{height:40px !important;width:40px !important;max-width:none !important}
  header.phsh .phsh-mb-nav{gap:1px}
  header.phsh .phsh-mb-nav a{flex-direction:column;height:39px;gap:1px;padding:0 2px;border-radius:14px;
    font-size:9.3px;justify-content:center;white-space:nowrap}
  header.phsh .phsh-mb-nav a svg{display:block;width:14px;height:14px}
  header.phsh .phsh-mb-nav a > span{overflow:visible;text-overflow:clip}
  header.phsh .phsh-mb-nav a:last-child{font-size:8.5px;letter-spacing:-.3px}
  header.phsh .phsh-mb-acts .phsh-act{height:32px;min-width:32px;width:32px}
  header.phsh .phsh-mb-acts .phsh-av{width:30px;height:30px}
  /* guests: the login pill must stay content-sized (it inherited the 32px square) */
  header.phsh .phsh-mb-acts .phsh-login{width:auto;min-width:0;padding:0 10px;gap:4px;font-size:10.5px}
  header.phsh .phsh-mb-acts .phsh-out-m{display:none !important}
}
@media (orientation:portrait){ header.phsh .phsh-mb-acts .phsh-out-m{display:none !important} }
/* landscape phones: icons come back, the row breathes more */
@media (orientation:landscape){
  header.phsh .phsh-mb{padding:8px 14px;gap:12px}
  /* wide screens keep natural-width pills, centred — not stretched */
  header.phsh .phsh-mb-nav{flex:0 1 auto;justify-content:center}
  header.phsh .phsh-mb-nav a{flex:0 0 auto;padding:0 15px;font-size:11px;gap:6px}
  header.phsh .phsh-mb-nav a svg{width:13px;height:13px}
  header.phsh .phsh-mb-acts{gap:6px}
}
@media (max-width:413.98px){
  header.phsh .phsh-mb{padding:7px 8px;gap:6px}
  header.phsh .phsh-mb > .phsh-brand img{height:36px !important;width:36px !important;max-width:none !important}
  header.phsh .phsh-mb-nav{gap:2px}
  header.phsh .phsh-mb-nav a{height:32px;font-size:clamp(7.2px,1.95vw,10px)}
  header.phsh .phsh-mb-acts{gap:4px}
  header.phsh .phsh-mb-acts .phsh-act{height:32px;min-width:32px;width:32px}
  header.phsh .phsh-mb-acts .phsh-av{width:30px;height:30px}
}
html.ph-night header.phsh .phsh-mb-nav a,body.ph-night header.phsh .phsh-mb-nav a{
  background:rgba(255,255,255,.055);border-color:rgba(255,255,255,.10);color:#cbd5e1;box-shadow:none}
html.ph-night header.phsh .phsh-mb-acts .phsh-act,body.ph-night header.phsh .phsh-mb-acts .phsh-act{
  background:rgba(255,255,255,.055);border-color:rgba(255,255,255,.10);color:#cbd5e1;box-shadow:none}
html.ph-night header.phsh .phsh-mb-acts .phsh-cart,body.ph-night header.phsh .phsh-mb-acts .phsh-cart{color:#fdba74;background:rgba(249,115,22,.14);border-color:rgba(249,115,22,.28)}
html.ph-night header.phsh .phsh-mb-acts .phsh-wallet,body.ph-night header.phsh .phsh-mb-acts .phsh-wallet{color:#93c5fd;background:rgba(37,99,235,.16);border-color:rgba(37,99,235,.3)}
html.ph-night header.phsh .phsh-mb-acts .phsh-av,body.ph-night header.phsh .phsh-mb-acts .phsh-av{box-shadow:0 0 0 2px #0f172a,0 0 0 3px rgba(147,197,253,.35)}
header.phsh .phsh-mb-acts .phsh-count{font-variant-numeric:tabular-nums}
/* home reads as a different pill: soft blue surface + deep blue icon, even when inactive */
header.phsh .phsh-nav a[href="/"] svg,
header.phsh .phsh-mb-nav a[href="/"] svg{color:#1d4ed8}
header.phsh .phsh-mb-nav a[href="/"]{background:#eaf2ff;border-color:rgba(29,78,216,.28);color:#1d4ed8;
  box-shadow:0 2px 8px -6px rgba(29,78,216,.55)}
header.phsh .phsh-mb-nav a[href="/"]:hover:not(.is-active){background:#dfeaff;color:#1e40af}
header.phsh .phsh-nav a[href="/"].is-active svg,
header.phsh .phsh-mb-nav a[href="/"].is-active svg{color:#fff}
header.phsh .phsh-mb-nav a[href="/"].is-active{background:linear-gradient(135deg,#1d4ed8,#3b82f6);border-color:transparent}
html.ph-night header.phsh .phsh-nav a[href="/"] svg,body.ph-night header.phsh .phsh-nav a[href="/"] svg,
html.ph-night header.phsh .phsh-mb-nav a[href="/"] svg,body.ph-night header.phsh .phsh-mb-nav a[href="/"] svg{color:#93c5fd}
html.ph-night header.phsh .phsh-mb-nav a[href="/"],body.ph-night header.phsh .phsh-mb-nav a[href="/"]{
  background:rgba(37,99,235,.20);border-color:rgba(147,197,253,.35);color:#bfdbfe;box-shadow:none}


/* the desktop bar is the ONLY one above 1024px */
@media (min-width:1024px){header.phsh .phsh-mb{display:none}}

/* guests: login pill is content-sized at every width (the 32px square rule for icon chips
   was winning on <=414px, clipping the word) */
header.phsh .phsh-mb-acts a.phsh-login{width:auto!important;min-width:0!important;padding:0 11px!important;gap:5px}

/* the day/night switch is 46x24 — expand its touch target to ~44px without moving it */
#ph-tb-toggle{position:relative;touch-action:manipulation}
#ph-tb-toggle::after{content:"";position:absolute;inset:-9px;border-radius:999px}

/* night: the shop glass header is see-through, so light chips had no contrast — give the
   header a solid night surface and lift the chip/label colours. */
html.ph-night header.phsh,html.ph-night header.sticky{
  background:rgba(8,17,30,.95)!important;border-bottom-color:rgba(255,255,255,.07)!important}
html.ph-night header.phsh .phsh-mb-nav a{
  background:rgba(255,255,255,.10)!important;border-color:rgba(255,255,255,.16)!important;color:#e8f0fb!important}
html.ph-night header.phsh .phsh-mb-nav a svg{color:#cbd5e1}
html.ph-night header.phsh .phsh-mb-nav a[href="/"]{
  background:rgba(37,99,235,.30)!important;border-color:rgba(147,197,253,.45)!important;color:#eaf3ff!important}
html.ph-night header.phsh .phsh-mb-nav a[href="/"] svg{color:#bfdbfe}
html.ph-night header.phsh .phsh-mb-nav a.is-active{background:linear-gradient(135deg,#2563eb,#3b82f6)!important;color:#fff!important}

/* ---------- shell pages (portals / CMS / games): reserve the header bar while it loads ----------
   #ph-hdr is filled asynchronously from site_settings; an empty div used to collapse to 1px,
   so the whole page jumped up and then down. Keep a matching white bar in place. */
#ph-hdr:empty{min-height:52px;background:#fff}
@media (min-width:640px){#ph-hdr:empty{min-height:64px}}
@media (min-width:1024px){#ph-hdr:empty{min-height:78px}}
html.ph-night #ph-hdr:empty{background:#0b1220}

/* brand mark: one square box, art keeps its aspect inside (added 2026-10-24) */
header.phsh .phsh-brand img{width:56px !important;height:56px !important;max-width:none !important;max-height:none !important;aspect-ratio:1/1;object-fit:contain}
@media (min-width:640px){header.phsh .phsh-brand img{width:64px !important;height:64px !important;max-width:none !important}}
@media (min-width:1024px){header.phsh .phsh-brand img{width:70px !important;height:70px !important;max-width:none !important}}
@media (max-width:413.98px){header.phsh .phsh-brand img{width:44px !important;height:44px !important;max-width:none !important}}
@media (min-width:1024px){header.phsh .phsh-mb > .phsh-brand img{width:38px !important;height:38px !important}}

/* ---------- 2026-10-24: header spacing — nav sits next to the logo, actions pinned to the far side ---------- */
header.phsh .phsh-row{justify-content:flex-start}
header.phsh .phsh-row > .phsh-brand{flex:0 1 auto !important}
header.phsh .phsh-row > .phsh-acts{margin-inline-start:auto}

/* 1024–1279 with a full action cluster: icon-only nav keeps the row from crushing the logo */
@media (min-width:1024px) and (max-width:1279.98px){
  header.phsh .phsh-row .phsh-nav a{width:34px;padding:5px;justify-content:center;font-size:0;line-height:0}
  header.phsh .phsh-row .phsh-nav a svg{display:block;width:16px;height:16px;padding:0;border-radius:0}
  header.phsh .phsh-row .phsh-acts{gap:6px}
}
