:root {
  --bg: #fafafa;
  --surface: #ffffff;
  --surface-2: #f6f7f9;
  --surface-3: #eceef2;
  --border: #e6e7eb;
  --border-strong: #d5d7dd;
  --text: #0c0d0f;
  --muted: #6b7280;
  --subtle: #9ca3af;
  --accent: #5e6ad2;
  --accent-hover: #4f5bc8;
  --accent-soft: rgba(94, 106, 210, 0.1);
  --green: #16a34a;
  --red: #dc2626;
  --yellow: #b45309;
  --radius: 8px;
  --radius-sm: 6px;
  --topbar-h: 48px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.04);
  --shadow-md: 0 4px 14px rgba(16, 24, 40, 0.08);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Apple SD Gothic Neo", "Noto Sans KR", Roboto, sans-serif;
  font-feature-settings: "cv11", "ss01", "ss03";
  font-size: 13.5px;
  line-height: 1.5;
  letter-spacing: -0.004em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ─── Icons ───────────────────────────────────────────── */
.icon {
  width: 14px;
  height: 14px;
  flex: none;
  vertical-align: middle;
}
.icon-sm { width: 12px; height: 12px; }
.icon-lg { width: 16px; height: 16px; }

/* ─── Keyboard badges ─────────────────────────────────── */
.kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10.5px;
  font-weight: 500;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  line-height: 1;
}
.kbd-on-accent {
  background: rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.95);
  border-color: rgba(255, 255, 255, 0.28);
}

/* ─── Topbar ──────────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.topbar-left, .topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.brand {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  /* button reset — div → button으로 변경되었을 때 기본 스타일 제거 */
  background: none;
  border: 0;
  padding: 4px 6px;
  margin: 0 -6px;
  font-family: inherit;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: background-color 0.12s var(--ease);
}
.brand:hover { background: var(--surface-2); }
.brand:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.brand-mark {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  background: linear-gradient(135deg, var(--accent) 0%, #8289db 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22),
              0 1px 2px rgba(94, 106, 210, 0.2);
  position: relative;
}
.brand-mark::after {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.9);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}
.breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  min-width: 0;
}
.breadcrumb .icon { color: var(--subtle); }
.bc-title {
  color: var(--text);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 420px;
}

/* Topbar CTA */
.topbar-cta {
  padding: 0 10px;
  height: 28px;
  font-size: 12.5px;
  font-weight: 500;
  background: var(--accent);
  color: #fff;
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  letter-spacing: -0.005em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18),
              0 1px 2px rgba(94, 106, 210, 0.2);
  transition: background 0.12s var(--ease), box-shadow 0.12s var(--ease);
}
.topbar-cta:hover {
  background: var(--accent-hover);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22),
              0 0 0 3px var(--accent-soft);
}
.topbar-cta .icon { opacity: 0.95; }

.ghost-btn {
  width: 28px;
  height: 28px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: inherit;
  display: grid;
  place-items: center;
  transition: background 0.12s var(--ease), color 0.12s var(--ease), border-color 0.12s var(--ease);
}
.ghost-btn:hover {
  color: var(--text);
  background: var(--surface-2);
  border-color: var(--border-strong);
}

/* Topbar 연결 상태 토글 */
.health-toggle { position: relative; }
.health-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--subtle);
  box-shadow: 0 0 0 2px rgba(156, 163, 175, 0.18);
  transition: background 0.12s var(--ease), box-shadow 0.12s var(--ease);
}
.health-toggle.ok .health-indicator {
  background: var(--green);
  box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.22);
}
.health-toggle.fail .health-indicator {
  background: var(--red);
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.22);
}
.health-toggle[aria-expanded="true"] {
  background: var(--surface-2);
  border-color: var(--border-strong);
}

