.taivideo2-wrap {
  --bg: #0f1419;
  --card: #1a2332;
  --line: #2d3a4d;
  --ink: #e7ecf3;
  --muted: #8b9cb3;
  --accent: #3b82f6;
  --accent-ink: #ffffff;
  --ok: #22c55e;
  --bad: #ef4444;
  --focus: #60a5fa;
  --scroll-track: #0f1419;
  --scroll-thumb: #2d3a4d;
  --scroll-thumb-hover: #3b82f6;
}







html, 

.wrap {
  width: 100%;
  margin: 0;
}

.save-field { margin: 14px 0 8px; }
.save-ctrl {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
}
.save-ctrl .check { padding: 10px 14px; }
.save-vps-note {
  margin: 14px 0 4px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #1a1612;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.save-vps-note.hidden { display: none; }
#saveOptions.hidden {
  display: none !important;
}
.save-radios {
  margin-bottom: 0.6rem;
}
.save-radios label {
  color: var(--c-text, #e5e0f5);
  font-size: 0.9rem;
  cursor: pointer;
}
.save-radios input[type="radio"] {
  accent-color: var(--c-accent, #9b73e8);
  cursor: pointer;
}
.douyin-gate {
  margin: 12px 0 4px;
  padding: 12px 12px 10px;
  border-radius: 12px;
  border: 1px solid #5a4030;
  background: linear-gradient(180deg, #2a1c14, #1a1410);
  max-height: 140px;
  opacity: 1;
  overflow: hidden;
  transition: max-height 0.28s ease, opacity 0.22s ease, margin 0.22s ease, padding 0.22s ease, border-width 0.22s ease;
}
.douyin-gate.hidden {
  display: block;
  max-height: 0;
  opacity: 0;
  margin-top: 0;
  margin-bottom: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-width: 0;
  pointer-events: none;
}
.douyin-gate .field { margin-bottom: 0; color: #e8c29a; }
.douyin-gate-ctrl { margin-top: 6px; }
.douyin-gate-hint {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
  text-transform: none;
  letter-spacing: 0;
}
.cookies-box {
  margin: 12px 0 4px;
  padding: 12px 12px 10px;
  border-radius: 12px;
  border: 1px solid #5a4030;
  background: linear-gradient(180deg, #2a1c14, #1a1410);
  max-height: 280px;
  opacity: 1;
  overflow: hidden;
  transition: max-height 0.28s ease, opacity 0.22s ease, margin 0.22s ease, padding 0.22s ease, border-width 0.22s ease;
}
.cookies-box.hidden {
  display: block;
  max-height: 0;
  opacity: 0;
  margin-top: 0;
  margin-bottom: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-width: 0;
  pointer-events: none;
}
.cookies-warn {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.45;
  color: #e8c29a;
}
.cookies-ctrl {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}
.cookies-status {
  margin: 8px 0 0;
  font-size: 12px;
  color: #c9b79a;
  line-height: 1.4;
}
.cookies-status.is-user {
  color: #9ecb8c;
}
.cookies-status.is-warn {
  color: #e8a87c;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px 18px 16px;
  margin-bottom: 14px;
}

.lbl, .field, .list-title {
  display: block;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

textarea, input, select {
  width: 100%;
  border: 1px solid var(--line);
  background: #14110e;
  color: var(--ink);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
}
.url-wrap {
  position: relative;
}
.url-wrap textarea {
  display: block;
  resize: vertical;
  min-height: 92px;
  padding-bottom: 28px;
  line-height: 1.45;
}
.url-count {
  position: absolute;
  right: 10px;
  bottom: 8px;
  z-index: 1;
  pointer-events: none;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.02em;
  color: #c9b79a;
  background: rgba(20, 17, 14, 0.88);
  border: 1px solid rgba(90, 74, 50, 0.55);
  border-radius: 999px;
  padding: 2px 8px;
  line-height: 1.4;
  backdrop-filter: blur(4px);
}
.url-count.is-multi {
  color: #1a1208;
  background: var(--accent);
  border-color: transparent;
}
textarea:focus, input:focus, select:focus {
  outline: 2px solid var(--focus);
  outline-offset: 1px;
}
.batch-hint {
  margin: -2px 0 10px;
  text-transform: none;
  letter-spacing: 0;
  font-size: 13px;
}

.meta { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.row { margin-top: 14px; }
.chk {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 15px;
  cursor: pointer;
}
.chk input { width: auto; accent-color: var(--accent); }

.list-box {
  margin-top: 16px;
  padding: 12px;
  border-radius: 12px;
  background: #16130f;
  border: 1px dashed #5a4a32;
}
.list-box.hidden, .hidden { display: none; }
.list-title { color: var(--accent); margin-bottom: 10px; }
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}
.field input, .field select { margin-top: 6px; }
.field .hint {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted);
  font-weight: 400;
  line-height: 1.35;
}
.field .hint code {
  font-size: 11px;
  color: #c9b79a;
}
.chk.mid { align-self: end; margin-bottom: 8px; }
.daluong-wrap.mid {
  align-self: end;
  margin-bottom: 8px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}
.daluong-n-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}
.daluong-n-wrap.hidden { display: none; }
.daluong-n-wrap input[type="number"] {
  width: 72px;
  padding: 8px 10px;
  text-align: center;
}
.daluong-max {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.more { margin-top: 14px; color: var(--muted); }
.more summary { cursor: pointer; }
.more .grid { margin-top: 12px; }

.go-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-top: 16px;
}
.go {
  margin-top: 0;
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 13px 16px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  position: relative;
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}
.go:hover:not(:disabled) { transform: translateY(-1px); }
.go:disabled { opacity: 1; cursor: wait; }
.go-spin {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(26, 18, 8, 0.25);
  border-top-color: var(--accent-ink);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.go.is-busy {
  background: linear-gradient(90deg, #c4842e, #e3a24a, #f0c27a, #e3a24a, #c4842e);
  background-size: 220% 100%;
  animation: go-shine 1.8s linear infinite;
  box-shadow: 0 0 0 1px rgba(227, 162, 74, 0.35), 0 10px 28px rgba(227, 162, 74, 0.22);
}
.go.is-busy .go-spin { display: block; }

.check {
  border: 1px solid var(--line);
  background: #14110e;
  color: var(--ink);
  border-radius: 12px;
  padding: 13px 16px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.check:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}
.check:disabled { opacity: 0.55; cursor: wait; }
.check .go-spin {
  border-color: rgba(227, 162, 74, 0.25);
  border-top-color: var(--accent);
}
.check.is-busy .go-spin { display: block; }

.quality-mode {
  margin-top: 14px;
  padding: 12px;
  border-radius: 12px;
  background: #16130f;
  border: 1px dashed #5a4a32;
}
.quality-mode .list-title { margin-bottom: 10px; }
.mode-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.mode-chip {
  border: 1px solid var(--line);
  background: #14110e;
  color: var(--ink);
  border-radius: 12px;
  padding: 10px 16px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.mode-chip:hover { border-color: var(--accent); color: var(--accent); }
.mode-chip.is-on {
  border-color: var(--accent);
  background: rgba(227, 162, 74, 0.16);
  color: var(--accent);
}
.quality-mode .meta { margin-top: 10px; }

.px-pick {
  margin-top: 12px;
  padding: 12px;
  border-radius: 12px;
  background: #16130f;
  border: 1px dashed #5a4a32;
}
.px-pick .list-title { margin-bottom: 10px; }
.px-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.px-chip {
  border: 1px solid var(--line);
  background: #14110e;
  color: var(--ink);
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  font-size: 14px;
}
.px-chip:hover { border-color: var(--accent); }
.px-chip.is-on {
  border-color: var(--accent);
  background: rgba(227, 162, 74, 0.16);
  color: var(--accent);
  font-weight: 700;
}
.px-pick .meta { margin-top: 10px; }

.log-panel { margin: 6px 0 14px; }
.log-panel.hidden { display: none; }

.dl {
  margin: 0 0 12px;
  padding: 12px;
  border-radius: 12px;
  background:
    radial-gradient(120px 60px at 8% 20%, rgba(227, 162, 74, 0.16), transparent 70%),
    #16130f;
  border: 1px solid #5a4a32;
}
.dl-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.dl-orb {
  position: relative;
  width: 36px;
  height: 36px;
  flex: none;
}
.dl-orb span {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: var(--accent);
  animation: spin 1s linear infinite;
}
.dl-orb span:nth-child(2) {
  inset: 6px;
  border-top-color: #f0c27a;
  border-bottom-color: transparent;
  animation-duration: 1.5s;
  animation-direction: reverse;
}
.dl-orb span:nth-child(3) {
  inset: 12px;
  background: var(--accent);
  border: 0;
  animation: pulse-orb 1.2s ease-in-out infinite;
  box-shadow: 0 0 12px rgba(227, 162, 74, 0.7);
}
.dl-copy { flex: 1; min-width: 0; }
.dl-title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
}
.dl-title::after { content: none; }
.dl.is-live .dl-title::after {
  content: "";
  display: inline-block;
  min-width: 1.1em;
  animation: dots 1.2s steps(4, end) infinite;
}
.dl:not(.is-live) .dl-orb span { animation: none; }
.dl:not(.is-live) .dl-fill::after { animation: none; }
.dl.is-fail .dl-title { color: var(--bad); }
.dl.is-fail .dl-fill {
  background: linear-gradient(90deg, #a85a4c, #e07a6a);
  box-shadow: 0 0 14px rgba(224, 122, 106, 0.4);
}
.dl.is-done .dl-title { color: var(--ok); }
.dl-step {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dl-pct {
  flex: none;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--ink);
  min-width: 3.2em;
  text-align: right;
}
.dl-cancel {
  flex: none;
  border: 1px solid #6a3e36;
  background: #1a1210;
  color: #e07a6a;
  border-radius: 10px;
  padding: 8px 12px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.dl-cancel:hover:not(:disabled) {
  border-color: #e07a6a;
  background: rgba(224, 122, 106, 0.12);
}
.dl-cancel:disabled {
  opacity: 0.55;
  cursor: wait;
}
.dl:not(.is-live) .dl-cancel {
  display: none;
}
.dl-track {
  height: 8px;
  border-radius: 99px;
  background: #100e0c;
  overflow: hidden;
  position: relative;
}
.dl-fill {
  height: 100%;
  width: 0%;
  border-radius: 99px;
  background: linear-gradient(90deg, #c4842e, #e3a24a, #f7d59a);
  box-shadow: 0 0 14px rgba(227, 162, 74, 0.55);
  transition: width 0.35s ease;
  position: relative;
}
.dl-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  animation: sheen 1.4s ease-in-out infinite;
}
.dl-track.is-wait .dl-fill {
  width: 36% !important;
  animation: wait-slide 1.3s ease-in-out infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse-orb {
  0%, 100% { transform: scale(0.85); opacity: 0.7; }
  50% { transform: scale(1); opacity: 1; }
}
@keyframes dots {
  0% { content: ""; }
  25% { content: "."; }
  50% { content: ".."; }
  75% { content: "..."; }
}
@keyframes sheen {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(120%); }
}
@keyframes wait-slide {
  0% { transform: translateX(-80%); }
  100% { transform: translateX(280%); }
}
@keyframes go-shine {
  0% { background-position: 0% 50%; }
  100% { background-position: 220% 50%; }
}

@media (prefers-reduced-motion: reduce) {
  .go-spin, .dl-orb span, .dl-fill::after, .go.is-busy, .dl-track.is-wait .dl-fill {
    animation: none;
  }
}

.log-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
}
.log-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  max-width: 78%;
}
.log-head code {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.log-clean {
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: nowrap;
}
.log-clean:hover:not(:disabled) {
  color: var(--accent);
}
.log-clean:disabled {
  opacity: 0.5;
  cursor: wait;
}
.log {
  margin: 0;
  min-height: 160px;
  max-height: 320px;
  overflow: auto;
  background: #100e0c;
  border-radius: 10px;
  padding: 10px 8px 10px 12px;
  font: 12px/1.5 ui-monospace, Menlo, Consolas, monospace;
  white-space: pre-wrap;
  color: #d8cbb8;
}
.log::-webkit-scrollbar-track {
  margin: 6px 0;
  background: #100e0c;
}
.status-ok { color: var(--ok); }
.status-fail { color: var(--bad); }
.status-run { color: var(--accent); }

.files-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.files-head-main {
  display: flex;
  align-items: baseline;
  gap: 12px;
  min-width: 0;
}
.files-head .list-title { margin: 0; }
.files-head-main > span { color: var(--muted); font-size: 13px; }
.auto-dl-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 6px 10px 6px 8px;
  border-radius: 999px;
  border: 1px solid #5a4030;
  background: linear-gradient(180deg, #241910, #18140f);
  cursor: pointer;
  user-select: none;
  color: #e8c29a;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.auto-dl-toggle.hidden { display: none; }
.auto-dl-toggle input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.auto-dl-ui {
  width: 36px;
  height: 20px;
  border-radius: 999px;
  background: #3a2c22;
  border: 1px solid #5a4030;
  position: relative;
  flex: 0 0 auto;
  transition: background 0.18s ease, border-color 0.18s ease;
}
.auto-dl-ui::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #c9b79a;
  transition: transform 0.18s ease, background 0.18s ease;
}
.auto-dl-toggle input:checked + .auto-dl-ui {
  background: var(--accent);
  border-color: transparent;
}
.auto-dl-toggle input:checked + .auto-dl-ui::after {
  transform: translateX(16px);
  background: #1a1208;
}
.auto-dl-text { white-space: nowrap; }
body:not(.is-vps) .auto-dl-toggle { display: none !important; }
.files-scroll { overflow-x: auto; }
table.files {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 13px;
}
table.files th {
  text-align: left;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  padding: 0 10px 8px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
table.files td {
  padding: 10px;
  border-bottom: 1px solid #2a241c;
  vertical-align: middle;
}
table.files tbody tr {
  cursor: pointer;
}
table.files tbody tr:hover {
  background: #241e18;
}
table.files td.name {
  max-width: 0;
  width: 38%;
}
table.files .file-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
table.files .thumb {
  flex: 0 0 auto;
  width: 64px;
  height: 40px;
  border-radius: 8px;
  overflow: hidden;
  background: #1a1510;
  border: 1px solid #3a2c22;
  position: relative;
}
table.files .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
table.files .thumb.is-audio,
table.files .thumb.is-empty {
  display: grid;
  place-items: center;
}
table.files .thumb.is-empty::before,
table.files .thumb.is-audio::before {
  content: "";
  width: 16px;
  height: 16px;
  opacity: 0.72;
  background: #c9b79a;
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
}
table.files .thumb.is-empty::before {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolygon points='5 3 19 12 5 21 5 3'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolygon points='5 3 19 12 5 21 5 3'/%3E%3C/svg%3E");
}
table.files .thumb.is-audio::before {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18V5l12-2v13'/%3E%3Ccircle cx='6' cy='18' r='3'/%3E%3Ccircle cx='18' cy='16' r='3'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18V5l12-2v13'/%3E%3Ccircle cx='6' cy='18' r='3'/%3E%3Ccircle cx='18' cy='16' r='3'/%3E%3C/svg%3E");
}
table.files .file-name {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
  color: var(--ink);
  min-width: 0;
}
table.files td.num {
  white-space: nowrap;
  color: var(--muted);
}
table.files td.when {
  white-space: nowrap;
  color: var(--muted);
  font-size: 12px;
}
table.files th.col-dl,
table.files td.col-dl {
  width: 88px;
  text-align: center;
  white-space: nowrap;
}
table.files th.col-del,
table.files td.col-del {
  width: 72px;
  text-align: center;
  white-space: nowrap;
}
table.files th.col-expire,
table.files td.col-expire {
  width: 110px;
  text-align: center;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
body:not(.is-vps) table.files .col-dl,
body:not(.is-vps) table.files .col-del,
body:not(.is-vps) table.files .col-expire {
  display: none;
}
table.files .btn-dl,
table.files .btn-del {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid #5a4030;
  background: #1f1812;
  color: #e8c29a;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
table.files .btn-dl:hover {
  background: #2a1c14;
  color: #fff;
}
table.files .btn-del {
  border-color: #5a3030;
  color: #e8a0a0;
}
table.files .btn-del:hover {
  background: #2a1414;
  color: #ffc8c8;
}
table.files .btn-dl:disabled,
table.files .btn-del:disabled {
  opacity: 0.55;
  cursor: default;
}
table.files .expire {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
}
table.files .expire.is-max {
  color: var(--muted);
  font-weight: 500;
}
table.files .expire.is-urgent {
  color: var(--bad);
}
table.files .expire.is-gone {
  color: var(--bad);
  font-weight: 600;
}

#previewModal.hidden,
#previewModal:not(.is-open) {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
#previewModal.is-open {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex !important;
  align-items: center;
  justify-content: center;
  padding: 16px;
  visibility: visible;
  pointer-events: auto;
}
#previewModal .modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 6, 4, 0.86);
  cursor: pointer;
}
#previewModal .modal-box {
  position: relative;
  z-index: 1;
  width: min(920px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow: auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 12px 10px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}
#previewModal .modal-bar {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
  margin-bottom: 12px;
  min-height: 36px;
}
#previewModal .modal-bar p {
  margin: 0;
  font-size: 14px;
  line-height: 1.35;
  word-break: break-word;
}
#previewModal .modal-close {
  flex: none;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #14110e;
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
#previewVideo, #previewAudio {
  width: 100%;
  display: none;
  background: #100e0c;
  border-radius: 10px;
}
#previewVideo {
  max-height: calc(100vh - 96px);
  object-fit: contain;
  background: #000;
}
#previewAudio { margin-top: 8px; }
#previewVideo.show, #previewAudio.show { display: block; }

.net {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 30;
  display: flex;
  gap: 12px;
  font: 12px/1 ui-monospace, Consolas, monospace;
  color: var(--muted);
  background: rgba(19, 17, 15, 0.82);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 11px;
  user-select: none;
  pointer-events: none;
}
.net b { color: var(--ink); font-weight: 650; }
.net .dn b { color: var(--ok); }
.net .up b { color: var(--accent); }
.toasts {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(420px, calc(100% - 32px));
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  background: #1c1814;
  border: 1px solid #5a4a32;
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  animation: toast-in 0.28s ease;
  cursor: pointer;
}
.toast.is-out { animation: toast-out 0.22s ease forwards; }
.toast.ok { border-color: #4e6b48; }
.toast.fail { border-color: #6a3e36; }
.toast-kicker {
  margin: 0 0 4px;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--accent);
}
.toast.ok .toast-kicker { color: var(--ok); }
.toast.fail .toast-kicker { color: var(--bad); }
.toast-body {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
  word-break: break-word;
}
@keyframes toast-in {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: none; }
}
@keyframes toast-out {
  to { opacity: 0; transform: translateY(-8px); }
}

@media (max-width: 560px) {
  .grid { grid-template-columns: 1fr; }
  .go-row { grid-template-columns: 1fr; }
  .save-ctrl { grid-template-columns: 1fr 1fr; }
  .save-ctrl input { grid-column: 1 / -1; }
}
