:root {
  color-scheme: dark;
  --ink: #f9fff8;
  --muted: #d8eadf;
  --line: rgba(226, 255, 236, 0.38);
  --paper: #183428;
  --panel: rgba(38, 76, 60, 0.78);
  --panel-2: rgba(47, 88, 69, 0.82);
  --panel-3: rgba(62, 106, 83, 0.84);
  --forest: #86ebb0;
  --moss: #d2ef82;
  --lake: #93deeb;
  --sky: #3e8588;
  --clay: #f3ad7d;
  --berry: #e781a7;
  --amber: #f6d173;
  --danger: #ff7884;
  --glass: rgba(31, 65, 51, 0.56);
  --glow: rgba(134, 235, 176, 0.33);
  --shadow: 0 24px 72px rgba(6, 18, 13, 0.3);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    linear-gradient(rgba(28, 65, 47, 0.4), rgba(19, 44, 34, 0.58)),
    url("https://images.unsplash.com/photo-1448375240586-882707db888b?auto=format&fit=crop&w=2200&q=80") center / cover fixed,
    linear-gradient(135deg, rgba(134, 235, 176, 0.2), transparent 30%, rgba(210, 239, 130, 0.12) 58%, rgba(147, 222, 235, 0.18)),
    linear-gradient(180deg, #2a513c 0%, #1d3f31 48%, #142d25 100%);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(8, 18, 14, 0.18), transparent 18%, transparent 82%, rgba(8, 18, 14, 0.22)),
    repeating-linear-gradient(
      90deg,
      rgba(210, 239, 130, 0.05) 0,
      rgba(210, 239, 130, 0.05) 1px,
      transparent 1px,
      transparent 82px
    );
  mix-blend-mode: screen;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(115deg, transparent 0 34%, rgba(255, 255, 255, 0.09) 44%, transparent 54% 100%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.036) 0 1px, transparent 1px 18px);
  animation: forest-sheen 18s linear infinite;
}

@keyframes forest-sheen {
  from {
    transform: translateX(-18%);
  }
  to {
    transform: translateX(18%);
  }
}

@keyframes panel-rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes marker-pop {
  0% {
    transform: scale(0.86);
  }
  65% {
    transform: scale(1.12);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes location-pulse {
  0% {
    opacity: 0.78;
    transform: scale(0.66);
  }
  100% {
    opacity: 0;
    transform: scale(1.9);
  }
}

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

button {
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(61, 104, 81, 0.92), rgba(31, 65, 51, 0.88)),
    linear-gradient(135deg, rgba(134, 235, 176, 0.11), rgba(147, 222, 235, 0.09));
  color: var(--ink);
  min-height: 42px;
  border-radius: 8px;
  padding: 0 14px;
  cursor: pointer;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

button:hover,
button.active {
  border-color: var(--forest);
  background: rgba(134, 235, 176, 0.18);
  box-shadow: 0 0 0 3px rgba(134, 235, 176, 0.11), 0 12px 28px rgba(6, 18, 13, 0.22);
  transform: translateY(-1px);
}

button.primary {
  border-color: var(--forest);
  background: linear-gradient(135deg, #92edb8, #9be1eb 58%, #f5d777);
  color: #0c2118;
  font-weight: 850;
  box-shadow: 0 12px 34px rgba(134, 235, 176, 0.2);
}

.language-toggle {
  min-height: 34px;
  padding: 0 12px;
  white-space: nowrap;
  font-weight: 850;
}

html[dir="rtl"] body {
  text-align: right;
}

html[dir="rtl"] input,
html[dir="rtl"] textarea,
html[dir="rtl"] select {
  direction: rtl;
}

html[dir="rtl"] .topbar,
html[dir="rtl"] .section-head,
html[dir="rtl"] .filter-heading,
html[dir="rtl"] .modal-head,
html[dir="rtl"] .detail-head,
html[dir="rtl"] .activity-focus {
  direction: rtl;
}

html[dir="rtl"] .map-action-row,
html[dir="rtl"] .modal-actions,
html[dir="rtl"] .chips {
  direction: rtl;
}

html[dir="rtl"] .date-box,
html[dir="rtl"] .gm-score,
html[dir="rtl"] .map-marker-count-overlay,
html[dir="rtl"] .map-location-status {
  direction: ltr;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  min-height: 34px;
  border-radius: 50%;
  padding: 0;
  font-size: 1.2rem;
  line-height: 1;
}

.edit-icon-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.info-icon-button {
  font-size: 1rem;
  font-weight: 900;
  font-family: Georgia, "Times New Roman", serif;
}

.visited-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  border-radius: 999px;
  padding: 0 12px 0 8px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 850;
}

.visited-toggle-icon {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: transparent;
  background: rgba(24, 53, 42, 0.56);
}

.visited-toggle.is-visited {
  border-color: rgba(210, 239, 130, 0.66);
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(210, 239, 130, 0.2), rgba(134, 235, 176, 0.18)),
    rgba(38, 76, 60, 0.82);
}

.visited-toggle.is-visited .visited-toggle-icon {
  border-color: rgba(210, 239, 130, 0.72);
  color: #0c2118;
  background: var(--moss);
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 54px;
  padding: 8px clamp(16px, 4vw, 44px);
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(29, 62, 47, 0.76), rgba(39, 82, 63, 0.64)),
    rgba(24, 53, 42, 0.76);
  backdrop-filter: blur(20px) saturate(1.25);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.22);
}

.topbar h1 {
  margin: 0;
  font-size: clamp(1rem, 1.8vw, 1.25rem);
  line-height: 1;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  background: linear-gradient(90deg, var(--forest), var(--lake), var(--amber));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.topbar nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

.topbar nav a {
  padding: 7px 9px;
  border-radius: 6px;
}

.topbar nav a:hover {
  background: rgba(147, 222, 235, 0.18);
  color: var(--ink);
}

main {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: clamp(18px, 4vw, 56px);
}

.day-card,
.activity-rect,
.map-shell,
.info-card,
.logistics-grid article {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px) saturate(1.18);
}

.attractions-section {
  margin-top: 34px;
}

