/* =========================================================================
   PROK AI 오디오 회의록 — Apple Human Interface Guidelines (HIG) Design System
   macOS Sequoia / iOS 18 Voice Memos & Notes Inspired Studio
   ========================================================================= */

:root {
  /* Apple System Surfaces (Light Mode - PC Studio Default) */
  --bg-app: #f5f5f7;
  --bg-card: #ffffff;
  --bg-subtle: #fbfbfd;
  --bg-grouped: #f2f2f7;
  --bg-glass: rgba(255, 255, 255, 0.78);
  --bg-header: rgba(18, 20, 26, 0.88);
  --bg-dark: #111318;
  --bg-dark-elevated: #1c1f26;
  --bg-dark-tertiary: #282c37;

  /* Apple System Accents */
  --primary: #0066cc;
  --primary-hover: #0055b3;
  --primary-soft: rgba(0, 102, 204, 0.1);
  --primary-border: rgba(0, 102, 204, 0.24);
  --accent: #0a84ff;
  --danger: #ff3b30;
  --danger-hover: #e03025;
  --danger-soft: rgba(255, 59, 48, 0.1);
  --success: #28a745;
  --success-soft: rgba(40, 167, 69, 0.12);
  --warning: #ff9500;
  --warning-soft: rgba(255, 149, 0, 0.14);

  /* Apple Typography Hierarchy */
  --text-main: #1d1d1f;
  --text-sub: #424245;
  --text-muted: #86868b;
  --text-on-dark: #f5f5f7;
  --text-on-dark-muted: #98989d;

  /* Hairline Borders & Separators */
  --border: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.15);
  --border-dark: rgba(255, 255, 255, 0.1);

  /* Radii & Elevation */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.18);
  --ease-apple: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Pretendard', 'Apple SD Gothic Neo', sans-serif;
  background: var(--bg-app);
  color: var(--text-main);
  line-height: 1.5;
  letter-spacing: -0.012em;
  min-height: 100dvh;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  overflow-x: hidden;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: 0.925rem;
  letter-spacing: inherit;
}

/* Inline SVG Icon Utilities */
.ico {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  flex-shrink: 0;
}
.ico-sm { width: 14px; height: 14px; }
.ico-lg { width: 20px; height: 20px; }

/* =========================================================================
   Top Global Translucent Navigation Bar (macOS Toolbar Style)
   ========================================================================= */
.app-header {
  background: var(--bg-header);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  color: var(--text-on-dark);
  height: 58px;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  position: sticky;
  top: 0;
  z-index: 200;
  border-bottom: 1px solid var(--border-dark);
}

.brand-area {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
}

.sidebar-drawer-toggle {
  display: none;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-dark);
  color: var(--text-on-dark);
  width: 34px;
  height: 34px;
  border-radius: var(--radius-xs);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.brand-logo {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(145deg, #ff3b30, #d70015);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 2px 8px rgba(255, 59, 48, 0.35);
  flex-shrink: 0;
}

.brand-title {
  font-size: 0.96rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
  white-space: nowrap;
}

.brand-subtitle {
  font-size: 0.72rem;
  color: var(--text-on-dark-muted);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Segmented Mode Switch Pill */
.mode-switch-pill {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-pill);
  padding: 2px;
}

.mode-switch-pill button {
  background: transparent;
  border: none;
  color: var(--text-on-dark-muted);
  padding: 4px 11px;
  border-radius: var(--radius-pill);
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.18s var(--ease-apple);
}

.mode-switch-pill button.active {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

/* Badges & Pills */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  font-size: 0.73rem;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
}

.badge-dg {
  background: rgba(52, 199, 89, 0.16);
  color: #30d158;
  border: 1px solid rgba(52, 199, 89, 0.3);
}

.badge-archive {
  background: var(--primary-soft);
  color: var(--primary);
  border: 1px solid var(--primary-border);
}

.badge-danger {
  background: var(--danger-soft);
  color: var(--danger);
  border: 1px solid rgba(255, 59, 48, 0.25);
}

.badge-neutral {
  background: var(--bg-grouped);
  color: var(--text-sub);
  border: 1px solid var(--border);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0.48rem 0.9rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.84rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.16s var(--ease-apple);
  white-space: nowrap;
  user-select: none;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 1px 2px rgba(0, 102, 204, 0.2);
}
.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-outline {
  background: var(--bg-card);
  color: var(--text-main);
  border-color: var(--border-strong);
}
.btn-outline:hover {
  background: var(--bg-grouped);
}

.btn-ghost {
  background: transparent;
  color: var(--text-sub);
}
.btn-ghost:hover {
  background: var(--bg-grouped);
  color: var(--text-main);
}

.btn-dark {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-on-dark);
  border-color: var(--border-dark);
  font-size: 0.78rem;
}
.btn-dark:hover {
  background: rgba(255, 255, 255, 0.16);
}

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