/* 연결 상태 드로어 */
.health-drawer {
  position: fixed;
  top: calc(var(--topbar-h) + 6px);
  right: 12px;
  width: 320px;
  max-width: calc(100vw - 24px);
  max-height: calc(100vh - var(--topbar-h) - 24px);
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 14px;
  z-index: 60;
}
.health-drawer[hidden] { display: none; }
.health-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.health-drawer-head h2 {
  font-size: 11px;
  margin: 0;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ─── Layout — 2 flush columns ───────────────────────── */
main {
  width: 100%;
  padding: 0;
  background: var(--surface);
}
.layout {
  display: grid;
  grid-template-columns: minmax(280px, 320px) minmax(0, 1fr);
  gap: 0;
  align-items: stretch;
  min-height: calc(100vh - var(--topbar-h));
  background: var(--surface);
}
.col-left, .col-main {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  min-width: 0;
  background: var(--surface);
}
.col-left { border-right: 1px solid var(--border); }

@media (min-width: 761px) {
  .col-left {
    position: sticky;
    top: var(--topbar-h);
    align-self: start;
    max-height: calc(100vh - var(--topbar-h));
    overflow-y: auto;
  }
}

/* Cards flat inside columns */
.card {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 16px;
}
.col-left .card + .card {
  border-top: 1px solid var(--border);
}
.side-card { padding: 14px 14px 12px; }
.side-card .card-head { margin-bottom: 10px; }
.main-card { padding: 28px 28px 28px; }

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 22px;
}
.card h2 {
  font-size: 11px;
  margin: 0;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ─── Badges & pills ──────────────────────────────────── */
.badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-weight: 500;
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.badge.ok {
  background: rgba(22, 163, 74, 0.08);
  color: var(--green);
  border-color: rgba(22, 163, 74, 0.22);
}
.badge.fail {
  background: rgba(220, 38, 38, 0.08);
  color: var(--red);
  border-color: rgba(220, 38, 38, 0.22);
}
.count-pill {
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  border: 1px solid var(--border);
}

/* ─── Connection list ─────────────────────────────────── */
.health-list-v {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin: 0 -4px;
}
.health-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  color: var(--text);
  transition: background 0.1s var(--ease);
  min-width: 0;
  cursor: default;
}
.health-item:hover { background: var(--surface-2); }
.health-item .status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex: none;
}
.health-item.ok .status-dot {
  background: var(--green);
  box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.18);
}
.health-item.fail .status-dot {
  background: var(--red);
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.18);
}
.health-item .name {
  color: var(--text);
  font-weight: 500;
  flex: none;
  min-width: 82px;
}
.health-item .detail {
  color: var(--subtle);
  font-size: 11.5px;
  flex: 1;
  min-width: 0;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.health-item.fail .detail { color: #dc5a5a; }
.health-updated {
  margin-top: 10px;
  padding: 0 4px;
  font-size: 11px;
  color: var(--subtle);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ─── Search ──────────────────────────────────────────── */
.search-wrap {
  position: relative;
  margin: 0 0 8px;
}
.search-icon {
  position: absolute;
  left: 9px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--subtle);
  pointer-events: none;
}
.search-input {
  width: 100%;
  height: 30px;
  padding: 0 32px 0 30px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 12.5px;
  font-family: inherit;
  transition: background 0.12s var(--ease), border-color 0.12s var(--ease), box-shadow 0.12s var(--ease);
}
.search-input::placeholder { color: var(--subtle); }
.search-input:hover { border-color: var(--border-strong); }
.search-input:focus {
  outline: none;
  background: var(--surface);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.search-input:focus + .search-kbd { opacity: 0; }
.search-kbd {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  transition: opacity 0.12s var(--ease);
}

/* ─── Main card hero ──────────────────────────────────── */
.hero { max-width: 560px; margin: 0 auto; }
.hero-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}
.eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}

/* Input */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}
.field label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}
.field input {
  padding: 10px 13px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.12s var(--ease), box-shadow 0.12s var(--ease), background 0.12s var(--ease);
}
.field input::placeholder { color: var(--subtle); }
.field input:hover { border-color: var(--border-strong); }
.field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.field textarea {
  padding: 10px 13px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 13.5px;
  font-family: inherit;
  line-height: 1.55;
  resize: vertical;
  min-height: 96px;
  transition: border-color 0.12s var(--ease), box-shadow 0.12s var(--ease), background 0.12s var(--ease);
}
.field textarea::placeholder { color: var(--subtle); white-space: pre-line; }
.field textarea:hover { border-color: var(--border-strong); }
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.field-hint {
  color: var(--subtle);
  font-weight: 400;
  font-size: 11.5px;
  margin-left: 2px;
}
.context-area {
  width: 100%;
  padding: 10px 13px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 13.5px;
  font-family: inherit;
  line-height: 1.55;
  resize: vertical;
  min-height: 108px;
  transition: border-color 0.12s var(--ease), box-shadow 0.12s var(--ease), background 0.12s var(--ease);
}
.context-area::placeholder { color: var(--subtle); white-space: pre-line; }
.context-area:hover { border-color: var(--border-strong); }
.context-area:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* ─── Materials (다중 회의 자료) ───────────────────────── */
.materials-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.material-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  background: var(--surface);
  transition: border-color 0.12s var(--ease);
}
.material-item:hover { border-color: var(--border-strong); }
.material-item:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.material-head {
  display: flex;
  align-items: center;
  gap: 6px;
}
.material-label {
  flex: 1;
  padding: 4px 8px;
  border: 1px solid transparent;
  border-radius: 4px;
  font-size: 12.5px;
  font-weight: 600;
  font-family: inherit;
  color: var(--text);
  background: transparent;
  transition: border-color 0.12s var(--ease), background 0.12s var(--ease);
}
.material-label:hover { border-color: var(--border); background: var(--surface-2); }
.material-label:focus { outline: none; border-color: var(--accent); background: var(--surface); }
.material-label::placeholder { color: var(--subtle); font-weight: 400; }
.material-remove {
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--subtle);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  line-height: 1;
  transition: background 0.1s, color 0.1s;
  flex: none;
}
.material-remove:hover { background: rgba(220, 38, 38, 0.08); color: var(--red); }
.material-content {
  width: 100%;
  padding: 8px 8px;
  border: none;
  border-top: 1px solid var(--border);
  border-radius: 0;
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  line-height: 1.55;
  resize: vertical;
  min-height: 72px;
  background: transparent;
}
.material-content:focus { outline: none; }
.material-content::placeholder { color: var(--subtle); }
.material-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.12s, color 0.12s, background 0.12s;
}
.material-add-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

