:root {
  --navy: #003366;
  --navy-dark: #002244;
  --ink: #1a2330;
  --muted: #5b6775;
  --line: #d7dee6;
  --bg: #f4f7fa;
  --card: #ffffff;
  --ok: #1f7a3a;
  --warn: #9a5b00;
  --bad: #a32020;
  --radius: 12px;
  --shadow: 0 8px 24px rgba(0, 33, 66, 0.08);
  --max: 1120px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.5;
}
img { max-width: 100%; height: auto; }
a { color: var(--navy); text-decoration: none; }
a:hover { text-decoration: underline; }
main { flex: 1; }

.wrap { width: min(var(--max), calc(100% - 2rem)); margin: 0 auto; }

.site-header {
  position: relative;
  z-index: 30;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}
.nav {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
}
.brand { display: flex; align-items: center; gap: 0.6rem; font-weight: 700; color: var(--navy); }
.brand img { height: 36px; width: auto; }
.brand:hover { text-decoration: none; }
.nav-links { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; align-items: center; }
.nav-links a { color: var(--ink); font-weight: 500; }
.nav-links a.is-active { color: var(--navy); }
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--navy);
  font: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
}
.nav-toggle:hover { background: #e8eef5; }
.nav-toggle:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 2px;
}

.btn, button.btn, a.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 0;
  border-radius: 8px;
  padding: 0.65rem 1rem;
  background: var(--navy);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { background: var(--navy-dark); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--navy); border: 1px solid var(--navy); }
.btn-ghost:hover { background: #e8eef5; }
.btn-danger { background: var(--bad); }
.btn-danger:hover { background: #7d1818; }
.btn-wide { width: 100%; }
.btn:disabled, button.btn:disabled {
  opacity: 0.65;
  cursor: wait;
}
.btn-row { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 0.8rem 0 0; }
.hint { margin: 0.3rem 0 0; font-size: 0.8rem; color: var(--muted); }
.optional { font-weight: 400; color: var(--muted); }
.confirm-panel {
  background: #e8f6ec;
  border: 1px solid #b7dfc3;
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  margin-top: 1.2rem;
}
.confirm-panel .flash { margin-top: 0; }

.hero {
  position: relative;
  min-height: 380px;
  display: grid;
  place-items: end stretch;
  color: #fff;
  background: var(--navy) center/cover no-repeat;
}
.hero-home {
  background-image: linear-gradient(rgba(0, 20, 40, 0.45), rgba(0, 20, 40, 0.45)), url("/img/main.png");
}
.hero-inner { padding: 3rem 0 2.2rem; }
.hero h1 { margin: 0 0 0.4rem; font-size: clamp(1.8rem, 4vw, 2.6rem); }
.hero p { margin: 0 0 1.2rem; max-width: 40rem; }

.search {
  background: var(--card);
  color: var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
  align-items: start;
}
.search-main { display: grid; gap: 0.7rem; min-width: 0; }
.search-kinds {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}
.search-kinds legend {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
  padding: 0;
}
.search-kinds-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.search-kinds-list label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 0.85rem;
  cursor: pointer;
}
.search-kinds-list label:has(input:checked) {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}
.search input, .search select, input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.7rem 0.8rem;
  font: inherit;
  background: #fff;
}
label { display: block; font-size: 0.85rem; color: var(--muted); margin-bottom: 0.3rem; }
.field { margin-bottom: 0.9rem; }

.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

input[type="checkbox"], input[type="radio"] { width: auto; }
fieldset.field {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.8rem 1rem;
}
fieldset.field legend { font-size: 0.85rem; color: var(--muted); padding: 0 0.3rem; }
fieldset.field label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0.25rem 1rem 0.25rem 0;
  color: var(--ink);
}
.booking-where { display: grid; gap: 0.55rem; }
.booking-where > .muted { margin: 0; }
.choice-card {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin: 0 !important;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  color: var(--ink);
}
.choice-card input { margin-top: 0.25rem; flex: none; }
.choice-card span { display: grid; gap: 0.15rem; }
.choice-card strong { color: var(--ink); font-size: 0.95rem; }
.choice-card .hint { margin: 0; }
.choice-card:has(input:checked) {
  border-color: var(--navy);
  background: #e8eef5;
}
#external-booking-fields { margin-top: 0.2rem; }

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.6rem;
  margin: 1rem 0;
}
.fact {
  background: var(--bg);
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
}
.fact dt { font-size: 0.75rem; color: var(--muted); margin: 0 0 0.15rem; }
.fact dd { margin: 0; font-weight: 600; }
.fact-when { grid-column: 1 / -1; }
.fact-when dd { font-weight: 600; line-height: 1.45; }
.when-time { font-weight: 600; white-space: nowrap; }

