/* Koreai Dari — 앱 디자인 */
:root {
  --bg: #F6F7FB;
  --surface: #FFFFFF;
  --surface-2: #F1F3F8;
  --line: #E6E8F0;
  --ink: #0F172A;
  --ink-2: #4A5468;
  --ink-3: #5B6476;
  --brand: #2F5BFF;
  --brand-ink: #1E3FCC;
  --brand-soft: #EEF2FF;
  --brand-line: #C7D3FF;
  --accent: #FF5A4E;
  --dark: #0F172A;
  --on-dark: #FFFFFF;
  --on-dark-2: #C9D0E0;
  --shadow: 0 12px 40px rgba(15, 23, 42, 0.08);
  --radius: 18px;
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', 'Noto Sans', 'Noto Sans Thai', 'Noto Sans KR', sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0B1020;
    --surface: #131A2E;
    --surface-2: #1B2340;
    --line: #262F50;
    --ink: #EEF1F8;
    --ink-2: #B9C1D4;
    --ink-3: #A2ABC0;
    --brand: #4F72FF;
    --brand-ink: #B4C3FF;
    --brand-soft: #1A2350;
    --brand-line: #34407A;
    --dark: #EEF1F8;
    --on-dark: #0B1020;
    --on-dark-2: #3A4460;
    --shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font-family: var(--font); -webkit-font-smoothing: antialiased; overflow: hidden; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
svg.logo { width: 34px; height: 34px; stroke: none; }
svg.logo path { stroke-width: 2.6; }
svg.logo.lg { width: 44px; height: 44px; }
svg.logo.xl { width: 72px; height: 72px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.app { display: flex; height: 100dvh; }

/* ── 사이드바 ─────────────────────────── */
.sidebar { width: 276px; flex: none; display: flex; flex-direction: column; gap: 16px; padding: 18px 14px; background: var(--surface); border-right: 1px solid var(--line); overflow-y: auto; }
.side-head { display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 6px; border: 0; background: none; text-align: left; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-size: 18px; font-weight: 800; letter-spacing: -0.3px; }
.brand-tag { font-size: 11px; font-weight: 600; color: var(--ink-3); }
.btn-dark { display: flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 16px; border: 0; border-radius: 12px; background: var(--dark); color: var(--on-dark); font-size: 14px; font-weight: 700; }
.btn-dark svg { stroke-width: 2.4; }
.btn-white { display: flex; align-items: center; justify-content: center; height: 38px; border: 0; border-radius: 10px; background: #FFFFFF; color: #0F172A; font-size: 13px; font-weight: 700; }
.btn-outline { display: inline-flex; align-items: center; justify-content: center; height: 38px; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 13px; font-weight: 700; }
.wide { width: 100%; }
.side-search { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border-radius: 10px; background: var(--surface-2); color: var(--ink-3); }
.side-search svg { width: 16px; height: 16px; }
.side-search input { flex: 1; min-width: 0; border: 0; background: transparent; font-size: 13px; color: var(--ink); outline: none; }
.side-search input::placeholder { color: var(--ink-3); }
.about-card { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: var(--brand-soft); border: 1px solid var(--brand-line); text-align: left; }
.about-ico { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 10px; background: var(--brand); color: #fff; flex: none; }
.about-ico svg { width: 16px; height: 16px; stroke-width: 2.4; }
.about-text { display: flex; flex-direction: column; gap: 2px; }
.about-title { font-size: 13px; font-weight: 700; }
.about-sub { font-size: 11px; color: var(--ink-2); }
.history { display: flex; flex-direction: column; gap: 2px; min-height: 0; }
.history-label { padding: 6px 10px; font-size: 11px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; color: var(--ink-3); }
.history-empty { padding: 6px 10px; font-size: 13px; color: var(--ink-3); }
.history-item { display: flex; align-items: center; border-radius: 9px; }
.history-item:hover, .history-item.active { background: var(--surface-2); }
.history-item.active .history-open { font-weight: 700; }
.history-open { flex: 1; min-width: 0; padding: 9px 10px; border: 0; background: none; text-align: left; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.history-del { width: 32px; height: 32px; border: 0; background: none; color: var(--ink-3); border-radius: 8px; opacity: 0; }
.history-item:hover .history-del, .history-item.active .history-del { opacity: 1; }
.history-del svg { width: 15px; height: 15px; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 12px; }
.app-card { padding: 14px; border-radius: 14px; background: #0F172A; color: #fff; display: flex; flex-direction: column; gap: 8px; font-size: 12px; }
.app-card strong { font-size: 13px; }
.app-card span { color: #C9D0E0; }
.lang-select { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); }
.lang-select svg { width: 16px; height: 16px; }
.lang-select select { flex: 1; border: 0; background: transparent; font-size: 13px; font-weight: 600; outline: none; }
.lang-select select option { color: #0F172A; }
.scrim { position: fixed; inset: 0; background: rgba(8, 12, 24, 0.45); z-index: 30; }

/* ── 본문 ─────────────────────────────── */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; height: 100dvh; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 28px; min-height: 64px; }
.top-title { display: flex; align-items: center; gap: 8px; min-width: 0; }
.model-chip { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; }
.mode-pill { padding: 2px 8px; border-radius: 999px; background: #FFEDEB; color: #B3261E; font-size: 11px; font-weight: 700; }
.mode-pill.deep { background: var(--brand-soft); color: var(--brand-ink); }
.top-actions { display: flex; align-items: center; gap: 8px; }
.preview-badge { padding: 5px 10px; border-radius: 999px; background: #FFF6E5; color: #7A4E00; font-size: 11px; font-weight: 700; }
.icon-btn { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 0; border-radius: 12px; background: transparent; }
.icon-btn svg { width: 21px; height: 21px; }
.only-mobile { display: none; }

.scroller { flex: 1; overflow-y: auto; overscroll-behavior: contain; }

/* 홈 */
.home { width: 100%; max-width: 880px; margin: 0 auto; padding: 40px 28px 40px; display: flex; flex-direction: column; align-items: center; gap: 28px; }
.hero { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 12px; font-weight: 700; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #12B76A; }
.hero h1 { margin: 0; font-size: 52px; line-height: 1.05; font-weight: 800; letter-spacing: -1.5px; }
.hero h1 .hl { color: var(--brand); }
.hero h1 .stop { color: var(--accent); }
.hero-sub { margin: 0; font-size: 17px; color: var(--ink-2); max-width: 600px; }
.composer-slot { width: 100%; }
.features { width: 100%; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.feature { padding: 18px; border: 0; border-radius: var(--radius); color: #fff; display: flex; flex-direction: column; gap: 10px; text-align: left; transition: transform .15s, box-shadow .15s; }
.feature:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.feature-ico { display: flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 13px; background: rgba(255, 255, 255, 0.2); }
.feature-ico svg { width: 20px; height: 20px; }
.feature strong { font-size: 15px; }
.feature span.d { font-size: 13px; line-height: 1.45; color: rgba(255, 255, 255, 0.92); }
.feature.c-blue { background: #2F5BFF; } .feature.c-coral { background: #E8463A; } .feature.c-green { background: #0E8A52; }
.feature.c-amber { background: #F5A524; color: #0F172A; }
.feature.c-amber span.d { color: #3B2A06; }
.feature.c-amber .feature-ico { background: rgba(15, 23, 42, 0.1); }
.korea-hint { align-self: center; display: flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px; border: 1px dashed var(--line); border-radius: 999px; background: transparent; color: var(--ink-3); font-size: 13px; font-weight: 600; }
.korea-hint:hover { color: var(--brand-ink); border-color: var(--brand-line); background: var(--brand-soft); }
.korea-hint svg { width: 14px; height: 14px; stroke-width: 2.2; }
.explore { width: 100%; display: flex; flex-direction: column; gap: 12px; animation: explore-in .35s ease; }
@keyframes explore-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.eyebrow { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; color: var(--ink-3); }
.topic-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.topic-tab { height: 34px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 13px; font-weight: 600; }
.topic-tab[aria-selected="true"] { background: var(--dark); color: var(--on-dark); border-color: var(--dark); font-weight: 700; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: flex; align-items: center; gap: 8px; min-height: 38px; padding: 4px 14px 4px 6px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 13px; text-align: left; transition: border-color .15s; }
.chip:hover { border-color: var(--brand-line); }
.tag { padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.t-blue { background: #EEF2FF; color: #1E3FCC; } .t-purple { background: #F3E8FF; color: #6B21A8; } .t-slate { background: #EEF0F5; color: #334155; }
.t-green { background: #D3F5E4; color: #05603A; } .t-teal { background: #CCF4EE; color: #0B5C53; } .t-sky { background: #E0F2FE; color: #075985; }
.t-coral { background: #FFE1DE; color: #8A1C14; } .t-pink { background: #FCE7F3; color: #9D174D; } .t-amber { background: #FFF1D6; color: #7A4E00; } .t-navy { background: #E3E7F2; color: #1B2A55; }

/* 입력창 */
.composer-dock { padding: 8px 28px 16px; display: flex; flex-direction: column; align-items: center; }
.composer-dock:empty { display: none; }
.composer-dock > .composer, .composer-dock > .disclaimer { width: 100%; max-width: 780px; }
.composer { width: 100%; padding: 14px 14px 10px; border-radius: 24px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 8px; }
.composer textarea { width: 100%; min-height: 28px; max-height: 200px; padding: 4px 6px; border: 0; resize: none; background: transparent; font-size: 16px; line-height: 1.5; outline: none; }
.composer textarea::placeholder { color: var(--ink-3); }
.composer-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tools, .sends { display: flex; align-items: center; gap: 8px; }
.tool-btn { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.toggle { display: flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-size: 13px; font-weight: 600; white-space: nowrap; }
.toggle svg { width: 16px; height: 16px; }
.toggle[aria-pressed="true"] { background: var(--brand-soft); border-color: var(--brand-line); color: var(--brand-ink); font-weight: 700; }
.talk-btn { display: flex; align-items: center; gap: 6px; height: 44px; padding: 0 16px; border: 0; border-radius: 999px; background: var(--dark); color: var(--on-dark); font-size: 13px; font-weight: 700; }
.round-btn { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 0; border-radius: 50%; }
.round-btn.soft { background: var(--surface-2); }
.round-btn.primary { background: var(--brand); color: #fff; }
.round-btn.primary svg { stroke-width: 2.4; }
.round-btn.primary:disabled { opacity: .45; cursor: default; }
.round-btn.listening { background: var(--accent); color: #fff; animation: pulse 1.2s infinite; }
.disclaimer { margin: 8px 0 0; text-align: center; font-size: 12px; color: var(--ink-3); }
.attachments { display: flex; gap: 8px; flex-wrap: wrap; }
.thumb { position: relative; width: 64px; height: 64px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb button { position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border: 0; border-radius: 50%; background: rgba(15, 23, 42, 0.75); color: #fff; display: flex; align-items: center; justify-content: center; padding: 0; }
.thumb button svg { width: 12px; height: 12px; stroke-width: 2.6; }

/* 대화 */
.thread { width: 100%; max-width: 780px; margin: 0 auto; padding: 24px 28px 24px; display: flex; flex-direction: column; gap: 26px; }
.msg-user { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.bubble { max-width: 80%; padding: 12px 18px; border-radius: 20px 20px 6px 20px; background: var(--brand); color: #fff; font-size: 15px; line-height: 1.55; white-space: pre-wrap; word-wrap: break-word; }
.user-imgs { display: flex; gap: 6px; }
.user-imgs img { width: 120px; height: 120px; object-fit: cover; border-radius: 14px; }
.msg-ai { display: flex; gap: 14px; align-items: flex-start; }
.msg-ai > .logo { width: 32px; height: 32px; margin-top: 2px; }
.ai-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.status { display: flex; align-items: center; gap: 10px; color: var(--ink-3); font-size: 14px; }
.dots { display: inline-flex; gap: 4px; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); animation: blink 1.2s infinite both; }
.dots i:nth-child(2) { animation-delay: .2s; } .dots i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; transform: scale(.8); } 40% { opacity: 1; transform: scale(1); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 90, 78, .5); } 100% { box-shadow: 0 0 0 14px rgba(255, 90, 78, 0); } }

.md { font-size: 15px; line-height: 1.7; word-wrap: break-word; }
.md > *:first-child { margin-top: 0; } .md > *:last-child { margin-bottom: 0; }
.md p { margin: 0 0 12px; }
.md h1, .md h2, .md h3 { margin: 18px 0 8px; line-height: 1.3; }
.md h1 { font-size: 21px; } .md h2 { font-size: 18px; } .md h3 { font-size: 16px; }
.md strong { font-weight: 700; }
.md a { color: var(--brand-ink); }
.md ul { margin: 0 0 12px; padding-left: 22px; }
.md li { margin: 4px 0; }
.md ol { margin: 0 0 14px; padding: 14px 16px; list-style: none; counter-reset: n; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; gap: 10px; }
.md ol > li { counter-increment: n; display: flex; gap: 12px; margin: 0; }
.md ol > li::before { content: counter(n); flex: none; display: flex; align-items: center; justify-content: center; width: 26px; height: 26px; margin-top: 1px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 13px; font-weight: 800; }
.md ol > li > div { flex: 1; min-width: 0; }
.md code { padding: 2px 6px; border-radius: 6px; background: var(--surface-2); font-size: 13px; font-family: ui-monospace, Menlo, Consolas, monospace; }
.md pre { margin: 0 0 12px; padding: 14px; border-radius: 12px; background: #0F172A; color: #E6EAF4; overflow-x: auto; }
.md pre code { background: none; padding: 0; color: inherit; }
.md blockquote { margin: 0 0 12px; padding: 12px 14px; border-radius: 14px; background: #FFF6E5; color: #4A3300; }
.md .table-wrap { margin: 0 0 12px; overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.md table { border-collapse: collapse; width: 100%; font-size: 14px; }
.md th, .md td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.md th { background: var(--surface-2); font-weight: 700; }
.md tr:last-child td { border-bottom: 0; }
.md hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }

.err { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 14px; border-radius: 14px; background: #FFEDEB; color: #8A1C14; font-size: 14px; }
.err button { height: 34px; padding: 0 12px; border: 0; border-radius: 10px; background: #8A1C14; color: #fff; font-size: 13px; font-weight: 700; }

.actions { display: flex; align-items: center; gap: 2px; }
.act { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border: 0; border-radius: 10px; background: transparent; color: var(--ink-2); }
.act:hover { background: var(--surface-2); }
.act svg { width: 17px; height: 17px; }
.act.on { color: var(--brand); }

/* 장소 + 내비 */
.places { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: var(--radius); background: #0F172A; color: #fff; }
.places-head { font-size: 12px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; color: #C9D0E0; }
.place { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 14px; background: rgba(255, 255, 255, 0.06); }
.place-pin { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 11px; background: #FF5A4E; color: #fff; flex: none; }
.place-pin svg { width: 18px; height: 18px; }
.place-names { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.place-names strong { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.place-names small { font-size: 12px; color: #C9D0E0; }
.nav-btn { display: flex; align-items: center; gap: 6px; height: 44px; padding: 0 14px; border: 0; border-radius: 12px; background: #2F5BFF; color: #fff; font-size: 13px; font-weight: 800; white-space: nowrap; }
.nav-btn svg { width: 16px; height: 16px; stroke-width: 2.4; }
.car-btn { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 0; border-radius: 12px; background: rgba(255, 255, 255, 0.12); color: #fff; flex: none; }
.places-foot { display: flex; align-items: center; justify-content: center; gap: 4px; font-size: 12px; color: #C9D0E0; }
.places-foot button { min-height: 32px; padding: 0 6px; border: 0; background: none; color: #fff; font-size: 12px; font-weight: 700; text-decoration: underline; }

/* 대화창(시트) */
.sheet { width: min(440px, calc(100vw - 32px)); padding: 24px; border: 0; border-radius: 24px; background: var(--surface); color: var(--ink); box-shadow: 0 30px 80px rgba(0, 0, 0, .3); }
.sheet::backdrop { background: rgba(8, 12, 24, .5); }
.sheet h2 { margin: 0 0 8px; font-size: 20px; }
.sheet p { margin: 0 0 16px; color: var(--ink-2); line-height: 1.55; font-size: 14px; }
.sheet form { margin-top: 8px; }
.sheet-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.sheet-head h2 { margin: 0; }
.check-list { margin: 0 0 18px; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.check-list li { display: flex; gap: 10px; align-items: flex-start; }
.check-list li::before { content: ''; flex: none; width: 20px; height: 20px; margin-top: 1px; border-radius: 50%; background: var(--brand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12l4 4 8-8' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat; }
.nav-choices { display: flex; flex-direction: column; gap: 10px; margin-bottom: 8px; }
.nav-choice { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); text-align: left; }
.nav-choice[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-soft); }
.nav-choice strong { display: block; font-size: 14px; }
.nav-choice small { font-size: 12px; color: var(--ink-2); }
.nav-swatch { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 12px; font-weight: 800; flex: none; }
.nav-swatch.naver { background: #03C75A; color: #0F172A; }
.nav-swatch.kakao { background: #FEE500; color: #0F172A; }

/* 음성 대화 */
.talk-overlay { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; padding: 24px; background: radial-gradient(circle at 50% 40%, #1C2A6B, #0B1020 70%); color: #fff; text-align: center; }
.talk-orb { width: 168px; height: 168px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(79, 114, 255, .25); box-shadow: 0 0 0 0 rgba(79, 114, 255, .5); }
.talk-orb.listening { animation: orb 1.4s infinite; }
.talk-orb.speaking { animation: orb .7s infinite; background: rgba(255, 90, 78, .25); }
@keyframes orb { 0% { box-shadow: 0 0 0 0 rgba(79, 114, 255, .55); } 100% { box-shadow: 0 0 0 36px rgba(79, 114, 255, 0); } }
.talk-status { margin: 0; font-size: 20px; font-weight: 700; }
.talk-heard { margin: 0; max-width: 520px; min-height: 48px; font-size: 16px; color: #C9D0E0; }
.end-talk { width: 160px; height: 48px; border-radius: 999px; }

.toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); z-index: 70; padding: 10px 16px; border-radius: 12px; background: #0F172A; color: #fff; font-size: 13px; font-weight: 600; box-shadow: var(--shadow); max-width: calc(100vw - 32px); }

/* ── 모바일 ───────────────────────────── */
@media (max-width: 900px) {
  .only-mobile { display: flex; }
  .only-desktop { display: none; }
  .sidebar { position: fixed; z-index: 40; top: 0; bottom: 0; left: 0; width: min(310px, 86vw); transform: translateX(-102%); transition: transform .22s ease; padding-top: max(18px, env(safe-area-inset-top)); }
  .sidebar.open { transform: none; box-shadow: 20px 0 60px rgba(0, 0, 0, .2); }
  .topbar { padding: 6px 8px; padding-top: max(6px, env(safe-area-inset-top)); min-height: 56px; border-bottom: 1px solid transparent; }
  .top-title { flex: 1; justify-content: center; }
  .top-actions { min-width: 44px; justify-content: flex-end; }
  .preview-badge { display: none; }
  .home { padding: 16px 18px 24px; align-items: stretch; gap: 22px; }
  .hero { align-items: flex-start; text-align: left; gap: 10px; }
  .hero h1 { font-size: 34px; letter-spacing: -1px; }
  .hero-sub { font-size: 15px; }
  .badge { display: none; }
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .feature { gap: 20px; padding: 16px; }
  .feature .feature-ico { width: auto; height: auto; background: none !important; justify-content: flex-start; }
  .feature .feature-ico svg { width: 24px; height: 24px; }
  .feature span.d { font-size: 12px; }
  .topic-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -18px; padding: 0 18px; }
  .topic-tab { flex: none; }
  .composer-dock { padding: 6px 10px; padding-bottom: max(10px, env(safe-area-inset-bottom)); }
  .composer { padding: 8px; border-radius: 22px; }
  .composer textarea { padding: 6px 8px; }
  .toggle span { display: none; }
  .toggle { width: 40px; padding: 0; justify-content: center; }
  .talk-btn span { display: none; }
  .talk-btn { width: 44px; padding: 0; justify-content: center; }
  .disclaimer { display: none; }
  .thread { padding: 16px 14px 16px; gap: 20px; }
  .bubble { max-width: 86%; font-size: 15px; }
  .msg-ai { flex-direction: column; gap: 8px; }
  .msg-ai > .logo { width: 26px; height: 26px; }
  .place { flex-wrap: wrap; }
  .place-names { flex: 1 1 calc(100% - 60px); }
  .nav-btn { flex: 1; justify-content: center; height: 48px; font-size: 14px; }
  .car-btn { height: 48px; width: 48px; }
  .toast { bottom: 110px; }
}
@media (max-width: 380px) {
  .tools { gap: 6px; }
  .sends { gap: 6px; }
}

/* 장소 사진 */
.place-pin.has-photo { width: 64px; height: 64px; border-radius: 12px; background: #1b2236; overflow: hidden; }
.place-pin.has-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-credit { opacity: .7; }

/* 사진 갤러리 */
.gallery { margin: 4px 0 10px; }
.gallery-head { font-size: 12px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--muted, #6b7280); margin-bottom: 8px; }
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.gtile { position: relative; padding: 0; border: 0; border-radius: 14px; overflow: hidden; aspect-ratio: 4/3; background: #1b2236; cursor: zoom-in; }
.gtile img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s; }
.gtile:hover img { transform: scale(1.04); }
.gtile span { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 8px 6px; font-size: 12px; font-weight: 600; color: #fff; text-align: left; background: linear-gradient(transparent, rgba(0,0,0,.65)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gallery-grid .gtile:first-child:nth-last-child(1) { grid-column: span 3; aspect-ratio: 16/9; }
.gallery-foot { margin-top: 6px; font-size: 11px; opacity: .6; }
@media (max-width: 520px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } .gallery-grid .gtile:first-child:nth-last-child(1) { grid-column: span 2; } }
.lightbox { position: fixed; inset: 0; z-index: 1000; background: rgba(5,8,18,.92); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 16px; cursor: zoom-out; }
.lightbox img { max-width: 100%; max-height: 82vh; border-radius: 12px; object-fit: contain; }
.lb-cap { margin-top: 10px; color: #fff; font-size: 14px; text-align: center; }
.lb-cap a { color: #9db4ff; }

/* 동영상 */
.videos { margin: 4px 0 10px; }
.video-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.vcard { border-radius: 14px; overflow: hidden; background: var(--card, #fff); border: 1px solid rgba(127,127,127,.18); }
.vthumb { position: relative; display: block; width: 100%; padding: 0; border: 0; aspect-ratio: 16/9; background: #000; cursor: pointer; }
.vthumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vplay { position: absolute; inset: 0; margin: auto; width: 56px; height: 40px; border-radius: 12px; background: rgba(255,0,51,.92); color: #fff; font-size: 18px; display: flex; align-items: center; justify-content: center; }
.vframe { display: block; width: 100%; aspect-ratio: 16/9; border: 0; background: #000; }
.vmeta { padding: 8px 10px 10px; display: flex; flex-direction: column; gap: 2px; }
.vmeta strong { font-size: 13px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vmeta small { font-size: 12px; opacity: .65; }
.yt-more { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; padding: 8px 14px; border-radius: 999px; border: 1px solid rgba(127,127,127,.3); font-size: 13px; font-weight: 600; text-decoration: none; color: inherit; }
@media (max-width: 520px) { .video-grid { grid-template-columns: 1fr; } }

.play-app #proBtn { display: none !important; }
