/* 바다이음 배치·크기 (색·유리 재료는 glass.css 변수만 사용)
   데스크톱: 1rem = 화면 폭/64, 1024px 넘으면 덜 커짐(1440px → 18.1px, 1920px → 20.5px). 스크롤을 줄이려 10/28 조정, 1440 기준 가장 작은 글자 0.8rem = 14.5px
   휴대폰(<900px): 1rem = 16px, 세로 쌓기, 하단 고정 탭바 */
html { font-size: min(100vw / 64, 0.5vw + 10.88px); -webkit-text-size-adjust: 100%; }
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0; min-height: 100vh; color: var(--text);
  font-family: Pretendard, -apple-system, BlinkMacSystemFont, "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
  font-size: 1.05rem; line-height: 1.45; font-variant-numeric: tabular-nums;
  word-break: keep-all; overflow-wrap: break-word; -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
@media (min-width: 900px) { html { scrollbar-width: none; } html::-webkit-scrollbar { display: none; } .cite-list { columns: 2; column-gap: 2rem; } .cite-list li { break-inside: avoid; } }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ico { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
a { color: #086A7E; }
button { font: inherit; color: inherit; }
:focus-visible { outline: .14rem solid var(--accent); outline-offset: .14rem; border-radius: .3rem; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 2.1rem; line-height: 1.2; font-weight: 700; letter-spacing: -.03em; }
h2 { font-size: 1.4rem; line-height: 1.25; font-weight: 700; letter-spacing: -.02em; }
.small { font-size: .8rem; font-weight: 600; color: var(--text-2); }
.sub { font-size: .95rem; color: var(--text-2); }
[hidden] { display: none !important; }

/* ── 머리줄 ── */
.top {
  height: 3.6rem; padding: 0 1.6rem;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem;
  position: relative; z-index: 30;
}
.brand { justify-self: start; display: inline-flex; align-items: center; gap: .45rem; color: var(--text); text-decoration: none; font-size: 1.3rem; font-weight: 800; letter-spacing: -.02em; }
.brand svg { width: 1.9rem; height: 1.55rem; color: var(--accent); }
.tabs { display: flex; }
.tabs a { position: relative; z-index: 1; padding: .46rem 1.15rem; border-radius: 999px; color: var(--text-2); text-decoration: none; font-size: .95rem; font-weight: 600; white-space: nowrap; transition: color 200ms; }
.tabs a:hover { color: var(--text); }
.top-right { justify-self: end; display: flex; align-items: center; gap: .55rem; }
.ask-btn { padding: .52rem 1.05rem; font-size: .95rem; }
.ask-btn .ico { width: 1rem; height: 1rem; }
.fixture-chip { background: #FFF1D6; border-color: rgba(223, 162, 10, .5); color: var(--text); }

/* ── 화면 공통 ── */
.view { display: none; padding: 0 1.6rem; }
.view.is-active { display: block; }
.fold { height: calc(100vh - 3.6rem); min-height: 27rem; display: flex; flex-direction: column; gap: .7rem; padding-bottom: .9rem; }
.title-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 2.6rem; flex: none; }
.title-chips { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .45rem; }
.below { display: flex; flex-direction: column; gap: .9rem; padding: .3rem 0 1.4rem; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; align-items: start; }
.panel { padding: .85rem 1.1rem .95rem; min-width: 0; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: .6rem 1.2rem; flex-wrap: wrap; margin-bottom: .35rem; }
.panel-foot { margin-top: .35rem; font-size: .8rem; font-weight: 600; color: var(--text-2); line-height: 1.35; }
.empty { display: grid; place-items: center; min-height: 6rem; font-size: 1.05rem; color: var(--text-2); font-weight: 600; text-align: center; }
.plain-list { margin: .5rem 0 0; padding-left: 1.2em; font-size: .95rem; color: var(--text-2); }
.plain-list li + li { margin-top: .3rem; }
.plain-list strong { color: var(--text); }

/* 범례: 차트 위 한 줄 */
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem 1.1rem; font-size: .9rem; font-weight: 600; color: var(--text); }
.lg { display: inline-flex; align-items: center; gap: .4rem; white-space: nowrap; }
.lg i { display: inline-block; width: 1.5rem; height: 0; border-top: .14rem solid currentColor; }
.lg i.dash { border-top-style: dashed; }
.lg i.box { height: .8rem; width: .9rem; border: 0; border-radius: .18rem; }
.lg i.dot { width: .7rem; height: .7rem; border: 0; border-radius: 50%; }

/* ── 수치 카드 ── */
.kpi-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .7rem; flex: none; }
.kpi { padding: .68rem .9rem .72rem; min-width: 0; }
.k-label { font-size: .95rem; font-weight: 600; color: var(--text-2); line-height: 1.3; padding-right: 2.6rem; }
.k-icon { position: absolute; top: .62rem; right: .68rem; width: 2.2rem; height: 2.2rem; border-radius: 50%; display: grid; place-items: center; color: var(--accent); background: rgba(255, 255, 255, .88); box-shadow: inset 0 0 0 1px var(--line); }
.k-icon .ico { width: 1.2rem; height: 1.2rem; stroke-width: 2.1; }
.k-body { display: flex; flex-direction: column; align-items: flex-start; gap: .18rem; margin-top: .22rem; min-width: 0; }
.k-value { font-size: 3.4rem; line-height: 1; font-weight: 700; letter-spacing: -.035em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.k-value small { font-size: .44em; font-weight: 700; letter-spacing: -.01em; margin-left: .06em; }
.k-sub { font-size: .95rem; color: var(--text-2); line-height: 1.3; padding-bottom: 0; min-width: 0; }
.k-sub b { color: var(--text); font-weight: 700; }
.k-empty { font-size: 1.05rem; font-weight: 600; color: var(--text-2); padding: .9rem 0 .5rem; }

/* ── 상황판 ── */
.ov-main { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 22rem; gap: .7rem; }
#ov-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.map-panel { padding: 0; overflow: hidden; min-height: 0; }
.map { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; background: #EEF2F5; }
.map-msg { position: absolute; inset: 0; display: grid; place-items: center; padding: 2rem 2rem 2rem 8rem; text-align: center; font-weight: 600; color: var(--text-2); z-index: 1; }
.map-float { position: absolute; z-index: 3; }
.map-mode { top: .75rem; left: .75rem; }
.seg { display: inline-flex; }
.seg button { position: relative; z-index: 1; border: 0; background: transparent; cursor: pointer; padding: .4rem .95rem; border-radius: 999px; font-size: .9rem; font-weight: 600; color: var(--text-2); white-space: nowrap; transition: color 200ms; }
.seg button[aria-pressed="true"] { color: var(--text); font-weight: 700; }
.map-mode { background: rgba(255, 255, 255, .9); }
.map-zoom { bottom: .75rem; right: .75rem; display: flex; gap: .45rem; }
.map-zoom .ico { width: 1.15rem; height: 1.15rem; stroke-width: 2.4; }
.map-legend { left: .75rem; bottom: .75rem; width: 6.6rem; padding: .55rem .7rem .6rem; }
.map-legend summary { display: none; }
.lg-title { font-size: .9rem; font-weight: 700; line-height: 1.3; }
.scale { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; margin-top: .4rem; }
.scale i { height: .75rem; }
.scale i:first-child { border-radius: .2rem 0 0 .2rem; }
.scale i:last-child { border-radius: 0 .2rem .2rem 0; }
.scale-lab { display: grid; grid-template-columns: repeat(7, 1fr); margin-top: .15rem; font-size: .8rem; font-weight: 600; color: var(--text-2); text-align: center; }
.cat-list { list-style: none; margin: .35rem 0 0; padding: 0; display: grid; gap: .22rem; }
.cat-list li { display: flex; align-items: center; gap: .45rem; font-size: .9rem; font-weight: 600; }
.cat-list li i { width: .95rem; height: .95rem; border-radius: .2rem; flex: none; }
.cat-list li span { margin-left: auto; color: var(--text-2); }
.map-attrib { display: block; line-height: 1.35; right: .75rem; top: .75rem; overflow-wrap: normal; word-break: keep-all; margin: 0; white-space: nowrap; border-radius: .7rem; background: rgba(255, 255, 255, .94); }
.map-attrib a { color: var(--text-2); }

/* 지도 위 해역 이름표·부캉이 표시 */
.reg-label { padding: .18rem .55rem; border-radius: 999px; background: rgba(255, 255, 255, .95); color: var(--text); font-size: .8rem; font-weight: 700; line-height: 1.3; white-space: nowrap; box-shadow: 0 .15rem .5rem rgba(16, 42, 76, .2); pointer-events: none; }
.shark-pin { display: flex; flex-direction: column; align-items: center; gap: .2rem; pointer-events: none; }
.shark-pin i { width: .7rem; height: .7rem; border-radius: 50%; background: var(--accent-2); box-shadow: 0 0 0 .18rem #fff, 0 .1rem .4rem rgba(16, 42, 76, .35); }
.shark-pin span { padding: .14rem .5rem; border-radius: 999px; background: rgba(255, 255, 255, .95); font-size: .8rem; font-weight: 700; color: var(--text); white-space: nowrap; box-shadow: 0 .15rem .5rem rgba(16, 42, 76, .2); }
.maplibregl-popup-content { padding: .6rem .8rem; border-radius: .7rem; font: inherit; font-size: .9rem; color: var(--text); background: rgba(255, 255, 255, .97); box-shadow: 0 .5rem 1.5rem rgba(16, 42, 76, .18); }
.maplibregl-popup-tip { display: none; }
.pop b { display: block; font-size: 1rem; }
.pop .pv { font-size: 1.6rem; font-weight: 700; letter-spacing: -.02em; }
.pop .ps { color: var(--text-2); font-weight: 600; }
.maplibregl-cooperative-gesture-screen { font-size: 1rem; }

.notes { display: flex; flex-direction: column; min-height: 0; overflow-y: auto; }
.note-list { list-style: none; margin: .4rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .4rem; }
.note-list li { position: relative; padding: .45rem 0 0 1.25rem; border-top: 1px solid var(--line); font-size: .95rem; line-height: 1.38; font-weight: 600; }
.note-list li::before { content: ""; position: absolute; left: .1rem; top: .92rem; width: .5rem; height: .5rem; border-radius: 50%; background: var(--accent); }
.note-list li .nd { font-size: .8rem; color: var(--text-2); white-space: nowrap; }
.note-src { margin-top: auto; padding-top: .55rem; font-size: .8rem; font-weight: 600; color: var(--text-2); line-height: 1.35; }
.note-src span { display: block; white-space: nowrap; color: var(--text); }

/* ── 차트 ── */
.chart-panel { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.chart { width: 100%; min-width: 0; }
.chart-fill { flex: 1; min-height: 8rem; }
.chart-md { height: 15rem; }
.chart-stack { position: relative; flex: 1; min-height: 0; display: flex; }
.event-layer { position: absolute; inset: 0; pointer-events: none; }
.ev-tag { position: absolute; transform: translateX(-50%); padding: .08rem .45rem; border-radius: 999px; background: rgba(255, 255, 255, .95); border: 1px solid var(--line); font-size: .8rem; font-weight: 700; color: var(--text); white-space: nowrap; }

/* ── 수온·해양열파 ── */
.sst-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex: none; }
.region-pills { flex-wrap: wrap; }

/* ── 표 ── */
.table-wrap { width: 100%; }
/* 긴 목록은 상자 안에서 넘김(스크롤 줄이기, 10/28). 끝에 닿으면 페이지가 이어서 내려감 */
.list-box { max-height: 34rem; overflow-y: auto; scrollbar-width: thin; }
.list-box .tbl thead th { position: sticky; top: 0; background: rgba(250, 252, 254, .97); z-index: 1; }
.tbl { width: 100%; border-collapse: collapse; font-size: .95rem; }
.tbl th { text-align: left; font-size: .8rem; font-weight: 700; color: var(--text-2); padding: .4rem .55rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: .45rem .55rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl .na { color: var(--text-2); font-size: .8rem; font-weight: 600; }
.tbl .nm { font-weight: 600; }
.tbl a { font-weight: 600; }
.badge { display: inline-flex; align-items: center; gap: .3rem; padding: .1rem .5rem; border-radius: 999px; font-size: .8rem; font-weight: 700; line-height: 1.4; white-space: nowrap; background: rgba(255, 255, 255, .85); border: 1px solid var(--line); color: var(--text); }
.badge i { width: .7rem; height: .7rem; border-radius: .15rem; }
.badge.ok i { background: var(--accent); border-radius: 50%; }
.badge.part i { background: var(--mhw-1); border-radius: 50%; }
.badge.cat3, .badge.cat4 { color: #fff; border-color: transparent; }

/* ── 부캉이 ── */
.kw-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.2rem; margin-top: .4rem; }
.kw-col h3 { font-size: 1.05rem; font-weight: 700; }
.kw-col .sub { font-size: .8rem; font-weight: 600; margin-top: .1rem; }
.kw-words { display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem .7rem; margin-top: .55rem; }
.kw-words span { font-weight: 700; line-height: 1.2; }
.kw-words small { font-size: .8rem; color: var(--text-2); font-weight: 600; margin-left: .15rem; }
.q-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; margin-top: .4rem; }
.q-card { padding: .8rem 1rem; border-radius: .8rem; background: rgba(255, 255, 255, .7); border: 1px solid var(--line); }
.q-card h3 { font-size: 1.05rem; font-weight: 700; }
.q-card[data-q="q2"] { background: rgba(255, 255, 255, .45); }
.q-card[data-q="q2"] h3 { font-size: .95rem; color: var(--text-2); }
.q-card p, .q-card li { font-size: .95rem; margin-top: .3rem; }
.q-card .q-note { font-size: .8rem; font-weight: 600; color: var(--text-2); }
.q-card ul { margin: .3rem 0 0; padding-left: 1.1em; }
.ev-row { display: grid; grid-template-columns: 6.5rem 1fr auto; gap: .8rem; align-items: baseline; padding: .45rem 0; border-top: 1px solid var(--line); font-size: .95rem; }
.ev-row:first-child { border-top: 0; }
.ev-row .d { font-weight: 700; }
.ev-row a { font-size: .8rem; }

/* ── AI 분석 ── */
.ask { display: flex; align-items: center; gap: .8rem; padding: .55rem .6rem .55rem 1.1rem; border-radius: 1.2rem; flex: none; }
.ask-ico { width: 1.5rem; height: 1.5rem; color: var(--accent); }
.ask input { flex: 1; min-width: 0; border: 0; background: transparent; outline: 0; font: inherit; font-size: 1.2rem; font-weight: 600; color: var(--text); padding: .45rem 0; }
.ask input:focus-visible { outline: .14rem solid var(--accent); outline-offset: .14rem; }
.ask input::placeholder { color: var(--text-2); font-weight: 500; opacity: 1; }
.ask .btn { padding: .65rem 1.4rem; font-size: 1.05rem; }
.ask .btn[disabled] { opacity: .6; cursor: progress; }
.examples { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; flex: none; }
.examples .ex-lab { font-size: .9rem; font-weight: 700; color: var(--text-2); margin-right: .2rem; }
.ex-pill { border: 1px solid var(--line); background: rgba(255, 255, 255, .75); border-radius: 999px; padding: .38rem .95rem; font-size: .95rem; font-weight: 600; color: var(--text); cursor: pointer; box-shadow: 0 .15rem .5rem rgba(16, 42, 76, .06); }
.ex-pill:hover, .ex-pill.is-active { background: #fff; border-color: rgba(10, 126, 149, .45); }
.answer { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.ans-meta { display: flex; flex-wrap: nowrap; align-items: center; gap: .45rem; overflow-x: auto; scrollbar-width: thin; }
.ans-badge { display: inline-flex; align-items: center; gap: .35rem; padding: .22rem .7rem; border-radius: 999px; font-size: .8rem; font-weight: 700; background: rgba(10, 126, 149, .12); color: var(--text); }
.ans-badge.saved { background: rgba(223, 162, 10, .2); }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex: none; flex-wrap: nowrap; gap: .4rem; }
.steps li { display: inline-flex; align-items: center; gap: .4rem; padding: .25rem .7rem .25rem .3rem; border-radius: 999px; background: rgba(255, 255, 255, .85); border: 1px solid var(--line); font-size: .8rem; font-weight: 600; color: var(--text-2); white-space: nowrap; }
.steps li b { color: var(--text); font-weight: 700; }
.steps li .n { width: 1.25rem; height: 1.25rem; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; font-size: .8rem; font-weight: 700; }
.steps li.is-wait { opacity: 0; transform: translateY(.3rem); }
.steps li { transition: opacity 200ms var(--ease), transform 200ms var(--ease); }
.ans-meta > .chip, .ans-badge { flex: none; white-space: nowrap; }
.ans-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 1.4rem; margin-top: .65rem; overflow: hidden; }
.ans-body.no-chart { grid-template-columns: 1fr; }
.ans-text { min-height: 0; overflow-y: auto; scrollbar-width: thin; }
.ans-text h2 { font-size: 1.2rem; }
.ans-text ul { margin: .55rem 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: .5rem; }
.ans-text li { position: relative; padding-left: 1.1rem; font-size: 1.05rem; line-height: 1.42; }
.ans-text li::before { content: ""; position: absolute; left: .1rem; top: .62rem; width: .45rem; height: .45rem; border-radius: 50%; background: var(--accent); }
.ev-chip { display: inline-block; margin: 0 .2rem 0 .3rem; padding: .02rem .5rem; border-radius: 999px; font-size: .8rem; font-weight: 600; color: var(--text-2); background: rgba(255, 255, 255, .85); border: 1px solid var(--line); vertical-align: .08em; white-space: nowrap; }
.ans-chart { display: flex; flex-direction: column; min-height: 0; }
.ans-chart h3 { font-size: 1.05rem; font-weight: 700; }
.ans-chart .chart { flex: 1; min-height: 0; }
.ans-foot { flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; margin-top: .6rem; padding-top: .55rem; border-top: 1px solid var(--line); font-size: .8rem; font-weight: 600; color: var(--text-2); }
.ans-foot a { display: inline-flex; align-items: center; gap: .25rem; padding: .12rem .6rem; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, .85); text-decoration: none; color: var(--text); font-weight: 600; }
.ans-foot a .ico { width: .8rem; height: .8rem; }
.ai-note { flex-basis: auto; margin-left: auto; }
.cite-list { word-break: normal; overflow-wrap: anywhere; }
.ans-msg { margin: auto; text-align: center; font-size: 1.05rem; font-weight: 600; color: var(--text-2); max-width: 36rem; }
.ans-loading { display: flex; align-items: center; gap: .6rem; font-weight: 700; }
.ans-loading i { width: 1.1rem; height: 1.1rem; border-radius: 50%; border: .18rem solid rgba(10, 126, 149, .25); border-top-color: var(--accent); animation: spin 800ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.tool-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .7rem; margin-top: .5rem; }
.tool { padding: .65rem .8rem; border-radius: .8rem; background: rgba(255, 255, 255, .7); border: 1px solid var(--line); }
.tool b { display: block; font-size: 1rem; }
.tool span { display: block; font-size: .85rem; color: var(--text-2); margin-top: .15rem; }

/* ── 데이터 ── */
.domain-pills { align-self: flex-start; flex-wrap: wrap; flex: none; }
.catalog { flex: 1; min-height: 0; overflow: hidden; padding-top: .3rem; padding-bottom: .3rem; }
.catalog-wrap { height: 100%; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.catalog .tbl thead th { position: sticky; top: 0; background: rgba(250, 252, 254, .97); z-index: 1; }
.cite-list, .catalog details { overflow-wrap: anywhere; }
.flow { list-style: none; margin: .6rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1.6rem; counter-reset: f; }
.flow li { position: relative; padding: .75rem .9rem; border-radius: .8rem; background: rgba(255, 255, 255, .75); border: 1px solid var(--line); }
.flow li:not(:last-child)::after { content: "→"; position: absolute; right: -1.25rem; top: 50%; transform: translateY(-50%); font-weight: 700; color: var(--accent); font-size: 1.05rem; }
.flow li.key { background: rgba(10, 126, 149, .1); border-color: rgba(10, 126, 149, .35); }
.flow b { display: block; font-size: 1.05rem; }
.flow span { display: block; margin-top: .2rem; font-size: .85rem; color: var(--text-2); }

/* ── 바닥줄·휴대폰 탭바 ── */
.foot { margin: 0 1.6rem 1.2rem; padding: .6rem 1rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: .3rem 1rem; font-size: .8rem; font-weight: 600; color: var(--text-2); border-radius: .8rem; }
.tabbar { display: none; }

/* ── 휴대폰 ── */
@media (max-width: 899.98px) {
  html { font-size: 16px; }
  body { padding-bottom: calc(5.2rem + env(safe-area-inset-bottom)); }
  .top { height: 3.5rem; padding: 0 1rem; grid-template-columns: auto 1fr; }
  .tabs, .ask-btn { display: none; }
  .top-right { gap: .4rem; }
  .view { padding: 0 1rem; }
  .fold { height: auto; min-height: 0; gap: .75rem; padding-bottom: .75rem; }
  h1 { font-size: 1.5rem; line-height: 1.3; }
  h2 { font-size: 1.2rem; }
  .title-row { flex-direction: column; align-items: flex-start; gap: .45rem; min-height: 0; }
  .title-chips { justify-content: flex-start; }
  .kpi-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
  .kpi { padding: .7rem .75rem; }
  .k-label { font-size: .85rem; padding-right: 2.2rem; }
  .k-icon { width: 1.9rem; height: 1.9rem; top: .55rem; right: .55rem; }
  .k-icon .ico { width: 1rem; height: 1rem; }
  .k-body { flex-direction: column; align-items: flex-start; gap: .25rem; }
  .k-value { font-size: 2.1rem; }
  .k-sub { font-size: .8rem; padding: 0; }
  .ov-main { display: flex; flex-direction: column; gap: .75rem; }
  .map-panel { display: flex; flex-direction: column; gap: .5rem; padding: .5rem; overflow: visible; }
  .map { position: relative; inset: auto; height: 24rem; border-radius: .7rem; }
  .map-mode { top: 1rem; left: 1rem; }
  .map-zoom { top: 1rem; left: auto; right: 1rem; flex-direction: column; }
  .map-legend { position: static; width: auto; margin: 0; padding: .55rem .75rem; }
  .map-msg { padding: 2rem; }
  .map-legend summary { display: list-item; font-size: .9rem; font-weight: 700; cursor: pointer; }
  .map-attrib { position: static; align-self: flex-start; width: auto; max-width: 100%; white-space: normal; }
  #ov-kpis { grid-template-columns: 1fr; }
  .notes { overflow: visible; }
  .sst-top { flex-direction: column; align-items: flex-start; }
  .chart-panel { flex: none; }
  .chart-fill { height: 18rem; flex: none; }
  .chart-stack { flex: none; height: 24rem; }
  .event-layer { display: none; }
  .chart-md { height: 14rem; }
  .two-col { grid-template-columns: 1fr; }
  .kw-grid, .q-grid { grid-template-columns: 1fr; }
  .tool-grid { grid-template-columns: 1fr 1fr; }
  .flow { grid-template-columns: 1fr; gap: 1.4rem; }
  .flow li:not(:last-child)::after { content: "↓"; right: auto; left: 50%; top: auto; bottom: -1.3rem; transform: translateX(-50%); }
  .catalog { overflow: visible; }
  .catalog-wrap { height: auto; max-height: 75vh; overflow-y: auto; } /* 자료 목록은 상자 안에서 넘김(전체가 펼쳐지면 30화면 넘게 길어짐) */
  .ask { flex-wrap: wrap; padding: .6rem; }
  .ask input { font-size: 1rem; flex-basis: calc(100% - 2.5rem); }
  .ask .btn { width: 100%; }
  .ans-meta, .steps { flex-wrap: wrap; overflow-x: visible; }
  .steps { flex: 1 1 100%; min-width: 0; }
  .steps li { white-space: normal; }
  .ai-note { flex-basis: 100%; margin-left: 0; }
  .ans-body { grid-template-columns: 1fr; }
  .ans-chart .chart { height: 14rem; flex: none; }
  .seg button { padding: .38rem .75rem; font-size: .85rem; }
  .ev-row { grid-template-columns: 5.2rem 1fr; }
  .ev-row a { grid-column: 2; }
  /* 표는 휴대폰에서 줄마다 카드처럼 세로로 */
  .tbl thead { display: none; }
  .tbl, .tbl tbody, .tbl tr, .tbl td { display: block; width: 100%; }
  .tbl tr { padding: .55rem 0; border-bottom: 1px solid var(--line); }
  .tbl tr:last-child { border-bottom: 0; }
  .tbl td { border: 0; padding: .12rem 0; display: flex; justify-content: space-between; gap: 1rem; text-align: right; }
  .tbl td::before { content: attr(data-label); font-size: .8rem; font-weight: 700; color: var(--text-2); text-align: left; flex: none; }
  .tbl td.nm { display: block; text-align: left; font-size: 1rem; }
  .tbl td.nm::before { display: none; }
  .tbl .num { text-align: right; }
  .foot { margin: 0 1rem 1rem; }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; z-index: 50;
    left: .6rem; right: .6rem; bottom: calc(.6rem + env(safe-area-inset-bottom)); padding: .3rem;
    background: rgba(255, 255, 255, .78);
  }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: .15rem; padding: .4rem 0 .35rem; border-radius: 999px; text-decoration: none; color: var(--text-2); font-size: .8rem; font-weight: 600; }
  .tabbar a .ico { width: 1.35rem; height: 1.35rem; }
  .tabbar a[aria-current="page"] { color: var(--text); font-weight: 700; background: rgba(255, 255, 255, .96); box-shadow: 0 .3rem .9rem rgba(16, 42, 76, .12); }
}