.book-panel {
  margin-top: 1.4rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
}
.book-panel h2 { margin: 0 0 0.4rem; font-size: 1.1rem; }
.book-host {
  margin: 0.6rem 0 0.9rem;
  padding: 0.7rem 0.85rem;
  background: #e8eef5;
  border-left: 3px solid var(--navy);
  border-radius: 8px;
}
.book-host strong { color: var(--navy); }
.horse-notice {
  background: #fdecec;
  border: 1px solid #f0c4c4;
  border-left: 4px solid var(--bad);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  margin: 1rem 0;
}
.horse-notice p { margin: 0 0 0.35rem; }
.horse-notice p:last-child { margin: 0; }
.horse-notice strong { color: var(--bad); }
.horse-notice.is-choice {
  background: #e8eef5;
  border-color: #c5d4e6;
  border-left-color: var(--navy);
}
.horse-notice.is-choice strong { color: var(--navy); }
.book-panel .horse-notice { margin: 0.9rem 0 0.75rem; }
.book-persons { display: grid; gap: 0.55rem; }
.book-person {
  display: grid;
  gap: 0.4rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--line);
}
.book-person:last-child { border-bottom: 0; }
.horse-pick {
  display: grid;
  gap: 0.45rem;
  margin: 0.15rem 0 0;
  padding: 0;
  border: 0;
  min-width: 0;
}
.horse-pick legend {
  font-size: 0.8rem;
  color: var(--muted);
  padding: 0;
  margin: 0 0 0.15rem;
}
.book-panel .horse-pick .choice-card {
  align-items: flex-start;
}
.choice-card.is-disabled,
.choice-card:has(input:disabled) {
  opacity: 0.55;
  cursor: not-allowed;
}
.js-horse-split { margin-top: 0.4rem; }
.js-horse-split .field { margin-bottom: 0; }
.js-horse-split .field label {
  display: block;
  margin: 0 0 0.25rem;
}
.fact-horse-own { background: #fdecec; }
.fact-horse-own dt,
.fact-horse-own dd { color: var(--bad); }
.book-panel .field label { display: flex; align-items: center; gap: 0.4rem; }
.book-panel-ext {
  padding: 1rem 1rem 1.1rem;
  border: 2px solid var(--navy);
  border-radius: 10px;
  background: #e8eef5;
}
.book-panel-ext .ext-url {
  font-weight: 600;
  word-break: break-all;
}

.detail-block { margin: 1.1rem 0; }
.detail-block h2 { font-size: 1.05rem; margin: 0 0 0.4rem; }

.avatar-row { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.avatar-row .field { margin: 0; }
.avatar-row img {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: 50%;
  background: #d7dee6;
  flex: 0 0 auto;
  box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--line);
}

.side a.is-active { color: var(--navy); font-weight: 700; }

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.page-head h1 { margin: 0; }

.dash-hello-row {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 1.1rem;
}
.dash-avatar {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 50%;
  background: #d7dee6;
  flex: 0 0 auto;
  box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--line);
}
.dash-hello { margin: 0 0 0.15rem; font-size: clamp(1.4rem, 3vw, 1.85rem); }
.dash-hello-row .muted { margin: 0; }
.dash-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  margin-bottom: 1.1rem;
}
.dash-stat { text-align: center; }
.dash-stat strong { display: block; font-size: 1.55rem; color: var(--navy); line-height: 1.15; }
.dash-stat span { color: var(--muted); font-size: 0.85rem; }
.dash-empty {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}
.dash-empty p { margin: 0; }
.dash-next { margin-top: 0.2rem; }
.dash-next h2, .section-title { margin: 1.4rem 0 0.7rem; font-size: 1.05rem; }
.dash-next h2:first-child { margin-top: 0.2rem; }