.btn-danger-soft {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: rgba(255, 59, 48, 0.22);
}
.btn-danger-soft:hover {
  background: rgba(255, 59, 48, 0.16);
}

.btn-sm {
  padding: 0.34rem 0.68rem;
  font-size: 0.77rem;
  border-radius: var(--radius-xs);
}

/* =========================================================================
   PC 3-Column Workstation Layout (Independent Scroll Viewports)
   ========================================================================= */
.pc-studio-grid {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr) 380px;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  max-width: 1840px;
  margin: 0 auto;
  height: calc(100dvh - 58px);
}

.panel-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.panel-header {
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  background: var(--bg-subtle);
  flex-shrink: 0;
}

.panel-title {
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 7px;
  letter-spacing: -0.015em;
}

.panel-body {
  padding: 1rem 1.1rem;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

/* Custom Subtle Scrollbars */
.panel-body::-webkit-scrollbar,
.m-live-feed-box::-webkit-scrollbar {
  width: 6px;
}
.panel-body::-webkit-scrollbar-thumb,
.m-live-feed-box::-webkit-scrollbar-thumb {
  background: rgba(134, 134, 139, 0.28);
  border-radius: 99px;
}

/* Left Column: Archive List & Search */
.search-input-wrap {
  position: relative;
  margin-bottom: 0.7rem;
}
.search-input-wrap .ico {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}
.search-input-wrap .form-control {
  padding-left: 32px;
  background: var(--bg-grouped);
  border-color: transparent;
  font-size: 0.83rem;
}
.search-input-wrap .form-control:focus {
  background: var(--bg-card);
  border-color: var(--primary);
}

.meeting-list-item {
  padding: 0.75rem 0.85rem;
  border: 1px solid transparent;
  border-bottom-color: var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 0.35rem;
  cursor: pointer;
  transition: all 0.15s var(--ease-apple);
  background: transparent;
}
.meeting-list-item:hover {
  background: var(--bg-grouped);
}
.meeting-list-item.active {
  background: var(--primary-soft);
  border-color: var(--primary-border);
}

.meeting-item-title {
  font-weight: 600;
  font-size: 0.87rem;
  color: var(--text-main);
  margin-bottom: 3px;
  line-height: 1.35;
}
.meeting-list-item.active .meeting-item-title {
  color: var(--primary);
  font-weight: 700;
}

.meeting-item-meta {
  font-size: 0.74rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Center Column: Studio Header, Archive Popover & Export Menu */
.studio-meta-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 3px;
  font-size: 0.76rem;
  color: var(--text-muted);
}

.archive-pill-trigger {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: var(--success-soft);
  color: var(--success);
  font-size: 0.71rem;
  font-weight: 600;
  border: 1px solid rgba(40, 167, 69, 0.22);
  cursor: pointer;
  transition: background 0.15s;
}
.archive-pill-trigger:hover {
  background: rgba(40, 167, 69, 0.18);
}

/* Progressive Disclosure Archive Popover Card */
.archive-popover-card {
  display: none;
  background: var(--bg-subtle);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.95rem;
  margin-bottom: 0.85rem;
  font-size: 0.78rem;
  color: var(--text-sub);
  box-shadow: var(--shadow-sm);
}
.archive-popover-card.open {
  display: block;
}

/* Export Dropdown Menu */
.export-dropdown-wrap {
  position: relative;
  display: inline-flex;
  gap: 0.35rem;
}

.export-popover-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 210px;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  padding: 0.35rem;
  z-index: 150;
  display: none;
}
.export-popover-menu.open {
  display: block;
}

