:root {
  --bg: #f4ede3;
  --panel: rgba(255, 251, 246, 0.78);
  --panel-strong: rgba(255, 255, 255, 0.98);
  --text: #17211c;
  --muted: #5c655f;
  --border: rgba(132, 57, 43, 0.12);
  --accent: #b62e29;
  --accent-strong: #7f1716;
  --accent-soft: #f4d4ce;
  --green: #1f6b46;
  --orange: #b87410;
  --blue: #1767a8;
  --gold: #b68b2d;
  --shadow: 0 24px 70px rgba(47, 35, 28, 0.12);
  --shadow-soft: 0 12px 30px rgba(47, 35, 28, 0.08);
  --panel-highlight: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(255, 248, 240, 0.72));
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: "Space Grotesk", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 0% 0%, rgba(182, 139, 45, 0.22), transparent 28%),
    radial-gradient(circle at 100% 0%, rgba(182, 46, 41, 0.15), transparent 34%),
    radial-gradient(circle at 50% 100%, rgba(31, 107, 70, 0.12), transparent 34%),
    linear-gradient(180deg, #fbf6ef 0%, var(--bg) 52%, #f0e5d8 100%);
  background-attachment: fixed;
  -webkit-overflow-scrolling: touch;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: auto;
  pointer-events: none;
  z-index: 0;
}

body::before {
  top: -140px;
  right: -120px;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(182, 139, 45, 0.2), transparent 66%);
  filter: blur(8px);
}

body::after {
  left: -160px;
  bottom: -160px;
  width: 460px;
  height: 460px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(182, 46, 41, 0.12), transparent 68%);
  filter: blur(14px);
}

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

.shell {
  width: min(1280px, calc(100% - 24px));
  margin: 0 auto;
  padding: 18px 0 28px;
  position: relative;
  z-index: 1;
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 24px;
  position: relative;
  padding: 20px 2px 14px;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 -10px 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(176, 139, 49, 0.6), transparent);
}

.hero-copy-block {
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent-strong);
  font-size: 0.75rem;
  font-weight: 700;
}

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

h1 {
  margin-bottom: 10px;
  font-size: clamp(2.3rem, 5vw, 4.5rem);
  line-height: 0.94;
  letter-spacing: -0.05em;
  text-wrap: balance;
}

.hint {
  color: var(--muted);
}

.layout,
.panel,
.stack {
  display: grid;
  gap: 16px;
}

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

.admin-main-grid {
  grid-template-columns: minmax(0, 1.32fr) minmax(360px, 0.92fr);
  align-items: start;
}

.grid.household-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card {
  background: var(--panel-highlight);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 20px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px) saturate(1.1);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(176, 139, 49, 0.24), rgba(178, 44, 42, 0.14), rgba(31, 107, 70, 0.14));
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.card::after {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 70px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.32), transparent);
  pointer-events: none;
}

.login-card {
  max-width: 460px;
}

