html { scroll-behavior: smooth; }
body.ph-site { min-height: 100vh; overflow-x: clip; background-color: var(--ph-shell-background); background-image: var(--ph-shell-glow); color: var(--ph-text); font: 16px var(--ph-body) !important; transition: background-color .4s ease,color .4s ease; }
body.ph-site:has(.ph-games-hero,.support-page,.ph-about-page,.ph-how,.ph-terms-page) { background: var(--ph-page-background) fixed; }
.ph-site *, .ph-site *::before, .ph-site *::after { box-sizing: border-box; }
.ph-site [hidden] { display: none !important; }
.ph-site #main { font-family: var(--ph-body) !important; }
.ph-site h1, .ph-site h2, .ph-site h3, .ph-site h4 { font-family: var(--ph-display) !important; }
body.ph-site #main :is(h1,h2,h3,h4){font-family:var(--ph-display)!important}
body.ph-site #main :is(p,li,label,input,textarea,select,button,small,time){font-family:var(--ph-body)!important}
.ph-site a { color: inherit; }
.ph-site :focus-visible { outline: 2px solid var(--ph-primary); outline-offset: 3px; }
.ph-site input[type=search]:focus { outline:none;outline-offset:0;border-color:var(--ph-focus-line);box-shadow:0 0 0 1px var(--ph-focus-line); }
.ph-site input[type=search]:focus-visible { outline:2px solid var(--ph-focus-line);outline-offset:2px;box-shadow:none; }
.ph-site #main { width: 100%; min-height: 65vh; }
.ph-site .wrap { max-width: 1280px; width: min(100% - 40px, 1280px); margin-inline: auto; }

