/* =====================================================================================================================
   HOME — survivor camp gate at night.  The key art is the street outside the camp; the camp's menu board (the same wood
   board + rusted sign + amber key as the in-game lobby menu) is nailed up behind a rusted zinc barricade; a steel status
   case of VFD readouts is bolted under it; then the notice board, the file drawer and the device rack.
   Everything is scoped under .pg-home. Kit gaps built here: zinc barricade, folder tabs, drawer front, check list.
   ===================================================================================================================== */

/* ---------- 1 · the gate ---------- */
.pg-home .hm-gate{position:relative;isolation:isolate;overflow:hidden;display:flex;align-items:flex-end;
  min-height:clamp(640px,calc(var(--vh)*100 - var(--nav-h)),900px);padding:30px 0 96px}
.pg-home .hm-night{position:absolute;inset:0;z-index:-3;margin:0;background:#07090b}
.pg-home .hm-night img{width:100%;height:100%;object-fit:cover;object-position:50% 52%;filter:brightness(1.18) contrast(1.06) saturate(1.05)}
/* work lamp at the gate (the one key light, top-left), sky + road falling off to black */
.pg-home .hm-night::after{content:"";position:absolute;inset:0;pointer-events:none;background:
  radial-gradient(55% 60% at 12% 0%,rgba(255,178,62,.20),rgba(255,178,62,0) 70%),
  linear-gradient(180deg,rgba(10,11,12,.70) 0%,rgba(10,11,12,0) 22%,rgba(10,11,12,0) 58%,rgba(10,11,12,.86) 100%),
  linear-gradient(90deg,rgba(10,11,12,.62) 0%,rgba(10,11,12,0) 42%)}

/* rusted zinc barricade across the bottom of the gate (decor) */
.pg-home .hm-fence{position:absolute;z-index:-1;left:-30px;right:-30px;bottom:0;height:clamp(110px,calc(var(--vh)*17),160px);
  display:flex;align-items:flex-end;pointer-events:none}
.pg-home .hm-fence i{flex:1 1 0;height:var(--h,100%);margin-left:-18px;position:relative;
  background:url("../img/kit/nail.webp") 14px 12px/13px 13px no-repeat,url("../img/kit/nail.webp") calc(100% - 14px) 14px/13px 13px no-repeat,
    linear-gradient(90deg,rgba(0,0,0,.45),rgba(0,0,0,0) 12%,rgba(0,0,0,0) 88%,rgba(0,0,0,.5)),
    url("../img/kit/zinc_rust.webp") var(--x,0) 0/260px auto;
  clip-path:polygon(0 6%,18% 0,34% 5%,52% 1%,70% 7%,86% 2%,100% 5%,100% 100%,0 100%);
  filter:brightness(.62) saturate(.9);rotate:var(--t,0deg);transform-origin:50% 100%}
.pg-home .hm-fence i:nth-child(1){--h:86%;--t:-1.5deg;--x:-40px}
.pg-home .hm-fence i:nth-child(2){--h:100%;--t:1deg;--x:-120px}
.pg-home .hm-fence i:nth-child(3){--h:80%;--t:-.6deg;--x:-60px}
.pg-home .hm-fence i:nth-child(4){--h:94%;--t:1.6deg;--x:-180px}
.pg-home .hm-fence i:nth-child(5){--h:84%;--t:-1.2deg;--x:-20px}
.pg-home .hm-fence i:nth-child(6){--h:100%;--t:.8deg;--x:-150px}
.pg-home .hm-fence i:nth-child(7){--h:78%;--t:-1.8deg;--x:-90px}
.pg-home .hm-fence i:nth-child(8){--h:92%;--t:1.2deg;--x:-200px}
.pg-home .hm-fence i:nth-child(9){--h:86%;--t:-.4deg;--x:-10px}
/* a wood rail nailed across the sheets, hazard tape wrapped over it */
.pg-home .hm-fence::before{content:"";position:absolute;z-index:2;left:0;right:0;bottom:46%;height:26px;rotate:-.8deg;
  background:url("../img/kit/board_wood.webp") 0 40%/900px auto;box-shadow:0 6px 10px rgba(0,0,0,.6),inset 0 2px 0 rgba(255,255,255,.08);filter:brightness(.8)}
.pg-home .hm-fence-tape{position:absolute;z-index:3;left:0;right:0;bottom:18%;height:24px;rotate:1.2deg;
  background:url("../img/kit/hazard_tile.webp") 0 0/48px 48px;box-shadow:0 4px 8px rgba(0,0,0,.55);filter:brightness(.85)}
.pg-home .hm-fence::after{content:"";position:absolute;z-index:4;inset:auto 0 0;height:40%;background:linear-gradient(rgba(18,20,22,0),rgba(18,20,22,.85))}

.pg-home .hm-gate-in{display:grid;grid-template-columns:minmax(0,470px) minmax(0,1fr);align-items:end;column-gap:clamp(24px,5vw,72px)}

/* the camp's menu board (= the in-game lobby menu) */
.pg-home .hm-menu{width:100%;filter:drop-shadow(4px 8px 0 rgba(0,0,0,.4)) drop-shadow(10px 22px 26px rgba(0,0,0,.6))}
.pg-home .hm-menu>.k-in{display:flex;flex-direction:column}
.pg-home .hm-h1{display:block;margin:0}
.pg-home .hm-sign{width:100%;margin:-6px auto 0;rotate:-.6deg;filter:drop-shadow(3px 6px 0 rgba(0,0,0,.45)) drop-shadow(6px 14px 14px rgba(0,0,0,.5))}
.pg-home .hm-hook{display:flex;flex-direction:column;align-items:flex-start;gap:9px;margin-top:16px}
.pg-home .hm-hook .k-dymo{font-size:1.36rem;padding:.48em .35em .42em;white-space:normal;max-width:100%;line-height:1.15}
.pg-home .hm-hook .k-dymo:first-child{rotate:-1.4deg}
.pg-home .hm-hook .k-dymo+.k-dymo{rotate:.9deg;margin-left:14px;color:var(--amber);text-shadow:0 0 8px rgba(255,178,62,.45),0 -1px 0 rgba(0,0,0,.9)}
html:not([lang="th"]) .pg-home .hm-hook .k-dymo{letter-spacing:.08em;font-size:1.22rem}
.pg-home .hm-play{width:100%;margin-top:20px;min-height:78px;border-width:20px;border-image-width:20px;font-size:1.5rem}
html[lang="th"] .pg-home .hm-play{font-size:1.62rem}
.pg-home .hm-play>span:first-child{flex:none}
.pg-home .hm-play .k-rbx{width:1.2em;height:1.2em}
html:not([lang="th"]) .pg-home .hm-play{font-size:1.36rem;letter-spacing:.04em}
.pg-home .hm-plat{margin-top:14px;border-width:14px;border-image-width:14px}
.pg-home .hm-plat>.k-in{display:flex;flex-wrap:wrap;justify-content:space-around;gap:6px 14px;margin:-4px -2px;
  font:700 1rem/1.2 var(--f-th-head);color:var(--bone);letter-spacing:.02em}
html:not([lang="th"]) .pg-home .hm-plat>.k-in{font-family:var(--f-num);letter-spacing:.1em;text-transform:uppercase}
.pg-home .hm-plat>.k-in>span{display:inline-flex;align-items:center;gap:7px}
.pg-home .hm-plat .k-led{width:15px;height:15px}

/* pitch: kraft note taped onto the barricade */
.pg-home .hm-pitch{justify-self:end;width:min(100%,410px);rotate:1.6deg;margin-bottom:-14px;
  filter:drop-shadow(3px 6px 0 rgba(0,0,0,.35)) drop-shadow(6px 14px 16px rgba(0,0,0,.5))}
.pg-home .hm-pitch>.k-in{margin:-4px}
.pg-home .hm-pitch-h{font:400 1.6rem/1.15 var(--f-marker);color:var(--blood);rotate:-1.5deg;margin-bottom:8px}
html[lang="th"] .pg-home .hm-pitch-h{font-family:"Itim","Sarabun",cursive;font-size:1.7rem;line-height:1.3}
.pg-home .hm-pitch-list{counter-reset:p;display:grid;gap:7px}
.pg-home .hm-pitch-list li{counter-increment:p;position:relative;padding-left:32px;font-size:1rem;line-height:1.55;font-weight:500}
.pg-home .hm-pitch-list li::before{content:counter(p);position:absolute;left:0;top:-2px;width:24px;height:24px;display:grid;place-items:center;
  border:2px solid var(--blood);border-radius:50%;font:400 .95rem/1 var(--f-marker);color:var(--blood);rotate:-8deg}
html[lang="th"] .pg-home .hm-pitch-list li{line-height:1.6}

/* two strips of tape along the top edge: they stay on the paper's margin, never over a heading */
.pg-home .hm-tape2::before{left:12%;top:-19px;rotate:-5deg}
.pg-home .hm-tape2::after{left:auto;right:10%;top:-18px;rotate:4deg}
.pg-home .hm-tape2>.k-in{padding-top:12px}

/* ---------- 2 · status case with VFD readouts (bolted to the gate) ---------- */
.pg-home .hm-status{position:relative;z-index:3;margin-top:-58px}
.pg-home .hm-panel{filter:drop-shadow(4px 8px 0 rgba(0,0,0,.4)) drop-shadow(8px 18px 22px rgba(0,0,0,.55))}
.pg-home .hm-panel>.k-in{display:grid;gap:14px}
.pg-home .hm-panel-h{font-size:1rem;line-height:1;margin-top:-4px}
.pg-home .hm-readouts{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}
.pg-home .hm-readouts>li{border-width:18px;border-image-width:18px}
.pg-home .hm-readouts>li>.k-in{display:flex;flex-direction:column;align-items:center;gap:8px;text-align:center;margin:-6px -4px}
.pg-home .hm-lbl{font:700 1.08rem/1.2 var(--f-th-head);color:var(--ink);letter-spacing:.02em}
html:not([lang="th"]) .pg-home .hm-lbl{font-family:var(--f-num);text-transform:uppercase;letter-spacing:.14em;font-size:1rem}
.pg-home .hm-readouts .k-vfd{width:100%;max-width:190px;min-height:66px;font-size:2.5rem}
.pg-home .hm-two{display:flex;gap:10px;width:100%;max-width:220px;justify-content:center}
.pg-home .hm-two>span{flex:1;display:flex;flex-direction:column;align-items:center;gap:4px}
.pg-home .hm-two small{font:700 .95rem/1.1 var(--f-th-head);color:var(--ink)}
html:not([lang="th"]) .pg-home .hm-two small{font-family:var(--f-num);text-transform:uppercase;letter-spacing:.08em;font-size:.85rem}
.pg-home .hm-leds{display:flex;gap:8px;margin-top:-2px}
.pg-home .hm-leds .k-led{width:16px;height:16px}
.pg-home .hm-cap{font-size:1rem;line-height:1.45;color:#2b2216;font-weight:500}

/* ---------- 3 · notice board ---------- */
.pg-home .hm-notice{padding-top:clamp(48px,7vw,84px);padding-bottom:clamp(30px,4vw,48px)}
.pg-home .nb{white-space:nowrap}
.pg-home .hm-board{filter:drop-shadow(4px 8px 0 rgba(0,0,0,.35)) drop-shadow(10px 24px 30px rgba(0,0,0,.55))}
.pg-home .hm-board>.k-in{display:grid;gap:34px}
.pg-home .hm-board-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px 20px}
.pg-home .hm-enamel{font:700 clamp(1.4rem,3vw,2.1rem)/1.25 var(--f-th-head);color:var(--blood);padding:0 10px 2px;rotate:-.8deg;
  filter:drop-shadow(3px 5px 0 rgba(0,0,0,.35)) drop-shadow(4px 10px 10px rgba(0,0,0,.4))}
html:not([lang="th"]) .pg-home .hm-enamel{font-family:var(--f-head);text-transform:uppercase;letter-spacing:.03em}
.pg-home .hm-board-hint{rotate:2deg}

.pg-home .hm-pins{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:44px 34px;align-items:start;padding-bottom:18px}
.pg-home .hm-pin{display:block;position:relative;color:var(--ink);text-decoration:none;rotate:var(--r,0deg);transition:translate .14s,rotate .14s}
.pg-home .hm-pin:hover{translate:0 -4px;rotate:0deg}
.pg-home .hm-pin:focus-visible{outline:none}
.pg-home .hm-pin:focus-visible .k-photo,.pg-home .hm-pin:focus-visible .hm-case,.pg-home .hm-pin:focus-visible .hm-loadnote{outline:3px solid var(--amber);outline-offset:4px}
.pg-home .hm-pin .k-photo img{aspect-ratio:16/9;object-fit:cover}
.pg-home .hm-note{position:relative;z-index:4;margin:-30px 10px 0 28px;filter:drop-shadow(3px 6px 0 rgba(0,0,0,.3)) drop-shadow(5px 12px 12px rgba(0,0,0,.45))}
.pg-home .hm-note>.k-in,.pg-home .hm-case>.k-in,.pg-home .hm-loadnote>.k-in{position:relative}
.pg-home .hm-kicker{display:block;font:700 .9rem/1.2 var(--f-num);letter-spacing:.16em;text-transform:uppercase;color:var(--blood);margin-bottom:2px}
html[lang="th"] .pg-home .hm-kicker{font-family:var(--f-th-head);letter-spacing:.04em;font-size:.95rem}
.pg-home .hm-note-h{font:700 1.32rem/1.25 var(--f-head);color:var(--ink);margin-bottom:6px}
html[lang="th"] .pg-home .hm-note-h{font-family:var(--f-th-head);font-size:1.38rem;line-height:1.35}
html:not([lang="th"]) .pg-home .hm-note-h{text-transform:uppercase;letter-spacing:.01em}
.pg-home .hm-note-p{font-size:1rem;line-height:1.6}
.pg-home .hm-go{margin-top:12px;font-size:.8rem}
html[lang="th"] .pg-home .hm-go{font-size:.9rem}
.pg-home .hm-pin:hover .hm-go,.pg-home .hm-pin:focus-visible .hm-go{color:var(--amber);text-shadow:0 0 8px rgba(255,178,62,.6),0 -1px 0 rgba(0,0,0,.9)}

.pg-home .hm-pin--boss{grid-column:span 4}
.pg-home .hm-pin--boss .hm-note{width:min(430px,64%);margin:-96px -12px 0 auto}
.pg-home .hm-pin--enemy{grid-column:span 2;margin-top:18px}
.pg-home .hm-pin--fp,.pg-home .hm-pin--arms,.pg-home .hm-pin--lv3{grid-column:span 2}
.pg-home .hm-pin--arms{margin-top:22px}
.pg-home .hm-pin--load{grid-column:1/-1;justify-self:center;width:min(100%,900px)}

/* enemy case file: manila card with index lines + stamp */
.pg-home .hm-case{display:block;filter:drop-shadow(3px 6px 0 rgba(0,0,0,.35)) drop-shadow(6px 14px 14px rgba(0,0,0,.45))}
.pg-home .hm-case>.k-in{padding:16px 2px 2px}
.pg-home .hm-case.k-clipped::before{left:auto;right:22px;margin-left:0;rotate:4deg}
.pg-home .hm-lines{display:grid;margin:8px 0 10px;border-top:1px solid rgba(142,30,24,.45)}
.pg-home .hm-lines>span{display:flex;justify-content:space-between;align-items:baseline;padding:4px 2px;border-bottom:1px solid rgba(28,22,14,.22);font-size:1.02rem}
.pg-home .hm-lines b{color:var(--blood);font-family:var(--f-num);font-weight:700}
.pg-home .hm-case-foot{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px 12px;margin-top:12px}
.pg-home .hm-case-foot .hm-go{margin-top:0}
.pg-home .hm-stamp{rotate:-7deg;font-size:1.15rem;opacity:.95;border-width:3px;margin-right:2px}

/* first person: keycaps on paper */
.pg-home .hm-keys{display:flex;flex-wrap:wrap;gap:6px;margin:4px 0 8px}
.pg-home .hm-keys .k-key{margin:0}
.pg-home .hm-key-wide{min-width:86px}
.pg-home .hm-key-wide>span{font-size:.86rem}

/* real loading screen: paper strip with a check list and the bar */
.pg-home .hm-loadnote{display:block;filter:drop-shadow(3px 6px 0 rgba(0,0,0,.3)) drop-shadow(6px 14px 14px rgba(0,0,0,.45))}
.pg-home .hm-loadnote>.k-in{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);gap:8px 30px;align-items:center;padding:14px 6px 4px}
.pg-home .hm-load-box{display:grid;gap:12px}
.pg-home .hm-checks{display:flex;flex-wrap:wrap;gap:6px 16px;font:500 1rem/1.2 var(--f-typed)}
html[lang="th"] .pg-home .hm-checks{font-family:var(--f-body)}
.pg-home .hm-checks>span{display:inline-flex;align-items:center;gap:6px}
.pg-home .hm-checks>span::before{content:"";width:22px;height:22px;flex:none;background:url("../img/kit/checkbox_off.webp") center/contain no-repeat}
.pg-home .hm-checks>span.on::before{background-image:url("../img/kit/checkbox_on.webp")}
.pg-home .hm-loadnote .hm-go{grid-column:1/-1;justify-self:start;margin-top:0}