.export-menu-item {
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  padding: 0.5rem 0.65rem;
  border-radius: var(--radius-xs);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.export-menu-item:hover {
  background: var(--primary-soft);
  color: var(--primary);
}
.export-menu-item small {
  color: var(--text-muted);
  font-size: 0.7rem;
}

/* =========================================================================
   Unified Apple Compression Level Controller (Level 1 ~ 10)
   ========================================================================= */
.compression-box {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.9rem 1.1rem;
  margin-bottom: 1rem;
}

.compression-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.7rem;
}

.preset-segmented {
  display: inline-flex;
  background: var(--bg-grouped);
  padding: 2px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border);
}
.preset-segmented button {
  border: none;
  background: transparent;
  padding: 3px 9px;
  border-radius: 5px;
  font-size: 0.73rem;
  font-weight: 600;
  color: var(--text-sub);
  cursor: pointer;
  transition: all 0.14s;
}
.preset-segmented button.active {
  background: var(--bg-card);
  color: var(--primary);
  box-shadow: var(--shadow-xs);
}

.slider-track-wrap {
  padding: 0 4px;
}

.apple-range-slider {
  width: 100%;
  accent-color: var(--primary);
  cursor: pointer;
  height: 6px;
}

.slider-ticks {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  padding: 0 2px;
}

.slider-tick-btn {
  background: none;
  border: none;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px 5px;
  border-radius: 4px;
  transition: all 0.12s;
}
.slider-tick-btn:hover {
  color: var(--primary);
  background: var(--primary-soft);
}
.slider-tick-btn.active {
  color: #fff;
  background: var(--primary);
  font-weight: 700;
}

.compression-desc-banner {
  margin-top: 0.6rem;
  font-size: 0.79rem;
  color: var(--text-sub);
  background: var(--bg-card);
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

/* =========================================================================
   Agenda Cards (Auto-Save & Recording Target Focus)
   ========================================================================= */
.quick-agenda-bar {
  display: flex;
  gap: 0.45rem;
  margin-bottom: 0.9rem;
  flex-wrap: wrap;
}

.agenda-card {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  margin-bottom: 0.9rem;
  transition: border-color 0.2s var(--ease-apple), box-shadow 0.2s var(--ease-apple);
  overflow: hidden;
}
.agenda-card.active-recording-target {
  border-color: rgba(255, 59, 48, 0.55);
  box-shadow: 0 0 0 3px rgba(255, 59, 48, 0.1);
}

.agenda-card-header {
  padding: 0.7rem 0.95rem;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.agenda-card-title {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text-main);
}

.agenda-card-body {
  padding: 0.85rem 0.95rem;
}

.agenda-meta-bar {
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-bottom: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.autosave-indicator {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: color 0.2s;
}
.autosave-indicator.saved {
  color: var(--success);
}
.autosave-indicator.saving {
  color: var(--primary);
}

.agenda-summary-textarea {
  width: 100%;
  min-height: 96px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.8rem;
  font-size: 0.89rem;
  line-height: 1.65;
  color: var(--text-main);
  background: var(--bg-subtle);
  resize: vertical;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.agenda-summary-textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--bg-card);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.decision-row {
  margin-top: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--primary-soft);
  border: 1px solid var(--primary-border);
  border-radius: var(--radius-xs);
  padding: 0.35rem 0.65rem;
}
.decision-label {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.decision-row input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  padding: 0.2rem 0;
}
.decision-row input:focus {
  outline: none;
}

/* =========================================================================
   Right Column: Apple Voice Memos Studio Pod & Live Waveform
   ========================================================================= */
.recorder-box {
  background: linear-gradient(160deg, #16181f 0%, #1d202a 100%);
  color: var(--text-on-dark);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-bottom: 0.9rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.rec-top-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.65rem;
  font-size: 0.76rem;
}

.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #30d158;
  margin-right: 5px;
}
.status-dot.recording {
  background: #ff3b30;
  box-shadow: 0 0 8px #ff3b30;
  animation: blink-dot 1.2s infinite;
}

@keyframes blink-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.rec-controls-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 0.45rem;
  margin-bottom: 0.65rem;
}

