/* =========================================================
   剪造 · 真实版 MVP
   ========================================================= */

:root {
  --paper: #f2eee6;
  --surface: #fffdf8;
  --surface-soft: #faf6ee;
  --ink: #171613;
  --ink-soft: #39352e;
  --muted: #827a6d;
  --muted-2: #a49b8c;
  --line: #ded6c8;
  --line-soft: #ebe5da;
  --accent: #ff5b35;
  --accent-deep: #de421e;
  --accent-soft: #ffe7de;
  --lime: #c9f45a;
  --green: #1f9d63;
  --green-soft: #e5f6ed;
  --red: #d8453b;
  --red-soft: #fde9e7;
  --blue-soft: #e9edff;
  --shadow: 0 18px 46px rgba(35, 28, 18, .08);
  --radius: 22px;
  --font: "Segoe UI", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", sans-serif;
  --font-display: "Arial Black", "Microsoft YaHei", "PingFang SC", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  background-color: var(--paper);
  background-image:
    radial-gradient(rgba(23, 22, 19, .055) .7px, transparent .7px),
    radial-gradient(circle at 10% -8%, rgba(255, 91, 53, .10), transparent 30%),
    radial-gradient(circle at 92% 4%, rgba(201, 244, 90, .12), transparent 24%);
  background-size: 20px 20px, auto, auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
}

body.is-locked {
  overflow: hidden;
}

button,
textarea,
input {
  font: inherit;
}

button {
  padding: 0;
  border: 0;
  color: inherit;
  background: none;
  cursor: pointer;
  touch-action: manipulation;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
video {
  max-width: 100%;
}

h1,
h2,
h3,
p {
  margin: 0;
}

::selection {
  color: #fff;
  background: var(--accent);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

* {
  scrollbar-width: thin;
  scrollbar-color: #c9bfae transparent;
}

::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}

::-webkit-scrollbar-thumb {
  border: 2px solid var(--paper);
  border-radius: 999px;
  background: #cfc4b3;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* =========================================================
   顶栏
   ========================================================= */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #f5f0e6;
  background:
    radial-gradient(circle at 10% 0%, rgba(255, 91, 53, .20), transparent 32%),
    #171613;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
  max-width: 1180px;
  min-height: 72px;
  margin: 0 auto;
  padding: 0 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.brand-mark {
  display: block;
  width: 38px;
  height: 38px;
  color: var(--accent);
}

.brand-mark svg {
  display: block;
  width: 100%;
  height: 100%;
}

.brand-copy {
  display: grid;
  gap: 1px;
}

.brand-copy strong {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -.04em;
}

.brand-copy small {
  color: rgba(255, 255, 255, .38);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 2px;
}

.topnav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0 auto;
  padding: 3px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 9px;
}

.topnav button {
  padding: 6px 11px;
  color: rgba(255, 255, 255, .5);
  font-size: 10px;
  border-radius: 6px;
}

.topnav button:hover {
  color: #fff;
}

.topnav button.is-active {
  color: var(--ink);
  font-weight: 700;
  background: #f4eee3;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 9px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  color: rgba(255, 255, 255, .68);
  font-size: 10px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 999px;
}

.status-pill i {
  width: 6px;
  height: 6px;
  background: var(--muted-2);
  border-radius: 50%;
}

.status-pill.is-checking i {
  background: var(--accent);
  animation: pulse 1.2s ease-in-out infinite;
}

.status-pill.is-ok {
  color: var(--lime);
  border-color: rgba(201, 244, 90, .22);
}

.status-pill.is-ok i {
  background: var(--lime);
  box-shadow: 0 0 0 4px rgba(201, 244, 90, .10);
}

.status-pill.is-warn {
  color: #ffc48d;
  border-color: rgba(255, 196, 141, .24);
}

.status-pill.is-warn i {
  background: #ffc48d;
}

.status-pill.is-off {
  color: #ff9d94;
  border-color: rgba(255, 157, 148, .24);
}

.status-pill.is-off i {
  background: #ff6b5e;
}

.badge {
  padding: 5px 8px;
  color: var(--ink);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 1px;
  background: var(--lime);
  border-radius: 5px;
}

.topbar-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: rgba(255, 255, 255, .46);
  font-size: 10px;
}

.topbar-link:hover {
  color: #fff;
}

.topbar-link .icon {
  width: 12px;
  height: 12px;
}

/* =========================================================
   主布局
   ========================================================= */

