/* ==========================================================================
   TINA — visual system
   Warm paper, ink, signal orange. Serif for the big ideas, mono for time.
   ========================================================================== */

:root {
  color-scheme: light;
  --paper: #f4efe5;
  --paper-2: #efe8db;
  --paper-3: #e9e1d2;
  --card: #fbf8f1;
  --card-strong: #fffdf8;
  --ink: #171410;
  --ink-2: #5f584d;
  --ink-3: #8f8779;
  --line: rgba(23, 20, 16, 0.12);
  --line-strong: rgba(23, 20, 16, 0.28);
  --accent: #f04e29;
  --accent-ink: #fff6f1;
  --accent-soft: #ffe1d5;
  --mint: #a9e6c7;
  --mint-ink: #106a4c;
  --lilac: #c9b9ff;
  --sky: #b8d6ff;
  --amber: #ffd58a;
  --ok: #13815f;
  --danger: #bd372c;
  --danger-soft: #ffe2de;
  --shadow: 0 34px 70px -46px rgba(23, 20, 16, 0.45), 0 1px 0 rgba(255, 255, 255, 0.7) inset;
  --shadow-soft: 0 16px 36px -28px rgba(23, 20, 16, 0.4);
  --sidebar-w: 292px;
  --notes-w: 386px;
  --topbar-h: 68px;
  --radius: 24px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --sans: "Avenir Next", Avenir, "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  --mono: "SF Mono", "Cascadia Mono", "Roboto Mono", ui-monospace, Menlo, Consolas, monospace;
  --sp-0: #e94a24;
  --sp-1: #0e8565;
  --sp-2: #6753cc;
  --sp-3: #a56f00;
  --sp-4: #1f6fae;
  --sp-5: #a83862;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --paper: #0c0d0c;
    --paper-2: #101210;
    --paper-3: #171916;
    --card: #151714;
    --card-strong: #1a1c18;
    --ink: #f2ede1;
    --ink-2: #b8b1a3;
    --ink-3: #847d70;
    --line: rgba(242, 237, 225, 0.13);
    --line-strong: rgba(242, 237, 225, 0.32);
    --accent: #ff6a43;
    --accent-ink: #1a0c06;
    --accent-soft: rgba(255, 106, 67, 0.16);
    --mint: #84dcb6;
    --mint-ink: #84dcb6;
    --lilac: #b8a6ff;
    --sky: #9ac4ff;
    --amber: #ffd184;
    --ok: #5ad4a5;
    --danger: #ff7a6d;
    --danger-soft: rgba(255, 122, 109, 0.14);
    --shadow: 0 40px 80px -44px rgba(0, 0, 0, 0.85), 0 1px 0 rgba(255, 255, 255, 0.05) inset;
    --shadow-soft: 0 20px 40px -30px rgba(0, 0, 0, 0.8);
    --sp-0: #ff7852;
    --sp-1: #5bd3a9;
    --sp-2: #b8a6ff;
    --sp-3: #ffc65c;
    --sp-4: #78b7f5;
    --sp-5: #ff8fb1;
  }
}

html[data-theme="light"] {
  color-scheme: light;
  --paper: #f4efe5;
  --paper-2: #efe8db;
  --paper-3: #e9e1d2;
  --card: #fbf8f1;
  --card-strong: #fffdf8;
  --ink: #171410;
  --ink-2: #5f584d;
  --ink-3: #8f8779;
  --line: rgba(23, 20, 16, 0.12);
  --line-strong: rgba(23, 20, 16, 0.28);
  --accent: #f04e29;
  --accent-ink: #fff6f1;
  --accent-soft: #ffe1d5;
  --mint: #a9e6c7;
  --mint-ink: #106a4c;
  --lilac: #c9b9ff;
  --sky: #b8d6ff;
  --amber: #ffd58a;
  --ok: #13815f;
  --danger: #bd372c;
  --danger-soft: #ffe2de;
  --shadow: 0 34px 70px -46px rgba(23, 20, 16, 0.45), 0 1px 0 rgba(255, 255, 255, 0.7) inset;
  --shadow-soft: 0 16px 36px -28px rgba(23, 20, 16, 0.4);
  --sp-0: #e94a24;
  --sp-1: #0e8565;
  --sp-2: #6753cc;
  --sp-3: #a56f00;
  --sp-4: #1f6fae;
  --sp-5: #a83862;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --paper: #0c0d0c;
  --paper-2: #101210;
  --paper-3: #171916;
  --card: #151714;
  --card-strong: #1a1c18;
  --ink: #f2ede1;
  --ink-2: #b8b1a3;
  --ink-3: #847d70;
  --line: rgba(242, 237, 225, 0.13);
  --line-strong: rgba(242, 237, 225, 0.32);
  --accent: #ff6a43;
  --accent-ink: #1a0c06;
  --accent-soft: rgba(255, 106, 67, 0.16);
  --mint: #84dcb6;
  --mint-ink: #84dcb6;
  --lilac: #b8a6ff;
  --sky: #9ac4ff;
  --amber: #ffd184;
  --ok: #5ad4a5;
  --danger: #ff7a6d;
  --danger-soft: rgba(255, 122, 109, 0.14);
  --shadow: 0 40px 80px -44px rgba(0, 0, 0, 0.85), 0 1px 0 rgba(255, 255, 255, 0.05) inset;
  --shadow-soft: 0 20px 40px -30px rgba(0, 0, 0, 0.8);
  --sp-0: #ff7852;
  --sp-1: #5bd3a9;
  --sp-2: #b8a6ff;
  --sp-3: #ffc65c;
  --sp-4: #78b7f5;
  --sp-5: #ff8fb1;
}

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

[hidden] {
  display: none !important;
}

html {
  height: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100%;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background:
    radial-gradient(1100px 760px at 88% -8%, color-mix(in srgb, var(--accent) 9%, transparent), transparent 64%),
    radial-gradient(800px 600px at -8% 100%, color-mix(in srgb, var(--mint) 12%, transparent), transparent 60%),
    var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-fill {
  fill: currentColor;
  stroke: none;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: -80px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 12px;
}

/* --------------------------------------------------------------------------
   Shell
   -------------------------------------------------------------------------- */

.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  height: 100dvh;
  min-height: 640px;
  overflow: hidden;
  transition: grid-template-columns 0.25s ease;
}

