:root {
  --paper: #f3f1e9;
  --ink: #293e36;
  --muted: #6d746c;
  --line: #cccec3;
  --accent: #b64c31;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font:
    14px/1.65 Arial,
    "PingFang SC",
    "Microsoft YaHei",
    sans-serif;
}
header,
footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 4%;
  font-size: 10px;
  letter-spacing: 1.4px;
  border-bottom: 1px solid var(--line);
}
a {
  color: inherit;
}
header a {
  text-decoration: none;
}
main {
  max-width: 1450px;
  margin: auto;
  padding: 0 4%;
}
.intro {
  padding: 58px 0 35px;
}
.eyebrow,
small {
  font: 11px/1.5 monospace;
  letter-spacing: 2px;
  color: var(--accent);
}
h1 {
  font:
    clamp(58px, 8.4vw, 124px)/0.98 Georgia,
    serif;
  letter-spacing: -5px;
  margin: 28px 0 36px;
  position: relative;
}
h1 em {
  font-weight: normal;
}
.asterisk {
  position: absolute;
  right: 8%;
  top: 20%;
  font: 100px Georgia;
  color: var(--accent);
}
.intro-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.intro-bottom p {
  font-size: 13px;
  color: var(--muted);
}
button,
.button {
  font: inherit;
  padding: 10px 15px;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
  cursor: pointer;
  border-radius: 2px;
  display: inline-block;
  text-align: center;
}
button:hover,
.button:hover {
  background: #e4e5da;
}
button:disabled {
  opacity: 0.4;
  cursor: default;
}
.primary {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.primary:hover {
  background: #3f5c4f;
}
nav {
  border-block: 1px solid var(--ink);
  display: flex;
  justify-content: space-between;
  padding: 17px 0;
  gap: 12px;
  font: 12px monospace;
}
nav a {
  text-decoration: none;
}
.utility {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 20px 0;
}
.utility span {
  margin-right: auto;
  font-size: 11px;
  color: var(--muted);
}
.utility button,
.utility .button {
  font-size: 11px;
  padding: 7px 10px;
}
#message {
  color: var(--accent);
  min-height: 20px;
  margin: 0;
}
section:not(.intro) {
  padding: 35px 0 55px;
  border-bottom: 1px solid var(--line);
}
.section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 25px;
}
h2 {
  font:
    32px/1.2 Georgia,
    "Songti SC",
    serif;
  margin: 0;
}
h2 small {
  display: block;
  margin-bottom: 12px;
}
.section-title p,
.hint {
  font-size: 11px;
  color: var(--muted);
}
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.space-form,
.compare-panel {
  border: 1px solid var(--line);
  padding: 24px;
}
.space-form h3,
.compare-panel h3 {
  margin: 0 0 18px;
  font: 13px monospace;
  color: var(--accent);
}
label {
  display: block;
  font-size: 12px;
}
input,
select,
textarea {
  line-height: 1.6;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  width: 100%;
  border: 1px solid var(--line);
  background: #faf9f4;
  border-radius: 0;
  padding: 9px;
  margin: 5px 0 12px;
  min-width: 0;
}
textarea {
  resize: vertical;
  min-height: 86px;
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
input:focus,
textarea:focus,
select:focus,
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tabs button.active {
  background: var(--ink);
  color: white;
}
.desk {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  border: 1px solid var(--line);
}
.drawing {
  min-width: 0;
}
.canvas-bar {
  display: flex;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  font: 10px monospace;
  color: var(--muted);
}
#canvas {
  display: block;
  width: 100%;
  background-color: #f8f7f1;
  background-image:
    linear-gradient(#dde0d580 1px, transparent 1px),
    linear-gradient(90deg, #dde0d580 1px, transparent 1px);
  background-size: 28px 28px;
  aspect-ratio: 8/5;
}
.route-line {
  stroke: var(--accent);
  stroke-width: 3;
  fill: none;
  stroke-linejoin: round;
}
.route-node {
  cursor: grab;
  touch-action: none;
  outline: none;
}
.route-node circle {
  fill: var(--paper);
  stroke: var(--accent);
  stroke-width: 2;
}
.route-node[data-type="停留"] circle {
  fill: var(--accent);
}
.route-node text {
  fill: var(--ink);
  font: 13px Arial;
  text-anchor: middle;
  pointer-events: none;
}
.route-node[data-type="停留"] text {
  fill: white;
}
.route-node:focus circle,
.route-node.selected circle {
  stroke: var(--ink);
  stroke-width: 5;
}
.tools {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 15px;
}
.drawing .hint {
  margin: 15px;
}
aside {
  border-left: 1px solid var(--line);
  padding: 16px;
  max-height: 670px;
  overflow: auto;
}
h3 {
  font-size: 14px;
  font-weight: normal;
}
.node-editor {
  border-top: 1px solid var(--line);
  padding: 12px 0;
}
.node-editor.selected {
  border-top-color: var(--accent);
}
.node-head {
  display: flex;
  align-items: center;
  gap: 5px;
}
.node-head strong {
  margin-right: auto;
  font: 12px monospace;
}
.node-head button {
  padding: 5px 9px;
}
.node-editor label {
  font-size: 10px;
}
.node-editor input,
.node-editor select,
.node-editor textarea {
  font-size: 12px;
  padding: 5px;
  margin-bottom: 6px;
}
.node-editor textarea {
  min-height: 55px;
}
.node-editor .field-row {
  gap: 8px;
}
.notes-title {
  display: flex;
  justify-content: space-between;
  margin-top: 28px;
  align-items: center;
}
.notes-title p {
  font-size: 11px;
  color: var(--muted);
}
.notes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.notes label:last-child {
  grid-column: span 2;
}
.notes textarea {
  min-height: 120px;
}
.compare-panel svg,
.card-space svg {
  width: 100%;
  background: #efeee6;
  aspect-ratio: 8/5;
}
.compare-panel p,
.card-space p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.compare-panel small {
  letter-spacing: 0;
}
.preference {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 25px;
  margin-top: 25px;
}
#compare-tabs {
  margin-bottom: 20px;
}
#card-preview {
  padding: 36px;
  background: #faf9f4;
  border: 1px solid var(--ink);
}
.card-brand {
  font: 11px monospace;
  color: var(--accent);
}
.card-title {
  font: 38px Georgia;
  margin: 15px 0 28px;
}
.card-dim {
  border-top: 1px solid var(--line);
  padding: 12px 0;
}
.card-dim b {
  font-size: 11px;
}
.card-summary {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  border-top: 1px solid var(--ink);
  padding-top: 20px;
}
dialog {
  max-width: 90%;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--ink);
  padding: 28px;
}
dialog::backdrop {
  background: #14241b70;
}
footer {
  border-top: 0;
  margin-top: 25px;
  color: var(--muted);
}
@media (max-width: 900px) {
  .intro-bottom {
    flex-wrap: wrap;
  }
  .desk {
    grid-template-columns: minmax(0, 1fr) 260px;
  }
  .notes {
    grid-template-columns: 1fr 1fr;
  }
  .notes label:last-child {
    grid-column: auto;
  }
  .asterisk {
    right: 0;
    font-size: 80px;
  }
  header span:last-child {
    display: none;
  }
}
@media (max-width: 600px) {
  main {
    padding: 0 5%;
  }
  header,
  footer {
    padding: 18px 5%;
    font-size: 9px;
  }
  .intro {
    padding-top: 35px;
  }
  h1 {
    letter-spacing: -2px;
  }
  .asterisk {
    font-size: 45px;
    top: 36%;
  }
  .intro-bottom {
    gap: 8px;
  }
  .intro-bottom .primary {
    margin-top: 12px;
  }
  nav {
    flex-wrap: wrap;
    font-size: 10px;
  }
  nav a {
    width: 45%;
  }
  .section-title {
    display: block;
  }
  .section-title .tabs,
  .section-title button {
    margin-top: 18px;
  }
  h2 {
    font-size: 28px;
  }
  .two-col,
  .preference,
  .notes {
    grid-template-columns: 1fr;
  }
  .space-form,
  .compare-panel {
    padding: 16px;
  }
  .desk {
    display: block;
  }
  aside {
    border-left: 0;
    border-top: 1px solid var(--line);
    max-height: 430px;
  }
  .notes-title {
    display: block;
  }
  .utility span {
    width: 100%;
  }
  .tools button {
    padding: 9px 12px;
  }
  .card-title {
    font-size: 29px;
  }
  #card-preview {
    padding: 20px;
  }
  .field-row {
    gap: 10px;
  }
  footer {
    display: block;
  }
  section:not(.intro) {
    padding-top: 25px;
  }
  .route-node circle {
    stroke-width: 3;
  }
}

.route-node .hit {
  fill: transparent;
  stroke: none;
}
.asterisk {
  font-variant-emoji: text;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
