/* ============================================================
   Syncle AI — ChatGPT 스타일 클론 (SnowUI ChatGPT UI Kit)
   디자인 원본: Syncle AI ChatGPT-Style.dc.html (eb3ff326)
   네임스페이스: sg- (공용 컴포넌트 인라인 스타일 충돌 방지)
   ============================================================ */

/* ── SnowUI ChatGPT 시맨틱 토큰 (semantic.css 이식, 라이트) ── */
:root {
  --sg-fg: rgb(28, 28, 28);
  --sg-fg-strong: rgb(0, 0, 0);
  --sg-fg-secondary: rgba(0, 0, 0, 0.8);
  --sg-fg-tertiary: rgba(0, 0, 0, 0.4);
  --sg-fg-muted: rgba(0, 0, 0, 0.4);
  --sg-fg-subtle: rgba(0, 0, 0, 0.2);
  --sg-fg-onbrand: rgb(255, 255, 255);

  --sg-bg: rgb(255, 255, 255);
  --sg-bg-subtle: rgb(249, 249, 250);
  --sg-bg-card: rgb(247, 249, 251);
  --sg-surface-04: rgba(0, 0, 0, 0.04);
  --sg-surface-08: rgba(0, 0, 0, 0.08);
  --sg-surface-hover: rgba(0, 0, 0, 0.05);

  --sg-border: rgba(0, 0, 0, 0.1);
  --sg-border-strong: rgba(0, 0, 0, 0.2);
  --sg-border-subtle: rgba(0, 0, 0, 0.04);

  --sg-plus: rgb(159, 159, 248);
  --sg-indigo: rgb(88, 86, 214);
  --sg-red: rgb(255, 59, 48);

  --sg-r-8: 8px;
  --sg-r-12: 12px;
  --sg-r-16: 16px;
  --sg-r-24: 24px;

  --sg-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --sg-shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
  --sg-shadow-lg: 0 24px 48px rgba(0, 0, 0, 0.1);

  --sg-font: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}

/* ── 페이지 베이스 ── */
html.sg-html, body.sg-body { height: 100%; }
body.sg-body {
  margin: 0; background: var(--sg-bg); color: var(--sg-fg);
  font-family: var(--sg-font); -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
.sg-app { display: flex; height: 100dvh; min-height: 0; background: var(--sg-bg); }
.sg-app *, .sg-app *::before, .sg-app *::after { box-sizing: border-box; }
.sg-app button { font-family: inherit; cursor: pointer; }

/* ============ 좌측 사이드바 (대화 히스토리) ============ */
.sg-side {
  width: 282px; flex: none; background: var(--sg-bg);
  border-right: 1px solid var(--sg-border);
  display: flex; flex-direction: column; min-height: 0;
}
.sg-side-body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; min-height: 0; }

.sg-newchat {
  display: flex; align-items: center; justify-content: flex-start; gap: 8px;
  width: 100%; height: 40px; padding: 0 14px; border: none;
  border-radius: var(--sg-r-12); background: var(--sg-fg); color: var(--sg-fg-onbrand);
  font-size: 14px; font-weight: 600; transition: opacity 120ms ease;
}
.sg-newchat:hover { opacity: .88; }
.sg-newchat i { font-size: 20px; }

.sg-search {
  display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px;
  border: 1px solid var(--sg-border); border-radius: var(--sg-r-12); background: var(--sg-bg);
}
.sg-search i { font-size: 16px; color: var(--sg-fg-muted); flex: none; }
.sg-search input {
  flex: 1; min-width: 0; border: none; outline: none; background: transparent;
  font-family: inherit; font-size: 14px; color: var(--sg-fg);
}
.sg-search input::placeholder { color: var(--sg-fg-muted); }

