.universe-body { --background: #10161b; --surface: #1b222a; --border: #48525d; --muted: #afb8c3; background: var(--background); }
.universe-app { position: relative; display: grid; grid-template-rows: auto auto minmax(0,1fr); max-width: none; height: 100svh; min-height: 620px; padding: 0; overflow: hidden; }
.universe-header { position: relative; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.35rem 1.5rem .75rem; }
.universe-header > div { text-align: center; }
.universe-header h1 { font-size: 1.35rem; margin: 0 0 .4rem; letter-spacing: .04em; }
.universe-header p { margin: 0; color: var(--muted); font-size: .8rem; }
.round-control, .pill-control { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; gap: .5rem; border: 1px solid var(--border); color: var(--text); background: var(--surface); min-height: 44px; cursor: pointer; text-decoration: none; }
.round-control { width: 44px; border-radius: 50%; padding: .65rem; }
.round-control img, .pill-control img { display: block; width: 19px; height: 19px; filter: invert(1); opacity: .85; }
.back-link, #about-universe { border-color: transparent; background: transparent; }
.pill-control { border-radius: 999px; padding: .5rem .85rem; font: inherit; font-size: .8rem; }
.pill-control.primary { background: #d6dce1; color: #17212a; border-color: #d6dce1; }
.people-strip { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: .6rem 1rem; padding: .4rem 1rem .75rem; z-index: 3; }
.sample-label { color: var(--muted); font-size: .7rem; white-space: nowrap; }
#people-list { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem; }
#people-list button { border: 1px solid transparent; background: transparent; color: var(--muted); border-radius: 999px; font-size: .75rem; min-width: 45px; min-height: 36px; padding: .3rem .55rem; }
#people-list button[aria-pressed="true"] { color: var(--text); border-color: var(--border); background: var(--surface); }
.universe-stage { position: relative; min-width: 0; min-height: 300px; margin-right: 370px; overflow: hidden; isolation: isolate; }
#universe-canvas { display: block; width: 100%; height: 100%; cursor: grab; touch-action: none; }
#universe-canvas:active { cursor: grabbing; }
#universe-canvas:focus-visible { outline-offset: -5px; }
.star-labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.star-label { position: absolute; display: flex; align-items: center; justify-content: center; gap: .4rem; height: 36px; min-width: 64px; border: 1px solid transparent; border-radius: 999px; color: #d2d8df; background: #10161b70; font-size: .8rem; pointer-events: auto; padding: .2rem .5rem; white-space: nowrap; }
.star-label::before { content: ''; width: 4px; height: 4px; background: currentColor; border-radius: 50%; }
.star-label[aria-pressed="true"] { color: #fff; border-color: #bdc9d185; background: #1b2635b0; }
.star-label.is-nearby { color: #e4e8ed; }
.scene-instructions { position: absolute; left: 1.5rem; bottom: 1.5rem; display: grid; gap: .15rem; color: var(--muted); font-size: .7rem; pointer-events: none; }
.scene-controls { position: absolute; right: 1.5rem; bottom: 1.5rem; display: grid; justify-items: end; gap: .6rem; }
.zoom-controls { display: flex; align-items: center; gap: .4rem; }
.zoom-controls .round-control { background: #182029e8; }
#zoom-value { color: var(--muted); font-size: .75rem; min-width: 2.8rem; text-align: center; }
.scene-controls .pill-control { background: #182029e8; }
.scene-message { position: absolute; left: 50%; top: 40%; transform: translate(-50%,-50%); z-index: 3; text-align: center; color: var(--muted); font-size: .875rem; width: min(320px,90%); }
.profile-card { position: absolute; z-index: 4; right: 1.5rem; top: 200px; width: 326px; border: 1px solid var(--border); border-radius: 24px; padding: 1.4rem; background: #1b222af0; }
.sheet-grip { display: none; }
.profile-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: .5rem; }
.profile-heading .eyebrow, #profile-count { margin: 0; color: var(--muted); font-size: .7rem; }
.profile-card h2 { margin: 0 0 .8rem; font-size: 1.45rem; font-weight: 500; }
.profile-summary { font-size: .8rem; color: var(--muted); margin: 0 0 .75rem; }
.profile-note { font-size: .95rem; line-height: 1.8; min-height: 5.4em; margin: 0 0 1.2rem; }
.nearby-row { margin: .7rem 0 1.1rem; display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; }
.nearby-row > span { font-size: .7rem; color: var(--muted); }
#nearby-people { display: flex; gap: .4rem; }
#nearby-people button { border: 1px solid var(--border); background: transparent; color: var(--text); padding: .2rem .6rem; min-height: 36px; border-radius: 999px; font-size: .75rem; }
.profile-actions { display: grid; gap: .65rem; }
.universe-body dialog { width: min(560px,calc(100% - 2rem)); max-width: 560px; max-height: 85svh; padding: 1.4rem; border-radius: 20px; overscroll-behavior: contain; }
.dialog-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1rem; }
.dialog-heading h2 { margin: 0; font-size: 1.3rem; }
.dialog-heading .eyebrow { font-size: .75rem; color: var(--muted); margin-bottom: .25rem; }
.answer-group { margin-top: 1.5rem; }
.answer-group h3 { font-size: .9rem; margin-bottom: .5rem; }
.profile-answer { border-top: 1px solid var(--border); padding: .75rem 0; }
.profile-answer p { margin: 0 0 .3rem; font-size: .8rem; }
.profile-answer .answer-kind { color: var(--muted); font-size: .7rem; }
.profile-answer .answer-value { display: block; font-size: .8rem; margin-top: .4rem; color: #e3e8ee; }
.profile-answer meter { width: 100%; height: 5px; margin-top: .35rem; display: block; }
.profile-answer meter::-webkit-meter-bar { background: var(--button); border: 0; }
.profile-answer meter::-webkit-meter-optimum-value { background: #899baa; }
.profile-answer meter::-moz-meter-bar { background: #899baa; }
@media(max-width:760px) {
  .universe-app { grid-template-rows: auto auto minmax(250px,1fr) auto; min-height: max(780px,48rem); }
  .universe-header { padding: .7rem .6rem .45rem; gap: .3rem; }
  .universe-header h1 { font-size: 1.15rem; margin-bottom: .25rem; }
  .universe-header p { font-size: .65rem; }
  .people-strip { gap: .1rem; padding: .25rem .6rem .4rem; flex-wrap: nowrap; align-items: flex-start; }
  .sample-label { padding-top: .55rem; font-size: .6rem; width: 38px; white-space: normal; line-height: 1.6; }
  #people-list { gap: .1rem; max-width: 310px; }
  #people-list button { font-size: .65rem; min-width: 45px; min-height: 32px; padding: .2rem .45rem; }
  .universe-stage { margin: 0; min-height: 250px; }
  .scene-instructions { left: 1rem; bottom: 1rem; font-size: .6rem; max-width: 45%; }
  .scene-controls { right: .8rem; bottom: .8rem; gap: .3rem; }
  .scene-controls .round-control { min-height: 36px; width: 36px; padding: .45rem; }
  .scene-controls .pill-control { min-height: 36px; font-size: .7rem; }
  .star-label { min-width: 54px; font-size: .72rem; height: 36px; }
  .profile-card { position: relative; inset: auto; width: 100%; border-radius: 24px 24px 0 0; padding: .6rem 1.1rem max(1rem,env(safe-area-inset-bottom)); }
  .sheet-grip { display: block; margin: 0 auto .5rem; width: 35px; height: 3px; border-radius: 99px; background: var(--border); }
  .profile-heading { margin-bottom: .1rem; }
  .profile-card h2 { font-size: 1.25rem; margin-bottom: .35rem; }
  .profile-summary { display: none; }
  .profile-note { font-size: .8rem; min-height: 3.6em; line-height: 1.8; margin-bottom: .3rem; }
  .nearby-row { margin: .3rem 0 .6rem; }
  .profile-actions { grid-template-columns: 1fr 1fr; gap: .5rem; }
  .profile-actions .pill-control { padding: .5rem .45rem; font-size: .75rem; }
}
@media(prefers-reduced-motion:reduce) { * { scroll-behavior: auto !important; } }
