:root {
  --bg: #020713;
  --panel: #06101f;
  --panel-2: #08172b;
  --line: #1f5ca8;
  --line-soft: rgba(49, 130, 206, 0.45);
  --text: #d8e7ff;
  --muted: #8da6c7;
  --red: #ff263d;
  --green: #24d05a;
  --yellow: #f5d34b;
  --cyan: #59d8ff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: radial-gradient(circle at top, #0a1730 0, var(--bg) 42rem);
  color: var(--text);
  font-family: "Segoe UI", "Microsoft JhengHei", Arial, sans-serif;
}

.terminal-page {
  min-height: 100vh;
  padding: 8px;
  background:
    linear-gradient(rgba(58, 148, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(58, 148, 255, 0.035) 1px, transparent 1px),
    var(--bg);
  background-size: 34px 34px;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(11, 31, 59, 0.96), rgba(3, 11, 22, 0.96));
  box-shadow: 0 0 16px rgba(40, 130, 255, 0.15) inset;
  position: sticky;
  top: 0;
  z-index: 20;
}

.toolbar h1 {
  margin: 0 auto 0 0;
  font-size: 20px;
  letter-spacing: 0.04em;
}

.version-badge {
  border: 1px solid rgba(250, 204, 21, 0.45);
  border-radius: 999px;
  background: rgba(250, 204, 21, 0.08);
  color: #fde68a;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.toolbar input {
  width: 150px;
  height: 34px;
  border: 1px solid #315b8d;
  border-radius: 5px;
  background: #020817;
  color: white;
  padding: 0 10px;
  font-size: 15px;
  flex: 0 0 150px;
}

.toolbar button {
  height: 34px;
  border: 1px solid #3575bd;
  border-radius: 5px;
  background: #08264d;
  color: white;
  padding: 0 14px;
  font-weight: 700;
  cursor: pointer;
}

.toolbar button.active,
.toolbar button:hover {
  background: #155bad;
}

.error-text {
  color: #ff7b8b;
  font-size: 13px;
}

.terminal-grid {
  display: grid;
  grid-template-columns: minmax(0, 3.05fr) minmax(260px, 0.72fr);
  gap: 8px;
  align-items: start;
}

.right-stack,
.bottom-grid {
  display: grid;
  gap: 8px;
}

.left-stack {
  display: contents;
}

.right-stack {
  grid-column: 2;
  grid-row: 2 / span 11;
  grid-auto-rows: min-content;
}

.quote-strip {
  grid-column: 1 / -1;
}

.source-strip,
.market-strip {
  grid-column: 1;
}

.main-row,
.technical-strip,
.pattern-panel,
.section-heading,
.analysis-grid {
  grid-column: 1;
}

.main-row {
  display: grid;
  grid-template-columns: minmax(0, 2.05fr) minmax(300px, 0.88fr);
  gap: 8px;
  align-items: stretch;
}

.chart-side {
  display: grid;
  gap: 8px;
  grid-auto-rows: min-content;
}

.quote-strip {
  display: grid;
  grid-template-columns: minmax(220px, 1.25fr) minmax(230px, 1fr) repeat(5, minmax(112px, 0.62fr));
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  overflow: hidden;
  background: linear-gradient(180deg, #06162b, #020813);
}

.quote-cell {
  min-height: 64px;
  padding: 8px 12px;
  border-right: 1px solid rgba(64, 128, 210, 0.32);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.quote-cell:last-child {
  border-right: none;
}

.quote-name {
  font-size: 28px;
  font-weight: 900;
  color: white;
}

.quote-price {
  font-size: 34px;
  font-weight: 900;
  line-height: 1;
}

.quote-label {
  color: var(--muted);
  font-size: 13px;
}

.quote-value {
  margin-top: 4px;
  font-size: 18px;
  font-weight: 800;
  color: var(--yellow);
}

.panel {
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(7, 20, 38, 0.96), rgba(2, 8, 18, 0.96));
  box-shadow:
    0 0 0 1px rgba(7, 18, 36, 0.8),
    0 0 18px rgba(25, 100, 210, 0.12) inset;
  overflow: hidden;
}

.market-strip {
  display: grid;
  grid-template-columns: minmax(420px, 1.6fr) repeat(4, minmax(140px, 0.55fr));
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(2, 8, 18, 0.85);
  overflow: hidden;
}

.source-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  padding: 7px 10px;
  border: 1px solid rgba(80, 120, 170, 0.42);
  border-radius: 8px;
  background: rgba(2, 8, 18, 0.78);
  color: #b9d9f7;
  font-size: 12px;
  line-height: 1.45;
}

