*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0f0e17;
  --surface: #1a1830;
  --surface2: #231f3a;
  --border: #2e2a4a;
  --accent: #a78bfa;
  --accent2: #f59e0b;
  --text: #e2e0f0;
  --text-dim: #8b87aa;
  --user-bubble: #2d2b55;
  --ai-bubble: #1e1c38;
  --success: #34d399;
  --danger: #f87171;
  --radius: 12px;
}

body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ── Login overlay ──────────────────────────────────── */
#login-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at 50% 40%, #1e1a40 0%, #0f0e17 70%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

#login-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 52px 48px 44px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 32px 80px rgba(0,0,0,.6);
  max-width: 380px;
  width: 90%;
  text-align: center;
}

#login-logo {
  height: 82px;
  width: auto;
  filter: brightness(0) invert(1);
  object-fit: contain;
}


#login-sub {
  font-size: .9rem;
  color: var(--text-dim);
  line-height: 1.5;
}

#login-divider {
  width: 48px;
  height: 2px;
  background: var(--border);
  border-radius: 2px;
}

#login-note {
  font-size: .74rem;
  color: var(--text-dim);
  opacity: .7;
}

/* ── Top navigation bar ─────────────────────────────── */
#topbar {
  display: flex;
  align-items: center;
  height: 85px;
  padding: 0 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  gap: 16px;
  z-index: 100;
}

#topbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

#topbar-logo {
  height: 75px;
  width: auto;
  filter: brightness(0) invert(1);
  object-fit: contain;
}


#topbar-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── User chip (in topbar) ──────────────────────────── */
#user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 30px;
  padding: 4px 14px 4px 5px;
}

#user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
}

#user-name {
  font-size: .82rem;
  color: var(--text);
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#logout-btn {
  background: transparent;
  border: none;
  border-left: 1px solid var(--border);
  color: var(--text-dim);
  padding: 2px 0 2px 12px;
  margin-left: 4px;
  font-size: .78rem;
  cursor: pointer;
  transition: color .15s;
  white-space: nowrap;
}
#logout-btn:hover { color: var(--danger); }

/* ── Main layout ────────────────────────────────────── */
#main {
  flex: 1;
  display: flex;
  overflow: hidden;
  min-height: 0;
}

/* ── Chat panel ─────────────────────────────────────── */
#chat-panel {
  width: 400px;
  min-width: 320px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
}

#phase-badge {
  font-size: .7rem;
  padding: 3px 9px;
  border-radius: 20px;
  background: var(--surface2);
  color: var(--accent2);
  border: 1px solid var(--border);
  text-transform: uppercase;
  letter-spacing: .06em;
}

#messages {
  flex: 1;
  overflow-y: auto;
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.msg {
  max-width: 88%;
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: .9rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}
.msg.user {
  background: var(--user-bubble);
  align-self: flex-end;
  border-bottom-right-radius: 3px;
}
.msg.assistant {
  background: var(--ai-bubble);
  align-self: flex-start;
  border-bottom-left-radius: 3px;
  border: 1px solid var(--border);
}
.msg.system-info {
  background: transparent;
  border: 1px dashed var(--border);
  color: var(--text-dim);
  font-size: .78rem;
  align-self: center;
  padding: 5px 12px;
}

#input-area {
  padding: 12px 14px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
}

#user-input {
  flex: 1;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 9px 13px;
  font-size: .9rem;
  resize: none;
  outline: none;
  line-height: 1.4;
}
#user-input:focus { border-color: var(--accent); }

#send-btn {
  background: var(--accent);
  color: #0f0e17;
  border: none;
  border-radius: 8px;
  padding: 0 16px;
  font-size: 1.1rem;
  cursor: pointer;
  font-weight: 700;
}
#send-btn:hover { opacity: .85; }
#send-btn:disabled { opacity: .4; cursor: not-allowed; }

#analyse-btn {
  width: 100%;
  margin: 0;
  background: var(--accent2);
  color: #0f0e17;
  border: none;
  border-radius: 8px;
  padding: 10px;
  font-weight: 700;
  font-size: .9rem;
  cursor: pointer;
}
#analyse-btn:hover { opacity: .85; }
#analyse-btn:disabled { opacity: .4; cursor: not-allowed; }
#chat-domain-bar {
  padding: 10px 14px 12px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: none;
}

.chat-domain-label {
  font-size: .68rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: .07em;
  margin-bottom: 7px;
}

.chat-domain-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.chat-domain-btn {
  padding: 4px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-dim);
  font-size: .75rem;
  cursor: pointer;
  transition: all .15s;
}
.chat-domain-btn:hover {
  background: var(--surface2);
  color: var(--text);
  border-color: var(--accent);
}
.chat-domain-btn:disabled { opacity: .35; cursor: not-allowed; }

#analyse-wrap { padding: 10px 14px; background: var(--surface); border-top: 1px solid var(--border); display: none; }

/* ── Analysis panel ─────────────────────────────────── */
#analysis-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}


#domain-bar {
  display: flex;
  gap: 6px;
  padding: 9px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  flex-shrink: 0;
}
#domain-bar::-webkit-scrollbar { height: 3px; }

.domain-btn {
  white-space: nowrap;
  padding: 4px 13px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-dim);
  font-size: .75rem;
  cursor: pointer;
  transition: all .15s;
  flex-shrink: 0;
}
.domain-btn:hover {
  background: var(--surface2);
  color: var(--text);
  border-color: var(--accent);
}
.domain-btn.active {
  background: var(--accent);
  color: #0f0e17;
  border-color: var(--accent);
  font-weight: 600;
}
.domain-btn:disabled {
  opacity: .35;
  cursor: not-allowed;
}

