

:root {
  --vo-blue: #0358f7;
  --vo-blue-dark: #0247c6;
  --vo-blue-soft: rgba(3, 88, 247, 0.08);
  --bg: #ffffff;
  --bg-elevated: #ffffff;
  --bg-muted: #f8fafc;
  --text: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --accent: var(--vo-blue);
  --accent-hover: var(--vo-blue-dark);
  --accent-soft: var(--vo-blue-soft);
  --success: #059669;
  --warning: #d97706;
  --danger: #dc2626;
  --shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 4px 12px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 8px 30px rgba(3, 88, 247, 0.1);
  --radius: 12px;
  --radius-sm: 8px;
  --header-h: 56px;
  --touch-min: 44px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "Segoe UI Mono", monospace;
  color-scheme: light;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.app-shell {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding-top: env(safe-area-inset-top);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: var(--header-h);
  flex-wrap: nowrap;
}

.header-start {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
}

.header-start .brand {
  flex-shrink: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  font-size: 1.35rem;
  min-height: var(--touch-min);
  line-height: 0;
}

.brand-logo {
  display: block;
  height: 1.5rem;
  max-height: 1.5rem;
  width: auto;
  max-width: 2.75rem;
  object-fit: contain;
  animation: vo-logo-redraw 5s linear infinite;
}

@keyframes vo-logo-redraw {
  0% {
    clip-path: inset(0 100% 0 0);
    opacity: 0;
  }
  /* 0.8s of a 5s cycle = 16% */
  16% {
    clip-path: inset(0 0 0 0);
    opacity: 1;
  }
  100% {
    clip-path: inset(0 0 0 0);
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .brand-logo {
    animation: none;
    clip-path: none;
    opacity: 1;
  }
}

.brand-text,
.vo-brand {
  color: var(--accent);
  font-weight: 800;
  letter-spacing: -0.03em;
  text-transform: lowercase;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
  flex-shrink: 0;
}

.usage-badge {
  cursor: pointer;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.upgrade-badge {
  white-space: nowrap;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.usage-badge:hover {
  background: var(--accent-soft);
  filter: none;
}

.plan-panel {
  max-width: 560px;
  margin: 0 auto;
}

.plan-panel h1 {
  margin: 0 0 0.35rem;
}

.plan-lead {
  margin: 0 0 1.25rem;
  color: var(--text-muted);
}

.plan-facts {
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.plan-facts li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.9375rem;
}

.plan-facts li:last-child {
  border-bottom: none;
}

.plan-facts .label {
  color: var(--text-muted);
}

.plan-facts .value {
  font-weight: 600;
  text-align: right;
}

.plan-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.plan-actions-center {
  justify-content: center;
  margin-top: 0.5rem;
}

.minute-pack-panel {
  margin: 0 0 1.25rem;
  padding-top: 0.25rem;
}

.minute-pack-panel h2 {
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
}

.minute-pack-select-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.65rem 0.85rem;
  margin-top: 0.75rem;
  text-align: center;
}

.minute-pack-select-row label {
  font-weight: 600;
  font-size: 0.9rem;
  margin: 0;
}

.minute-pack-select {
  min-height: 42px;
  min-width: 11rem;
  max-width: 100%;
  padding: 0.4rem 2rem 0.4rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  font: inherit;
  background: var(--bg-elevated, var(--surface, #fff));
  color: inherit;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2364748b' d='M1.4 1.4L6 6l4.6-4.6L12 2.8 6 8.8 0 2.8z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.7rem center;
  background-size: 0.75rem;
  cursor: pointer;
}

.minute-pack-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1rem;
  width: 100%;
}

.home-badge {
  white-space: nowrap;
  flex-shrink: 0;
  text-decoration: none;
}

.upgrade-panel {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}

.upgrade-panel h1 {
  margin: 0 0 0.35rem;
  text-align: center;
}

.upgrade-lead {
  margin: 0 0 1.25rem;
  color: var(--text-muted);
  text-align: center;
}

.upgrade-billing-toggle {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem;
  margin: 0 auto 1.75rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
}

.upgrade-billing-opt {
  border: none;
  background: transparent;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  cursor: pointer;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.upgrade-billing-opt.is-active {
  background: var(--vo-blue);
  color: #fff;
}

.upgrade-billing-save {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.15rem 0.4rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
}

.upgrade-billing-opt:not(.is-active) .upgrade-billing-save {
  display: none;
}

.upgrade-pricing {
  display: grid;
  gap: 1.25rem;
  align-items: stretch;
}

.upgrade-price-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  background: #fff;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
}

.upgrade-price-card.featured {
  border-color: var(--vo-blue);
  box-shadow: 0 12px 40px rgba(3, 88, 247, 0.12);
}

.upgrade-price-card.is-current {
  outline: 2px solid var(--vo-blue);
  outline-offset: 2px;
}

.upgrade-price-card h2 {
  margin: 0;
  font-size: 1.15rem;
}

.upgrade-price {
  font-size: 2rem;
  font-weight: 800;
  margin: 0.5rem 0;
  color: var(--vo-blue);
}

.upgrade-price-period {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
}

.upgrade-price-billed {
  margin: -0.25rem 0 0.5rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  min-height: 1.25rem;
}

.upgrade-price-billed-muted {
  color: var(--text-muted);
}

.upgrade-price-custom {
  font-size: 1.5rem;
  font-weight: 800;
}

.upgrade-price-card ul {
  margin: 1rem 0 1.5rem;
  padding-left: 1.2rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  flex: 1;
}

.upgrade-price-card .btn {
  width: 100%;
}

.upgrade-price-card .btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  filter: none;
}

.upgrade-pay-amount {
  font-weight: 700;
}

@media (min-width: 640px) {
  .upgrade-pricing {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .upgrade-pricing {
    grid-template-columns: repeat(4, 1fr);
  }
}


.qa-panel h2 {
  margin-bottom: 0.35rem;
}

.qa-messages {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  max-height: min(50vh, 420px);
  overflow-y: auto;
  margin: 1rem 0;
  padding: 0.25rem;
}

.qa-msg {
  max-width: 92%;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
  text-align: justify;
  hyphens: auto;
}

.qa-msg-user {
  align-self: flex-end;
  background: var(--accent-soft);
  color: var(--text);
  border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
}

.qa-msg-assistant {
  align-self: flex-start;
  background: var(--bg);
  border: 1px solid var(--border);
}

.qa-msg-error {
  border-color: var(--danger);
  color: var(--danger);
}

.qa-msg-loading {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
}

.qa-input-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.qa-input-row input {
  flex: 1 1 12rem;
  min-width: 0;
}

.qa-form {
  margin-top: 0.5rem;
}

.progress-status {
  color: var(--text-muted);
  margin: 0.65rem 0 0;
  font-size: 0.9375rem;
  font-variant-numeric: tabular-nums;
}

.result-tabs {
  margin-bottom: 0.75rem;
}

.app-main {
  flex: 1;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem;
  padding-bottom: calc(1rem + env(safe-area-inset-bottom));
}

.app-main:has(.app-auth-page) {
  max-width: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

.app-main:has(.auth-loading-screen) {
  max-width: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

.auth-loading-screen {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  width: 100%;
  background: var(--bg);
}

.auth-loading-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  text-align: center;
}

.auth-loading-text {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text-muted);
  font-weight: 500;
}

#app-boot.login-wrap {
  min-height: 60vh;
}


h1, h2, h3 {
  margin: 0 0 0.5rem;
  line-height: 1.25;
  font-weight: 700;
}

h1 { font-size: clamp(1.5rem, 4vw, 2rem); }
h2 { font-size: clamp(1.15rem, 3vw, 1.35rem); }
p { margin: 0 0 1rem; }

.text-muted { color: var(--text-muted); }
.text-sm { font-size: 0.875rem; }

.pii-notice {
  margin: 1rem 0 0;
  padding: 0 0.5rem;
  text-align: center;
  color: #dc2626;
  font-size: 0.8125rem;
  line-height: 1.45;
}


[hidden] {
  display: none !important;
}


.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 42px;
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  border: none;
  font: inherit;
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
  text-decoration: none;
  white-space: nowrap;
}

.btn:active { transform: scale(0.98); }
.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); }

