:root {
  color-scheme: dark;
  --bg: #080b12;
  --panel: #101625;
  --panel-2: #151c2e;
  --line: #252d42;
  --line-strong: #39435e;
  --text: #f6f7fb;
  --muted: #9199ad;
  --dim: #626b80;
  --accent: #f2ad44;
  --accent-2: #ffcc73;
  --accent-soft: rgba(242, 173, 68, 0.13);
  --success: #55d6a1;
  --danger: #ff7b81;
  --radius: 18px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 35% -15%, rgba(76, 93, 147, 0.16), transparent 34rem),
    var(--bg);
  color: var(--text);
  font-size: 16px;
}
button, input, textarea { font: inherit; }
button { color: inherit; }

.ambient {
  position: fixed;
  width: 28rem;
  height: 28rem;
  border-radius: 999px;
  filter: blur(100px);
  opacity: 0.09;
  pointer-events: none;
}
.ambient-one { background: var(--accent); right: -10rem; top: 12rem; }
.ambient-two { background: #4b70ff; left: -16rem; bottom: -12rem; }

.topbar {
  height: 68px;
  padding: 0 clamp(18px, 5vw, 72px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,.07);
  background: rgba(8, 11, 18, .84);
  backdrop-filter: blur(18px);
  position: sticky;
  top: 0;
  z-index: 20;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 720; }
.brand-mark {
  width: 34px; height: 34px; display: grid; place-items: center;
  border: 1px solid rgba(242,173,68,.36); border-radius: 10px;
  color: var(--accent); background: linear-gradient(145deg, rgba(242,173,68,.18), rgba(242,173,68,.04));
  box-shadow: inset 0 1px rgba(255,255,255,.08);
}
.brand-sub { color: var(--muted); font-size: .83rem; font-weight: 500; border-left: 1px solid var(--line); padding-left: 12px; }
.top-actions { display: flex; align-items: center; gap: 18px; }
.autosave { color: var(--muted); font-size: .78rem; display: flex; align-items: center; gap: 7px; }
.autosave i { width: 6px; height: 6px; background: var(--success); border-radius: 50%; box-shadow: 0 0 12px var(--success); }
.ghost-button, .secondary-button {
  border: 1px solid var(--line); background: rgba(255,255,255,.025); border-radius: 10px; padding: 10px 14px; cursor: pointer;
}
.ghost-button:hover, .secondary-button:hover { border-color: var(--line-strong); background: rgba(255,255,255,.05); }

.step-nav {
  border-bottom: 1px solid rgba(255,255,255,.065);
  background: rgba(10, 14, 24, .84);
  overflow-x: auto;
}
.step-track {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  min-width: 800px;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  padding: 13px 0;
}
.step-item {
  border: 0; background: transparent; color: var(--dim); cursor: pointer;
  display: flex; align-items: center; gap: 8px; padding: 9px 11px; border-radius: 10px; text-align: left;
}
.step-item:disabled { cursor: not-allowed; opacity: .56; }
.step-item .num {
  width: 24px; height: 24px; display: grid; place-items: center; flex: 0 0 auto;
  border: 1px solid var(--line); border-radius: 7px; font-size: .72rem; font-weight: 700;
}
.step-item.active { color: var(--accent-2); background: var(--accent-soft); }
.step-item.active .num { border-color: var(--accent); background: var(--accent); color: #1d1304; }
.step-item.done { color: #c2c7d2; }
.step-item.done .num { color: var(--success); border-color: rgba(85,214,161,.32); }
.step-label { white-space: nowrap; font-size: .83rem; font-weight: 620; }

.shell { width: min(1110px, calc(100% - 32px)); margin: 0 auto; padding: 42px 0 56px; }
.intro-row { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 24px; }
.eyebrow { color: var(--accent); font-size: .75rem; letter-spacing: .16em; font-weight: 760; margin-bottom: 10px; }
h1 { margin: 0; font-size: clamp(1.7rem, 3vw, 2.25rem); letter-spacing: -.025em; }
.intro-row p { color: var(--muted); margin: 10px 0 0; line-height: 1.65; }
.completion-ring {
  --progress: 14%;
  width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto;
  background: conic-gradient(var(--accent) var(--progress), var(--line) 0);
  position: relative;
}
.completion-ring::after { content: ""; position: absolute; inset: 5px; background: var(--bg); border-radius: inherit; }
.completion-ring span { z-index: 1; font-size: .75rem; font-weight: 760; color: var(--accent-2); }

.workspace { display: grid; gap: 18px; animation: rise .34s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: none; } }
.panel {
  border: 1px solid var(--line);
  background: linear-gradient(150deg, rgba(22,29,47,.92), rgba(14,19,32,.94));
  border-radius: var(--radius);
  padding: clamp(20px, 3vw, 30px);
  box-shadow: 0 18px 60px rgba(0,0,0,.16), inset 0 1px rgba(255,255,255,.035);
}
.panel-head { display: flex; justify-content: space-between; gap: 20px; align-items: start; margin-bottom: 22px; }
.panel h2 { font-size: 1.08rem; margin: 0 0 7px; }
.panel-copy { margin: 0; color: var(--muted); line-height: 1.65; font-size: .91rem; }
.field { display: grid; gap: 9px; }
.field + .field { margin-top: 20px; }
.field label { font-size: .86rem; font-weight: 650; }
.field-hint { color: var(--dim); font-size: .77rem; }
.input, .textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 11px; background: rgba(7,10,17,.62); color: var(--text);
  padding: 13px 14px; outline: none; transition: .2s border, .2s box-shadow;
}
.textarea { min-height: 104px; resize: vertical; line-height: 1.6; }
.input:focus, .textarea:focus { border-color: rgba(242,173,68,.68); box-shadow: 0 0 0 3px rgba(242,173,68,.1); }
.input::placeholder, .textarea::placeholder { color: #555f74; }

.range-row { display: grid; grid-template-columns: 34px 1fr 44px; gap: 14px; align-items: center; color: var(--dim); font-size: .75rem; }
.range { width: 100%; accent-color: var(--accent); }
.duration-output {
  margin: 16px auto 0; width: max-content; min-width: 92px; text-align: center; padding: 12px 18px;
  border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.025); font-size: 1.45rem; font-weight: 760;
}
.duration-output small { font-size: .74rem; color: var(--muted); margin-left: 3px; }
.insight { margin-top: 14px; border: 1px solid rgba(85,214,161,.2); background: rgba(85,214,161,.045); color: var(--success); border-radius: 11px; padding: 12px 14px; font-size: .83rem; }

.option-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; }
.option-grid.two { grid-template-columns: repeat(2, minmax(0,1fr)); }
.option {
  border: 1px solid var(--line); background: rgba(255,255,255,.018); border-radius: 12px;
  padding: 13px 14px; min-height: 48px; cursor: pointer; text-align: left; transition: transform .16s, border .16s, background .16s;
}
.option:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.option.selected { border-color: rgba(242,173,68,.72); background: var(--accent-soft); color: var(--accent-2); box-shadow: inset 0 0 0 1px rgba(242,173,68,.08); }
.option strong { display: block; font-size: .88rem; }
.option span { display: block; color: var(--muted); font-size: .76rem; line-height: 1.45; margin-top: 5px; }
.option.selected span { color: #c7b48e; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.018); padding: 9px 12px; cursor: pointer; font-size: .78rem; color: #b8bfce; }
.chip.selected { border-color: rgba(242,173,68,.6); color: var(--accent-2); background: var(--accent-soft); }
.sub-label { color: var(--muted); font-size: .78rem; margin: 18px 0 10px; }

.upload {
  border: 1px dashed #3b4661; border-radius: 14px; min-height: 170px; display: grid; place-items: center; text-align: center;
  background: rgba(7,10,17,.35); cursor: pointer; overflow: hidden;
}
.upload:hover { border-color: var(--accent); }
.upload-icon { font-size: 1.5rem; color: var(--accent); margin-bottom: 8px; }
.upload strong { font-size: .88rem; }
.upload small { display: block; color: var(--muted); margin-top: 7px; }
.upload img { width: 100%; height: 210px; object-fit: contain; background: #090c14; }
.grid-2 { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }

.timeline-list { display: grid; gap: 12px; }
.timeline-card { display: grid; grid-template-columns: 120px 1fr auto; gap: 12px; align-items: start; border: 1px solid var(--line); border-radius: 13px; padding: 14px; background: rgba(7,10,17,.42); }
.timeline-card .time { color: var(--accent-2); font-weight: 720; font-size: .82rem; padding-top: 12px; }
.mini-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.icon-button { border: 0; background: transparent; color: var(--dim); cursor: pointer; padding: 9px; }
.icon-button:hover { color: var(--danger); }
.add-button { width: 100%; border: 1px dashed #3b4661; background: transparent; color: var(--accent-2); border-radius: 12px; padding: 13px; cursor: pointer; margin-top: 12px; }
.add-button:hover { border-color: var(--accent); background: var(--accent-soft); }

.prompt-box { border: 1px solid var(--line); border-radius: 16px; background: #090d17; overflow: hidden; }
.prompt-toolbar { display: flex; align-items: center; justify-content: space-between; padding: 13px 15px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: .8rem; }
.copy-button { border: 1px solid rgba(242,173,68,.45); background: var(--accent-soft); color: var(--accent-2); border-radius: 9px; padding: 9px 12px; cursor: pointer; }
.prompt-content { white-space: pre-wrap; padding: 22px; margin: 0; color: #d8dce6; line-height: 1.78; font-size: .88rem; max-height: 650px; overflow: auto; }
.summary-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; margin-bottom: 18px; }
.summary-item { background: rgba(255,255,255,.025); border: 1px solid var(--line); border-radius: 11px; padding: 13px; }
.summary-item small { display: block; color: var(--dim); margin-bottom: 5px; }
.summary-item strong { font-size: .86rem; }

.flow-actions { display: grid; grid-template-columns: 130px 1fr 150px; align-items: center; gap: 16px; margin-top: 24px; }
.secondary-button:disabled { opacity: .35; cursor: not-allowed; }
.save-note { text-align: center; color: var(--dim); font-size: .76rem; }
.primary-button {
  border: 1px solid #ffc86d; background: linear-gradient(135deg, #e89a2e, #f7bd5c); color: #211402;
  font-weight: 760; border-radius: 11px; padding: 12px 18px; cursor: pointer; box-shadow: 0 10px 30px rgba(242,173,68,.13);
}
.primary-button:hover { filter: brightness(1.06); transform: translateY(-1px); }
.primary-button span { margin-left: 7px; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 18px); opacity: 0; pointer-events: none; z-index: 40; background: #f1f3f7; color: #161a24; padding: 11px 16px; border-radius: 10px; font-size: .82rem; font-weight: 650; transition: .25s; box-shadow: 0 12px 40px rgba(0,0,0,.35); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 760px) {
  .brand-sub, .autosave { display: none; }
  .topbar { padding: 0 16px; }
  .shell { width: min(100% - 24px, 1110px); padding-top: 28px; }
  .intro-row { align-items: center; }
  .option-grid, .option-grid.two, .grid-2 { grid-template-columns: 1fr; }
  .timeline-card { grid-template-columns: 1fr auto; }
  .timeline-card .time { grid-column: 1 / -1; padding: 0; }
  .mini-grid { grid-template-columns: 1fr; }
  .summary-grid { grid-template-columns: 1fr 1fr; }
  .flow-actions { grid-template-columns: 1fr 1fr; }
  .save-note { display: none; }
  .completion-ring { width: 52px; height: 52px; }
}

@media (max-width: 430px) {
  .brand { font-size: .91rem; }
  .ghost-button { padding: 8px 10px; font-size: .78rem; }
  .panel { padding: 18px; border-radius: 15px; }
  .summary-grid { grid-template-columns: 1fr; }
}