.materials-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.materials-save-wrap {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.materials-save-status {
  font-size: 12px;
  color: var(--subtle);
  min-height: 16px;
  transition: color 0.12s var(--ease);
}
.materials-save-status.is-dirty { color: var(--accent); font-weight: 500; }
.materials-save-status.is-saved { color: var(--green, #16a34a); }
.materials-save-btn {
  padding: 7px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.12s var(--ease), border-color 0.12s var(--ease), color 0.12s var(--ease);
}
.materials-save-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.materials-save-btn.is-dirty:not(:disabled) {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.materials-save-btn.is-dirty:not(:disabled):hover { filter: brightness(0.96); }
.materials-cancel-btn {
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.12s var(--ease), border-color 0.12s var(--ease), color 0.12s var(--ease);
}
.materials-cancel-btn:hover {
  background: var(--surface-2);
  border-color: var(--border-strong);
  color: var(--text);
}

/* ─── Buttons ─────────────────────────────────────────── */
.big-btn {
  width: 100%;
  padding: 0 18px;
  height: 44px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-family: inherit;
  transition: background 0.12s var(--ease), border-color 0.12s var(--ease),
              transform 0.05s var(--ease), box-shadow 0.12s var(--ease);
}
.big-btn:active { transform: scale(0.995); }
.big-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.big-btn .icon, .big-btn .icon-lg { margin-right: -2px; }
.big-btn .kbd { margin-left: auto; }

.start-btn {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18),
              0 1px 2px rgba(94, 106, 210, 0.28);
}
.start-btn:hover:not(:disabled) {
  background: var(--accent-hover);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22),
              0 0 0 3px var(--accent-soft);
}

.stop-btn {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fca5a5;
}
.stop-btn:hover:not(:disabled) {
  background: #fee2e2;
  border-color: #f87171;
  color: #991b1b;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.continue-btn {
  background: #fffbeb;
  color: #92400e;
  border-color: #fde68a;
}
.continue-btn:hover:not(:disabled) {
  background: #fef3c7;
  border-color: #fcd34d;
  color: #78350f;
}

.secondary-btn {
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.12s var(--ease), border-color 0.12s var(--ease);
  white-space: nowrap;
}
.secondary-btn:hover:not(:disabled) {
  background: var(--surface-2);
  border-color: var(--border-strong);
}
.secondary-btn:disabled { opacity: 0.55; cursor: not-allowed; }

.link-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  padding: 4px 6px;
  margin-left: -6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 4px;
  transition: color 0.12s var(--ease), background 0.12s var(--ease);
}
.link-btn:hover { color: var(--text); background: var(--surface-2); }
.link-btn .kbd { margin-left: 4px; }
.link-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.link-btn.danger { color: #d97c7c; }
.link-btn.danger:hover { color: #ff9b9b; background: rgba(235, 87, 87, 0.08); }
.link-btn.confirm-btn { color: var(--green); font-weight: 500; }
.link-btn.confirm-btn:hover { color: #138b3d; background: rgba(22, 163, 74, 0.08); }

/* ─── Idle hero layout ────────────────────────────────── */
.sub-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.hero-actions {
  display: flex;
  gap: 10px;
  margin: 6px 0 2px;
}
.hero-actions .big-btn { flex: 1; }

.hint {
  color: var(--subtle);
  font-size: 12px;
  margin: 18px 0 0;
  line-height: 1.6;
}
.hint .kbd { vertical-align: -1px; }

/* Mic test */
.mic-result {
  color: var(--muted);
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.mic-result.ok { color: var(--green); }
.mic-result.fail { color: var(--red); }
.mic-result .level-bar {
  display: inline-block;
  width: 90px;
  height: 4px;
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}
.mic-result .level-bar > i {
  display: block;
  height: 100%;
  background: var(--green);
  width: 0;
  transition: width 0.2s var(--ease);
}

/* ─── Recording state ─────────────────────────────────── */
.rec-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
}
.rec-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.18);
  animation: pulse-rec 1.5s ease-in-out infinite;
}
@keyframes pulse-rec {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.9); }
}
.rec-title {
  font-weight: 500;
  color: var(--text);
  text-transform: none;
  letter-spacing: -0.003em;
  margin-left: 6px;
  font-size: 13px;
}
.big-timer {
  font-size: 72px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: center;
  margin: 28px 0 18px;
  letter-spacing: -0.045em;
  color: var(--text);
  background: linear-gradient(180deg, var(--text) 0%, #3d4148 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.rec-meta {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 28px;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 12px;
}
.rec-meta > div {
  display: flex;
  align-items: center;
  gap: 8px;
}
.rec-meta .meta-label {
  color: var(--subtle);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 10px;
  font-weight: 500;
}
.rec-meta b {
  color: var(--text);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.rec-meta-sep {
  width: 1px;
  height: 12px;
  background: var(--border-strong);
}

.warning {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  margin-bottom: 14px;
}

/* ─── Processing (stage list) ─────────────────────────── */
.proc-title {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 4px;
  letter-spacing: -0.01em;
}
.stage-list {
  list-style: none;
  padding: 0;
  margin: 18px 0 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.stage-list li {
  padding: 10px 13px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  transition: all 0.15s var(--ease);
  position: relative;
  overflow: hidden;
}
.stage-label { flex: 1; min-width: 0; }
.stage-detail {
  color: var(--subtle);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 260px;
}
.stage-elapsed {
  color: var(--subtle);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  padding-left: 8px;
  border-left: 1px solid var(--border);
  margin-left: 2px;
  min-width: 42px;
  text-align: right;
}
.stage-list li.active .stage-elapsed,
.stage-list li.active .stage-detail { color: var(--accent); }
.stage-list li.done .stage-elapsed { color: var(--green); }
.stage-list li.active::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, transparent 0%, rgba(94, 106, 210, 0.16) 50%, transparent 100%);
  animation: stage-shimmer 1.8s linear infinite;
  border-radius: inherit;
}
@keyframes stage-shimmer {
  from { transform: translateX(-100%); }
  to { transform: translateX(100%); }
}
.proc-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  padding: 8px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 12px;
}
.proc-total-label {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 10.5px;
  font-weight: 500;
}
.proc-total b {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.stage-list li::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1.5px solid var(--subtle);
  background: transparent;
  flex: none;
  transition: all 0.15s var(--ease);
}
.stage-list li.active {
  color: var(--text);
  border-color: rgba(94, 106, 210, 0.4);
  background: rgba(94, 106, 210, 0.04);
}
.stage-list li.active::before {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  animation: pulse-rec 1.4s infinite;
}
.stage-list li.done { color: var(--text); }
.stage-list li.done::before {
  background: var(--green);
  border-color: var(--green);
  box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.15);
}

/* 세션 상세뷰에 박힌 static 단계 리스트 — shimmer/pulse 없이 조용한 상태 뷰 */
.stage-list-static li.active::after { display: none; }
.stage-list-static li.active::before { animation: none; }
.stage-list li.failed {
  color: var(--red);
  border-color: rgba(220, 38, 38, 0.35);
  background: rgba(220, 38, 38, 0.04);
}
.stage-list li.failed::before {
  background: var(--red);
  border-color: var(--red);
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.18);
}
.stage-list li.failed .stage-detail { color: var(--red); }
.stage-list li.warned {
  color: var(--yellow);
  border-color: rgba(180, 83, 9, 0.3);
  background: rgba(180, 83, 9, 0.04);
}
.stage-list li.warned::before {
  background: var(--yellow);
  border-color: var(--yellow);
  box-shadow: 0 0 0 2px rgba(180, 83, 9, 0.15);
}
.stage-list li.warned .stage-detail { color: var(--yellow); }
.stage-list li.pending { opacity: 0.75; }