.btn-secondary {
  background: #fff;
  color: var(--accent);
  border: 1.5px solid var(--accent);
}
.btn-secondary:hover:not(:disabled) { background: var(--accent-soft); }

.btn-ghost {
  background: transparent;
  color: var(--text);
}
.btn-ghost:hover:not(:disabled) {
  background: var(--accent-soft);
  color: var(--accent);
}

.btn-danger {
  background: color-mix(in srgb, var(--danger) 15%, transparent);
  color: var(--danger);
  border: 1px solid color-mix(in srgb, var(--danger) 35%, transparent);
}

.btn-icon {
  min-width: var(--touch-min);
  padding: 0.5rem;
}

.btn-block { width: 100%; }

.btn.is-loading {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  pointer-events: none;
}

.btn-spinner {
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}


.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem;
}

.card + .card { margin-top: 1rem; }

.card-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}


.form-group { margin-bottom: 1rem; }

label {
  display: block;
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 0.35rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
textarea {
  width: 100%;
  min-height: var(--touch-min);
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font: inherit;
}

textarea {
  min-height: 6rem;
  resize: vertical;
}

input:focus,
textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}


.app-auth-page {
  flex: 1;
  width: 100%;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.app-auth-nav {
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
}

.app-auth-nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.35rem 0.65rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
}

