:root {
  --bg-primary: #0a0e13;
  --bg-secondary: #0f1319;
  --accent-mint: #29d7ff;
  --accent-cyan: #42a5ff;
  --text-primary: #f0f4fa;
  --text-secondary: #6d7a8a;
  --btn-glow: rgba(41, 215, 255, 0.44);
  --card-radius: 16px;
  --btn-radius: 50%;
  --line-soft: rgba(90, 120, 155, 0.18);
  --ok-chip-bg: rgba(40, 119, 72, 0.28);
  --ok-chip-text: #9ce3b8;
  --glass-bg: rgba(16, 20, 28, 0.72);
  --glass-border: rgba(100, 130, 165, 0.18);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  position: relative;
}

body::before,
body::after {
  content: "";
  position: fixed;
  pointer-events: none;
  z-index: 0;
  filter: blur(38px);
}

body::before {
  width: 240px;
  height: 240px;
  left: 50%;
  top: 54px;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(41, 215, 255, 0.14) 0%, rgba(41, 215, 255, 0) 66%);
}

body::after {
  width: 260px;
  height: 260px;
  right: -120px;
  top: 36%;
  background: radial-gradient(circle, rgba(60, 85, 115, 0.10) 0%, rgba(60, 85, 115, 0) 70%);
}

.device-shell {
  margin: 0 auto;
  width: 100%;
  max-width: 100%;
  min-height: 100dvh;
  padding: 16px 16px calc(74px + env(safe-area-inset-bottom));
  position: relative;
  z-index: 1;
}

.app {
  min-height: calc(100dvh - 88px);
}

.screen {
  display: none;
}

.screen.active {
  display: block;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}