.app.notes-open {
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr) var(--notes-w);
}

.sidebar {
  position: relative;
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 0;
  padding: 22px 18px 18px;
  border-right: 1px solid var(--line);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--card) 55%, transparent), transparent 32%),
    var(--paper-2);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.sidebar-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex: none;
  border-radius: 14px;
  box-shadow: 0 10px 24px -14px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}

.brand-mark svg {
  display: block;
  width: 100%;
  height: 100%;
}

.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.12;
}

.brand-text strong {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.brand-text small {
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.02em;
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-close {
  display: none;
}

.new-session {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--card-strong);
  color: var(--ink);
  font-weight: 600;
  font-size: 14px;
  box-shadow: 0 2px 0 color-mix(in srgb, var(--ink) 16%, transparent);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.new-session:hover {
  transform: translateY(-1px);
  border-color: var(--ink);
  box-shadow: 0 5px 0 color-mix(in srgb, var(--ink) 13%, transparent);
}

.new-session:active {
  transform: translateY(1px);
  box-shadow: 0 1px 0 color-mix(in srgb, var(--ink) 16%, transparent);
}

.new-session-icon {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--paper);
}

.new-session kbd {
  margin-left: auto;
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-3);
  background: var(--paper-2);
}

.session-search {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: color-mix(in srgb, var(--card) 60%, transparent);
  color: var(--ink-3);
  transition: border-color 0.18s ease, background 0.18s ease;
}

.session-search:focus-within {
  border-color: var(--ink-2);
  background: var(--card-strong);
}

.session-search .icon {
  width: 16px;
  height: 16px;
}

.session-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  outline: 0;
  font-size: 13px;
}

.session-search input::placeholder {
  color: var(--ink-3);
}

.session-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 3px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.count {
  display: grid;
  place-items: center;
  min-width: 20px;
  height: 19px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--paper-3);
  color: var(--ink-2);
  font-size: 10px;
}

.session-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: -8px -4px 0;
  overflow-y: auto;
  min-height: 90px;
  flex: 1;
  padding: 0 4px 8px;
}

.session-item {
  position: relative;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 9px;
  padding: 9px 7px 9px 8px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  text-align: left;
  color: var(--ink);
  transition: background 0.16s ease, border-color 0.16s ease;
}

.session-item:hover {
  background: color-mix(in srgb, var(--card) 65%, transparent);
}

.session-item.is-active {
  border-color: var(--line-strong);
  background: var(--card-strong);
  box-shadow: 0 5px 14px -12px rgba(0, 0, 0, 0.4);
}

.session-source-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--paper-3);
  color: var(--ink-2);
}

.session-item.is-active .session-source-icon {
  background: var(--ink);
  color: var(--paper);
}

.session-item.is-live .session-source-icon {
  background: var(--accent-soft);
  color: var(--accent);
}

.session-item.is-live .session-source-icon::after {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 1.6s ease-in-out infinite;
}

.session-item.is-live .session-source-icon .icon {
  display: none;
}

.session-item-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.session-item-title {
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.session-item-meta {
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.session-item-delete {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ink-3);
  opacity: 0;
  transition: opacity 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.session-item:hover .session-item-delete,
.session-item-delete:focus-visible {
  opacity: 1;
}

.session-item-delete:hover {
  color: var(--danger);
  background: var(--danger-soft);
}

.session-item-delete .icon {
  width: 14px;
  height: 14px;
}

.session-empty {
  padding: 22px 12px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  text-align: center;
  color: var(--ink-3);
  font-size: 12px;
  line-height: 1.55;
}

.sidebar-foot {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.provider-status {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 10px 9px;
  margin-bottom: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--card) 55%, transparent);
  text-align: left;
}

.provider-status:hover {
  border-color: var(--line-strong);
  background: var(--card);
}

.status-dot {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: var(--ink-3);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ink-3) 15%, transparent);
}

.status-dot.is-cloud {
  background: var(--ok);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 16%, transparent);
}

.status-dot.is-key {
  background: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent);
}

.status-dot.is-error {
  background: var(--danger);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 16%, transparent);
}

.provider-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.2;
}

.provider-copy strong {
  font-size: 11px;
  font-weight: 600;
}

.provider-copy small {
  font-family: var(--mono);
  font-size: 8.5px;
  color: var(--ink-3);
  margin-top: 2px;
}

.provider-status > .icon {
  width: 13px;
  height: 13px;
  margin-left: auto;
  color: var(--ink-3);
}

.side-link {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 8px 9px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--ink-2);
  font-size: 11.5px;
  text-align: left;
}

.side-link:hover {
  background: color-mix(in srgb, var(--card) 70%, transparent);
  color: var(--ink);
}

.side-link .icon {
  width: 15px;
  height: 15px;
  color: var(--ink-3);
}

.version-line {
  padding: 9px 9px 0;
  font-family: var(--mono);
  font-size: 8.5px;
  color: var(--ink-3);
  opacity: 0.8;
}

.menu-button {
  display: none;
}

.scrim {
  display: none;
}

.main {
  position: relative;
  min-width: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable;
  scroll-behavior: smooth;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 12px;
  height: var(--topbar-h);
  padding: 0 26px;
  border-bottom: 1px solid transparent;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
}

.topbar::after {
  content: "";
  position: absolute;
  left: 26px;
  right: 26px;
  bottom: 0;
  height: 1px;
  background: var(--line);
  opacity: 0.7;
}

.crumb {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--ink-3);
}

.crumb-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}