/* 진행 단계 섹션 — details summary 옆 배지 */
.stages-section > summary { cursor: pointer; }
.stages-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 500;
  vertical-align: middle;
  background: var(--surface-3);
  color: var(--muted);
}
.stages-badge.failed { background: rgba(220, 38, 38, 0.1); color: var(--red); }
.stages-badge.active { background: var(--accent-soft); color: var(--accent); }
.stages-badge.done { background: rgba(22, 163, 74, 0.1); color: var(--green); }
.stages-badge.warned { background: rgba(180, 83, 9, 0.1); color: var(--yellow); }
.stages-badge.waiting { background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }
.stages-badge:empty { display: none; }
.stages-error {
  margin-top: 10px;
  padding: 10px 12px;
  background: rgba(220, 38, 38, 0.05);
  border: 1px solid rgba(220, 38, 38, 0.2);
  border-radius: var(--radius-sm);
  color: var(--red);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  white-space: pre-wrap;
  word-break: break-word;
}
.stages-hint {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

/* 화자 재매칭 진행 바 — 목록 상단에 표시 */
.rematch-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0;
  padding: 10px 14px;
  background: var(--accent-soft);
  border: 1px solid rgba(94, 106, 210, 0.25);
  border-radius: var(--radius-sm);
  color: var(--accent);
  font-size: 12.5px;
  font-weight: 500;
}
.rematch-spinner {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(94, 106, 210, 0.25);
  border-top-color: var(--accent);
  animation: rematch-spin 0.9s linear infinite;
  flex: none;
}
@keyframes rematch-spin {
  to { transform: rotate(360deg); }
}
.rematch-label { flex: 1; min-width: 0; }
.rematch-elapsed {
  font-variant-numeric: tabular-nums;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11.5px;
  color: var(--accent);
  opacity: 0.85;
}

/* ─── Done view ───────────────────────────────────────── */
.done-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 16px;
}
.header-actions-right {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

/* 케밥 메뉴 (헤더 우측 파괴적 액션용) */
.kebab-wrap { position: relative; display: inline-flex; }
.kebab-btn { width: 28px; height: 28px; }
.kebab-dots {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  line-height: 1;
  color: var(--muted);
  letter-spacing: -1px;
}
.kebab-btn[aria-expanded="true"] {
  background: var(--surface-2);
  border-color: var(--border-strong);
}
.kebab-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 160px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  padding: 4px;
  z-index: 40;
}
.kebab-menu[hidden] { display: none; }
.kebab-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: transparent;
  border: 0;
  border-radius: 4px;
  font-family: inherit;
  font-size: 12.5px;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}
.kebab-item:hover { background: var(--surface-2); }
.kebab-item.danger { color: var(--red); }
.kebab-item.danger:hover { background: rgba(220, 38, 38, 0.08); }
.kebab-item.danger .icon { color: var(--red); }
.done-title {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 4px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.01em;
}
.done-title::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.18);
}
.done-subtitle {
  color: var(--muted);
  font-size: 12.5px;
  margin-bottom: 18px;
}

/* 인라인 편집 가능한 회의 제목 (h3) */
.done-meeting-title {
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 6px;
  color: var(--text);
  letter-spacing: -0.012em;
  line-height: 1.3;
  display: flex;
  align-items: center;
  gap: 8px;
}
.done-meeting-title::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.18);
  flex: none;
}
.editable-title {
  cursor: text;
  padding: 2px 6px;
  margin-left: -6px;
  border-radius: 4px;
  transition: background 0.1s var(--ease), box-shadow 0.1s var(--ease);
}
.editable-title::after {
  content: "";
  width: 14px;
  height: 14px;
  margin-left: 4px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M17 3a2.85 2.85 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z'/></svg>") no-repeat center / contain;
  opacity: 0.65;
  flex: none;
  transition: opacity 0.12s var(--ease);
}
.editable-title:hover {
  background: var(--surface-2);
  box-shadow: inset 0 -1px 0 var(--border-strong);
}
.editable-title:hover::after { opacity: 1; }
/* 자동 생성 제목 (사용자 미지정) — placeholder 톤으로 구분 */
.done-meeting-title.is-auto-title { color: var(--muted); font-weight: 500; font-style: italic; }

/* 편집 모드 input — 동일 사이즈/위치 유지 */
.done-meeting-title-input {
  font-size: 22px;
  font-weight: 600;
  font-family: inherit;
  letter-spacing: -0.012em;
  line-height: 1.3;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--accent);
  border-radius: 4px;
  padding: 4px 8px;
  margin: 0 0 6px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.done-meeting-title-input::placeholder { color: var(--subtle); font-style: italic; font-weight: 500; }

/* Linear 스타일 얇은 디바이더 섹션 — 박스·배경 없음, 1px top border + chevron */
details.section {
  background: transparent;
  border: 0;
  border-top: 1px solid var(--border);
  border-radius: 0;
  padding: 0;
  margin: 0;
}
details.section > summary {
  font-weight: 500;
  cursor: pointer;
  font-size: 13px;
  color: var(--muted);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 2px;
  transition: color 0.12s var(--ease);
}
details.section > summary:hover { color: var(--text); }
details.section[open] > summary { color: var(--text); }
details.section > summary::-webkit-details-marker { display: none; }
details.section > summary::before {
  content: "";
  width: 0;
  height: 0;
  border-left: 4px solid currentColor;
  border-top: 3px solid transparent;
  border-bottom: 3px solid transparent;
  opacity: 0.55;
  transition: transform 0.15s var(--ease);
}
details.section[open] > summary::before { transform: rotate(90deg); }
.section-title-text {
  color: var(--text);
  font-weight: 500;
}
details.section > summary > .materials-save-status {
  margin-left: auto;
}

