:root {
  --bg: #080c14;
  --bg-elevated: #0f1624;
  --bg-card: rgba(15, 23, 42, 0.72);
  --bg-card-hover: rgba(23, 35, 62, 0.85);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(148, 163, 184, 0.22);
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;
  --accent: #3b82f6;
  --accent-grad: linear-gradient(135deg, #2563eb, #4f46e5);
  --up: #f43f5e;
  --up-bg: rgba(244, 63, 94, 0.12);
  --down: #38bdf8;
  --down-bg: rgba(56, 189, 248, 0.12);
  --kr-color: #ef4444;
  --us-color: #38bdf8;
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  --radius: 12px;
}

html[data-theme='light'] {
  --bg: #f8fafc;
  --bg-elevated: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --text: #0f172a;
  --text-muted: #475569;
  --text-subtle: #64748b;
  --accent: #2563eb;
  --up: #dc2626;
  --up-bg: rgba(220, 38, 38, 0.08);
  --down: #2563eb;
  --down-bg: rgba(37, 99, 235, 0.08);
  --shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Pretendard Variable', 'Pretendard', -apple-system, BlinkMacSystemFont, 'Noto Sans KR', sans-serif;
  letter-spacing: -0.02em;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body {
  background-image: radial-gradient(circle at 15% 0%, rgba(37, 99, 235, 0.12), transparent 36%),
    radial-gradient(circle at 85% 10%, rgba(79, 70, 229, 0.09), transparent 34%);
  min-height: 100vh;
}

html[data-theme='light'] body {
  background-image: radial-gradient(circle at 15% 0%, rgba(37, 99, 235, 0.06), transparent 36%);
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
}

/* 헤더 */
.top-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1480px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--accent-grad);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-text strong {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.brand-sub {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text-subtle);
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  color: var(--text-muted);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6); }
  70% { box-shadow: 0 0 0 7px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.header-search-wrap {
  flex: 1;
  max-width: 480px;
}

.cmd-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.cmd-trigger:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.cmd-trigger span {
  flex: 1;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cmd-trigger kbd {
  padding: 2px 6px;
  border-radius: 5px;
  border: 1px solid var(--border-strong);
  font-size: 0.7rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--text-subtle);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.icon-btn:hover {
  color: var(--text);
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.icon-btn.spinning svg {
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* 지수 티커 스트립 */
.ticker-strip {
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg-elevated) 75%, transparent);
}

.ticker-inner {
  max-width: 1480px;
  margin: 0 auto;
  padding: 8px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
}

.ticker-inner::-webkit-scrollbar {
  display: none;
}

.ticker-card {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  font-size: 0.8rem;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.ticker-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.ticker-name {
  font-weight: 700;
  color: var(--text);
}

.ticker-price {
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
  font-weight: 600;
}

.delta-badge {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 0.74rem;
  padding: 2px 6px;
  border-radius: 6px;
}

.delta-badge.up {
  color: var(--up);
  background: var(--up-bg);
}

.delta-badge.down {
  color: var(--down);
  background: var(--down-bg);
}

.delta-badge.flat {
  color: var(--text-muted);
  background: rgba(148, 163, 184, 0.12);
}

/* 메인 3단 구조적 그리드 */
.dashboard-shell {
  max-width: 1480px;
  margin: 0 auto;
  padding: 20px;
  display: grid;
  grid-template-columns: 245px minmax(0, 1fr) 340px;
  gap: 20px;
  align-items: start;
}

.section-index {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.69rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-subtle);
  margin-bottom: 10px;
}

/* 좌측 사이드바 */
.sidebar-left {
  position: sticky;
  top: 76px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
}

.scope-nav,
.theme-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.scope-btn,
.theme-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 11px;
  border-radius: 9px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.86rem;
  font-weight: 600;
  text-align: left;
  transition: all 0.18s ease;
}

.scope-btn:hover,
.theme-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text);
}

.scope-btn.active,
.theme-btn.active {
  background: rgba(37, 99, 235, 0.14);
  border-color: rgba(59, 130, 246, 0.35);
  color: var(--text);
}

.scope-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.flag-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.flag-dot.kr {
  background: var(--kr-color);
}

.flag-dot.us {
  background: var(--us-color);
}

.count-badge {
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.14);
  color: var(--text-muted);
}

.watchlist-box {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.watch-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  font-size: 0.77rem;
  font-weight: 600;
}

.watch-chip:hover {
  border-color: var(--accent);
}

.empty-hint {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-subtle);
  line-height: 1.5;
}

/* 중앙 피드 헤더 */
.feed-header-card {
  position: relative;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  margin-bottom: 14px;
}