.next-ride {
  display: grid;
  grid-template-columns: 5.2rem 1fr auto;
  gap: 1rem;
  align-items: center;
}
.next-ride h2 { margin: 0 0 0.15rem; font-size: 1.25rem; }
.next-ride .muted { margin: 0; }
.next-meta { margin: 0.35rem 0 0; font-size: 0.92rem; }
.next-actions {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-width: 8.5rem;
}
.next-left {
  font-weight: 700;
  color: var(--navy);
  margin-top: 0.35rem;
}

.booking-cal {
  min-width: 4.6rem;
  background: var(--navy);
  color: #fff;
  text-align: center;
  border-radius: 10px;
  padding: 0.55rem 0.35rem;
}
.booking-cal .day { display: block; font-size: 1.45rem; font-weight: 800; line-height: 1; }
.booking-cal .mon { display: block; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; margin-top: 0.2rem; }

.booking-list { display: grid; gap: 0.65rem; }
.booking-row {
  display: grid;
  grid-template-columns: 4.8rem minmax(0, 1fr) auto;
  gap: 0.85rem;
  align-items: center;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0.75rem 0.85rem;
}
.booking-row.is-cancelled { opacity: 0.72; }
.booking-row.is-farm-cancel {
  opacity: 1;
  border-left: 4px solid var(--bad);
}
.cancel-note {
  margin: 0.45rem 0 0;
  font-size: 0.9rem;
}
.cancel-note strong { color: var(--bad); }
.booking-main h3 { margin: 0; font-size: 1rem; }
.booking-main .muted { margin: 0.12rem 0 0; font-size: 0.85rem; }
.booking-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.85rem;
  margin-top: 0.4rem;
  font-size: 0.85rem;
}
.booking-facts span { color: var(--ink); }
.booking-facts .muted { color: var(--muted); }
.booking-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.4rem;
  min-width: 7.5rem;
}
.booking-side .btn { min-width: 7.2rem; }
.booking-price { font-weight: 700; white-space: nowrap; }
.booking-search { max-width: 28rem; }

.confirm-step {
  grid-column: 1 / -1;
  background: #fdecec;
  border: 1px solid #f0c4c4;
  border-radius: 8px;
  padding: 0.85rem 1rem;
}
.confirm-step p { margin: 0 0 0.45rem; }
.confirm-step p:last-child { margin-bottom: 0; }
.confirm-step .field { margin: 0.65rem 0 0.75rem; }
.confirm-step-row td {
  padding: 0.35rem 0 0.85rem;
  border-bottom: 1px solid var(--line);
  background: transparent;
}

.pill {
  display: inline-block;
  border-radius: 999px;
  padding: 0.12rem 0.5rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}
