:root {
  --bg: #f2efe6;
  --ink: #14202b;
  --muted: #5d6670;
  --brand: #b24a26;
  --brand-soft: #f4d8c9;
  --card: #fffdf7;
  --line: #dbcfbf;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "PingFang SC", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  color: var(--ink);
  background: var(--bg);
}
.bg-shape {
  position: fixed;
  border-radius: 999px;
  z-index: -1;
  filter: blur(2px);
}
.bg-shape-a {
  width: 380px;
  height: 380px;
  left: -100px;
  top: -100px;
  background: radial-gradient(circle, #d7e5da, transparent 70%);
}
.bg-shape-b {
  width: 440px;
  height: 440px;
  right: -120px;
  bottom: -140px;
  background: radial-gradient(circle, #f1d5c7, transparent 68%);
}
.page {
  width: min(980px, 100%);
  margin: 0 auto;
  padding: 18px 14px 92px;
}
.hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}
.hero h1 {
  margin: 0;
  letter-spacing: 0.04em;
  font-size: clamp(24px, 5vw, 34px);
}
.hero p {
  margin: 8px 0 0;
  color: var(--muted);
}
.hero.mini {
  margin-bottom: 12px;
}
.ghost-btn {
  border: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 10px;
  background: #fff;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: 0 8px 22px rgba(20, 32, 43, 0.06);
}
.card h2 {
  margin: 0 0 12px;
  font-size: 18px;
}
.tab-panel {
  display: none;
}
.tab-panel.active {
  display: block;
}
.grid-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.grid-form.compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.grid-form.notify {
  margin-top: 10px;
  grid-template-columns: 1fr auto;
}
.line-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}
.buy-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.scene-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 10px 12px;
}
.scene-card-label {
  font-size: 13px;
  color: var(--muted);
}
.scene-card strong {
  font-size: 15px;
  color: var(--ink);
}
.scene-card-hint {
  font-size: 12px;
  line-height: 1.5;
  color: #75685d;
}
.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}
.tab {
  background: #fff;
  color: #36414d;
  border: 1px solid var(--line);
}
.tab.active {
  background: var(--brand-soft);
  border-color: #c77e5d;
  color: #7a351b;
}
label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}
input,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 9px 10px;
  font-size: 14px;
}
.checkbox {
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  padding-top: 28px;
}
.checkbox input {
  width: auto;
  margin: 0;
}
button {
  border: 0;
  border-radius: 10px;
  background: linear-gradient(140deg, #cc6439, var(--brand));
  color: white;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 10px 12px;
  cursor: pointer;
}
.result {
  margin-top: 12px;
  border-radius: 12px;
  background: #faf7f2;
  border: 1px dashed #d6c6b2;
  padding: 10px;
  font-size: 13px;
  color: #39424b;
  min-height: 40px;
}
.status-ok {
  padding: 8px 10px;
  border-radius: 10px;
  background: #ebf8f1;
  color: #1f6f4a;
  border: 1px solid #b8e2ce;
  margin-bottom: 8px;
}
.status-err {
  padding: 8px 10px;
  border-radius: 10px;
  background: #fff1f0;
  color: #9d2b1d;
  border: 1px solid #efc2be;
}
.status-tip {
  color: #5d6670;
}
.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.summary-item {
  border: 1px solid #e3d7c7;
  border-radius: 10px;
  padding: 8px;
  background: #fff;
}
.summary-item span {
  display: block;
  color: #7a7f85;
  font-size: 12px;
}
.summary-item strong {
  font-size: 14px;
}
.simple-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.list-item {
  border: 1px solid #e3d7c7;
  border-radius: 10px;
  background: #fff;
  padding: 8px;
}
.list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.list-meta {
  color: #666;
  margin-top: 4px;
  font-size: 12px;
}
.pill {
  display: inline-block;
  border-radius: 999px;
  background: #f4d8c9;
  color: #8a3f21;
  padding: 2px 8px;
  font-size: 11px;
}
.link-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 6px;
}
.result img {
  width: 100%;
  border-radius: 8px;
  border: 1px solid #d8d1c5;
  margin-top: 8px;
}
.result pre {
  margin: 8px 0 0;
  overflow: auto;
  max-height: 180px;
}
.result a { color: #8d3f1f; }

.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  background: rgba(255, 252, 245, 0.95);
  backdrop-filter: blur(10px);
  border-top: 1px solid #dcccc0;
}
.tabbar-item {
  border: 1px solid #e3d7c7;
  border-radius: 12px;
  padding: 8px 6px;
  font-size: 13px;
  color: #6a584c;
  background: #fff;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}
.tabbar-icon {
  width: 18px;
  height: 18px;
  line-height: 0;
}
.tabbar-icon svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}
.tabbar-item.active {
  background: linear-gradient(145deg, #cc6439, #b24a26);
  color: #fff;
  border-color: #b24a26;
}

@media (max-width: 760px) {
  .grid-form,
  .grid-form.compact,
  .grid-form.notify,
  .line-form,
  .buy-row {
    grid-template-columns: 1fr;
  }
  .page {
    padding-bottom: 96px;
  }
  .summary-grid {
    grid-template-columns: 1fr;
  }
}
