/* Shared sticky site header used on every Sudoku Pro web page. */
:root{
  --site-header-ink:#13213f;
  --site-header-muted:#66738f;
  --site-header-line:#e3e8f2;
  --site-header-surface:rgba(255,255,255,.94);
  --site-header-blue:#238fe8;
}
.global-site-header{
  position:sticky;top:0;z-index:2000;
  border-bottom:1px solid var(--site-header-line);
  background:var(--site-header-surface);
  backdrop-filter:blur(18px);
  -webkit-backdrop-filter:blur(18px);
}
.global-site-header .gsh-inner{
  width:min(1420px,calc(100% - 32px));min-height:72px;margin:auto;
  display:flex;align-items:center;gap:20px;
}
.global-site-header .gsh-brand{display:flex;align-items:center;flex:0 0 auto;text-decoration:none}
.global-site-header .gsh-brand img{display:block;width:190px;height:50px;object-fit:contain}
.global-site-header .gsh-nav{display:flex;align-items:center;gap:4px;flex:1;justify-content:center}
.global-site-header .gsh-nav a{
  display:flex;align-items:center;min-height:40px;padding:8px 11px;border-radius:10px;
  color:var(--site-header-muted);font:700 13px/1.1 Inter,system-ui,-apple-system,"Segoe UI",sans-serif;
  text-decoration:none;white-space:nowrap
}
.global-site-header .gsh-nav a:hover,.global-site-header .gsh-nav a.active{
  color:var(--site-header-ink);background:#f3f7fc
}
.global-site-header .gsh-actions{display:flex;align-items:center;gap:8px;flex:0 0 auto}
.global-site-header .gsh-store{
  display:flex;align-items:center;gap:7px;min-height:38px;padding:7px 10px;border-radius:10px;
  background:#0e1420;color:#fff;text-decoration:none;border:1px solid #202838
}
.global-site-header .gsh-store svg{width:20px;height:20px;display:block}
.global-site-header .gsh-store span{font:800 11px/1 Inter,system-ui,-apple-system,"Segoe UI",sans-serif}
.global-site-header .gsh-icon{
  width:38px;height:38px;display:grid;place-items:center;border:1px solid var(--site-header-line);
  border-radius:10px;background:#fff;color:var(--site-header-ink);font:800 14px/1 system-ui;cursor:pointer
}
body.dark .global-site-header{
  --site-header-ink:#f6f8ff;--site-header-muted:#b8c2d9;--site-header-line:#30384f;
  --site-header-surface:rgba(18,22,34,.94)
}
body.dark .global-site-header .gsh-nav a:hover,
body.dark .global-site-header .gsh-nav a.active{background:#242b3f}
body.dark .global-site-header .gsh-icon{background:#1b2131;color:#fff;border-color:#30384f}
@media(max-width:1120px){
  .global-site-header .gsh-store span{display:none}
  .global-site-header .gsh-store{width:38px;justify-content:center;padding:7px}
  .global-site-header .gsh-nav a{padding-inline:8px;font-size:12px}
}
@media(max-width:820px){
  .global-site-header .gsh-inner{width:min(100% - 20px,1420px);min-height:64px;gap:10px}
  .global-site-header .gsh-brand img{width:154px;height:42px}
  .global-site-header .gsh-nav{overflow-x:auto;justify-content:flex-start;scrollbar-width:none}
  .global-site-header .gsh-nav::-webkit-scrollbar{display:none}
  .global-site-header .gsh-actions .gsh-store{display:none}
}
@media(max-width:560px){
  .global-site-header .gsh-brand img{width:132px}
  .global-site-header .gsh-nav a{font-size:11px;padding-inline:7px}
  .global-site-header .gsh-nav a[href="/#levels"],
  .global-site-header .gsh-nav a[href="/#variants"]{display:none}
}

/* Persistent page actions: Share + Settings on every secondary web page. */
.global-site-header{position:sticky;top:0}
.global-site-header + main .brand{display:none!important}
.gsh-actions{position:relative}
.gsh-popover{
  position:absolute;
  top:calc(100% + 8px);
  right:max(16px,calc((100vw - min(1420px,100vw - 32px))/2));
  z-index:2100;
  width:min(310px,calc(100vw - 28px));
  padding:12px;
  border:1px solid var(--site-header-line);
  border-radius:16px;
  background:var(--site-header-surface);
  box-shadow:0 18px 45px rgba(25,45,84,.18);
  backdrop-filter:blur(18px);
}
html[dir="rtl"] .gsh-popover{
  right:auto;
  left:max(16px,calc((100vw - min(1420px,100vw - 32px))/2));
}
.gsh-setting-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:8px;
  color:var(--site-header-ink);
  font:750 12px/1.2 Inter,system-ui,-apple-system,"Segoe UI",sans-serif;
}
.gsh-setting-row>div{display:flex;gap:6px}
.gsh-setting-row button{
  min-width:48px;
  min-height:34px;
  border:1px solid var(--site-header-line);
  border-radius:9px;
  background:transparent;
  color:var(--site-header-ink);
  font:800 11px/1 system-ui;
  cursor:pointer;
}
.gsh-setting-row button.active{
  border-color:#2e87e8;
  background:#eaf4ff;
  color:#176bc7;
}
body.dark .gsh-setting-row button.active{background:#253755;color:#9fc8ff}
@media(max-width:820px){
  .global-site-header .gsh-actions{gap:6px}
  .global-site-header .gsh-icon{width:36px;height:36px}
}

/* Prevent the persistent header from widening small screens. */
.global-site-header .gsh-inner,
.global-site-header .gsh-nav,
.global-site-header .gsh-actions{min-width:0}
@media(max-width:560px){
  .global-site-header .gsh-inner{
    width:calc(100% - 12px);
    gap:6px;
  }
  .global-site-header .gsh-brand img{
    width:104px;
    height:38px;
  }
  .global-site-header .gsh-nav{
    flex:1 1 0;
    min-width:0;
    gap:2px;
  }
  .global-site-header .gsh-nav a{
    flex:0 0 auto;
    font-size:10px;
    padding-inline:6px;
    min-height:34px;
  }
  .global-site-header .gsh-actions{
    flex:0 0 auto;
    gap:4px;
  }
  .global-site-header .gsh-icon{
    width:34px;
    height:34px;
  }
}


/* Final small-screen header layout: brand/actions first row, navigation second row. */
@media(max-width:700px){
  .global-site-header .gsh-inner{
    width:calc(100% - 12px)!important;
    min-height:auto!important;
    padding:7px 0 6px!important;
    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto!important;
    grid-template-areas:
      "brand actions"
      "nav nav"!important;
    gap:6px 8px!important;
  }
  .global-site-header .gsh-brand{grid-area:brand!important;min-width:0!important}
  .global-site-header .gsh-brand img{
    width:min(132px,42vw)!important;
    height:38px!important;
    object-fit:contain!important;
    object-position:left center!important;
  }
  html[dir="rtl"] .global-site-header .gsh-brand img{object-position:right center!important}
  .global-site-header .gsh-actions{
    grid-area:actions!important;
    justify-self:end!important;
    min-width:0!important;
  }
  .global-site-header .gsh-nav{
    grid-area:nav!important;
    width:100%!important;
    min-width:0!important;
    overflow-x:auto!important;
    justify-content:flex-start!important;
    gap:5px!important;
    padding-bottom:1px!important;
  }
  .global-site-header .gsh-nav a{
    flex:0 0 auto!important;
    min-height:32px!important;
    padding:6px 8px!important;
    font-size:10.5px!important;
    border:1px solid var(--site-header-line)!important;
    background:color-mix(in srgb,var(--site-header-surface) 92%,transparent)!important;
  }
  .global-site-header .gsh-nav a[href="/#levels"],
  .global-site-header .gsh-nav a[href="/#variants"]{display:flex!important}
  .global-site-header .gsh-icon{width:34px!important;height:34px!important}
  .global-site-header .gsh-actions .gsh-store{display:none!important}
}

/* The shared header owns page-level share/settings controls; avoid duplicate action buttons below it. */
.global-site-header + .shell .top-actions{
  display:none!important;
}

/* Persistent compact store dock */
.floating-store-dock{
  position:fixed;right:12px;top:50%;transform:translateY(-50%);
  z-index:1850;display:grid;gap:8px
}
.floating-store{
  width:48px;height:48px;display:flex;align-items:center;justify-content:center;
  border-radius:14px;background:#0f1421;color:#fff;text-decoration:none;
  border:1px solid #263047;box-shadow:0 12px 30px rgba(18,35,67,.18);
  transition:.18s ease;overflow:hidden
}
.floating-store svg{width:25px;height:25px;flex:0 0 auto}
.floating-store span{
  width:0;opacity:0;overflow:hidden;white-space:nowrap;
  font:800 11px/1 system-ui;transition:.18s ease
}
.floating-store:hover{
  width:150px;justify-content:flex-start;gap:9px;padding:0 12px;
  text-decoration:none;transform:translateX(-2px)
}
.floating-store:hover span{width:auto;opacity:1}
html[dir="rtl"] .floating-store-dock{right:auto;left:12px}
html[dir="rtl"] .floating-store:hover{transform:translateX(2px)}
@media(max-width:720px){
  .floating-store-dock{
    top:auto;bottom:12px;right:12px;transform:none;
    grid-template-columns:repeat(2,44px)
  }
  html[dir="rtl"] .floating-store-dock{left:12px;right:auto}
  .floating-store{width:44px;height:44px;border-radius:13px}
  .floating-store:hover{width:44px;padding:0;justify-content:center;transform:none}
  .floating-store:hover span{display:none}
}

/* Mobile: keep Google Play visible in the top header as requested. */
@media(max-width:700px){
  .global-site-header .gsh-actions .gsh-store:first-of-type{
    display:flex!important;
    width:34px!important;height:34px!important;min-height:34px!important;
    padding:5px!important;justify-content:center!important;border-radius:9px!important
  }
  .global-site-header .gsh-actions .gsh-store:first-of-type svg{
    width:20px!important;height:20px!important
  }
  .global-site-header .gsh-actions .gsh-store:first-of-type span{display:none!important}
  .global-site-header .gsh-actions .gsh-store:nth-of-type(2){display:none!important}
}


/* 2026-09-30 floating store dock: fixed anchor + compact visible labels.
   Hovered item expands inward; its sibling never shifts. */
.floating-store-dock{
  width:76px!important;
  justify-items:end!important;
  overflow:visible!important;
}
.floating-store{
  position:relative!important;
  justify-self:end!important;
  width:72px!important;
  min-width:72px!important;
  justify-content:flex-start!important;
  gap:7px!important;
  padding:0 10px!important;
  overflow:hidden!important;
  transform:none!important;
}
.floating-store::after{
  display:block;
  min-width:0;
  color:#fff;
  font:850 10px/1 system-ui,-apple-system,"Segoe UI",sans-serif;
  letter-spacing:.01em;
  white-space:nowrap;
}
.floating-store.google::after{content:"Play"}
.floating-store.microsoft::after{content:"Win"}
.floating-store span{
  position:absolute!important;
  left:45px!important;
  width:0!important;
  max-width:0!important;
  opacity:0!important;
  overflow:hidden!important;
  white-space:nowrap!important;
  transition:opacity .16s ease,max-width .18s ease!important;
}
.floating-store:hover{
  width:174px!important;
  min-width:174px!important;
  padding:0 12px!important;
  gap:9px!important;
  transform:none!important;
  z-index:3!important;
}
.floating-store:hover::after{display:none!important}
.floating-store:hover span{
  position:static!important;
  width:auto!important;
  max-width:120px!important;
  opacity:1!important;
  overflow:visible!important;
}
html[dir="rtl"] .floating-store{
  justify-self:start!important;
}
html[dir="rtl"] .floating-store span{
  left:auto!important;
  right:45px!important;
}
@media(max-width:720px){
  .floating-store-dock{
    width:auto!important;
    justify-items:stretch!important;
    grid-template-columns:repeat(2,54px)!important;
  }
  .floating-store{
    width:54px!important;
    min-width:54px!important;
    height:46px!important;
    padding:0!important;
    justify-content:center!important;
  }
  .floating-store::after{display:none!important}
  .floating-store:hover{
    width:54px!important;
    min-width:54px!important;
    padding:0!important;
    justify-content:center!important;
  }
  .floating-store:hover span{display:none!important}
}


/* ===== Final floating store dock: sibling buttons never move or disappear ===== */
.floating-store-dock{
  width:196px!important;
  right:12px!important;
  left:auto!important;
  top:50%!important;
  transform:translateY(-50%)!important;
  display:grid!important;
  gap:9px!important;
  justify-items:end!important;
  overflow:visible!important;
  pointer-events:none!important;
}
.floating-store{
  pointer-events:auto!important;
  width:92px!important;
  min-width:92px!important;
  height:48px!important;
  margin-left:auto!important;
  justify-self:end!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:8px!important;
  padding:0 11px!important;
  overflow:hidden!important;
  transform:none!important;
  transition:width .18s ease,box-shadow .18s ease,filter .18s ease!important;
}
.floating-store::after{
  display:block!important;
  color:#fff!important;
  font:850 10px/1 system-ui,-apple-system,"Segoe UI",sans-serif!important;
  white-space:nowrap!important;
}
.floating-store.google::after{content:"Play"!important}
.floating-store.microsoft::after{content:"Windows"!important}
.floating-store span{
  position:absolute!important;
  opacity:0!important;
  width:0!important;
  max-width:0!important;
  overflow:hidden!important;
  white-space:nowrap!important;
}
.floating-store:hover{
  width:196px!important;
  min-width:196px!important;
  padding:0 13px!important;
  box-shadow:0 15px 34px rgba(18,35,67,.26)!important;
  filter:brightness(1.05)!important;
}
.floating-store:hover::after{display:none!important}
.floating-store:hover span{
  position:static!important;
  opacity:1!important;
  width:auto!important;
  max-width:150px!important;
  overflow:visible!important;
}
html[dir="rtl"] .floating-store-dock{
  left:12px!important;
  right:auto!important;
  justify-items:start!important;
}
html[dir="rtl"] .floating-store{
  margin-left:0!important;
  margin-right:auto!important;
  justify-self:start!important;
}
@media(max-width:720px){
  .floating-store-dock{
    width:auto!important;
    left:auto!important;
    right:12px!important;
    top:auto!important;
    bottom:12px!important;
    transform:none!important;
    grid-template-columns:repeat(2,54px)!important;
    pointer-events:none!important;
  }
  html[dir="rtl"] .floating-store-dock{
    left:12px!important;
    right:auto!important;
  }
  .floating-store,
  .floating-store:hover{
    width:54px!important;
    min-width:54px!important;
    height:46px!important;
    padding:0!important;
    justify-content:center!important;
  }
  .floating-store::after,
  .floating-store:hover::after,
  .floating-store span,
  .floating-store:hover span{display:none!important}
}


/* Reserve a slim desktop rail for the floating store dock so it never covers cards. */
@media(min-width:1200px) and (max-width:1700px){
  body.portal-home .site-shell{
    width:min(1480px,calc(100% - 128px))!important;
  }
  body:not(.portal-home) .shell{
    width:min(1480px,calc(100% - 128px))!important;
  }
  .global-site-header .gsh-inner{
    width:min(1420px,calc(100% - 128px))!important;
  }
}


/* ===== Policy-safe responsive AdSense banner containers ===== */
.adsense-banner-wrap{
  width:100%;
  margin:26px auto;
}
.adsense-banner{
  width:min(970px,100%);
  min-height:90px;
  margin:28px auto;
  padding:18px 8px 8px;
  position:relative;
  overflow:hidden;
  border-radius:16px;
  background:color-mix(in srgb,var(--surface,#fff) 94%,#edf3ff);
  border:1px solid color-mix(in srgb,var(--line,#dce5f2) 78%,transparent);
  text-align:center;
}
.adsense-banner-label{
  position:absolute;
  top:5px;
  left:50%;
  transform:translateX(-50%);
  color:var(--muted,#7a879d);
  font:700 9px/1 system-ui,-apple-system,"Segoe UI",sans-serif;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.adsense-banner .adsbygoogle{
  width:100%!important;
  min-height:72px;
}
.adsense-banner.ad-unconfigured{
  display:none!important;
  min-height:0!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
}
@media(max-width:700px){
  .adsense-banner{
    width:100%;
    min-height:76px;
    margin:20px auto;
    padding:16px 0 6px;
    border-radius:12px;
  }
  .adsense-banner .adsbygoogle{min-height:60px}
}

.ad-unconfigured-wrapper{display:none!important}


/* Medium/laptop widths: keep floating store shortcuts away from gameplay. */
@media(max-width:1180px){
  .floating-store-dock{
    width:auto!important;
    left:auto!important;
    right:12px!important;
    top:auto!important;
    bottom:12px!important;
    transform:none!important;
    grid-template-columns:repeat(2,54px)!important;
    justify-items:stretch!important;
  }
  html[dir="rtl"] .floating-store-dock{
    left:12px!important;
    right:auto!important;
  }
  .floating-store,
  .floating-store:hover{
    width:54px!important;
    min-width:54px!important;
    height:46px!important;
    padding:0!important;
    justify-content:center!important;
  }
  .floating-store::after,
  .floating-store:hover::after,
  .floating-store span,
  .floating-store:hover span{display:none!important}
}


/* Cache 118: store/share/settings controls keep the same physical orientation in RTL. */
.global-site-header .gsh-actions,
.global-site-header .gsh-actions > *{
  direction:ltr!important;
  unicode-bidi:isolate!important;
}
html[dir="rtl"] .global-site-header .gsh-actions{
  flex-direction:row!important;
}
html[dir="rtl"] .global-site-header .gsh-icon,
html[dir="rtl"] .global-site-header .gsh-store{
  transform:none!important;
}

/* Cache 134: make the shared site navigation easier to read. */
.global-site-header .gsh-nav a{
  font-size:14px!important;
  font-weight:800!important;
  letter-spacing:0!important;
}
.global-site-header .gsh-store span,
.global-site-header .gsh-icon{font-weight:850!important}
html[dir="rtl"] .global-site-header .gsh-nav a,
html[dir="rtl"] .global-site-header .gsh-store span,
html[dir="rtl"] .global-site-header .gsh-icon{
  font-family:Tahoma,"Segoe UI",Arial,sans-serif!important;
}
@media(max-width:1120px){
  .global-site-header .gsh-nav a{font-size:13px!important}
}
@media(max-width:560px){
  .global-site-header .gsh-nav a{font-size:12px!important}
}

/* Cache 153: direct language/theme controls */
.global-site-header .gsh-lang{width:auto!important;min-width:72px!important;padding:0 10px!important;gap:6px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;font-size:16px!important}
.global-site-header .gsh-lang span{font-size:11px;font-weight:900;letter-spacing:.04em}
.global-site-header .gsh-theme{font-size:18px!important}
@media(max-width:620px){.global-site-header .gsh-lang{min-width:62px!important;padding:0 7px!important}.global-site-header .gsh-lang span{font-size:10px!important}}

/* Cache 153b: recognizable, working share control */
.share-icon-svg{width:18px;height:18px;display:block;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.portal-share-btn.share-success,.global-site-header .gsh-share.share-success{color:#16845f!important;background:#e9fff7!important;border-color:#a6e3cf!important;font-weight:900!important}

/* Cache 155: browser-independent flag assets */
.portal-lang-btn .lang-flag,.global-site-header .gsh-flag{width:22px!important;height:15px!important;display:block!important;object-fit:cover;border-radius:2px;box-shadow:0 0 0 1px rgba(20,40,70,.10)}

/* Cache 156: centered share icon + share targets menu */
.portal-share-btn,.global-site-header .gsh-share{display:inline-flex!important;align-items:center!important;justify-content:center!important;padding:0!important;line-height:1!important}
.portal-share-btn .share-icon-svg,.global-site-header .gsh-share .share-icon-svg{margin:auto!important;position:static!important;transform:none!important}
.web-share-menu{position:fixed;z-index:99999;display:grid;gap:6px;padding:10px;background:var(--portal-surface,#fff);color:var(--portal-text,#17233b);border:1px solid var(--portal-line,#dfe7f3);border-radius:14px;box-shadow:0 16px 38px rgba(23,35,59,.18)}
.web-share-menu .web-share-status{display:block;padding:4px 6px 8px;font-size:12px;text-align:center}
.web-share-menu a{display:flex;align-items:center;min-height:38px;padding:0 12px;border-radius:10px;text-decoration:none;color:inherit;background:color-mix(in srgb,var(--portal-surface,#fff) 86%,#eaf2ff);font-weight:800;font-size:13px}
.web-share-menu a:hover{background:color-mix(in srgb,var(--portal-surface,#fff) 70%,#dbe9ff)}
.portal-home.dark .web-share-menu,body.dark .web-share-menu{background:#1f2839;color:#f2f6ff;border-color:#46536a}

/* Cache 157: cross-browser language alignment + share menu controls */
.portal-controls .portal-lang-btn{box-sizing:border-box!important;width:72px!important;min-width:72px!important;max-width:72px!important;height:34px!important;min-height:34px!important;flex:0 0 72px!important;padding:0 8px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:6px!important;white-space:nowrap!important;line-height:1!important}
.portal-controls .portal-lang-btn .lang-flag{flex:0 0 22px!important;width:22px!important;height:15px!important;margin:0!important}.portal-controls .portal-lang-btn .lang-code{display:block!important;line-height:1!important;margin:0!important}
.global-site-header .gsh-actions .gsh-lang{box-sizing:border-box!important;width:72px!important;min-width:72px!important;max-width:72px!important;height:36px!important;min-height:36px!important;flex:0 0 72px!important;padding:0 8px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:6px!important;white-space:nowrap!important;line-height:1!important}
.global-site-header .gsh-actions .gsh-lang .gsh-flag{flex:0 0 22px!important;width:22px!important;height:15px!important;margin:0!important}.global-site-header .gsh-actions .gsh-lang span{display:block!important;line-height:1!important;margin:0!important}
.web-share-menu .web-share-native{min-height:38px;padding:0 12px;border:0;border-radius:10px;background:color-mix(in srgb,var(--portal-surface,#fff) 78%,#dfeaff);color:inherit;font:inherit;font-weight:800;cursor:pointer;text-align:start}
.web-share-menu .web-share-native:hover{background:color-mix(in srgb,var(--portal-surface,#fff) 66%,#d3e4ff)}
@media(max-width:700px){.portal-controls .portal-lang-btn,.global-site-header .gsh-actions .gsh-lang{width:64px!important;min-width:64px!important;max-width:64px!important;flex-basis:64px!important;padding:0 6px!important;gap:5px!important}}

/* Cache 181: allow mobile float only when remote control opts in. */
@media(max-width:720px){
  .floating-store-dock.allow-mobile{
    display:grid!important;
    pointer-events:none!important;
  }
  .floating-store-dock.allow-mobile .floating-store{
    pointer-events:auto!important;
  }
}