.pill-ok { background: #e8f6ec; color: var(--ok); }
.pill-wait { background: #fff4d6; color: var(--warn); }
.pill-bad { background: #fdecec; color: var(--bad); }

@media (max-width: 800px) {
  .dash-stats { grid-template-columns: 1fr; }
  .next-ride,
  .booking-row { grid-template-columns: 4.6rem 1fr; }
  .next-actions,
  .booking-side {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
  .confirm-step .btn-row {
    flex-direction: column;
    align-items: stretch;
  }
}

.child-card { margin-bottom: 0.9rem; }
.child-card .child-head {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  align-items: center;
  flex-wrap: wrap;
}

.status-select { min-width: 9rem; }
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.1rem;
}
a.card { color: inherit; display: block; }
a.card:hover { text-decoration: none; box-shadow: 0 10px 28px rgba(0, 33, 66, 0.12); }
.muted { color: var(--muted); }
.home-roles {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0 0 1.1rem;
  color: var(--ink);
}
.home-roles p { margin: 0; }
.home-roles strong { color: var(--navy); }
.home-roles .home-hl { color: #0a6b8a; }
.home-refine {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem 1.2rem;
  margin: 0 0 0.8rem;
}
.home-refine .home-region { margin: 0; min-width: 12rem; }
.home-refine .filter-row { margin: 0; }
.page { padding: 1.6rem 0 3rem; }
.page h1 { margin-top: 0; }
.legal { max-width: 44rem; }
.legal h2 { margin: 1.5rem 0 0.45rem; font-size: 1.15rem; }
.legal h3 { margin: 1.1rem 0 0.35rem; font-size: 1.02rem; }
.legal p, .legal li { line-height: 1.55; }
.legal ul, .legal ol { margin: 0.4rem 0 0.8rem; padding-left: 1.25rem; }
.legal li { margin: 0.25rem 0; }
.legal .legal-meta { margin: 0 0 1rem; color: var(--muted); font-size: 0.9rem; }
.legal .legal-nav { margin: 0 0 1.2rem; }
.legal .legal-nav a { margin-right: 0.8rem; }

.tour-meta { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; color: var(--muted); font-size: 0.92rem; }
.price { font-weight: 700; color: var(--navy); }
.slots-ok { color: var(--ok); }
.slots-low { color: var(--warn); }
.slots-out { color: var(--bad); }
.slots-ext { color: var(--navy); font-weight: 600; }

.flash { padding: 0.75rem 0.9rem; border-radius: 8px; margin: 0.8rem 0; }
.flash-error { background: #fdecec; color: var(--bad); }
.flash-ok { background: #e8f6ec; color: var(--ok); }
.hidden { display: none !important; }

.form-card { max-width: 420px; margin: 0 auto; }
.tabs { display: flex; gap: 0.5rem; margin-bottom: 1rem; }
.tabs button { flex: 1; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 0.55rem 0.4rem; border-bottom: 1px solid var(--line); }
th { font-size: 0.8rem; text-transform: uppercase; color: var(--muted); }

.site-footer {
  background: var(--navy);
  color: #fff;
  padding: 1.2rem 0;
  margin-top: auto;
}
.site-footer a { color: #fff; }
.footer-row { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

#cookie-banner {
  position: fixed;
  inset: auto 0 0 0;
  background: #fff;
  border-top: 1px solid var(--line);
  box-shadow: 0 -6px 20px rgba(0,0,0,0.06);
  padding: 1rem;
  z-index: 20;
}
.cookie-inner { display: flex; gap: 1rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }

.captcha-box { display: flex; gap: 0.6rem; align-items: center; }
.captcha-box svg, .captcha-box img { height: 48px; background: #eef3f7; border-radius: 6px; }

.layout { display: grid; grid-template-columns: 220px 1fr; gap: 1.2rem; }
.layout[hidden] { display: none; }
.side { background: var(--card); border-radius: var(--radius); padding: 1rem; height: fit-content; }
.side a { display: block; padding: 0.4rem 0; }

.tour-filters { margin-bottom: 1.2rem; }
.filter-row { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 0.4rem; }
.chip {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  font: inherit;
  cursor: pointer;
}
.chip.is-on { background: var(--navy); color: #fff; border-color: var(--navy); }

.tour-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.1rem;
}
.tour-list {
  display: grid;
  gap: 0.4rem;
}
.tour-row {
  display: grid;
  grid-template-columns:
    64px
    minmax(14rem, 2.2fr)
    8.2rem
    4.8rem
    5.4rem
    4.2rem
    6.4rem
    5rem
    7.2rem;
  column-gap: 0.7rem;
  align-items: center;
  background: var(--card);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 0.4rem 0.65rem;
  color: inherit;
  text-decoration: none;
}
.tour-row:hover { text-decoration: none; background: #eef3f8; }
.tour-row-head {
  background: transparent;
  box-shadow: none;
  padding: 0 0.65rem 0.15rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--muted);
}
.tour-row-head:hover { background: transparent; }
.tour-row-thumb {
  width: 64px;
  height: 44px;
  object-fit: cover;
  border-radius: 6px;
  background: #d7dee6;
  display: block;
}
.kind-pill {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  background: #e8eef5;
  color: var(--navy);
  border-radius: 999px;
  padding: 0.12rem 0.5rem;
  margin-right: 0.35rem;
  vertical-align: middle;
  white-space: nowrap;
}
.kind-mark {
  flex: none;
  width: 1.3rem;
  height: 1.3rem;
  display: inline-grid;
  place-items: center;
  border-radius: 4px;
  background: #e8eef5;
  color: var(--navy);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
}
.kind-legend {
  margin: 0 0 0.45rem;
  font-size: 0.8rem;
}
.week-list {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
  display: grid;
  gap: 0.55rem;
}
.week-item {
  background: var(--bg);
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
}
.week-item strong { display: block; }
.session-row {
  display: grid;
  gap: 0.55rem;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 0.6rem;
  background: #fff;
}
.session-row-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}
.session-row-head h3 {
  margin: 0;
  font-size: 0.95rem;
}
.session-generate {
  display: grid;
  gap: 0.6rem;
  margin-bottom: 0.8rem;
}
.kind-choices {
  display: grid;
  gap: 0.45rem;
}
@media (min-width: 721px) {
  .kind-choices { grid-template-columns: 1fr 1fr; }
}
.tour-row-main { min-width: 0; }
.tour-row-main h3 {
  margin: 0;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
  overflow: hidden;
}
.tour-row-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tour-row-main .muted {
  margin: 0.1rem 0 0;
  font-size: 0.8rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tour-row-when,
.tour-row-duration,
.tour-row-age,
.tour-row-level,
.tour-row-breed {
  font-size: 0.82rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tour-row-breed.is-own-horse {
  color: var(--bad);
  font-weight: 700;
}
.tour-row-price,
.tour-row-slots {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.tour-row-price { font-weight: 700; color: var(--navy); }
.tour-row-slots { font-weight: 600; font-size: 0.85rem; }
.tour-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.tour-cover { position: relative; display: block; aspect-ratio: 16 / 10; background: #d7dee6; }
.tour-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tour-cover:hover { text-decoration: none; }
.tour-farm-tag {
  position: absolute;
  left: 0.7rem;
  bottom: 0.7rem;
  background: rgba(0, 20, 40, 0.72);
  color: #fff;
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
  font-size: 0.8rem;
}
.badge {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  background: #fff;
  color: var(--navy);
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 600;
}
.tour-body { padding: 0.9rem 1rem 1.1rem; }
.tour-body h3 { margin: 0 0 0.3rem; font-size: 1.05rem; display: flex; gap: 0.4rem; align-items: center; }
.tour-logo { width: 22px; height: 22px; object-fit: contain; border-radius: 4px; }
.tour-gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.tour-gallery img {
  width: 100%;
  max-height: 360px;
  object-fit: cover;
  border-radius: var(--radius);
  background: #d7dee6;
}
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.8rem;
  margin: 0.8rem 0 1rem;
}
.media-item { margin: 0; }
.media-item img {
  width: 100%;
  height: 110px;
  object-fit: cover;
  border-radius: 8px;
  background: #d7dee6;
}
.media-item figcaption { font-size: 0.8rem; color: var(--muted); margin: 0.3rem 0; }
.media-item.is-on img { outline: 3px solid var(--navy); outline-offset: 2px; }
.media-pick { cursor: pointer; }
.media-pick button { width: 100%; }
.pager { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 1.2rem; }

.site-footer .footer-meta { margin: 0; font-size: 0.85rem; opacity: 0.9; }
.site-footer .footer-contact { margin: 0.35rem 0 0; font-size: 0.85rem; }
.email-cloak { cursor: pointer; }

.about-lead { font-size: 1.05rem; max-width: 40rem; }
.about-steps { margin: 0 0 1rem; padding-left: 1.2rem; }
.about-steps li { margin: 0.35rem 0; }

.tour-address { margin: 0.35rem 0 0.8rem; }
.maps-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 0.15rem;
}
.maps-link {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.3rem 0.45rem;
  font-weight: 600;
  border-bottom: 1px dashed currentColor;
}
.maps-link:hover { border-bottom-style: solid; text-decoration: none; }
.maps-hint { font-weight: 500; font-size: 0.8rem; color: var(--muted); }
.maps-pin { flex: 0 0 auto; }

.tour-carousel { position: relative; margin-bottom: 1rem; }
.tour-carousel-stage {
  position: relative;
  aspect-ratio: 16 / 10;
  background: #d7dee6;
  border-radius: var(--radius);
  overflow: hidden;
}
.tour-carousel-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.55s ease;
  pointer-events: none;
}
.tour-carousel-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}
.tour-carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.2rem;
  height: 2.2rem;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--navy);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}
.tour-carousel-btn.is-prev { left: 0.6rem; }
.tour-carousel-btn.is-next { right: 0.6rem; }
.tour-carousel-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.6rem;
  display: flex;
  justify-content: center;
  gap: 0.35rem;
}
.tour-carousel-dots button {
  width: 0.55rem;
  height: 0.55rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
}
.tour-carousel-dots button.is-on { background: #fff; }

.js-zoom { cursor: zoom-in; }
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 16, 32, 0.78);
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 1.5rem;
}
.lightbox img {
  max-width: min(960px, 100%);
  max-height: min(86vh, 100%);
  object-fit: contain;
  border-radius: 8px;
  background: #111;
}
.lightbox-close {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
}
body.lightbox-open { overflow: hidden; }

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}
#tour-save-flash { margin-top: 0.7rem; }

.farm-hero { margin-bottom: 1.1rem; }
.farm-cover {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: var(--radius);
  background: #d7dee6;
  margin-bottom: 1rem;
  display: block;
}
.farm-tour-list { display: grid; gap: 0.75rem; }
.farm-tour-card,
.farm-booking-head {
  display: grid;
  grid-template-columns: 5.6rem 1fr auto;
  gap: 1rem;
  align-items: center;
}
.farm-tour-card h2,
.farm-booking-head h2 { margin: 0 0 0.15rem; font-size: 1.15rem; }
.farm-tour-card .muted,
.farm-booking-head .muted { margin: 0; }
.farm-tour-thumb {
  width: 5.6rem;
  height: 4.2rem;
  object-fit: cover;
  border-radius: 8px;
  background: #d7dee6;
}
.rider-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.55rem 0.85rem;
  align-items: center;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0.7rem 0.85rem;
}
.rider-card.has-avatar {
  grid-template-columns: auto minmax(0, 1fr) auto;
}
.rider-card .dash-avatar {
  width: 64px;
  height: 64px;
}
.rider-head {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  align-items: center;
  flex-wrap: wrap;
}
.rider-card h3 { margin: 0; font-size: 1rem; }
.rider-card .muted { margin: 0.1rem 0 0; font-size: 0.85rem; }
.rider-card.is-cancelled { opacity: 0.78; grid-template-columns: minmax(0, 1fr); }
.rider-card.has-avatar.is-cancelled { grid-template-columns: auto minmax(0, 1fr); }
.rider-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  margin: 0;
}
.rider-actions .status-select { min-width: 8rem; }
.fold { margin-top: 1.2rem; }
.fold > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  cursor: pointer;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--navy);
  padding: 0.65rem 0.85rem;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  list-style: none;
}
.fold > summary::-webkit-details-marker,
.fold > summary::marker { display: none; content: ""; }
.fold > summary::after {
  content: "Visa";
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--muted);
}
.fold[open] > summary { margin-bottom: 0.7rem; }
.fold[open] > summary::after { content: "Dölj"; }

