:root{
  --pwa-nav-h:72px;
  --pwa-top-h:58px;
  --pwa-bg:#061522;
  --pwa-card:#0a2234;
  --pwa-card-2:#0c2639;
  --pwa-line:#ffffff18;
  --pwa-muted:#91a7b4;
  --pwa-accent:#ffd84a;
  --pwa-text:#f4f8fa;
}

#pwa-topbar,
#pwa-app-nav,
#pwa-more-sheet,
#pwa-offline-bar,
#pwa-update-toast{display:none}

html.pwa-standalone{
  background:var(--pwa-bg);
  color-scheme:dark;
}
html.pwa-standalone body{
  padding-bottom:calc(var(--pwa-nav-h) + 24px + env(safe-area-inset-bottom,0px));
  overscroll-behavior-y:none;
  -webkit-tap-highlight-color:transparent;
}
html.pwa-standalone a,
html.pwa-standalone button{touch-action:manipulation}

/* Egységes, app-szerű felső sáv */
html.pwa-standalone #pwa-topbar{
  position:sticky;
  top:0;
  z-index:2147481000;
  min-height:calc(var(--pwa-top-h) + env(safe-area-inset-top,0px));
  padding:calc(8px + env(safe-area-inset-top,0px)) 14px 8px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  background:rgba(5,19,30,.94);
  border-bottom:1px solid #ffffff12;
  box-shadow:0 8px 30px #0003;
  backdrop-filter:blur(18px) saturate(130%);
  -webkit-backdrop-filter:blur(18px) saturate(130%);
}
.pwa-top-brand{
  min-width:0;
  display:flex;
  align-items:center;
  gap:10px;
  color:#fff;
  text-decoration:none;
  font:900 16px/1 Arial,sans-serif;
  letter-spacing:.045em;
}
.pwa-top-brand img{
  width:34px;height:34px;
  flex:0 0 auto;
  object-fit:cover;
  border-radius:10px;
  border:1px solid #ffffff24;
  box-shadow:0 5px 16px #0005;
}
.pwa-top-brand span{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.pwa-top-actions{display:flex;align-items:center;gap:8px}
.pwa-top-btn{
  width:40px;height:40px;
  display:grid;place-items:center;
  border:1px solid #ffffff1b;
  border-radius:12px;
  background:#0a2234;
  color:#eaf3f7;
  cursor:pointer;
  box-shadow:inset 0 1px 0 #ffffff0a;
}
.pwa-top-btn:active{transform:scale(.96)}
.pwa-top-btn svg{width:20px;height:20px;stroke:currentColor;stroke-width:2;fill:none;stroke-linecap:round;stroke-linejoin:round}

/* A webes navigáció telepített módban eltűnik: helyette a PWA shell látszik. */
html.pwa-standalone .site-nav,
html.pwa-standalone .news-nav,
html.pwa-standalone header.top,
html.pwa-standalone body>nav:not(#pwa-app-nav){display:none!important}
html.pwa-standalone .global-search-toggle.pogohun-search-floating{display:none!important}

/* Alsó alkalmazás-navigáció */
html.pwa-standalone #pwa-app-nav{
  position:fixed;
  left:8px;right:8px;bottom:8px;
  z-index:2147482000;
  display:grid;
  grid-template-columns:repeat(5,1fr);
  min-height:var(--pwa-nav-h);
  padding:6px 5px calc(6px + env(safe-area-inset-bottom,0px));
  background:rgba(7,25,38,.96);
  border:1px solid #ffffff17;
  border-radius:20px;
  box-shadow:0 14px 42px #0009, inset 0 1px 0 #ffffff08;
  backdrop-filter:blur(20px) saturate(125%);
  -webkit-backdrop-filter:blur(20px) saturate(125%);
}
.pwa-nav-item{
  appearance:none;-webkit-appearance:none;
  min-width:0;
  min-height:58px;
  position:relative;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:5px;
  padding:6px 3px;
  border:0;
  border-radius:15px;
  background:transparent;
  color:#8097a5;
  text-decoration:none;
  font:800 9px/1.05 Arial,sans-serif;
  cursor:pointer;
  transition:background .16s ease,color .16s ease,transform .12s ease;
}
.pwa-nav-item:active{transform:scale(.97)}
.pwa-nav-item .pwa-nav-icon{
  width:22px;height:22px;
  display:grid;place-items:center;
}
.pwa-nav-item .pwa-nav-icon svg{
  width:21px;height:21px;
  stroke:currentColor;stroke-width:2;
  fill:none;stroke-linecap:round;stroke-linejoin:round;
}
.pwa-nav-item.active{
  color:#fff;
  background:linear-gradient(180deg,#ffffff12,#ffffff08);
  box-shadow:inset 0 1px 0 #ffffff0e;
}
.pwa-nav-item.active::before{
  content:"";
  position:absolute;
  top:4px;
  width:22px;height:3px;
  border-radius:999px;
  background:var(--pwa-accent);
  box-shadow:0 0 12px #ffd84a55;
}
.pwa-nav-item.active .pwa-nav-icon{color:#ffe06b}

/* Több menü – appos bottom sheet */
html.pwa-standalone #pwa-more-sheet{
  position:fixed;
  inset:0;
  z-index:2147482100;
  display:flex;
  align-items:flex-end;
  justify-content:center;
  padding:16px 10px calc(var(--pwa-nav-h) + 20px + env(safe-area-inset-bottom,0px));
  background:rgba(0,0,0,.54);
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transition:opacity .18s ease,visibility .18s ease;
  backdrop-filter:blur(7px);
  -webkit-backdrop-filter:blur(7px);
}
html.pwa-standalone #pwa-more-sheet.open{
  opacity:1;
  visibility:visible;
  pointer-events:auto;
}
.pwa-sheet-card{
  width:min(100%,560px);
  max-height:min(72vh,650px);
  overflow:auto;
  padding:10px 12px 14px;
  border:1px solid #ffffff20;
  border-radius:24px;
  background:linear-gradient(180deg,#0a2234,#071a29);
  color:#f7f9fb;
  box-shadow:0 24px 80px #000b;
  transform:translateY(22px) scale(.985);
  transition:transform .2s ease;
}
#pwa-more-sheet.open .pwa-sheet-card{transform:translateY(0) scale(1)}
.pwa-sheet-handle{width:38px;height:4px;margin:2px auto 9px;border-radius:99px;background:#ffffff2c}
.pwa-sheet-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:9px;padding:0 2px}
.pwa-sheet-head strong{font:900 16px Arial,sans-serif}
.pwa-sheet-close{width:36px;height:36px;border:0;border-radius:11px;background:#ffffff0d;color:#cad8de;font-size:22px;cursor:pointer}
.pwa-sheet-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.pwa-sheet-link{
  min-height:64px;
  display:flex;
  align-items:center;
  gap:11px;
  padding:11px 12px;
  border:1px solid #ffffff13;
  border-radius:15px;
  background:#0a2234;
  color:#eef5f8;
  text-decoration:none;
  font:800 11px/1.25 Arial,sans-serif;
  box-shadow:inset 0 1px 0 #ffffff08;
}
.pwa-sheet-link:active{background:#102d43}
.pwa-sheet-link .pwa-sheet-icon{width:25px;height:25px;display:grid;place-items:center;color:#d9e8ef}
.pwa-sheet-link .pwa-sheet-icon svg{width:21px;height:21px;stroke:currentColor;stroke-width:2;fill:none;stroke-linecap:round;stroke-linejoin:round}

/* Állapotjelzések */
html.pwa-standalone #pwa-offline-bar{
  position:fixed;
  left:10px;right:10px;
  top:calc(var(--pwa-top-h) + 10px + env(safe-area-inset-top,0px));
  z-index:2147482300;
  max-width:560px;
  margin:0 auto;
  padding:10px 13px;
  border:1px solid #ffcf7b28;
  border-radius:13px;
  background:#63391f;
  color:#fff;
  box-shadow:0 10px 28px #0006;
  text-align:center;
  font:800 10px Arial,sans-serif;
}
html.pwa-standalone #pwa-offline-bar.show{display:block}

html.pwa-standalone #pwa-update-toast{
  position:fixed;
  left:12px;right:12px;
  bottom:calc(var(--pwa-nav-h) + 24px + env(safe-area-inset-bottom,0px));
  z-index:2147482250;
  max-width:520px;
  margin:0 auto;
  padding:12px 12px 12px 14px;
  border:1px solid #ffffff1d;
  border-radius:16px;
  background:#0b2639;
  color:#fff;
  box-shadow:0 18px 50px #0009;
  font:700 11px/1.35 Arial,sans-serif;
}
html.pwa-standalone #pwa-update-toast.show{display:flex;align-items:center;justify-content:space-between;gap:12px}
#pwa-update-toast button{
  flex:0 0 auto;
  border:0;
  border-radius:10px;
  padding:9px 12px;
  background:var(--pwa-accent);
  color:#12202b;
  font:900 10px Arial,sans-serif;
  cursor:pointer;
}

/* PWA 2.1 – telepített alkalmazás kezdőképernyő */
#pwa-home-dashboard{display:none}
html.pwa-standalone #pwa-home-dashboard{
  display:block;
  margin:8px 0 12px;
  padding:15px;
  border:1px solid #ffffff19;
  border-radius:20px;
  background:
    radial-gradient(circle at 95% 0%,#6544a94a,transparent 37%),
    linear-gradient(135deg,#0b2a40,#071827 72%);
  box-shadow:0 14px 40px #0004,inset 0 1px 0 #ffffff08;
}
.pwa-home-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.pwa-home-kicker{font:900 8px/1.2 Arial,sans-serif;letter-spacing:.15em;color:#efb37d}
.pwa-home-title{margin:5px 0 3px;font:900 21px/1.12 Arial,sans-serif;color:#fff}
.pwa-home-sub{margin:0;color:#9eb2be;font:600 10px/1.45 Arial,sans-serif}
.pwa-home-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:12px}
.pwa-home-card{
  min-height:66px;
  display:grid;
  grid-template-columns:34px 1fr;
  align-items:center;
  gap:10px;
  padding:10px;
  border:1px solid #ffffff13;
  border-radius:15px;
  background:linear-gradient(180deg,#0b273a,#092131);
  color:#eef5f8;
  text-decoration:none;
  font:900 10.5px/1.25 Arial,sans-serif;
  box-shadow:inset 0 1px 0 #ffffff08;
  transition:transform .12s ease,background .14s ease,border-color .14s ease;
}
.pwa-home-card:active{transform:scale(.985);background:#102d43;border-color:#ffffff25}
.pwa-home-card .pwa-home-icon{
  width:34px;height:34px;
  display:grid;place-items:center;
  border-radius:11px;
  background:#ffffff0b;
  color:#e8f2f6;
}
.pwa-home-card:nth-child(1) .pwa-home-icon{color:#ffe06b;background:#5a48172f}
.pwa-home-card:nth-child(2) .pwa-home-icon{color:#9bc9ff;background:#173b5a40}
.pwa-home-card:nth-child(3) .pwa-home-icon{color:#b8d9e8;background:#2450642f}
.pwa-home-card:nth-child(4) .pwa-home-icon{color:#e7c3ff;background:#5a34733a}
.pwa-home-icon svg{width:20px;height:20px;stroke:currentColor;stroke-width:2;fill:none;stroke-linecap:round;stroke-linejoin:round}

html.pwa-standalone.pwa-page-home .home{padding-top:5px;padding-left:10px;padding-right:10px}
html.pwa-standalone.pwa-page-home .home>.hero2{display:none}
html.pwa-standalone.pwa-page-home .home>.section-title:first-of-type,
html.pwa-standalone.pwa-page-home .home>.quick-grid.v16{display:none}
html.pwa-standalone .connect-btn.install{display:none!important}

/* Főoldal: kevesebb üres tér, jobb vizuális ritmus */
html.pwa-standalone.pwa-page-home .wild-area-promo{
  margin:12px 0 8px;
  padding:16px 17px;
  gap:10px;
  border-radius:18px;
  box-shadow:0 12px 34px #0003;
}
html.pwa-standalone.pwa-page-home .wild-area-promo>div{gap:4px}
html.pwa-standalone.pwa-page-home .wild-area-promo__label{font-size:8.5px!important;letter-spacing:.11em}
html.pwa-standalone.pwa-page-home .wild-area-promo strong{font-size:22px}
html.pwa-standalone.pwa-page-home .wild-area-promo span{font-size:10.5px;line-height:1.45}
html.pwa-standalone.pwa-page-home .wild-area-promo>b{font-size:11px}
html.pwa-standalone.pwa-page-home .section-title{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:end;
  gap:10px;
  margin:17px 2px 10px;
}
html.pwa-standalone.pwa-page-home .section-title h2{font-size:18px;line-height:1.18;letter-spacing:-.015em}
html.pwa-standalone.pwa-page-home .section-title a{font-size:9.5px;white-space:nowrap}
html.pwa-standalone.pwa-page-home .now-card,
html.pwa-standalone.pwa-page-home .news-card{border-radius:17px}
html.pwa-standalone.pwa-page-home .foot{margin-bottom:8px}

/* Értesítések oldal app-módban */
html.pwa-standalone.pwa-page-notifications .wrap{padding-top:10px;padding-left:10px;padding-right:10px}
html.pwa-standalone.pwa-page-notifications .hero{padding:20px 18px;border-radius:20px}
html.pwa-standalone.pwa-page-notifications .hero h1{font-size:27px;margin-top:6px}
html.pwa-standalone.pwa-page-notifications .permission{margin-top:12px}
html.pwa-standalone.pwa-page-notifications .grid{gap:10px;margin-top:12px}
html.pwa-standalone.pwa-page-notifications .card{padding:16px;border-radius:17px}

/* A kereső telepített appban teljes képernyőhöz közelebb álló sheet. */
html.pwa-standalone #pogohun-search-overlay{padding:8px;padding-top:calc(8px + env(safe-area-inset-top,0px))}
html.pwa-standalone #pogohun-search-dialog{
  margin-top:0;
  max-height:calc(100vh - 16px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px));
  border-radius:20px;
}

@media(max-width:380px){
  .pwa-nav-item{font-size:8px}
  .pwa-nav-item .pwa-nav-icon svg{width:19px;height:19px}
  .pwa-sheet-grid{grid-template-columns:1fr}
  .pwa-home-title{font-size:19px}
  .pwa-home-grid{gap:7px}
  .pwa-home-card{min-height:62px;padding:9px;grid-template-columns:31px 1fr;font-size:9.5px}
  .pwa-home-card .pwa-home-icon{width:31px;height:31px}
  html.pwa-standalone.pwa-page-home .section-title h2{font-size:17px}
}

@media(prefers-reduced-motion:reduce){
  html.pwa-standalone *,html.pwa-standalone *::before,html.pwa-standalone *::after{
    scroll-behavior:auto!important;
    transition:none!important;
    animation:none!important;
  }
}
