:root {
  --bg: #0e0e12;
  --panel: #1c1c24;
  --panel-2: #14141a;
  --ink: #f4f1ea;
  --mute: #9a948a;
  --red: #e23b2f;
  --line: #3a342c;
  --radius: 18px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans", "Noto Sans", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img, video { display: block; max-width: 100%; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--mute); }
.red { color: var(--red); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 12px 26px; border-radius: 14px;
  font-size: 16px; font-weight: 600; transition: transform .12s ease, opacity .12s ease;
}
.btn:active { transform: scale(.98); }
.btn-fill { background: var(--red); color: var(--ink); }
.btn-fill:disabled { opacity: .45; cursor: default; }
.btn-line { border: 1px solid #5c564c; color: var(--ink); background: transparent; }
.btn-line:disabled { opacity: .45; cursor: default; }
.btn-sm { min-height: 38px; padding: 6px 16px; border-radius: 10px; font-size: 14px; }

/* ---------- top bar ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 0;
}
.brand {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 26px; letter-spacing: .5px;
}
.brand em { color: var(--red); font-style: normal; }
.topbar nav { display: flex; gap: 22px; align-items: center; }
.topbar nav a { color: var(--mute); font-size: 15px; }
.topbar nav a:hover { color: var(--ink); }
.lang-switch { border: 1px solid var(--line); border-radius: 10px; padding: 5px 12px; color: var(--mute); font-size: 13px; background: var(--panel); }
.tile video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ---------- hero ---------- */
.hero { padding: 72px 0 56px; text-align: center; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -40% -20% auto; height: 130%;
  background:
    radial-gradient(45% 55% at 22% 42%, rgba(226, 59, 47, .22), transparent 70%),
    radial-gradient(38% 50% at 78% 30%, rgba(120, 90, 255, .14), transparent 70%);
  pointer-events: none;
}
.hero > * { position: relative; }
.hero h1 {
  font-family: Georgia, serif; font-weight: 500;
  font-size: clamp(38px, 6.5vw, 66px); line-height: 1.08; max-width: 820px; margin: 0 auto;
}
.hero h1 em { font-style: italic; color: var(--red); }
.hero p.sub { max-width: 620px; margin: 20px auto 0; color: var(--mute); font-size: clamp(16px, 2.2vw, 19px); }
.hero .cta { display: flex; gap: 14px; justify-content: center; margin-top: 34px; flex-wrap: wrap; }
.hero .fine { margin-top: 14px; font-size: 13px; color: var(--mute); }

/* ---------- sample grid ---------- */
.samples { padding: 26px 0 70px; }
.samples .grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px;
}
.tile {
  position: relative; aspect-ratio: 9 / 14; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); background: var(--panel-2);
  display: flex; align-items: flex-end;
}
.tile .scene {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 44px; opacity: .9;
}
.tile .grad {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 42%, rgba(14, 14, 18, .88));
}
.tile .name { position: relative; padding: 12px 14px; font-size: 15px; font-weight: 600; }
.tile .play {
  position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; border-radius: 50%;
  background: rgba(226, 59, 47, .92); display: flex; align-items: center; justify-content: center;
  font-size: 13px; color: #fff;
}

/* ---------- sections ---------- */
.section { padding: 68px 0; border-top: 1px solid rgba(58, 52, 44, .5); }
.section h2 { font-family: Georgia, serif; font-weight: 500; font-size: clamp(28px, 4vw, 40px); margin-bottom: 10px; }
.section .lead { color: var(--mute); max-width: 560px; }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin-top: 36px; }
.step { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.step .n { color: var(--red); font-family: Georgia, serif; font-size: 30px; }
.step h3 { margin: 10px 0 8px; font-size: 18px; }
.step p { color: var(--mute); font-size: 14.5px; }

.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; margin-top: 36px; }
.price-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; display: flex; flex-direction: column; gap: 6px;
}
.price-card.best { border-color: var(--red); border-width: 2px; position: relative; }
.price-card .tag {
  position: absolute; top: -12px; left: 20px; background: var(--red); color: var(--ink);
  font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px;
}
.price-card .price { font-size: 32px; font-weight: 700; font-family: Georgia, serif; }
.price-card .price small { font-size: 14px; font-weight: 400; color: var(--mute); }
.price-card .per { color: var(--mute); font-size: 14px; }
.price-card .btn { margin-top: 14px; }
.pricing-fine { margin-top: 18px; color: var(--mute); font-size: 13px; }

