:root {
  color-scheme: light;
  --ink: #1d2926;
  --ink-soft: #53615d;
  --muted: #77827e;
  --line: #dbe2df;
  --line-strong: #c6d0cc;
  --canvas: #f2f5f3;
  --paper: #ffffff;
  --green: #17644f;
  --green-deep: #104b3b;
  --green-pale: #e7f1ed;
  --rust: #a94d37;
  --rust-pale: #f8ece8;
  --gold: #9a6e1c;
  --gold-pale: #f7f1e2;
  --focus: #2b8068;
  font-family: Inter, "Noto Sans SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-size: 14px;
  line-height: 1.5;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

[hidden] {
  display: none !important;
}

.topbar {
  position: sticky;
  z-index: 5;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 66px;
  padding: 0 max(28px, calc((100vw - 1420px) / 2));
  border-bottom: 1px solid var(--line);
  background: rgb(255 255 255 / 96%);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: inherit;
  text-decoration: none;
}

.brand-mark,
.dialog-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #fff;
  background: var(--green);
  font-family: "Noto Serif JP", "Yu Mincho", serif;
  font-size: 17px;
  font-weight: 700;
}

.brand-copy {
  display: grid;
  line-height: 1.15;
}

.brand-copy strong {
  font-size: 14px;
  font-weight: 650;
}

.brand-copy small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 23px;
}

.system-state {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 12px;
  white-space: nowrap;
}

.state-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #65a383;
  box-shadow: 0 0 0 3px #e9f3ed;
}

.system-state.is-warning .state-dot {
  background: #c5852a;
  box-shadow: 0 0 0 3px var(--gold-pale);
}

.profile-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 4px 9px 4px 5px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  cursor: pointer;
}

.profile-button:hover {
  border-color: var(--line-strong);
  background: #fafcfb;
}

.profile-avatar {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  color: var(--green-deep);
  background: var(--green-pale);
  font-size: 12px;
  font-weight: 700;
}

.profile-button #profileName {
  max-width: 130px;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chevron {
  margin-left: 2px;
  color: var(--muted);
  font-size: 12px;
}

.page-shell {
  width: min(1420px, calc(100% - 56px));
  margin: 0 auto;
  padding: 32px 0 54px;
}

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.eyebrow {
  margin: 0 0 9px;
  color: var(--green);
  font-size: 10px;
  font-weight: 750;
}

.eyebrow span {
  padding: 0 5px;
  color: var(--rust);
}

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

h1 {
  margin-bottom: 0;
  font-size: 27px;
  font-weight: 680;
  line-height: 1.2;
}

.heading-meta {
  display: flex;
  gap: 7px;
  padding-bottom: 2px;
}

.meta-chip {
  display: grid;
  place-items: center;
  min-width: 39px;
  height: 27px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--ink-soft);
  background: #fff;
  font-size: 10px;
  font-weight: 650;
}

.step-track {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 600px;
  margin: 0 0 26px;
  color: #8b9692;
  font-size: 11px;
}