.attraction-filters {
  display: grid;
  grid-template-columns: minmax(240px, 2fr) repeat(5, minmax(132px, 1fr)) minmax(96px, 0.7fr);
  gap: 12px;
  align-items: end;
  margin: 16px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(134, 235, 176, 0.12), rgba(147, 222, 235, 0.08)),
    rgba(31, 65, 51, 0.62);
  box-shadow: 0 18px 44px rgba(6, 18, 13, 0.22);
  backdrop-filter: blur(18px) saturate(1.2);
}

.attraction-filters .search {
  min-width: 0;
}

.attraction-filters .search:first-child {
  grid-column: auto;
}

.attraction-filters .search:not(:first-child) {
  grid-column: auto;
}

.attraction-filters button {
  grid-column: auto;
}

.attractions-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 12px;
}

.attraction-card {
  display: grid;
  align-content: space-between;
  gap: 14px;
  min-height: 260px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  background:
    linear-gradient(180deg, rgba(38, 74, 59, 0.82), rgba(24, 53, 42, 0.74)),
    linear-gradient(135deg, rgba(134, 235, 176, 0.09), transparent 58%, rgba(246, 209, 115, 0.09));
  box-shadow: 0 16px 38px rgba(6, 18, 13, 0.18);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
  cursor: pointer;
}

.attraction-card:hover {
  border-color: rgba(147, 222, 235, 0.46);
  background: rgba(49, 92, 70, 0.88);
  transform: translateY(-1px);
}

.attraction-card h3 {
  margin: 8px 0 10px;
  font-size: 1.12rem;
  line-height: 1.2;
}

.attraction-card h3 a:hover {
  text-decoration: underline;
}

.attraction-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: clamp(14px, 3vw, 34px);
  background: rgba(8, 20, 15, 0.68);
  backdrop-filter: blur(18px) saturate(1.15);
}

.modal-backdrop[hidden] {
  display: none;
}

.attraction-modal {
  width: min(1180px, 100%);
  max-height: min(900px, 92vh);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(36, 72, 56, 0.95), rgba(25, 57, 45, 0.94)),
    linear-gradient(135deg, rgba(134, 235, 176, 0.16), transparent 56%, rgba(147, 222, 235, 0.14));
  box-shadow: 0 32px 100px rgba(6, 18, 13, 0.42);
}

.modal-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(30, 66, 51, 0.88);
  backdrop-filter: blur(18px);
}

.modal-title-block {
  min-width: 0;
}

.modal-title-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 6px;
}

.modal-head h2 {
  min-width: 0;
  margin: 0;
  font-size: clamp(1.45rem, 3vw, 2.5rem);
  line-height: 1.05;
}

.modal-actions,
.modal-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: end;
}

.modal-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
  gap: 18px;
  padding: 20px;
}

.modal-main {
  min-width: 0;
}

.modal-main > p,
.modal-main .detail-section p {
  color: var(--muted);
  line-height: 1.5;
}

.detailed-review-panel {
  display: grid;
  gap: 12px;
  margin: 16px 0;
  border: 1px solid rgba(147, 222, 235, 0.28);
  border-radius: 16px;
  padding: 16px;
  max-width: 100%;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(147, 222, 235, 0.1), rgba(134, 235, 176, 0.1)),
    rgba(23, 53, 41, 0.94);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.detailed-review-panel * {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: normal;
}

.detailed-review-panel h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
}

.detailed-review-panel p {
  margin: 0;
  color: rgba(235, 247, 232, 0.88);
  line-height: 1.6;
}

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

.modal-detail-grid div {
  min-height: 68px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px;
  background: rgba(34, 73, 57, 0.5);
}

.modal-detail-grid strong {
  display: block;
  margin-top: 5px;
}

.nearby-drive-panel {
  margin-top: 16px;
  border: 1px solid rgba(147, 222, 235, 0.26);
  border-radius: 16px;
  padding: 14px;
  background:
    linear-gradient(135deg, rgba(147, 222, 235, 0.13), rgba(134, 235, 176, 0.13)),
    rgba(34, 73, 57, 0.48);
}

.nearby-drive-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.nearby-drive-head small {
  color: var(--muted);
  font-weight: 800;
}

.nearby-drive-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr);
  gap: 12px;
}

.nearby-drive-grid h3 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 0.92rem;
}

