
:root{
  --pm-bg:#f4f8f5;
  --pm-surface:#fff;
  --pm-ink:#0f1512;
  --pm-muted:#64716a;
  --pm-line:#dce8e0;
  --pm-green:#0f8b57;
  --pm-green-dark:#0b6a43;
  --pm-shadow:0 22px 68px rgba(26,52,38,.10);
}
#go39PublicHomeV22{
  position:fixed; inset:0; z-index:2147483200; display:none; overflow:auto;
  background:
    radial-gradient(900px 520px at 100% 0%,rgba(46,143,91,.08),transparent 66%),
    linear-gradient(180deg,#f6faf7 0%,#f1f6f2 100%);
  color:var(--pm-ink);
  font-family:-apple-system,BlinkMacSystemFont,"SF Pro Text","Noto Sans Thai","Segoe UI",sans-serif;
  -webkit-font-smoothing:antialiased;
}
#go39PublicHomeV22.is-on{display:block}
#go39PublicHomeV22 *{box-sizing:border-box}

.pm22-shell{width:min(1580px,calc(100% - 34px));min-height:100dvh;margin:0 auto;padding:18px 0 20px}
.pm22-card{min-height:calc(100dvh - 38px);padding:18px 22px 22px;border-radius:34px;background:rgba(255,255,255,.82);border:1px solid rgba(255,255,255,.96);box-shadow:var(--pm-shadow);backdrop-filter:blur(18px)}
.pm22-nav{min-height:64px;display:flex;align-items:center;gap:24px}
.pm22-brand{display:flex;align-items:center;gap:12px;min-width:max-content}
.pm22-logo{width:54px;height:54px;display:grid;place-items:center;border-radius:16px;background:linear-gradient(145deg,#08271a,#0f5d3b);color:#fff;font-size:17px;font-weight:900}
.pm22-brandcopy strong{display:block;font-size:22px;line-height:1.02;font-weight:850}
.pm22-brandcopy span{display:block;margin-top:5px;color:#7e8782;font-size:10px;letter-spacing:.18em}
.pm22-links{margin-left:auto;display:flex;align-items:center;gap:28px}
.pm22-links a{color:#25302a;text-decoration:none;font-size:14px;font-weight:750}
.pm22-enter{min-height:46px;padding:0 24px;border-radius:999px;border:1.5px solid #c9ddd1;background:#fff;color:#17201b;font-size:14px;font-weight:850;cursor:pointer}

.pm22-main{min-height:770px;display:grid;grid-template-columns:minmax(0,.78fr) minmax(680px,1.22fr);align-items:center;gap:22px;padding:20px 0 0}
.pm22-left{padding:22px 12px 18px 18px}
.pm22-kicker{color:var(--pm-green);font-size:12px;font-weight:900;letter-spacing:.22em}
.pm22-left h1{margin:10px 0 18px;max-width:610px;font-size:clamp(55px,4.7vw,76px);line-height:.99;letter-spacing:-.055em;font-weight:900}
.pm22-left h1 em{display:block;color:var(--pm-green);font-style:normal}
.pm22-left p{max-width:590px;margin:0;color:var(--pm-muted);font-size:18px;line-height:1.55}
.pm22-chips{display:flex;flex-wrap:wrap;gap:10px;margin-top:20px}
.pm22-chip{min-width:92px;padding:9px 14px;text-align:center;border-radius:999px;background:#fff;border:1px solid var(--pm-line);color:#26342c;font-size:12px;font-weight:800}

.pm22-login{max-width:680px;margin-top:22px;padding:15px 16px 12px;border-radius:24px;background:rgba(255,255,255,.96);border:1px solid var(--pm-line);box-shadow:0 14px 36px rgba(22,53,36,.09)}
.pm22-age{min-height:50px;display:flex;align-items:center;gap:11px;color:#2d3932;font-size:14px;font-weight:750;cursor:pointer}
.pm22-age input{width:24px;height:24px;accent-color:var(--pm-green)}
.pm22-actions{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:8px}
.pm22-btn{min-height:58px;display:flex;align-items:center;justify-content:center;gap:10px;border-radius:15px;text-decoration:none;font-size:16px;font-weight:850}
.pm22-btn[aria-disabled="true"]{opacity:.42;pointer-events:none;filter:saturate(.55)}
.pm22-google{color:#fff;background:linear-gradient(180deg,#7e8783,#65706b);border:1px solid #66716c}
.pm22-line{color:#fff;background:#06c755;border:1px solid #06c755}
.pm22-g{width:32px;height:32px;display:grid;place-items:center;border-radius:50%;background:#fff;color:#4285f4;font-size:17px;font-weight:900}
.pm22-linebadge{min-width:49px;height:31px;display:grid;place-items:center;border-radius:8px;background:#fff;color:#06a94a;font-size:10px;font-weight:900}
.pm22-policy{margin-top:10px;text-align:center;color:#6f7973;font-size:11px}
.pm22-policy a{color:var(--pm-green-dark)}

.pm22-right{position:relative;min-height:760px;overflow:hidden;border-radius:31px;background:#e8f1eb;box-shadow:0 18px 50px rgba(21,57,37,.12)}
.pm22-photo{
  position:absolute; inset:0 0 200px 0;
  background-image:url('/assets/39go-public-home-v22/hero-default.png?v=2.2.0');
  background-size:cover;
  background-position:center 31%;
  background-repeat:no-repeat;
}
.pm22-photo::after{
  content:""; position:absolute; inset:0;
  background:linear-gradient(180deg,rgba(10,55,32,.01),rgba(10,55,32,.09));
  pointer-events:none;
}
.pm22-safe{position:absolute;z-index:3;left:42px;right:18px;bottom:18px;height:256px;background:url('/assets/39go-public-home-v22/safe-card.png?v=2.2.0') center/100% 100% no-repeat;filter:drop-shadow(0 16px 28px rgba(17,52,33,.14))}

/* Owner-only edit control */
.pm22-photo-tools{
  position:absolute; z-index:20; right:18px; top:18px;
  display:none; align-items:center; gap:8px;
}
body.pm22-edit-enabled .pm22-photo-tools{display:flex}
.pm22-change-photo{
  min-height:42px; padding:0 15px;
  border:1px solid rgba(255,255,255,.85);
  border-radius:999px;
  background:rgba(12,28,20,.76);
  color:#fff;
  font-size:12px; font-weight:850;
  cursor:pointer;
  backdrop-filter:blur(14px);
  box-shadow:0 8px 22px rgba(0,0,0,.16);
}
.pm22-upload-state{
  max-width:160px;
  padding:7px 10px;
  border-radius:999px;
  background:rgba(255,255,255,.90);
  color:#294234;
  font-size:10px;
  font-weight:750;
  display:none;
}
.pm22-upload-state.is-on{display:block}

.pm22-footer{min-height:38px;margin-top:8px;display:flex;align-items:center;justify-content:space-between;color:#8b938e;font-size:10px}
.pm22-footerlinks{display:flex;gap:16px}
.pm22-footer a{color:#66716b;text-decoration:none}

body.pm22-public-active #go39HomeShell,
body.pm22-public-active #go39LoginTopPanel,
body.pm22-public-active #go39PolicyFooter{display:none!important}

@media(max-width:1180px){
  .pm22-main{grid-template-columns:1fr 1fr}
  .pm22-left h1{font-size:52px}
  .pm22-right{min-height:680px}
  .pm22-safe{height:225px}
}
@media(max-width:820px){
  .pm22-shell{width:100%;padding:0}
  .pm22-card{min-height:100dvh;padding:0;border-radius:0;box-shadow:none}
  .pm22-nav{min-height:60px;padding:0 14px;background:rgba(255,255,255,.92);border-bottom:1px solid var(--pm-line)}
  .pm22-logo{width:41px;height:41px;border-radius:12px;font-size:13px}
  .pm22-brandcopy strong{font-size:17px}
  .pm22-brandcopy span,.pm22-links{display:none}
  .pm22-enter{margin-left:auto;min-height:37px;padding:0 14px;font-size:12px}

  .pm22-main{display:flex;flex-direction:column;min-height:auto;gap:0;padding:0}
  .pm22-right{order:0;width:100%;min-height:335px;height:40dvh;border-radius:0;box-shadow:none}
  .pm22-photo{inset:0;background-position:center 23%}
  .pm22-safe{left:10px;right:10px;bottom:10px;height:112px}
  .pm22-photo-tools{right:10px;top:10px}
  .pm22-change-photo{min-height:38px;padding:0 12px;font-size:11px}

  .pm22-left{order:1;width:100%;padding:18px 16px 14px}
  .pm22-kicker{font-size:9px}
  .pm22-left h1{margin:6px 0 10px;font-size:34px;line-height:1.06}
  .pm22-left h1 em{display:inline}
  .pm22-left p{font-size:14px;line-height:1.45}
  .pm22-chips{display:none}
  .pm22-login{margin-top:12px;padding:10px;border-radius:17px}
  .pm22-age{min-height:43px;font-size:12px}
  .pm22-actions{grid-template-columns:1fr;gap:7px;margin-top:7px}
  .pm22-btn{min-height:49px;font-size:14px}
  .pm22-policy{font-size:9px}
  .pm22-footer{padding:0 14px;min-height:36px}
}
@media(max-height:720px) and (max-width:820px){
  .pm22-right{height:31dvh;min-height:220px}
  .pm22-safe{display:none}
  .pm22-left{padding-top:12px}
  .pm22-left h1{font-size:30px}
  .pm22-left p{font-size:13px}
  .pm22-footer{display:none}
}


/* ==========================================================
   V2.2.1 LAYER FIX
   - Hero = clean portrait only
   - Safety card = real HTML/CSS, never an image screenshot
   - No old page/composite can show behind the safety card
   ========================================================== */

.pm22-safe{
  position:absolute!important;
  z-index:4!important;
  left:42px!important;
  right:18px!important;
  bottom:18px!important;
  height:auto!important;
  min-height:256px!important;
  padding:22px 24px!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr) 230px!important;
  gap:20px!important;
  align-items:center!important;
  border-radius:28px!important;
  background:rgba(255,255,255,.96)!important;
  background-image:none!important;
  border:1px solid rgba(255,255,255,.98)!important;
  box-shadow:0 20px 46px rgba(17,52,33,.16)!important;
  backdrop-filter:blur(18px)!important;
  -webkit-backdrop-filter:blur(18px)!important;
  filter:none!important;
  overflow:hidden!important;
}

.pm22-safe::before{
  content:""!important;
  position:absolute!important;
  inset:0!important;
  background:
    radial-gradient(360px 180px at 92% 45%,rgba(15,139,87,.08),transparent 70%),
    linear-gradient(180deg,rgba(255,255,255,.00),rgba(246,250,247,.35))!important;
  pointer-events:none!important;
}

.pm22-safe-copy{
  position:relative!important;
  z-index:2!important;
}

.pm22-safe-copy h2{
  margin:0 0 8px!important;
  color:#0b5c3b!important;
  font-size:29px!important;
  line-height:1.12!important;
  letter-spacing:-.03em!important;
  font-weight:900!important;
}

.pm22-safe-copy p{
  margin:0!important;
  color:#66736c!important;
  font-size:14px!important;
  line-height:1.55!important;
}

.pm22-online{
  display:inline-flex!important;
  align-items:center!important;
  gap:9px!important;
  margin-top:17px!important;
  padding:9px 13px!important;
  border-radius:999px!important;
  background:#eaf7ef!important;
  color:#1e3d2d!important;
  font-size:13px!important;
  font-weight:850!important;
}

.pm22-online i{
  width:18px!important;
  height:18px!important;
  border-radius:50%!important;
  background:linear-gradient(145deg,#0c8f58,#18b76f)!important;
  box-shadow:0 0 0 5px rgba(15,139,87,.08)!important;
}

.pm22-radar{
  position:relative!important;
  z-index:2!important;
  width:210px!important;
  height:210px!important;
  margin:auto!important;
  border-radius:50%!important;
  overflow:hidden!important;
  background:
    radial-gradient(circle at center,#10ae61 0 8px,#fff 9px 12px,transparent 13px),
    repeating-radial-gradient(circle at center,transparent 0 31px,rgba(34,82,56,.16) 32px 33px),
    linear-gradient(180deg,#f9fdf9,#eaf4ec)!important;
  border:1px solid #cdddcf!important;
  box-shadow:inset 0 0 38px rgba(31,111,73,.05)!important;
}

.pm22-radar::before{
  content:""!important;
  position:absolute!important;
  left:50%!important;
  top:50%!important;
  width:46%!important;
  height:2px!important;
  transform-origin:left center!important;
  background:linear-gradient(90deg,rgba(19,138,87,.68),transparent)!important;
  animation:pm22Sweep 5s linear infinite!important;
}

.pm22-radar::after{
  content:""!important;
  position:absolute!important;
  inset:0!important;
  background:
    linear-gradient(90deg,transparent 49.8%,rgba(26,75,50,.08) 49.9% 50.1%,transparent 50.2%),
    linear-gradient(0deg,transparent 49.8%,rgba(26,75,50,.08) 49.9% 50.1%,transparent 50.2%)!important;
}

@keyframes pm22Sweep{to{transform:rotate(360deg)}}

.pm22-radar-avatar{
  position:absolute!important;
  z-index:3!important;
  width:44px!important;
  height:44px!important;
  display:grid!important;
  place-items:center!important;
  border-radius:50%!important;
  border:3px solid #fff!important;
  background:linear-gradient(145deg,#cfe6d6,#68937c)!important;
  color:#234333!important;
  font-size:12px!important;
  font-weight:900!important;
  box-shadow:0 5px 14px rgba(0,0,0,.15)!important;
}

.pm22-r1{left:22px!important;top:58px!important}
.pm22-r2{right:20px!important;top:22px!important}
.pm22-r3{right:15px!important;bottom:30px!important}
.pm22-r4{left:54px!important;bottom:12px!important}

/* Force the hero to use an actual portrait image and never any legacy
   screenshot/background inherited from previous themes. */
.pm22-photo{
  background-image:url('/assets/39go-public-home-v22/hero-default.png?v=2.2.1')!important;
  background-size:cover!important;
  background-position:center 28%!important;
  background-repeat:no-repeat!important;
}

/* When an owner-uploaded hero exists, JS sets inline background-image.
   Allow that inline image to win without reintroducing any old layers. */
.pm22-photo.pm22-has-user-hero{
  background-image:var(--pm22-user-hero)!important;
}

/* Responsive real safety card */
@media(max-width:820px){
  .pm22-safe{
    left:10px!important;
    right:10px!important;
    bottom:10px!important;
    min-height:110px!important;
    padding:10px 12px!important;
    grid-template-columns:minmax(0,1fr) 86px!important;
    gap:8px!important;
    border-radius:18px!important;
  }
  .pm22-safe-copy h2{
    font-size:16px!important;
    margin-bottom:4px!important;
  }
  .pm22-safe-copy p{
    font-size:10px!important;
    line-height:1.35!important;
  }
  .pm22-online{display:none!important}
  .pm22-radar{
    width:80px!important;
    height:80px!important;
  }
  .pm22-radar-avatar{
    width:18px!important;
    height:18px!important;
    border-width:2px!important;
    font-size:0!important;
  }
  .pm22-r1{left:8px!important;top:22px!important}
  .pm22-r2{right:8px!important;top:8px!important}
  .pm22-r3{right:5px!important;bottom:10px!important}
  .pm22-r4{left:22px!important;bottom:5px!important}
}

@media(max-height:720px) and (max-width:820px){
  .pm22-safe{display:none!important}
}

@media(prefers-reduced-motion:reduce){
  .pm22-radar::before{animation:none!important}
}


/* ==========================================================
   V2.2.2 — COMPACT VIEWPORT / BROWSER CHROME FIX
   ลดพื้นที่บน-ล่าง และทำให้หน้าไม่ตกเมื่อมี Address Bar
   ========================================================== */

#go39PublicHomeV22{
  min-height:100dvh!important;
}

.pm22-shell{
  min-height:100dvh!important;
  padding:5px 0 7px!important;
}

.pm22-card{
  min-height:calc(100dvh - 12px)!important;
  padding:8px 18px 10px!important;
  border-radius:26px!important;
}

.pm22-nav{
  min-height:52px!important;
}

.pm22-logo{
  width:46px!important;
  height:46px!important;
  border-radius:13px!important;
}

.pm22-brandcopy strong{
  font-size:20px!important;
}

.pm22-main{
  min-height:0!important;
  height:auto!important;
  padding:6px 0 0!important;
  align-items:center!important;
}

.pm22-left{
  padding:8px 10px 8px 12px!important;
}

.pm22-left h1{
  margin-top:6px!important;
  margin-bottom:12px!important;
  font-size:clamp(48px,4.2vw,67px)!important;
}

.pm22-left p{
  font-size:16px!important;
  line-height:1.48!important;
}

.pm22-chips{
  margin-top:12px!important;
}

.pm22-login{
  margin-top:14px!important;
  padding:11px 13px 10px!important;
}

.pm22-age{
  min-height:44px!important;
}

.pm22-btn{
  min-height:50px!important;
}

.pm22-right{
  min-height:min(650px,calc(100dvh - 108px))!important;
  height:min(650px,calc(100dvh - 108px))!important;
}

.pm22-safe{
  min-height:220px!important;
  padding:17px 20px!important;
}

.pm22-radar{
  width:185px!important;
  height:185px!important;
}

.pm22-safe-copy h2{
  font-size:25px!important;
}

.pm22-footer{
  min-height:26px!important;
  margin-top:2px!important;
}

/* Laptop / browser viewport ที่เตี้ย */
@media(max-height:820px) and (min-width:821px){
  .pm22-shell{
    padding-top:3px!important;
    padding-bottom:4px!important;
  }

  .pm22-card{
    min-height:calc(100dvh - 7px)!important;
    padding-top:6px!important;
    padding-bottom:6px!important;
  }

  .pm22-nav{
    min-height:48px!important;
  }

  .pm22-logo{
    width:42px!important;
    height:42px!important;
  }

  .pm22-main{
    grid-template-columns:minmax(0,.82fr) minmax(560px,1.18fr)!important;
    gap:18px!important;
    padding-top:2px!important;
  }

  .pm22-left h1{
    font-size:clamp(42px,4vw,58px)!important;
    margin-bottom:9px!important;
  }

  .pm22-left p{
    font-size:15px!important;
    line-height:1.4!important;
  }

  .pm22-chips{
    margin-top:9px!important;
  }

  .pm22-chip{
    padding-top:6px!important;
    padding-bottom:6px!important;
  }

  .pm22-login{
    margin-top:10px!important;
  }

  .pm22-right{
    min-height:calc(100dvh - 91px)!important;
    height:calc(100dvh - 91px)!important;
    max-height:620px!important;
  }

  .pm22-safe{
    min-height:190px!important;
    padding:14px 18px!important;
  }

  .pm22-radar{
    width:160px!important;
    height:160px!important;
  }

  .pm22-footer{
    display:none!important;
  }
}

/* Mobile + address bar: ใช้ dynamic viewport และตัดพื้นที่ฟุ่มเฟือย */
@media(max-width:820px){
  .pm22-shell{
    min-height:100dvh!important;
    padding:0!important;
  }

  .pm22-card{
    min-height:100dvh!important;
    padding:0!important;
    border-radius:0!important;
  }

  .pm22-nav{
    min-height:52px!important;
    padding:0 12px!important;
  }

  .pm22-logo{
    width:36px!important;
    height:36px!important;
    border-radius:10px!important;
  }

  .pm22-brandcopy strong{
    font-size:15px!important;
  }

  .pm22-enter{
    min-height:33px!important;
    padding:0 12px!important;
  }

  .pm22-right{
    height:34dvh!important;
    min-height:220px!important;
    max-height:330px!important;
  }

  .pm22-left{
    padding:12px 14px 10px!important;
  }

  .pm22-left h1{
    font-size:30px!important;
    margin:4px 0 7px!important;
  }

  .pm22-left p{
    font-size:13px!important;
    line-height:1.4!important;
  }

  .pm22-login{
    margin-top:9px!important;
    padding:8px!important;
  }

  .pm22-age{
    min-height:38px!important;
    font-size:11px!important;
  }

  .pm22-btn{
    min-height:44px!important;
    font-size:13px!important;
  }

  .pm22-footer{
    display:none!important;
  }
}

/* iPhone landscape / จอเตี้ยมาก */
@media(max-height:650px){
  .pm22-safe{
    display:none!important;
  }

  .pm22-right{
    min-height:180px!important;
    height:28dvh!important;
  }

  .pm22-left h1{
    font-size:28px!important;
  }
}
