:root {
  --ink: #221c16;
  --muted: #8d8274;
  --me: #1b6b58;
  --me-ink: #f7f4ee;
  --line: rgba(70, 48, 28, 0.12);
  --paper: #fbf7f1;
  --wash: #f3eee6;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
}

body {
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(27, 107, 88, 0.14), rgba(27, 107, 88, 0.14) 3px, transparent 3px),
    var(--paper);
  overflow: hidden;
  font: 17px/1.85 "Songti SC", "Source Han Serif SC", "Noto Serif SC", "SimSun", serif;
}

button, input { font: 16px/1.5 "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; color: inherit; }

::selection { background: #d5ebe4; }

.stage {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.log {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.log::-webkit-scrollbar { width: 10px; }
.log::-webkit-scrollbar-thumb {
  background: rgba(70, 48, 28, 0.2);
  border-radius: 999px;
  border: 2px solid var(--paper);
}

.sheet {
  width: 100%;
  min-height: 100%;
  padding: 36px clamp(28px, 4vw, 72px) 56px;
}

.empty-lead {
  margin: 8px 0 28px;
  color: var(--muted);
  font: 15px/1.6 "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.preview { opacity: 0.72; }

.brief {
  margin: 8px 0 32px;
  padding: 14px 18px;
  background: var(--wash);
  border-left: 3px solid var(--me);
  border-radius: 0 14px 14px 0;
  color: #4d453c;
  font: 15px/1.65 "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.brief::before {
  content: "想法";
  display: block;
  margin-bottom: 4px;
  color: var(--me);
  letter-spacing: 0.22em;
  font-size: 12px;
}

.scene { margin: 0; }

.scene + .scene {
  margin-top: 34px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.scene p {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.gap { height: 0.85em; }

.tag {
  color: var(--me);
  font: 600 15px/1.4 "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-style: normal;
  letter-spacing: 0.08em;
  margin-right: 0.4em;
}

.tagged { margin-top: 1.05em; }

.slug {
  margin-top: 0.2em;
  color: var(--me);
  font: 600 13px/1.4 "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: 0.16em;
}

.action { margin-top: 0.7em; }

.role {
  margin-top: 1.15em;
  color: var(--me);
  font: 600 13px/1.4 "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: 0.18em;
}

.line {
  margin-top: 0.25em;
  padding: 2px 0 2px 18px;
  border-left: 2px solid rgba(27, 107, 88, 0.45);
}

.note {
  margin-top: 0.85em;
  color: var(--muted);
  font-size: 15px;
  font-style: italic;
}

.writing {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 32px 0 0;
  color: var(--muted);
  font: 14px/1 "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.writing i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--me);
  animation: blink 1.1s infinite ease-in-out;
}

.writing i:nth-child(2) { animation-delay: 0.15s; }
.writing i:nth-child(3) { animation-delay: 0.3s; }

@keyframes blink {
  0%, 80%, 100% { opacity: 0.25; }
  40% { opacity: 1; }
}

.dock {
  background: rgba(251, 247, 241, 0.96);
  border-top: 1px solid var(--line);
  box-shadow: 0 -10px 30px rgba(60, 40, 18, 0.04);
}

.status {
  margin: 0;
  padding: 10px clamp(28px, 4vw, 72px) 0;
  color: #9a3d24;
  font: 13px/1.4 "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.dock-row {
  width: 100%;
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px clamp(28px, 4vw, 72px) 16px;
}

.dock-row input {
  flex: 1;
  min-width: 0;
  border: 1px solid transparent;
  outline: none;
  background: #fff;
  border-radius: 999px;
  padding: 13px 18px;
  box-shadow: inset 0 0 0 1px var(--line);
}

.dock-row input:focus {
  box-shadow: inset 0 0 0 1.5px var(--me);
}

.dock-row input:disabled { opacity: 0.5; }

.dock-row button {
  width: 48px;
  height: 48px;
  flex: none;
  border: 0;
  border-radius: 50%;
  background: var(--me);
  color: var(--me-ink);
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(27, 107, 88, 0.28);
}

.dock-row button svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dock-row button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: none;
}