.app-auth-nav .btn {
  min-height: 32px;
  padding: 0.3rem 0.5rem;
  font-size: 0.75rem;
  line-height: 1.2;
}

.login-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 2rem 1.25rem;
  min-height: 12rem;
}

.login-card {
  width: 100%;
  max-width: 420px;
  padding: 2rem;
}

.login-brand-block {
  text-align: center;
  margin-bottom: 1.5rem;
}

.login-brand {
  display: inline-flex;
  justify-content: center;
  margin-bottom: 0.35rem;
}

.login-brand .brand-logo {
  height: 2rem;
  max-height: 2rem;
  max-width: 3.5rem;
}

.login-tagline {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
}

.login-card h1 {
  font-size: 1.5rem;
  margin: 0 0 1.25rem;
}

.login-card #email::placeholder {
  font-size: calc(0.875rem - 1pt);
  font-style: italic;
}

.login-card .brand {
  justify-content: center;
}

.login-note {
  margin-top: 1rem;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  padding: 0.35rem 0.45rem;
}

.btn-icon .icon-gear {
  display: block;
}

.settings-panel h2 {
  margin: 1.25rem 0 0.75rem;
  font-size: 1.05rem;
}

.settings-form input:disabled,
.settings-form input[readonly] {
  opacity: 0.72;
  cursor: not-allowed;
  background: var(--bg-muted, #f3f4f6);
}

.settings-actions {
  justify-content: flex-start;
  margin-top: 0.5rem;
}

.login-note a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.login-note a:hover { text-decoration: underline; }

.login-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1rem 0;
  color: var(--text-muted);
  font-size: 0.8125rem;
}

.login-divider::before,
.login-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.login-divider span {
  flex-shrink: 0;
}

.btn-link {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
  text-decoration: none;
}

.btn-link:hover {
  text-decoration: underline;
}

.login-hint {
  margin: 0.5rem 0 0;
  text-align: center;
}

.otp-input {
  font-size: 1.5rem;
  letter-spacing: 0.35em;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.meeting-head {
  align-items: flex-start;
}

.meeting-head-main { flex: 1; min-width: 0; }

.meeting-title-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin: 0.35rem 0;
}