.crumb #topbar-title {
  color: var(--ink-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.crumb-sep {
  opacity: 0.5;
}

.crumb-sub {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 44vw;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  color: var(--ink-2);
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.icon-button:hover {
  background: var(--card);
  border-color: var(--line);
  color: var(--ink);
}

.icon-button .icon {
  width: 17px;
  height: 17px;
}

.topbar-button {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: color-mix(in srgb, var(--card) 50%, transparent);
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 500;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.topbar-button:hover {
  background: var(--card-strong);
  border-color: var(--line-strong);
  color: var(--ink);
}

.topbar-button.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.topbar-button .icon {
  width: 15px;
  height: 15px;
}

.offline-badge {
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--danger-soft);
  color: var(--danger);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.view-stack {
  min-height: 0;
}

.view {
  animation: view-in 0.35s ease both;
}

@keyframes view-in {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------------------
   Home
   -------------------------------------------------------------------------- */

.view-home {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 16px 44px 80px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(320px, 0.98fr);
  align-items: center;
  gap: 36px;
  padding: 42px 0 46px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.eyebrow-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2.4s ease-in-out infinite;
}

.hero h1 {
  margin-top: 18px;
  font-family: var(--serif);
  font-size: clamp(3.6rem, 7.1vw, 6.5rem);
  font-weight: 400;
  line-height: 0.88;
  letter-spacing: -0.055em;
}

.display-italic {
  font-style: italic;
  letter-spacing: -0.06em;
  padding-right: 0.06em;
}

.lede {
  max-width: 32rem;
  margin-top: 24px;
  font-size: 16.5px;
  line-height: 1.64;
  color: var(--ink-2);
}

.hero-points {
  display: flex;
  flex-direction: column;
  gap: 11px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}

.hero-points li {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  max-width: 34rem;
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-3);
}

.hero-points .icon {
  width: 15px;
  height: 15px;
  margin-top: 2px;
  color: var(--accent);
}

.hero-points strong {
  color: var(--ink);
  font-weight: 600;
}

.hero-art {
  position: relative;
  min-height: 438px;
  border-radius: 32px;
  background:
    radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--accent) 13%, transparent), transparent 62%),
    radial-gradient(circle at 72% 76%, color-mix(in srgb, var(--mint) 18%, transparent), transparent 55%);
}

.art-orbit {
  position: absolute;
  border: 1px solid var(--line);
  border-radius: 50%;
  opacity: 0.8;
}

.orbit-one {
  inset: 9% 4% 7% 7%;
  animation: spin 60s linear infinite;
}

.orbit-two {
  inset: 21% 17% 18% 20%;
  border-style: dashed;
  animation: spin 46s linear infinite reverse;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.art-card {
  position: absolute;
  width: min(282px, 78%);
  padding: 16px 18px 15px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: color-mix(in srgb, var(--card-strong) 92%, transparent);
  box-shadow: var(--shadow-soft), 0 1px 0 rgba(255, 255, 255, 0.6) inset;
  backdrop-filter: blur(10px);
  animation: float 9s ease-in-out infinite;
}

.art-card-a {
  left: 1%;
  top: 11%;
  transform: rotate(-4deg);
  z-index: 3;
}

.art-card-b {
  right: 0;
  top: 33%;
  transform: rotate(3deg);
  animation-delay: -2.4s;
  z-index: 2;
}

.art-card-c {
  left: 12%;
  bottom: 10%;
  transform: rotate(-2deg);
  animation-delay: -4.8s;
  z-index: 4;
}

@keyframes float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -8px; }
}

.art-speaker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.art-speaker::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.art-card p {
  margin-top: 7px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink);
}

.art-time {
  display: block;
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 9px;
  color: var(--ink-3);
}

.art-waveform {
  position: absolute;
  left: 50%;
  bottom: 2%;
  display: flex;
  align-items: center;
  gap: 4px;
  height: 54px;
  padding: 0 16px;
  transform: translateX(-50%);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--card-strong) 80%, transparent);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(8px);
}

.art-waveform span {
  width: 3px;
  border-radius: 999px;
  background: var(--ink);
  animation: wave 1.4s ease-in-out infinite;
}

.art-waveform span:nth-child(3n) { height: 18px; animation-delay: -0.2s; background: var(--accent); }
.art-waveform span:nth-child(3n + 1) { height: 9px; animation-delay: -0.5s; }
.art-waveform span:nth-child(3n + 2) { height: 28px; animation-delay: -0.8s; }
.art-waveform span:nth-child(5n) { height: 38px; animation-delay: -1.1s; }

@keyframes wave {
  0%, 100% { transform: scaleY(0.45); opacity: 0.6; }
  50% { transform: scaleY(1); opacity: 1; }
}

.art-badge {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card-strong);
  box-shadow: var(--shadow-soft);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  color: var(--ink-2);
  white-space: nowrap;
}

.art-badge .icon {
  width: 12px;
  height: 12px;
}

.badge-live {
  top: 2%;
  right: 7%;
  color: var(--accent);
}

.badge-speakers {
  left: 0;
  bottom: 38%;
}

.badge-lang {
  right: 2%;
  bottom: 21%;
  letter-spacing: 0.1em;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background: currentColor;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.82); }
}

.start-card {
  position: relative;
  overflow: hidden;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--card-strong) 88%, transparent), color-mix(in srgb, var(--card) 92%, transparent));
  box-shadow: var(--shadow);
}

.start-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 26px;
  right: 26px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.55;
}

.start-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.start-head h2 {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 400;
  letter-spacing: -0.035em;
}

.start-head p {
  margin-top: 4px;
  font-size: 12.5px;
  color: var(--ink-3);
}

.provider-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: none;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--paper) 45%, transparent);
  color: var(--ink-2);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.04em;
}

.provider-chip:hover {
  border-color: var(--line-strong);
}

.provider-chip .status-dot {
  width: 6px;
  height: 6px;
}

.source-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 20px 0 18px;
}

.source-card {
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 78px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: color-mix(in srgb, var(--paper) 30%, transparent);
  text-align: left;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.source-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.source-card.is-on {
  border-color: var(--ink);
  background: var(--card-strong);
  box-shadow: 0 3px 0 color-mix(in srgb, var(--ink) 18%, transparent);
}

.source-card.is-unavailable {
  opacity: 0.56;
  cursor: not-allowed;
}

.source-card.is-unavailable:hover {
  transform: none;
  border-color: var(--line);
}

.source-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: none;
  border-radius: 12px;
  background: var(--paper-3);
  color: var(--ink-2);
  transition: background 0.18s ease, color 0.18s ease;
}

.source-card.is-on .source-icon {
  background: var(--accent-soft);
  color: var(--accent);
}

.source-icon .icon {
  width: 19px;
  height: 19px;
}

.source-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 3px;
}

