:root { --rd-ui-font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }

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

.flow-route {
  stroke-linecap: round;
  stroke-dasharray: 20 120;
  animation: flow 2s linear infinite;
}

@keyframes flow {
  from { stroke-dashoffset: 140; }
  to { stroke-dashoffset: 0; }
}

.icon-marker {
  background: transparent;
  border: none;
}

.route-time-marker {
  font-family: var(--rd-ui-font);
  background: transparent;
  border: none;
  text-align: center;
}

.route-time-label {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.route-time {
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  color: #111;
  text-shadow: 0 0 3px white, 0 0 7px white, 0 0 12px white;
}

.route-symbol {
  margin-top: 2px;
  font-size: 22px;
  line-height: 1;
  text-shadow: 0 0 3px white, 0 0 7px white;
}

#route-discovery-btn,
#create-route-btn {
  position: fixed;
  right: 12px;
  z-index: 1000;
  padding: 10px 13px;
  border: none;
  border-radius: 999px;
  background: white;
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
  font-weight: 850;
  font-size: 14px;
  line-height: 1;
}

#route-discovery-btn { top: 14px; }
#create-route-btn { top: 56px; }

#route-discovery-btn.active,
#create-route-btn.active {
  background: #111 !important;
  color: white !important;
}

#notice-btn {
  position: fixed;
  top: 14px;
  z-index: 1000;
  overflow: visible;
}

#notice-btn.has-notice-count::after {
  content: attr(data-notice-count);
  position: absolute;
  top: -2px;
  right: -4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 17px;
  height: 17px;
  box-sizing: border-box;
  padding: 0 4px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #ff3b30;
  color: #fff;
  font-size: 10px;
  font-weight: 950;
  line-height: 1;
  text-shadow: none;
  filter: none;
}

.map-emoji-btn,
.route-side-btn {
  appearance: none;
  -webkit-appearance: none;
  border: none;
  background: transparent;
  box-shadow: none;
  padding: 0;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 27px;
  line-height: 1;
  cursor: pointer;
  text-shadow:
    0 0 2px rgba(255,255,255,1),
    0 0 7px rgba(255,255,255,0.98),
    0 0 14px rgba(255,255,255,0.92),
    0 0 24px rgba(255,255,255,0.78),
    0 0 36px rgba(255,255,255,0.48);
  filter:
    drop-shadow(0 2px 3px rgba(0,0,0,0.24))
    drop-shadow(0 0 10px rgba(255,255,255,0.72));
}

.map-emoji-btn.active,
.route-side-btn.active {
  transform: scale(1.06);
  text-shadow:
    0 0 3px rgba(255,255,255,1),
    0 0 10px rgba(255,255,255,1),
    0 0 22px rgba(255,255,255,0.96),
    0 0 34px rgba(255,255,255,0.86);
}

#passport-btn.active,
#notice-btn.active,
#receipts-btn.active,
#knob-btn.active,
#search-btn.active {
  width: 38px;
  min-width: 38px;
  padding: 0;
  background: transparent;
  color: inherit;
  font-size: 27px;
}

#route-side-panel {
  position: fixed;
  right: 8px;
  top: 106px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  max-width: calc(100vw - 16px);
  pointer-events: none;
}

.route-side-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0;
  max-width: min(190px, calc(100vw - 16px));
  pointer-events: auto;
}

.route-side-row + .route-side-row {
  margin-top: -3px;
}

.route-side-row.ticket-row {
  width: 150px;
  max-width: min(150px, calc(100vw - 16px));
}

.route-side-btn {
  width: 30px;
  height: 30px;
  font-size: 23px;
}

.route-side-empty {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  height: 30px;
  padding-right: 2px;
  font-size: 13px;
  font-weight: 950;
  color: #111;
  white-space: nowrap;
  text-shadow:
    0 0 2px rgba(255,255,255,1),
    0 0 7px rgba(255,255,255,0.98),
    0 0 14px rgba(255,255,255,0.92),
    0 0 24px rgba(255,255,255,0.78),
    0 0 36px rgba(255,255,255,0.48);
  filter:
    drop-shadow(0 2px 3px rgba(0,0,0,0.20))
    drop-shadow(0 0 10px rgba(255,255,255,0.72));
}

.route-side-empty .empty-icon {
  margin-right: 3px;
  font-size: 21px;
}

#reset-btn {
  display: none !important;
}

.hidden,
#reset-btn.hidden,
#ticketing-btn.hidden,
#entry-screen.hidden,
#route-sheet.hidden {
  display: none !important;
}

#route-sheet {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  max-height: 42vh;
  overflow-y: auto;
  padding: 10px 12px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
  font-family: var(--rd-ui-font);
  z-index: 1001;
}

.sheet-close-btn {
  position: absolute;
  right: 10px;
  top: 8px;
  border: none;
  background: #111;
  color: white;
  border-radius: 999px;
  width: 28px;
  height: 28px;
  font-weight: 900;
}

.sheet-title {
  font-weight: 900;
  margin-bottom: 8px;
  font-size: 16px;
}

.panel-row {
  font-size: 13px;
  margin: 4px 0;
  color: #444;
}

.route-chain-panel {
  position: fixed;
  left: 8px;
  top: 8px;
  bottom: 92px;
  max-height: calc(100dvh - 100px);
  max-width: calc(100vw - 16px);
  overflow: visible;
  transform-origin: top left;
  z-index: 1000;
  pointer-events: none;
  font-family: var(--rd-ui-font);
  font-size: 15px;
  font-weight: 900;
  line-height: 1.38;
  color: #111;
  white-space: pre-line;
  text-shadow: 0 0 3px white, 0 0 7px white, 0 0 12px white;
}

.route-chain-instruction-panel {
  position: fixed;
  left: 50%;
  top: 45%;
  transform: translate(-50%, -50%);
  z-index: 900;
  pointer-events: none;
  font-family: var(--rd-ui-font);
  text-align: center;
  font-size: 24px;
  font-weight: 900;
  color: rgba(0,0,0,0.62);
  white-space: pre-line;
  text-shadow: 0 0 4px white, 0 0 10px white;
}

.route-chain-target-user {
  margin-left: 3px;
  font-size: 12px;
  font-weight: 950;
}

.ticketing-btn {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  z-index: 1200;
  padding: 15px 38px;
  border-radius: 999px;
  border: none;
  background: #0095D9;
  color: #fff;
  font-weight: 900;
  font-size: 16px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.28);
}

.sheet-form label {
  display: block;
  font-size: 12px;
  margin-top: 6px;
  font-weight: 700;
}

.sheet-form input {
  width: 100%;
  box-sizing: border-box;
  padding: 9px;
  margin-top: 6px;
  border: 1px solid #ddd;
  border-radius: 10px;
  font-size: 16px;
}

.compact-time-form label {
  margin-top: 2px;
  margin-bottom: 1px;
  font-size: 10px;
  line-height: 1.1;
}

.compact-time-form input[type="time"],
.compact-time-form input[type="date"],
.compact-time-form input[type="datetime-local"] {
  height: 30px;
  min-height: 30px;
  padding: 2px 8px;
  font-size: 13px;
  line-height: 30px;
  border-radius: 8px;
  appearance: none;
  -webkit-appearance: none;
}

.time-row {
  display: flex;
  gap: 8px;
}

.time-row > div {
  flex: 1;
}

.route-type-group,
.passport-actions,
.ticket-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.route-type-btn,
.passport-actions button,
.ticket-actions button {
  flex: 1;
  padding: 8px 0;
  border-radius: 999px;
  border: none;
  font-weight: 800;
}

.route-type-btn {
  border: 1px solid #B3E5FC;
  background: #E3F2FD;
  color: #0288D1;
  font-size: 12px;
}

.route-type-btn.active {
  background: #0095D9;
  color: white;
  border-color: #0095D9;
}

.route-type-btn[data-type="one_time"] {
  border-color: #b7dfba;
  background: #e9f7ea;
  color: #2e7d32;
}

.route-type-btn[data-type="one_time"].active {
  border-color: #66bb6a;
  background: #66bb6a;
  color: #fff;
}

.carrier-route-form-time-row,
.carrier-route-form-datetime-row {
  margin-top: 9px;
}

.carrier-route-form-datetime-row > div {
  min-width: 0;
}

.carrier-route-form-datetime-row input[type="datetime-local"] {
  width: 100%;
  min-width: 0;
  height: 40px;
  min-height: 40px;
}

.weekday-group {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 4px;
  margin-top: 6px;
}

