:root {
  --role-owner-accent: #0B5573;
  --role-owner-accent-hover: #08445D;
  --role-owner-accent-pressed: #063548;
  --role-owner-surface: #E8F4F8;
  --role-owner-text: #142B36;
  --role-owner-source-text: #465F6B;
  --role-counterpart-accent: #654072;
  --role-counterpart-accent-hover: #52335E;
  --role-counterpart-accent-pressed: #402747;
  --role-counterpart-surface: #F4EEF7;
  --role-counterpart-text: #142B36;
  --role-counterpart-source-text: #465F6B;
  --action-on-accent: #FFFFFF;
  --focus-ring: #8A4B08;
  --disabled-surface: #DDE3E6;
  --disabled-text: #59666D;
  --recording-accent: #9F2D20;
  --recording-surface: #FFF1EF;
  --neutral-action: #173F5F;
  color-scheme: light;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f4f7f8;
  color: #15252f;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  background: #fff;
  color: #173f5f;
}

.skip-link:focus {
  top: 1rem;
}

.app-header,
.app-shell,
footer {
  width: min(100% - 2rem, 48rem);
  margin-inline: auto;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.25rem;
  padding: 0.55rem 0;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(1.15rem, 4vw, 1.4rem);
}

h2 {
  line-height: 1.25;
}

.eyebrow,
.step-label {
  margin-bottom: 0.25rem;
  color: #486472;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status {
  flex: none;
  padding: 0.4rem 0.65rem;
  border-radius: 999px;
  background: #d9f2e5;
  color: #174e35;
  font-size: 0.85rem;
  font-weight: 700;
}

.status[data-online="false"] {
  background: #fff0c7;
  color: #684d00;
}

.app-shell {
  display: grid;
  gap: 1rem;
  flex: 1;
}

body[data-authenticated="true"] {
  position: fixed;
  top: var(--visual-viewport-offset-top, 0px);
  right: 0;
  bottom: auto;
  left: 0;
  height: var(--visual-viewport-height, 100dvh);
  min-height: 0;
  overflow: clip;
}