.meeting-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.meeting-rename-input {
  flex: 1 1 12rem;
  min-width: 0;
  min-height: 42px;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font: inherit;
  font-weight: 600;
  background: var(--bg);
  color: var(--text);
}

.btn-sm {
  min-height: 38px;
  padding: 0.4rem 0.85rem;
  font-size: 0.875rem;
}

.analyze-panel {
  margin-top: 1rem;
  border-color: var(--accent);
  box-shadow: 0 4px 20px var(--accent-soft);
}

.analyze-panel h2 {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
}

.file-preview {
  margin-top: 1rem;
  padding: 1rem;
  background: var(--bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.dashboard-shell {
  position: relative;
  min-height: calc(100dvh - var(--header-h) - 2rem);
}

.dashboard-watermark {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 0;
  pointer-events: none;
  user-select: none;
  color: var(--accent);
  opacity: 0.07;
  font-size: clamp(3.5rem, 24vw, 11rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  text-transform: lowercase;
  white-space: nowrap;
  max-width: 100vw;
  overflow: hidden;
  text-align: center;
}

.dashboard-content-wrap {
  position: relative;
  z-index: 1;
}

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

.meeting-item {
  display: block;
  align-self: start;
}

.meeting-card {
  position: relative;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s;
}

.meeting-card:hover {
  border-color: rgba(3, 88, 247, 0.35);
  box-shadow: 0 8px 30px rgba(3, 88, 247, 0.08);
  transform: translateY(-1px);
}

.meeting-delete {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}

.meeting-delete:hover {
  color: var(--danger);
  background: color-mix(in srgb, var(--danger) 12%, transparent);
}

.meeting-link {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem 0.85rem;
  padding: 1.62rem 2.5rem 1.62rem 1rem;
  min-height: 106px;
  text-decoration: none;
  color: inherit;
}

.meeting-link:hover {
  color: inherit;
}

.meeting-card:active {
  transform: scale(0.99);
}

.meeting-title {
  font-weight: 600;
  flex: 1 1 8rem;
  font-size: 0.96875rem;
  line-height: 1.4;
}

.meeting-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}


.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: capitalize;
  background: var(--bg-muted);
  color: var(--text-muted);
}

.badge-ready { background: color-mix(in srgb, var(--success) 18%, transparent); color: var(--success); }
.badge-failed { background: color-mix(in srgb, var(--danger) 18%, transparent); color: var(--danger); }
.badge-processing,
.badge-queued,
.badge-transcribing,
.badge-summarizing,
.badge-uploading { background: var(--accent-soft); color: var(--accent); }
.badge-draft { background: var(--bg-muted); color: var(--text-muted); }


.tabs {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 1rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 2px;
}

.tabs::-webkit-scrollbar { display: none; }

.tab {
  flex: 1 1 auto;
  min-width: max-content;
  min-height: var(--touch-min);
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text-muted);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.tab.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}


.dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 5vw, 2.5rem) 1rem;
  text-align: center;
  background: var(--bg);
  transition: border-color 0.15s, background 0.15s;
  cursor: pointer;
}

.dropzone.dragover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.dropzone-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  opacity: 0.7;
}

.dropzone input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}


.progress-wrap {
  margin-top: 1rem;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
  margin-bottom: 0.35rem;
}

.progress-bar {
  height: 8px;
  background: var(--bg-muted);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-hover));
  border-radius: 999px;
  transition: width 0.3s ease;
  width: 0%;
}


.recorder-panel {
  text-align: center;
  padding: 1.5rem 1rem;
}

.recorder-timer {
  font-size: clamp(2rem, 8vw, 3rem);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  margin: 0.5rem 0 1rem;
  font-family: var(--mono);
}