/* ---------- 4 · file drawer ---------- */
.pg-home .hm-files{padding-bottom:clamp(20px,3vw,32px)}
.pg-home .hm-h2{margin-bottom:22px;font-size:clamp(2rem,5vw,3.4rem)}
.pg-home .hm-drawer{position:relative;padding:26px 22px 0;border-radius:3px;
  background:url("../img/kit/scratches.webp") 0 0/384px,linear-gradient(180deg,#07080a 0%,#121416 40%,#1b1e21 100%);
  box-shadow:inset 0 0 0 2px #050607,inset 12px 0 18px rgba(0,0,0,.6),inset -12px 0 18px rgba(0,0,0,.6),0 10px 26px rgba(0,0,0,.55)}
.pg-home .hm-folders{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:14px;align-items:stretch}
.pg-home .hm-folder>a{display:flex;flex-direction:column;height:100%;text-decoration:none;color:var(--ink);transition:translate .14s}
.pg-home .hm-folder>a:hover{translate:0 -10px}
.pg-home .hm-folder>a:focus-visible{outline:none}
.pg-home .hm-folder>a:focus-visible .hm-fbody{outline:3px solid var(--amber);outline-offset:2px}
.pg-home .hm-tab{align-self:flex-start;margin-left:var(--tab,0%);position:relative;z-index:1;margin-bottom:-3px;
  border-style:solid;border-color:transparent;border-width:0 16px;border-image:url("../img/kit/tab_on.webp") 0 32 fill / 0 16px stretch;
  padding:10px 4px 8px;font:700 1.08rem/1 var(--f-th-head);color:var(--ink);white-space:nowrap}
html:not([lang="th"]) .pg-home .hm-tab{font-family:var(--f-head);text-transform:uppercase;letter-spacing:.04em;font-size:1rem}
.pg-home .hm-fbody{flex:1;display:flex;flex-direction:column;gap:10px;border:16px solid transparent;
  border-image:url("../img/kit/plate_paper.webp") 36 fill / 16px stretch;padding:0 0 22px;
  box-shadow:0 -2px 0 rgba(0,0,0,.08);filter:drop-shadow(0 -3px 5px rgba(0,0,0,.35))}
.pg-home .hm-fbody img{width:100%;aspect-ratio:4/3;object-fit:cover;border:5px solid #efe9da;box-shadow:2px 4px 0 rgba(0,0,0,.25);rotate:-1deg}
.pg-home .hm-ftxt{display:flex;flex-direction:column;gap:8px;flex:1}
.pg-home .hm-fline{font-size:1rem;line-height:1.55;flex:1}
.pg-home .hm-fgo{font:400 1.05rem/1.2 var(--f-marker);color:var(--blood)}
html[lang="th"] .pg-home .hm-fgo{font-family:"Itim","Sarabun",cursive;font-size:1.1rem}
.pg-home .hm-drawer-front{position:relative;z-index:2;margin:-26px -22px 0;height:104px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;
  background:url("../img/kit/screw.webp") 14px 14px/16px no-repeat,url("../img/kit/screw.webp") right 14px top 14px/16px no-repeat,
    url("../img/kit/screw.webp") 14px calc(100% - 14px)/16px no-repeat,url("../img/kit/screw.webp") right 14px bottom 14px/16px no-repeat,
    url("../img/kit/scratches.webp") 0 0/256px,linear-gradient(180deg,#4a5057 0%,#30353a 12%,#24282c 70%,#1a1d20 100%);
  border-top:2px solid #6b737b;box-shadow:0 -10px 16px rgba(0,0,0,.55),inset 0 1px 0 rgba(255,255,255,.12),0 10px 22px rgba(0,0,0,.6)}
.pg-home .hm-cardholder{padding:4px 16px;border:3px solid var(--brass);background:url("../img/kit/plate_paper.webp") center/cover;color:var(--ink);
  font:500 .95rem/1.3 var(--f-typed);box-shadow:inset 0 2px 3px rgba(0,0,0,.35),0 1px 0 rgba(255,255,255,.12)}
html[lang="th"] .pg-home .hm-cardholder{font-family:var(--f-body);font-weight:700}
.pg-home .hm-handle{width:150px;height:20px;border-radius:10px;background:linear-gradient(180deg,#d3d7db,#8c939b 45%,#4a5057);
  box-shadow:0 4px 6px rgba(0,0,0,.6),inset 0 1px 0 rgba(255,255,255,.6)}

/* ---------- 5 · devices + free, packed in an army crate ---------- */
.pg-home .hm-gear{padding-top:clamp(28px,4vw,48px)}
.pg-home .hm-crate{filter:drop-shadow(4px 8px 0 rgba(0,0,0,.4)) drop-shadow(10px 22px 26px rgba(0,0,0,.55))}
.pg-home .hm-crate>.hm-gear-in{margin:-10px;padding:6px}
.pg-home .hm-gear-in{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.2fr);gap:clamp(28px,4vw,56px);align-items:center}
.pg-home .hm-free{rotate:-1.4deg;filter:drop-shadow(3px 6px 0 rgba(0,0,0,.35)) drop-shadow(6px 14px 16px rgba(0,0,0,.5))}
.pg-home .hm-free>.k-in{position:relative;padding:8px 6px 4px}
.pg-home .hm-free-stamp{display:inline-block;margin:0 0 10px 4px;font-size:2.6rem;rotate:-6deg;padding:.06em .4em 0;border-width:5px;opacity:.95}
.pg-home .hm-free-h{font:700 clamp(1.5rem,3.2vw,2.15rem)/1.3 var(--f-head);color:var(--ink);margin:0 0 10px}
html[lang="th"] .pg-home .hm-free-h{font-family:var(--f-th-head);line-height:1.35}
html:not([lang="th"]) .pg-home .hm-free-h{text-transform:uppercase}
.pg-home .hm-fine{font-size:1rem;line-height:1.6;margin-top:12px;padding-top:10px;border-top:1px dashed rgba(28,22,14,.35);color:#33291c}
.pg-home .hm-devices{display:grid;gap:14px}
.pg-home .hm-devices>li{filter:drop-shadow(3px 6px 0 rgba(0,0,0,.35)) drop-shadow(5px 12px 12px rgba(0,0,0,.4))}
.pg-home .hm-devices>li>.k-in{display:flex;align-items:center;gap:16px}
.pg-home .hm-dev{width:46px;height:46px;flex:none;fill:none;stroke:var(--bone-dim);stroke-width:1.5;stroke-linecap:round;filter:drop-shadow(0 1px 0 rgba(255,255,255,.12)) drop-shadow(0 -1px 0 rgba(0,0,0,.8))}
.pg-home .hm-dev-txt{flex:1;display:grid;gap:7px;justify-items:start;font-size:1rem;line-height:1.55}
.pg-home .hm-toggle{width:66px;flex:none}

@media(min-width:900px) and (max-height:780px){
  .pg-home .hm-gate{padding-top:22px}
  .pg-home .hm-gate-in{grid-template-columns:minmax(0,400px) minmax(0,1fr)}
  .pg-home .hm-play{min-height:70px;margin-top:16px}
}
/* ---------- tablet: two-column board turns into a tidy stack ---------- */
@media(max-width:1099px) and (min-width:900px){
  .pg-home .hm-gate-in{grid-template-columns:minmax(0,430px) minmax(0,1fr)}
  .pg-home .hm-folders{grid-template-columns:repeat(3,minmax(0,1fr));row-gap:22px}
  .pg-home .hm-play{font-size:1.3rem}
  html[lang="th"] .pg-home .hm-play{font-size:1.42rem}
}

/* ---------- phone / small tablet ---------- */
@media(max-width:899px){
  .pg-home .hm-gate{display:block;min-height:0;padding:0 0 88px}
  .pg-home .hm-night{bottom:auto;height:580px;background:none;-webkit-mask-image:linear-gradient(#000 70%,transparent 100%);mask-image:linear-gradient(#000 70%,transparent 100%)}
  .pg-home .hm-night img{object-position:37% 50%}
  .pg-home .hm-night::after{background:
    radial-gradient(70% 40% at 10% 0%,rgba(255,178,62,.18),rgba(255,178,62,0) 70%),
    linear-gradient(180deg,rgba(10,11,12,.55) 0%,rgba(10,11,12,0) 30%,rgba(10,11,12,0) 60%,rgba(10,11,12,.7) 100%)}
  .pg-home .hm-fence{height:120px}
  .pg-home .hm-gate-in{display:block}
  .pg-home .hm-menu.k-board{border:0;border-image:none;filter:none}
  .pg-home .hm-menu>.k-in{margin:0;align-items:center}
  .pg-home .hm-h1{display:flex;flex-direction:column;align-items:center}
  .pg-home .hm-sign{width:min(262px,70vw);margin:14px auto 0}
  .pg-home .hm-hook{align-items:center;margin-top:150px}
  .pg-home .hm-hook .k-dymo{font-size:1.28rem}
  .pg-home .hm-hook .k-dymo+.k-dymo{margin-left:0}
  html:not([lang="th"]) .pg-home .hm-hook .k-dymo{font-size:1.1rem}
  .pg-home .hm-play{width:min(100%,420px);margin-top:18px}
  .pg-home .hm-plat{width:min(100%,420px)}
  .pg-home .hm-pitch{width:min(100%,460px);margin:34px auto 0;rotate:-1deg}
  .pg-home .hm-status{margin-top:-40px}
  .pg-home .hm-readouts{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .pg-home .hm-readouts>li{border-width:14px;border-image-width:14px}
  .pg-home .hm-readouts .k-vfd{min-height:58px;font-size:2.2rem}

  .pg-home .hm-pins{grid-template-columns:minmax(0,1fr);gap:40px}
  .pg-home .hm-pin{grid-column:auto!important;margin-top:0!important;width:auto!important}
  .pg-home .hm-pin--boss .hm-note{width:auto;margin:-30px 4px 0 22px}
  .pg-home .hm-note{margin:-24px 4px 0 18px}
  .pg-home .hm-loadnote>.k-in{grid-template-columns:minmax(0,1fr);gap:14px}

  .pg-home .hm-drawer{padding:22px 12px 0}
  .pg-home .hm-folders{grid-template-columns:repeat(3,minmax(0,1fr));row-gap:22px}
  .pg-home .hm-drawer-front{margin:-8px -12px 0;height:96px}

  .pg-home .hm-gear-in{grid-template-columns:minmax(0,1fr)}
  .pg-home .hm-free-stamp{font-size:2.2rem}
}
/* small tablets: two notes side by side, readouts in one row */
@media(min-width:600px) and (max-width:899px){
  .pg-home .hm-pins{grid-template-columns:repeat(2,minmax(0,1fr));gap:40px 26px}
  .pg-home .hm-pin--boss,.pg-home .hm-pin--load{grid-column:1/-1!important}
  .pg-home .hm-pin--boss .hm-note{width:min(430px,70%);margin:-80px -8px 0 auto}
}
@media(min-width:700px) and (max-width:899px){
  .pg-home .hm-readouts{grid-template-columns:repeat(4,minmax(0,1fr))}
}
/* phones: folders stand one behind the other, photo left */
@media(max-width:599px){
  .pg-home .hm-folders{grid-template-columns:minmax(0,1fr);gap:0}
  .pg-home .hm-folder+.hm-folder{margin-top:-4px}
  .pg-home .hm-folder>a:hover{translate:8px 0}
  .pg-home .hm-fbody{flex-direction:row;align-items:flex-start;padding-bottom:6px}
  .pg-home .hm-fbody img{width:36%;max-width:170px;flex:none}
}
@media(max-width:520px){
  .pg-home .hm-devices>li>.k-in{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:8px 12px}
  .pg-home .hm-dev-txt{display:contents}
  .pg-home .hm-dev-txt>.k-dymo{grid-column:2;grid-row:1;justify-self:start}
  .pg-home .hm-dev-txt>span:last-child{grid-column:1/-1;grid-row:2}
  .pg-home .hm-dev{grid-column:1;grid-row:1;width:34px;height:34px}
  .pg-home .hm-toggle{grid-column:3;grid-row:1}
}
@media(max-width:420px){
  .pg-home .hm-play{font-size:1.12rem;letter-spacing:.02em;padding:0 6px;border-width:16px;border-image-width:16px}
  html[lang="th"] .pg-home .hm-play{font-size:1.45rem}
  .pg-home .hm-readouts>li>.k-in{margin:-8px -8px}
  .pg-home .hm-readouts .k-vfd{font-size:2rem;min-height:52px;border-width:12px;border-image-width:12px}
  .pg-home .hm-two{gap:6px}
  .pg-home .hm-toggle{width:56px}
}
@media(prefers-reduced-motion:reduce){.pg-home .hm-pin,.pg-home .hm-folder>a{transition:none}}