.weekday-btn {
  flex: 1;
  min-width: 0;
  padding: 5px 0;
  border-radius: 999px;
  border: 1px solid #B3E5FC;
  background: #E3F2FD;
  color: #0288D1;
  font-size: 10px;
  font-weight: 700;
}

.weekday-btn.active {
  background: #0095D9;
  color: white;
  border-color: #0095D9;
}

.save-btn {
  margin-top: 10px;
  width: 100%;
  padding: 11px;
  border: none;
  border-radius: 12px;
  background: #0095D9;
  color: white;
  font-weight: 900;
  font-size: 15px;
}

.light-btn {
  background: #eee !important;
  color: #111 !important;
}

.danger-btn {
  background: #ff3b30 !important;
  color: white !important;
}

.light-btn:disabled,
.danger-btn:disabled {
  background: #d7d7d7 !important;
  color: #777 !important;
  opacity: 0.72;
  cursor: not-allowed;
}

.damage-loss-btn:not(:disabled) {
  background: #ff3b30 !important;
  color: #fff !important;
}

#entry-screen {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-family: var(--rd-ui-font);
}

.entry-card {
  position: relative;
  z-index: 2;
  width: min(330px, calc(100vw - 44px));
  -webkit-backdrop-filter: blur(15px);
}

.entry-title {
  font-size: 24px;
  margin-bottom: 10px;
  letter-spacing: -0.03em;
}

.entry-copy {
  margin-bottom: 14px;
  font-size: 13px;
}

.entry-copy div + div {
  margin-top: 3px;
  color: #333;
}

.entry-card button {
  width: 100%;
  margin-top: 8px;
  padding: 12px;
  border: none;
  font-size: 14px;
  background: #0095D9;
  color: white;
}

.simple-list-item {
  padding: 10px 0;
  border-top: 1px solid #eee;
}

.simple-list-item:first-child {
  border-top: none;
}

.simple-main {
  font-size: 14px;
  font-weight: 900;
}

.simple-sub {
  font-size: 12px;
  color: #555;
  margin-top: 3px;
}

.tap-hint {
  font-size: 11px;
  color: #999;
  margin-top: 4px;
}

.ticket-card {
  border: 1px solid #eee;
  border-radius: 14px;
  padding: 10px;
  margin-top: 8px;
  background: #fafafa;
}

.ticket-main {
  font-size: 18px;
  font-weight: 900;
  margin-bottom: 6px;
}

.ticket-key {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 1px;
  background: white;
  border-radius: 10px;
  padding: 8px;
  text-align: center;
}

.status-pill {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  background: #eee;
  font-size: 11px;
  font-weight: 900;
}

.gesture-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 8px;
}

.gesture-btn {
  padding: 10px 0;
  border: 1px solid #ddd;
  border-radius: 14px;
  background: white;
  font-size: 22px;
}

.gesture-btn.active {
  background: #111;
  color: white;
  border-color: #111;
}

.route-discovery-question {
  font-size: 15px;
  font-weight: 900;
  margin-bottom: 8px;
}

.save-btn:disabled {
  background: #ccc;
  color: #777;
  opacity: 0.8;
}

/* Ticketing後のRegular日付入力欄がシート幅からはみ出さないように固定 */
#route-sheet,
#sheet-content,
.sheet-form,
.route-discovery-details-form {
  box-sizing: border-box;
  max-width: 100%;
}

.route-discovery-details-form input,
.route-discovery-details-form input[type="text"],
.route-discovery-details-form input[type="date"],
.route-discovery-details-form input[type="datetime-local"] {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.route-discovery-details-form input[type="date"],
.route-discovery-details-form input[type="datetime-local"] {
  height: 38px;
  min-height: 38px;
  padding: 6px 9px;
  line-height: 1.2;
  appearance: none;
  -webkit-appearance: none;
}

.route-discovery-details-form .route-discovery-fixed-input {
  border-color: #d2d5d8;
  background: #e9ecef;
  color: #686d72;
  -webkit-text-fill-color: #686d72;
  opacity: 1;
}

.input-hint {
  margin-top: 4px;
  font-size: 11px;
  color: #777;
  font-weight: 700;
}

.ticket-screen {
  font-family: var(--rd-ui-font);
}

.ticket-top-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  margin-bottom: 8px;
}

.ticket-role {
  font-size: 18px;
  font-weight: 950;
  letter-spacing: -0.02em;
}

.ticket-status {
  display: inline-block;
  margin-top: 0;
  padding: 3px 8px;
  border-radius: 999px;
  background: #eee;
  color: #333;
  font-size: 11px;
  font-weight: 900;
}

.ticket-meta-row {
  font-size: 13px;
  font-weight: 900;
  margin: 4px 0;
  color: #111;
}

.ticket-section-label {
  margin-top: 10px;
  margin-bottom: 5px;
  font-size: 12px;
  font-weight: 900;
  color: #444;
}

.ticket-info-box,
.next-gesture-box {
  border-radius: 12px;
  background: #f5f5f5;
  padding: 9px 10px;
  font-size: 14px;
}

.next-gesture-box {
  text-align: center;
  font-size: 22px;
  font-weight: 900;
}

.ticket-route-line {
  margin-top: 12px;
  padding: 11px 12px;
  border-radius: 14px;
  background: #111;
  color: white;
  font-size: 18px;
  font-weight: 950;
}

.ticket-confirm-form {
  margin-top: 10px;
}

.mono-text {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.gesture-btn:disabled {
  opacity: 0.45;
}

.passport-stats-block {
  margin-top: 10px;
}

.passport-section-title {
  font-size: 12px;
  font-weight: 950;
  color: #111;
  margin: 8px 0 5px;
}

.passport-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.passport-stat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-radius: 12px;
  background: #f5f5f5;
  padding: 7px 9px;
  font-size: 12px;
  font-weight: 800;
  color: #333;
}

.passport-stat b {
  color: #111;
  font-size: 14px;
  font-weight: 950;
}

.user-link-btn {
  appearance: none;
  -webkit-appearance: none;
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;
  color: #0066cc;
  font: inherit;
  font-weight: 950;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.public-passport-back-btn {
  width: 100%;
  margin-top: 10px;
  padding: 10px 0;
  border: none;
  border-radius: 12px;
  font-weight: 900;
}

.entry-form label {
  display: block;
  margin-top: 8px;
  font-size: 12px;
}

.entry-form input {
  width: 100%;
  margin-top: 5px;
  padding: 10px;
}

#login-user-id-input,
#login-password-input {
  font-size: 16px;
}

#login-passport-btn,
.login-submit-btn {
  background: #1FA463 !important;
  color: white !important;
}

.entry-secondary-btn {
  background: #EAF7EF !important;
  color: #126334 !important;
}

.entry-error {
  margin-top: 8px;
  padding: 7px 8px;
  border-radius: 10px;
  background: #EAF7EF;
  color: #126334;
  font-size: 11px;
  font-weight: 800;
}

/* Carrier Route coordinate focus */
.coordinate-marker-action {
  cursor: pointer;
  transition: transform 140ms ease, filter 140ms ease;
}