.topbar.centered {
  justify-content: center;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.brand svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.minutes-pill {
  border: 1px solid rgba(62, 154, 208, 0.4);
  background: rgba(18, 71, 109, 0.38);
  color: #8fd9ff;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}

h1 {
  margin: 8px 0 18px;
  font-size: 1.85rem;
  line-height: 1.15;
  letter-spacing: 0.1px;
  font-weight: 700;
}

h2,
h3,
p {
  margin: 0;
}

.upload-orb {
  position: relative;
  width: 170px;
  height: 170px;
  margin: 44px auto 0;
  border-radius: var(--btn-radius);
  border: 2px solid rgba(41, 215, 255, 0.9);
  background: radial-gradient(circle at 50% 30%, #15334a, #0b1620 80%);
  box-shadow:
    0 0 0 2px rgba(41, 215, 255, 0.24),
    0 0 34px var(--btn-glow),
    inset 0 0 34px rgba(41, 215, 255, 0.21);
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-weight: 800;
  letter-spacing: 0.45px;
  animation: pulseGlow 2s ease-in-out infinite;
}

.upload-orb .mic svg {
  width: 44px;
  height: 44px;
  fill: #5be8ff;
}

.upload-orb::before {
  content: "";
  position: absolute;
  inset: -28px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(41, 215, 255, 0.2) 0%, rgba(41, 215, 255, 0) 66%);
  z-index: -1;
}

.upload-mode-wrap {
  width: min(296px, 100%);
  margin: 24px auto 14px;
  position: relative;
}

.output-mode-trigger {
  width: 100%;
  border: 1px solid rgba(112, 168, 214, 0.36);
  background: linear-gradient(180deg, rgba(23, 34, 49, 0.92), rgba(12, 21, 32, 0.94));
  color: var(--text-primary);
  border-radius: 999px;
  min-height: 46px;
  padding: 9px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.15px;
  box-shadow:
    0 10px 26px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(145, 186, 222, 0.18);
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.output-mode-trigger:hover,
.output-mode-trigger[aria-expanded="true"] {
  border-color: rgba(115, 202, 255, 0.54);
  box-shadow:
    0 14px 30px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(53, 175, 255, 0.24),
    inset 0 1px 0 rgba(145, 186, 222, 0.24);
}

.output-mode-trigger:focus-visible {
  outline: 2px solid rgba(98, 204, 255, 0.8);
  outline-offset: 2px;
}

.output-mode-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.output-mode-chevron {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(58, 116, 162, 0.24);
  border: 1px solid rgba(115, 172, 214, 0.24);
  flex-shrink: 0;
}

.output-mode-chevron svg {
  width: 14px;
  height: 14px;
  fill: #b7e8ff;
  transition: transform 0.2s ease;
}

.output-mode-trigger[aria-expanded="true"] .output-mode-chevron svg {
  transform: rotate(180deg);
}

.output-mode-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  border-radius: 18px;
  border: 1px solid rgba(105, 163, 210, 0.38);
  background: linear-gradient(180deg, rgba(20, 31, 45, 0.97), rgba(11, 20, 31, 0.98));
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.42);
  padding: 6px;
  display: grid;
  gap: 4px;
  z-index: 25;
}

.output-mode-option {
  border: 1px solid transparent;
  background: transparent;
  color: #dceefe;
  border-radius: 999px;
  min-height: 38px;
  padding: 8px 12px;
  text-align: left;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.1px;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.output-mode-menu[hidden] {
  display: none !important;
}

.output-mode-option:hover {
  background: rgba(78, 145, 194, 0.14);
  border-color: rgba(96, 170, 223, 0.32);
}

.output-mode-option.active {
  background: rgba(61, 170, 237, 0.2);
  border-color: rgba(101, 206, 255, 0.46);
  color: #edf7ff;
}

.output-mode-option:focus-visible {
  outline: 2px solid rgba(99, 205, 255, 0.86);
  outline-offset: 1px;
}

@keyframes pulseGlow {
  0%,
  100% {
    box-shadow:
      0 0 0 3px rgba(20, 216, 255, 0.16),
      0 0 18px var(--btn-glow),
      inset 0 0 24px rgba(20, 216, 255, 0.12);
  }
  50% {
    box-shadow:
      0 0 0 4px rgba(20, 216, 255, 0.22),
      0 0 36px rgba(20, 216, 255, 0.5),
      inset 0 0 30px rgba(20, 216, 255, 0.2);
  }
}

.list-card,
.history-tools,
.plan-card,
.plan-balance-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--card-radius);
  padding: 14px;
  backdrop-filter: blur(8px);
}

.list-card {
  margin-bottom: 12px;
}

.recent-section {
  margin-bottom: 14px;
}

.recent-section h2 {
  font-size: 1.5rem;
  line-height: 1.15;
  font-weight: 700;
  color: var(--text-primary);
}

.recent-card {
  margin-bottom: 14px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.section-head h2 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}

.mini-link,
.tool-btn,
.plan-action {
  border: 1px solid rgba(124, 153, 190, 0.24);
  background: rgba(21, 29, 40, 0.76);
  color: var(--text-primary);
  border-radius: 10px;
  padding: 7px 10px;
  font-weight: 600;
}

.mini-link {
  font-size: 0.78rem;
  padding: 5px 8px;
}

.job-list,
.history-list {
  display: grid;
  gap: 10px;
}

.job-item,
.history-item {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(127, 154, 188, 0.22);
  border-radius: 12px;
  padding: 11px 12px;
}

.settings-card {
  margin-bottom: 24px;
}

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

.setting-label {
  font-weight: 600;
  font-size: 0.95rem;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 82px;
  height: 34px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(12, 18, 28, 0.9);
  border: 1.5px solid rgba(100, 120, 145, 0.45);
  border-radius: 34px;
  transition: background 0.25s ease, border-color 0.25s ease;
}