.nearby-drive-list {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nearby-drive-list a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  border: 1px solid rgba(147, 222, 235, 0.2);
  border-radius: 12px;
  padding: 8px 10px;
  background: rgba(242, 255, 238, 0.08);
  color: var(--ink);
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.nearby-drive-list a:hover {
  border-color: rgba(134, 235, 176, 0.55);
  background: rgba(242, 255, 238, 0.14);
  transform: translateY(-1px);
}

.nearby-drive-list span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nearby-drive-list strong {
  color: #ffe08a;
  font-size: 0.9rem;
}

.nearby-empty {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.modal-side {
  display: grid;
  align-content: start;
  gap: 12px;
}

.side-note {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background:
    linear-gradient(135deg, rgba(134, 235, 176, 0.11), rgba(147, 222, 235, 0.1)),
    rgba(34, 73, 57, 0.48);
}

.side-note p {
  margin: 7px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.parking-note {
  border-color: rgba(255, 215, 109, 0.28);
}

.card-benefits {
  display: grid;
  gap: 10px;
}

.card-benefit {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  padding: 12px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(19, 48, 36, 0.62);
  box-shadow: 0 14px 34px rgba(8, 25, 18, 0.16);
}

.card-benefit div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-benefit span {
  font-weight: 900;
  letter-spacing: 0;
}

.card-benefit a {
  color: #dfffea;
  font-size: 0.8rem;
  font-weight: 800;
  text-decoration: none;
}

.card-benefit p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.red-card-benefit {
  border-color: rgba(255, 114, 126, 0.34);
  background:
    linear-gradient(135deg, rgba(255, 114, 126, 0.18), rgba(255, 214, 133, 0.08)),
    rgba(42, 29, 26, 0.56);
}

.black-card-benefit {
  border-color: rgba(210, 230, 214, 0.22);
  background:
    linear-gradient(135deg, rgba(210, 230, 214, 0.12), rgba(120, 180, 138, 0.08)),
    rgba(10, 24, 18, 0.66);
}

.map-card-benefits {
  margin-top: 12px;
}

.mini-map {
  height: 300px;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: #173326;
}

.map-action-row {
  display: flex;
  align-items: center;
  line-height: 0;
  gap: 12px;
}

.map-action-link {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: visible;
  transition:
    transform 160ms ease,
    filter 160ms ease,
    opacity 160ms ease;
}

.map-action-link:hover {
  filter: drop-shadow(0 0 10px rgba(88, 220, 255, 0.34));
  transform: translateY(-1px);
}

.map-action-link svg {
  display: block;
  width: 32px;
  height: 32px;
  overflow: visible;
}

.waze-link svg {
  width: 35px;
  height: 35px;
}

.modal-nav-icons {
  flex: 0 0 auto;
  justify-content: flex-start;
  margin-top: 2px;
}

.detail-nav-icons {
  margin-top: 8px;
  justify-content: flex-start;
}

.detail-nav-icons .map-action-link {
  width: 30px;
  height: 30px;
}

.detail-nav-icons .map-action-link svg {
  width: 27px;
  height: 27px;
}

.waze-link svg .waze-body {
  fill: #f7ffff;
  stroke: #6fdfff;
  stroke-width: 2.1;
  stroke-linejoin: round;
}

.waze-link svg .waze-wheel {
  fill: #58dfff;
  stroke: #06110f;
  stroke-width: 0.9;
}

.waze-link svg .waze-eye {
  fill: #06110f;
}

.waze-link svg .waze-smile {
  fill: none;
  stroke: #06110f;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.google-maps-link svg {
  transform: translateY(1px);
}

.google-maps-link svg .gmap-green {
  fill: #34a853;
}

.google-maps-link svg .gmap-blue {
  fill: #4285f4;
}

.google-maps-link svg .gmap-yellow {
  fill: #fbbc04;
}

.google-maps-link svg .gmap-red {
  fill: #ea4335;
}

.google-maps-link svg circle {
  fill: #f8fbff;
}

.website-link svg .website-orb {
  fill: rgba(88, 220, 255, 0.16);
  stroke: #8fffd0;
  stroke-width: 2;
}

.website-link svg .website-line {
  fill: none;
  stroke: #f6fff9;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.attraction-edit-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.modal-field {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 750;
}

.modal-field span {
  color: var(--muted);
}

.modal-field input,
.modal-field select,
.modal-field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 11px;
  background: rgba(24, 53, 42, 0.66);
  color: var(--ink);
  outline: none;
}

.modal-field select {
  padding-right: 42px;
}

.modal-field textarea {
  resize: vertical;
}

.modal-field:has(textarea),
.modal-form-actions,
.attraction-edit-form .form-status {
  grid-column: 1 / -1;
}

.activity-focus {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 30px;
  animation: panel-rise 520ms ease both;
}

.activity-rect {
  position: relative;
  display: grid;
  align-content: space-between;
  min-height: 385px;
  overflow: hidden;
  padding: clamp(24px, 4vw, 42px);
  background:
    linear-gradient(135deg, rgba(27, 62, 45, 0.76), rgba(31, 70, 69, 0.54)),
    url("https://images.unsplash.com/photo-1448375240586-882707db888b?auto=format&fit=crop&w=1600&q=80") center / cover;
  isolation: isolate;
  transition:
    transform 220ms ease,
    border-color 220ms ease,
    box-shadow 220ms ease;
}

.activity-rect:hover {
  border-color: rgba(134, 235, 176, 0.52);
  box-shadow: 0 30px 90px rgba(6, 18, 13, 0.42), 0 0 56px rgba(134, 235, 176, 0.12);
  transform: translateY(-2px);
}

.activity-rect::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(199, 232, 117, 0.2), transparent 42%),
    linear-gradient(135deg, transparent, rgba(231, 129, 167, 0.06) 52%, rgba(246, 209, 115, 0.13)),
    linear-gradient(180deg, transparent 48%, rgba(10, 26, 19, 0.58));
}

.next-rect {
  background:
    linear-gradient(135deg, rgba(31, 70, 69, 0.76), rgba(26, 58, 45, 0.68)),
    url("https://images.unsplash.com/photo-1500530855697-b586d89ba3ee?auto=format&fit=crop&w=1600&q=80") center / cover;
}

.activity-copy,
.activity-list {
  position: relative;
  z-index: 1;
}

.activity-date {
  display: block;
  margin-top: 10px;
  color: var(--forest);
  font-size: clamp(1.35rem, 3vw, 2.25rem);
  line-height: 1.05;
  text-shadow: 0 0 28px rgba(134, 235, 176, 0.28);
}

.activity-rect h2 {
  max-width: 760px;
  margin: 18px 0 12px;
  font-size: clamp(1.85rem, 4vw, 3.8rem);
  line-height: 1;
}

.activity-rect p {
  max-width: 760px;
  margin: 0;
  color: rgba(248, 255, 250, 0.88);
  line-height: 1.48;
}

.activity-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.activity-list li {
  min-height: 32px;
  border: 1px solid rgba(222, 255, 233, 0.32);
  border-radius: 999px;
  padding: 6px 12px;
  background: rgba(24, 53, 42, 0.6);
  color: #e1f8e9;
  font-size: 0.88rem;
  font-weight: 750;
  backdrop-filter: blur(12px);
}

.label,
.eyebrow {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.logistics-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0 28px;
}

.logistics-grid article {
  padding: 18px;
}

.logistics-grid p {
  margin: 8px 0 0;
  line-height: 1.5;
}

.toolbar,
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin: 26px 0 14px;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(1.4rem, 2.8vw, 2.2rem);
}

.section-head.compact {
  align-items: start;
  margin-top: 0;
}

.segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.segmented.compact {
  gap: 6px;
}

.segmented.compact button {
  min-height: 36px;
  padding: 0 11px;
  font-size: 0.9rem;
}