.coordinate-marker-action:hover,
.coordinate-marker-action:active {
  transform: translateY(-2px) scale(1.06);
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.route-coordinate-row {
  display: flex;
  align-items: center;
  gap: 7px;
}

.route-coordinate-btn {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 2px 3px;
  margin: 0;
  border-radius: 8px;
  font: inherit;
  font-size: 21px;
  line-height: 1;
  cursor: pointer;
  transition: transform 140ms ease, background 140ms ease;
}

.route-coordinate-btn:hover,
.route-coordinate-btn:active {
  transform: scale(1.12);
  background: rgba(0, 0, 0, 0.06);
}

.coordinate-popup .leaflet-popup-content {
  margin: 12px 14px;
}

.coordinate-popup-content {
  min-width: 190px;
}

.coordinate-popup-title {
  margin-bottom: 8px;
  font-weight: 700;
}

.coordinate-copy-btn {
  width: 100%;
  border: 1px solid rgba(0, 0, 0, 0.16);
  border-radius: 10px;
  background: #fff;
  padding: 9px 10px;
  font: inherit;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}

.coordinate-popup-hint {
  margin-top: 6px;
  color: #666;
  font-size: 12px;
}

/* Ensure selected Carrier Route endpoint markers receive map taps */
.leaflet-routeCoordinatePane-pane {
  pointer-events: auto !important;
}

.route-coordinate-map-marker {
  pointer-events: auto !important;
  cursor: pointer;
}

.route-coordinate-map-marker .route-time-label {
  width: 64px;
  min-height: 52px;
  pointer-events: auto !important;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.route-coordinate-map-marker .route-symbol,
.route-coordinate-map-marker .route-time {
  pointer-events: none;
}

.route-chain-route {
  margin: 0 0 2px;
}

.route-chain-start-row {
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.route-chain-possible-days {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 2px;
  text-shadow: none;
}

.route-chain-possible-days > span {
  padding: 1px 4px;
  border-radius: 999px;
  background: #0095d9;
  color: #fff;
  font-size: 8px;
  font-weight: 950;
  line-height: 1.35;
}

.route-chain-possible-days > .unavailable {
  background: #ff3b30;
}

.route-chain-arrow {
  flex: 0 0 auto;
}

.compact-back-btn {
  width: auto;
  min-height: 34px;
  margin-bottom: 4px;
  padding: 6px 10px;
}

.sheet-form select {
  background: #e9ecef !important;
  color: #0077b6 !important;
  border-color: #d2d7dc !important;
  font-weight: 850;
}
#ticketing-btn,
#ticketing-submit-btn {
  background: #0095D9 !important;
  color: #fff !important;
}

#route-discovery-btn.reset-mode,
#create-route-btn.reset-mode {
  background: #ff3b30 !important;
  color: #fff !important;
}

#passport-btn.route-side-btn {
  width: 30px;
  height: 30px;
  font-size: 23px;
  padding: 0;
}

#ticketing-submit-btn:disabled,
#ticketing-btn:disabled,
.save-btn:disabled {
  background: #c8c8c8 !important;
  color: #777 !important;
  opacity: 0.72 !important;
  cursor: not-allowed;
  box-shadow: none !important;
}

/* 2026-07 refined Passport, mode buttons, ticketing and entry motion */
#passport-btn {
  position: fixed !important;
  top: 8px !important;
  right: auto !important;
  bottom: auto !important;
  z-index: 2200 !important;
  width: 38px !important;
  height: 38px !important;
  font-size: 27px !important;
  padding: 0 !important;
}

/* During an active workflow, Reset is always above Back. */
#route-discovery-btn.reset-mode,
#create-route-btn.reset-mode {
  top: 14px !important;
}
#route-discovery-btn.active:not(.reset-mode),
#create-route-btn.active:not(.reset-mode) {
  top: 56px !important;
}

.entry-title {
  text-align: center;
}

/* iOS Safari zooms focused fields below 16px. */
.sheet-form input,
.sheet-form select {
  font-size: 16px !important;
}

/* 2026-07-18 specification alignment */
#passport-btn, #notice-btn, #receipts-btn, #knob-btn {
  position: fixed !important;
  top: 8px !important;
  z-index: 1200 !important;
}
#passport-btn { left: 8px !important; }
#notice-btn { left: 50px !important; }
#receipts-btn { left: 92px !important; }
#knob-btn { left: 134px !important; }

.receipt-card, .notice-card {
  display:flex; gap:10px; align-items:flex-start; padding:10px 0; border-bottom:1px solid rgba(0,0,0,.12);
}
.receipt-icon { font-size:24px; line-height:1; }
.receipt-card small { opacity:.65; }
/* Shared completion frame — single authoritative animation.
   Ticketing uses orange. Carrier Route creation uses the route's own flow color. */
.confirmation-frame-glow {
  --frame-glow-color: 255, 149, 0;
  position: fixed;
  inset: 0;
  z-index: 5000;
  pointer-events: none;
  opacity: 0;
  box-sizing: border-box;
  border: 0 solid rgba(var(--frame-glow-color), 0);
  box-shadow: none;
}

.confirmation-frame-glow.is-playing {
  animation: confirmationFrameGlow 1100ms cubic-bezier(.2,.75,.2,1) both;
}

@keyframes confirmationFrameGlow {
  0% {
    opacity: 0;
    border-width: 0;
    border-color: rgba(var(--frame-glow-color), 0);
    box-shadow: inset 0 0 0 rgba(var(--frame-glow-color), 0);
  }
  22% {
    opacity: 1;
    border-width: 3px;
    border-color: rgba(var(--frame-glow-color), .95);
    box-shadow:
      inset 0 0 14px rgba(var(--frame-glow-color), .95),
      inset 0 0 34px rgba(var(--frame-glow-color), .72),
      inset 0 0 72px rgba(var(--frame-glow-color), .38);
  }
  58% {
    opacity: 1;
    border-width: 5px;
    border-color: rgba(var(--frame-glow-color), 1);
    box-shadow:
      inset 0 0 18px rgba(var(--frame-glow-color), 1),
      inset 0 0 46px rgba(var(--frame-glow-color), .9),
      inset 0 0 96px rgba(var(--frame-glow-color), .5);
  }
  100% {
    opacity: 0;
    border-width: 2px;
    border-color: rgba(var(--frame-glow-color), 0);
    box-shadow:
      inset 0 0 8px rgba(var(--frame-glow-color), 0),
      inset 0 0 24px rgba(var(--frame-glow-color), 0),
      inset 0 0 56px rgba(var(--frame-glow-color), 0);
  }
}

/* Tickets — three-stage flow */
.ticket-route-line {
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  line-height: 1.35;
}

.ticket-route-coordinate-btn {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  padding: 2px 3px;
  margin: 0;
  font: inherit;
  font-size: 21px;
  line-height: 1;
  cursor: pointer;
}

.ticket-route-coordinate-btn:active {
  transform: scale(1.12);
  background: rgba(255,255,255,.14);
}

.ticket-route-arrow {
  opacity: .78;
}

.ticket-choice-btn {
  min-height: 48px;
}

.ticket-choice-btn.active {
  background: #111;
  color: #fff;
  border-color: #111;
}

/* Ticket route line: explicit vertical handoff notation. */
.ticket-route-line {
  display: grid;
  justify-items: start;
  gap: 4px;
  box-sizing: border-box;
  padding-left: 18px;
  text-align: left;
}
.ticket-route-point-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 2px;
}

.ticket-route-point-row > .ticket-route-arrow {
  position: absolute;
  right: 100%;
  margin-right: 3px;
}

.ticket-route-point-row-inline {
  width: 100%;
  justify-content: center;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.ticket-route-inline-arrow {
  margin: 0 4px;
  opacity: .78;
}

/* Ticket handover — 16-digit transfer and completion states */
.confirmation-frame-glow.is-rainbow-playing {
  animation: confirmationRainbowFrame 2100ms linear both;
}

@keyframes confirmationRainbowFrame {
  0% {
    opacity: 0;
    border-width: 0;
    border-color: rgba(0,199,190,0);
    box-shadow: inset 0 0 0 rgba(0,199,190,0);
  }
  8%, 16% {
    opacity: 1;
    border-width: 5px;
    border-color: rgba(0,199,190,1);
    box-shadow: inset 0 0 18px rgba(0,199,190,1), inset 0 0 46px rgba(0,199,190,.9), inset 0 0 96px rgba(0,199,190,.5);
  }
  24% {
    border-color: rgba(0,122,255,1);
    box-shadow: inset 0 0 18px rgba(0,122,255,1), inset 0 0 46px rgba(0,122,255,.9), inset 0 0 96px rgba(0,122,255,.5);
  }
  38% {
    border-color: rgba(255,59,48,1);
    box-shadow: inset 0 0 18px rgba(255,59,48,1), inset 0 0 46px rgba(255,59,48,.9), inset 0 0 96px rgba(255,59,48,.5);
  }
  52% {
    border-color: rgba(175,82,222,1);
    box-shadow: inset 0 0 18px rgba(175,82,222,1), inset 0 0 46px rgba(175,82,222,.9), inset 0 0 96px rgba(175,82,222,.5);
  }
  66% {
    border-color: rgba(255,45,85,1);
    box-shadow: inset 0 0 18px rgba(255,45,85,1), inset 0 0 46px rgba(255,45,85,.9), inset 0 0 96px rgba(255,45,85,.5);
  }
  80% {
    border-color: rgba(255,214,10,1);
    box-shadow: inset 0 0 18px rgba(255,214,10,1), inset 0 0 46px rgba(255,214,10,.9), inset 0 0 96px rgba(255,214,10,.5);
  }
  92% {
    opacity: 1;
    border-width: 5px;
    border-color: rgba(52,199,89,1);
    box-shadow: inset 0 0 18px rgba(52,199,89,1), inset 0 0 46px rgba(52,199,89,.9), inset 0 0 96px rgba(52,199,89,.5);
  }
  100% {
    opacity: 0;
    border-width: 2px;
    border-color: rgba(52,199,89,0);
    box-shadow: inset 0 0 8px rgba(52,199,89,0), inset 0 0 24px rgba(52,199,89,0), inset 0 0 56px rgba(52,199,89,0);
  }
}

.gesture-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.ticket-trash-choice {
  grid-column: auto !important;
  min-height: 48px;
  background: #fff !important;
  border-color: #ddd !important;
}
.ticket-trash-choice.active {
  background: #111 !important;
  color: #fff !important;
  border-color: #111 !important;
}

.ticket-handover-screen .ticket-role {
  margin-bottom: 0;
}
.ticket-party-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  margin: 5px 0 10px;
  font-size: 13px;
  font-weight: 900;
}
.ticket-gesture-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 10px 0 4px;
  text-align: center;
}
.ticket-gesture-label {
  min-height: 30px;
  font-size: 12px;
  font-weight: 900;
  color: #444;
}
.ticket-gesture-value {
  font-size: 31px;
  line-height: 1.1;
}
.ticket-key-block {
  margin-top: 10px;
}
.previous-key-toggle {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 4px 0;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}
.ticket-key-hidden {
  display: none;
}
.handover-key-group {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto minmax(0,1fr) auto minmax(0,1fr) auto minmax(0,1fr);
  align-items: center;
  gap: 3px;
}
.handover-key-part {
  width: 100% !important;
  min-width: 0;
  box-sizing: border-box;
  margin: 0 !important;
  padding: 9px 4px !important;
  text-align: center;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 16px !important;
  font-weight: 900;
  letter-spacing: .08em;
}
.key-separator {
  font-weight: 900;
  color: #555;
}
.damage-loss-wide {
  width: 100%;
  margin-top: 10px;
  padding: 11px;
  border: 0;
  border-radius: 12px;
  font-weight: 900;
}