.dark-control {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-xs);
  padding: 0.42rem 0.6rem;
  font-size: 0.79rem;
  width: 100%;
}
.dark-control:focus {
  outline: none;
  border-color: var(--accent);
}
.dark-control option {
  background: #1c1f26;
  color: #fff;
}

/* Apple Voice Memos Center Console */
.voice-memo-console {
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-sm);
  padding: 0.8rem;
  text-align: center;
}

.rec-timer-readout {
  font-size: 1.55rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  color: #fff;
  line-height: 1.15;
}

/* Multi-Bar Live Frequency Waveform */
.waveform-bars {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 28px;
  margin: 0.55rem 0;
}
.waveform-bar {
  width: 3px;
  height: 4px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.22);
  transition: height 0.07s linear, background 0.12s;
}
.waveform-bars.active .waveform-bar {
  background: #ff453a;
}

/* Apple Morphing Record Button (PC Bar + Mobile Circle) */
.record-main-btn {
  width: 100%;
  padding: 0.72rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(255, 59, 48, 0.16);
  color: #fff;
  transition: all 0.2s var(--ease-apple);
}
.record-main-btn:hover {
  background: rgba(255, 59, 48, 0.26);
}
.record-main-btn.recording {
  background: rgba(255, 59, 48, 0.28);
  border-color: rgba(255, 69, 58, 0.6);
}

.apple-rec-glyph {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.9);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.apple-rec-glyph-inner {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ff3b30;
  transition: all 0.24s var(--ease-apple);
}
.recording .apple-rec-glyph-inner {
  width: 10px;
  height: 10px;
  border-radius: 2.5px;
}

.meter-bar-bg {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 99px;
  overflow: hidden;
  margin-top: 0.55rem;
}
.meter-bar-fill {
  height: 100%;
  width: 0%;
  background: #ff453a;
  transition: width 0.08s linear;
}

.live-interim-caption {
  margin-top: 0.6rem;
  padding: 0.48rem 0.65rem;
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-xs);
  font-size: 0.78rem;
  color: var(--text-on-dark-muted);
  min-height: 34px;
  display: flex;
  align-items: center;
}

/* Utterance Timeline Items (With Clear Edit Affordance) */
.utterance-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.75rem;
  margin-bottom: 0.5rem;
  background: var(--bg-card);
  font-size: 0.85rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.utterance-item:hover {
  border-color: var(--border-strong);
}

.utterance-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  font-size: 0.73rem;
  color: var(--text-muted);
}

.utterance-editable {
  color: var(--text-main);
  line-height: 1.55;
  padding: 3px 5px;
  margin: 0 -5px;
  border-radius: 5px;
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s;
}
.utterance-editable:hover {
  background: var(--bg-grouped);
}
.utterance-editable:focus {
  outline: none;
  background: var(--bg-card);
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-soft);
}

/* Empty States */
.empty-state-box {
  text-align: center;
  padding: 2.2rem 1.2rem;
  color: var(--text-muted);
  background: var(--bg-subtle);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
}
.empty-state-box .empty-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-sub);
  margin: 0.45rem 0 0.25rem;
}
.empty-state-box .empty-desc {
  font-size: 0.78rem;
  line-height: 1.45;
}

/* =========================================================================
   DEDICATED NATIVE MOBILE RECORDER APP UI (iOS 18 Voice Memos Dark Theme)
   ========================================================================= */
