:root {
  color-scheme: dark;
  font: 16px/1.5 "Lato", system-ui, sans-serif;
  color: #f6f4ff;
  background: #09090c;
  --heading-font: "Josefin Sans", "Lato", system-ui, sans-serif;
  --ink: #f6f4ff;
  --dim: #b5b0c4;
  --rule: #302b3b;
  --paper: #121117;
  --violet: #c2a4ff;
  --mint: #8fe7ca;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
button, input, textarea { font: inherit; }
button {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  cursor: pointer; border: 1px solid transparent; background: var(--violet); color: #160d2b;
  border-radius: 100px; padding: .6rem 1rem; font-weight: 700;
  transition: background .2s, border-color .2s, transform .2s, box-shadow .2s;
}
button:hover { background: #d7c2ff; transform: translateY(-2px); }
button:active { transform: translateY(1px); }
:focus-visible { outline: 2px solid var(--mint); outline-offset: 4px; }
#message:focus-visible { outline-width: 1px; outline-offset: 0; }
.outline { background: #17141e; color: var(--ink); border-color: var(--rule); }
.outline:hover { background: #242031; border-color: #655481; }
.top {
  width: min(1100px, 100%); margin: 0 auto; padding: 1.2rem clamp(1rem,4vw,2rem);
  display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  border-bottom: 1px solid var(--rule);
}
.brand { font-family: var(--heading-font); display: inline-flex; align-items: center; text-decoration: none; color: var(--ink); font-weight: 700; font-size: 1.4rem; letter-spacing: -.04em; }
.brand .mark { display: grid; place-items: center; background: #281e3d; color: var(--violet); border: 1px solid #473364; border-radius: .75rem; width: 2.25rem; height: 2.25rem; margin-right: .55rem; }
.dot { color: var(--violet); }
.tabler { width: 1.2rem; height: 1.2rem; flex: none; }
main { width: min(760px, 100%); margin: 0 auto; padding: 0 1.35rem 2.5rem; flex: 1; }
.hero { position: relative; isolation: isolate; text-align: center; padding: clamp(3rem,8vw,5.5rem) 0 2rem; }
.hero::before {
  content: ""; position: absolute; inset: 2% 4% 0; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse at center, #5838a342 0%, #26164120 45%, transparent 72%);
  animation: glow 7s ease-in-out infinite alternate;
}
.eyebrow { color: var(--dim); font-size: .68rem; font-weight: 900; letter-spacing: .18em; }
.eyebrow i { display: inline-block; width: .5rem; height: .5rem; background: var(--mint); border-radius: 50%; margin-right: .4rem; box-shadow: 0 0 .75rem #8fe7ca80; animation: pulse 2.8s ease-in-out infinite; }
h1, h2, h3, .mode strong { font-family: var(--heading-font); }
h1 { font-size: clamp(3.2rem,10vw,6.45rem); font-weight: 700; line-height: .93; letter-spacing: -.06em; margin: 1.15rem 0 1.3rem; }
h1 em { color: var(--violet); font-style: normal; }
.hero p { font-size: 1.18rem; margin: .35rem; }
.hero .fine, small, #status { color: var(--dim); font-size: .9rem; }
.hero > *, .mode, .secondary { animation: enter .65s cubic-bezier(.22,.75,.25,1) backwards; }
.hero h1 { animation-delay: .08s; }
.hero p { animation-delay: .15s; }
.mode { animation-delay: .21s; }
.mode.voice { animation-delay: .29s; }
.secondary { animation-delay: .37s; }
.modes { display: grid; grid-template-columns: 1fr 1fr; gap: .85rem; }
.mode {
  --accent: var(--violet); --edge: #42345d; --surface: #1b1429;
  display: block; position: relative; text-align: left; border-radius: 1.25rem;
  padding: 1.2rem; color: var(--ink); background: var(--surface); border-color: var(--edge);
}
.mode.voice { --accent: var(--mint); --edge: #294640; --surface: #101e1c; }
.mode:hover { background: var(--surface); border-color: var(--accent); box-shadow: 0 10px 28px #0008; transform: translateY(-4px); }
.mode strong, .mode small { display: block; }
.mode strong { font-size: clamp(1rem,4vw,1.45rem); margin-top: .7rem; }
.icon, .arrow { display: inline-grid; place-items: center; color: var(--accent); }
.icon { width: 2.55rem; height: 2.55rem; border: 1px solid var(--edge); border-radius: .75rem; background: #0003; }
.arrow { position: absolute; right: 1rem; top: 1.2rem; transition: transform .22s; }
.mode:hover .arrow { transform: translate(3px,-3px); }
.secondary, .actions, .line { display: flex; gap: .6rem; flex-wrap: wrap; }
.secondary { justify-content: center; margin: 1rem 0; }
.line { flex-wrap: nowrap; }
.line input { flex: 1; min-width: 0; }
.panel, dialog { background: var(--paper); border: 1px solid var(--rule); border-radius: 1.2rem; padding: 1rem; color: var(--ink); box-shadow: 0 12px 40px #0005; }
.panel { margin-top: 1rem; animation: enter .28s ease-out both; }
.bar { display: flex; justify-content: space-between; align-items: center; gap: .7rem; }
h2, h3 { margin: .35rem 0 .75rem; }
.messages { background: #0b0a0f; border: 1px solid var(--rule); border-radius: .8rem; height: 13rem; overflow: auto; margin: .7rem 0; padding: .7rem; overflow-wrap: anywhere; }
.messages p { margin: .3rem 0; }
.messages p:last-child { animation: enter .2s ease-out both; }
.messages .mine { text-align: right; color: #d8c2ff; }
.bottom { margin-top: .8rem; }
input, textarea { border: 1px solid #494057; border-radius: .6rem; padding: .55rem .7rem; background: #0c0b11; color: var(--ink); }
input::placeholder, textarea::placeholder { color: #a5a0b5; }
label { display: block; margin: .5rem 0; }
label input, label textarea { display: block; width: 100%; }
dialog { width: min(460px,calc(100% - 2rem)); }
dialog[open] { animation: enter .23s ease-out both; }
dialog::backdrop { background: #050407b8; }
#status { text-align: center; min-height: 1.4rem; }
#authError { color: #ffa3ae; }

.friend { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; padding: .5rem 0; border-bottom: 1px solid var(--rule); }
.friend span { margin-right: auto; }
[hidden] { display: none !important; }
@keyframes enter { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes glow { from { opacity: .58; transform: scale(.94); } to { opacity: 1; transform: scale(1.08); } }
@keyframes pulse { 50% { opacity: .55; } }
@media (max-width: 370px) { .mode { padding: .85rem; } .arrow { right: .75rem; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

.voice-panel {
  display: flex; align-items: center; justify-content: space-between; gap: .85rem;
  flex-wrap: wrap; margin: .85rem 0 1.1rem; padding: 1rem;
  border: 1px solid #294640; border-radius: .9rem; background: #101e1c;
}
.voice-panel.compact { justify-content: flex-end; padding: 0; border: 0; background: transparent; }
.voice-panel.compact .voice-summary { display: none; }
.voice-summary { display: flex; align-items: center; gap: .8rem; }
.voice-summary h3 { margin: 0 0 .15rem; }
.voice-summary p { margin: 0; color: var(--dim); font-size: .9rem; }
.voice-meter { display: flex; align-items: center; gap: 3px; height: 2.6rem; padding: .6rem; border-radius: .65rem; background: #20372f; }
.voice-meter i { width: 3px; height: .95rem; border-radius: 1rem; background: var(--mint); }
.voice-meter i:nth-child(odd) { height: .5rem; }
.voice-panel.on-call .voice-meter i { animation: voice-wave .8s ease-in-out infinite alternate; }
.voice-panel.on-call .voice-meter i:nth-child(even) { animation-delay: -.4s; }
.header-actions { display: flex; align-items: center; gap: .55rem; flex-wrap: wrap; justify-content: flex-end; }
.online-pill { display: inline-flex; align-items: center; gap: .4rem; color: var(--mint); font-size: .84rem; white-space: nowrap; }
.online-pill i { width: .45rem; height: .45rem; border-radius: 50%; background: currentColor; }
.community { margin-top: 2.5rem; }
.community ul { padding-left: 1.25rem; margin-bottom: 0; color: var(--dim); }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 .7rem; }
.form-grid input, .form-grid select { min-width: 0; }
.form-grid select { display: block; width: 100%; font: inherit; border: 1px solid #494057; border-radius: .6rem; padding: .55rem .7rem; background: #0c0b11; color: var(--ink); }
.google-button { margin-top: .65rem; }
button:disabled { cursor: default; opacity: .6; transform: none; }
.form-error { color: #ffa3ae; }
dialog { max-height: calc(100dvh - 2rem); overflow-y: auto; }
@media (max-width: 390px) { .form-grid { grid-template-columns: 1fr; } .online-pill { flex-basis: 100%; justify-content: flex-end; } }
dialog label > :is(input, select, textarea) { margin-top: 10px; }
dialog p, .founder-note .fine { font-size: 14px; }
.icon-button { width: 2.6rem; height: 2.6rem; flex: none; padding: 0; }
.site-footer, .footer-meta, .site-footer nav {
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem;
}
.site-footer {
  justify-content: space-between; border-top: 1px solid var(--rule);
  background: #0e0d12; color: var(--dim);
  padding: 1rem clamp(1rem,4vw,2rem); font-size: 14px;
}
.site-footer a {
  display: inline-block; padding: .3rem .4rem; border-radius: .4rem;
  color: var(--ink); text-decoration: underline; text-underline-offset: .22em;
  text-decoration-color: #76688d; transition: color .2s, background .2s;
}
.site-footer a:hover, .site-footer a:focus-visible {
  color: var(--violet); background: #211a2e; text-decoration-color: currentColor;
}
.footer-credit a { color: var(--violet); font-weight: 700; }
.footer-tagline { display: inline-flex; align-items: center; gap: .45rem; }
@media (max-width: 560px) {
  .footer-meta { width: 100%; }
  .site-footer nav { flex-basis: 100%; gap: .25rem .65rem; }
}
a { color: var(--violet); }
.founder-note {
  margin-top: 2rem; padding: clamp(1.15rem,4vw,1.85rem);
  border-color: #46375e;
  background: radial-gradient(ellipse at top left,#251a37,transparent 65%), var(--paper);
}
.founder-heading { display: flex; align-items: center; gap: .85rem; }
.founder-heading p, .founder-heading h2 { margin: 0; }
.founder-avatar { display: grid; place-items: center; width: 3rem; height: 3rem; flex: none; border-radius: .85rem; background: #35234c; color: var(--violet); font: 700 1.45rem var(--heading-font); }
.founder-note .founder-support { margin-bottom: 0; padding-top: .7rem; border-top: 1px solid var(--rule); }
.filter-tag { margin-left: .25rem; color: var(--mint); }
#unlockGender { margin-bottom: .6rem; }
.founder-note .fine { color: var(--dim); line-height: 1.7; overflow-wrap: anywhere; }
#founderMessage { letter-spacing: .02em; }
.support-button { display: inline-flex; align-items: center; border: 1px solid var(--rule); border-radius: 100px; padding: .6rem 1rem; font-weight: 700; text-decoration: none; }
.support-button:hover { background: #242031; border-color: #655481; }
.legal-page { padding-top: 2rem; }
.legal-page h1 { font-size: clamp(2.4rem,7vw,4rem); letter-spacing: -.045em; }
.legal-page h2 { margin-top: 1.5rem; }
.legal-page p, .legal-page li { color: var(--dim); }
@keyframes voice-wave { from { transform: scaleY(.6); } to { transform: scaleY(1.35); } }
#messages p { width: fit-content; max-width: 90%; padding: .35rem .65rem; border-radius: .65rem; background: #201c2b; text-align: left; }
#messages p.mine { margin-left: auto; background: #281d3e; }
