:root {
  --bg: #f5f1e8;
  --surface: #fbf9f4;
  --ink: #1f1c18;
  --muted: #61584d;
  --line: #ded6c7;
  --accent: #225444;
  --accent-soft: #e6f0ec;
  --starter: #2c6e5a;
  --standard: #9b5c22;
  --showcase: #6f3255;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
}

a { color: var(--accent); }
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1.5rem;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  flex-wrap: wrap;
}
.brand { font-weight: 700; font-size: 1.05rem; letter-spacing: -0.01em; }
.nav-links { display: flex; gap: 1rem; font-size: 0.9rem; flex-wrap: wrap; }
.nav-links a { text-decoration: none; color: var(--muted); }
.nav-links a:hover { color: var(--ink); text-decoration: underline; }

.hero {
  max-width: 1320px;
  margin: 1.25rem auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 1.5rem;
  align-items: center;
}
.eyebrow { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.75rem; color: var(--muted); margin: 0 0 0.4rem; }
.hero h1 { font-family: Georgia, "Times New Roman", serif; font-size: clamp(2rem, 4vw, 3rem); line-height: 1.08; margin: 0 0 0.75rem; font-weight: 500; }
.hero p { color: var(--muted); margin: 0 0 0.9rem; max-width: 56ch; }
.hero-shot { width: 100%; border-radius: 10px; border: 1px solid var(--line); display: block; }
.stats-pill { font-size: 0.85rem; color: var(--accent); font-weight: 600; }

.workspace {
  max-width: 1320px;
  margin: 1.25rem auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 1.25rem;
}

.viewer-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0.65rem 0.9rem;
  border-bottom: 1px solid var(--line);
  align-items: center;
  justify-content: space-between;
}
.toolbar-group { display: flex; gap: 0.4rem; flex-wrap: wrap; align-items: center; }

.stage-wrap {
  position: relative;
  width: 100%;
  height: 540px;
  background: #ede7dc;
}
#stage, #stage canvas { width: 100%; height: 100%; display: block; }
#plate-layer { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }

.maker-plate {
  position: absolute;
  pointer-events: auto;
  background: rgba(251, 249, 244, 0.94);
  border: 1px solid #b9ae9c;
  border-radius: 6px;
  padding: 0.22rem 0.5rem;
  font-size: 0.72rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}
.maker-plate.is-selected { border-color: var(--accent); background: var(--accent-soft); }
.plate-title { font-weight: 600; color: var(--ink); white-space: nowrap; }
.plate-maker { color: var(--muted); font-size: 0.67rem; }

.btn {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  border-radius: 6px;
  padding: 0.36rem 0.7rem;
  font-size: 0.82rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.btn:hover { background: #efe9dc; }
.btn.is-active, .btn-primary { background: var(--accent); color: #ffffff; border-color: var(--accent); }
.btn-primary:hover { background: #194134; }

.replay-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.9rem;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
  color: var(--muted);
  flex-wrap: wrap;
}
.replay-bar input[type="range"] { flex: 1; min-width: 120px; }

.inspector {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1rem;
  align-self: start;
}
.insp-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.35rem; }
.insp-id { font-family: ui-monospace, monospace; font-size: 0.78rem; color: var(--muted); }
.insp-title { margin: 0 0 0.65rem; font-family: Georgia, serif; font-size: 1.35rem; font-weight: 500; }
.insp-preview { width: 100%; border-radius: 7px; border: 1px solid var(--line); margin-bottom: 0.65rem; display: block; }
.insp-summary { font-size: 0.88rem; color: var(--muted); margin: 0 0 0.8rem; }
.insp-meta { display: grid; grid-template-columns: auto 1fr; gap: 0.3rem 0.8rem; font-size: 0.82rem; margin: 0 0 0.9rem; }
.insp-meta dt { color: var(--muted); }
.insp-meta dd { margin: 0; font-weight: 500; }
.insp-actions { display: flex; gap: 0.5rem; margin-bottom: 0.9rem; flex-wrap: wrap; }
.insp-sub { margin: 0 0 0.4rem; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.insp-needs { margin: 0; padding-left: 1.1rem; font-size: 0.8rem; color: var(--muted); }
.insp-needs li { margin-bottom: 0.25rem; }

.badge { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em; padding: 0.14rem 0.5rem; border-radius: 999px; color: #ffffff; font-weight: 600; }
.badge-starter { background: var(--starter); }
.badge-standard { background: var(--standard); }
.badge-showcase { background: var(--showcase); }

.section {
  max-width: 1320px;
  margin: 1.8rem auto;
  padding: 0 1.5rem;
}
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 0.9rem; flex-wrap: wrap; }
.section h2 { font-family: Georgia, serif; font-weight: 500; margin: 0; font-size: 1.5rem; }

.plot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(235px, 1fr));
  gap: 0.75rem;
}
.plot-card {
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.75rem;
  cursor: pointer;
}
.plot-card.is-built { border-color: #9cb6ac; }
.plot-card:hover { background: #f1ece1; }
.card-top { display: flex; justify-content: space-between; margin-bottom: 0.35rem; }
.card-id { font-family: ui-monospace, monospace; font-size: 0.78rem; color: var(--muted); }
.card-title { font-weight: 600; font-size: 0.92rem; margin-bottom: 0.2rem; }
.card-sub { font-size: 0.78rem; color: var(--muted); }
.card-live { font-size: 0.75rem; color: var(--accent); margin-top: 0.25rem; }

.credits-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.credits-box { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 1rem 1.2rem; }
.credits-box h3 { margin: 0 0 0.6rem; font-size: 1.05rem; }
.credits-box ul { margin: 0; padding-left: 1.1rem; font-size: 0.86rem; color: var(--muted); }
.credit-row { margin-bottom: 0.35rem; }

.live-strip {
  display: flex;
  gap: 1rem;
  align-items: center;
  font-size: 0.8rem;
  color: var(--muted);
  padding: 0.55rem 0.9rem;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}
.live-strip label { display: inline-flex; gap: 0.35rem; align-items: center; cursor: pointer; }

@media (max-width: 960px) {
  .hero, .workspace, .credits-grid { grid-template-columns: 1fr; }
  .stage-wrap { height: 420px; }
}