@media (max-width: 1100px) {
  .tour-row {
    grid-template-columns:
      64px
      minmax(12rem, 2fr)
      8.2rem
      4.8rem
      4.2rem
      6.4rem
      5rem
      7.2rem;
  }
  .tour-row-age { display: none; }
  .tour-row-head span:nth-child(5) { display: none; }
}
@media (max-width: 900px) {
  .tour-row {
    grid-template-columns:
      64px
      minmax(11rem, 1fr)
      8.2rem
      4.8rem
      5rem
      7.2rem;
  }
  .tour-row-level,
  .tour-row-breed,
  .tour-row-head span:nth-child(6),
  .tour-row-head span:nth-child(7) { display: none; }
}
.table-wrap { overflow-x: auto; margin-top: 1rem; }
a.card.ops-jump {
  margin-top: 1.2rem;
  display: grid;
  gap: 0.45rem;
}
a.card.ops-jump .btn { justify-self: start; }
.ops-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin: 0.4rem 0 1rem;
}
.ops-toolbar p { margin: 0; }
.ops-tabs { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-bottom: 1rem; }
.ops-section { margin-bottom: 1.4rem; }
.unit-card .unit-name { margin: 0 0 0.35rem; font-weight: 700; }
.unit-dot {
  display: inline-block;
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  margin-right: 0.4rem;
  vertical-align: middle;
}
.unit-ok { background: var(--ok); }
.unit-wait { background: var(--warn); }
.unit-bad { background: var(--bad); }
.log-box {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 18rem;
  overflow: auto;
  background: #102033;
  color: #d7e4f0;
  padding: 0.8rem;
  border-radius: 8px;
  font-size: 0.78rem;
  line-height: 1.45;
}
.progress-track {
  height: 0.55rem;
  background: var(--line);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 0.7rem;
}
.progress-bar {
  display: block;
  height: 100%;
  width: 40%;
  background: var(--navy);
  border-radius: 999px;
  animation: progress-slide 1.2s ease-in-out infinite;
}
@keyframes progress-slide {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(320%); }
}
.ban-list { list-style: none; margin: 0.6rem 0 0; padding: 0; }
.ban-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--line);
}
#server-f2b-jails {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.5rem;
  align-items: start;
  margin-top: 0.5rem;
}
.jail-card {
  padding: 0.5rem 0.75rem;
  display: grid;
  gap: 0.1rem;
}
.jail-card h3 {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.25;
}
.jail-card p {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.35;
}
.jail-card .ban-list { margin: 0.2rem 0 0; }
.jail-card .ban-list li { padding: 0.15rem 0; }