.faq { margin-top: 30px; display: grid; gap: 10px; }
.faq details { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px 20px; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq p { color: var(--mute); margin-top: 10px; font-size: 15px; }

footer {
  border-top: 1px solid rgba(58, 52, 44, .5); padding: 30px 0 46px; margin-top: 30px;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  color: var(--mute); font-size: 13.5px;
}
footer .links { display: flex; gap: 18px; }
footer a:hover { color: var(--ink); }

/* ---------- app shell ---------- */
.appbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0; gap: 12px;
}
.balance { display: flex; align-items: center; gap: 8px; background: var(--panel); border: 1px solid var(--line); padding: 7px 14px; border-radius: 999px; font-size: 14px; }
.balance b { color: var(--red); }
.tabs { display: flex; gap: 8px; margin: 8px 0 20px; flex-wrap: wrap; }
.tab {
  padding: 9px 20px; border-radius: 999px; border: 1px solid var(--line);
  color: var(--mute); font-size: 15px; background: var(--panel-2);
}
.tab.on { background: var(--red); color: var(--ink); border-color: var(--red); font-weight: 600; }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 18px; }
.panel h3 { font-size: 17px; margin-bottom: 4px; }
.panel .hint { color: var(--mute); font-size: 13.5px; }

.kinds { display: flex; gap: 8px; margin: 14px 0; flex-wrap: wrap; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 12px; }
.cat {
  position: relative; aspect-ratio: 3 / 4; border-radius: 14px; overflow: hidden;
  border: 2px solid var(--line); background: var(--panel-2);
  display: flex; align-items: flex-end; transition: border-color .12s;
}
.cat.on { border-color: var(--red); }
.cat .scene { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 34px; }
.cat .grad { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(14,14,18,.9)); }
.cat .name { position: relative; padding: 10px 12px; font-size: 14px; font-weight: 600; text-align: center; width: 100%; }

.photo-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.photo {
  position: relative; width: 92px; height: 128px; border-radius: 12px; overflow: hidden;
  border: 1px solid var(--line); background: var(--panel-2);
}
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo .x {
  position: absolute; top: 3px; right: 3px; width: 24px; height: 24px; border-radius: 50%;
  background: rgba(0, 0, 0, .7); color: var(--ink); display: flex; align-items: center; justify-content: center; font-size: 13px;
}
.add-photo {
  width: 92px; height: 128px; border-radius: 12px; border: 1px dashed #5c564c;
  color: var(--mute); display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 4px; font-size: 13px; background: var(--panel-2);
}
textarea, input[type=email], input[type=text], input[type=tel] {
  width: 100%; background: var(--panel-2); color: var(--ink);
  border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px;
  font: inherit; min-height: 44px; outline: none;
}
textarea:focus, input:focus { border-color: #6a6254; }
textarea { min-height: 84px; resize: vertical; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.chip { padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink); background: var(--panel-2); font-size: 14px; }
.chip.on { background: var(--red); border-color: var(--red); font-weight: 600; }
.label { font-size: 12px; letter-spacing: 1.4px; color: var(--mute); text-transform: uppercase; margin: 18px 0 8px; }

.job-card { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--panel-2); }
.job-card video, .job-card .poster { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; background: var(--panel); }
.job-meta { padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.job-meta .status { color: var(--mute); font-size: 13px; }
.progress { height: 4px; background: var(--line); border-radius: 2px; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--red); transition: width .5s; }
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }

