@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: #f4f6f8;
  --surface: #ffffff;
  --surface-soft: #f7f8fa;
  --ink: #15181d;
  --muted: #7a828d;
  --line: #e8eaed;
  --accent: #12c978;
  --accent-soft: #dff9ed;
  --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: #34df91;
  --accent-soft: #163d2d;
  --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 { font: inherit; }
button { color: inherit; }

.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;
}
.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::before {
  content: "";
  position: absolute;
  inset: 11px;
  border: 2px solid currentColor;
  border-radius: 50%;
  box-shadow: -7px -7px 0 -5px currentColor, 7px -7px 0 -5px currentColor, -7px 7px 0 -5px currentColor, 7px 7px 0 -5px currentColor;
}
[data-theme="dark"] #themeButton::before { box-shadow: 7px -4px 0 -1px var(--surface); border: 0; inset: 10px 12px 12px 10px; }
.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(59,130,246,.32), transparent 34%), linear-gradient(145deg, #10151f 0%, #172233 55%, #0d3228 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 { 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: #43e79a; box-shadow: 0 0 0 5px rgba(67,231,154,.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: #55e7a3; 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); }
.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; }
.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-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: 420px) {
  .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: 78%; grid-template-columns: none; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin-right: -16px; padding-right: 16px; }
  .sponsor-grid::-webkit-scrollbar { display: none; }
  .sponsor-card { min-height: 120px; scroll-snap-align: start; }
  .headline-scroll { grid-auto-columns: 84vw; }
  .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-x: auto; }
  .coin-table-head, .coin-row { min-width: 590px; }
  .quote-grid { grid-template-columns: 1fr; }
  .cap-table { overflow-x: auto; }
  .cap-head, .cap-row { min-width: 620px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
