:root {
  color-scheme: light;
  --paper: #f4f1e9;
  --paper-2: #ebe7dc;
  --card: #fffdf7;
  --ink: #132522;
  --muted: #68736f;
  --line: rgba(19, 37, 34, .11);
  --green: #123c36;
  --green-2: #1e5a4f;
  --lime: #b9ef6f;
  --lime-soft: #e6f7c9;
  --blue: #476fe8;
  --blue-soft: #e7edff;
  --amber: #d88632;
  --amber-soft: #fff0d9;
  --red: #c34e4e;
  --red-soft: #fee7e4;
  --shadow: 0 12px 38px rgba(18, 46, 41, .09);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  font-family: Pretendard, "Apple SD Gothic Neo", "Noto Sans KR", Inter, system-ui, sans-serif;
}

* { box-sizing: border-box; }

.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }

html { background: var(--paper); color: var(--ink); scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 92% 1%, rgba(185, 239, 111, .22), transparent 22rem),
    var(--paper);
  -webkit-font-smoothing: antialiased;
}

button, input, select { font: inherit; }
button { color: inherit; }
button, [role="button"] { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid rgba(71, 111, 232, .28);
  outline-offset: 2px;
}

.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

.splash {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 36px;
  color: #f8f6ef;
  background:
    radial-gradient(circle at 75% 20%, rgba(185, 239, 111, .16), transparent 15rem),
    #102e2b;
  transition: opacity .35s ease, visibility .35s ease;
}

.splash.exit { opacity: 0; visibility: hidden; }
.splash-mark { display: flex; align-items: end; gap: 5px; height: 42px; margin-bottom: 28px; }
.splash-mark span { width: 9px; border-radius: 3px 3px 0 0; background: var(--lime); animation: rise .7s ease both; }
.splash-mark span:nth-child(1) { height: 16px; }
.splash-mark span:nth-child(2) { height: 28px; animation-delay: .08s; }
.splash-mark span:nth-child(3) { height: 42px; animation-delay: .16s; }
.splash p { margin: 0 0 10px; color: var(--lime); font-size: 12px; font-weight: 800; letter-spacing: .16em; }
.splash h1 { margin: 0; font-size: clamp(31px, 9vw, 48px); line-height: 1.18; letter-spacing: -.05em; }
.splash-progress { width: 100%; height: 3px; margin-top: 52px; overflow: hidden; border-radius: 99px; background: rgba(255,255,255,.14); }
.splash-progress i { display: block; width: 55%; height: 100%; border-radius: inherit; background: var(--lime); animation: loading 1.15s ease-in-out infinite alternate; }

.app-shell { width: min(100%, 840px); min-height: 100vh; margin: 0 auto; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: calc(66px + var(--safe-top));
  padding: calc(10px + var(--safe-top)) 18px 10px;
  background: rgba(244, 241, 233, .88);
  border-bottom: 1px solid rgba(19,37,34,.06);
  backdrop-filter: blur(18px) saturate(140%);
}

.brand { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0; border: 0; background: transparent; text-align: left; cursor: pointer; }
.brand-mark { display: flex; align-items: end; gap: 3px; width: 31px; height: 31px; padding: 6px; border-radius: 9px; background: var(--green); }
.brand-mark i { flex: 1; border-radius: 2px 2px 0 0; background: var(--lime); }
.brand-mark i:nth-child(1) { height: 7px; }
.brand-mark i:nth-child(2) { height: 12px; }
.brand-mark i:nth-child(3) { height: 18px; }
.brand span:last-child { display: flex; flex-direction: column; }
.brand b { font-size: 15px; line-height: 1.05; letter-spacing: -.02em; }
.brand small { margin-top: 4px; color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .15em; }

