:root {
  color-scheme: light;
  --bg: #f7faf8;
  --surface: #ffffff;
  --surface-soft: #eef6f2;
  --surface-strong: #e7f0ec;
  --text: #16211d;
  --muted: #5b6863;
  --line: #d7e2dd;
  --brand: #0f7b5d;
  --brand-strong: #0b5f48;
  --accent: #d72638;
  --gold: #d99a00;
  --shadow: 0 18px 45px rgba(16, 33, 29, 0.16);
  --topbar-height: 72px;
  --radius: 8px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #101816;
  --surface: #17221f;
  --surface-soft: #20302b;
  --surface-strong: #263a34;
  --text: #f4fbf8;
  --muted: #b7c6bf;
  --line: #31443e;
  --brand: #4cc49d;
  --brand-strong: #8ce0c1;
  --accent: #ff6b6b;
  --gold: #ffd166;
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

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

body {
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
}

button,
input,
a {
  font: inherit;
}

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

button {
  border: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--gold) 78%, white);
  outline-offset: 2px;
}

.app-shell {
  display: grid;
  grid-template-rows: var(--topbar-height) minmax(0, 1fr);
  height: 100svh;
  background:
    linear-gradient(90deg, rgba(0, 85, 164, 0.08), transparent 35%),
    linear-gradient(270deg, rgba(239, 51, 64, 0.08), transparent 35%),
    var(--bg);
}

.topbar {
  z-index: 700;
  display: grid;
  grid-template-columns: auto minmax(260px, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.ambassade-logo {
  width: 58px;
  height: 42px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  object-fit: contain;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background:
    linear-gradient(90deg, #2855a4 0 32%, #ffffff 32% 66%, #d72638 66%),
    #ffffff;
  color: #12372c;
  box-shadow: inset 0 0 0 1px rgba(18, 55, 44, 0.14);
  font-weight: 900;
}

.brand strong,
.brand span:last-child {
  display: block;
  overflow: hidden;
  max-width: 260px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand strong {
  color: var(--text);
  font-size: 1rem;
}

.brand span:last-child {
  color: var(--muted);
  font-size: 0.82rem;
}

.search-field {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  height: 46px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.search-field span {
  color: var(--muted);
  font-size: 1.2rem;
}

.search-field input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.search-field input::placeholder {
  color: color-mix(in srgb, var(--muted) 78%, transparent);
}

.top-actions,
.drawer-actions,
.share-actions,
.social-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-actions {
  justify-content: flex-end;
}

.icon-button,
.pill-button,
.status-chip,
.primary-button,
.secondary-button,
.tab-button,
.segment,
.category-button,
.result-item,
.program-item,
.route-card {
  border-radius: var(--radius);
}

.icon-button,
.pill-button {
  display: inline-grid;
  min-width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.icon-button {
  font-size: 1.25rem;
}

.pill-button {
  padding: 0 10px;
  font-weight: 800;
}

.icon-button.accent,
.primary-button {
  border-color: transparent;
  background: var(--brand);
  color: #ffffff;
}

[data-theme="dark"] .icon-button.accent,
[data-theme="dark"] .primary-button {
  color: #07120f;
}

.icon-button:hover,
.pill-button:hover,
.secondary-button:hover,
.category-button:hover,
.result-item:hover,
.program-item:hover,
.route-card:hover {
  transform: translateY(-1px);
}

.main-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 430px);
  min-height: 0;
}

.map-area {
  position: relative;
  min-width: 0;
  min-height: 0;
  background: #1f332d;
}

#map {
  width: 100%;
  height: 100%;
}

.leaflet-control-attribution {
  font-size: 0.65rem;
}

.leaflet-control-zoom a {
  color: #1b2b25;
}

.map-status {
  position: absolute;
  z-index: 500;
  right: 14px;
  bottom: 16px;
  left: 58px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  pointer-events: none;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  max-width: 100%;
  padding: 8px 11px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  background: rgba(13, 28, 24, 0.78);
  color: #ffffff;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
  pointer-events: auto;
}

button.status-chip {
  cursor: pointer;
}

.weather {
  margin-left: auto;
}

.reset-chip {
  font-weight: 850;
}

.guide-panel {
  min-height: 0;
  overflow: hidden;
  border-left: 1px solid var(--line);
  background: var(--surface);
  box-shadow: -12px 0 34px rgba(16, 33, 29, 0.09);
}

.panel-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  padding: 10px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
}

.tab-button,
.segment {
  min-width: 0;
  min-height: 40px;
  padding: 0 10px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 700;
  line-height: 1.05;
}

.tab-button {
  font-size: 0.84rem;
}

.tab-button.active,
.segment.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--line);
}