.sg-hist { overflow-y: auto; display: flex; flex-direction: column; margin: 2px -4px 0; flex: 1; min-height: 0; }
.sg-hist::-webkit-scrollbar { width: 4px; }
.sg-hist::-webkit-scrollbar-thumb { background: var(--sg-surface-08); border-radius: 2px; }
.sg-grp { font-size: 12px; font-weight: 600; color: var(--sg-fg-muted); padding: 14px 12px 4px; }
.sg-row {
  display: flex; align-items: center; gap: 8px; height: 40px; flex: none; padding: 0 12px;
  border-radius: var(--sg-r-12); color: var(--sg-fg); cursor: pointer;
  transition: background 120ms ease; background: transparent; position: relative;
}
.sg-row:hover { background: var(--sg-surface-04); }
.sg-row.active { background: var(--sg-surface-08); }
.sg-row i { font-size: 18px; color: var(--sg-fg); flex: none; }
.sg-rowlbl {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 14px; color: var(--sg-fg);
}
.sg-hist-empty { padding: 14px 12px; font-size: 13px; color: var(--sg-fg-muted); }

.sg-side-foot { padding: 12px; border-top: 1px solid var(--sg-border); display: flex; flex-direction: column; gap: 2px; }
.sg-foot {
  display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 12px;
  border-radius: var(--sg-r-12); color: var(--sg-fg); cursor: pointer; font-size: 15px;
  transition: background 120ms ease; text-decoration: none; background: transparent; border: none;
}
.sg-foot:hover { background: var(--sg-surface-04); }
.sg-foot i { font-size: 20px; }
.sg-foot span { flex: 1; text-align: left; }

/* ============ 메인 영역 ============ */
.sg-main { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 0; }

.sg-top {
  height: 52px; flex: none; display: flex; align-items: center; justify-content: space-between;
  padding: 0 18px; background: var(--sg-bg);
}
.sg-top.has-line { border-bottom: 1px solid var(--sg-border); }
.sg-top-title {
  display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px;
  color: var(--sg-fg); text-decoration: none;
}
.sg-home-btn {
  display: inline-flex; align-items: center; height: 32px; padding: 0 12px; margin-right: 6px;
  border: 1px solid var(--sg-border); border-radius: var(--sg-r-8); background: var(--sg-bg);
  font-size: 13px; font-weight: 600; color: var(--sg-fg-secondary); text-decoration: none;
  transition: background 120ms ease;
}
.sg-home-btn:hover { background: var(--sg-surface-04); }
.sg-tag {
  display: inline-flex; align-items: center; height: 20px; padding: 1px 8px;
  border-radius: 999px; background: rgba(159, 159, 248, 0.18); color: var(--sg-indigo);
  font-size: 12px; font-weight: 600; line-height: 1;
}
.sg-tag.big { height: 24px; font-size: 14px; padding: 2px 10px; }
.sg-iconbtn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border: none; border-radius: var(--sg-r-8);
  background: transparent; color: var(--sg-fg); transition: background 120ms ease;
}
.sg-iconbtn:hover { background: var(--sg-surface-04); }
.sg-iconbtn.gray { background: var(--sg-surface-04); }
.sg-iconbtn.gray:hover { background: var(--sg-surface-08); }
.sg-iconbtn i { font-size: 20px; }
.sg-iconbtn.bookmarked i { color: var(--sg-red); }