.mobile-recorder-app {
  display: none;
}

body.view-mobile {
  background: #000000;
  color: #f5f5f7;
}

body.view-mobile .app-header,
body.view-mobile .pc-studio-grid {
  display: none !important;
}

body.view-mobile .mobile-recorder-app {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  max-width: 520px;
  margin: 0 auto;
  background: #000000;
  padding-bottom: 84px;
}

/* Mobile Top Translucent Bar */
.m-top-bar {
  padding: 0.75rem 1rem;
  background: rgba(28, 28, 30, 0.82);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 90;
}

.m-user-info {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
}

.m-user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0a84ff, #0066cc);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
}

.m-user-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: #f5f5f7;
  line-height: 1.2;
}

.m-user-dept {
  font-size: 0.72rem;
  color: #0a84ff;
  font-weight: 600;
}

.m-top-right {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.m-icon-btn {
  background: #2c2c2e;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ebebf5;
  padding: 6px 10px;
  border-radius: var(--radius-xs);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Mobile Elevated Cards (#1c1c1e Apple Dark Secondary Grouping) */
.m-section-card {
  margin: 0.75rem 0.9rem 0;
  background: #1c1c1e;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 0.85rem 0.95rem;
}

.m-section-label {
  font-size: 0.74rem;
  font-weight: 600;
  color: #98989d;
  margin-bottom: 0.45rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.m-meeting-selector-row {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
}

.m-meeting-select {
  flex: 1;
  background: #2c2c2e;
  color: #f5f5f7;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 0.6rem 0.75rem;
  font-size: 1rem; /* >=16px prevents iOS auto-zoom */
  font-weight: 600;
  min-width: 0;
}

.m-new-mtg-btn {
  background: #0a84ff;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 0 0.9rem;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Mobile Voice Memos Pod */
.m-recorder-pod {
  margin: 0.75rem 0.9rem 0;
  background: radial-gradient(circle at 50% 0%, #2c2c2e 0%, #1c1c1e 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  padding: 1.1rem 1rem;
  text-align: center;
}

.m-rec-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.74rem;
  font-weight: 600;
  color: #30d158;
}
.m-rec-status-pill.is-rec {
  background: rgba(255, 69, 58, 0.18);
  color: #ff453a;
}

.m-rec-timer-big {
  font-size: 2.5rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  color: #ffffff;
  line-height: 1.1;
  margin: 0.45rem 0 0.25rem;
}

/* Authentic Apple Voice Memos Shutter / Record Button */
.m-rec-circle-wrap {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin: 0.55rem 0;
  gap: 6px;
}

.m-rec-circle-btn {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  border: 4px solid #ffffff;
  background: transparent;
  padding: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s var(--ease-apple);
}
.m-rec-circle-btn:active {
  transform: scale(0.94);
}

.m-rec-core {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #ff3b30;
  transition: all 0.26s var(--ease-apple);
  box-shadow: 0 4px 16px rgba(255, 59, 48, 0.45);
}
.m-rec-circle-btn.recording .m-rec-core {
  width: 52%;
  height: 52%;
  border-radius: 8px;
}

.m-rec-caption-label {
  font-size: 0.76rem;
  font-weight: 600;
  color: #98989d;
}

.m-live-interim-banner {
  margin-top: 0.65rem;
  padding: 0.55rem 0.75rem;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  font-size: 0.82rem;
  color: #ebebf5;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Mobile Live Transcript Card */
.m-transcript-card {
  margin: 0.75rem 0.9rem 0;
  background: #1c1c1e;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 0.9rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.m-copy-action-bar {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 0.5rem;
  margin-bottom: 0.7rem;
}

.m-btn-copy-all {
  background: #30d158;
  color: #000;
  border: none;
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  font-weight: 700;
  font-size: 0.84rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.m-btn-share-all {
  background: #2c2c2e;
  color: #f5f5f7;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  font-weight: 600;
  font-size: 0.84rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.m-live-feed-box {
  background: #111113;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 0.7rem;
  max-height: 320px;
  overflow-y: auto;
}

.m-utt-bubble {
  padding: 0.55rem 0.4rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 0.88rem;
  line-height: 1.5;
  color: #f5f5f7;
}
.m-utt-bubble:last-child {
  border-bottom: none;
}

/* Mobile History Cards */
.m-history-card {
  background: #1c1c1e;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  padding: 0.9rem;
  margin-bottom: 0.7rem;
  cursor: pointer;
  transition: background 0.15s;
}
.m-history-card:active {
  background: #2c2c2e;
}

/* Mobile Bottom Tab Bar */
.m-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-width: 520px;
  margin: 0 auto;
  background: rgba(28, 28, 30, 0.88);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 0.4rem 0.75rem calc(0.4rem + env(safe-area-inset-bottom, 0px));
  z-index: 120;
}

.m-nav-tab {
  background: transparent;
  border: none;
  color: #8e8e93;
  padding: 0.4rem;
  border-radius: 10px;
  font-size: 0.76rem;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  cursor: pointer;
}
.m-nav-tab.active {
  color: #0a84ff;
}

.agenda-chips-scroll {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
}
.agenda-chip {
  padding: 0.36rem 0.75rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #2c2c2e;
  color: #ebebf5;
  font-size: 0.76rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}
.agenda-chip.active {
  background: #ff3b30;
  color: #fff;
  border-color: #ff3b30;
}

/* =========================================================================
   Dynamic Island / Floating Toast Notification (Non-blocking Feedback)
   ========================================================================= */
.toast-msg {
  position: fixed;
  top: 68px;
  left: 50%;
  transform: translateX(-50%) translateY(-16px);
  background: rgba(28, 28, 30, 0.94);
  backdrop-filter: saturate(180%) blur(16px);
  color: #fff;
  padding: 0.6rem 1.15rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 0.84rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  z-index: 1100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s var(--ease-apple), transform 0.22s var(--ease-apple);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 92vw;
}
.toast-msg.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast-msg.toast-error {
  border-color: rgba(255, 69, 58, 0.5);
  color: #ff6961;
}
.toast-msg.toast-success {
  border-color: rgba(48, 209, 88, 0.45);
}

/* Auto-Update Overlay */
.auto-update-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.auto-update-card {
  background: #1c1c1e;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  padding: 1.5rem 1.4rem;
  max-width: 380px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.auto-update-bar-bg {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 99px;
  overflow: hidden;
}

.auto-update-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #0a84ff, #30d158);
  transition: width 0.25s var(--ease-apple);
}

/* =========================================================================
   Modals & Sheets (Automatic Dark Surface Adaptation in Mobile Mode)
   ========================================================================= */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 900;
  padding: 1rem;
}
.modal-backdrop.open {
  display: flex;
}

.modal-card {
  background: var(--bg-card);
  color: var(--text-main);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  width: 100%;
  max-width: 660px;
  max-height: 90dvh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.modal-header {
  padding: 0.95rem 1.25rem;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border);
  color: var(--text-main);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-body {
  padding: 1.25rem;
  overflow-y: auto;
}

.form-group {
  margin-bottom: 0.9rem;
}
.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--text-sub);
}

.form-control {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xs);
  background: var(--bg-card);
  color: var(--text-main);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

/* Dark Mode Synchronization for Modals when in Mobile View */
body.view-mobile .modal-card {
  background: #1c1c1e;
  color: #f5f5f7;
  border-color: rgba(255, 255, 255, 0.12);
}
body.view-mobile .modal-header {
  background: #2c2c2e;
  color: #f5f5f7;
  border-bottom-color: rgba(255, 255, 255, 0.1);
}
body.view-mobile .form-group label {
  color: #ebebf5;
}
body.view-mobile .form-control {
  background: #2c2c2e;
  color: #f5f5f7;
  border-color: rgba(255, 255, 255, 0.16);
  font-size: 1rem;
}
body.view-mobile .btn-outline {
  background: #2c2c2e;
  color: #f5f5f7;
  border-color: rgba(255, 255, 255, 0.16);
}

/* =========================================================================
   Responsive Breakpoints (Collapsible Left Archive Drawer <= 1220px)
   ========================================================================= */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 180;
}
.sidebar-backdrop.open {
  display: block;
}

@media (max-width: 1220px) {
  .sidebar-drawer-toggle {
    display: inline-flex;
  }
  .pc-studio-grid {
    grid-template-columns: minmax(0, 1fr) 360px;
  }
  #pcLeftArchivePanel {
    position: fixed;
    top: 58px;
    left: 0;
    bottom: 0;
    width: 310px;
    z-index: 190;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    transform: translateX(-104%);
    transition: transform 0.24s var(--ease-apple);
    box-shadow: var(--shadow-lg);
  }
  #pcLeftArchivePanel.drawer-open {
    transform: translateX(0);
  }
}

@media (max-width: 860px) {
  .pc-studio-grid {
    grid-template-columns: 1fr;
    height: auto;
  }
  .panel-card {
    height: auto;
    max-height: none;
  }
}

/* =========================================================================
   Auto-Update Installation Overlay & Version Badges
   ========================================================================= */
.auto-update-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 2500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.auto-update-card {
  width: 100%;
  max-width: 400px;
  background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
  border: 1px solid #3b82f6;
  border-radius: 20px;
  padding: 1.6rem 1.4rem;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.65);
}

.auto-update-bar-bg {
  width: 100%;
  height: 10px;
  background: #0b1120;
  border: 1px solid #334155;
  border-radius: 999px;
  overflow: hidden;
}

.auto-update-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #10b981);
  border-radius: 999px;
  transition: width 0.25s ease;
}

