/* ============================================================
   快速工具：横屏转竖屏 / 抽帧存壁纸
   ============================================================ */
:root {
  --bg: #08080a;
  --bg-1: #0e0e12;
  --bg-2: #14141a;
  --bg-3: #1b1b23;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.16);
  --text: #f2f2f5;
  --soft: #a8a8b6;
  --dim: #74748a;
  --accent: #e5ff00;
  --danger: #ff5b5b;
  --ok: #45e39a;
  --r: 12px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body {
  margin: 0; padding: 0; height: 100%;
  background: var(--bg); color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a, a:hover, a:focus, a:active, a:visited { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input, select { font-family: inherit; font-size: 13px; }
::selection { background: var(--accent); color: #000; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.tl-app { display: flex; flex-direction: column; height: 100dvh; overflow: hidden; }

/* ---------------- 顶栏 ---------------- */
.tl-top {
  height: 56px; flex: none;
  display: flex; align-items: center; gap: 10px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(10, 10, 13, 0.9);
  backdrop-filter: blur(16px);
  z-index: 20;
}
.tl-back {
  width: 34px; height: 34px; flex: none; border-radius: 10px;
  display: grid; place-items: center;
  background: var(--bg-2); border: 1px solid var(--line); color: var(--soft);
  transition: 0.18s var(--ease);
}
.tl-back:hover { color: #fff; background: var(--bg-3); border-color: var(--line-2); }
.tl-head { flex: 1; min-width: 0; }
.tl-head h1 {
  margin: 0; font-size: 13.5px; font-weight: 650; letter-spacing: -0.01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tl-sub {
  font-size: 11.5px; color: var(--dim); margin-top: 1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tl-link {
  flex: none; font-size: 12px; color: var(--dim);
  padding: 6px 11px; border-radius: 100px; border: 1px solid var(--line);
  transition: 0.18s var(--ease);
  white-space: nowrap;
}
.tl-link:hover { color: var(--text); border-color: var(--line-2); }

/* ---------------- 主体 ---------------- */
.tl-main {
  flex: 1; min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 392px;
}

/* ---------------- 预览区 ---------------- */
.tl-stage {
  min-width: 0; min-height: 0;
  display: flex; flex-direction: column;
  overflow: hidden; padding-bottom: 6px;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(229, 255, 0, 0.045), transparent 60%),
    #050506;
}
.tl-stage-wrap {
  flex: 1; min-height: 0; min-width: 0;
  display: grid; place-items: center;
  padding: 22px;
}
.tl-inner {
  position: relative; overflow: hidden;
  border-radius: 10px; background: #000;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  touch-action: none;
  cursor: grab;
  user-select: none;
}
.tl-inner:active { cursor: grabbing; }
.tl-inner video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: contain; display: block;
}

/* 裁切框：外部压暗 */
.tl-crop {
  position: absolute;
  border: 1.5px solid var(--accent);
  box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0.66);
  pointer-events: none;
  transition: left 0.06s linear, top 0.06s linear, width 0.06s linear, height 0.06s linear;
}
.tl-crop i.c {
  position: absolute; width: 12px; height: 12px;
  border: 2px solid var(--accent); border-radius: 2px;
}
.tl-crop .c1 { left: -1px; top: -1px; border-right: 0; border-bottom: 0; }
.tl-crop .c2 { right: -1px; top: -1px; border-left: 0; border-bottom: 0; }
.tl-crop .c3 { left: -1px; bottom: -1px; border-right: 0; border-top: 0; }
.tl-crop .c4 { right: -1px; bottom: -1px; border-left: 0; border-top: 0; }
.tl-crop-tag {
  position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%);
  font-size: 11px; line-height: 1; padding: 5px 9px; border-radius: 100px;
  background: rgba(0, 0, 0, 0.62); color: var(--accent);
  white-space: nowrap; letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}
.tl-drag-hint {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  font-size: 12px; color: #fff; padding: 8px 14px; border-radius: 100px;
  background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(6px);
  pointer-events: none; opacity: 0; transition: opacity 0.35s var(--ease);
  white-space: nowrap;
}
.tl-drag-hint.show { opacity: 1; }

/* 指针特效的引导提示：一直挂在画面下沿，划过一下就不再打扰 */
.tl-fx-hint {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%);
  z-index: 6; font-size: 12px; color: #fff; padding: 7px 14px; border-radius: 100px;
  background: rgba(0, 0, 0, 0.52); border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
  pointer-events: none; white-space: nowrap;
  animation: fxHintFloat 2.4s ease-in-out infinite;
}
.tl-fx-hint[hidden] { display: none; }
@keyframes fxHintFloat {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.82; }
  50% { transform: translateX(-50%) translateY(-4px); opacity: 1; }
}

.tl-crop.full {
  box-shadow: none;
  border-style: dashed;
  border-color: rgba(255, 255, 255, 0.34);
}
.tl-crop.full i.c { display: none; }

/* 播放条 */
.tl-bar {
  flex: none; height: 52px;
  display: flex; align-items: center; gap: 12px;
  padding: 0 18px;
  border-top: 1px solid var(--line);
  background: rgba(10, 10, 13, 0.7);
}
.tl-play {
  width: 34px; height: 34px; flex: none; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.07); color: var(--text);
  border: 1px solid var(--line);
  transition: 0.18s var(--ease);
}
.tl-play:hover { background: rgba(255, 255, 255, 0.13); }
.tl-seek {
  -webkit-appearance: none; appearance: none;
  flex: 1; min-width: 0; height: 4px; border-radius: 4px;
  background: rgba(255, 255, 255, 0.14); outline: none; cursor: pointer;
}
.tl-seek::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--accent); border: 0;
  box-shadow: 0 0 0 4px rgba(229, 255, 0, 0.16);
}
.tl-seek::-moz-range-thumb {
  width: 14px; height: 14px; border-radius: 50%; background: var(--accent); border: 0;
}
.tl-time {
  flex: none; font-size: 11.5px; color: var(--dim);
  font-variant-numeric: tabular-nums; display: flex; gap: 4px; align-items: baseline;
}
.tl-time b { color: var(--text); font-weight: 600; }

