/* v1 모바일 배치 (폭 759px 이하). core.js fitStage 가 html.og-mobile 을 붙이고 무대 축소를 끈다.
   데스크톱(1440x810 무대 축소)은 건드리지 않는다. 폰 프레임을 벗기고 실제 휴대폰 화면 = 여행자 앱으로 쓴다. */
/* 데스크톱: 랜딩으로 가는 작은 링크(워드마크 옆) */
.og-back{display:inline-flex;align-items:center;height:30px;padding:0 10px;font-size:13px;font-weight:700;color:var(--teal-d);text-decoration:none;border:1px solid var(--line);border-radius:8px;white-space:nowrap}
.og-back:hover{border-color:var(--teal)}

@media (max-width:759px){
  html,body{height:auto;min-height:100%;overflow-x:hidden;overflow-y:auto}
  #stage{position:static;width:100%;height:auto;min-height:100dvh;transform:none!important;overflow:visible;display:block;padding-bottom:calc(var(--ctl-h) + 20px)}

  /* 상단: 워드마크 + 데모 표시 / 탭은 가로 스크롤 / 정직 표기 카드 */
  #topbar{position:sticky;top:0;z-index:40;height:auto;flex-wrap:wrap;gap:0;padding:0;background:var(--surface)}
  #topbar .wm{padding:10px 14px 6px;order:1}
  #topbar .wm .en{font-size:14px}
  #topbar .wm .ko{display:none}
  #topbar .og-back{order:2;margin-left:auto;margin-right:10px;display:inline-flex;align-items:center;min-height:36px;padding:0 10px;font-size:13px;font-weight:700;color:var(--teal-d);text-decoration:none;border:1px solid var(--line);border-radius:8px}
  #tabs{order:3;width:100%;height:46px;overflow-x:auto;scrollbar-width:none;padding:0 6px;gap:0;border-top:1px solid var(--line2)}
  #tabs::-webkit-scrollbar{display:none}
  #tabs .tab{padding:0 10px;font-size:14px;flex:none}
  .topbar-right{order:4;width:calc(100% - 20px);margin:6px 10px 8px;padding:6px 10px;justify-items:stretch}
  .topbar-right .badge{white-space:normal;font-size:11.5px;line-height:16px}

  /* 본문 */
  #views{position:static;flex:none}
  .view{position:static;inset:auto}
  .view.on{display:block}
  .view-split,.view-full{padding:0}

  /* 여행자 앱 = 실제 화면 폭. 폰 장식(상태바·노치·홈 인디케이터·캡션) 제거 */
  .phone-col{display:block;margin:0;flex:none;width:100%}
  .phone-cap{display:none}
  .phone-wrap{width:100%;height:calc(100dvh - 190px);min-height:520px}
  .phone{position:relative;width:100%;height:100%;transform:none;padding:0;border-radius:0;box-shadow:none;background:#fff}
  .phone-screen{width:100%;height:100%;border-radius:0;border-bottom:1px solid var(--line)}
  .phone-status,.phone-home{display:none}
  .view-split .phone-screen::after{display:none}

  /* 엔진 패널: 앱 아래로 이어 붙임 */
  .view-split .engine{margin:12px 10px 0;border-radius:12px}
  .eng-head{padding:12px 14px 10px;flex-wrap:wrap;gap:8px}
  .eng-head-r{margin-left:0}
  .eng-title{font-size:18px}
  .eng-sub{font-size:13.5px}
  .eng-body{padding:12px 14px 18px;font-size:15px;overflow:visible;-webkit-mask-image:none!important;mask-image:none!important}
  .eng-log li{font-size:14.5px;padding:6px 8px;gap:8px}
  .eng-stat{min-width:0}
  .eng-body table{display:block;overflow-x:auto;max-width:100%}

  /* 데스크톱 콘솔 탭(③ 스튜디오·④ 구조도): 넓은 화면용 → 가로 스크롤 + 안내 */
  .view-full .view-body{overflow-x:auto;-webkit-overflow-scrolling:touch;min-height:70dvh}
  .view-full .view-body>*{min-width:1200px}
  .view-full::before{content:'Desktop console — scroll sideways, or open on a laptop for the full view.';display:block;margin:10px;padding:8px 12px;border-radius:10px;background:var(--amber-bg);color:var(--amber-t);font-size:13px;font-weight:600}

  /* 하단 조작 바: 화면 아래 고정, 넘치면 가로 스크롤 */
  #ctlbar{position:fixed;left:0!important;right:0;bottom:0;border-radius:0;border-width:1px 0 0;height:auto;min-height:var(--ctl-h);padding:6px 8px calc(6px + env(safe-area-inset-bottom));gap:8px;z-index:45}
  #ctlbar::-webkit-scrollbar{display:none}
  /* 단계 원은 숨기고(엔진 패널에 단계 표시) 조작 버튼이 한 화면에 들어오게 */
  #ctl-steps{display:none}
  .ctl-right{flex:1;gap:6px;justify-content:space-between}
  #ctlbar .seg:has([data-speed-btn]),#ctlbar [data-zoom-btn],#ctlbar .seg:has([data-lang-btn]){display:none}
  #ctlbar .btn.sm{padding:0 8px;font-size:13.5px;gap:4px;min-width:0}
  .ctl-right{min-width:0}
  #ctlbar .btn.sm svg.i{display:none}
  #ctlbar #btn-present{order:-1}
  #ctlbar .btn.sm{height:38px}
  #ctlbar #btn-reset{margin-left:0}
  #ctlbar #btn-reset::before{display:none}

  /* 무대 기준 모달·토스트 → 화면 기준 */
  #stage>.og-backdrop{position:fixed}
  #stage>.og-backdrop .og-modal{width:calc(100% - 20px);max-height:85dvh}
  .og-toast{position:fixed;bottom:calc(var(--ctl-h) + 24px);max-width:calc(100% - 24px);white-space:normal;text-align:center}
}