.search {
  display: grid;
  gap: 6px;
  min-width: min(100%, 320px);
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.search input,
.filter-block select,
.search select,
.search textarea {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 12px;
  background: rgba(24, 53, 42, 0.66);
  color: var(--ink);
  outline: none;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

.filter-block select,
.search select,
.modal-field select {
  appearance: none;
  -webkit-appearance: none;
  min-height: 44px;
  padding-right: 42px;
  background:
    linear-gradient(45deg, transparent 50%, var(--forest) 50%) right 18px center / 7px 7px no-repeat,
    linear-gradient(135deg, var(--forest) 50%, transparent 50%) right 12px center / 7px 7px no-repeat,
    linear-gradient(180deg, rgba(45, 88, 68, 0.92), rgba(20, 48, 38, 0.9));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 10px 22px rgba(6, 18, 13, 0.16);
  cursor: pointer;
}

.filter-block select:hover,
.search select:hover,
.modal-field select:hover {
  border-color: rgba(73, 240, 174, 0.48);
  background:
    linear-gradient(45deg, transparent 50%, var(--lake) 50%) right 18px center / 7px 7px no-repeat,
    linear-gradient(135deg, var(--lake) 50%, transparent 50%) right 12px center / 7px 7px no-repeat,
    linear-gradient(180deg, rgba(56, 103, 79, 0.94), rgba(24, 57, 45, 0.92));
}

.filter-block select option,
.search select option,
.modal-field select option {
  background: #1d3b2f;
  color: var(--ink);
}

.search input:focus,
.filter-block select:focus,
.search select:focus,
.search textarea:focus {
  border-color: rgba(147, 222, 235, 0.72);
  background: rgba(21, 51, 40, 0.84);
  box-shadow: 0 0 0 4px rgba(147, 222, 235, 0.11);
}

.search textarea {
  resize: vertical;
}

.content-layout {
  display: block;
}

.days-list {
  display: grid;
  gap: 12px;
}

.day-card {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 18px;
  padding: 18px;
  box-shadow: none;
  animation: panel-rise 520ms ease both;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.day-card:hover,
.info-card:hover,
.logistics-grid article:hover {
  border-color: rgba(147, 222, 235, 0.42);
  background: rgba(42, 82, 63, 0.9);
  transform: translateY(-1px);
}

.date-box {
  display: grid;
  place-items: center;
  align-content: center;
  min-height: 110px;
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(134, 235, 176, 0.24), rgba(147, 222, 235, 0.14)),
    linear-gradient(135deg, rgba(246, 209, 115, 0.18), transparent 58%);
  color: var(--forest);
  text-align: center;
  box-shadow: inset 0 0 0 1px rgba(185, 255, 223, 0.14);
}

.date-box strong {
  font-size: 2.3rem;
  line-height: 1;
}

.day-card h3 {
  margin: 0 0 8px;
  font-size: 1.28rem;
}

.day-card p {
  margin: 8px 0;
  line-height: 1.48;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 4px 10px;
  border: 1px solid rgba(147, 222, 235, 0.2);
  background: rgba(147, 222, 235, 0.14);
  color: #d7f7fb;
  font-size: 0.82rem;
  font-weight: 700;
}

.chip.warning {
  background: rgba(246, 209, 115, 0.18);
  color: #ffe8ae;
}

.chip.danger {
  background: rgba(255, 102, 120, 0.16);
  color: var(--danger);
}

.chip.good {
  background: rgba(134, 235, 176, 0.16);
  color: var(--forest);
}

.chip.visited {
  border-color: rgba(200, 232, 117, 0.32);
  background: rgba(200, 232, 117, 0.18);
  color: #efffbd;
}

.red-card-chip {
  border-color: rgba(255, 114, 126, 0.34);
  background: rgba(255, 114, 126, 0.18);
  color: #ffd6d9;
}

.black-card-chip {
  border-color: rgba(222, 239, 226, 0.24);
  background: rgba(15, 27, 20, 0.72);
  color: #effff3;
}

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

.mini-list {
  display: grid;
  gap: 10px;
}

.mini-item {
  border-left: 4px solid var(--moss);
  padding: 8px 0 8px 12px;
}

.mini-item strong {
  display: block;
}

.mini-item p {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.42;
}

.map-section,
.split-section,
.logistics {
  margin-top: 34px;
}

.map-section {
  margin-top: 0;
}

.map-section .section-head {
  margin-top: 0;
}

.map-section .section-head h2 {
  font-size: clamp(1.25rem, 2.1vw, 1.75rem);
}

.map-shell {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  min-height: 760px;
  overflow: hidden;
  box-shadow: none;
  background:
    linear-gradient(135deg, rgba(34, 73, 57, 0.58), rgba(24, 53, 42, 0.82)),
    rgba(34, 73, 57, 0.58);
  box-shadow: 0 0 0 1px rgba(134, 235, 176, 0.14), var(--shadow);
  animation: panel-rise 620ms ease both;
}

.map-shell.details-open {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 370px);
}

#tripMap {
  width: 100%;
  height: 760px;
  min-height: 66vh;
  background: #173326;
}

.map-stage {
  position: relative;
  grid-column: 1;
  min-width: 0;
  border: 0;
}

.map-marker-count-overlay {
  position: absolute;
  z-index: 510;
  bottom: 14px;
  left: 14px;
  padding: 8px 13px;
  border: 1px solid rgba(222, 255, 233, 0.28);
  border-radius: 999px;
  background: rgba(35, 72, 56, 0.72);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.02em;
  box-shadow: 0 8px 22px rgba(6, 18, 13, 0.22);
  backdrop-filter: blur(18px) saturate(1.25);
  pointer-events: none;
  white-space: nowrap;
}

.modal-mini-map-wrap {
  position: relative;
}

.modal-mini-map-wrap .map-marker-count-overlay {
  bottom: 10px;
  left: 10px;
  font-size: 0.72rem;
  padding: 6px 11px;
}

.map-layer-control {
  position: absolute;
  z-index: 510;
  top: 14px;
  right: 14px;
  display: grid;
  justify-items: end;
  gap: 8px;
}