.freshness {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,253,247,.65);
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}
.freshness > i { width: 7px; height: 7px; border-radius: 50%; background: #65a853; box-shadow: 0 0 0 3px rgba(101,168,83,.12); }
.freshness[data-state="stale"] > i { background: var(--amber); box-shadow: 0 0 0 3px rgba(230,139,41,.14); }
.freshness[data-state="error"] > i { background: var(--red); box-shadow: 0 0 0 3px rgba(202,73,73,.13); }
.freshness[data-state="checking"] > i { animation: freshness-pulse 1s ease-in-out infinite alternate; }
.header-actions { display: flex; align-items: center; gap: 6px; min-width: 0; }
.top-settings-button { display: grid; place-items: center; flex: 0 0 42px; width: 42px; height: 42px; padding: 0; border: 1px solid var(--line); border-radius: 14px; color: var(--muted); background: rgba(255,253,247,.7); cursor: pointer; }
.top-settings-button svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.top-settings-button.active { color: #fff; background: var(--green); }

.page-root { min-height: calc(100vh - 142px); padding: 18px 16px calc(102px + var(--safe-bottom)); }
.page { width: 100%; min-width: 0; max-width: 100%; animation: page-in .28s ease both; }

.page-kicker { margin: 0 0 7px; color: var(--green-2); font-size: 11px; font-weight: 850; letter-spacing: .12em; }
.page-title { margin: 0; font-size: clamp(27px, 8vw, 42px); line-height: 1.15; letter-spacing: -.055em; }
.page-description { max-width: 36rem; margin: 10px 0 0; color: var(--muted); font-size: 13px; line-height: 1.65; }

.hero {
  position: relative;
  overflow: hidden;
  padding: 25px 22px 21px;
  border-radius: 25px;
  color: #f9f8f1;
  background:
    radial-gradient(circle at 100% 0, rgba(185,239,111,.26), transparent 14rem),
    linear-gradient(145deg, #153d37, #0f2b28);
  box-shadow: var(--shadow);
}
.hero::after { content: ""; position: absolute; right: -50px; bottom: -80px; width: 190px; height: 190px; border: 1px solid rgba(255,255,255,.1); border-radius: 50%; box-shadow: 0 0 0 25px rgba(255,255,255,.025), 0 0 0 55px rgba(255,255,255,.02); }
.hero-kicker { display: flex; align-items: center; gap: 7px; margin: 0 0 14px; color: var(--lime); font-size: 10px; font-weight: 850; letter-spacing: .12em; }
.hero-kicker i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.hero h1 { max-width: 530px; margin: 0; font-size: clamp(26px, 7.7vw, 44px); line-height: 1.22; letter-spacing: -.055em; }
.hero h1 em { color: var(--lime); font-style: normal; }
.hero-note { position: relative; z-index: 1; margin: 11px 0 19px; color: rgba(255,255,255,.65); font-size: 12px; line-height: 1.55; }
.hero-stats { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.hero-stat { padding: 12px 10px; border: 1px solid rgba(255,255,255,.1); border-radius: 14px; background: rgba(255,255,255,.065); }
.hero-stat b { display: block; color: #fff; font-size: 22px; letter-spacing: -.04em; }
.hero-stat span { display: block; margin-top: 3px; color: rgba(255,255,255,.58); font-size: 9px; line-height: 1.3; }

.market-selector-dock {
  position: sticky;
  top: calc(66px + var(--safe-top));
  z-index: 49;
  padding: 8px 16px 5px;
  background: rgba(244, 241, 233, .9);
  border-bottom: 1px solid rgba(19,37,34,.045);
  backdrop-filter: blur(18px) saturate(140%);
}
.market-selector { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 7px; margin: 0; padding: 6px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,253,247,.86); box-shadow: 0 5px 18px rgba(18,46,41,.035); }
.market-option { display: flex; align-items: center; gap: 9px; min-width: 0; min-height: 50px; padding: 8px 10px; border: 1px solid transparent; border-radius: 13px; color: var(--muted); text-decoration: none; }
.market-option.active { border-color: rgba(20,75,66,.12); color: #fff; background: var(--green); box-shadow: 0 4px 12px rgba(20,75,66,.14); }
.market-flag { display: block; flex: 0 0 30px; width: 30px; height: 30px; border-radius: 10px; object-fit: cover; background: #fff; box-shadow: inset 0 0 0 1px rgba(18,46,41,.08); }
.market-option > span:last-child { min-width: 0; }
.market-option b, .market-option small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.market-option b { font-size: 12px; }
.market-option small { margin-top: 2px; color: inherit; font-size: 7px; font-weight: 750; opacity: .72; }
.market-option:not(.active):hover { border-color: var(--line); background: #f4f1e9; }

.section { margin-top: 27px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.section-head h2 { margin: 0; font-size: 19px; letter-spacing: -.04em; }
.section-head p { margin: 5px 0 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.text-link { display: inline-flex; align-items: center; min-height: 44px; padding: 7px 0; border: 0; background: transparent; color: var(--green-2); font-size: 11px; font-weight: 800; cursor: pointer; }

.cluster-rail { display: grid; grid-auto-columns: minmax(250px, 82%); grid-auto-flow: column; gap: 11px; overflow-x: auto; overscroll-behavior-x: contain; padding: 2px 1px 10px; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.cluster-rail::-webkit-scrollbar { display: none; }
.cluster-card {
  scroll-snap-align: start;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 15px;
  min-width: 0;
  min-height: 164px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 21px;
  background: var(--card);
  box-shadow: 0 6px 24px rgba(18,46,41,.05);
  cursor: pointer;
  text-align: left;
}
.cluster-card:active { transform: scale(.99); }
.cluster-rank { color: var(--green-2); font-size: 9px; font-weight: 850; letter-spacing: .1em; }
.cluster-card h3 { margin: 5px 0 8px; font-size: 18px; line-height: 1.25; letter-spacing: -.04em; }
.cluster-cycle { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border-radius: 999px; color: var(--green); background: var(--lime-soft); font-size: 9px; font-weight: 800; }
.cluster-cycle::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #67a848; }
.cluster-metrics { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 9px; margin-top: 14px; }
.cluster-metric span { display: block; color: var(--muted); font-size: 9px; }
.cluster-metric b { display: block; margin-top: 2px; font-size: 13px; letter-spacing: -.02em; }
.score-orb { --score: 0; display: grid; place-items: center; width: 65px; height: 65px; border-radius: 50%; background: conic-gradient(var(--lime) calc(var(--score) * 1%), rgba(18,60,54,.1) 0); }
.score-orb > span { display: grid; place-items: center; width: 51px; height: 51px; border-radius: 50%; background: var(--card); }
.score-orb b { font-size: 20px; letter-spacing: -.05em; }
.score-orb small { display: block; margin-top: -3px; color: var(--muted); font-size: 7px; font-weight: 800; }

.company-list { display: grid; width: 100%; min-width: 0; max-width: 100%; gap: 10px; }
.company-card { position: relative; width: 100%; min-width: 0; max-width: 100%; overflow: hidden; padding: 16px; border: 1px solid var(--line); border-radius: 20px; background: var(--card); box-shadow: 0 5px 20px rgba(18,46,41,.045); text-align: left; cursor: pointer; }
.weekly-signal-card.buy { border-color: rgba(24,112,80,.24); box-shadow: 0 7px 22px rgba(24,112,80,.07); }
.weekly-signal-card.sell { border-color: rgba(182,71,71,.24); box-shadow: 0 7px 22px rgba(182,71,71,.065); }
.weekly-signal-card.watch { border-color: rgba(70,91,86,.16); box-shadow: 0 7px 22px rgba(18,46,41,.045); }
.company-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.company-identity { min-width: 0; }
.company-identity p { margin: 0 0 4px; color: var(--muted); font-size: 9px; font-weight: 750; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.company-identity h3 { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 17px; letter-spacing: -.04em; }
.company-identity h3 small { color: var(--muted); font-size: 9px; font-weight: 650; letter-spacing: 0; }
.company-score { text-align: right; }
.company-score b { display: block; font-size: 19px; line-height: 1; }
.company-score span { color: var(--muted); font-size: 8px; font-weight: 750; }
.company-score.unavailable { max-width: 92px; }
.company-score.unavailable b { color: var(--muted); }
.company-score.unavailable span { display: block; margin-top: 3px; line-height: 1.25; }
.weekly-signal-score.buy b,
.weekly-signal-score.buy span:first-child { color: var(--green-2); }
.weekly-signal-score.sell b,
.weekly-signal-score.sell span:first-child { color: #b64747; }
.weekly-signal-score.watch b,
.weekly-signal-score.watch span:first-child { color: var(--green); }
.company-live-quote { display: flex; align-items: baseline; gap: 8px; min-height: 34px; margin-top: 10px; padding: 8px 10px; border: 1px solid rgba(18,60,54,.08); border-radius: 11px; background: #f6f5ef; }
.company-live-quote strong { color: var(--ink); font-size: 15px; line-height: 1; letter-spacing: -.025em; white-space: nowrap; }
.company-live-quote b { font-size: 10px; line-height: 1; white-space: nowrap; }
.company-live-quote > span { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; color: var(--muted); font-size: 8px; font-weight: 800; white-space: nowrap; }
.company-live-quote > span i { width: 5px; height: 5px; border-radius: 50%; background: var(--muted); }
.company-live-quote.live > span i { background: var(--green-2); box-shadow: 0 0 0 3px rgba(23,114,79,.1); }
.company-live-quote .unavailable-rate { color: var(--muted); font-weight: 700; }
.company-live-quote.unavailable { align-items: center; min-height: 30px; padding-block: 7px; border-style: dashed; }
.company-live-quote.unavailable > span { margin-left: 0; }
.signal-chip { display: inline-flex; align-items: center; gap: 5px; min-height: 23px; padding: 5px 8px; border-radius: 999px; font-size: 9px; font-weight: 850; white-space: nowrap; }
.signal-chip::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.signal-chip.buy { color: #16513f; background: #dff6cb; }
.signal-chip.wait { color: #7f551e; background: var(--amber-soft); }
.signal-chip.watch { color: #365ebd; background: var(--blue-soft); }
.signal-chip.block { color: #9a3939; background: var(--red-soft); }
.signal-chip.research { color: #666f6b; background: #edece7; }
.company-path { display: flex; align-items: center; gap: 5px; margin-top: 11px; color: var(--muted); font-size: 9px; white-space: nowrap; overflow: hidden; }
.company-path b { max-width: 42%; overflow: hidden; color: var(--ink); text-overflow: ellipsis; }
.company-path i { color: #a9afac; font-style: normal; }
.weekly-signal-path b { flex: 0 0 auto; max-width: none; }
.weekly-signal-card.buy .weekly-signal-path b { color: var(--green-2); }
.weekly-signal-card.sell .weekly-signal-path b { color: #b64747; }
.company-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-top: 13px; }
.company-metric { min-width: 0; padding: 9px; border-radius: 12px; background: #f2f0e9; }
.company-metric span { display: block; color: var(--muted); font-size: 8px; line-height: 1.25; }
.company-metric b { display: block; margin-top: 3px; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.company-card-foot { display: grid; grid-template-columns: 1fr 96px; align-items: end; gap: 10px; margin-top: 13px; }
.weekly-signal-evidence { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 11px; padding-top: 10px; border-top: 1px dashed var(--line); color: var(--muted); font-size: 8px; line-height: 1.35; }
.weekly-signal-evidence b { flex: 0 0 auto; color: var(--ink); font-size: 8px; }
.signal-recommendation-guide { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 7px; margin: 10px 0; }
.signal-customer-amount-note { grid-column: 1/-1; margin: 0; padding: 8px 11px; border-radius: 10px; background: rgba(18,60,54,.07); color: var(--green-2); font-size: 9px; font-weight: 850; }
.signal-recommendation-guide > div { min-width: 0; padding: 10px 11px; border: 1px solid rgba(18,60,54,.08); border-radius: 12px; background: #f5f3ec; }
.signal-recommendation-guide b,
.signal-recommendation-guide span { display: block; }
.signal-recommendation-guide b { color: var(--green-2); font-size: 8px; }
.signal-recommendation-guide span { margin-top: 3px; color: var(--muted); font-size: 8px; line-height: 1.45; }
.recommendation-signal-evidence { align-items: flex-start; }
.recommendation-signal-evidence b { max-width: 56%; text-align: right; white-space: normal; }
.weekly-consensus-hero-card { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-top: 18px; padding: 18px; border: 1px solid rgba(22,81,63,.18); border-radius: 24px; background: linear-gradient(135deg, #123c36, #0f493a); color: #f7fbef; box-shadow: 0 12px 32px rgba(18,46,41,.12); }
.weekly-consensus-hero-card span { display: block; color: #a9f46a; font-size: 9px; font-weight: 900; letter-spacing: .14em; }
.weekly-consensus-hero-card h2 { margin: 7px 0 0; font-size: 22px; letter-spacing: -.05em; }
.weekly-consensus-hero-card p { margin: 8px 0 0; max-width: 42rem; color: rgba(247,251,239,.76); font-size: 10px; line-height: 1.65; }
.weekly-consensus-hero-card > b { flex: 0 0 auto; padding: 6px 9px; border-radius: 999px; background: rgba(255,255,255,.12); color: #dff6cb; font-size: 10px; }
.weekly-consensus-summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 9px; margin-top: 12px; }
.weekly-consensus-summary-card { min-width: 0; padding: 13px; border: 1px solid var(--line); border-radius: 17px; background: var(--card); }
.weekly-consensus-summary-card span { display: block; color: var(--muted); font-size: 8px; font-weight: 850; }
.weekly-consensus-summary-card b { display: block; margin-top: 5px; font-size: 18px; letter-spacing: -.04em; }
.weekly-consensus-summary-card p { margin: 3px 0 0; color: var(--muted); font-size: 8px; line-height: 1.35; }
.weekly-consensus-filter { margin-top: 14px; }
.weekly-consensus-candidate-section { margin-top: 22px; }
.weekly-consensus-card.buy { border-color: rgba(24,112,80,.28); }
.weekly-consensus-card.sell { border-color: rgba(182,71,71,.24); }
.weekly-consensus-metrics { grid-template-columns: repeat(3, 1fr); }
.weekly-consensus-votes { margin-top: 11px; padding: 11px; border: 1px solid rgba(18,60,54,.08); border-radius: 14px; background: #f8f7f1; }
.weekly-consensus-votes > span { display: block; color: var(--green-2); font-size: 8px; font-weight: 900; letter-spacing: .08em; }
.weekly-consensus-votes ul { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 5px 9px; margin: 8px 0 0; padding: 0; list-style: none; }
.weekly-consensus-votes li { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 7px; color: var(--ink); font-size: 8px; line-height: 1.4; }
.weekly-consensus-votes li b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.weekly-consensus-votes li span { flex: 0 0 auto; color: var(--muted); }
.weekly-consensus-refresh-button { width: 100%; margin-top: 14px; }
.gate-line { display: grid; grid-template-columns: 55px 1fr 30px; align-items: center; gap: 6px; margin-top: 4px; color: var(--muted); font-size: 8px; }
.gate-line i { display: block; height: 4px; overflow: hidden; border-radius: 99px; background: #e3e2dc; }
.gate-line i::before { content: ""; display: block; width: calc(var(--value) * 1%); height: 100%; border-radius: inherit; background: var(--green-2); }
.gate-line.timing { margin-top: 7px; padding-top: 5px; border-top: 1px dashed var(--line); }
.gate-line.timing i::before { background: var(--amber); }
.gate-line.missing { opacity: .62; }
.structure-unavailable-note { min-height: 29px; color: var(--muted); font-size: 8px; line-height: 1.45; }
.mini-chart { width: 96px; height: 46px; }
.mini-chart path.area { fill: rgba(30,90,79,.09); }
.mini-chart polyline.line { fill: none; stroke: var(--green-2); stroke-width: 2; vector-effect: non-scaling-stroke; }
.mini-chart circle.signal-marker.buy { fill: #fff; stroke: var(--green-2); stroke-width: 2; vector-effect: non-scaling-stroke; }

.filter-bar { position: sticky; top: calc(65px + var(--safe-top)); z-index: 20; display: flex; gap: 7px; margin: 16px -16px 12px; padding: 9px 16px; overflow-x: auto; background: rgba(244,241,233,.92); backdrop-filter: blur(12px); scrollbar-width: none; }
.filter-bar::-webkit-scrollbar { display: none; }
.filter-chip { flex: 0 0 auto; min-height: 44px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,253,247,.7); color: var(--muted); font-size: 10px; font-weight: 750; cursor: pointer; }
.filter-chip.active { border-color: var(--green); color: #fff; background: var(--green); }

.search-box { position: relative; margin-top: 17px; }
.search-box svg { position: absolute; top: 50%; left: 14px; width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 1.8; transform: translateY(-50%); }
.search-box input { width: 100%; min-height: 48px; padding: 12px 14px 12px 42px; border: 1px solid var(--line); border-radius: 15px; background: var(--card); color: var(--ink); font-size: 13px; }
.leader-search-form { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; }
.leader-search-form input { min-width: 0; padding: 12px 14px; }
.leader-search-form button { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-width: 76px; min-height: 48px; padding: 10px 12px; border: 1px solid var(--green); border-radius: 15px; color: #fff; background: var(--green); font-size: 11px; font-weight: 850; cursor: pointer; }
.leader-search-form button svg { position: static; width: 16px; height: 16px; stroke: currentColor; transform: none; }

.atlas-list { display: grid; gap: 8px; }
.atlas-row { display: grid; grid-template-columns: 30px minmax(0,1fr) auto; align-items: center; gap: 10px; width: 100%; min-height: 70px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); text-align: left; cursor: pointer; }
.atlas-row[role="button"] { cursor: pointer; }
.atlas-row[role="button"]:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.atlas-row[role="button"]:active { transform: scale(.995); }
.atlas-rank { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; color: var(--green); background: var(--lime-soft); font-size: 10px; font-weight: 850; }
.atlas-row h3 { margin: 0; font-size: 14px; letter-spacing: -.03em; }
.atlas-row p { margin: 5px 0 0; color: var(--muted); font-size: 9px; }
.atlas-score { min-width: 45px; text-align: right; }
.atlas-score b { display: block; font-size: 17px; }
.atlas-score span { color: var(--muted); font-size: 8px; }

.insight-card { padding: 17px; border: 1px solid var(--line); border-radius: 20px; background: var(--card); }
.insight-card + .insight-card { margin-top: 10px; }
.insight-card h3 { margin: 0; font-size: 15px; letter-spacing: -.03em; }
.insight-card p { margin: 7px 0 0; color: var(--muted); font-size: 11px; line-height: 1.65; }
.metric-board { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 13px; }
.metric-tile { padding: 13px; border-radius: 15px; background: #f1efe8; }
.metric-tile span { color: var(--muted); font-size: 9px; }
.metric-tile b { display: block; margin-top: 4px; font-size: 18px; letter-spacing: -.04em; }
.metric-tile small { display: block; margin-top: 3px; color: var(--muted); font-size: 8px; }
.metric-tile.unavailable b { color: var(--muted); font-size: 12px; line-height: 1.35; letter-spacing: -.02em; }

.empty-state { padding: 34px 18px; border: 1px dashed rgba(19,37,34,.18); border-radius: 20px; text-align: center; }
.empty-state h3 { margin: 0; font-size: 16px; }
.empty-state p { margin: 8px auto 0; max-width: 25rem; color: var(--muted); font-size: 11px; line-height: 1.6; }

.news-section { margin-right: 0; margin-left: 0; padding: 0; overflow: visible; border-radius: 0; color: var(--ink); background: transparent; box-shadow: none; }
.news-section .section-head { align-items: flex-start; }
.news-section .section-head h2 { color: var(--ink); }
.news-section .section-head p { color: var(--muted); }
.live-news-panel { min-width: 0; }
.news-live-status { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 9px; min-width: 0; min-height: 46px; margin-bottom: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); box-shadow: 0 5px 20px rgba(18,46,41,.045); }
.news-live-label { display: inline-flex; align-items: center; gap: 6px; color: #f1c76b; font-size: 9px; font-weight: 900; white-space: nowrap; }
.news-live-label i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 4px rgba(241,199,107,.08); }
.news-live-status.live .news-live-label { color: var(--green-2); }
.news-live-status.live .news-live-label i { animation: news-pulse 1.8s ease-out infinite; }
.news-live-status.error .news-live-label { color: var(--red); }
.news-live-timing { min-width: 0; overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.news-live-status button { min-height: 44px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 9px; color: var(--green); background: #f2f0e9; font-size: 8px; font-weight: 800; cursor: pointer; }
.news-live-status button:disabled { cursor: default; opacity: .5; }
.news-list { display: grid; min-width: 0; gap: 10px; }
.news-card { display: flex; flex-direction: column; width: 100%; min-width: 0; max-width: 100%; padding: 16px; overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: var(--card); box-shadow: 0 5px 20px rgba(18,46,41,.045); }
.news-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; color: var(--muted); font-size: 8px; line-height: 1.4; }
.news-source { color: var(--ink); font-weight: 800; }
.news-category, .review-chip { display: inline-flex; align-items: center; min-height: 21px; padding: 4px 7px; border-radius: 999px; font-weight: 850; }
.news-category { color: var(--green-2); background: var(--lime-soft); }
.review-chip { color: var(--blue); background: var(--blue-soft); }
.review-chip.verified { color: #356b2e; background: var(--lime-soft); }
.review-chip.pending { color: #8a5a20; background: var(--amber-soft); }
.review-chip.source { color: var(--blue); background: var(--blue-soft); }
.news-card h3 { display: -webkit-box; margin: 11px 0 0; overflow: hidden; color: var(--ink); font-size: 15px; line-height: 1.45; letter-spacing: -.025em; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.news-card > p { display: -webkit-box; margin: 8px 0 0; overflow: hidden; color: var(--muted); font-size: 10px; line-height: 1.7; -webkit-box-orient: vertical; -webkit-line-clamp: 5; }
.keyword-row { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 11px; }
.keyword { max-width: 100%; padding: 4px 6px; overflow: hidden; border-radius: 7px; color: var(--muted); background: #f2f0e9; font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.source-link { display: inline-flex; align-items: center; align-self: flex-start; min-height: 44px; margin-top: auto; padding-top: 13px; color: var(--green-2); font-size: 9px; font-weight: 850; text-decoration: none; }
.source-link:hover { text-decoration: underline; }
.news-section .empty-state { border-color: var(--line); background: var(--card); }
.news-section .empty-state h3 { color: var(--ink); }
.news-section .empty-state p { color: var(--muted); }

.bottom-nav { position: fixed; right: 0; bottom: 0; left: 0; z-index: 60; display: grid; grid-template-columns: repeat(5, 1fr); width: min(100%, 840px); min-height: calc(66px + var(--safe-bottom)); margin: 0 auto; padding: 7px 8px var(--safe-bottom); border-top: 1px solid rgba(19,37,34,.09); background: rgba(255,253,247,.94); box-shadow: 0 -10px 35px rgba(18,46,41,.07); backdrop-filter: blur(18px) saturate(140%); }
.bottom-nav button { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border: 0; background: transparent; color: #8b9490; font-size: 9px; font-weight: 750; cursor: pointer; }
.bottom-nav svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.bottom-nav button.active { color: var(--green); }
.bottom-nav button.active::before { content: ""; position: absolute; top: 0; width: 18px; height: 3px; border-radius: 99px; background: var(--lime); }
.bottom-nav button span { white-space: nowrap; }

.company-search-list, .selection-list { display: grid; gap: 7px; margin-top: 10px; }
.company-search-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 7px; min-width: 0; padding: 7px; border: 1px solid var(--line); border-radius: 15px; background: var(--card); }
.company-search-row > button:first-child, .selection-row { display: flex; flex-direction: column; justify-content: center; min-width: 0; min-height: 48px; padding: 8px 10px; border: 0; border-radius: 10px; background: transparent; text-align: left; cursor: pointer; }
.company-search-row b, .selection-row b { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.company-search-row span, .selection-row span { overflow: hidden; margin-top: 4px; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.compact-action { min-width: 70px; min-height: 44px; padding: 7px 9px; border: 1px solid var(--green); border-radius: 11px; color: var(--green); background: #fff; font-size: 9px; font-weight: 850; cursor: pointer; }
.compact-action.active { border-color: var(--line); color: var(--muted); background: #f0efe9; }
.submitted-search-results { margin-top: 16px; padding: 13px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,253,247,.58); }
.watch-company-shell { position: relative; min-width: 0; padding-bottom: 43px; border-radius: 20px; background: var(--card); }
.watch-company-shell .company-card { height: 100%; border-bottom-right-radius: 8px; border-bottom-left-radius: 8px; }
.watch-remove-button { position: absolute; right: 10px; bottom: 7px; min-height: 32px; padding: 5px 10px; border: 0; border-radius: 9px; color: var(--red); background: var(--red-soft); font-size: 9px; font-weight: 800; cursor: pointer; }

.finance-card { padding: 16px; border: 1px solid var(--line); border-radius: 20px; background: var(--card); box-shadow: 0 5px 20px rgba(18,46,41,.04); }
.finance-summary { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; margin-top: 18px; }
.finance-summary > div { min-width: 0; padding: 13px 11px; border: 1px solid var(--line); border-radius: 15px; background: var(--card); }
.finance-summary span, .finance-summary small { display: block; color: var(--muted); font-size: 8px; line-height: 1.4; }
.finance-summary b { display: block; overflow: hidden; margin: 5px 0 3px; font-size: 15px; letter-spacing: -.035em; text-overflow: ellipsis; white-space: nowrap; }
.inline-finance-form, .paper-cash-form { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; }
.paper-cash-form { grid-template-columns: minmax(0,1fr) auto auto; }
.inline-finance-form label, .paper-cash-form label, .holding-form label, .calculator-form label { display: grid; gap: 5px; min-width: 0; }
.inline-finance-form label span, .paper-cash-form label span, .holding-form label span, .calculator-form label span { color: var(--muted); font-size: 9px; font-weight: 750; }
.inline-finance-form input, .paper-cash-form input, .holding-form input, .holding-form select, .calculator-form input, .calculator-form select { width: 100%; min-width: 0; min-height: 44px; padding: 10px 11px; border: 1px solid var(--line); border-radius: 11px; color: var(--ink); background: #f8f6f0; }
.inline-finance-form button, .paper-cash-form button, .holding-form button, .calculator-form button { min-height: 44px; padding: 9px 14px; border: 1px solid var(--green); border-radius: 11px; color: #fff; background: var(--green); font-size: 10px; font-weight: 850; cursor: pointer; }
.secondary-button { border-color: var(--line) !important; color: var(--green) !important; background: #f4f1e9 !important; }
.selection-row { width: 100%; border: 1px solid var(--line); background: #f8f6f0; }
.selection-row b small, .selected-company small, .holding-company-button small { color: var(--muted); font-size: 9px; }
.holding-form { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin-top: 13px; padding-top: 13px; border-top: 1px dashed var(--line); }
.selected-company { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px; border-radius: 12px; background: var(--lime-soft); }
.selected-company span { color: var(--green-2); font-size: 9px; font-weight: 800; }
.selected-company b { font-size: 13px; }
.holding-form > button, .holding-form-actions { grid-column: 1 / -1; }
.holding-form-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.paper-decision-status { grid-column: 1 / -1; display: grid; gap: 4px; padding: 10px 11px; border: 1px solid #ead7bc; border-radius: 12px; background: var(--amber-soft); }
.paper-decision-status.verified { border-color: #c8dfd1; background: #edf7ef; }
.paper-decision-status b { font-size: 10px; }
.paper-decision-status span { color: var(--muted); font-size: 8px; line-height: 1.5; }
.decision-verification-card { padding: 15px; border: 1px solid var(--line); border-radius: 18px; background: var(--card); }
.decision-receipt-status { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 12px; border-radius: 13px; background: #f2f0ea; }
.decision-receipt-status.verified { background: var(--lime-soft); }
.decision-receipt-status div { min-width: 0; }
.decision-receipt-status b, .decision-receipt-status span { display: block; }
.decision-receipt-status b { font-size: 11px; }
.decision-receipt-status span { margin-top: 3px; color: var(--muted); font-size: 8px; line-height: 1.45; }
.decision-receipt-status strong { flex: 0 0 auto; color: var(--green); font-size: 13px; }
.decision-contract-note { margin: 10px 0 0; color: var(--muted); font-size: 9px; line-height: 1.6; }
.decision-source-blocked { margin-top: 10px; padding: 10px 11px; border: 1px solid #ead7bc; border-radius: 11px; color: #745026; background: var(--amber-soft); font-size: 9px; line-height: 1.55; }
.decision-verification-form { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin-top: 13px; }
.decision-verification-form label { display: grid; gap: 5px; min-width: 0; }
.decision-verification-form label > span { color: var(--muted); font-size: 9px; font-weight: 750; }
.decision-verification-form input, .decision-verification-form select, .decision-verification-form textarea { width: 100%; min-width: 0; padding: 10px 11px; border: 1px solid var(--line); border-radius: 11px; color: var(--ink); background: #f8f6f0; font: inherit; font-size: 11px; }
.decision-verification-form input, .decision-verification-form select { min-height: 44px; }
.decision-verification-form textarea { min-height: 86px; resize: vertical; line-height: 1.55; }
.decision-verification-form .decision-wide, .decision-verification-form > button { grid-column: 1 / -1; }
.decision-verification-form > button { min-height: 46px; padding: 9px 14px; border: 1px solid var(--green); border-radius: 11px; color: #fff; background: var(--green); font-size: 10px; font-weight: 850; cursor: pointer; }
.decision-verification-form > button:disabled { cursor: not-allowed; opacity: .5; }
.holding-company-button { display: flex; flex-direction: column; min-width: 0; padding: 0; border: 0; background: transparent; text-align: left; cursor: pointer; }
.holding-company-button > span { overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.holding-company-button > b { margin-top: 5px; font-size: 16px; }
.holding-actions { display: flex; gap: 5px; }
.holding-actions button { min-height: 38px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); background: #f4f1e9; font-size: 8px; cursor: pointer; }
.holding-actions button:last-child { color: var(--red); }
.holding-metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 7px; margin-top: 10px; }
.holding-metrics > div { min-width: 0; padding: 9px; border-radius: 11px; background: #f3f1ea; }
.holding-metrics span { display: block; color: var(--muted); font-size: 8px; }
.holding-metrics b { display: block; overflow: hidden; margin-top: 4px; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.concentration-list { display: grid; gap: 10px; }
.concentration-list > div:not(.portfolio-risk-meta):not(.coverage-grid) { display: grid; grid-template-columns: minmax(90px,.9fr) minmax(80px,1.4fr) 48px; align-items: center; gap: 8px; }
.concentration-list > div > span { min-width: 0; }
.concentration-list > div > span b, .concentration-list > div > span small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.concentration-list > div > span b { font-size: 10px; }
.concentration-list > div > span small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.concentration-list > div > i { height: 6px; overflow: hidden; border-radius: 99px; background: #e0e1db; }
.concentration-list > div > i em { display: block; height: 100%; border-radius: inherit; background: var(--green-2); }
.concentration-list > div > strong { text-align: right; font-size: 9px; }
.concentration-list h3 { margin: 8px 0 0; font-size: 11px; }
.portfolio-risk-meta { display: flex !important; justify-content: space-between; gap: 8px; padding: 9px 10px; border-radius: 11px; background: var(--amber-soft); color: #745026; font-size: 8px; }
.coverage-grid { display: grid !important; grid-template-columns: repeat(3,minmax(0,1fr)) !important; gap: 6px !important; }
.coverage-grid span { padding: 7px; border-radius: 8px; background: #f2f0e9; color: var(--muted); font-size: 8px; }
.portfolio-market-risk { display: grid; gap: 10px; }
.portfolio-market-risk .finance-summary { margin: 0; }
.portfolio-market-risk .decision-source-blocked { margin-top: 0; }
.portfolio-market-risk .decision-source-blocked b { display: block; margin-bottom: 5px; font-size: 10px; }
.portfolio-market-risk .decision-source-blocked ul { margin: 0; padding-left: 17px; }
.portfolio-market-risk .decision-source-blocked li + li { margin-top: 3px; }
.portfolio-market-risk .coverage-grid { margin-top: 0; }
.muted-copy { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.6; }

.verification-tabs { display: flex; gap: 7px; margin-top: 16px; padding: 5px; border: 1px solid var(--line); border-radius: 15px; background: rgba(255,253,247,.7); }
.verification-tabs .filter-chip { flex: 1; }
.verification-panel { margin-top: 14px; }
.paper-quantity { text-align: right; }
.paper-quantity b, .paper-quantity span { display: block; }
.paper-quantity b { font-size: 13px; }
.paper-quantity span { margin-top: 4px; color: var(--muted); font-size: 8px; }
.finance-disclaimer { margin: 12px 0 0; color: var(--muted); font-size: 8px; line-height: 1.6; }
.paper-ledger { display: grid; gap: 7px; }
.paper-ledger article { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 9px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: #f8f6f0; }
.trade-side { padding: 5px 7px; border-radius: 8px; font-size: 8px; font-weight: 900; }
.trade-side.buy { color: #17724f; background: #dff6cb; }
.trade-side.sell { color: var(--red); background: var(--red-soft); }
.paper-ledger article div { min-width: 0; }
.paper-ledger article b, .paper-ledger article small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.paper-ledger article b { font-size: 10px; }
.paper-ledger article small { margin-top: 4px; color: var(--muted); font-size: 7px; }
.paper-ledger article strong { font-size: 9px; }
.paper-order-actions { display: grid; justify-items: end; gap: 5px; }
.paper-order-actions button { min-height: 28px; padding: 5px 8px; border: 1px solid #d9d6cd; border-radius: 8px; background: #fffdf7; color: var(--ink); font-size: 8px; font-weight: 800; }
.calculator-card { margin-top: 0; }
.calculator-card h2 { margin: 0; font-size: 20px; }
.calculator-form { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin-top: 16px; }
.calculator-form button { grid-column: 1 / -1; }
.calculator-check { display: flex !important; flex-direction: row; align-items: center; min-height: 44px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 11px; background: #f8f6f0; }
.calculator-check input { width: 18px; min-height: 18px; padding: 0; accent-color: var(--green); }
.calculator-result { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line); }
.calculator-result > div { padding: 11px; border-radius: 11px; background: #f2f0e9; }
.calculator-result span, .calculator-result b { display: block; }
.calculator-result span { color: var(--muted); font-size: 8px; }
.calculator-result b { margin-top: 5px; font-size: 13px; }
.calculator-result p { grid-column: 1 / -1; margin: 3px 0 0; color: var(--muted); font-size: 8px; line-height: 1.6; }
.empty-state.compact { min-height: auto; margin-top: 14px; padding: 18px; }
.nav-badge { position: absolute; top: 4px; left: calc(50% + 8px); min-width: 15px; height: 15px; padding: 0 4px; border: 2px solid var(--card); border-radius: 99px; color: #fff; background: var(--red); font-size: 8px; font-style: normal; line-height: 11px; text-align: center; }

dialog { color: var(--ink); }
dialog::backdrop { background: rgba(8,24,21,.5); backdrop-filter: blur(4px); }
.sheet-dialog { position: fixed; inset: auto 0 0; width: min(100%, 720px); max-width: none; max-height: 92vh; margin: auto; padding: 0; overflow: hidden; border: 0; border-radius: 26px 26px 0 0; background: var(--paper); box-shadow: 0 -20px 70px rgba(0,0,0,.25); }
.sheet-dialog[open] { animation: sheet-up .28s cubic-bezier(.2,.7,.2,1) both; }
.dialog-handle { width: 36px; height: 4px; margin: 9px auto 3px; border-radius: 99px; background: rgba(19,37,34,.18); }
.dialog-header { position: sticky; top: 0; z-index: 10; display: grid; grid-template-columns: 44px minmax(0,1fr) 44px; align-items: center; min-height: 64px; padding: 5px 12px 9px; border-bottom: 1px solid var(--line); background: rgba(244,241,233,.94); backdrop-filter: blur(12px); }
.dialog-header > div { min-width: 0; text-align: center; }
.dialog-header h2 { margin: 2px 0 0; overflow: hidden; font-size: 17px; letter-spacing: -.04em; text-overflow: ellipsis; white-space: nowrap; }
.dialog-eyebrow { margin: 0; color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .1em; }
.dialog-body { max-height: calc(92vh - 76px); padding: 16px 16px calc(28px + var(--safe-bottom)); overflow-y: auto; }
.icon-button { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,253,247,.72); cursor: pointer; }
.icon-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.star-button.active { color: var(--amber); background: var(--amber-soft); }
.star-button.active svg { fill: currentColor; }
.center-dialog { width: min(calc(100% - 30px), 470px); max-height: min(88vh, 760px); padding: 24px; overflow-y: auto; border: 0; border-radius: 22px; background: var(--card); box-shadow: var(--shadow); }
.center-dialog[open] { animation: pop-in .22s ease both; }
.dialog-close { position: absolute; top: 12px; right: 12px; }
.chart-dialog { position: fixed; inset: 0; width: min(100%, 840px); min-width: 0; max-width: none; height: 100%; max-height: none; margin: 0 auto; padding: 0; overflow: hidden; border: 0; background: var(--paper); }
.chart-dialog[open] { animation: pop-in .18s ease both; }
.chart-dialog-shell { display: flex; flex-direction: column; width: 100%; min-width: 0; max-width: 100%; height: 100%; overflow: hidden; }
.chart-dialog-header { z-index: 20; display: grid; grid-template-columns: 44px minmax(0,1fr) 44px; align-items: center; flex: 0 0 auto; min-width: 0; min-height: calc(64px + var(--safe-top)); padding: calc(8px + var(--safe-top)) 12px 8px; border-bottom: 1px solid rgba(255,255,255,.09); color: #f3f6fa; background: #091422; }
.chart-dialog-header > div { min-width: 0; text-align: center; }
.chart-dialog-header h2 { margin: 2px 0 0; overflow: hidden; font-size: 17px; letter-spacing: -.04em; text-overflow: ellipsis; white-space: nowrap; }
.chart-dialog-header .dialog-eyebrow { color: #92a1b6; }
.chart-dialog-header .icon-button { border-color: rgba(255,255,255,.14); color: #f3f6fa; background: rgba(255,255,255,.07); }
.chart-back-button svg { transform: rotate(180deg); }
.chart-dialog-body { flex: 1 1 auto; width: 100%; min-width: 0; min-height: 0; max-width: 100%; padding: 12px 12px calc(24px + var(--safe-bottom)); overflow-x: hidden; overflow-y: auto; }
.chart-company-picker, .chart-dialog-panel, .fullscreen-chart-content, .fullscreen-chart-evidence { width: 100%; min-width: 0; max-width: 100%; }
.chart-search-box { margin-top: 0; }
.chart-universe-status { min-height: 18px; margin: 7px 3px 0; color: var(--muted); font-size: 9px; line-height: 1.5; }
.chart-search-results { display: grid; width: 100%; min-width: 0; max-width: 100%; max-height: 248px; margin-top: 8px; overflow-x: hidden; overflow-y: auto; border: 1px solid var(--line); border-radius: 15px; background: var(--card); box-shadow: var(--shadow); }
.chart-search-results[hidden] { display: none; }
.chart-search-result { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 10px; width: 100%; min-width: 0; min-height: 44px; padding: 11px 12px; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; cursor: pointer; }
.chart-search-result:last-child { border-bottom: 0; }
.chart-search-result span { min-width: 0; }
.chart-search-result b, .chart-search-result small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chart-search-result b { font-size: 11px; }
.chart-search-result small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.chart-search-result em { color: var(--green-2); font-size: 10px; font-style: normal; font-weight: 850; }
.chart-search-empty { padding: 22px 12px; color: var(--muted); font-size: 10px; text-align: center; }
.chart-dialog-panel { margin-top: 10px; }
.fullscreen-chart-toolbar { position: sticky; top: 0; z-index: 8; padding: 6px 0; background: var(--paper); }
.fullscreen-chart-card { width: 100%; min-width: 0; max-width: 100%; padding: 10px; overflow: hidden; border-radius: 17px; background: #091422; }
.fullscreen-company-chart { display: block; width: 100%; min-width: 0; max-width: 100%; height: clamp(330px, 55vh, 520px); border-radius: 10px; background: #091422; touch-action: pan-y; }
.fullscreen-chart-evidence { margin-top: 14px; }
.fullscreen-chart-evidence > h3 { margin: 0 0 9px; font-size: 15px; }
.chart-dialog .source-row { min-width: 0; align-items: flex-start; }
.chart-dialog .source-row b { flex: 0 0 auto; }
.chart-dialog .source-row span { min-width: 0; overflow-wrap: anywhere; text-align: right; }

.detail-hero { padding: 20px; border-radius: 23px; color: #fff; background: var(--green); }
.detail-hero-head { display: flex; justify-content: space-between; gap: 14px; }
.detail-hero-head > :first-child { min-width: 0; }
.detail-hero h3 { margin: 8px 0 0; overflow-wrap: anywhere; font-size: 25px; letter-spacing: -.05em; }
.detail-hero p { margin: 8px 0 0; color: rgba(255,255,255,.66); font-size: 10px; line-height: 1.55; }
.detail-score { flex: 0 0 auto; text-align: right; }
.detail-score b { display: block; color: var(--lime); font-size: 31px; line-height: 1; }
.detail-score span { color: rgba(255,255,255,.55); font-size: 8px; }
.detail-score.unavailable { max-width: 105px; }
.detail-score.unavailable b { color: rgba(255,255,255,.72); }
.detail-score.unavailable span { display: block; margin-top: 4px; line-height: 1.3; }
.detail-path { margin-top: 16px; padding: 11px; border: 1px solid rgba(255,255,255,.1); border-radius: 14px; background: rgba(255,255,255,.06); color: rgba(255,255,255,.7); font-size: 9px; line-height: 1.5; }
.detail-section { margin-top: 23px; }
.detail-section > h3 { margin: 0 0 10px; font-size: 16px; letter-spacing: -.035em; }
.thesis-list, .risk-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.thesis-list li, .risk-list li { position: relative; padding: 11px 12px 11px 34px; border-radius: 13px; background: var(--card); font-size: 10px; line-height: 1.55; }
.thesis-list li::before { content: "✓"; position: absolute; top: 11px; left: 12px; color: var(--green-2); font-weight: 900; }
.risk-list li::before { content: "!"; position: absolute; top: 11px; left: 14px; color: var(--amber); font-weight: 900; }
.history-chart { width: 100%; min-height: 160px; padding: 12px; border: 1px solid var(--line); border-radius: 17px; background: var(--card); }
.history-chart svg { display: block; width: 100%; height: 130px; }
.history-chart path.area { fill: rgba(30,90,79,.08); }
.history-chart polyline.line { fill: none; stroke: var(--green-2); stroke-width: 2.2; vector-effect: non-scaling-stroke; }
.history-chart line { stroke: rgba(19,37,34,.08); stroke-width: 1; }
.history-chart-labels { display: flex; justify-content: space-between; color: var(--muted); font-size: 8px; }
.multitf-section { min-width: 0; overflow: hidden; }
.combined-signal { margin-bottom: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); }
.combined-signal > span { display: block; color: var(--muted); font-size: 8px; font-weight: 850; letter-spacing: .08em; }
.combined-signal > b { display: block; margin-top: 5px; font-size: 16px; letter-spacing: -.035em; }
.combined-signal > p { margin: 6px 0 0; color: var(--muted); font-size: 10px; }
.combined-signal > small { display: block; margin-top: 8px; color: var(--muted); font-size: 8px; line-height: 1.5; }
.combined-signal.positive { border-color: #b9dca3; background: #eff8e7; }
.combined-signal.positive > b { color: #176442; }
.combined-signal.negative { border-color: #edc4c4; background: #fff0ef; }
.combined-signal.negative > b { color: #a03b3b; }
.chart-toolbar { display: flex; align-items: stretch; gap: 8px; margin: 10px 0; padding-bottom: 3px; overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-width: thin; }
.chart-timeframe-group { display: flex; flex-wrap: wrap; gap: 5px; flex: 0 0 auto; min-width: max-content; padding: 5px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.34); }
.chart-timeframe-group > span { flex: 1 0 100%; padding: 0 3px; color: var(--muted); font-size: 8px; font-weight: 850; }
.chart-timeframe { min-width: 50px; min-height: 44px; padding: 0 9px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); background: var(--card); font-size: 10px; font-weight: 850; cursor: pointer; }
.chart-timeframe.active { border-color: var(--green); color: #fff; background: var(--green); }
.chart-timeframe:disabled { cursor: default; opacity: .36; }
.chart-zoom-controls { display: grid; grid-template-columns: repeat(6,minmax(38px,68px)); justify-content: end; gap: 6px; width: 100%; min-width: 0; max-width: 100%; margin: 0 0 8px; }
.chart-zoom-controls button { min-width: 0; min-height: 44px; padding: 0 8px; border: 1px solid rgba(255,255,255,.15); border-radius: 10px; color: #eef3f8; background: rgba(255,255,255,.08); font-size: 16px; font-weight: 850; cursor: pointer; }
.chart-zoom-controls .chart-zoom-reset, .chart-zoom-controls .chart-zoom-all, .chart-zoom-controls .chart-pan-button { font-size: 9px; }
.chart-zoom-controls .chart-pan-button { white-space: nowrap; }
.chart-zoom-controls button:disabled { cursor: default; opacity: .38; }
.chart-zoom-controls button:focus-visible { outline: 3px solid rgba(108,169,255,.5); outline-offset: 1px; }
.multitf-chart-card { position: relative; width: 100%; min-width: 0; overflow: hidden; padding: 10px; border-radius: 17px; background: #091422; cursor: zoom-in; }
.multitf-chart-card:focus-visible { outline: 3px solid rgba(71,111,232,.45); outline-offset: 3px; }
.chart-status-line { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; padding: 2px 3px 9px; color: #9eacc0; font-size: 8px; }
.chart-status-line span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chart-status-line b { flex: 0 0 auto; color: #e7edf5; font-weight: 750; }
.company-multitf-chart { display: block; width: 100%; max-width: 100%; height: 330px; border-radius: 10px; background: #091422; touch-action: pan-y; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 8px 13px; padding: 8px 3px 2px; font-size: 8px; font-weight: 800; }
.chart-legend .low { color: #ff7c87; }
.chart-legend .high { color: #6ca9ff; }
.chart-legend .technical { color: #f1cf62; }
.chart-legend .visible-indicators { flex-basis: 100%; color: #cbd5e1; font-weight: 700; line-height: 1.5; }
.chart-policy-note { margin: 6px 3px 2px; color: #8392a8; font-size: 8px; line-height: 1.45; }
.chart-expand-hint { display: block; margin: 7px 3px 1px; color: #c4cfdd; font-size: 8px; font-weight: 800; text-align: right; }
.technical-chart-panel { width: 100%; min-width: 0; margin: 10px 0; padding: 13px; overflow: hidden; border: 1px solid var(--line); border-radius: 17px; background: var(--card); }
.technical-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.technical-panel-head span { display: block; color: var(--muted); font-size: 8px; font-weight: 850; letter-spacing: .06em; }
.technical-panel-head h4 { margin: 4px 0 0; font-size: 14px; letter-spacing: -.03em; }
.technical-panel-head em { flex: 0 0 auto; padding: 5px 8px; border-radius: 999px; font-size: 8px; font-style: normal; font-weight: 850; }
.technical-panel-head em.personal { color: var(--green); background: var(--lime-soft); }
.technical-panel-head em.optimized { color: #55439b; background: #eee9ff; }
.technical-value-list { display: flex; gap: 6px; margin-top: 11px; padding-bottom: 3px; overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-width: thin; }
.technical-value { flex: 0 0 auto; min-width: 92px; max-width: 170px; padding: 8px 9px; border-radius: 11px; color: var(--ink); background: #f1efe8; font-size: 9px; white-space: nowrap; }
.technical-value b { display: block; margin-bottom: 4px; overflow: hidden; color: var(--green); font-size: 8px; text-overflow: ellipsis; }
.technical-value.disabled { opacity: .48; }
.technical-empty-selection { margin-top: 11px; padding: 14px; border: 1px dashed var(--line); border-radius: 12px; color: var(--muted); background: #f7f4ed; font-size: 9px; text-align: center; }
.technical-metrics { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 7px; margin-top: 10px; }
.technical-metrics span { min-width: 0; padding: 8px; border-radius: 10px; color: var(--muted); background: #f5f2eb; font-size: 8px; }
.technical-metrics b { display: block; margin-bottom: 3px; overflow: hidden; color: var(--ink); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.technical-history-note { margin: 9px 1px 0; color: var(--muted); font-size: 8px; line-height: 1.55; }
.technical-actions { display: grid; grid-template-columns: minmax(0,1fr); gap: 7px; margin-top: 10px; }
.technical-actions:has(.technical-personal-button) { grid-template-columns: minmax(0,1.35fr) minmax(0,1fr); }
.technical-optimize-button, .technical-personal-button { min-width: 0; min-height: 44px; padding: 9px 10px; border-radius: 12px; font-size: 10px; font-weight: 850; cursor: pointer; }
.technical-optimize-button { border: 1px solid var(--green); color: #fff; background: var(--green); }
.technical-personal-button { border: 1px solid var(--line); color: var(--green); background: #f4f1e9; }
.technical-optimize-button:disabled, .technical-personal-button:disabled { cursor: default; opacity: .46; }
.coord-events { margin-top: 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.coord-events summary { padding: 12px; color: var(--green-2); font-size: 10px; font-weight: 850; cursor: pointer; }
.coord-events > div { display: grid; gap: 6px; padding: 0 9px 9px; }
.coord-event { display: grid; grid-template-columns: 1fr auto; gap: 3px 8px; padding: 9px; border-radius: 10px; background: #f2f0e9; }
.coord-event b { font-size: 9px; }
.coord-event span { color: var(--muted); font-size: 8px; }
.coord-event small { grid-column: 1 / -1; color: var(--muted); font-size: 8px; }
.coord-event.buy b { color: #17724f; }
.coord-event.sell b { color: var(--red); }
.coord-event-empty { padding: 12px; color: var(--muted); font-size: 9px; text-align: center; }
.period-table { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; background: var(--card); }
.period-table table { width: 100%; border-collapse: collapse; font-size: 9px; white-space: nowrap; }
.period-table th, .period-table td { padding: 10px; border-bottom: 1px solid var(--line); text-align: right; }
.period-table th:first-child, .period-table td:first-child { text-align: left; }
.period-table th { color: var(--muted); font-weight: 750; }
.period-table tr:last-child td { border-bottom: 0; }
.positive { color: #17724f !important; }
.negative { color: var(--red) !important; }
.neutral { color: var(--muted) !important; }

.method-flow { display: grid; gap: 8px; margin-top: 15px; }
.method-step { display: grid; grid-template-columns: 32px 1fr; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.method-step b:first-child { display: grid; place-items: center; height: 32px; border-radius: 10px; color: var(--green); background: var(--lime-soft); font-size: 10px; }
.method-step h3 { margin: 0; font-size: 12px; }
.method-step p { margin: 4px 0 0; color: var(--muted); font-size: 9px; line-height: 1.5; }
.source-list { display: grid; gap: 7px; margin-top: 12px; }
.source-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 13px; background: var(--card); font-size: 10px; }
.source-row span { color: var(--muted); }
.warning-box { margin-top: 13px; padding: 13px; border: 1px solid #f0d5ae; border-radius: 14px; color: #745026; background: var(--amber-soft); font-size: 10px; line-height: 1.65; }
.freshness-dialog-title { margin: 0; padding-right: 34px; font-size: 21px; letter-spacing: -.04em; }
.freshness-dialog-description { margin: 8px 0 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
.freshness-group-title { margin: 18px 0 0; color: var(--green-2); font-size: 10px; letter-spacing: .04em; }
.freshness-group-title + .source-list { margin-top: 8px; }
.freshness-group-title + .source-list .source-row { align-items: flex-start; }
.freshness-group-title + .source-list .source-row b { flex: 0 0 auto; }
.freshness-group-title + .source-list .source-row span { min-width: 0; line-height: 1.45; text-align: right; overflow-wrap: anywhere; }
.freshness-actions { display: flex; justify-content: flex-end; margin-top: 14px; }
.freshness-actions button { min-width: 100px; min-height: 42px; padding: 0 16px; border: 0; border-radius: 13px; color: #fff; background: var(--green); font-size: 11px; font-weight: 800; cursor: pointer; }
.freshness-actions button:disabled { cursor: wait; opacity: .55; }

.chart-history-connection { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin: 10px 0 0; padding: 10px 12px; border: 1px solid #e9cfaa; border-radius: 13px; color: #8c5a1e; background: #fff5e7; font-size: 9px; line-height: 1.45; }
.chart-history-connection b { flex: 0 0 auto; font-size: 9px; }
.chart-history-connection span { min-width: 0; text-align: right; }
.chart-history-connection.connected { border-color: #b9d9cd; color: var(--green); background: #edf8f2; }
.settings-title { margin: 8px 0 0; font-size: 24px; letter-spacing: -.05em; }
.settings-subtitle { margin: 7px 0 0; font-size: 20px; letter-spacing: -.045em; }
.technical-settings-section { margin-top: 22px; }
.remote-server-card { margin-top: 16px; padding: 16px; border: 1px solid var(--line); border-radius: 20px; background: var(--card); box-shadow: 0 7px 25px rgba(18,46,41,.045); }
.remote-server-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.remote-server-card > header > div { min-width: 0; }
.remote-server-card > header span { color: var(--green-2); font-size: 8px; font-weight: 900; letter-spacing: .08em; }
.remote-server-card > header h2 { margin: 4px 0 0; font-size: 16px; letter-spacing: -.035em; }
.remote-server-card > header em { flex: 0 0 auto; padding: 6px 9px; border-radius: 99px; color: #865a21; background: #fff0d9; font-size: 8px; font-style: normal; font-weight: 900; }
.remote-server-card > header em.connected, .remote-server-card > header em.tested { color: var(--green); background: #e8f6ef; }
.remote-server-card > header em.error { color: var(--red); background: #fff0ed; }
.remote-server-card > header em.checking { color: #355c7d; background: #edf4fa; }
.remote-server-description { margin: 10px 0 0; color: var(--muted); font-size: 9px; line-height: 1.6; }
.remote-server-form { margin-top: 13px; }
.remote-server-form > label { display: block; }
.remote-server-form > label > span { display: block; color: var(--muted); font-size: 8px; font-weight: 800; }
.remote-server-form input { width: 100%; min-height: 46px; margin-top: 6px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; outline: 0; color: var(--ink); background: #f7f5ef; font: inherit; font-size: 11px; }
.remote-server-form input:focus { border-color: var(--green-2); box-shadow: 0 0 0 3px rgba(30,90,79,.12); }
.remote-server-form input:disabled { color: var(--muted); cursor: default; opacity: .72; }
.remote-server-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; margin-top: 9px; }
.remote-server-actions button { min-width: 0; min-height: 44px; padding: 7px 9px; border: 1px solid var(--green); border-radius: 11px; color: #fff; background: var(--green); font-size: 9px; font-weight: 850; cursor: pointer; }
.remote-server-actions button:first-child { color: var(--green); background: #eef5f1; }
.remote-server-actions button.danger-light { grid-column: 1 / -1; border-color: #edc4c4; color: var(--red); background: #fff5f3; }
.remote-server-actions button:disabled { cursor: default; opacity: .42; }
.remote-server-message { margin: 10px 0 0; padding: 9px 10px; border-radius: 10px; color: var(--muted); background: #f2f0e9; font-size: 9px; line-height: 1.5; }
.remote-server-message.connected, .remote-server-message.tested { color: var(--green); background: #edf8f2; }
.remote-server-message.error { color: var(--red); background: #fff2ef; }
.remote-server-evidence { display: grid; gap: 5px; margin-top: 10px; padding: 11px; border: 1px solid #dfe5df; border-radius: 12px; background: #f7faf7; }
.remote-server-evidence span { color: var(--muted); font-size: 8px; line-height: 1.45; }
.remote-server-evidence b { color: var(--ink); }
.remote-server-evidence small { margin-top: 2px; color: #7d8982; font-size: 7px; overflow-wrap: anywhere; }
.remote-server-fallback-note, .remote-server-web-note { margin: 10px 0 0; padding: 9px 10px; border-radius: 10px; color: #8c5a1e; background: #fff3e1; font-size: 8px; font-weight: 750; line-height: 1.5; }
.remote-server-fallback-note.connected { color: var(--green); background: #eaf7f0; }
.remote-server-web-note { color: var(--muted); background: #f1efe8; font-weight: 600; }
.technical-settings-form { margin-top: 18px; }
.technical-settings-grid { display: grid; gap: 10px; }
.technical-settings-card { min-width: 0; padding: 15px; border: 1px solid var(--line); border-radius: 18px; background: var(--card); box-shadow: 0 5px 20px rgba(18,46,41,.035); }
.technical-settings-card > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.technical-settings-card > header > div { min-width: 0; }
.technical-settings-card > header span { color: var(--green-2); font-size: 8px; font-weight: 900; letter-spacing: .08em; }
.technical-settings-card > header h3 { margin: 4px 0 0; font-size: 14px; letter-spacing: -.025em; }
.technical-switch { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; cursor: pointer; }
.technical-switch input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; }
.technical-switch i { position: relative; width: 36px; height: 22px; border-radius: 99px; background: #d9ddd8; transition: .18s ease; }
.technical-switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(0,0,0,.16); transition: .18s ease; }
.technical-switch input:checked + i { background: var(--green); }
.technical-switch input:checked + i::after { transform: translateX(14px); }
.technical-switch input:focus-visible + i { outline: 3px solid rgba(30,90,79,.24); outline-offset: 2px; }
.technical-switch b { color: var(--muted); font-size: 9px; }
.technical-field-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; margin-top: 13px; }
.technical-number-field { min-width: 0; padding: 8px 9px; border-radius: 11px; background: #f1efe8; }
.technical-number-field span { display: block; color: var(--muted); font-size: 8px; }
.technical-number-field input { width: 100%; min-width: 0; margin-top: 4px; padding: 4px 0; border: 0; outline: 0; color: var(--ink); background: transparent; font: inherit; font-size: 14px; font-weight: 850; }
.settings-save-bar { position: sticky; bottom: calc(68px + var(--safe-bottom)); z-index: 8; display: grid; grid-template-columns: minmax(0,.8fr) minmax(0,1.2fr); gap: 8px; margin-top: 14px; padding: 9px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,253,247,.94); box-shadow: var(--shadow); backdrop-filter: blur(12px); }
.settings-save-bar button { min-width: 0; min-height: 46px; border-radius: 12px; font-size: 10px; font-weight: 850; cursor: pointer; }
.settings-reset-button { border: 1px solid var(--line); color: var(--green); background: #f4f1e9; }
.settings-save-button { border: 1px solid var(--green); color: #fff; background: var(--green); }
.saved-optimization-card { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 14px; padding: 15px; border: 1px solid var(--line); border-radius: 18px; background: var(--card); }
.saved-optimization-card > div { min-width: 0; }
.saved-optimization-card span { color: var(--muted); font-size: 8px; }
.saved-optimization-card b { display: block; margin-top: 3px; font-size: 19px; }
.saved-optimization-card p { margin: 5px 0 0; color: var(--muted); font-size: 8px; line-height: 1.5; }
.saved-optimization-card button { flex: 0 0 auto; min-height: 44px; padding: 8px 10px; border: 1px solid #edc4c4; border-radius: 10px; color: var(--red); background: #fff5f3; font-size: 9px; font-weight: 850; cursor: pointer; }
.saved-optimization-card button:disabled { cursor: default; opacity: .4; }
.settings-policy-links { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 5px; margin: 18px 0 4px; padding: 10px 4px; color: var(--muted); font-size: 9px; line-height: 1.5; }
.settings-policy-links a { color: var(--green-2); font-weight: 800; text-decoration: underline; text-decoration-color: rgba(30,90,79,.28); text-underline-offset: 3px; }
.settings-policy-links a:focus-visible { border-radius: 4px; outline: 3px solid rgba(30,90,79,.2); outline-offset: 3px; }

.today-change-section { min-width: 0; }
.today-change-list { display: grid; gap: 8px; }
.today-change-row { display: grid; grid-template-columns: 64px minmax(0,1fr); gap: 10px; align-items: start; padding: 12px; border: 1px solid var(--line); border-left: 4px solid #9ca8a0; border-radius: 14px; background: var(--card); }
.today-change-row > span { padding-top: 2px; color: var(--muted); font-size: 8px; font-weight: 900; letter-spacing: -.01em; }
.today-change-row b { display: block; color: var(--ink); font-size: 11px; line-height: 1.4; }
.today-change-row p { margin: 4px 0 0; color: var(--muted); font-size: 9px; line-height: 1.55; }
.today-change-row.positive, .today-change-inline.positive { border-left-color: #2f8b64; }
.today-change-row.negative, .today-change-row.risk_up, .today-change-inline.negative, .today-change-inline.risk_up { border-left-color: var(--red); }
.today-change-row.risk_down, .today-change-inline.risk_down { border-left-color: #3e78b6; }
.today-change-empty { padding: 15px; border: 1px dashed #d3d4ce; border-radius: 15px; background: rgba(255,255,255,.42); }
.today-change-empty b { display: block; font-size: 12px; }
.today-change-empty p { margin: 5px 0 0; color: var(--muted); font-size: 9px; line-height: 1.55; }
.today-change-inline { min-width: 0; margin: 9px 0 1px; padding: 7px 9px; border-left: 3px solid #9ca8a0; border-radius: 0 9px 9px 0; background: #f4f2eb; text-align: left; }
.today-change-inline span { display: block; color: var(--green-2); font-size: 7px; font-weight: 900; }
.today-change-inline b { display: block; overflow: hidden; margin-top: 2px; color: var(--ink); font-size: 9px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }

.toast { position: fixed; right: 16px; bottom: calc(80px + var(--safe-bottom)); left: 16px; z-index: 200; width: fit-content; max-width: calc(100% - 32px); margin: auto; padding: 11px 15px; border-radius: 13px; color: #fff; background: rgba(16,46,43,.94); box-shadow: var(--shadow); font-size: 11px; opacity: 0; pointer-events: none; transform: translateY(10px); transition: .22s ease; }
.toast.show { opacity: 1; transform: none; }

@keyframes rise { from { height: 0; opacity: 0; } }
@keyframes loading { from { transform: translateX(-65%); } to { transform: translateX(145%); } }
@keyframes page-in { from { opacity: 0; transform: translateY(7px); } }
@keyframes sheet-up { from { opacity: 0; transform: translateY(45px); } }
@keyframes pop-in { from { opacity: 0; transform: scale(.96); } }
@keyframes news-pulse { 0% { box-shadow: 0 0 0 0 rgba(89,218,168,.35); } 70% { box-shadow: 0 0 0 7px rgba(89,218,168,0); } 100% { box-shadow: 0 0 0 0 rgba(89,218,168,0); } }
@keyframes freshness-pulse { from { opacity: .35; transform: scale(.82); } to { opacity: 1; transform: scale(1.08); } }

@media (min-width: 700px) {
  .page-root { padding-right: 24px; padding-left: 24px; }
  .cluster-rail { grid-template-columns: none; grid-auto-columns: calc((100% - 22px) / 3); grid-auto-flow: column; overflow-x: auto; scroll-snap-type: x mandatory; }
  .company-list.two-column { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .news-list { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .news-card { min-height: 268px; }
  .hero { padding: 32px; }
  .metric-board { grid-template-columns: repeat(4, 1fr); }
  .technical-settings-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .technical-metrics { grid-template-columns: repeat(4, minmax(0,1fr)); }
}

@media (max-width: 430px) {
  .freshness { max-width: 120px; }
  .freshness span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .bottom-nav button { font-size: 8px; }
  .finance-summary { grid-template-columns: 1fr; }
  .holding-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .paper-cash-form { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .paper-cash-form label { grid-column: 1 / -1; }
  .decision-verification-form { grid-template-columns: 1fr; }
  .decision-verification-form .decision-wide, .decision-verification-form > button { grid-column: auto; }
  .calculator-result { grid-template-columns: 1fr; }
  .calculator-result p { grid-column: auto; }
  .chart-zoom-controls { grid-template-columns: repeat(3,minmax(54px,72px)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
/* Income LKG V3 */
.income-entry-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.income-entry-grid button { min-width: 0; min-height: 142px; padding: 16px; border: 1px solid var(--line); border-radius: 20px; color: var(--ink); background: var(--card); box-shadow: 0 6px 24px rgba(18,46,41,.05); text-align: left; cursor: pointer; }
.income-entry-grid button:active { transform: scale(.995); }
.income-entry-grid span { color: var(--green-2); font-size: 8px; font-weight: 900; letter-spacing: .12em; }
.income-entry-grid b { display: block; margin-top: 7px; font-size: 17px; letter-spacing: -.04em; }
.income-entry-grid p { margin: 8px 0 15px; color: var(--muted); font-size: 9px; line-height: 1.55; }
.income-entry-grid em { color: var(--green-2); font-size: 9px; font-style: normal; font-weight: 850; }
.income-category-tabs { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; margin-top: 17px; padding: 5px; border: 1px solid var(--line); border-radius: 17px; background: rgba(255,253,247,.72); }
.income-category-tabs button { min-height: 45px; border: 0; border-radius: 12px; color: var(--muted); background: transparent; font-size: 11px; font-weight: 850; cursor: pointer; }
.income-category-tabs button.active { color: #fff; background: var(--green); box-shadow: 0 4px 13px rgba(18,60,54,.14); }
.income-lkg-status { display: grid; grid-template-columns: 8px minmax(0,1fr) auto; align-items: center; gap: 10px; margin: 12px 0; padding: 12px 13px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); }
.income-lkg-status > i { width: 8px; height: 8px; border-radius: 50%; background: #64ad58; }
.income-lkg-status.loading > i { background: var(--amber); animation: freshness-pulse .75s ease-in-out infinite alternate; }
.income-lkg-status.failed > i { background: var(--red); }
.income-lkg-status.stale > i { background: var(--amber); }
.income-lkg-status > div { min-width: 0; }
.income-lkg-status b, .income-lkg-status span, .income-lkg-status small { display: block; overflow-wrap: anywhere; }
.income-lkg-status b { font-size: 10px; }
.income-lkg-status span { margin-top: 3px; color: var(--muted); font-size: 8px; }
.income-lkg-status small { margin-top: 4px; color: #a66725; font-size: 8px; }
.income-lkg-status > button { min-height: 38px; padding: 0 11px; border: 1px solid var(--line); border-radius: 11px; color: var(--green); background: #f4f1e9; font-size: 9px; font-weight: 850; cursor: pointer; }
.income-lkg-status > button:disabled { cursor: wait; opacity: .55; }
.income-search-form { margin-top: 13px; }
.income-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.income-toolbar .filter-bar { flex: 1 1 auto; }
.income-toolbar p, .income-result-summary { flex: 0 0 auto; margin: 0; color: var(--muted); font-size: 8px; }
.income-sector-filter { margin: 2px 0 8px; padding: 9px 10px 2px; border: 1px solid var(--line); border-radius: 15px; background: rgba(255,253,247,.55); }
.income-sector-filter > span { display: block; margin-bottom: 5px; color: var(--green-2); font-size: 8px; font-weight: 900; }
.income-sector-filter .filter-bar { margin: 0; padding-bottom: 7px; }
.income-result-summary { margin: 9px 2px 11px; }
.income-list { display: grid; gap: 10px; }
.income-card { min-width: 0; padding: 16px; border: 1px solid var(--line); border-left: 4px solid #58a974; border-radius: 20px; background: var(--card); box-shadow: 0 5px 20px rgba(18,46,41,.045); }
.income-card.incomplete { border-left-color: var(--amber); }
.income-card header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.income-card header > div { min-width: 0; }
.income-card header span { color: var(--muted); font-size: 8px; font-weight: 750; }
.income-card h3 { margin: 5px 0 0; overflow-wrap: anywhere; font-size: 16px; letter-spacing: -.035em; }
.income-card h3 small { margin-left: 5px; color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: 0; }
.income-card header em { flex: 0 0 auto; padding: 5px 7px; border-radius: 999px; color: #26704f; background: #e4f4e7; font-size: 8px; font-style: normal; font-weight: 850; }
.income-card.incomplete header em { color: #985f21; background: var(--amber-soft); }
.income-sector { display: flex; align-items: center; gap: 7px; margin: 11px 0 0; padding: 8px 9px; border-radius: 11px; background: #f3f1ea; }
.income-sector b { color: var(--green-2); font-size: 8px; }
.income-sector span { min-width: 0; overflow: hidden; color: var(--ink); font-size: 9px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.income-metrics { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; margin-top: 10px; }
.income-metric { min-width: 0; padding: 9px; border-radius: 11px; background: #f3f1ea; }
.income-metric span { display: block; color: var(--muted); font-size: 7px; }
.income-metric b { display: block; margin-top: 3px; overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.income-card footer { display: flex; justify-content: space-between; gap: 10px; margin-top: 10px; padding-top: 9px; border-top: 1px dashed var(--line); color: var(--muted); font-size: 7px; line-height: 1.45; }
.income-card footer b { max-width: 58%; color: inherit; text-align: right; overflow-wrap: anywhere; }
.income-empty-state { padding: 42px 18px; border: 1px dashed #cfd2cb; border-radius: 20px; background: rgba(255,255,255,.35); text-align: center; }
.income-empty-state b { font-size: 14px; }
.income-empty-state p { margin: 7px auto 0; max-width: 34rem; color: var(--muted); font-size: 9px; line-height: 1.6; }
.income-pagination { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 10px; margin-top: 13px; padding: 9px; border: 1px solid var(--line); border-radius: 15px; background: var(--card); }
.income-pagination button { min-width: 68px; min-height: 40px; border: 1px solid var(--line); border-radius: 11px; color: var(--green); background: #f4f1e9; font-size: 9px; font-weight: 850; cursor: pointer; }
.income-pagination button:disabled { cursor: default; opacity: .35; }
.income-pagination span { color: var(--muted); font-size: 8px; text-align: center; }
.income-pagination span b { color: var(--ink); }
@media (min-width: 700px) {
  .income-list { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 430px) {
  .income-entry-grid { grid-template-columns: 1fr; }
  .income-toolbar { display: block; }
  .income-toolbar p { margin: 1px 2px 9px; }
  .income-lkg-status { grid-template-columns: 8px minmax(0,1fr); }
  .income-lkg-status > button { grid-column: 2; justify-self: start; }
  .income-pagination button { min-width: 58px; }
}

/* Sector/theme short-term interest-flow sidecar */
.primary-flow-filter { margin-bottom: 0; }
.secondary-flow-filter {
  top: calc(116px + var(--safe-top));
  z-index: 19;
  margin-top: 0;
  padding-top: 2px;
  background: rgba(244,241,233,.96);
}
.secondary-flow-filter .filter-chip { min-height: 40px; padding: 7px 10px; font-size: 9px; }
.market-flow-notice {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 12px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--muted);
  background: rgba(255,253,247,.72);
  font-size: 9px;
  line-height: 1.5;
}
.market-flow-notice > div { min-width: 0; }
.market-flow-notice b { flex: 0 0 auto; color: var(--ink); font-size: 10px; }
.market-flow-notice span { display: block; min-width: 0; }
.market-flow-notice.loading { border-color: rgba(34,102,89,.24); background: var(--blue-soft); }
.market-flow-notice.ready { border-color: rgba(43,126,85,.22); background: rgba(224,243,218,.45); }
.market-flow-notice.error { justify-content: space-between; border-color: rgba(178,77,64,.25); background: var(--red-soft); }
.market-flow-notice.error button {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 7px 10px;
  border: 1px solid rgba(178,77,64,.32);
  border-radius: 10px;
  color: var(--red);
  background: #fff;
  font-size: 9px;
  font-weight: 850;
  cursor: pointer;
}
.atlas-result-summary { margin: 3px 2px 9px; color: var(--muted); font-size: 9px; }
.atlas-result-summary b { color: var(--ink); }
.flow-atlas-row { align-items: start; min-height: 142px; padding-top: 13px; padding-bottom: 13px; }
.atlas-flow-main { min-width: 0; }
.atlas-flow-title { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.flow-state-badge {
  display: inline-flex;
  align-items: center;
  min-height: 21px;
  padding: 3px 7px;
  border-radius: 999px;
  color: #49615c;
  background: #edf0ec;
  font-size: 8px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}
.flow-state-badge.start { color: #1a6a58; background: #dff4e8; }
.flow-state-badge.strong { color: #155245; background: #cceedd; box-shadow: inset 0 0 0 1px rgba(21,82,69,.1); }
.flow-state-badge.peak { color: #8a5b13; background: #fff0c9; }
.flow-state-badge.outflow { color: #a34438; background: #fbe1dc; }
.flow-state-badge.weak { color: #7b4b45; background: #f4e8e5; }
.flow-state-badge.neutral { color: #626b68; background: #eceeea; }
.flow-state-badge.insufficient { color: #747a77; background: #efefec; }
.flow-state-badge.shortage { color: #8a5b13; background: #fff0c9; }
.flow-state-badge.rising { color: #155f50; background: #dff4e8; }
.flow-state-badge.flat { color: #59635f; background: #eceeea; }
.flow-state-badge.falling { color: #a34438; background: #fbe1dc; }
.constituent-trend-panel {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 9px;
  padding: 8px 9px;
  border: 1px solid rgba(19,37,34,.08);
  border-radius: 10px;
  background: rgba(247,246,240,.82);
  color: var(--muted);
  font-size: 8px;
  line-height: 1.4;
}
.constituent-trend-panel[data-index-trend-state="RISING"] { border-color: rgba(30,107,89,.18); }
.constituent-trend-panel[data-index-trend-state="FALLING"] { border-color: rgba(179,79,66,.18); }
.atlas-flow-metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(0,1fr));
  gap: 5px;
  margin-top: 10px;
}
.atlas-flow-metrics > span { min-width: 0; padding: 7px 6px; border-radius: 9px; background: #f2f0e9; }
.atlas-flow-metrics small { display: block; overflow: hidden; color: var(--muted); font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.atlas-flow-metrics b { display: block; overflow: hidden; margin-top: 3px; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.atlas-flow-foot { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 7px; color: var(--muted); font-size: 8px; }
.atlas-flow-missing { display: flex; align-items: center; gap: 7px; margin-top: 9px; color: var(--muted); font-size: 8px; }
.flow-score { padding-top: 2px; }
.flow-score em { display: block; margin-top: 5px; font-size: 9px; font-style: normal; font-weight: 850; }
.atlas-more-button { width: 100%; margin-top: 12px; }
.flow-home-grid { display: grid; gap: 8px; }
.flow-home-card {
  display: grid;
  gap: 5px;
  width: 100%;
  min-height: 92px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--ink);
  background: var(--card);
  text-align: left;
  cursor: pointer;
}
.flow-home-card > span { color: var(--green-2); font-size: 8px; font-weight: 900; }
.flow-home-card > b { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.flow-home-card small { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; color: var(--muted); font-size: 8px; }
.flow-detail-head { display: flex; align-items: center; gap: 9px; margin-top: 11px; }
.flow-detail-head > b { font-size: 15px; }
.flow-detail-head > span:last-child { font-size: 11px; font-weight: 850; }
.flow-contributors { display: grid; gap: 6px; margin-top: 10px; }
.flow-contributors p { display: grid; grid-template-columns: 64px minmax(0,1fr); gap: 8px; margin: 0; padding: 9px 10px; border-radius: 11px; background: #f2f0e9; font-size: 9px; }
.flow-contributors span { overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }

@media (min-width: 700px) {
  .flow-home-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
}
@media (max-width: 520px) {
  .atlas-flow-metrics { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .market-flow-notice { align-items: flex-start; flex-direction: column; }
  .market-flow-notice.error button { align-self: stretch; }
}


/* Sector/theme interest-flow cycle track */
.flow-cycle-shell {
  --flow-cycle-color: var(--green-2);
  min-width: 0;
  margin-top: 10px;
  padding: 9px 9px 7px;
  border: 1px solid rgba(19,37,34,.08);
  border-radius: 11px;
  background: rgba(247,246,240,.82);
}
.flow-cycle-shell[data-flow-cycle-state="PEAK_WATCH"] { --flow-cycle-color: #a66b13; }
.flow-cycle-shell[data-flow-cycle-state="OUTFLOW_TURN"],
.flow-cycle-shell[data-flow-cycle-state="WEAK_OUTFLOW"] { --flow-cycle-color: #b34f42; }
.flow-cycle-shell[data-flow-cycle-state="NEUTRAL"] { --flow-cycle-color: #68736f; }
.flow-cycle-current { display: flex; align-items: baseline; gap: 7px; min-width: 0; }
.flow-cycle-current b { flex: 0 0 auto; color: var(--flow-cycle-color); font-size: 9px; }
.flow-cycle-current span { min-width: 0; overflow: hidden; color: var(--muted); font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.flow-cycle-track { display: flex; align-items: flex-start; width: 100%; min-width: 0; margin-top: 9px; }
.flow-cycle-step {
  position: relative;
  display: grid;
  flex: 1 1 20%;
  min-width: 0;
  place-items: center;
  gap: 4px;
  color: #929a96;
  text-align: center;
}
.flow-cycle-step i {
  position: relative;
  z-index: 2;
  display: block;
  width: 8px;
  height: 8px;
  border: 2px solid #d7d9d4;
  border-radius: 50%;
  background: #f7f6f0;
}
.flow-cycle-step:not(:last-child)::after {
  position: absolute;
  top: 3px;
  left: calc(50% + 5px);
  z-index: 1;
  width: calc(100% - 10px);
  height: 2px;
  background: #dfe1dc;
  content: "";
}
.flow-cycle-step em {
  display: block;
  min-width: 0;
  max-width: 100%;
  font-size: 6.5px;
  font-style: normal;
  line-height: 1.25;
  word-break: keep-all;
}
.flow-cycle-step.current { color: var(--flow-cycle-color); font-weight: 900; }
.flow-cycle-step.current i {
  border-color: var(--flow-cycle-color);
  background: var(--flow-cycle-color);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--flow-cycle-color) 16%, transparent);
}
.flow-cycle-loop { display: block; margin-top: 5px; color: var(--muted); font-size: 6.5px; text-align: right; }
.flow-cycle-unavailable {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin-top: 9px;
  padding: 8px 9px;
  border: 1px dashed rgba(19,37,34,.14);
  border-radius: 10px;
  color: var(--muted);
  background: #f1f1ed;
}
.flow-cycle-unavailable b { flex: 0 0 auto; color: #6e7673; font-size: 8px; }
.flow-cycle-unavailable span { min-width: 0; font-size: 7px; line-height: 1.4; }

@media (max-width: 520px) {
  .flow-cycle-shell { padding-right: 6px; padding-left: 6px; }
  .flow-cycle-current { align-items: flex-start; flex-direction: column; gap: 2px; }
  .flow-cycle-current span { overflow: visible; white-space: normal; }
  .flow-cycle-step em { font-size: 6px; }
  .flow-cycle-unavailable { align-items: flex-start; flex-direction: column; gap: 2px; }
}


/* Constituent equal-weight base-100 index + up/flat/down breadth chart */
.flow-cycle-neutral {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin-top: 9px;
  padding: 8px 9px;
  border: 1px solid rgba(104,115,111,.2);
  border-radius: 10px;
  color: var(--muted);
  background: #eef0ed;
}
.flow-cycle-neutral b { flex: 0 0 auto; color: #59635f; font-size: 8px; }
.flow-cycle-neutral span { min-width: 0; font-size: 7px; line-height: 1.4; }
.flow-cycle-chart {
  position: relative;
  min-width: 0;
  margin-top: 8px;
  padding: 9px 9px 6px;
  border: 1px solid rgba(19,37,34,.08);
  border-radius: 11px;
  background: #faf9f5;
  cursor: zoom-in;
}
.flow-cycle-chart:active { transform: scale(.997); }
.flow-cycle-chart-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}
.flow-cycle-legend { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; color: var(--muted); font-size: 6.5px; }
.flow-cycle-legend span { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.flow-cycle-legend i { display: inline-block; width: 11px; height: 6px; }
.flow-cycle-legend .bar-up i,
.flow-cycle-legend .bar-flat i,
.flow-cycle-legend .bar-down i { border-radius: 2px; }
.flow-cycle-legend .bar-up i { background: rgba(30,107,89,.42); }
.flow-cycle-legend .bar-flat i { background: rgba(104,115,111,.38); }
.flow-cycle-legend .bar-down i { background: rgba(179,79,66,.42); }
.flow-cycle-legend .line i { height: 2px; background: var(--green-2); }
.flow-cycle-legend .benchmark-kospi i { height: 2px; background: #3d78bf; }
.flow-cycle-legend .benchmark-kosdaq i { height: 2px; background: #7b55b0; }
.flow-cycle-legend .turnover-bar i { border-radius: 2px; background: rgba(216,128,42,.40); }
.flow-cycle-latest { display: flex; flex: 0 0 auto; flex-wrap: wrap; justify-content: flex-end; gap: 5px; font-size: 7px; }
.flow-cycle-latest b { color: var(--ink); }
.flow-cycle-latest span { color: var(--muted); }
.flow-cycle-chart canvas {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: 92px;
  margin-top: 6px;
  pointer-events: none;
}
.flow-cycle-expand-hint {
  position: absolute;
  right: 9px;
  bottom: 7px;
  padding: 3px 6px;
  border-radius: 999px;
  color: rgba(19,37,34,.68);
  background: rgba(250,249,245,.82);
  font-size: 6px;
  font-weight: 850;
  pointer-events: none;
}
.flow-cycle-chart-axis { display: flex; justify-content: space-between; gap: 6px; color: var(--muted); font-size: 6px; }
.flow-cycle-chart-placeholder {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin-top: 8px;
  padding: 10px;
  border: 1px dashed rgba(19,37,34,.14);
  border-radius: 11px;
  color: var(--muted);
  background: #f4f3ee;
}
.flow-cycle-chart-placeholder b { flex: 0 0 auto; color: #6e7673; font-size: 8px; }
.flow-cycle-chart-placeholder span { min-width: 0; font-size: 7px; line-height: 1.4; }
.constituent-index-score em { display: block; margin-top: 5px; font-size: 9px; font-style: normal; font-weight: 850; }
.constituent-index-foot { justify-content: space-between; }
.constituent-index-unavailable { border-color: rgba(116,122,119,.24); background: #f1f1ed; }
.flow-auxiliary-cycle {
  margin-top: 9px;
  border: 1px dashed rgba(19,37,34,.13);
  border-radius: 10px;
  background: #f7f6f1;
}
.flow-auxiliary-cycle summary {
  padding: 9px 10px;
  color: #69716e;
  font-size: 8px;
  font-weight: 850;
  cursor: pointer;
}
.flow-auxiliary-cycle[open] { padding: 0 9px 9px; }
.flow-auxiliary-cycle[open] summary { margin: 0 -9px; }
.flow-auxiliary-cycle > p { margin: 7px 1px 0; color: var(--muted); font-size: 7px; line-height: 1.4; }
.flow-chart-dialog {
  width: min(calc(100% - 12px), 820px);
  max-height: min(94vh, 860px);
  padding: 18px 14px 16px;
}
.flow-chart-expanded h2 {
  margin: 3px 34px 8px 0;
  font-size: 21px;
  letter-spacing: -.04em;
}
.flow-chart-expanded-card {
  margin-top: 12px;
  padding: 11px;
  border: 1px solid rgba(19,37,34,.10);
  border-radius: 16px;
  background: #faf9f5;
}
.flow-chart-expanded-card canvas {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: 260px;
  margin-top: 8px;
}
.flow-chart-expanded .atlas-flow-metrics { margin-top: 12px; }
.flow-chart-detail-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 46px;
  margin-top: 12px;
  border: 1px solid var(--green);
  border-radius: 14px;
  color: #fff;
  background: var(--green);
  font-size: 11px;
  font-weight: 850;
  cursor: pointer;
}

@media (max-width: 520px) {
  .flow-cycle-neutral,
  .flow-cycle-chart-placeholder { align-items: flex-start; flex-direction: column; gap: 2px; }
  .flow-cycle-chart-head { flex-direction: column; }
  .flow-cycle-latest { justify-content: flex-start; }
  .flow-cycle-expand-hint { display: none; }
  .flow-chart-dialog {
    position: fixed;
    inset: 5px;
    width: auto;
    max-width: none;
    max-height: calc(100dvh - 10px);
    padding: 16px 10px 14px;
  }
  .flow-chart-expanded-card { margin-right: -2px; margin-left: -2px; padding: 9px; }
}

@media (min-width: 700px) {
  .remote-server-actions { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .remote-server-actions button.danger-light { grid-column: auto; }
}

/* Verified KR internal R2 research-only surface */
.internal-r2-page { min-width: 0; }
.internal-r2-hero { background: linear-gradient(135deg,#123c35 0%,#1d564c 100%); }
.internal-r2-notice {
  display: grid;
  grid-template-columns: minmax(110px,.55fr) minmax(0,1.45fr);
  align-items: center;
  gap: 14px;
  margin: 12px 0 18px;
  padding: 13px 15px;
  border: 1px solid rgba(18,91,78,.17);
  border-radius: 15px;
  background: #eef6f1;
  color: var(--ink);
}
.internal-r2-notice > div { display: flex; flex-direction: column; gap: 3px; }
.internal-r2-notice span,
.internal-r2-badge { color: #176b5b; font-size: 8px; font-weight: 900; letter-spacing: .04em; }
.internal-r2-notice b { font-size: 13px; }
.internal-r2-notice p { min-width: 0; margin: 0; color: var(--muted); font-size: 9px; line-height: 1.55; overflow-wrap: anywhere; }
.internal-r2-partition-grid {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 8px;
}
.internal-r2-partition-grid > div {
  display: flex;
  min-width: 0;
  min-height: 72px;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  padding: 12px;
  border-radius: 13px;
  background: var(--soft);
}
.internal-r2-partition-grid span { color: var(--muted); font-size: 8px; }
.internal-r2-partition-grid b { color: var(--green-2); font-size: 17px; overflow-wrap: anywhere; }
.internal-r2-badge {
  display: inline-flex;
  align-items: center;
  width: max-content;
  max-width: 100%;
  padding: 4px 7px;
  border-radius: 999px;
  background: #e4f4ec;
  white-space: normal;
}
.internal-r2-rank-line,
.internal-r2-card-foot {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.internal-r2-rank-line {
  margin: 10px 0 7px;
  padding: 9px 10px;
  border-radius: 11px;
  background: var(--soft);
  color: var(--muted);
  font-size: 8px;
}
.internal-r2-rank-line b { color: var(--ink); }
.internal-r2-card-foot { margin-top: 11px; color: var(--muted); font-size: 7.5px; }
.internal-r2-card-foot span { min-width: 0; overflow-wrap: anywhere; }
.internal-r2-card-foot b { flex: 0 0 auto; color: #8b5530; }
.internal-r2-cluster-card .cluster-score { align-self: center; }
.internal-r2-flow-row,
.internal-r2-flow-row .atlas-flow-main { min-width: 0; }
.internal-r2-flow-row .atlas-flow-main > p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 7.5px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.internal-r2-leaders-link {
  display: flex;
  width: 100%;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(18,91,78,.16);
  border-radius: 15px;
  background: #eef6f1;
  color: var(--ink);
  text-align: left;
}
.internal-r2-leaders-link b { font-size: 13px; }
.internal-r2-leaders-link span { flex: 0 0 auto; color: var(--green-2); font-size: 9px; font-weight: 800; }
.internal-r2-chart-warning {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 8px 0 11px;
  padding: 10px 11px;
  border-radius: 11px;
  background: #fff3df;
  color: #795325;
  font-size: 8px;
  line-height: 1.45;
}
.internal-r2-chart-warning b { flex: 0 0 auto; }
.internal-r2-chart-warning span { min-width: 0; }
.internal-r2-minute-section .chart-toolbar { min-width: 0; overflow-x: auto; scrollbar-width: thin; }
.internal-r2-detail .detail-path { overflow-wrap: anywhere; }

@media (max-width: 520px) {
  .signal-recommendation-guide { grid-template-columns: 1fr; }
  .recommendation-signal-evidence { flex-direction: column; gap: 4px; }
  .recommendation-signal-evidence b { max-width: none; text-align: left; }
  .weekly-consensus-hero-card { flex-direction: column; }
  .weekly-consensus-summary-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .weekly-consensus-metrics { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .weekly-consensus-votes ul { grid-template-columns: 1fr; }
  .internal-r2-notice { grid-template-columns: 1fr; gap: 7px; margin-bottom: 14px; padding: 12px; }
  .internal-r2-partition-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .internal-r2-partition-grid > div { min-height: 64px; padding: 10px; }
  .internal-r2-rank-line { align-items: flex-start; flex-direction: column; gap: 4px; }
  .internal-r2-card-foot { align-items: flex-start; flex-direction: column; gap: 4px; }
  .internal-r2-leaders-link { align-items: flex-start; flex-direction: column; }
  .internal-r2-chart-warning { flex-direction: column; gap: 3px; }
  .internal-r2-flow-row .atlas-score { min-width: 42px; }
}
