:root {
  color-scheme: light;
  --sidebar: #171717;
  --sidebar-hover: #2b2b2b;
  --canvas: #ffffff;
  --surface: #f7f7f8;
  --surface-strong: #ececee;
  --ink: #202123;
  --muted: #6f7075;
  --line: #e5e5e7;
  --accent: #6c5ce7;
  --accent-dark: #5546c8;
  --success: #1f8f68;
  --warning: #a76400;
  --danger: #b42318;
  --shadow: 0 12px 38px rgba(20, 20, 24, .12);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html, body, #chat-app { height: 100%; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  overflow: hidden;
}

button, textarea, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.boot-screen {
  height: 100%;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  color: var(--muted);
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #7c6cf2, #4434b8);
  color: #fff;
  font-weight: 750;
  box-shadow: 0 8px 24px rgba(108, 92, 231, .28);
}

.chat-shell {
  height: 100dvh;
  display: flex;
  background: var(--canvas);
}

.sidebar {
  width: 278px;
  flex: 0 0 278px;
  display: flex;
  flex-direction: column;
  padding: 12px;
  background: var(--sidebar);
  color: #f4f4f5;
  overflow: hidden;
  z-index: 30;
}

.sidebar-brand {
  height: 46px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 8px;
  font-weight: 650;
  letter-spacing: -.01em;
}

.sidebar-brand .brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  box-shadow: none;
}

.new-chat {
  width: 100%;
  height: 44px;
  margin: 8px 0 18px;
  padding: 0 13px;
  display: flex;
  align-items: center;
  gap: 11px;
  border: 1px solid #444;
  border-radius: 10px;
  background: transparent;
  color: #fff;
  cursor: pointer;
  text-align: left;
  transition: background .16s ease, border-color .16s ease;
}