.source-strip {
  grid-row: 99;
}

.source-strip b {
  color: #fde68a;
  font-size: 13px;
}

.source-list {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.source-list li {
  display: grid;
  gap: 3px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(80, 120, 170, 0.25);
}

.source-list li:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.source-list b {
  color: #fde68a;
  font-size: 13px;
}

.source-list span {
  color: #c7ddf2;
  font-size: 12px;
  line-height: 1.55;
}

.pressure-box {
  padding: 8px 10px;
  border-right: 1px solid rgba(53, 117, 189, 0.45);
}

.pressure-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #dcecff;
  font-size: 13px;
  font-weight: 800;
}

.pressure-bar {
  display: flex;
  height: 10px;
  margin: 7px 0 5px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}

.pressure-bar i,
.pressure-bar b {
  display: block;
  height: 100%;
}

.pressure-bar i {
  background: var(--green);
}

.pressure-bar b {
  background: var(--red);
}

.profile-card,
.warning-card {
  display: grid;
  gap: 7px;
  color: #dcecff;
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}

.profile-card b {
  color: #67e8f9;
  font-size: 17px;
}

.profile-card p,
.warning-card p {
  margin: 0;
}

.profile-facts {
  display: grid;
  gap: 6px;
  margin-top: 2px;
  text-align: left;
}

.profile-facts div {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 6px 8px;
  border: 1px solid rgba(80, 120, 170, 0.3);
  border-radius: 5px;
  background: rgba(5, 20, 38, 0.5);
}

.profile-facts span {
  color: #8fb4d8;
  font-size: 12px;
  font-weight: 800;
}

.profile-facts strong {
  color: #e5f4ff;
  font-size: 13px;
  line-height: 1.35;
  text-align: right;
}

.profile-card small {
  color: #8fb4d8;
  font-size: 11px;
}

.profile-table td:last-child {
  color: #dcecff;
  font-weight: 800;
}

.indicator-explain-list {
  display: grid;
  gap: 7px;
}

.indicator-explain {
  display: grid;
  gap: 4px;
  padding: 8px;
  border: 1px solid rgba(80, 120, 170, 0.34);
  border-radius: 6px;
  background: rgba(5, 20, 38, 0.56);
}

.indicator-explain div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
}

.indicator-explain b {
  color: #67e8f9;
  font-size: 13px;
}

.indicator-explain strong {
  color: #fde68a;
  font-size: 13px;
}

.indicator-explain p {
  margin: 0;
  color: #9fc1e6;
  font-size: 12px;
  line-height: 1.45;
}

.indicator-explain em {
  color: #f8fafc;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.45;
}

.warning-dots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 2px;
}

.warning-dot {
  display: grid;
  justify-items: center;
  gap: 4px;
  color: #9fb9d6;
  font-size: 12px;
}

.warning-dot i {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #4b5563;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.warning-dot.red i {
  background: var(--red);
  box-shadow: 0 0 16px rgba(255, 38, 61, 0.55);
}

.warning-dot.yellow i {
  background: var(--yellow);
  box-shadow: 0 0 16px rgba(250, 204, 21, 0.45);
}

.warning-dot.green i {
  background: var(--green);
  box-shadow: 0 0 16px rgba(34, 197, 94, 0.45);
}

.warning-card > b {
  font-size: 16px;
}

.pressure-box small {
  color: var(--muted);
  font-size: 11px;
}

