
.tfv-paper-editor {
  --editor-paper:#fffaf1; --editor-ink:#25241f; --editor-muted:#60594e;
  --editor-rust:#9c3720; --editor-rule:#cfc3ad; --editor-light-rule:#e5dac6;
  --editor-wash:#f4e0d2; --editor-serif:"Songti SC","Noto Serif CJK SC",Georgia,serif;
  --editor-mono:"SFMono-Regular",Consolas,monospace; --editor-gutter:11.75rem;
  background:var(--editor-paper); color:var(--editor-ink);
  border:1px solid var(--editor-rule); border-top:3px solid var(--editor-ink);
  font-size:14px; text-align:start;
}
.tfv-paper-editor [hidden] {display:none!important}
.tfv-paper-editor :where(button,input,textarea) {box-sizing:border-box; color:inherit; font:inherit}
.tfv-paper-editor :where(button,input,textarea,summary):focus-visible {outline:2px solid var(--editor-rust); outline-offset:2px}
.tfv-paper-editor button {cursor:pointer}
.tfv-paper-editor button:disabled {opacity:.48; cursor:default}
.tfv-paper-editor .editor-toolbar,.tfv-paper-editor .editor-footer {display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:8px; padding:9px 18px}
.tfv-paper-editor .editor-toolbar {border-bottom:1px solid var(--editor-rule)}
.tfv-paper-editor .editor-group {display:flex; align-items:center; flex-wrap:wrap; gap:6px}
.tfv-paper-editor .editor-button {min-height:34px; padding:5px 10px; border:1px solid var(--editor-light-rule); background:transparent; line-height:1.35}
.tfv-paper-editor .editor-button:not(:disabled):hover,.tfv-paper-editor .editor-file:hover {border-color:var(--editor-rust); color:var(--editor-rust)}
.tfv-paper-editor .editor-button[aria-pressed="true"] {color:var(--editor-rust); background:var(--editor-wash); border-color:var(--editor-wash); font-weight:650}
.tfv-paper-editor .editor-format {font:600 12px var(--editor-mono)}
.tfv-paper-editor .editor-source {padding:13px 24px; border-bottom:1px solid var(--editor-rule)}
.tfv-paper-editor .editor-file {display:inline-flex; align-items:center; position:relative; min-height:36px; padding:6px 10px; border:1px solid var(--editor-rule); cursor:pointer}
.tfv-paper-editor .editor-file input {position:absolute; inset:0; width:100%; height:100%; margin:0; opacity:0; cursor:pointer}
.tfv-paper-editor .editor-file:focus-within {outline:2px solid var(--editor-rust); outline-offset:2px}
.tfv-paper-editor :where(.editor-meta,.editor-status,.editor-footer,.editor-search small) {color:var(--editor-muted); font-size:12px; margin:0; overflow-wrap:anywhere}
.tfv-paper-editor .editor-source .editor-meta {margin-top:7px}
.tfv-paper-editor [data-editor-status]:empty,.tfv-paper-editor [data-mark-status]:empty,.tfv-paper-editor [data-find-status]:empty {display:none}
.tfv-paper-editor .editor-status {border-top:1px solid var(--editor-light-rule); padding:7px 24px}
.tfv-paper-editor video {display:block; width:100%; max-height:320px; background:var(--editor-ink)}
.tfv-paper-editor .editor-tape {padding:14px 24px 12px; display:grid; grid-template-columns:auto minmax(0,1fr) auto; gap:12px 16px; align-items:center; border-bottom:1px solid var(--editor-rule)}
.tfv-paper-editor .editor-tape-name {min-width:0; grid-column:1/-1; display:flex; align-items:center; gap:10px}
.tfv-paper-editor .editor-tape-name strong {font:700 16px/1.3 var(--editor-serif); overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.tfv-paper-editor .editor-tape-name img {width:56px; height:31px; border:1px solid var(--editor-rule); object-fit:cover; flex:none}
.tfv-paper-editor .editor-play {display:grid; place-items:center; width:39px; height:39px; padding:0; border:0; background:var(--editor-rust); color:#fff; font-size:13px}
.tfv-paper-editor .editor-play:hover:not(:disabled) {background:#7b2b18}
.tfv-paper-editor .editor-wave {min-width:0; display:grid; align-items:center; grid-template-areas:"track"}
.tfv-paper-editor .editor-bars {grid-area:track; height:34px; display:flex; justify-content:space-between; align-items:center; gap:2px; overflow:hidden}
.tfv-paper-editor .editor-bars i {width:3px; height:var(--bar-size); flex:none; background:#aea184}
.tfv-paper-editor .editor-bars i.passed {background:var(--editor-rust)}
.tfv-paper-editor .editor-wave input {grid-area:track; width:100%; min-width:0; height:34px; margin:0; appearance:none; background:transparent; cursor:pointer}
.tfv-paper-editor .editor-wave input::-webkit-slider-runnable-track {height:34px; background:transparent}
.tfv-paper-editor .editor-wave input::-webkit-slider-thumb {appearance:none; width:2px; height:34px; background:var(--editor-rust)}
.tfv-paper-editor .editor-wave input::-moz-range-thumb {width:2px; height:34px; border:0; border-radius:0; background:var(--editor-rust)}
.tfv-paper-editor .editor-time,.tfv-paper-editor .editor-offset {font:12px var(--editor-mono); color:var(--editor-muted); white-space:nowrap}
.tfv-paper-editor .editor-mark {padding:10px 24px; border-bottom:1px solid var(--editor-rule); background:var(--editor-wash)}
.tfv-paper-editor .editor-mark .editor-meta {margin-top:6px}
.tfv-paper-editor .editor-result {min-width:0}
.tfv-paper-editor .editor-columns,.tfv-paper-editor .editor-cue {display:grid; grid-template-columns:var(--editor-gutter) minmax(0,1fr); padding:0 24px}
.tfv-paper-editor .editor-columns {border-bottom:1px solid var(--editor-rule); padding-block:7px; color:var(--editor-muted); font-size:12px}
.tfv-paper-editor .editor-rows {max-height:540px; overflow:auto; scrollbar-gutter:stable}
.tfv-paper-editor .editor-cue {min-height:40px}
.tfv-paper-editor .editor-cue + .editor-cue {border-top:1px solid var(--editor-light-rule)}
.tfv-paper-editor .editor-cue.current {background:#faecdf; box-shadow:inset 3px 0 var(--editor-rust)}
.tfv-paper-editor .editor-stamp {display:block; text-align:start; padding:6px 0; margin:0 13px 0 0; border:0; border-right:1px solid var(--editor-light-rule); background:transparent; color:var(--editor-rust); font:12px/1.45 var(--editor-mono); overflow-wrap:anywhere}
.tfv-paper-editor .editor-stamp:disabled {opacity:1; color:var(--editor-muted)}
.tfv-paper-editor .editor-stamp:hover:not(:disabled) {text-decoration:underline}
.tfv-paper-editor .editor-cue textarea {display:block; padding:8px 3px; margin:0; min-height:40px; width:100%; background:transparent; border:none; resize:vertical; field-sizing:content; font:15px/1.5 Georgia,system-ui,sans-serif}
.tfv-paper-editor .editor-cue textarea:focus-visible {outline-offset:-2px}
.tfv-paper-editor .editor-empty {padding:24px; margin:0; color:var(--editor-muted); font-size:14px}
.tfv-paper-editor .editor-footer {border-top:1px solid var(--editor-rule)}
.tfv-paper-editor .editor-more {padding:9px 24px 13px; border-top:1px solid var(--editor-light-rule); font-size:13px}
.tfv-paper-editor .editor-more summary {width:fit-content; cursor:pointer; padding:0; min-height:20px}
.tfv-paper-editor .editor-search {display:flex; align-items:flex-end; flex-wrap:wrap; gap:6px; margin-block:9px}
.tfv-paper-editor .editor-search label {display:grid; gap:4px; flex:1 1 12rem}
.tfv-paper-editor .editor-search input {width:100%; min-height:34px; padding:5px 8px; border:1px solid var(--editor-rule); background:var(--editor-paper)}
.tfv-paper-editor .editor-search small {flex-basis:100%}
@media(max-width:650px) {
  .tfv-paper-editor {--editor-gutter:7rem}
  .tfv-paper-editor :where(.editor-toolbar,.editor-source,.editor-tape,.editor-mark,.editor-columns,.editor-cue,.editor-footer,.editor-more,.editor-status) {padding-inline:12px}
  .tfv-paper-editor .editor-stamp {font-size:10px; margin-inline-end:8px}
  .tfv-paper-editor .editor-cue textarea {font-size:14px}
  .tfv-paper-editor .editor-tape {gap:10px}
  .tfv-paper-editor .editor-bars i:nth-child(even) {display:none}
}

.tfv-paper-editor .editor-source-files {
  display: grid;
  gap: 8px;
}
.tfv-paper-editor .editor-source-file {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  padding: 10px 12px;
  background: var(--editor-paper);
  border: 1px solid var(--editor-light-rule);
  border-radius: 8px;
}
.tfv-paper-editor .editor-source-file-info {
  flex: 1 1 12rem;
  min-width: 0;
}
.tfv-paper-editor .editor-source-file-info strong {
  display: block;
  font-size: 13px;
}
.tfv-paper-editor .editor-source [data-source-next] {
  margin-top: 9px;
}
.tfv-paper-editor .editor-source [data-clear]:disabled {
  display: none;
}
.tfv-paper-editor .editor-file:focus-within {
  outline: 2px solid var(--editor-rust);
  outline-offset: 2px;
}
.tfv-paper-editor .editor-source[data-next="subtitles"] .editor-file--subtitles,
.tfv-paper-editor .editor-source[data-next="media"] .editor-file--media {
  background: var(--editor-rust);
  border-color: var(--editor-rust);
  color: #fff;
  font-weight: 600;
}
.tfv-paper-editor .editor-source[data-next="subtitles"] .editor-file--subtitles:hover,
.tfv-paper-editor .editor-source[data-next="media"] .editor-file--media:hover {
  box-shadow: inset 0 0 0 2px #ffffff45;
}
@media (max-width: 650px) {
  html.desk-site .tfv-paper-editor {
    --editor-sticky-top: 65px;
    overflow: visible;
    overflow: clip;
  }

  .tfv-paper-editor .editor-columns {
    display: block;
  }

  .tfv-paper-editor .editor-columns > :first-child {
    display: none;
  }

  .tfv-paper-editor .editor-rows {
    max-height: none;
    overflow: visible;
    scrollbar-gutter: auto;
  }

  .tfv-paper-editor .editor-cue {
    grid-template-columns: minmax(0, 1fr);
    padding-block: 2px 10px;
  }

  .tfv-paper-editor .editor-stamp {
    justify-self: start;
    min-height: 44px;
    margin: 0;
    padding-inline: 4px 8px;
    border: 0;
    border-radius: 4px;
    font-size: 12px;
  }

  .tfv-paper-editor .editor-cue textarea {
    min-height: 44px;
    padding: 6px;
    font-size: 16px;
  }

  .tfv-paper-editor :is(.editor-button, .editor-file, .editor-more summary, .editor-search input) {
    min-height: 44px;
  }

  .tfv-paper-editor .editor-more summary {
    display: list-item;
    align-content: center;
  }

  .tfv-paper-editor .editor-search input {
    font-size: 16px;
  }

  .tfv-paper-editor .editor-tape {
    gap: 8px 10px;
    padding-block: 8px;
    background: var(--editor-paper);
  }

  .tfv-paper-editor .editor-play {
    width: 44px;
    height: 44px;
  }

  .tfv-paper-editor .editor-wave input {
    height: 44px;
  }
}

@media (max-width: 620px) {
  html.desk-site .tfv-paper-editor {
    --editor-sticky-top: 59px;
  }
}

@media (max-width: 650px) and (min-height: 500px) {
  .tfv-paper-editor:not([data-typing]) .editor-tape:has([data-play]:enabled) {
    position: sticky;
    z-index: 2;
    top: var(--editor-sticky-top, 0px);
  }

  .tfv-paper-editor :is(.editor-stamp, .editor-cue textarea) {
    scroll-margin-block-start: 100px;
  }
}

.tfv-paper-editor .editor-transcription {
  margin-top: 12px;
  padding-block: 11px 2px;
  border-top: 1px solid var(--editor-light-rule);
}
.tfv-paper-editor [data-transcription-action]:not(:disabled) {
  background: var(--primary, #2749d8);
  border-color: var(--primary, #2749d8);
  color: #fff;
}
.tfv-paper-editor [data-transcription-status]:empty { display: none; }