.step {
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.step.active {
  color: var(--green-deep);
  font-weight: 650;
}

.step-index {
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: #fff;
  color: inherit;
  font-size: 9px;
  font-weight: 700;
}

.step.active .step-index {
  border-color: var(--green);
  color: #fff;
  background: var(--green);
}

.step-rule {
  width: 44px;
  height: 1px;
  background: var(--line-strong);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: start;
  gap: 28px;
}

.editor-column {
  min-width: 0;
}

.section-block {
  padding: 22px 0 25px;
  border-bottom: 1px solid var(--line);
}

.source-section {
  padding: 21px;
  border: 1px solid #d2ddd8;
  border-left: 3px solid var(--green);
  background: #fbfdfc;
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.section-title {
  display: flex;
  align-items: flex-start;
  gap: 11px;
}

.section-index {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  color: var(--green-deep);
  background: var(--green-pale);
  font-size: 10px;
  font-weight: 750;
}

.section-title h2,
.preview-heading h2 {
  margin: 1px 0 4px;
  font-size: 15px;
  font-weight: 680;
  line-height: 1.35;
}

.section-title p,
.preview-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.field-note {
  padding: 3px 8px;
  border-radius: 3px;
  color: var(--gold);
  background: var(--gold-pale);
  font-size: 10px;
}

.source-input {
  min-height: 144px;
  resize: vertical;
}

textarea,
select,
input:not([type="checkbox"]) {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  color: var(--ink);
  background: #fff;
  outline: none;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

textarea {
  display: block;
  min-height: 86px;
  padding: 10px 12px;
  line-height: 1.55;
  resize: vertical;
}

input:not([type="checkbox"]) {
  height: 40px;
  padding: 0 11px;
}

textarea::placeholder,
input::placeholder {
  color: #a1aaa6;
}

textarea:focus,
input:not([type="checkbox"]):focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgb(43 128 104 / 13%);
}

.source-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-top: 13px;
  color: var(--muted);
  font-size: 10px;
}

.source-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.source-meta,
.parser-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.parser-buttons {
  flex: 0 0 auto;
}

#aiAvailability {
  color: var(--muted);
}

.ai-state {
  color: var(--muted);
  text-align: right;
}

.ai-state.is-ready {
  color: var(--green);
}

.ai-state.is-warning {
  color: var(--gold);
}

.privacy-note {
  display: flex;
  gap: 8px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.privacy-note-inline {
  margin: 10px 0 0;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 15px;
  border: 1px solid transparent;
  border-radius: 5px;
  text-decoration: none;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, transform 120ms ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.53;
}

.button-primary {
  border-color: var(--green);
  color: #fff;
  background: var(--green);
}

.button-primary:hover:not(:disabled) {
  border-color: var(--green-deep);
  background: var(--green-deep);
}

.button-secondary {
  border-color: var(--line-strong);
  color: var(--ink);
  background: #fff;
}

.button-secondary:hover:not(:disabled) {
  border-color: #aebbb5;
  background: #f8faf9;
}

.button-wide {
  width: 100%;
}

.button-compact {
  min-height: 32px;
  padding: 0 10px;
  font-size: 11px;
  white-space: nowrap;
}

.driver-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 0 0 20px;
}

.driver-summary div {
  min-width: 0;
}

.driver-summary dt {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 11px;
}

.driver-summary dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 14px;
  font-weight: 620;
}

.date-note {
  align-self: end;
  margin: 0;
  padding: 11px 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.8;
}

.field-grid {
  display: grid;
  gap: 14px 17px;
}

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

.field-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 15px;
}

.section-block .field-grid > .field + .field {
  margin-top: 0;
}

select {
  min-height: 39px;
  padding: 8px 10px;
}

.day-choice {
  margin-top: 15px;
}