.new-chat:hover { background: var(--sidebar-hover); border-color: #5b5b5b; }
.new-chat span:first-child { font-size: 22px; line-height: 1; font-weight: 300; }

.history-label {
  padding: 0 10px 8px;
  color: #929298;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.conversation-list { flex: 1; overflow-y: auto; scrollbar-width: thin; }

.conversation-item {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 0;
  border-radius: 9px;
  display: block;
  background: transparent;
  color: #d8d8db;
  text-align: left;
  cursor: pointer;
}

.conversation-item:hover, .conversation-item.active { background: var(--sidebar-hover); color: #fff; }
.conversation-title { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 13px; }
.conversation-meta { display: block; margin-top: 3px; color: #929298; font-size: 11px; }

.sidebar-footer {
  padding: 12px 8px 4px;
  border-top: 1px solid #343434;
}

.sidebar-project {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.project-dot { width: 9px; height: 9px; border-radius: 50%; background: #47c99d; flex: none; box-shadow: 0 0 0 4px rgba(71,201,157,.11); }
.project-copy { min-width: 0; }
.project-copy strong, .project-copy span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-copy strong { font-size: 12px; }
.project-copy span { color: #929298; font-size: 10px; margin-top: 2px; }

.main-panel { min-width: 0; flex: 1; display: flex; flex-direction: column; position: relative; }

.chat-header {
  height: 58px;
  flex: 0 0 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  z-index: 10;
}

.header-agent { min-width: 0; }
.header-agent strong { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.header-agent span { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.build-badge {
  flex: none;
  padding: 5px 9px;
  border: 1px solid #ddd8ff;
  border-radius: 999px;
  background: #f5f3ff;
  color: #5747c7;
  font-size: 10px;
  font-weight: 700;
}

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.close-history { display: none; }
.information-notice { color: var(--muted); font-size: 12px; line-height: 1.5; }
.sidebar .icon-button { color: #d8d8db; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.mobile-menu { display: none; border: 0; background: transparent; padding: 7px; font-size: 21px; cursor: pointer; }
.sidebar-scrim { display: none; }

.message-scroll {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  scroll-behavior: auto;
}

.message-column {
  width: min(820px, calc(100% - 40px));
  min-height: 100%;
  margin: 0 auto;
  padding: 38px 0 24px;
}

.welcome {
  min-height: calc(100vh - 280px);
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
}

.welcome .brand-mark { width: 46px; height: 46px; border-radius: 14px; }
.welcome h1 { margin: 18px 0 8px; font-size: clamp(25px, 4vw, 34px); letter-spacing: -.035em; }
.welcome p { max-width: 570px; margin: 0; color: var(--muted); line-height: 1.55; }

.suggestions {
  width: min(680px, 100%);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 28px;
}

.suggestion {
  min-height: 68px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  line-height: 1.35;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}

.suggestion:hover { background: var(--surface); border-color: #cfcfd3; transform: translateY(-1px); }
.suggestion small { display: block; color: var(--muted); margin-top: 4px; }

.message-pair { padding: 14px 0 24px; }

.user-row { display: flex; justify-content: flex-end; padding-left: 80px; }
.user-bubble {
  max-width: 78%;
  padding: 11px 15px;
  border-radius: 18px 18px 4px 18px;
  background: var(--surface-strong);
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.assistant-row { display: grid; grid-template-columns: 31px minmax(0, 1fr); gap: 13px; margin-top: 22px; }
.assistant-avatar { width: 31px; height: 31px; border-radius: 9px; display: grid; place-items: center; background: linear-gradient(135deg, #7868ed, #5142c6); color: #fff; font-size: 12px; font-weight: 750; }
.assistant-content { min-width: 0; padding-top: 3px; }
.assistant-name { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 13px; font-weight: 700; }

.answer-type { padding: 3px 7px; border-radius: 999px; font-size: 9px; letter-spacing: .02em; }
.answer-type.expert { color: #176d51; background: #e9f8f2; }
.answer-type.general { color: #315ba7; background: #ecf2ff; }
.answer-type.unable { color: #8b5602; background: #fff3dc; }

.assistant-answer { font-size: 15px; line-height: 1.72; white-space: pre-wrap; overflow-wrap: anywhere; }
.assistant-actions { display: flex; align-items: center; gap: 6px; margin-top: 12px; }
.icon-button { border: 0; border-radius: 7px; background: transparent; color: var(--muted); padding: 6px 8px; cursor: pointer; font-size: 12px; }
.icon-button:hover { background: var(--surface); color: var(--ink); }

.answer-details { margin-top: 13px; border-top: 1px solid var(--line); }
.answer-details summary { padding: 11px 0; color: var(--muted); cursor: pointer; font-size: 12px; user-select: none; }
.answer-details summary:hover { color: var(--ink); }
.detail-grid { display: grid; gap: 11px; padding: 3px 0 7px; }
.detail-card { padding: 12px 14px; border-radius: 11px; background: var(--surface); font-size: 12px; line-height: 1.55; }
.detail-card strong { display: block; margin-bottom: 3px; color: #46464a; font-size: 10px; letter-spacing: .06em; text-transform: uppercase; }
.source-list { margin: 7px 0 0; padding-left: 18px; }
.source-list a { color: #5546c8; }
.trace-list { margin: 7px 0 0; padding-left: 20px; }
.trace-meta { color: var(--muted); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 10px; overflow-wrap: anywhere; }

.typing { display: inline-flex; gap: 4px; padding: 10px 0; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: #8d8d92; animation: pulse 1.15s infinite ease-in-out; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes pulse { 0%, 60%, 100% { opacity: .3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }

.error-banner {
  width: min(820px, calc(100% - 40px));
  margin: 10px auto 0;
  padding: 10px 13px;
  border: 1px solid #f1c8c3;
  border-radius: 10px;
  background: #fff4f2;
  color: var(--danger);
  font-size: 12px;
}

.composer-wrap {
  flex: none;
  padding: 28px 22px 18px;
  background: linear-gradient(to bottom, rgba(255,255,255,0), #fff 27%, #fff);
}

.composer {
  width: min(820px, 100%);
  margin: 0 auto;
  display: flex;
  align-items: flex-end;
  gap: 9px;
  padding: 10px 10px 10px 16px;
  border: 1px solid #d3d3d7;
  border-radius: 17px;
  background: #fff;
  box-shadow: var(--shadow);
}

.composer:focus-within { border-color: #aaa2e7; box-shadow: 0 12px 38px rgba(56,46,120,.14), 0 0 0 3px rgba(108,92,231,.08); }
.composer textarea { min-width: 0; flex: 1; min-height: 28px; max-height: 190px; padding: 4px 0; resize: none; overflow-y: auto; border: 0; outline: 0; color: var(--ink); line-height: 1.45; }
.composer textarea::placeholder { color: #99999e; }
.send-button { width: 36px; height: 36px; flex: none; border: 0; border-radius: 10px; display: grid; place-items: center; background: var(--accent); color: #fff; cursor: pointer; font-size: 18px; transition: background .15s ease, transform .15s ease; }
.send-button:hover:not(:disabled) { background: var(--accent-dark); transform: translateY(-1px); }
.send-button:disabled { background: #d7d7db; cursor: default; }
.composer-note { width: min(820px, 100%); margin: 8px auto 0; text-align: center; color: #8a8a90; font-size: 10px; }

.state-page { height: 100%; padding: 36px 22px; display: grid; place-items: center; background: var(--surface); overflow-y: auto; }
.state-card { width: min(560px, 100%); padding: 30px; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: var(--shadow); }
.state-card h1 { margin: 18px 0 8px; font-size: 25px; letter-spacing: -.025em; }
.state-card p { color: var(--muted); line-height: 1.55; }
.project-form { display: flex; gap: 8px; margin-top: 20px; }
.project-form input { min-width: 0; flex: 1; height: 42px; padding: 0 12px; border: 1px solid #cfcfd3; border-radius: 10px; outline: 0; }
.project-form input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(108,92,231,.1); }
.primary-button { height: 42px; padding: 0 16px; border: 0; border-radius: 10px; background: var(--accent); color: #fff; font-weight: 650; cursor: pointer; }
.project-options { display: grid; gap: 7px; margin-top: 18px; }
.project-option { padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; text-align: left; cursor: pointer; }
.project-option:hover { background: var(--surface); }
.state-link { color: var(--accent-dark); }

@media (max-width: 760px) {
  .close-history { display: block; align-self: flex-end; }
  .sidebar { position: fixed; inset: 0 auto 0 0; transform: translateX(-101%); transition: transform .2s ease; box-shadow: none; }
  .chat-shell.sidebar-open .sidebar { transform: translateX(0); }
  .sidebar-scrim { position: fixed; inset: 0; z-index: 20; background: rgba(0,0,0,.38); }
  .chat-shell.sidebar-open .sidebar-scrim { display: block; }
  .mobile-menu { display: block; }
  .chat-header { padding: 0 12px; }
  .build-badge { display: none; }
  .message-column { width: min(100% - 28px, 820px); padding-top: 24px; }
  .user-row { padding-left: 28px; }
  .user-bubble { max-width: 90%; }
  .assistant-row { grid-template-columns: 28px minmax(0, 1fr); gap: 10px; }
  .assistant-avatar { width: 28px; height: 28px; }
  .suggestions { grid-template-columns: 1fr; }
  .suggestion:nth-child(n+3) { display: none; }
  .composer-wrap { padding-left: 10px; padding-right: 10px; }
  .composer-note { font-size: 9px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* Structured answer blocks remain text-only; generated HTML is never trusted. */
.assistant-answer { white-space: normal; }
.assistant-answer p { margin: 0 0 14px; }
.answer-conclusion { font-weight: 600; }
.assistant-answer h3 { font-size: 16px; margin: 22px 0 12px; }
.answer-options { display: grid; gap: 12px; }
.answer-option { border: 1px solid #dedee8; border-radius: 12px; padding: 16px 18px; background: #fafafe; }
.answer-option h4 { margin: 0 0 10px; font-size: 15px; }
.answer-option small { font-weight: 400; font-size: 11px; color: #626278; margin-left: 8px; }
.answer-option dl { display: grid; grid-template-columns: 80px 1fr; gap: 8px 12px; margin: 12px 0 0; }
.answer-option dt { font-weight: 600; color: #626278; }
.answer-option dd { margin: 0; }
.conversation-row { display: flex; align-items: center; }
.conversation-row .conversation-item { flex: 1; min-width: 0; }
.delete-conversation { border: 0; background: transparent; color: #b9b9ca; font-size: 22px; padding: 8px; cursor: pointer; }
.delete-conversation:hover, .delete-conversation:focus-visible { color: #ffb2b2; }
.delete-conversation:disabled { opacity: .3; cursor: default; }
.deletion-note { font-size: 11px; line-height: 1.5; color: #a9a9bb; padding: 0 14px; }
.delete-notice { color: #dfdcff; font-size: 12px; padding: 12px; }
.delete-notice button { color: inherit; background: transparent; border: 0; text-decoration: underline; cursor: pointer; }
.interview-notes-link { display: block; color: #d5ceff; font-size: 13px; padding-bottom: 12px; }

.customer-login { width:min(440px, calc(100% - 48px)); margin:10vh auto; line-height:1.6; }
.customer-login h1 { font-size:28px; margin-top:24px; }
.customer-login p { color:#62626e; }
.customer-login form { margin:24px 0; }
.customer-login label { display:block; font-weight:600; margin-bottom:8px; }
.customer-login input { box-sizing:border-box; width:100%; border:1px solid #bbb; border-radius:10px; padding:12px; font:inherit; margin-bottom:16px; }
.customer-login button { cursor:pointer; }
.customer-login .new-chat { justify-content:center; background:#6250db; color:white; width:100%; }
.customer-login .login-privacy { font-size:12px; margin-top:36px; }
#login-status { color:#4535a5; }

.customer-login .login-secondary-actions { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-top:12px; }
.customer-login .login-text-button { appearance:none; border:0; background:transparent; box-shadow:none; color:#5845c3; font:inherit; font-size:13px; font-weight:500; line-height:1.4; min-height:44px; padding:8px 2px; border-radius:4px; }
.customer-login .login-text-button-muted { color:#62626e; }
.customer-login .login-text-button:hover:not(:disabled) { color:#4535a5; text-decoration:underline; text-underline-offset:4px; }
.customer-login .login-text-button:focus-visible { outline:2px solid #6250db; outline-offset:4px; }
.customer-login .login-text-button:disabled { opacity:.5; cursor:wait; }

.pilot-notice { box-sizing:border-box; width:min(480px,calc(100% - 32px)); border:1px solid #e6e3f0; border-radius:20px; padding:32px; color:#252536; background:white; box-shadow:0 24px 80px #17112c33; }
.pilot-notice::backdrop { background:#17112780; backdrop-filter:blur(4px); }
.pilot-notice-eyebrow { color:#6250db; font-size:11px; letter-spacing:.12em; font-weight:600; margin:24px 0 8px; }
.pilot-notice h2 { font-size:25px; line-height:1.25; margin:0 0 16px; }
.pilot-notice p:not(.pilot-notice-eyebrow) { font-size:14px; line-height:1.65; color:#62626e; }
.pilot-notice-choice { display:flex; align-items:center; gap:10px; font-size:14px; margin-top:24px; min-height:44px; cursor:pointer; }
.pilot-notice-choice input { width:17px; height:17px; accent-color:#6250db; }
.pilot-notice .pilot-notice-error { color:#a12828; }
.pilot-notice-continue { width:100%; border:0; border-radius:10px; background:#6250db; color:white; padding:13px; font:inherit; cursor:pointer; }
.pilot-notice-continue:disabled { opacity:.6; cursor:wait; }
.pilot-notice-continue:focus-visible { outline:3px solid #bcb1fa; outline-offset:3px; }

/* Mobile-first chat controls: touch-sized, keyboard-safe and no hover-only actions. */
.header-agent {flex:1;min-width:0}
.header-agent .mentor-name {display:block;font-size:12px;color:var(--muted);white-space:normal;overflow-wrap:anywhere}
.current-chat-title {display:block;border:0;background:transparent;color:var(--ink);font-weight:650;font-size:16px;text-align:left;padding:5px 0;min-height:36px;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer}
.header-agent .current-chat-title span {display:inline;margin-left:6px;font-size:14px;color:var(--muted)}
.rename-form {display:flex;flex-wrap:wrap;gap:6px;align-items:center;max-width:560px}
.rename-form input {min-width:0;flex:1;width:140px;font-size:16px;padding:9px;border:1px solid var(--accent);border-radius:8px}
.rename-form button,.attach-button {border:0;background:var(--surface);color:var(--ink);border-radius:9px;min-width:44px;min-height:44px;cursor:pointer}
.rename-form small {width:100%;color:var(--danger)}
.attach-button {font-size:26px;flex:none;align-self:end}
.chat-attachments {display:flex;flex-wrap:wrap;gap:8px;max-width:100%;margin:8px 0}
.chat-attachment {display:flex;align-items:center;gap:8px;flex-wrap:wrap;border:1px solid var(--line);border-radius:10px;padding:8px 10px;background:var(--surface);min-width:0;max-width:100%;font-size:13px}
.chat-attachment button {background:transparent;border:0;color:var(--accent-dark);text-align:left;overflow-wrap:anywhere;min-height:32px;cursor:pointer;max-width:100%}
.chat-attachment small {color:var(--muted)}
.chat-attachment p {flex-basis:100%;margin:0;line-height:1.5;font-size:11px;color:var(--muted);white-space:normal}
.upload-status {font-size:13px;color:var(--muted);margin:8px 0}
.file-consent {max-height:calc(100dvh - 32px);overflow-y:auto;padding:24px}
.file-consent li {overflow-wrap:anywhere;font-size:13px}
.file-consent-actions {display:flex;gap:12px;margin-top:20px}
.file-consent-actions button {flex:1;min-height:44px;border-radius:10px;padding:10px;border:1px solid var(--line);background:var(--surface);cursor:pointer}
.file-consent-actions button:last-child {background:var(--accent);color:white;border:0}
.file-consent-actions button:disabled {opacity:.45;cursor:default}
.composer-wrap {padding-bottom:max(14px,env(safe-area-inset-bottom))}
.chat-header {height:auto;min-height:76px;padding-top:max(12px,env(safe-area-inset-top))}
.main-panel,.message-scroll {min-height:0}
[hidden] {display:none!important}
@media(max-width:760px){
 .chat-shell {height:100dvh;height:var(--chat-height,100dvh)}
 .chat-header {padding-left:12px;padding-right:12px;gap:10px}
 .current-chat-title {font-size:16px;min-height:40px}
 .composer textarea,.rename-form input {font-size:16px}
 .composer {gap:6px;padding:8px}
 .send-button,.mobile-menu,.delete-conversation {min-width:44px;min-height:44px}
 .assistant-name {flex-wrap:wrap;overflow-wrap:anywhere}
 .chat-attachment {width:100%}
 .file-consent .pilot-notice-choice {align-items:flex-start}
 .file-consent input[type=checkbox] {flex:none}
 .customer-login {margin:6vh auto;overflow-y:auto;max-height:88dvh}
}

.workspace-sidebar-tabs {display:flex;flex-direction:column;gap:4px;margin:-10px 0 18px;}
.workspace-sidebar-tab {display:flex;align-items:center;gap:12px;width:100%;padding:11px 13px;border:0;border-radius:8px;background:transparent;color:#d5d5d7;text-align:left;cursor:pointer;font-size:14px;}
.workspace-sidebar-tab span {width:17px;text-align:center;font-size:17px;}
.workspace-sidebar-tab:hover {background:var(--sidebar-hover);}
.workspace-sidebar-tab[aria-selected="true"] {background:#302d44;color:#fff;}
.workspace-sidebar-tab:focus-visible {outline:2px solid #b7abff;outline-offset:2px;}
.recording-upload-entry {padding:5px 0;margin-bottom:7px;border:0;background:none;color:var(--muted);cursor:pointer;font-size:12px;}
.recording-upload-entry:hover {color:var(--accent);}
 .workspace-content {display:flex;flex-direction:column;flex:1;min-width:0;min-height:0;}
.workspace-content > .main-panel {min-height:0;}
.workspace-content > .main-panel[hidden] {display:none;}
.recording-page-header {display:flex;align-items:center;gap:12px;flex:none;min-height:91px;padding:19px 32px;border-bottom:1px solid var(--line);background:var(--canvas);}
.recording-eyebrow {color:var(--accent);font-size:10px;font-weight:600;letter-spacing:.05em;text-transform:uppercase;}
.recording-page-header h1 {margin:7px 0 0;font-size:23px;letter-spacing:-.6px;}
.recording-page-scroll {flex:1;min-height:0;overflow:auto;padding:28px 32px 48px;}
.recording-card {width:min(820px,100%);margin:0 auto;}
.recording-intro {margin:14px 0 24px;color:var(--muted);font-size:14px;}
.recording-upload {padding:23px 18px;border:1px dashed #c8c0f3;border-radius:13px;text-align:center;background:#faf9ff;}
.recording-choose {display:inline-block;padding:10px 16px;border:1px solid var(--line);border-radius:9px;background:white;cursor:pointer;font-size:14px;font-weight:600;}
#recording-file[hidden] {display:none;}
.recording-choose:disabled {opacity:.5;cursor:default;}
.recording-choose:focus-visible {outline:2px solid var(--accent);outline-offset:3px;}
.recording-upload p {margin:10px 0 16px;font-size:12px;color:var(--muted);overflow-wrap:anywhere;}
.recording-save {padding:11px 20px;border:0;border-radius:9px;background:var(--accent);color:#fff;font-size:13px;font-weight:600;cursor:pointer;}
.recording-save:disabled {opacity:.45;cursor:default;}
.recording-list {margin-top:20px;}
.recording-empty {padding:25px 10px;text-align:center;color:var(--muted);font-size:13px;}
.recording-empty strong {font-weight:500;}
.recording-empty p {font-size:12px;}
.recording-row {display:flex;align-items:center;gap:12px;padding:15px 0;border-bottom:1px solid var(--line);}
.recording-file-icon {display:grid;place-items:center;flex-shrink:0;width:38px;height:42px;border-radius:9px;background:#f2efff;color:var(--accent);font-size:21px;}
.recording-row > div {min-width:0;flex:1;}
.recording-row strong {display:block;font-size:13px;font-weight:600;overflow-wrap:anywhere;}
.recording-row span:not(.recording-file-icon) {display:block;margin-top:5px;color:var(--muted);font-size:11px;}
.recording-row button,.recording-error button {border:1px solid var(--line);padding:7px 10px;border-radius:7px;background:white;color:var(--accent);cursor:pointer;font-size:12px;}
.recording-error,.recording-notice {font-size:13px;padding:12px;border-radius:8px;}
.recording-error {color:var(--danger);background:#fff2f0;}
.recording-notice {color:var(--success);background:#eef8f3;}
.recording-player {padding:15px;margin-top:18px;background:var(--surface);border-radius:12px;}
.recording-player strong {font-size:12px;overflow-wrap:anywhere;}
.recording-player audio {display:block;width:100%;margin-top:12px;}
@media (max-width:600px) {.recording-page-header {padding:18px;}.recording-page-scroll {padding:22px 18px;}}

.recording-upload-entry {display:block;width:min(820px,100%);margin:0 auto 9px;text-align:left;}

.recording-actions { display:flex; flex-wrap:wrap; gap:8px; justify-content:flex-end; }
.recording-row > div:nth-child(2) { min-width:0; }
.transcription-status { font-size:12px; color:var(--muted,#6b7280); }
.transcription-status[data-status="completed"] { color:#19724b; }
.transcription-status[data-status="failed"] { color:#b34b32; }
.transcript-preview { font-size:13px; color:#69727a; margin:6px 0 0; overflow-wrap:anywhere; }
.recording-search { margin:24px 0 12px; }
.recording-search label { font-size:13px; display:block; margin-bottom:8px; }
.recording-search > div { display:flex; gap:8px; }
.recording-search input { flex:1; min-width:0; padding:10px 12px; border:1px solid #dce1e5; border-radius:8px; font:inherit; }
.recording-search button,.recording-transcript button { background:transparent; border:1px solid #dce1e5; border-radius:8px; padding:8px 12px; cursor:pointer; }
.recording-transcript { margin-top:24px; padding:20px; background:#f7f9fa; border-radius:12px; }
.recording-transcript header { display:flex; justify-content:space-between; align-items:center; gap:12px; }
.recording-transcript p { white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.65; font-size:14px; }
@media(max-width:760px) { .recording-actions { grid-column:2; justify-content:flex-start; } }

.recording-row .recording-actions { flex:0 0 auto; max-width:45%; }
@media(max-width:600px) { .recording-row { flex-wrap:wrap; } .recording-row .recording-actions { flex:1 1 100%; max-width:100%; justify-content:flex-start; margin-left:38px; } }