.source-copy strong {
  font-size: 13.5px;
  font-weight: 600;
}

.source-copy small {
  font-size: 10.5px;
  line-height: 1.35;
  color: var(--ink-3);
}

.switch {
  position: relative;
  width: 40px;
  height: 23px;
  flex: none;
  margin-left: auto;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--paper-3);
  transition: background 0.18s ease, border-color 0.18s ease;
}

.switch span {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--ink-3);
  transition: left 0.18s ease, background 0.18s ease;
}

.source-card.is-on .switch {
  background: var(--ink);
  border-color: var(--ink);
}

.source-card.is-on .switch span {
  left: 20px;
  background: var(--card);
}

.start-row {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  padding-top: 2px;
}

.select-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 230px;
}

.select-field > span:first-child {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.select-field em {
  font-style: normal;
  opacity: 0.65;
}

.select-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--paper) 36%, transparent);
  color: var(--ink-3);
}

.select-wrap .icon {
  width: 15px;
  height: 15px;
  flex: none;
}

.select-wrap select {
  width: 100%;
  min-width: 0;
  height: 100%;
  border: 0;
  background: transparent;
  outline: 0;
  font-size: 13px;
  color: var(--ink);
  appearance: none;
  cursor: pointer;
  padding-right: 18px;
}

.select-wrap::after {
  content: "";
  position: absolute;
  right: 15px;
  top: 50%;
  width: 6px;
  height: 6px;
  border-right: 1.5px solid var(--ink-3);
  border-bottom: 1.5px solid var(--ink-3);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 46px;
  padding: 0 19px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.005em;
  white-space: nowrap;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, border-color 0.16s ease, opacity 0.16s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
  box-shadow: 0 12px 24px -16px color-mix(in srgb, var(--ink) 70%, transparent);
}

.btn-primary:hover {
  box-shadow: 0 16px 28px -14px color-mix(in srgb, var(--ink) 64%, transparent);
}

.btn-start {
  flex: 1;
  height: 48px;
  justify-content: flex-start;
  padding: 0 20px;
  font-size: 14px;
}

.btn-start .icon {
  margin-left: auto;
  transition: transform 0.18s ease;
}

.btn-start:hover .icon {
  transform: translateX(3px);
}

.rec-dot {
  width: 9px;
  height: 9px;
  flex: none;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 20%, transparent);
}

.btn-quiet {
  border-color: var(--line);
  background: color-mix(in srgb, var(--card) 55%, transparent);
  color: var(--ink-2);
}

.btn-quiet:hover {
  border-color: var(--line-strong);
  background: var(--card);
  color: var(--ink);
}

.btn-ghost {
  border-color: var(--line);
  background: transparent;
  color: var(--ink-2);
}

.btn-ghost:hover {
  border-color: var(--line-strong);
  background: var(--card);
  color: var(--ink);
}

.btn-stop {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}

.btn-stop:hover {
  filter: brightness(1.04);
}

.btn-small {
  height: 36px;
  padding: 0 14px;
  font-size: 11.5px;
}

.btn-danger-ghost {
  border-color: color-mix(in srgb, var(--danger) 34%, transparent);
  color: var(--danger);
  background: transparent;
}

.btn-danger-ghost:hover {
  background: var(--danger-soft);
}

.start-foot {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 18px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
}

.text-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink-2);
  font-size: 11.5px;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 4px;
  transition: color 0.16s ease, text-decoration-color 0.16s ease;
}

.text-button:hover {
  color: var(--ink);
  text-decoration-color: var(--accent);
}

.text-button .icon {
  width: 14px;
  height: 14px;
}

.privacy-line {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  font-family: var(--mono);
  font-size: 8.5px;
  color: var(--ink-3);
}

.privacy-line .icon {
  width: 11px;
  height: 11px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin-top: 34px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--line);
}

.feature {
  padding: 22px 18px 24px;
  background: var(--paper);
}

.feature-num {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--accent);
  letter-spacing: 0.08em;
}

.feature h3 {
  margin: 9px 0 7px;
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 400;
  letter-spacing: -0.02em;
}

.feature p {
  font-size: 11.5px;
  line-height: 1.58;
  color: var(--ink-3);
}

.platform-note {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 34px;
  align-items: center;
  margin-top: 44px;
  padding: 30px 32px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    linear-gradient(120deg, color-mix(in srgb, var(--mint) 9%, transparent), transparent 60%),
    color-mix(in srgb, var(--card) 60%, transparent);
}

.platform-note h2 {
  margin: 10px 0 10px;
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 400;
  letter-spacing: -0.035em;
}

.platform-note p {
  max-width: 36rem;
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--ink-2);
}

.platform-note .text-button {
  margin-top: 14px;
}

.platform-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.platform-chips span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--card-strong) 70%, transparent);
  font-family: var(--mono);
  font-size: 9px;
  color: var(--ink-2);
}

.platform-chips .icon {
  width: 12px;
  height: 12px;
}

/* --------------------------------------------------------------------------
   Studio
   -------------------------------------------------------------------------- */

.view-studio {
  width: min(1080px, 100%);
  margin: 0 auto;
  padding: 24px 44px 80px;
}

.studio-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 26px;
  padding: 6px 0 20px;
}

.studio-title-wrap {
  min-width: 0;
}

.session-kicker {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--card) 55%, transparent);
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.badge-live {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 26%, transparent);
  background: var(--accent-soft);
}

.badge-live .pulse-dot {
  width: 6px;
  height: 6px;
}

.badge-sample {
  color: var(--ink-2);
  border-color: color-mix(in srgb, var(--amber) 55%, transparent);
  background: color-mix(in srgb, var(--amber) 22%, transparent);
}

.session-date {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  color: var(--ink-3);
}

.session-title {
  max-width: 42rem;
  font-family: var(--serif);
  font-size: clamp(1.9rem, 3.6vw, 2.9rem);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -0.045em;
  outline: 0;
  border-radius: 6px;
  transition: background 0.16s ease, box-shadow 0.16s ease;
  overflow-wrap: anywhere;
}

.session-title:hover {
  background: color-mix(in srgb, var(--card) 55%, transparent);
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--card) 55%, transparent);
}

