:root {
  --bg: #eef6f2;
  --ink: #16302a;
  --muted: #5b746d;
  --card: #ffffff;
  --line: #d5e6df;
  --brand: #0f7a62;
  --brand-2: #1aa37f;
  --gold: #c9a24a;
  --danger: #c45c4a;
  --shadow: 0 10px 30px rgba(15, 50, 40, 0.08);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Source Han Sans SC", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(1200px 500px at 10% -10%, #d7f0e6 0%, transparent 55%),
    radial-gradient(900px 400px at 100% 0%, #f3ead2 0%, transparent 50%),
    var(--bg);
  color: var(--ink);
  min-height: 100vh;
}

.wrap { width: min(1080px, calc(100% - 32px)); margin: 0 auto; padding-bottom: 96px; }

header {
  padding: 36px 0 18px;
  display: grid;
  gap: 8px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--brand);
  font-size: 13px;
  padding: 6px 10px;
  border-radius: 999px;
}
h1 { margin: 0; font-size: clamp(28px, 5vw, 44px); letter-spacing: 0.02em; }
.lead { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.7; max-width: 42em; }

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0 16px;
}
.chip {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 13px;
}
.chip.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

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

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 14px 12px;
  box-shadow: var(--shadow);
  cursor: pointer;
  display: grid;
  gap: 6px;
  position: relative;
  transition: transform .15s ease, border-color .15s ease;
}
.card:hover { transform: translateY(-2px); }
.card.selected {
  border-color: var(--brand);
  outline: 2px solid rgba(15, 122, 98, 0.18);
}
.cat { font-size: 11px; color: var(--brand); letter-spacing: 0.08em; }
.card h3 { margin: 0; font-size: 17px; }
.card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.check {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid #b7c9c2;
  background: #fff;
  display: grid;
  place-items: center;
  font-size: 12px;
  color: transparent;
}
.card.selected .check {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.panel {
  margin-top: 28px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 20px;
  box-shadow: var(--shadow);
}
.panel h2 { margin: 0 0 6px; font-size: 20px; }
.meta { color: var(--muted); font-size: 13px; margin-bottom: 16px; }

.form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.form label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.form input, .form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  color: var(--ink);
  background: #f8fbfa;
}
.form textarea { grid-column: 1 / -1; min-height: 72px; resize: vertical; }
.form .full { grid-column: 1 / -1; }

button.primary {
  border: 0;
  background: linear-gradient(180deg, var(--brand-2), var(--brand));
  color: #fff;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 15px;
  cursor: pointer;
}
button.primary:disabled { opacity: .55; cursor: not-allowed; }
.hint { font-size: 12px; color: var(--muted); }

.bars { display: grid; gap: 10px; margin-top: 8px; }
.bar-row { display: grid; grid-template-columns: 140px 1fr 36px; gap: 8px; align-items: center; font-size: 13px; }
.bar-track { height: 10px; background: #e7f1ed; border-radius: 99px; overflow: hidden; }
.bar-fill { height: 100%; width: 0; background: linear-gradient(90deg, #1aa37f, #c9a24a); border-radius: 99px; transition: width .5s ease; }
.bar-row b { text-align: right; }

.recent { display: grid; gap: 8px; margin-top: 16px; }
.recent article {
  background: #f6fbf8;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13px;
}
.recent strong { display: block; margin-bottom: 2px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 88px;
  transform: translateX(-50%) translateY(12px);
  background: #16302a;
  color: #fff;
  padding: 10px 14px;
  border-radius: 10px;
  opacity: 0;
  pointer-events: none;
  transition: .25s ease;
  z-index: 20;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.dock {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
}
.dock-inner {
  width: min(1080px, 100%);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.mode {
  font-size: 12px;
  color: var(--muted);
}
.mode.live { color: var(--brand); }
.mode.demo { color: #9a6b16; }

footer {
  margin-top: 28px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

@media (max-width: 640px) {
  .form { grid-template-columns: 1fr; }
  .bar-row { grid-template-columns: 1fr; }
  .bar-row b { text-align: left; }
}
