:root {
  --bg: #f4efe5;
  --shell: #fbf7ef;
  --panel: #fffdf8;
  --panel-soft: #f7f0e4;
  --line: #d9cdb8;
  --text: #1c2a34;
  --muted: #6f7d88;
  --green: #1f9d55;
  --amber: #c78a2b;
  --red: #d85b5b;
  --blue: #2f8acb;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #ffffff;
  color: var(--text);
  font-family: "Space Grotesk", sans-serif;
  overflow-x: hidden;
}

.app-shell {
  width: calc(100vw - 16px);
  max-width: 430px;
  margin: 8px auto 18px;
  padding: 10px;
  border-radius: 24px;
  background: rgba(251, 247, 239, 0.58);
  border: 1px solid rgba(217, 204, 180, 0.36);
  box-shadow: 0 12px 28px rgba(109, 83, 32, 0.04);
  backdrop-filter: blur(10px);
  overflow-x: clip;
}

.topbar {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: stretch;
  padding: 12px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255, 249, 239, 0.68), rgba(245, 236, 219, 0.5));
  border: 1px solid rgba(217, 205, 184, 0.34);
}

.brand h1,
.panel h2 {
  margin: 0;
}

.brand h1 {
  font-size: 1.8rem;
}

.brand p {
  margin: 2px 0 0;
  color: #7f7d66;
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  align-items: stretch;
  width: 100%;
}

.tab-button {
  min-width: 0;
  width: 100%;
  padding: 12px 8px;
  border: 0;
  border-radius: 12px;
  background: #efe6d5;
  color: #51606d;
  border: 1px solid #ddcfb8;
  font: inherit;
  font-size: 0.72rem;
  line-height: 1.1;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  text-align: center;
}

.tab-button.is-active {
  background: #d8f0c8;
  color: #173a28;
  border-color: #9acc87;
}

.status-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.status-card {
  min-width: 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: #f0e7d8;
  color: #293846;
  text-align: center;
  font-weight: 700;
}

.status-card.warning {
  background: #f6ead4;
  color: var(--amber);
}

.ticker {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 248, 237, 0.64);
  border: 1px solid rgba(217, 205, 184, 0.34);
  font-family: "Courier New", monospace;
  font-size: 0.96rem;
}

.ticker strong {
  font-weight: 700;
}

.live {
  color: var(--green);
  font-weight: 700;
}

.screen-stack {
  margin-top: 10px;
}

.screen {
  display: none;
}

.screen.is-active {
  display: block;
}

.screen-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.right-column {
  display: grid;
  gap: 12px;
  align-content: start;
}

.panel {
  border-radius: 20px;
  background: rgba(255, 253, 248, 0.66);
  border: 1px solid rgba(217, 205, 184, 0.34);
  padding: 14px;
}

.panel-chart {
  min-height: 0;
}

.eyebrow {
  margin: 0 0 8px;
  color: #63a6d2;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.78rem;
}

.subtle {
  margin: 6px 0 0;
  color: var(--muted);
}

.chart-frame {
  position: relative;
  margin-top: 14px;
  padding: 8px;
  border-radius: 16px;
  background: rgba(252, 246, 234, 0.58);
  border: 1px solid rgba(228, 217, 196, 0.38);
  overflow: hidden;
}

.panel-chart {
  overflow: hidden;
}

.chart-svg {
  width: 100%;
  min-width: 0;
  height: auto;
  display: block;
}

.grid-lines line {
  stroke: #dbcdb7;
  stroke-width: 1.5;
}

.plot-lines path {
  fill: none;
  stroke-width: 3.5;
  stroke-linecap: round;
  transition: opacity 120ms ease, stroke-width 120ms ease, filter 120ms ease;
}

.plot-lines.is-dimmed .team-line {
  opacity: 0.16;
}

.plot-lines.is-dimmed .team-line.is-highlighted {
  opacity: 1;
  stroke-width: 5.5;
  filter: drop-shadow(0 0 8px currentColor);
}

.axis-labels text {
  fill: #7d8a95;
  font-size: 15px;
}

.value-labels text {
  fill: #9c8975;
  font-size: 13px;
  font-weight: 700;
}

.end-boundary {
  stroke: #baa98e;
  stroke-width: 2;
}

.chart-tooltip {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255, 252, 246, 0.96);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 0.92rem;
  pointer-events: none;
}

.legend-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 10px;
  border-radius: 12px;
  background: #f3eadb;
  border: 1px solid transparent;
  color: #3b4c59;
  font-size: 0.84rem;
  white-space: normal;
  cursor: pointer;
  font: inherit;
  text-align: left;
  overflow: hidden;
}

.legend-item.is-active {
  border-color: #a9c8df;
  background: #e4f0f8;
}

.legend-item i {
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  border-radius: 999px;
}

.summary-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 12px;
}

.metric-card {
  border-radius: 18px;
  background: #f7f0e3;
  border: 1px solid #e1d3bc;
  padding: 14px;
}

.metric-card span {
  display: block;
  color: #7b8791;
  font-size: 0.92rem;
  margin-bottom: 8px;
}

.metric-card strong {
  font-size: 1.7rem;
}

.metric-card.large strong {
  font-size: 1.95rem;
}

.mini-stock,
.lineup-card,
.stock-card,
.symbol-pill {
  background: #f6efe2;
  border-radius: 14px;
}

.team-ranking-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.rank-row {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-radius: 16px;
  background: #f7efe2;
  border: 1px solid #e2d3bf;
}