.stack.compact {
  gap: 8px;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.row.spread {
  justify-content: space-between;
}

.mobile-actions {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.travel-hint-card {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(23, 103, 168, 0.12);
  background: rgba(245, 250, 255, 0.82);
  box-shadow: var(--shadow-soft);
}

label {
  display: grid;
  gap: 6px;
  font-weight: 600;
}

input,
select,
textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.84);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

button {
  border: 0;
  border-radius: 999px;
  padding: 11px 18px;
  cursor: pointer;
  transition: transform 160ms ease, opacity 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

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

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(23, 103, 168, 0.22);
  outline-offset: 2px;
}

button.primary {
  background: linear-gradient(135deg, #cf4137 0%, var(--accent-strong) 100%);
  color: #fff;
  box-shadow:
    0 14px 28px rgba(178, 44, 42, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

button.ghost {
  background: rgba(245, 236, 220, 0.88);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

button.primary:hover,
button.ghost:hover {
  box-shadow: 0 16px 30px rgba(47, 35, 28, 0.12);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.map {
  min-height: 340px;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

.table-wrap {
  overflow: auto;
}

.table-wrap--kids {
  margin-top: 6px;
}

.table-wrap table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.kids-table {
  min-width: 820px;
  table-layout: auto;
}

th,
td {
  padding: 14px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(109, 91, 76, 0.14);
  vertical-align: top;
  overflow-wrap: anywhere;
}

.table-wrap th:nth-child(1),
.table-wrap td:nth-child(1) {
  width: 31%;
}

.table-wrap th:nth-child(2),
.table-wrap td:nth-child(2) {
  width: 29%;
}

.table-wrap th:nth-child(3),
.table-wrap td:nth-child(3) {
  width: 12%;
}

.table-wrap th:nth-child(4),
.table-wrap td:nth-child(4) {
  width: 10%;
}

.table-wrap th:nth-child(5),
.table-wrap td:nth-child(5) {
  width: 18%;
}

.admin-actions {
  display: grid;
  gap: 8px;
  justify-items: stretch;
  min-width: 132px;
}

.admin-actions button {
  width: 100%;
  max-width: none;
  padding: 8px 12px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 251, 244, 0.92);
  color: var(--muted);
  backdrop-filter: blur(10px);
}

.fleet-summary {
  display: grid;
  gap: 14px;
  margin: 14px 0 18px;
}

.history-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.history-item {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(132, 57, 43, 0.1);
  box-shadow: var(--shadow-soft);
}

.summary-strip {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.location-gate {
  display: grid;
  gap: 10px;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(23, 103, 168, 0.14);
  background:
    radial-gradient(circle at top right, rgba(23, 103, 168, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(244, 249, 255, 0.72));
  box-shadow: var(--shadow-soft);
}

.location-gate strong {
  display: block;
  font-size: 1.05rem;
}

.summary-card {
  padding: 15px 16px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background:
    radial-gradient(circle at top right, rgba(182, 139, 45, 0.12), transparent 36%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(255, 248, 240, 0.68));
  box-shadow: 0 12px 26px rgba(47, 35, 28, 0.07);
}

.summary-card strong {
  display: block;
  margin-top: 4px;
  font-size: 1.35rem;
  line-height: 1;
}

.summary-card .hint {
  margin-bottom: 0;
}

.route-editor {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(141, 64, 52, 0.12);
}

.route-boards {
  display: grid;
  gap: 12px;
}

.route-board {
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: var(--shadow-soft);
}

.route-board--muted {
  background: rgba(245, 249, 244, 0.72);
}

.route-board__list {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.route-item {
  display: grid;
  gap: 8px;
  padding: 13px;
  border-radius: 16px;
  background: rgba(255, 252, 247, 0.96);
  border: 1px solid rgba(141, 64, 52, 0.12);
  cursor: grab;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.route-item:hover {
  transform: translateY(-1px);
  border-color: rgba(176, 139, 49, 0.35);
  box-shadow: 0 10px 22px rgba(47, 35, 28, 0.08);
}

.route-item.dragging {
  opacity: 0.55;
}

.route-item--static {
  cursor: default;
}

.route-item.pending {
  border-color: rgba(184, 116, 16, 0.16);
}

.route-item.arrived {
  border-color: rgba(23, 103, 168, 0.24);
  background: rgba(245, 250, 255, 0.92);
}

.route-item.completed {
  opacity: 0.82;
  background: rgba(241, 247, 241, 0.96);
}

.route-item__topline {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
 }

.route-item__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.route-item__children {
  color: var(--muted);
  font-size: 0.9rem;
}

.route-item__order {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--route-order-color, var(--accent)) 14%, white);
  color: var(--route-order-color, var(--accent-strong));
  font-size: 0.9rem;
  font-weight: 700;
}

.route-item__hint {
  color: var(--muted);
  font-size: 0.78rem;
}

.route-item__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}

.route-item__actions button {
  padding: 8px 12px;
}

.form-mode-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 14px;
  border: 1px solid rgba(31, 107, 70, 0.18);
  background: rgba(31, 107, 70, 0.08);
  color: var(--green);
  font-weight: 700;
}

.view-mode-switch {
  display: inline-flex;
  gap: 8px;
  padding: 6px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.72);
  margin-bottom: 12px;
}

.view-mode-switch button.active {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  color: #fff;
}

.fleet-item,
.next-stop {
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px 18px;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.9), transparent 42%),
    rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow-soft);
}

.fleet-item {
  display: grid;
  gap: 10px;
}

.fleet-item .address-badge {
  width: fit-content;
}

.next-stop.arrived {
  border-color: rgba(46, 125, 50, 0.4);
  background: rgba(46, 125, 50, 0.09);
}

#santaView.focus-mode #santaStops {
  display: none;
}

#santaView.focus-mode .grid.two {
  grid-template-columns: 1fr;
}

