/* ══════════════════════════════════════════════════════════════════
   폰 레이아웃 (2026-10-16) — mobile.js 와 짝. 각 화면 head 에서 기존 CSS 다음에 불러온다
   ★ 전부 @media (max-width: 899px) 안에만 쓴다 — fit.js 가 꺼지는 기준과 같다. 컴퓨터(900 이상)는 한 줄도 안 닿는다
   화면별 구분: html·body 의 .agm-home · .agm-edit · .agm-storage · .agm-history · .agm-share
              · .agm-nbhd · .agm-keyword · .agm-feed  (mobile.js 가 폰일 때만 붙임)
   ══════════════════════════════════════════════════════════════════ */
@media (max-width: 899px){

/* ── 공통 ─────────────────────────────────────────────────────── */
:root{--agm-sat:env(safe-area-inset-top,0px);--agm-sab:env(safe-area-inset-bottom,0px);--agm-sal:env(safe-area-inset-left,0px);--agm-sar:env(safe-area-inset-right,0px)}
html.ag-m{-webkit-text-size-adjust:100%;text-size-adjust:100%}
html.ag-m body{-webkit-tap-highlight-color:transparent}
/* 머리(로고 + HOME STORAGE EXPLORE)는 한 줄 그대로 — 노치만 피한다 */
html.ag-m .ag-header{padding-top:var(--agm-sat)!important;padding-left:calc(16px + var(--agm-sal))!important;padding-right:calc(16px + var(--agm-sar))!important;
  height:calc(64px + var(--agm-sat))!important;gap:10px!important}
html.ag-m .ag-header .logo,html.ag-m .ag-header .brand{font-size:17px!important}
html.ag-m .ag-header nav{gap:12px!important}
html.ag-m .ag-header nav a,html.ag-m .ag-header nav button{font-size:12.5px!important;min-height:44px;white-space:nowrap}

/* 시안 비교 토글 — 폰에서는 전부 숨김 (배경·커서·배치·히스토리 0ABC·겹침 표시·인트로·스토리지 시안) */
html.ag-m #vtog,html.ag-m #hpTog,html.ag-m .ovPick,html.ag-m .agm-hide{display:none!important}

/* 시트 부품 (AGM.sheet) — 화면 아래에서 올라오는 상자 */
html.ag-m .agm-sheet{position:fixed!important;left:0!important;right:0!important;bottom:0!important;top:auto!important;width:auto!important;
  max-width:none!important;max-height:88vh!important;max-height:88dvh!important;margin:0!important;border-radius:20px 20px 0 0!important;
  overflow:auto!important;overscroll-behavior:contain;padding-bottom:calc(20px + var(--agm-sab))!important;transition:transform .28s cubic-bezier(.2,.8,.2,1)}
html.ag-m .agm-grab{position:sticky;top:0;z-index:5;display:flex;align-items:center;justify-content:center;height:36px;margin:-4px 0 4px;
  background:linear-gradient(rgba(10,10,12,.96) 70%,transparent);touch-action:none}
html.ag-m .agm-grab i{width:40px;height:4px;border-radius:4px;background:rgba(255,255,255,.35)}
html.ag-m .agm-x{position:absolute;right:2px;top:-4px;width:44px;height:44px;min-height:44px;display:grid;place-items:center;border:0;background:none;
  color:#dadada;font-size:16px;cursor:pointer;padding:0}
html.ag-m .agm-sheet:not(.hide){animation:agmUp .32s cubic-bezier(.2,.8,.2,1)}
@keyframes agmUp{from{transform:translateY(100%)}}
html.ag-m .agm-scrim{position:fixed;inset:0;z-index:58;background:rgba(0,0,0,.55);opacity:0;pointer-events:none!important;transition:opacity .25s}
html.ag-m .agm-scrim.on{opacity:1;pointer-events:auto!important}   /* !important: 부모가 '#rcol>*{pointer-events:auto}' 같은 규칙을 갖고 있으면 꺼진 막이 탭을 먹었다 */
/* 스크롤되는 화면의 머리 — 홈처럼 머리 배경을 비운 화면도 폰에서는 글이 밑으로 지나가니 검정 그라데이션을 깐다 */
html.ag-m .ag-header{background:linear-gradient(#000 55%,rgba(0,0,0,.8) 80%,transparent)!important}

/* ── HOME (home.html) ─────────────────────────────────────────────
   위 = 그래픽 + 오른쪽 라벨(화면 높이 60%, --agm-gh 는 home.html phoneGH() 가 넣음) → 형태 손잡이(폭 꽉)
   아래로 스크롤 = 카드가 한 줄씩: 버튼 → 이름 → 설정 → CHANGES → FEED PREVIEW → ABOUT → HOW TO READ
   body 를 세로 flex 로 두고 #left·#hcol·.hguides·#panel 을 display:contents 로 풀어 순서(order)로 섞는다 */
html.agm-home,html.agm-home body{height:auto!important;min-height:100%;overflow-x:hidden!important;overflow-y:auto!important}
html.agm-home body{display:flex;flex-direction:column;gap:16px;
  padding:calc(64px + var(--agm-sat) + var(--agm-gh,500px)) calc(16px + var(--agm-sar)) calc(40px + var(--agm-sab)) calc(16px + var(--agm-sal))}
html.agm-home #stage,html.agm-home #labels{position:absolute!important;left:0;right:0;width:100%;top:calc(64px + var(--agm-sat))!important;height:var(--agm-gh,500px)!important;bottom:auto!important}
html.agm-home #stage canvas{touch-action:none}
html.agm-home #vignette,html.agm-home #heroT{display:none!important}
html.agm-home #left,html.agm-home #hcol,html.agm-home .hguides,html.agm-home #panel{display:contents!important}
html.agm-home #forms{order:1;position:static!important;transform:none!important;left:auto!important;right:auto!important;width:auto!important;margin:-8px 0 8px}
html.agm-home #fdesc{max-width:none!important;font-size:12.5px;line-height:1.5;margin:0 0 10px}
html.agm-home #fbar{width:100%!important;display:flex;align-items:center;gap:10px}
html.agm-home #scrub{flex:1;min-width:0}
html.agm-home #autoBtn{flex:none;min-height:44px;font-size:11px}
html.agm-home .acts{order:2;flex-direction:row!important;gap:10px!important;margin:0!important}
html.agm-home .acts .cta{flex:1;min-height:46px;font-size:13.5px}
html.agm-home .actnote{order:3;margin:0}
html.agm-home .actnote:empty{display:none}
html.agm-home .hcard{position:static!important;width:auto!important;left:auto!important;top:auto!important;transform:none!important;translate:none!important;margin:0!important;padding:22px!important;--u:1px}
html.agm-home #nowCard{order:4}html.agm-home #cntCard{order:5}html.agm-home #setCard{order:6}
html.agm-home #pSummary{order:7}html.agm-home #pSummary.hide{display:block!important}
html.agm-home #axf-entry{order:8;display:flex!important;position:static!important;width:auto!important;right:auto;bottom:auto;--u:1px;padding:22px}
html.agm-home #axf-entry.tuck{opacity:1;transform:none;pointer-events:auto}
html.agm-home #axf-entry button{min-height:46px}
html.agm-home .htr[aria-label="화면 안내"]{order:9}html.agm-home .htr[aria-label="읽는 법"]{order:10}
html.agm-home .htr{margin:0!important;width:auto!important;max-width:none!important}
html.agm-home .htr summary{min-height:44px}
html.agm-home #panel .pcard{margin:0}
html.agm-home .hc-ar{display:none!important}
html.agm-home #nowCard #title{width:auto!important}
html.agm-home #setCard .mk,html.agm-home #setCard .mv{font-size:13px}
/* 카테고리 상세 = 시트 */
html.agm-home #pDetail.agm-sheet{z-index:60;background:#0a0a0c;border-top:.5px solid rgba(255,255,255,.35);padding:0 16px}
html.agm-home #pDetail .pcard{background:none!important;border:0!important;padding:4px 6px 0!important;-webkit-backdrop-filter:none;backdrop-filter:none}
html.agm-home #pDetail .dr,html.agm-home #pDetail .kwadd,html.agm-home #pDetail .dtags span{font-size:13px}
html.agm-home #pDetail .kwadd{min-height:44px;display:inline-flex;align-items:center}
/* 저장 확인·7일 모달 */
html.agm-home .shcard,html.agm-home .wcard{width:calc(100vw - 24px)!important;max-height:86dvh;overflow:auto}

/* ── HISTORY (history.html) ───────────────────────────────────────
   history.js layoutPhone() 이 자리를 잡는다. 여기서는 그림 둘레를 페이지와 함께 스크롤되게(absolute) 바꾼다 */
html.agm-history,html.agm-history body{height:auto;min-height:100%;overflow-x:hidden;overflow-y:auto}
html.agm-history #cv,html.agm-history #chap,html.agm-history #evs,html.agm-history #axis,html.agm-history #yax,
html.agm-history #stat,html.agm-history #side,html.agm-history #hint,html.agm-history #ctip{position:absolute}
html.agm-history #heroT,html.agm-history #hcol{display:none!important}
html.agm-history #up{position:absolute;transform:none;min-height:44px;padding:8px 16px 8px 12px;font-size:13px}
html.agm-history #range{position:absolute;transform:none}
html.agm-history #range button{min-height:38px;padding:6px 14px}
html.agm-history #hint{transform:none;white-space:normal;font-size:12px;line-height:1.5}
html.agm-history #side{padding:20px;margin-bottom:calc(24px + var(--agm-sab))}
html.agm-history #side .rw,html.agm-history #side .smeta,html.agm-history #side .none,html.agm-history #side .el div,html.agm-history .fchip{font-size:12px}
html.agm-history .fchip{min-height:36px;padding:6px 12px 6px 10px}
html.agm-history #side .sacts .cta{min-height:44px}
html.agm-history .ch .n{font-size:12px}html.agm-history .ch .m{font-size:11px}
html.agm-history #cv{touch-action:pan-y}
html.agm-history #pinChip{position:fixed;left:50%!important;top:auto;bottom:calc(16px + var(--agm-sab));min-height:44px;padding:8px 16px;font-size:12.5px;z-index:40}
html.agm-history .ev .tip{display:none}
/* 스토리지 안에 끼워 넣은 기록(?embed) — 폭이 좁아 요약 줄이 범위 알약과 겹친다. 바깥 머리가 같은 숫자를 이미 말한다 */
html.agm-history.emb #stat{display:none!important}


/* ── EDIT (edit.html) ─────────────────────────────────────────────
   나선 = 화면 폭 꽉(edit.html dnaCenterX·fitCamera 의 PHONE 분기). 위 = 이름 한 줄 + [CATEGORY|SETTING] + 목록
   아래 = 조작 한 줄 → OFF 칸(가로 스크롤 줄, 탭 = 켜기 · 위로 끌어 나선에 끼우기) → 취소·반영하기
   인스펙터·목록 = 시트. 가로줄은 그대로 손가락으로 위아래 = 비중, 왼쪽(또는 아래 OFF 줄)으로 = 끄기 */
html.agm-edit,html.agm-edit body{overflow:hidden;overscroll-behavior:none}
html.agm-edit #stage canvas{touch-action:none}
html.agm-edit #lcol{position:fixed!important;left:calc(16px + var(--agm-sal))!important;right:calc(16px + var(--agm-sar))!important;top:calc(64px + var(--agm-sat))!important;
  width:auto!important;z-index:24;display:block}
html.agm-edit #lcol .ltitle,html.agm-edit #lcol .lk,html.agm-edit #eguide,html.agm-edit #setsum{display:none!important}
html.agm-edit .lname{display:flex!important;align-items:center;gap:6px;margin:0 0 4px!important;padding:0!important;background:none!important;border:0!important;
  -webkit-backdrop-filter:none!important;backdrop-filter:none!important;min-height:36px}
html.agm-edit .lname .lnK,html.agm-edit .lname .lnAuto{display:none}
html.agm-edit .lname .lnRow{display:flex;align-items:center;gap:6px;min-width:0;flex:1}
html.agm-edit .lname .lnV{font-size:15px!important;line-height:1.3!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:calc(100vw - 90px);min-height:36px;text-align:left}
html.agm-edit .lname .lnPen{flex:none;width:36px;height:36px;min-height:36px}
html.agm-edit .lname input{font-size:16px!important;width:100%}
html.agm-edit #mtabs{display:flex;width:calc(100% - 96px);margin:0!important;gap:8px!important}
html.agm-edit #mtabs .mtab{min-height:40px!important;padding:0 12px!important}
html.agm-edit #mtabs .mtab .ko{font-size:12.5px!important}
html.agm-edit #listbtn{position:fixed!important;top:calc(104px + var(--agm-sat))!important;right:calc(16px + var(--agm-sar))!important;min-height:40px;padding:0 14px!important;font-size:12.5px}
html.agm-edit body.embed #lcol{top:8px!important}
html.agm-edit body.embed #listbtn{top:48px!important}
html.agm-edit body.embed #setpage{top:94px!important}
html.agm-edit #ldesc{display:block!important;position:fixed;left:16px;right:16px;bottom:calc(166px + var(--agm-sab));margin:0;z-index:23;font-size:12px!important;line-height:1.45;color:#8d8d8d;text-align:center;pointer-events:none}
html.agm-edit body.tab-set #ldesc{display:none!important}
html.agm-edit #frag{position:fixed!important;left:0!important;right:0!important;width:auto!important;top:auto!important;bottom:calc(66px + var(--agm-sab))!important;
  height:94px!important;max-height:none!important;border-radius:16px 16px 0 0!important;border-left:0!important;border-right:0!important;padding:8px 0 6px!important;
  display:flex!important;flex-direction:column;gap:4px;z-index:24}
html.agm-edit #frag .fh{padding:0 16px!important;align-items:center}
html.agm-edit #frag .fen{font-size:15px!important}
html.agm-edit #frag .fko{font-size:12px!important}
html.agm-edit #frag .fsub,html.agm-edit #fdrop{display:none!important}
html.agm-edit #fragList{flex:1;flex-direction:row!important;overflow-x:auto!important;overflow-y:hidden!important;gap:6px!important;padding:0 16px!important;
  scroll-snap-type:x proximity;touch-action:pan-x;align-items:stretch}
html.agm-edit .frag{flex:none;display:flex;flex-direction:column;justify-content:center;width:112px;min-height:56px;padding:4px 4px 6px!important;scroll-snap-align:start;
  touch-action:pan-x;border:.5px solid rgba(255,255,255,.14);border-radius:12px!important}
html.agm-edit .frag canvas{width:104px!important;height:27px!important}
html.agm-edit .frag b{font-size:12px!important;padding-left:4px!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html.agm-edit #frag #dropmsg{inset:4px 8px!important;top:4px!important;height:auto!important}
html.agm-edit .acts{position:fixed!important;left:calc(16px + var(--agm-sal))!important;right:calc(16px + var(--agm-sar))!important;bottom:calc(10px + var(--agm-sab))!important;gap:10px!important;z-index:25}
html.agm-edit .acts>*{flex:1;min-height:46px}
html.agm-edit body.tab-set #frag,html.agm-edit body.tab-set #listbtn{display:none!important}
html.agm-edit #swap,html.agm-edit #gz,html.agm-edit #coach,html.agm-edit #ctip{display:none!important}
html.agm-edit #insp.agm-sheet,html.agm-edit #editor.agm-sheet{z-index:60!important;background:#0c0c0e!important;border:0!important;border-top:.5px solid rgba(255,255,255,.35)!important;
  padding-left:18px!important;padding-right:18px!important;padding-top:0!important;-webkit-backdrop-filter:none!important;backdrop-filter:none!important}
html.agm-edit #insp.hide,html.agm-edit #editor.hide{display:none!important}
/* 인스펙터는 나선 윗부분이 보이게 낮게 — 비중을 바꾸며 나선이 변하는 걸 같이 본다 */
html.agm-edit #insp.agm-sheet{max-height:64vh!important;max-height:64dvh!important}
html.agm-edit #insp .iclose{display:none}
html.agm-edit #insp .ihead{padding-right:36px}
html.agm-edit #insp input[type=range]{height:36px}
html.agm-edit #insp .ihint,html.agm-edit #insp .slab{font-size:12px!important}
html.agm-edit #insp .lockb,html.agm-edit #insp .outb{min-width:40px;min-height:40px}
html.agm-edit #setpage{left:0!important;right:0!important;top:calc(150px + var(--agm-sat))!important;bottom:calc(66px + var(--agm-sab))!important;padding:8px 16px 24px!important;width:auto!important}
html.agm-edit #onb .ocard,html.agm-edit #onb [class*=card]{max-height:88dvh;overflow:auto}


/* ── STORAGE (storage-hist.html) ──────────────────────────────────
   한 칼럼: 지금 적용 중 → 핀(가로 스크롤 줄) → 지난 적용 기록(70vh 블록, storage-hist.js HP='m') → 탭 알약 → 목록 2열 카드 */
html.agm-storage .wrap{padding:calc(76px + var(--agm-sat)) calc(16px + var(--agm-sar)) calc(40px + var(--agm-sab)) calc(16px + var(--agm-sal))!important;max-width:none}
html.agm-storage .stHead{display:flex!important;flex-direction:column;align-items:stretch!important;gap:14px!important;margin-bottom:20px}
html.agm-storage .titleLine h1{font-size:24px!important}
html.agm-storage .guideReplay{min-height:36px}
html.agm-storage .shareTop{width:auto!important;min-height:56px}
html.agm-storage .storageWorkspace{display:block!important}
html.agm-storage .topRow{display:block!important;margin-bottom:24px}
html.agm-storage .nowband{width:auto!important;padding:18px!important}
html.agm-storage .heroAct{display:flex;gap:10px}
html.agm-storage .heroAct .btn{flex:1;min-height:46px}
html.agm-storage .nowRight summary{min-height:44px;display:flex;align-items:center}
html.agm-storage .pinShelfHead{flex-wrap:wrap;row-gap:4px}
html.agm-storage .pinWall{flex-wrap:nowrap!important;display:flex!important;overflow-x:auto;scroll-snap-type:x mandatory;gap:10px!important;
  margin:0!important;padding:4px 0 10px!important;scrollbar-width:none;-webkit-overflow-scrolling:touch}
html.agm-storage .pinWall::-webkit-scrollbar{display:none}
html.agm-storage .pinItem,html.agm-storage .pinEmpty{flex:0 0 120px!important;min-width:0!important;width:120px!important;scroll-snap-align:start}
html.agm-storage .pinItem .thumb,html.agm-storage .pinEmpty .slot{width:108px!important;height:108px!important}
html.agm-storage .pinItem .nm{font-size:12px!important;max-width:116px}
html.agm-storage .pinItem .unpin{width:32px;height:32px;opacity:.8}
html.agm-storage .histSec.mob{margin:8px 0 28px}
html.agm-storage .histSec.mob .hsHead{flex-direction:column;align-items:flex-start;gap:4px}
html.agm-storage .histSec.mob .hsAbout{font-size:12px}
html.agm-storage .hsRot{margin:2px 0 0;font-size:12px;color:#8d8d8d}
html.agm-storage .histSec.mob .hsBox{height:70vh;height:70svh;min-height:420px;max-height:640px}
html.agm-storage .scopeRow{overflow-x:auto;scrollbar-width:none;margin-left:calc(50% - 50vw);margin-right:calc(50% - 50vw);padding:0 16px}
html.agm-storage .scopeRow::-webkit-scrollbar{display:none}
html.agm-storage .scopeTabs{flex-wrap:nowrap!important;width:max-content}
html.agm-storage .scopeTabs .mtab{min-height:40px;white-space:nowrap;font-size:12.5px}
html.agm-storage .listTools{display:flex!important;flex-wrap:wrap;gap:8px!important;align-items:center}
html.agm-storage .listTools .search{order:-1;flex:1 1 100%;width:auto!important}
html.agm-storage .listTools .search input{font-size:16px;min-height:40px;width:100%}
html.agm-storage .listTools select,html.agm-storage .listTools .fbtn,html.agm-storage .listTools .seg button{min-height:40px}
html.agm-storage .grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}
html.agm-storage .card{padding:12px!important;border-radius:16px!important;min-width:0}
/* 상세 모달 = 시트 */
html.agm-storage .dim{padding:0!important;place-items:end stretch!important}
html.agm-storage #modal.agm-sheet{position:relative!important;max-height:88dvh!important;border-radius:20px 20px 0 0!important;padding:0 16px calc(20px + var(--agm-sab))!important;
  border-left:0;border-right:0;border-bottom:0;background:#0e0e10!important}
html.agm-storage .shDim{padding:0!important;place-items:end stretch!important}
html.agm-storage .shCard.agm-sheet{position:relative!important;padding:0 18px calc(20px + var(--agm-sab))!important;background:#101012!important}
html.agm-storage .shCard textarea{font-size:16px}
html.agm-storage .shFoot{flex-wrap:wrap}
html.agm-storage .shFoot .btn{min-height:44px}
html.agm-storage #edSheet{left:0!important;right:0!important;top:var(--agm-sat)!important;border-radius:0!important}
html.agm-storage #edSheet .edBack{min-height:44px;min-width:44px}
/* 비교 LAB (storage-compare.js) — 보드는 이미 세로 2열(760 이하 규칙). 머리를 쌓고, 기둥 비교는 가로 스크롤 */
html.agm-storage #cmpLab{padding-left:calc(16px + var(--agm-sal))!important;padding-right:calc(16px + var(--agm-sar))!important;padding-bottom:calc(180px + var(--agm-sab))!important}
html.agm-storage #cmpLab .lbTop{flex-wrap:wrap;align-items:center!important;gap:10px 12px!important;padding:calc(14px + var(--agm-sat)) 0 14px!important;background:linear-gradient(#000 88%,rgba(0,0,0,0))!important}
html.agm-storage #cmpLab .lbTop .lbT{order:3;flex:1 1 100%;min-width:0}
html.agm-storage #cmpLab .lbTop .cpBack{order:1;min-height:44px}
html.agm-storage #cmpLab .lbTop .lbX{order:2;margin-left:auto;width:44px;height:44px}
html.agm-storage #cmpLab .lbTop h2{font-size:19px!important;line-height:1.35}
html.agm-storage #cmpLab .lbTray{bottom:calc(10px + var(--agm-sab))!important}
html.agm-storage #cmpLab .lvMain{overflow-x:auto;overflow-y:hidden;margin:0 calc(-16px - var(--agm-sar)) 0 calc(-16px - var(--agm-sal));padding:0 16px 34px;scrollbar-width:none}
html.agm-storage #cmpLab .lvMain::-webkit-scrollbar{display:none}
html.agm-storage #cmpLab .lvHeads,html.agm-storage #cmpLab .lvRibW{width:calc(var(--n) * 128px);min-width:calc(100% - 88px);margin-left:88px}
html.agm-storage #cmpLab .lvRibW{height:300px}
html.agm-storage #cmpLab .lvLb.nm{font-size:11px}
html.agm-storage #cmpLab .lvOpen{opacity:1;min-height:36px;height:36px}
html.agm-storage #cmpLab .lvRow{font-size:12px}
html.agm-storage #cmpLab .lvApp{min-height:44px;height:auto}
html.agm-storage #modal .mHead{flex-direction:column;align-items:stretch;gap:12px}
html.agm-storage #modal .mHead h2{font-size:20px;padding-right:36px}
html.agm-storage #dClose{display:none}
html.agm-storage #modal .mIcons{justify-content:flex-start;gap:8px}
html.agm-storage #modal .icob{width:44px;height:44px}
html.agm-storage #modal .mTabs{overflow-x:auto;scrollbar-width:none}
html.agm-storage #modal .mTab{min-height:44px;white-space:nowrap}
html.agm-storage #modal .mFoot,html.agm-storage #mFoot{display:flex;flex-wrap:wrap;gap:8px}
html.agm-storage #mFoot .btn{flex:1 1 calc(50% - 4px);min-height:46px}


/* ── 상세 모달 (neighborhood-detail.js — EXPLORE CATEGORY·KEYWORD 공용) = 시트 ── */
html.ag-m .nd-dim{padding:0!important;place-items:end stretch!important}
html.ag-m #nd-modal.agm-sheet{position:relative!important;padding:0 16px calc(20px + var(--agm-sab))!important;background:#0e0f10!important}
html.ag-m #nd-modal .nd-head{flex-direction:column;gap:10px}
html.ag-m #nd-modal .nd-head h2{font-size:20px;padding-right:36px}
html.ag-m #nd-close{display:none}
html.ag-m #nd-modal .nd-icons{margin-left:0}
html.ag-m #nd-modal .nd-tabs{overflow-x:auto;scrollbar-width:none;gap:18px}
html.ag-m #nd-modal .nd-tab{white-space:nowrap;min-height:44px}
html.ag-m #nd-modal .nd-body{grid-template-columns:minmax(0,1fr)!important;gap:18px!important}
html.ag-m #nd-modal .nd-foot{display:flex;flex-wrap:wrap;gap:8px}
html.ag-m #nd-modal .nd-foot .btn{flex:1 1 calc(50% - 4px);min-height:46px}
html.ag-m .nd-toast{top:calc(12px + var(--agm-sat))!important}

/* ── EXPLORE CATEGORY (explore-neighborhood.html) ─────────────────
   지도 = 화면 전체(핀치 확대 · 끌어 돌리기 = OrbitControls). 위 = CATEGORY|KEYWORD + 읽는 법(접힘)
   아래 한 줄 = [3D|2D] [전체 지도] [영역 선택] — 글자 줄바꿈 금지. 영역 패널·상세 = 시트 */
html.agm-nbhd #hcol{left:calc(16px + var(--agm-sal))!important;right:calc(16px + var(--agm-sar))!important;top:calc(126px + var(--agm-sat))!important;width:auto!important}
html.agm-nbhd #hcol .about{display:none!important}
html.agm-nbhd #hcol .htr{padding:8px 14px!important;max-width:none}
html.agm-nbhd #hcol .htr summary{min-height:32px}
html.agm-nbhd #hcol .htr .rdl{max-height:44vh;overflow:auto}
html.agm-nbhd #hcol .htr .rdl p{font-size:12px}
html.agm-nbhd .tabs{top:calc(72px + var(--agm-sat))!important;left:calc(16px + var(--agm-sal))!important}
html.agm-nbhd .tabs a{min-height:44px;padding:0 16px!important;display:flex;align-items:center;font-size:12px!important}
html.agm-nbhd #dock{left:calc(12px + var(--agm-sal))!important;right:calc(12px + var(--agm-sar))!important;transform:none!important;bottom:calc(14px + var(--agm-sab))!important;gap:8px}
html.agm-nbhd #dock #gesture{white-space:normal;text-align:center;font-size:12px}
html.agm-nbhd #dock .drow{display:flex!important;flex-wrap:nowrap!important;align-items:center;gap:6px;width:100%;justify-content:center}
html.agm-nbhd .ag-exh .views,html.agm-nbhd .views{flex:none}
html.agm-nbhd .views button,html.agm-nbhd #wayfind button,html.agm-nbhd #wayfind select{height:40px!important;white-space:nowrap;font-size:12px!important}
html.agm-nbhd .views button{padding:0 11px!important}
html.agm-nbhd #wayfind{position:static!important;left:auto!important;bottom:auto!important;flex:1 1 auto;min-width:0;flex-wrap:nowrap}
html.agm-nbhd #wayfind button{padding:0 11px!important;flex:none}
html.agm-nbhd #wayfind .wsel{flex:1;min-width:0}
html.agm-nbhd #wayfind select{width:100%;min-width:0;padding:0 26px 0 10px!important;text-overflow:ellipsis;font-size:16px!important;transform:scale(.75);transform-origin:left center;width:133.3%!important;margin-right:-33.3%}
html.agm-nbhd #wayfind .sep{display:none}
html.agm-nbhd #xyz{display:none!important}
html.agm-nbhd .ag-exh .place,html.agm-nbhd .place{font-size:13px!important;padding:7px 13px!important;font-weight:600}
html.agm-nbhd .node-name:not(.on){visibility:hidden}
html.agm-nbhd #rcol{right:0!important;left:0!important;width:auto!important;top:auto!important;z-index:61!important}
html.agm-nbhd #panel.agm-sheet{background:#0b0d0e!important;padding:0 18px calc(20px + var(--agm-sab))!important;border:0!important;border-top:.5px solid rgba(255,255,255,.35)!important;max-height:62dvh!important;z-index:60}
html.agm-nbhd #panel.agm-sheet[hidden]{display:none!important}
html.agm-nbhd #panel .close{display:none}
html.agm-nbhd #panel .connection{min-height:44px}
html.agm-nbhd #panel .reroll{min-height:44px;height:44px}
html.agm-nbhd #tip{max-width:calc(100vw - 24px)}


/* ── EXPLORE KEYWORD (explore-keyword.html) ───────────────────────
   키워드 칸 = 한 줄 가로 스크롤 칩 + '키워드 추가'(누르면 입력칸이 위로 펼쳐짐). 지도는 그 아래부터 화면 끝까지(computeField PH 분기) */
html.agm-keyword .subtoggle{top:calc(72px + var(--agm-sat))!important;left:calc(16px + var(--agm-sal))!important}
html.agm-keyword .subtoggle a{height:44px!important;font-size:12px!important}
html.agm-keyword #kw-rail{top:calc(126px + var(--agm-sat))!important;left:calc(12px + var(--agm-sal))!important;right:calc(12px + var(--agm-sar))!important;width:auto!important;gap:0!important}
html.agm-keyword #kw-panel{display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;align-items:center;gap:6px!important;padding:6px!important;
  border-radius:999px!important;overflow:visible!important}
html.agm-keyword #kw-panel.agm-adding{flex-wrap:wrap!important;border-radius:20px!important}
html.agm-keyword #kw-chips{order:1;flex:1 1 auto!important;flex-basis:auto!important;flex-wrap:nowrap!important;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;
  scroll-snap-type:x proximity;-webkit-mask-image:linear-gradient(90deg,#000 88%,transparent);mask-image:linear-gradient(90deg,#000 88%,transparent);padding-right:18px}
html.agm-keyword #kw-chips::-webkit-scrollbar{display:none}
html.agm-keyword .kw-chip{flex:none;white-space:nowrap;min-height:40px!important;font-size:13px!important;padding:0 14px!important;display:inline-flex;align-items:center;scroll-snap-align:start}
html.agm-keyword .kw-entry{order:2;flex:none!important}
html.agm-keyword .kw-entry button{min-height:40px!important;height:40px;white-space:nowrap;font-size:13px!important;padding:0 14px!important}
html.agm-keyword .kw-entry.agm-shut .kw-field{display:none!important}
html.agm-keyword #kw-panel.agm-adding .kw-entry{order:0;flex:1 1 100%!important}
html.agm-keyword .kw-entry input{font-size:16px!important}
html.agm-keyword .kw-field{min-height:40px}
html.agm-keyword .kw-chip .empty-tip{display:none!important}
html.agm-keyword #tooltip{max-width:calc(100vw - 24px)}
html.agm-keyword #toast{bottom:calc(24px + var(--agm-sab))!important}


/* ── SHARE (share.html) ── 목록 한 칼럼 그대로, 상세(#main)만 시트 — 목록 줄을 누르면 열림 */
html.agm-share .wrap{padding:calc(76px + var(--agm-sat)) calc(16px + var(--agm-sar)) calc(32px + var(--agm-sab)) calc(16px + var(--agm-sal))!important}
html.agm-share #main{display:none}
html.agm-share #main.agm-open{display:block}
html.agm-share #main.agm-sheet{z-index:60;background:#0d0f10!important;border:0!important;border-top:.5px solid rgba(255,255,255,.35)!important;padding:0 16px calc(20px + var(--agm-sab))!important;margin:0!important}
html.agm-share #main .btn{min-height:44px}
html.agm-share .boxTab{min-height:44px}
html.agm-share #inList button{min-height:56px}
html.agm-share .inboxHead .btn{min-height:36px}


/* ── FEED PREVIEW (feed-preview2.html) ── 왼쪽 요약 → 위, 피드 → 아래로 한 칼럼. 영상 2열 */
html.agm-feed body:not(.emb-tab){overflow-x:hidden!important;overflow-y:auto!important;height:auto}
html.agm-feed body:not(.emb-tab) #side{position:static!important;width:auto!important;padding:calc(80px + var(--agm-sat)) calc(16px + var(--agm-sar)) 0 calc(16px + var(--agm-sal));overflow:visible}
html.agm-feed body.emb-sheet #side{padding-top:calc(64px + var(--agm-sat))}
html.agm-feed body:not(.emb-tab) #main{position:static!important;padding:20px calc(16px + var(--agm-sar)) calc(32px + var(--agm-sab)) calc(16px + var(--agm-sal))}
html.agm-feed body:not(.emb-tab) #feed{overflow:visible;padding:16px 0 24px}
html.agm-feed h1{font-size:22px}
html.agm-feed .stat .big{font-size:52px}
html.agm-feed .cr{min-height:40px}
html.agm-feed .tool{flex-wrap:wrap;gap:8px}
html.agm-feed .seg button{height:40px;font-size:12.5px}
html.agm-feed .grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:18px 10px!important}
html.agm-feed .pg{grid-template-columns:minmax(0,1fr)!important}
html.agm-feed #act .btn{min-height:46px}
html.agm-feed #fpClose{width:44px;height:44px;top:calc(12px + var(--agm-sat));right:calc(12px + var(--agm-sar))}
html.agm-feed body.emb-sheet .tool{padding-right:0}
html.agm-feed body.emb-tab #main{padding:10px 10px}
/* 홈·모달에서 여는 미리보기 시트(feed-preview-kit.js) — 폰은 화면 전체 */
html.ag-m #axf-sheet{padding:var(--agm-sat) 0 0!important}
html.ag-m #axf-sheet .axf-box{border-radius:18px 18px 0 0!important;border-bottom:0!important}
html.ag-m .axf-tab{height:min(70dvh,560px)!important}

}