.map-location-control {
  position: absolute;
  z-index: 510;
  top: 14px;
  left: 14px;
  display: flex;
  align-items: center;
  gap: 9px;
}

.map-icon-control {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  min-height: 42px;
  padding: 0;
  border-color: rgba(222, 255, 233, 0.38);
  background: rgba(35, 72, 56, 0.66);
  backdrop-filter: blur(18px) saturate(1.25);
  box-shadow: 0 8px 22px rgba(6, 18, 13, 0.26);
}

.map-icon-control.is-active {
  border-color: rgba(134, 235, 176, 0.72);
  background:
    radial-gradient(circle at 50% 50%, rgba(134, 235, 176, 0.28), rgba(35, 72, 56, 0.72)),
    rgba(35, 72, 56, 0.72);
  box-shadow: 0 8px 22px rgba(6, 18, 13, 0.26), 0 0 0 6px rgba(134, 235, 176, 0.12);
}

.map-icon-control.is-warning {
  border-color: rgba(255, 215, 109, 0.7);
  box-shadow: 0 8px 22px rgba(6, 18, 13, 0.26), 0 0 0 6px rgba(255, 215, 109, 0.12);
}

.map-icon-control svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.9;
  stroke-linejoin: round;
}

.map-location-status {
  min-height: 34px;
  border: 1px solid rgba(222, 255, 233, 0.28);
  border-radius: 999px;
  padding: 9px 12px;
  background: rgba(35, 72, 56, 0.68);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 8px 22px rgba(6, 18, 13, 0.22);
  backdrop-filter: blur(18px) saturate(1.25);
}

.map-location-status[data-status="live"] {
  border-color: rgba(134, 235, 176, 0.44);
  color: #eafff0;
}

.map-location-status[data-status="loading"] {
  border-color: rgba(147, 222, 235, 0.48);
  color: #dcfbff;
}

.map-location-status[data-status="warning"],
.map-location-status[data-status="error"] {
  border-color: rgba(255, 215, 109, 0.5);
  color: #ffe3a0;
}

.map-layer-menu {
  display: grid;
  gap: 6px;
  min-width: 150px;
  border: 1px solid rgba(222, 255, 233, 0.3);
  border-radius: 14px;
  padding: 9px;
  background:
    linear-gradient(135deg, rgba(134, 235, 176, 0.15), rgba(147, 222, 235, 0.12)),
    rgba(35, 72, 56, 0.74);
  box-shadow: 0 18px 38px rgba(6, 18, 13, 0.24);
  backdrop-filter: blur(20px) saturate(1.25);
}

.map-layer-menu[hidden] {
  display: none;
}

.map-layer-menu label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 6px 8px;
  background: rgba(24, 53, 42, 0.42);
  color: var(--ink);
  font-size: 0.86rem;
}

.map-layer-menu input {
  accent-color: var(--forest);
}

.map-filters {
  position: relative;
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid rgba(222, 255, 233, 0.28);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(134, 235, 176, 0.14), rgba(147, 222, 235, 0.1) 44%, rgba(246, 209, 115, 0.08)),
    linear-gradient(180deg, rgba(35, 72, 56, 0.72), rgba(35, 72, 56, 0.5));
  box-shadow: 0 20px 58px rgba(6, 18, 13, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(22px) saturate(1.35);
  scrollbar-color: rgba(134, 235, 176, 0.52) rgba(24, 53, 42, 0.2);
}

.map-filters::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background:
    linear-gradient(90deg, rgba(134, 235, 176, 0.18), transparent 32%, rgba(147, 222, 235, 0.15) 66%, transparent),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 22%);
  opacity: 0.55;
}

.map-filter-top,
.map-filter-grid {
  position: relative;
  z-index: 1;
}

.map-filter-top {
  display: grid;
  grid-template-columns: minmax(150px, 220px) minmax(220px, 1fr) minmax(210px, 260px);
  gap: 12px;
  align-items: end;
}

.map-filter-top > * {
  min-width: 0;
}

.map-filter-grid {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(190px, 240px);
  gap: 10px;
  align-items: start;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  padding-bottom: 4px;
  scroll-snap-type: x proximity;
}

.filter-panel-head,
.detail-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.filter-panel-head strong {
  display: block;
  margin-top: 2px;
}

.map-search {
  min-width: 0;
}

.filter-block {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(222, 255, 233, 0.22);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(31, 65, 51, 0.5), rgba(26, 56, 44, 0.34)),
    rgba(26, 56, 44, 0.26);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  scroll-snap-align: start;
}

.filter-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-heading span:last-child {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  margin-left: auto;
}

.text-button {
  min-height: 28px;
  border: 0;
  background: transparent;
  color: var(--forest);
  padding: 0 4px;
  font-size: 0.82rem;
  font-weight: 800;
}

.text-button:hover {
  background: transparent;
  text-decoration: underline;
}

.filter-block label {
  display: flex;
  align-items: start;
  gap: 8px;
  color: var(--ink);
  font-size: 0.84rem;
  line-height: 1.3;
}

.filter-block input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: var(--forest);
}

.check-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  max-height: 138px;
  overflow: auto;
  padding-right: 3px;
  scrollbar-width: thin;
}

.toggle-grid,
.option-pills {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}

.option-pills label,
.check-grid label,
.toggle-grid label {
  align-items: center;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 6px 8px;
  background: rgba(26, 56, 44, 0.42);
  backdrop-filter: blur(10px);
  transition:
    border-color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

.option-pills label:hover,
.check-grid label:hover,
.toggle-grid label:hover {
  border-color: rgba(134, 235, 176, 0.54);
  background: rgba(134, 235, 176, 0.12);
  transform: translateY(-1px);
}

.filter-note {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.35;
}

.filter-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  min-width: 0;
}

.filter-actions button {
  min-width: 0;
  padding-inline: 10px;
}