#santaView.focus-mode .santa-map-card {
  display: none;
}

#santaView.focus-mode .card:first-child {
  padding: 22px;
}

#santaView.focus-mode #nextStopCard {
  display: grid;
  gap: 14px;
  min-height: min(72vh, 760px);
  align-content: center;
  padding: 24px 22px;
  border-width: 2px;
  box-shadow: 0 24px 46px rgba(178, 44, 42, 0.12);
  background:
    radial-gradient(circle at top right, rgba(176, 139, 49, 0.2), transparent 34%),
    radial-gradient(circle at bottom left, rgba(31, 107, 70, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 249, 242, 0.96));
}

#santaView.focus-mode #nextStopCard strong {
  font-size: clamp(1.55rem, 4vw, 2.3rem);
  line-height: 1.02;
}

#santaView.focus-mode #locationStatus {
  width: 100%;
  justify-content: center;
}

#santaView.focus-mode .focus-kicker {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent-strong);
  font-size: 0.75rem;
  font-weight: 700;
}

#santaView.focus-mode .focus-headline {
  display: grid;
  gap: 8px;
}

#santaView.focus-mode .focus-title-row {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

#santaView.focus-mode .focus-household-count {
  display: grid;
  gap: 2px;
  min-width: 132px;
  padding: 10px 12px;
  border-radius: 18px;
  border: 1px solid rgba(176, 139, 49, 0.18);
  background:
    radial-gradient(circle at top right, rgba(176, 139, 49, 0.16), transparent 38%),
    rgba(255, 252, 245, 0.92);
  text-align: right;
  box-shadow: var(--shadow-soft);
}

#santaView.focus-mode .focus-household-count__value {
  color: var(--accent-strong);
  font-size: clamp(1.45rem, 3vw, 2rem);
  font-weight: 700;
  line-height: 1;
}

#santaView.focus-mode .focus-household-count__label {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#santaView.focus-mode .focus-santa-line {
  max-width: 28ch;
  margin: 4px 0 2px;
  color: var(--accent-strong);
  font-size: clamp(1.18rem, 2.4vw, 1.6rem);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -0.02em;
}

#santaView.focus-mode .focus-route-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

#santaView.focus-mode .focus-family-grid {
  display: grid;
  gap: 10px;
}

#santaView.focus-mode .focus-family-card {
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(141, 64, 52, 0.1);
}

#santaView.focus-mode .focus-actions {
  display: grid;
  gap: 12px;
}

#santaView.focus-mode .focus-actions button {
  width: 100%;
  min-height: 64px;
  padding: 16px 20px;
  font-size: 1.05rem;
  font-weight: 700;
}

#santaView.focus-mode .focus-empty {
  text-align: center;
  justify-items: center;
}

#santaView.focus-mode .focus-empty strong {
  font-size: clamp(1.7rem, 4vw, 2.4rem);
}

#santaView.focus-mode .focus-celebration {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(176, 139, 49, 0.12);
  color: #7f651f;
  font-weight: 700;
}

#santaView.focus-mode .focus-next-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.fleet-item strong,
.next-stop strong {
  display: block;
  margin-bottom: 4px;
}

.santa-identity {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}

.santa-avatar {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.22), transparent 30%),
    linear-gradient(180deg, #18372f 0%, #0f211d 100%);
  color: #fff;
  font-weight: 700;
  border: 2px solid color-mix(in srgb, var(--santa-color, var(--accent)) 42%, white);
  box-shadow:
    0 10px 22px rgba(13, 28, 24, 0.24),
    0 0 0 4px color-mix(in srgb, var(--santa-color, var(--accent)) 12%, transparent);
}

