@import url("https://fonts.googleapis.com/css2?family=Inter:wght@500;600;700;800&family=Noto+Sans+KR:wght@400;500;600;700;800&display=swap");

:root {
  color-scheme: light;
  --bg: #f3f7fc;
  --surface: #ffffff;
  --surface-soft: #f7f8fa;
  --ink: #15181d;
  --muted: #7a828d;
  --line: #e8eaed;
  --accent: #0879f9;
  --accent-soft: #e2f0ff;
  --nav: rgba(255, 255, 255, 0.92);
  --shadow: 0 14px 40px rgba(18, 23, 31, 0.08);
  --danger: #ff5c63;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f1115;
  --surface: #181b20;
  --surface-soft: #20242a;
  --ink: #f6f7f9;
  --muted: #969da7;
  --line: #2a2e35;
  --accent: #18a8ff;
  --accent-soft: #102e52;
  --nav: rgba(24, 27, 32, 0.92);
  --shadow: 0 18px 46px rgba(0, 0, 0, 0.3);
}

* { box-sizing: border-box; }
html { background: var(--bg); scrollbar-gutter: stable; overflow-y: scroll; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", "Noto Sans KR", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; }
button { color: inherit; }
button, a, summary, select { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }

.app-shell {
  width: min(100%, 780px);
  min-height: 100vh;
  margin: 0 auto;
  background: var(--surface);
  border-inline: 1px solid var(--line);
  position: relative;
}

.topbar {
  height: 70px;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 30;
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 65%, transparent);
}

.brand {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.5px;
  cursor: pointer;
}
.topbar .brand img { display: block; width: 104px; height: 52px; object-fit: contain; object-position: left center; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--ink);
  color: var(--surface);
  font-size: 16px;
  font-style: italic;
}
.top-actions { display: flex; gap: 5px; }
.icon-button {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  cursor: pointer;
  position: relative;
}
.icon-button:hover { background: var(--surface-soft); }
#themeButton { width: 44px; height: 44px; display: grid; place-items: center; color: #253858; background: #edf2f8; border: 1px solid #b4c0d0; }
#themeButton svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
#themeButton .theme-sun { display: none; }
[data-theme="dark"] #themeButton { color: #ffe08a; background: #293241; border-color: #71839b; }
[data-theme="dark"] #themeButton .theme-sun { display: block; }
[data-theme="dark"] #themeButton .theme-moon { display: none; }
#themeButton:hover { border-color: currentColor; }
#themeButton:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.notification-button::before {
  content: "";
  position: absolute;
  width: 15px;
  height: 16px;
  left: 12px;
  top: 10px;
  border: 2px solid currentColor;
  border-radius: 9px 9px 6px 6px;
}
.notification-button::after { content: ""; position: absolute; width: 6px; height: 2px; border-radius: 3px; background: currentColor; left: 17px; top: 29px; }
.notification-dot { position: absolute; width: 7px; height: 7px; background: var(--danger); border: 2px solid var(--surface); border-radius: 50%; right: 8px; top: 8px; z-index: 2; }

main { min-height: calc(100vh - 70px); padding-bottom: 110px; }
.page { animation: page-in 220ms ease-out; }
@keyframes page-in { from { opacity: 0; transform: translateY(6px); } }
.page-heading { padding: 28px 22px 10px; }
.page-heading h1 { margin: 0; font-size: 30px; line-height: 1.2; letter-spacing: -1.4px; }
.page-heading p { margin: 9px 0 0; color: var(--muted); font-size: 14px; }