/* ============ 빈 상태 (진입) ============ */
.sg-scroll { flex: 1; min-height: 0; overflow-y: auto; }
.sg-empty {
  min-height: 100%; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 52px; padding: 32px 40px;
}
.sg-empty-title { display: flex; align-items: center; gap: 14px; }
.sg-empty-title strong { font-size: 30px; font-weight: 600; letter-spacing: -0.5px; color: var(--sg-fg); }
img.sg-desk-title { height: 52px; width: auto; display: block; }
.sg-cols { display: flex; gap: 32px; align-items: flex-start; }
.sg-col { width: 268px; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.sg-col-head { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.sg-col-ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: var(--sg-r-12);
  background: var(--sg-surface-04); color: var(--sg-fg);
}
.sg-col-ico i { font-size: 24px; }
.sg-col-head span { font-size: 18px; font-weight: 600; color: var(--sg-fg); white-space: nowrap; }
.sg-col-cards { display: flex; flex-direction: column; gap: 14px; width: 100%; }
.sg-soft-card {
  width: 100%; border: none; border-radius: var(--sg-r-16); background: var(--sg-bg-card);
  padding: 14px 16px; min-height: 52px;
  display: flex; align-items: center; justify-content: center; text-align: center;
  font-family: inherit; font-size: 14px; line-height: 20px; color: var(--sg-fg-secondary);
}
button.sg-soft-card { transition: background 120ms ease; }
button.sg-soft-card:hover { background: var(--sg-surface-08); }

/* ============ 대화 스트림 (교차 밴드) ============ */
.sg-band { border-top: 1px solid var(--sg-border-subtle); }
.sg-band.ai { background: var(--sg-bg-subtle); }
.sg-band-in {
  max-width: 820px; margin: 0 auto; display: flex; gap: 16px;
  padding: 22px 24px; align-items: flex-start;
}
.sg-avatar {
  flex: none; width: 30px; height: 30px; border-radius: 50%;
  background: var(--sg-surface-08); color: var(--sg-fg);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600; overflow: hidden;
}
.sg-slogo {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: var(--sg-r-8); overflow: hidden;
  background: var(--sg-fg); color: var(--sg-fg-onbrand); font-weight: 700; font-size: 14px;
}
.sg-slogo img, .sg-empty-slogo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sg-band-body { flex: 1; min-width: 0; padding-top: 3px; }
.sg-band-name { font-size: 12px; font-weight: 600; color: var(--sg-fg-muted); margin-bottom: 6px; }
.sg-band-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.sg-band-meta .sg-band-name { margin-bottom: 0; }
.sg-band-time { font-size: 12px; color: var(--sg-fg-subtle); }
.sg-band-text { font-size: 16px; line-height: 26px; color: var(--sg-fg); word-break: keep-all; overflow-wrap: anywhere; }
.sg-band-text p { margin: 0 0 12px; }
.sg-band-text p:last-child { margin-bottom: 0; }
.sg-band-text ul { margin: 10px 0; padding-left: 22px; }
.sg-band-text h2, .sg-band-text h3, .sg-band-text h4 { margin: 14px 0 6px; font-size: 16px; font-weight: 700; }
.sg-band-text a { color: var(--sg-indigo); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.sg-band-text code { background: var(--sg-surface-04); border-radius: 4px; padding: 1px 5px; font-size: 14px; }
.sg-band-text .ai-option-button {
  display: inline-flex; align-items: center; margin: 4px 6px 2px 0; height: 32px; padding: 0 14px;
  border: 1px solid var(--sg-border); border-radius: 999px; background: var(--sg-bg);
  font-size: 13px; font-weight: 600; color: var(--sg-fg); transition: background 120ms ease;
}
.sg-band-text .ai-option-button:hover { background: var(--sg-surface-04); }
.sg-band-text .ai-option-button.disabled { opacity: .4; pointer-events: none; }
.sg-band-text .ai-option-button.selected { background: var(--sg-fg); color: var(--sg-fg-onbrand); border-color: var(--sg-fg); }

/* 스트리밍 커서 */
.sg-cursor {
  display: inline-block; width: 8px; height: 17px; margin-left: 2px; vertical-align: -2px;
  background: var(--sg-fg); border-radius: 2px; animation: sgBlink 0.9s steps(2) infinite;
}
@keyframes sgBlink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .sg-cursor { animation: none; } }

/* 생각 중 인디케이터 */
.sg-thinking { display: flex; align-items: center; gap: 10px; color: var(--sg-fg-muted); font-size: 14px; }
.sg-thinking-dots { display: inline-flex; gap: 4px; }
.sg-thinking-dots span {
  width: 6px; height: 6px; border-radius: 50%; background: var(--sg-fg-subtle);
  animation: sgPulse 1.2s ease-in-out infinite;
}
.sg-thinking-dots span:nth-child(2) { animation-delay: 0.15s; }
.sg-thinking-dots span:nth-child(3) { animation-delay: 0.3s; }
@keyframes sgPulse { 0%, 100% { opacity: .35; transform: scale(1); } 50% { opacity: 1; transform: scale(1.25); } }
@media (prefers-reduced-motion: reduce) { .sg-thinking-dots span { animation: none; } }

/* 이해한 조건 태그 */
.sg-conds { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; align-items: center; }
.sg-conds-label { font-size: 12px; color: var(--sg-fg-muted); margin-right: 2px; }
.sg-cond {
  display: inline-flex; align-items: center; height: 20px; padding: 1px 8px;
  border-radius: 999px; background: var(--sg-surface-04); color: var(--sg-fg-secondary);
  font-size: 12px; font-weight: 600; line-height: 1;
}

/* ── 추천 카드 (인라인) — 4장 이상이면 행만 가로 스크롤 ── */
.sg-recs { display: flex; gap: 14px; margin-top: 16px; overflow-x: auto; padding-bottom: 6px; }
.sg-recs::-webkit-scrollbar { height: 6px; }
.sg-recs::-webkit-scrollbar-thumb { background: var(--sg-surface-08); border-radius: 3px; }
.sg-rec {
  width: 246px; flex: none; overflow: hidden; cursor: pointer;
  border: 1px solid var(--sg-border); border-radius: var(--sg-r-16); background: var(--sg-bg);
  transition: box-shadow 160ms ease, transform 160ms ease;
}
.sg-rec:hover { box-shadow: var(--sg-shadow-md); transform: translateY(-1px); }
.sg-rec-img {
  height: 120px; background: var(--sg-bg-card); display: flex;
  align-items: center; justify-content: center; color: var(--sg-fg-subtle); overflow: hidden;
}
.sg-rec-img i { font-size: 30px; }
.sg-rec-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sg-rec-body { padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.sg-rec-tags { display: flex; gap: 4px; flex-wrap: wrap; }
.sg-rec-name {
  font-size: 15px; font-weight: 600; color: var(--sg-fg);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sg-rec-price { font-size: 16px; font-weight: 600; color: var(--sg-fg); display: flex; align-items: baseline; gap: 6px; }
.sg-rec-sale { color: var(--sg-red); font-weight: 700; }
.sg-rec-loc { font-size: 13px; color: var(--sg-fg-muted); }
.sg-rec-actions { display: flex; gap: 6px; margin-top: 4px; align-items: center; }
.sg-btn-tour {
  flex: 1; height: 32px; padding: 0 12px; border: none; border-radius: var(--sg-r-8);
  background: var(--sg-fg); color: var(--sg-fg-onbrand); font-size: 13px; font-weight: 600;
  transition: opacity 120ms ease;
}
.sg-btn-tour:hover { opacity: .88; }
.sg-rec-actions .sg-iconbtn { flex: none; }
.sg-rec-actions .sg-iconbtn i { font-size: 18px; }

/* 지도/다시 추천 행 */
.sg-rec-foot { display: flex; align-items: center; gap: 8px; margin-top: 16px; }
.sg-btn-line {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px;
  border: 1px solid var(--sg-border); border-radius: var(--sg-r-8); background: var(--sg-bg);
  font-size: 13px; font-weight: 600; color: var(--sg-fg); transition: background 120ms ease;
}
.sg-btn-line:hover { background: var(--sg-surface-04); }
.sg-btn-line i { font-size: 16px; }
.sg-rec-foot .spacer { flex: 1; }

/* ============ 컴포저 (하단 입력) ============ */
.sg-composer-wrap {
  flex: none; display: flex; justify-content: center; padding: 16px 0 24px;
  background: linear-gradient(to top, var(--sg-bg) 60%, rgba(255, 255, 255, 0));
}
.sg-composer-in { width: 720px; max-width: calc(100% - 48px); }
.sg-composer {
  display: flex; align-items: flex-end; gap: 4px; min-height: 56px; padding: 8px 8px 8px 10px;
  border: 1px solid var(--sg-border); border-radius: var(--sg-r-24); background: var(--sg-bg);
  box-shadow: var(--sg-shadow-sm); transition: border-color 120ms ease, box-shadow 120ms ease;
}
.sg-composer:focus-within { border-color: var(--sg-border-strong); box-shadow: var(--sg-shadow-md); }
.sg-composer-lead { display: flex; gap: 2px; flex: none; }
.sg-composer .sg-iconbtn { width: 38px; height: 38px; margin-bottom: 1px; }
.sg-composer .sg-iconbtn i { color: var(--sg-fg-tertiary); }
.sg-composer textarea {
  flex: 1; min-width: 0; border: none; outline: none; background: transparent; resize: none;
  font-family: inherit; font-size: 15px; line-height: 22px; color: var(--sg-fg);
  padding: 9px 4px; max-height: 148px;
}
.sg-composer textarea::placeholder { color: var(--sg-fg-muted); }
.sg-send i { color: var(--sg-fg-subtle) !important; transition: color 120ms ease; }
.sg-send.ready i { color: var(--sg-fg) !important; }
.sg-disclaimer { text-align: center; margin-top: 10px; font-size: 12px; color: var(--sg-fg-muted); }

/* 토스트 */
.sg-toast {
  position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%) translateY(8px);
  background: var(--sg-fg); color: var(--sg-fg-onbrand); font-size: 13px; font-weight: 500;
  padding: 10px 16px; border-radius: var(--sg-r-12); box-shadow: var(--sg-shadow-lg);
  opacity: 0; pointer-events: none; transition: opacity 180ms ease, transform 180ms ease; z-index: 60;
}
.sg-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* 로그인 유도 */
.sg-login-cta {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; height: 36px; padding: 0 16px;
  border: none; border-radius: var(--sg-r-8); background: var(--sg-fg); color: var(--sg-fg-onbrand);
  font-size: 14px; font-weight: 600; text-decoration: none;
}

/* ============ 비교함 토스트 (CompareSelector 모듈 — SnowUI 톤) ============ */
.compare-toast {
  position: fixed; bottom: 100px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  display: flex; align-items: center; gap: 12px;
  background: var(--sg-fg); color: var(--sg-fg-onbrand);
  padding: 12px 16px; border-radius: var(--sg-r-12); box-shadow: var(--sg-shadow-lg);
  font-size: 13px; font-weight: 500; z-index: 80;
  opacity: 0; pointer-events: none; transition: opacity 200ms ease, transform 200ms ease;
  max-width: calc(100vw - 40px);
}
.compare-toast.show { opacity: 1; pointer-events: auto; transform: translateX(-50%) translateY(0); }
@media (prefers-reduced-motion: reduce) { .compare-toast { transition: none; } }
.compare-toast-content { display: flex; align-items: center; gap: 10px; }
.compare-toast-icon {
  width: 20px; height: 20px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: #fff;
}
.compare-toast-success .compare-toast-icon { background: rgb(52, 199, 89); }
.compare-toast-warning .compare-toast-icon { background: rgb(255, 149, 0); }
.compare-toast-info .compare-toast-icon { background: rgb(0, 122, 255); }
.compare-toast-error .compare-toast-icon { background: var(--sg-red); }
.compare-toast-message { line-height: 1.4; }
.compare-toast-action {
  flex: none; height: 30px; padding: 0 12px; border: none; border-radius: var(--sg-r-8);
  background: rgba(255, 255, 255, 0.16); color: var(--sg-fg-onbrand);
  font-size: 12px; font-weight: 700; cursor: pointer;
}
.compare-toast-action:hover { background: rgba(255, 255, 255, 0.26); }

/* 비교함 담긴 상태 버튼 */
.sg-compare-btn.added { background: var(--sg-fg); color: var(--sg-fg-onbrand); }
.sg-compare-btn.added i { color: var(--sg-fg-onbrand); }

/* ============ 투어 신청 모달 (TourRequest 모듈 — SnowUI 톤) ============ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 70; background: rgba(0, 0, 0, 0.42);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  opacity: 0; transition: opacity 0.25s ease;
}
.modal-overlay.active { opacity: 1; }
.modal-content.tour-request-modal {
  background: var(--sg-bg); border-radius: var(--sg-r-16); width: 100%; max-width: 420px;
  max-height: 88vh; overflow-y: auto; box-shadow: var(--sg-shadow-lg);
  transform: translateY(16px) scale(0.98); transition: transform 0.25s cubic-bezier(0.32, 0.72, 0, 1);
}
.modal-overlay.active .tour-request-modal { transform: none; }
@media (prefers-reduced-motion: reduce) {
  .modal-overlay, .modal-content.tour-request-modal { transition: none; }
}
.tour-request-modal .modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 20px 12px;
}
.tour-request-modal .modal-header h3 { margin: 0; font-size: 18px; font-weight: 700; color: var(--sg-fg); }
.tour-request-modal .modal-close {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border: none; border-radius: var(--sg-r-8);
  background: transparent; color: var(--sg-fg-muted);
}
.tour-request-modal .modal-close:hover { background: var(--sg-surface-04); }
.tour-request-modal .modal-body { padding: 0 20px 20px; }
.tour-request-modal .modal-info-box {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px; margin-bottom: 16px;
  border-radius: var(--sg-r-12); background: var(--sg-bg-card);
  font-size: 13px; color: var(--sg-fg-secondary);
}
.tour-request-modal .form-group { margin-bottom: 14px; }
.tour-request-modal .form-group label {
  display: block; margin-bottom: 6px; font-size: 13px; font-weight: 600; color: var(--sg-fg);
}
.tour-request-modal .required { color: var(--sg-red); }
.tour-request-modal .optional { color: var(--sg-fg-muted); font-weight: 400; }
.tour-request-modal .toss-input, .tour-request-modal .toss-select {
  width: 100%; box-sizing: border-box; height: 44px; padding: 0 12px;
  border: 1px solid var(--sg-border); border-radius: var(--sg-r-12); background: var(--sg-bg);
  font-family: inherit; font-size: 14px; color: var(--sg-fg); outline: none;
}
.tour-request-modal textarea.toss-input { height: auto; padding: 10px 12px; resize: none; }
.tour-request-modal .toss-input:focus, .tour-request-modal .toss-select:focus { border-color: var(--sg-border-strong); }
.tour-request-modal .modal-actions { display: flex; gap: 8px; margin-top: 18px; }
.tour-request-modal .btn-secondary {
  flex: 1; height: 44px; border: 1px solid var(--sg-border); border-radius: var(--sg-r-12);
  background: var(--sg-bg); font-size: 14px; font-weight: 600; color: var(--sg-fg);
}
.tour-request-modal .btn-secondary:hover { background: var(--sg-surface-04); }
.tour-request-modal .btn-primary {
  flex: 2; height: 44px; border: none; border-radius: var(--sg-r-12);
  background: var(--sg-fg); color: var(--sg-fg-onbrand); font-size: 14px; font-weight: 600;
}
.tour-request-modal .btn-primary:hover { opacity: 0.88; }
.tour-request-modal .btn-primary:disabled { opacity: 0.45; cursor: default; }
@media (max-width: 880px) {
  .modal-overlay { align-items: flex-end; padding: 0; }
  .modal-content.tour-request-modal {
    max-width: none; border-radius: 20px 20px 0 0; max-height: 92vh;
    transform: translateY(100%);
  }
  .modal-overlay.active .tour-request-modal { transform: none; }
}

/* ============ 모바일 드로어 ============ */
.sg-dim {
  position: fixed; inset: 0; background: rgba(0, 0, 0, 0.42); z-index: 40;
  opacity: 0; pointer-events: none; transition: opacity 200ms ease;
}
.sg-dim.open { opacity: 1; pointer-events: auto; }
.sg-drawer {
  position: fixed; left: 0; top: 0; bottom: 0; width: 300px; max-width: 86vw; z-index: 41;
  background: var(--sg-bg); border-right: 1px solid var(--sg-border);
  box-shadow: 6px 0 24px rgba(0, 0, 0, 0.24);
  display: flex; flex-direction: column; transform: translateX(-104%);
  transition: transform 240ms cubic-bezier(0.22, 1, 0.36, 1);
}
.sg-drawer.open { transform: translateX(0); }
@media (prefers-reduced-motion: reduce) { .sg-drawer { transition: none; } .sg-dim { transition: none; } }
.sg-drawer-body { padding: 14px 14px 8px; display: flex; flex-direction: column; gap: 10px; flex: 1; min-height: 0; }
.sg-drawer-head { display: flex; align-items: center; justify-content: space-between; }
.sg-drawer-head .sg-top-title { font-size: 16px; }
.sg-drawer-foot { padding: 12px; border-top: 1px solid var(--sg-border); }

/* ============ 반응형 (모바일 ≤ 880px) ============ */
.sg-menu-btn { display: none; }
.sg-empty-slogo, .sg-mob-title, .sg-empty-sub { display: none; }
@media (max-width: 880px) {
  .sg-side { display: none; }
  .sg-menu-btn { display: inline-flex; }
  .sg-top { height: 50px; padding: 0 6px 0 8px; border-bottom: 1px solid var(--sg-border); }
  .sg-top-title { font-size: 16px; }

  /* 빈 상태: ChatGPT 앱 스타일 (S 로고 + "무엇을 찾아드릴까요?") */
  .sg-empty { gap: 14px; padding: 20px; justify-content: center; text-align: center; }
  .sg-empty-title { flex-direction: column; gap: 14px; }
  .sg-empty-title strong { font-size: 22px; }
  .sg-desk-title, img.sg-desk-title, .sg-empty-title .sg-tag.big { display: none; }
  .sg-empty-slogo { display: inline-flex; }
  .sg-mob-title { display: block; }
  .sg-empty-sub { display: block; margin: 0; }
  .sg-empty-slogo {
    display: inline-flex; align-items: center; justify-content: center;
    width: 52px; height: 52px; border-radius: 16px; overflow: hidden;
    background: var(--sg-fg); color: var(--sg-fg-onbrand); font-weight: 700; font-size: 22px;
  }
  .sg-empty-sub { font-size: 14px; line-height: 20px; color: var(--sg-fg-muted); }
  .sg-cols { flex-direction: column; gap: 8px; width: 100%; align-items: stretch; }
  .sg-col { width: 100%; gap: 8px; }
  .sg-col.aux { display: none; } /* 모바일 진입은 예시 질문만 (디자인 Rc-①) */
  .sg-col-head { display: none; }
  .sg-col-cards { gap: 8px; }
  .sg-soft-card { padding: 12px 14px; min-height: 48px; font-size: 14px; }

  /* 대화: 밴드 → 버블 */
  .sg-band { border-top: none; }
  .sg-band.ai { background: transparent; }
  .sg-band-in { padding: 8px 14px; gap: 10px; }
  .sg-band.user .sg-band-in { justify-content: flex-end; }
  .sg-band.user .sg-avatar, .sg-band.user .sg-band-name { display: none; }
  .sg-band.user .sg-band-body { flex: none; max-width: 82%; padding-top: 0; }
  .sg-band.user .sg-band-text {
    background: var(--sg-surface-08); border-radius: 20px 20px 6px 20px;
    padding: 10px 14px; font-size: 15px; line-height: 22px;
  }
  .sg-band.ai .sg-band-meta { display: none; }
  .sg-band.ai .sg-slogo { width: 26px; height: 26px; font-size: 13px; margin-top: 2px; }
  .sg-band.ai .sg-band-body { padding-top: 0; }
  .sg-band.ai .sg-band-text { font-size: 15px; line-height: 23px; }

  /* 추천 카드: 가로 스크롤 */
  .sg-recs { gap: 12px; overflow-x: auto; margin-top: 14px; padding-bottom: 4px; scrollbar-width: none; }
  .sg-recs::-webkit-scrollbar { display: none; }
  .sg-rec { width: 200px; }
  .sg-rec-img { height: 110px; }
  .sg-rec-img i { font-size: 28px; }
  .sg-rec-body { padding: 12px; gap: 7px; }
  .sg-rec-name { font-size: 14px; }
  .sg-rec-price { font-size: 15px; }
  .sg-rec-loc { font-size: 12px; }
  .sg-rec .sg-compare-btn { display: none; } /* 모바일 카드는 투어+찜만 (디자인 Rc-②) */
  .sg-rec-foot { margin-top: 14px; }
  .sg-rec-foot .sg-eraser { display: none; }

  /* 컴포저 */
  .sg-composer-wrap { padding: 8px 12px 10px; background: var(--sg-bg); border-top: 1px solid var(--sg-border); }
  .sg-composer-in { width: 100%; max-width: 100%; }
  .sg-composer { min-height: 52px; }
  .sg-disclaimer { margin-top: 8px; font-size: 11px; }
  .sg-empty .sg-disclaimer { margin-top: 0; }
}

@media (min-width: 881px) {
  .sg-dim, .sg-drawer { display: none; }
}