.panel-section {
  display: none;
  height: calc(100svh - var(--topbar-height) - 61px);
  overflow: auto;
  padding: 16px;
}

.panel-section.active {
  display: block;
}

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

.section-heading p,
.detail-kicker {
  margin: 0 0 4px;
  color: var(--brand-strong);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.section-heading h1,
.section-heading h2,
.detail-content h2,
.share-dialog h2 {
  margin: 0;
  letter-spacing: 0;
}

.section-heading h1 {
  font-size: 1.45rem;
  line-height: 1.12;
}

.section-heading h2,
.detail-content h2,
.share-dialog h2 {
  font-size: 1.28rem;
  line-height: 1.18;
}

.mini-stat {
  display: grid;
  min-width: 44px;
  height: 36px;
  place-items: center;
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--brand-strong);
  font-weight: 900;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.catalog-accordion {
  grid-template-columns: 1fr;
}

.catalog-group {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 8px 20px rgba(16, 33, 29, 0.05);
}

.catalog-group.is-muted .catalog-trigger {
  opacity: 0.62;
}

.catalog-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  align-items: stretch;
  background: var(--surface-soft);
}

.catalog-trigger {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 48px;
  padding: 8px 10px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.catalog-visibility {
  display: grid;
  place-items: center;
  border-left: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-size: 1rem;
}

.catalog-visibility.is-muted {
  opacity: 0.5;
  filter: grayscale(0.4);
}

.catalog-trigger:hover,
.catalog-visibility:hover,
.catalog-point:hover {
  transform: translateY(-1px);
}

.catalog-trigger .emoji {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 8px;
  background: var(--cat-color);
  color: #ffffff;
}

.catalog-trigger .label {
  overflow-wrap: anywhere;
  font-size: 0.9rem;
  font-weight: 850;
  line-height: 1.15;
}

.catalog-trigger .chevron {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
}

.catalog-content {
  display: grid;
  gap: 6px;
  padding: 8px;
}

.catalog-point {
  box-shadow: none;
}

.catalog-empty {
  padding: 10px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
}

.category-group {
  display: grid;
  grid-column: 1 / -1;
  gap: 7px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface-soft) 76%, var(--surface));
}

.category-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.category-group-head span {
  display: grid;
  min-width: 28px;
  height: 24px;
  place-items: center;
  border-radius: 8px;
  background: var(--surface);
  color: var(--brand-strong);
}

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