.section-tools {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.route-mobile-heading {
  display: none;
}

.route-toggle {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  width: 100%;
  min-height: 44px;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.route-toggle-copy {
  flex: 1;
  min-width: 0;
}

.route-toggle-title {
  display: block;
  padding-top: 1px;
  font-size: 14px;
  font-weight: 680;
  line-height: 1.35;
}

.route-overview {
  display: -webkit-box;
  margin-top: 5px;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.6;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.route-section.needs-attention .route-overview,
.details-section.needs-attention .route-overview {
  color: var(--rust);
}

.route-toggle-chevron {
  display: grid;
  flex: 0 0 24px;
  place-items: center;
  width: 24px;
  height: 24px;
  color: var(--ink-soft);
  font-size: 22px;
  line-height: 1;
}

.route-toggle[aria-expanded="true"] .route-toggle-chevron {
  transform: rotate(180deg);
}

.route-stop + .route-stop {
  margin-top: 21px;
  padding-top: 17px;
  border-top: 1px solid var(--line);
}

.route-stop h3,
.hotel-edit-form h3 {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 680;
}

.route-stop h3 span {
  margin-left: 7px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 450;
}

.route-stop-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.route-grid {
  grid-template-columns: minmax(0, 1fr) minmax(120px, 0.8fr);
}

.route-grid.route-grid-end {
  grid-template-columns: minmax(0, 1fr) minmax(116px, 0.8fr) 76px;
}

.route-location {
  grid-column: 1 / -1;
}

.return-check {
  font-size: 11px;
}

.duration-summary {
  margin: 15px 0 0;
  color: var(--ink-soft);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.duration-summary.is-warning {
  color: var(--rust);
}

.field-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 32px;
}

.field-heading label {
  min-width: 0;
}

.field-heading small {
  margin-left: 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 400;
}

.lookup-availability {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 10px;
}

.legal-links a,
.place-actions a,
.place-attributions a {
  color: var(--ink-soft);
  text-underline-offset: 3px;
}

.places-dialog {
  width: min(620px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  padding: 22px 24px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 22px 70px rgb(15 33 26 / 24%);
}

.places-dialog::backdrop {
  background: rgb(16 30 25 / 49%);
}

.places-search-options {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(100px, 0.7fr) auto;
  gap: 12px;
  align-items: end;
  margin-top: 14px;
}

.places-status {
  min-height: 18px;
  margin: 17px 0 9px;
  color: var(--ink-soft);
  font-size: 11px;
  overflow-wrap: anywhere;
}

.places-status.is-warning {
  color: var(--rust);
}

.place-result {
  min-width: 0;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.place-result h3 {
  margin: 0 0 5px;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.place-address {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 11px;
  overflow-wrap: anywhere;
}

.place-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 11px;
}

.place-actions button {
  margin-left: auto;
}

.place-attributions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-top: 9px;
  color: var(--muted);
  font-size: 10px;
  overflow-wrap: anywhere;
}

.place-attributions:empty {
  display: none;
}

.candidate-reason {
  margin: 0 0 10px;
  color: var(--ink-soft);
  font-size: 11px;
  overflow-wrap: anywhere;
}

.parse-dialog {
  width: min(720px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 22px 70px rgb(15 33 26 / 24%);
}

.parse-dialog[open] {
  display: flex;
  flex-direction: column;
}

.parse-dialog::backdrop {
  background: rgb(16 30 25 / 49%);
}

.parse-dialog-header {
  flex-shrink: 0;
  padding: 20px 24px 13px;
  border-bottom: 1px solid var(--line);
}

.parse-dialog-header h2 {
  margin: 0;
  font-size: 18px;
}

.parse-dialog-header .dialog-copy {
  margin: 7px 0 0;
}

.parse-choice-status {
  margin: 9px 0 0;
  color: var(--ink-soft);
  font-size: 11px;
  overflow-wrap: anywhere;
}

.parse-dialog-body {
  min-height: 0;
  padding: 0 24px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.parse-dialog-actions {
  flex-shrink: 0;
  padding: 14px 24px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.parse-place {
  min-width: 0;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.parse-place-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.parse-place-heading h3 {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}

.parse-place-status {
  flex-shrink: 0;
  color: var(--green);
  font-size: 10px;
}

.parse-place-status.is-unresolved {
  color: var(--rust);
}

.pending-place-select {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 40px;
  margin-top: 6px;
  font-size: 14px;
  font-weight: 500;
  text-overflow: ellipsis;
}

.pending-place-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
}

.pending-place-meta .place-address {
  flex: 1 1 220px;
  margin: 0;
}

.pending-place-meta a {
  color: var(--ink-soft);
  text-underline-offset: 3px;
}

.parse-place .candidate-reason {
  margin: 6px 0 0;
}

.pending-place-editor > summary {
  width: max-content;
  max-width: 100%;
  margin-top: 4px;
  padding: 3px 0;
  color: var(--ink-soft);
  font-size: 11px;
  cursor: pointer;
}

.pending-edit-tabs {
  display: flex;
  gap: 18px;
  margin-top: 7px;
  border-bottom: 1px solid var(--line);
}

.pending-edit-tabs button {
  min-height: 36px;
  padding: 0 0 7px;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  cursor: pointer;
}

.pending-edit-tabs button[aria-selected="true"] {
  border-bottom-color: var(--green);
  color: var(--green);
}

.pending-edit-tabs button:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.pending-place-search {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
  margin-top: 14px;
}

.pending-place-search > .field:first-child {
  grid-column: 1 / -1;
}

.pending-place-search > .places-status {
  grid-column: 1 / -1;
  min-height: 0;
  margin: 0;
}

.pending-place-manual {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
  margin-top: 14px;
}

.pending-place-search > button,
.pending-place-manual > button {
  min-height: 40px;
}

.parse-google-attribution {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  padding: 12px 0 0;
}

.parse-google-attribution .google-maps-brand {
  flex-shrink: 0;
  padding: 0;
}

.parse-google-attribution .place-attributions {
  margin-top: 0;
}

.places-footer {
  margin-top: 16px;
  padding-top: 4px;
  border-top: 1px solid var(--line);
}

.google-maps-brand {
  display: inline-flex;
  padding: 10px 10px 5px;
}

.google-maps-brand img {
  display: block;
  width: auto;
  height: 18px;
}

.places-footer p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.parse-notices {
  margin-top: 16px;
  padding: 11px 13px 13px;
  border-left: 3px solid #b38a42;
  color: #77551e;
  background: #fff9ed;
  font-size: 12px;
}

.notice-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.notice-heading .icon-button {
  width: 26px;
  height: 26px;
  font-size: 18px;
}

.parse-notices ul {
  margin: 4px 0 0;
  padding-left: 18px;
}

.parse-notices li + li {
  margin-top: 4px;
}

.parse-summary {
  margin: 0 0 20px;
  font-size: 12px;
}

.parse-summary div {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.parse-summary dt {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 10px;
}

.parse-summary dd {
  margin: 0;
  overflow-wrap: anywhere;
  white-space: pre-line;
}

.dialog-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
  color: var(--ink);
  font-size: 11px;
  font-weight: 620;
}

.field > span:first-child small {
  margin-left: 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 400;
}

.field > textarea + .check-field {
  margin-top: 2px;
}

.section-block .field + .field {
  margin-top: 15px;
}

.field-hint {
  color: var(--muted);
  font-size: 10px;
  font-weight: 400;
}

.check-field {
  display: inline-flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 450;
}

.check-field input {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--green);
}

.check-field > span {
  line-height: 1.4;
}

.section-last {
  padding-bottom: 10px;
  border-bottom: 0;
}

.preview-column {
  position: sticky;
  top: 86px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
}

.preview-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.preview-heading-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.print-button {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  padding: 0;
}

.print-button img {
  display: block;
  width: 18px;
  height: 18px;
}

.print-frame {
  position: fixed;
  top: 0;
  left: -10000px;
  width: 210mm;
  height: 297mm;
  border: 0;
  pointer-events: none;
}

.preview-status {
  margin-top: 2px;
  padding: 3px 7px;
  border-radius: 3px;
  color: #68736f;
  background: #eef1ef;
  font-size: 9px;
  white-space: nowrap;
}

.preview-status.is-ready {
  color: var(--green-deep);
  background: var(--green-pale);
}

.preview-status.is-stale {
  color: var(--rust);
  background: var(--rust-pale);
}

.preview-warning {
  margin: 0 0 12px;
  color: var(--rust);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.preview-stage {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 0.707;
  min-height: 0;
  overflow: hidden;
  border: 1px solid #e0e5e3;
  background: #edf0ee;
}

.preview-empty {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 8px;
  padding: 22px;
  color: var(--muted);
  text-align: center;
}

.preview-empty strong {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 650;
}

.preview-empty > span {
  font-size: 10px;
}

.paper-icon {
  position: relative;
  display: grid;
  gap: 6px;
  width: 58px;
  height: 77px;
  margin-bottom: 5px;
  padding: 24px 10px 10px;
  border: 1px solid #cbd4d0;
  border-radius: 3px;
  background: #fff;
  box-shadow: 0 4px 10px rgb(28 47 40 / 7%);
}

.paper-icon::before {
  position: absolute;
  top: 11px;
  left: 10px;
  width: 23px;
  height: 3px;
  background: #7aa390;
  content: "";
}

.paper-icon span {
  height: 2px;
  background: #e1e6e3;
}

#pdfPreview {
  width: 100%;
  height: 100%;
  border: 0;
  background: white;
}

.preview-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 13px;
}

.share-status {
  margin: 10px 0 0;
  color: var(--ink-soft);
  font-size: 11px;
  overflow-wrap: anywhere;
}

.loading-dialog {
  width: min(340px, calc(100% - 40px));
  padding: 28px 24px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink);
  background: #fff;
  text-align: center;
}

.loading-dialog::backdrop {
  background: rgb(16 30 25 / 49%);
}

.loading-dialog h2 {
  margin: 17px 0 7px;
  font-size: 17px;
}

.loading-dialog p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.loading-spinner {
  width: 30px;
  height: 30px;
  margin: 0 auto;
  border: 3px solid var(--line);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: loading-spin 900ms linear infinite;
}

@keyframes loading-spin {
  to { transform: rotate(360deg); }
}

.preview-column > .privacy-note {
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px solid #edf0ee;
}

.profile-dialog {
  width: min(410px, calc(100% - 32px));
  padding: 23px 25px 25px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 22px 70px rgb(15 33 26 / 24%);
}

.profile-dialog::backdrop {
  background: rgb(16 30 25 / 49%);
  backdrop-filter: blur(2px);
}

.hotel-dialog {
  width: min(940px, calc(100% - 32px));
  max-height: calc(100dvh - 48px);
  padding: 22px 24px 25px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 22px 70px rgb(15 33 26 / 24%);
}

.hotel-dialog::backdrop {
  background: rgb(16 30 25 / 49%);
}

.hotel-dialog-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 19px;
}

.hotel-dialog-heading h2 {
  margin: 0 0 5px;
  font-size: 19px;
}

.hotel-dialog-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.hotel-toolbar {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.catalog-tabs {
  display: inline-flex;
  margin-bottom: 18px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  overflow: hidden;
}

.catalog-tabs button {
  min-width: 75px;
  min-height: 32px;
  padding: 0 18px;
  border: 0;
  color: var(--ink-soft);
  background: #fff;
  font-size: 12px;
  cursor: pointer;
}

.catalog-tabs button[aria-selected="true"] {
  color: #fff;
  background: var(--green);
}

.hotel-toolbar .button {
  min-height: 39px;
}

.hotel-toolbar input {
  min-height: 39px;
}

.hotel-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.hotel-list {
  max-height: min(65dvh, 660px);
  overflow-y: auto;
  border-top: 1px solid var(--line);
}

.hotel-row {
  display: grid;
  gap: 8px;
  padding: 13px 9px 13px 0;
  border-bottom: 1px solid var(--line);
}

.hotel-row.is-selected {
  padding-left: 9px;
  background: #f0f7f3;
}

.hotel-row-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.hotel-row-title strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 12px;
}

.hotel-row-city {
  flex-shrink: 0;
  color: var(--muted);
  font-size: 11px;
}

.hotel-row-meta {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  overflow-wrap: anywhere;
}

.hotel-row-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.hotel-status {
  margin-right: auto;
  padding: 2px 5px;
  color: var(--green-deep);
  background: var(--green-pale);
  font-size: 10px;
}

.hotel-status.is-pending {
  color: var(--gold);
  background: var(--gold-pale);
}

.hotel-status.is-inactive {
  color: var(--muted);
  background: #eef0ef;
}

.hotel-empty {
  margin: 0;
  padding: 28px 8px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.hotel-edit-form {
  padding-left: 23px;
  border-left: 1px solid var(--line);
}

.hotel-edit-form .field + .field {
  margin-top: 13px;
}

.hotel-edit-form .check-field {
  display: flex;
  margin-top: 13px;
  font-size: 11px;
}

.catalog-import {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.catalog-import-actions {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px;
}

.import-format {
  min-width: 0;
  max-width: 100%;
  padding-top: 7px;
  color: var(--muted);
  font-size: 11px;
}

.import-format summary {
  cursor: pointer;
}

.import-format pre {
  max-width: 100%;
  margin: 9px 0 0;
  padding: 10px;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  background: #f8faf9;
  font-size: 10px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.import-result {
  margin-top: 12px;
  font-size: 11px;
}

.import-result p {
  margin: 0;
  color: var(--green-deep);
  font-weight: 650;
}

.import-result.is-warning p {
  color: var(--rust);
}

.import-result ul {
  margin: 6px 0 0;
  padding-left: 18px;
  color: var(--ink-soft);
  overflow-wrap: anywhere;
}

.import-result ul:empty {
  display: none;
}

.dialog-close-row {
  display: flex;
  justify-content: flex-end;
  margin: -8px -9px 2px;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 4px;
  color: var(--muted);
  background: transparent;
  font-size: 21px;
  line-height: 1;
  cursor: pointer;
}

.icon-button:hover {
  color: var(--ink);
  background: #f0f3f1;
}

.dialog-mark {
  width: 38px;
  height: 38px;
  margin-bottom: 18px;
}

.profile-dialog .eyebrow {
  margin-bottom: 6px;
}

.profile-dialog h2 {
  margin-bottom: 8px;
  font-size: 19px;
  font-weight: 680;
}

.dialog-copy {
  margin-bottom: 19px;
  color: var(--muted);
  font-size: 12px;
}

.profile-dialog .field {
  gap: 8px;
}

.plate-field {
  min-width: 0;
  margin: 17px 0 0;
  padding: 0;
  border: 0;
}

.plate-field legend {
  margin-bottom: 8px;
  padding: 0;
}

.plate-field legend small {
  margin-left: 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 400;
}

.plate-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 52px 10px 52px;
  align-items: center;
  gap: 8px;
}

.plate-prefix {
  white-space: nowrap;
  font-size: 15px;
  font-weight: 620;
}

.plate-input input {
  padding: 0 5px;
  font-size: 18px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.plate-separator {
  text-align: center;
  font-size: 18px;
}

.dialog-error {
  min-height: 17px;
  margin: 7px 0 8px;
  color: var(--rust);
  font-size: 11px;
}

.toast {
  position: fixed;
  z-index: 10;
  right: 22px;
  bottom: 22px;
  max-width: min(420px, calc(100% - 32px));
  padding: 11px 15px;
  border: 1px solid #294a3e;
  border-radius: 5px;
  color: #fff;
  background: #213d33;
  box-shadow: 0 8px 25px rgb(17 35 28 / 20%);
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 140ms ease, transform 140ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

:focus-visible {
  outline: 3px solid rgb(43 128 104 / 37%);
  outline-offset: 2px;
}

@media (max-width: 1050px) {
  .workspace {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 24px;
  }

  .preview-column {
    padding: 13px;
  }

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

@media (max-width: 830px) {
  .workspace {
    grid-template-columns: minmax(0, 1fr);
  }

  .preview-column {
    position: static;
    max-width: 520px;
    margin: 4px auto 0;
    padding: 17px;
  }

  .preview-stage {
    min-height: 0;
    max-height: none;
  }

  .page-shell {
    max-width: 740px;
  }
}

@media (max-width: 600px) {
  body {
    font-size: 13px;
  }

  .topbar {
    height: 58px;
    padding: 0 16px;
  }

  .topbar-right {
    gap: 11px;
  }

  .system-state {
    display: none;
  }

  .profile-button {
    gap: 5px;
    min-height: 34px;
    padding-right: 6px;
  }

  .profile-avatar {
    width: 25px;
    height: 25px;
  }

  .profile-button #profileName {
    max-width: 74px;
    font-size: 10px;
  }

  .chevron {
    display: none;
  }

  .brand-copy strong {
    font-size: 12px;
  }

  .brand-copy small {
    font-size: 8px;
  }

  .brand-mark {
    width: 31px;
    height: 31px;
  }

  .page-shell {
    width: calc(100% - 32px);
    padding: 24px 0 38px;
  }

  .page-heading {
    align-items: flex-start;
    margin-bottom: 19px;
  }

  h1 {
    font-size: 23px;
  }

  .eyebrow {
    font-size: 9px;
  }

  .step-track {
    justify-content: space-between;
    gap: 6px;
    margin-bottom: 20px;
    font-size: 9px;
  }

  .step {
    gap: 5px;
  }

  .step-index {
    width: 21px;
    height: 21px;
    font-size: 8px;
  }

  .step-rule {
    width: min(7vw, 26px);
  }

  .source-section {
    padding: 15px;
  }

  .section-block {
    padding: 19px 0 21px;
  }

  .source-section.section-block {
    padding: 15px;
  }

  .section-title {
    gap: 9px;
  }

  .section-title h2,
  .preview-heading h2 {
    font-size: 14px;
  }

  .section-title p {
    max-width: 290px;
    font-size: 10px;
  }

  .source-input {
    min-height: 132px;
  }

  .source-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .source-actions {
    width: 100%;
    justify-content: space-between;
  }

  .ai-state {
    max-width: 150px;
    text-align: left;
  }

  .field-grid.two,
  .field-grid.three {
    grid-template-columns: minmax(0, 1fr);
    gap: 13px;
  }

  .field-grid.three {
    margin-top: 13px;
  }

  .date-note {
    padding: 0;
  }

  .preview-column {
    width: 100%;
    padding: 13px;
  }

  .preview-stage {
    width: min(100%, 405px);
    margin: 0 auto;
  }

  .preview-actions {
    grid-template-columns: 1fr 1fr;
  }

  .privacy-note {
    font-size: 9px;
  }

  .profile-dialog {
    padding: 20px;
  }

  .section-tools {
    max-width: 160px;
  }

  .route-desktop-heading {
    display: none;
  }

  .route-mobile-heading {
    display: block;
    flex: 1 0 100%;
    min-width: 0;
    margin: 0;
  }

  .route-section-head {
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 0;
  }

  .route-section-head .section-tools {
    max-width: none;
    margin-left: 33px;
  }

  #routeDetails:not([hidden]),
  #detailsFields:not([hidden]) {
    margin-top: 18px;
  }

  .route-grid {
    grid-template-columns: minmax(0, 1fr) minmax(115px, 0.9fr);
    gap: 13px 12px;
  }

  .route-grid.route-grid-end {
    grid-template-columns: minmax(0, 1fr) minmax(110px, 0.9fr) 70px;
  }

  .hotel-dialog {
    padding: 19px 16px;
    max-height: calc(100dvh - 24px);
  }

  .places-dialog {
    padding: 19px 16px;
  }

  .places-search-options {
    grid-template-columns: minmax(0, 1fr) minmax(92px, 0.8fr);
    gap: 12px;
  }

  .places-search-options > .button {
    grid-column: 1 / -1;
  }

  .hotel-toolbar {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .hotel-toolbar .hotel-search {
    grid-row: 2;
    grid-column: 1 / -1;
  }

  .hotel-workspace {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  .hotel-list {
    max-height: 320px;
  }

  .hotel-edit-form {
    padding: 18px 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

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

  .parse-dialog {
    width: calc(100% - 16px);
    max-height: calc(100dvh - 16px);
  }

  .parse-dialog-header {
    padding: 16px 15px 12px;
  }

  .parse-dialog-header h2 {
    font-size: 16px;
  }

  .parse-dialog-body {
    padding: 0 15px;
  }

  .parse-dialog-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 12px 15px;
  }

  .parse-dialog-actions > .button {
    min-height: 44px;
  }

  .pending-place-search {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .pending-place-search > button {
    grid-column: 1 / -1;
  }

  .pending-place-manual {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .pending-place-manual > .field:first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 830px), (any-pointer: coarse) {
  /* Keep form text large enough to avoid iOS focus zoom. */
  input,
  select,
  textarea,
  .pending-place-select {
    font-size: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .loading-spinner {
    animation: none;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