.content {
  padding: 12px 0 4px;
  font-size: 13px;
  color: var(--text);
  line-height: 1.65;
}
.content ul { margin: 0; padding-left: 18px; }
.content ul li { margin-bottom: 4px; }
.transcript {
  max-height: 360px;
  overflow-y: auto;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11.5px;
  line-height: 1.7;
  background: var(--surface-2);
  padding: 12px;
  border-radius: var(--radius-sm);
  white-space: pre-wrap;
  border: 1px solid var(--border);
  color: var(--text);
}
/* meeting-feedback 스킬 리포트 — 마크다운 렌더 컨테이너 */
.feedback-report {
  position: relative;
  max-height: 720px;
  overflow-y: auto;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.7;
  background: var(--surface-2);
  padding: 18px 22px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  color: var(--text);
  margin: 0;
  word-break: break-word;
}
/* 피드백 재생성 중 — 기존 리포트 반투명 + 상단 sticky 진행 배지.
   기존 리포트를 그대로 두어 비교/참고 가능, 완료 시 renderMarkdown으로 교체. */
.feedback-report.is-regenerating {
  opacity: 0.45;
  pointer-events: none;
}
.feedback-report.is-regenerating::before {
  content: '피드백 재생성 중... (약 30~60초)';
  position: sticky;
  top: 0;
  display: block;
  margin: -18px -22px 18px;
  padding: 10px 18px;
  background: var(--accent);
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  text-align: center;
  letter-spacing: 0.01em;
  box-shadow: var(--shadow-sm);
  z-index: 5;
  opacity: 1;
  animation: regen-pulse 1.6s ease-in-out infinite;
}
@keyframes regen-pulse {
  0%, 100% { background: var(--accent); }
  50% { background: var(--accent-hover); }
}

/* ─── 피드백 버전 탭 — 재생성 시 누적되는 여러 버전 중 선택 ─── */
.feedback-versions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 10px;
  padding: 8px 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.feedback-versions[hidden] { display: none; }
.feedback-version-tab {
  appearance: none;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 999px;
  transition: background 0.12s var(--ease), color 0.12s var(--ease), border-color 0.12s var(--ease);
}
.feedback-version-tab:hover {
  border-color: var(--border-strong);
  color: var(--text);
}
.feedback-version-tab.is-selected {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 600;
}
.feedback-version-tab.is-latest:not(.is-selected) {
  border-color: rgba(234, 88, 12, 0.35);
  color: #7c2d12;
  background: rgba(234, 88, 12, 0.08);
}

/* ─── Markdown body styling ─── */
.markdown-body > :first-child { margin-top: 0; }
.markdown-body > :last-child { margin-bottom: 0; }
.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
  color: var(--text);
  font-weight: 600;
  line-height: 1.3;
  margin: 22px 0 10px;
  letter-spacing: -0.01em;
}
.markdown-body h1 { font-size: 22px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.markdown-body h2 { font-size: 17px; padding-bottom: 6px; border-bottom: 1px solid var(--border); margin-top: 26px; }
.markdown-body h3 { font-size: 15px; }
.markdown-body h4 { font-size: 14px; color: var(--muted); }
.markdown-body h5,
.markdown-body h6 { font-size: 13px; color: var(--muted); }
.markdown-body p { margin: 8px 0; }
.markdown-body strong { color: var(--text); font-weight: 600; }
.markdown-body em { font-style: italic; color: var(--text); }
.markdown-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.markdown-body a:hover { color: var(--accent-hover); }
.markdown-body ul,
.markdown-body ol { margin: 8px 0; padding-left: 22px; }
.markdown-body li { margin: 3px 0; }
.markdown-body li > ul,
.markdown-body li > ol { margin: 3px 0; }
.markdown-body li > p { margin: 3px 0; }
.markdown-body input[type="checkbox"] { margin-right: 6px; vertical-align: middle; }
.markdown-body code {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px;
  background: rgba(234, 88, 12, 0.1);
  padding: 1px 5px;
  border-radius: 3px;
  border: 1px solid rgba(234, 88, 12, 0.22);
  color: #7c2d12;
}
.markdown-body pre {
  background: var(--bg);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  overflow-x: auto;
  margin: 10px 0;
}
.markdown-body pre code {
  background: transparent;
  border: none;
  padding: 0;
  color: var(--text);
  font-size: 12.5px;
  line-height: 1.65;
}
.markdown-body blockquote {
  margin: 10px 0;
  padding: 8px 14px;
  border-left: 3px solid var(--accent);
  background: rgba(94, 106, 210, 0.06);
  color: var(--muted);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.markdown-body blockquote p { margin: 4px 0; }
.markdown-body hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 18px 0;
}
.markdown-body table {
  border-collapse: collapse;
  margin: 10px 0;
  display: block;
  overflow-x: auto;
  font-size: 13px;
}
.markdown-body table th,
.markdown-body table td {
  border: 1px solid var(--border);
  padding: 6px 10px;
  text-align: left;
  vertical-align: top;
}
.markdown-body table th {
  background: var(--bg);
  font-weight: 600;
  color: var(--text);
}
.markdown-body table tr:nth-child(2n) td { background: rgba(255, 255, 255, 0.02); }
.markdown-body del { color: var(--subtle); }
.markdown-body .md-bracket {
  color: #7c2d12;
  background: rgba(234, 88, 12, 0.12);
  border: 1px solid rgba(234, 88, 12, 0.22);
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.95em;
  white-space: nowrap;
}
#view-done .big-btn { margin-top: 14px; }

/* ─── Upload progress badge (view-uploaded) ─────────── */
.upload-progress {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid rgba(94, 106, 210, 0.28);
  color: var(--accent);
  font-size: 12.5px;
  font-weight: 500;
  margin: 8px 0 16px;
}
.upload-progress.ok {
  background: rgba(76, 183, 130, 0.08);
  border-color: rgba(76, 183, 130, 0.25);
  color: var(--green);
}
.upload-progress.fail {
  background: rgba(235, 87, 87, 0.08);
  border-color: rgba(235, 87, 87, 0.25);
  color: var(--red);
}
.upload-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px rgba(94, 106, 210, 0.2);
  animation: pulse-rec 1.4s ease-in-out infinite;
}
.upload-progress.ok .upload-dot { animation: none; box-shadow: 0 0 0 3px rgba(76, 183, 130, 0.18); }
.upload-progress.fail .upload-dot { animation: none; box-shadow: 0 0 0 3px rgba(235, 87, 87, 0.18); }