.ph-nav-wrap { position: sticky; top: 0; z-index: 1090; padding: 20px 20px 0; }
.ph-navbar { height: 72px; padding: 0 24px; border: 1px solid var(--ph-line); border-radius: 14px; background: rgba(23,28,36,.7);box-shadow:0 8px 28px rgba(0,0,0,.16); backdrop-filter: blur(20px); transition: transform .5s cubic-bezier(.23,1,.32,1),border-color .5s,box-shadow .5s; }
.ph-nav-inner { width: 100%; height: 100%; margin: auto; display: grid; grid-template-columns: minmax(0,1fr) auto minmax(max-content,1fr); align-items: center; gap: 16px; }
.ph-nav-brand { min-width: 0; }
.ph-nav-brand .logo { display: inline-flex; align-items: center; gap: 11px; color: #fff; text-decoration: none; white-space: nowrap; font: 800 clamp(19px,2vw,29px)/1 var(--ph-display); letter-spacing: -.05em; }
.ph-nav-brand .logo { height: 58px; overflow: hidden; }
.ph-nav-brand .store-logo { display: block; width: auto; max-width: min(240px,100%); max-height: 48px; height: auto; object-fit: contain; }

.ph-language { display: inline-flex; align-items: center; gap: 8px; flex: none; padding: 8px 13px; border: 1px solid rgba(255,255,255,.1); border-radius: 20px; background: rgba(255,255,255,.06); font-size: 14px; }
.ph-language-form{display:flex;align-items:center;gap:5px;margin:0;min-width:0}
.ph-language-flag{display:grid;place-items:center;width:44px;min-height:44px;padding:6px;border:1px solid transparent;border-radius:9px;background:transparent;cursor:pointer;transition:background .15s,border-color .15s}
.ph-language-flag img{display:block;width:24px;height:16px;object-fit:cover;border-radius:2px}
.ph-language-flag:hover,.ph-language-flag.is-active{border-color:var(--ph-line);background:rgba(255,255,255,.07)}
.ph-language-flag:focus-visible{outline:2px solid var(--ph-primary);outline-offset:3px}
.ph-mobile-settings .ph-language-form{display:flex;padding:10px;justify-content:flex-start;gap:8px}

.ph-flag-tr { display:grid;place-items:center;width:22px;height:15px;border-radius:2px;background:#e30a17;color:#fff;font-size:10px;letter-spacing:-2px;line-height:1; }
.ph-primary-nav { display:flex;align-items:center;gap:8px; }
.ph-primary-nav a { position:relative;display:inline-flex;align-items:center;gap:7px;min-height:48px;padding:0 12px;color:var(--ph-muted);text-decoration:none;white-space:nowrap;font:600 14px var(--ph-body);transition:color .2s; }
.ph-primary-nav a::after { content:"";position:absolute;bottom:3px;left:12px;right:12px;height:2px;border-radius:2px;background:var(--ph-rgb-line);box-shadow:0 3px 9px #8d8adb55;transform:scaleX(0);transition:transform .2s; }
.ph-primary-nav a:hover,.ph-primary-nav a[aria-current="page"] { color:var(--ph-text); }
.ph-primary-nav a:hover::after,.ph-primary-nav a:focus-visible::after,.ph-primary-nav a[aria-current="page"]::after { transform:scaleX(1); }
.ph-primary-nav .icon,.ph-nav-actions .icon { width:17px;height:17px;flex:none; }
.ph-nav-delivery { display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:0 16px;border:1px solid color-mix(in srgb,var(--ph-primary) 55%,transparent);border-radius:10px;background:color-mix(in srgb,var(--ph-primary) 20%,#17202c);color:#fff;text-decoration:none;white-space:nowrap;font:600 13px var(--ph-body);transition:background .2s,border-color .2s; }
.ph-nav-delivery:hover { background:color-mix(in srgb,var(--ph-primary) 30%,#17202c);border-color:var(--ph-primary); }
.ph-delivery-short { display:none; }
.ph-nav-actions { display: flex; align-items: center;gap:10px; min-width: 0; justify-self: end; }
.ph-nav-icon, .ph-account-menu > summary, .ph-mobile-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 7px;min-width:44px;min-height:44px; padding: 0 11px; border: 1px solid rgba(255,255,255,.1); border-radius: 10px; background: rgba(255,255,255,.06); color: #f7fafc; text-decoration: none; cursor: pointer; font: 600 13px var(--ph-body); }
.ph-nav-icon:hover, .ph-account-menu > summary:hover, .ph-mobile-toggle:hover { border-color: color-mix(in srgb,var(--ph-primary) 45%,transparent); background: color-mix(in srgb,var(--ph-primary) 14%,transparent); }
.ph-nav-icon { position: relative; }
.ph-notification-count { position: absolute; top: -7px; right: -7px; display: grid; place-items: center;min-width:22px;height:22px;padding:0 5px; border-radius: 999px; background: #e3445e; color: #fff;font-size:11px;font-weight:700;border:2px solid var(--ph-darker);}
.ph-account-menu { position: relative; }
.ph-account-menu > summary { position:relative;list-style:none;width:44px;padding:0; }
.ph-account-menu > summary::after { content:"";position:absolute;left:7px;right:7px;bottom:-2px;height:2px;border-radius:3px;background:var(--ph-rgb-line);box-shadow:0 3px 9px #8d8adb66;opacity:0;transition:opacity .2s; }
.ph-account-menu > summary:hover::after,.ph-account-menu > summary:focus-visible::after,.ph-account-menu[open] > summary::after { opacity:1; }
.ph-account-menu > summary > span { display:none; }
.ph-account-menu > summary::-webkit-details-marker { display: none; }
.ph-account-links { position: absolute; top:calc(100% + 24px);right:0;width:300px; max-width:calc(100vw - 24px);max-height:calc(100dvh - 120px);overflow-y:auto;overscroll-behavior:contain;padding:8px; border: 1px solid var(--ph-line); border-radius: 12px; background: #1a2331; box-shadow: 0 18px 42px rgba(0,0,0,.4); }
.ph-account-links a, .ph-account-links button { position:relative;display:flex;align-items:center;gap:11px;width:100%;padding:12px; border: 0; border-radius: 7px; background: transparent; color: var(--ph-text); text-align: left; text-decoration: none; font: 500 13px var(--ph-body); cursor: pointer;min-height:44px;}
.ph-account-links a:hover,.ph-account-links button:hover { background:rgba(255,255,255,.045); }
.ph-account-links :is(a,button)::after { content:"";position:absolute;left:12px;right:12px;bottom:0;height:1px;border-radius:2px;background:linear-gradient(90deg,#66bfd500,#66bfd5,#9180db,#d486b9,#77cbb300);box-shadow:0 2px 8px #8d8adb55;opacity:0;transition:opacity .2s;pointer-events:none; }
.ph-account-links :is(a,button):hover::after,.ph-account-links :is(a,button):focus-visible::after { opacity:1; }
.ph-account-links .ph-account-identity { gap:12px;padding:12px 10px 18px;margin-bottom:6px;border-bottom:1px solid var(--ph-line);border-radius:8px 8px 0 0; }
.ph-account-avatar { display:grid;place-items:center;flex:none;width:42px;height:42px;border:1px solid #ffffff1a;border-radius:14px;background:linear-gradient(140deg,#314353,#35354b);color:#f4f7fb;font-size:18px;font-weight:700; }
.ph-account-person { display:flex;flex-direction:column;gap:7px;min-width:0; }
.ph-account-person > strong { display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px;line-height:1.4; }
.ph-account-level { display:flex;align-items:center;gap:5px;color:#bbcadc;font-size:12px;line-height:1.5; }
.ph-account-level small { color:var(--ph-muted);font-size:11px; }
.ph-account-welcome { display:flex;flex-direction:column;gap:7px;margin:4px 4px 8px;padding:12px 8px 16px;border-bottom:1px solid var(--ph-line); }
.ph-account-welcome strong { font-size:14px; }
.ph-account-welcome > span { font-size:12px;color:var(--ph-muted); }
.ph-account-emoji { width:20px;flex:none;text-align:center;font-size:16px;line-height:1.4; }
.ph-preference-control[aria-pressed="false"] > .ph-account-emoji { opacity:.5; }
.ph-mobile-toggle, .ph-mobile-menu, .ph-bottom-nav { display: none; }
.ph-account-links .ph-account-notifications { display:none; }
.ph-account-notifications strong { margin-left:auto;min-width:24px;padding:2px 6px;border-radius:6px;background:#e3445e;color:#fff;text-align:center;font-size:11px; }
.ph-account-preferences { margin-top:8px;padding-top:8px;border-top:1px solid var(--ph-line); }
.ph-account-links .ph-preference-control { display:flex;align-items:center;gap:10px; }
.ph-preference-control > :first-child { width:18px;flex:none;text-align:center; }
.ph-preference-state { margin-left:auto;color:var(--ph-muted);font-size:11px; }
.ph-preference-control[aria-pressed="true"] .ph-state-off,.ph-preference-control[aria-pressed="false"] .ph-state-on { display:none; }
.ph-preference-control[aria-pressed="true"] .ph-preference-state { color:#a4d6c1; }

.ph-footer { position:relative;padding:40px 24px 24px; border-top: 2px solid transparent; border-image:linear-gradient(90deg,#06bfff,#2d73ff) 1; background: #1f2134; color: #c7d5e0; }
body.ph-site:has(.ph-home-hero) .ph-footer { background: transparent; backdrop-filter: blur(20px); box-shadow: 0 -10px 40px rgba(0,0,0,.2); }
.ph-footer-grid {width:min(100%,1200px);margin:0 auto 32px; display: grid; grid-template-columns: repeat(4,minmax(0,1fr));gap:32px; }
.ph-footer-grid > nav, .ph-footer-grid > div { display: flex; flex-direction: column; align-items: stretch; }
.ph-footer-grid h2 { position: relative;align-self:flex-start;margin:0 0 20px; padding-bottom: 8px; color: #f7fafc;font-size:16px;line-height:1.4; font-weight: 600;text-align:left; }
.ph-footer-grid h2::after { content: ''; position: absolute; bottom: 0;left:0;width:28px; height: 2px;transform:none; background: var(--ph-primary); }
body.ph-site .ph-footer-grid h2 { letter-spacing: normal; }
.ph-footer-grid a {margin-bottom:0; color: var(--ph-muted);font-size:14px;line-height:20px; text-decoration: none;min-height:44px;padding-block:12px;}
.ph-footer-grid nav a::before { content: '›'; margin-right: 9px; color: var(--ph-muted); }
.ph-footer-grid a:hover, .ph-footer-bottom a:hover { color: var(--ph-primary); }
.ph-footer-grid p {margin:0 0 16px; color: var(--ph-muted); font-size: 14px; line-height: 1.6;text-align:left; }
.ph-footer-news a {text-align:left; }
.ph-footer-bottom { width: min(100% - 40px,1140px); margin: auto; padding: 18px 0 26px; display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 12px; border-top: 1px solid rgba(255,255,255,.07); color: #b4c9ef; text-align: center; font-size: 13px; }
.ph-footer-bottom div { display: flex; flex-wrap: wrap; gap: 5px 12px; }
.ph-footer-bottom a { color: #fff; text-decoration: none; }

@media (max-width: 1280px) {
  .ph-nav-inner { grid-template-columns:minmax(0,1fr) auto; }
  .ph-primary-nav,.ph-nav-actions>.ph-language-form,.ph-nav-actions>.ph-language,.ph-nav-notifications { display:none; }
  .ph-mobile-toggle { display:inline-flex;width:44px;padding:0; }
  .ph-account-links .ph-account-notifications { display:flex;align-items:center;gap:10px; }
  .ph-account-links { right:-54px; }
  .ph-mobile-menu:not([hidden]) { display:block; }
}
@media (max-width: 700px) {
  .ph-nav-wrap { padding:12px 6px 0; }
  .ph-nav-inner { gap:8px; }
  .ph-navbar { height:60px;padding:0 10px;border-radius:12px; }
  .ph-nav-brand .logo { height:44px;max-width:100%; }
  .ph-nav-brand .store-logo { max-width:min(190px,100%);max-height:44px; }
  .ph-nav-actions { gap:6px; }
  .ph-nav-delivery { gap:5px;padding:0 9px;font-size:12px; }
  .ph-nav-delivery .icon { width:15px;height:15px; }
  .ph-delivery-label { display:none; }
  .ph-delivery-short { display:inline; }
  .ph-account-links { top:calc(100% + 18px);right:-50px;max-height:calc(100dvh - 164px); }
  .ph-bottom-nav { display: grid; position: fixed; z-index: 1080; bottom: 0; left: 0; right: 0; grid-template-columns: repeat(5,1fr); min-height: 58px; padding-bottom: env(safe-area-inset-bottom); border-top: 1px solid var(--ph-line); background: rgba(17,23,34,.96); backdrop-filter: blur(16px); }
  .ph-bottom-nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 0; color: var(--ph-muted); text-decoration: none; font-size: 9px; }
  .ph-bottom-nav a .icon { width: 17px; height: 17px; }
  .ph-bottom-nav a[aria-current="page"] { color: var(--ph-primary); }
  .ph-bottom-nav .ph-bottom-primary { color: #fff; }
  .ph-bottom-nav .ph-bottom-primary .icon { width: 22px; height: 22px; filter: drop-shadow(0 0 8px color-mix(in srgb,var(--ph-primary) 70%,transparent)); }
  .ph-site .wrap { width: min(100% - 24px,1280px); }
  .ph-footer { padding-bottom: calc(78px + env(safe-area-inset-bottom)); }
  .ph-footer-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 24px; width:100%; }
  .ph-footer-grid h2 { margin-top: 16px; font-size: 16px; line-height: 20px; }
  .ph-footer-grid a { min-height:44px; margin-bottom:0; padding-block:12px; font-size:14px; line-height:20px; overflow-wrap:anywhere; }
  .ph-footer-bottom { font-size: 11px; }
}
@media (max-width: 380px) { .ph-footer-grid { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ph-site *, .ph-site *::before, .ph-site *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Shared storefront typography in the current reference system. */
body.ph-site :is(p,span,li,a,td,input,select,textarea,label,button,summary) {
  font-family: var(--ph-body) !important;
}
body.ph-site :is(h1,h2,h3,h4,h5,h6,.price,.stat strong,.btn,.eyebrow) {
  font-family: var(--ph-display) !important;
}
body.ph-site :is(h1,h2,h3,h4,h5,h6) :is(span,em,strong) {
  font-family: inherit !important;
}
body.ph-site :is(code,kbd,time) {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace !important;
}
body.ph-site :is(h1,h2,h3,h4,h5,h6) {
  letter-spacing: -.035em;
}
body.ph-site .btn:not(.text) {
  border-radius: 10px;
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;}
body.ph-site :is(.pill,.home-badge-tag) {
  border-radius: 999px;
  font-family: var(--ph-body) !important;
  letter-spacing: 0;
}

/* Shared dialogs follow the current surface family, including search and library. */
body.ph-site dialog:not(.ph-welcome-dialog) {
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  margin: 0 !important;
  width: min(680px, calc(100% - 32px)) !important;
  max-height: calc(100dvh - 80px) !important;
  display: flex !important;
  flex-direction: column;
  overflow: hidden !important;
  padding: 0 !important;border:1px solid rgba(199,213,224,.2) !important;
  border-radius: 16px !important;background:var(--ph-dark) !important;
  color: var(--ph-text) !important;
  box-shadow: 0 24px 70px #0009 !important;
  z-index: 9999;
}
body.ph-site dialog:not([open]) { display: none !important; }
body.ph-site dialog::backdrop { background: #050a14bc !important; backdrop-filter: blur(8px); }
body.ph-site .dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;padding:16px 20px;background:var(--ph-dark) !important;border-bottom:1px solid var(--ph-line) !important;
}
body.ph-site .dialog-header h2 { color: var(--ph-text) !important; }
body.ph-site .dialog-header h2 { margin: 0; font-size: 1.18rem; font-weight: 600; }
body.ph-site .dialog-header .icon-button {
  display: inline-grid;
  place-items: center;width:44px;height:44px;min-width:44px;min-height:44px;
  padding: 0;
  border-radius: 10px !important;background:rgba(255,255,255,.04) !important;border-color:var(--ph-line) !important;
  color: var(--ph-text) !important;
}
body.ph-site .dialog-header .icon-button:hover { border-color: var(--ph-primary) !important; }
body.ph-site .dialog-content {
  min-height: 0;
  max-height: calc(100dvh - 160px);
  overflow-y: auto;
  overscroll-behavior: contain;padding:24px 20px;scrollbar-gutter:stable;}
body.ph-site .dialog-header .icon { width: 16px; height: 16px; }
body.ph-site .btn .icon { width: 16px; height: 16px; }
@media print {
  body.ph-site :is(.ph-nav-wrap,.ph-footer,.ph-bottom-nav,.back-to-top,.toast,dialog,
    .guide-reading-tools,.guide-progress,.toc,.code-value,[data-secret]) { display: none !important; }
  body.ph-site .wrap { width: 100%; max-width: none; }
  body.ph-site .guide-layout { display: block; }
  body.ph-site .guide-step { break-inside: avoid; }
}

@media (prefers-reduced-motion: reduce) { body.ph-site { transition: none; } }

html:has(dialog[open]){overflow:hidden}
body.ph-site dialog.ph-mobile-menu{top:92px!important;left:0!important;transform:none!important;width:100%!important;height:calc(100dvh - 92px);max-height:calc(100dvh - 92px)!important;border:0!important;border-radius:0!important;padding:24px 20px!important;overflow-y:auto!important;background:#0c1015!important}
@media(max-width:700px){body.ph-site dialog.ph-mobile-menu{top:72px!important;height:calc(100dvh - 72px);max-height:calc(100dvh - 72px)!important}}
.ph-mobile-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:22px}.ph-mobile-heading h2{margin:0;font-size:21px}.ph-mobile-heading button{display:grid;place-items:center;width:40px;height:40px;border:0;background:none;color:var(--ph-text);cursor:pointer}
.ph-mobile-menu nav{display:grid;gap:12px}.ph-mobile-menu nav a{display:flex;align-items:center;gap:10px;min-height:42px;padding:8px 16px;text-decoration:none;font-weight:600}.ph-mobile-menu .icon{width:20px;height:20px;flex:none}.ph-mobile-settings{border-top:1px solid var(--ph-line);margin-top:24px;padding-top:20px}

.ph-reference-cta{position:relative;isolation:isolate;overflow:hidden}
.ph-reference-cta::before{content:"";position:absolute;top:-50%;right:-10%;width:500px;height:500px;border-radius:50%;background:#ffffff1a;z-index:-1;pointer-events:none}
.ph-reference-cta::after{content:"";position:absolute;bottom:-30%;left:-5%;width:350px;height:350px;border-radius:50%;background:#ffffff14;z-index:-1;pointer-events:none}

.ph-account-identity .ph-account-avatar img{display:block;width:100%;height:100%;object-fit:cover;border-radius:inherit}
