:root {
  font-family: "Noto Sans SC", "Microsoft YaHei", "PingFang SC", sans-serif;
  color: #191b20;
  background: #faf9f7;
  --primary: #164ec6;
  --muted: #50545e;
  --line: #d6d7db;
}

.desk form label:not(:first-child) { margin-top: 16px; }
.desk-section { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); }
.desk-section h2 { margin: 0 0 8px; font-size: 21px; }
.desk-table { margin-top: 12px; }
.desk-table table { width: 100%; table-layout: fixed; border-collapse: collapse; }
.desk-table th, .desk-table td { padding: 9px 5px; text-align: left; overflow-wrap: anywhere; border-bottom: 1px solid var(--line); }
.desk-table th:first-child { width: 20%; }
.desk-table th:nth-child(2) { width: 23%; }
.desk-table th:last-child { width: 68px; }
.desk .desk-reset { color: #9e2c22; border-color: #9e2c22; }
.desk-matches { list-style: none; padding: 0; margin: 0; }
.desk-matches li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-block: 6px; border-bottom: 1px solid var(--line); }
.desk-matches li span { overflow-wrap: anywhere; min-width: 0; }
.desk .desk-delete { flex-shrink: 0; margin: 0; padding-inline: 8px; color: #9e2c22; border-color: #9e2c22; }
@media (max-width: 420px) {
  .main.desk { width: calc(100% - 32px); padding-top: 24px; }
}

* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }

.site-header { border-bottom: 1px solid var(--line); }
.header-inner, .main { width: min(100% - 48px, 520px); margin-inline: auto; }
.header-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-block: 16px;
  font-size: 21px;
  font-weight: 750;
}
.parking-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 5px;
  color: #fff;
  background: var(--primary);
  font: 750 25px/1 Geist, sans-serif;
}
.main { padding-block: 36px 48px; }
h1 { font-size: clamp(30px, 8vw, 40px); line-height: 1.2; margin: 0 0 12px; }
p { margin: 0; line-height: 1.65; }
.intro, #result-detail { color: var(--muted); }
form { display: grid; margin-top: 28px; }
label { font-weight: 700; margin-bottom: 8px; }
input, button { font: inherit; border-radius: 6px; min-height: 48px; }
input {
  width: 100%;
  background: #fff;
  border: 1px solid #a5a8b1;
  padding: 10px 12px;
  color: inherit;
}
input:focus-visible, button:focus-visible { outline: 3px solid #81a8ff; outline-offset: 2px; }
button {
  margin-top: 16px;
  padding: 10px 16px;
  color: white;
  background: var(--primary);
  border: 1px solid var(--primary);
  font-weight: 700;
  cursor: pointer;
}
button:disabled { opacity: .65; cursor: progress; }
button.secondary { color: var(--primary); background: #fff; }
.result { margin-top: 64px; text-align: center; }
.result h2 { font-size: 24px; margin: 0 0 8px; }
.result button { width: 100%; }
.header-link {
  margin: 0 0 0 auto;
  color: var(--primary);
  background: transparent;
  border: 0;
  padding: 0;
  font-size: 15px;
  font-weight: 650;
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.staff-message { margin-top: 14px; color: var(--muted); }
.saved-feedback { padding: 12px 14px; border-radius: 6px; color: #14613c; background: #e5f2e9; }
.staff-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 14px 16px;
}
.staff-result button { margin-top: 0; }
.records { margin-top: 28px; }
.records h2 { font-size: 23px; margin: 0 0 14px; }
.records p { color: var(--muted); }
.records ul { margin: 0; padding: 0; list-style: none; }
.record-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  text-align: left;
  background: transparent;
  color: inherit;
  border-color: var(--line);
  margin: 0 0 10px;
}
.record-row span { color: var(--muted); font-size: 14px; font-weight: 400; }
.staff-nav { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 18px; }
.staff-nav a { color: var(--primary); padding-block: 10px; font-weight: 650; }
.entrance { display: grid; justify-items: center; gap: 16px; margin-top: 24px; }
.entrance img { width: min(100%, 320px); height: auto; border: 1px solid var(--line); }
.entrance-url { color: var(--primary); font-weight: 650; padding-block: 8px; }
.entrance-download {
  display: grid;
  place-items: center;
  min-height: 48px;
  width: 100%;
  border-radius: 6px;
  color: #fff;
  background: var(--primary);
  text-decoration: none;
  font-weight: 700;
}
select {
  width: 100%;
  min-height: 48px;
  padding: 8px 10px;
  border: 1px solid #a5a8b1;
  border-radius: 6px;
  background: #fff;
  color: inherit;
  font: inherit;
}
#saved-map { margin-top: 8px; }
#map-form label:not(:first-child), .region-controls { margin-top: 16px; }
.region-controls { display: grid; }
.map-help { margin-top: 14px; color: var(--muted); }
.map-preview {
  position: relative;
  margin-top: 14px;
  overflow: hidden;
  outline: 1px solid var(--line);
  background: white;
}
.map-preview img { display: block; width: 100%; height: auto; }
.map-editor { touch-action: none; user-select: none; cursor: crosshair; }
.map-editor img { pointer-events: none; }
.map-overlays { position: absolute; inset: 0; pointer-events: none; }
.region-box {
  position: absolute;
  display: grid;
  place-items: center;
  border: 2px solid var(--primary);
  background: #164ec633;
}
.region-box span {
  max-width: 100%;
  overflow-wrap: anywhere;
  padding: 2px 4px;
  color: white;
  background: var(--primary);
  font-size: 12px;
}
.region-highlight { border-color: #167044; background: #16704433; }
.region-highlight span { background: #167044; }
.region-list { list-style: none; padding: 0; margin: 8px 0 0; }
.region-list li { display: flex; align-items: center; justify-content: space-between; gap: 8px; overflow-wrap: anywhere; }
.region-list button { margin-top: 8px; }
.history-record { margin-top: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 6px; overflow-wrap: anywhere; }
.history-record summary { min-height: 28px; font-weight: 650; cursor: pointer; }
.history-record small, .history-record > p { color: var(--muted); }
.history-record ol { padding-left: 20px; }
.history-record li + li { margin-top: 10px; }
@media (max-width: 350px) {
  .header-inner, .main { width: calc(100% - 32px); }
  .result { margin-top: 40px; }
}