#analysis-tabs {
  display: flex;
  gap: 4px;
  padding: 8px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  align-items: center;
}

.tab-btn {
  padding: 5px 14px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-dim);
  font-size: .8rem;
  cursor: pointer;
  transition: all .15s;
}
.tab-btn.active, .tab-btn:hover {
  background: var(--surface2);
  color: var(--text);
  border-color: var(--accent);
}

#save-report-btn {
  margin-left: auto;
  padding: 4px 12px;
  border-radius: 6px;
  border: 1px solid var(--accent2);
  background: transparent;
  color: var(--accent2);
  font-size: .75rem;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}
#save-report-btn:hover { background: #2a1f00; }
#save-report-btn:disabled { opacity: .35; cursor: default; }

.tab-content { display: none; flex: 1; overflow-y: auto; padding: 20px; }
.tab-content.active { display: block; }

/* Report + BNN markdown rendering */
#report-content, #bnn-content {
  font-size: .88rem;
  line-height: 1.7;
  color: var(--text);
}
#report-content h1, #report-content h2, #report-content h3,
#bnn-content h1, #bnn-content h2, #bnn-content h3 {
  color: var(--accent);
  margin: 1.2em 0 .4em;
}
#report-content h1, #bnn-content h1 { font-size: 1.2rem; }
#report-content h2, #bnn-content h2 { font-size: 1.05rem; }
#report-content h3, #bnn-content h3 { font-size: .95rem; color: var(--accent2); }
#report-content p, #bnn-content p { margin-bottom: .7em; }
#report-content strong, #bnn-content strong { color: var(--accent2); }
#report-content ul, #report-content ol,
#bnn-content ul, #bnn-content ol { padding-left: 1.4em; margin-bottom: .7em; }

/* BNN tab section dividers */
#bnn-content h2 {
  border-top: 1px solid var(--border);
  padding-top: .8em;
  margin-top: 1.4em;
}

/* ── South Indian Vedic Chart ────────────────────────── */

/* Container for multiple charts side by side */
.vchart-row {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  align-items: flex-start;
}

.vchart-wrap {
  flex: 0 0 auto;
}

.vchart-title {
  font-size: .75rem;
  color: var(--accent2);
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 10px;
  font-weight: 700;
  text-align: center;
}

/* 4×4 grid — each cell 110px, total 440px square */
.vchart-grid {
  display: grid;
  grid-template-columns: repeat(4, 110px);
  grid-template-rows: repeat(4, 110px);
  border: 2px solid var(--accent);
}

