/* Screen Recorder — videocomeon
   WeRec-inspired theme: light top, dark record panel, pink accents */

:root {
  --pink: #ff4d67;
  --pink-deep: #e0294a;
  --rose: #d98a97;
  --rose-soft: #f2c9d0;
  --bg-light: #f5f4f6;
  --bg-dark: #161616;
  --panel-dark: #1d1d1f;
  --text-dark: #111;
  --text-light: #fff;
  --radius: 16px;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body { height: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  background: var(--bg-light);
  color: var(--text-dark);
  overflow: hidden;
}

svg { width: 24px; height: 24px; fill: currentColor; display: block; }

.hidden { display: none !important; }

/* ---------- views ---------- */
.view {
  display: none;
  position: fixed;
  inset: 0;
  flex-direction: column;
  max-width: 520px;
  margin: 0 auto;
  background: var(--bg-light);
}
.view.active { display: flex; }
.view.dark { background: var(--bg-dark); color: var(--text-light); }

/* ---------- home ---------- */
.home-top {
  padding: max(16px, env(safe-area-inset-top)) 20px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow-y: auto;
}

.icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--pink);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
}
.icon-btn:active { background: rgba(255, 77, 103, .12); }
.icon-btn.gear svg { width: 30px; height: 30px; }
.icon-btn.light { color: var(--text-light); }

.home-top h1 {
  font-size: 34px;
  font-weight: 800;
  margin: 6px 0 26px;
  letter-spacing: -.5px;
}

.cards { display: flex; gap: 14px; }

.card {
  flex: 1;
  position: relative;
  text-align: left;
  background: transparent;
  border: 1.5px solid var(--rose);
  border-radius: var(--radius);
  padding: 16px 14px 44px;
  cursor: pointer;
  font-family: inherit;
  color: var(--text-dark);
  transition: background .15s;
}
.card:active { background: rgba(217, 138, 151, .12); }
.card-sub { display: block; font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.card-title { display: block; font-size: 27px; font-weight: 800; letter-spacing: -.5px; }
.card-icon { position: absolute; right: 12px; bottom: 10px; color: var(--rose); }
.card-icon svg { width: 30px; height: 30px; }
.card-icon.round svg { width: 28px; height: 28px; }

.audio-help {
  margin-top: auto;
  padding: 18px 0 10px;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-dark);
  cursor: pointer;
  text-align: center;
}

/* ---------- record panel ---------- */
.rec-panel {
  background: var(--panel-dark);
  color: var(--text-light);
  padding: 20px 24px calc(24px + env(safe-area-inset-bottom));
  border-radius: 0;
}

.rec-options { display: flex; justify-content: space-between; margin-bottom: 4px; }

.pill {
  min-width: 96px;
  padding: 8px 18px;
  background: transparent;
  border: 1.5px solid var(--rose);
  border-radius: 10px;
  color: var(--text-light);
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}
.pill:active { background: rgba(217, 138, 151, .15); }

.rec-timer {
  text-align: center;
  font-size: 52px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  margin: 10px 0 14px;
  letter-spacing: 1px;
}

.rec-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 34px;
}

.record-btn {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  border: 5px solid #fff;
  background: radial-gradient(circle, rgba(255,255,255,.28) 0%, rgba(255,255,255,.04) 70%);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 0 34px rgba(255, 255, 255, .25);
}
.record-core {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--pink);
  transition: border-radius .2s, width .2s, height .2s, background .2s;
}
.record-btn.recording .record-core {
  border-radius: 12px;
  width: 44px;
  height: 44px;
  background: var(--pink);
}
.record-btn:active .record-core { background: var(--pink-deep); }

.side-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,.35);
  background: rgba(255,255,255,.08);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
}
.side-btn:active { background: rgba(255,255,255,.18); }

.mic-btn.mic-on { color: var(--pink); border-color: var(--pink); }
.mic-btn:not(.mic-on)::after {
  content: "";
  position: absolute;
  width: 34px;
  height: 2.5px;
  background: #bbb;
  transform: rotate(-45deg);
  border-radius: 2px;
}