.shell {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 42px 24px 70px;
}

.health-bar {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 20px;
  padding: 12px 14px;
  color: #7a3d1e;
  font-size: 11px;
  line-height: 1.6;
  background: #fff1df;
  border: 1px solid #f3d1ad;
  border-radius: 12px;
}

.health-bar .icon {
  width: 16px;
  height: 16px;
  margin-top: 1px;
  color: #c16a29;
}

.health-bar code {
  padding: 1px 4px;
  color: #6d3418;
  background: rgba(255, 255, 255, .55);
  border-radius: 4px;
}

.view {
  display: none;
}

.view.is-active {
  display: block;
  animation: rise .3s ease both;
}

/* =========================================================
   首页
   ========================================================= */

.hero {
  padding: 10px 0 30px;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.6px;
}

.hero h1,
.view-head h1 {
  margin: 13px 0 14px;
  font-family: var(--font-display);
  font-size: clamp(44px, 5.4vw, 68px);
  font-weight: 900;
  line-height: .99;
  letter-spacing: -.065em;
}

.view-head h1 {
  font-size: clamp(38px, 4.4vw, 56px);
}

.accent {
  position: relative;
  display: inline-block;
  z-index: 0;
  color: var(--accent);
}

.accent::after {
  content: "";
  position: absolute;
  right: -5%;
  bottom: 5px;
  left: 1%;
  z-index: -1;
  height: 10px;
  background: var(--lime);
  border-radius: 2px;
  transform: rotate(-1.5deg);
}

.lede {
  max-width: 610px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 17px;
}

.hero-chips span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 9px;
  color: var(--muted);
  font-size: 10px;
  background: rgba(255, 253, 248, .62);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.hero-chips .icon {
  width: 13px;
  height: 13px;
  color: var(--accent);
}

.create-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 20px;
  align-items: start;
}

/* =========================================================
   面板
   ========================================================= */

.panel {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgba(35, 28, 18, .04);
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.panel-title {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 31px;
  height: 23px;
  margin-top: 1px;
  padding: 0 6px;
  color: var(--lime);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1px;
  background: var(--ink);
  border-radius: 6px;
}

.panel-title h2 {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -.03em;
}

.panel-title p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10.5px;
}

.count-pill {
  flex: 0 0 auto;
  padding: 5px 9px;
  color: var(--muted);
  font-size: 9.5px;
  background: var(--surface-soft);
  border: 1px solid var(--line-soft);
  border-radius: 999px;
}

/* =========================================================
   链接导入
   ========================================================= */

.link-box {
  overflow: hidden;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 15px;
  transition: border-color .18s, box-shadow .18s;
}

.link-box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(255, 91, 53, .08);
}

.link-box textarea {
  display: block;
  width: 100%;
  min-height: 104px;
  padding: 15px 15px 7px;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.7;
  resize: vertical;
  background: transparent;
  border: 0;
  outline: 0;
}

.link-box textarea::placeholder {
  color: #b4aa9b;
}

.link-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 9px 8px 13px;
  background: rgba(255, 255, 255, .45);
  border-top: 1px solid var(--line-soft);
}

.hint {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 9.5px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.hint .icon {
  width: 12px;
  height: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  border-radius: 10px;
  transition: transform .18s, background .18s, border-color .18s, box-shadow .18s;
}

.btn .icon {
  width: 15px;
  height: 15px;
}

.btn-primary {
  color: var(--ink);
  background: var(--accent);
  box-shadow: 0 8px 20px rgba(255, 91, 53, .24);
}

.btn-primary:hover {
  background: #ff704d;
  transform: translateY(-1px);
}

.btn-soft {
  color: var(--accent-deep);
  background: var(--accent-soft);
}

.btn-soft:hover {
  background: #ffd9cc;
}

.btn-ghost {
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
}

.btn-ghost:hover {
  background: var(--surface-soft);
  border-color: #cfc4b3;
}

.btn-small {
  padding: 8px 11px;
  font-size: 10.5px;
  border-radius: 8px;
}

.btn:disabled {
  opacity: .45;
  cursor: not-allowed;
  pointer-events: none;
  transform: none;
}

.text-btn {
  color: var(--accent-deep);
  font-size: 10.5px;
  font-weight: 700;
}

.text-btn:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.text-btn.muted {
  color: var(--muted);
  font-weight: 500;
}

.text-btn:disabled {
  opacity: .4;
  pointer-events: none;
}

.upload-row {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 9px;
}

.upload-row > span {
  color: var(--muted);
  font-size: 8.5px;
  line-height: 1.4;
}

.upload-row .btn {
  flex: 0 0 auto;
}

.source-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 18px 0 9px;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 700;
}

