/* ==========================================================================
   LongTTS 官网交互演示：按 src/styles.css 的桌面工作台 1:1 复刻。
   全部规则限定在 .product-demo 作用域内，避免与官网全局样式冲突。
   令牌取值与 src/styles.css 的 --lt-* 变量保持一致。
   ========================================================================== */
.product-demo {
  --lt-bg: #f3f5f7;
  --lt-surface: #ffffff;
  --lt-border: #dde3ea;
  --lt-border-strong: #cfd7e2;
  --lt-field: #fafbfc;
  --lt-ink: #1d2939;
  --lt-muted: #667085;
  --lt-soft-muted: #75849a;
  --lt-accent: #f5a400;
  --lt-accent-dark: #d98d00;
  --lt-accent-hover: #b76a00;
  --lt-accent-soft: #fff7e6;
  --lt-success: #10b981;
  --lt-danger: #dc2626;
  position: relative;
  left: 50%;
  width: min(1440px, calc(100vw - 48px));
  max-width: none;
  margin: 0 0 42px;
  transform: translateX(-50%);
  scroll-margin-top: 80px;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 13px;
  line-height: 1.45;
  letter-spacing: 0;
  color: var(--lt-ink);
  text-align: left;
}
.product-demo.reveal { transform: translateX(-50%) translateY(28px); }
.product-demo.reveal.in { transform: translateX(-50%); }
.product-demo *,
.product-demo *::before,
.product-demo *::after { box-sizing: border-box; letter-spacing: 0; }
.product-demo button,
.product-demo input,
.product-demo textarea,
.product-demo select { font: inherit; }
.product-demo button { cursor: pointer; }
.product-demo button:disabled { cursor: not-allowed; }
.product-demo :is(button, input, textarea, select, summary, a):focus-visible {
  outline: 3px solid rgba(245, 164, 0, 0.3);
  outline-offset: 2px;
}
/* 抵消官网 .guide-main / 全局规则对演示内部元素的干扰 */
.product-demo p, .guide-main .product-demo p { margin: 0; font-size: 12px; line-height: 1.5; color: inherit; }
.product-demo h2, .product-demo h3,
.guide-main .product-demo h2, .guide-main .product-demo h3 { margin: 0; color: var(--lt-ink); line-height: 1.3; font-weight: 700; }
.product-demo .ltp-table-surface { padding: 0; }
.product-demo img, .guide-main .product-demo img { display: block; width: auto; max-width: none; height: auto; border: 0; border-radius: 0; box-shadow: none; }
.product-demo ul, .product-demo ol { margin: 0; padding: 0; list-style: none; }
.product-demo li { margin: 0; }
.product-demo a { text-decoration: none; }

/* ---------- 窗口框架 ---------- */
.ltp-scroll {
  width: 100%;
  overflow: clip;
  overscroll-behavior: contain;
  border: 1px solid var(--lt-border);
  border-radius: 14px;
  background: var(--lt-bg);
  box-shadow: 0 24px 66px rgba(15, 23, 42, 0.14);
}
.ltp-app {
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
  width: 1440px;
  min-height: 720px;
  background: var(--lt-bg);
  transform: scale(var(--ltp-scale, 1));
  transform-origin: top left;
}