.category-button {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 48px;
  padding: 8px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.category-button-compact {
  min-height: 40px;
  padding: 7px;
  background: var(--surface);
}

.category-button-compact .emoji {
  width: 26px;
  height: 26px;
}

.category-button-compact .label {
  font-size: 0.76rem;
}

.category-button[aria-pressed="false"] {
  opacity: 0.54;
}

.category-button .emoji {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 8px;
  background: var(--cat-color);
  color: #ffffff;
}

.category-button .label {
  overflow-wrap: anywhere;
  font-size: 0.82rem;
  font-weight: 750;
  line-height: 1.14;
}

.category-button .count {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.result-list,
.program-list,
.route-list {
  display: grid;
  gap: 8px;
}

.result-item,
.program-item,
.route-card {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 8px 20px rgba(16, 33, 29, 0.06);
  cursor: pointer;
  text-align: left;
}

.result-item.is-locked,
.route-card.is-locked {
  border-color: color-mix(in srgb, #1d3557 24%, var(--line));
  background: color-mix(in srgb, var(--surface-soft) 54%, var(--surface));
}

.result-item.is-locked .item-icon,
.route-card.is-locked .route-icon {
  filter: grayscale(0.32);
  opacity: 0.72;
}

.result-item.is-locked .item-time,
.route-card.is-locked .route-meta {
  color: #1d3557;
}

[data-theme="dark"] .result-item.is-locked .item-time,
[data-theme="dark"] .route-card.is-locked .route-meta {
  color: #a8c8ff;
}

.item-row,
.program-top,
.route-top {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.item-icon,
.program-icon,
.route-icon {
  display: grid;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  background: var(--cat-color, var(--brand));
  color: #ffffff;
}

.item-body,
.program-body,
.route-body {
  min-width: 0;
}

.item-title,
.program-title,
.route-title {
  display: block;
  margin: 0 0 3px;
  overflow-wrap: anywhere;
  font-weight: 850;
  line-height: 1.2;
}

.item-meta,
.program-meta,
.route-meta {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.28;
}

.item-time {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  margin-top: 8px;
  color: var(--brand-strong);
  font-size: 0.82rem;
  font-weight: 800;
}

.segmented-control {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 12px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.program-group-title {
  margin: 16px 0 8px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 850;
  text-transform: uppercase;
}

.program-time {
  color: var(--brand-strong);
  font-weight: 900;
}

.program-description {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.35;
}

.now-panel {
  display: grid;
  gap: 8px;
  margin: 0 0 12px;
}

.now-block {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid color-mix(in srgb, var(--brand) 25%, var(--line));
  border-radius: 8px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 10%, var(--surface)), var(--surface));
}

.opening-highlight {
  border-color: color-mix(in srgb, var(--brand-strong) 30%, var(--line));
  background: linear-gradient(135deg, color-mix(in srgb, var(--brand-strong) 10%, var(--surface)), var(--surface));
}

.now-block.evening-highlight {
  gap: 8px;
  padding: 13px;
  border: 2px solid color-mix(in srgb, var(--gold) 68%, var(--line));
  background:
    linear-gradient(135deg, color-mix(in srgb, #1d3557 12%, var(--surface)), var(--surface) 50%),
    linear-gradient(90deg, color-mix(in srgb, #0f8b8d 12%, transparent), transparent);
  box-shadow: 0 14px 30px rgba(29, 53, 87, 0.14);
}

.now-block > strong,
.now-empty {
  color: var(--brand-strong);
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
}

.now-block.evening-highlight > strong {
  color: #1d3557;
  font-size: 0.9rem;
}

[data-theme="dark"] .now-block.evening-highlight > strong {
  color: #dce8ff;
}

.now-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 40px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.evening-highlight .now-item {
  border-color: color-mix(in srgb, #1d3557 20%, var(--line));
  background: color-mix(in srgb, var(--surface) 88%, #fff4cf);
}

[data-theme="dark"] .evening-highlight .now-item {
  background: color-mix(in srgb, var(--surface) 88%, #1d3557);
}

.now-icon {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 8px;
  background: var(--cat-color);
  color: #ffffff;
}

.now-item b,
.now-item small {
  display: block;
  overflow-wrap: anywhere;
}

.now-item small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.78rem;
}

.now-empty {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  text-transform: none;
}

.route-card.active {
  border-color: color-mix(in srgb, var(--route-color) 60%, var(--line));
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--route-color) 45%, transparent);
}

.route-stops {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.route-stop {
  max-width: 100%;
  padding: 5px 7px;
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.event-marker {
  background: transparent;
  border: 0;
}

.event-marker-pin {
  position: relative;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 2px solid #ffffff;
  border-radius: 50% 50% 50% 8px;
  background: var(--pin-color);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.33);
  color: #ffffff;
  font-size: 1.05rem;
  transform: rotate(-45deg);
}

.event-marker-pin.is-large {
  width: 52px;
  height: 52px;
  border-width: 3px;
  font-size: 1.4rem;
  box-shadow:
    0 0 0 6px rgba(255, 255, 255, 0.48),
    0 14px 30px rgba(0, 0, 0, 0.36);
}

.event-marker-pin.is-locked {
  filter: grayscale(0.28) saturate(0.76);
  opacity: 0.62;
}

.event-marker-pin span {
  transform: rotate(45deg);
}

.event-marker-pin.is-highlighted {
  width: 52px;
  height: 52px;
  border-width: 3px;
  font-size: 1.4rem;
  box-shadow:
    0 0 0 7px rgba(255, 255, 255, 0.7),
    0 0 0 13px color-mix(in srgb, var(--pin-color) 36%, transparent),
    0 16px 32px rgba(0, 0, 0, 0.42);
}

.event-marker-pin.is-evening-featured {
  box-shadow:
    0 0 0 5px rgba(255, 209, 102, 0.42),
    0 12px 28px rgba(0, 0, 0, 0.4);
}

.marker-cluster-small,
.marker-cluster-medium,
.marker-cluster-large {
  background: rgba(15, 123, 93, 0.24);
}

.marker-cluster-small div,
.marker-cluster-medium div,
.marker-cluster-large div {
  background: var(--brand);
  color: #ffffff;
  font-weight: 900;
}

.detail-drawer[hidden] {
  display: none;
}

.detail-drawer {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 430px);
  pointer-events: none;
}

.drawer-scrim {
  background: rgba(10, 18, 16, 0.38);
  pointer-events: auto;
}

.drawer-card {
  position: relative;
  display: grid;
  grid-template-rows: 230px minmax(0, 1fr);
  height: 100%;
  overflow: auto;
  background: var(--surface);
  box-shadow: var(--shadow);
  pointer-events: auto;
}

.drawer-close,
.dialog-close {
  position: absolute;
  z-index: 3;
  top: 12px;
  right: 12px;
}

.detail-media {
  position: relative;
  display: grid;
  min-height: 230px;
  place-items: center;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(40, 85, 164, 0.28), transparent 42%),
    linear-gradient(45deg, rgba(215, 38, 56, 0.28), transparent 42%),
    var(--surface-strong);
}

.detail-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-placeholder {
  display: grid;
  gap: 8px;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: 28px;
  color: var(--text);
  text-align: center;
}

.photo-placeholder span {
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  border-radius: 8px;
  background: var(--cat-color);
  color: #ffffff;
  font-size: 2rem;
}

.photo-placeholder strong {
  max-width: 260px;
  overflow-wrap: anywhere;
}

.gallery-controls {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: flex;
  gap: 6px;
}

.detail-content {
  padding: 18px;
}

.detail-content p {
  color: var(--muted);
  line-height: 1.5;
}

.detail-status {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  margin: 8px 0 10px;
  padding: 5px 9px;
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
}

.detail-status.open {
  background: color-mix(in srgb, #2f8f5b 16%, var(--surface));
  color: #207246;
}

.detail-status.soon {
  background: color-mix(in srgb, #d99a00 18%, var(--surface));
  color: #936600;
}

.detail-status.ended {
  background: color-mix(in srgb, #c1121f 12%, var(--surface));
  color: #9b111b;
}

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

.detail-grid div {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.detail-grid dt {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.detail-grid dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-weight: 750;
  line-height: 1.26;
}

.specialties {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.specialty-chip {
  padding: 6px 8px;
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 750;
}

.detail-extra {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.detail-extra-section {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.detail-extra-section h3 {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.detail-extra-section ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.detail-extra-section li {
  padding: 5px 7px;
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 750;
}

.detail-schedule {
  display: grid;
  gap: 8px;
}

.detail-schedule-item {
  display: grid;
  grid-template-columns: auto minmax(78px, auto) minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  padding: 9px;
  border: 1px solid color-mix(in srgb, var(--brand) 18%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--brand) 7%, var(--surface));
}

.detail-schedule-icon {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 8px;
  background: var(--brand);
  color: #ffffff;
}

.detail-schedule-time {
  color: var(--brand-strong);
  font-size: 0.82rem;
  font-weight: 900;
  white-space: nowrap;
}

.evening-mode .topbar {
  box-shadow: inset 0 -2px 0 color-mix(in srgb, var(--gold) 50%, transparent);
}

.evening-mode .guide-panel::before {
  display: block;
  padding: 7px 12px;
  background: linear-gradient(90deg, #1d3557, #0f8b8d);
  color: #ffffff;
  content: "Mode soirée";
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.evening-mode .panel-section {
  height: calc(100svh - var(--topbar-height) - 87px);
}

.primary-button,
.secondary-button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 12px;
  cursor: pointer;
  font-weight: 850;
}

.secondary-button {
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--text);
}

.secondary-button.is-saved {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
  color: var(--accent);
}

.drawer-actions {
  flex-wrap: wrap;
  margin-top: 10px;
}

.favorites-list {
  display: grid;
  gap: 8px;
}

.favorite-empty {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--muted);
  font-weight: 750;
}

.share-dialog {
  width: min(92vw, 360px);
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
}

.share-dialog::backdrop {
  background: rgba(10, 18, 16, 0.42);
}

.share-dialog h2 {
  margin: 4px 44px 12px 0;
}

.qr-image {
  display: block;
  width: 180px;
  height: 180px;
  margin: 0 auto 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.share-actions {
  flex-wrap: wrap;
  justify-content: center;
}

.toast {
  position: fixed;
  z-index: 1200;
  right: 16px;
  bottom: 16px;
  max-width: min(380px, calc(100vw - 32px));
  padding: 11px 13px;
  border-radius: 8px;
  background: rgba(13, 28, 24, 0.9);
  color: #ffffff;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  :root {
    --topbar-height: 118px;
  }

  body {
    overflow: auto;
  }

  .app-shell {
    min-height: 100svh;
    height: auto;
  }

  .topbar {
    position: sticky;
    top: 0;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    gap: 8px;
  }

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

  .brand strong,
  .brand span:last-child {
    max-width: 190px;
  }

  .ambassade-logo {
    width: 48px;
    height: 38px;
  }

  .top-actions {
    gap: 6px;
  }

  .icon-button,
  .pill-button {
    min-width: 40px;
    height: 40px;
  }

  .main-layout {
    display: block;
  }

  .map-area {
    height: calc(58svh - 24px);
    min-height: 390px;
  }

  .guide-panel {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .panel-section {
    height: auto;
    max-height: none;
    overflow: visible;
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
  }

  .detail-drawer {
    display: block;
  }

  .drawer-scrim {
    position: absolute;
    inset: 0;
  }

  .drawer-card {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    grid-template-rows: 200px minmax(0, 1fr);
    max-height: 86svh;
    border-radius: 8px 8px 0 0;
  }
}

@media (max-width: 560px) {
  .topbar {
    padding: 10px;
  }

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

  .ambassade-logo {
    width: 36px;
    height: 34px;
  }

  .brand strong,
  .brand span:last-child {
    max-width: 168px;
  }

  .brand strong {
    font-size: 0.9rem;
  }

  .brand span:last-child {
    font-size: 0.74rem;
  }

  .top-actions .icon-button {
    font-size: 1rem;
  }

  .icon-button,
  .pill-button {
    min-width: 36px;
    height: 36px;
  }

  .pill-button {
    padding: 0 8px;
  }

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

  .category-subfilters {
    grid-template-columns: 1fr;
  }

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

  .map-area {
    min-height: 360px;
  }

  .weather {
    margin-left: 0;
  }

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

  .drawer-actions .primary-button,
  .drawer-actions .secondary-button {
    flex: 1 1 132px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