@media (max-width: 720px) {
  .search { grid-template-columns: 1fr; align-items: stretch; }
  .search .btn { width: 100%; }
  .layout { grid-template-columns: 1fr; }
  .farm-cover { height: 140px; }
  .farm-tour-card,
  .farm-booking-head { grid-template-columns: 4.6rem 1fr; }
  .farm-tour-card .next-actions,
  .farm-booking-head .next-actions {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
  }
  .rider-card { grid-template-columns: 1fr; }
  .rider-card.has-avatar { grid-template-columns: auto 1fr; }
  .rider-card .dash-avatar { width: 56px; height: 56px; }
  .rider-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .nav-toggle { display: inline-flex; }
  .nav:has(.nav-toggle) .nav-links {
    display: none;
    position: absolute;
    top: calc(100% + 0.35rem);
    right: 0;
    left: 0;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0.15rem;
    padding: 0.4rem;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
  }
  .site-header.is-open .nav-links { display: flex; }
  .nav:has(.nav-toggle) .nav-links a {
    padding: 0.75rem 0.85rem;
    border-radius: 8px;
  }
  .nav:has(.nav-toggle) .nav-links a.is-active { background: #e8eef5; }
  .home-refine {
    flex-direction: column;
    align-items: stretch;
  }
  .home-refine .home-region { min-width: 0; width: 100%; }
  .tour-list { gap: 0.65rem; }
  .tour-row {
    grid-template-columns: 4.6rem minmax(0, 1fr) auto;
    grid-template-rows: auto auto auto;
    align-items: start;
    column-gap: 0.75rem;
    row-gap: 0.2rem;
    padding: 0.7rem 0.75rem;
  }
  .tour-row-thumb {
    grid-column: 1;
    grid-row: 1 / 3;
    width: 4.6rem;
    height: 4.6rem;
  }
  .tour-row-main {
    grid-column: 2 / 4;
    grid-row: 1;
  }
  .tour-row-main h3 {
    white-space: normal;
    align-items: flex-start;
  }
  .tour-row-title {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
  .tour-row-main .muted { white-space: normal; }
  .tour-row-when {
    grid-column: 2 / 4;
    grid-row: 2;
    white-space: normal;
  }
  .tour-row-price {
    grid-column: 1 / 3;
    grid-row: 3;
    margin-top: 0.3rem;
    text-align: left;
  }
  .tour-row-slots {
    grid-column: 3;
    grid-row: 3;
    margin-top: 0.3rem;
    text-align: right;
    white-space: normal;
  }
  .tour-row-duration,
  .tour-row-age,
  .tour-row-level,
  .tour-row-breed,
  .tour-row-head { display: none; }
}