.panel-title {
  margin: 0;
  padding: 7px 10px;
  border-bottom: 1px solid rgba(53, 117, 189, 0.45);
  color: #dcecff;
  font-size: 17px;
  text-align: center;
  font-weight: 800;
  background: rgba(10, 31, 59, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 0;
}

.panel-title > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.panel-body {
  padding: 10px;
}

.chart-panel .panel-body {
  padding: 6px 8px 8px;
}

.chart-panel svg {
  display: block;
  filter: drop-shadow(0 0 3px rgba(22, 120, 255, 0.15));
}

.current-pattern-card {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(53, 117, 189, 0.35);
  text-align: center;
}

.current-pattern-card span {
  color: #8fb4d8;
  font-size: 12px;
  font-weight: 800;
}

.current-pattern-card b {
  color: #67e8f9;
  font-size: 20px;
  font-weight: 900;
}

.current-pattern-card small {
  color: #dcecff;
  font-size: 12px;
  line-height: 1.45;
}

.signal-list {
  list-style: none;
  margin: 0;
  padding: 8px 12px;
  display: grid;
  gap: 7px;
  font-size: 15px;
}

.signal-list li {
  display: grid;
  grid-template-columns: 18px 80px minmax(0, 1fr);
  gap: 7px;
  align-items: center;
}

.signal-list li b {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.signal-list li b span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.score-badge {
  flex: 0 0 auto;
  font-style: normal;
  font-weight: 900;
  font-size: 14px;
}

.arrow-up {
  color: var(--red);
}

.arrow-flat {
  color: var(--yellow);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.table th,
.table td {
  padding: 5px 6px;
  border-bottom: 1px solid rgba(66, 91, 130, 0.35);
  text-align: right;
}

.table th:first-child,
.table td:first-child {
  text-align: left;
}

.compact-table {
  font-size: 12px;
}

.compact-table td:last-child {
  color: #bcd2ee;
  text-align: left;
}

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

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

.yellow {
  color: var(--yellow);
}

.cyan {
  color: var(--cyan);
}

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

.extra-grid {
  margin-top: 8px;
}

.section-heading {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 4px 2px 0;
}

.section-heading b {
  color: #fde68a;
  font-size: 16px;
  font-weight: 900;
}

.section-heading span {
  color: #8fb4d8;
  font-size: 12px;
}

.analysis-grid {
  display: grid;
  gap: 8px;
}

.priority-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}

.secondary-grid {
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.95fr) minmax(0, 0.85fr);
}

.pattern-table {
  font-size: 12px;
}

.pattern-table th,
.pattern-table td {
  text-align: center;
  line-height: 1.45;
}

.pattern-table tr.active-pattern td {
  background: rgba(103, 232, 249, 0.1);
  color: #e0faff;
  font-weight: 900;
}

.pattern-panel .panel-body {
  padding: 0;
}

.overall-conclusion {
  display: grid;
  gap: 8px;
  color: #ffe66d;
  font-size: 18px;
  line-height: 1.55;
}

.overall-conclusion small {
  color: #8fb4d8;
  font-size: 12px;
  line-height: 1.5;
}

.mini-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.mini-card {
  min-height: 170px;
  border: 1px solid rgba(49, 130, 206, 0.35);
  border-radius: 6px;
  background: rgba(2, 8, 18, 0.78);
  padding: 8px;
}

.mini-card h4 {
  margin: 0 0 6px;
  text-align: center;
  color: #dcecff;
  font-size: 15px;
}

.mini-note {
  margin-top: 5px;
  color: #dcecff;
  font-size: 12px;
  line-height: 1.45;
}

.mini-note b,
.mini-note span,
.mini-note small {
  display: block;
}

.mini-note b {
  color: #ffe66d;
  font-size: 13px;
  margin-bottom: 3px;
}

.mini-note span {
  color: #dcecff;
}

.mini-note small {
  margin-top: 3px;
  color: #8fb4d8;
  font-size: 11px;
  line-height: 1.35;
}

.pattern-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.pattern-box {
  min-height: 178px;
  border: 1px solid rgba(49, 130, 206, 0.35);
  border-radius: 6px;
  background: rgba(2, 8, 18, 0.78);
  padding: 8px;
}

.pattern-box h4 {
  margin: 0 0 6px;
  text-align: center;
}

.pattern-meaning {
  display: grid;
  gap: 4px;
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.45;
}

.pattern-meaning b {
  color: #ffe66d;
  font-size: 13px;
}

.pattern-meaning span {
  color: #dcecff;
}

.pattern-meaning small {
  color: #8fb4d8;
  font-size: 11px;
}

.pattern-meaning em {
  color: #f8fafc;
  font-style: normal;
  font-weight: 800;
}

.chart-caption {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  padding: 4px 8px 7px;
  border-bottom: 1px solid rgba(53, 117, 189, 0.32);
  color: #dcecff;
  font-size: 14px;
}

.chart-caption b {
  color: var(--yellow);
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  padding: 6px 8px;
  border-bottom: 1px solid rgba(53, 117, 189, 0.25);
  color: #bcd2ee;
  font-size: 12px;
}

.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.chart-legend i {
  width: 18px;
  height: 3px;
  border-radius: 999px;
  flex: 0 0 auto;
}

.chart-legend i.dash {
  background: repeating-linear-gradient(90deg, #f8fafc 0 6px, transparent 6px 10px);
}

.indicator-chart {
  border-top: 1px solid rgba(59, 130, 246, 0.28);
  background: #020617;
}

.indicator-head {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 30px;
  padding: 6px 8px 0;
  color: #cbd5e1;
  font-size: 13px;
  white-space: nowrap;
  overflow-x: auto;
}

.indicator-head span {
  color: #f8fafc;
  font-weight: 800;
}

.indicator-head b {
  font-weight: 800;
}

.indicator-head small {
  color: #94a3b8;
}

.indicator-plain {
  display: grid;
  grid-template-columns: 138px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 4px 8px 7px;
  color: #bcd2ee;
  font-size: 12px;
  line-height: 1.45;
}

.technical-strip {
  border-top: 1px solid rgba(59, 130, 246, 0.32);
  background: #020617;
}

.technical-strip h3 {
  margin: 0;
  padding: 5px 8px 2px;
  color: #67e8f9;
  text-align: center;
  font-size: 18px;
  font-weight: 900;
}

.technical-strip h3 span {
  color: #8fb4d8;
  font-size: 13px;
}

.technical-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 142px;
  border-top: 1px solid rgba(53, 117, 189, 0.35);
  border-bottom: 1px solid rgba(53, 117, 189, 0.35);
}

.technical-mini {
  min-width: 0;
  padding: 4px 8px 2px;
  border-right: 1px solid rgba(53, 117, 189, 0.45);
}

.mini-head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 20px;
  color: #f8fafc;
  font-size: 13px;
  font-weight: 800;
}