/* ─── Recent list (left sidebar) ──────────────────────── */
.recent-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin: 0 -6px;
}
.date-group-label {
  padding: 10px 8px 4px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--subtle);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.date-group-label:first-child { padding-top: 4px; }

.recent-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  column-gap: 8px;
  row-gap: 2px;
  padding: 9px 10px;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: background 0.1s var(--ease);
  position: relative;
}
.recent-item:hover { background: var(--surface-2); }
.recent-item.active {
  background: var(--accent-soft);
}
.recent-item.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--accent);
  border-radius: 1px;
}
.recent-item .title {
  grid-column: 1 / 2;
  grid-row: 1 / 2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  min-width: 0;
}
.recent-item .when {
  grid-column: 1 / 3;
  grid-row: 2 / 3;
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.recent-item .status-pill {
  grid-column: 2 / 3;
  grid-row: 1 / 2;
  align-self: center;
  justify-self: end;
  font-size: 9.5px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  border: 1px solid var(--border);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  white-space: nowrap;
  line-height: 1.6;
}
.recent-item .status-pill.done {
  background: rgba(22, 163, 74, 0.08);
  color: var(--green);
  border-color: rgba(22, 163, 74, 0.22);
}
.recent-item .status-pill.failed {
  background: rgba(220, 38, 38, 0.08);
  color: var(--red);
  border-color: rgba(220, 38, 38, 0.22);
}
.recent-item .status-pill.active {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: rgba(94, 106, 210, 0.28);
}

/* hover 시 노출되는 인라인 삭제 버튼 */
.recent-item .recent-delete-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  display: none;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--muted);
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  line-height: 1;
  padding: 0;
  transition: color 0.1s var(--ease), border-color 0.1s var(--ease), background 0.1s var(--ease);
}
.recent-item:hover .recent-delete-btn { display: inline-flex; }
.recent-item .recent-delete-btn:hover {
  color: var(--red);
  border-color: rgba(220, 38, 38, 0.4);
  background: rgba(220, 38, 38, 0.08);
}

.empty-state {
  padding: 24px 8px;
  text-align: center;
  color: var(--subtle);
  font-size: 12.5px;
  line-height: 1.6;
}