.ticket-error-message {
  margin-top: 4px;
  font-size: 14px;
  font-weight: 900;
  color: #111;
}

/* Ticket terminal actions — explicit Vanish / Flush controls. */
.ticket-terminal-btn {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  margin-top: 12px;
  padding: 12px 14px;
  border: 0;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 950;
  letter-spacing: .01em;
  cursor: pointer;
  box-shadow: 0 5px 16px rgba(0,0,0,.16);
}
.vanish-btn {
  color: #111;
  background: linear-gradient(90deg,#ff3b30,#ff9500,#ffd60a,#34c759,#00c7be,#007aff,#af52de,#ff2d55);
  text-shadow: 0 1px 2px rgba(255,255,255,.75);
}
.flush-btn {
  color: #fff;
  background: linear-gradient(180deg,#7a4a21,#4b2b12);
}
.ticket-terminal-btn:active {
  transform: translateY(1px) scale(.99);
}

.ticket-key-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.ticket-key-heading-row .ticket-section-label {
  margin-right: auto;
}
.ticket-key-attempts {
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}
.ticket-key-attempts span {
  color: #ff3b30;
}

/* Tickets — final compact and even vertical rhythm.
   Keep all existing typography and icon sizes unchanged. */
.ticket-screen {
  --ticket-block-gap: 6px;
}

.ticket-screen .ticket-top-row {
  margin-bottom: var(--ticket-block-gap);
}

.ticket-screen .ticket-meta-row {
  margin: 2px 0;
}

.ticket-screen .ticket-top-row + .ticket-meta-row {
  margin-top: 0;
}

.ticket-screen .ticket-party-row {
  margin: 2px 0 var(--ticket-block-gap);
}

.ticket-screen .ticket-gesture-pair {
  gap: 6px;
  margin: var(--ticket-block-gap) 0;
}

.ticket-screen .ticket-gesture-label {
  min-height: 0;
  margin-bottom: 2px;
  line-height: 1.2;
}

.ticket-screen .ticket-gesture-value {
  margin: 0;
}

.ticket-screen .ticket-route-line {
  margin-top: var(--ticket-block-gap);
}

.ticket-screen .ticket-key-block,
.ticket-screen .ticket-confirm-form {
  margin-top: var(--ticket-block-gap);
}

.ticket-screen .ticket-key-heading-row .ticket-section-label {
  margin-top: 0;
  margin-bottom: 4px;
}

.ticket-screen .handover-key-group {
  margin-top: 0;
}

.ticket-screen .ticket-terminal-btn,
.ticket-screen .damage-loss-wide {
  margin-top: var(--ticket-block-gap);
}

/* Ticket holder. */
.ticket-current-holder-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  margin: 0 0 var(--ticket-block-gap, 6px);
  font-size: 13px;
  font-weight: 900;
  color: #111;
}

/* Current Holder Passport icon is visual only; underline applies only to the User ID. */
.ticket-current-holder-passport-icon {
  text-decoration: none !important;
}

/* Carrier Route handoff and Ticket endpoint emphasis. */
.carrier-route-stitch-line {
  stroke: #111 !important;
  stroke-width: 2px !important;
  stroke-dasharray: 3 6 !important;
  animation: none !important;
}

.ticket-endpoint-yellow-glow .route-symbol {
  text-shadow:
    0 0 3px #fff,
    0 0 7px #fff,
    0 0 8px rgba(255, 214, 10, 1),
    0 0 16px rgba(255, 214, 10, .98),
    0 0 28px rgba(255, 214, 10, .82),
    0 0 44px rgba(255, 214, 10, .58) !important;
  filter: drop-shadow(0 0 7px rgba(255, 214, 10, .95));
}

.ticket-endpoint-yellow-glow .route-time {
  text-shadow:
    0 0 3px #fff,
    0 0 7px #fff,
    0 0 12px rgba(255, 214, 10, .8) !important;
}

/* Ticket map refinements: rounded stitch edges and Ticket-only route focus. */
.carrier-route-stitch-line {
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}

.ticket-linked-route-back-btn {
  width: 100%;
  margin: 0 0 8px;
  padding: 9px 12px;
  border: 0;
  border-radius: 12px;
  font-weight: 900;
}

/* Separate attribution tiles, retaining the existing type size. */
.leaflet-control-attribution,
.route-discovery-attribution {
  margin: 0 !important;
  padding: 2px 6px !important;
  border-radius: 6px !important;
  background: rgba(255, 255, 255, 0.88) !important;
  color: #333 !important;
  font-size: 10px !important;
  line-height: 1.25 !important;
  white-space: nowrap;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.14);
}
.leaflet-control-attribution a {
  color: #1f5f99 !important;
  text-decoration: none;
}

/* Passport, credentials, Map Point, and map-wide Carrier Route Knob. */
#route-sheet.route-sheet-expanded {
  max-height: min(76dvh, 680px);
  overscroll-behavior: contain;
}

.passport-screen,
.knob-screen {
  color: #111;
  font-family: var(--rd-ui-font);
}

.knob-screen {
  position: relative;
}

.passport-sheet-header,
.knob-sheet-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 9px;
  border-bottom: 1px solid #ececec;
}

.passport-sheet-header .sheet-title,
.knob-sheet-header .sheet-title {
  margin: 0;
  font-size: 18px;
}

.passport-sheet-header .sheet-title {
  font-size: 21px;
}

.passport-user-label {
  margin-top: 2px;
  color: #666;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  font-weight: 850;
}

.passport-active-badge {
  display: flex;
  min-width: 72px;
  flex-direction: column;
  align-items: center;
  padding: 6px 9px;
  border-radius: 13px;
  background: #111;
  color: #fff;
}

.passport-active-badge b {
  font-size: 18px;
  line-height: 1;
}

.passport-active-badge span {
  margin-top: 3px;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.passport-meta-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
  color: #666;
  font-size: 11px;
  font-weight: 800;
}

.passport-meta-strip b {
  color: #111;
  font-size: 12px;
}

.passport-setting-row {
  appearance: none;
  -webkit-appearance: none;
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-sizing: border-box;
  margin-top: 9px;
  padding: 9px 10px;
  border: 1px solid #cfe9f7;
  border-radius: 13px;
  background: #eef8fd;
  color: #111;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.passport-setting-main {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.passport-setting-main b {
  font-size: 13px;
}

.passport-setting-main small {
  margin-top: 2px;
  overflow: hidden;
  color: #5d6d75;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.passport-setting-action {
  flex: 0 0 auto;
  color: #0077ad;
  font-size: 12px;
  font-weight: 950;
}