.map-details {
  grid-column: 2;
  align-self: stretch;
  max-height: 720px;
  overflow: auto;
  padding: 18px;
  border-left: 1px solid rgba(222, 255, 233, 0.22);
  background:
    linear-gradient(180deg, rgba(45, 86, 67, 0.92), rgba(35, 72, 56, 0.92)),
    linear-gradient(135deg, rgba(147, 222, 235, 0.15), transparent 45%, rgba(246, 209, 115, 0.12));
  box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(18px) saturate(1.2);
  animation: panel-rise 260ms ease both;
}

.map-details[hidden] {
  display: none;
}

.map-details.is-empty {
  color: var(--muted);
}

.map-details h3 {
  margin: 0 0 8px;
}

.detail-title-link {
  min-height: 0;
  border: 0;
  border-radius: 6px;
  padding: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: inherit;
  text-align: left;
  cursor: pointer;
}

.detail-title-link:hover {
  background: transparent;
  box-shadow: none;
  transform: none;
  text-decoration: underline;
}

.detail-title-link:focus-visible {
  outline: 3px solid rgba(72, 216, 255, 0.25);
  outline-offset: 3px;
  border-radius: 6px;
}

.map-details p {
  line-height: 1.45;
}

.map-details .detail-section {
  padding-top: 14px;
  margin-top: 14px;
  border-top: 1px solid var(--line);
}

.comment-section {
  display: grid;
  gap: 6px;
}

.modal-comment-section {
  margin-top: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background:
    linear-gradient(135deg, rgba(147, 222, 235, 0.1), rgba(134, 235, 176, 0.1)),
    rgba(34, 73, 57, 0.5);
}

.inline-comment {
  min-height: 24px;
  border-radius: 8px;
  padding: 7px 8px;
  color: var(--muted);
  line-height: 1.4;
  cursor: text;
  unicode-bidi: plaintext;
}

.user-comment {
  unicode-bidi: plaintext;
}

.inline-comment.has-comment {
  color: var(--ink);
}

.inline-comment:empty::before {
  content: attr(data-placeholder);
  color: var(--muted);
}

.inline-comment:hover,
.inline-comment.is-editing {
  background: rgba(24, 53, 42, 0.5);
}

.inline-comment.is-editing {
  min-height: 84px;
  outline: none;
  border: 1px solid var(--line);
  border-color: rgba(147, 222, 235, 0.72);
  box-shadow: 0 0 0 4px rgba(147, 222, 235, 0.11);
}

.map-details .detail-actions {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.map-details .detail-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  background:
    linear-gradient(135deg, rgba(134, 235, 176, 0.18), rgba(147, 222, 235, 0.13)),
    rgba(26, 56, 44, 0.48);
  font-weight: 750;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.map-details .detail-actions a:hover {
  border-color: rgba(73, 240, 174, 0.55);
  transform: translateY(-1px);
}

.gm-score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 0 8px;
  margin-left: 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 209, 102, 0.28);
  background: rgba(246, 209, 115, 0.18);
  color: #ffd979;
  font-size: 0.92rem;
  font-weight: 900;
  line-height: 1;
}

.map-stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 14px 0;
}

.map-stat-grid div {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(26, 56, 44, 0.44);
}

.map-stat-grid strong {
  display: block;
}

.leaflet-popup-content {
  margin: 12px;
  color: #10241d;
}

.leaflet-popup-content h3 {
  margin: 0 0 6px;
  font-size: 1rem;
}

.leaflet-popup-content p {
  margin: 4px 0;
}

.trip-marker {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 3px solid rgba(238, 247, 242, 0.95);
  border-radius: 50%;
  background: var(--forest);
  color: #0c2118;
  font-size: 0.78rem;
  font-weight: 850;
  box-shadow: 0 8px 22px rgba(6, 18, 13, 0.36), 0 0 18px rgba(134, 235, 176, 0.24);
  animation: marker-pop 300ms ease both;
}

.trip-marker.base {
  width: 38px;
  height: 38px;
  background: var(--clay);
}

.trip-marker.optional {
  background: var(--lake);
}

.trip-marker.skip-overrated {
  background: var(--muted);
}

.trip-marker.rain {
  background: #35767c;
}

.trip-marker.picnic-grill {
  background: #ffb85c;
  color: #1f2d1f;
  box-shadow: 0 8px 22px rgba(6, 18, 13, 0.36), 0 0 0 6px rgba(255, 184, 92, 0.18);
}

.trip-marker.book {
  outline: 3px solid var(--amber);
}

.trip-marker.visited {
  outline: 3px solid rgba(200, 232, 117, 0.86);
  box-shadow: 0 8px 22px rgba(6, 18, 13, 0.36), 0 0 0 7px rgba(200, 232, 117, 0.16);
}

.trip-marker.active {
  background: var(--amber);
  color: var(--ink);
  border-color: #173326;
  box-shadow: 0 10px 28px rgba(6, 18, 13, 0.4), 0 0 0 7px rgba(246, 209, 115, 0.2);
}

.current-location-marker {
  position: relative;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
}

.current-location-marker::before,
.current-location-marker::after {
  content: "";
  position: absolute;
  border-radius: 50%;
}

.current-location-marker::before {
  width: 30px;
  height: 30px;
  background: rgba(47, 137, 255, 0.18);
  border: 1px solid rgba(191, 223, 255, 0.86);
  animation: location-pulse 1600ms ease-out infinite;
}

.current-location-marker::after {
  width: 18px;
  height: 18px;
  background: #2f89ff;
  border: 4px solid #ffffff;
  box-shadow: 0 8px 22px rgba(18, 75, 155, 0.45), 0 0 0 6px rgba(47, 137, 255, 0.18);
}

.current-location-marker span {
  position: relative;
  z-index: 1;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ffffff;
}

.current-location-accuracy {
  fill: rgba(47, 137, 255, 0.14);
  stroke: rgba(47, 137, 255, 0.48);
  stroke-width: 1.5;
}

.leaflet-interactive.route-overview {
  stroke-dasharray: 10 12;
}

.leaflet-control-zoom a {
  background: rgba(35, 72, 56, 0.72) !important;
  color: var(--ink) !important;
  border-color: rgba(185, 255, 223, 0.2) !important;
  backdrop-filter: blur(14px);
}

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
  background: rgba(242, 251, 247, 0.94);
  color: #10241d;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.32);
}