.mini-head span {
  color: #dcecff;
  font-weight: 600;
}

.mini-head em {
  margin-left: auto;
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
}

.mini-head em + em {
  margin-left: 0;
}

.technical-values {
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 8px 10px;
  color: #dcecff;
}

.technical-values div {
  display: grid;
  grid-template-columns: 48px 1fr 18px;
  align-items: baseline;
  gap: 6px;
  font-size: 13px;
}

.technical-values span {
  color: #facc15;
  font-weight: 900;
}

.technical-values b {
  color: #e2e8f0;
  text-align: right;
}

.technical-values i {
  font-style: normal;
  text-align: right;
  font-weight: 900;
}

.technical-values small {
  color: #cbd5e1;
  font-size: 11px;
}

.technical-bottom {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr) 142px;
  align-items: center;
  min-height: 86px;
}

.volume-title {
  color: #dcecff;
  text-align: center;
  font-size: 15px;
  font-weight: 800;
}

.volume-mini {
  min-width: 0;
  padding: 2px 8px;
}

.volume-values span {
  color: #8fb4d8;
}

.indicator-plain b {
  color: #ffe66d;
  font-size: 12px;
}

.indicator-plain span {
  min-width: 0;
}

.backtest-head {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 8px;
}

.backtest-head div {
  border: 1px solid rgba(80, 120, 170, 0.38);
  border-radius: 6px;
  background: rgba(5, 17, 34, 0.8);
  padding: 7px 5px;
  text-align: center;
}

.backtest-head span {
  display: block;
  color: #9db5d5;
  font-size: 11px;
}

.backtest-head b {
  display: block;
  margin-top: 2px;
  color: #fde68a;
  font-size: 20px;
}

.backtest-table td,
.backtest-table th {
  text-align: center;
}

.fib-backtest-note {
  display: grid;
  grid-template-columns: 88px 1fr auto;
  align-items: center;
  gap: 8px;
  margin: 8px 0;
  padding: 8px;
  border: 1px solid rgba(245, 211, 75, 0.34);
  border-radius: 6px;
  background: rgba(31, 25, 7, 0.72);
}

.fib-backtest-note span {
  color: var(--yellow);
  font-size: 12px;
  font-weight: 800;
}

.fib-backtest-note b {
  color: #fff7c2;
  font-size: 13px;
}

.fib-backtest-note small {
  color: #d8c06a;
  font-size: 12px;
}

.level-row,
.metric-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 7px;
  padding: 7px 9px;
  border: 1px solid rgba(80, 120, 170, 0.38);
  border-radius: 5px;
  background: rgba(5, 17, 34, 0.8);
}