/* ---------------- 右栏 ---------------- */
.tl-side {
  min-width: 0; min-height: 0;
  overflow-y: auto; overscroll-behavior: contain;
  border-left: 1px solid var(--line);
  background: var(--bg-1);
  padding: 14px 14px calc(18px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 12px;
}
.tl-side::-webkit-scrollbar { width: 8px; }
.tl-side::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.12); border-radius: 8px; }

/* 壁纸类型：三个大按钮，先选类型再调参数 */
.tl-kinds {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px;
  background: var(--bg-2); border: 1px solid var(--line);
  padding: 5px; border-radius: 13px;
  position: sticky; top: -14px; z-index: 5;
}
.tl-kinds button {
  min-width: 0; padding: 8px 4px 7px; border-radius: 10px;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  color: var(--soft); transition: 0.2s var(--ease);
}
.tl-kinds button svg { opacity: 0.85; }
.tl-kinds button b {
  font-size: 12.5px; font-weight: 650; letter-spacing: 0.01em;
  white-space: nowrap;
}
.tl-kinds button em {
  font-style: normal; font-size: 10px; color: var(--dim);
  white-space: nowrap;
}
.tl-kinds button.on { background: var(--accent); color: #111; }
.tl-kinds button.on em { color: rgba(0, 0, 0, 0.55); }
.tl-kinds button.on svg { opacity: 1; }
.tl-kinds button:not(.on):hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }

.tl-intro {
  margin: 0; font-size: 12.5px; line-height: 1.6; color: var(--soft);
  padding: 9px 11px; border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line);
}

.tl-pane { display: none; flex-direction: column; gap: 12px; }
.tl-pane.on { display: flex; }

