.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.studio-composer {
  background: #fffefa;
  border: 1px solid #cfd9cc;
  border-radius: 12px;
  margin-bottom: 26px;
  box-shadow: 0 3px 12px #233e2804;
  min-width: 0;
}
.studio-composer:focus-within {
  border-color: #799778;
  box-shadow: 0 0 0 3px #739b7110;
}
.studio-composer form {
  padding: 16px 18px 12px;
  border-radius: 12px;
}
.studio-composer form.dragover {
  background: #eaf0e4;
  box-shadow: inset 0 0 0 2px #668b62;
}
.studio-composer textarea {
  display: block;
  width: 100%;
  min-height: 68px;
  max-height: 220px;
  padding: 4px 0 13px;
  border: 0;
  resize: vertical;
  outline: none;
  background: transparent;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
}
.studio-composer textarea:focus-visible {
  outline: none;
}
.studio-composer textarea::placeholder {
  color: #7c8779;
}
.studio-composer-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.studio-composer-footer .row {
  gap: 5px;
}
.studio-icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  flex-shrink: 0;
  color: #687b60;
  text-decoration: none;
}
.studio-icon:hover {
  color: #2e5d38;
  background: #edf1e7;
}
.studio-icon svg {
  width: 18px;
  height: 18px;
}
.studio-icon.is-recording {
  color: #9d4c42;
  background: #f4e4de;
}
.studio-send {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 16px;
  min-height: 38px;
  border-radius: 8px;
  color: white;
  background: #30644a;
  font-size: 12px;
  font-weight: 550;
}
.studio-send:hover {
  background: #265239;
}
.studio-send svg {
  width: 15px;
  height: 15px;
}
.studio-send:disabled {
  cursor: default;
  background: #e7ebe2;
  color: #8c9785;
  opacity: 1;
}
.studio-send.busy {
  cursor: wait;
}
.studio-inbox-link {
  display: flex;
  gap: 7px;
  align-items: center;
  font-size: 10px;
  color: #6a7c60;
  margin-left: 8px;
}
.studio-inbox-link span {
  color: #45623b;
  background: #edf1e7;
  border-radius: 4px;
  padding: 2px 5px;
}
.studio-error {
  font-size: 12px;
  color: #a2473f;
  line-height: 1.5;
  padding-top: 10px;
}
.studio-error:empty {
  display: none;
}
.studio-file-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.studio-file-chips:not(:empty) {
  margin-bottom: 14px;
}
.attachment-card {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 250px;
  max-width: 100%;
  min-width: 0;
  padding: 10px;
  border: 1px solid #dce4d2;
  border-radius: 9px;
  background: #fffefa;
  color: var(--ink);
  text-align: left;
  overflow: hidden;
}
.attachment-card:hover:not(:disabled) {
  border-color: #8ca783;
  background: #f6f8f1;
}
.attachment-card:focus-visible {
  outline: 2px solid #30644a;
  outline-offset: 3px;
}
.attachment-card:disabled {
  opacity: 1;
  cursor: wait;
}
.attachment-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  position: relative;
  flex-shrink: 0;
  width: 44px;
  height: 48px;
  border-radius: 6px;
  background: #edf1e7;
  color: #6b805c;
  overflow: hidden;
}
.attachment-visual > svg {
  width: 19px;
  height: 19px;
}
.attachment-extension {
  max-width: 100%;
  padding: 0 3px;
  font-size: 8px;
  font-weight: 650;
  letter-spacing: .04em;
}
.attachment-visual.is-image {
  width: 100%;
  height: 116px;
  border-radius: 0;
  background: #e8ece2;
}
.attachment-visual img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.attachment-visual.is-broken img {
  display: none;
}
.attachment-info {
  display: block;
  flex: 1;
  min-width: 0;
}
.attachment-name {
  display: block;
  font-size: 12px;
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.attachment-meta {
  display: block;
  font-size: 10px;
  line-height: 1.5;
  color: #77856b;
  margin-top: 3px;
}
.attachment-card.has-image {
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  width: 180px;
  padding: 0;
}
.attachment-card.has-image .attachment-info {
  padding: 9px 10px;
}
.studio-file-chip {
  position: relative;
  width: 280px;
  max-width: 100%;
  min-width: 0;
  background: #fffefa;
  border: 1px solid #dce4d2;
  border-radius: 9px;
  align-self: flex-start;
}
.studio-file-chip.has-image {
  width: 180px;
}
.studio-file-chip > .attachment-card {
  width: 100%;
  border: 0;
  padding-right: 32px;
}
.studio-file-chip > .attachment-card.has-image {
  padding-right: 0;
}
.studio-file-chip > .studio-icon {
  position: absolute;
  right: 5px;
  top: 5px;
  width: 25px;
  height: 25px;
  background: #fffefaeF;
  border: 1px solid #dce4d2;
  border-radius: 50%;
  color: #526347;
}
.studio-file-chip > .studio-icon:hover {
  background: #e8eee0;
}
.studio-file-chip > .studio-icon svg {
  width: 13px;
  height: 13px;
}
.file-chip-state {
  padding: 0 10px 8px;
  font-size: 10px;
  line-height: 1.5;
  color: #718166;
  margin-top: 4px;
}
.file-chip-state button {
  color: #315d32;
  text-decoration: underline;
  padding: 0;
  font-size: inherit;
}
.studio-file-chip.failed {
  border-color: #d9b6a6;
}
.studio-file-chip.failed .file-chip-state {
  color: #9a5343;
}
.studio-file-chip audio {
  display: block;
  width: calc(100% - 20px);
  height: 34px;
  margin: 0 10px 10px;
}
.recording-panel {
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 8px;
  background: #f8eeea;
  padding: 8px 12px;
  margin: 4px 0 12px;
  color: #9d4b42;
}
.recording-panel[hidden] {
  display: none;
}
.record-dot {
  width: 7px;
  height: 7px;
  background: #af554b;
  border-radius: 50%;
  flex-shrink: 0;
}
.recording-panel time {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.recording-panel canvas {
  width: 100%;
  min-width: 0;
  height: 32px;
  flex: 1;
}
.recording-panel .studio-icon {
  color: #a04e46;
  width: 27px;
  height: 27px;
}
.recording-panel .studio-icon:hover {
  background: #f0ddd6;
}
.capture-files,
.chat-message-files {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
}
.assistant-page {
  max-width: 1020px;
  margin: 0 auto;
}
.assistant-heading {
  display: flex;
  gap: 15px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 25px;
}
.assistant-heading h1 {
  font-size: 30px;
}
.assistant-heading .row {
  gap: 8px;
}
#chat-select {
  max-width: 260px;
  min-width: 100px;
  font-size: 11px;
  border: 1px solid #dce4d1;
  border-radius: 8px;
  padding: 10px;
  background: #fffefa;
  color: #526c43;
  text-overflow: ellipsis;
}
.assistant-heading .btn {
  min-height: 35px;
  padding: 8px 12px;
  font-size: 11px;
}
.assistant-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  padding-bottom: 15px;
  border-bottom: 1px solid #dfe5d6;
}
.assistant-controls label {
  font-size: 10px;
  color: #728367;
  display: flex;
  align-items: center;
  gap: 7px;
}
.assistant-controls select {
  border: 0;
  background: transparent;
  color: #425d34;
  font-size: 11px;
  max-width: 250px;
  padding: 5px 1px;
  cursor: pointer;
}
#assistant-status {
  font-size: 11px;
  color: #68805b;
  margin-left: auto;
}
.chat-messages {
  min-height: 320px;
  max-height: max(350px, 55dvh);
  overflow-y: auto;
  padding: 24px 4px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
.chat-empty {
  margin: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 50px 10px;
}
.chat-empty > svg {
  width: 26px;
  height: 26px;
  color: #638558;
}
.chat-empty h2 {
  font-size: 20px;
  font-weight: 450;
}
.chat-empty .row {
  justify-content: center;
  gap: 10px;
}
.chat-empty button {
  border: 1px solid #dae3d0;
  border-radius: 8px;
  padding: 9px 13px;
  background: #fffefa;
  color: #5c744e;
  font-size: 11px;
}
.chat-empty button:hover {
  border-color: #7c9b6a;
}
.chat-message {
  padding: 0 10px;
  min-width: 0;
}
.chat-message.user {
  padding: 17px 20px;
  background: #ecefe6;
  border: 1px solid #e1e6d8;
  border-radius: 12px;
  margin-left: 40px;
}
.chat-message header {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  margin-bottom: 12px;
}
.chat-message header strong {
  font-weight: 600;
  color: #446238;
}
.chat-message header span {
  color: #78896c;
  font-size: 10px;
}
.chat-message-body {
  font-size: 14px;
  line-height: 1.75;
  color: #324b29;
  overflow-wrap: anywhere;
}
.chat-message-body p {
  margin: 0 0 12px;
  white-space: pre-wrap;
}
.chat-message-body p:last-child {
  margin: 0;
}
.chat-message-body h3 {
  font-size: 15px;
  font-weight: 600;
  margin: 20px 0 10px;
}
.chat-message-body h3:first-child {
  margin-top: 0;
}
.chat-message-body ul {
  padding-left: 22px;
  margin: 10px 0;
}
.chat-message-body li {
  margin: 4px 0;
}
.chat-message-body code {
  font-family: ui-monospace, monospace;
  font-size: 12px;
  background: #e9eee1;
  padding: 2px 4px;
  border-radius: 4px;
}
.chat-message-body pre {
  overflow: auto;
  max-height: 400px;
  padding: 15px;
  background: #e9eee1;
  border-radius: 8px;
}
.chat-message-body pre code {
  padding: 0;
}
.chat-message-body a {
  color: #2e6c41;
  text-decoration: underline;
}
.chat-message-files:not(:empty) {
  margin-top: 15px;
}
.assistant-page .studio-composer {
  margin-top: 15px;
  margin-bottom: 0;
}
.chat-job-error {
  font-size: 12px;
  line-height: 1.6;
  padding: 14px 16px;
  background: #f6e9e2;
  border: 1px solid #e4c6b8;
  border-radius: 8px;
  color: #995543;
}
.chat-job-error button {
  display: block;
  color: #7f483a;
  padding: 8px 0 0;
  text-decoration: underline;
}
.library-file {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
  padding: 16px 0;
  border-bottom: 1px solid #dfe5d6;
}
.library-file-name.attachment-card {
  flex: 1 1 180px;
  flex-direction: row;
  align-items: center;
  gap: 13px;
  width: auto;
  border: 0;
  padding: 0;
  background: transparent;
}
.library-file-name.attachment-card .attachment-visual {
  width: 60px;
  height: 56px;
  border-radius: 6px;
}
.library-file-name.attachment-card .attachment-info {
  padding: 0;
}
.library-file-name .attachment-name {
  font-size: 13px;
}
.library-file-name:hover .attachment-name {
  color: #42743a;
}
.library-file-actions {
  display: flex;
  gap: 5px;
}
.library-transcript {
  flex-basis: 100%;
  padding-left: 73px;
  font-size: 12px;
  color: #6a7d5c;
  line-height: 1.6;
  white-space: pre-wrap;
}
#library-progress {
  font-size: 12px;
  color: #63804e;
  margin-bottom: 15px;
}
#library-progress:empty {
  display: none;
}
.preview-file {
  max-width: 100%;
  margin-bottom: 20px;
}
.preview-file img {
  display: block;
  width: 100%;
  max-height: 60dvh;
  object-fit: contain;
}
.preview-file audio {
  width: 100%;
  margin-bottom: 15px;
}
.preview-file pre {
  font-family: inherit;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 55dvh;
  overflow-y: auto;
  font-size: 13px;
  line-height: 1.7;
}
#modal:has(.preview-file) {
  width: min(880px, calc(100vw - 32px));
}
#modal:has(.preview-file) .modal-head h2 {
  overflow-wrap: anywhere;
}
.preview-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.preview-footer > span,
.preview-status,
.preview-unavailable p {
  color: #718166;
  font-size: 12px;
  line-height: 1.6;
}
.preview-unavailable {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 25px 0;
}
@media (max-width: 720px) {
  .studio-composer {
    margin-bottom: 22px;
  }
  .studio-composer form {
    padding: 14px 14px 11px;
  }
  .studio-composer textarea {
    font-size: 16px;
    min-height: 72px;
  }
  .studio-send {
    padding: 10px 13px;
    font-size: 11px;
  }
  .studio-inbox-link {
    margin-left: 2px;
    font-size: 9px;
  }
  .studio-composer-footer .row {
    gap: 2px;
  }
  .studio-icon {
    width: 32px;
    height: 32px;
  }
  .recording-panel {
    gap: 7px;
    padding: 7px;
  }
  .studio-file-chip.has-image,
  .attachment-card.has-image:not(.library-file-name) {
    width: min(180px, calc((100vw - 88px) / 2));
  }
  .attachment-visual.is-image {
    height: 100px;
  }
  .assistant-heading {
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
  }
  .assistant-heading h1 {
    font-size: 27px;
  }
  .assistant-heading > .row {
    width: 100%;
    justify-content: space-between;
  }
  #chat-select {
    flex: 1;
    max-width: calc(100% - 80px);
  }
  .assistant-controls {
    gap: 8px 15px;
  }
  .assistant-controls select {
    max-width: 200px;
    font-size: 10px;
  }
  #assistant-status {
    flex-basis: 100%;
    margin-left: 0;
  }
  .chat-messages {
    min-height: 300px;
    max-height: 50dvh;
    padding-top: 20px;
    gap: 23px;
  }
  .chat-message {
    padding: 0;
  }
  .chat-message.user {
    margin-left: 15px;
    padding: 13px 15px;
  }
  .chat-message-body {
    font-size: 13px;
  }
  .chat-empty {
    padding: 30px 0;
  }
  .chat-empty button {
    font-size: 10px;
  }
  .files-page .page-heading {
    justify-content: space-between;
  }
  .files-page .page-heading .btn {
    margin-left: 0;
  }
  .library-file {
    gap: 9px;
  }
  .library-file-name .attachment-name {
    font-size: 12px;
  }
  .library-file-actions {
    gap: 0;
  }
}

.dictation-state {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
  padding: 3px 0 10px;
}
.dictation-state button:not(.studio-icon) {
  font: inherit;
  color: var(--green);
  border: 0;
  background: none;
  cursor: pointer;
}