/* knob */
.toggle-slider::before {
  position: absolute;
  content: "";
  height: 25px;
  width: 25px;
  left: 3px;
  top: 3px;
  background: rgba(100, 120, 145, 0.75);
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
  transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

/* label text — shows "OFF" by default on the right */
.toggle-slider::after {
  content: "OFF";
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.6px;
  color: rgba(110, 128, 150, 0.85);
  pointer-events: none;
  transition: color 0.25s ease;
}

input:checked + .toggle-slider {
  background: rgba(41, 215, 255, 0.1);
  border-color: rgba(41, 215, 255, 0.65);
}

input:checked + .toggle-slider::before {
  transform: translateX(48px);
  background: var(--accent-mint);
  box-shadow: 0 0 10px rgba(41, 215, 255, 0.45), 0 1px 4px rgba(0, 0, 0, 0.25);
}

/* label text — shows "ON" on the left when checked */
input:checked + .toggle-slider::after {
  content: "ON";
  right: auto;
  left: 9px;
  color: var(--accent-mint);
}

input:focus-visible + .toggle-slider {
  outline: 2px solid rgba(41, 215, 255, 0.8);
  outline-offset: 2px;
}

.job-title,
.history-title {
  font-weight: 600;
  margin-bottom: 4px;
}

.title-open {
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text-primary);
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.title-open:focus-visible {
  outline: 1px solid rgba(41, 215, 255, 0.46);
  outline-offset: 2px;
  border-radius: 8px;
}

.job-meta,
.history-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 0.76rem;
}

.status-chip {
  border-radius: 999px;
  padding: 3px 9px;
  border: 1px solid transparent;
  font-size: 0.68rem;
}

.status-chip.processing {
  color: #f0cc8a;
  background: rgba(203, 129, 23, 0.22);
}

.status-chip.done {
  color: var(--ok-chip-text);
  background: var(--ok-chip-bg);
}

.job-menu {
  font-size: 0.95rem;
  color: #8fa6be;
  font-weight: 700;
  line-height: 1;
}

.progress {
  margin-top: 7px;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(31, 45, 63, 0.92);
  overflow: hidden;
}

.progress > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #22cfff, #77e6ff);
}

.job-progress-note {
  margin-top: 5px;
  color: #a9c9df;
  font-size: 0.72rem;
  line-height: 1.25;
}

.search,
textarea,
input,
select {
  width: 100%;
  border: 1px solid rgba(125, 150, 182, 0.22);
  border-radius: 10px;
  padding: 10px;
  color: var(--text-primary);
  background: rgba(13, 19, 28, 0.9);
  font: inherit;
}

.search {
  margin-bottom: 8px;
}

.history-retention-note {
  margin: -8px 0 10px;
  font-size: 0.72rem;
  color: #8fa1b4;
  letter-spacing: 0.1px;
}

.history-tools {
  margin-top: 10px;
}

textarea {
  min-height: 100px;
  margin-bottom: 8px;
}

