:root {
  color-scheme: light dark;
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --bg: light-dark(#f6f5fb, #12121a);
  --surface: light-dark(#fff, #1b1b26);
  --field: light-dark(#f7f6fc, #15151e);
  --edge: light-dark(#ddd9ea, #343343);
  --text: light-dark(#211c31, #f2f0f9);
  --muted: light-dark(#5d576d, #aaa7bc);
  --accent: light-dark(#6740ca, #c0adff);
  --ink: light-dark(#fff, #231646);
  --violet-wash: light-dark(#eee8ff, #28213c);
  --green: light-dark(#127653, #83dfb7);
  --error: light-dark(#a01e39, #ffabb7);
  --glow: light-dark(#eae2ff, #251c40);
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  color: var(--text);
  background: radial-gradient(ellipse at 50% 0%, var(--glow), transparent 53%), var(--bg);
}
button, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .5; }
button, textarea { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
svg { width: 1.15rem; height: 1.15rem; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; stroke-linecap: round; flex: none; }
.symbols { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.top { border-bottom: 1px solid var(--edge); background: color-mix(in srgb, var(--bg) 86%, transparent); }
.top-inner {
  max-width: 70rem;
  min-height: 4.4rem;
  margin: 0 auto;
  padding: .7rem clamp(1rem, 4vw, 2rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .7rem;
}
.brand, .top-actions { display: flex; align-items: center; gap: .7rem; }
.brand strong, .brand div > span { display: block; line-height: 1.2; }
.brand div > span { margin-top: .25rem; color: var(--muted); font-size: .75rem; }
.mark, .hero-mark {
  display: grid;
  place-items: center;
  color: var(--accent);
  background: var(--violet-wash);
  border: 1px solid color-mix(in srgb, var(--accent) 25%, var(--edge));
}
.mark { width: 2.4rem; height: 2.4rem; border-radius: .8rem; flex: none; }
.connection-status {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  white-space: nowrap;
  color: var(--muted);
  font-size: .79rem;
}
.connection-status::before { content: ""; width: .48rem; height: .48rem; border-radius: 50%; background: currentColor; }
.connection-status[data-ready="true"] { color: var(--green); }
.quiet, .suggestions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--edge);
  border-radius: .75rem;
  padding: .45rem .7rem;
  font-size: .82rem;
  font-weight: 550;
}
.quiet:not(:disabled):hover, .suggestions button:hover { border-color: var(--accent); color: var(--accent); }
.shell {
  position: relative;
  width: min(100%, 55rem);
  padding: clamp(.8rem, 3vw, 1.5rem) clamp(.8rem, 3vw, 1.5rem) .8rem;
  margin: 0 auto;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: .8rem;
}
textarea::placeholder { color: var(--muted); }
.primary { border: 0; border-radius: .65rem; padding: .48rem .8rem; color: var(--ink); background: var(--accent); font-weight: 700; }
.primary:not(:disabled):hover { filter: brightness(1.1); }
.workspace {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--edge);
  border-radius: 1.25rem;
  overflow: hidden;
}
.workspace[inert] { filter: blur(6px); opacity: .55; }
.availability {
  position: absolute; inset: 0; display: grid; place-items: center;
  padding: 1rem; overflow: auto;
}
.availability-card {
  width: min(100%, 25rem); margin: auto; padding: clamp(1rem, 4vw, 1.7rem);
  background: var(--surface); color: var(--text); border: 1px solid var(--edge);
  border-radius: 1.1rem; text-align: center; box-shadow: 0 16px 45px rgb(0 0 0 / 18%);
}
.availability-card img { display: block; margin: 0 auto .6rem; }
.availability-card h2 { margin: 0; font-size: 1.22rem; line-height: 1.2; }
.availability-card p { margin: .55rem 0 0; color: var(--muted); font-size: .87rem; }
.availability-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .55rem; margin-top: 1rem; }
.availability-actions .quiet, .download { min-height: 2.5rem; }
.download {
  display: inline-flex; align-items: center; border-radius: .75rem; padding: .45rem .7rem;
  background: var(--accent); color: var(--ink); font-size: .82rem; font-weight: 650; text-decoration: none;
}
.download[aria-disabled="true"] { background: var(--field); color: var(--muted); border: 1px solid var(--edge); }
@media (prefers-reduced-transparency: reduce) {
  .availability { background: var(--bg); }
  .workspace[inert] { filter: none; }
}
.conversation { flex: 1; min-height: 0; overflow-y: auto; padding: clamp(.8rem, 3vw, 1.8rem); }
.conversation:focus-visible { outline-offset: -3px; }
.empty { min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 1.15rem 0; }
.hero-mark {
  width: 3.9rem;
  height: 3.9rem;
  border-radius: 1.25rem;
  box-shadow: 0 .3rem 2rem color-mix(in srgb, var(--accent) 17%, transparent);
}
.hero-mark svg { width: 1.9rem; height: 1.9rem; }
.eyebrow { margin: 1.25rem 0 .2rem; color: var(--accent); font-size: .64rem; font-weight: 700; letter-spacing: .18em; }
h1 { font-size: clamp(1.65rem, 4vw, 2.45rem); line-height: 1.15; letter-spacing: -.045em; margin: 0; }
.intro { color: var(--muted); font-size: .9rem; margin: .55rem 0 1.15rem; }
.suggestions { display: flex; flex-wrap: wrap; justify-content: center; gap: .42rem; }
.suggestions button svg { color: var(--accent); width: .92rem; height: .92rem; }
.messages { display: flex; flex-direction: column; align-items: flex-start; gap: 1rem; }
.message { width: min(100%, 42rem); padding: .8rem .95rem; background: var(--field); border: 1px solid var(--edge); border-radius: .9rem; }
.message.user { width: fit-content; max-width: min(92%, 42rem); align-self: flex-end; background: var(--violet-wash); }
.message h2 { font-size: .75rem; color: var(--accent); margin: 0 0 .25rem; }
.message p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.message p.pending { color: var(--muted); font-style: italic; }
.attachment { display: flex; align-items: center; gap: .55rem; margin-bottom: .5rem; font-size: .8rem; }
.attachment img { width: 2rem; height: 2rem; object-fit: cover; border-radius: .35rem; }
.attachment span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon-button { min-height: 2.45rem; min-width: 2.45rem; padding: .38rem; flex: none; }
.attachment .icon-button { min-height: 2rem; min-width: 2rem; }
.message img { display: block; max-width: min(100%, 15rem); max-height: 10rem; object-fit: contain; margin-bottom: .45rem; border-radius: .55rem; }
.composer-area { padding: .7rem clamp(.7rem, 2.8vw, 1.3rem); border-top: 1px solid var(--edge); }
.composer { display: flex; align-items: end; gap: .5rem; border: 1px solid var(--edge); border-radius: .9rem; background: var(--field); padding: .35rem; }
.composer:focus-within { border-color: var(--accent); }
textarea { flex: 1; width: 0; min-height: 2.45rem; max-height: 7rem; resize: vertical; border: 0; background: transparent; padding: .47rem .5rem; color: var(--text); }
textarea:focus { outline: none; }
.send { display: grid; place-items: center; width: 2.45rem; height: 2.45rem; padding: 0; flex: none; }
.composer-meta { display: flex; justify-content: space-between; align-items: center; margin-top: .4rem; gap: .5rem; color: var(--muted); font-size: .68rem; }
.composer-meta span:first-child { display: flex; align-items: center; gap: .25rem; }
.composer-meta svg { width: .86rem; height: .86rem; }
kbd { font: inherit; }
.error { color: var(--error); font-size: .8rem; margin: 0 0 .5rem; overflow-wrap: anywhere; }
@media (max-width: 35rem) {
  .brand, .top-actions { gap: .45rem; }
  .top-inner { min-height: 3.5rem; padding: .5rem .7rem; }
  .brand strong { font-size: .88rem; }
  .quiet { padding: .35rem .4rem; font-size: .72rem; }
  .connection-status { font-size: .72rem; white-space: normal; }
  #reset span { display: none; }
  #reset { min-width: 2.5rem; min-height: 2.5rem; }
  .keyboard-hint { display: none; }
}
