@font-face {
  font-family: "Instrument Serif";
  src: url("/instrument-regular.ttf") format("truetype");
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("/instrument-italic.ttf") format("truetype");
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "DM Sans";
  src: url("/dm-sans.ttf") format("truetype");
  font-weight: 100 1000;
  font-display: swap;
}
:root {
  color-scheme: dark;
  --background: #11121f;
  --chrome: #12131f;
  --panel: #1a1b2e;
  --surface: #222239;
  --field: #141524;
  --ink: #f7f2fe;
  --muted: #bab4cc;
  --dim: #a29bb7;
  --violet: #c9b8fa;
  --gold: #eed1a3;
  --border: #36324b;
  --faint-border: #2c2a40;
  --error: #ffc6cb;
  --display: "Instrument Serif", Georgia, serif;
  --body: "DM Sans", system-ui, sans-serif;
  font: 16px/1.55 var(--body);
  color: var(--ink);
  background: var(--background);
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: radial-gradient(ellipse at 80% 0%, #201a37 0%, #11121f00 50%);
}
main { flex: 1; min-width: 0; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a, button, input, select, textarea { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--violet); outline-offset: 4px; }
button:disabled { cursor: wait; opacity: .68; }
h1, h2, h3, p { margin: 0; }
h1, h2 { font-family: var(--display); font-weight: 400; letter-spacing: -.015em; }
h3 { font-weight: 650; }
canvas { display: block; width: 100%; aspect-ratio: 1; height: auto; }
fieldset { border: 1px solid var(--border); border-radius: 12px; margin: 0; padding: 10px 14px 12px; }
fieldset legend { padding: 0 6px; color: var(--muted); font-size: .88rem; }
.shell { width: min(100% - 96px, 1200px); margin-inline: auto; }
.skip-link {
  position: fixed; top: 10px; left: 12px; z-index: 12; padding: 10px 16px;
  transform: translateY(-180%); background: var(--violet); color: #171121; border-radius: 10px;
}
.skip-link:focus { transform: translateY(0); }
.initial-status { padding: 70px 24px; text-align: center; color: var(--muted); }

.header { border-bottom: 1px solid var(--faint-border); background: #11121ee8; }
.header-inner { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 22px; }
.wordmark {
  display: inline-flex; align-items: center; gap: 11px; flex-shrink: 0;
  font: 400 1.83rem/1 var(--display); letter-spacing: .005em; white-space: nowrap;
}
.wordmark i { color: var(--gold); font-weight: 400; }
.brand-mark {
  width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%;
  border: 1px solid #5d4c74; background: #211a34; color: var(--gold);
  font: 1.25rem/1 var(--body);
}
.public-nav, .app-nav, .account-link { display: flex; align-items: center; gap: 24px; }
.public-nav { font-size: .9rem; color: var(--muted); }
.public-nav a:hover, .quiet-link:hover, .back-link:hover { color: var(--ink); }
.app-nav { align-self: stretch; gap: clamp(10px, 3vw, 33px); }
.app-nav a {
  color: var(--muted); height: 100%; display: flex; gap: 7px; align-items: center;
  position: relative; white-space: nowrap; font-size: .91rem; font-weight: 540;
}
.app-nav a:hover, .app-nav a[aria-current="page"] { color: var(--ink); }
.app-nav a[aria-current="page"]::after {
  content: ""; position: absolute; bottom: -1px; height: 2px; inset-inline: 0; background: var(--violet); border-radius: 3px;
}
.nav-icon { font-size: 1.2rem; color: var(--violet); line-height: 1; }
.inbox-count {
  display: grid; place-items: center; min-width: 19px; height: 19px; padding: 0 4px;
  border-radius: 10px; background: var(--violet); color: #221733;
  font-size: .71rem; line-height: 1; font-weight: 750;
}
.account-link { gap: 9px; color: var(--muted); font-size: .87rem; }
.avatar {
  position: relative; display: inline-grid; place-items: center; overflow: hidden;
  width: 40px; height: 40px; flex: 0 0 auto; border-radius: 50%; color: #ead7ff;
  background: linear-gradient(135deg, #40335f, #282244);
  border: 1px solid #685687; font-weight: 650;
}
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.avatar-large { width: 62px; height: 62px; font-size: 1.2rem; letter-spacing: .04em; }
.footer { border-top: 1px solid var(--faint-border); color: var(--dim); }
.footer-inner { min-height: 84px; display: flex; align-items: center; justify-content: space-between; gap: 15px; font-size: .84rem; }
.footer .brand-mark { width: 27px; height: 27px; font-size: 1rem; }
.footer .wordmark { font-size: 1.38rem; color: var(--muted); }
.quiet-link, .back-link { color: var(--muted); font-weight: 560; font-size: .92rem; }
.text-link { color: var(--violet); font-weight: 640; }
.text-link:hover { text-decoration: underline; text-underline-offset: 4px; }

.button {
  border: 1px solid transparent; border-radius: 999px; min-height: 46px;
  padding: 10px 19px; display: inline-flex; justify-content: center; align-items: center;
  gap: 10px; white-space: nowrap; font-size: .92rem; line-height: 1.25; font-weight: 700;
  transition: background-color .16s, border-color .16s, box-shadow .16s;
}
.button-primary { background: var(--violet); color: #201631; box-shadow: 0 6px 28px #9275df25; }
.button-primary:hover:not(:disabled) { background: #e0d1ff; box-shadow: 0 7px 30px #a487ee42; }
.button-secondary, .button-nav { color: var(--ink); border-color: #5b4d78; background: #29213b8a; }
.button-secondary:hover:not(:disabled), .button-nav:hover { background: #3b2e53; border-color: #7e6aab; }
.button-small { min-height: 38px; padding: 8px 15px; font-size: .82rem; }
.button-danger { background: #4f2838; color: #ffced5; border-color: #85566a; }
.button-danger:hover:not(:disabled) { background: #693048; }
.icon-button {
  min-width: 38px; min-height: 38px; padding: 3px 7px; display: grid; place-items: center;
  border-radius: 10px; border: 1px solid transparent; background: none; color: var(--violet); font-size: 1.25rem;
}
.icon-button:hover { border-color: var(--border); background: #29263e; }

.landing-hero {
  position: relative; overflow: hidden; isolation: isolate;
  border-bottom: 1px solid var(--faint-border);
  background:
    radial-gradient(ellipse at 76% 45%, #37254e8c, #16172800 54%),
    radial-gradient(ellipse at 89% 32%, #231935aa, #14142300 48%),
    linear-gradient(155deg, #181729 1%, #11121f 67%);
}
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr);
  align-items: center; min-height: 574px;
}
.hero-copy { position: relative; z-index: 1; padding-block: 51px; }
.hero-copy h1 { font-size: clamp(3.5rem, 6.6vw, 6.25rem); line-height: .97; letter-spacing: -.022em; }
.hero-copy h1 em { color: var(--gold); font-weight: 400; white-space: nowrap; }
.hero-copy > p:not(.hero-note) { color: var(--muted); max-width: 440px; font-size: clamp(1.02rem, 1.35vw, 1.2rem); margin: 25px 0 29px; line-height: 1.58; }
.hero-actions { display: flex; align-items: center; gap: clamp(14px, 2vw, 26px); flex-wrap: wrap; }
.hero-actions .button { min-height: 51px; padding-inline: 21px; }
.hero-secondary { display: inline-flex; gap: 8px; align-items: center; color: var(--muted); font-size: .93rem; font-weight: 620; }
.hero-secondary:hover { color: var(--ink); }
.hero-secondary span { color: var(--gold); }
.hero-copy .hero-note { color: var(--dim); margin-top: 25px; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: .82rem; }
.hero-note > span:first-child { color: var(--gold); font-size: .93rem; }
.dot { width: 3px; height: 3px; margin: 0 2px; border-radius: 100%; background: #ae9bbf; }
.hero-art { display: grid; place-items: center; min-width: 0; }
.hero-wheel { width: min(103%, 570px); max-width: none; }
.features { padding: 42px 0 70px; scroll-margin-top: 18px; }
.features h2 { font-size: clamp(2.4rem, 4.3vw, 3.4rem); line-height: 1.03; margin-bottom: 22px; }
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.feature-card { padding: 22px; border: 1px solid var(--border); border-radius: 19px; background: #19192bd9; }
.feature-icon { display: grid; place-items: center; width: 39px; height: 39px; font-size: 1.45rem; line-height: 1; color: var(--gold); background: #2d2443; border: 1px solid #4c3d63; border-radius: 12px; margin-bottom: 13px; }
.feature-card h3 { font-size: 1rem; margin-bottom: 5px; }
.feature-card p { color: var(--muted); font-size: .9rem; max-width: 32ch; }

.app-page { padding: 49px 0 61px; }
.narrow-page { width: min(100% - 96px, 710px); }
.page-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 19px; margin-bottom: 25px; }
.page-heading h1, .auth-panel h1 { font-size: clamp(3.05rem, 7vw, 5rem); line-height: .94; }
.page-heading p { color: var(--muted); margin-top: 12px; max-width: 53ch; }
.page-heading > .button { margin-bottom: 2px; }
.panel { background: linear-gradient(149deg, #222137b8, #19192b 62%); border: 1px solid var(--border); border-radius: 20px; }
.status-panel, .setup-panel, .settings-panel { padding: clamp(19px, 4vw, 30px); }
.muted, .hint { color: var(--muted); }
.hint { font-size: .83rem; font-weight: 440; }
.compact { margin-top: -9px; }
.prose { padding: clamp(22px, 5vw, 38px); }
.prose h2 { font-size: 2rem; margin-top: 23px; line-height: 1.1; }
.prose h2:first-child { margin-top: 0; }
.prose p { margin-top: 9px; color: var(--muted); }
.prose a { color: var(--violet); text-decoration: underline; text-underline-offset: 3px; }

.auth-grid { min-height: 550px; display: grid; grid-template-columns: minmax(0, 455px) minmax(0, 505px); justify-content: center; align-items: center; gap: clamp(30px, 8vw, 100px); padding-block: 56px 64px; }
.auth-panel { padding: clamp(22px, 4vw, 38px); }
.auth-panel h1 { font-size: clamp(2.55rem, 5.4vw, 4.55rem); margin-bottom: 10px; }
.auth-panel > p { font-size: .94rem; margin-bottom: 24px; }
.auth-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 7px 14px; color: var(--muted); font-size: .85rem; margin-top: 16px; }
.auth-done { display: grid; justify-items: start; gap: 13px; }
.google-sign-in { display: grid; gap: 10px; text-align: center; margin-top: 15px; }
.auth-divider { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .82rem; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.button-google { background: #f4f1fa; color: #271d35; border-color: #ded8ee; }
.button-google:hover:not(:disabled) { background: #e4daf8; border-color: var(--violet); }
.button-google:disabled { cursor: default; opacity: .55; }
.google-notice, .google-account { margin-bottom: 13px; }
.success { color: #d7efd9; }
.auth-art { opacity: .84; }
.form { display: flex; flex-direction: column; align-items: stretch; gap: 15px; }
.form label, .place-picker > label { display: block; font-weight: 590; font-size: .91rem; }
.form label > :is(input:not([type="checkbox"], [type="radio"]), select, textarea) { display: block; width: 100%; margin-top: 6px; }
.form > .button { align-self: flex-start; margin-top: 3px; }
.auth-panel .form > .button { align-self: stretch; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
input:not([type="checkbox"], [type="radio"]), select, textarea {
  min-width: 0; width: 100%; padding: 11px 12px; min-height: 43px; color: var(--ink);
  background: var(--field); border: 1px solid #49435f; border-radius: 9px;
  line-height: 1.45; font-size: .92rem; font-weight: 450;
}
input:disabled { opacity: .55; }
input::placeholder, textarea::placeholder { color: #9d95b1; }
input[type="file"] { cursor: pointer; }
input::file-selector-button { color: var(--violet); border: 1px solid var(--border); padding: 4px 9px; margin-right: 8px; border-radius: 6px; background: #2d2741; font: inherit; }
textarea { resize: vertical; }
label.check { display: flex; gap: 9px; align-items: flex-start; color: var(--muted); font-size: .91rem; }
.check input { accent-color: var(--violet); margin: .24em 0 0; width: 17px; height: 17px; flex-shrink: 0; }
.form-error { color: var(--error); background: #472733a6; border: 1px solid #744454; padding: 10px 13px; border-radius: 10px; font-size: .91rem; }
.place-picker { position: relative; }
.place-picker input { margin-top: 6px; }
.place-picker small { display: block; margin-top: 5px; }
.place-options { position: absolute; z-index: 2; margin-top: 4px; width: 100%; max-height: 235px; overflow: auto; border: 1px solid #5e5278; background: #1f1d32; border-radius: 9px; box-shadow: 0 13px 28px #0808119c; }
.place-options button { width: 100%; text-align: left; color: var(--ink); border: 0; background: transparent; padding: 9px 12px; display: flex; flex-direction: column; gap: 2px; }
.place-options button:hover, .place-options button[aria-selected="true"] { background: #3d3356; }
.place-options button span { color: var(--muted); font-size: .8rem; }
#offsets:empty { display: none; }
.offset-choice .check { margin-top: 4px; }
.steps {
  display: flex; gap: 12px; list-style: none; margin: 0 0 15px; padding: 0; color: var(--dim); font-size: .9rem; font-weight: 590;
}
.steps li { border-bottom: 1px solid var(--border); padding: 7px 10px 7px 0; }
.steps [aria-current] { color: var(--violet); border-color: var(--violet); }

.chart-jumps { display: flex; flex-wrap: wrap; gap: 15px; margin: -6px 0 18px; }
.chart-jumps a { color: var(--violet); font-size: .88rem; font-weight: 620; }
.chart-jumps a:hover { text-decoration: underline; text-underline-offset: 4px; }
.chart-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; margin-bottom: 14px; }
.fact { display: flex; align-items: center; padding: 16px; gap: 12px; }
.fact > span { color: var(--gold); border-radius: 12px; display: grid; place-items: center; background: #342842; width: 40px; height: 40px; flex: 0 0 auto; font-size: 1.2rem; }
.fact small { display: block; color: var(--muted); }
.fact strong { font-size: 1.12rem; font-weight: 630; }
.fact i { margin-left: auto; color: #be9cef; font-style: normal; font-size: 1.7rem; }
.chart-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .88fr); gap: 15px; }
.chart-wheel { display: grid; place-items: center; padding: 10px; min-width: 0; background: radial-gradient(ellipse at center, #38294f85, #1b1b2d 65%); }
.chart-wheel canvas { max-width: 510px; }
.planet-panel { padding: 20px 24px; }
.planet-panel h2, .settings-panel h2 { font-size: 2.24rem; line-height: 1; margin-bottom: 12px; }
.house-system { margin-bottom: 10px; }
.chart-table { width: 100%; border-collapse: collapse; text-align: left; font-size: .89rem; }
.chart-table :is(th, td) { padding: 7px 8px 7px 0; vertical-align: middle; }
.chart-table :is(th, td):last-child { padding-right: 0; }
.chart-table thead th { color: var(--muted); font-weight: 560; font-size: .79rem; }
.chart-table tbody tr { border-top: 1px solid #332f48; }
.chart-table tbody th { font-weight: 600; }
.placement-sign, .placement-degrees { white-space: nowrap; }
.placement-degrees { color: var(--muted); font-variant-numeric: tabular-nums; }
.placement-sign + .placement-degrees, .aspect-table small { margin-left: 4px; }
.planet-house { color: var(--gold); font-weight: 680; }
.chart-angles {
  display: flex; flex-wrap: wrap; gap: 9px 24px; margin: 8px 0 0;
  padding-top: 12px; border-top: 1px solid #332f48; font-size: .83rem;
}
.chart-angles dt { color: var(--muted); }
.chart-angles dd, .house-cusps dd { margin: 0; }
.chart-extra { margin-top: 15px; }
#planete-u-kucama, #natalni-aspekti { scroll-margin-top: 15px; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 9px; }
.section-heading h2 { margin: 0; }
.aspect-filter { display: flex; align-items: center; gap: 8px; font-size: .84rem; color: var(--muted); }
.aspect-filter select { min-height: 36px; width: auto; padding: 6px 8px; font-size: .84rem; }
.house-cusps { padding: 16px 24px; }
.house-cusps summary { color: var(--violet); font-weight: 620; cursor: pointer; }
.house-cusps dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr)); gap: 11px; margin-bottom: 0; }
.house-cusps dl > div { padding: 8px 10px; border: 1px solid #332f48; border-radius: 9px; font-size: .84rem; }
.house-cusps dt { color: var(--gold); font-weight: 630; }
.glyph { color: var(--gold); font-style: normal; }

.room-grid, .candidates-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px; }
.rooms-section + .rooms-section { margin-top: 25px; }
.rooms-section > h2, .room-directory .section-heading h2 { font-size: 2rem; line-height: 1; margin-bottom: 11px; }
.room-directory { margin-bottom: 24px; }
.room-directory .section-heading { margin-bottom: 12px; }
.room-directory .section-heading h2 { margin: 0; }
.room-search { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: .84rem; }
.room-search input { width: min(210px, 100%); min-height: 39px; }
.room-directory-row .room-invite-description strong { display: block; }
.room-card { display: grid; align-content: center; justify-items: start; min-height: 255px; position: relative; overflow: hidden; padding: clamp(19px, 4vw, 36px); transition: border-color .16s, background-color .16s; }
.room-card:hover { border-color: #826ea4; background: #25213b; }
.room-label { color: var(--violet); font-size: .85rem; font-weight: 620; align-self: start; }
.room-card h2 { font-size: clamp(2rem, 4.5vw, 3.7rem); line-height: .96; z-index: 1; margin: 14px 0; max-width: 80%; overflow-wrap: anywhere; }
.room-glyph { position: absolute; right: 7%; bottom: 12%; color: #ba9ce340; font: clamp(3rem, 10.5vw, 8.4rem)/1 Georgia, serif; }
.room-action { color: var(--muted); font-weight: 600; font-size: .89rem; display: flex; gap: 7px; z-index: 1; }
.room-action > span { color: var(--gold); }
.empty { display: grid; justify-items: center; text-align: center; padding: 39px clamp(18px, 6vw, 57px); gap: 8px; min-height: 195px; }
.empty-symbol { color: var(--gold); display: grid; place-items: center; width: 43px; height: 43px; font-size: 1.4rem; background: #342944; border: 1px solid #58486d; border-radius: 14px; margin-bottom: 2px; }
.empty h2 { font-size: 2.25rem; line-height: 1; }
.empty p { color: var(--muted); max-width: 50ch; }
.empty .button { margin-top: 9px; }
.match-search { padding: clamp(19px, 4vw, 32px); display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.match-search h2 { font-size: clamp(2rem, 4vw, 2.65rem); line-height: 1; margin-bottom: 9px; }
.match-search p { color: var(--muted); max-width: 61ch; font-size: .92rem; }
.candidate { padding: clamp(16px, 3vw, 23px); display: flex; flex-direction: column; gap: 13px; }
.candidate-head { display: flex; align-items: center; gap: 11px; min-width: 0; }
.candidate-head h2 { font-size: 2.1rem; line-height: 1; overflow-wrap: anywhere; }
.candidate-head p, .candidate-bio { color: var(--muted); font-size: .88rem; overflow-wrap: anywhere; }
.candidate-bio { white-space: pre-wrap; }
.score { display: grid; place-items: center; align-content: center; align-self: start; background: #352a47; border: 1px solid #604b73; border-radius: 13px; min-width: 68px; min-height: 59px; margin-left: auto; padding: 3px 8px; color: var(--gold); }
.score b { font: 2rem/1 var(--display); }
.score > span { font-size: .68rem; color: var(--muted); }
.chips { display: flex; gap: 7px; flex-wrap: wrap; }
.chips > span { background: #272439; border: 1px solid #423953; padding: 4px 7px; border-radius: 8px; font-size: .79rem; }
.chips small { color: var(--muted); }
.candidate details { padding: 10px 0; border-top: 1px solid var(--border); }
.candidate summary { cursor: pointer; color: var(--violet); font-weight: 620; font-size: .9rem; }
.aspect-list { list-style: none; margin: 9px 0; padding: 0; font-size: .84rem; }
.aspect-list li { padding: 7px 0; border-bottom: 1px solid #363047; }
.aspect-list p { color: var(--muted); }
.candidate-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; }
.candidate-actions .button { min-height: 39px; padding: 7px 13px; }
.candidate-actions .icon-button { margin-left: auto; }

.inbox-section { margin: 0 0 19px; }
.inbox-section h2 { font-size: 2rem; line-height: 1; margin-bottom: 10px; }
.member-profile { padding: clamp(19px, 5vw, 32px); display: grid; gap: 16px; }
.member-heading { display: flex; gap: 13px; align-items: center; }
.member-heading > div { min-width: 0; }
.member-heading h1 { font-size: clamp(2.35rem, 6vw, 3.6rem); line-height: 1; overflow-wrap: anywhere; }
.member-heading p, .member-bio, .friend-status { color: var(--muted); }
.member-heading .icon-button { margin-left: auto; flex-shrink: 0; }
.member-bio { white-space: pre-wrap; overflow-wrap: anywhere; }
.friend-list { list-style: none; margin: 0; padding: 0; }
.friend-row {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 10px; padding: 13px 15px;
}
.friend-row:not(:last-child) { border-bottom: 1px solid var(--border); }
.friend-person { display: flex; min-width: 0; align-items: center; gap: 10px; }
.friend-person:hover strong { color: var(--violet); }
.friend-person strong { overflow-wrap: anywhere; }
.friend-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.room-invite-description { min-width: 0; overflow-wrap: anywhere; }
.room-invite-description small { display: block; color: var(--muted); }
.room-friends { max-height: 48dvh; overflow: auto; }
#invite-friends > .form-error { margin-top: 10px; }
.member-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.member-controls:empty { display: none; }
.friend-status { font-size: .87rem; }
.chat-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 11px; padding: 14px 16px; }
.chat-row:not(:last-child) { border-bottom: 1px solid var(--border); }
.chat-row:hover { background: #30274179; }
.chat-row strong, .chat-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-row small { color: var(--muted); }
.chat-row > span:last-child { color: var(--violet); }
.chats { overflow: hidden; }
.conversation-page { width: min(100% - 96px, 830px); }
.back-link { display: inline-block; margin-bottom: 10px; }
.conversation-actions { display: flex; justify-content: space-between; gap: 10px; align-items: center; margin-bottom: 10px; }
.conversation-actions .back-link { margin: 0; }
.conversation { overflow: hidden; }
.conversation-heading { padding: 14px 18px; display: flex; width: 100%; align-items: center; gap: 10px; border-bottom: 1px solid var(--border); }
.conversation-heading > div { min-width: 0; }
.conversation-heading h1 { font-size: clamp(1.8rem, 5vw, 2.7rem); line-height: 1; overflow-wrap: anywhere; }
.conversation-heading small { color: var(--muted); }
.conversation-heading :is(.icon-button, .room-invite-button) { margin-left: auto; flex-shrink: 0; }
.thread-icon { display: grid; place-items: center; border-radius: 12px; min-width: 38px; height: 38px; background: #342944; color: var(--gold); }
.conversation-log { height: clamp(235px, 49dvh, 570px); padding: 16px; overflow: auto; background: #15152280; }
#message-list { display: grid; gap: 12px; }
.empty-chat { margin: 7px auto; color: var(--muted); }
#older-messages { margin: 0 auto 13px; display: flex; }
.chat-message {
  box-shadow: 0 3px 9px #0b081230;
  justify-self: start; min-width: 104px; max-width: min(85%, 510px); border: 1px solid #3b3550;
  border-radius: 13px 13px 13px 5px; padding: 8px 11px; background: #25233a;
}
.chat-message header { display: flex; align-items: center; gap: 8px; color: var(--gold); font-size: .75rem; font-weight: 640; }
.room-profile-link { color: var(--violet); text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.room-profile-link:hover { color: var(--ink); }
.chat-message time { color: var(--dim); font-size: .69rem; margin-left: auto; white-space: nowrap; }
.chat-message p { white-space: pre-wrap; font-size: .92rem; overflow-wrap: anywhere; }
.chat-message header button { min-height: 22px; min-width: 23px; padding: 0 3px; font-size: .93rem; }
.own-message { background: #382d50; border-color: #554669; justify-self: end; border-radius: 13px 13px 5px 13px; }
.composer { padding: 12px; border-top: 1px solid var(--border); }
.composer-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.composer > .form-error { margin-top: 8px; }
.settings-panel { margin-bottom: 13px; }
.settings-panel .hint { margin-bottom: 10px; }
.settings-actions, .dialog-actions, .photo-setting { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.photo-setting { margin-bottom: 12px; }
.dialog { width: min(100% - 28px, 475px); border: 1px solid #635283; background: #232039; color: var(--ink); padding: 21px; border-radius: 18px; }
.dialog::backdrop { background: #0e0b19a8; backdrop-filter: blur(4px); }
.dialog h2 { font-size: 2.4rem; line-height: 1; }
.dialog-header { display: flex; justify-content: space-between; align-items: start; gap: 10px; }
.dialog > p { margin: 9px 0 16px; }
.toast { position: fixed; z-index: 6; right: 18px; bottom: 18px; max-width: min(400px, 100% - 36px); padding: 11px 15px; background: #2e2645; color: var(--ink); border: 1px solid #6f5d90; font-size: .88rem; border-radius: 11px; box-shadow: 0 8px 30px #0d0b15a6; }

@media (max-width: 960px) {
  .shell { width: calc(100% - 58px); }
  .narrow-page { width: min(100% - 58px, 710px); }
  .conversation-page { width: min(100% - 58px, 830px); }
  .hero-grid { min-height: 480px; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
  .hero-copy h1 { font-size: clamp(3.48rem, 7vw, 5.45rem); }
  .hero-wheel { width: 114%; }
  .hero-copy > p:not(.hero-note) { margin-block: 18px 24px; }
}
@media (max-width: 720px) {
  .shell { width: calc(100% - 34px); }
  .header-inner { min-height: 63px; gap: 10px; }
  .wordmark { font-size: 1.57rem; gap: 7px; }
  .brand-mark { width: 29px; height: 29px; font-size: 1.05rem; }
  .public-nav { gap: 11px; font-size: .8rem; }
  .hide-small { display: none; }
  .hero-grid { display: flex; flex-direction: column; align-items: stretch; min-height: 0; }
  .hero-copy { padding-block: 40px 3px; }
  .hero-copy h1 { font-size: clamp(3rem, 11vw, 5rem); }
  .hero-copy > p:not(.hero-note) { margin-block: 15px 20px; max-width: 39ch; }
  .hero-copy .hero-note { margin-top: 16px; }
  .hero-art { margin: -13px -10px -15px; }
  .hero-wheel { width: min(100%, 475px); }
  .features { padding: 30px 0 44px; }
  .features h2 { margin-bottom: 14px; }
  .feature-grid { grid-template-columns: 1fr; gap: 10px; }
  .feature-card { padding: 15px; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 11px; align-content: center; }
  .feature-card .feature-icon { grid-row: span 2; margin: 0; }
  .feature-card p { max-width: none; font-size: .86rem; }
  .footer-inner { min-height: 69px; }
  .footer .wordmark { font-size: 1.18rem; }
  .footer .brand-mark { display: none; }
  .footer-inner .quiet-link { font-size: .8rem; }
  body[data-mode="app"] { padding-bottom: calc(58px + env(safe-area-inset-bottom, 0px)); }
  body[data-mode="app"] .toast { bottom: calc(70px + env(safe-area-inset-bottom, 0px)); }
  .app-nav {
    position: fixed; inset: auto 0 0; z-index: 4; justify-content: space-evenly; gap: 0;
    border-top: 1px solid #47405c; background: #181629; padding: 2px 8px env(safe-area-inset-bottom, 0px);
  }
  .app-nav a { flex: 1; min-height: 54px; justify-content: center; flex-direction: column; gap: 2px; font-size: .72rem; }
  .app-nav a[aria-current="page"]::after { inset: 0 24% auto; }
  .inbox-count { position: absolute; top: 3px; left: calc(50% + 9px); }
  .account-link .avatar { width: 33px; height: 33px; font-size: .83rem; }
  .account-link { gap: 6px; }
  .app-page { padding: 32px 0 40px; }
  .page-heading { flex-wrap: wrap; align-items: start; margin-bottom: 19px; gap: 11px; }
  .page-heading p { margin-top: 8px; }
  .page-heading > .button { min-height: 38px; font-size: .81rem; }
  .auth-grid { grid-template-columns: minmax(0, 440px); padding-block: 32px 45px; min-height: 0; }
  .auth-art { display: none; }
  .chart-grid, .room-grid, .candidates-grid { grid-template-columns: minmax(0, 1fr); }
  .chart-facts { gap: 5px; }
  .fact { padding: 9px; border-radius: 12px; gap: 6px; }
  .fact > span { background: none; width: auto; height: auto; border-radius: 0; font-size: .9rem; }
  .fact strong { font-size: .92rem; overflow-wrap: anywhere; }
  .fact small { font-size: .72rem; }
  .fact i { display: none; }
  .room-card { min-height: 178px; }
  .room-glyph { font-size: 5.5rem; }
  .match-search { align-items: flex-start; flex-direction: column; gap: 13px; }
  .conversation-page { padding-top: 21px; }
  .conversation-log { height: 46dvh; }
}
@media (max-width: 430px) {
  .header-inner { gap: 8px; }
  .header .wordmark { font-size: 1.34rem; }
  .header .brand-mark { width: 25px; height: 25px; }
  .public-nav { gap: 8px; }
  .public-nav .button-nav { padding-inline: 11px; }
  .planet-panel, .house-cusps { padding: 15px 13px; }
  .chart-table { font-size: .8rem; }
  .placement-table .placement-degrees, .aspect-table small { display: block; margin-left: 0; font-size: .75rem; }
  .conversation-heading { padding-inline: 11px; gap: 7px; }
  .room-invite-button { padding-inline: 9px; }
  .room-search { width: 100%; align-items: stretch; flex-direction: column; gap: 5px; }
  .room-search input { width: 100%; }
}
@media (max-width: 360px) {
  .shell { width: calc(100% - 26px); }
  .header-inner { gap: 6px; }
  .header .wordmark { font-size: 1.25rem; }
  body[data-mode="public"] .header .brand-mark { display: none; }
  .public-nav { gap: 7px; }
  .public-nav .button-nav { padding-inline: 9px; }
  .hero-actions { gap: 10px; }
  .hero-actions .button { padding-inline: 13px; }
  .hero-secondary { font-size: .8rem; }
  .fact > span { display: none; }
  .planet-panel { padding: 14px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