.market-hero {
  position: relative; margin: 18px 16px 20px; padding: 26px 24px 20px; overflow: hidden; border-radius: 28px; color: #f8fbff;
  background: radial-gradient(circle at 78% 12%, rgba(0,174,255,.34), transparent 34%), linear-gradient(145deg, #05152f 0%, #092d68 58%, #041a3c 100%);
  box-shadow: 0 22px 55px rgba(8,16,29,.24); isolation: isolate;
}
.hero-glow { position: absolute; z-index: -1; border-radius: 50%; pointer-events: none; }
.hero-glow-one { width: 180px; height: 180px; right: -70px; top: -85px; border: 28px solid rgba(255,255,255,.06); }
.hero-glow-two { width: 120px; height: 120px; left: 42%; bottom: -92px; background: rgba(52,223,145,.15); }
.hero-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hero-live-group{display:flex;align-items:center;gap:10px;flex-wrap:wrap;min-width:0;}
.simulated-audience{color:#d0e1f5;font-size:11px;line-height:1.5;font-weight:600;font-variant-numeric:tabular-nums;white-space:nowrap;padding:3px 8px;border:1px solid #7895b15c;border-radius:20px;background:#213b5866;}
.financial-panel .back-link,.financial-panel .back-link:visited{display:inline-flex;align-items:center;gap:9px;min-height:44px;margin:0 0 20px;padding:0 15px;border:1px solid #cbdcf4;border-radius:12px;background:#eef5ff;color:#165cb8;font-size:14px;font-weight:750;line-height:1.3;text-decoration:none;transition:background .15s,border-color .15s;}
.financial-panel .back-link:hover{background:#dfeeff;border-color:#7daae8;}
.financial-panel .back-link:focus-visible{outline:3px solid #2c91ff;outline-offset:3px;}
.financial-panel .back-link svg{width:18px;height:18px;flex:none;}
[data-theme="dark"] .financial-panel .back-link{background:#1c304a;color:#b1d4ff;border-color:#43628c;}
[data-theme="dark"] .financial-panel .back-link:hover{background:#284666;}
@media(max-width:480px){.hero-top{align-items:flex-start}.hero-live-group{gap:6px}.simulated-audience{font-size:10px}.hero-date{white-space:nowrap}}
.hero-live { display: flex; align-items: center; gap: 7px; margin: 0; color: #cbd7e6; font-size: 11px; font-weight: 800; letter-spacing: .4px; }
.hero-live span { width: 7px; height: 7px; border-radius: 50%; background: #19cfff; box-shadow: 0 0 0 5px rgba(25,207,255,.12); }
.hero-date { color: rgba(255,255,255,.52); font-size: 11px; }
.market-hero h1 { margin: 24px 0 10px; font-size: clamp(29px, 6.5vw, 42px); line-height: 1.12; letter-spacing: -1.8px; }
.market-hero h1 em { color: #22c7ff; font-style: normal; }
.hero-copy { max-width: 510px; margin: 0; color: rgba(235,242,250,.66); font-size: 13px; line-height: 1.65; }
.sponsor-head { display: flex; align-items: center; justify-content: space-between; margin-top: 22px; color: rgba(255,255,255,.45); font-size: 9px; font-weight: 800; letter-spacing: 1.2px; }
.sponsor-head small { padding: 3px 7px; border: 1px solid rgba(255,255,255,.12); border-radius: 999px; color: rgba(255,255,255,.5); font-size: 8px; letter-spacing: 0; }
.sponsor-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin-top: 9px; }
.sponsor-card { min-width: 0; min-height: 126px; position: relative; display: flex; flex-direction: column; align-items: flex-start; padding: 14px; overflow: hidden; border: 1px solid rgba(255,255,255,.11); border-radius: 17px; color: #fff; text-align: left; cursor: pointer; box-shadow: inset 0 1px rgba(255,255,255,.08); transition: transform 160ms ease, border-color 160ms ease; }
.sponsor-card:hover { transform: translateY(-2px); border-color: rgba(255,255,255,.28); }
.sponsor-card:active, .market-view-card:active, .headline-card:active { transform: scale(.985); }
.bitget-ad { background: linear-gradient(145deg, rgba(13,40,48,.96), rgba(17,100,111,.72)); }
.oracle-ad { background: linear-gradient(145deg, rgba(7,35,31,.98), rgba(19,100,73,.78)); }
.oracle-logo img { width: 27px; height: 27px; max-height: none; filter: none; background: transparent; }
.tapbit-ad { background: linear-gradient(145deg, rgba(31,29,16,.96), rgba(133,106,9,.73)); }
.wasset-ad { background: linear-gradient(145deg, rgba(23,29,49,.96), rgba(45,67,126,.74)); }
.ad-label { position: absolute; top: 10px; right: 10px; color: rgba(255,255,255,.44); font-size: 8px; font-weight: 800; letter-spacing: .8px; }
.ad-logo { height: 26px; display: flex; align-items: center; margin-bottom: 13px; }
.image-logo { gap: 7px; }
.image-logo img { width: 30px; max-height: 23px; object-fit: contain; object-position: left center; filter: brightness(0) invert(1); }
.image-logo strong { color: #fff; font-size: 18px; letter-spacing: -.6px; }
.tapbit-logo { display: grid; grid-template-columns: 7px 7px auto; grid-template-rows: 7px 7px; gap: 2px; color: #ffe14f; }
.tapbit-logo i { display: block; width: 7px; height: 7px; border-radius: 2px; background: currentColor; }
.tapbit-logo i:nth-child(2) { transform: translateY(4px); }
.tapbit-logo i:nth-child(3) { transform: translateY(-4px); }
.tapbit-logo strong { grid-column: 3; grid-row: 1 / 3; align-self: center; margin-left: 4px; color: #fff; font-size: 18px; letter-spacing: -.6px; }
.wasset-logo { gap: 6px; }
.wasset-logo strong { color: #8fb1ff; font-size: 29px; font-style: italic; line-height: 1; }
.wasset-logo em { color: #fff; font-size: 13px; font-style: normal; font-weight: 900; letter-spacing: 1px; }
.ad-copy { min-width: 0; display: grid; gap: 4px; margin-top: auto; }
.ad-copy b { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.ad-copy small { overflow: hidden; color: rgba(255,255,255,.56); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.ad-arrow { position: absolute; right: 12px; bottom: 11px; color: rgba(255,255,255,.62); font-size: 14px; }
.hero-total { margin-top: 16px; display: flex; align-items: baseline; justify-content: flex-end; gap: 5px; color: rgba(255,255,255,.46); font-size: 9px; letter-spacing: 1.2px; }
.hero-total span { margin-right: auto; }
.hero-total strong { color: #fff; font-size: 15px; letter-spacing: 0; }
.market-tabs { padding-top: 0; }

.quick-tabs { display: flex; gap: 8px; padding: 8px 22px 18px; overflow-x: auto; scrollbar-width: none; }
.quick-tabs::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 15px;
  background: var(--surface);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.chip.active { background: var(--ink); color: var(--surface); border-color: var(--ink); }

.search-wrap { padding: 0 22px 22px; }
.search-box { position: relative; }
.search-box::before { content: ""; position: absolute; left: 17px; top: 14px; width: 12px; height: 12px; border: 2px solid var(--muted); border-radius: 50%; }
.search-box::after { content: ""; position: absolute; width: 7px; height: 2px; background: var(--muted); left: 29px; top: 27px; transform: rotate(45deg); border-radius: 2px; }
.search-box input { width: 100%; border: 1px solid transparent; background: var(--surface-soft); color: var(--ink); border-radius: 16px; padding: 14px 112px 14px 48px; outline: none; }
.search-box input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search-clear { position: absolute; right: 69px; top: 8px; width: 34px; height: 34px; border: 0; background: transparent; color: var(--muted); font-size: 22px; cursor: pointer; }
.search-submit { position: absolute; right: 7px; top: 7px; height: 36px; padding: 0 14px; border: 0; border-radius: 11px; background: var(--ink); color: var(--surface); font-size: 12px; font-weight: 800; cursor: pointer; }

.section-head { display: flex; align-items: end; justify-content: space-between; padding: 5px 22px 14px; }
.section-head h2 { margin: 0; font-size: 20px; letter-spacing: -0.6px; }
.section-head button { border: 0; background: none; color: var(--muted); font-size: 12px; cursor: pointer; }
.scroll-controls { display: flex; align-items: center; gap: 5px; }
.scroll-controls span { margin-right: 3px; color: var(--muted); font-size: 11px; }
.scroll-controls button { width: 31px; height: 31px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font-size: 20px; line-height: 1; }
.section-label { margin: 0 0 7px; color: var(--accent); font-size: 11px; letter-spacing: 0.8px; font-weight: 800; }

.headline-scroll { display: grid; grid-auto-flow: column; grid-auto-columns: min(78vw, 420px); gap: 12px; overflow-x: auto; padding: 0 22px 30px; scroll-snap-type: x mandatory; scrollbar-width: none; cursor: grab; user-select: none; }
.headline-scroll.dragging { cursor: grabbing; scroll-snap-type: none; }
.headline-scroll::-webkit-scrollbar { display: none; }
.headline-card {
  min-height: 210px;
  padding: 22px;
  border: 0;
  border-radius: 24px;
  text-align: left;
  color: #fff;
  background: linear-gradient(135deg, #20242b, #343d4b);
  box-shadow: var(--shadow);
  scroll-snap-align: start;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
.headline-card:nth-child(2) { background: linear-gradient(135deg, #0e7050, #16b778); }
.headline-card.market-us { background: linear-gradient(140deg, #192949, #315ca8); }
.headline-card.market-kr { background: linear-gradient(140deg, #4a1825, #c33755); }
.headline-card.market-crypto { background: linear-gradient(140deg, #39240d, #bd741d); }
.headline-card::after { content: ""; position: absolute; width: 170px; height: 170px; border: 30px solid rgba(255,255,255,.08); border-radius: 50%; right: -65px; bottom: -85px; }
.headline-card .badge { display: inline-block; padding: 6px 9px; border-radius: 8px; background: rgba(255,255,255,.15); font-size: 11px; font-weight: 800; }
.headline-card h3 { max-width: 92%; margin: 36px 0 20px; font-size: 21px; line-height: 1.42; letter-spacing: -0.6px; }
.headline-meta { font-size: 12px; color: rgba(255,255,255,.7); }

.feed-controls { display: flex; align-items: center; justify-content: space-between; padding: 7px 22px 8px; }
.feed-controls strong { font-size: 20px; }
.filter-button { border: 0; color: var(--muted); background: var(--surface-soft); padding: 8px 11px; border-radius: 10px; font-size: 12px; font-weight: 700; cursor: pointer; }
.news-list { padding: 0 22px; }
.news-item { display: grid; grid-template-columns: 1fr auto; gap: 14px; width: 100%; padding: 19px 0; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; cursor: pointer; }
.news-source { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-bottom: 8px; color: var(--muted); font-size: 11px; font-weight: 700; }
.source-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.market-pill { padding: 3px 7px; border-radius: 999px; background: var(--accent-soft); color: #087447; font-size: 9px; font-weight: 800; }
.market-kr .source-dot { background: #e34e68; }
.market-kr .market-pill { background: #ffe7ec; color: #b82743; }
.market-crypto .source-dot { background: #e79b36; }
.market-crypto .market-pill { background: #fff0d8; color: #9c5c0c; }
[data-theme="dark"] .market-pill { color: #77edb3; }
[data-theme="dark"] .market-kr .market-pill { background: #481d28; color: #ff91a5; }
[data-theme="dark"] .market-crypto .market-pill { background: #493116; color: #ffc470; }
.news-item h3 { margin: 0; font-size: 16px; line-height: 1.48; letter-spacing: -0.35px; }
.news-item p { margin: 8px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.save-button { width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; position: relative; z-index: 2; }
.save-button::before { content: ""; position: absolute; left: 11px; top: 8px; width: 11px; height: 15px; border: 2px solid var(--muted); border-radius: 2px; clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 72%, 0 100%); }
.save-button.saved { background: var(--accent-soft); border-color: transparent; }
.save-button.saved::before { background: var(--accent); border-color: var(--accent); }
.empty-state { padding: 50px 20px; color: var(--muted); text-align: center; }
.source-action { margin: 30px 0 0; padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface-soft); }
.source-action p { margin: 0 0 12px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.source-action a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 11px; background: var(--ink); color: var(--surface); font-size: 12px; font-weight: 800; text-decoration: none; }

.bottom-nav {
  position: fixed;
  z-index: 40;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(100%, 778px);
  height: calc(74px + env(safe-area-inset-bottom));
  padding: 8px 10px env(safe-area-inset-bottom);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: var(--nav);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--line);
}
.nav-item { border: 0; background: transparent; color: var(--muted); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; font-size: 10px; font-weight: 700; cursor: pointer; }
.nav-item.active { color: var(--ink); }
.nav-icon { width: 22px; height: 22px; position: relative; display: block; }
.icon-news::before { content: ""; position: absolute; inset: 3px 2px; border: 2px solid currentColor; border-radius: 4px; }
.icon-news::after { content: ""; position: absolute; left: 7px; top: 8px; width: 9px; height: 2px; background: currentColor; box-shadow: 0 5px currentColor; }
.icon-community::before { content: ""; position: absolute; inset: 3px 2px 6px; border: 2px solid currentColor; border-radius: 7px; }
.icon-community::after { content: ""; position: absolute; left: 6px; bottom: 2px; border: 5px solid transparent; border-top-color: currentColor; transform: rotate(18deg); }
.icon-market::before { content: ""; position: absolute; left: 3px; bottom: 3px; width: 3px; height: 8px; background: currentColor; border-radius: 2px; box-shadow: 6px -5px currentColor, 12px -1px currentColor; }
.icon-calendar::before { content: ""; position: absolute; inset: 4px 2px 2px; border: 2px solid currentColor; border-radius: 5px; }
.icon-calendar::after { content: ""; position: absolute; left: 6px; top: 2px; width: 2px; height: 5px; background: currentColor; box-shadow: 8px 0 currentColor, -2px 7px 0 0 currentColor; }
.icon-profile::before { content: ""; position: absolute; left: 7px; top: 2px; width: 8px; height: 8px; border: 2px solid currentColor; border-radius: 50%; }
.icon-profile::after { content: ""; position: absolute; left: 3px; bottom: 1px; width: 16px; height: 8px; border: 2px solid currentColor; border-radius: 10px 10px 3px 3px; }

.detail-page { padding-bottom: 30px; }
.detail-top { padding: 22px; display: flex; justify-content: space-between; }
.back-button, .detail-save { border: 1px solid var(--line); background: var(--surface); border-radius: 12px; height: 40px; padding: 0 14px; font-weight: 700; cursor: pointer; }
.article { padding: 10px 22px 50px; }
.article-kicker { color: var(--accent); font-size: 12px; font-weight: 800; }
.article h1 { margin: 14px 0; font-size: clamp(28px, 6.5vw, 42px); line-height: 1.28; letter-spacing: -1.5px; }
.article-meta { color: var(--muted); font-size: 12px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.ai-summary { margin: 26px 0; padding: 20px; border-radius: 18px; background: var(--surface-soft); border-left: 4px solid var(--accent); }
.ai-summary strong { display: block; margin-bottom: 10px; }
.ai-summary p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.65; }
.article-body p { font-family: "Noto Sans KR", sans-serif; margin: 0 0 18px; font-size: 16px; line-height: 1.9; }
.disclaimer { margin-top: 34px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }

.placeholder-grid { display: grid; gap: 12px; padding: 18px 22px; }
.info-card { padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.info-card small { color: var(--muted); }
.info-card h3 { margin: 8px 0 0; font-size: 17px; }
.community-card { color: inherit; text-decoration: none; }
.community-card:hover { border-color: var(--accent); }
.community-card p { margin: 10px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.market-row { display: grid; grid-template-columns: 1fr auto auto; gap: 14px; align-items: center; }
.positive { color: var(--accent); font-weight: 700; }
.negative { color: var(--danger); font-weight: 700; }
.flat { color: var(--muted); font-weight: 700; }
.market-page { padding-bottom: 34px; background: var(--surface-soft); }
.market-page-hero { margin: 0 0 20px; padding: 34px 24px 28px; color: #f7fbff; background: radial-gradient(circle at 82% 10%, rgba(65,226,157,.24), transparent 34%), linear-gradient(145deg, #101722, #17283b 55%, #113b31); }
.market-page-hero > p { margin: 0 0 12px; color: #62e7a8; font-size: 10px; font-weight: 900; letter-spacing: 1.4px; }
.market-page-hero h1 { margin: 0; font-size: clamp(29px, 6vw, 42px); line-height: 1.2; letter-spacing: -1.6px; }
.market-page-hero > div { display: flex; align-items: center; justify-content: space-between; margin-top: 24px; }
.market-page-hero span { color: #7cebb7; font-size: 11px; font-weight: 800; }
.market-page-hero button { min-height: 38px; padding: 0 13px; border: 1px solid rgba(255,255,255,.15); border-radius: 11px; background: rgba(255,255,255,.08); color: #fff; font-size: 11px; font-weight: 800; cursor: pointer; }
.market-page-hero.compact { padding-block: 25px 21px; margin-bottom: 0; }
.market-page-hero.compact h1 { font-size: 32px; }
.market-page-hero.compact > div { margin-top: 16px; }
.market-view-nav { position: sticky; z-index: 8; top: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(110px,1fr); gap: 8px; overflow-x: auto; padding: 12px 16px; background: color-mix(in srgb,var(--surface-soft) 92%,transparent); border-bottom: 1px solid var(--line); scrollbar-width: none; backdrop-filter: blur(14px); }
.market-view-nav::-webkit-scrollbar { display: none; }
.market-view-card { min-height: 58px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); text-align: left; cursor: pointer; white-space: nowrap; }
.market-view-card { position: relative; z-index: 1; }
.market-view-card b, .market-view-card small { display: block; }
.market-view-card b { font-size: 12px; }
.market-view-card small { margin-top: 4px; color: var(--muted); font-size: 8px; }
.market-view-card.active { border-color: var(--accent); background: var(--ink); color: var(--surface); box-shadow: 0 8px 20px rgba(14,24,32,.14); }
.market-view-card.active small { color: color-mix(in srgb,var(--surface) 65%,transparent); }
.market-panel { display: none; margin-top: 16px; }
.market-panel.active { display: block; animation: market-panel-in .18s ease-out; }
@keyframes market-panel-in { from { opacity: 0; transform: translateY(5px); } }
.chart-symbols { display: flex; gap: 7px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: none; }
.chart-symbols::-webkit-scrollbar { display: none; }
.chart-symbols button, .chart-toolbar button { flex: 0 0 auto; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-soft); color: var(--muted); padding: 8px 11px; font-size: 10px; font-weight: 800; cursor: pointer; }
.chart-symbols button.active, .chart-toolbar button.active { border-color: var(--ink); background: var(--ink); color: var(--surface); }
.chart-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 14px; margin: 14px 0 8px; }
.chart-toolbar > div:last-child { display: flex; gap: 5px; }
#chartTitle { display: flex; align-items: center; gap: 10px; }
#chartTitle b { font-size: 18px; }
#chartTitle em { color: var(--muted); font-size: 14px; font-style: normal; }
.market-chart-wrap { position: relative; min-height: 300px; border-radius: 18px; background: linear-gradient(180deg,var(--surface-soft),color-mix(in srgb,var(--surface) 85%,transparent)); overflow: hidden; }
#marketChart { display: block; width: 100%; height: 300px; }
.chart-empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 12px; }
.chart-empty[hidden] { display: none; }
.chart-axis { display: flex; justify-content: space-between; gap: 10px; margin-top: 9px; color: var(--muted); font-size: 9px; }
.chart-axis b { color: var(--ink); font-weight: 700; }
.heatmap-tabs { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 9px; }
.heatmap-tabs b { font-size: 13px; }
.heatmap-tabs span { color: var(--muted); font-size: 9px; }
.heatmap-sub { margin-top: 20px; }
.heat-grid { display: grid; grid-template-columns: repeat(6,1fr); grid-auto-rows: 82px; gap: 5px; }
.heat-tile { min-width: 0; display: flex; flex-direction: column; justify-content: center; padding: 10px; border-radius: 10px; color: #fff; overflow: hidden; }
.heat-tile.heat-xl { grid-column: span 2; grid-row: span 2; }
.heat-tile.heat-md { grid-column: span 2; }
.heat-tile.heat-up { background: linear-gradient(145deg,#077a51,#12b979); }
.heat-tile.heat-down { background: linear-gradient(145deg,#9c2730,#dc4b54); }
.heat-tile.heat-flat { background: linear-gradient(145deg,#536170,#7b8793); }
.heat-tile b { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.heat-tile strong { margin: 4px 0; overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.heat-tile span { font-size: 10px; font-weight: 900; }
.heat-xl b { font-size: 20px; }
.heat-xl strong { font-size: 15px; }
.quote-heat-grid { grid-template-columns: repeat(5,1fr); grid-auto-rows: 75px; }
.tradingview-chart { height: 520px; margin-top: 12px; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--surface-soft); }
.chart-guide { margin: 12px 0 8px; padding: 10px 12px; border-radius: 10px; background: var(--accent-soft); color: var(--ink); font-size: 10px; line-height: 1.55; }
.standalone-heatmap { min-height: 420px; }
.chart-picker { display: grid; grid-template-columns: auto 170px 1fr; align-items: center; gap: 10px; margin: 14px 0 10px; }
.chart-picker label { color: var(--muted); font-size: 10px; font-weight: 900; }
.chart-picker select { width: 100%; padding: 10px 34px 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-soft); color: var(--ink); font-size: 11px; font-weight: 900; }
.chart-picker span { color: var(--muted); font-size: 9px; }
.heatmap-switch, .stock-filter-bar { display: flex; gap: 7px; overflow-x: auto; margin: 14px 0; padding-bottom: 4px; scrollbar-width: none; }
.heatmap-switch::-webkit-scrollbar, .stock-filter-bar::-webkit-scrollbar { display: none; }
.heatmap-switch button, .stock-filter-bar button { flex: 0 0 auto; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-soft); color: var(--muted); font-size: 10px; font-weight: 900; cursor: pointer; }
.heatmap-switch button.active, .stock-filter-bar button.active { border-color: var(--ink); background: var(--ink); color: var(--surface); }
.heatmap-view { display: none; }
.heatmap-view.active { display: block; }
.heat-note { margin: 0 0 10px; color: var(--muted); font-size: 10px; }
.heat-sector { margin-top: 12px; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-soft); }
.heat-sector h3 { margin: 0 0 7px; color: var(--muted); font-size: 10px; letter-spacing: .08em; }
.heat-sector .heat-grid { grid-template-columns: repeat(6, minmax(0,1fr)); grid-auto-rows: 70px; }
.heat-weight-9, .heat-weight-8, .heat-weight-7 { grid-column: span 2; grid-row: span 2; }
.heat-weight-6, .heat-weight-5, .heat-weight-4 { grid-column: span 2; }
.heat-weight-9 b, .heat-weight-8 b, .heat-weight-7 b { font-size: 19px; }
.stock-top h3 { margin: 18px 0 10px; font-size: 13px; }
.stock-more { margin-top: 12px; border-top: 1px solid var(--line); }
.stock-more summary { display: flex; align-items: center; justify-content: space-between; padding: 16px 4px; color: var(--ink); font-size: 12px; font-weight: 900; cursor: pointer; list-style: none; }
.stock-more summary::-webkit-details-marker { display: none; }
.stock-more summary b { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 50%; background: var(--ink); color: var(--surface); font-size: 18px; transition: transform .2s ease; }
.stock-more[open] summary b { transform: rotate(45deg); }
.stock-search { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 10px; margin: 4px 0 14px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); }
.stock-search span { color: var(--muted); font-size: 10px; font-weight: 900; }
.stock-search input { min-width: 0; padding: 6px; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 12px; }
.stock-search-empty { padding: 28px 0; color: var(--muted); text-align: center; font-size: 11px; }
.coin-more { margin-top: 12px; border-top: 1px solid var(--line); }
.coin-more summary { display: flex; align-items: center; justify-content: space-between; padding: 16px 4px; color: var(--ink); font-size: 12px; font-weight: 900; cursor: pointer; list-style: none; }
.coin-more summary::-webkit-details-marker { display: none; }
.coin-more summary b { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 50%; background: var(--ink); color: var(--surface); font-size: 18px; transition: transform .2s ease; }
.coin-more[open] summary b { transform: rotate(45deg); }
.coin-table-expanded { overflow: visible; border: 1px solid var(--line); border-radius: 14px; }
.full-screener-head { display: flex; align-items: end; justify-content: space-between; margin: 20px 0 9px; }
.full-screener-head b { font-size: 13px; }
.full-screener-head small { color: var(--muted); font-size: 9px; }
.tradingview-screener { min-height: 600px; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-soft); }
.stock-filter-results[hidden], .stock-top[hidden], .stock-quote[hidden] { display: none !important; }
.stock-quote small { max-width: 145px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.indicator-section, .market-board { margin: 0 16px 18px; padding: 20px; border: 1px solid var(--line); border-radius: 24px; background: var(--surface); box-shadow: 0 12px 34px rgba(16,24,40,.06); }
.market-section-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.market-section-head p { margin: 0 0 5px; color: var(--accent); font-size: 9px; font-weight: 900; letter-spacing: 1px; }
.market-section-head h2 { margin: 0; font-size: 21px; letter-spacing: -.7px; }
.market-section-head > small { color: var(--muted); font-size: 10px; }
.indicator-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.indicator-card { min-width: 0; padding: 14px; border-radius: 16px; background: var(--surface-soft); }
.indicator-card > small { display: block; overflow: hidden; color: var(--muted); font-size: 10px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.indicator-card > strong { display: block; margin: 9px 0 7px; overflow: hidden; font-size: 18px; letter-spacing: -.5px; text-overflow: ellipsis; white-space: nowrap; }
.indicator-card > div { display: flex; align-items: center; justify-content: space-between; gap: 5px; font-size: 9px; }
.indicator-card em { overflow: hidden; color: var(--muted); font-size: 8px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.coin-table { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; }
.coin-table-head, .coin-row { display: grid; grid-template-columns: 1.15fr 1fr 1fr .78fr; gap: 10px; align-items: center; }
.coin-table-head { padding: 10px 14px; color: var(--muted); background: var(--surface-soft); font-size: 9px; font-weight: 800; }
.coin-row { padding: 14px; border-top: 1px solid var(--line); }
.coin-row:first-of-type { border-top: 0; }
.coin-name { display: flex; align-items: center; gap: 9px; }
.coin-name > span { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: #f0a52d; color: #fff; font-size: 12px; font-weight: 900; }
.coin-symbol-icon { overflow: hidden; flex: 0 0 30px; }
.coin-symbol-icon img { display: block; width: 100%; height: 100%; object-fit: cover; background: #fff; }
.coin-symbol-icon b { max-width: 28px; overflow: hidden; font-size: 8px; text-overflow: ellipsis; }
.coin-name div, .coin-row > div:not(.coin-name) { min-width: 0; display: grid; gap: 3px; }
.coin-row b, .coin-row strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.coin-row small { overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.coin-row .positive, .coin-row .negative, .coin-row .flat { font-size: 9px; }
.premium-cell { justify-items: end; text-align: right; }
.market-source { margin: 11px 2px 0; color: var(--muted); font-size: 9px; }
.quote-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.quote-row { min-width: 0; display: grid; grid-template-columns: 1fr auto; gap: 5px 12px; align-items: center; padding: 14px; border-radius: 16px; background: var(--surface-soft); }
.quote-row > div { min-width: 0; display: grid; gap: 3px; }
.quote-row b { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.quote-row small { color: var(--muted); font-size: 9px; }
.quote-row > strong { font-size: 15px; }
.quote-row > span { grid-column: 2; text-align: right; font-size: 10px; }
.cap-table { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; }
.cap-head, .cap-row { display: grid; grid-template-columns: 42px minmax(110px, 1.2fr) minmax(90px, .8fr) minmax(90px, .9fr) 74px; gap: 10px; align-items: center; }
.cap-head { padding: 10px 14px; background: var(--surface-soft); color: var(--muted); font-size: 9px; font-weight: 800; }
.cap-row { padding: 12px 14px; border-top: 1px solid var(--line); }
.cap-row > div { min-width: 0; display: grid; gap: 2px; }
.cap-row b, .cap-row strong, .cap-row > span { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.cap-row small, .cap-rank { color: var(--muted); font-size: 9px; }
.cap-row .positive, .cap-row .negative, .cap-row .flat { text-align: right; }
.market-disclaimer { margin: 0 22px 22px; color: var(--muted); font-size: 10px; line-height: 1.6; }
.market-loading { min-height: 320px; display: grid; place-content: center; justify-items: center; gap: 12px; color: var(--muted); }
.market-loading span { width: 30px; height: 30px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: market-spin .8s linear infinite; }
@keyframes market-spin { to { transform: rotate(360deg); } }
.calendar-date { display: inline-grid; place-items: center; min-width: 50px; height: 50px; margin-right: 14px; border-radius: 14px; background: var(--accent-soft); color: var(--accent); font-weight: 800; }
.calendar-event { display: flex; align-items: center; }
.profile-hero { margin: 18px 22px; padding: 26px; border-radius: 24px; background: var(--ink); color: var(--surface); }
.profile-hero p { color: color-mix(in srgb, var(--surface) 65%, transparent); }
.primary-button { border: 0; border-radius: 12px; background: var(--accent); color: #07150f; padding: 12px 16px; font-weight: 800; cursor: pointer; }
.secondary-button { border: 1px solid color-mix(in srgb, var(--surface) 35%, transparent); border-radius: 12px; background: transparent; color: inherit; padding: 12px 16px; font-weight: 800; cursor: pointer; }
.auth-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.auth-page { min-height: calc(100vh - 80px); }
.auth-panel { width: min(100% - 44px, 430px); margin: 20px auto 60px; }
.auth-brand { margin-bottom: 30px; cursor: default; }
.auth-panel h1 { margin: 0; font-size: 32px; letter-spacing: -1.2px; }
.auth-panel > p { margin: 10px 0 28px; color: var(--muted); }
.auth-panel form { display: grid; gap: 17px; }
.auth-panel label { display: grid; gap: 8px; font-size: 13px; font-weight: 800; }
.auth-panel input:not([type="checkbox"]) { width: 100%; height: 52px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-soft); color: var(--ink); padding: 0 15px; outline: none; }
.auth-panel input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.terms-check { grid-template-columns: auto 1fr; align-items: start; color: var(--muted); font-weight: 500 !important; line-height: 1.5; }
.terms-check input { margin-top: 3px; accent-color: var(--accent); }
.auth-submit { width: 100%; min-height: 50px; font-size: 15px; }
.auth-submit:disabled { opacity: .55; cursor: wait; }
.form-error { min-height: 20px; color: var(--danger); font-size: 13px; }
.auth-switch { width: 100%; margin-top: 16px; border: 0; background: transparent; color: var(--accent); font-weight: 800; cursor: pointer; }
.oauth-divider { display: flex; align-items: center; gap: 12px; margin: 30px 0 16px; color: var(--muted); font-size: 11px; }
.oauth-divider::before, .oauth-divider::after { content: ""; height: 1px; background: var(--line); flex: 1; }
.oauth-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.oauth-buttons button { height: 48px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-soft); color: var(--muted); }
.toast { position: fixed; z-index: 80; left: 50%; bottom: 92px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: var(--ink); color: var(--surface); padding: 11px 16px; border-radius: 12px; box-shadow: var(--shadow); font-size: 13px; font-weight: 700; transition: 180ms ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (min-width: 781px) {
  body { padding-block: 22px; }
  .app-shell { border-radius: 26px; overflow: clip; box-shadow: var(--shadow); min-height: calc(100vh - 44px); }
  .topbar { position: relative; }
  .bottom-nav { bottom: 22px; border-radius: 0 0 26px 26px; }
}

@media (max-width: 600px) {
  html { scrollbar-gutter: auto; }
  body { overflow-x: hidden; }
  .topbar { height: 62px; padding: 0 max(12px, env(safe-area-inset-left)); }
  .topbar .brand img { width: 92px; height: 48px; }
  main { min-height: calc(100vh - 62px); padding-bottom: calc(92px + env(safe-area-inset-bottom)); }
  .bottom-nav { height: calc(72px + env(safe-area-inset-bottom)); padding: 5px max(4px, env(safe-area-inset-left)) env(safe-area-inset-bottom); }
  .nav-item { min-width: 0; min-height: 48px; }
  .page-heading h1 { font-size: 27px; }
  .market-hero { margin: 10px 10px 18px; padding: 22px 16px 16px; border-radius: 22px; }
  .hero-copy { font-size: 12px; }
  .sponsor-grid { grid-auto-flow: column; grid-auto-columns: 82%; grid-template-columns: none; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin-right: -16px; padding-right: 16px; touch-action: pan-x; overscroll-behavior-inline: contain; -webkit-overflow-scrolling: touch; }
  .sponsor-grid::-webkit-scrollbar { display: none; }
  .sponsor-card { min-height: 120px; scroll-snap-align: start; }
  .headline-scroll { grid-auto-columns: 86vw; touch-action: pan-x; -webkit-overflow-scrolling: touch; }
  .headline-card h3 { font-size: 19px; }
  .scroll-controls span { display: none; }
  .indicator-section, .market-board { margin-left: 10px; margin-right: 10px; padding: 16px; border-radius: 20px; }
  .indicator-grid { grid-template-columns: 1fr 1fr; }
  .coin-table { overflow: visible; border: 0; background: transparent; }
  .coin-table-head { display: none; }
  .coin-row { min-width: 0; grid-template-columns: 1fr 1fr; gap: 12px 8px; margin-bottom: 8px; padding: 13px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-soft); }
  .coin-row:first-of-type { border-top: 1px solid var(--line); }
  .coin-name { grid-column: 1 / -1; padding-bottom: 9px; border-bottom: 1px solid var(--line); }
  .coin-row > div:not(.coin-name) { padding: 2px 0; }
  .premium-cell { justify-items: start; text-align: left; }
  .coin-table-expanded { border: 0; }
  .quote-grid { grid-template-columns: 1fr; }
  .cap-table { overflow-x: auto; }
  .cap-head, .cap-row { min-width: 620px; }
  .market-view-nav { top: 0; grid-auto-columns: 118px; padding: 10px; touch-action: pan-x; -webkit-overflow-scrolling: touch; }
  .market-view-card { min-height: 58px; padding: 10px; }
  .chart-toolbar { align-items: flex-start; flex-direction: column; }
  .market-chart-wrap, #marketChart { height: 260px; min-height: 260px; }
  .heat-grid { grid-template-columns: repeat(3,1fr); grid-auto-rows: 78px; }
  .heat-tile.heat-xl { grid-column: span 2; grid-row: span 2; }
  .quote-heat-grid { grid-template-columns: repeat(2,1fr); }
  .tradingview-chart { height: min(64vh, 520px); min-height: 390px; margin-inline: -8px; border-radius: 12px; }
  .chart-picker { grid-template-columns: 1fr; }
  .heat-sector .heat-grid { grid-template-columns: repeat(3,minmax(0,1fr)); grid-auto-rows: 68px; }
  .chart-axis b { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
:root { --chat-blue: #0879f9; --text:var(--ink); }
.account-brand { gap:10px;margin-bottom:24px;color:var(--ink);font-size:22px; }
.account-brand img { width:52px;height:52px;object-fit:contain;background:none; }
[data-theme="dark"] .topbar .brand img,[data-theme="dark"] .account-brand img { filter:brightness(1.2) saturate(1.08); }
.account-consent { margin:18px 0;color:var(--muted);font-size:12px;line-height:1.7; }
.account-consent summary { cursor:pointer;color:var(--ink);padding:8px 0; }
.admin-search { display:flex;gap:10px;margin:18px 0; }
.admin-search input { flex:1;min-width:0;padding:12px;border:1px solid var(--line);border-radius:12px;background:var(--surface);color:var(--ink); }
.member-row { display:flex;justify-content:space-between;align-items:center;gap:12px;padding:18px 0;border-bottom:1px solid var(--line); }
.member-row > div { display:grid;gap:5px;min-width:0; }
.member-row small { font-size:11px;color:var(--muted);overflow-wrap:anywhere; }
.member-row button { flex-shrink:0; }
.market-nav-controls { display:flex;align-items:center;justify-content:space-between;margin:18px 0 8px;font-size:11px;color:var(--muted); }
.market-nav-controls > div { display:flex;gap:7px; }
.market-nav-controls button { width:38px;height:38px;border:1px solid var(--line);border-radius:11px;background:var(--surface);color:var(--ink);font-size:23px;cursor:pointer; }
.heatmap-subnav { display:flex;gap:8px;padding:14px 0;margin-bottom:6px; }
.heatmap-subnav button { flex:1;padding:12px 8px;border:1px solid var(--line);border-radius:12px;background:var(--surface);color:var(--ink);font-weight:700;cursor:pointer; }
.heatmap-subnav button.active { background:var(--accent);color:#fff;border-color:var(--accent); }
.heatmap-subnav[hidden] { display:none; }
.email-verification { margin:0 0 16px;padding:16px;border:1px solid var(--line);border-radius:12px;background:var(--surface-soft); }
.email-verification #sendEmailCode { width:100%;min-height:48px;margin-bottom:14px;padding:12px 16px;cursor:pointer;background:#075ac8;color:#ffffff;border:1px solid #075ac8;box-shadow:0 3px 10px #075ac826;font-size:15px;font-weight:800; }
.email-verification #sendEmailCode:hover:not(:disabled) { background:#064ba8;border-color:#064ba8; }
.email-verification #sendEmailCode:focus-visible { outline:3px solid #075ac8;outline-offset:3px; }
.email-verification #sendEmailCode:disabled { opacity:1;background:#e1e8f2;color:#42536d;border-color:#a2b1c6;box-shadow:none;cursor:wait; }
[data-theme="dark"] .email-verification #sendEmailCode { background:#78b8ff;color:#071b36;border-color:#a6d0ff;box-shadow:none; }
[data-theme="dark"] .email-verification #sendEmailCode:hover:not(:disabled) { background:#a6d0ff;border-color:#c8e2ff; }
[data-theme="dark"] .email-verification #sendEmailCode:focus-visible { outline-color:#b8dbff; }
[data-theme="dark"] .email-verification #sendEmailCode:disabled { background:#334155;color:#d8e3f2;border-color:#71839b; }
.email-verification input { letter-spacing:5px;font-size:18px; }
.email-verification p { color:var(--muted);font-size:12px;line-height:1.6;margin:10px 0; }
.email-verification small { color:#438dff;font-size:12px; }
.heat-mode { display:flex;gap:8px;margin:12px 0; }
.heat-mode button { min-height:44px;padding:10px 18px;border:1px solid var(--line);border-radius:12px;background:var(--surface-soft);color:var(--ink);cursor:pointer;font-weight:700; }
.heat-mode button.active { background:#086bf5;border-color:#086bf5;color:white; }
.heat-sector-select { display:flex;align-items:center;gap:14px;font-size:13px;margin:16px 0;color:var(--muted); }
.heat-sector-select select { flex:1;min-width:0;min-height:44px;border:1px solid var(--line);border-radius:10px;padding:10px;background:var(--surface-soft);color:var(--ink); }
.readable-heat-grid { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px; }
.readable-heat-cell { min-width:0;min-height:145px;border:0;border-radius:8px;padding:15px 10px;color:#fff;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:9px;text-align:center;cursor:pointer; }
.readable-heat-cell b { font-size:15px;overflow-wrap:anywhere; }
.readable-heat-cell strong { font-size:24px; }
.readable-heat-cell small { width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px;opacity:.9; }
.readable-heat-cell span { font-size:12px; }
.readable-heat-cell:focus-visible { outline:3px solid var(--ink);outline-offset:2px; }
.heat-legend { display:flex;align-items:center;gap:10px;font-size:10px;color:var(--muted);margin:14px 0; }
.heat-legend i { flex:1;height:7px;border-radius:9px;background:linear-gradient(90deg,#bd3146,#334155,#14895b); }
.stock-quote-wrap { min-width:0;border-radius:16px;background:var(--surface-soft);overflow:hidden; }
.stock-quote-wrap .stock-quote { width:100%; }
.financial-link { display:block;min-height:44px;padding:14px;color:#438dff;font-size:12px;text-decoration:none;border-top:1px solid var(--line); }
.financial-panel { margin-top:24px; }
.financial-table-scroll { overflow:auto;max-width:100%;border:1px solid var(--line);border-radius:12px; }
.financial-table { width:100%;border-collapse:separate;border-spacing:0;white-space:nowrap;font-size:12px; }
.financial-table th,.financial-table td { padding:15px 12px;text-align:right;border-bottom:1px solid var(--line); }
.financial-table th:first-child { position:sticky;left:0;z-index:1;text-align:left;background:var(--surface);min-width:105px;border-right:1px solid var(--line); }
.financial-table th small { display:block;color:var(--muted);font-size:10px;margin-top:5px; }
.financial-table thead th { background:var(--surface-soft); }
.financial-table .estimate { color:#599cff;background:rgba(60,130,250,.06); }
.financial-source { display:inline-flex;padding:15px 12px;border-radius:10px;background:var(--surface-soft);color:#438dff;font-weight:700;font-size:13px; }
@media(max-width:600px){.readable-heat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.readable-heat-cell{min-height:142px;padding:12px 8px}.readable-heat-cell b{font-size:14px}.readable-heat-cell strong{font-size:23px}.heat-note{line-height:1.7}.financial-panel{padding:16px}.financial-table th,.financial-table td{padding:13px 10px}.financial-table th:first-child{min-width:92px}}
.sponsor-head .ad-controls { display:flex;gap:6px; }
.ad-controls button { display:grid;place-items:center;width:34px;height:34px;border:1px solid #ffffff30;border-radius:10px;background:#ffffff0d;color:white;font-size:23px;cursor:pointer; }
.sponsor-grid#adCarousel { display:flex;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none;touch-action:pan-x pan-y; }
#adCarousel .sponsor-card { flex:0 0 46%;scroll-snap-align:start; }
.top-actions .telegram-header,.safe-chat .telegram-contact { color:#239fdb; }
.telegram-header { display:flex;align-items:center;gap:4px; }
.telegram-header img,.telegram-contact img { width:22px;height:22px;vertical-align:middle; }
@media(max-width:600px){#adCarousel .sponsor-card{flex-basis:82%}.market-page-hero.compact{padding:20px}.market-page-hero.compact h1{font-size:25px;margin:8px 0}}
.topbar .brand img { width:52px;height:52px;object-fit:contain; }
.topbar .brand { gap:4px;font-size:18px;color:var(--ink); }
[hidden] { display: none !important; }
.sr-only { position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap; }
.market-pagination { display:flex;align-items:center;justify-content:space-between;gap:12px;margin:16px 0;font-size:12px;color:var(--muted); }
.market-pagination button { padding:10px 15px;min-height:44px;border:1px solid var(--line);border-radius:10px;background:var(--surface-soft);color:var(--text); }
.market-pagination button:disabled { opacity:.35;cursor:default; }
.market-treemap { position:relative;height:580px;background:#172335;border:1px solid var(--line);border-radius:12px;overflow:hidden; }
.treemap-cell { position:absolute;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;border:1px solid #162335;border-radius:0;overflow:hidden;color:#fff;padding:2px;min-width:0;cursor:pointer; }
.treemap-cell b { max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:clamp(8px,1.2vw,14px); }
.treemap-cell span { font-size:10px;white-space:nowrap; }
.treemap-cell:hover,.treemap-cell:focus-visible { z-index:2;outline:2px solid white;outline-offset:-2px;filter:brightness(1.2); }
.heat-up { background:#148857; }.heat-down { background:#b8414f; }.heat-flat { background:#526071; }
.stock-panel h3 { margin:16px 0;font-size:15px; }.stock-panel h3 small { font-weight:400;font-size:11px;color:var(--muted); }
button.stock-quote { border:1px solid transparent;color:var(--text);text-align:left;width:100%;cursor:pointer; }
button.stock-quote:hover { border-color:var(--accent); }
.safe-chat { position:fixed;right:max(20px,env(safe-area-inset-right));bottom:calc(96px + env(safe-area-inset-bottom));z-index:70; }
.chat-launch { width:60px;height:60px;border:0;border-radius:50%;background:linear-gradient(140deg,#0766f5,#00b0ee);color:white;box-shadow:0 6px 24px #0879f94d;display:flex;align-items:center;justify-content:center;flex-direction:column;cursor:pointer; }
.chat-launch span { font-weight:950;font-style:italic;font-size:23px;line-height:25px; }.chat-launch b { font-size:9px;letter-spacing:1px; }
.chat-panel { position:absolute;right:0;bottom:74px;width:350px;height:min(530px,70dvh);display:flex;flex-direction:column;background:var(--surface,#fff);color:var(--text);border:1px solid var(--line);border-radius:18px;box-shadow:0 20px 60px #0004;overflow:hidden; }
.chat-panel header { display:flex;align-items:center;justify-content:space-between;padding:14px 16px;background:#071d40;color:#fff; }.chat-panel header div { display:grid;gap:4px; }.chat-panel header small { color:#76d8bb;font-size:10px; }
.chat-close { color:white;background:transparent;border:0;font-size:25px;width:40px;height:40px;cursor:pointer; }
.chat-notice { margin:0;padding:9px 14px;font-size:10px;color:var(--muted);background:var(--surface-soft); }
.chat-messages { flex:1;overflow-y:auto;overscroll-behavior:contain;padding:12px;min-height:80px; }
.chat-messages:empty:before { content:'첫 대화를 시작해 보세요.';display:block;text-align:center;color:var(--muted);margin-top:40px;font-size:12px; }
.chat-bot-badge { display:inline-block;margin-left:6px;padding:2px 5px;border-radius:5px;background:#e0edff;color:#154f9a;border:1px solid #94b8eb;font-size:10px;font-weight:800;line-height:1.3;vertical-align:middle; }
[data-theme="dark"] .chat-bot-badge { background:#233c5c;color:#b8daff;border-color:#5e89bc; }
.chat-message { display:flex;align-items:flex-start;flex-direction:column;margin:10px 0;gap:3px; }.chat-message b { font-size:11px;color:var(--muted); }.chat-message p { margin:0;max-width:88%;padding:9px 12px;border-radius:4px 12px 12px;background:var(--surface-soft);font-size:13px;line-height:1.5;white-space:pre-wrap;overflow-wrap:anywhere; }.chat-message time { font-size:9px;color:var(--muted); }.chat-message.own { align-items:flex-end; }.chat-message.own p { background:#0879f9;color:white;border-radius:12px 4px 12px 12px; }
.chat-status { margin:0;padding:0 12px;font-size:11px;color:#d34a56; }.chat-status:empty { display:none; }
.chat-compose { display:flex;gap:7px;padding:10px;border-top:1px solid var(--line); }.chat-compose input { min-width:0;flex:1;border:1px solid var(--line);border-radius:10px;padding:11px;background:var(--surface-soft);color:var(--text);font-size:16px; }.chat-compose button { border:0;border-radius:10px;width:44px;background:#0879f9;color:white; }
.chat-login { margin:10px;border:0;border-radius:10px;background:#0879f9;color:white;padding:13px;cursor:pointer; }
.telegram-contact { border:0;border-top:1px solid var(--line);background:var(--surface-soft);color:var(--text);padding:12px;text-align:left;cursor:pointer; }.telegram-contact small { float:right;color:var(--muted);font-size:10px; }
.telegram-header { border:0;background:transparent;color:var(--text);font-weight:700;font-size:11px;min-height:44px;cursor:pointer; }
@media(max-width:600px){.market-treemap{height:520px}.safe-chat{right:14px;bottom:calc(88px + env(safe-area-inset-bottom))}.chat-panel{width:min(350px,calc(100vw - 28px));height:min(500px,calc(100dvh - 195px));bottom:70px}.chat-launch{width:54px;height:54px}.stock-panel h3 small{display:block;margin-top:5px}.telegram-header{font-size:10px}.treemap-cell b{font-size:9px}.treemap-cell span{font-size:8px}}