.passport-screen .passport-stats-block {
  margin-top: 10px;
}

.passport-screen .passport-section-title {
  margin: 12px 0 6px;
  font-size: 14px;
  letter-spacing: .01em;
}

.passport-screen .passport-stat {
  min-height: 43px;
  box-sizing: border-box;
  padding: 9px 11px;
  background: #f3f4f5;
  font-size: 14px;
}

.passport-screen .passport-stat > .passport-stat-label {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
  line-height: 1.2;
  white-space: nowrap;
}

.passport-screen .passport-stat-icon {
  flex: 0 0 auto;
  font-size: 18px;
  line-height: 1;
}

.passport-screen .passport-stat > b {
  flex: 0 0 auto;
  font-size: 16px;
}

.passport-private-block {
  margin-top: 11px;
  border: 1px solid #e3e3e3;
  border-radius: 13px;
  overflow: hidden;
  background: #fafafa;
}

.passport-private-toggle {
  appearance: none;
  -webkit-appearance: none;
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  box-sizing: border-box;
  padding: 10px;
  border: 0;
  background: transparent;
  color: #111;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.passport-private-toggle-state {
  color: #0077ad;
  font-size: 11px;
}

.passport-credentials {
  display: grid;
  gap: 7px;
  padding: 0 8px 9px;
}

.passport-credential-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 6px;
}

.passport-credential-copy {
  appearance: none;
  -webkit-appearance: none;
  display: flex;
  min-width: 0;
  min-height: 43px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  box-sizing: border-box;
  padding: 7px 9px;
  border: 0;
  border-radius: 10px;
  background: #fff;
  color: #111;
  text-align: left;
  font: inherit;
}

.passport-secret-toggle {
  cursor: pointer;
}

.passport-credential-label,
.signup-credential-label {
  margin-bottom: 3px;
  color: #707070;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .035em;
  text-transform: uppercase;
}

.passport-credential-value,
.signup-credential-value {
  max-width: 100%;
  color: #111;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  font-weight: 850;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.credential-copy-btn {
  min-width: 54px;
  padding: 0 9px;
  border: 0;
  border-radius: 10px;
  background: #e8ecef;
  color: #111;
  font-size: 11px;
  font-weight: 900;
}

.passport-credentials .input-hint {
  margin-top: -1px;
}

.passport-created-text {
  margin-top: 8px;
  color: #888;
  font-size: 10px;
  font-weight: 750;
  text-align: right;
}

.signup-credentials {
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, .1);
  border-radius: 14px;
  background: rgba(255, 255, 255, .78);
}

.signup-safety-copy {
  display: grid;
  gap: 3px;
  text-align: center;
}

.signup-safety-copy span {
  display: block;
}

.signup-credential-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 9px;
}

.signup-credential-row + .signup-credential-row {
  border-top: 1px solid rgba(0, 0, 0, .08);
}

.signup-credential-main {
  min-width: 0;
}

.signup-copy-btn {
  width: auto !important;
  min-width: 52px;
  margin: 0 !important;
  padding: 8px 9px !important;
  border-radius: 10px !important;
  background: #e8ecef !important;
  color: #111 !important;
  box-shadow: none !important;
  font-size: 11px !important;
}

.knob-route-count {
  display: flex;
  flex: 0 0 auto;
  align-items: baseline;
  gap: 4px;
  padding: 6px 8px;
  border-radius: 11px;
  background: #111;
  color: #fff;
}

.knob-route-count b {
  font-size: 16px;
  line-height: 1;
}

.knob-route-count span {
  font-size: 10px;
  font-weight: 850;
}

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

.knob-header-btn {
  appearance: none;
  -webkit-appearance: none;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 11px;
  background: #eceeef;
  color: #111;
  font-size: 18px;
  font-weight: 950;
  cursor: pointer;
}

.knob-header-btn.knob-apply-btn {
  background: #111;
  color: #fff;
}

.knob-section-mark {
  margin: 12px 2px 6px;
  font-size: 15px;
  font-weight: 950;
  line-height: 1;
}

.knob-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.knob-metric-choice {
  appearance: none;
  -webkit-appearance: none;
  display: flex;
  min-width: 0;
  min-height: 62px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  box-sizing: border-box;
  padding: 7px 4px 5px;
  border: 2px solid transparent;
  border-radius: 14px;
  background: #f3f4f5;
  color: #111;
  text-align: center;
  cursor: pointer;
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease;
}

.knob-metric-choice:active {
  transform: scale(.96);
}

.knob-metric-choice.has-filter.is-gte {
  border-color: #1589cf;
  background: #eaf6fd;
}

.knob-metric-choice.has-filter.is-lte {
  border-color: #da4b43;
  background: #fff0ef;
}

.knob-metric-icon {
  font-size: 27px;
  line-height: 1;
}

.knob-threshold {
  min-height: 14px;
  font-size: 13px;
  font-weight: 1000;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.knob-threshold.is-gte {
  color: #087bc1;
}

.knob-threshold.is-lte {
  color: #d53a33;
}

.knob-activity-grid {
  grid-template-columns: 1fr;
  margin-top: 12px;
  width: calc((100% - 21px) / 4);
}

.knob-popover {
  position: absolute;
  z-index: 1200;
  width: 188px;
  box-sizing: border-box;
  padding: 8px;
  border: 1px solid rgba(0, 0, 0, .14);
  border-radius: 16px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .24);
}

.knob-popover-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.knob-popover-icon {
  font-size: 27px;
  line-height: 1;
}

.knob-popover-head button,
.knob-popover-actions button,
.knob-popover-operator {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  font-weight: 950;
  cursor: pointer;
}

.knob-popover-head button {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  padding: 0;
  border-radius: 9px;
  background: #eceeef;
  color: #333;
  font-size: 18px;
}

.knob-popover-controls {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  gap: 5px;
}

.knob-popover-operator {
  min-height: 42px;
  border-radius: 11px;
  background: #f0f1f2;
  color: #555;
  font-size: 20px;
}

.knob-popover-operator.is-gte.selected {
  background: #1589cf;
  color: #fff;
}

.knob-popover-operator.is-lte.selected {
  background: #da4b43;
  color: #fff;
}

#knob-popover-value {
  width: 100%;
  min-width: 0;
  height: 42px;
  box-sizing: border-box;
  padding: 4px 6px;
  border: 1px solid #cfd3d6;
  border-radius: 11px;
  background: #fff;
  color: #111;
  font-size: 18px;
  font-weight: 950;
  text-align: center;
}

.knob-popover-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  margin-top: 6px;
}

.knob-popover-actions button {
  min-height: 34px;
  border-radius: 10px;
  background: #eceeef;
  color: #111;
  font-size: 17px;
}

.knob-popover-actions #knob-condition-set {
  background: #111;
  color: #fff;
}

#knob-btn.filter-active {
  position: fixed;
  transform: scale(1.06);
}

#knob-btn.filter-active::after {
  content: "";
  position: absolute;
  right: 1px;
  bottom: 1px;
  width: 8px;
  height: 8px;
  box-sizing: border-box;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #0095d9;
  box-shadow: 0 0 8px rgba(0, 149, 217, .9);
}

@media (max-width: 350px) {
  .passport-screen .passport-stat {
    padding-inline: 8px;
    font-size: 13px;
  }

  .passport-screen .passport-stat-icon {
    font-size: 17px;
  }

  .knob-metric-grid {
    gap: 5px;
  }

  .knob-activity-grid {
    width: calc((100% - 15px) / 4);
  }
}

/* Wish List and Carrier Route Ownership */
.route-side-btn.route-route-btn.is-owned {
  text-shadow:
    0 0 3px rgba(255, 246, 168, 1),
    0 0 9px rgba(255, 214, 10, 1),
    0 0 18px rgba(255, 214, 10, .98),
    0 0 30px rgba(255, 184, 0, .86),
    0 0 42px rgba(255, 149, 0, .58);
  filter:
    drop-shadow(0 2px 3px rgba(0, 0, 0, .24))
    drop-shadow(0 0 12px rgba(255, 214, 10, .95));
}

.carrier-route-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.carrier-route-heading-statuses,
.carrier-route-heading-carrier {
  display: inline-flex;
  align-items: center;
}

.carrier-route-heading-statuses {
  gap: 6px;
}

.carrier-route-heading-carrier {
  min-width: 0;
  gap: 3px;
  margin-left: auto;
  color: #111;
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
}