.crosshair {
  position: absolute;
  font-family: ui-monospace, monospace;
  font-size: 11px;
  line-height: 1;
  color: var(--text-subtle);
  opacity: 0.55;
  pointer-events: none;
}

.crosshair.tl { top: 6px; left: 8px; }
.crosshair.tr { top: 6px; right: 8px; }

.feed-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  flex-wrap: wrap;
}

.feed-header-card h1 {
  margin: 2px 0 6px;
  font-size: 1.38rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.feed-subtitle {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.toggle-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  font-size: 0.78rem;
  color: var(--text-muted);
  cursor: pointer;
}

.inline-search-form {
  margin-top: 14px;
  display: flex;
  gap: 8px;
}

.inline-search-form input {
  flex: 1;
  padding: 10px 13px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  font-size: 0.88rem;
  outline: none;
}

.inline-search-form input:focus {
  border-color: var(--accent);
}

.btn-primary,
.btn-secondary,
.btn-mini {
  padding: 9px 14px;
  border-radius: 9px;
  border: 1px solid transparent;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
  transition: all 0.18s ease;
}

.btn-primary {
  background: var(--accent-grad);
  color: #fff;
}

.btn-primary:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.btn-secondary,
.btn-mini {
  background: var(--bg-elevated);
  border-color: var(--border);
  color: var(--text-muted);
}

.btn-mini {
  padding: 5px 10px;
  font-size: 0.74rem;
}

.btn-secondary:hover,
.btn-mini:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

.mobile-theme-chips {
  display: none;
  margin-top: 12px;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.mobile-theme-chips::-webkit-scrollbar {
  display: none;
}

/* 뉴스 카드 (Radial Spotlight + Hairline Border) */
.news-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.news-card {
  position: relative;
  padding: 17px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  overflow: hidden;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease;
}

.news-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(360px circle at var(--mouse-x, -200px) var(--mouse-y, -200px), rgba(59, 130, 246, 0.11), transparent 60%);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.news-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.news-card:hover::before {
  opacity: 1;
}

.news-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 8px;
  font-size: 0.75rem;
  color: var(--text-subtle);
}

.market-tag {
  padding: 2px 7px;
  border-radius: 5px;
  font-weight: 800;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
}

.market-tag.kr {
  background: rgba(239, 68, 68, 0.14);
  color: #f87171;
}

.market-tag.us {
  background: rgba(56, 189, 248, 0.14);
  color: #38bdf8;
}

html[data-theme='light'] .market-tag.kr { color: #dc2626; }
html[data-theme='light'] .market-tag.us { color: #0284c7; }

.translated-tag {
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  font-size: 0.68rem;
  font-weight: 700;
}

html[data-theme='light'] .translated-tag { color: #4338ca; }

.news-source {
  font-weight: 700;
  color: var(--text-muted);
}

.news-title {
  display: block;
  font-size: 1.02rem;
  font-weight: 750;
  line-height: 1.45;
  color: var(--text);
  margin-bottom: 6px;
}

.news-title:hover {
  color: var(--accent);
}

.news-orig-title {
  margin: 0 0 8px;
  font-size: 0.78rem;
  color: var(--text-subtle);
  font-style: italic;
  line-height: 1.4;
}

.news-summary {
  margin: 0 0 11px;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.58;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ticker-chip {
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  font-size: 0.73rem;
  font-weight: 700;
}

.ticker-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.theme-pill {
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(148, 163, 184, 0.12);
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 600;
  border: none;
}

.read-link {
  font-size: 0.77rem;
  font-weight: 700;
  color: var(--accent);
}

.loading-card {
  padding: 36px 20px;
  text-align: center;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* 관련 테마주 보드 & 전체 테마 랭킹 */
.theme-stocks-board {
  margin-bottom: 14px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
}

.theme-stocks-board:empty {
  display: none;
}

.board-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.board-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.board-title-wrap h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
}

.board-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 3px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
}

.board-tab {
  padding: 4px 10px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
}

.board-tab.active {
  background: var(--accent-grad);
  color: #fff;
}

.theme-rank-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.theme-rank-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 11px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  text-align: left;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.theme-rank-card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.theme-rank-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.theme-rank-name {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.theme-rank-leaders {
  font-size: 0.72rem;
  color: var(--text-subtle);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.theme-stock-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.theme-stock-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  transition: all 0.18s ease;
}

.theme-stock-card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.ts-left {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
}

.ts-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.ts-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ts-name-row strong {
  font-size: 0.87rem;
  font-weight: 750;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ts-role {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.ts-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

.ts-actions {
  display: flex;
  gap: 4px;
  margin-top: 2px;
}

.ts-btn {
  padding: 2px 7px;
  border-radius: 5px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.69rem;
  font-weight: 700;
}

.ts-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.lookup-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(59, 130, 246, 0.35);
  background: rgba(37, 99, 235, 0.08);
  margin-bottom: 12px;
}

.lookup-stock-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.lookup-stock-info h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
}

.lookup-theme-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.lookup-theme-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  transition: all 0.16s ease;
}

.lookup-theme-tab:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.lookup-theme-tab.active {
  background: var(--accent-grad);
  border-color: transparent;
  color: #fff;
}

.lookup-theme-tab.active .delta-badge {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.theme-stock-card.is-self {
  border-color: rgba(59, 130, 246, 0.55);
  background: rgba(37, 99, 235, 0.1);
}

@media (max-width: 1024px) {
  .theme-rank-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .theme-stock-grid {
    grid-template-columns: 1fr;
  }
}

/* 우측 사이드바 */
.sidebar-right {
  position: sticky;
  top: 76px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.panel-card {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.panel-hint {
  font-size: 0.72rem;
  color: var(--text-subtle);
}

.stocks-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 360px;
  overflow-y: auto;
  padding-right: 2px;
}

.stock-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 9px;
  border: 1px solid transparent;
  background: var(--bg-elevated);
  cursor: pointer;
  transition: all 0.18s ease;
}

.stock-row:hover,
.stock-row.active {
  border-color: var(--accent);
}

.stock-info {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.star-btn {
  border: none;
  background: transparent;
  color: var(--text-subtle);
  font-size: 0.95rem;
  padding: 0 2px;
}

.star-btn.starred {
  color: #f59e0b;
}

.stock-names {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.stock-names strong {
  font-size: 0.84rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stock-names span {
  font-size: 0.7rem;
  color: var(--text-subtle);
}

.stock-quote {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.stock-price {
  font-size: 0.82rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.chart-title {
  margin: 2px 0 0;
  font-size: 1rem;
  font-weight: 800;
}

.tv-container {
  width: 100%;
  height: 310px;
  border-radius: 9px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
}

.modal-tv {
  height: 440px;
}

/* FAQ */
.faq-section {
  margin-top: 24px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 10px 14px;
  background: var(--bg-elevated);
}

.faq-item summary {
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
}

.faq-item p {
  margin: 8px 0 2px;
  font-size: 0.83rem;
  color: var(--text-muted);
}

/* 푸터 */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 32px;
  padding: 24px 20px 86px;
}

.footer-inner {
  max-width: 1480px;
  margin: 0 auto;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.disclaimer {
  margin-top: 6px;
  font-size: 0.74rem;
  color: var(--text-subtle);
}

/* 모달 & 커맨드 팔레트 */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 10vh 16px 20px;
}

.modal-backdrop[hidden] {
  display: none;
}

.cmd-dialog,
.chart-dialog {
  width: 100%;
  max-width: 600px;
  border-radius: 14px;
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.chart-dialog {
  max-width: 780px;
  padding: 16px;
}

.cmd-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.cmd-input-row input {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 0.96rem;
  outline: none;
}

.cmd-esc {
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-subtle);
  font-size: 0.72rem;
  font-weight: 700;
}

.cmd-results {
  max-height: 360px;
  overflow-y: auto;
  padding: 8px;
}

.cmd-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 0.86rem;
  text-align: left;
}

.cmd-item:hover {
  background: var(--bg-card-hover);
}

.cmd-item small {
  color: var(--text-subtle);
}

/* 모바일 하단 플로팅 글래스 독 */
.mobile-dock {
  display: none;
  position: fixed;
  left: 50%;
  bottom: max(12px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 60;
  padding: 6px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: color-mix(in srgb, var(--bg-elevated) 84%, transparent);
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  gap: 4px;
}

.dock-btn {
  padding: 8px 14px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.dock-btn.active {
  background: var(--accent-grad);
  color: #fff;
}

/* 반응형 브레이크포인트 */
@media (max-width: 1180px) {
  .dashboard-shell {
    grid-template-columns: 220px minmax(0, 1fr);
  }
  .sidebar-right {
    grid-column: 1 / -1;
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 820px) {
  .header-inner {
    padding: 10px 14px;
  }
  .live-pill,
  .header-search-wrap {
    display: none;
  }
  .dashboard-shell {
    grid-template-columns: 1fr;
    padding: 12px;
    gap: 14px;
  }
  .sidebar-left {
    display: none;
  }
  .sidebar-right {
    grid-template-columns: 1fr;
  }
  .mobile-theme-chips {
    display: flex;
  }
  .mobile-dock {
    display: flex;
  }
  .inline-search-form {
    flex-wrap: wrap;
  }
  .inline-search-form input {
    min-width: 100%;
  }
  .inline-search-form button {
    flex: 1;
  }
  .feed-header-card h1 {
    font-size: 1.18rem;
  }
}