.source-list {
  display: grid;
  gap: 7px;
}

.source-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: rgba(250, 246, 238, .6);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
}

.source-item:hover {
  background: var(--surface);
  border-color: var(--line);
}

.source-ico {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  color: var(--accent-deep);
  background: var(--accent-soft);
  border-radius: 8px;
}

.source-ico .icon {
  width: 15px;
  height: 15px;
}

.source-main {
  flex: 1;
  min-width: 0;
}

.source-main strong {
  display: block;
  font-size: 11px;
  font-weight: 650;
}

.source-main span {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.source-remove {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  flex: 0 0 auto;
  color: var(--muted-2);
  border-radius: 7px;
}

.source-remove:hover {
  color: var(--red);
  background: var(--red-soft);
}

.source-remove .icon {
  width: 13px;
  height: 13px;
}

.source-empty {
  padding: 22px 16px;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
  background: var(--surface-soft);
  border: 1px dashed var(--line);
  border-radius: 12px;
}

.source-empty strong {
  display: block;
  margin-bottom: 3px;
  color: var(--ink);
  font-size: 12px;
}

.note {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 14px;
  padding-top: 12px;
  color: var(--muted-2);
  font-size: 9px;
  line-height: 1.6;
  border-top: 1px solid var(--line-soft);
}

.note .icon {
  width: 13px;
  height: 13px;
  margin-top: 1px;
  color: #c18a52;
}

.note code {
  padding: 1px 3px;
  color: var(--ink-soft);
  background: var(--surface-soft);
  border-radius: 3px;
}

/* =========================================================
   设置
   ========================================================= */

.settings-wrap {
  min-width: 0;
  align-self: stretch;
}

.settings-panel {
  position: sticky;
  top: 94px;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 112px);
  overflow: hidden;
}

.settings-scroll {
  flex: 1;
  min-height: 0;
  padding-right: 2px;
  overflow-y: auto;
}

.settings-panel > .panel-head,
.settings-panel > .start-btn,
.settings-panel > .micro {
  flex: 0 0 auto;
}

.setting {
  padding: 14px 0;
  border-top: 1px solid var(--line-soft);
}

.setting:first-of-type {
  padding-top: 0;
  border-top: 0;
}

.setting-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 9px;
  font-size: 11px;
  font-weight: 700;
}

.setting-label span:last-child {
  color: var(--muted-2);
  font-size: 9px;
  font-weight: 400;
}

.toggle-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 0 9px;
  font-size: 11px;
  cursor: pointer;
  user-select: none;
}

.toggle-row input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.switch {
  position: relative;
  display: block;
  width: 32px;
  height: 19px;
  flex: 0 0 auto;
  background: #d9d2c5;
  border-radius: 999px;
  transition: background .2s;
}

.switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 15px;
  height: 15px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .16);
  transition: transform .2s, background .2s;
}

.toggle-row input:checked + .switch {
  background: var(--ink);
}

.toggle-row input:checked + .switch::after {
  background: var(--lime);
  transform: translateX(13px);
}

