/* ============ TedQu Voice Tutor — design system ============
   Light-first, education-friendly. Dark theme via [data-theme="dark"]. */

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

:root {
  --bg: #f4f7fc;
  --bg-grad: linear-gradient(180deg, #eef3fb 0%, #f6f8fc 30%);
  --surface: #ffffff;
  --surface-2: #f1f5fb;
  --border: #e3e9f2;
  --text: #1e2a3a;
  --muted: #6b7a90;
  --primary: #2563eb;
  --primary-soft: #e4edff;
  --primary-grad: linear-gradient(135deg, #3b82f6, #6366f1);
  --green: #0ea373;
  --green-soft: #dcf5ec;
  --amber: #d97706;
  --amber-soft: #fdf1dc;
  --red: #dc2626;
  --red-soft: #fdeaea;
  --violet: #7c3aed;
  --violet-soft: #f0e9fd;
  --user-bubble: #2563eb;
  --user-text: #ffffff;
  --bot-bubble: #ffffff;
  --shadow: 0 1px 2px rgba(23, 43, 77, .06), 0 4px 16px rgba(23, 43, 77, .07);
  --shadow-lg: 0 8px 40px rgba(23, 43, 77, .16);
  --radius: 18px;
}

[data-theme="dark"] {
  --bg: #0e1626;
  --bg-grad: linear-gradient(180deg, #0c1322 0%, #0e1626 30%);
  --surface: #18233a;
  --surface-2: #1f2c47;
  --border: #263450;
  --text: #e6ecf6;
  --muted: #8fa0ba;
  --primary: #5b8cff;
  --primary-soft: #1d2c4e;
  --primary-grad: linear-gradient(135deg, #4f7dff, #7a6cff);
  --green: #2fbf8f;
  --green-soft: #143529;
  --amber: #f0a83c;
  --amber-soft: #3a2c14;
  --red: #f27272;
  --red-soft: #3c1f24;
  --violet: #a58bff;
  --violet-soft: #2a2350;
  --user-bubble: #3b6ef0;
  --user-text: #ffffff;
  --bot-bubble: #18233a;
  --shadow: 0 1px 2px rgba(0, 0, 0, .25), 0 4px 16px rgba(0, 0, 0, .25);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, .5);
}

html, body { height: 100%; }
body {
  background: var(--bg);
  background-image: var(--bg-grad);
  background-attachment: fixed;
  color: var(--text);
  font-family: "Nunito", "Segoe UI", system-ui, sans-serif;
  overscroll-behavior: none;
  transition: background-color .25s, color .25s;
}

.app {
  height: 100dvh;
  max-width: 620px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  padding-top: env(safe-area-inset-top);
}

.tiny { font-size: 12px; color: var(--muted); }
code { background: var(--surface-2); padding: 1px 6px; border-radius: 6px; font-size: 11px; }

/* icons */
.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }

/* ---------- top bar ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 12px 16px 10px;
}
.brand { display: flex; align-items: center; gap: 11px; min-width: 0; }
.avatar {
  width: 42px; height: 42px; border-radius: 14px; flex: none;
  background: var(--primary-grad); color: #fff;
  display: grid; place-items: center;
  font-size: 19px; font-weight: 800;
  box-shadow: var(--shadow);
}
.who { min-width: 0; }
.who h1 { font-size: 16.5px; font-weight: 800; letter-spacing: .1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sub { font-size: 12px; color: var(--muted); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topActions { display: flex; align-items: center; gap: 7px; flex: none; }

.iconbtn {
  position: relative;
  display: grid; place-items: center;
  width: 38px; height: 38px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--muted); cursor: pointer; text-decoration: none;
  box-shadow: var(--shadow);
  transition: color .15s, transform .1s;
}
.iconbtn:active { transform: scale(.93); }
.iconbtn:hover { color: var(--primary); }
.iconbtn.slim { width: 34px; height: 34px; box-shadow: none; }
.iconbtn .count {
  position: absolute; top: -5px; right: -5px;
  background: var(--red); color: #fff;
  font-size: 10px; font-weight: 800; line-height: 1;
  border-radius: 999px; padding: 3px 5.5px;
  border: 2px solid var(--bg);
}
/* theme toggle shows the icon of the mode you'd switch TO */
.moon { display: none; }
[data-theme="dark"] .moon { display: block; }
[data-theme="dark"] .sun { display: none; }

.pill {
  font-size: 12px; font-weight: 800; border-radius: 999px; padding: 6px 11px;
  background: var(--primary-soft); color: var(--primary);
}
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--red); flex: none; }
.dot.on { background: var(--green); box-shadow: 0 0 0 3.5px color-mix(in srgb, var(--green) 22%, transparent); }