.tool-row {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.tool-btn.primary {
  background: linear-gradient(180deg, #2493c9, #166b9e);
  border-color: rgba(122, 221, 255, 0.62);
}

.feedback {
  color: #7fdcff;
  font-size: 0.86rem;
  margin-top: 8px;
  min-height: 1.1rem;
}

.plan-balance-card {
  border: 1px solid rgba(0, 170, 255, 0.52);
  background: linear-gradient(180deg, rgba(20, 33, 46, 0.86), rgba(10, 20, 31, 0.92));
  box-shadow:
    0 0 18px rgba(0, 150, 255, 0.35),
    inset 0 0 10px rgba(70, 200, 255, 0.08);
  margin-top: 18px;
  margin-bottom: 10px;
}

.plan-balance-card p {
  color: #7ed8ff;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  font-size: 0.84rem;
}

.plan-balance-card h2 {
  margin-top: 5px;
  font-size: 2rem;
  color: #f3f8ff;
  text-shadow: 0 0 8px rgba(136, 225, 255, 0.28);
}

.plan-balance-card h2 span {
  font-size: 0.92rem;
  color: #9bb3c8;
  font-weight: 500;
}

.plan-card {
  margin-bottom: 10px;
  border: 1px solid rgba(78, 186, 255, 0.3);
  background: linear-gradient(180deg, rgba(20, 32, 45, 0.82), rgba(12, 22, 33, 0.9));
  box-shadow: 0 0 10px rgba(0, 150, 255, 0.18);
}

.plan-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.plan-card h3 {
  color: #7ed8ff;
  font-size: 1.02rem;
  letter-spacing: 0.3px;
  margin-top: 4px;
  margin-bottom: 20px;
}

.plan-card p {
  color: #ccd9e7;
}

.community-panel {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 12px;
  align-items: stretch;
  margin-top: 4px;
  margin-bottom: 10px;
}

.community-art {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(87, 189, 255, 0.3);
  border-radius: 10px;
  min-height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 14px rgba(80, 198, 255, 0.1);
}

.community-art {
  color: #77d9ff;
}

.community-art svg {
  width: 68px;
  height: 68px;
  fill: currentColor;
}

.community-copy {
  border: 1px solid rgba(87, 189, 255, 0.24);
  border-radius: 10px;
  padding: 9px 10px;
  background: rgba(13, 23, 35, 0.76);
}

.community-copy p {
  font-size: 0.92rem;
  color: #d8e7f5;
  line-height: 1.35;
}

.gift {
  margin-right: 4px;
}

.plan-action {
  width: 100%;
  margin-top: 8px;
  padding: 11px;
}

.plan-action {
  border-color: rgba(116, 206, 255, 0.5);
  background: linear-gradient(180deg, rgba(46, 133, 187, 0.85), rgba(23, 83, 125, 0.92));
  box-shadow: 0 0 12px rgba(0, 150, 255, 0.3);
  font-size: 0.86rem;
  letter-spacing: 0.5px;
}

.plan-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.plan-action-secondary {
  border-color: rgba(126, 161, 190, 0.36);
  background: rgba(18, 28, 40, 0.84);
  box-shadow: none;
}

.plan-meta {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.plan-meta span {
  background: rgba(12, 20, 30, 0.9);
  border: 1px solid rgba(97, 177, 230, 0.28);
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 0.75rem;
  color: #a5d6f3;
}

.referral-note-card {
  background: linear-gradient(180deg, rgba(16, 28, 40, 0.9), rgba(10, 19, 29, 0.95));
}

.contacts-card {
  background: linear-gradient(180deg, rgba(14, 24, 35, 0.94), rgba(9, 16, 25, 0.97));
}

.referral-note-card h3 {
  margin-bottom: 6px;
}

.referral-note-card p {
  color: #b7cadb;
  font-size: 0.86rem;
}

.support-link {
  color: #7ed8ff;
  text-decoration: none;
  border-bottom: 1px solid rgba(126, 216, 255, 0.4);
}

.support-link:hover {
  color: #b9ecff;
}

@media (max-width: 360px) {
  .community-panel {
    grid-template-columns: 1fr;
  }

  .community-art {
    min-height: 92px;
  }

  .plan-actions {
    grid-template-columns: 1fr;
  }
}

.bottom-nav {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100%;
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  background: rgba(10, 14, 19, 0.92);
  border-top: 1px solid rgba(90, 120, 155, 0.16);
  backdrop-filter: blur(10px);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.nav-btn {
  border: 1px solid rgba(116, 147, 180, 0.18);
  border-radius: 11px;
  background: rgba(13, 19, 28, 0.78);
  color: #6b7f94;
  padding: 7px 6px;
  font-size: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.nav-btn small {
  font-size: 0.66rem;
  line-height: 1.1;
  text-align: center;
}

.nav-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.nav-btn.active {
  color: #4ad3ff;
  border-color: rgba(74, 211, 255, 0.46);
  box-shadow: 0 0 14px rgba(74, 211, 255, 0.24);
}

dialog {
  border: 0;
  border-radius: 12px;
  width: min(390px, 92vw);
  padding: 0;
  background: rgba(10, 14, 19, 0.97);
  border: 1px solid rgba(90, 120, 155, 0.18);
  color: var(--text-primary);
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.8);
}

.dialog-card,
.modal {
  padding: 12px;
}

.stack-form {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.input-row {
  display: flex;
  gap: 8px;
}

@media (max-width: 360px) {
  .upload-orb {
    width: 150px;
    height: 150px;
    margin: 38px auto 0;
  }

  .upload-orb .mic svg {
    width: 42px;
    height: 42px;
  }

  .tool-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .upload-mode-wrap {
    width: 100%;
  }

  .output-mode-trigger {
    min-height: 44px;
    padding: 8px 12px;
    font-size: 0.86rem;
  }

  .output-mode-option {
    min-height: 36px;
    font-size: 0.84rem;
  }
}

.selected-file {
  color: var(--accent-mint);
  font-size: 0.82rem;
  word-break: break-all;
  margin-bottom: 4px;
}

.upload-progress {
  margin-top: 8px;
}

/* ── Full-screen transcript view ── */

.transcript-screen {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--bg-primary);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
  will-change: transform, opacity;
}

.transcript-screen.open {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

.transcript-screen-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px 10px;
  flex-shrink: 0;
}

.transcript-back-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(124, 153, 190, 0.24);
  background: rgba(21, 29, 40, 0.76);
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  transition: background 0.15s;
}

.transcript-back-btn:hover {
  background: rgba(41, 215, 255, 0.12);
}

.transcript-back-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.transcript-screen-title-wrap {
  flex: 1;
  min-width: 0;
}

.transcript-screen-title-wrap h3 {
  font-size: 1.06rem;
  font-weight: 700;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.transcript-meta {
  color: var(--text-secondary);
  font-size: 0.78rem;
  margin-top: 3px;
}

.copy-all-btn {
  flex-shrink: 0;
  border: 1px solid rgba(41, 215, 255, 0.42);
  background: rgba(41, 215, 255, 0.14);
  color: var(--accent-mint);
  border-radius: 8px;
  padding: 5px 12px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: background 0.15s;
}

.copy-all-btn:hover {
  background: rgba(41, 215, 255, 0.22);
}

.transcript-screen-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 16px 100px;
  -webkit-overflow-scrolling: touch;
}

.transcript-content-label {
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 600;
  margin: 8px 0 14px;
}

.transcript-body {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.6;
  font-size: 0.92rem;
  color: var(--text-primary);
}

.transcript-body h1,
.transcript-body h2,
.transcript-body h3,
.transcript-body h4,
.transcript-body h5,
.transcript-body h6 {
  margin: 0 0 10px;
  line-height: 1.25;
  font-weight: 800;
  color: #eef7ff;
}

.transcript-body h2 {
  margin-top: 14px;
  font-size: 1.1rem;
}

.transcript-body h3 {
  margin-top: 12px;
  font-size: 1.01rem;
}

.transcript-body h4 {
  margin-top: 10px;
  font-size: 0.95rem;
}

.transcript-body p {
  margin: 0 0 11px;
}

.transcript-body ul,
.transcript-body ol {
  margin: 0 0 12px;
  padding-left: 18px;
}

.transcript-body li {
  margin-bottom: 5px;
}

.transcript-body strong {
  font-weight: 800;
  color: #f5fbff;
}

.transcript-body em {
  font-style: italic;
  color: #d3ecff;
}

.transcript-screen-fab {
  position: fixed;
  right: 16px;
  bottom: calc(24px + env(safe-area-inset-bottom));
  z-index: 210;
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.transcript-screen.open .transcript-screen-fab {
  opacity: 1;
  pointer-events: auto;
}

.download-fab {
  width: 54px;
  height: 54px;
  border-radius: 999px;
  border: 1px solid rgba(125, 223, 255, 0.56);
  background: linear-gradient(180deg, #36c8ff, #1a8ec7);
  color: #e8f8ff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 16px rgba(54, 200, 255, 0.34);
  cursor: pointer;
  transition: box-shadow 0.15s;
}

.download-fab:hover {
  box-shadow: 0 0 24px rgba(54, 200, 255, 0.5);
}

.download-fab svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.transcript-export-menu {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(21, 29, 40, 0.94);
  border: 1px solid rgba(124, 153, 190, 0.24);
  border-radius: 12px;
  padding: 8px 14px;
  backdrop-filter: blur(8px);
  animation: fadeInLeft 0.2s ease;
}

@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(12px); }
  to   { opacity: 1; transform: translateX(0); }
}

.export-label {
  color: var(--text-secondary);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.export-sep {
  color: rgba(127, 138, 153, 0.4);
  font-size: 0.82rem;
}

.transcript-export-opt {
  border: none;
  background: transparent;
  color: var(--accent-mint);
  font-size: 0.82rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  padding: 2px 4px;
  white-space: nowrap;
  transition: color 0.15s;
}

.transcript-export-opt:hover {
  color: #fff;
}

.job-item {
  cursor: pointer;
}

.history-item {
  cursor: pointer;
  display: grid;
  grid-template-columns: 48px 1fr 24px;
  align-items: start;
  gap: 10px;
}

.history-emoji {
  width: 48px;
  height: 48px;
  margin-top: 2px;
  border-radius: 14px;
  background: rgba(41, 215, 255, 0.10);
  border: 1px solid rgba(41, 215, 255, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
  cursor: pointer;
  transition: background 0.15s;
}

.history-emoji:hover {
  background: rgba(41, 215, 255, 0.18);
}

.history-content {
  min-width: 0;
  overflow: hidden;
}

.history-title {
  display: block;
  width: 100%;
  font-weight: 600;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--text-secondary);
  font-size: 0.76rem;
}

.history-menu {
  font-size: 1.15rem;
  color: #8fa6be;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
  border-radius: 8px;
  transition: background 0.15s;
  text-align: center;
}

.history-menu:hover {
  background: rgba(255, 255, 255, 0.06);
}

.job-menu,
.history-menu {
  border: 0;
  background: transparent;
}

#deleteItemBtn {
  border-color: rgba(210, 91, 91, 0.34);
  color: #ffaaaa;
}

#confirmDeleteBtn {
  border-color: rgba(210, 91, 91, 0.34);
  color: #ffaaaa;
}

.tag-chip {
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 0.68rem;
  font-weight: 600;
  border: 1px solid transparent;
  white-space: nowrap;
}

.tag-chip.lecture { color: #9ce3b8; background: var(--ok-chip-bg); }
.tag-chip.meeting { color: #8fd9ff; background: rgba(20, 80, 128, 0.28); }
.tag-chip.interview { color: #f0cc8a; background: rgba(203, 129, 23, 0.22); }
.tag-chip.note { color: #c9b3f5; background: rgba(108, 62, 194, 0.22); }
.tag-chip.default { color: var(--text-secondary); background: rgba(127, 138, 153, 0.16); }

.filter-row {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.filter-btn {
  flex: 1;
  border: 1px solid rgba(124, 153, 190, 0.22);
  background: rgba(21, 29, 40, 0.76);
  color: var(--text-secondary);
  border-radius: 10px;
  padding: 8px 12px;
  font-weight: 600;
  font-size: 0.8rem;
  font-family: inherit;
  transition: border-color 0.15s, color 0.15s;
}

.filter-btn:hover, .filter-btn.active {
  color: var(--accent-mint);
  border-color: rgba(41, 215, 255, 0.4);
}

.active-filter {
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.active-filter .clear-filter {
  color: var(--accent-mint);
  cursor: pointer;
  font-weight: 600;
}

.emoji-dialog, .tag-dialog {
  width: min(320px, 88vw);
  border-radius: 16px;
}

.emoji-picker, .tag-picker {
  padding: 14px;
}

.emoji-picker h3, .tag-picker h3 {
  margin-bottom: 10px;
  font-size: 1rem;
}

.emoji-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  margin-bottom: 4px;
}

.emoji-option {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 10px;
  border: 1px solid rgba(127, 154, 188, 0.18);
  background: rgba(13, 19, 28, 0.78);
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}

.emoji-option:hover {
  background: rgba(41, 215, 255, 0.12);
  border-color: rgba(41, 215, 255, 0.36);
}

.tag-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  margin-bottom: 8px;
}

.tag-option {
  border-radius: 10px;
  border: 1px solid rgba(127, 154, 188, 0.18);
  background: rgba(13, 19, 28, 0.78);
  color: var(--text-primary);
  padding: 8px 10px;
  font-size: 0.82rem;
  font-weight: 600;
  font-family: inherit;
  text-align: center;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
  width: 100%;
}

.tag-option:hover {
  background: rgba(41, 215, 255, 0.12);
  border-color: rgba(41, 215, 255, 0.36);
}

.tag-custom-row {
  display: flex;
  gap: 6px;
}

.tag-custom-row input {
  flex: 1;
}

.tag-custom-row .tool-btn {
  flex-shrink: 0;
  min-width: 56px;
}

.manage-tags-panel {
  margin-top: 8px;
  border: 1px solid rgba(127, 154, 188, 0.2);
  border-radius: 12px;
  padding: 10px;
  background: rgba(11, 16, 24, 0.65);
}

.manage-tags-title {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.manage-tags-warning {
  font-size: 0.76rem;
  color: #ffb9c3;
  margin-bottom: 8px;
}

.manage-tags-list {
  display: grid;
  gap: 6px;
  margin-bottom: 8px;
  max-height: 160px;
  overflow-y: auto;
}

.manage-tag-row {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(127, 154, 188, 0.16);
  border-radius: 10px;
  padding: 7px 9px;
  background: rgba(13, 19, 28, 0.78);
  font-size: 0.82rem;
}

.manage-tag-row input {
  width: auto;
}

.manage-tags-actions {
  display: flex;
  gap: 6px;
}

.manage-tags-actions .tool-btn {
  flex: 1;
}

.upload-progress .progress {
  margin-bottom: 4px;
}

.upload-overlay {
  margin: 0 auto 16px;
  max-width: 260px;
  text-align: center;
}

.upload-overlay .progress {
  margin-bottom: 4px;
}

/* ── Toast notifications ─────────────────────────────────────────── */
.toast-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: max(env(safe-area-inset-top, 0px), 12px) 12px 0;
  pointer-events: none;
}

.toast {
  background: rgba(18, 24, 34, 0.96);
  border: 1px solid rgba(41, 215, 255, 0.22);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 360px;
  width: 100%;
  pointer-events: all;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(41, 215, 255, 0.08);
  animation: toast-in 0.3s cubic-bezier(0.34, 1.36, 0.64, 1) forwards;
}

.toast.toast-out {
  animation: toast-out 0.22s ease-in forwards;
}

.toast-icon {
  font-size: 20px;
  flex-shrink: 0;
  line-height: 1;
}

.toast-body {
  flex: 1;
  min-width: 0;
}

.toast-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.toast-sub {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.toast-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 2px 4px;
  font-size: 13px;
  flex-shrink: 0;
  line-height: 1;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(-14px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0)     scale(1);    }
}

@keyframes toast-out {
  from { opacity: 1; transform: translateY(0)    scale(1);    }
  to   { opacity: 0; transform: translateY(-8px) scale(0.97); }
}