.toggle-row input:focus-visible + .switch {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.dedupe-level {
  margin-top: 2px;
}

.dedupe-level.is-disabled {
  opacity: .42;
  pointer-events: none;
}

.subtitle-input {
  width: 100%;
  min-height: 62px;
  margin-top: 7px;
  padding: 8px 9px;
  resize: vertical;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  font-size: 10px;
  line-height: 1.55;
}

.subtitle-input::placeholder {
  color: var(--muted);
}

.subtitle-input:focus {
  border-color: var(--accent);
  outline: 2px solid rgba(255, 91, 53, .12);
}

.subtitle-input:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.micro.left {
  margin-top: 7px;
  text-align: left;
}

.recipe-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.recipe {
  padding: 7px;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 11px;
  transition: border-color .18s, background .18s, transform .18s;
}

.recipe:hover {
  transform: translateY(-1px);
  border-color: var(--line);
}

.recipe.is-selected {
  background: #fff8f4;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(255, 91, 53, .09);
}

.recipe-visual {
  position: relative;
  display: block;
  height: 58px;
  margin-bottom: 6px;
  overflow: hidden;
  border-radius: 7px;
}

.recipe-visual::before {
  content: "";
  position: absolute;
  top: -22px;
  left: -18px;
  width: 70px;
  height: 70px;
  background: rgba(255, 255, 255, .22);
  border-radius: 50%;
}

.recipe-visual::after {
  content: "";
  position: absolute;
  right: 8px;
  bottom: 7px;
  width: 22px;
  height: 36px;
  background: rgba(255, 253, 248, .86);
  border-radius: 4px;
}

.recipe-visual i {
  position: absolute;
  right: 15px;
  bottom: 22px;
  z-index: 1;
  width: 0;
  height: 0;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 7px solid rgba(23, 22, 19, .65);
}

.recipe-original {
  background: linear-gradient(135deg, #dcece8, #8fc2b6 58%, #3d7168);
}

.recipe-general {
  background: linear-gradient(135deg, #ffe0c2, #ff9b62 58%, #ef5a2c);
}

.recipe-commerce {
  background: linear-gradient(135deg, #ffd2d2, #ff6b6b 58%, #d92c3f);
}

.recipe-film {
  background: linear-gradient(135deg, #3d4b82, #26305a 58%, #11162e);
}

.recipe-knowledge {
  background: linear-gradient(135deg, #dff8ae, #a8df67 58%, #6cba45);
}

.recipe-title {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
}

.recipe-sub {
  display: block;
  margin-top: 1px;
  overflow: hidden;
  color: var(--muted);
  font-size: 8px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.recipe-default {
  position: relative;
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  gap: 10px;
  padding: 10px;
}

.recipe-default .recipe-visual {
  flex: 0 0 auto;
  width: 66px;
  height: 48px;
  margin: 0;
}

.recipe-default .recipe-copy {
  display: block;
  min-width: 0;
}

.recipe-default .recipe-title {
  font-size: 12px;
}

.recipe-default .recipe-sub {
  margin-top: 2px;
  font-size: 8.5px;
  white-space: normal;
}

.recipe-badge {
  position: absolute;
  top: 8px;
  right: 9px;
  padding: 2px 5px;
  color: #fff;
  background: var(--accent);
  border-radius: 4px;
  font-size: 7.5px;
  font-weight: 700;
}

.advanced-recipes {
  margin-top: 8px;
  border-top: 1px dashed var(--line-soft);
}

.advanced-recipes summary {
  padding: 7px 0 2px;
  color: var(--muted);
  font-size: 9px;
  cursor: pointer;
  user-select: none;
}

.advanced-recipes[open] summary {
  margin-bottom: 4px;
}

.segmented {
  display: flex;
  gap: 3px;
  padding: 3px;
  background: var(--surface-soft);
  border: 1px solid var(--line-soft);
  border-radius: 9px;
}

.segmented button {
  flex: 1;
  padding: 7px 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
  border-radius: 6px;
}

.segmented button.is-active {
  color: #fff;
  background: var(--ink);
  box-shadow: 0 3px 8px rgba(23, 22, 19, .14);
}

.segmented button:disabled {
  opacity: .32;
  pointer-events: none;
}

.version-control {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.version-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.version-presets button {
  flex: 1 0 28px;
  min-width: 28px;
  padding: 7px 4px;
  color: var(--muted);
  background: var(--surface-soft);
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  font-size: 9.5px;
  font-weight: 700;
}

.version-presets button.is-active {
  color: #fff;
  background: var(--ink);
  border-color: var(--ink);
}

.version-presets button:disabled {
  opacity: .32;
  pointer-events: none;
}

.version-custom {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 9px;
}

.version-custom input {
  width: 62px;
  padding: 5px 7px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

.version-custom input:focus {
  border-color: var(--accent);
  outline: 2px solid rgba(255, 91, 53, .12);
}

.summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 13px 0;
  padding: 13px;
  background: #f7f1e6;
  border: 1px solid var(--line);
  border-radius: 13px;
}

.summary div {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 1px;
}

.summary span {
  flex-basis: 100%;
  color: var(--muted);
  font-size: 9px;
}

.summary strong {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -.05em;
}

.start-btn {
  width: 100%;
  justify-content: space-between;
  padding: 13px 14px;
  border-radius: 11px;
}

.micro {
  margin-top: 9px;
  color: var(--muted-2);
  font-size: 8.5px;
  line-height: 1.6;
  text-align: center;
}

/* =========================================================
   任务页
   ========================================================= */

.view-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
  padding: 8px 0 24px;
}

.view-head .lede {
  max-width: 640px;
}

.head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.job-list {
  display: grid;
  gap: 10px;
}

.job-card {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 17px;
  box-shadow: 0 1px 2px rgba(35, 28, 18, .03);
}

.job-thumb {
  position: relative;
  display: flex;
  align-items: flex-end;
  width: 76px;
  height: 100px;
  padding: 7px;
  overflow: hidden;
  border-radius: 10px;
}

.job-thumb::before {
  content: "";
  position: absolute;
  top: -20px;
  left: -25px;
  width: 75px;
  height: 75px;
  background: rgba(255, 255, 255, .22);
  border-radius: 50%;
}

.job-thumb .ratio {
  position: relative;
  z-index: 1;
  padding: 2px 5px;
  color: #fff;
  font-size: 8px;
  background: rgba(0, 0, 0, .42);
  border-radius: 4px;
}

.job-main {
  min-width: 0;
}

.job-top {
  display: flex;
  align-items: center;
  gap: 9px;
}

.job-title {
  min-width: 0;
  overflow: hidden;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.status {
  flex: 0 0 auto;
  padding: 3px 6px;
  font-size: 8.5px;
  font-weight: 700;
  border-radius: 999px;
}

.status-queued {
  color: #857b6c;
  background: #f1ede5;
}

.status-running {
  color: var(--accent-deep);
  background: var(--accent-soft);
}

.status-done {
  color: var(--green);
  background: var(--green-soft);
}

.status-failed {
  color: var(--red);
  background: var(--red-soft);
}

.job-meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9.5px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.job-stage {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 10px 0 5px;
  color: var(--muted);
  font-size: 9px;
}

.job-stage span {
  color: var(--ink-soft);
  font-weight: 700;
}

.bar {
  height: 5px;
  overflow: hidden;
  background: #eee8dd;
  border-radius: 999px;
}

.bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #ff9c7d);
  border-radius: inherit;
  transition: width .3s ease;
}

.job-error {
  margin-top: 8px;
  color: var(--red);
  font-size: 9.5px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.job-side {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  flex-wrap: wrap;
}

.job-side .btn {
  padding: 7px 10px;
  font-size: 10px;
}

.job-side .wait {
  color: var(--muted-2);
  font-size: 10px;
}

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 62px 22px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.empty-mark {
  display: grid;
  place-items: center;
  width: 66px;
  height: 66px;
  margin-bottom: 8px;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 20px;
}

.empty-mark .icon {
  width: 28px;
  height: 28px;
}

.empty h3 {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -.03em;
}

.empty p {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 11.5px;
}

/* =========================================================
   结果页
   ========================================================= */

.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
}

.result-card {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 17px;
  box-shadow: 0 1px 2px rgba(35, 28, 18, .03);
}

.video-wrap {
  position: relative;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  background: #101010;
}

.video-wrap video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #101010;
}

.variant-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  padding: 3px 6px;
  color: var(--ink);
  font-size: 8px;
  font-weight: 800;
  background: rgba(255, 253, 248, .92);
  border-radius: 5px;
  pointer-events: none;
}

.result-info {
  padding: 11px 12px 12px;
}

.result-info h3 {
  display: -webkit-box;
  min-height: 32px;
  overflow: hidden;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.result-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 8.5px;
}

.result-adjust {
  margin-top: 4px;
  color: var(--green);
  font-size: 8.5px;
  line-height: 1.45;
}

.result-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 9px;
  padding-top: 9px;
  border-top: 1px solid var(--line-soft);
}

.result-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--accent-deep);
  font-size: 10px;
  font-weight: 700;
}

.result-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.result-link .icon {
  width: 13px;
  height: 13px;
}

/* =========================================================
   Toast / 页脚 / 移动端
   ========================================================= */

.toast-stack {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 360px;
  padding: 11px 14px;
  color: #f7f3ea;
  font-size: 11px;
  background: #171613;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 11px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .25);
  animation: toastIn .24s ease both;
}

.toast::before {
  content: "";
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  background: var(--lime);
  border-radius: 50%;
}

.toast.is-error::before {
  background: #ff6b5e;
}

.toast.is-out {
  animation: toastOut .22s ease forwards;
}

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px 28px;
  color: var(--muted-2);
  font-size: 9px;
}

.mobile-start {
  display: none;
}

/* =========================================================
   动画
   ========================================================= */

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(9px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .35; }
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toastOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(6px);
  }
}