.rec-hint { text-align: center; font-size: 17px; margin-top: 12px; color: #eee; }

/* recording state pulse */
.record-btn.recording { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 26px rgba(255, 77, 103, .35); }
  50% { box-shadow: 0 0 46px rgba(255, 77, 103, .75); }
}

/* ---------- top bar (dark views) ---------- */
.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: max(10px, env(safe-area-inset-top)) 12px 10px;
}
.bar h2 { font-size: 22px; font-weight: 700; }
.bar-spacer { width: 44px; }

/* ---------- preview ---------- */
.pv-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 8px 16px;
}
.pv-stage video {
  max-width: 100%;
  max-height: 100%;
  border-radius: 8px;
  background: #000;
}

.pv-actions {
  display: flex;
  justify-content: center;
  gap: 44px;
  padding: 26px 0 calc(40px + env(safe-area-inset-bottom));
}

.pv-action {
  background: none;
  border: none;
  color: var(--text-light);
  font-family: inherit;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: .5px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.pv-circle {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--pink-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.pv-circle svg { width: 32px; height: 32px; }
.pv-action:active .pv-circle { filter: brightness(.85); }

/* ---------- library ---------- */
.lib-banner {
  background: #000;
  color: #fff;
  font-size: 13px;
  padding: 8px 16px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lib-list { flex: 1; overflow-y: auto; padding: 14px 14px calc(20px + env(safe-area-inset-bottom)); }

.lib-empty { text-align: center; color: #888; margin-top: 60px; font-size: 15px; }

.lib-item {
  display: flex;
  gap: 14px;
  margin-bottom: 22px;
}
.lib-thumb {
  width: 96px;
  height: 96px;
  border-radius: 6px;
  background: #000 center/cover no-repeat;
  position: relative;
  flex-shrink: 0;
  cursor: pointer;
  border: none;
  padding: 0;
}
.lib-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(0,0,0,.55) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M9 6v12l9-6z'/%3E%3C/svg%3E") center/18px no-repeat;
}
.lib-info { flex: 1; min-width: 0; }
.lib-row1 { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 14px; }
.lib-name { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lib-dur { font-size: 14px; color: #bbb; font-variant-numeric: tabular-nums; }

.lib-actions { display: flex; border-bottom: 1px solid #3a3a3a; padding-bottom: 12px; }
.lib-act {
  flex: 1;
  background: none;
  border: none;
  color: var(--rose);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.lib-act svg { width: 26px; height: 26px; }
.lib-act span { color: #ddd; }
.lib-act:active { opacity: .6; }

/* ---------- modals ---------- */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 20px;
}
.modal-card {
  background: #fff;
  color: var(--text-dark);
  border-radius: 18px;
  width: 100%;
  max-width: 380px;
  padding: 22px;
  max-height: 84vh;
  display: flex;
  flex-direction: column;
}
.modal-card h3 { font-size: 20px; margin-bottom: 16px; }

.set-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 15px;
  font-weight: 600;
  padding: 10px 0;
  border-bottom: 1px solid #eee;
}
.set-row select {
  font-family: inherit;
  font-size: 15px;
  padding: 6px 10px;
  border: 1.5px solid var(--rose);
  border-radius: 8px;
  background: #fff;
  color: var(--text-dark);
}

.btn-pink {
  margin-top: 18px;
  background: var(--pink);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  padding: 12px;
  cursor: pointer;
}
.btn-pink:active { background: var(--pink-deep); }

.faq-body { overflow-y: auto; font-size: 14px; line-height: 1.6; }
.faq-body p { margin-bottom: 14px; }

/* ---------- overlays ---------- */
.fullscreen-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.78);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 60;
  color: #fff;
}
#countdown-num { font-size: 140px; font-weight: 800; color: var(--pink); }

/* ---------- toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 90px;
  transform: translateX(-50%);
  background: rgba(20,20,20,.92);
  color: #fff;
  font-size: 14px;
  padding: 10px 18px;
  border-radius: 999px;
  z-index: 70;
  max-width: 86vw;
  text-align: center;
}

@media (min-width: 521px) {
  .view { box-shadow: 0 0 40px rgba(0,0,0,.18); }
}

/* ==================== editor ==================== */
.edit-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  margin: 4px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
#edit-canvas {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: transparent;
}

.stage-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 84px;
  height: 84px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,.92);
  color: #111;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.stage-play svg { width: 40px; height: 40px; }
.stage-play.playing { opacity: 0; transition: opacity .2s .4s; }
.edit-stage:hover .stage-play.playing { opacity: .55; transition: opacity .15s; }

.facecam-box {
  position: absolute;
  border: 2px solid var(--pink);
  border-radius: 8px;
  overflow: hidden;
  touch-action: none;
  cursor: move;
  box-shadow: 0 2px 14px rgba(0,0,0,.5);
}
.facecam-box video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  display: block;
}
.facecam-resize {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 26px;
  height: 26px;
  background: var(--pink);
  border-top-left-radius: 8px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: nwse-resize;
  touch-action: none;
}
.facecam-resize svg { width: 16px; height: 16px; }

.edit-tools {
  display: flex;
  overflow-x: auto;
  gap: 4px;
  padding: 8px 10px 4px;
  scrollbar-width: none;
}
.edit-tools::-webkit-scrollbar { display: none; }
.tool {
  flex: 1 0 auto;
  min-width: 62px;
  background: none;
  border: none;
  color: #fff;
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 6px 4px;
  border-radius: 10px;
}
.tool svg { width: 24px; height: 24px; }
.tool:active { background: rgba(255,255,255,.1); }
.tool.active { color: var(--pink); }

.edit-times {
  display: flex;
  justify-content: space-between;
  padding: 6px 16px 4px;
  font-size: 13px;
  color: #ccc;
  font-variant-numeric: tabular-nums;
}

.timeline {
  position: relative;
  height: 64px;
  margin: 0 16px calc(18px + env(safe-area-inset-bottom));
  border-radius: 6px;
  background: #242426;
  touch-action: none;
  user-select: none;
}
#tl-strip {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 6px;
}
#tl-overlays { position: absolute; inset: 0; }
.tl-del {
  position: absolute;
  top: 0;
  bottom: 0;
  background: rgba(10,10,10,.78);
  border-radius: 4px;
}
.tl-seg {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: 4px;
}
.tl-seg.sel { box-shadow: inset 0 0 0 2.5px var(--pink); }
.tl-playhead {
  position: absolute;
  top: -5px;
  bottom: -5px;
  width: 3px;
  margin-left: -1.5px;
  background: #ff2d2d;
  border-radius: 2px;
  pointer-events: none;
}
.tl-handle {
  position: absolute;
  top: -4px;
  bottom: -4px;
  width: 22px;
  margin-left: -11px;
  background: #fff;
  border-radius: 6px;
  color: #333;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: ew-resize;
  touch-action: none;
  box-shadow: 0 1px 5px rgba(0,0,0,.4);
}
.tl-handle svg { width: 15px; height: 15px; }

