/* 모바일 웹앱 — 확장 팝업 스타일(popup.css) 위에 덧씌우는 부분만 */

/* 확장에서만 의미 있는 것 (설정, 라이브 화면 버튼, 관리자) */
.is-web .ext-only {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  min-height: 100%;
}

/* 팝업은 360px 고정 — 웹은 화면 폭에 맞추고, 큰 화면에서는 가운데 한 열로 */
body.is-web {
  width: auto;
  max-width: 520px;
  min-height: 100dvh;
  margin: 0 auto;
  font-size: 14px;
  -webkit-tap-highlight-color: transparent;
}

.is-web .app {
  padding: 0 max(16px, env(safe-area-inset-right)) calc(16px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}

.is-web .topbar {
  height: 56px;
  padding-top: env(safe-area-inset-top);
  box-sizing: content-box;
}

/* 손가락으로 누르기 좋은 크기 */
.is-web .icon-btn {
  min-width: 40px;
  min-height: 40px;
}

/* iOS는 16px보다 작은 입력란에 초점이 가면 화면을 확대한다 */
.is-web input,
.is-web textarea {
  font-size: 16px;
}

/* 바텀 시트도 한 열 폭에 맞춘다 */
.is-web .sheet-panel {
  max-width: 520px;
  margin: 0 auto;
  padding-bottom: env(safe-area-inset-bottom);
}

/* ---------- 시간표 전체화면 뷰어 ---------- */
.wv-lock,
.wv-lock body {
  overflow: hidden;
}

.web-viewer {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(5, 6, 7, 0.96);
  display: flex;
  flex-direction: column;
}

.web-viewer[hidden] {
  display: none;
}

.wv-stage {
  flex: 1;
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: auto;
  padding: env(safe-area-inset-top) 8px 0;
}

.wv-img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 6px;
  touch-action: pinch-zoom;
}

/* 두 번 탭: 세로를 꽉 채우고 좌우로 넘겨 보기 */
.web-viewer.is-zoomed .wv-stage {
  place-items: start;
  padding: 0;
}

.web-viewer.is-zoomed .wv-img {
  max-width: none;
  max-height: none;
  height: 100%;
  border-radius: 0;
}

.wv-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
}

.wv-hint {
  flex: 1;
  font-size: 12px;
  color: var(--text-3, #6f717a);
}

.wv-btn {
  display: inline-grid;
  place-items: center;
  min-width: 44px;
  height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  background: var(--surface-2, #1f2024);
  color: var(--text, #ececef);
  font-weight: 600;
}

.wv-close {
  padding: 0;
  width: 44px;
}