.split-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.card-grid {
  display: grid;
  gap: 12px;
}

.info-card {
  padding: 16px;
  box-shadow: none;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.info-card h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.info-card p {
  margin: 8px 0;
  color: var(--muted);
  line-height: 1.45;
}

.info-card .score {
  color: var(--forest);
  font-weight: 800;
}

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

.media-page {
  width: min(1320px, 100%);
}

.media-hero {
  position: relative;
  min-height: 320px;
  display: grid;
  align-items: end;
  overflow: hidden;
  padding: clamp(26px, 5vw, 54px);
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(90deg, rgba(21, 47, 37, 0.7), rgba(33, 68, 51, 0.36)),
    linear-gradient(135deg, rgba(134, 235, 176, 0.2), rgba(147, 222, 235, 0.14) 54%, rgba(231, 129, 167, 0.1)),
    url("https://images.unsplash.com/photo-1493246507139-91e8fad9978e?auto=format&fit=crop&w=1800&q=80") center / cover;
  box-shadow: var(--shadow);
  animation: panel-rise 520ms ease both;
}

.media-hero h2 {
  max-width: 880px;
  margin: 10px 0 12px;
  font-size: clamp(2.2rem, 6vw, 5rem);
  line-height: 0.98;
}

.media-hero p {
  max-width: 720px;
  margin: 0;
  color: rgba(249, 255, 248, 0.84);
  line-height: 1.55;
}

.media-layout {
  display: grid;
  grid-template-columns: minmax(320px, 460px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  margin-top: 22px;
}

.media-uploader,
.media-library {
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(38, 74, 59, 0.84), rgba(24, 53, 42, 0.74)),
    linear-gradient(135deg, rgba(134, 235, 176, 0.12), transparent 52%, rgba(147, 222, 235, 0.12));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px) saturate(1.15);
  animation: panel-rise 580ms ease both;
}

.media-uploader {
  position: sticky;
  top: 78px;
  display: grid;
  gap: 16px;
  padding: 18px;
}

.media-library {
  padding: 18px;
}

.file-drop {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 170px;
  border: 1px dashed rgba(222, 255, 233, 0.42);
  border-radius: 16px;
  padding: 22px;
  background:
    linear-gradient(135deg, rgba(134, 235, 176, 0.14), rgba(147, 222, 235, 0.1)),
    rgba(26, 56, 44, 0.44);
  text-align: center;
  cursor: pointer;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.file-drop:hover {
  border-color: rgba(134, 235, 176, 0.72);
  background: rgba(134, 235, 176, 0.12);
  transform: translateY(-1px);
}

.file-drop input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.file-drop-title {
  color: var(--forest);
  font-size: 1.25rem;
  font-weight: 850;
}

.media-preview {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(24, 53, 42, 0.54);
}

.media-preview img,
.media-preview video {
  display: block;
  width: 100%;
  max-height: 300px;
  object-fit: cover;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.form-status {
  min-height: 22px;
  margin: 0;
  color: var(--forest);
  font-weight: 800;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}

.card-page {
  max-width: 1480px;
  margin: 0 auto;
  padding: 18px;
}

.card-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 22px;
  min-height: 230px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px;
  overflow: hidden;
  background:
    linear-gradient(125deg, rgba(16, 35, 27, 0.72), rgba(48, 94, 70, 0.72)),
    radial-gradient(circle at 85% 18%, rgba(246, 209, 115, 0.2), transparent 30%),
    radial-gradient(circle at 10% 10%, rgba(134, 235, 176, 0.2), transparent 28%);
  box-shadow: var(--shadow);
  animation: panel-rise 360ms ease both;
}

.card-hero h2 {
  margin: 8px 0 8px;
  font-size: clamp(2.4rem, 6vw, 5rem);
  line-height: 0.92;
  letter-spacing: 0;
}

.card-hero p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
}

.card-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(110px, 1fr));
  gap: 10px;
}

.card-stats div {
  border: 1px solid rgba(226, 255, 236, 0.32);
  border-radius: 14px;
  padding: 14px;
  background: rgba(19, 44, 34, 0.56);
  backdrop-filter: blur(12px);
}

.card-stats strong {
  display: block;
  font-size: 1.85rem;
  line-height: 1;
}