.snack {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: var(--panel); color: var(--ink); border: 1px solid var(--line);
  padding: 12px 20px; border-radius: 12px; font-size: 14.5px; z-index: 50;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .5); max-width: 92vw;
}
.snack.err { border-color: var(--red); }

.modal-mask {
  position: fixed; inset: 0; background: rgba(0, 0, 0, .6); z-index: 40;
  display: flex; align-items: flex-end; justify-content: center;
}
.modal {
  width: min(560px, 100%); max-height: 88vh; overflow: auto;
  background: var(--panel); border-radius: 20px 20px 0 0; padding: 22px 20px 26px;
}
@media (min-width: 640px) {
  .modal-mask { align-items: center; }
  .modal { border-radius: 20px; }
}
.modal .head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.modal .head h3 { font-size: 19px; }

.spinner {
  width: 18px; height: 18px; border: 2px solid rgba(244, 241, 234, .3);
  border-top-color: var(--ink); border-radius: 50%;
  animation: spin .8s linear infinite; display: inline-block; vertical-align: -4px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.hidden { display: none !important; }


/* ---------- workspace (desktop web editor layout) ---------- */
.workspace {
  display: grid; grid-template-columns: 350px minmax(0, 1fr); gap: 18px;
  align-items: start;
}
@media (max-width: 880px) { .workspace { grid-template-columns: 1fr; } }

.side { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.side .modes { display: flex; gap: 6px; margin-bottom: 12px; }
.side .modes .chip { flex: 1; text-align: center; }
.cat-wrap { display: flex; flex-wrap: wrap; gap: 6px; max-height: 168px; overflow: auto; }
.mini-cat {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 10px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--panel-2); color: var(--ink); font-size: 13.5px;
}
.mini-cat.on { border-color: var(--red); background: rgba(226, 59, 47, .14); font-weight: 600; }
.mini-cat .em { font-size: 16px; }

.thumb-row { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.photo { width: 64px; height: 88px; flex: none; }
.add-photo { width: 64px; height: 88px; flex: none; font-size: 20px; }

.field { margin-top: 12px; }
.field .label { margin: 0 0 6px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-row .chip { padding: 6px 12px; font-size: 13px; }

.make-btn { width: 100%; margin-top: 14px; }

.stage {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px; min-height: 540px; display: flex; flex-direction: column;
}
.stage-view {
  flex: 1; border-radius: 14px; background: var(--panel-2);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  min-height: 380px; position: relative;
}
.stage-view video { max-height: 56vh; width: auto; max-width: 100%; border-radius: 14px; background: #000; }
.stage-view .empty { text-align: center; color: var(--mute); padding: 30px; }
.stage-view .empty .big { font-size: 54px; margin-bottom: 10px; }
.stage-view .progress-wrap { width: min(320px, 70%); text-align: center; }
.stage-view .progress-wrap .progress { margin-bottom: 10px; }
.stage-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; }
.stage-bar .meta { color: var(--mute); font-size: 13.5px; }
.stage-bar .ops { display: flex; gap: 8px; }

.strip { display: flex; gap: 8px; overflow-x: auto; margin-top: 14px; padding-bottom: 4px; }
.thumb-j {
  position: relative; width: 58px; aspect-ratio: 9 / 16; flex: none;
  border-radius: 10px; overflow: hidden; border: 2px solid var(--line);
  background: var(--panel-2); cursor: pointer; padding: 0;
}
.thumb-j.on { border-color: var(--red); }
.thumb-j video, .thumb-j img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-j .st {
  position: absolute; inset: auto 0 0 0; font-size: 9px; text-align: center;
  background: rgba(14, 14, 18, .8); color: var(--mute); padding: 1px 0;
}

.modal-mask { align-items: center; }