/* ─── Unfinished ──────────────────────────────────────── */
.unfinished-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
}
.unfinished-item:last-child { margin-bottom: 0; }
.unfinished-item .info { flex: 1; min-width: 0; }
.unfinished-item .title {
  font-weight: 500;
  font-size: 13px;
  margin-bottom: 2px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.unfinished-item .meta {
  color: var(--muted);
  font-size: 11px;
}
.unfinished-actions {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: none;
}
.unfinished-actions .secondary-btn { padding: 6px 10px; font-size: 11.5px; }

/* ─── Toast ───────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 13px;
  color: var(--text);
  box-shadow: var(--shadow-md);
  z-index: 100;
  max-width: 480px;
  animation: toastIn 0.2s var(--ease);
}
@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, 6px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}
.toast.error { border-color: #fca5a5; color: #b91c1c; }
.toast.ok    { border-color: #86efac; color: #15803d; }

/* ─── View transitions ────────────────────────────────── */
.view {
  animation: viewIn 0.22s var(--ease);
}
@keyframes viewIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── Scrollbar (webkit) ──────────────────────────────── */
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
*::-webkit-scrollbar-thumb:hover { background: #b4b6bd; background-clip: padding-box; border: 2px solid transparent; }

/* Focus-visible */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}
button:focus-visible { outline-offset: 2px; }
input:focus-visible { outline: none; }

/* ─── Responsive ──────────────────────────────────────── */
@media (max-width: 1080px) {
  .layout { grid-template-columns: 280px minmax(0, 1fr); }
}

@media (max-width: 760px) {
  .layout { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .col-left {
    position: static;
    max-height: none;
    overflow: visible;
    flex-direction: column;
    border: none;
    order: 2;
    border-top: 1px solid var(--border);
  }
  .col-main { order: 1; }
  .bc-title { max-width: 160px; }
  .health-drawer { right: 8px; left: 8px; width: auto; }
}

@media (max-width: 600px) {
  .main-card { padding: 22px 18px; }
  .big-timer { font-size: 52px; }
  .hero-actions { flex-direction: column; }
  .topbar-cta span:not(.kbd) { display: none; }
}

/* ─── Feedback copy buttons ───────────────────────────── */
.copy-btns {
  display: inline-flex;
  gap: 6px;
  margin-left: auto;
  flex-shrink: 0;
}
.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  font-size: 11px;
  font-family: inherit;
  font-weight: 500;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.12s var(--ease), color 0.12s var(--ease), border-color 0.12s var(--ease);
}
.copy-btn:hover {
  color: var(--text);
  background: var(--surface-2);
  border-color: var(--border-strong);
}
.copy-btn .icon { width: 12px; height: 12px; }
.copy-btn.is-copied {
  color: var(--green);
  border-color: var(--green);
}

/* ─── Speaker management view ─────────────────────────── */
.ghost-btn-labeled {
  width: auto;
  padding: 0 10px;
  gap: 6px;
  font-size: 12px;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}
.ghost-btn-labeled span { font-weight: 500; }

/* 녹음 중 상단 배지 — 녹음 뷰 외 모든 뷰에서 표시 */
.topbar-rec-btn {
  padding: 0 10px;
  height: 28px;
  font-size: 12.5px;
  font-weight: 600;
  background: rgba(220, 38, 38, 0.08);
  color: var(--red);
  border: 1px solid rgba(220, 38, 38, 0.35);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.005em;
  white-space: nowrap;
  transition: background 0.12s var(--ease), border-color 0.12s var(--ease);
}
.topbar-rec-btn:hover {
  background: rgba(220, 38, 38, 0.14);
  border-color: var(--red);
}
.topbar-rec-btn .rec-dot { width: 7px; height: 7px; }
.topbar-rec-btn[hidden] { display: none; }

#view-speakers .section {
  margin-top: 22px;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.section-title {
  margin: 0 0 14px 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}

/* 직원 목록 */
.employees-controls {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}
.employees-controls input {
  flex: 1;
  padding: 7px 11px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-family: inherit;
  font-size: 13px;
  color: var(--text);
}
.employees-controls input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.employees-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.employee-item {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.employee-name {
  font-weight: 500;
  color: var(--text);
}
.employee-meta {
  color: var(--muted);
  font-size: 12px;
}
.icon-btn {
  width: 26px;
  height: 26px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--muted);
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
.icon-btn.danger:hover { color: var(--red); border-color: var(--red); }

/* 세션 선택 + 화자 리스트 */
.session-picker {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 14px;
}
.session-picker select {
  flex: 1;
  padding: 7px 11px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-family: inherit;
  font-size: 13px;
  color: var(--text);
}
.speakers-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.speaker-row {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
}
.speaker-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.speaker-id {
  font-weight: 600;
  font-size: 13px;
  color: var(--text);
}
.speaker-duration {
  color: var(--muted);
  font-size: 11.5px;
}
.assigned-badge {
  margin-left: auto;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
}
.assigned-badge.manual { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.assigned-badge.auto { background: rgba(22,163,74,0.08); border-color: var(--green); color: var(--green); }
.speaker-preview {
  color: var(--muted);
  font-size: 12px;
  margin: 4px 0 10px 0;
  padding: 6px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  line-height: 1.5;
  max-height: 3em;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.speaker-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.speaker-controls audio {
  height: 32px;
  flex: 1;
  min-width: 220px;
}
.speaker-assign-select,
.speaker-merge-select {
  padding: 6px 10px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-family: inherit;
  font-size: 12.5px;
  color: var(--text);
  min-width: 140px;
}
.speaker-merge-select { color: var(--muted); min-width: 170px; }
.speaker-merge-select:hover { color: var(--text); }

/* ─── 회의록(준비+진행) 전체화면 뷰 ────────────────────── */
body.mr-active > .topbar,
body.mr-active > main { display: none !important; }
body.mr-active { overflow: hidden; }

.meeting-room {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
}
/* .meeting-room 의 display:flex 가 [hidden] 속성을 덮어쓰지 않도록 명시.
   초기 로드(idle) 뷰에서는 이 뷰가 보이면 안 된다. */
.meeting-room[hidden] { display: none !important; }

.mr-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 20px;
  min-height: 56px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.mr-top-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
.mr-top-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.mr-title-input {
  flex: 1;
  min-width: 220px;
  max-width: 600px;
  border: 1px solid transparent;
  background: transparent;
  padding: 6px 10px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  border-radius: var(--radius-sm);
  font-family: inherit;
}
.mr-title-input:hover {
  border-color: var(--border);
  background: var(--surface-2);
}
.mr-title-input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--surface);
}
.mr-save-status {
  font-size: 12px;
  color: var(--subtle);
  min-width: 70px;
  white-space: nowrap;
}
.mr-save-status.saving { color: var(--muted); }
.mr-save-status.error { color: var(--red); }

.mr-rec-group {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
/* [hidden] 이 display:inline-flex 에 먹히도록 명시 — 녹음 중/대기 그룹 상호 배타 보장. */
.mr-rec-group[hidden] { display: none !important; }
.mr-start-rec {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  background: var(--red);
  color: #fff;
  border: 0;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
}
.mr-start-rec:hover:not(:disabled) { background: #b91c1c; }
.mr-start-rec:disabled { opacity: 0.6; cursor: wait; }
.mr-stop-rec {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  background: #334155;
  color: #fff;
  border: 0;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
}
.mr-stop-rec:hover:not(:disabled) { background: #1f2937; }
.mr-stop-rec:disabled { opacity: 0.6; cursor: wait; }
.mr-rec-timer {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 15px;
  color: var(--red);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

.mr-body {
  flex: 1;
  display: flex;
  min-height: 0;
  overflow: hidden;
}
.mr-pane {
  display: flex;
  flex-direction: column;
  min-width: 240px;
  overflow: hidden;
}
.mr-prep-pane {
  flex: 0 0 auto;
  flex-basis: 45%;
  background: var(--surface);
}
.mr-notes-pane {
  flex: 1 1 auto;
  background: var(--bg);
  border-left: 1px solid var(--border);
}
.mr-pane-scroll {
  overflow-y: auto;
  padding: 22px 26px;
  height: 100%;
  box-sizing: border-box;
}
.mr-notes-scroll {
  display: flex;
  flex-direction: column;
  padding: 18px 22px;
  height: 100%;
  overflow: hidden;
}

.mr-field {
  margin-bottom: 18px;
}
.mr-field label {
  display: block;
  font-weight: 600;
  font-size: 12.5px;
  margin-bottom: 6px;
  color: var(--text);
  letter-spacing: -0.01em;
}
.mr-field-hint {
  font-weight: 400;
  font-size: 11.5px;
  color: var(--subtle);
}
.mr-field textarea,
.mr-field input[type="text"],
.mr-field .mr-select {
  width: 100%;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 9px 11px;
  font-size: 13px;
  font-family: inherit;
  color: var(--text);
  background: var(--surface);
  resize: vertical;
  line-height: 1.5;
}
.mr-field textarea:focus,
.mr-field input[type="text"]:focus,
.mr-field .mr-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.mr-field .mr-select {
  appearance: auto;
  cursor: pointer;
}
.mr-field-hint-row {
  margin-top: 6px;
  font-size: 11.5px;
  color: var(--subtle);
}
.mr-inline-link {
  color: var(--accent);
  text-decoration: none;
}
.mr-inline-link:hover { text-decoration: underline; }

.mr-checkbox-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 6px 10px;
  padding: 10px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  max-height: 180px;
  overflow-y: auto;
}
.mr-checkbox-list .mr-checkbox-empty {
  grid-column: 1 / -1;
  font-size: 12px;
  color: var(--subtle);
  padding: 6px 0;
}
.mr-checkbox-list label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 0;
  cursor: pointer;
  padding: 4px 2px;
  border-radius: 4px;
  user-select: none;
}
.mr-checkbox-list label:hover { background: var(--surface-2); }
.mr-checkbox-list input[type="checkbox"] {
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.mr-agendas {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 8px;
}
.mr-agenda-item {
  display: flex;
  gap: 6px;
  align-items: flex-start;
}
.mr-agenda-item .mr-agenda-num {
  flex: none;
  min-width: 20px;
  padding-top: 10px;
  font-weight: 600;
  font-size: 12.5px;
  color: var(--muted);
  text-align: right;
}
.mr-agenda-item textarea {
  flex: 1;
  min-height: 56px;
  resize: vertical;
}
.mr-agenda-item .material-remove {
  flex: none;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--border);
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  color: var(--muted);
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
  margin-top: 2px;
}
.mr-agenda-item .material-remove:hover {
  color: var(--red);
  border-color: var(--red);
  background: var(--surface);
}

.mr-notes-label {
  font-weight: 600;
  font-size: 12.5px;
  color: var(--text);
  margin-bottom: 8px;
  flex: none;
}
.mr-notes-ta {
  flex: 1;
  width: 100%;
  min-height: 0;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 14px;
  font-size: 13.5px;
  line-height: 1.55;
  font-family: inherit;
  color: var(--text);
  background: var(--surface);
  resize: none;
  box-sizing: border-box;
}
.mr-notes-ta:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.mr-splitter {
  position: relative;
  flex: none;
  width: 6px;
  cursor: col-resize;
  background: transparent;
  border-left: 1px solid var(--border);
  border-right: 1px solid transparent;
  transition: background 0.15s var(--ease);
}
.mr-splitter:hover,
.mr-splitter.dragging {
  background: var(--accent-soft);
}
.mr-splitter-toggle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 22px;
  height: 56px;
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: var(--surface);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  transition: color 0.15s, border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.mr-splitter-toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}
.mr-splitter-toggle .icon {
  width: 13px;
  height: 13px;
  transform: rotate(180deg);
}
.mr-body.prep-collapsed .mr-prep-pane { display: none; }
.mr-body.prep-collapsed .mr-splitter {
  cursor: pointer;
  border-left: none;
}
.mr-body.prep-collapsed .mr-splitter:hover { background: transparent; }
.mr-body.prep-collapsed .mr-splitter-toggle .icon { transform: none; }

/* preparing 상태용 pill */
.status-pill.preparing {
  background: #f1f5f9;
  color: #475569;
  border-color: #cbd5e1;
}

.done-open-room-wrap {
  margin: 10px 0 14px;
}
.done-open-room-wrap .secondary-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ═══════════════════ 모바일 반응형 보강 (CHE-1574) ═══════════════════ */
@media (max-width: 760px) {
  /* iOS 자동 줌 방지 — 입력 폰트 16px 미만이면 포커스 시 확대됨 */
  .field input, .field textarea, #title, #mr-title, #recent-search,
  input[type="text"], input[type="search"], input[type="email"], textarea { font-size: 16px; }

  /* 회의실(meeting-room) 좌우 분할 → 상하 스택 (폰에서 드래그 분할 무의미) */
  .mr-body { flex-direction: column; overflow: visible; }
  .mr-splitter { display: none; }
  .mr-pane { min-width: 0; width: 100%; }
  .mr-prep-pane { flex: 0 0 auto; flex-basis: auto; max-height: 48vh; }
  .mr-notes-pane { flex: 1 1 auto; border-left: none; border-top: 1px solid var(--border); min-height: 260px; }
  .mr-pane-scroll { padding: 16px; }

  /* 가로 오버플로 방지 */
  html, body { overflow-x: hidden; }
  .recent-item { padding: 13px 12px; min-height: 48px; }
  .secondary-btn { min-height: 44px; }
  /* 회의실(서버 FFmpeg) 전용 UI는 폰에서 숨김 — 폰은 브라우저 녹음 사용 */
  .sub-row { display: none; }
  #view-idle .hint { display: none; }
}

@media (max-width: 600px) {
  /* 터치 타깃 ≥ 40px — 라벨 버튼(ghost-btn-labeled)은 제외해 정사각 찌그러짐 방지 */
  .ghost-btn:not(.ghost-btn-labeled) { width: 40px; height: 40px; }
  /* 화자 관리 버튼: 폰에선 아이콘만 (라벨 숨김) */
  #speakers-nav-btn { width: 40px; height: 40px; padding: 0; gap: 0; }
  #speakers-nav-btn > span { display: none; }
  .topbar-cta { height: 40px; padding: 0 14px; }
  .topbar { padding: 0 12px; }
  .main-card { padding: 18px 14px; }
  .big-timer { font-size: 46px; }
  /* 노치/홈인디케이터 안전영역 */
  .col-main { padding-bottom: max(12px, env(safe-area-inset-bottom)); }
}