.rank-row.rank-best {
  background: linear-gradient(90deg, rgba(75, 225, 118, 0.18), #f7efe2 28%);
}

.rank-row.rank-mid {
  background: linear-gradient(90deg, rgba(75, 225, 118, 0.1), #f7efe2 24%);
}

.rank-row.rank-worst {
  background: linear-gradient(90deg, rgba(255, 111, 111, 0.18), #f7efe2 28%);
}

.rank-position {
  font-size: 1.35rem;
  font-weight: 700;
  color: #8a7762;
}

.rank-main strong {
  display: block;
  font-size: 1.1rem;
}

.rank-main span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.88rem;
}

.rank-week {
  text-align: left;
  font-size: 1.14rem;
  font-weight: 700;
}

.rank-meter {
  grid-column: 1 / -1;
  height: 12px;
  border-radius: 999px;
  background: #efe4d3;
  overflow: hidden;
  border: 1px solid #ddceb7;
}

.rank-meter-fill {
  height: 100%;
  border-radius: 999px;
}

.rank-meter-fill.positive-5 { width: 100%; background: #27d96d; }
.rank-meter-fill.positive-4 { width: 84%; background: #37cf71; }
.rank-meter-fill.positive-3 { width: 68%; background: #54ca7a; }
.rank-meter-fill.positive-2 { width: 54%; background: #75c889; }
.rank-meter-fill.negative-1 { width: 36%; background: #d48686; }
.rank-meter-fill.negative-4 { width: 100%; background: #ff6f6f; }

.positive {
  color: var(--green);
}

.negative {
  color: var(--red);
}

.table-header,
.standings-big-header {
  display: grid;
  color: var(--muted);
  background: #f1e8d9;
  border-radius: 12px;
  font-size: 0.92rem;
  margin-top: 10px;
  min-width: 0;
}

.table-header {
  grid-template-columns: 56px 1fr 1.2fr 0.75fr 92px;
  padding: 10px 14px;
}

.table-rows {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  min-width: 0;
}

.table-row {
  display: grid;
  grid-template-columns: 56px 1fr 1.55fr 0.75fr 92px;
  padding: 8px 14px;
  border-radius: 10px;
  background: #fffaf1;
  align-items: center;
  font-size: 0.86rem;
}

.best-worst-pair {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.best-worst-pair .row {
  display: flex;
  gap: 8px;
  align-items: baseline;
}

.best-worst-pair em {
  color: var(--muted);
  font-style: normal;
  font-size: 0.72rem;
  min-width: 36px;
}

.best-worst-pair b {
  color: var(--text);
  font-size: 0.84rem;
}

.best-worst-pair strong {
  font-size: 0.86rem;
}

.table-row.is-user {
  background: #f6ead6;
}

.stock-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stock-stat em {
  font-style: normal;
  color: var(--muted);
  font-size: 0.78rem;
}

.bottom-panel {
  margin-top: 18px;
  overflow: hidden;
}

.symbol-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
}

.symbol-pill {
  padding: 12px 16px;
  font-family: "Courier New", monospace;
  font-weight: 700;
}

.full-screen-panel {
  min-height: 0;
}

.team-layout {
  margin-top: 16px;
  display: grid;
  gap: 18px;
}

.team-summary-large {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.team-hero-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.team-hero-summary.is-condensed .compact-stat-card {
  padding: 10px;
}

.team-hero-summary.is-condensed .compact-stat-card strong {
  font-size: 1.05rem;
}

.compact-stat-card {
  padding: 12px;
  border-radius: 16px;
  background: #f6efe2;
  border: 1px solid #e0d1ba;
  display: grid;
  gap: 6px;
}

.expand-toggle {
  border: 1px solid #d7c8b0;
  background: #f4ebdb;
  color: #445463;
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
}

.compact-stat-card span,
.micro-stat-pill span {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.compact-stat-card strong {
  font-size: 1.3rem;
}

.compact-stat-card em {
  font-style: normal;
  color: #8d7f71;
  font-size: 0.82rem;
}

.compact-stat-card.emphasis {
  background: linear-gradient(160deg, rgba(95, 211, 107, 0.16), #fbf5ea 62%);
}

.compact-stat-card.negative {
  background: linear-gradient(160deg, rgba(216, 91, 91, 0.14), #fbf5ea 62%);
}

.compact-stat-card.positive {
  background: linear-gradient(160deg, rgba(31, 157, 85, 0.15), #fbf5ea 62%);
}

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

.micro-stat-pill {
  padding: 10px 12px;
  border-radius: 14px;
  background: #f8f1e5;
  border: 1px solid #e2d4be;
  display: grid;
  gap: 4px;
}

.micro-stat-pill strong {
  font-size: 0.95rem;
}

.micro-stat-pill.negative strong {
  color: var(--red);
}

.stock-list-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.team-table-panel {
  border-radius: 18px;
  border: 1px solid #dfd1bc;
  background: #fffaf2;
  overflow: hidden;
}

.team-table-header,
.team-table-row {
  display: grid;
  grid-template-columns: 34px 0.9fr 0.95fr 0.8fr 0.95fr 0.6fr;
  gap: 8px;
  align-items: center;
}

.team-table-header {
  padding: 12px 10px;
  background: #f3eadb;
  color: var(--muted);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.team-table-body {
  display: grid;
}

.team-table-row {
  padding: 12px 10px;
  border-top: 1px solid #efe3cf;
  font-size: 0.82rem;
}

.team-table-row strong {
  font-size: 0.95rem;
}

.team-table-row.positive {
  background: linear-gradient(90deg, rgba(75, 225, 118, 0.12), #fffaf2 28%);
}

.team-table-row.negative {
  background: linear-gradient(90deg, rgba(216, 91, 91, 0.12), #fffaf2 28%);
}

.team-table-rank {
  color: #8a7762;
  font-weight: 700;
}

.team-table-week {
  padding: 6px 8px;
  border-radius: 999px;
  text-align: center;
  font-weight: 700;
  font-size: 0.76rem;
}

.team-table-week.positive-strong { background: #d7f7df; color: #10964c; }
.team-table-week.positive-mid { background: #e2f6e7; color: #25a35c; }
.team-table-week.positive-soft { background: #ebf8ee; color: #4aa674; }
.team-table-week.negative-soft { background: #fff0f0; color: #d77d7d; }
.team-table-week.negative-mid { background: #ffe4e4; color: #d85b5b; }
.team-table-week.negative-strong { background: #ffd6d6; color: #bb2b2b; }

.compact-lineup-grid {
  margin-top: 12px;
}

.lineup-slots-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.slot-chip {
  padding: 8px 6px;
  border-radius: 12px;
  background: #f7efe1;
  border: 1px solid #dfd1bb;
  text-align: center;
  font: inherit;
}

.slot-chip.is-active {
  border-color: #9acc87;
  background: #eaf6de;
}

.slot-chip span,
.slot-chip em {
  display: block;
  font-style: normal;
  color: var(--muted);
  font-size: 0.68rem;
}

.slot-chip strong {
  display: block;
  margin: 4px 0;
  font-size: 0.86rem;
}

.lineup-search-row {
  margin-top: 14px;
}

.stock-category-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.stock-category-chip {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid #ddd0bb;
  background: #f6ede0;
  color: #5f6d79;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
}

.stock-category-chip.is-active {
  background: #6dbb63;
  color: #fff;
  border-color: #6dbb63;
}

.lineup-search-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid #d9cab4;
  background: #fffaf2;
  font: inherit;
  color: var(--text);
}

.lineup-active-slot {
  margin-top: 12px;
}

.active-slot-card {
  padding: 12px;
  border-radius: 14px;
  background: #f7efe1;
  border: 1px solid #ddceb9;
  display: grid;
  gap: 4px;
}

.active-slot-card span,
.active-slot-card em {
  color: var(--muted);
  font-style: normal;
  font-size: 0.8rem;
}

.active-slot-card strong {
  font-size: 1rem;
}

.lineup-universe-grid {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.universe-card {
  padding: 12px;
  border-radius: 16px;
  border: 1px solid #dfd1bb;
  background: #fffaf2;
  text-align: left;
  font: inherit;
  color: inherit;
}

.universe-card-top,
.universe-card-bottom {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
}

.universe-card-top strong {
  font-size: 1rem;
}

.universe-card-bottom {
  margin-top: 8px;
}

.universe-card-bottom em {
  color: var(--muted);
  font-style: normal;
  font-size: 0.76rem;
}

.stocks-layout {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.stocks-discovery-grid {
  display: grid;
  gap: 12px;
}

.stocks-discovery-card {
  padding: 14px;
  border-radius: 18px;
  border: 1px solid #dfd1bc;
  background: #fffaf2;
}

.section-mini-header {
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
}

.section-mini-header strong {
  font-size: 1.05rem;
}

.hot-list-card #hot-stocks-list,
.trend-matrix,
.mix-list {
  display: grid;
  gap: 10px;
}

.hot-stock-row {
  display: grid;
  grid-template-columns: 28px 48px 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 14px;
  background: #f6efe1;
  border: 1px solid #e1d4bf;
}

.hot-stock-row em {
  font-style: normal;
  color: var(--muted);
  font-size: 0.78rem;
}

.trend-mini-card {
  padding: 12px;
  border-radius: 16px;
  background: #f8f1e5;
  border: 1px solid #e1d4bf;
}

.trend-mini-header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.mini-trend-svg {
  width: 100%;
  height: 72px;
}

.universe-mix {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 14px;
  align-items: center;
}

.mix-pie {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background:
    conic-gradient(#5aa1cf 0 42%, #79c873 42% 70%, #ffb452 70% 88%, #d8b273 88% 100%);
  border: 6px solid #f7efe3;
  box-shadow: inset 0 0 0 12px rgba(255, 250, 242, 0.82);
}

.mix-list span {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.86rem;
  color: #495965;
}

.mix-color {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  display: inline-block;
}

.mix-color.mega { background: #5aa1cf; }
.mix-color.growth { background: #79c873; }
.mix-color.etf { background: #ffb452; }
.mix-color.value { background: #d8b273; }

.stock-entry {
  display: grid;
  gap: 10px;
}

.lineup-card,
.stock-card {
  padding: 14px;
}

.lineup-card strong,
.stock-card strong {
  display: block;
  font-size: 1.25rem;
}

.lineup-card span,
.stock-card span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
}

.lineup-card {
  position: relative;
  overflow: hidden;
  border: 1px solid #e1d2bb;
  min-height: 0;
  display: grid;
  gap: 12px;
  align-content: start;
}

.lineup-card-small {
  gap: 8px;
  padding: 10px;
}

.lineup-card-small .lineup-card-top {
  grid-template-columns: 34px 1fr auto;
  gap: 8px;
}

.lineup-card-small .lineup-rank {
  width: 34px;
  font-size: 0.74rem;
  padding: 6px 0;
}

.lineup-card-small strong {
  font-size: 0.95rem;
}

.lineup-card-small .lineup-weight {
  font-size: 0.72rem;
  padding: 4px 8px;
}

.lineup-card-small .lineup-price {
  font-size: 1rem;
}

.lineup-card-small .lineup-week-value {
  font-size: 1rem;
}

.lineup-card-small .lineup-tone {
  font-size: 0.74rem;
}

.lineup-card::after {
  content: "";
  position: absolute;
  inset: auto -8% -30% auto;
  width: 140px;
  height: 140px;
  border-radius: 999px;
  opacity: 0.28;
  filter: blur(12px);
  pointer-events: none;
}

.lineup-card.positive-strong {
  background: linear-gradient(160deg, rgba(39, 217, 109, 0.2), #fffaf2 48%, #f7efe2);
}

.lineup-card.positive-strong::after,
.lineup-card.positive-mid::after,
.lineup-card.positive-soft::after {
  background: rgba(75, 225, 118, 0.55);
}

.lineup-card.positive-mid {
  background: linear-gradient(160deg, rgba(67, 208, 117, 0.16), #fffaf2 48%, #f7efe2);
}

.lineup-card.positive-soft {
  background: linear-gradient(160deg, rgba(108, 217, 152, 0.12), #fffaf2 48%, #f7efe2);
}

.lineup-card.negative-strong {
  background: linear-gradient(160deg, rgba(255, 111, 111, 0.22), #fff7f4 48%, #f7efe2);
}

.lineup-card.negative-strong::after,
.lineup-card.negative-mid::after,
.lineup-card.negative-soft::after {
  background: rgba(255, 111, 111, 0.52);
}

.lineup-card.negative-mid {
  background: linear-gradient(160deg, rgba(255, 128, 128, 0.16), #fff8f6 48%, #f7efe2);
}

.lineup-card.negative-soft {
  background: linear-gradient(160deg, rgba(255, 148, 148, 0.1), #fffaf7 48%, #f7efe2);
}

.lineup-card-top {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 10px;
  align-items: center;
}

.lineup-rank {
  margin-top: 0;
  width: 48px;
  padding: 8px 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid #ddceb7;
  color: #574e43;
  text-align: center;
  font-weight: 700;
  font-size: 0.95rem;
}

.lineup-weight {
  margin-top: 0;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid #ddceb7;
  color: #5c6d7a;
  font-size: 0.86rem;
  font-weight: 700;
}

.lineup-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.03em;
}

.lineup-week-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.lineup-week-label {
  margin-top: 0;
  color: #7d8892;
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.lineup-week-value {
  margin-top: 0;
  font-size: 1.5rem;
  font-weight: 700;
}

.lineup-card.positive-strong .lineup-week-value { color: #27d96d; }
.lineup-card.positive-mid .lineup-week-value { color: #43d075; }
.lineup-card.positive-soft .lineup-week-value { color: #79df9e; }
.lineup-card.negative-soft .lineup-week-value { color: #ffb1b1; }
.lineup-card.negative-mid .lineup-week-value { color: #ff8a8a; }
.lineup-card.negative-strong .lineup-week-value { color: #ff6161; }

.lineup-meter {
  height: 14px;
  border-radius: 999px;
  background: #f1e6d7;
  border: 1px solid #ddceb8;
  overflow: hidden;
}

.lineup-meter-fill {
  height: 100%;
  border-radius: 999px;
}

.lineup-meter-fill.positive-strong { background: linear-gradient(90deg, #19b85a, #40ec7d); }
.lineup-meter-fill.positive-mid { background: linear-gradient(90deg, #2dbc68, #67e192); }
.lineup-meter-fill.positive-soft { background: linear-gradient(90deg, #5ecb87, #96ebaf); }
.lineup-meter-fill.negative-soft { background: linear-gradient(90deg, #c98686, #ffc2c2); }
.lineup-meter-fill.negative-mid { background: linear-gradient(90deg, #e56666, #ff9f9f); }
.lineup-meter-fill.negative-strong { background: linear-gradient(90deg, #d83e3e, #ff6a6a); }

.lineup-tone {
  margin-top: auto;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.standings-big-header {
  grid-template-columns: 80px 1.1fr 1.45fr 120px 120px;
  padding: 12px 14px;
  overflow: hidden;
}

.standings-big-body {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  min-width: 0;
}

.standings-top-table {
  display: grid;
  gap: 8px;
}

.standings-sheet-header,
.standings-sheet-row {
  display: grid;
  grid-template-columns: 52px 1fr 84px 62px;
  gap: 10px;
  align-items: center;
}

.standings-sheet-header {
  padding: 12px 14px;
  border-radius: 14px;
  background: #f1e8d9;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.standings-sheet-row {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid #dfd1bc;
  background: #fffaf2;
  font: inherit;
  color: inherit;
  text-align: left;
}

.standings-sheet-row.is-user {
  background: #f8efdf;
}

.standings-sheet-row.is-selected {
  border-color: #8fc86b;
  background: #f0f8e8;
}

.standings-sheet-row em {
  font-style: normal;
  color: var(--blue);
  font-weight: 700;
  font-size: 0.8rem;
}

.standings-history-panel {
  margin-top: 18px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid #dfd1bc;
  background: #fffaf2;
}

.standings-detail-card {
  margin-top: 10px;
}

.standings-detail-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.standings-detail-metrics div {
  padding: 12px;
  border-radius: 14px;
  background: #f7efe1;
  border: 1px solid #e1d4bf;
}

.standings-detail-metrics span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.standings-history-chart {
  margin-top: 14px;
  padding: 10px;
  border-radius: 16px;
  background: #fcf6ea;
  border: 1px solid #e4d9c4;
}

.standings-history-svg {
  width: 100%;
  height: auto;
  display: block;
}

.standings-history-grid line {
  stroke: #dccdb6;
  stroke-width: 1;
}

.standings-line {
  fill: none;
  stroke-width: 2.5;
  opacity: 0.18;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.standings-line.is-active {
  opacity: 1;
  stroke-width: 4;
}

.standings-history-labels text {
  fill: #867967;
  font-size: 11px;
}

.standings-chip-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.standings-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 6px;
  border-radius: 999px;
  border: 1px solid #ddcfb8;
  background: #f5ecdd;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
}

.standings-chip.is-active {
  background: #e8f4df;
  border-color: #9acc87;
}

.standings-chip i {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.standings-mobile-card {
  padding: 12px;
  border-radius: 16px;
  background: #fffaf2;
  border: 1px solid #dfd2be;
}

.standings-mobile-card.is-user {
  background: #f6ead6;
}

.standings-mobile-top {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 10px;
  align-items: center;
}

.standings-mobile-top h3 {
  margin: 0;
  font-size: 0.98rem;
}

.standings-mobile-metrics {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.standings-mobile-metrics span {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.84rem;
  color: var(--muted);
}

.standings-mobile-metrics strong {
  color: var(--text);
}

.stock-card {
  cursor: pointer;
}

.stock-card.is-selected {
  outline: 2px solid #8fc86b;
}

.stock-card-chart {
  margin-top: 10px;
  height: 52px;
  border-radius: 12px;
  background: #fbf4e8;
  border: 1px solid #e4d8c5;
  padding: 6px;
}

.stock-card-spark {
  width: 100%;
  height: 100%;
}

.stock-card-path {
  fill: none;
  stroke: #5aa1cf;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.stock-price {
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 700;
}

.stock-trend {
  color: var(--muted);
  font-size: 0.9rem;
}

.stock-detail-card {
  align-self: start;
  background: #fffdf8;
}

.stock-inline-detail {
  padding: 14px;
  border-radius: 18px;
  background: #fffaf2;
  border: 1px solid #e2d4bf;
}

.stock-inline-detail h3 {
  margin: 0;
  font-size: 1.2rem;
}

.detail-price-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 14px;
}

.mini-trend-chart {
  position: relative;
  height: 170px;
  margin-top: 18px;
  border-radius: 16px;
  background: linear-gradient(180deg, #faf2e3, #f4ead9);
  overflow: hidden;
  border: 1px solid #e1d3bd;
}

.detail-chart-svg {
  width: 100%;
  height: 100%;
}

.detail-grid line {
  stroke: #d9cab2;
  stroke-width: 1.2;
}

.detail-chart-path {
  fill: none;
  stroke: #5ab4ff;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.detail-copy {
  margin-top: 18px;
}

.detail-copy p {
  margin: 0 0 10px;
}

.news-block {
  margin-top: 18px;
}

.news-block h3 {
  margin: 0 0 10px;
  font-size: 1rem;
}

.news-list {
  display: grid;
  gap: 10px;
}

.news-item {
  padding: 12px 14px;
  border-radius: 14px;
  background: #f4ebdc;
  border: 1px solid #e1d3bc;
}

.news-item strong {
  display: block;
  font-size: 0.95rem;
}

.news-item span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.82rem;
}

.chat-thread {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  padding-bottom: 72px;
}

.chat-message {
  padding: 12px 14px;
  border-radius: 16px;
  background: #f7efe2;
  border: 1px solid #e0d2bc;
}

.chat-message.is-user {
  background: #eef7e5;
  border-color: #c8ddba;
}

.chat-message strong {
  display: block;
  margin-bottom: 6px;
}

.chat-message p {
  margin: 0;
  line-height: 1.4;
}

.chat-message span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.82rem;
}

.chat-compose {
  position: sticky;
  bottom: 0;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding-top: 10px;
  background: linear-gradient(180deg, rgba(255,253,248,0), #fffdf8 38%);
}

.chat-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid #d9cab4;
  background: #fffaf2;
  font: inherit;
}

.chat-send {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid #9acc87;
  background: #d8f0c8;
  color: #173a28;
  font: inherit;
  font-weight: 700;
}

.sketch-team-layout {
  margin-top: 16px;
  display: grid;
  gap: 18px;
}

.sketch-board,
.sketch-panel {
  border-radius: 18px;
  border: 1px solid #dfd1bc;
  background: #fffaf2;
}

.sketch-board,
.sketch-panel {
  padding: 14px;
}

.sketch-board-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  padding-bottom: 10px;
  border-bottom: 1px solid #e8dcc8;
}

.sketch-board-title span {
  font-size: 1.15rem;
  font-weight: 700;
}

.sketch-board-title strong {
  color: #827765;
  font-size: 0.8rem;
  text-transform: uppercase;
}

.team-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.team-stat-box {
  padding: 10px 12px;
  border-radius: 14px;
  background: #f5eddf;
  border: 1px solid #e1d4bf;
}

.team-stat-box span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.team-stat-box strong {
  display: block;
  margin-top: 4px;
  font-size: 1rem;
}

.team-stock-table {
  margin-top: 14px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid #e1d4bf;
}

.team-stock-table-header,
.team-stock-row {
  display: grid;
  grid-template-columns: 28px 58px 68px 68px 1fr;
  gap: 8px;
  align-items: center;
}

.team-stock-table-header {
  padding: 10px 12px;
  background: #f0e6d7;
  color: var(--muted);
  font-size: 0.7rem;
  text-transform: uppercase;
}

.team-stock-table-body {
  display: grid;
}

.team-stock-row {
  padding: 10px 12px;
  border-top: 1px solid #eee2cf;
  background: #fffaf2;
  font-size: 0.82rem;
}

.team-stock-row.positive {
  background: linear-gradient(90deg, rgba(75, 225, 118, 0.1), #fffaf2 28%);
}

.team-stock-row.negative {
  background: linear-gradient(90deg, rgba(216, 91, 91, 0.1), #fffaf2 28%);
}

.team-stock-notes {
  color: var(--muted);
  font-size: 0.78rem;
}

.team-bottom-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.team-top-stock-row,
.team-mini-standing-row {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid #eee2cf;
}

.team-top-stock-row:first-child,
.team-mini-standing-row:first-child {
  border-top: 0;
}

.team-mini-standing-row.is-user strong {
  color: var(--amber);
}

.team-mini-chart-svg {
  width: 100%;
  height: auto;
  display: block;
}

.team-mini-chart-grid line {
  stroke: #dbcdb7;
  stroke-width: 1;
}

.team-mini-trend {
  fill: none;
  stroke: #2f8acb;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.team-mini-dot {
  fill: #1f9d55;
}

.sketch-stocks-layout {
  margin-top: 16px;
  display: grid;
  gap: 12px;
}

.home-overview-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.home-overview-grid > .sketch-panel {
  width: 100%;
  min-width: 0;
}

.home-summary-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.home-mini-card {
  padding: 10px 12px;
  border-radius: 14px;
  background: #f5eddf;
  border: 1px solid #e1d4bf;
}

.home-mini-card span {
  display: block;
  color: var(--muted);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.home-mini-card strong {
  display: block;
  margin-top: 6px;
  font-size: 0.92rem;
}

.home-mini-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.home-league-table,
.home-stock-table {
  margin-top: 12px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #e1d4bf;
}

.home-league-header,
.home-league-row,
.home-stock-header,
.home-stock-row {
  gap: 8px;
}

.home-league-header,
.home-stock-header {
  display: none;
}

.home-league-row,
.home-stock-row {
  padding: 10px 12px;
  background: #fffaf2;
  border-top: 1px solid #eee2cf;
  font-size: 0.8rem;
  display: grid;
  gap: 10px;
}

.home-league-row strong,
.home-stock-row strong {
  font-size: 0.88rem;
}

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

.home-row-metrics span {
  padding: 8px 10px;
  border-radius: 12px;
  background: #f5eddf;
  border: 1px solid #e1d4bf;
}

.home-row-metrics em {
  display: block;
  font-style: normal;
  color: var(--muted);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.home-row-metrics b {
  display: block;
  margin-top: 4px;
  font-size: 0.82rem;
}

.home-list-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid #eee2cf;
}

.home-list-row:first-child {
  border-top: 0;
}

@media (max-width: 480px) {
  .app-shell {
    width: calc(100vw - 12px);
    padding: 8px;
    background: rgba(251, 247, 239, 0.28);
    border-color: rgba(217, 204, 180, 0.2);
    box-shadow: none;
    backdrop-filter: blur(6px);
  }

  .topbar {
    padding: 10px;
  }

  .brand h1 {
    font-size: 1.7rem;
  }

  .brand p {
    font-size: 0.8rem;
    line-height: 1.2;
  }

  .tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    width: 100%;
  }

  .tab-button {
    width: 100%;
    min-width: 0;
    padding: 10px 4px;
    font-size: 0.7rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .ticker {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    font-size: 0.92rem;
  }

  .home-overview-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .home-summary-cards {
    grid-template-columns: 1fr !important;
  }

  .home-mini-card {
    padding: 12px;
  }

  .home-mini-card strong {
    font-size: 1rem;
  }

  .home-league-header,
  .home-stock-header {
    display: none !important;
  }

  .home-league-table,
  .home-stock-table {
    border: 0;
    background: transparent;
  }

  .home-league-row,
  .home-stock-row {
    border: 1px solid #e1d4bf;
    border-radius: 14px;
    margin-top: 10px;
    padding: 12px;
    background: #fffaf2;
  }

  .home-row-metrics {
    grid-template-columns: 1fr 1fr;
  }

  .home-row-metrics span {
    min-width: 0;
  }

  .home-row-metrics b {
    font-size: 0.86rem;
    word-break: break-word;
  }
}

.stocks-top-row,
.stocks-bottom-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.standings-sketch-layout {
  margin-top: 16px;
  display: grid;
  gap: 14px;
}

.standings-sheet-header,
.standings-sheet-row {
  grid-template-columns: 1fr 84px 72px;
}

.standings-sheet-row span b {
  display: inline-block;
  min-width: 18px;
}

@media (min-width: 720px) {
  .app-shell {
    width: min(100vw - 24px, 980px);
    margin-top: 14px;
    padding: 16px;
    border-radius: 28px;
  }

  .topbar {
    gap: 16px;
    padding: 14px 16px;
  }

  .status-cards,
  .summary-row,
  .team-summary-large,
  .detail-price-row,
  .team-hero-summary,
  .team-composition-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .legend-grid,
  .stock-list-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tabs {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .tab-button {
    font-size: 0.72rem;
  }

  .home-summary-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .home-league-header,
  .home-stock-header {
    display: grid;
    padding: 10px 12px;
    background: #f0e6d7;
    color: var(--muted);
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }

  .home-league-header {
    grid-template-columns: 1.35fr 24px 24px 44px 62px 48px;
  }

  .home-stock-header {
    grid-template-columns: 52px 44px 58px 36px 52px;
  }

  .stocks-discovery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lineup-slots-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .chart-svg {
    width: 100%;
    min-width: 0;
  }

  .team-bottom-grid,
  .home-overview-grid,
  .stocks-top-row,
  .stocks-bottom-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1120px) {
  .app-shell {
    width: min(1564px, calc(100vw - 32px));
    margin: 18px auto;
    padding: 18px;
    border-radius: 30px;
  }

  .topbar {
    grid-template-columns: 300px 1fr 280px;
    gap: 18px;
    align-items: center;
    padding: 12px 18px;
    border-radius: 20px;
  }

  .tabs {
    gap: 8px;
  }

  .tab-button {
    flex: 1 1 0;
    padding: 14px 22px;
    font-size: 0.86rem;
  }

  .status-cards {
    display: flex;
    justify-content: end;
    gap: 14px;
  }

  .ticker {
    gap: 28px;
    margin-top: 14px;
    padding: 18px;
    font-size: 1.15rem;
  }

  .screen-stack {
    margin-top: 14px;
  }

  .screen-grid {
    grid-template-columns: minmax(0, 1.6fr) minmax(320px, 0.95fr);
    gap: 18px;
  }

  .right-column {
    gap: 18px;
  }

  .panel {
    border-radius: 24px;
    padding: 18px 20px;
  }

  .panel-chart {
    min-height: 660px;
  }

  .legend-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
  }

  .stock-list-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }

  .stocks-layout {
    gap: 18px;
  }

  .stocks-discovery-grid {
    grid-template-columns: 1.1fr 1.1fr 0.9fr;
  }

  .team-table-header,
  .team-table-row {
    grid-template-columns: 48px 1fr 1fr 0.9fr 0.9fr 0.7fr;
  }

  .standings-sheet-header,
  .standings-sheet-row {
    grid-template-columns: 72px 1.2fr 120px 84px;
  }

  .stocks-layout {
    gap: 18px;
  }

  .full-screen-panel {
    min-height: 760px;
  }

  .team-bottom-grid {
    grid-template-columns: 0.9fr 1.1fr 0.9fr;
  }

  .home-overview-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* White theme override */
:root {
  --bg: #ffffff;
  --shell: #ffffff;
  --panel: #ffffff;
  --panel-soft: #f8fafc;
  --line: #e5e7eb;
  --text: #1f2937;
  --muted: #6b7280;
}

.app-shell,
.panel,
.topbar,
.ticker,
.chart-frame,
.metric-card,
.rank-row,
.table-header,
.table-row,
.compact-stat-card,
.micro-stat-pill,
.slot-chip,
.active-slot-card,
.universe-card,
.stocks-discovery-card,
.stock-card-chart,
.stock-inline-detail,
.news-item,
.chat-message,
.chat-input,
.team-stat-box,
.team-stock-table,
.team-stock-row,
.sketch-board,
.sketch-panel,
.home-mini-card,
.home-league-table,
.home-stock-table,
.home-league-row,
.home-stock-row,
.home-row-metrics span,
.standings-sheet-header,
.standings-sheet-row,
.standings-history-panel,
.standings-detail-metrics div,
.standings-history-chart,
.standings-chip,
.team-table-panel,
.team-table-header,
.team-table-row {
  background: #ffffff !important;
  border-color: #e5e7eb !important;
  box-shadow: none !important;
}

.topbar,
.ticker,
.panel,
.chart-frame,
.app-shell {
  backdrop-filter: none !important;
}

.tab-button,
.status-card,
.status-card.warning,
.legend-item,
.symbol-pill,
.stock-category-chip {
  background: #ffffff !important;
  border-color: #e5e7eb !important;
  color: #4b5563 !important;
}

.tab-button.is-active,
.stock-category-chip.is-active,
.standings-chip.is-active {
  background: #f3f4f6 !important;
  border-color: #d1d5db !important;
  color: #111827 !important;
}

.rank-row.rank-best,
.rank-row.rank-mid,
.rank-row.rank-worst,
.team-table-row.positive,
.team-table-row.negative,
.team-stock-row.positive,
.team-stock-row.negative,
.lineup-card.positive-strong,
.lineup-card.positive-mid,
.lineup-card.positive-soft,
.lineup-card.negative-strong,
.lineup-card.negative-mid,
.lineup-card.negative-soft {
  background: #ffffff !important;
}

.home-league-header,
.home-stock-header,
.team-stock-table-header,
.standings-sheet-header,
.table-header {
  background: #f9fafb !important;
}

/* Screenshot-aligned shell/header refresh */
:root {
  --esbn-green: #169b45;
  --esbn-navy: #1f2d3d;
  --esbn-tab: #6b7280;
  --esbn-line: #dfe3e8;
}

body {
  background: #ffffff !important;
}

.app-shell {
  width: min(100vw, 430px) !important;
  max-width: 430px !important;
  margin: 0 auto 24px !important;
  padding: 0 !important;
  border-radius: 36px !important;
  border: 0 !important;
  background: #ffffff !important;
  overflow: hidden !important;
  box-shadow: none !important;
}

.topbar {
  display: block !important;
  gap: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #ffffff !important;
}

.brandbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 18px 20px;
  background: var(--esbn-green);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 38px;
  border: 3px solid #ffffff;
  border-right-width: 0;
  color: #ffffff;
  font-size: 1.9rem;
  font-weight: 700;
  line-height: 1;
}

.brandbar h1 {
  margin: 0;
  color: #ffffff;
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

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

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #ffffff;
  font-size: 1rem;
  cursor: pointer;
}

.tabs {
  display: grid !important;
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  gap: 0 !important;
  width: 100% !important;
  padding: 0 12px !important;
  background: #ffffff !important;
  border-bottom: 1px solid var(--esbn-line);
}

.tab-button {
  width: 100% !important;
  min-width: 0 !important;
  padding: 16px 4px 18px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--esbn-tab) !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  line-height: 1.05 !important;
  letter-spacing: -0.01em;
  white-space: normal;
  border-bottom: 4px solid transparent !important;
}

.tab-button.is-active {
  color: #111827 !important;
  background: transparent !important;
  border-color: var(--esbn-green) !important;
}

.ticker {
  margin: 16px 14px 0 !important;
  padding: 14px 16px !important;
  border-radius: 18px !important;
  background: #ffffff !important;
  border: 1px solid var(--esbn-line) !important;
  gap: 10px 18px !important;
  font-size: 0.96rem !important;
  color: #4b5563;
}

.screen-stack {
  margin-top: 12px !important;
  padding: 0 14px 18px;
}

.panel {
  border-radius: 22px !important;
  padding: 18px 16px !important;
  border: 1px solid var(--esbn-line) !important;
  background: #ffffff !important;
}

.home-overview-grid {
  display: grid;
  grid-template-columns: 1fr !important;
  gap: 14px !important;
}

.sketch-panel {
  border-radius: 18px !important;
  padding: 14px !important;
}

@media (min-width: 768px) {
  .app-shell {
    width: min(100vw - 24px, 980px) !important;
    max-width: 980px !important;
    margin-top: 12px !important;
    border: 1px solid #e5e7eb !important;
  }

  .tabs {
    padding: 0 24px !important;
  }

  .tab-button {
    font-size: 0.95rem !important;
    padding: 18px 10px 20px !important;
  }

  .screen-stack {
    padding: 0 18px 24px;
  }

  .home-overview-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

.connection-panel {
  margin: 0 0 14px;
}

.connection-card {
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--esbn-line);
  border-radius: 18px;
  background: #ffffff;
}

.connection-card h3 {
  margin: 4px 0 6px;
  font-size: 1.05rem;
}

.connection-card p {
  margin: 0;
  color: #6b7280;
  line-height: 1.35;
}

.connection-form-grid,
.connection-stack {
  display: grid;
  gap: 10px;
}

.connection-actions,
.connection-inline-grid,
.lineup-save-row {
  display: grid;
  gap: 10px;
}

.connection-inline-grid {
  grid-template-columns: 1fr;
}

.connection-label {
  display: grid;
  gap: 6px;
  color: #4b5563;
  font-size: 0.88rem;
  font-weight: 700;
}

.connection-status,
.lineup-save-status {
  font-size: 0.84rem;
  color: #6b7280;
}

.secondary-action {
  background: #f3f4f6 !important;
  color: #111827 !important;
}

@media (min-width: 768px) {
  .connection-card.is-connected {
    grid-template-columns: 0.95fr 1.25fr;
    align-items: start;
  }

  .connection-inline-grid {
    grid-template-columns: 1fr 1fr auto;
  }

  .connection-actions {
    grid-template-columns: repeat(2, minmax(0, auto));
    justify-content: start;
  }

  .lineup-save-row {
    grid-template-columns: auto 1fr;
    align-items: center;
  }
}

.home-screen-panel {
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  display: grid;
  gap: 12px;
}

.home-hero-card,
.home-movers-card {
  border: 1px solid var(--esbn-line);
  border-radius: 18px;
  background: #ffffff;
  padding: 14px;
}

.home-hero-card {
  display: grid;
  gap: 12px;
}

.home-hero-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.home-hero-topline .eyebrow {
  margin: 0 0 6px;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  color: #94a3b8;
}

.home-hero-value {
  display: block;
  font-size: 2.45rem;
  line-height: 0.95;
  color: #111827;
}

.home-hero-value.positive {
  color: #1f9d55;
}

.home-hero-value.negative {
  color: #d85b5b;
}

.home-hero-meta {
  margin: 4px 0 0;
  color: #6b7280;
  font-size: 0.85rem;
  font-weight: 700;
}

.home-hero-actions {
  display: grid;
  justify-items: end;
  gap: 10px;
}

.home-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  border-radius: 999px;
  background: #d9534f;
  color: #ffffff;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
}

.home-live-pill::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #ffffff;
}

.home-range-pills {
  display: flex;
  gap: 6px;
  padding: 3px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
}

.home-range-pill {
  padding: 7px 11px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #6b7280;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
}

.home-range-pill.is-active {
  background: #ffffff;
  color: #111827;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.home-hero-chart {
  border-top: 1px solid #f3f4f6;
  padding-top: 8px;
}

.home-chart-svg {
  width: 100%;
  height: auto;
}

.home-chart-grid line {
  stroke: #eef2f7;
  stroke-width: 1;
}

.home-chart-scale text,
.home-chart-days text {
  fill: #94a3b8;
  font-size: 0.69rem;
  font-weight: 700;
}

.home-chart-line {
  fill: none;
  stroke-width: 2.25;
  stroke-linecap: round;
}

.home-chart-line.is-featured {
  stroke-width: 3;
}

.home-hero-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  color: #64748b;
  font-size: 0.74rem;
  font-weight: 700;
}

.home-hero-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.home-hero-legend i {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  display: inline-block;
}

.home-stat-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border: 1px solid var(--esbn-line);
  border-radius: 16px;
  overflow: hidden;
  background: #ffffff;
}

.home-stat-card {
  padding: 14px 10px;
  text-align: center;
  border-right: 1px solid #edf2f7;
}

.home-stat-card:last-child {
  border-right: 0;
}

.home-stat-card span {
  display: block;
  margin-bottom: 8px;
  color: #94a3b8;
  font-size: 0.67rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.home-stat-card strong {
  display: block;
  font-size: 1.55rem;
  line-height: 1;
  color: #111827;
}

.home-stat-card strong.positive {
  color: #1f9d55;
}

.home-stat-card strong.negative {
  color: #d85b5b;
}

.home-stat-card em {
  display: block;
  margin-top: 5px;
  color: #6b7280;
  font-size: 0.78rem;
  font-style: normal;
}

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

.home-movers-header .eyebrow {
  margin: 0;
}

.home-inline-link {
  border: 0;
  background: transparent;
  color: #334155;
  font: inherit;
  font-weight: 700;
  font-size: 0.9rem;
}

.home-movers-list {
  display: grid;
}

.home-mover-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-top: 1px solid #edf2f7;
}

.home-mover-row:first-child {
  border-top: 0;
}

.home-mover-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.home-mover-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: #111827;
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 800;
  flex: 0 0 auto;
}

.home-mover-left strong {
  display: block;
  font-size: 0.96rem;
  color: #111827;
}

.home-mover-left span {
  display: block;
  margin-top: 2px;
  color: #6b7280;
  font-size: 0.82rem;
}

.home-mover-price {
  color: #334155;
  font-size: 0.96rem;
}

.home-mover-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 70px;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  border: 1px solid transparent;
}

.home-mover-badge.positive {
  color: #1f9d55;
  background: #ecfdf3;
  border-color: #ccefd7;
}

.home-mover-badge.negative {
  color: #d85b5b;
  background: #fff1f1;
  border-color: #f2caca;
}

@media (min-width: 768px) {
  .home-screen-panel {
    gap: 16px;
  }

  .home-hero-card,
  .home-movers-card {
    padding: 20px;
  }

  .home-hero-value {
    font-size: 3rem;
  }
}

/* Reference-screen overrides */
.tabs {
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
}

.tab-button {
  font-size: 0.69rem !important;
}

.team-builder-screen,
.cast-screen,
.standings-screen {
  display: grid;
  gap: 14px;
}

.team-builder-top {
  display: grid;
  gap: 10px;
}

.team-budget-card {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.team-budget-card .eyebrow {
  margin: 0 0 6px;
}

.team-budget-card strong {
  font-size: 2rem;
  line-height: 1;
}

.team-budget-right {
  text-align: right;
}

.team-budget-bar {
  height: 10px;
  border-radius: 999px;
  background: #eef2f7;
  overflow: hidden;
}

.team-budget-bar span {
  display: block;
  width: 100%;
  height: 100%;
  background: #4c9b4f;
  border-radius: inherit;
}

.team-slot-grid,
.lineup-slots-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.slot-chip {
  min-height: 62px;
  padding: 10px 6px !important;
  border-radius: 10px !important;
  background: #ffffff !important;
  border: 1px solid #dbe3ea !important;
}

.slot-chip strong {
  display: block;
  font-size: 0.98rem;
  color: #1f2937;
}

.slot-chip em {
  display: block;
  margin-top: 6px;
  font-style: normal;
  font-size: 0.72rem;
  color: #6b7280;
}

.slot-chip.is-active {
  border-color: #4c9b4f !important;
  box-shadow: 0 0 0 1px #4c9b4f inset;
}

.team-reminder-card,
.cast-hero-card,
.cast-summary-card,
.cast-order-card,
.standings-chart-card,
.standings-explain-card,
.standings-table-card {
  border: 1px solid #dbe3ea;
  border-radius: 16px;
  background: #ffffff;
  padding: 14px;
}

.team-reminder-card p {
  margin: 0;
  color: #6b7280;
  line-height: 1.45;
}

.team-builder-actions {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 10px;
}

.team-secondary-button {
  min-height: 46px;
  border-radius: 14px;
  border: 1px solid #dbe3ea;
  background: #ffffff;
  color: #1f2937;
  font: inherit;
  font-weight: 700;
}

.team-lock-meta {
  margin: -4px 0 0;
  text-align: center;
  color: #8b95a7;
  font-size: 0.82rem;
}

.team-selection-drawer {
  margin-top: 4px;
  border: 1px solid #dbe3ea;
  border-radius: 22px;
  background: #ffffff;
  padding: 12px 14px 14px;
  box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.08);
}

.drawer-grabber {
  width: 54px;
  height: 5px;
  border-radius: 999px;
  background: #d8dde5;
  margin: 0 auto 12px;
}

.drawer-stock-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.drawer-stock-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.drawer-stock-title strong {
  display: block;
  font-size: 1.1rem;
}

.drawer-stock-title span:last-child {
  color: #6b7280;
  font-size: 0.84rem;
}

.drawer-weight-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-top: 14px;
}

.drawer-weight-row .eyebrow {
  margin: 0;
}

.drawer-weight-stepper {
  display: flex;
  align-items: center;
  gap: 18px;
}

.drawer-weight-stepper strong {
  font-size: 2rem;
}

.drawer-weight-button {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid #dbe3ea;
  background: #ffffff;
  color: #1f2937;
  font: inherit;
  font-size: 1.35rem;
}

.drawer-budget-bar {
  margin-top: 12px;
}

.drawer-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.drawer-chip {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #dbe3ea;
  color: #637083;
  font-size: 0.76rem;
  font-weight: 700;
}

.drawer-actions {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 10px;
  margin-top: 12px;
}

.cast-hero-header,
.cast-summary-header,
.cast-order-header,
.standings-chart-header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.cast-chart-frame {
  display: grid;
  gap: 10px;
}

.cast-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  color: #64748b;
  font-size: 0.76rem;
  font-weight: 700;
}

.cast-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.cast-legend i {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  display: inline-block;
}

.cast-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin-top: 10px;
}

.cast-summary-grid article {
  padding: 6px 10px;
  text-align: center;
  border-right: 1px solid #edf2f7;
}

.cast-summary-grid article:last-child {
  border-right: 0;
}

.cast-summary-balance {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
}

.cast-summary-balance article {
  text-align: center;
}

.cast-summary-balance strong {
  display: block;
  font-size: 2rem;
  line-height: 1;
}

.cast-summary-balance span {
  display: block;
  margin-top: 4px;
  color: #6b7280;
  font-size: 0.78rem;
}

.cast-balance-slider {
  display: grid;
  gap: 8px;
  justify-items: center;
}

.cast-balance-slider > span {
  color: #94a3b8;
  font-size: 0.72rem;
  font-weight: 700;
}

.cast-balance-track {
  position: relative;
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(76, 155, 79, 0.18), rgba(220, 38, 38, 0.16));
  overflow: hidden;
}

.cast-balance-track i {
  position: absolute;
  top: 50%;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #ffffff;
  border: 3px solid #4c9b4f;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.14);
  transform: translate(-50%, -50%);
}

.cast-summary-ties {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #edf2f7;
  text-align: center;
}

.cast-summary-ties strong {
  display: block;
  font-size: 1.1rem;
}

.cast-summary-ties span {
  color: #6b7280;
  font-size: 0.78rem;
}

.cast-summary-grid strong {
  display: block;
  font-size: 2rem;
  line-height: 1;
}

.cast-summary-grid span {
  display: block;
  margin-top: 4px;
  color: #6b7280;
  font-size: 0.78rem;
}

.cast-order-row {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid #edf2f7;
}

.cast-order-row:first-child {
  border-top: 0;
}

.cast-order-row.is-user {
  background: #f2fbf2;
  margin: 0 -14px;
  padding: 12px 14px;
}

.cast-order-row strong {
  display: block;
}

.cast-order-row em {
  display: block;
  color: #8b95a7;
  font-size: 0.8rem;
  font-style: normal;
}

.cast-spark-grid line {
  stroke: #dbe3ea;
  stroke-width: 1.2;
}

.cast-spark-line {
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.92;
}

.cast-spark-line.is-featured {
  stroke-width: 3.4;
}

.standings-filter-row {
  display: flex;
  gap: 18px;
  border-bottom: 1px solid #e8edf3;
}

.standings-top-tab {
  padding: 0 0 10px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: #7a8798;
  font: inherit;
  font-weight: 700;
}

.standings-top-tab.is-active {
  color: #1f2937;
  border-color: #4c9b4f;
}

.standings-chart-header span {
  color: #7a8798;
  font-size: 0.8rem;
}

.standings-rank-pill {
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid #dbe3ea;
  color: #6b7280;
  font-size: 0.78rem;
  font-weight: 700;
}

.standings-sheet-header,
.standings-sheet-row {
  grid-template-columns: 26px minmax(0, 1.6fr) 34px 34px 52px 56px !important;
}

.standings-team-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.standings-team-cell i {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #4c9b4f;
  color: #ffffff;
  font-style: normal;
  font-size: 0.72rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.standings-team-cell b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.standings-scale-labels text {
  fill: #94a3b8;
  font-size: 0.68rem;
  font-weight: 700;
}

.standings-explain-card p {
  margin: 0;
  color: #6b7280;
  line-height: 1.45;
}

.stocks-watchlist-panel,
.stocks-explore-panel,
.stocks-board-card {
  border: 1px solid #dbe3ea;
  border-radius: 16px;
  background: #ffffff;
  padding: 14px;
}

.stocks-watchlist-panel {
  margin-top: 10px;
}

.stocks-template-note {
  display: none;
}

.stock-watchlist-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 132px;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.stock-watchlist-row::-webkit-scrollbar {
  display: none;
}

.stock-watchlist-card {
  min-height: 124px;
  padding: 12px 12px 10px;
  border-radius: 14px;
  background: #ffffff;
  border-color: #dbe3ea;
  color: #475569;
  display: grid;
  gap: 8px;
  text-align: left;
  font-size: 0.82rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.stock-watchlist-card.is-active {
  background: #f8fff8;
  border-color: #6dbb63;
  color: #2f6f32;
  box-shadow: 0 0 0 1px #6dbb63 inset;
}

.stock-watchlist-top {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 10px;
  align-items: start;
}

.stock-watchlist-icon {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border: 1px solid #dbe3ea;
  font-size: 0.78rem;
}

.stock-watchlist-top strong {
  display: block;
  font-size: 0.9rem;
  color: #1f2937;
}

.stock-watchlist-top span:last-child {
  color: #64748b;
  font-size: 0.78rem;
}

.stock-watchlist-spark {
  width: 100%;
  height: 40px;
}

.stock-watchlist-path {
  fill: none;
  stroke-width: 3.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.stock-watchlist-path.positive {
  stroke: #36a853;
}

.stock-watchlist-path.negative {
  stroke: #d85b5b;
}

.stock-watchlist-card em {
  font-style: normal;
  font-size: 0.9rem;
  font-weight: 700;
}

.stocks-watchlist-edit,
.stocks-explore-link {
  margin-left: auto;
  color: #7a8798;
  font-size: 0.82rem;
  font-weight: 600;
}

.stocks-search-shell {
  position: relative;
}

.stocks-search-icon {
  position: absolute;
  top: 50%;
  left: 14px;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 0.86rem;
}

.stocks-search-shell .lineup-search-input {
  padding-left: 36px;
  border-radius: 12px;
  background: #fbfcfd;
}

.stocks-explore-panel {
  margin-top: 10px;
  padding-top: 12px;
  padding-bottom: 12px;
}

.stocks-explore-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-top: 8px;
  scrollbar-width: none;
}

.stocks-explore-row::-webkit-scrollbar {
  display: none;
}

.stocks-explore-chip {
  flex: 0 0 auto;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid #dbe3ea;
  background: #ffffff;
  color: #475569;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
}

.stocks-explore-chip.is-active {
  background: #111827;
  border-color: #111827;
  color: #ffffff;
}

.stocks-board-card {
  margin-top: 12px;
  padding-top: 12px;
}

.stocks-board-header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 10px;
}

.stocks-board-title {
  color: #7a8798;
  font-size: 0.8rem;
  font-weight: 500;
}

.stocks-board-badge {
  padding: 6px 10px;
  border-radius: 999px;
  background: #eef9f0;
  color: #4c9b4f;
  font-size: 0.74rem;
  font-weight: 700;
  white-space: nowrap;
}

.stocks-board-sheet-header,
.stocks-board-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1.7fr) 0.95fr 0.95fr 0.7fr;
  gap: 8px;
  align-items: center;
}

.stocks-board-sheet-header {
  padding: 0 0 10px;
  color: #94a3b8;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-bottom: 1px solid #edf2f7;
}

.stocks-board-list {
  margin-top: 8px;
}

.stocks-podium {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 4px;
  align-items: end;
}

.stocks-podium-card {
  min-height: 132px;
  padding: 10px 10px 12px;
  border-radius: 16px;
  border: 1px solid #e6ebf1;
  background: #ffffff;
  display: grid;
  justify-items: center;
  gap: 6px;
  text-align: center;
}

.stocks-podium-card.is-1st {
  background: #fff7dc;
  border-color: #f1da8d;
  min-height: 146px;
}

.stocks-podium-card.is-2nd,
.stocks-podium-card.is-3rd {
  margin-top: 12px;
}

.stocks-podium-medal {
  color: #9aa5b1;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stocks-podium-logo {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 700;
}

.stocks-podium-card strong {
  font-size: 1rem;
}

.stocks-podium-card em {
  color: #64748b;
  font-style: normal;
  font-size: 0.72rem;
}

.stocks-podium-card b {
  font-size: 1rem;
}

.stocks-ranked-list {
  margin-top: 10px;
}

.stocks-ranked-row {
  display: grid;
  grid-template-columns: 20px minmax(0, 1.5fr) 82px auto;
  gap: 10px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid #edf2f7;
  cursor: pointer;
}

.stocks-ranked-rank {
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 700;
}

.stocks-board-name {
  display: grid;
  min-width: 0;
}

.stocks-row-main {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.stocks-row-logo {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 700;
}

.stocks-board-name strong {
  font-size: 0.96rem;
}

.stocks-board-name em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #64748b;
  font-style: normal;
  font-size: 0.78rem;
}

.stocks-row-spark {
  width: 100%;
  height: 24px;
}

.stocks-row-path {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.stocks-row-path.positive {
  stroke: #36a853;
}

.stocks-row-path.negative {
  stroke: #d85b5b;
}

.stocks-ranked-metrics {
  display: grid;
  justify-items: end;
  gap: 2px;
  min-width: 58px;
}

.stocks-ranked-metrics b {
  font-size: 0.9rem;
}

.stocks-ranked-metrics em {
  color: #94a3b8;
  font-style: normal;
  font-size: 0.74rem;
}

.stock-board-detail {
  margin-top: 10px;
}

.connection-panel:empty {
  display: none;
}