/* ---------- 侧栏（对应 .sidebar） ---------- */
.ltp-sidebar {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 0 14px 18px;
  border-right: 1px solid var(--lt-border);
  background: linear-gradient(180deg, #fbfcfe 0%, #f5f7fa 100%);
  color: #53657a;
}
.ltp-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 86px;
  padding: 18px 8px;
  border-bottom: 1px solid var(--lt-border);
}
.ltp-brand img, .guide-main .ltp-brand img {
  width: 42px;
  height: 42px;
  flex: none;
  object-fit: contain;
  border-radius: 11px;
  box-shadow: 0 4px 12px rgba(245, 164, 0, 0.22);
}
.ltp-brand strong, .ltp-brand small { display: block; }
.ltp-brand strong { color: var(--lt-ink); font-size: 21px; line-height: 1.15; font-weight: 800; }
.ltp-brand small { margin-top: 4px; color: var(--lt-muted); font-size: 11px; font-weight: 500; }
.ltp-nav-caption {
  margin: 22px 12px 9px;
  color: #76869b;
  font-size: 10px;
  font-weight: 750;
  text-transform: uppercase;
}
.ltp-nav { display: grid; gap: 4px; }
.ltp-nav button {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 44px;
  padding: 10px 13px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: #526176;
  font-size: 13px;
  font-weight: 650;
  text-align: left;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.ltp-nav button svg { flex: 0 0 17px; opacity: 0.8; }
.ltp-nav button:hover { background: #fff; color: var(--lt-ink); }
.ltp-nav button.active {
  border-color: #f3e2b3;
  background: var(--lt-accent-soft);
  color: #a56600;
  box-shadow: 0 1px 3px rgba(245, 164, 0, 0.12);
}
.ltp-nav button.active svg { opacity: 1; }
.ltp-connection {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding: 13px 4px 0;
  border-top: 1px solid var(--lt-border);
  font-size: 11px;
  font-weight: 650;
}
.ltp-connection strong { display: block; color: #3f4f63; font-size: 12px; font-weight: 700; }
.ltp-connection small { display: block; margin-top: 2px; color: var(--lt-soft-muted); font-weight: 500; }
.ltp-connection-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: var(--lt-accent);
  box-shadow: 0 0 0 3px var(--lt-accent-soft);
}

/* ---------- 主区与页头（对应 .main / .page-header） ---------- */
.ltp-main { min-width: 0; background: var(--lt-bg); }
.ltp-page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  min-height: 86px;
  padding: 16px 30px;
  border-bottom: 1px solid var(--lt-border);
  background: rgba(255, 255, 255, 0.92);
}
.ltp-page-header h2 { font-size: 22px; line-height: 1.2; font-weight: 750; }
.ltp-page-header p { margin-top: 6px; color: var(--lt-muted); font-size: 13px; line-height: 1.5; }
.ltp-demo-badge {
  flex: none;
  padding: 6px 12px;
  border: 1px solid #f3d18a;
  border-radius: 999px;
  background: var(--lt-accent-soft);
  color: #8a5a00;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.ltp-page-body { padding: 24px 30px 36px; }

/* ---------- 通用面板（对应 .surface / .section-heading） ---------- */
.ltp-surface {
  min-width: 0;
  border: 1px solid var(--lt-border);
  border-radius: 12px;
  background: var(--lt-surface);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.04);
}
.ltp-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid #edf0f3;
}
.ltp-heading .ltp-kicker { display: block; margin-bottom: 4px; color: var(--lt-accent-dark); font-size: 11px; font-weight: 750; text-transform: uppercase; }
.ltp-heading h3 { font-size: 17px; line-height: 1.3; }