/* =========================================================================
   WebApp Stability & Zero Horizontal Shake (좌우 흔들림 완전 차단 & 미니멀 UI)
   ========================================================================= */
html,
body {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden !important;
  overscroll-behavior-x: none;
  position: relative;
  -webkit-text-size-adjust: 100%;
  touch-action: pan-y manipulation;
}

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

body.view-mobile .mobile-recorder-app {
  width: 100%;
  max-width: 520px;
  min-height: 100dvh;
  margin: 0 auto;
  overflow-x: hidden !important;
  padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
}

/* 1. 상단바: 타이틀 + 우측 설정(아이콘) 하나만 배치 */
.m-top-bar {
  padding: calc(0.65rem + env(safe-area-inset-top, 0px)) 0.95rem 0.65rem;
  background: rgba(18, 18, 20, 0.94);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.m-header-brand {
  min-width: 0;
  flex: 1;
}

.m-brand-logo-img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: #ffffff;
  padding: 2px;
  object-fit: contain;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.m-header-title {
  font-size: 1.02rem;
  font-weight: 800;
  color: #f5f5f7;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.m-header-sub {
  font-size: 0.72rem;
  color: #98989d;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

.m-settings-gear-btn {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #2c2c2e;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #f5f5f7;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.12s ease, background 0.15s ease;
}
.m-settings-gear-btn:active {
  transform: scale(0.93);
  background: #3a3a3c;
}

/* 2. 탭 페이지 공통 레이아웃 */
.m-tab-page {
  width: 100%;
  max-width: 100%;
  padding: 0.7rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  flex: 1;
  min-width: 0;
}

/* 3. 탭 1: 컴팩트 녹음 컨트롤 카드 */
.m-compact-control-card {
  background: #1c1c1e;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 0.75rem 0.85rem;
  width: 100%;
  min-width: 0;
}

.m-compact-rec-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.65rem;
}

.m-compact-rec-info {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.m-rec-timer-compact {
  font-size: 1.45rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.m-rec-main-pill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.15rem;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #ff453a, #d70015);
  color: #ffffff;
  font-size: 0.92rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(255, 69, 58, 0.35);
  white-space: nowrap;
  flex-shrink: 0;
  transition: transform 0.12s ease;
}
.m-rec-main-pill-btn:active {
  transform: scale(0.96);
}
.m-rec-main-pill-btn.recording {
  background: linear-gradient(135deg, #ff9f0a, #d97706);
  box-shadow: 0 6px 20px rgba(255, 159, 10, 0.45);
}

.m-rec-dot-icon {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #ffffff;
  display: inline-block;
}
.m-rec-main-pill-btn.recording .m-rec-dot-icon {
  border-radius: 2px;
}

/* 4. 탭 1: 현재 전사되는 글자들 (화면 메인 영역) */
.m-transcript-card {
  margin: 0 !important;
  background: #1c1c1e;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 0.85rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.m-transcript-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
}

.m-mini-action-btn {
  background: #2c2c2e;
  color: #f5f5f7;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: 0.38rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.m-mini-action-btn.primary {
  background: #30d158;
  color: #000000;
  border-color: #30d158;
}

.m-live-interim-banner {
  margin: 0 0 0.55rem !important;
  padding: 0.55rem 0.75rem;
  background: rgba(10, 132, 255, 0.12);
  border: 1px solid rgba(10, 132, 255, 0.3);
  border-radius: 10px;
  font-size: 0.88rem;
  color: #64d2ff;
  font-weight: 600;
  min-height: 38px;
  line-height: 1.45;
  word-break: break-word;
}

.m-live-feed-box {
  background: #111113;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 0.75rem;
  flex: 1;
  min-height: 50dvh;
  max-height: calc(100dvh - 305px);
  overflow-y: auto;
  overflow-x: hidden;
  word-break: break-word;
}

/* 5. 탭 2: 지난회의록 전사 자료 (타이틀 클릭 시 내용 아코디언 펼침) */
.m-history-top-bar {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
  margin-bottom: 0.35rem;
}

.m-history-accordion-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  width: 100%;
  min-width: 0;
}

.m-history-item {
  background: #1c1c1e;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color 0.15s ease;
}
.m-history-item.expanded {
  border-color: #0a84ff;
}

.m-history-title-row {
  width: 100%;
  background: transparent;
  border: none;
  color: #f5f5f7;
  padding: 0.9rem 0.95rem;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  cursor: pointer;
}

.m-history-title-main {
  min-width: 0;
  flex: 1;
}

.m-history-title-text {
  font-size: 0.96rem;
  font-weight: 800;
  color: #f5f5f7;
  line-height: 1.35;
  word-break: break-word;
}

.m-history-title-meta {
  font-size: 0.75rem;
  color: #98989d;
  margin-top: 3px;
}

.m-history-chevron {
  font-size: 0.82rem;
  color: #0a84ff;
  font-weight: 800;
  flex-shrink: 0;
  padding: 4px 8px;
  background: rgba(10, 132, 255, 0.14);
  border-radius: 999px;
}

.m-history-body-panel {
  display: none;
  padding: 0 0.9rem 0.9rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: #141416;
}
.m-history-item.expanded .m-history-body-panel {
  display: block;
}

.m-history-transcript-box {
  margin-top: 0.7rem;
  background: #0b0b0c;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 0.75rem;
  font-size: 0.9rem;
  line-height: 1.6;
  color: #f5f5f7;
  max-height: 340px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.m-history-actions-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.45rem;
  margin-top: 0.65rem;
}

/* 6. 하단 탭바: 넉넉한 높이와 명확한 가독성 */
.m-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  background: rgba(20, 20, 22, 0.97);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
  padding: 0.5rem 0.65rem calc(0.5rem + env(safe-area-inset-bottom, 0px));
  z-index: 150;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.m-nav-tab {
  min-height: 54px;
  border-radius: 12px;
  font-size: 0.86rem;
  font-weight: 800;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
}
.m-nav-tab.active {
  color: #ffffff !important;
  background: #0a84ff !important;
  box-shadow: 0 4px 14px rgba(10, 132, 255, 0.35);
}