.santa-marker-wrap {
  background: transparent;
  border: 0;
}

.santa-marker {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.santa-marker__badge {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.18), transparent 34%),
    linear-gradient(180deg, #18372f 0%, #0f211d 100%);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  border: 2px solid color-mix(in srgb, var(--santa-color, var(--accent)) 54%, white);
  box-shadow:
    0 8px 16px rgba(12, 26, 23, 0.24),
    0 0 0 4px color-mix(in srgb, var(--santa-color, var(--accent)) 16%, transparent);
}

.santa-marker.current .santa-marker__badge {
  transform: scale(1.08);
  border-color: color-mix(in srgb, var(--santa-color, var(--accent)) 72%, white);
  box-shadow:
    0 12px 24px rgba(12, 26, 23, 0.3),
    0 0 0 6px color-mix(in srgb, var(--santa-color, var(--accent)) 20%, transparent);
}

.santa-marker__label {
  max-width: 88px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(255, 252, 247, 0.98);
  border: 1px solid rgba(15, 33, 29, 0.12);
  color: var(--text);
  font-size: 0.68rem;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 700;
}

.status.pending {
  background: rgba(184, 116, 16, 0.14);
  color: var(--orange);
}

.status.arrived {
  background: rgba(23, 103, 168, 0.14);
  color: var(--blue);
}

.status.completed {
  background: rgba(46, 125, 50, 0.14);
  color: var(--green);
}

.address-badge,
.group-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(176, 139, 49, 0.12);
  color: #7f651f;
  font-size: 0.82rem;
  font-weight: 600;
}

.group-badge {
  background: rgba(31, 107, 70, 0.11);
  color: var(--green);
}

.family-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.family-list.compact {
  gap: 6px;
}

.family-item {
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(141, 64, 52, 0.08);
}

.family-item.compact {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  padding: 8px 10px;
  border-radius: 14px;
}

.family-item__meta {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.family-cluster {
  display: grid;
  gap: 10px;
}

.family-cluster__header {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.family-cluster__title {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.family-item strong {
  display: block;
  margin-bottom: 2px;
}

.stop-card {
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px;
  background:
    radial-gradient(circle at top right, rgba(182, 139, 45, 0.08), transparent 34%),
    #fffdf8;
  scroll-margin-top: 12px;
  box-shadow: var(--shadow-soft);
}

.stop-card.current-stop {
  border-color: rgba(176, 139, 49, 0.5);
  box-shadow: 0 14px 30px rgba(176, 139, 49, 0.12);
}

.stop-card.completed {
  opacity: 0.72;
  background: #f0f7f0;
}

.stop-card.arrived {
  background: rgba(23, 103, 168, 0.08);
  border-color: rgba(23, 103, 168, 0.28);
}

.stop-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.stop-title {
  margin-bottom: 4px;
  font-size: 1.15rem;
}

.code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 160px auto;
  gap: 10px;
  align-items: end;
}

.hidden {
  display: none !important;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  max-width: min(420px, calc(100vw - 36px));
  padding: 12px 16px;
  border-radius: 16px;
  background: rgba(34, 28, 23, 0.92);
  color: #fff;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

code {
  padding: 2px 6px;
  border-radius: 8px;
  background: rgba(28, 42, 36, 0.08);
}

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
  background: rgba(255, 251, 246, 0.96);
  color: var(--text);
  box-shadow: var(--shadow-soft);
}

.leaflet-control-zoom a {
  background: rgba(255, 251, 246, 0.92);
  color: var(--text);
  border-bottom-color: rgba(132, 57, 43, 0.1);
}

.admin-household-wrap {
  background: transparent;
  border: 0;
}

.admin-household-marker {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.28), transparent 34%),
    var(--household-color, var(--accent));
  border: 2px solid rgba(255, 251, 246, 0.96);
  box-shadow: 0 10px 18px rgba(28, 42, 36, 0.16);
}

.admin-household-marker.arrived {
  box-shadow: 0 12px 22px rgba(23, 103, 168, 0.18);
}