.session-title:focus {
  background: var(--card);
  box-shadow: 0 0 0 6px var(--card), 0 0 0 7px var(--line-strong);
}

.session-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 13px;
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--ink-3);
}

.session-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.session-meta .icon {
  width: 12px;
  height: 12px;
}

.studio-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
  padding-top: 12px;
}

.level-cluster {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 96px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--card) 55%, transparent);
}

.level-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.level-row > span {
  width: 22px;
  font-family: var(--mono);
  font-size: 7.5px;
  color: var(--ink-3);
  text-transform: uppercase;
}

.level-track {
  position: relative;
  flex: 1;
  height: 4px;
  border-radius: 999px;
  background: var(--paper-3);
  overflow: hidden;
}

.level-track i {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--mint-ink), var(--accent));
  transition: width 0.1s linear;
}

.live-strip {
  position: sticky;
  top: calc(var(--topbar-h) + 8px);
  z-index: 20;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 9px 12px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  box-shadow: 0 8px 20px -20px rgba(0, 0, 0, 0.5);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--card) 70%, transparent);
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.04em;
  color: var(--ink-2);
  white-space: nowrap;
}

.status-pill .pulse-dot {
  width: 6px;
  height: 6px;
  background: var(--ok);
  color: var(--ok);
}

.status-pill.is-connecting .pulse-dot,
.status-pill.is-reconnecting .pulse-dot {
  background: var(--amber);
  color: var(--amber);
}

.status-pill.is-error {
  color: var(--danger);
  background: var(--danger-soft);
}

.status-pill.is-error .pulse-dot {
  background: var(--danger);
  color: var(--danger);
  animation: none;
}

.status-pill.is-paused .pulse-dot {
  background: var(--ink-3);
  animation: none;
}

.source-pills {
  display: flex;
  align-items: center;
  gap: 5px;
}

.source-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 8px;
  color: var(--ink-3);
  white-space: nowrap;
}

.source-pill .icon {
  width: 11px;
  height: 11px;
}

.source-pill.is-active {
  border-color: color-mix(in srgb, var(--ok) 36%, transparent);
  color: var(--ok);
  background: color-mix(in srgb, var(--ok) 8%, transparent);
}

.live-strip-spacer {
  flex: 1;
}

.transcript-search {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: color-mix(in srgb, var(--card) 55%, transparent);
  color: var(--ink-3);
}

.transcript-search:focus-within {
  border-color: var(--line-strong);
  background: var(--card-strong);
}

.transcript-search input {
  width: 126px;
  border: 0;
  background: transparent;
  outline: 0;
  font-size: 10.5px;
}

.transcript-search input::placeholder {
  color: var(--ink-3);
}

.transcript-search .icon {
  width: 13px;
  height: 13px;
}

.jump-live {
  color: var(--accent);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.04em;
}

.jump-live .icon {
  width: 12px;
  height: 12px;
}

.speaker-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 0;
  padding: 2px 0 10px;
}

.speaker-strip:empty {
  display: none;
}

.speaker-card {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-2);
  font-size: 10px;
  transition: border-color 0.16s ease, background 0.16s ease;
}

.speaker-card:hover {
  border-color: var(--line-strong);
  background: var(--card);
}

.speaker-card .speaker-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.speaker-card small {
  font-family: var(--mono);
  font-size: 8px;
  color: var(--ink-3);
}

.speaker-card .edit-glyph {
  width: 10px;
  height: 10px;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.speaker-card:hover .edit-glyph {
  opacity: 0.6;
}

.speaker-color-0 { color: var(--sp-0); }
.speaker-color-1 { color: var(--sp-1); }
.speaker-color-2 { color: var(--sp-2); }
.speaker-color-3 { color: var(--sp-3); }
.speaker-color-4 { color: var(--sp-4); }
.speaker-color-5 { color: var(--sp-5); }

.transcript-wrap {
  min-height: 240px;
}

.transcript {
  max-width: 880px;
  margin: 0 auto;
}

.segment {
  position: relative;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 28px;
  gap: 14px;
  padding: 17px 0 18px;
  border-top: 1px solid var(--line);
  transition: background 0.2s ease;
}

.segment:first-child {
  border-top: 0;
}

.segment.is-playing {
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 8%, transparent), transparent 70%);
}

.seg-time {
  align-self: start;
  padding: 4px 0 0;
  border: 0;
  background: transparent;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.02em;
  color: var(--ink-3);
  text-align: left;
  transition: color 0.15s ease;
}

.seg-time:hover {
  color: var(--accent);
}

.seg-body {
  min-width: 0;
}

.speaker-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 5px;
  padding: 0;
  border: 0;
  background: transparent;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sp-0);
}

.speaker-chip:hover {
  text-decoration: underline;
  text-decoration-color: currentColor;
  text-underline-offset: 3px;
}

.speaker-dot {
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background: currentColor;
}

.seg-text {
  margin: 0;
  font-size: 17.5px;
  line-height: 1.62;
  letter-spacing: -0.008em;
  color: var(--ink);
  text-wrap: pretty;
  overflow-wrap: break-word;
}

.seg-text:lang(ja),
.seg-text:lang(zh),
.seg-text:lang(ko) {
  font-family: "Hiragino Sans", "Yu Gothic", "Noto Sans JP", "PingFang SC", "Microsoft YaHei", var(--sans);
  letter-spacing: 0;
}

.seg-text mark {
  padding: 0 2px;
  border-radius: 3px;
  background: var(--accent-soft);
  color: inherit;
}

.seg-copy {
  align-self: start;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-3);
  opacity: 0;
  transition: opacity 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.segment:hover .seg-copy,
.seg-copy:focus-visible {
  opacity: 1;
}

.seg-copy:hover {
  background: var(--card);
  border-color: var(--line);
  color: var(--ink);
}

.seg-copy .icon {
  width: 13px;
  height: 13px;
}

.segment.is-interim {
  border-top-style: dashed;
}

.segment.is-interim .seg-text {
  color: var(--ink-2);
  font-style: italic;
}

.segment.is-interim .seg-copy {
  display: none;
}

.caret {
  display: inline-block;
  width: 2px;
  height: 1.05em;
  margin-left: 3px;
  vertical-align: -0.16em;
  background: var(--accent);
  animation: blink 1.05s steps(2, start) infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

.transcript-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  padding: 40px 20px;
  text-align: center;
}