body[data-authenticated="true"] .app-shell {
  display: block;
  width: min(100%, 48rem);
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

body[data-authenticated="true"] .app-header,
body[data-authenticated="true"] .offline-note,
body[data-authenticated="true"] footer {
  display: none;
}

.auth-entry {
  width: min(100%, 34rem);
  margin-inline: auto;
  padding: clamp(1.25rem, 5vw, 2rem);
  border: 1px solid #d5dfe3;
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 0.25rem 1.5rem rgb(21 37 47 / 7%);
}

.intro,
.conversation-placeholder,
.session-panel,
.offline-note {
  padding: clamp(1.25rem, 5vw, 2rem);
  border: 1px solid #d5dfe3;
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 0.25rem 1.5rem rgb(21 37 47 / 7%);
}

.intro {
  color: #fff;
  border-color: #173f5f;
  background: #173f5f;
}

.session-panel {
  grid-column: 1 / -1;
}

.conversation-workspace {
  display: flex;
  grid-column: 1 / -1;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  max-height: none;
  padding: 0;
  overflow: clip;
}

.conversation-heading {
  padding: 0.45rem 0.65rem;
  border-bottom: 1px solid #d5dfe3;
}

.messenger-header {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  flex: none;
  align-items: center;
  gap: 0.45rem;
}

.messenger-header h2,
.language-indicator {
  margin: 0;
}

.messenger-header h2 {
  font-size: 1rem;
}

.language-indicator {
  width: auto;
  min-height: 2.75rem;
  padding: 0.35rem 0.55rem;
  border: 0;
  background: transparent;
  color: #486472;
  font-size: 0.8rem;
  font-weight: 700;
  text-align: left;
}

.settings-surface > summary {
  min-height: 2.75rem;
  padding: 0.7rem 0.85rem;
  border-radius: 999px;
  background: #eef3f5;
  color: #173f5f;
  cursor: pointer;
  font-weight: 800;
  list-style: none;
}

.settings-surface > summary::-webkit-details-marker {
  display: none;
}

.settings-sheet {
  position: absolute;
  z-index: 20;
  top: calc(100% + 0.25rem);
  right: 0.5rem;
  width: min(calc(100vw - 2rem), 25rem);
  max-height: calc(var(--visual-viewport-height, 100dvh) - 5.5rem);
  padding: 0.85rem;
  overflow-y: auto;
  border: 1px solid #c7d4da;
  border-radius: 0.85rem;
  background: #fff;
  box-shadow: 0 0.6rem 2rem rgb(21 37 47 / 20%);
}

.settings-section {
  padding-block: 0.7rem;
  border-bottom: 1px solid #d8e1e5;
}

.settings-section h3 {
  margin-block: 0 0.55rem;
  font-size: 1rem;
}

.conversation-language-settings {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.4rem;
}

.developer-mode-toggle {
  display: flex;
  align-items: center;
  min-height: 2.75rem;
  gap: 0.55rem;
  font-weight: 750;
}

.developer-settings[hidden] {
  display: none;
}

.developer-settings {
  padding-top: 0.65rem;
  border-top: 0.2rem solid #5d7784;
}

.conversation-heading h2,
.conversation-heading p:last-child {
  margin-bottom: 0.35rem;
}

.conversation-stream {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  padding: 0.55rem 0.65rem 0.75rem;
  -webkit-overflow-scrolling: touch;
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-padding-bottom: 4rem;
}

.conversation-empty-state {
  margin: 2rem auto;
  color: #52646d;
  text-align: center;
}

.new-message-button {
  position: sticky;
  bottom: 0.5rem;
  width: auto;
  min-height: 2.75rem;
  margin: 0 auto;
  padding-inline: 1rem;
  border: 0.12rem solid #fff;
  border-radius: 999px;
  box-shadow: 0 0.2rem 0.8rem rgb(21 37 47 / 22%);
}

.conversation-composer {
  flex: none;
  padding: 0.4rem 0.5rem calc(0.45rem + env(safe-area-inset-bottom));
  border-top: 1px solid #c7d4da;
  background: #fff;
  scroll-margin-bottom: calc(0.75rem + env(safe-area-inset-bottom));
}

.composer-row {
  display: grid;
  grid-template-columns: minmax(3.2rem, auto) minmax(0, 1fr) minmax(3.2rem, auto);
  align-items: center;
  gap: 0.4rem;
}

.composer-side {
  display: grid;
  min-width: 0;
}

.composer-action {
  width: 100%;
  min-height: 2.75rem;
  margin: 0;
  padding: 0.45rem 0.5rem;
  line-height: 1.15;
}

.mic-action::before,
.stop-action::before,
.tts-action::before {
  display: inline-block;
  width: 1.25rem;
  height: 1.25rem;
  margin-right: 0.3rem;
  background: currentcolor;
  content: "";
  vertical-align: -0.25rem;
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: contain;
}

.mic-action::before {
  mask-image: url("./icons/mic.svg");
}

.stop-action::before {
  mask-image: url("./icons/stop.svg");
}

.tts-action::before {
  mask-image: url("./icons/speaker.svg");
}

.role-owner-action:not(:disabled) {
  border: 0.12rem solid var(--role-owner-accent);
  background: var(--role-owner-accent);
  color: var(--action-on-accent);
}

.role-counterpart-action:not(:disabled) {
  border: 0.12rem solid var(--role-counterpart-accent);
  background: var(--role-counterpart-accent);
  color: var(--action-on-accent);
}

.conversation-composer[data-mode="TYPING"] .role-owner-action:not(:disabled) {
  background: var(--role-owner-surface);
  color: var(--role-owner-accent);
}

.conversation-composer[data-mode="TYPING"] .role-counterpart-action:not(:disabled) {
  background: var(--role-counterpart-surface);
  color: var(--role-counterpart-accent);
}

.role-owner-action:not(:disabled):hover {
  border-color: var(--role-owner-accent-hover);
  background: var(--role-owner-accent-hover);
}

.role-counterpart-action:not(:disabled):hover {
  border-color: var(--role-counterpart-accent-hover);
  background: var(--role-counterpart-accent-hover);
}

.conversation-composer[data-mode="TYPING"] .role-owner-action:not(:disabled):hover {
  border-color: var(--role-owner-accent-hover);
  background: var(--role-owner-surface);
  color: var(--role-owner-accent-hover);
}

.conversation-composer[data-mode="TYPING"] .role-counterpart-action:not(:disabled):hover {
  border-color: var(--role-counterpart-accent-hover);
  background: var(--role-counterpart-surface);
  color: var(--role-counterpart-accent-hover);
}

.conversation-composer[data-mode="TYPING"] .role-owner-action:not(:disabled):active {
  border-color: var(--role-owner-accent-pressed);
  background: var(--role-owner-surface);
  color: var(--role-owner-accent-pressed);
}

.conversation-composer[data-mode="TYPING"] .role-counterpart-action:not(:disabled):active {
  border-color: var(--role-counterpart-accent-pressed);
  background: var(--role-counterpart-surface);
  color: var(--role-counterpart-accent-pressed);
}

.role-owner-action:not(:disabled):active {
  border-color: var(--role-owner-accent-pressed);
  background: var(--role-owner-accent-pressed);
}

.role-counterpart-action:not(:disabled):active {
  border-color: var(--role-counterpart-accent-pressed);
  background: var(--role-counterpart-accent-pressed);
}

.role-owner-action:disabled,
.role-counterpart-action:disabled {
  border: 0.12rem solid var(--disabled-text);
  background: var(--disabled-surface);
  color: var(--disabled-text);
  opacity: 1;
}

.composer-center {
  min-width: 0;
}

.composer-center textarea {
  width: 100%;
  min-height: 2.75rem;
  max-height: 6rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid #82949d;
  border-radius: 1.2rem;
  color: inherit;
  font: inherit;
  font-size: 1rem;
  line-height: 1.35;
  resize: none;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.typed-action,
.recording-action,
.conversation-composer .recording-state,
.conversation-composer .recording-timer {
  display: none;
}

.session-audio-notice {
  margin: 0 0 0.35rem;
  color: var(--muted-text, #4b5563);
  font-size: 0.75rem;
  line-height: 1.35;
}

.session-source-audio-block {
  border-inline-start: 0.25rem solid #0b5573;
}

.rerecord-dependency {
  color: var(--muted-text, #4b5563);
  font-size: 0.875rem;
}

.conversation-composer[data-mode="TYPING"] .typed-action {
  display: block;
}

.conversation-composer[data-mode="TYPING"] #ptt-button,
.conversation-composer[data-mode="TYPING"] #counterpart-ptt-button,
.conversation-composer[data-state="RECORDING"] #ptt-button,
.conversation-composer[data-state="RECORDING"] #counterpart-ptt-button,
.conversation-composer[data-state="RECORDING"] .typed-action,
.conversation-composer[data-state="RECORDING"] textarea,
.conversation-composer[data-state="PROCESSING"] .composer-side,
.conversation-composer[data-state="REQUESTING_PERMISSION"] .composer-side,
.conversation-composer[data-state="PROCESSING"] textarea,
.conversation-composer[data-state="REQUESTING_PERMISSION"] textarea {
  display: none;
}

.conversation-composer[data-state="RECORDING"] {
  background: var(--recording-surface);
}

.conversation-composer[data-state="RECORDING"] .recording-action:not(:disabled) {
  border-color: var(--recording-accent);
  background: var(--recording-accent);
  color: var(--action-on-accent);
}

.conversation-composer[data-state="REQUESTING_PERMISSION"][data-active-speaker-role="user"] .recording-state {
  color: var(--role-owner-accent);
}

.conversation-composer[data-state="REQUESTING_PERMISSION"][data-active-speaker-role="other"] .recording-state {
  color: var(--role-counterpart-accent);
}

.conversation-composer[data-state="RECORDING"] .recording-action,
.conversation-composer[data-state="RECORDING"] .recording-state,
.conversation-composer[data-state="RECORDING"] .recording-timer,
.conversation-composer[data-state="PROCESSING"] .recording-state,
.conversation-composer[data-state="REQUESTING_PERMISSION"] .recording-state,
.conversation-composer[data-state="RECOVERABLE_ERROR"] .recording-state {
  display: block;
}

.conversation-composer[data-state="RECORDING"] .composer-center,
.conversation-composer[data-state="PROCESSING"] .composer-center,
.conversation-composer[data-state="REQUESTING_PERMISSION"] .composer-center {
  grid-column: 2;
  text-align: center;
}

.conversation-composer[data-state="PROCESSING"] .composer-row,
.conversation-composer[data-state="REQUESTING_PERMISSION"] .composer-row {
  grid-template-columns: 1fr;
}

.conversation-composer[data-state="PROCESSING"] .composer-center,
.conversation-composer[data-state="REQUESTING_PERMISSION"] .composer-center {
  grid-column: 1;
}

.session-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
}

.pilot-access {
  display: grid;
  gap: 0.55rem;
  margin-block: 1rem;
  padding: 0.85rem;
  border: 1px solid #c7d4da;
  border-radius: 0.75rem;
  background: #f5f8f9;
}

.pilot-access input {
  min-height: 3rem;
  border: 1px solid #8499a3;
  border-radius: 0.55rem;
  padding-inline: 0.7rem;
  font: inherit;
}

.compact-button {
  width: auto;
  min-width: 7rem;
  margin-top: 0;
}

.turn-list {
  display: grid;
  gap: 0.4rem;
  margin: 0.4rem 0 0;
  padding: 0;
  list-style: none;
}

.turn-card {
  width: min(86%, 34rem);
  padding: 0.5rem 0.6rem;
  border: 1px solid #c7d4da;
  border-radius: 0.85rem;
  color: var(--role-owner-text);
  background: #fff;
}

.turn-card.pending-turn {
  border-style: dashed;
  opacity: 0.92;
}

.pending-turn-stage {
  margin: 0 0 0.35rem;
  color: #52646d;
  font-size: 0.84rem;
  font-weight: 700;
}

.pending-turn .bubble-translation[aria-busy="true"] {
  color: #52646d;
  font-weight: 650;
}

/* Processing progress belongs to its speaker-side bubble, not the global composer. */
.conversation-composer[data-state="PROCESSING"] .recording-state,
.conversation-composer[data-state="PROCESSING"] .recording-timer,
.conversation-composer[data-state="PROCESSING"] .mic-input-level {
  display: none;
}

.bubble-detail-surface {
  position: relative;
  margin: -0.35rem;
  padding: 0.35rem;
  border-radius: 0.6rem;
  cursor: pointer;
}

.bubble-detail-chevron {
  position: absolute;
  right: 0.25rem;
  bottom: 0.15rem;
  color: #6d7f87;
  font-size: 1.35rem;
  line-height: 1;
}

.bubble-detail-surface:hover {
  background: rgb(37 106 138 / 7%);
}

.bubble-detail-surface:focus-visible {
  outline: 0.2rem solid var(--focus-ring);
  outline-offset: 0.15rem;
}

.bubble-speaker {
  margin-bottom: 0.25rem !important;
  font-size: 0.92rem;
}

.bubble-translation {
  margin-bottom: 0.55rem;
  font-size: clamp(1.05rem, 4.5vw, 1.3rem);
  font-weight: 750;
  line-height: 1.45;
}

.bubble-source {
  display: -webkit-box;
  margin-bottom: 0.55rem;
  overflow: hidden;
  color: var(--role-owner-source-text);
  font-size: 0.88rem;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.bubble-actions {
  display: flex;
  justify-content: flex-end;
}

.controlled-test-option {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  margin-block: 0.75rem;
  padding: 0.7rem;
  border: 1px solid #9aabb3;
  border-radius: 0.55rem;
  background: #f7f9fa;
}

.controlled-test-option input {
  width: 1.4rem;
  min-width: 1.4rem;
  height: 1.4rem;
  margin-top: 0.1rem;
}

.source-audio-block {
  border-left-color: #7a4f00;
  background: #fff9eb;
}

.source-audio-status {
  color: #4f3a00;
  font-weight: 700;
}

.bubble-listen-button,
.turn-detail-back,
.turn-detail-close {
  width: auto;
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding-inline: 0.85rem;
}

.bubble-listen-button {
  border: 0.12rem solid var(--neutral-action);
  background: #fff !important;
  color: var(--neutral-action) !important;
  font-size: 1.15rem;
}

.bubble-listen-button:disabled {
  border-color: var(--disabled-text);
  background: var(--disabled-surface) !important;
  color: var(--disabled-text) !important;
  opacity: 1;
}

.bubble-listen-button:not(:disabled):hover {
  border-color: var(--neutral-action);
  background: var(--neutral-action) !important;
  color: var(--action-on-accent) !important;
}

.bubble-listen-button:not(:disabled):active {
  border-color: #0F3049;
  background: #0F3049 !important;
  color: var(--action-on-accent) !important;
}

.bubble-listen-button:focus-visible {
  outline: 0.2rem solid var(--focus-ring);
  outline-offset: 0.15rem;
}

.bubble-verify-summary {
  margin-block: 0.55rem;
  padding: 0.45rem 0.6rem;
  border-radius: 0.5rem;
  background: #fff4d6;
  color: #684d00;
  font-size: 0.88rem;
  font-weight: 700;
}

.turn-detail {
  position: fixed;
  inset: 0;
  z-index: 30;
  width: min(100%, 48rem);
  height: 100dvh;
  margin-inline: auto;
  padding: 1rem 1rem 3rem;
  overflow-y: auto;
  background: #fff;
  box-shadow: 0 0 0 100vmax rgb(10 24 32 / 55%);
}

.turn-detail[hidden] {
  display: none;
}

.turn-detail-header {
  position: sticky;
  top: -1rem;
  z-index: 1;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.5rem;
  margin: -1rem -1rem 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #d5dfe3;
  background: #fff;
}

.turn-detail-header h3 {
  margin: 0;
  text-align: center;
  font-size: 1rem;
}

.owner-turn {
  justify-self: end;
  border-color: var(--role-owner-accent);
  border-right-width: 0.35rem;
  color: var(--role-owner-text);
  background: var(--role-owner-surface);
}

.counterpart-turn {
  justify-self: start;
  border-color: var(--role-counterpart-accent);
  border-left-width: 0.35rem;
  color: var(--role-counterpart-text);
  background: var(--role-counterpart-surface);
}

.owner-turn .bubble-speaker {
  color: var(--role-owner-accent);
}

.counterpart-turn .bubble-speaker {
  color: var(--role-counterpart-accent);
}

.owner-turn .bubble-source {
  color: var(--role-owner-source-text);
}

.counterpart-turn .bubble-source {
  color: var(--role-counterpart-source-text);
}

.historical-turn {
  opacity: 1;
}

.source-disclosure {
  margin-top: 0.85rem;
}

.source-disclosure > summary {
  min-height: 2.75rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid #9aabb3;
  border-radius: 0.55rem;
  background: #f7f9fa;
  color: #173f5f;
  cursor: pointer;
  font-weight: 750;
}

.advanced-edit-guidance {
  color: #52646d;
  font-size: 0.9rem;
}

.turn-card h3 {
  margin-block: 0 0.75rem;
}

.result-block {
  margin-top: 0.85rem;
  padding: 0.8rem;
  border-left: 0.3rem solid #5d7784;
  background: #f5f8f9;
}

.translation-block {
  border-left-color: #256a8a;
}

.primary-translation {
  padding: 1rem;
  border: 0;
  border-left: 0.35rem solid #256a8a;
  border-radius: 0.6rem;
  background: #eef8fc;
}

.translation-text {
  font-size: clamp(1.2rem, 5vw, 1.55rem);
  font-weight: 750;
  line-height: 1.5;
}

.primary-listen-button {
  margin-top: 0.75rem;
  background: #173f5f;
  color: #fff;
  overflow-wrap: normal;
  word-break: keep-all;
  white-space: nowrap;
}

.fact-block {
  border-left-color: #d79500;
}

.warning-block {
  border-left-color: #b44132;
}

.confirmation-block {
  border-left-color: #31845c;
}

.verify-section {
  margin-top: 1rem;
  padding: 1rem;
  border: 0.12rem solid #d79500;
  border-radius: 0.75rem;
  background: #fffaf0;
}

.verify-section > h4 {
  margin-block: 0 0.4rem;
}

.verify-guidance,
.provenance-label {
  color: #52646d;
  font-size: 0.9rem;
}

.source-fragment {
  display: block;
  margin-block: 0.5rem;
  padding: 0.65rem;
  border: 1px solid #d2b565;
  border-radius: 0.5rem;
  background: #fff;
  font-weight: 700;
}

.secondary-transcript,
.secondary-reference {
  background: #f7f9fa;
}

.result-block h4,
.result-block h5,
.result-block p {
  margin-bottom: 0.35rem;
}

.invalidated-result {
  color: #684d00;
  font-weight: 700;
}

.intro p,
.conversation-placeholder p,
.offline-note p {
  line-height: 1.6;
}

button {
  width: 100%;
  min-height: 3.25rem;
  border: 0;
  border-radius: 0.75rem;
  font: inherit;
  font-weight: 700;
}

button:disabled {
  background: var(--disabled-surface);
  color: var(--disabled-text);
  cursor: not-allowed;
}

button:not(:disabled) {
  background: #173f5f;
  color: #fff;
  cursor: pointer;
}

button:not(:disabled):hover {
  background: #0f3049;
}

button:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 0.2rem solid var(--focus-ring);
  outline-offset: 0.15rem;
}

.session-settings {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.45rem;
  margin-block: 1rem;
  padding: 1rem;
  border: 1px solid #c7d4da;
  border-radius: 0.75rem;
}

.session-settings legend,
.session-settings label {
  font-weight: 700;
}

select {
  width: 100%;
  min-height: 3rem;
  padding: 0.65rem;
  border: 1px solid #82949d;
  border-radius: 0.6rem;
  background: #fff;
  color: inherit;
  font: inherit;
}

.result-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.turn-action-status {
  margin-top: 0.75rem;
  padding: 0.65rem;
  border-radius: 0.55rem;
  background: #edf3f5;
}

.turn-action-status.failed {
  background: #fff0c7;
  color: #684d00;
}

.turn-action-status.success {
  border-left: 0.3rem solid #287a47;
}

.compare-block {
  border-left-color: #7054a5;
}

.reference-label {
  font-weight: 700;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.secondary-button {
  margin-top: 0.65rem;
  border: 0.12rem solid #173f5f;
  background: #fff !important;
  color: #173f5f !important;
}

.recording-state {
  margin: 0;
  padding: 0;
  color: #52646d;
  font-size: 0.8rem;
  line-height: 1.25;
  text-align: center;
}

.conversation-composer .recording-state:not([data-state="RECORDING"]):not([data-state="PROCESSING"]):not([data-state="RECOVERABLE_ERROR"]) .processing-stage {
  display: none;
}

.recording-state[data-state="RECORDING"] {
  color: var(--recording-accent);
}

.recording-state[data-state="PROCESSING"] {
  color: #173f5f;
}

.recording-state[data-state="REQUESTING_PERMISSION"] {
  color: #173f5f;
}

.recording-state[data-state="RECOVERABLE_ERROR"] {
  color: #684d00;
}

.recording-state span {
  line-height: 1.45;
}

.recording-timer {
  margin-top: 0.1rem;
  font-variant-numeric: tabular-nums;
  font-size: 0.9rem;
  font-weight: 800;
}

.mic-input-level {
  width: min(9rem, 55vw);
  height: 0.45rem;
  margin: 0.2rem auto 0;
  accent-color: currentColor;
}

.developer-turn-detail[hidden],
.developer-only-turn-info[hidden] {
  display: none;
}

.processing-stage {
  font-size: 0.78rem;
}

.connectivity-guidance {
  margin-top: 0.75rem;
  padding: 0.75rem;
  border: 2px solid #9b6a00;
  border-radius: 0.55rem;
  background: #fff0c7;
  color: #563f00;
  font-weight: 700;
}

.transcript-boundary {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid #d5dfe3;
}

.transcript-boundary p {
  margin-block: 0.35rem 0.65rem;
  color: #52646d;
  font-size: 0.9rem;
}

.current-translation {
  margin-top: 1rem;
  border: 0;
  border-left: 0.35rem solid #256a8a;
  border-radius: 0.6rem;
  background: #eef8fc;
}

.current-translation:focus {
  outline: 0.2rem solid #d79500;
  outline-offset: 0.2rem;
}

textarea {
  width: 100%;
  resize: vertical;
  border: 1px solid #9cabb2;
  border-radius: 0.65rem;
  padding: 0.75rem;
  color: inherit;
  font: inherit;
  line-height: 1.5;
}

.supporting-text {
  margin: 0.75rem 0 0;
  color: #52646d;
  font-size: 0.9rem;
}

.capture-diagnostic {
  margin-top: 1rem;
  padding: 0.75rem;
  border: 1px solid #9cabb2;
  border-radius: 0.65rem;
  font-size: 0.85rem;
}

.legacy-result-tools {
  margin: 0.75rem 1rem;
  padding: 0.65rem;
  border: 1px solid #c7d4da;
  border-radius: 0.65rem;
  color: #52646d;
}

.legacy-result-tools > summary {
  min-height: 2.75rem;
  padding-block: 0.65rem;
  cursor: pointer;
  font-weight: 700;
}

.pilot-developer-diagnostic {
  color: #52646d;
  background: #f7f9fa;
}

.pilot-developer-diagnostic > summary {
  overflow-wrap: anywhere;
}

.session-diagnostic {
  margin-top: 0.5rem;
  color: #52646d;
  font-size: 0.85rem;
}

.capture-diagnostic summary,
.session-diagnostic summary {
  min-height: 2.75rem;
  padding-block: 0.7rem;
  cursor: pointer;
  font-weight: 700;
}

.direction-left {
  text-align: left;
}

.direction-right {
  text-align: right;
}

.capture-diagnostic dl {
  display: grid;
  grid-template-columns: minmax(9rem, 1fr) minmax(0, 1fr);
  gap: 0.35rem 0.75rem;
  overflow-wrap: anywhere;
}

.capture-diagnostic dt { font-weight: 700; }
.capture-diagnostic dd { margin: 0; }
.capture-diagnostic pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  padding: 0.65rem;
  background: #f2f6f7;
  border-radius: 0.4rem;
}

@media (forced-colors: active) {
  .mic-action::before,
  .stop-action::before,
  .tts-action::before {
    background: ButtonText;
  }

  .owner-turn,
  .counterpart-turn,
  .role-owner-action,
  .role-counterpart-action {
    border-color: ButtonText;
    forced-color-adjust: auto;
  }
}

.offline-note {
  padding: 0.75rem;
  border: 1px solid #c8d2d7;
  border-radius: 0.65rem;
  color: #52646d;
  font-size: 0.9rem;
}

.settings-recovery {
  margin-top: 0.65rem;
  padding-top: 0.55rem;
  border-top: 1px solid #d5dfe3;
}

.settings-recovery > summary {
  min-height: 2.75rem;
  padding-block: 0.7rem;
  cursor: pointer;
  font-weight: 700;
}

.offline-note summary {
  min-height: 2.75rem;
  padding-block: 0.7rem;
  cursor: pointer;
  font-weight: 700;
}

footer {
  padding-block: 1.5rem;
  color: #52646d;
  text-align: center;
}

@media (min-width: 40rem) {
  .app-shell {
    grid-template-columns: 1fr 1fr;
  }

  .intro {
    grid-column: 1 / -1;
  }

  .session-settings {
    grid-template-columns: repeat(3, 1fr);
  }

}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
  }
}