/* ---------- escalation ---------- */
.escalation {
  background: var(--red-soft); color: var(--red);
  font-size: 12.5px; font-weight: 700;
  padding: 8px 16px; text-align: center;
}

/* ---------- chat ---------- */
.chat {
  flex: 1; overflow-y: auto;
  padding: 10px 14px 14px;
  display: flex; flex-direction: column; gap: 12px;
  scroll-behavior: smooth;
}
.welcome {
  margin: auto; text-align: center; max-width: 340px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 24px; padding: 28px 24px;
  box-shadow: var(--shadow);
}
.welcome-art { font-size: 44px; margin-bottom: 10px; }
.welcome h2 { font-size: 19px; font-weight: 800; margin-bottom: 8px; }
.welcome p { font-size: 13.5px; color: var(--muted); line-height: 1.55; margin-bottom: 8px; }

.row-bot { display: flex; align-items: flex-end; gap: 8px; max-width: 88%; align-self: flex-start; }
.bot-av {
  width: 28px; height: 28px; border-radius: 10px; flex: none;
  background: var(--primary-grad); color: #fff;
  display: grid; place-items: center; font-size: 14px;
  margin-bottom: 2px;
}
.msg {
  padding: 11px 15px;
  border-radius: var(--radius);
  font-size: 15px; line-height: 1.5; font-weight: 600;
  word-wrap: break-word;
  animation: pop .2s ease-out;
}
@keyframes pop { from { opacity: 0; transform: translateY(6px); } }
.msg.user {
  align-self: flex-end; max-width: 85%;
  background: var(--user-bubble); color: var(--user-text);
  border-bottom-right-radius: 6px;
  box-shadow: var(--shadow);
}
.msg.user .meta { display: block; margin-top: 4px; font-size: 10.5px; font-weight: 700; color: rgba(255,255,255,.75); }
.msg.bot {
  background: var(--bot-bubble);
  border: 1px solid var(--border);
  border-bottom-left-radius: 6px;
  box-shadow: var(--shadow);
  min-width: 40px;
}
.msg.sys {
  align-self: center; background: none; color: var(--muted);
  font-size: 12px; font-weight: 700; padding: 0 8px;
}
.msg.err { color: var(--red); }

/* typing indicator */
.dots { display: inline-flex; gap: 5px; padding: 3px 2px; }
.dots i {
  width: 7px; height: 7px; border-radius: 50%; background: var(--muted);
  animation: bounce 1.2s infinite;
}
.dots i:nth-child(2) { animation-delay: .15s; }
.dots i:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 0%, 60%, 100% { transform: translateY(0); opacity: .4; } 30% { transform: translateY(-5px); opacity: 1; } }

/* ---------- inline cards (homework + lessons) ---------- */
.card-stack { display: flex; flex-direction: column; gap: 10px; max-width: 92%; align-self: flex-start; width: 100%; }

.ic-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 13px 15px;
  box-shadow: var(--shadow);
  animation: pop .25s ease-out;
  border-left: 4px solid var(--primary);
}
.ic-card.subj-sci { border-left-color: var(--green); }
.ic-card.subj-eng { border-left-color: var(--violet); }
.ic-card.done { opacity: .62; }
.ic-top { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-bottom: 6px; }
.chip {
  font-size: 11px; font-weight: 800; border-radius: 999px; padding: 3.5px 10px;
  background: var(--primary-soft); color: var(--primary);
}
.chip.sci { background: var(--green-soft); color: var(--green); }
.chip.eng { background: var(--violet-soft); color: var(--violet); }
.chip.due { background: var(--amber-soft); color: var(--amber); margin-left: auto; }
.chip.due.overdue { background: var(--red-soft); color: var(--red); }
.chip.ok { background: var(--green-soft); color: var(--green); margin-left: auto; }
.ic-title { font-size: 14.5px; font-weight: 800; line-height: 1.35; }
.ic-meta { font-size: 11.5px; color: var(--muted); font-weight: 700; margin-top: 3px; }
.ic-body { font-size: 13px; color: var(--text); opacity: .88; line-height: 1.55; margin-top: 7px; font-weight: 600; }