.carrier-route-heading-carrier .user-link-btn {
  min-width: 0;
  padding: 0;
  font-size: inherit;
}

.carrier-route-type-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 950;
}

.carrier-route-type-pill.regular {
  background: #0095d9;
  color: #fff;
}

.carrier-route-type-pill.one-time {
  background: #66bb6a;
  color: #fff;
}

.carrier-route-owned-status,
.owned-route-pill {
  background: #111 !important;
  color: #ffd60a !important;
}

.release-owner-btn,
.notice-release-btn {
  background: #ffd60a !important;
  color: #111 !important;
}

.carrier-route-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
  margin: 4px 0 10px;
}

.carrier-route-weekday {
  display: grid;
  min-width: 0;
  min-height: 25px;
  place-items: center;
  border-radius: 999px;
  background: #e4e6e8;
  color: #969ba0;
  font-size: 9px;
  font-weight: 900;
}

.carrier-route-weekday.active {
  background: #0095d9;
  color: #fff;
}

.carrier-route-clock {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-height: 54px;
  padding: 8px 12px;
  border-radius: 16px;
  background: linear-gradient(135deg, #f5f7f8, #eef1f3);
  color: #111;
  font-size: 14px;
  text-align: center;
}

.carrier-route-clock b {
  font-size: 17px;
  font-variant-numeric: tabular-nums;
}

.carrier-route-time-arrow {
  color: #777;
  font-size: 17px;
  font-weight: 950;
}

.carrier-route-ticket-timing {
  width: 100%;
  margin: 5px 0 2px;
  font-variant-numeric: tabular-nums;
}

.carrier-route-ticket-timing.is-regular {
  display: flex;
  justify-content: center;
}

.carrier-route-datetime {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 7px;
}

.carrier-route-endpoint-card {
  display: flex;
  min-width: 0;
  min-height: 83px;
  flex-direction: column;
  justify-content: center;
  box-sizing: border-box;
  padding: 10px;
  border-radius: 16px;
  background: linear-gradient(145deg, #f4faf4, #e5f4e7);
}

.carrier-route-endpoint-card.goal {
  background: linear-gradient(145deg, #f7faf7, #dff0e1);
}

.carrier-route-endpoint-label {
  color: #527055;
  font-size: 10px;
  font-weight: 950;
}

.carrier-route-endpoint-card strong {
  overflow: hidden;
  margin-top: 5px;
  color: #2e5f33;
  font-size: 11px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.carrier-route-endpoint-card b {
  margin-top: 2px;
  color: #111;
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}

.carrier-route-user-row {
  display: flex;
  align-items: center;
  gap: 4px;
}

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

.passport-feature-card {
  appearance: none;
  -webkit-appearance: none;
  display: grid;
  min-width: 0;
  min-height: 62px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  box-sizing: border-box;
  padding: 9px;
  border: 1px solid #e1e3e5;
  border-radius: 13px;
  background: #f6f7f8;
  color: #111;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.passport-owned-card {
  border-color: #f1d56b;
  background: #fff9dc;
}

.passport-feature-icon {
  font-size: 23px;
  line-height: 1;
}

.passport-feature-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.passport-feature-copy b {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.passport-feature-copy small {
  margin-top: 3px;
  color: #687078;
  font-size: 10px;
  font-weight: 900;
}

.passport-feature-arrow {
  color: #777;
  font-size: 19px;
  font-weight: 900;
}

.wish-list-header,
.owned-route-list-header,
.carrier-wish-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #ececec;
}

.wish-list-header .sheet-title,
.owned-route-list-header .sheet-title,
.carrier-wish-list-head .sheet-title {
  margin: 0;
}

.wish-list-editor-items,
.carrier-wish-list-items {
  display: grid;
  gap: 7px;
  margin-top: 9px;
}

.wish-list-edit-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 45px;
  padding: 7px 8px;
  border-radius: 12px;
  background: #f4f5f6;
}

.wish-list-edit-icon {
  font-size: 20px;
}

.wish-list-edit-text {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 13px;
  font-weight: 850;
}

.wish-list-delete-btn {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: #e6e7e8;
  color: #555;
  font-size: 20px;
  font-weight: 900;
}

.wish-list-add-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  gap: 7px;
  margin-top: 9px;
}

#wish-list-input {
  width: 100%;
  min-width: 0;
  height: 42px;
  box-sizing: border-box;
  padding: 8px 10px;
  border: 1px solid #d6d8da;
  border-radius: 12px;
  font-size: 16px;
}

#wish-list-add-btn {
  border: 0;
  border-radius: 12px;
  background: #111;
  color: #fff;
  font-size: 22px;
  font-weight: 900;
}

#wish-list-add-btn:disabled,
#wish-list-input:disabled {
  opacity: .45;
}

.wish-list-empty,
.owned-route-empty {
  padding: 16px 8px;
  color: #777;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.wish-list-back-btn,
.owned-routes-back-btn {
  width: 100%;
  margin-top: 9px;
  padding: 10px;
  border: 0;
  border-radius: 12px;
  font-weight: 900;
}

.owned-route-list-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 68px;
  align-items: stretch;
  gap: 7px;
  margin-top: 8px;
}

.owned-route-item {
  appearance: none;
  -webkit-appearance: none;
  display: flex;
  width: 100%;
  flex-direction: column;
  box-sizing: border-box;
  padding: 11px;
  border: 1px solid #f0d05a;
  border-radius: 14px;
  background: linear-gradient(135deg, #fffdf1, #fff4b8);
  color: #111;
  text-align: left;
  font: inherit;
}

.owned-route-delete-btn {
  border: 0;
  border-radius: 14px;
  background: #ff3b30;
  color: #fff;
  font-size: 11px;
  font-weight: 950;
}

.owned-route-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}

.owned-route-item-head b {
  font-size: 13px;
}

.owned-route-pill {
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 950;
}

.owned-route-item .carrier-route-weekdays,
.passport-route-item .carrier-route-weekdays {
  width: 100%;
  margin: 9px 0 6px;
}

.owned-route-item .carrier-route-weekday,
.passport-route-item .carrier-route-weekday {
  min-height: 19px;
  font-size: 7px;
}

.owned-route-item .carrier-route-clock,
.passport-route-item .carrier-route-clock {
  width: 100%;
  min-height: 38px;
  box-sizing: border-box;
  padding: 5px 7px;
  background: rgba(255, 255, 255, .58);
  font-size: 10px;
}

.owned-route-item .carrier-route-clock b,
.passport-route-item .carrier-route-clock b {
  font-size: 12px;
}

.owned-route-item .carrier-route-datetime,
.passport-route-item .carrier-route-datetime {
  width: 100%;
  margin-top: 9px;
}

.owned-route-item .carrier-route-endpoint-card,
.passport-route-item .carrier-route-endpoint-card {
  min-height: 60px;
  padding: 7px;
  background: rgba(255, 255, 255, .58);
}

.owned-route-item .carrier-route-endpoint-label,
.passport-route-item .carrier-route-endpoint-label {
  font-size: 8px;
}

.owned-route-item .carrier-route-endpoint-card strong,
.passport-route-item .carrier-route-endpoint-card strong {
  font-size: 8px;
}

.owned-route-item .carrier-route-endpoint-card b,
.passport-route-item .carrier-route-endpoint-card b {
  font-size: 14px;
}

.owned-route-id {
  margin-top: 7px;
  color: #665c34;
  font-size: 10px;
  font-weight: 800;
}

.completion-wish-title {
  font-size: 19px;
  font-weight: 950;
  letter-spacing: -.025em;
  line-height: 1.15;
}

.completion-wish-chain {
  display: grid;
  justify-items: stretch;
  margin-top: 10px;
}

.completion-wish-chain-arrow {
  padding: 2px 0;
  color: #888;
  font-size: 14px;
  font-weight: 950;
  text-align: center;
}

.completion-wish-route {
  appearance: none;
  -webkit-appearance: none;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 3px 8px;
  width: 100%;
  box-sizing: border-box;
  padding: 10px 11px;
  border: 1px solid #dfe2e4;
  border-radius: 14px;
  background: #fff;
  color: #111;
  text-align: left;
}

.completion-wish-route-order {
  grid-row: 1 / span 3;
  align-self: center;
  padding: 5px 7px;
  border-radius: 9px;
  background: #111;
  color: #fff;
  font-size: 10px;
  font-weight: 950;
}

.completion-wish-route-user,
.completion-wish-route-path {
  font-size: 12px;
  font-weight: 900;
}