.admin-household-marker.completed {
  opacity: 0.6;
}

.admin-household-marker__count {
  color: #fff;
  font-size: 0.88rem;
  font-weight: 700;
}

.route-stop-wrap {
  background: transparent;
  border: 0;
}

.route-stop-marker {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.24), transparent 34%),
    var(--route-color, var(--accent));
  box-shadow: 0 10px 18px rgba(28, 42, 36, 0.16);
  border: 2px solid rgba(255, 251, 246, 0.96);
}

.route-stop-marker.current {
  transform: scale(1.12);
  box-shadow: 0 14px 26px rgba(176, 139, 45, 0.28);
}

.route-stop-marker.completed {
  opacity: 0.62;
}

.route-stop-marker__badge {
  color: #fff;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1;
}

.next-stop.completion-burst {
  animation: completionPulse 900ms ease;
}

@keyframes completionPulse {
  0% {
    transform: scale(1);
    box-shadow: var(--shadow-soft);
  }
  35% {
    transform: scale(1.01);
    box-shadow: 0 0 0 10px rgba(176, 139, 49, 0.08), 0 24px 40px rgba(31, 107, 70, 0.16);
  }
  100% {
    transform: scale(1);
    box-shadow: var(--shadow-soft);
  }
}

@media (max-width: 980px) {
  .grid.two {
    grid-template-columns: 1fr;
  }

  .hero {
    flex-direction: column;
  }

  .map {
    min-height: 300px;
  }

  .stop-header {
    flex-direction: column;
  }

  table,
  thead,
  tbody,
  th,
  td,
  tr {
    display: block;
  }

  thead {
    display: none;
  }

  tr {
    padding: 12px 0;
    border-bottom: 1px solid rgba(109, 91, 76, 0.14);
  }

  td {
    border: 0;
    padding: 6px 0;
    display: grid;
    gap: 3px;
  }

  td:last-child {
    padding-top: 10px;
  }

  td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
  }

  td:last-child::before {
    content: "Aktionen";
  }

  .code-row {
    grid-template-columns: 1fr;
  }

  .kids-table {
    min-width: 0;
  }

  .route-item__topline {
    flex-direction: column;
  }

  .route-item__actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .summary-strip {
    grid-template-columns: 1fr 1fr;
  }

  .mobile-actions {
    position: sticky;
    top: 10px;
    z-index: 20;
  }

  #santaView.focus-mode .card:first-child {
    padding: 16px;
  }

  #santaView.focus-mode #nextStopCard {
    min-height: calc(100vh - 250px);
    min-height: calc(100dvh - 250px);
    padding: 20px 16px;
  }

  #santaView.focus-mode .focus-title-row {
    grid-template-columns: 1fr;
  }

  #santaView.focus-mode .focus-household-count {
    min-width: 0;
    text-align: left;
  }

  #santaView.focus-mode .view-mode-switch {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  #santaView.focus-mode .view-mode-switch button {
    width: 100%;
  }

  #santaView.focus-mode .focus-actions button {
    min-height: 68px;
    font-size: 1.08rem;
  }

}

@supports (-webkit-touch-callout: none) {
  body {
    background-attachment: scroll;
  }

  body::before,
  body::after {
    position: absolute;
  }

  .card {
    backdrop-filter: none;
  }

  .pill,
  .travel-hint-card {
    backdrop-filter: none;
  }

  @media (max-width: 980px) {
    .mobile-actions {
      position: static;
    }
  }
}

@media (max-width: 1180px) {
  .admin-main-grid {
    grid-template-columns: 1fr;
  }

  .grid.household-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .shell {
    width: min(100%, calc(100% - 16px));
    padding-top: 12px;
  }

  .card {
    border-radius: 20px;
    padding: 16px;
  }

  .summary-strip {
    grid-template-columns: 1fr;
  }

  .view-mode-switch {
    width: 100%;
    justify-content: stretch;
  }

  .view-mode-switch button {
    flex: 1 1 0;
  }

  .pill {
    width: 100%;
    justify-content: center;
  }
}
