:root { font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: #203632; background: #e6eeeb; font-synthesis: none; }
* { box-sizing: border-box; }
html, body, #app { margin: 0; width: 100%; height: 100%; min-height: 100%; overflow: hidden; }
body { font-size: 14px; }
button { font: inherit; cursor: pointer; }
.scene { position: absolute; inset: 0; background: linear-gradient(#dce9e8, #f2f4e8); overflow: hidden; touch-action: none; }
.scene canvas { display: block; width: 100%; height: 100%; }
.scene-labels { position: absolute; inset: 0; pointer-events: none; }
.map-label { position: absolute; transform: translate(-50%, -100%); padding: 5px 10px; border-radius: 15px; color: #24413b; background: rgba(255,255,255,.88); border: 1px solid rgba(71,111,99,.22); box-shadow: 0 5px 18px #365b4824; font-weight: 700; white-space: nowrap; font-size: 14px; }
.topbar { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 25px; padding: 18px 24px; pointer-events: none; }
.brand, .chips { pointer-events: auto; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 230px; color: #27453e; text-shadow: 0 1px 4px #fff8; border-radius: 14px; background: #f7fbf4d9; padding: 4px 8px 4px 4px; }
.night .brand { color: #f3f4e9; text-shadow: 0 2px 5px #13242dcc; }
.night .brand small { color: #d7e5db; }
.night .brand { background: #203a42d9; }
.brand-icon { width: 37px; height: 37px; border-radius: 12px; display: grid; place-items: center; color: white; background: #4e8b77; box-shadow: 0 5px 16px #2a594c30; font-size: 23px; }
.brand strong { display: block; font-size: 16px; letter-spacing: -.03em; }
.brand small { display: block; font-size: 12px; color: #648078; }
.chips { display: flex; gap: 8px; }
.view-controls { display: flex; gap: 6px; pointer-events: auto; }
.view-controls button { border: 1px solid #a9c4b9; border-radius: 20px; background: #fffffff0; color: #3d6256; padding: 8px 10px; font-size: 14px; font-weight: 650; white-space: nowrap; }
.chip { border: 1px solid #a9c4b9; background: #fffffff0; color: #3d6256; border-radius: 30px; padding: 9px 14px; box-shadow: 0 5px 15px #2a594c15; white-space: nowrap; font-weight: 650; }
.chip:hover, .chip:focus-visible, .chip.active { color: white; background: #457e69; border-color: #457e69; }
.sheet { position: absolute; right: 16px; top: 16px; bottom: 16px; width: 352px; border: 1px solid #dbe5df; border-radius: 19px; background: #fbfdfaf2; box-shadow: 0 16px 50px #243e3b26; backdrop-filter: blur(16px); display: flex; flex-direction: column; overflow: hidden; }
.sheet-toggle { display: none; }
.sheet-body { min-height: 0; display: flex; flex-direction: column; flex: 1; padding: 20px; }
.sheet-intro { display: flex; justify-content: space-between; align-items: start; gap: 8px; padding-bottom: 17px; border-bottom: 1px solid #e4ece7; }
.eyebrow { font-size: 11px; color: #789388; letter-spacing: .13em; font-weight: 800; }
h1, h2 { margin: 5px 0 0; line-height: 1.14; letter-spacing: -.035em; }
h1 { font-size: 21px; } h2 { font-size: 19px; }
.live-dot { margin-top: 1px; white-space: nowrap; border: 1px solid #b7dcc0; background: #e9f7ec; color: #398057; border-radius: 12px; padding: 4px 7px; font-size: 10px; font-weight: 800; }
.scoreboard { padding: 3px 0 14px; }
.score-row { padding: 11px 0; border-bottom: 1px solid #e8eee9; }
.score-top, .score-values { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.score-name { font-size: 16px; font-weight: 750; }
.score-ideology { color: #6c887d; font-size: 12px; text-transform: capitalize; }
.score-values { margin-top: 8px; }
.metric { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.metric strong { font-size: 15px; font-variant-numeric: tabular-nums; }
.metric small { font-size: 11px; color: #859b90; }
.timeline-head { display: flex; align-items: end; justify-content: space-between; margin-top: 3px; }
.play-button { border: 1px solid #bdd6c8; border-radius: 20px; padding: 6px 10px; color: #3b7258; background: #eaf5ee; font-weight: 700; }
.agent-status { color: #82998c; font-size: 12px; margin: 5px 0 10px; }
.event-log { min-height: 80px; overflow-y: auto; flex: 1; scrollbar-width: thin; }
.event-row { border-top: 1px solid #e7eee8; padding: 10px 0; }
.event-meta { color: #628476; font-weight: 750; font-size: 12px; text-transform: capitalize; }
.event-row p { margin: 4px 0 0; line-height: 1.35; color: #455a50; }
.error-panel { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(90vw, 420px); padding: 24px; background: #fffdf8; border: 1px solid #e5c6bb; box-shadow: 0 18px 60px #2b3b3650; border-radius: 18px; color: #694337; font-size: 16px; }
.error-panel[hidden] { display: none; }
.error-code { font-weight: 800; color: #ad503e; }
@media (max-width: 700px) {
  .topbar { display: block; padding: 12px 14px; }
  .brand { min-width: 0; }
  .brand strong { font-size: 15px; }
  .brand small { font-size: 14px; }
  .chips { gap: 6px; margin-top: 10px; width: 100%; overflow-x: auto; scrollbar-width: none; }
  .chips::-webkit-scrollbar { display: none; }
  .chip { padding: 7px 10px; font-size: 14px; }
  .view-controls { margin-top: 8px; }
  .view-controls button { padding: 6px 8px; font-size: 14px; }
  .sheet { left: 0; right: 0; top: auto; bottom: 0; width: 100%; height: min(48vh, 425px); border-radius: 20px 20px 0 0; border-bottom: 0; touch-action: pan-y; }
  .sheet.collapsed { height: 52px; }
  .sheet-toggle { display: flex; width: 100%; height: 52px; flex: none; gap: 10px; align-items: center; justify-content: center; border: 0; color: #496f5c; background: transparent; font-weight: 750; font-size: 14px; }
  .handle { width: 26px; height: 4px; border-radius: 3px; background: #adc9b9; }
  .chevron { font-size: 20px; }
  .sheet.collapsed .sheet-body { display: none; }
  .sheet-body { padding: 0 16px 12px; }
  .sheet-intro { display: none; }
  .scoreboard { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 0 0 8px; }
  .score-row { border: 1px solid #e4ede5; border-radius: 11px; padding: 8px; background: white; }
  .score-top, .score-values { display: block; }
  .score-name { font-size: 14px; }
  .score-ideology { display: block; min-height: 29px; font-size: 14px; }
  .metric { flex-direction: column; gap: 0; margin-top: 5px; }
  .metric strong, .metric small { font-size: 14px; }
  .timeline-head { margin-top: 1px; }
  .event-log { min-height: 40px; }
  .map-label { font-size: 14px; }
  .eyebrow, .live-dot, .agent-status, .event-meta, .event-row p { font-size: 14px; }
}