/* ---------- 创作页（对应 .create-grid） ---------- */
.ltp-create-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5.1fr);
  align-items: stretch;
  gap: 18px;
}
.ltp-editor {
  padding: 22px;
  border-color: var(--lt-border-strong);
  box-shadow: 0 2px 5px rgba(15, 23, 42, 0.06), 0 18px 44px rgba(15, 23, 42, 0.07);
}
.ltp-settings {
  display: grid;
  align-content: start;
  gap: 15px;
  padding: 22px;
  background: #f9fbfd;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.ltp-editor textarea {
  display: block;
  width: 100%;
  height: 340px;
  min-height: 200px;
  padding: 17px;
  resize: vertical;
  border: 1px solid var(--lt-border-strong);
  border-radius: 4px;
  background: var(--lt-field);
  color: var(--lt-ink);
  font-size: 15px;
  line-height: 1.55;
}
.product-demo textarea::placeholder, .product-demo input::placeholder { color: #8b95a4; }
.product-demo textarea:focus, .product-demo input:not([type="range"]):focus, .product-demo select:focus {
  border-color: var(--lt-accent);
  background: #fff;
  outline: none;
}
.ltp-counter {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  margin-top: 14px;
  padding: 10px 12px;
  border: 1px solid var(--lt-border);
  background: var(--lt-field);
  color: var(--lt-accent);
  font-size: 12px;
  font-weight: 700;
}
.ltp-counter svg { flex: none; }
.ltp-counter strong { color: var(--lt-accent); }
.ltp-language-model {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 15px;
  padding: 12px;
  border: 1px solid var(--lt-border-strong);
  border-radius: 5px;
}
.ltp-language-model label, .ltp-language-model legend,
.ltp-fieldset legend, .ltp-manager-form label > span, .ltp-field-label {
  color: #66758a;
  font-size: 13px;
  font-weight: 700;
}
.ltp-language-model label { display: grid; gap: 7px; }
.ltp-select { position: relative; display: block; }
.ltp-select select {
  display: block;
  width: 100%;
  height: 42px;
  padding: 10px 36px 10px 11px;
  appearance: none;
  border: 1px solid var(--lt-border-strong);
  border-radius: 4px;
  background: var(--lt-field);
  color: var(--lt-ink);
  line-height: 1.45;
}
.ltp-select svg { position: absolute; top: 50%; right: 12px; transform: translateY(-50%); color: #66758a; pointer-events: none; }
.ltp-language-model fieldset, .ltp-fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.ltp-language-model legend { margin-bottom: 7px; }

/* 分段选择器（对应 .model-segmented） */
.ltp-segmented {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-height: 42px;
  padding: 3px;
  border-radius: 4px;
  background: #e3e9f0;
}
.ltp-segmented .ltp-choice {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 7px 10px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #526176;
  font-weight: 600;
  text-align: center;
  box-shadow: none;
}
.ltp-segmented .ltp-choice:first-child { border-radius: 6px 0 0 6px; }
.ltp-segmented .ltp-choice:last-child { border-radius: 0 6px 6px 0; }
.ltp-segmented .ltp-choice.selected {
  background: var(--lt-accent-soft);
  color: #8a5a00;
  box-shadow: inset 0 0 0 1px #f3bd4e;
}

.ltp-model-status { margin-top: 18px; color: var(--lt-muted); font-size: 12px; }
.ltp-model-status-line { display: flex; align-items: baseline; gap: 10px; min-height: 18px; }
.ltp-model-status strong { color: var(--lt-ink); white-space: nowrap; }

/* 折叠面板（对应 .preview / .advanced-panel） */
.ltp-disclosure {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--lt-border);
  border-radius: 5px;
  background: var(--lt-field);
  box-shadow: none;
}
.ltp-editor .ltp-disclosure { margin-top: 16px; }
.ltp-disclosure summary {
  display: block;
  padding: 13px 14px;
  color: #53657a;
  font-size: 13px;
  font-weight: 700;
  list-style: none;
  cursor: pointer;
}
/* 官网全局 summary 规则会隐藏系统三角标并追加 "+"，这里恢复桌面版的 ▸ 标记 */
.product-demo summary::-webkit-details-marker { display: none; }
.ltp-disclosure summary::after { content: none; }
.ltp-disclosure summary::before {
  content: "";
  display: inline-block;
  margin: 0 7px 1px 0;
  border-left: 6px solid #98a2b3;
  border-top: 4.5px solid transparent;
  border-bottom: 4.5px solid transparent;
  vertical-align: middle;
  transition: transform 0.15s;
}
.ltp-disclosure[open] summary::before { transform: rotate(90deg); }
.ltp-disclosure ol { max-height: 260px; overflow: auto; margin: 0; padding: 0 14px 12px; list-style: none; }
.ltp-disclosure li { display: grid; grid-template-columns: 28px 1fr; gap: 8px; padding: 9px 2px; border-top: 1px solid #edf0f3; }
.ltp-disclosure li span { color: var(--lt-accent-hover); font: 700 11px ui-monospace, monospace; }
.ltp-disclosure li p { color: #475467; font-size: 13px; line-height: 1.55; overflow-wrap: anywhere; }
.ltp-disclosure .ltp-advanced-content { display: grid; gap: 14px; padding: 2px 14px 14px; }
.ltp-disclosure-copy { padding: 0 14px 12px; color: var(--lt-muted); }

/* 选项网格（对应 .choice-panel / .choice-grid） */
.ltp-fieldset { padding: 12px; border: 1px solid var(--lt-border-strong); border-radius: 5px; background: #fff; }
.ltp-fieldset legend { padding: 0 3px; }
.ltp-choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.ltp-scroll-choices {
  max-height: 144px;
  overflow-y: auto;
  align-content: start;
  padding-right: 10px;
  scrollbar-gutter: stable;
}
.ltp-choice {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 10px 14px;
  overflow: hidden;
  border: 1px solid var(--lt-border);
  border-radius: 6px;
  background: #fff;
  color: #334155;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: border-color 0.15s, background 0.15s;
}
.ltp-choice:hover { border-color: #cbd5e1; background: #f8fafc; }
.ltp-choice.selected {
  border-color: var(--lt-accent);
  background: var(--lt-accent-soft);
  color: #8a5a00;
  box-shadow: inset 0 0 0 1px var(--lt-accent);
}
.ltp-choice.playing {
  border-color: var(--lt-success);
  background: #ecfdf3;
  color: #087a55;
  box-shadow: inset 0 0 0 1px var(--lt-success);
}

/* 场景摘要（对应 .scene-summary） */
.ltp-scene-summary {
  position: relative;
  margin: -2px 0 6px;
  padding: 10px 14px 10px 17px;
  overflow: hidden;
  border-radius: 0 6px 6px 0;
  background: var(--lt-accent-soft);
}
.ltp-scene-summary::before {
  content: "";
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 0;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--lt-accent);
}
.ltp-scene-summary strong { display: block; color: #8a5a00; font-size: 14px; line-height: 1.35; }
.ltp-scene-summary p { margin-top: 3px; color: #7c6a4b; font-size: 12px; line-height: 1.5; }

/* 样音试听行 */
.ltp-sample-line { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.ltp-sample-line button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 4px 12px;
  border: 1px solid var(--lt-border-strong);
  border-radius: 10px;
  background: #fff;
  color: #53657a;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}
.ltp-sample-line button:hover:not(:disabled) { background: #f7f9fb; border-color: #c3cedd; }
.ltp-sample-line button:disabled { border-color: #edf0f3; background: #f8fafc; color: #cbd5e1; }
.ltp-sample-line button.playing { border-color: var(--lt-success); background: #ecfdf3; color: #087a55; }
.ltp-sample-line small { color: var(--lt-soft-muted); font-size: 11px; }

/* 滑杆（对应 .slider-field / .range-line） */
.ltp-sliders { display: grid; gap: 14px; }
.ltp-slider { display: grid; gap: 8px; }
.ltp-slider-head { display: flex; align-items: center; justify-content: space-between; }
.ltp-slider-head > span { color: #66758a; font-size: 13px; font-weight: 700; }
.ltp-slider-output { display: flex; align-items: stretch; }
.ltp-slider output {
  display: grid;
  place-items: center;
  min-width: 62px;
  padding: 3px 8px;
  border: 1px solid var(--lt-border);
  border-radius: 5px 0 0 5px;
  background: #fff;
  color: #344054;
  font: 600 12px ui-monospace, monospace;
  text-align: center;
}
.ltp-slider-reset {
  display: grid;
  place-items: center;
  width: 30px;
  padding: 0;
  border: 1px solid var(--lt-border);
  border-left: 0;
  border-radius: 0 5px 5px 0;
  background: #fff;
  color: #98a2b3;
}
.ltp-slider-reset:hover { color: var(--lt-accent-hover); border-color: var(--lt-border-strong); }
.ltp-range-line {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  color: #6e7f95;
  font-size: 11px;
  font-weight: 500;
}
.ltp-range-line input[type="range"] {
  width: 100%;
  height: 5px;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  border-radius: 4px;
  background: linear-gradient(to right, var(--lt-accent) 0 var(--ltp-range, 50%), #dfe5ed var(--ltp-range, 50%) 100%);
}
.ltp-range-line input[type="range"]::-webkit-slider-thumb {
  width: 17px;
  height: 17px;
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 5px rgba(15, 23, 42, 0.2);
}
.ltp-range-line input[type="range"]::-moz-range-thumb {
  width: 17px;
  height: 17px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 5px rgba(15, 23, 42, 0.2);
}

/* 高级参数网格（对应 .advanced-grid） */
.ltp-advanced-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ltp-advanced-grid label { display: grid; gap: 7px; color: #66758a; font-size: 12px; font-weight: 700; }
.ltp-advanced-grid input, .ltp-manager-form input[type="text"] {
  width: 100%;
  padding: 10px 11px;
  border: 1px solid var(--lt-border-strong);
  border-radius: 4px;
  background: var(--lt-field);
  color: var(--lt-ink);
  line-height: 1.45;
}

/* 警示与通知（对应 .warning） */
.ltp-warning {
  margin: 0;
  padding: 10px 11px;
  border-left: 3px solid var(--lt-accent);
  background: var(--lt-accent-soft);
  color: #8a5a10;
  font-size: 12px;
  line-height: 1.55;
}

/* 主按钮（对应 button.primary） */
.ltp-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: linear-gradient(180deg, #fbb424 0%, #f5a400 100%);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-shadow: 0 1px 1px rgba(150, 95, 0, 0.25);
  box-shadow: 0 1px 2px rgba(190, 124, 0, 0.25), 0 6px 16px rgba(245, 164, 0, 0.28);
  transition: background 0.15s, box-shadow 0.15s, transform 0.05s;
}
.ltp-primary:hover:not(:disabled) {
  background: linear-gradient(180deg, #f5a400 0%, #e59500 100%);
  box-shadow: 0 1px 2px rgba(190, 124, 0, 0.25), 0 8px 20px rgba(245, 164, 0, 0.34);
}
.ltp-primary:active:not(:disabled) { transform: translateY(1px); }
.ltp-primary:disabled {
  background: #f6d9a0;
  color: rgba(255, 255, 255, 0.85);
  text-shadow: none;
  box-shadow: none;
}
.ltp-inline-notice { min-height: 18px; color: #856010; font-size: 11px; line-height: 1.5; }

/* ---------- 表格页（对应 .table-surface / table） ---------- */
.ltp-table-surface { overflow: hidden; margin-bottom: 22px; }
.ltp-table-surface > .ltp-heading { align-items: center; margin: 22px 22px 18px; }
.ltp-table-wrap { width: 100%; overflow-x: auto; padding: 0 22px 22px; }
.ltp-table-wrap table {
  width: 100%;
  min-width: 720px;
  border: 1px solid var(--lt-border);
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 6px;
  overflow: hidden;
  color: var(--lt-ink);
  font-size: 13px;
}
.ltp-table-wrap th {
  height: 46px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--lt-border);
  background: #f7f9fb;
  color: #475467;
  font-weight: 700;
  text-align: left;
  white-space: nowrap;
}
.ltp-table-wrap td {
  height: 54px;
  padding: 12px 14px;
  border-bottom: 1px solid #e7ebf0;
  overflow: hidden;
  vertical-align: middle;
}
.ltp-table-wrap tr:last-child td { border-bottom: 0; }
.ltp-table-wrap tbody tr:hover, .ltp-table-wrap tbody tr.selected { background: #fffcf5; }
.ltp-table-wrap tbody tr[data-history-row] { cursor: pointer; }
.ltp-table-wrap tbody tr[data-history-row]:focus-visible { outline: 2px solid var(--lt-accent); outline-offset: -2px; }
.ltp-table-wrap td.ltp-empty { height: 120px; color: #64748b; text-align: center; }
.ltp-table-wrap th:last-child, .ltp-table-wrap td:last-child { text-align: center; }
.ltp-ellipsis { display: block; min-width: 0; max-width: 250px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ltp-nowrap { white-space: nowrap; }
.ltp-action-group { display: flex; align-items: center; justify-content: center; gap: 8px; }

/* 状态与类型标签（对应 .status / .kind） */
.ltp-status, .ltp-kind {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 5px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.ltp-status.running { background: #ecfdf3; color: #087a55; }
.ltp-status.paused { background: #fff7ed; color: #9a3412; }
.ltp-status.done { background: var(--lt-accent-soft); color: #9a6200; }
.ltp-kind.custom { background: var(--lt-accent-soft); color: #9a6200; }

/* 进度条（对应 .progress） */
.ltp-progress { width: 90px; height: 6px; overflow: hidden; border-radius: 3px; background: #e7ecf2; }
.ltp-progress span { display: block; height: 100%; border-radius: inherit; background: var(--lt-accent); transition: width 0.25s ease; }
.ltp-progress-value { display: block; margin-top: 4px; color: var(--lt-muted); font-size: 11px; }

/* 图标按钮（对应 .icon-button） */
.ltp-icon-button {
  display: inline-grid;
  place-items: center;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  padding: 0;
  border: 1px solid var(--lt-border);
  border-radius: 6px;
  background: #fff;
  color: #64748b;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.ltp-icon-button svg { width: 16px; height: 16px; }
.ltp-icon-button:hover:not(:disabled) { border-color: var(--lt-border-strong); background: #f7f9fb; }
.ltp-icon-button.danger:hover:not(:disabled) { border-color: #fecaca; background: #fef2f2; color: var(--lt-danger); }
.ltp-icon-button:disabled { border-color: #edf0f3; background: #f8fafc; color: #cbd5e1; }
.ltp-icon-button.playing { border-color: var(--lt-accent); background: var(--lt-accent-soft); color: var(--lt-accent-hover); }
.ltp-icon-button.lg { flex-basis: 36px; width: 36px; height: 36px; min-width: 36px; min-height: 36px; color: #526176; }
.ltp-spin { animation: ltp-spin 0.9s linear infinite; }
@keyframes ltp-spin { to { transform: rotate(360deg); } }

/* 分页（对应 .pagination） */
.ltp-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  min-height: 48px;
  margin: -1px 22px 22px;
  padding: 8px 12px;
  border: 1px solid var(--lt-border);
  border-radius: 0 0 6px 6px;
  background: #fafbfc;
  color: var(--lt-muted);
  font-size: 12px;
}
.ltp-pagination-controls { display: flex; align-items: center; gap: 8px; }
.ltp-pagination-indicator { min-width: 48px; color: #475467; font-weight: 700; text-align: center; white-space: nowrap; }
.ltp-pagination .ltp-icon-button { flex-basis: 30px; width: 30px; height: 30px; min-width: 30px; min-height: 30px; color: #526176; }
.ltp-pagination .ltp-icon-button svg { width: 15px; height: 15px; }

/* ---------- 任务详情（网页演示补充说明区） ---------- */
.ltp-task-detail {
  margin-top: 14px;
  padding: 15px 17px;
  border: 1px solid #e4d6b8;
  border-radius: 7px;
  background: #fffbf1;
  color: #39485a;
}
.ltp-task-detail:empty { display: none; }
.ltp-task-detail p { max-height: 90px; overflow: auto; margin: 6px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.ltp-task-detail small { color: #80663d; }

/* ---------- 管理页布局（对应 .manager-layout / .history-layout） ---------- */
.ltp-manager-grid { display: grid; grid-template-columns: minmax(340px, 5.1fr) minmax(0, 7fr); align-items: stretch; gap: 18px; }
.ltp-history-grid { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(320px, 1fr); align-items: start; gap: 18px; }
.ltp-manager-form { display: grid; align-content: start; gap: 17px; padding: 22px; }
.ltp-manager-form .ltp-heading { margin-bottom: 0; }
.ltp-form-fields { display: grid; gap: 16px; padding: 12px; border: 1px solid var(--lt-border-strong); border-radius: 5px; }
.ltp-manager-form label { display: grid; gap: 7px; }
.ltp-field-label { display: flex; align-items: baseline; gap: 4px; }
.ltp-required { color: var(--lt-danger); }

/* 上传 / 录音切换（对应音色管理左栏） */
.ltp-source-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--lt-border);
  border-radius: 5px;
  background: #f7f9fb;
}
.ltp-source-tabs button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 35px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: #526176;
  font-size: 12px;
  font-weight: 650;
}
.ltp-source-tabs button.selected { border-color: #f3d8a4; background: var(--lt-accent-soft); color: #8a5a00; }
.ltp-dropzone {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
  min-height: 205px;
  padding: 16px;
  border: 1px solid var(--lt-border);
  border-radius: 5px;
  color: #475467;
  text-align: center;
}
.ltp-dropzone .ltp-drop-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--lt-accent-soft);
  color: #a56600;
}
.ltp-drop-icon svg { width: 24px; height: 24px; }
.ltp-dropzone small { color: var(--lt-soft-muted); font-size: 11px; }

/* ---------- 历史页 ---------- */
.ltp-history-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 48px;
  margin-bottom: 16px;
}
.ltp-history-toolbar p { color: var(--lt-muted); font-size: 12px; line-height: 1.55; }
.ltp-history-detail { min-height: 340px; padding: 22px; }
.ltp-history-detail .ltp-heading { margin-bottom: 14px; }
.ltp-history-empty { display: grid; place-content: center; min-height: 230px; color: var(--lt-muted); font-size: 13px; line-height: 1.6; text-align: center; }
.ltp-history-text {
  min-height: 120px;
  max-height: 200px;
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--lt-border);
  border-radius: 8px;
  background: var(--lt-field);
  color: #344054;
  font-size: 13px;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.ltp-metadata { margin-top: 10px; color: var(--lt-muted); font-size: 12px; line-height: 1.7; }
.ltp-file-state { margin-top: 10px; font-size: 12px; font-weight: 600; color: #087a55; }
.ltp-history-detail audio { width: 100%; margin: 12px 0 5px; }
.ltp-history-detail small { color: var(--lt-soft-muted); font-size: 11px; }

/* ---------- 窗口外说明 ---------- */
.ltp-outside { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 12px 2px 0; }
.ltp-outside p { color: #7f899a; font-size: 12px; }
.ltp-outside a { color: #b76a00; font-size: 12px; font-weight: 700; text-decoration: underline; }
.ltp-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

/* ---------- 无 JS 回退 ---------- */
.ltp-noscript {
  padding: 34px 28px;
  border: 1px solid var(--lt-border);
  border-radius: 14px;
  background: var(--lt-bg);
  text-align: center;
}
.ltp-noscript p { max-width: 560px; margin: 0 auto 16px; color: #475467; font-size: 14px; line-height: 1.7; }
.ltp-noscript a {
  display: inline-block;
  padding: 11px 22px;
  border-radius: 10px;
  background: linear-gradient(180deg, #fbb424, #f5a400);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}

/* ---------- 响应式：保留工作台风格，窄屏改为可操作的单栏 ---------- */
@media (max-width: 1100px) {
  .ltp-app { display: block; width: 100%; min-height: 0; transform: none; }
  .ltp-sidebar { position: static; height: auto; padding: 0 14px 12px; border-right: 0; border-bottom: 1px solid var(--lt-border); }
  .ltp-brand { min-height: 68px; padding: 10px 4px; }
  .ltp-brand img, .guide-main .ltp-brand img { width: 36px; height: 36px; }
  .ltp-brand strong { font-size: 18px; }
  .ltp-nav-caption, .ltp-connection { display: none; }
  .ltp-nav { display: flex; gap: 6px; overflow-x: auto; padding: 10px 0 0; scrollbar-width: thin; }
  .ltp-nav button { flex: 0 0 auto; width: auto; min-height: 40px; padding: 8px 10px; white-space: nowrap; }
  .ltp-page-header { flex-wrap: wrap; gap: 8px; min-height: 0; padding: 18px 16px; }
  .ltp-page-header h2 { font-size: 20px; }
  .ltp-page-body { padding: 16px; }
  .ltp-create-grid { grid-template-columns: minmax(0, 1fr); }
  .ltp-editor, .ltp-settings, .ltp-manager-form, .ltp-history-detail { padding: 16px; }
  .ltp-editor textarea { height: 260px; }
  .ltp-language-model { grid-template-columns: minmax(0, 1fr); }
  .ltp-manager-grid, .ltp-history-grid { grid-template-columns: minmax(0, 1fr); }
  .ltp-table-surface > .ltp-heading { margin: 16px; }
  .ltp-table-wrap { padding: 0 16px 16px; }
  .ltp-outside { display: block; }
  .ltp-outside a { display: inline-block; margin-top: 5px; }
}
@media (max-width: 380px) {
  .ltp-choice-grid { gap: 6px; }
  .ltp-choice { padding: 8px; font-size: 12px; }
  .ltp-scene-summary p { overflow-wrap: anywhere; }
}
@media (prefers-reduced-motion: reduce) {
  .ltp-spin { animation: none; }
  .ltp-progress span { transition: none; }
}
