:root {
  color-scheme: light;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #f5f1ea;
  color: #201a17;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  border-radius: 8px;
  background: #6e3b2f;
  color: white;
  cursor: pointer;
  padding: 10px 14px;
}

button:hover {
  background: #583026;
}

.button-link {
  background: #6e3b2f;
  border-radius: 8px;
  color: white;
  display: inline-block;
  padding: 10px 14px;
  text-decoration: none;
}

.button-link.secondary {
  background: #eaded1;
  color: #3f302a;
}

.shell {
  width: min(1220px, calc(100vw - 28px));
  margin: 0 auto;
  padding: 28px 0 52px;
}

.hero {
  align-items: end;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  padding: 18px 0 22px;
}

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

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(30px, 4vw, 52px);
  letter-spacing: 0;
  line-height: 1.05;
  margin-bottom: 10px;
}

h2 {
  font-size: 20px;
}

h3 {
  font-size: 16px;
  margin-bottom: 8px;
}

.lede {
  color: #67544d;
  font-size: 17px;
  margin-bottom: 0;
}

.hero-stat {
  background: #fffaf4;
  border: 1px solid #e6d7c9;
  border-radius: 8px;
  min-width: 170px;
  padding: 16px;
}

.hero-stat span,
.hero-stat small,
.metric span,
label {
  color: #6f5b53;
}

.hero-stat strong {
  display: block;
  font-size: 34px;
}

.account-box {
  align-items: center;
  background: #fffaf4;
  border: 1px solid #e2d0c1;
  border-radius: 8px;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 18px;
  padding: 14px 16px;
}

.account-box p {
  color: #6f5b53;
  margin: 4px 0 0;
}

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  overflow-x: auto;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.tab {
  background: #eaded1;
  color: #3f302a;
  flex: 0 0 auto;
}

.tab.active {
  background: #6e3b2f;
  color: white;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.section-head {
  align-items: end;
  display: flex;
  justify-content: space-between;
  margin: 22px 0 12px;
}

.section-head.tight {
  margin: 0 0 14px;
}

.section-head p,
.panel > p,
.hint {
  color: #6f5b53;
}

.direction-grid,
.dashboard-grid,
.editor-grid,
.metrics,
.preset-grid,
.two-column {
  display: grid;
  gap: 14px;
}

.direction-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.direction-card {
  background: #fffaf4;
  border: 1px solid #e2d0c1;
  color: #201a17;
  min-height: 96px;
  text-align: left;
}

.direction-card.selected {
  border-color: #6e3b2f;
  box-shadow: 0 0 0 2px rgba(110, 59, 47, 0.18);
}

.direction-card strong,
.direction-card span {
  display: block;
}

.direction-card span {
  color: #6f5b53;
  margin-top: 8px;
}

.preset-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.preset-card,
.panel {
  background: #fffaf4;
  border: 1px solid #e2d0c1;
  border-radius: 8px;
}

.preset-card {
  cursor: pointer;
  display: grid;
  gap: 12px;
  grid-template-columns: 72px 1fr;
  min-height: 230px;
  padding: 14px;
}

.preset-card.selected {
  border-color: #6e3b2f;
  box-shadow: 0 0 0 2px rgba(110, 59, 47, 0.18);
}

.avatar {
  align-items: center;
  aspect-ratio: 1;
  border-radius: 50%;
  color: white;
  display: flex;
  font-weight: 800;
  justify-content: center;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.25);
}

.avatar.large {
  width: 92px;
}

.preset-body p,
.preset-body small,
blockquote {
  color: #6f5b53;
}

blockquote {
  border-left: 3px solid #c99b84;
  margin: 10px 0;
  padding-left: 10px;
}

.tags,
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tags span,
.chips span {
  background: #efe3d8;
  border-radius: 999px;
  color: #6e3b2f;
  font-size: 12px;
  padding: 5px 8px;
}

.panel,
.claim-editor {
  padding: 18px;
}

.editor-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.span-2 {
  grid-column: 1 / -1;
}

label {
  display: block;
  font-size: 14px;
  margin-bottom: 12px;
}

.checkbox-line {
  align-items: center;
  background: #f0e4d8;
  border-radius: 8px;
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 10px;
}

.checkbox-line input {
  margin: 0;
  width: auto;
}

input,
select,
textarea {
  background: white;
  border: 1px solid #d9c9bb;
  border-radius: 8px;
  margin-top: 6px;
  padding: 10px;
  width: 100%;
}

textarea {
  resize: vertical;
}

.two-column {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.dashboard-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.wide {
  grid-column: 1 / -1;
}

.stack {
  display: grid;
  gap: 8px;
}

.profile-row {
  align-items: center;
  display: flex;
  gap: 16px;
  margin-bottom: 18px;
}

.metrics {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.metrics.compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.metric {
  background: #f0e4d8;
  border-radius: 8px;
  padding: 12px;
}

.metric strong {
  display: block;
  font-size: 20px;
  overflow-wrap: anywhere;
}

.bond-stage {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.bond-stage span {
  font-size: 24px;
  font-weight: 800;
}

.progress {
  background: #eaded1;
  border-radius: 999px;
  height: 12px;
  margin: 12px 0 16px;
  overflow: hidden;
}

.progress i {
  background: linear-gradient(90deg, #6e3b2f, #d79a73);
  display: block;
  height: 100%;
}

.memory {
  background: #f0e4d8;
  border-radius: 8px;
  padding: 10px;
}

.admin-list {
  display: grid;
  gap: 10px;
}

.admin-row {
  align-items: start;
  background: #f0e4d8;
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 12px;
}

.admin-row.slim {
  align-items: center;
}

.admin-row p {
  color: #6f5b53;
  margin-bottom: 8px;
  overflow-wrap: anywhere;
}

.status-pill {
  background: #fffaf4;
  border-radius: 999px;
  color: #6e3b2f;
  font-size: 12px;
  padding: 6px 9px;
  white-space: nowrap;
}

.empty {
  color: #6f5b53;
  margin-bottom: 0;
}

pre {
  background: #f0e4d8;
  border-radius: 8px;
  min-height: 120px;
  overflow: auto;
  padding: 12px;
  white-space: pre-wrap;
}

.status {
  color: #6e3b2f;
  margin: 10px 0 0;
}

@media (max-width: 900px) {
  .hero,
  .account-box,
  .two-column {
    display: block;
  }

  .direction-grid,
  .preset-grid,
  .dashboard-grid,
  .editor-grid {
    grid-template-columns: 1fr;
  }

  .panel,
  .preset-card,
  .hero-stat {
    margin-bottom: 14px;
  }

  .metrics.compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
