:root {
  color-scheme: light;
  --ink: #091015;
  --ink-soft: #59636b;
  --brand-950: #002c35;
  --brand-900: #003945;
  --brand-800: #004b5b;
  --brand-700: #006477;
  --brand-100: #dff0f2;
  --action: #0b7a53;
  --action-hover: #075f41;
  --canvas: #f3f5f6;
  --surface: #ffffff;
  --surface-soft: #f7f8f8;
  --stroke: #dde2e5;
  --stroke-strong: #c8d0d4;
  --warning: #b75b13;
  --danger: #b42318;
  --shadow-control: 0 1px 2px rgba(9,16,21,.08), 0 10px 30px rgba(9,16,21,.10);
  --shadow-modal: 0 24px 80px rgba(0,25,31,.22);
  --panel-width: 430px;
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html, body { height: 100%; margin: 0; }

body {
  color: var(--ink);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

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

button, a, label[for] { -webkit-tap-highlight-color: transparent; }

button { color: inherit; }

button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(0,100,119,.22);
  outline-offset: 2px;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 9999;
  transform: translateY(-140%);
  padding: 10px 14px;
  border-radius: 8px;
  color: #fff;
  background: var(--brand-800);
  transition: transform 160ms ease;
}

.skip-link:focus { transform: translateY(0); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.mobile-only { display: none !important; }

.app-shell {
  display: grid;
  grid-template-columns: var(--panel-width) minmax(0, 1fr);
  width: 100%;
  height: 100dvh;
}

.work-panel {
  position: relative;
  z-index: 700;
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100dvh;
  background: rgba(255,255,255,.98);
  border-right: 1px solid var(--stroke);
  box-shadow: 10px 0 35px rgba(0,30,36,.06);
}

.brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--stroke);
}

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

.brand-mark {
  width: 36px;
  height: 36px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand > span { display: grid; line-height: 1; }
.brand strong { font-size: 18px; letter-spacing: -.035em; }
.brand small { margin-top: 5px; font-size: 10px; font-weight: 700; letter-spacing: .16em; }

.header-actions { display: flex; align-items: center; gap: 6px; }

.info-button, .icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--stroke);
  background: var(--surface);
  cursor: pointer;
}

.info-button {
  min-height: 40px;
  gap: 7px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 650;
}

.info-button:hover, .icon-button:hover { background: var(--surface-soft); border-color: var(--stroke-strong); }
.info-button svg, .icon-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-button { width: 42px; height: 42px; padding: 0; border-radius: 50%; }

.intro { padding: 24px 24px 22px; border-bottom: 1px solid var(--stroke); }

.eyebrow {
  margin: 0 0 8px;
  color: var(--brand-700);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.intro h1 {
  margin: 0;
  max-width: 330px;
  font-size: 28px;
  line-height: 1.1;
  letter-spacing: -.035em;
}

.intro > p:last-child {
  margin: 11px 0 0;
  max-width: 355px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.55;
}

.panel-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  scrollbar-color: #c6cdd0 transparent;
  scrollbar-width: thin;
}

.panel-scroll > section { padding: 20px 24px; border-bottom: 1px solid var(--stroke); }

.section-heading, .measure-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.section-heading h2, .measure-head h2 {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -.01em;
}

.text-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0;
  border: 0;
  color: var(--brand-700);
  background: transparent;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}

.text-button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }

.search-box {
  display: grid;
  grid-template-columns: 20px 1fr auto;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding-left: 14px;
  border: 1px solid var(--stroke-strong);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(9,16,21,.04);
}

