:root {
  --bg: #f6f7f9; --card: #ffffff; --text: #1a1d23; --muted: #5d6573; --line: #e3e6eb;
  --brand: #1f6f50; --brand-ink: #ffffff; --ai: #eef4f1; --me: #e9eefb; --danger: #b42318;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #121417; --card: #1b1e23; --text: #e8eaed; --muted: #9aa3af; --line: #2c3139;
          --brand: #3fa37a; --brand-ink: #0b1410; --ai: #1d2a24; --me: #1e2536; --danger: #f97066; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
main { max-width: 720px; margin: 0 auto; padding: 24px 16px 48px; }
h1 { font-size: 1.5rem; margin: 0 0 4px; }
.sub { color: var(--muted); margin: 0 0 20px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 20px; margin-bottom: 16px; }
label { display: block; font-weight: 600; margin: 12px 0 4px; }
input, textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--bg); color: var(--text); font: inherit; }
button { font: inherit; font-weight: 600; border: 0; border-radius: 10px; padding: 12px 18px; cursor: pointer;
  background: var(--brand); color: var(--brand-ink); }
button.secondary { background: transparent; color: var(--text); border: 1px solid var(--line); }
button:disabled { opacity: .5; cursor: not-allowed; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.hidden { display: none !important; }
.err { color: var(--danger); margin-top: 10px; }
ul.tips { margin: 8px 0 0; padding-left: 20px; color: var(--muted); }
#chat { display: flex; flex-direction: column; gap: 10px; max-height: 50vh; overflow-y: auto; margin-bottom: 14px; }
.msg { padding: 10px 14px; border-radius: 12px; max-width: 88%; white-space: pre-wrap; }
.msg.ai { background: var(--ai); align-self: flex-start; }
.msg.me { background: var(--me); align-self: flex-end; }
.status { color: var(--muted); font-size: .95rem; min-height: 1.5em; }
.mic { width: 72px; height: 72px; border-radius: 50%; font-size: 1.6rem; padding: 0; }
.mic.live { animation: pulse 1.2s infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(63,163,122,.5); } 50% { box-shadow: 0 0 0 12px rgba(63,163,122,0); } }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: .85rem; font-weight: 600; }
.pill.invite { background: #d1f2e0; color: #0e5a35; } .pill.maybe { background: #fdf0c8; color: #6b4e00; }
.pill.reject { background: #fbd5d1; color: #7a1b12; } .pill.review, .pill.in_progress { background: var(--line); color: var(--text); }
details { margin-top: 6px; } .tx { white-space: pre-wrap; font-size: .9rem; color: var(--muted); }
@media (max-width: 560px) { .hide-sm { display: none; } }
.preview { width: 160px; max-width: 40%; aspect-ratio: 4/3; object-fit: cover; border-radius: 10px; background: #000; float: right; margin: 0 0 10px 12px; transform: scaleX(-1); }
@media (max-width: 560px) { .preview { width: 110px; } }