/* =========================================================
   响应式
   ========================================================= */

@media (max-width: 1040px) {
  .create-grid {
    grid-template-columns: minmax(0, 1fr) 350px;
  }
}

@media (max-width: 960px) {
  .topbar-inner {
    min-height: 66px;
    padding: 0 18px;
  }

  .badge,
  .topbar-link {
    display: none;
  }

  .brand-copy {
    display: none;
  }

  .topnav {
    margin-left: 0;
    margin-right: 0;
  }

  .topnav button {
    padding: 6px 8px;
    font-size: 9px;
  }

  .shell {
    padding: 28px 18px 120px;
  }

  .hero {
    padding-top: 4px;
  }

  .hero h1 {
    font-size: clamp(38px, 10vw, 56px);
  }

  .view-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  .view-head h1 {
    font-size: clamp(34px, 8vw, 46px);
  }

  .head-actions {
    width: 100%;
  }

  .head-actions .btn {
    flex: 1;
  }

  .create-grid {
    grid-template-columns: 1fr;
  }

  .settings-panel {
    position: static;
    display: block;
    max-height: none;
    overflow: visible;
  }

  .settings-scroll {
    overflow: visible;
  }

  .mobile-start {
    position: fixed;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    left: 12px;
    z-index: 60;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 11px 10px 14px;
    color: #fff;
    background: var(--ink);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 15px;
    box-shadow: 0 16px 38px rgba(0, 0, 0, .24);
  }

  .mobile-start.show {
    display: flex;
  }

  .mobile-start div {
    display: grid;
    gap: 1px;
  }

  .mobile-start strong {
    font-size: 11px;
  }

  .mobile-start span {
    color: rgba(255, 255, 255, .5);
    font-size: 8.5px;
  }

  .mobile-start .btn {
    flex: 0 0 auto;
  }

  .toast-stack {
    right: 12px;
    bottom: calc(92px + env(safe-area-inset-bottom));
    left: 12px;
    align-items: stretch;
  }

  .toast {
    max-width: none;
  }

  .footer {
    padding: 0 18px 86px;
  }
}