.recorder-status {
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.recorder-meter {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  margin: 0.25rem 0 1rem;
}

.recorder-meter-track {
  width: 28px;
  height: 104px;
  background: var(--bg-muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.06);
}

.recorder-meter-fill {
  width: 100%;
  height: 0%;
  min-height: 0;
  background: linear-gradient(to top, var(--success), var(--accent));
  border-radius: 999px;
  transition: height 60ms linear;
}

.recorder-meter-hint {
  margin: 0;
  max-width: 16rem;
}

.recorder-preview {
  margin-top: 0.75rem;
}

.pulse-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--danger);
  margin-right: 0.4rem;
  animation: pulse 1.2s ease infinite;
}

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


.summary-block {
  margin-bottom: 1.25rem;
}

.summary-block h3 {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.summary-text {
  white-space: pre-wrap;
  word-break: break-word;
}

.summary-text-full {
  text-align: justify;
  hyphens: auto;
}

.details-toggle {
  width: 100%;
  text-align: left;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  font: inherit;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  min-height: var(--touch-min);
}

.details-content {
  margin-top: 0.75rem;
  padding: 1rem;
  background: var(--bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.details-content[hidden] { display: none; }

.results-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.result-card h2 {
  margin: 0;
  font-size: 1.125rem;
}

.results-footer {
  display: flex;
  justify-content: center;
  align-items: center;
}

.action-list {
  margin: 0;
  padding-left: 1.25rem;
  line-height: 1.55;
  text-align: justify;
  hyphens: auto;
}

.action-list li {
  margin-bottom: 0.35rem;
  text-align: justify;
  hyphens: auto;
}

.action-list li:last-child {
  margin-bottom: 0;
}


.empty-state {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--text-muted);
}

.empty-state p { margin-bottom: 1rem; }


.toast {
  position: fixed;
  bottom: calc(1rem + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  max-width: min(90vw, 420px);
  padding: 0.75rem 1.25rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  font-size: 0.875rem;
  z-index: 200;
  animation: toast-in 0.25s ease;
}

.toast.error { border-color: var(--danger); color: var(--danger); }
.toast.success { border-color: var(--success); color: var(--success); }
.toast.info { border-color: var(--accent); color: var(--accent); }

@keyframes toast-in {
  from { opacity: 0; transform: translateX(-50%) translateY(12px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}


body.modal-open {
  overflow: hidden;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  animation: modal-fade-in 0.2s ease;
}

.modal-overlay[hidden] {
  display: none;
}

.modal-card {
  width: min(100%, 420px);
  padding: 1.5rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  animation: modal-slide-in 0.22s ease;
}

.modal-title {
  margin: 0 0 0.5rem;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
}

.modal-message {
  margin: 0 0 1.25rem;
  font-size: 0.9375rem;
  line-height: 1.55;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.625rem;
  flex-wrap: wrap;
}

@keyframes modal-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modal-slide-in {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}


.spinner {
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.spinner-lg {
  width: 2.75rem;
  height: 2.75rem;
  border-width: 3px;
}

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


@media (min-width: 640px) {
  .app-main { padding: 1.5rem; }

  .meeting-list {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0.625rem;
  }

  .btn-group .btn-block-sm { width: auto; }
}


@media (min-width: 1024px) {
  .two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }

  .recorder-panel {
    padding: 2rem;
  }
}

@media (max-width: 639px) {
  .header-inner {
    flex-wrap: wrap;
    gap: 0.35rem;
    padding: 0.35rem 0.65rem;
    row-gap: 0.4rem;
  }

  .header-start {
    flex-shrink: 0;
  }

  .header-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.3rem;
    flex: 1 1 auto;
    min-width: 0;
    flex-shrink: 0;
  }

  .usage-badge,
  .upgrade-badge,
  .home-badge,
  #logout-btn,
  #settings-btn {
    font-size: 0.75rem;
    padding: 0.3rem 0.5rem;
    min-height: 32px;
    line-height: 1.2;
    flex-shrink: 0;
  }

  .btn-sm {
    min-height: 32px;
  }

  #logout-btn {
    flex-shrink: 0;
  }

  .dashboard-watermark {
    font-size: clamp(3rem, 28vw, 6.5rem);
    opacity: 0.08;
  }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