.fib-row {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 8px;
  margin-bottom: 7px;
  padding: 7px 9px;
  border: 1px solid rgba(245, 211, 75, 0.34);
  border-radius: 5px;
  background: rgba(31, 25, 7, 0.72);
}

.fib-row > span {
  color: var(--yellow);
  font-weight: 800;
}

.fib-row div {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.fib-row div span {
  border: 1px solid rgba(245, 211, 75, 0.28);
  border-radius: 999px;
  background: rgba(245, 211, 75, 0.08);
  color: #f8e8a4;
  padding: 2px 7px;
  font-size: 12px;
}

.fib-row b {
  color: #fff7c2;
}

.lamp {
  width: 70px;
  height: 70px;
  margin: 8px auto;
  border-radius: 999px;
  box-shadow: 0 0 22px currentColor;
}

.main-force-card {
  text-align: center;
}

.main-force-stage {
  font-size: 24px;
  font-weight: 900;
}

.main-force-plain {
  margin-top: 4px;
  color: #dcecff;
  font-size: 14px;
  font-weight: 800;
}

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

.force-metrics div {
  border: 1px solid rgba(80, 120, 170, 0.38);
  border-radius: 6px;
  background: rgba(5, 20, 38, 0.62);
  padding: 7px;
}

.force-metrics span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.force-metrics b {
  display: block;
  margin-top: 3px;
  font-size: 13px;
  line-height: 1.35;
}

.data-note {
  display: block;
  color: #8fb4d8;
  font-size: 11px;
  line-height: 1.45;
}

.chance-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  text-align: center;
}

.chance-box {
  padding: 10px 5px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.045);
}

.chance-box b {
  display: block;
  font-size: 32px;
}

.tomorrow-panel {
  border: 2px solid rgba(255, 38, 61, 0.7);
  border-radius: 10px;
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 80, 30, 0.18), transparent 26rem),
    linear-gradient(180deg, rgba(45, 7, 10, 0.96), rgba(7, 8, 18, 0.98));
  box-shadow: 0 0 24px rgba(255, 38, 61, 0.18), inset 0 0 18px rgba(255, 38, 61, 0.12);
  padding: 12px;
}

.tomorrow-panel h3 {
  margin: 0 0 10px;
  text-align: center;
  color: #ffe66d;
  font-size: 18px;
}

.tomorrow-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.tomorrow-grid div {
  border: 1px solid rgba(255, 230, 109, 0.35);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.28);
  padding: 8px 4px;
  text-align: center;
}

.tomorrow-grid span,
.tomorrow-grid small {
  display: block;
  color: #f8d9a0;
}

.tomorrow-grid b {
  display: block;
  font-size: 30px;
  line-height: 1.15;
}

.chance-factor-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-top: 9px;
}

.chance-factor-row span {
  border: 1px solid rgba(255, 230, 109, 0.28);
  border-radius: 999px;
  background: rgba(255, 230, 109, 0.08);
  color: #ffe8a3;
  padding: 3px 8px;
  font-size: 12px;
}

.tomorrow-panel p {
  margin: 10px 0 0;
  color: #ffd7d7;
  font-size: 14px;
  line-height: 1.6;
}

.summary {
  font-size: 14px;
  line-height: 1.65;
  color: #dcecff;
}

.action-advice {
  display: grid;
  gap: 8px;
}

.action-head {
  color: #ffe66d;
  font-size: 17px;
  font-weight: 900;
}

.action-advice div:not(.action-head) {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 7px 8px;
  border: 1px solid rgba(80, 120, 170, 0.34);
  border-radius: 6px;
  background: rgba(5, 20, 38, 0.5);
}

.action-advice span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.action-advice b {
  color: #dcecff;
  font-size: 13px;
  line-height: 1.45;
}

.action-advice p {
  margin: 0;
  color: #8fb4d8;
  font-size: 12px;
  line-height: 1.5;
}

.empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--muted);
}

@media (max-width: 1050px) {
  .terminal-grid,
  .main-row,
  .analysis-grid,
  .bottom-grid,
  .quote-strip,
  .tomorrow-grid {
    grid-template-columns: 1fr;
  }

  .toolbar {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .toolbar h1 {
    flex: 1 0 100%;
  }

  .toolbar input {
    flex: 1 1 170px;
  }

  .right-stack,
  .source-strip,
  .market-strip {
    grid-column: auto;
    grid-row: auto;
  }
}
