:root {
  color: #20231f;
  background: #f3f1e9;
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: #f3f1e9; }

.app-header {
  align-items: center;
  background: rgba(251, 250, 246, 0.96);
  border-bottom: 1px solid #d9d5c9;
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(210px, 1fr) auto minmax(210px, 1fr);
  height: 76px;
  padding: 0 28px;
}

.brand { align-items: center; color: inherit; display: flex; gap: 11px; text-decoration: none; width: max-content; }
.brand-mark { align-items: center; background: #b6402c; border-radius: 8px; color: white; display: flex; font-family: serif; font-size: 22px; height: 40px; justify-content: center; width: 40px; }
.brand strong, .brand small, .run-state strong, .run-state small { display: block; }
.brand strong { font-family: Georgia, "Yu Mincho", serif; font-size: 18px; letter-spacing: .03em; }
.brand small, .run-state small { color: #6e716a; font-size: 11px; margin-top: 2px; }

nav { align-items: center; display: flex; gap: 5px; }
nav a { border-radius: 999px; color: #62655f; font-size: 13px; font-weight: 700; padding: 10px 16px; text-decoration: none; }
nav a:hover { background: #eeeae0; color: #292d28; }
nav a.active { background: #26362d; color: white; }

.run-state { align-items: center; display: flex; gap: 9px; justify-self: end; }
.run-state strong { font-size: 12px; }
.new-map-action { background: transparent; border: 1px solid #b9b6ac; border-radius: 5px; color: #333730; cursor: pointer; font-family: inherit; font-size: 11px; font-weight: 700; padding: 7px 10px; }
.new-map-action:hover, .new-map-action:focus-visible { background: #eeeae0; outline: 2px solid #c9a89f; outline-offset: 1px; }
.new-map-action:disabled { cursor: wait; opacity: .55; }
.status-dot { background: #568567; border: 3px solid #dce8df; border-radius: 50%; height: 12px; width: 12px; }
.workspace-shell { height: calc(100vh - 76px); }
#workspace { background: #f3f1e9; border: 0; display: block; height: 100%; width: 100%; }

.overview-page { min-height: 100vh; }
.overview-shell { margin: 0 auto; max-width: 1440px; padding: 52px clamp(28px, 5vw, 76px) 64px; }
.intro { align-items: center; display: grid; gap: clamp(40px, 6vw, 92px); grid-template-columns: minmax(340px, .85fr) minmax(520px, 1.15fr); min-height: 520px; }
.eyebrow { color: #a04431; font-size: 11px; font-weight: 800; letter-spacing: .16em; margin: 0 0 14px; }
h1 { font-family: Georgia, "Yu Mincho", serif; font-size: clamp(42px, 5vw, 68px); font-weight: 500; letter-spacing: -.035em; line-height: 1.2; margin: 0; }
.lead { color: #656961; font-size: 16px; line-height: 1.95; margin: 27px 0 0; max-width: 520px; }
.intro-actions { display: flex; gap: 12px; margin-top: 32px; }
.intro-actions a { border-radius: 6px; font-size: 14px; font-weight: 700; padding: 13px 21px; text-decoration: none; }
.primary-action { background: #b6402c; color: white; }
.secondary-action { border: 1px solid #b9b6ac; color: #333730; }

.preview-card { background: white; border: 1px solid #d8d4c8; border-radius: 8px; box-shadow: 0 24px 60px rgba(48, 43, 34, .12); overflow: hidden; }
.preview-card img { background: #ece7dc; display: block; height: 430px; object-fit: contain; padding: 16px; width: 100%; }
.preview-meta, .preview-footer { align-items: center; display: flex; justify-content: space-between; padding: 14px 18px; }
.preview-meta { border-bottom: 1px solid #ebe7dd; }
.preview-meta span, .preview-footer { color: #72756e; font-size: 11px; }
.preview-meta strong { font-family: Georgia, "Yu Mincho", serif; font-size: 15px; }
.preview-footer { border-top: 1px solid #ebe7dd; }

.workflow { border-top: 1px solid #d7d2c5; margin-top: 54px; padding-top: 42px; }
.section-heading { align-items: end; display: flex; justify-content: space-between; }
.section-heading h2 { font-family: Georgia, "Yu Mincho", serif; font-size: 30px; font-weight: 500; margin: 0; }
.section-heading > p { color: #74776f; font-size: 12px; line-height: 1.7; margin: 0; max-width: 440px; }
.stage-grid { display: grid; gap: 16px; grid-template-columns: repeat(3, 1fr); margin-top: 26px; }
.stage-card { background: #fbfaf6; border: 1px solid #d8d4c8; border-radius: 7px; color: inherit; display: flex; flex-direction: column; min-height: 220px; padding: 23px; text-decoration: none; transition: transform .15s ease, box-shadow .15s ease; }
.stage-card:hover { box-shadow: 0 12px 28px rgba(48, 43, 34, .09); transform: translateY(-2px); }
.stage-number { color: #aa4a37; font: 700 12px Georgia, serif; margin-bottom: 35px; }
.stage-card strong { font-family: Georgia, "Yu Mincho", serif; font-size: 20px; font-weight: 500; }
.stage-card p { color: #70736c; font-size: 13px; line-height: 1.75; }
.stage-link { color: #a04431; font-size: 12px; font-weight: 700; margin-top: auto; }
.boundary-note { background: #e8e3d7; border-left: 3px solid #8f8a7c; display: grid; gap: 24px; grid-template-columns: 150px 1fr; margin-top: 28px; padding: 19px 22px; }
.boundary-note strong, .boundary-note p { font-size: 12px; line-height: 1.7; margin: 0; }
.boundary-note p { color: #666961; }

@media (max-width: 1000px) {
  .app-header { grid-template-columns: auto 1fr; padding: 0 18px; }
  .run-state { display: none; }
  nav { justify-self: end; }
  nav a { padding: 9px 11px; }
  .intro { grid-template-columns: 1fr; }
  .preview-card img { height: auto; }
  .section-heading { align-items: start; flex-direction: column; gap: 16px; }
}

@media (max-width: 720px) {
  .app-header { display: block; height: 112px; padding-top: 10px; }
  .brand { margin: 0 auto 7px; }
  nav { justify-content: center; overflow-x: auto; }
  nav a { font-size: 11px; white-space: nowrap; }
  .workspace-shell { height: calc(100vh - 112px); }
  .overview-shell { padding: 34px 20px 48px; }
  .intro { display: flex; flex-direction: column; min-height: 0; }
  h1 { font-size: 42px; }
  .stage-grid { grid-template-columns: 1fr; }
  .boundary-note { grid-template-columns: 1fr; gap: 5px; }
}