/* Every border cell */
.vchart-cell {
  border: 1px solid #3a3560;
  padding: 7px 8px;
  display: flex;
  flex-direction: column;
  background: #161428;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

/* Empty center 2×2 */
.vchart-cell.vchart-center {
  background: #0c0b18;
  border-color: #2a2645;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Lagna cell gets highlighted border + tint */
.vchart-cell.vchart-lagna {
  background: #1e1a3a;
  border: 2px solid var(--accent2);
  box-shadow: inset 0 0 12px rgba(245,158,11,.08);
}

.vchart-center-label {
  font-size: .65rem;
  color: var(--accent);
  text-align: center;
  opacity: .55;
  line-height: 1.4;
}

/* Top row of each house cell: sign label + badges */
.vchart-cell-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 4px;
}

.vchart-sign {
  font-size: .62rem;
  color: #5a5680;
  font-weight: 600;
  letter-spacing: .03em;
}

.vchart-badges {
  display: flex;
  gap: 3px;
  align-items: center;
}

.vchart-hnum {
  font-size: .55rem;
  color: var(--accent);
  background: rgba(167,139,250,.1);
  border: 1px solid rgba(167,139,250,.25);
  border-radius: 3px;
  padding: 1px 4px;
  line-height: 1.3;
}

.vchart-sav {
  font-size: .55rem;
  color: var(--accent2);
  background: rgba(245,158,11,.1);
  border: 1px solid rgba(245,158,11,.2);
  border-radius: 3px;
  padding: 1px 4px;
  line-height: 1.3;
}

/* Planet names */
.vchart-planets {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.vchart-planet {
  display: flex;
  align-items: baseline;
  gap: 3px;
  line-height: 1.3;
  overflow: hidden;
}

.vp-name {
  font-size: .78rem;
  color: #d4d0f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vp-deg {
  font-size: .6rem;
  color: #7a75a8;
  flex-shrink: 0;
}

.vp-tag {
  font-size: .58rem;
  font-weight: 700;
  border-radius: 2px;
  padding: 0 3px;
  flex-shrink: 0;
  line-height: 1.4;
}
.vp-exalt  { background: #1a3a1a; color: #6fcf97; }
.vp-debil  { background: #3a1a1a; color: #eb5757; }
.vp-retro  { color: #f59e0b; background: transparent; }

.vp-exalted    .vp-name { color: #6fcf97; }
.vp-debilitated .vp-name { color: #f87171; }

/* Ascendant / Lagna label */
.vchart-asc {
  color: var(--accent2) !important;
  font-weight: 700;
  margin-bottom: 12px;
  font-weight: 700;
}

.vchart-yoga-count {
  background: var(--surface2);
  border-radius: 10px;
  padding: 1px 7px;
  font-size: .7rem;
  color: var(--accent);
  margin-left: 6px;
}

.vchart-yoga-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.vchart-yoga-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 7px 12px;
  background: var(--surface);
  border-radius: 6px;
  border-left: 3px solid var(--accent);
}

.vchart-yoga-name {
  font-size: .8rem;
  color: var(--accent2);
  font-weight: 600;
}

.vchart-yoga-cond {
  font-size: .72rem;
  color: var(--accent);
  opacity: .7;
  line-height: 1.4;
  font-style: italic;
}

.vchart-yoga-effect {
  font-size: .75rem;
  color: var(--text-dim);
  line-height: 1.4;
}

/* ── Dasha / plain tables (kept for dasha tab) ───────── */
.chart-table-wrap { margin-bottom: 24px; }
.chart-table-wrap h3 {
  font-size: .85rem;
  color: var(--accent2);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.chart-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .82rem;
}
.chart-table th {
  background: var(--surface2);
  color: var(--accent);
  padding: 6px 10px;
  text-align: left;
  border: 1px solid var(--border);
}
.chart-table td {
  padding: 5px 10px;
  border: 1px solid var(--border);
  color: var(--text-dim);
  vertical-align: top;
}
.chart-table tr:hover td { background: var(--surface2); color: var(--text); }

/* Current dasha chain panel */
.dasha-section-label {
  font-size: .72rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: .07em;
  margin-bottom: 10px;
  font-weight: 600;
}
.dasha-chain-wrap { margin-bottom: 28px; }
.dasha-chain-grid { display: flex; flex-direction: column; gap: 4px; }
.dasha-chain-row {
  display: grid;
  grid-template-columns: 150px 110px 1fr 90px;
  align-items: center;
  padding: 7px 12px;
  border-radius: 6px;
  background: var(--surface);
  border-left: 3px solid var(--border);
  font-size: .82rem;
  gap: 8px;
}
.dasha-chain-row:first-child  { border-left-color: var(--accent);  background: #1a1838; }
.dasha-chain-row:nth-child(2) { border-left-color: var(--accent2); }
.dasha-chain-row:nth-child(3) { border-left-color: #60a5fa; }
.dasha-chain-row:nth-child(4) { border-left-color: var(--success); }
.dasha-chain-row:nth-child(5) { border-left-color: var(--danger);  }
.dasha-chain-level { color: var(--text-dim); font-size: .75rem; }
.dasha-chain-lord  { color: var(--text); font-weight: 700; }
.dasha-chain-range { color: var(--text-dim); font-size: .78rem; }
.dasha-chain-dur   { color: var(--accent2); font-size: .75rem; text-align: right; }

/* Upcoming dasha periods table */
.dasha-upcoming-table { width: 100%; }
.dasha-maha  { color: var(--text); font-weight: 600; }
.dasha-sep   { color: var(--text-dim); margin: 0 3px; font-size: .72rem; }
.dasha-antar { color: var(--accent2); }
.dasha-now-badge {
  display: inline-block;
  font-size: .55rem;
  background: var(--accent);
  color: #0f0e17;
  border-radius: 3px;
  padding: 1px 5px;
  font-weight: 700;
  letter-spacing: .04em;
  vertical-align: middle;
  margin-left: 5px;
}

/* ── Brigu Nadi card ─────────────────────────────────── */
.bnn-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 2px solid var(--accent2);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 24px;
}
.bnn-title {
  font-size: .82rem;
  font-weight: 700;
  color: var(--accent2);
  text-transform: uppercase;
  letter-spacing: .07em;
  margin-bottom: 14px;
}
.bnn-block { margin-bottom: 14px; }
.bnn-block-transit { border-top: 1px solid var(--border); padding-top: 12px; }
.bnn-block-label {
  font-size: .78rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 7px;
}
.bnn-activated {
  font-size: .78rem;
  color: var(--text);
  background: #1e1a38;
  border-left: 3px solid var(--accent2);
  padding: 5px 10px;
  border-radius: 4px;
  margin-bottom: 8px;
}
.bnn-act-label { color: var(--text-dim); font-size: .72rem; margin-right: 5px; }
.bnn-row {
  display: grid;
  grid-template-columns: 140px 110px 1fr;
  gap: 6px;
  align-items: baseline;
  padding: 3px 0;
  font-size: .78rem;
  border-bottom: 1px solid #1e1c38;
}
.bnn-row:last-child { border-bottom: none; }
.bnn-row-label  { color: var(--text-dim); }
.bnn-row-sign   { color: var(--accent2); font-weight: 600; }
.bnn-row-planets { color: var(--text); }
.bnn-row-note   { color: var(--text-dim); font-size: .72rem; font-style: italic; }
.bnn-ref {
  font-size: .76rem;
  color: var(--text-dim);
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.bnn-ref strong { color: var(--text); }
.bnn-planet-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .76rem;
  margin-bottom: 8px;
}
.bnn-planet-table th {
  color: var(--text-dim);
  font-weight: 600;
  font-size: .7rem;
  text-align: left;
  padding: 3px 8px 3px 0;
  border-bottom: 1px solid var(--border);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.bnn-planet-table td {
  padding: 3px 8px 3px 0;
  border-bottom: 1px solid #1e1c38;
  color: var(--text);
  vertical-align: middle;
}
.bnn-planet-table tr:last-child td { border-bottom: none; }
.bnn-dignity {
  display: inline-block;
  font-size: .68rem;
  font-weight: 700;
  border-radius: 3px;
  padding: 1px 5px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.bnn-dig-exalted     { background: #1a3a1a; color: #6fcf97; border: 1px solid #2d6a2d; }
.bnn-dig-debilitated { background: #3a1a1a; color: #eb5757; border: 1px solid #6a2d2d; }
.bnn-dig-own_sign    { background: #1a2e3a; color: #56b4d3; border: 1px solid #2d5a6a; }

/* Dasha interpretation */
.dasha-interp { font-size: .85rem; line-height: 1.7; color: var(--text); }
.dasha-interp h2 { color: var(--accent); font-size: .95rem; margin: .8em 0 .3em; }
.dasha-interp h3 { color: var(--accent2); font-size: .85rem; margin: .6em 0 .2em; }
.dasha-interp p  { margin-bottom: .6em; }
.dasha-interp strong { color: var(--accent2); }

/* Dasha table */
.dasha-current { background: #1a2e1a !important; color: var(--success) !important; }

/* Report loading animation */
.report-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 60px 20px;
  color: var(--text-dim);
}
.report-loading-spinner {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  animation: spin .9s linear infinite;
}
.report-loading-msg {
  font-size: .88rem;
  color: var(--text-dim);
  transition: opacity .3s;
  letter-spacing: .02em;
}

/* Feed transit chart */
.feed-transit-section { margin-bottom: 24px; }
.feed-transit-chart .chart-grid-container { max-width: 280px; }

/* Status dot */
.spinner {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  border-top-color: transparent;
  animation: spin .7s linear infinite;
  margin-right: 6px;
  vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

#status-bar {
  padding: 8px 20px;
  font-size: .78rem;
  color: var(--text-dim);
  background: var(--surface);
  border-top: 1px solid var(--border);
  min-height: 32px;
}

/* Scrollbars */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ── Daily Feed tab ──────────────────────────────────── */
.feed-panchanga {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.feed-pan-row { display: flex; flex-wrap: wrap; gap: 14px; }
.feed-pan-item { display: flex; flex-direction: column; gap: 2px; font-size: .8rem; color: var(--text); }
.feed-pan-label { font-size: .62rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: .06em; }
.feed-pan-item.feed-avoid { color: var(--danger); }

.feed-section-label {
  font-size: .72rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: .07em;
  margin-bottom: 10px;
  font-weight: 600;
}

.feed-hora-section { margin-bottom: 24px; }

.feed-hora-timeline {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 6px;
}
.feed-hora-timeline::-webkit-scrollbar { height: 3px; }

.feed-hora-card {
  flex: 0 0 auto;
  width: 88px;
  padding: 8px 8px 6px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 3px;
  cursor: default;
  transition: border-color .15s;
}
.feed-hora-card:hover { border-color: var(--accent); }

.feed-hora-best    { border-left: 3px solid var(--success); }
.feed-hora-good    { border-left: 3px solid var(--accent); }
.feed-hora-caution { border-left: 3px solid var(--accent2); }
.feed-hora-avoid   { border-left: 3px solid var(--danger); opacity: .7; }

.feed-hora-now {
  border-color: var(--accent2) !important;
  background: #1e1a38;
}

.feed-hora-time {
  font-size: .68rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 4px;
}
.feed-hora-now-badge {
  font-size: .55rem;
  background: var(--accent2);
  color: #0f0e17;
  border-radius: 3px;
  padding: 1px 4px;
  font-weight: 700;
  letter-spacing: .04em;
}
.feed-hora-planet { font-size: .82rem; font-weight: 700; color: var(--text); }
.feed-hora-night  { font-size: .62rem; color: var(--text-dim); }
.feed-hora-good-for { font-size: .62rem; color: var(--text-dim); line-height: 1.3; margin-top: 2px; }
.feed-hora-avoid-txt { font-size: .6rem; color: var(--danger); margin-top: 1px; }

.feed-text {
  font-size: .88rem;
  line-height: 1.7;
  color: var(--text);
}
.feed-text h2 { color: var(--accent); margin: 1.2em 0 .4em; font-size: 1rem; }
.feed-text h3 { color: var(--accent2); margin: 1em 0 .3em; font-size: .92rem; }
.feed-text p  { margin-bottom: .7em; }
.feed-text strong { color: var(--accent2); }
.feed-text ul, .feed-text ol { padding-left: 1.4em; margin-bottom: .7em; }

/* Empty state */
#empty-state {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 10px;
  color: var(--text-dim);
  font-size: .9rem;
}
#empty-state .icon { font-size: 2.5rem; }

/* ── Intake widgets ──────────────────────────────────── */
.chat-widget {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin: 8px 0 4px;
  max-width: 88%;
  align-self: flex-start;
}

.widget-label {
  font-size: .82rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 10px;
}

.widget-hint {
  font-size: .74rem;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.widget-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.widget-date-input {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 12px;
  color: var(--text);
  font-size: .85rem;
  color-scheme: dark;
}
.widget-date-input:focus {
  outline: none;
  border-color: var(--accent);
}

.widget-btn {
  background: var(--accent);
  color: #0f0e17;
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: .82rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity .15s;
}
.widget-btn:disabled { opacity: .35; cursor: default; }
.widget-btn:not(:disabled):hover { opacity: .85; }

/* Place autocomplete */
.widget-place-wrap {
  position: relative;
  margin-bottom: 10px;
}

.widget-place-input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  color: var(--text);
  font-size: .85rem;
}
.widget-place-input:focus {
  outline: none;
  border-color: var(--accent);
}

.widget-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  z-index: 100;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
}
.widget-dropdown[hidden] { display: none; }

.widget-dd-item {
  padding: 9px 14px;
  font-size: .82rem;
  color: var(--text);
  cursor: pointer;
  border-bottom: 1px solid #1e1c38;
  transition: background .1s;
}
.widget-dd-item:last-child { border-bottom: none; }
.widget-dd-item:not(.widget-dd-loading):not(.widget-dd-empty):hover {
  background: var(--surface);
  color: var(--accent);
}
.widget-dd-loading { color: var(--text-dim); cursor: default; font-style: italic; }
.widget-dd-empty   { color: var(--text-dim); cursor: default; }

/* Domain selection widget */
.domain-widget {
  border-left-color: var(--accent2);
  max-width: 100%;
}

.domain-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.domain-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-size: .8rem;
  transition: all .15s;
  white-space: nowrap;
}
.domain-card:hover:not(:disabled) {
  border-color: var(--accent2);
  background: var(--surface2);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,.3);
}
.domain-card .dc-emoji { font-size: 1.1rem; }
.domain-card .dc-label { font-weight: 600; font-size: .78rem; }

.dc-selected {
  border-color: var(--accent2) !important;
  background: #2a1f00 !important;
  color: var(--accent2) !important;
  opacity: 1 !important;
}
.dc-faded { opacity: 0.3; }

/* ── Planet mode legend ──────────────────────────────── */
.planet-legend {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  margin-bottom: 20px;
  overflow: hidden;
}
.planet-legend-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  font-size: .78rem;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
  user-select: none;
}
.planet-legend-header:hover { background: var(--surface2); }
.planet-legend-arrow { font-size: .7rem; color: var(--text-dim); }
.planet-legend-body { padding: 0 16px 14px; }

.pl-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid #1e1c38;
}
.pl-row:last-of-type { border-bottom: none; }
.pl-badge {
  display: inline-block;
  min-width: 52px;
  text-align: center;
  font-size: .72rem;
  font-weight: 700;
  border-radius: 4px;
  padding: 3px 8px;
  flex-shrink: 0;
  margin-top: 2px;
}
.pl-exalt  { background: #1a3a1a; color: #6fcf97; border: 1px solid #2d6a2d; }
.pl-debil  { background: #3a1a1a; color: #eb5757; border: 1px solid #6a2d2d; }
.pl-retro  { background: #2a1f00; color: #f59e0b; border: 1px solid #5a4000; }
.pl-normal { background: var(--surface2); color: var(--text-dim); border: 1px solid var(--border); }
.pl-info { font-size: .78rem; line-height: 1.55; color: var(--text); }
.pl-info strong { color: var(--accent2); }

.pl-exalt-table { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.pl-et-title {
  font-size: .72rem;
  color: var(--text-dim);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 8px;
}
.pl-exalt-table table { width: 100%; border-collapse: collapse; font-size: .76rem; }
.pl-exalt-table th {
  color: var(--text-dim);
  font-weight: 600;
  font-size: .7rem;
  text-align: left;
  padding: 3px 10px 3px 0;
  border-bottom: 1px solid var(--border);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.pl-exalt-table td {
  padding: 3px 10px 3px 0;
  color: var(--text);
  border-bottom: 1px solid #1e1c38;
}
.pl-exalt-table tr:last-child td { border-bottom: none; }

/* ── Print doc (hidden on screen) ───────────────────── */
#print-doc { display: none; }

/* ── Print / Save PDF ────────────────────────────────── */
@media print {
  @page { margin: 18mm 20mm; size: A4; }

  body > *:not(#print-doc) { display: none !important; }

  /* Global print reset — everything must fit within the page column */
  *, *::before, *::after {
    box-sizing: border-box !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
  }

  #print-doc {
    display: block !important;
    width: 100%;
    font-family: "Georgia", "Times New Roman", serif;
    font-size: 10.5pt;
    line-height: 1.7;
    color: #1C1C2E;
    background: #fff;
  }

  /* ════════════════════════════════
     COVER PAGE
  ════════════════════════════════ */
  .pd-cover {
    page-break-after: always;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 257mm;          /* A4 297mm − 2×18mm margins = ~261mm; a touch less to stay clean */
    padding: 14mm 16mm;
    background: #fff;
    text-align: center;
    outline: 4pt solid #C17F24;
    outline-offset: -8mm;
    position: relative;
  }

  /* corner ornaments */
  .pd-cover::before, .pd-cover::after {
    content: "✦";
    position: absolute;
    font-size: 18pt;
    color: #C17F24;
  }
  .pd-cover::before { top: 10mm; left: 12mm; }
  .pd-cover::after  { bottom: 10mm; right: 12mm; }

  .pd-logo { height: 52px; width: auto; margin-bottom: 5mm; }

  .pd-cover-rule {
    width: 60mm;
    height: 0;
    border-top: 1.5pt solid #C17F24;
    margin: 4mm auto;
  }

  /* Om + Ganesh SVG block */
  .pd-om-block { margin: 2mm 0 4mm; }
  .pd-ganesh-svg { width: 72mm; height: 72mm; display: block; margin: 0 auto 3mm; }
  .pd-om-namah {
    font-size: 17pt;
    font-weight: 700;
    color: #C17F24;
    letter-spacing: .06em;
    font-family: "Noto Serif Devanagari", "Mangal", serif;
  }

  /* Person name */
  .pd-person-name {
    font-size: 22pt;
    font-weight: 700;
    color: #1C2340;
    letter-spacing: .04em;
    margin: 4mm 0 3mm;
    text-transform: uppercase;
  }

  /* Birth details grid */
  .pd-birth-grid { width: 100%; max-width: 100mm; margin: 0 auto; }
  .pd-birth-row {
    display: flex;
    justify-content: space-between;
    border-bottom: 0.5pt solid #ddd;
    padding: 1.5mm 0;
    font-size: 10pt;
  }
  .pd-birth-row:last-child { border-bottom: none; }
  .pd-birth-label { color: #666; font-style: italic; }
  .pd-birth-val   { color: #1C2340; font-weight: 600; }

  .pd-cover-footer {
    position: absolute;
    bottom: 12mm;
    left: 0; right: 0;
    text-align: center;
    font-size: 8pt;
    color: #999;
    letter-spacing: .1em;
    text-transform: uppercase;
  }

  /* ════════════════════════════════
     CONTENT PAGES
  ════════════════════════════════ */

  /* Running header on every content page */
  .pd-section:first-of-type { padding-top: 0; }

  .pd-section {
    margin-bottom: 7mm;
  }

  .pd-section-title {
    font-size: 13pt;
    font-weight: 700;
    color: #7B2D3A;
    text-transform: uppercase;
    letter-spacing: .08em;
    border-left: 4pt solid #C17F24;
    padding: 1.5mm 0 1.5mm 4mm;
    margin: 0 0 4mm;
    page-break-after: avoid;
    background: #fdf8f0;
  }

  /* Prose headings inside sections */
  .pd-section h1, .pd-section h2, .pd-section h3 {
    page-break-after: avoid;
    color: #1C2340;
  }
  .pd-section h2 {
    font-size: 11.5pt;
    font-weight: 700;
    color: #1C2340;
    border-bottom: 0.5pt solid #C17F24;
    padding-bottom: 1mm;
    margin: 4mm 0 1.5mm;
    border-top: none;
    padding-top: 0;
  }
  .pd-section h3 {
    font-size: 10.5pt;
    font-weight: 700;
    color: #7B2D3A;
    margin: 3mm 0 1mm;
  }
  .pd-section p  { margin-bottom: 2mm; color: #1C1C2E; }
  .pd-section strong { color: #1C2340; font-weight: 700; }
  .pd-section em     { color: #7B2D3A; }
  .pd-section ul, .pd-section ol { padding-left: 6mm; margin-bottom: 2mm; }
  .pd-section li { margin-bottom: 1mm; }

  /* ── Charts ── */
  .vchart-row  { display: flex; flex-wrap: wrap; gap: 5px; width: 100%; }
  .vchart-wrap { break-inside: avoid; flex: 0 1 auto; max-width: 100%; }
  .vchart      { font-size: 6.5pt; width: auto !important; max-width: 100%; }
  .vchart table { font-size: 6.5pt; }

  /* All flex containers must wrap */
  .pd-birth-grid, .pd-details,
  [style*="display:flex"], [style*="display: flex"] {
    flex-wrap: wrap !important;
    max-width: 100% !important;
  }

  /* ── Tables (Dasha, BNN) ── */
  .dasha-table, .bnn-planet-table {
    font-size: 8.5pt;
    width: 100% !important;
    max-width: 100% !important;
    table-layout: fixed;
    border-collapse: collapse;
    margin-bottom: 3mm;
    break-inside: avoid;
  }
  .dasha-table td, .dasha-table th,
  .bnn-planet-table td, .bnn-planet-table th {
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
  }
  .dasha-table th, .dasha-table td,
  .bnn-planet-table th, .bnn-planet-table td {
    border: 0.5pt solid #ccc;
    padding: 1.5mm 2.5mm;
    color: #1C1C2E !important;
    background: #fff !important;
  }
  .dasha-table th, .bnn-planet-table th {
    background: #fdf8f0 !important;
    color: #7B2D3A !important;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 7.5pt;
    letter-spacing: .05em;
  }
  .dasha-table tr:nth-child(even) td,
  .bnn-planet-table tr:nth-child(even) td { background: #fafafa !important; }

  /* ── Dasha chain / current period highlight ── */
  .dasha-current { background: #fdf0d8 !important; font-weight: 600; }

  /* ── Disclaimer ── */
  .pd-disclaimer {
    margin-top: 10mm;
    padding: 4mm 5mm;
    border: 0.5pt solid #ccc;
    background: #f9f9f9 !important;
    page-break-inside: avoid;
  }
  .pd-disclaimer-title {
    font-size: 10pt;
    font-weight: 700;
    color: #555;
    text-transform: uppercase;
    letter-spacing: .07em;
    margin-bottom: 2mm;
  }
  .pd-disclaimer p {
    font-size: 8pt;
    color: #666 !important;
    line-height: 1.5;
    margin-bottom: 1.5mm;
  }

  /* ── Copyright ── */
  .pd-copyright {
    margin-top: 4mm;
    text-align: center;
    font-size: 7.5pt;
    color: #999 !important;
    letter-spacing: .06em;
    border-top: 0.5pt solid #ddd;
    padding-top: 2mm;
  }

  /* ── Global overrides for dark-theme elements ── */
  * {
    color: #1C1C2E !important;
    background: transparent !important;
    border-color: #ccc !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }
  /* Restore intentional colors */
  .pd-section-title        { color: #7B2D3A !important; background: #fdf8f0 !important; border-color: #C17F24 !important; }
  .pd-section h2           { color: #1C2340 !important; border-color: #C17F24 !important; }
  .pd-section h3           { color: #7B2D3A !important; }
  .pd-section strong       { color: #1C2340 !important; }
  .pd-om-namah             { color: #C17F24 !important; }
  .pd-person-name          { color: #1C2340 !important; }
  .pd-birth-label          { color: #666    !important; }
  .pd-birth-val            { color: #1C2340 !important; }
  .pd-disclaimer p         { color: #666    !important; }
  .pd-copyright            { color: #999    !important; }
  .pd-disclaimer           { background: #f9f9f9 !important; }
  .pd-cover                { background: #fff !important; outline-color: #C17F24 !important; }
  .dasha-table th, .bnn-planet-table th { background: #fdf8f0 !important; color: #7B2D3A !important; }
  img { filter: none !important; -webkit-filter: none !important; }
}

/* ── Stars / Nakshatra tab ──────────────────────────── */
.nak-janma-banner {
  background: linear-gradient(135deg, rgba(167,139,250,.18), rgba(245,158,11,.1));
  border: 1px solid rgba(167,139,250,.35);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 20px;
}
.nak-janma-top {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 10px;
}
.nak-janma-label {
  font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-dim);
}
.nak-janma-star {
  font-size: 1.3rem; font-weight: 700; color: var(--accent);
}
.nak-janma-meta { color: var(--text); font-size: .92rem; }
.nak-janma-theme {
  font-size: .95rem; font-weight: 600; color: var(--accent2); margin-bottom: 8px;
}
.nak-janma-interp {
  font-size: .88rem; color: var(--text); line-height: 1.6;
}
.nak-janma-note {
  font-size: .78rem; color: var(--text-dim); font-style: italic;
}

.nak-section { margin-bottom: 28px; }
.nak-section-title {
  font-size: .75rem; text-transform: uppercase; letter-spacing: .08em;
  color: var(--text-dim); border-bottom: 1px solid var(--border);
  padding-bottom: 6px; margin-bottom: 10px;
}
.nak-chain-intro {
  font-size: .84rem; color: var(--text-dim); margin-bottom: 14px; line-height: 1.5;
}

.nak-table {
  width: 100%; border-collapse: collapse; font-size: .84rem;
}
.nak-table th {
  text-align: left; padding: 7px 10px; background: var(--surface2);
  color: var(--text-dim); font-weight: 600; font-size: .73rem;
  text-transform: uppercase; letter-spacing: .05em;
  border-bottom: 1px solid var(--border);
}
.nak-table td {
  padding: 8px 10px; border-bottom: 1px solid rgba(46,42,74,.5); vertical-align: middle;
}
.nak-table tr:last-child td { border-bottom: none; }
.nak-table tbody tr:hover td { background: rgba(167,139,250,.05); }

.nak-row-janma td { background: rgba(167,139,250,.08); }
.nak-row-janma:hover td { background: rgba(167,139,250,.13) !important; }

.nak-planet    { font-weight: 600; color: var(--text); }
.nak-name      { color: var(--accent); font-style: italic; }
.nak-lord      { color: var(--accent2); }
.nak-lord-natal { font-size: .82rem; color: var(--text-dim); }
.nak-star-badge { color: var(--accent2); font-size: .7rem; }
.nak-theme-cell { font-size: .78rem; color: var(--text-dim); font-style: italic; }
.nak-activation { font-size: .8rem; color: #34d399; }

/* Gana badges */
.nak-gana { font-size: .72rem; padding: 2px 7px; border-radius: 10px; font-weight: 600; }
.nak-gana-deva { background: rgba(52,211,153,.15); color: #34d399; }
.nak-gana-rak  { background: rgba(248,113,113,.15); color: #f87171; }
.nak-gana-man  { background: rgba(251,191,36,.15);  color: #fbbf24; }

/* Dignity */
.nak-dig-ex  { color: #34d399; font-weight: 600; }
.nak-dig-deb { color: #f87171; }
.nak-dig-own { color: var(--accent2); }

/* Delivery mechanism chain */
.nak-chain-item {
  margin-bottom: 14px; padding: 12px 16px;
  background: var(--surface2); border-radius: var(--radius);
  border-left: 3px solid var(--accent);
}
.nak-chain-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: .84rem; margin-bottom: 6px;
}
.nak-chain-meaning {
  font-size: .82rem; color: var(--text-dim); line-height: 1.5;
  padding-left: 4px;
}
.nak-lord-planet { font-weight: 600; color: var(--text); }
.nak-lord-nak    { color: var(--accent); font-style: italic; }
.nak-lord-house  { color: var(--accent2); font-weight: 500; }

/* ── Yogas tab ──────────────────────────────────────── */
#yogas-content { padding: 16px; overflow-y: auto; }

.yoga-header {
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.yoga-header-title {
  font-size: 1.05rem; font-weight: 600; color: var(--text);
  margin-bottom: 6px;
  display: flex; align-items: center; gap: 8px;
}
.yoga-count {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent); color: #fff;
  font-size: .75rem; font-weight: 700;
  border-radius: 99px; padding: 1px 8px; min-width: 22px;
}
.yoga-header-note {
  font-size: .82rem; color: var(--text-dim); line-height: 1.5;
}

.yoga-list { display: flex; flex-direction: column; gap: 10px; }

.yoga-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
}
.yoga-positive  { border-left-color: #10b981; }
.yoga-caution   { border-left-color: #f59e0b; }
.yoga-challenge { border-left-color: #6b7280; }

.yoga-card-top {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 10px; margin-bottom: 6px;
}
.yoga-name {
  font-size: .95rem; font-weight: 600; color: var(--text);
  line-height: 1.3;
}
.yoga-badge {
  font-size: .7rem; font-weight: 600; white-space: nowrap;
  border-radius: 4px; padding: 2px 7px; flex-shrink: 0;
}
.yoga-badge-positive  { background: rgba(16,185,129,.15); color: #10b981; }
.yoga-badge-caution   { background: rgba(245,158,11,.15);  color: #f59e0b; }
.yoga-badge-challenge { background: rgba(107,114,128,.15); color: #9ca3af; }

.yoga-condition {
  font-size: .78rem; color: var(--text-dim);
  margin-bottom: 6px;
  font-style: italic;
}
.yoga-effect {
  font-size: .83rem; color: var(--text); line-height: 1.55;
}
.nak-lord-arrow  { color: var(--text-dim); font-size: .8rem; }

/* ── Reading-type toggle (segmented pill control) ───── */
#reading-type-toggle {
  display: flex;
  flex-shrink: 0;
  margin: 10px 14px 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 3px;
  gap: 2px;
}
.rt-btn {
  flex: 1;
  padding: 8px 10px;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: var(--text-dim);
  font-size: .82rem;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s, color .15s, box-shadow .15s;
  white-space: nowrap;
}
.rt-btn.active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 1px 6px rgba(0,0,0,.35);
}
.rt-btn:not(:disabled):not(.active):hover {
  background: var(--surface2);
  color: var(--text);
}
.rt-btn:disabled { opacity: .45; cursor: default; }

/* ── Match Making tabs bar ──────────────────────────── */
#match-tabs {
  display: flex; align-items: center; gap: 4px;
  padding: 6px 12px 0;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

/* ── Match Making score tab ─────────────────────────── */
#match-score-content,
#match-charts-content,
#match-report-content { padding: 14px; overflow-y: auto; }

.match-persons-card {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 10px; padding: 14px 20px; margin-bottom: 14px;
  flex-wrap: wrap; text-align: center;
}
.match-person-name { font-size: 1rem; font-weight: 700; color: var(--text); }
.match-person-nak  { font-size: .82rem; color: var(--accent); margin-top: 2px; }
.match-person-meta { font-size: .75rem; color: var(--text-dim); margin-top: 2px; }
.match-heart { font-size: 1.6rem; color: #ec4899; flex-shrink: 0; }

.match-score-card {
  display: flex; justify-content: center;
  margin-bottom: 14px;
}
.match-total-wrap { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.match-ring { width: 120px; height: 120px; }
.match-verdict-label {
  font-size: .85rem; font-weight: 700; letter-spacing: .03em;
  padding: 3px 12px; border-radius: 20px;
}
.match-verdict-excellent { background: rgba(16,185,129,.15); color: #10b981; }
.match-verdict-good      { background: rgba(34,197,94,.12);  color: #22c55e; }
.match-verdict-average   { background: rgba(245,158,11,.15); color: #f59e0b; }
.match-verdict-challenge { background: rgba(239,68,68,.12);  color: #ef4444; }

.match-koota-wrap  { margin-bottom: 14px; }
.match-koota-title {
  font-size: .82rem; font-weight: 600; color: var(--text-dim);
  text-transform: uppercase; letter-spacing: .06em; margin-bottom: 8px;
}
.match-koota-table { width: 100%; border-collapse: collapse; font-size: .83rem; }
.match-koota-table th {
  text-align: left; padding: 5px 8px;
  border-bottom: 1px solid var(--border);
  color: var(--text-dim); font-weight: 600; font-size: .75rem;
}
.match-koota-table td { padding: 6px 8px; border-bottom: 1px solid var(--border); }
.mk-name  { font-weight: 600; color: var(--text); white-space: nowrap; }
.mk-max   { color: var(--text-dim); }
.mk-meaning { color: var(--text-dim); font-size: .78rem; }
.mk-score span { font-weight: 700; padding: 1px 6px; border-radius: 4px; font-size: .85rem; }
.mk-high  { background: rgba(16,185,129,.15); color: #10b981; }
.mk-mid   { background: rgba(245,158,11,.12); color: #f59e0b; }
.mk-low   { background: rgba(239,68,68,.10);  color: #ef4444; }

.match-sup-wrap  { margin-bottom: 10px; }
.match-sup-grid  { display: flex; flex-wrap: wrap; gap: 8px; }
.match-sup-item  {
  display: flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 6px;
  font-size: .8rem; font-weight: 500;
}
.sup-pass { background: rgba(16,185,129,.12); color: #10b981; }
.sup-fail { background: rgba(107,114,128,.1);  color: #9ca3af; }
.sup-icon { font-weight: 700; }

/* Match charts */
.match-chart-section { margin-bottom: 20px; }
.match-chart-title {
  font-size: .85rem; font-weight: 600; color: var(--text-dim);
  margin-bottom: 8px; padding-bottom: 4px;
  border-bottom: 1px solid var(--border);
}

/* Match report */
#match-report-content { font-size: .9rem; line-height: 1.7; color: var(--text); }