.ic-card details { margin-top: 8px; }
.ic-card summary {
  cursor: pointer; font-size: 12.5px; font-weight: 800; color: var(--primary);
  list-style: none; user-select: none;
}
.ic-card summary::marker, .ic-card summary::-webkit-details-marker { display: none; }
.ic-card summary::before { content: "▸ "; }
.ic-card details[open] summary::before { content: "▾ "; }
.ic-card ol { margin: 8px 0 2px 20px; display: flex; flex-direction: column; gap: 6px; }
.ic-card li { font-size: 13px; line-height: 1.5; font-weight: 600; opacity: .9; }

.watch {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 10px; padding: 8px 14px;
  background: #ff0033; color: #fff;
  border-radius: 11px; text-decoration: none;
  font-size: 12.5px; font-weight: 800;
  box-shadow: var(--shadow);
}
.watch:active { transform: scale(.97); }
.watch svg { width: 15px; height: 15px; fill: #fff; stroke: none; }
.watch small { font-weight: 700; opacity: .85; }
.tip {
  margin-top: 9px; padding: 8px 12px;
  background: var(--amber-soft); color: var(--amber);
  border-radius: 10px; font-size: 12.5px; font-weight: 700; line-height: 1.45;
}

/* ---------- composer ---------- */
.composer {
  padding: 6px 14px calc(10px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 9px;
}
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip-btn {
  flex: none;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text); border-radius: 999px;
  padding: 8px 14px; font-size: 12.5px; font-weight: 700;
  font-family: inherit; cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform .1s;
}
.chip-btn:active { transform: scale(.95); }

.settings { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.seg {
  display: flex; background: var(--surface); border: 1px solid var(--border);
  border-radius: 999px; padding: 3px; box-shadow: var(--shadow);
}
.seg button {
  border: 0; background: none; color: var(--muted);
  font-family: inherit; font-size: 12.5px; font-weight: 800;
  padding: 6.5px 13px; border-radius: 999px;
  cursor: pointer; transition: all .15s;
}
.seg button.active { background: var(--primary); color: #fff; }

.inputRow { display: flex; align-items: center; gap: 9px; }
.textbox {
  flex: 1; min-width: 0;
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: 999px; padding: 12px 18px;
  font-family: inherit; font-size: 14.5px; font-weight: 600; color: var(--text);
  outline: none; box-shadow: var(--shadow);
  transition: border-color .15s;
}
.textbox:focus { border-color: var(--primary); }
.textbox::placeholder { color: var(--muted); font-weight: 600; }
.sendbtn {
  width: 44px; height: 44px; flex: none;
  border-radius: 50%; border: 1px solid var(--border);
  background: var(--surface); color: var(--primary);
  display: grid; place-items: center; cursor: pointer;
  box-shadow: var(--shadow); transition: transform .1s;
}
.sendbtn:active { transform: scale(.92); }
.sendbtn .ic { width: 19px; height: 19px; fill: currentColor; stroke: none; }

.mic {
  position: relative;
  width: 58px; height: 58px; flex: none;
  border-radius: 50%; border: 0; cursor: pointer;
  background: var(--primary-grad); color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 6px 20px color-mix(in srgb, var(--primary) 40%, transparent);
  transition: transform .12s, background .25s;
}
.mic:active { transform: scale(.93); }
.mic .mic-ic { width: 24px; height: 24px; stroke-width: 2; }
.mic .halo {
  position: absolute; inset: -4px; border-radius: 50%;
  border: 2.5px solid transparent; pointer-events: none;
  transition: border-color .2s, transform .08s ease-out;
}
.mic.listening { background: linear-gradient(135deg, #0ea373, #34d399); box-shadow: 0 6px 20px rgba(16,163,115,.4); }
.mic.listening .halo { border-color: rgba(52, 211, 153, .55); transform: scale(calc(1 + var(--level, 0) * .5)); }
.mic.thinking { background: linear-gradient(135deg, #d97706, #f5b53c); animation: breathe 1.5s ease-in-out infinite; }
.mic.speaking { background: linear-gradient(135deg, #7c3aed, #a78bfa); }
@keyframes breathe { 50% { transform: scale(1.06); } }

.state { text-align: center; font-size: 12.5px; font-weight: 700; color: var(--muted); min-height: 16px; }

/* ---------- bottom sheet + stats ---------- */
.scrim { position: fixed; inset: 0; background: rgba(15, 26, 46, .45); z-index: 30; }
.sheet {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: 0; width: min(100vw, 620px); max-height: 80dvh;
  background: var(--surface); border: 1px solid var(--border); border-bottom: 0;
  border-radius: 22px 22px 0 0;
  padding: 8px 18px calc(18px + env(safe-area-inset-bottom));
  z-index: 40; display: flex; flex-direction: column;
  box-shadow: var(--shadow-lg);
  animation: slideUp .22s ease-out;
}
@keyframes slideUp { from { transform: translate(-50%, 44px); opacity: 0; } }
.sheet-grab { width: 44px; height: 4.5px; border-radius: 4px; background: var(--border); margin: 6px auto 10px; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.sheet-head h2 { font-size: 16.5px; font-weight: 800; }
.sheet-x { background: none; border: 0; color: var(--muted); font-size: 15px; cursor: pointer; padding: 5px; }
.hw-list { overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.hw-tip { margin-top: 10px; }

.stats {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(170px + env(safe-area-inset-bottom));
  width: min(92vw, 380px);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 18px; padding: 14px 18px;
  box-shadow: var(--shadow-lg); z-index: 20;
}
.stats-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.stats-head h2 { font-size: 14px; font-weight: 800; }
.stats dl div { display: flex; justify-content: space-between; padding: 4.5px 0; font-size: 13.5px; font-weight: 700; }
.stats dt { color: var(--muted); }
.stats dd { font-variant-numeric: tabular-nums; }
.stats dd.good { color: var(--green); }
.stats dd.warn { color: var(--amber); }
.stats dd.bad { color: var(--red); }
.stats .tiny { margin-top: 8px; line-height: 1.45; }

/* login */
.login-overlay {
  position: fixed; inset: 0; z-index: 70;
  background: var(--bg); background-image: var(--bg-grad);
  display: grid; place-items: center; padding: 20px;
}
.login-card {
  width: min(92vw, 360px);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 22px; padding: 26px 24px;
  box-shadow: var(--shadow-lg);
  text-align: center;
  display: flex; flex-direction: column; gap: 10px;
}
.login-brand { font-size: 42px; }
.login-card h2 { font-size: 19px; font-weight: 800; }
.login-input { width: 100%; text-align: left; border-radius: 12px; }
.login-error { font-size: 12.5px; font-weight: 700; color: var(--red); }
.login-submit {
  width: 100%; border: 0; border-radius: 12px;
  background: var(--primary); color: #fff;
  font-family: inherit; font-size: 15px; font-weight: 800;
  padding: 12px; cursor: pointer;
  box-shadow: 0 4px 14px color-mix(in srgb, var(--primary) 35%, transparent);
}
.login-submit:active { transform: scale(.98); }
.login-divider {
  display: flex; align-items: center; gap: 10px;
  color: var(--muted); font-size: 11.5px; font-weight: 700; margin-top: 4px;
}
.login-divider::before, .login-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.login-demos { display: flex; gap: 8px; }
.demo-btn {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 12px; padding: 10px 4px;
  font-family: inherit; font-size: 13px; font-weight: 800; color: var(--text);
  cursor: pointer;
}
.demo-btn small { font-size: 10.5px; font-weight: 700; color: var(--muted); }
.demo-btn:active { transform: scale(.96); }

/* video popup player */
.vmodal {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(10, 18, 32, .7);
  display: grid; place-items: center;
  padding: 18px;
}
.vmodal-box {
  width: min(94vw, 560px);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 18px; padding: 12px 14px 14px;
  box-shadow: var(--shadow-lg);
  animation: pop .2s ease-out;
}
.vmodal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.vmodal-head h3 { font-size: 14.5px; font-weight: 800; line-height: 1.3; }
.vmodal-frame {
  position: relative; width: 100%; aspect-ratio: 16 / 9;
  border-radius: 12px; overflow: hidden; background: #000;
}
.vmodal-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.vmodal-link { display: inline-block; margin-top: 10px; color: var(--primary); font-weight: 700; text-decoration: none; }

/* ---------- whiteboard ---------- */
.board-card {
  align-self: flex-start; width: 100%; max-width: 92%;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 12px 14px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--amber);
  animation: pop .25s ease-out;
}
.board-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.board-chip { background: var(--amber-soft); color: var(--amber); }
.board-expand {
  background: none; border: 0; cursor: pointer;
  color: var(--primary); font-family: inherit; font-size: 12px; font-weight: 800;
  padding: 4px 6px;
}

.board { display: flex; flex-direction: column; gap: 10px; padding: 4px 2px; }
.board-title { font-size: 14.5px; font-weight: 800; }
.board-item { min-width: 0; }
.board.animate .board-item {
  animation: boardIn .4s ease-out backwards;
  animation-delay: calc(var(--i) * .35s);
}
@keyframes boardIn { from { opacity: 0; transform: translateY(8px) scale(.98); } }

.b-text { font-size: 13.5px; font-weight: 700; line-height: 1.5; }
.b-math { font-size: 15px; overflow-x: auto; overflow-y: hidden; padding: 2px 0; }
.b-math .katex-display { margin: 4px 0; }

.b-steps { margin: 0 0 0 22px; display: flex; flex-direction: column; gap: 7px; }
.b-steps li { font-size: 14px; font-weight: 600; }
.b-steps li::marker { color: var(--muted); font-size: 12px; font-weight: 800; }

.b-fbar { display: flex; flex-direction: column; gap: 8px; }
.b-fbar-row { display: flex; align-items: center; gap: 10px; }
.b-fbar-label { font-size: 12.5px; font-weight: 800; color: var(--muted); min-width: 34px; text-align: right; }
.b-fbar-track {
  flex: 1; display: flex; gap: 3px; height: 26px;
  border-radius: 8px; overflow: hidden;
}
.b-fbar-seg {
  flex: 1; background: var(--surface-2);
  border: 1.5px solid var(--border); border-radius: 5px;
}
.b-fbar-seg.on { border-color: transparent; }

.b-pies { display: flex; gap: 16px; flex-wrap: wrap; }
.b-pie { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.b-pie-svg { width: 76px; height: 76px; color: var(--muted); }
.b-pie-label { font-size: 12px; font-weight: 800; color: var(--muted); }

.b-nline { width: 100%; max-width: 380px; color: var(--text); display: block; }
.b-nline-txt { font-size: 11.5px; font-weight: 700; fill: var(--muted); font-family: inherit; }
.b-nline-txt.hl { fill: var(--amber); font-weight: 800; }

.b-emoji { display: flex; flex-direction: column; gap: 8px; }
.b-emoji-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.b-emoji-icons { font-size: 24px; letter-spacing: 3px; line-height: 1.3; word-break: break-all; }
.b-emoji-label { font-size: 12.5px; font-weight: 800; color: var(--muted); }

.b-table-wrap { overflow-x: auto; }
.b-table { border-collapse: collapse; font-size: 13px; min-width: 60%; }
.b-table th, .b-table td { border: 1.5px solid var(--border); padding: 6px 12px; text-align: left; font-weight: 600; }
.b-table th { background: var(--surface-2); font-weight: 800; font-size: 12px; }

.b-chart { display: flex; align-items: flex-end; gap: 14px; padding: 4px 2px 0; }
.b-chart-col { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.b-chart-val { font-size: 11px; font-weight: 800; color: var(--muted); }
.b-chart-bar { width: 30px; border-radius: 7px 7px 3px 3px; }
.b-chart-label { font-size: 11.5px; font-weight: 700; color: var(--muted); max-width: 56px; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.b-diagram { width: 100%; max-width: 420px; color: var(--text); display: block; }
.b-diagram-txt { fill: var(--text); font-weight: 700; font-family: inherit; }

/* whiteboard sheet */
.board-stage { position: relative; overflow-y: auto; min-height: 180px; border-radius: 14px; background: var(--surface-2); padding: 14px; }
.board-stage .board-title { font-size: 16px; }
#boardEmpty { max-width: 300px; margin: 30px auto; text-align: center; line-height: 1.6; }
.pen-layer { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.pen-layer.pen-active { pointer-events: auto; touch-action: none; cursor: crosshair; }

.board-tools { display: flex; align-items: center; gap: 6px; margin-left: auto; margin-right: 6px; }
.board-tools .tool {
  min-width: 26px; height: 26px; border-radius: 8px;
  border: 1.5px solid var(--border); background: var(--surface);
  cursor: pointer; font-family: inherit; font-size: 11px; font-weight: 800;
  color: var(--muted); padding: 0 6px;
  display: grid; place-items: center;
}
.board-tools .tool.active { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-soft); }
.board-tools .ink-b { background: #2563eb; }
.board-tools .ink-r { background: #dc2626; }
.board-tools .ink-g { background: #0ea373; }

/* redacted (blocked) message */
.msg.user.redacted { background: var(--surface-2); color: var(--muted); font-style: italic; box-shadow: none; }

/* KaTeX sizing inside bubbles */
.msg .katex { font-size: 1.05em; }
.msg .katex-display { margin: 6px 0; overflow-x: auto; overflow-y: hidden; }

.hidden { display: none !important; }

@media (min-width: 621px) {
  .app { border-left: 1px solid var(--border); border-right: 1px solid var(--border); }
}