.transcript-empty[hidden] {
  display: none !important;
}

.listening-mark {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 42px;
  margin-bottom: 16px;
}

.listening-mark span {
  width: 3px;
  border-radius: 999px;
  background: var(--accent);
  animation: wave 1.2s ease-in-out infinite;
}

.listening-mark span:nth-child(1) { height: 12px; animation-delay: -0.1s; }
.listening-mark span:nth-child(2) { height: 26px; animation-delay: -0.3s; }
.listening-mark span:nth-child(3) { height: 38px; animation-delay: -0.5s; }
.listening-mark span:nth-child(4) { height: 22px; animation-delay: -0.7s; }
.listening-mark span:nth-child(5) { height: 10px; animation-delay: -0.9s; }

.transcript-empty h2 {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: -0.03em;
}

.transcript-empty p {
  max-width: 27rem;
  margin-top: 7px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--ink-3);
}

.studio-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 20px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-family: var(--mono);
  font-size: 8.5px;
  color: var(--ink-3);
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.legend i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.studio-tip {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.02em;
  color: var(--ink-3);
  text-align: right;
}

/* --------------------------------------------------------------------------
   Loading / import
   -------------------------------------------------------------------------- */

.view-loading {
  display: grid;
  place-items: center;
  min-height: calc(100dvh - var(--topbar-h) - 20px);
  padding: 40px;
}

.loading-card {
  width: min(480px, 100%);
  padding: 44px 36px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--card);
  box-shadow: var(--shadow);
  text-align: center;
}

.loading-orbit {
  position: relative;
  width: 110px;
  height: 110px;
  margin: 0 auto 28px;
}

.loading-core {
  position: absolute;
  inset: 40px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 40px color-mix(in srgb, var(--accent) 45%, transparent);
  animation: pulse 1.8s ease-in-out infinite;
}

.loading-ring {
  position: absolute;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
}

.ring-a {
  inset: 22px;
  border-style: dashed;
  animation: spin 8s linear infinite;
}

.ring-b {
  inset: 4px;
  opacity: 0.5;
  animation: spin 14s linear infinite reverse;
}

.loading-bar {
  position: absolute;
  top: 52px;
  width: 3px;
  height: 18px;
  border-radius: 999px;
  background: var(--ink);
  transform-origin: 50% 3px;
}

.bar-a { left: 50%; transform: translateX(-50%) rotate(0deg) translateY(-62px); }
.bar-b { left: 50%; transform: translateX(-50%) rotate(120deg) translateY(-62px); }
.bar-c { left: 50%; transform: translateX(-50%) rotate(240deg) translateY(-62px); }

.loading-card .eyebrow {
  justify-content: center;
}

.loading-card h1 {
  margin-top: 9px;
  font-family: var(--serif);
  font-size: 38px;
  font-weight: 400;
  letter-spacing: -0.045em;
}

.loading-stage {
  margin-top: 10px;
  font-size: 13px;
  color: var(--ink-2);
}

.loading-file {
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 9px;
  color: var(--ink-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.loading-track {
  height: 3px;
  margin: 24px 0 22px;
  border-radius: 999px;
  background: var(--paper-3);
  overflow: hidden;
}

.loading-track i {
  display: block;
  width: 8%;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 0.6s ease;
}

/* --------------------------------------------------------------------------
   Notes panel
   -------------------------------------------------------------------------- */

.notes-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
  border-left: 1px solid var(--line);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--mint) 5%, transparent), transparent 24%),
    var(--paper-2);
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateX(18px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.app.notes-open .notes-panel {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.notes-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 22px 22px 14px;
  border-bottom: 1px solid var(--line);
}

.notes-head h2 {
  margin-top: 6px;
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 400;
  letter-spacing: -0.035em;
}

.notes-panel textarea {
  flex: 1;
  width: 100%;
  min-height: 0;
  padding: 20px 24px;
  border: 0;
  background: transparent;
  outline: 0;
  resize: none;
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink);
}

.notes-panel textarea::placeholder {
  color: var(--ink-3);
}

.notes-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 22px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 8.5px;
  color: var(--ink-3);
}

/* --------------------------------------------------------------------------
   Dialogs
   -------------------------------------------------------------------------- */

dialog.sheet {
  width: min(780px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  overflow: visible;
}

dialog.sheet-mini {
  width: min(440px, calc(100vw - 32px));
}

dialog.sheet::backdrop {
  background: rgba(14, 12, 9, 0.46);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

dialog.sheet[open] {
  animation: dialog-in 0.22s ease both;
}

@keyframes dialog-in {
  from { opacity: 0; transform: translateY(10px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

.dialog-card {
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 32px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--card);
  box-shadow: 0 50px 100px -40px rgba(0, 0, 0, 0.65);
  overflow: hidden;
}

.dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--line);
}

.dialog-head h2 {
  margin-top: 5px;
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 400;
  letter-spacing: -0.04em;
}

.dialog-body {
  padding: 22px 24px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.dialog-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 24px;
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper-2) 50%, transparent);
}

.dialog-foot .hint {
  margin-right: auto;
}

.settings-body {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.setting-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.setting-group > h3,
.setting-heading h3 {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.setting-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.provider-card {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--paper) 35%, transparent);
}

.provider-card .status-dot {
  margin-top: 5px;
}

.provider-card strong {
  font-size: 13px;
}