.tl-block { display: flex; flex-direction: column; gap: 8px; }
.tl-label {
  font-size: 11px; color: var(--dim); letter-spacing: 0.06em;
  font-weight: 600; text-transform: uppercase;
}

/* 尺寸卡片 */
.tl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.tl-grid button {
  text-align: left; padding: 9px 11px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--bg-2);
  display: flex; flex-direction: column; gap: 1px;
  transition: 0.16s var(--ease);
}
.tl-grid button:hover { border-color: var(--line-2); background: var(--bg-3); }
.tl-grid button b { font-size: 13px; font-weight: 650; font-variant-numeric: tabular-nums; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-grid button em { font-size: 10.5px; font-style: normal; color: var(--dim); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-grid button.on {
  border-color: var(--accent); background: rgba(229, 255, 0, 0.09);
}
.tl-grid button.on b { color: var(--accent); }
.tl-grid button.on em { color: rgba(229, 255, 0, 0.62); }

/* 处理方式 */
.tl-radios { display: flex; flex-direction: column; gap: 6px; }
.tl-radios button {
  text-align: left; padding: 9px 12px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--bg-2);
  display: flex; flex-direction: column; gap: 1px;
  transition: 0.16s var(--ease);
}
.tl-radios button:hover { border-color: var(--line-2); }
.tl-radios button b { font-size: 12.5px; font-weight: 600; }
.tl-radios button em { font-size: 10.5px; font-style: normal; color: var(--dim); }
.tl-radios button.on { border-color: var(--accent); background: rgba(229, 255, 0, 0.08); }
.tl-radios button.on b { color: var(--accent); }

/* 指针的两种反应：两个都能开 */
.tl-subblock {
  margin-top: 2px; padding: 9px 10px 10px;
  border-radius: 10px; border: 1px dashed var(--line-2);
  background: rgba(255, 255, 255, 0.025);
  display: flex; flex-direction: column; gap: 7px;
}
.tl-label.sm { font-size: 10.5px; text-transform: none; letter-spacing: 0.02em; display: flex; align-items: center; gap: 7px; }
.tl-label.sm em { font-style: normal; font-size: 10px; color: rgba(229, 255, 0, 0.75); }
.tl-pills { display: flex; gap: 6px; }
.tl-pills button {
  flex: 1; padding: 8px 6px; border-radius: 100px;
  border: 1px solid var(--line); background: var(--bg-2); color: var(--soft);
  font-size: 11.5px; font-weight: 600; transition: 0.16s var(--ease);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tl-pills button:hover { color: var(--text); border-color: var(--line-2); }
.tl-pills button.on {
  background: rgba(229, 255, 0, 0.14); border-color: rgba(229, 255, 0, 0.6); color: var(--accent);
}
.tl-pills button.on::before { content: '✓ '; font-weight: 700; }

/* 表情设置面板 */
.tl-emoji {
  position: fixed; z-index: 60; width: min(302px, calc(100vw - 24px));
  padding: 13px; border-radius: 16px;
  background: rgba(18, 18, 22, 0.98);
  border: 1px solid var(--line-2);
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(24px);
  display: flex; flex-direction: column; gap: 10px;
  animation: emojiIn 0.18s var(--ease) both;
}
.tl-emoji[hidden] { display: none; }
@keyframes emojiIn { from { opacity: 0; transform: translateY(6px) scale(0.98); } to { opacity: 1; transform: none; } }
.tl-emoji-h { display: flex; align-items: center; justify-content: space-between; }
.tl-emoji-h b { font-size: 12.5px; font-weight: 700; }
.tl-emoji-list { display: flex; flex-wrap: wrap; gap: 6px; max-height: 168px; overflow-y: auto; }
.tl-emoji-chip {
  position: relative; width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center; font-size: 19px; line-height: 1;
  background: var(--bg-2); border: 1px solid var(--line);
}
.tl-emoji-chip button {
  position: absolute; top: -6px; right: -6px;
  width: 16px; height: 16px; border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.5);
  background: #4a4a55; color: #fff;
  font-size: 11px; line-height: 1; display: grid; place-items: center;
  cursor: pointer; padding: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}
.tl-emoji-chip button:hover { background: #ff453a; color: #fff; border-color: transparent; }
.tl-emoji-add { display: flex; gap: 6px; }
.tl-emoji-add input {
  flex: 1; min-width: 0; padding: 8px 10px; border-radius: 9px;
  border: 1px solid var(--line); background: var(--bg-2); color: var(--text);
  font-size: 13px; outline: none;
}
.tl-emoji-add input:focus { border-color: rgba(229, 255, 0, 0.5); }
.tl-emoji-add button {
  padding: 0 13px; border-radius: 9px; font-size: 12px; font-weight: 650;
  border: 1px solid rgba(229, 255, 0, 0.5); background: rgba(229, 255, 0, 0.14);
  color: var(--accent); cursor: pointer;
}
.tl-emoji-add button:hover { background: rgba(229, 255, 0, 0.24); }

/* 小胶囊按钮 */
.tl-chips, .tl-range { display: flex; flex-wrap: wrap; gap: 6px; }
.tl-chips button {
  padding: 7px 13px; border-radius: 100px; font-size: 12.5px;
  border: 1px solid var(--line); background: var(--bg-2); color: var(--soft);
  transition: 0.16s var(--ease);
}
.tl-chips button:hover { color: var(--text); border-color: var(--line-2); }
.tl-chips button.on { background: var(--accent); border-color: var(--accent); color: #111; font-weight: 650; }

.tl-range { align-items: center; gap: 8px; margin-top: 2px; }
.tl-range label {
  display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--dim);
  border: 1px solid var(--line); border-radius: 9px; padding: 5px 9px; background: var(--bg-2);
}
.tl-range input {
  width: 54px; background: none; border: 0; color: var(--text);
  font-variant-numeric: tabular-nums; outline: none; font-size: 13px;
}
.tl-mini {
  font-size: 11.5px; color: var(--soft); padding: 6px 10px;
  border-radius: 100px; border: 1px solid var(--line); background: var(--bg-2);
}
.tl-mini:hover { color: var(--text); border-color: var(--line-2); }

.tl-note { margin: 0; font-size: 11.5px; color: var(--dim); font-variant-numeric: tabular-nums; }

/* 选帧 */
.tl-pick {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--line); border-radius: 11px; padding: 9px 11px;
  background: var(--bg-2);
}
.tl-round {
  width: 34px; height: 34px; flex: none; border-radius: 50%;
  border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.05);
  font-size: 18px; line-height: 1; display: grid; place-items: center;
  transition: 0.16s var(--ease);
}
.tl-round:hover { background: rgba(255, 255, 255, 0.12); }
.tl-frame-time { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tl-frame-time b { font-size: 15px; font-variant-numeric: tabular-nums; color: var(--accent); }
.tl-frame-time span { font-size: 10.5px; color: var(--dim); }

/* 提示 */
.tl-tip {
  font-size: 11.5px; line-height: 1.6; color: var(--dim);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 10px; padding: 9px 11px;
  background: rgba(255, 255, 255, 0.015);
}
.tl-tip b { color: var(--soft); font-weight: 600; }

/* 主按钮 */
.tl-run {
  width: 100%; height: 46px; flex: none;
  border-radius: 12px; background: var(--accent); color: #101010;
  font-size: 14px; font-weight: 700; letter-spacing: 0.01em;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: 0.16s var(--ease);
}
.tl-run:hover { filter: brightness(1.07); }
.tl-run:active { transform: scale(0.99); }
.tl-run[disabled] { opacity: 0.5; pointer-events: none; }
.tl-ghost {
  height: 46px; border-radius: 12px; padding: 0 18px;
  border: 1px solid var(--line-2); color: var(--soft); font-size: 13.5px;
  display: grid; place-items: center;
}
.tl-ghost:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }

/* 进度 */
.tl-progress {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--line); border-radius: 11px;
  background: var(--bg-2); padding: 9px 11px;
}
.tl-progress[hidden] { display: none; }
.tl-pg { flex: 1; min-width: 0; height: 5px; border-radius: 5px; background: rgba(255, 255, 255, 0.12); overflow: hidden; }
.tl-pg i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 5px; transition: width 0.25s linear; }
/* 网络取数据阶段没有真实百分比，用流动条表示在动 */
.tl-pg i.indet { width: 34%; animation: indet 1.15s ease-in-out infinite; }
@keyframes indet { 0% { margin-left: -34%; } 100% { margin-left: 100%; } }
.tl-pg-text { display: flex; align-items: baseline; gap: 6px; font-size: 11.5px; color: var(--dim); white-space: nowrap; }
.tl-pg-text b { color: var(--text); font-variant-numeric: tabular-nums; }
.tl-cancel { font-size: 11.5px; color: var(--danger); padding: 3px 8px; border-radius: 100px; border: 1px solid rgba(255, 91, 91, 0.3); }

.tl-foot-tip { margin: 0; font-size: 11px; color: #5c5c6e; line-height: 1.6; }

/* ---------------- 结果弹层 ---------------- */
.tl-modal {
  position: fixed; inset: 0; z-index: 60;
  display: grid; place-items: center;
  padding: 18px;
  background: rgba(4, 4, 6, 0.78);
  backdrop-filter: blur(10px);
  animation: fade 0.18s var(--ease);
}
.tl-modal[hidden] { display: none; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.tl-card {
  width: 100%; max-width: 512px; max-height: 92dvh; overflow: auto;
  background: var(--bg-1); border: 1px solid var(--line-2);
  border-radius: 16px; padding: 16px;
  display: flex; flex-direction: column; gap: 12px;
  animation: pop 0.26s var(--ease);
}
@keyframes pop { from { transform: translateY(10px) scale(0.985); opacity: 0; } to { transform: none; opacity: 1; } }
.tl-card-head { display: flex; align-items: center; justify-content: space-between; }
.tl-card-head b { font-size: 14.5px; }
.tl-x { width: 30px; height: 30px; border-radius: 8px; font-size: 20px; color: var(--dim); line-height: 1; }
.tl-x:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.tl-card-media {
  border-radius: 10px; overflow: hidden; background: #000;
  display: grid; place-items: center; max-height: 46dvh;
}
.tl-card-media img, .tl-card-media video { max-width: 100%; max-height: 46dvh; display: block; object-fit: contain; }
.tl-card-meta { font-size: 12px; color: var(--soft); font-variant-numeric: tabular-nums; }
.tl-card-meta span { color: var(--dim); }
.tl-card-actions { display: flex; gap: 8px; }
.tl-card-actions .tl-run { flex: 1; text-decoration: none; }
.tl-card-tip { margin: 0; font-size: 11px; color: #5c5c6e; }

/* ---------------- 时间轴缩略图 ---------------- */
.tl-strip {
  flex: none;
  display: flex; gap: 2px; margin: 8px 6px 6px;
  border-radius: 6px; overflow: hidden;
}
.tl-strip { animation: stripIn 0.3s var(--ease); }
@keyframes stripIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.tl-strip { align-items: flex-start; }
.tl-strip button {
  flex: 1 1 0; min-width: 0; height: auto; padding: 0;
  border: 0; border-radius: 0; cursor: pointer;
  background-color: var(--bg-3); background-repeat: no-repeat;
  opacity: 0.62; transition: opacity 0.15s var(--ease);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.4);
}
.tl-strip button:hover { opacity: 0.9; }
.tl-strip button.on { opacity: 1; box-shadow: inset 0 0 0 2px var(--accent); }

/* ---------------- 结果：装上去什么样 ---------------- */
.tl-sim-wrap { display: flex; flex-direction: column; gap: 9px; }
/* 桌面 / 手机效果切换 */
.tl-sim-tabs { display: flex; gap: 4px; padding: 3px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--line); }
.tl-sim-tabs button {
  flex: 1; padding: 6px 8px; border-radius: 8px; font-size: 12px; color: var(--soft);
  transition: 0.16s var(--ease); white-space: nowrap;
}
.tl-sim-tabs button:hover { color: var(--text); }
.tl-sim-tabs button.on { background: rgba(255, 255, 255, 0.09); color: var(--text); font-weight: 600; }

.tl-sim {
  position: relative; width: 100%; aspect-ratio: 16 / 10;
  border-radius: 12px; overflow: hidden; background: #0b0b0f;
  border: 1px solid var(--line-2);
}
.tl-sim.phone { width: auto; height: 300px; max-width: 100%; align-self: center; aspect-ratio: 9 / 19.5; }
.tl-sim-wall { position: absolute; inset: -3%; background: #111 center / cover no-repeat; }
.tl-sim-wall video { display: block; width: 100%; height: 100%; object-fit: cover; }
.tl-sim-wall iframe { display: block; width: 100%; height: 100%; border: 0; background: #000; }
.tl-sim-layer { position: absolute; inset: 0; pointer-events: none; }

.sim-shade {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.1) 34%, transparent 62%);
}
.sim-shade.lock { background: linear-gradient(to bottom, rgba(0, 0, 0, 0.46), rgba(0, 0, 0, 0.18) 26%, transparent 52%); }
.sim-icons { position: absolute; left: 9px; top: 9px; display: flex; flex-direction: column; gap: 10px; }
.sim-icons u {
  width: 22px; height: 22px; border-radius: 5px; position: relative;
  background: rgba(18, 18, 24, 0.42);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.34), 0 1px 5px rgba(0, 0, 0, 0.3);
}
.sim-icons u::after {
  content: ''; position: absolute; left: 50%; bottom: -5px; width: 19px; height: 3px;
  border-radius: 2px; background: rgba(255, 255, 255, 0.5); transform: translateX(-50%);
}
.sim-task {
  position: absolute; left: 0; right: 0; bottom: 0; height: 25px;
  background: rgba(6, 6, 10, 0.62); backdrop-filter: blur(6px);
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  display: flex; align-items: center; justify-content: center; gap: 7px;
}
.sim-task u { width: 13px; height: 13px; border-radius: 3px; background: rgba(255, 255, 255, 0.42); }
.sim-clock { position: absolute; right: 12px; top: 9px; text-align: right; color: #fff; line-height: 1.3; max-width: 62%; }
.sim-clock b { display: block; font-size: 13px; font-weight: 500; text-shadow: 0 1px 7px rgba(0, 0, 0, 0.6); }
.sim-clock em { display: block; font-size: 9px; font-style: normal; opacity: 0.86; text-shadow: 0 1px 7px rgba(0, 0, 0, 0.6); }

.sim-lock { position: absolute; left: 0; right: 0; top: 10%; text-align: center; color: #fff; }
.sim-lock b {
  display: block; font-size: 29px; font-weight: 300; line-height: 1.1;
  letter-spacing: 0.5px; text-shadow: 0 2px 14px rgba(0, 0, 0, 0.45);
}
.sim-lock em {
  display: block; margin-top: 2px; font-size: 9.5px; font-style: normal;
  opacity: 0.84; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
}
.sim-torch {
  position: absolute; left: 0; right: 0; bottom: 15px;
  display: flex; justify-content: space-between; padding: 0 18px;
}
.sim-torch u { width: 26px; height: 26px; border-radius: 50%; background: rgba(0, 0, 0, 0.4); }

/* ---------------- 结果：怎么设 ---------------- */
.tl-steps { border: 1px solid var(--line); border-radius: 11px; padding: 11px 12px; }
.tl-steps-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 7px; }
.tl-steps-head b { font-size: 12.5px; }
.tl-devs { display: inline-flex; gap: 2px; background: rgba(255, 255, 255, 0.05); padding: 2px; border-radius: 7px; }
.tl-devs button { font-size: 10.5px; padding: 3px 7px; border-radius: 5px; color: var(--dim); }
.tl-devs button.on { background: rgba(255, 255, 255, 0.11); color: var(--text); }
.tl-steps-list { margin: 0; padding-left: 17px; font-size: 12px; color: var(--soft); line-height: 1.72; }
.tl-steps-list li::marker { color: var(--accent); }
.tl-steps-list b { color: var(--text); font-weight: 500; }

/* ---------------- 结果：HTML 壁纸 ---------------- */
.tl-hw {
  border: 1px dashed var(--line-2); border-radius: 11px; padding: 11px 12px;
  display: flex; flex-direction: column; gap: 8px;
}
.tl-hw-head b { display: block; font-size: 12.5px; }
.tl-hw-head span { display: block; margin-top: 1px; font-size: 10.5px; color: var(--dim); }
.tl-hw-motions { display: flex; gap: 4px; }
.tl-hw-motions button {
  flex: 1; min-width: 0; padding: 6px 2px; border-radius: 7px;
  border: 1px solid var(--line-2); color: var(--dim);
  font-size: 11px; white-space: nowrap;
}
.tl-hw-motions button.on { border-color: var(--accent); color: var(--accent); }
.tl-hw-build {
  height: 34px; border-radius: 8px; border: 1px solid var(--line-2);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; color: var(--text); text-decoration: none;
}
.tl-hw-build:hover { border-color: var(--accent); color: var(--accent); }
.tl-hw-build.done { background: var(--accent); border-color: var(--accent); color: #14140a; font-weight: 500; }
.tl-hw-build[disabled] { opacity: 0.6; }
.tl-hw-note { margin: 0; font-size: 10.5px; color: #5c5c6e; line-height: 1.55; }
.tl-hw-note a { color: var(--accent); }

/* ---------------- 发布到站上 ---------------- */
.tl-pub {
  border: 1px solid var(--line-2); border-radius: 11px; padding: 11px 12px;
  display: flex; flex-direction: column; gap: 8px;
  background: rgba(229, 255, 0, 0.035);
}
.tl-pub[hidden] { display: none !important; }
.tl-pub-head b { display: block; font-size: 12.5px; }
.tl-pub-head span {
  display: inline-block; margin-top: 3px; font-size: 10px; color: var(--accent);
  border: 1px solid rgba(229, 255, 0, 0.35); border-radius: 5px; padding: 1px 6px;
}
.tl-pub-fields { display: flex; gap: 6px; }
.tl-pub-fields input {
  flex: 1; min-width: 0; height: 32px; padding: 0 9px; border-radius: 8px;
  border: 1px solid var(--line-2); background: var(--bg-2); color: var(--text);
  font-size: 12px;
}
.tl-pub-fields input:focus { border-color: var(--accent); outline: none; }
@media (max-width: 640px) {
  .tl-pub-fields { flex-direction: column; }
  .tl-pub-fields input { font-size: 16px; height: 38px; }
}

/* ---------------- Toast ---------------- */
.tl-toast {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 14px);
  background: rgba(20, 20, 26, 0.96); border: 1px solid var(--line-2);
  color: var(--text); font-size: 12.5px; padding: 9px 16px; border-radius: 100px;
  opacity: 0; pointer-events: none; transition: 0.25s var(--ease); z-index: 80;
  max-width: calc(100vw - 40px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tl-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------------- 手机 ---------------- */
@media (max-width: 940px) {
  .tl-app { height: auto; min-height: 100dvh; overflow: visible; }
  .tl-main { grid-template-columns: 1fr; }
  .tl-stage { background: #050506; }
  .tl-stage-wrap { height: 46dvh; min-height: 210px; padding: 14px; }
  .tl-side {
    border-left: 0; border-top: 1px solid var(--line);
    overflow: visible; border-radius: 16px 16px 0 0; margin-top: -2px;
  }
  .tl-kinds { top: 0; }
  .tl-bar { padding: 0 12px; gap: 9px; height: 48px; }
  .tl-time { font-size: 11px; }
  /* iOS 聚焦不放大：控件字号 ≥16px */
  input, select, .tl-range input { font-size: 16px; }
  .tl-range input { width: 62px; }
  .tl-grid button b { font-size: 13.5px; }
  .tl-grid button em { font-size: 11px; }
  .tl-card { max-width: 100%; }
  .tl-toast { bottom: calc(18px + env(safe-area-inset-bottom)); }
}
@media (max-width: 420px) {
  .tl-grid { grid-template-columns: 1fr 1fr; }
  .tl-head h1 { font-size: 12.5px; }
}

/* ================= 三合一：上传入口 / 图片底图 / 特效层 ================= */
.tl-acts { margin-left: auto; display: flex; align-items: center; gap: 7px; }
.tl-acts .tl-link { display: inline-flex; align-items: center; gap: 5px; }
.tl-acts .tl-link.accent { color: var(--accent); border-color: rgba(229, 255, 0, 0.32); }
.tl-acts .tl-link.accent:hover { background: rgba(229, 255, 0, 0.08); }

/* 图片底图 */
.tl-inner img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain; display: block;
}
/* 特效粒子层 */
.tl-inner canvas#fx {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; display: none;
}
.tl-inner.fx-mode canvas#fx { display: block; }
.tl-inner.fx-mode .tl-crop { box-shadow: none; border-color: rgba(229, 255, 0, 0.5); }
.tl-inner.fx-mode .tl-crop-tag { display: none; }
.tl-inner.fx-mode .tl-crop.full { box-shadow: none; border-color: rgba(229, 255, 0, 0.3); }

/* 空状态：拖放区 */
.tl-inner.no-src { width: 78% !important; height: auto !important; aspect-ratio: 16 / 9; }
.tl-drop {
  position: absolute; inset: 0; z-index: 3;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 5px; text-align: center; padding: 22px;
  background: radial-gradient(120% 120% at 50% 0%, #16161c 0%, #0b0b0f 70%);
  cursor: pointer;
}
.tl-drop-ico {
  width: 46px; height: 46px; border-radius: 13px; margin-bottom: 6px;
  display: grid; place-items: center;
  border: 1px solid var(--line-2); color: var(--accent);
  background: rgba(229, 255, 0, 0.05);
}
.tl-drop b { font-size: 13px; color: var(--text); font-weight: 650; }
.tl-drop span { font-size: 11.5px; color: var(--dim); max-width: 270px; line-height: 1.65; }
.tl-inner.drag-over { outline: 2px dashed var(--accent); outline-offset: -9px; }
.tl-inner.drag-over .tl-drop { background: rgba(229, 255, 0, 0.06); }

/* 特效选择网格 */
.tl-fx { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.tl-fx button {
  text-align: left; padding: 9px 10px; border-radius: 10px; min-width: 0;
  border: 1px solid var(--line); background: var(--bg-2);
  display: flex; flex-direction: column; gap: 1px;
  transition: 0.16s var(--ease);
}
.tl-fx button:hover { border-color: var(--line-2); background: var(--bg-3); }
.tl-fx button u {
  text-decoration: none; font-size: 9px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--dim);
}
.tl-fx button b { font-size: 12.5px; font-weight: 650; }
.tl-fx button em {
  font-style: normal; font-size: 10px; color: var(--dim);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%;
}
.tl-fx button.on { border-color: var(--accent); background: rgba(229, 255, 0, 0.09); }
.tl-fx button.on b { color: var(--accent); }
.tl-fx button.on u { color: rgba(229, 255, 0, 0.6); }

/* 浓度滑块 */
.tl-amt { display: flex; align-items: center; gap: 10px; }
.tl-amt input[type="range"] { flex: 1; accent-color: var(--accent); }
.tl-amt span {
  font-size: 12px; color: var(--accent); min-width: 36px; text-align: right;
  font-variant-numeric: tabular-nums;
}

.tl-mini.wide { display: block; width: 100%; margin-top: 7px; padding: 8px 12px; text-align: center; }