.search-box:focus-within { border-color: var(--brand-700); box-shadow: 0 0 0 3px rgba(0,100,119,.10); }
.search-box > svg { width: 19px; height: 19px; fill: none; stroke: #748087; stroke-width: 1.8; stroke-linecap: round; }
.search-box input { min-width: 0; height: 44px; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 13px; }
.search-box input::placeholder { color: #929ca2; }
.search-box button { align-self: stretch; min-width: 64px; border: 0; border-left: 1px solid var(--stroke); border-radius: 0 9px 9px 0; color: var(--brand-800); background: #f6fafb; font-size: 12px; font-weight: 700; cursor: pointer; }
.search-box button:hover { background: var(--brand-100); }

.field-note, .draw-hint { margin: 8px 0 0; color: #7b858b; font-size: 11px; line-height: 1.45; }

.status-dot { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-soft); font-size: 11px; font-weight: 600; }
.status-dot i { width: 7px; height: 7px; border-radius: 50%; background: #9ba4a9; box-shadow: 0 0 0 3px #eef0f1; }
.status-dot.active { color: var(--action); }
.status-dot.active i { background: var(--action); box-shadow: 0 0 0 3px #dff4eb; }

.primary-action-group { display: grid; grid-template-columns: 1fr 48px; gap: 8px; }

.primary-button, .secondary-button, .download-button, .geojson-button, .square-button {
  border: 0;
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease, transform 100ms ease, box-shadow 140ms ease;
}

.primary-button:active, .secondary-button:active, .download-button:active, .geojson-button:active, .square-button:active { transform: translateY(1px); }

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 8px;
  color: #fff;
  background: var(--brand-800);
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 5px 14px rgba(0,75,91,.16);
}

.primary-button:hover { background: var(--brand-900); box-shadow: 0 7px 18px rgba(0,75,91,.22); }
.primary-button.active { background: var(--action); }
.primary-button svg, .secondary-button svg, .download-button svg, .square-button svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.square-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--stroke-strong);
  border-radius: 10px;
  color: var(--brand-800);
  background: var(--surface);
}

.square-button:hover:not(:disabled) { border-color: var(--brand-700); background: #f4fafb; }

button:disabled, .square-button:disabled { cursor: not-allowed; opacity: .44; transform: none; box-shadow: none; }

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

.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--stroke-strong);
  border-radius: 8px;
  color: var(--ink);
  background: var(--surface);
  font-size: 12px;
  font-weight: 650;
}

.secondary-button:hover:not(:disabled) { border-color: #aeb8bd; background: var(--surface-soft); }
.file-button { cursor: pointer; }
.file-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.danger-quiet { color: var(--danger); }

.measurement { background: #fbfcfc; }
.measure-head { margin-bottom: 16px; }
.measure-head p { margin: 4px 0 0; color: var(--ink-soft); font-size: 10px; }
.crs-chip { padding: 5px 8px; border-radius: 6px; color: var(--brand-800); background: var(--brand-100); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; font-weight: 700; }
.area-value { display: flex; align-items: baseline; gap: 7px; }
.area-value strong { font-size: 34px; line-height: 1; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.area-value span { color: var(--ink-soft); font-size: 14px; font-weight: 650; }

.measure-grid { display: grid; grid-template-columns: 1fr 1fr; margin-top: 16px; padding: 12px 0; border-block: 1px solid var(--stroke); }
.measure-grid > div { display: grid; gap: 3px; }
.measure-grid > div + div { padding-left: 18px; border-left: 1px solid var(--stroke); }
.measure-grid span { color: var(--ink-soft); font-size: 10px; }
.measure-grid strong { font-size: 13px; font-variant-numeric: tabular-nums; }

.validation-list { display: grid; gap: 9px; margin-top: 14px; }
.validation-list p { display: flex; align-items: center; gap: 9px; margin: 0; color: var(--ink-soft); font-size: 11px; }
.check { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; font-size: 10px; font-weight: 700; }
.check.waiting { color: #788288; background: #eef0f1; }
.check.pass { color: #fff; background: var(--action); }
.check.fail { color: #fff; background: var(--danger); }

.privacy-note { color: var(--action); font-size: 10px; font-weight: 650; }

.profile-picker { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin: 0 0 9px; padding: 0; border: 0; }
.profile-picker legend { margin-bottom: 7px; color: var(--ink-soft); font-size: 10px; font-weight: 650; }
.profile-picker label { position: relative; display: flex; align-items: center; min-height: 48px; padding: 8px 10px; border: 1px solid var(--stroke-strong); border-radius: 9px; background: var(--surface); cursor: pointer; }
.profile-picker label.selected { border-color: var(--brand-700); background: var(--brand-100); box-shadow: inset 0 0 0 1px rgba(0,75,91,.12); }
.profile-picker input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.profile-picker span { display: grid; gap: 2px; }
.profile-picker strong { color: var(--ink); font-size: 11px; }
.profile-picker small { color: var(--ink-soft); font-size: 9px; }

.download-button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 64px;
  padding: 10px 14px;
  border-radius: 10px;
  color: #fff;
  text-align: left;
  background: var(--action);
}

.download-button:hover:not(:disabled) { background: var(--action-hover); box-shadow: 0 8px 20px rgba(11,122,83,.18); }
.download-icon { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 8px; background: rgba(255,255,255,.14); }
.download-button > span:last-child { display: grid; gap: 3px; }
.download-button strong { font-size: 13px; }
.download-button small { color: rgba(255,255,255,.76); font-size: 10px; }

.geojson-button { width: 100%; min-height: 42px; margin-top: 7px; border: 1px solid var(--stroke-strong); border-radius: 8px; color: var(--ink-soft); background: var(--surface); font-size: 11px; font-weight: 650; }
.geojson-button:hover:not(:disabled) { color: var(--brand-800); border-color: var(--brand-700); }

.panel-footer { display: flex; align-items: center; justify-content: space-between; min-height: 42px; padding: 0 24px; border-top: 1px solid var(--stroke); color: #7d878c; font-size: 10px; }
.panel-footer a { color: var(--brand-700); font-weight: 650; text-decoration: none; }
.panel-footer a:hover { text-decoration: underline; }

.map-stage { position: relative; min-width: 0; height: 100dvh; overflow: hidden; background: #dfe5e5; }
#map { position: absolute; inset: 0; z-index: 1; }
.leaflet-container { font-family: inherit; background: #dfe5e5; }
.leaflet-control-zoom { border: 0 !important; border-radius: 10px !important; box-shadow: var(--shadow-control) !important; overflow: hidden; }
.leaflet-control-zoom a { width: 42px !important; height: 42px !important; line-height: 42px !important; border-color: var(--stroke) !important; color: var(--brand-800) !important; }
.leaflet-control-attribution { padding: 4px 8px !important; border-radius: 7px 0 0 0; color: #5d686e; background: rgba(255,255,255,.9) !important; font-size: 9px !important; }
.leaflet-div-icon { border: 0; background: transparent; }
.vertex { position: relative; width: 18px; height: 18px; border: 3px solid #fff; border-radius: 50%; background: var(--brand-800); box-shadow: 0 1px 8px rgba(0,35,42,.45); }
.vertex.start::after { content: ""; position: absolute; inset: 3px; border-radius: inherit; background: #fff; }
.search-pin { width: 22px; height: 22px; border: 4px solid white; border-radius: 50% 50% 50% 0; background: var(--action); box-shadow: 0 4px 14px rgba(0,45,35,.3); transform: rotate(-45deg); }

.map-topbar { position: absolute; z-index: 500; top: 18px; left: 18px; right: 18px; display: flex; align-items: center; justify-content: space-between; pointer-events: none; }
.map-topbar > * { pointer-events: auto; }
.panel-toggle { display: none; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border: 0; border-radius: 10px; color: var(--brand-800); background: rgba(255,255,255,.96); box-shadow: var(--shadow-control); font-size: 12px; font-weight: 700; cursor: pointer; }
.panel-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }

.step-indicator {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 7px 12px;
  border: 1px solid rgba(255,255,255,.65);
  border-radius: 10px;
  background: rgba(255,255,255,.94);
  box-shadow: var(--shadow-control);
  backdrop-filter: blur(12px);
}

.step-indicator span { display: flex; align-items: center; gap: 7px; color: #778087; font-size: 10px; font-weight: 650; white-space: nowrap; }
.step-indicator span.active { color: var(--brand-800); }
.step-indicator b { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; color: #fff; background: #aab2b6; font-size: 10px; }
.step-indicator .active b { background: var(--brand-800); }
.step-indicator i { width: 18px; height: 1px; background: var(--stroke-strong); }

.map-tip {
  position: absolute;
  z-index: 500;
  top: 78px;
  left: 50%;
  display: none;
  align-items: center;
  gap: 11px;
  min-width: 330px;
  padding: 10px 14px 10px 10px;
  border-radius: 12px;
  color: #fff;
  background: rgba(0,57,69,.94);
  box-shadow: var(--shadow-control);
  transform: translateX(-50%);
}
.map-tip.visible { display: flex; }
.map-tip > span { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border: 1px solid rgba(255,255,255,.28); border-radius: 9px; background: rgba(255,255,255,.1); font-size: 13px; font-weight: 700; }
.map-tip p { display: grid; gap: 2px; margin: 0; }
.map-tip strong { font-size: 11px; }
.map-tip small { color: rgba(255,255,255,.72); font-size: 9px; }

.coordinate-readout { position: absolute; z-index: 500; left: 16px; bottom: 14px; padding: 8px 10px; border-radius: 8px; color: #fff; background: rgba(0,44,53,.78); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; font-variant-numeric: tabular-nums; pointer-events: none; }

.layer-control { position: absolute; z-index: 500; right: 18px; top: 80px; display: flex; padding: 4px; border-radius: 10px; background: rgba(255,255,255,.96); box-shadow: var(--shadow-control); }
.layer-control button { min-height: 34px; padding: 0 12px; border: 0; border-radius: 7px; color: var(--ink-soft); background: transparent; font-size: 10px; font-weight: 650; cursor: pointer; }
.layer-control button.active { color: #fff; background: var(--brand-800); }

.oss-note { position: absolute; z-index: 500; right: 18px; bottom: 24px; display: flex; align-items: center; gap: 10px; max-width: 270px; padding: 11px 13px; border-radius: 11px; background: rgba(255,255,255,.95); box-shadow: var(--shadow-control); }
.oss-note > svg { width: 24px; height: 24px; fill: none; stroke: var(--brand-800); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.oss-note span { display: grid; gap: 2px; }
.oss-note strong { font-size: 10px; }
.oss-note small { color: var(--ink-soft); font-size: 8px; line-height: 1.4; }

.metadata-dialog {
  width: min(680px, calc(100vw - 32px));
  max-height: min(850px, calc(100dvh - 32px));
  padding: 0;
  border: 0;
  border-radius: 20px;
  color: var(--ink);
  background: var(--surface);
  box-shadow: var(--shadow-modal);
}
.metadata-dialog::backdrop { background: rgba(0,24,29,.52); backdrop-filter: blur(5px); }
.metadata-dialog form { display: flex; flex-direction: column; max-height: min(850px, calc(100dvh - 32px)); }
.metadata-dialog header { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px; border-bottom: 1px solid var(--stroke); }
.metadata-dialog header > div { display: flex; align-items: center; gap: 12px; }
.metadata-dialog header .eyebrow { margin-bottom: 4px; }
.metadata-dialog h2 { margin: 0; font-size: 20px; letter-spacing: -.025em; }
.dialog-icon { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 10px; color: var(--brand-800); background: var(--brand-100); }
.dialog-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.dialog-scroll { padding: 20px 22px 24px; overflow: auto; }
.compliance-strip { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; padding: 12px 14px; border-radius: 9px; color: var(--brand-900); background: #eef7f8; font-size: 11px; }
.compliance-strip strong { flex: 0 0 auto; }
.compliance-strip span { color: #4b6268; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.form-grid label { display: grid; gap: 7px; }
.form-grid label > span { color: #38434a; font-size: 11px; font-weight: 700; }
.form-grid em { color: var(--danger); font-style: normal; }
.form-grid .span-2 { grid-column: 1 / -1; }
.form-grid input, .form-grid select, .form-grid textarea { width: 100%; min-height: 46px; padding: 0 13px; border: 1px solid var(--stroke-strong); border-radius: 8px; color: var(--ink); background: var(--surface); font-size: 13px; outline: 0; }
.form-grid textarea { min-height: 78px; padding-block: 12px; resize: vertical; }
.form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus { border-color: var(--brand-700); box-shadow: 0 0 0 3px rgba(0,100,119,.10); }
.form-grid input::placeholder, .form-grid textarea::placeholder { color: #9aa2a7; }

.area-summary { margin-top: 20px; padding: 16px; border: 1px solid #e5ddd0; border-radius: 12px; background: #fffcf7; }
.area-summary > div { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; }
.area-summary span { color: var(--ink-soft); font-size: 11px; font-weight: 650; }
.area-summary strong { font-size: 22px; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.area-summary p { display: flex; align-items: flex-start; gap: 8px; margin: 12px 0 0; padding-top: 12px; border-top: 1px solid #eadfcd; color: #5e5a54; font-size: 11px; line-height: 1.5; }
.area-summary svg { flex: 0 0 auto; width: 17px; height: 17px; fill: none; stroke: var(--warning); stroke-width: 1.8; stroke-linecap: round; }
.metadata-dialog footer { display: grid; grid-template-columns: 150px 1fr; gap: 10px; padding: 14px 22px max(14px, env(safe-area-inset-bottom)); border-top: 1px solid var(--stroke); background: #fbfcfc; }
.export-confirm { min-height: 50px; }

.help-drawer { position: fixed; z-index: 1100; top: 0; right: 0; width: min(410px, 92vw); height: 100dvh; background: var(--surface); box-shadow: -24px 0 60px rgba(0,31,38,.18); transform: translateX(110%); transition: transform 260ms cubic-bezier(.22,.75,.25,1); }
.help-drawer.open { transform: translateX(0); }
.help-drawer header { display: flex; align-items: center; justify-content: space-between; min-height: 80px; padding: 16px 20px; border-bottom: 1px solid var(--stroke); }
.help-drawer h2 { margin: 0; font-size: 21px; letter-spacing: -.025em; }
.help-content { height: calc(100dvh - 80px); padding: 22px 20px; overflow: auto; }
.help-content ol { display: grid; gap: 22px; margin: 0; padding: 0; list-style: none; }
.help-content li { display: grid; grid-template-columns: 34px 1fr; gap: 12px; }
.help-content li > span { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; color: #fff; background: var(--brand-800); font-size: 11px; font-weight: 700; }
.help-content li strong { font-size: 13px; }
.help-content li p { margin: 4px 0 0; color: var(--ink-soft); font-size: 11px; line-height: 1.5; }
.help-checklist { margin-top: 26px; padding: 16px; border-radius: 12px; background: #f3f7f7; }
.help-checklist h3 { margin: 0 0 12px; font-size: 12px; }
.help-checklist p { display: flex; align-items: center; gap: 8px; margin: 8px 0 0; color: #405057; font-size: 11px; }
.help-checklist svg { width: 16px; height: 16px; fill: none; stroke: var(--action); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.reference-card { display: grid; gap: 8px; margin-top: 18px; padding: 16px; border: 1px solid var(--stroke); border-radius: 12px; }
.reference-card h3 { margin: 0 0 2px; font-size: 12px; }
.reference-card a { display: grid; gap: 2px; min-height: 44px; padding: 9px 10px; border-radius: 8px; color: var(--ink); background: var(--surface-soft); text-decoration: none; }
.reference-card a:hover { background: var(--brand-100); }
.reference-card strong { font-size: 11px; }
.reference-card span { color: var(--ink-soft); font-size: 9px; line-height: 1.45; }
.ticket-card { margin-top: 18px; padding: 20px; border-radius: 14px; color: #fff; background: var(--brand-900); }
.ticket-icon { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 10px; background: rgba(255,255,255,.12); }
.ticket-icon svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ticket-card h3 { margin: 16px 0 6px; font-size: 17px; }
.ticket-card p { margin: 0; color: rgba(255,255,255,.72); font-size: 11px; line-height: 1.55; }
.ticket-card a { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; margin-top: 16px; color: #fff; font-size: 12px; font-weight: 700; text-decoration: none; }
.ticket-card a:hover { text-decoration: underline; }
.ticket-card a svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.disclaimer { margin: 18px 3px 0; color: #7c868b; font-size: 10px; line-height: 1.55; }
.drawer-backdrop { position: fixed; z-index: 1000; inset: 0; visibility: hidden; background: rgba(0,24,29,.38); opacity: 0; transition: opacity 220ms ease, visibility 220ms ease; }
.drawer-backdrop.open { visibility: visible; opacity: 1; }

.toast { position: fixed; z-index: 1500; left: 50%; bottom: 28px; display: flex; align-items: center; gap: 10px; min-width: 250px; max-width: min(420px, calc(100vw - 32px)); padding: 12px 15px; border-radius: 10px; color: #fff; background: #152125; box-shadow: 0 12px 35px rgba(0,0,0,.2); opacity: 0; pointer-events: none; transform: translate(-50%, 16px); transition: opacity 180ms ease, transform 180ms ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast > span { width: 8px; height: 8px; border-radius: 50%; background: #54d49a; }
.toast.error > span { background: #ff857a; }
.toast p { margin: 0; font-size: 11px; line-height: 1.45; }

@media (max-width: 1040px) {
  :root { --panel-width: 390px; }
  .intro h1 { font-size: 25px; }
  .step-indicator span { font-size: 0; gap: 0; }
  .step-indicator span b { font-size: 10px; }
}

@media (max-width: 760px) {
  .mobile-only { display: inline-flex !important; }
  .app-shell { display: block; }
  .work-panel { position: fixed; z-index: 800; left: 0; right: 0; bottom: 0; width: 100%; height: min(78dvh, 720px); border: 0; border-radius: 18px 18px 0 0; box-shadow: 0 -18px 55px rgba(0,34,41,.18); transform: translateY(calc(100% - 0px)); transition: transform 260ms cubic-bezier(.22,.75,.25,1); }
  .work-panel.open { transform: translateY(0); }
  .brand-row { min-height: 64px; padding: 10px 16px; }
  .intro { padding: 18px 18px 16px; }
  .intro h1 { font-size: 24px; }
  .intro > p:last-child { font-size: 12px; }
  .panel-scroll > section { padding-inline: 18px; }
  .panel-footer { padding-inline: 18px; }
  .map-stage { height: 100dvh; }
  .panel-toggle { display: inline-flex; }
  .map-topbar { top: max(14px, env(safe-area-inset-top)); left: 14px; right: 14px; }
  .step-indicator { padding-inline: 7px; }
  .step-indicator i { width: 9px; }
  .map-tip { top: 74px; width: calc(100vw - 28px); min-width: 0; }
  .layer-control { right: 14px; top: 76px; }
  .coordinate-readout { bottom: calc(68px + env(safe-area-inset-bottom)); }
  .oss-note { display: none; }
  .mobile-panel-handle { position: absolute; z-index: 500; left: 50%; bottom: max(14px, env(safe-area-inset-bottom)); align-items: center; gap: 9px; min-height: 46px; padding: 0 16px; border: 0; border-radius: 12px; color: #fff; background: var(--brand-800); box-shadow: var(--shadow-control); font-size: 12px; font-weight: 700; transform: translateX(-50%); }
  .mobile-panel-handle span { width: 22px; height: 3px; border-radius: 3px; background: rgba(255,255,255,.55); }
  .metadata-dialog { width: 100vw; max-width: none; max-height: 92dvh; margin: auto 0 0; border-radius: 18px 18px 0 0; }
  .metadata-dialog form { max-height: 92dvh; }
  .metadata-dialog header { padding: 16px; }
  .dialog-scroll { padding: 16px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: auto; }
  .metadata-dialog footer { grid-template-columns: 1fr 1.6fr; padding: 12px 16px max(12px, env(safe-area-inset-bottom)); }
  .compliance-strip { align-items: flex-start; flex-direction: column; gap: 3px; }
  .toast { bottom: calc(72px + env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