.provider-card p {
  margin-top: 3px;
  font-size: 11px;
  line-height: 1.5;
  color: var(--ink-3);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field > span {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.field em {
  font-style: normal;
  opacity: 0.6;
}

.field input {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card-strong);
  outline: 0;
  font-size: 13px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.hint {
  font-size: 10.5px;
  line-height: 1.55;
  color: var(--ink-3);
}

.hint strong {
  color: var(--ink-2);
}

.inline-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.key-test-status {
  margin: -2px 0 0;
  font-size: 10.5px;
  line-height: 1.5;
  color: var(--ink-2);
}

.key-test-status[hidden] {
  display: none;
}

.key-test-status.is-success {
  color: var(--ok);
}

.key-test-status.is-error {
  color: var(--danger);
}

.text-link {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink-2);
  font-size: 10.5px;
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 3px;
  cursor: pointer;
}

.text-link:hover {
  color: var(--accent);
  text-decoration-color: currentColor;
}

.inline-link {
  display: inline;
  font-size: inherit;
}

.text-link .icon {
  width: 11px;
  height: 11px;
  vertical-align: -1px;
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  font-size: 12px;
  cursor: pointer;
}

.check-row input {
  width: 16px;
  height: 16px;
  margin: 2px 0 0;
  flex: none;
  accent-color: var(--accent);
}

.check-row span {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.check-row strong {
  font-size: 12px;
  font-weight: 600;
}

.check-row small {
  font-size: 10.5px;
  line-height: 1.45;
  color: var(--ink-3);
}

.check-row.compact {
  padding: 0;
}

.segmented {
  display: flex;
  gap: 3px;
  width: fit-content;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: color-mix(in srgb, var(--paper) 45%, transparent);
}

.segmented label {
  position: relative;
  cursor: pointer;
}

.segmented input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segmented span {
  display: block;
  padding: 7px 15px;
  border-radius: 8px;
  font-size: 11px;
  color: var(--ink-3);
  transition: background 0.16s ease, color 0.16s ease;
}

.segmented input:checked + span {
  background: var(--ink);
  color: var(--paper);
}

.about-group p {
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--ink-2);
}

.format-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 9px;
}

.format-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: color-mix(in srgb, var(--paper) 30%, transparent);
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.format-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.format-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.format-card:has(input:checked) {
  border-color: var(--ink);
  background: var(--card-strong);
  box-shadow: 0 2px 0 color-mix(in srgb, var(--ink) 16%, transparent);
}

.format-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-bottom: 4px;
  border-radius: 8px;
  background: var(--paper-3);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  color: var(--ink-2);
}

.format-card:has(input:checked) .format-icon {
  background: var(--accent-soft);
  color: var(--accent);
}

.format-card strong {
  font-size: 11.5px;
}

.format-card small {
  font-size: 9.5px;
  line-height: 1.4;
  color: var(--ink-3);
}

.export-options {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 18px 0 14px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.check-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  color: var(--ink-2);
  cursor: pointer;
}

.check-inline input {
  width: 14px;
  height: 14px;
  accent-color: var(--accent);
}

.preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 7px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.export-preview {
  max-height: 210px;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--paper-2);
  color: var(--ink-2);
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow: auto;
}

.drop-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 30px 20px;
  border: 1.5px dashed var(--line-strong);
  border-radius: 16px;
  background: color-mix(in srgb, var(--paper) 35%, transparent);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease;
}

.drop-zone:hover,
.drop-zone.is-dragover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.drop-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 5px;
  border-radius: 12px;
  background: var(--card-strong);
  color: var(--ink-2);
}

.drop-zone strong {
  font-size: 13px;
}

.drop-zone > span:last-child {
  font-size: 10px;
  color: var(--ink-3);
}

.file-chip {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 12px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card-strong);
}

.file-chip > .icon {
  color: var(--accent);
}

.file-chip div {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.file-chip strong {
  font-size: 11.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-chip small {
  font-family: var(--mono);
  font-size: 8.5px;
  color: var(--ink-3);
}

.import-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: end;
  margin-top: 18px;
}

.select-field + .check-row.compact {
  padding-bottom: 8px;
}

.help-body {
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.help-body h3 {
  margin-bottom: 8px;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 400;
  letter-spacing: -0.025em;
}

.help-body p {
  font-size: 11.5px;
  line-height: 1.65;
  color: var(--ink-2);
}

.help-body p + p {
  margin-top: 8px;
}

.support-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 10px;
}

.support-table th {
  padding: 7px 8px;
  border-bottom: 1px solid var(--line-strong);
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  text-align: left;
}

.support-table td {
  padding: 8px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
  vertical-align: top;
}

.support-table td:first-child {
  color: var(--ink);
  font-weight: 500;
}

.support-table .yes { color: var(--ok); font-weight: 600; }
.support-table .no { color: var(--danger); }
.support-table .maybe { color: var(--sp-3); }

.steps {
  margin: 12px 0 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 11px;
  line-height: 1.6;
  color: var(--ink-2);
}

.steps strong {
  color: var(--ink);
}

.plain-list {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 11px;
  line-height: 1.55;
  color: var(--ink-2);
}

.plain-list strong {
  color: var(--ink);
}

.shortcut-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  font-size: 10.5px;
  color: var(--ink-2);
}

.shortcut-grid span {
  display: flex;
  align-items: center;
  gap: 8px;
}

kbd {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--card-strong);
  font-family: var(--mono);
  font-size: 8.5px;
  color: var(--ink-2);
}

/* --------------------------------------------------------------------------
   Toasts
   -------------------------------------------------------------------------- */

.toast-region {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  pointer-events: none;
}

/* Put toasts in the top layer so they stay visible above modal dialogs. */
.toast-region[popover] {
  inset: auto 20px 20px auto;
  width: auto;
  height: auto;
  max-width: calc(100vw - 40px);
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  overflow: visible;
}

.toast-region[popover]:not(:popover-open) {
  display: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(420px, calc(100vw - 40px));
  padding: 11px 14px;
  border: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
  border-radius: 13px;
  background: var(--ink);
  color: var(--paper);
  box-shadow: 0 18px 38px -18px rgba(0, 0, 0, 0.6);
  font-size: 11.5px;
  line-height: 1.4;
  pointer-events: auto;
  animation: toast-in 0.25s ease both;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.toast.is-error {
  background: var(--danger);
  color: #fff;
  border-color: transparent;
}

.toast.is-success {
  background: var(--ok);
  color: #fff;
  border-color: transparent;
}

.toast .icon {
  width: 15px;
  height: 15px;
  flex: none;
}

.toast-action {
  padding: 4px 8px;
  border: 1px solid color-mix(in srgb, var(--paper) 32%, transparent);
  border-radius: 7px;
  background: transparent;
  color: inherit;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}

.toast-action:hover {
  background: color-mix(in srgb, var(--paper) 12%, transparent);
}

.toast-close {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  margin-left: 2px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  opacity: 0.6;
}

.toast-close:hover {
  opacity: 1;
  background: color-mix(in srgb, var(--paper) 12%, transparent);
}

.toast-close .icon {
  width: 12px;
  height: 12px;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1120px) {
  .app.notes-open {
    grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  }

  .notes-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    width: min(var(--notes-w), calc(100vw - 40px));
    box-shadow: -30px 0 80px -40px rgba(0, 0, 0, 0.6);
  }

  .app.notes-open::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 55;
    background: rgba(14, 12, 9, 0.28);
    backdrop-filter: blur(2px);
  }
}

