@font-face {
  font-family: "Literata";
  src: url("/static/web/fonts/literata.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}

@font-face {
  font-family: "Noto Sans";
  src: url("/static/web/fonts/notosans.woff2") format("woff2");
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
}

@font-face {
  font-family: "Noto Sans Mono";
  src: url("/static/web/fonts/notomono.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}

@font-face {
  font-family: "Noto Sans Tamil";
  src: url("/static/web/fonts/notosanstamil.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0964-0965, U+0B82-0BFA, U+200C-200D, U+20B9, U+25CC;
}

@font-face {
  font-family: "Noto Sans Arabic";
  src: url("/static/web/fonts/notosansarabic.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891,
    U+0897-08E1, U+08E3-08FF, U+200C-200E, U+FB50-FDFF, U+FE70-FEFC;
}

:root {
  color-scheme: light;
  --surface-canvas: #f3f2ed;
  --surface-paper: #fbfaf6;
  --surface-secondary: #efeee7;
  --surface-well: #e9e8e0;
  --text-primary: #23282b;
  --text-secondary: #4a5257;
  --text-muted: #66707a;
  --text-disabled: #9aa19e;
  --border-default: #dedcd3;
  --border-strong: #b8b6ab;
  --border-control: #7e7c6b;
  --accent-primary: #1e555c;
  --accent-hover: #194a50;
  --accent-pressed: #143c41;
  --accent-soft: #e2edec;
  --focus-ring: #2e7e88;
  --live: #b45309;
  --live-soft: #fdf3e4;
  --live-lamp: #f59e0b;
  --success: #25703f;
  --success-soft: #e6f1ea;
  --warning: #7a5f14;
  --warning-soft: #f5efdc;
  --error: #b03a30;
  --error-soft: #f9e9e7;
  --info: #3a6580;
  --info-soft: #e8eef3;
  --speaker-1: #7c3f66;
  --speaker-1-soft: #f3e4ee;
  --speaker-2: #44508f;
  --speaker-2-soft: #e5e8f7;
  --speaker-3: #7a4a2e;
  --speaker-3-soft: #f2e6dc;
  --speaker-4: #5f4796;
  --speaker-4-soft: #eae4f6;
  --speaker-5: #983d53;
  --speaker-5-soft: #f7e3e7;
  --speaker-6: #3f6470;
  --speaker-6-soft: #e1edf0;
  --shadow-menu: 0 4px 16px rgba(18, 22, 25, 0.12);
  --shadow-modal: 0 12px 32px rgba(18, 22, 25, 0.18);
  --font-serif: "Literata", Georgia, "Times New Roman", serif;
  --font-sans: "Noto Sans", "Noto Sans Tamil", "Noto Sans Arabic", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "Noto Sans Mono", ui-monospace, Menlo, Consolas, monospace;
  --sidebar-width: 240px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

.skip-link {
  position: fixed;
  left: 12px;
  top: 10px;
  z-index: 120;
  transform: translateY(-160%);
  padding: 9px 12px;
  border-radius: 4px;
  background: var(--text-primary);
  color: #fff;
}

.skip-link:focus {
  transform: none;
}

[hidden] {
  display: none !important;
}

html {
  min-width: 320px;
  background: var(--surface-canvas);
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--surface-canvas);
  color: var(--text-primary);
  font: 400 14.5px/1.55 var(--font-sans);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent-primary);
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a,
input,
select,
textarea,
[tabindex]:not([tabindex="-1"]) {
  outline: none;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:not([tabindex="-1"]):focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

button {
  min-height: 32px;
  border: 1px solid var(--border-control);
  border-radius: 4px;
  background: var(--surface-paper);
  color: var(--accent-primary);
  padding: 0 12px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}

button:hover:not(:disabled) {
  background: var(--surface-secondary);
}

button:disabled,
[aria-disabled="true"] {
  color: var(--text-disabled);
  background: var(--surface-secondary);
  cursor: not-allowed;
}

.icon {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon--sm {
  width: 14px;
  height: 14px;
}

.icon--lg {
  width: 20px;
  height: 20px;
}

.app-shell,
.app {
  display: flex;
  min-height: 100vh;
}

.app-sidebar,
.side {
  position: sticky;
  top: 0;
  width: var(--sidebar-width);
  height: 100vh;
  flex: 0 0 var(--sidebar-width);
  display: flex;
  flex-direction: column;
  padding: 20px 12px 16px;
  border-right: 1px solid var(--border-default);
  background: var(--surface-canvas);
  z-index: 30;
}

.app-brand,
.brand {
  display: block;
  padding: 0 10px;
  color: var(--text-primary);
  text-decoration: none;
}

.app-brand strong,
.brand b,
.brand-name {
  display: block;
  color: var(--text-primary);
  font: 600 20px/1.1 var(--font-serif);
}

.app-brand small,
.brand small {
  display: block;
  margin-top: 3px;
  color: var(--text-muted);
  font: 400 11px/1.4 var(--font-sans);
}

.brand .dot,
.logo-dot {
  display: none;
}

.app-nav,
.nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 26px;
}

.app-nav a,
.nav a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  padding: 0 10px;
  border-radius: 4px;
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
}

.app-nav a:hover,
.nav a:hover {
  background: var(--surface-secondary);
}

.app-nav a[aria-current="page"],
.app-nav a.active,
.nav a[aria-current="page"],
.nav a.active {
  background: var(--accent-soft);
  color: var(--accent-primary);
  font-weight: 600;
}

.app-nav a[aria-current="page"]::before,
.app-nav a.active::before,
.nav a[aria-current="page"]::before,
.nav a.active::before {
  position: absolute;
  inset: 7px auto 7px 0;
  width: 2px;
  border-radius: 1px;
  background: var(--accent-primary);
  content: "";
}

.app-sidebar-spacer,
.spacer {
  flex: 1;
}

.app-account,
.acct {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 50px;
  margin-top: auto;
  padding: 12px 6px 0;
  border-top: 1px solid var(--border-default);
  color: var(--text-primary);
  text-decoration: none;
}

.avatar,
.app-avatar {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-primary);
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  line-height: 30px;
}

.avatar img,
.app-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.acct .who,
.app-account-copy {
  min-width: 0;
  flex: 1;
}

.acct .nm,
.app-account-copy strong {
  display: block;
  overflow: hidden;
  color: var(--text-primary);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.acct .em,
.app-account-copy span {
  display: block;
  overflow: hidden;
  color: var(--text-muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-link {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 4px;
  color: var(--text-muted);
}

.account-link:hover,
.account-link[aria-current="page"] {
  background: var(--accent-soft);
  color: var(--accent-primary);
}

.logout {
  min-height: 28px;
  margin: 4px 6px 0;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  padding: 0;
  text-align: left;
  font-size: 11px;
  font-weight: 500;
  text-decoration: none;
}

.app-main,
.main {
  width: 100%;
  min-width: 0;
  max-width: 1440px;
  padding: 30px 40px 48px;
}

.page-head,
.mk-head {
  padding: 0 0 18px;
}

.page-title,
.mk-title,
.main h1,
h1.page-title {
  margin: 0;
  color: var(--text-primary);
  font: 500 28px/1.2 var(--font-serif);
}

.page-support,
.msub,
.mk-support {
  max-width: 76ch;
  margin: 5px 0 0;
  color: var(--text-secondary);
  font-size: 13.5px;
  line-height: 1.5;
}

.page-actions,
.toolbar,
.mk-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.btn-primary,
button.primary,
.newbtn {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--accent-primary);
  border-radius: 4px;
  background: var(--accent-primary);
  color: white;
  padding: 0 14px;
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
}

.btn-primary:hover,
button.primary:hover:not(:disabled),
.newbtn:hover {
  border-color: var(--accent-hover);
  background: var(--accent-hover);
}

.btn-quiet,
button.ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 32px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
}

.btn-danger,
button.danger {
  border-color: var(--error);
  background: var(--error);
  color: white;
}

.search-field,
.mk-search {
  height: 34px;
  min-width: 260px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border-control);
  border-radius: 4px;
  background: var(--surface-paper);
  color: var(--text-muted);
  padding: 0 10px;
}

.search-field input,
.mk-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--text-primary);
  padding: 0;
  outline: 0;
}

.filter-button,
.chip-button {
  min-height: 34px;
  border-color: var(--border-default);
  color: var(--text-secondary);
}

.scope-toggle,
.mk-scope {
  display: inline-flex;
  gap: 2px;
  border-radius: 6px;
  background: var(--surface-well);
  padding: 3px;
}

.scope-toggle button,
.mk-scope button,
.mk-scope a {
  min-height: 28px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--text-muted);
  padding: 0 12px;
  font-size: 12px;
}

.scope-toggle button[aria-pressed="true"],
.scope-toggle .on,
.mk-scope .on {
  border: 1px solid var(--border-default);
  background: var(--surface-paper);
  color: var(--text-primary);
}

.ledger,
.mk-ledger,
.list {
  margin-top: 6px;
  border: 1px solid var(--border-default);
  background: var(--surface-paper);
}

.ledger-head,
.lg-head {
  min-height: 34px;
  display: grid;
  align-items: center;
  gap: 16px;
  padding: 0 20px;
  border-bottom: 1px solid var(--border-default);
}

.ledger-head > *,
.lg-head > * {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ledger-row,
.lg-row,
.list .row {
  position: relative;
  min-height: 60px;
  display: grid;
  align-items: center;
  gap: 16px;
  border: 0;
  border-bottom: 1px solid var(--surface-well);
  border-radius: 0;
  background: var(--surface-paper);
  color: var(--text-primary);
  padding: 9px 20px;
  text-decoration: none;
}

.ledger-row:last-child,
.lg-row:last-child,
.list .row:last-child {
  border-bottom: 0;
}

.ledger-row:hover,
.lg-row:hover,
.list .row:hover {
  background: var(--surface-secondary);
  box-shadow: none;
}

.ledger-title,
.rec > b,
.row .title {
  display: block;
  overflow: hidden;
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ledger-subtitle,
.rec > span,
.row .meta {
  display: block;
  overflow: hidden;
  color: var(--text-muted);
  font-size: 12.5px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mono,
.timecode,
.row .when .t {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.chip,
.badge,
.role-chip,
.language-badge,
.lvl {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  background: var(--surface-secondary);
  color: var(--text-secondary);
  padding: 0 10px;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.chip.live,
.badge.live {
  background: var(--live-soft);
  color: var(--live);
}

.chip.success {
  background: var(--success-soft);
  color: var(--success);
}

.chip.info,
.viewer-chip {
  background: var(--info-soft);
  color: var(--info);
}

.live-lamp,
.lamp {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border: 1.5px solid var(--live);
  border-radius: 50%;
  background: var(--live-lamp);
}

.empty,
.state-card,
.notice {
  border: 1px solid var(--border-default);
  background: var(--surface-paper);
  padding: 48px 24px;
  text-align: center;
}

.empty h3,
.state-card h2,
.notice h3 {
  margin: 0 0 6px;
  font: 500 20px/1.3 var(--font-serif);
}

.empty p,
.state-card p,
.notice p {
  max-width: 54ch;
  margin: 0 auto;
  color: var(--text-secondary);
}

.detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
  align-items: start;
}

.detail .mini,
.detail-mini {
  display: none;
}

.transcript,
.tpane,
.chat-col {
  min-width: 0;
  border: 1px solid var(--border-default);
  border-radius: 0;
  background: var(--surface-paper);
}

.transcript-head,
.tpane > h2,
.chat-head {
  margin: 0;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border-default);
}

.transcript-head h2,
.tpane > h2,
.chat-head h2 {
  margin: 0;
  font: 500 20px/1.3 var(--font-serif);
}

.transcript-body,
.tpane #tBody,
.chat-log {
  max-width: 760px;
  margin: 0;
  padding: 8px 20px 28px;
}

.transcript-line,
.tline,
.chat-bubble {
  --speaker-color: var(--speaker-1);
  position: relative;
  width: 100%;
  max-width: none;
  display: grid;
  grid-template-columns: 64px 2px minmax(0, 1fr);
  gap: 12px;
  border: 0;
  border-bottom: 1px solid var(--surface-well);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 14px 0;
}

.transcript-line::before,
.tline::before,
.chat-bubble::before {
  grid-column: 2;
  grid-row: 1 / span 3;
  width: 2px;
  height: 100%;
  border-radius: 1px;
  background: var(--speaker-color);
  content: "";
}

.transcript-time,
.twhen,
.chat-bubble .when {
  grid-column: 1;
  grid-row: 1;
  float: none;
  color: var(--text-muted);
  font: 500 12px/1.4 var(--font-mono);
}

.transcript-speaker,
.twho,
.chat-bubble .who {
  grid-column: 3;
  grid-row: 1;
  margin: 0;
  color: var(--speaker-color);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.transcript-text,
.ttext,
.chat-bubble .text {
  grid-column: 3;
  grid-row: 2;
  color: var(--text-primary);
  font-size: 15.5px;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.transcript-translation,
.ttl,
.chat-bubble .translation {
  grid-column: 3;
  grid-row: 3;
  margin: 4px 0 0 12px;
  color: var(--text-secondary);
  font-size: 14px;
  font-style: italic;
  line-height: 1.55;
}

:lang(ta) .transcript-translation,
:lang(ar) .transcript-translation,
:lang(fa) .transcript-translation,
:lang(ta).transcript-translation,
:lang(ar).transcript-translation,
:lang(fa).transcript-translation,
:lang(ta) .ttl,
:lang(ar) .ttl,
:lang(fa) .ttl {
  font-style: normal;
}

.summary-panel,
.spanel {
  position: sticky;
  top: 24px;
  border: 1px solid var(--border-default);
  border-radius: 0;
  background: var(--surface-paper);
  padding: 18px;
}

.summary-panel h2,
.spanel h2 {
  margin: 0 0 10px;
  font: 500 20px/1.3 var(--font-serif);
}

.summary-copy,
.sumout {
  margin-top: 12px;
  color: var(--text-primary);
  font: 400 15.5px/1.6 var(--font-serif);
  white-space: pre-wrap;
}

.summary-copy.dim,
.sumout.dim {
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 13px;
}

.section-card,
.set-sec,
.rolecard,
.card {
  border: 1px solid var(--border-default);
  border-radius: 0;
  background: var(--surface-paper);
}

.section-label,
.set-h {
  padding: 12px 20px 0;
  color: var(--text-muted);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.settings-row,
.srow {
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 20px;
}

.settings-row + .settings-row,
.srow + .srow {
  border-top: 1px solid var(--surface-well);
}

.settings-label,
.srow .lab {
  width: 190px;
  flex: 0 0 auto;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
}

.settings-value,
.srow .val {
  min-width: 0;
  color: var(--text-secondary);
  font-size: 13px;
}

.settings-value small,
.srow .val small {
  display: block;
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 11.5px;
}

.settings-action,
.srow .act {
  margin-left: auto;
  flex: 0 0 auto;
}

.topbar,
.mobile-topbar {
  display: none;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: rgba(18, 22, 25, 0.45);
  padding: 16px;
}

.modal {
  width: min(100%, 440px);
  border: 1px solid var(--border-default);
  border-radius: 8px;
  background: var(--surface-paper);
  box-shadow: var(--shadow-modal);
  padding: 20px;
}

.modal h2 {
  margin: 0 0 8px;
  font: 500 20px/1.3 var(--font-serif);
}

.modal p {
  margin: 0;
  color: var(--text-secondary);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
}

.status-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  border: 1px solid var(--border-default);
  background: var(--surface-secondary);
  color: var(--text-secondary);
  padding: 8px 12px;
}

.status-strip.warning {
  border-color: var(--warning);
  background: var(--warning-soft);
  color: var(--warning);
}

.status-strip.error {
  border-color: var(--error);
  background: var(--error-soft);
  color: var(--error);
}

.skeleton {
  position: relative;
  overflow: hidden;
  border-radius: 2px;
  background: var(--surface-secondary);
}

.skeleton::after {
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
  animation: skeleton 1.5s infinite;
  content: "";
}

@keyframes skeleton {
  to { transform: translateX(100%); }
}

@media (max-width: 1279px) {
  :root {
    --sidebar-width: 64px;
  }

  .app-sidebar,
  .side {
    align-items: center;
    padding: 16px 0 14px;
  }

  .app-brand,
  .brand {
    width: 40px;
    height: 38px;
    padding: 0;
    overflow: hidden;
    color: transparent;
  }

  .app-brand strong,
  .brand b,
  .brand-name {
    color: var(--accent-primary);
    font-size: 0;
    text-align: center;
  }

  .app-brand strong::first-letter,
  .brand b::first-letter,
  .brand-name::first-letter {
    font-size: 17px;
  }

  .app-brand small,
  .brand small,
  .app-nav a span,
  .nav a span,
  .acct .who,
  .app-account-copy,
  .logout {
    display: none;
  }

  .app-nav,
  .nav {
    width: 100%;
    align-items: center;
    margin-top: 18px;
  }

  .app-nav a,
  .nav a {
    width: 40px;
    height: 38px;
    justify-content: center;
    padding: 0;
    font-size: 0;
  }

  .app-nav a[aria-current="page"]::before,
  .app-nav a.active::before,
  .nav a[aria-current="page"]::before,
  .nav a.active::before {
    left: -12px;
  }

  .app-account,
  .acct {
    width: 40px;
    justify-content: center;
    padding: 10px 0 0;
  }

  .account-link {
    display: none;
  }

  .app-main,
  .main {
    padding: 28px 24px 40px;
  }

  .detail {
    grid-template-columns: minmax(0, 1fr);
  }

  .summary-panel,
  .spanel {
    position: static;
  }
}

@media (max-width: 767px) {
  :root {
    --sidebar-width: 0px;
  }

  .app-shell,
  .app {
    display: block;
  }

  .app-sidebar,
  .side {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(82vw, 300px);
    height: 100vh;
    align-items: stretch;
    transform: translateX(-105%);
    transition: transform 240ms cubic-bezier(0.2, 0, 0, 1);
    box-shadow: var(--shadow-modal);
    padding: 24px 12px 16px;
  }

  body.nav-open .app-sidebar,
  body.nav-open .side {
    transform: translateX(0);
  }

  body.nav-open::after {
    position: fixed;
    inset: 0;
    z-index: 20;
    background: rgba(18, 22, 25, 0.45);
    content: "";
  }

  .app-brand,
  .brand {
    width: auto;
    height: auto;
    overflow: visible;
    color: inherit;
    padding: 0 10px;
  }

  .app-brand strong,
  .brand b,
  .brand-name {
    color: var(--text-primary);
    font-size: 20px;
    text-align: left;
  }

  .app-brand strong::first-letter,
  .brand b::first-letter,
  .brand-name::first-letter {
    font-size: inherit;
  }

  .app-brand small,
  .brand small,
  .app-nav a span,
  .nav a span,
  .acct .who,
  .app-account-copy,
  .logout {
    display: block;
  }

  .app-nav,
  .nav {
    align-items: stretch;
    margin-top: 26px;
  }

  .app-nav a,
  .nav a {
    width: auto;
    min-height: 44px;
    justify-content: flex-start;
    padding: 0 10px;
    font-size: 14px;
  }

  .app-nav a[aria-current="page"]::before,
  .app-nav a.active::before,
  .nav a[aria-current="page"]::before,
  .nav a.active::before {
    left: 0;
  }

  .app-account,
  .acct {
    width: 100%;
    justify-content: flex-start;
    padding: 12px 6px 0;
  }

  .account-link {
    display: inline-flex;
  }

  .topbar,
  .mobile-topbar {
    position: sticky;
    top: 0;
    z-index: 15;
    height: 56px;
    display: flex;
    align-items: center;
    gap: 6px;
    border-bottom: 1px solid var(--border-default);
    background: var(--surface-canvas);
    padding: 0 8px 0 4px;
  }

  .topbar .menu-button,
  .mobile-topbar .menu-button {
    width: 44px;
    height: 44px;
    border: 0;
    background: transparent;
    color: var(--text-secondary);
    padding: 0;
  }

  .topbar .mobile-brand,
  .mobile-topbar .mobile-brand {
    color: var(--text-primary);
    font: 600 17px/1 var(--font-serif);
  }

  .topbar .mobile-avatar,
  .mobile-topbar .mobile-avatar {
    margin-left: auto;
  }

  .app-main,
  .main {
    padding: 18px 16px 32px;
  }

  .page-title,
  .mk-title,
  .main h1,
  h1.page-title {
    font-size: 24px;
  }

  .page-actions,
  .toolbar,
  .mk-actions {
    align-items: stretch;
  }

  .search-field,
  .mk-search {
    min-width: 0;
    min-height: 44px;
    flex: 1 1 200px;
  }

  .page-actions > button,
  .page-actions > a,
  .toolbar > button,
  .toolbar > a {
    min-height: 44px;
  }

  .ledger,
  .mk-ledger,
  .list {
    margin-right: -16px;
    margin-left: -16px;
    border-right: 0;
    border-left: 0;
  }

  .ledger-head,
  .lg-head {
    display: none;
  }

  .ledger-row,
  .lg-row,
  .list .row {
    min-height: 0;
    display: block;
    padding: 14px 16px;
  }

  .ledger-row > *,
  .lg-row > *,
  .list .row > * {
    margin-top: 6px;
  }

  .ledger-title,
  .rec > b,
  .row .title,
  .ledger-subtitle,
  .rec > span,
  .row .meta {
    white-space: normal;
  }

  .detail {
    gap: 16px;
  }

  .transcript,
  .tpane,
  .chat-col,
  .summary-panel,
  .spanel {
    margin-right: -16px;
    margin-left: -16px;
    border-right: 0;
    border-left: 0;
  }

  .transcript-line,
  .tline,
  .chat-bubble {
    grid-template-columns: 48px 2px minmax(0, 1fr);
    gap: 9px;
  }

  .settings-row,
  .srow {
    min-height: 0;
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 16px;
  }

  .settings-label,
  .srow .lab {
    width: auto;
  }

  .settings-action,
  .srow .act {
    width: 100%;
    margin-left: 0;
  }

  .settings-action button,
  .srow .act button {
    min-height: 44px;
  }

  /* --- Phone polish (2026-08-13): touch comfort, iOS-zoom guard, safe
     areas. Additive only; the `[hidden] { display: none !important; }`
     rule at the top of this sheet still outranks everything here. --- */

  /* Text inputs under 16px make iOS zoom the whole page on focus. */
  input:not([type="checkbox"]):not([type="radio"]),
  select,
  textarea {
    font-size: 16px;
  }

  /* Thumb-sized targets (≥44px; segmented pills reach 44 with their well). */
  .btn-primary,
  button.primary,
  .newbtn,
  .btn-quiet,
  button.ghost,
  .btn-danger,
  button.danger,
  .filter-button,
  .chip-button,
  .modal-actions button {
    min-height: 44px;
  }

  .scope-toggle button,
  .mk-scope button,
  .mk-scope a {
    min-height: 38px;
  }

  .logout {
    min-height: 44px;
    font-size: 13px;
  }

  .account-link {
    width: 44px;
    height: 44px;
  }

  .acct .em,
  .app-account-copy span {
    font-size: 12px;
  }

  /* Edge-hugging bars respect the notch and home indicator; max()/env()
     resolve to the existing paddings on devices without insets. */
  .topbar,
  .mobile-topbar {
    height: auto;
    min-height: 56px;
    padding-top: env(safe-area-inset-top);
    padding-left: max(4px, env(safe-area-inset-left));
    padding-right: max(8px, env(safe-area-inset-right));
  }

  .app-sidebar,
  .side {
    padding-top: max(24px, env(safe-area-inset-top));
    padding-left: max(12px, env(safe-area-inset-left));
    padding-bottom: max(16px, env(safe-area-inset-bottom));
  }

  .app-main,
  .main {
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }
}

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

/* THE LOGO (2026-09-12). The brand used to be set as type — the word "Kuoro"
   in the serif face. It is artwork now: the lockup the boss supplied, and on
   the phone the mark alone, because a full lockup shrunk to a phone header's
   width stops being readable before it stops being present.
   Height is fixed and width follows in both, so replacing either file cannot
   stretch it. */
.app-brand-logo {
  display: block;
  height: 22px;
  width: auto;
}

.mobile-brand img {
  display: block;
  height: 20px;
  width: auto;
}

/* The join screen is what an outside guest sees before anything else. */
.join-brand-logo {
  display: block;
  height: 26px;
  width: auto;
}