/* tool sheets */
.sheet {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: calc(178px + env(safe-area-inset-bottom));
  background: #262628;
  border: 1px solid #3a3a3c;
  border-radius: 14px;
  padding: 14px 16px;
  z-index: 20;
  box-shadow: 0 6px 24px rgba(0,0,0,.45);
}
.sheet-title { font-size: 14px; font-weight: 700; margin-bottom: 10px; color: #eee; }
.sheet-body { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.chip-row { display: flex; gap: 8px; }
.chip {
  flex: 1;
  padding: 9px 0;
  background: transparent;
  border: 1.5px solid #555;
  border-radius: 999px;
  color: #ddd;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.chip.active { border-color: var(--pink); color: var(--pink); }

.slider-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  font-size: 14px;
  color: #ddd;
}
.slider-label { width: 44px; }
.slider-row input[type="range"] { flex: 1; accent-color: var(--pink); }
.slider-val { width: 46px; text-align: right; font-variant-numeric: tabular-nums; }

.bgm-name {
  font-size: 13px;
  color: #bbb;
  max-width: 46%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-pink.small { margin-top: 0; padding: 9px 14px; font-size: 14px; }
.btn-ghost {
  background: transparent;
  border: 1.5px solid #666;
  color: #ddd;
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 9px 16px;
  cursor: pointer;
}
.btn-ghost.small { padding: 7px 12px; font-size: 13px; }

/* library tabs */
.lib-tabs {
  display: flex;
  gap: 4px;
  background: #2a2a2c;
  border-radius: 999px;
  padding: 4px;
  margin: 0 auto calc(18px + env(safe-area-inset-bottom));
  width: fit-content;
}
.lib-tab {
  border: none;
  background: transparent;
  color: #ddd;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  padding: 9px 22px;
  border-radius: 999px;
  cursor: pointer;
}
.lib-tab.active { background: var(--pink); color: #fff; }

/* export overlay */
.export-card {
  background: #262628;
  border-radius: 18px;
  padding: 26px 28px;
  width: min(86vw, 340px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.export-title { font-size: 19px; font-weight: 800; }
.export-note { font-size: 13px; color: #bbb; text-align: center; line-height: 1.5; }
.progress {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: #3a3a3c;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  width: 0%;
  background: var(--pink);
  border-radius: 999px;
  transition: width .2s linear;
}
.export-pct { font-size: 15px; font-weight: 700; color: var(--pink); font-variant-numeric: tabular-nums; }

/* preview: 4 actions fit */
.pv-actions { gap: 26px; }
.pv-circle { width: 64px; height: 64px; }
.pv-action { font-size: 15px; }

/* ==================== phase 3: voice / text / watermark / undo ==================== */
.bar-group { display: flex; align-items: center; }
.icon-btn:disabled { opacity: .32; cursor: default; }
.icon-btn:disabled:active { background: none; }

/* text overlays */
#text-layer { position: absolute; inset: 0; pointer-events: none; }
.text-item {
  position: absolute;
  pointer-events: auto;
  font-weight: 700;
  line-height: 1.15;
  white-space: pre;
  text-shadow: 0 2px 8px rgba(0,0,0,.55);
  cursor: move;
  touch-action: none;
  user-select: none;
  padding: 2px 4px;
  border: 1.5px dashed transparent;
  border-radius: 6px;
}
.text-item:hover, .text-item:active { border-color: rgba(255,77,103,.8); }
.text-del {
  position: absolute;
  top: -12px;
  right: -12px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: var(--pink);
  color: #fff;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
}
.text-item:hover .text-del, .text-item:active .text-del { display: flex; }
@media (hover: none) { .text-del { display: flex; } }

/* image watermark */
.wm-box {
  position: absolute;
  border: 1.5px dashed rgba(255,77,103,.85);
  border-radius: 6px;
  cursor: move;
  touch-action: none;
}
.wm-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  pointer-events: none;
}

/* voice-over sheet */
.sheet-note { font-size: 12.5px; color: #aaa; line-height: 1.5; margin-bottom: 10px; }
.voice-list { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; }
.voice-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  color: #ddd;
  background: #333336;
  border-radius: 8px;
  padding: 7px 10px;
  font-variant-numeric: tabular-nums;
}
.voice-del {
  border: none;
  background: none;
  color: var(--rose);
  font-size: 13px;
  cursor: pointer;
  padding: 2px 4px;
}

/* text sheet */
.text-body { flex-direction: column; align-items: stretch; gap: 8px; }
#text-input {
  width: 100%;
  background: #333336;
  border: 1.5px solid #4a4a4d;
  border-radius: 10px;
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  padding: 10px 12px;
}
#text-input:focus { outline: none; border-color: var(--pink); }
.color-row { display: flex; gap: 10px; }
.color-chip {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2.5px solid transparent;
  cursor: pointer;
  box-shadow: 0 0 0 1.5px rgba(255,255,255,.25);
}
.color-chip.active { border-color: var(--pink); box-shadow: 0 0 0 1.5px rgba(255,255,255,.5); }
.text-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ==================== phase 4: filter / fade / emoji / capture ==================== */
.slider-label.wide { width: 70px; }

.emoji-row { display: flex; gap: 6px; flex-wrap: wrap; }
.emoji-chip {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1.5px solid #4a4a4d;
  background: #333336;
  font-size: 21px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.emoji-chip:active { border-color: var(--pink); }

.fade-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 0;
}
.fade-row .chip-row { flex: 1; }
.fade-row .chip { padding: 7px 0; font-size: 13px; }

#filter-presets { margin-bottom: 8px; }
#btn-filter-reset { margin-top: 6px; }

/* ==================== phase 5: crop / aspect ratio ==================== */
.crop-box {
  position: absolute;
  border: 2px solid var(--pink);
  border-radius: 4px;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, .58);
  cursor: move;
  touch-action: none;
  z-index: 5;
}
.crop-box .facecam-resize { z-index: 6; }
.crop-box::before,
.crop-box::after {
  content: "";
  position: absolute;
  pointer-events: none;
  border: 0 dashed rgba(255, 255, 255, .35);
}
.crop-box::before { inset: 0; border-left-width: 1px; border-right-width: 1px; left: 33.3%; right: 33.3%; }
.crop-box::after { inset: 0; border-top-width: 1px; border-bottom-width: 1px; top: 33.3%; bottom: 33.3%; }

/* while cropping, hide overlays that don't apply to the full-frame view */
.crop-mode #text-layer,
.crop-mode .facecam-box,
.crop-mode .wm-box,
.crop-mode .stage-play { display: none; }

/* ==================== phase 6: merge / import / mute ==================== */
.merge-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: #232325;
  border-top: 1px solid #3a3a3c;
}
.merge-hint {
  flex: 1;
  font-size: 13px;
  color: #bbb;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lib-thumb.merge-selected {
  outline: 3px solid var(--pink);
  outline-offset: -3px;
}
.merge-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 2;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--pink);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tl-seg.muted { background: rgba(255, 70, 70, .22); }
.tl-seg.muted::after {
  content: "🔇";
  position: absolute;
  top: 2px;
  right: 4px;
  font-size: 12px;
  line-height: 1;
}

/* FAQ inline code chips */
.faq-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
  background: #eee;
  color: #333;
  padding: 1px 5px;
  border-radius: 5px;
  word-break: break-all;
}

.mobile-import { max-width: 480px; margin: 20px auto; padding: 22px; border-radius: 18px; background: #fff; text-align: left; box-shadow: 0 6px 24px #0000000a; }
.mobile-import h2 { margin: 0 0 12px; font-size: 21px; }
.mobile-import p { line-height: 1.6; margin: 12px 0; }
.mobile-import .btn-pink { width: 100%; min-height: 48px; }
.mobile-import-note { font-size: 13px; color: #666; }

/* Touch-friendly timing controls and cue editing. */
.tool-symbol { font-size: 20px; font-weight: 700; line-height: 24px; }
.timing-fields { display: flex; gap: 12px; width: 100%; margin: 8px 0 12px; }
.timing-fields label { flex: 1; min-width: 0; font-size: 12px; color: #ddd; }
.timing-fields input { display: block; width: 100%; margin-top: 5px; padding: 10px; background: #171719; color: #fff; border: 1px solid #666; border-radius: 8px; font: inherit; font-size: 16px; }
.timed-toggle { font-size: 13px; display: flex; align-items: center; gap: 8px; }
.subtitle-list { margin-top: 12px; display: grid; gap: 8px; }
.subtitle-row { display: flex; gap: 8px; align-items: center; }
.subtitle-row button:first-child { flex: 1; min-width: 0; text-align: left; overflow-wrap: anywhere; }
.text-item span { white-space: pre-wrap; }
.sheet { max-height: 65dvh; overflow-y: auto; }
#text-input { resize: vertical; min-height: 60px; }