@media (max-width: 1020px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 28px;
  }

  .hero-art {
    min-height: 360px;
    max-width: 620px;
    margin: 0 auto;
    width: 100%;
  }

  .hero h1 {
    font-size: clamp(3.4rem, 10vw, 5.6rem);
  }

  .feature-grid {
    grid-template-columns: 1fr 1fr;
  }

  .platform-note {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .platform-chips {
    justify-content: flex-start;
  }

  .view-home,
  .view-studio {
    padding-left: 28px;
    padding-right: 28px;
  }
}

@media (max-width: 900px) {
  .app,
  .app.notes-open {
    grid-template-columns: minmax(0, 1fr);
  }

  .sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 80;
    width: min(320px, calc(100vw - 48px));
    transform: translateX(-102%);
    transition: transform 0.24s ease;
    box-shadow: 30px 0 80px -40px rgba(0, 0, 0, 0.6);
  }

  .app.sidebar-open .sidebar {
    transform: none;
  }

  .sidebar-close {
    display: grid;
  }

  .scrim {
    position: fixed;
    inset: 0;
    z-index: 70;
    display: block;
    background: rgba(14, 12, 9, 0.34);
    backdrop-filter: blur(2px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.24s ease;
  }

  .app.sidebar-open .scrim {
    opacity: 1;
    pointer-events: auto;
  }

  .menu-button {
    display: grid;
  }

  .topbar {
    padding: 0 18px;
  }

  .topbar::after {
    left: 18px;
    right: 18px;
  }

  .crumb-sub {
    display: none;
  }

  .topbar-button span {
    display: none;
  }

  .topbar-button {
    width: 38px;
    padding: 0;
    justify-content: center;
  }
}

@media (max-width: 760px) {
  :root {
    --topbar-h: 60px;
  }

  .view-home,
  .view-studio {
    padding-left: 18px;
    padding-right: 18px;
    padding-bottom: 64px;
  }

  .hero {
    gap: 24px;
    padding: 18px 0 32px;
  }

  .hero h1 {
    font-size: clamp(3.1rem, 14vw, 4.6rem);
    margin-top: 14px;
  }

  .lede {
    margin-top: 18px;
    font-size: 15px;
  }

  .hero-points {
    margin-top: 20px;
  }

  .hero-art {
    min-height: 330px;
  }

  .art-card {
    width: min(250px, 74%);
    padding: 13px 15px;
  }

  .art-card p {
    font-size: 12.5px;
  }

  .badge-speakers {
    bottom: 31%;
  }

  .start-card {
    padding: 20px;
    border-radius: 20px;
  }

  .start-head {
    flex-direction: column;
    gap: 12px;
  }

  .start-head h2 {
    font-size: 24px;
  }

  .source-grid {
    grid-template-columns: 1fr;
    margin: 16px 0;
  }

  .start-row {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .select-field {
    min-width: 0;
  }

  .btn-start {
    width: 100%;
    flex: none;
  }

  .start-foot {
    gap: 12px;
  }

  .privacy-line {
    width: 100%;
    margin-left: 0;
    margin-top: 2px;
  }

  .feature-grid {
    grid-template-columns: 1fr;
    margin-top: 26px;
  }

  .feature {
    padding: 18px 16px;
  }

  .platform-note {
    margin-top: 30px;
    padding: 22px;
  }

  .platform-note h2 {
    font-size: 26px;
  }

  .studio-head {
    flex-direction: column;
    gap: 16px;
    padding-bottom: 14px;
  }

  .studio-controls {
    width: 100%;
    padding-top: 0;
  }

  .level-cluster {
    flex: 1;
    width: auto;
  }

  .studio-controls .btn {
    flex: none;
  }

  .session-title {
    font-size: clamp(1.8rem, 7vw, 2.4rem);
  }

  .live-strip {
    top: calc(var(--topbar-h) + 6px);
    padding: 8px 10px;
  }

  .live-strip-spacer {
    display: none;
  }

  .transcript-search {
    flex: 1;
    min-width: 150px;
  }

  .transcript-search input {
    width: 100%;
  }

  .segment {
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 10px;
    padding: 15px 0;
  }

  .seg-copy {
    display: none;
  }

  .seg-text {
    font-size: 16px;
    line-height: 1.6;
  }

  .studio-foot {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .studio-tip {
    text-align: left;
  }

  .dialog-head,
  .dialog-body,
  .dialog-foot {
    padding-left: 18px;
    padding-right: 18px;
  }

  .format-grid {
    grid-template-columns: 1fr 1fr;
  }

  .import-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .shortcut-grid {
    grid-template-columns: 1fr;
  }

  .support-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  .toast-region {
    left: 14px;
    right: 14px;
    bottom: 14px;
    align-items: stretch;
  }

  .toast {
    max-width: none;
  }

  .notes-panel {
    width: 100%;
  }

  .app.notes-open::after {
    display: none;
  }
}

@media (max-width: 620px) {
  .hero-art {
    display: none;
  }

  .hero {
    padding-bottom: 26px;
  }

  .privacy-line {
    display: none;
  }

  .source-card {
    min-height: 70px;
  }

  .badge-lang {
    display: none;
  }

  .transcript-wrap {
    min-height: 200px;
  }

  .transcript-empty {
    min-height: 230px;
  }

  .loading-card {
    padding: 34px 22px;
  }

  .loading-card h1 {
    font-size: 32px;
  }

  .format-card small {
    display: none;
  }

  .dialog-card {
    max-height: calc(100dvh - 16px);
  }

  dialog.sheet {
    width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
  }

  .dialog-head h2 {
    font-size: 24px;
  }
}

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