:root {
  --orange: #ff9f0a;
  --orange-dim: rgba(255, 159, 10, 0.14);
  --paper: #f4f1ea;
  --ink: #111;
  --hair: #d9d4c8;
  --card: rgba(0, 0, 0, 0.76);
  --stroke: rgba(255, 255, 255, 0.16);
  --muted: rgba(255, 255, 255, 0.55);
  --font: "Avenir Next", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: #000; color: #fff; font-family: var(--font); }
button, input { font-family: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.landing {
  min-height: 100dvh;
  height: 100dvh;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.landing-photo {
  position: fixed;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(20,16,10,.22) 0%, rgba(20,16,10,.12) 45%, rgba(20,16,10,.28) 100%),
    url("assets/rally-bg.jpg") center / cover no-repeat;
  pointer-events: none;
  filter: saturate(0.85) brightness(1.12);
}
.topbar, .landing-main, .landing-foot, .site-header { position: relative; z-index: 1; }
.site-header {
  z-index: 3;
  flex: none;
  background: #f7f3ea;
  border-bottom: 1px solid #d4cdc0;
  box-shadow: 0 10px 28px rgba(0,0,0,.22);
}
.site-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  width: min(1760px, calc(100% - 24px));
  margin: 0 auto;
  padding: 10px 0;
}
.header-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
.header-account {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
}
.header-login {
  font-weight: 800;
}
.header-user {
  color: #111;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}
.site-header .ghost-btn,
.site-header a.ghost-btn {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 12px;
  font-size: 13px;
  background: #fff;
  border: 1px solid #d4cdc0;
  color: #111;
}
.site-header .brand h1 { color: #111; }
.site-header .brand p { color: #5c574c; }
.top-nav { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.brand { display: flex; gap: 10px; align-items: center; }
.brand img {
  width: 40px; height: 40px; border-radius: 11px;
  box-shadow: 0 0 0 2px rgba(255,159,10,.55);
}
.brand h1 { margin: 0; font-size: 22px; letter-spacing: -0.03em; }
.brand p { margin: 1px 0 0; color: rgba(255,255,255,.78); font-size: 12px; }

.landing-main {
  flex: 1;
  width: min(1760px, calc(100% - 24px));
  margin: 0 auto;
  padding: 12px 0 10px;
  display: flex;
  min-height: 0;
}
.landing-sheet {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: #f7f3ea;
  color: #111;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 22px 56px rgba(0,0,0,.32);
}
.hero {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(380px, 0.88fr) minmax(0, 1.12fr);
  gap: 0;
  align-items: stretch;
  width: 100%;
  padding: 0;
  min-height: 0;
}
.hero-roadbook {
  margin: 0;
  position: relative;
  min-width: 0;
  min-height: 0;
  height: auto;
  align-self: stretch;
  overflow: hidden;
}
.hero-roadbook img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 42% 38%;
  border-radius: 0;
  box-shadow: none;
}
.hero-copy {
  max-width: none;
  min-width: 0;
  padding: 48px 52px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.hero-copy h2 {
  margin: 8px 0 14px;
  font-size: clamp(40px, 4.8vw, 62px);
  line-height: 1.02;
  letter-spacing: -0.045em;
  color: #111;
}
.eyebrow {
  margin: 0;
  color: #c45c12;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.lede { margin: 0; color: #3f3a32; font-size: 18px; line-height: 1.45; max-width: 36em; }
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
  align-items: center;
}
.hero-studio {
  width: auto;
  min-width: 0;
  height: 54px;
  padding: 0 24px;
  font-size: 16px;
  letter-spacing: 0.06em;
  box-shadow: none;
}

.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 54px;
  padding: 0 16px;
  border-radius: 14px;
  background: #111;
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.store-btn small {
  display: block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255,255,255,.7);
}
.store-btn span { line-height: 1.05; font-size: 16px; }

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid #e0d9cc;
  width: auto;
  margin: 0;
  background: #fff;
  flex: none;
}
.steps article {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: transparent;
  border: 0;
  border-right: 1px solid #e0d9cc;
  border-radius: 0;
  padding: 22px 28px;
  backdrop-filter: none;
}
.steps article:last-child { border-right: 0; }
.steps span {
  display: inline-flex;
  width: 28px;
  height: 28px;
  flex: none;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--orange);
  color: #111;
  font-weight: 900;
  font-size: 14px;
  margin-top: 1px;
}
.steps h3 { margin: 0 0 4px; font-size: 18px; color: #111; }
.steps p { margin: 0; color: #5c574c; font-size: 15px; line-height: 1.4; }

.card {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  backdrop-filter: none;
}
.landing-card {
  width: auto;
  margin: 0;
  border-top: 1px solid #e0d9cc;
  background: #fff;
}
.waitlist-row {
  display: grid;
  grid-template-columns: minmax(240px, 0.7fr) minmax(0, 1.3fr);
  gap: 16px;
  align-items: end;
  padding: 10px 16px;
}
.card-head { display: flex; align-items: flex-start; gap: 10px; }
.card-head h3 { margin: 0; font-size: 15px; color: #111; }
.card-icon { color: #c45c12; font-weight: 800; }
.card-note { margin: 2px 0 0; color: #5c574c; font-size: 13px; line-height: 1.35; }

.primary-btn {
  width: 100%;
  height: 52px;
  border: 0;
  border-radius: 15px;
  background: var(--orange);
  color: #000;
  font-weight: 900;
  letter-spacing: 0.04em;
}
.hero-copy .primary-btn { width: auto; }
.primary-btn.compact { width: auto; height: 40px; padding: 0 16px; font-size: 13px; }
.ghost-btn {
  height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.08);
  color: #fff;
  font-weight: 700;
}
.text-btn {
  border: 0;
  background: transparent;
  color: #fff;
  font-weight: 700;
  padding: 8px 10px;
}

.waitlist-form { display: grid; gap: 10px; }
.waitlist-form label { display: grid; gap: 4px; font-size: 11px; font-weight: 700; color: #5c574c; }
.waitlist-form input {
  height: 40px;
  border-radius: 10px;
  border: 1px solid #d4cdc0;
  padding: 0 12px;
  background: #f7f3ea;
  color: #111;
  font-size: 15px;
  font-weight: 600;
}
.waitlist-form input::placeholder { color: #7a7468; }
.waitlist-inline {
  grid-template-columns: 1fr 1fr auto;
  align-items: end;
  margin-top: 0;
}
.waitlist-inline .primary-btn {
  min-width: 148px;
  white-space: nowrap;
}
.waitlist-inline .form-status,
.waitlist-inline .account-actions { grid-column: auto; }
.waitlist-inline .form-status,
.waitlist-inline .account-names { grid-column: 1 / -1; }
.account-names {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.account-names[hidden],
.account-confirm-field[hidden],
.account-email-field[hidden],
.account-password-field[hidden],
.account-forgot[hidden],
.account-toggle[hidden] { display: none; }
.waitlist-inline.auth-reset { grid-template-columns: 1fr auto; }
.account-actions {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: stretch;
  min-width: 148px;
}
.account-actions .primary-btn { width: 100%; }
.account-toggle, .landing .account-toggle,
.account-forgot, .landing .account-forgot {
  color: #5c574c;
  font-size: 12px;
  padding: 4px 0;
}
.account-signed {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.account-signed .form-status { color: #111; }
.landing .account-signout {
  background: #fff;
  border-color: #d4cdc0;
  color: #111;
}
.account-delete {
  color: #9a3412;
  font-weight: 700;
}
.account-delete:hover {
  color: #7c2d12;
}
.account-card-signed .waitlist-form { display: none; }
.form-status { margin: 0; color: #c45c12; font-size: 13px; font-weight: 700; }
.studio-account {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid #d4cdc0;
  background: #fff;
  color: #111;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}
.landing-foot {
  flex: none;
  width: min(1760px, calc(100% - 24px));
  margin: 0 auto;
  text-align: left;
  color: rgba(255,255,255,.78);
  font-size: 13px;
  padding: 0 0 14px;
}
.landing-foot a { color: #fff; font-weight: 700; }

.studio { min-height: 100vh; height: 100vh; display: flex; flex-direction: column; background: #e7e1d4; color: #111; overflow: hidden; position: relative; }
.studio-bar {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  padding: 12px 18px;
  background: #f7f3ea;
  border-bottom: 1px solid #d4cdc0;
  flex-wrap: wrap;
}
.studio-home {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 16px 0 12px;
  border-radius: 12px;
  border: 1px solid #d4cdc0;
  background: #fff;
  color: #111;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.02em;
  flex: none;
}
.studio-home:hover { border-color: #c45c12; background: #fff8ee; }
.studio-home-arrow {
  font-size: 18px;
  line-height: 1;
  color: #c45c12;
}
.studio-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}
.studio-brand img {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  box-shadow: 0 0 0 2px rgba(255,159,10,.55);
  flex: none;
}
.studio-title { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.studio-title strong {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #c45c12;
}
.studio-title span {
  font-size: 18px;
  font-weight: 800;
  color: #111;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.route-stats {
  display: flex;
  gap: 0;
  flex: none;
}
.route-stat {
  min-width: 92px;
  padding: 6px 14px;
  background: #fff;
  border: 1px solid #d4cdc0;
  border-left: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.route-stat:first-child { border-radius: 12px 0 0 12px; border-left: 1px solid #d4cdc0; }
.route-stat:last-child { border-radius: 0 12px 12px 0; }
.route-stat span {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8a5208;
}
.route-stat strong {
  font-size: 16px;
  font-weight: 800;
  color: #111;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.studio-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-left: auto;
}
.studio-action-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
  padding-left: 14px;
  border-left: 1px solid #d4cdc0;
}
.studio-action-group:first-child {
  padding-left: 0;
  border-left: 0;
}
.studio-group-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8a5208;
}
.studio-group-btns {
  display: flex;
  gap: 8px;
  align-items: center;
}
.studio .ghost-btn {
  height: 40px;
  padding: 0 14px;
  font-size: 14px;
  background: #fff;
  border: 1px solid #cfc6b6;
  color: #111;
}
.studio .primary-btn.compact { height: 40px; padding: 0 16px; font-size: 14px; border-radius: 12px; }
.studio-account.is-signed { cursor: default; }
.studio-account:not(.is-signed):hover { border-color: #c45c12; background: #fff8ee; }

.planner-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 10px 18px 12px;
  align-items: end;
  background: #efe9dc;
  border-bottom: 1px solid #d4cdc0;
}
.planner-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
  margin-left: auto;
}
.planner-field {
  display: grid;
  gap: 4px;
}
.planner-field span {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8a5208;
}
.waypoint-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex: 1;
  min-width: 180px;
  align-items: center;
  min-height: 40px;
}
.wp-chip-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
}
.chip-hint {
  margin: 0;
  color: #4a453c;
  font-size: 14px;
  font-weight: 650;
}
.wp-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: 200px;
  height: 32px;
  padding: 0 8px 0 4px;
  border-radius: 999px;
  border: 1px solid #cfc6b6;
  background: #fff;
  color: #111;
  font-weight: 700;
  font-size: 12px;
}
.wp-chip em {
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-style: normal;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
}
.wp-chip.start em { background: #ff9f0a; color: #111; }
.wp-chip.via em { background: #4a6fa5; color: #fff; }
.wp-chip.dest em { background: #111; color: #fff; box-shadow: inset 0 0 0 1px #fff; }
.wp-chip span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wp-chip.selected {
  border-color: var(--orange);
  box-shadow: 0 0 0 2px rgba(255,159,10,.35);
}
.wp-x {
  flex: none;
  width: 20px;
  height: 20px;
  border: 1px solid #cfc6b6;
  border-radius: 50%;
  background: #fff;
  color: #111;
  font-size: 14px;
  line-height: 18px;
  padding: 0;
  overflow: visible;
  text-overflow: clip;
  cursor: pointer;
}
.wp-x:hover { background: #c7171c; color: #fff; border-color: #c7171c; }
.place-search {
  width: 220px;
  height: 40px;
  border: 1px solid #c8c0b0;
  border-radius: 10px;
  padding: 0 12px;
  background: #fff;
  color: #111;
  font-size: 14px;
  font-weight: 700;
}
.place-search::placeholder { color: #7a7468; font-weight: 600; }
.place-search:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 2px rgba(255,159,10,.35);
}
.profile-select {
  height: 40px;
  min-width: 148px;
  border: 1px solid #c8c0b0;
  border-radius: 10px;
  padding: 0 10px;
  background: #fff;
  color: #111;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.wp-pin {
  background: transparent !important;
  border: 0 !important;
  overflow: visible !important;
  display: flex !important;
  align-items: center;
  gap: 3px;
}
.wp-pin .wp-pin-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px rgba(0,0,0,.45), 0 2px 8px rgba(0,0,0,.35);
  font: 800 11px/1 ui-sans-serif, system-ui;
}
.wp-pin.selected .wp-pin-mark { box-shadow: 0 0 0 3px #ff9f0a, 0 2px 8px rgba(0,0,0,.35); }
.wp-pin-x {
  flex: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #111;
  color: #fff;
  border: 1px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.45);
  font: 800 12px/14px ui-sans-serif, system-ui;
  text-align: center;
  cursor: pointer;
}
.wp-pin-x:hover { background: #c7171c; }
.suggest-box {
  position: fixed;
  z-index: 40;
  max-height: 240px;
  overflow: auto;
  background: #f4f1ea;
  color: #111;
  border: 1px solid #cfc8ba;
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(0,0,0,.28);
}
.suggest-box button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border: 0;
  background: transparent;
  color: #111;
  font-size: 13px;
  font-weight: 650;
  border-bottom: 1px solid #e4dfd4;
}
.suggest-box button:hover { background: #fff4e0; }

.studio-grid {
  flex: 1;
  display: grid;
  grid-template-columns: 1.15fr 1.2fr 0.72fr;
  gap: 10px;
  padding: 0 12px 12px;
  min-height: 0;
}
.pane {
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #f7f3ea;
  border: 1px solid #d0c8b8;
  border-radius: 12px;
  overflow: hidden;
}
.pane-label {
  padding: 7px 12px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #111;
  background: #fff;
  border-bottom: 1px solid #d4cdc0;
}
.pane-label-map {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  letter-spacing: 0;
  text-transform: none;
  font-weight: 700;
}
.pane-label-map #map-pane-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.map-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.map-styles {
  display: flex;
  border: 1px solid #d4cdc0;
  border-radius: 999px;
  overflow: hidden;
  background: #f7f3ea;
}
.map-style-btn {
  height: 28px;
  padding: 0 10px;
  border: 0;
  background: transparent;
  color: #111;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.map-styles .map-style-btn + .map-style-btn { border-left: 1px solid #d4cdc0; }
.map-style-btn.is-on { background: #111; color: #fff; }
#btn-streetview {
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid #d4cdc0;
  background: #fff;
}
#btn-streetview.is-on { background: var(--orange); border-color: var(--orange); color: #111; }
.map-stage {
  flex: 1;
  min-height: 240px;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.map-stage.is-split #map { flex: 1.1; min-height: 140px; }
.streetview {
  flex: 1;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  border-top: 1px solid #d4cdc0;
  background: #111;
}
.streetview-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  background: #1c1a16;
  color: #f7f3ea;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.streetview-bar a { color: var(--orange); text-decoration: none; }
#streetview-frame {
  flex: 1;
  width: 100%;
  min-height: 160px;
  border: 0;
  background: #111;
}
#map { flex: 1; min-height: 240px; background: #1a1a1a; }
#map.insert-points,
#map.insert-points.leaflet-grab,
#map.insert-points.leaflet-dragging {
  cursor: crosshair !important;
}

.leaflet-marker-icon.pano-pin {
  background: transparent !important;
  border: none !important;
}
.pano-pin-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--orange);
  color: #111;
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px rgba(0,0,0,.45);
  font: 800 13px/1 ui-sans-serif, system-ui;
}
.leaflet-marker-icon.tulip-pin {
  background: transparent !important;
  border: none !important;
  cursor: pointer;
}
.leaflet-marker-icon.tulip-pin.manual span {
  box-shadow: 0 0 0 2px #ff9f0a, 0 2px 8px rgba(0,0,0,.45) !important;
}

.roadbook {
  flex: 1;
  overflow: auto;
  background:
    linear-gradient(rgba(20,20,18,.04) 1px, transparent 1px) 0 0 / 18px 18px,
    var(--paper);
  color: var(--ink);
}
.empty-book {
  padding: 28px 18px;
  color: #6b675e;
  font-size: 14px;
  line-height: 1.45;
}
.book-row {
  display: grid;
  grid-template-columns: 86px 168px minmax(0, 1fr);
  min-height: 118px;
  border-bottom: 1px solid #111;
  background: #fff;
}
.book-row.current { background: #d8f0c8; }
.book-row.selected { outline: 2px solid var(--orange); outline-offset: -2px; }
.book-row.drop-over { outline: 2px solid var(--orange); outline-offset: -2px; background: #fff4e0; }
.book-dist {
  padding: 8px;
  font-variant-numeric: tabular-nums;
  border-right: 1px solid var(--hair);
}
.book-idx {
  display: inline-flex;
  width: 24px; height: 24px;
  align-items: center; justify-content: center;
  background: #111; color: #fff;
  border: 2px solid #111;
  border-radius: 50%;
  font-size: 12px; font-weight: 800;
  margin-bottom: 6px;
}
.book-row.current .book-idx { background: #3dbe4a; color: #111; border-color: #111; }
.book-row.selected .book-idx { background: #ff9f0a; color: #111; border-color: #111; }
.book-dist .leg { display: block; font-size: 18px; font-weight: 800; }
.book-dist .tot { display: block; font-size: 12px; font-weight: 700; color: #444; }
.book-tulip {
  display: grid;
  place-items: center;
  border-right: 1px solid var(--hair);
  background: #faf8f2;
  cursor: copy;
}
.book-tulip svg {
  width: 124px;
  height: 124px;
  overflow: visible;
  touch-action: none;
}
.book-tulip.drop-target {
  outline: 2px dashed var(--orange);
  outline-offset: -2px;
  background: #fff4e0;
}
.tulip-mark-hit { cursor: grab; }
.tulip-mark-hit:active { cursor: grabbing; }
.book-text { position: relative; padding: 10px 12px; min-width: 0; }
.book-row.manual .book-text { padding-right: 34px; }
.book-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #888;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.book-remove:hover { background: #111; color: #fff; }
.book-text .title { margin: 0; font-size: 18px; font-weight: 900; letter-spacing: 0.02em; }
.book-text .meta { margin: 4px 0 0; font-size: 13px; font-weight: 800; }
.instr-edit {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin: 4px 0 0;
  padding: 2px 4px;
  border: 1px solid #e4ddd2;
  border-radius: 4px;
  background: #fff;
  color: #111;
  font: 700 12px/1.3 var(--font);
  text-transform: uppercase;
  resize: none;
  height: 22px;
  min-height: 22px;
  overflow: hidden;
}
.instr-edit:focus {
  outline: 2px solid var(--orange);
  outline-offset: 0;
  border-color: var(--orange);
}
.instr-edit::placeholder { color: #9a9286; font-weight: 650; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.chip {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 2px 6px;
  border-radius: 4px;
  background: #111;
  color: #fff;
}
.chip-mark {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  border: 0;
  cursor: pointer;
  padding: 2px 4px 2px 6px;
}
.chip-mark .chip-x {
  font-size: 13px;
  line-height: 1;
  opacity: 0.7;
  font-weight: 700;
}
.chip-mark:hover .chip-x { opacity: 1; }
.chip-mark:hover { filter: brightness(1.12); }
.chip.hazard { background: #8b1a1a; }
.chip.extra { background: #c45c12; }
.chip-tree, .chip-forest { background: #2e8a3a; }
.chip-river { background: #1d6fa5; }
.chip-church, .chip-building { background: #4a4338; }
.chip-fuel { background: #c45c12; }

.symbol-help { margin: 0 10px 8px; color: #4a453c; font-size: 12px; line-height: 1.4; }
.symbol-palette { padding: 0 10px 16px; display: grid; gap: 8px; overflow: auto; }
.symbol-group { display: grid; gap: 6px; }
.symbol-group h4 {
  margin: 8px 4px 0;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #7a7264;
}
.symbol {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #e0d9cc;
  cursor: grab;
  color: #111;
  text-align: left;
}
.symbol:hover { border-color: var(--orange); background: #fff4e0; }
.symbol:active { cursor: grabbing; }
.symbol .picto, .tulip-mark {
  width: 32px; height: 32px; flex: none;
  background: #f4f1ea;
  border-radius: 7px;
  padding: 2px;
}
.symbol span { font-size: 13px; font-weight: 700; }

.cloud-drawer {
  position: fixed;
  top: 58px;
  right: 12px;
  width: min(400px, calc(100vw - 24px));
  max-height: calc(100vh - 80px);
  overflow: auto;
  background: #f7f3ea;
  color: #111;
  border: 1px solid #d4cdc0;
  border-radius: 16px;
  padding: 12px;
  z-index: 30;
  box-shadow: 0 18px 50px rgba(0,0,0,.22);
}
.cloud-drawer header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.cloud-toolbar {
  display: flex;
  gap: 8px;
  margin: 8px 0;
}
.cloud-toolbar .ghost-btn {
  height: 32px;
  padding: 0 12px;
  font-size: 12px;
  background: #fff;
  border: 1px solid #d4cdc0;
  color: #111;
}
.cloud-path {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
}
.cloud-path button {
  border: 0;
  background: transparent;
  color: #8a5208;
  padding: 2px 4px;
  font-weight: 800;
}
.cloud-path button.is-here { color: #111; cursor: default; }
.cloud-path span { color: #b0a898; }
.cloud-folder,
.cloud-item-row {
  display: flex;
  gap: 6px;
  align-items: stretch;
  margin-top: 8px;
}
.cloud-folder.is-drop,
.cloud-path button.is-drop {
  outline: 2px solid var(--orange);
  border-radius: 10px;
}
.cloud-folder-btn,
.cloud-item {
  display: grid;
  gap: 4px;
  width: 100%;
  text-align: left;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid #d4cdc0;
  background: #fff;
  color: #111;
}
.cloud-folder-btn { grid-template-columns: auto 1fr; align-items: center; gap: 8px; }
.cloud-folder-mark {
  width: 28px;
  height: 22px;
  border-radius: 3px 3px 4px 4px;
  background: var(--orange);
  box-shadow: inset 0 6px 0 #c45c12;
}
.cloud-folder-btn strong,
.cloud-item strong { font-size: 13px; }
.cloud-item span { color: #6b665c; font-size: 11px; }
.cloud-move {
  flex: none;
  width: 34px;
  border-radius: 12px;
  border: 1px solid #d4cdc0;
  background: #fff;
  color: #111;
  font-size: 11px;
}
.cloud-del {
  flex: none;
  width: 36px;
  border-radius: 12px;
  border: 1px solid #d4cdc0;
  background: #fff;
  color: #8a5208;
  font-weight: 800;
}
.cloud-name-input {
  width: 100%;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--orange);
  padding: 0 10px;
  font: inherit;
  font-weight: 700;
}
.cloud-folder-form { flex: 1; min-width: 0; }
.cloud-drawer .text-btn { color: #8a5208; }
.cloud-drawer a { color: #8a5208; font-weight: 800; }
.cloud-folder-btn,
.cloud-item,
.cloud-move,
.cloud-del { cursor: pointer; }
.cloud-drawer.is-moving .cloud-item-row {
  opacity: .45;
  pointer-events: none;
}
.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(20, 16, 10, .4);
}
.auth-modal[hidden] { display: none; }
.auth-modal-card {
  width: min(420px, calc(100vw - 32px));
  background: #f7f3ea;
  color: #111;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 18px 50px rgba(0,0,0,.28);
}
.auth-modal-card header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.auth-modal-card .text-btn { color: #111; }

.navi-dock {
  display: grid;
  grid-template-columns: repeat(4, 1fr) auto;
  gap: 8px;
  padding: 10px 12px 14px;
  background: #efe9dc;
  border-top: 1px solid #d4cdc0;
}
.navi-stat {
  background: #c4a574;
  color: #1a1208;
  border-radius: 10px;
  padding: 8px 10px;
}
.navi-stat span { display: block; font-size: 10px; font-weight: 800; letter-spacing: 0.08em; }
.navi-stat strong { font-size: 18px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: #fff;
  color: #111;
  padding: 12px 16px;
  border-radius: 12px;
  font-weight: 700;
  z-index: 40;
}

.busy {
  position: absolute;
  inset: 0;
  z-index: 25;
  background: rgba(0,0,0,.62);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.busy-bar {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 5px;
  background: rgba(255,255,255,.12);
  overflow: hidden;
}
.busy-bar span {
  display: block;
  height: 100%;
  width: 40%;
  background: var(--orange);
  animation: busy-slide 1.15s ease-in-out infinite;
}
@keyframes busy-slide {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(350%); }
}
.busy-card {
  max-width: 420px;
  width: 100%;
  background: #f7f3ea;
  color: #111;
  border: 1px solid #d4cdc0;
  border-radius: 20px;
  padding: 22px 20px 20px;
}
.busy-card h3 { margin: 6px 0 8px; font-size: 22px; }
.busy-card p { margin: 0; color: #5c574c; line-height: 1.45; }

.primary-btn:disabled { opacity: 0.45; cursor: wait; }

.leaflet-container { background: #ddd8cc; font-family: var(--font); }

@media (max-width: 1100px) {
  .studio-grid { grid-template-columns: 1fr; }
  .pane-map { min-height: 280px; }
  .planner-strip { flex-direction: column; align-items: stretch; }
  .planner-tools { margin-left: 0; }
  .planner-field, .place-search, .profile-select, .studio .primary-btn.compact { width: 100%; }
  .studio-bar { align-items: flex-start; }
  .studio-actions { margin-left: 0; width: 100%; justify-content: flex-start; }
  .studio-action-group { padding-left: 0; border-left: 0; }
}

@media (max-width: 800px) {
  .site-header-bar { width: calc(100% - 24px); flex-wrap: wrap; }
  .header-tools { flex-wrap: wrap; }
  .topbar { width: calc(100% - 24px); flex-direction: column; align-items: flex-start; padding: 12px 0 8px; }
  .landing { height: auto; min-height: 100dvh; overflow: auto; }
  .landing-main { width: calc(100% - 20px); padding: 12px 0 12px; }
  .hero { grid-template-columns: 1fr; min-height: 0; flex: none; }
  .hero-copy { padding: 28px 22px; }
  .hero-copy h2 { font-size: clamp(32px, 9vw, 44px); }
  .hero-roadbook { height: 240px; min-height: 240px; }
  .hero-roadbook img { min-height: 0; height: 100%; }
  .steps { grid-template-columns: 1fr; }
  .steps article { border-right: 0; border-bottom: 1px solid #e0d9cc; }
  .steps article:last-child { border-bottom: 0; }
  .waitlist-row, .waitlist-inline, .account-actions, .account-names { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-studio, .hero-actions .store-btn { width: 100%; min-width: 0; justify-content: center; }
  .landing-foot { width: calc(100% - 24px); }
}

.landing-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
}
.landing-foot .legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
}
.landing-foot .legal-links a {
  color: rgba(255,255,255,.88);
  font-weight: 700;
  text-decoration: none;
}
.landing-foot .legal-links a:hover { text-decoration: underline; }
.account-legal {
  margin: 6px 0 0;
  font-size: 11px;
  line-height: 1.35;
  font-weight: 600;
  color: #5c574c;
  max-width: 280px;
}
.account-legal a { color: #8a5208; font-weight: 800; }
.auth-modal-card .account-legal { max-width: none; color: #4a453c; }

.legal-site {
  min-height: 100dvh;
  background: #f4f1ea;
  color: #111;
}
.legal-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 12px 20px;
  background: #f7f3ea;
  border-bottom: 1px solid #d4cdc0;
}
.legal-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #111;
  text-decoration: none;
  font-weight: 800;
}
.legal-brand img { width: 36px; height: 36px; border-radius: 10px; }
.legal-nav { display: flex; flex-wrap: wrap; gap: 8px 14px; }
.legal-nav a {
  color: #8a5208;
  font-weight: 800;
  font-size: 13px;
  text-decoration: none;
}
.legal-nav a[aria-current="page"] { color: #111; }
.legal-main {
  width: min(760px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 48px;
}
.legal-main h1 { margin: 8px 0 12px; font-size: clamp(28px, 5vw, 40px); letter-spacing: -0.03em; }
.legal-main h2 { margin: 28px 0 8px; font-size: 18px; }
.legal-main h3 { margin: 16px 0 6px; font-size: 15px; }
.legal-main p, .legal-main li { font-size: 15px; line-height: 1.55; color: #2a261f; }
.legal-main a { color: #8a5208; font-weight: 800; }
.legal-main ul { padding-left: 1.2em; }
.legal-updated { margin-top: 32px; color: #6b665c; font-size: 13px; }
.legal-foot {
  width: min(760px, calc(100% - 40px));
  margin: 0 auto;
  padding: 0 0 40px;
  color: #6b665c;
  font-size: 13px;
  font-weight: 700;
}
.legal-foot a { color: #8a5208; text-decoration: none; }
.legal-table-wrap { overflow: auto; margin: 12px 0; }
.legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: #fff;
}
.legal-table th, .legal-table td {
  border: 1px solid #d4cdc0;
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}
.legal-table th { background: #efe9dc; }

.cookie-bar {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 60;
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  max-width: 820px;
  margin: 0 auto;
  padding: 14px 16px;
  background: #f7f3ea;
  color: #111;
  border: 1px solid #d4cdc0;
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(0,0,0,.28);
}
.cookie-bar p {
  margin: 0;
  flex: 1;
  min-width: 220px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  color: #2a261f;
}
.cookie-bar a { color: #8a5208; font-weight: 800; }
body.has-cookie-bar .landing-foot { padding-bottom: 110px; }
body.has-cookie-bar .legal-foot { padding-bottom: 110px; }

@media (max-width: 800px) {
  .legal-main, .legal-foot { width: calc(100% - 28px); }
  .cookie-bar { left: 10px; right: 10px; bottom: 10px; }
}