.card-stats span {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.card-workbench {
  display: grid;
  grid-template-columns: minmax(330px, 420px) minmax(0, 1fr);
  gap: 16px;
  margin-top: 16px;
  min-height: calc(100vh - 340px);
}

.card-sidebar,
.card-details {
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    linear-gradient(145deg, rgba(48, 94, 70, 0.86), rgba(27, 60, 47, 0.86)),
    rgba(24, 53, 42, 0.72);
  box-shadow: 0 18px 46px rgba(6, 18, 13, 0.22);
}

.card-sidebar {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 12px;
  max-height: calc(100vh - 116px);
  padding: 14px;
  position: sticky;
  top: 86px;
}

.card-filter-stack {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.card-filter-stack .search:first-child,
.card-filter-stack button {
  grid-column: 1 / -1;
}

.card-benefit-list {
  display: grid;
  gap: 10px;
  min-height: 0;
  overflow: auto;
  padding-right: 3px;
}

.card-benefit-row {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(226, 255, 236, 0.24);
  border-radius: 14px;
  padding: 13px;
  background: rgba(24, 53, 42, 0.52);
  cursor: pointer;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.card-benefit-row:hover,
.card-benefit-row.selected {
  border-color: rgba(134, 235, 176, 0.62);
  background:
    linear-gradient(135deg, rgba(134, 235, 176, 0.13), rgba(147, 222, 235, 0.11)),
    rgba(24, 53, 42, 0.74);
  transform: translateY(-1px);
}

.card-benefit-row h3 {
  margin: 4px 0 6px;
  font-size: 1rem;
  line-height: 1.2;
}

.card-benefit-row p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

.card-row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.card-map-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 14px;
  min-height: 720px;
}

.card-map-with-counter {
  position: relative;
  min-width: 0;
  min-height: 720px;
}

.card-map {
  width: 100%;
  min-height: 720px;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.card-details {
  align-self: start;
  display: grid;
  gap: 14px;
  max-height: calc(100vh - 116px);
  overflow: auto;
  padding: 16px;
  position: sticky;
  top: 86px;
}

.empty-card-detail h3,
.card-detail-head h3 {
  margin: 6px 0 0;
  font-size: 1.35rem;
  line-height: 1.1;
}

.empty-card-detail p,
.card-detail-section p {
  margin: 7px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.card-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.card-detail-actions a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  border: 1px solid rgba(226, 255, 236, 0.3);
  border-radius: 999px;
  padding: 0 12px;
  background: rgba(134, 235, 176, 0.12);
  color: var(--ink);
  font-weight: 850;
  font-size: 0.86rem;
}

.card-detail-section {
  border-top: 1px solid rgba(226, 255, 236, 0.2);
  padding-top: 13px;
}

.card-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.card-detail-grid div {
  border: 1px solid rgba(226, 255, 236, 0.2);
  border-radius: 12px;
  padding: 10px;
  background: rgba(19, 44, 34, 0.42);
}

.card-detail-grid strong {
  display: block;
  margin-top: 5px;
  overflow-wrap: anywhere;
}

.card-map-marker span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 2px solid rgba(255, 255, 255, 0.94);
  border-radius: 50%;
  background: var(--marker-color);
  color: #10251b;
  font-weight: 950;
  box-shadow: 0 8px 18px rgba(6, 18, 13, 0.28);
}

.media-card,
.media-empty {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(26, 56, 44, 0.5);
  box-shadow: 0 16px 40px rgba(6, 18, 13, 0.22);
}

.media-empty {
  padding: 18px;
}

.media-thumb {
  aspect-ratio: 4 / 3;
  background: #173326;
}

.media-thumb img,
.media-thumb video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-card-body {
  display: grid;
  gap: 8px;
  padding: 14px;
}

.media-card h3,
.media-empty h3 {
  margin: 0;
  font-size: 1.05rem;
}

.media-card p,
.media-empty p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.media-card a {
  color: var(--forest);
  font-weight: 850;
}

@media (max-width: 980px) {
  .activity-focus,
  .content-layout,
  .map-shell,
  .split-section,
  .modal-body,
  .media-layout,
  .attraction-filters,
  .logistics-grid {
    grid-template-columns: 1fr;
  }

  .attraction-filters .search,
  .attraction-filters .search:first-child,
  .attraction-filters .search:not(:first-child),
  .attraction-filters button {
    grid-column: auto;
  }

  .media-uploader {
    position: static;
  }

  .attraction-edit-form,
  .modal-detail-grid,
  .nearby-drive-grid {
    grid-template-columns: 1fr;
  }

  .activity-rect {
    min-height: 320px;
  }

  .map-filters,
  .map-details {
    max-height: none;
  }

  .map-shell.details-open {
    grid-template-columns: 1fr;
  }

  .map-filter-top,
  .map-filter-grid {
    grid-template-columns: 1fr;
  }

  .map-filter-grid {
    grid-auto-flow: row;
    grid-auto-columns: auto;
    overflow-x: visible;
  }

  .map-filters {
    padding: 12px;
  }

  .map-stage {
    border-left: 0;
    border-right: 0;
  }

  .map-location-status {
    max-width: 170px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .map-details {
    grid-column: 1;
    border-left: 0;
    border-top: 1px solid rgba(185, 255, 223, 0.16);
  }

  #tripMap {
    height: 620px;
  }
}

@media (max-width: 640px) {
  .topbar {
    position: static;
    align-items: start;
    flex-direction: column;
  }

  main {
    padding: 14px;
  }

  .toolbar,
  .section-head {
    align-items: stretch;
    flex-direction: column;
  }

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

  .modal-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .modal-title-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .modal-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .check-grid,
  .filter-actions {
    grid-template-columns: 1fr;
  }

  .day-card {
    grid-template-columns: 1fr;
  }

  .date-box {
    min-height: 86px;
    grid-template-columns: auto auto;
    justify-content: center;
    gap: 8px;
  }
}

.nav-button {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  padding: 0;
}

.auth-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 10%, rgba(85, 185, 140, 0.14), transparent 35%),
    var(--bg);
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-card,
.admin-panel {
  width: min(100%, 480px);
  border: 1px solid rgba(185, 255, 223, 0.16);
  border-radius: 18px;
  background: var(--panel);
  padding: 28px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
}

.auth-card h1 {
  margin: 8px 0;
}

.auth-form {
  display: grid;
  gap: 16px;
  margin: 24px 0;
}

.auth-form label {
  display: grid;
  gap: 7px;
}

.auth-form input,
.auth-form select,
.user-actions select {
  width: 100%;
  border: 1px solid rgba(185, 255, 223, 0.2);
  border-radius: 10px;
  background: rgba(7, 25, 19, 0.72);
  color: var(--text);
  padding: 11px 12px;
}

.admin-page {
  max-width: 1240px;
  margin: 0 auto;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(280px, 380px) 1fr;
  align-items: start;
  gap: 22px;
}

.admin-panel {
  width: 100%;
}

.users-list {
  display: grid;
  gap: 12px;
}

.user-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
  border-top: 1px solid rgba(185, 255, 223, 0.12);
  padding: 16px 0 4px;
}

.user-row p {
  margin: 5px 0 0;
}

.user-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.user-actions select {
  width: auto;
}

.user-actions .danger {
  border-color: rgba(255, 112, 112, 0.4);
  color: #ffb0b0;
}

.status-chip {
  display: inline-flex;
  margin-left: 8px;
  border-radius: 999px;
  background: rgba(100, 220, 160, 0.14);
  color: #9af0c5;
  padding: 3px 8px;
  font-size: 0.75rem;
}

.status-chip.disabled {
  background: rgba(255, 112, 112, 0.12);
  color: #ffb0b0;
}

@media (max-width: 820px) {
  .admin-grid,
  .user-row {
    grid-template-columns: 1fr;
  }

  .user-actions {
    justify-content: flex-start;
  }
}