.completion-wish-route-schedule {
  color: #6b7074;
  font-size: 10px;
  font-weight: 800;
}

.completion-wish-skip {
  width: 100%;
  margin-top: 11px;
  padding: 11px;
  border: 0;
  border-radius: 12px;
  background: #0095d9;
  color: #fff;
  font-size: 15px;
  font-weight: 900;
}

.carrier-wish-list-head > span {
  color: #666;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  font-weight: 850;
}

.completion-wish-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
  padding: 11px;
  border: 1px solid #e0e2e4;
  border-radius: 13px;
  background: #fff;
  color: #111;
  text-align: left;
}

.completion-wish-item b {
  overflow-wrap: anywhere;
  font-size: 13px;
}

/* Notices — only MissOvers and Damage & Loss events. */
.notices-screen {
  display: grid;
}

.notice-event-card {
  box-sizing: border-box;
  padding: 12px;
  border: 1px solid #e1e3e5;
  border-radius: 16px;
  background: #f6f7f8;
}

/* Match the Owned Route card's diagonal, pale gradient. */
.notice-event-card[data-notice-type="failed_handover"],
.notice-event-card[data-notice-type="caused_damage_loss"] {
  border-color: #efa29c;
  background: linear-gradient(135deg, #fff5f3, #ffc6bf);
}

.notice-event-card[data-notice-type="missed_handover"],
.notice-event-card[data-notice-type="suffered_damage_loss"] {
  border-color: #f0d05a;
  background: linear-gradient(135deg, #fffdf1, #fff4b8);
}

.notice-event-card[data-notice-type="trashed_ticket"] {
  border-color: #bfc3c9;
  background: linear-gradient(135deg, #fafbfc, #d5d8dd);
}

.notice-meta-row.notice-carrier-row {
  display: flex;
  justify-content: flex-start;
  gap: 5px;
}

.notice-carrier-row .notice-user-btn {
  flex: 0 0 auto;
  width: auto;
  text-align: left;
}

.notice-event-title {
  margin-bottom: 8px;
  color: #111;
  font-size: 17px;
  font-weight: 950;
  letter-spacing: -.02em;
}

.notice-event-instruction {
  margin: 0 0 9px;
  padding: 8px 9px;
  border-radius: 11px;
  background: #fff;
  color: #333;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.35;
}

.notice-route-discovery-btn {
  appearance: none;
  -webkit-appearance: none;
  display: flex;
  align-items: center;
  gap: 5px;
  width: 100%;
  margin: 0;
  padding: 5px 0;
  border: 0;
  background: transparent;
  color: #0066cc;
  font: inherit;
  font-size: 13px;
  font-weight: 950;
  text-align: left;
}

.notice-route-discovery-btn span {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.notice-meta-row {
  display: grid;
  grid-template-columns: 23px minmax(0, 1fr);
  align-items: center;
  gap: 5px;
  min-height: 27px;
  color: #111;
  font-size: 13px;
  font-weight: 850;
}

.notice-route-schedule.ticket-route-line {
  width: 100%;
  margin: 8px 0 0;
  padding: 9px 10px;
  overflow-x: auto;
  font-size: 13px;
  scrollbar-width: none;
}

.notice-route-schedule.ticket-route-line::-webkit-scrollbar {
  display: none;
}

.notice-route-schedule .ticket-route-coordinate-btn {
  font-size: 18px;
}

.notice-release-btn {
  width: 100%;
  margin-top: 10px;
}

.notice-route-history-back-btn {
  width: 100%;
  margin-top: 10px;
}

/* Incident actions and identity links. */
.notice-event-heading { display:flex; align-items:baseline; justify-content:space-between; gap:8px; flex-wrap:wrap; }
.notice-event-heading time { font-size:12px; white-space:nowrap; color:#555; }
.notice-people { display:flex; align-items:center; gap:6px; flex-wrap:wrap; margin:8px 0 12px; }
.notice-user-btn { padding:4px 0; border:0; background:transparent; color:#1674cc; font:inherit; cursor:pointer; }
.notice-recovery-btn { display:block; width:100%; margin-top:12px; }

.recovery-goal-marker { display:inline-block; background:transparent; filter:drop-shadow(0 0 5px #fff) drop-shadow(0 0 10px #fff); }

/* Keep the existing identity controls on the right of the Ticket heading. */
.ticket-screen .ticket-top-row { flex-wrap: nowrap; gap: 4px; }
.ticket-screen .ticket-top-row .ticket-party-row {
  margin: 0 0 0 auto;
  justify-content: flex-end;
  flex-wrap: nowrap;
  white-space: nowrap;
  gap: 2px;
}
/* One continuous paper roll; separators do not split it into cards. */
.receipt-roll {
  background: #fffef9;
  border-left: 1px solid #dedbd2;
  border-right: 1px solid #dedbd2;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
  color: #111;
}
.receipt-entry { overflow-wrap: anywhere; }
.receipt-entry + .receipt-entry { border-top: 1px dashed #9c998f; }
.receipt-role { margin: 8px 0; }

@media (max-width: 360px) {
  .ticket-screen .ticket-top-row { flex-wrap: wrap; }
}

/* Gesture-selected Tickets: bordered stock with a detachable gesture stub. */
.ticket-handover-screen {
  position: relative;
  box-sizing: border-box;
  margin: 8px 0 12px;
  padding: 16px;
  border: 2px solid #575e69;
  border-radius: 16px;
  background: linear-gradient(110deg, #edf1f6, #fff 60%, #edf1f6);
  box-shadow: inset 0 0 0 4px #fff, inset 0 0 0 5px #c4cbd5, 0 5px 12px rgba(20,30,45,.14);
}
.ticket-handover-screen .ticket-top-row {
  margin: -10px -10px 12px;
  padding: 10px;
  border-radius: 10px 10px 2px 2px;
  border-bottom: 2px solid #575e69;
  background: #e0e6ee;
}
.ticket-handover-screen .ticket-status { margin-left: auto; }
.ticket-handover-screen .ticket-gesture-pair {
  position: relative;
  margin: 18px -16px 10px;
  padding: 18px 16px 12px;
  border-top: 2px dashed #8c95a3;
  background: rgba(215,223,233,.32);
}
.ticket-handover-screen .ticket-gesture-pair::before,
.ticket-handover-screen .ticket-gesture-pair::after {
  content: "";
  position: absolute;
  top: -11px;
  width: 18px;
  height: 18px;
  border: 2px solid #575e69;
  border-radius: 50%;
  background: #fff;
  pointer-events: none;
}
.ticket-handover-screen .ticket-gesture-pair::before { left: -12px; clip-path: inset(0 0 0 50%); }
.ticket-handover-screen .ticket-gesture-pair::after { right: -12px; clip-path: inset(0 50% 0 0); }
.ticket-handover-screen .ticket-gesture-wait { margin: 10px 0 2px; line-height: 1.4; }
.passport-feature-grid { grid-template-columns: 1fr; }
.passport-screen .passport-owned-stat {
  width: 100%;
  margin: 0;
  border: 0;
  background: linear-gradient(135deg, #fff4bc, #ffe078);
  color: #333;
  text-align: left;
  font-family: inherit;
}
.passport-screen .passport-owned-stat > .passport-stat-label { white-space: normal; }
.passport-screen .passport-owned-stat { gap: 4px; padding: 9px 7px; font-size: 12px; }
.passport-screen .passport-owned-stat > b { font-size: 13px; }
.receipt-entry { padding: 14px; line-height: 1.4; }
.receipt-entry .notice-event-heading { gap: 4px 8px; }
.receipt-entry .notice-event-title { margin: 0; }
.receipt-entry .notice-event-heading time { font-variant-numeric: tabular-nums; }
.receipt-entry .ticket-party-row { margin: 4px 0 0; }
.receipt-entry .receipt-user-btn { width: auto; flex: 0 0 auto; }
.receipt-route-btn:disabled { color: #555; cursor: default; }
.receipt-route-btn:disabled span { text-decoration: none; }

/* Static acquisition card and failed-journey participant selection. */
.owned-route-acquired { padding:24px 20px 20px; border:1px solid #d8b34f; border-radius:20px; background:linear-gradient(135deg,#fff9df,#ffe28d); color:#32250b; text-align:center; }
.owned-acquired-emblem { font-size:52px; line-height:1.2; margin-bottom:10px; }
.owned-acquired-title { font-size:24px; font-weight:800; line-height:1.25; margin-bottom:20px; }
.owned-acquired-details { padding:14px 16px; border:1px solid #e2c775; border-radius:12px; background:rgba(255,255,255,.55); text-align:left; }
.owned-acquired-details .panel-row { margin:6px 0; overflow-wrap:anywhere; }
.owned-route-acquired .save-btn { margin-top:20px; }

/* Entry: a quiet passport cover with a single route motif. */
#entry-screen { background: #eef2f5; perspective: none; padding: 24px; box-sizing: border-box; overflow-y: auto; }
.entry-orbit { position: absolute; width: min(100vw, 900px); aspect-ratio: 1; border: 1px solid #d4dfe6; border-radius: 50%; transform: translate(32%, -18%); pointer-events: none; }
.entry-orbit::before, .entry-orbit::after { content: ""; position: absolute; inset: 16%; border: 1px solid #d4dfe6; border-radius: 50%; }
.entry-orbit::after { inset: 33%; }
.entry-card { width: min(380px, 100%); box-sizing: border-box; padding: 32px 28px; border-radius: 24px; background: #fff; border: 1px solid #e0e6eb; box-shadow: 0 20px 65px #19324912; backdrop-filter: none; max-height: calc(100dvh - 48px); overflow-y: auto; }
.entry-eyebrow { font-size: 12px; font-weight: 650; letter-spacing: .12em; color: #657580; margin-bottom: 24px; }
.entry-title { color: #152936; font-weight: 750; }
.entry-brand { font-size: clamp(36px, 9vw, 48px); line-height: 1.04; letter-spacing: -.055em; margin-bottom: 32px; }
.entry-brand span { color: #0095d9; }
.entry-copy { color: #60717d; font-weight: 450; line-height: 1.6; }
.entry-card button { min-height: 46px; border-radius: 12px; font-weight: 650; box-shadow: none; }
#login-passport-btn, .login-submit-btn, #signup-continue-btn { background: #152936 !important; color: #fff !important; }
#create-passport-btn, .entry-card .entry-secondary-btn { background: #edf3f7 !important; color: #243f50 !important; }
.entry-form label { color: #485b68; font-weight: 600; }
.entry-form input { box-sizing: border-box; min-height: 48px; border-radius: 10px; border: 1px solid #cbd6de; background: #f8fafb; color: #152936; font-size: 16px; }
.entry-card input:focus-visible, .entry-card button:focus-visible, .map-search-panel :focus-visible { outline: 2px solid #0095d9; outline-offset: 3px; }
#search-btn { position: fixed; top: 8px; left: 176px; z-index: 1200; }

.map-search-panel { position: fixed; bottom: 12px; left: 12px; right: 12px; box-sizing: border-box; padding: 10px 12px; background: #fff; border: 0; border-radius: 16px; box-shadow: 0 8px 24px rgba(0,0,0,.18); z-index: 1300; font-family: var(--rd-ui-font); max-height: 42dvh; overflow-y: auto; }
.map-search-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.map-search-heading .sheet-title { margin: 0; }
.map-search-heading button { border: 0; padding: 0; background: transparent; width: 30px; height: 30px; font-size: 20px; cursor: pointer; }
.map-search-heading button:disabled { opacity: .35; cursor: default; }
.map-search-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.map-search-fields label { min-width: 0; font-size: 12px; color: #536776; font-weight: 600; }
.map-search-fields input { width: 100%; box-sizing: border-box; display: block; margin-top: 6px; padding: 12px 8px; font-size: 16px; border: 1px solid #cbd6de; border-radius: 9px; color: #152936; background: #f8fafb; }
.map-search-submit { width: 100%; margin-top: 14px; padding: 12px; background: #0095d9; color: #fff; border: none; border-radius: 10px; font-size: 14px; }
#map-search-error { font-size: 12px; line-height: 1.5; color: #b3261e; margin-bottom: 0; }

.leaflet-bottom.leaflet-right { display: flex; flex-direction: column; align-items: flex-end; }
.route-discovery-attribution { white-space: nowrap; }

/* Shared panel headings and compact spacing. */
.notices-screen > .sheet-title,
.receipts-title,
.knob-sheet-header .sheet-title,
.map-search-heading .sheet-title {
  font-size: 21px;
  font-weight: 900;
  margin: 0;
}
.notices-screen { gap: 4px; }
.notices-screen .notice-event-card + .notice-event-card { margin-top: 6px; }
.receipts-title { margin-bottom: 4px; }
.receipt-roll .receipt-entry:first-child { padding-top: 4px; }
.knob-sheet-header { align-items: center; padding-bottom: 0; border-bottom: 0; }
.knob-sheet-header + .knob-section-mark { margin-top: 4px; }
.map-search-submit { font-weight: 900; }
#previous-key-value { appearance: none; border: 0; background: transparent; color: inherit; width: 100%; cursor: pointer; }
/* Disable browser double-tap zoom while retaining pinch zoom. */
html { touch-action: manipulation; }

/* Compact start-to-goal schedule rows. */
.carrier-route-form-time-row,
.carrier-route-form-datetime-row { align-items: center; }
.carrier-route-form-time-row > div { min-width: 0; }
.carrier-form-arrow {
  flex: 0 0 auto;
  color: #111;
  font-size: 15px;
  font-weight: 900;
}
/* Shared Back styling; retain each screen's dimensions. */
button.unified-back-btn,
.entry-card button.unified-back-btn {
  font-family: var(--rd-ui-font) !important;
  font-size: 15px !important;
  font-weight: 900 !important;
  color: #111 !important;
  background: #eee !important;
}

/* Persistent feedback for unsuccessful local storage operations. */
#storage-status { position: fixed; z-index: 10000; top: 64px; left: 12px; right: 12px; padding: 12px 14px; border: 1px solid #c88729; border-radius: 12px; background: #fff4d6; color: #4b320c; font: 600 14px/1.4 var(--rd-ui-font); display: flex; align-items: center; gap: 12px; box-shadow: 0 4px 16px #0002; }
#storage-status-message { flex: 1; }
#storage-retry-btn { border: 0; border-radius: 8px; padding: 9px 12px; background: #152936; color: #fff; font: inherit; cursor: pointer; }

/* Flush participant selection */
.block-chain{display:flex;flex-direction:column;gap:6px;margin:18px 0;}
.block-participant{display:flex;align-items:center;gap:14px;padding:12px;border:1px solid #ddd;border-radius:12px;cursor:pointer;}
.block-participant input{width:22px;height:22px;accent-color:#1688ff;flex-shrink:0;}
.block-self{font-size:12px;color:#666;min-width:22px;}
.block-arrow{text-align:center;color:#777;}
.block-explanation{font-size:13px;line-height:1.5;color:#666;}
.block-select-btn{width:100%;padding:12px;margin:10px 0;background:#1688ff;color:white;border:0;border-radius:12px;font-weight:700;}
.block-select-btn:disabled{background:#ccc;color:#777;cursor:default;}

#live-status{position:fixed;z-index:9999;bottom:42px;left:12px;right:12px;padding:9px 12px;border-radius:10px;background:#fff4d6;color:#4b320c;font:600 13px/1.4 var(--rd-ui-font);text-align:center;}

/* Vector background must not intercept Leaflet's touch/click gestures. */
.leaflet-gl-layer { pointer-events: none; }
#map-status { position: fixed; bottom: 68px; left: 50%; transform: translateX(-50%); z-index: 1100; background: #fff; color: #444; border-radius: 12px; padding: 10px 14px; font: 13px/1.4 sans-serif; box-shadow: 0 2px 12px #0002; max-width: 85vw; }

/* Brand above map sources; leave room for rounded corners and home indicators. */
.leaflet-bottom.leaflet-right {
  --credit-right: max(16px, calc(env(safe-area-inset-right, 0px) + 12px));
  right: var(--credit-right);
  bottom: max(16px, calc(env(safe-area-inset-bottom, 0px) + 8px));
  max-width: calc(100% - var(--credit-right) - max(16px, env(safe-area-inset-left, 0px)));
  gap: 4px;
}
.leaflet-control-attribution {
  order: 2;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  overflow-wrap: normal;
  text-align: right;
}
.map-credit-source { display: inline-block; white-space: nowrap; }
.route-discovery-attribution { order: 1; flex: 0 0 auto; }
#live-status { bottom: max(80px, calc(env(safe-area-inset-bottom, 0px) + 72px)); }
#map-status { bottom: max(116px, calc(env(safe-area-inset-bottom, 0px) + 108px)); }