@media (max-width: 620px) {
  .shell {
    padding-right: 14px;
    padding-left: 14px;
  }

  .panel {
    padding: 17px;
    border-radius: 18px;
  }

  .hero h1 {
    font-size: clamp(34px, 10.5vw, 46px);
  }

  .view-head h1 {
    font-size: clamp(32px, 8.8vw, 40px);
  }

  .lede {
    font-size: 12px;
  }

  .hero-chips span:nth-child(3) {
    display: none;
  }

  .link-foot {
    flex-wrap: wrap;
    gap: 7px;
  }

  .hint {
    flex-basis: 100%;
  }

  .link-foot .btn {
    margin-left: auto;
  }

  .recipe-grid {
    gap: 6px;
  }

  .recipe {
    padding: 6px;
  }

  .recipe-visual {
    height: 50px;
  }

  .recipe-visual::after {
    width: 18px;
    height: 29px;
  }

  .recipe-visual i {
    right: 12px;
    bottom: 18px;
  }

  .recipe-title {
    font-size: 9.5px;
  }

  .recipe-sub {
    font-size: 7.5px;
  }

  .summary strong {
    font-size: 18px;
  }

  .job-card {
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 11px;
    padding: 11px;
  }

  .job-thumb {
    width: 58px;
    height: 80px;
    border-radius: 8px;
  }

  .job-side {
    grid-column: 2 / 3;
    justify-content: flex-start;
  }

  .job-side .btn {
    padding: 5px 8px;
    font-size: 9px;
  }

  .job-side .wait {
    display: none;
  }

  .result-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  .result-info {
    padding: 8px;
  }

  .result-info h3 {
    min-height: 28px;
    font-size: 9.5px;
  }

  .result-meta {
    font-size: 7.5px;
  }

  .result-actions {
    margin-top: 7px;
    padding-top: 7px;
  }

  .result-link {
    font-size: 9px;
  }

  .empty {
    padding: 44px 18px;
  }

  .footer {
    padding-bottom: 92px;
  }
}

@media (max-width: 380px) {
  .result-grid {
    grid-template-columns: 1fr;
  }

  .recipe-sub {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
