:root {
  --paper: #fffaf3;
  --ink: #24313a;
  --muted: #66737c;
  --line: #e5ded1;
  --card: #ffffff;
  --sun: #f7c85f;
  --leaf: #8abf83;
  --sky: #7fb7d8;
  --berry: #b989c7;
  --coral: #ef8d7b;
  --shadow: 0 18px 45px rgba(61, 55, 45, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(127, 183, 216, 0.18), transparent 320px),
    var(--paper);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", Arial, sans-serif;
}

.topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 32px 20px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 8px;
  color: #687b5f;
  font-size: 13px;
  font-weight: 700;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: 32px;
}

h2 {
  font-size: 30px;
}

h3 {
  font-size: 20px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(82px, 1fr));
  gap: 10px;
  min-width: 300px;
}

.stats div {
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.stats strong,
.stats span {
  display: block;
}

.stats strong {
  font-size: 22px;
}

.stats span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.layout {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 24px;
  padding: 24px 32px 40px;
}

.sidebar {
  position: sticky;
  top: 18px;
  align-self: start;
}

.searchBox {
  margin-bottom: 14px;
}

.searchBox label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
}

.searchBox input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  color: var(--ink);
  font-size: 15px;
}

.topicList {
  display: grid;
  gap: 8px;
  max-height: calc(100vh - 170px);
  overflow: auto;
  padding-right: 4px;
}

.topicBtn {
  width: 100%;
  min-height: 74px;
  padding: 12px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--ink);
  cursor: pointer;
}

.topicBtn:hover,
.topicBtn.active {
  border-color: #9fc7a2;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(79, 114, 86, 0.12);
}

.topicMeta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
}

.topicTitle {
  font-size: 16px;
  font-weight: 700;
}

.topicSub {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 8px;
  border-radius: 999px;
  color: #2d4632;
  background: rgba(138, 191, 131, 0.26);
  font-size: 12px;
  font-weight: 700;
}

.badge.pending {
  color: #725220;
  background: rgba(247, 200, 95, 0.34);
}

.badge.done {
  color: #24476d;
  background: rgba(127, 183, 216, 0.32);
}

.content {
  min-width: 0;
}

.contentHeader {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow);
}

.summary {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.primaryBtn,
.copyBtn {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid #91b48c;
  border-radius: 8px;
  background: #edf7e8;
  color: #25482b;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.copyBtn {
  min-height: 34px;
  background: #f7fbff;
  border-color: #a8c7dc;
  color: #31556d;
}

.confirmPanel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding: 18px 20px;
  border: 1px solid #d6bd80;
  border-radius: 8px;
  background: #fff9e9;
}

.confirmPanel.isDone {
  border-color: #9fc7a2;
  background: #f1faee;
}

.confirmPanel p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.confirmLabel {
  font-size: 17px;
  font-weight: 800;
}

.confirmBtn {
  min-width: 112px;
}

.section {
  margin-bottom: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
}

.sectionHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

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

.infoTile {
  padding: 14px;
  border: 1px solid #ece5d8;
  border-radius: 8px;
  background: #fffdf8;
}

.infoTile span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
}

.infoTile strong {
  font-size: 16px;
}

.lyrics {
  display: grid;
  gap: 10px;
}

.lyricRow {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  border: 1px solid #ece5d8;
  border-radius: 8px;
  background: #fffdf8;
}

.time {
  color: #8b5d27;
  font-weight: 800;
}

.promptBox {
  margin: 0;
  padding: 14px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  border: 1px solid #d8e5ec;
  border-radius: 8px;
  background: #f8fcff;
  color: #23343f;
  line-height: 1.7;
  font-family: inherit;
}

.shotList {
  display: grid;
  gap: 12px;
}

.shot {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
  border: 1px solid #ece5d8;
  border-radius: 8px;
  background: #fffdf8;
}

.shotIndex {
  color: #7a4e79;
  font-weight: 800;
}

.shot p {
  margin: 0 0 8px;
  line-height: 1.7;
}

.shotPrompt {
  margin-top: 10px;
  padding: 12px;
  border-radius: 8px;
  background: #f9f5fb;
  overflow-wrap: anywhere;
  line-height: 1.7;
}

.editPlan {
  margin: 0;
  padding-left: 20px;
  line-height: 1.9;
}

.pendingPanel {
  padding: 28px;
  border: 1px dashed #d6bd80;
  border-radius: 8px;
  background: rgba(255, 252, 242, 0.86);
}

.pendingPanel p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  padding: 12px 16px;
  border-radius: 8px;
  background: #24313a;
  color: #fff;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 900px) {
  .topbar,
  .contentHeader,
  .confirmPanel {
    display: grid;
  }

  .stats {
    min-width: 0;
    width: 100%;
  }

  .layout {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .sidebar {
    position: static;
  }

  .topicList {
    max-height: 320px;
  }

  .gridTwo,
  .shot,
  .lyricRow {
    grid-template-columns: 1fr;
  }
}
