:root {
  --deep: #05285f;
  --deep-2: #001840;
  --ocean: #0d65a8;
  --aqua: #10b0c8;
  --sand: #247ec2;
  --ink: #102c4d;
  --muted: #58718c;
  --line: #d5e2ee;
  --surface: #ffffff;
  --soft: #eef5fb;
  --danger: #b42318;
  --success: #1b7b52;
  --shadow: 0 16px 44px rgba(2, 47, 61, .12);
  --radius: 22px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: #f5f9fd;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html {
  max-width: 100%;
  overflow-x: hidden;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
  background: linear-gradient(180deg, #eaf4fb 0, #f9fbfe 420px);
}
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: 320px;
  z-index: -1;
  background:
    radial-gradient(circle at 88% 5%, rgba(16, 176, 200, .22), transparent 33%),
    radial-gradient(circle at 5% 25%, rgba(36, 126, 194, .14), transparent 35%);
}
a { color: var(--ocean); text-decoration-thickness: .08em; text-underline-offset: .16em; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; }
button, .button { touch-action: manipulation; }
[hidden] { display: none !important; }

.skip-link { position: fixed; left: 12px; top: -100px; z-index: 100; background: #fff; padding: 10px 14px; border-radius: 8px; }
.skip-link:focus { top: 12px; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 74px;
  padding: 10px clamp(16px, 4vw, 42px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 24, 64, .96);
  color: #fff;
  backdrop-filter: blur(14px);
  box-shadow: 0 6px 22px rgba(0, 24, 64, .22);
}
.brand { min-width: 0; display: flex; align-items: center; gap: 11px; color: #fff; text-decoration: none; }
.brand-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(255,255,255,.8);
  border-radius: 50% 50% 46% 46%;
  background: linear-gradient(145deg, var(--aqua), var(--ocean));
  font-weight: 900;
  letter-spacing: -.05em;
  box-shadow: inset 0 0 0 4px rgba(255,255,255,.14);
}
.brand strong, .brand small { display: block; }
.brand strong { font-size: 1.08rem; line-height: 1.15; }
.brand small { opacity: .76; font-size: .72rem; margin-top: 3px; }
.topbar-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 10px; }
.topbar-logout { color: #fff; border-color: rgba(255,255,255,.55); }
.avatar-link {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: var(--deep-2);
  background: linear-gradient(145deg, #35a7ff, #10b0c8);
  color: #001840;
  text-decoration: none;
  font-weight: 850;
}

.page-shell { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 34px 0 120px; min-height: 68vh; }
.page-heading { margin: 8px 0 26px; }
.eyebrow { margin: 0 0 8px; color: var(--ocean); font-size: .82rem; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
h1, h2, h3 { color: var(--deep-2); line-height: 1.12; text-wrap: balance; }
h1 { margin: 0; font-size: clamp(2rem, 5vw, 4rem); letter-spacing: -.045em; }
h2 { font-size: clamp(1.45rem, 3vw, 2.25rem); letter-spacing: -.03em; }
h3 { font-size: 1.15rem; }
.lead { color: var(--muted); font-size: clamp(1.03rem, 2vw, 1.22rem); line-height: 1.65; max-width: 760px; }

.hero {
  position: relative;
  overflow: hidden;
  min-height: 340px;
  border-radius: 32px;
  padding: clamp(30px, 7vw, 72px);
  display: flex;
  align-items: flex-end;
  color: #fff;
  background:
    linear-gradient(110deg, rgba(0, 24, 64, .99) 0%, rgba(5, 40, 95, .94) 54%, rgba(16, 176, 200, .56) 100%),
    radial-gradient(circle at 80% 22%, #10b0c8 0, #0d65a8 31%, #001840 68%);
  box-shadow: var(--shadow);
}
.hero::after {
  content: "";
  position: absolute;
  width: 320px;
  height: 320px;
  right: -80px;
  top: -100px;
  border: 1px solid rgba(255,255,255,.26);
  border-radius: 50%;
  box-shadow: 0 0 0 55px rgba(255,255,255,.05), 0 0 0 110px rgba(255,255,255,.035);
}
.hero-content { position: relative; z-index: 1; width: min(760px, 100%); }
.hero-welcome-image {
  display: block;
  width: min(480px, 88%);
  height: auto;
  margin: 18px auto 20px;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 18px;
  box-shadow: 0 18px 46px rgba(0,24,64,.32);
}
.hero--welcome {
  min-height: 300px;
  align-items: center;
}
.hero--welcome .hero-content {
  min-width: 0;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, 320px);
  grid-template-areas:
    "title image"
    "actions image"
    "hint image";
  column-gap: clamp(28px, 5vw, 58px);
  row-gap: 14px;
  align-items: center;
}
.hero--welcome h1 {
  min-width: 0;
  grid-area: title;
  align-self: end;
  overflow-wrap: anywhere;
}
.hero--welcome .hero-welcome-image {
  grid-area: image;
  width: 100%;
  max-width: 320px;
  margin: 0;
  justify-self: end;
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(0,24,64,.26);
}
.hero--welcome .hero-actions {
  grid-area: actions;
  align-self: start;
  margin-top: 0;
}
.hero--welcome .install-hint {
  grid-area: hint;
}
.hero h1, .hero h2 { color: #fff; }
.hero .lead { color: rgba(255,255,255,.82); }
.hero-actions, .form-actions, .card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 11px; margin-top: 24px; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 11px 18px;
  border: 1px solid transparent;
  border-radius: 13px;
  background: var(--ocean);
  color: #fff;
  font-weight: 780;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(8, 127, 140, .2);
}
.button:hover { filter: brightness(.96); transform: translateY(-1px); }
.button-primary { background: #247ec2; color: #fff; box-shadow: 0 8px 20px rgba(36, 126, 194, .30); }
.button-secondary { background: #10b0c8; color: #001840; }
.button-outline { background: transparent; border-color: currentColor; box-shadow: none; }
.topbar .button-outline { color: #fff; border-color: rgba(255,255,255,.55); }
.button-danger { background: var(--danger); }
.button-small { min-height: 38px; padding: 7px 12px; border-radius: 10px; font-size: .9rem; }
.button-block { width: 100%; }

.section { margin-top: clamp(38px, 7vw, 78px); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.section-head h2 { margin: 0; }
.section-head p { margin: 8px 0 0; color: var(--muted); }

.service-grid, .news-grid, .dashboard-grid, .stat-grid { display: grid; gap: 18px; }
.service-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.news-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dashboard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.card {
  position: relative;
  overflow: hidden;
  padding: 24px;
  border: 1px solid rgba(215, 229, 233, .9);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 12px 34px rgba(2, 47, 61, .08);
}
.card h2, .card h3 { margin-top: 0; }
.card p { line-height: 1.55; }
.card-link { color: inherit; text-decoration: none; }
.card-link::after { content: ""; position: absolute; inset: 0; }
.service-card { min-height: 225px; display: flex; flex-direction: column; justify-content: space-between; }
.service-card::before {
  content: "";
  position: absolute;
  right: -38px;
  top: -38px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--card-color, var(--aqua)) 18%, transparent);
}
.service-icon { font-size: 2.2rem; }
.service-card small { color: var(--ocean); font-weight: 800; }
.card-arrow { color: var(--ocean); font-weight: 850; }
.app-discount-card {
  display: grid;
  grid-template-columns: minmax(210px, .72fr) minmax(0, 1.28fr);
  gap: clamp(22px, 4vw, 48px);
  align-items: center;
  color: #fff;
  border: 0;
  background:
    radial-gradient(circle at 92% 8%, rgba(53, 167, 255, .35), transparent 34%),
    linear-gradient(125deg, #001840 0%, #05285f 58%, #0d65a8 100%);
  box-shadow: 0 18px 46px rgba(0, 24, 64, .22);
}
.app-discount-card h2,
.app-discount-card h3 {
  color: #fff;
}
.app-discount-card h2 {
  margin-bottom: 10px;
}
.app-discount-card .eyebrow {
  color: #7fe7f2;
}
.app-discount-card p {
  color: rgba(255, 255, 255, .82);
}
.app-discount-list {
  display: grid;
  gap: 11px;
}
.app-discount-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 13px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 15px;
  background: rgba(255, 255, 255, .1);
}
.app-discount-percent {
  display: grid;
  place-items: center;
  min-width: 74px;
  min-height: 58px;
  padding: 8px;
  border-radius: 12px;
  color: #001840;
  background: #7fe7f2;
  font-size: 1.28rem;
  font-weight: 900;
  line-height: 1;
}
.app-discount-item h3 {
  margin: 0 0 4px;
}
.app-discount-services {
  margin: 0;
  font-size: .86rem;
}
.app-discount-note {
  margin: 14px 0 0;
  font-size: .84rem;
}
.service-discount-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin: 9px 0 3px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #06375f;
  background: #7fe7f2;
  font-size: .78rem;
  font-weight: 900;
  line-height: 1;
}
.news-card { padding: 0; }
.news-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.discover-news-grid .news-card img {
  height: 240px;
  aspect-ratio: auto;
  object-fit: contain;
  object-position: center;
  background: #edf3fa;
}
.news-card-body { padding: 22px; }
.news-meta { color: var(--muted); font-size: .88rem; }
.news-card--important { border-color: #75cfe0; box-shadow: 0 16px 40px rgba(13,101,168,.16); }
.news-card-labels, .news-card-facts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.news-card-facts { margin: 16px 0; color: var(--ocean); }
.badge {
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  padding: 4px 9px;
  border-radius: 999px;
  background: #e1f2fb;
  color: #07518a;
  font-size: .78rem;
  font-weight: 800;
}
.badge-warning { background: #fff0d8; color: #85500a; }
.badge-danger { background: #fee4e2; color: #9b1c14; }
.badge-neutral { background: #e9f0f2; color: #48636b; }

.travel-planning-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.travel-planning-card {
  min-height: 280px;
  border-top: 5px solid #b6c8d8;
}
.travel-planning-card.is-active { border-top-color: var(--aqua); }
.travel-planning-card.is-planned { background: linear-gradient(180deg, #fff, #f4f8fc); }
.travel-planning-icon {
  display: grid;
  width: 52px;
  height: 52px;
  margin-bottom: 18px;
  place-items: center;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(145deg, var(--aqua), var(--ocean));
  font-size: 1.55rem;
}
.travel-planning-card h2 { margin: 18px 0 8px; }
.travel-planning-activities {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 24px;
  border-left: 5px solid var(--ocean);
}
.travel-planning-activities h2 { margin-bottom: 8px; }
.travel-planning-activities p:last-child { margin-bottom: 0; }
.travel-planning-activities .button { flex: 0 0 auto; }
.travel-planning-notice { max-width: 820px; }

.trip-list {
  display: grid;
  gap: 18px;
}
.trip-card {
  border-left: 5px solid var(--aqua);
}
.trip-card-transfer { border-left-color: #168bb5; }
.trip-list-past .trip-card {
  border-left-color: #9eb4ba;
}
.trip-card-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}
.trip-card-head h3 {
  margin: 4px 0 0;
}
.trip-kind {
  color: var(--ocean);
  font-size: .78rem;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.trip-schedule {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
  gap: 10px;
  margin: 18px 0;
}
.trip-schedule > div,
.trip-pickup {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--soft);
}
.trip-schedule small,
.trip-pickup small {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 750;
}
.trip-schedule strong,
.trip-pickup strong {
  overflow-wrap: anywhere;
  color: var(--deep);
}
.trip-pickup {
  margin-top: 16px;
  color: #083f74;
  background: #e9f4fc;
}
.trip-reference {
  color: var(--muted);
  font-size: .86rem;
}

.panel {
  padding: clamp(22px, 5vw, 42px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}
.auth-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr); gap: 20px; align-items: start; }
.auth-panel h2 { margin: 14px 0 18px; }
.auth-panel > p { color: var(--muted); line-height: 1.6; }
.auth-panel-primary { border-top: 5px solid var(--aqua); }
.auth-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 20px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.auth-links a { font-weight: 720; }
.auth-message, .auth-form-wide { max-width: 760px; margin-inline: auto; }
.button:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.field { display: grid; align-content: start; gap: 7px; }
.field-full { grid-column: 1 / -1; }
.field label, .field-label { font-weight: 760; color: var(--deep-2); }
.field small, .help { color: var(--muted); line-height: 1.45; }
input, select, textarea {
  width: 100%;
  min-height: 48px;
  padding: 11px 13px;
  border: 1px solid #b9cfd5;
  border-radius: 11px;
  color: var(--ink);
  background: #fff;
}
textarea { min-height: 125px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(34,195,182,.2); border-color: var(--ocean); }
input[type="checkbox"], input[type="radio"] { width: 20px; min-height: 20px; accent-color: var(--ocean); }
.check-row { display: flex; align-items: flex-start; gap: 10px; line-height: 1.45; }
.check-row label { font-weight: 600; }
.required { color: var(--danger); }
.fieldset {
  grid-column: 1 / -1;
  margin: 8px 0 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
}
.fieldset legend { padding: 0 8px; font-weight: 850; color: var(--deep); }
.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.choice-card { display: flex; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: #fbfdfd; }
.choice-card:has(input:checked) { border-color: var(--ocean); background: #effafa; box-shadow: inset 0 0 0 1px var(--ocean); }

.flash {
  width: min(920px, calc(100% - 32px));
  margin: 18px auto -12px;
  padding: 13px 16px;
  border-radius: 12px;
  border: 1px solid;
  line-height: 1.45;
}
.flash-success { color: #155b3c; background: #e4f7ed; border-color: #93d7b4; }
.flash-error { color: #8f1710; background: #fff0ef; border-color: #f0aaa5; }
.flash-info { color: #185a6b; background: #e8f8fb; border-color: #9edbe5; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 15px; background: #fff; }
table { width: 100%; border-collapse: collapse; font-size: .94rem; }
th, td { padding: 13px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--deep); background: #edf6f7; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
.table-actions { display: flex; flex-wrap: wrap; gap: 7px; }

.stat-card strong { display: block; font-size: 2rem; color: var(--deep); }
.stat-card span { color: var(--muted); }
.empty-state { padding: 42px 24px; text-align: center; border: 1px dashed #adc8cf; border-radius: var(--radius); background: rgba(255,255,255,.7); }
.empty-state h2, .empty-state h3 { margin-top: 0; }
.install-hint { margin-top: 18px; padding: 15px; border-left: 4px solid var(--aqua); background: rgba(255,255,255,.12); border-radius: 8px; }
.steps { counter-reset: steps; display: grid; gap: 15px; padding: 0; list-style: none; }
.steps li { position: relative; padding-left: 48px; min-height: 38px; }
.steps li::before { counter-increment: steps; content: counter(steps); position: absolute; left: 0; top: -4px; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--deep); color: #fff; font-weight: 850; }

.embedded-booking-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin: 8px 0 22px;
}
.embedded-booking-heading h1 { font-size: clamp(1.9rem, 4vw, 3.2rem); }
.embedded-booking-heading .lead { margin-bottom: 0; }
.embedded-booking-actions { display: flex; flex: 0 0 auto; flex-wrap: wrap; justify-content: flex-end; gap: 9px; }
.embedded-booking-notice { width: auto; margin: 0 0 16px; }
.embedded-booking-status {
  margin-bottom: 12px;
  padding: 11px 14px;
  border: 1px solid #b8d7dd;
  border-radius: 11px;
  color: #185a6b;
  background: #e8f8fb;
  font-size: .92rem;
  line-height: 1.4;
}
.embedded-booking-status.is-ready {
  color: #155b3c;
  border-color: #93d7b4;
  background: #e4f7ed;
}
.embedded-booking-status.is-error {
  color: #8b291f;
  border-color: #efb0a8;
  background: #fff0ee;
}
.embedded-booking-shell {
  position: relative;
  overflow: hidden;
  width: 100%;
  min-height: 760px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow);
}
.embedded-booking-frame {
  display: block;
  width: 100%;
  min-height: 760px;
  border: 0;
  background: #fff;
}

.site-footer { padding: 30px 20px 112px; text-align: center; color: var(--muted); background: #eaf4fb; font-size: .9rem; }
.site-footer p { margin: 7px 0; }
.bottom-nav {
  position: fixed;
  z-index: 35;
  left: 50%;
  bottom: max(10px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(840px, calc(100% - 22px));
  min-height: 68px;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  padding: 7px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 22px;
  background: rgba(0, 24, 64, .97);
  box-shadow: 0 14px 40px rgba(0, 24, 64, .34);
  backdrop-filter: blur(14px);
}
.bottom-nav.has-management {
  width: min(960px, calc(100% - 22px));
  grid-template-columns: repeat(8, minmax(0, 1fr));
}
.bottom-nav a { display: grid; place-items: center; align-content: center; gap: 2px; min-width: 0; padding: 3px 2px; color: rgba(255,255,255,.76); text-decoration: none; font-size: .68rem; line-height: 1.05; text-align: center; white-space: normal; border-radius: 16px; }
.bottom-nav a span { font-size: 1.25rem; line-height: 1; }
.bottom-nav a.active { color: #fff; background: rgba(16,176,200,.25); }

.admin-nav { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 24px; }
.admin-nav a { padding: 9px 13px; border-radius: 10px; background: #e5f2f4; color: var(--deep); text-decoration: none; font-weight: 720; }

.logbook-plan-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.logbook-plan-card { border-top: 5px solid var(--line); }
.logbook-plan-card.is-active { border-top-color: var(--aqua); box-shadow: 0 16px 42px rgba(8,127,140,.15); }
.feature-list { display: grid; gap: 8px; padding-left: 20px; line-height: 1.45; }
.logbook-entry-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.logbook-entry-card { padding: 0; }
.logbook-entry-card > img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.logbook-entry-body { padding: 21px; }
.logbook-entry-meta { display: flex; justify-content: space-between; align-items: center; gap: 10px; color: var(--muted); font-size: .82rem; }
.logbook-entry-card h3 { margin: 14px 0 7px; }
.logbook-trip-link { margin-bottom: 24px; border-left: 5px solid var(--aqua); }
.logbook-form-guide {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 18px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f3f9fa;
}
.logbook-form-guide span { display: flex; align-items: center; gap: 7px; min-width: 0; color: var(--muted); font-size: .78rem; font-weight: 750; }
.logbook-form-guide b { flex: 0 0 27px; width: 27px; height: 27px; display: grid; place-items: center; border-radius: 50%; background: var(--deep); color: #fff; font-size: .74rem; }
.logbook-form { display: grid; gap: 22px; }
.logbook-form-section { box-shadow: 0 10px 30px rgba(2,47,61,.07); }
.logbook-form-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 22px; }
.logbook-form-head > span {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--deep);
  color: #fff;
  font-weight: 850;
}
.logbook-form-head h2, .logbook-form-head p { margin: 0; }
.logbook-form-head p { margin-top: 5px; color: var(--muted); }
.logbook-field-group { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.logbook-field-group:first-of-type { margin-top: 0; padding-top: 0; border-top: 0; }
.logbook-field-group h3 { margin: 0 0 15px; color: var(--deep); font-size: 1rem; }
.logbook-chip-fieldset { margin: 20px 0 0; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: #f7fbfb; }
.logbook-chip-fieldset legend { padding: 0 8px; color: var(--deep); font-weight: 800; }
.logbook-choice-chips, .logbook-rating-options { display: flex; flex-wrap: wrap; gap: 9px; }
.logbook-choice-chips label, .logbook-rating-options label { position: relative; cursor: pointer; }
.logbook-choice-chips input, .logbook-rating-options input { position: absolute; opacity: 0; pointer-events: none; }
.logbook-choice-chips span, .logbook-rating-options span { display: block; padding: 9px 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink); font-size: .84rem; font-weight: 720; }
.logbook-choice-chips input:checked + span, .logbook-rating-options input:checked + span { border-color: var(--ocean); background: #dff7f3; color: #075b62; box-shadow: 0 0 0 2px rgba(8,127,140,.1); }
.logbook-choice-chips input:focus-visible + span, .logbook-rating-options input:focus-visible + span { outline: 3px solid rgba(16,176,200,.28); outline-offset: 2px; }
.logbook-gas-calculator {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 20px;
  padding: 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, #063f52, #087f8c);
  color: #fff;
}
.logbook-gas-calculator div { padding: 10px 12px; border: 1px solid rgba(255,255,255,.16); border-radius: 12px; background: rgba(255,255,255,.07); }
.logbook-gas-calculator span { display: block; margin-bottom: 4px; color: #bfeee9; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.logbook-gas-calculator strong { font-size: 1.08rem; }
.logbook-gas-calculator p { grid-column: 1 / -1; margin: 0; color: #d8f2ef; font-size: .78rem; }
.logbook-photo-grid, .logbook-photo-preview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.logbook-photo-edit { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--soft); }
.logbook-photo-edit img, .logbook-photo-preview img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 11px; }
.logbook-photo-edit span { display: flex; align-items: center; gap: 7px; padding: 8px; font-size: .82rem; font-weight: 700; }
.logbook-animal-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.logbook-animal { min-height: 46px; padding: 9px; border: 1px solid var(--line); border-radius: 11px; background: #fff; color: var(--ink); font-weight: 700; cursor: pointer; }
.logbook-animal.is-selected { border-color: var(--ocean); background: #e5f8f5; }
.logbook-save-panel { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.logbook-save-panel .help { flex-basis: 100%; margin: 0; }
.logbook-detail-hero {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  padding: clamp(24px, 5vw, 50px);
  border-radius: 28px;
  color: #fff;
  background: linear-gradient(130deg, var(--deep-2), var(--ocean));
  box-shadow: var(--shadow);
}
.logbook-detail-hero h1, .logbook-detail-hero .lead { color: #fff; }
.logbook-detail-hero .eyebrow { color: #7ff3e6; }
.logbook-detail-hero .lead { margin-bottom: 0; }
.logbook-detail-hero .button-outline { color: #fff; }
.logbook-detail-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.logbook-detail-summary article { padding: 17px; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: 0 8px 24px rgba(2,47,61,.06); }
.logbook-detail-summary span { display: block; margin-bottom: 5px; color: var(--muted); font-size: .78rem; font-weight: 700; }
.logbook-detail-summary strong { color: var(--deep); font-size: 1.25rem; }
.logbook-detail-photos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.logbook-detail-photos img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 16px; box-shadow: 0 8px 22px rgba(2,47,61,.12); }
.logbook-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.logbook-story-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.logbook-story-grid .panel p, .logbook-note-panel p { white-space: pre-wrap; overflow-wrap: anywhere; }
.logbook-note-panel { border-left: 5px solid var(--aqua); }
.logbook-note-panel--attention { border-left-color: #d99a22; background: #fffaf0; }
.logbook-note-panel--positive { border-left-color: #3d9a5a; background: #f4fbf6; }
.logbook-data-list { display: grid; gap: 0; margin: 0; }
.logbook-data-list div { display: grid; grid-template-columns: minmax(120px, .8fr) 1.2fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.logbook-data-list div:last-child { border-bottom: 0; }
.logbook-data-list dt { color: var(--muted); font-weight: 650; }
.logbook-data-list dd { margin: 0; font-weight: 760; }

@media (max-width: 900px) {
  .app-discount-card { grid-template-columns: 1fr; gap: 18px; }
  .service-grid, .news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .travel-planning-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .logbook-entry-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .logbook-form-guide { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .logbook-detail-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .auth-grid { grid-template-columns: 1fr; }
  .embedded-booking-heading { display: block; }
  .embedded-booking-actions { justify-content: flex-start; margin-top: 16px; }
}
@media (max-width: 660px) {
  .app-discount-item {
    grid-template-columns: 66px minmax(0, 1fr);
    padding: 12px;
  }
  .app-discount-percent {
    min-width: 66px;
    min-height: 54px;
    font-size: 1.12rem;
  }
  .page-shell { width: min(100% - 24px, 1180px); padding-top: 22px; }
  .topbar { min-height: 66px; padding-inline: 13px; }
  .brand-mark { width: 42px; height: 42px; font-size: .85rem; }
  .brand small { display: none; }
  .topbar-actions { gap: 7px; }
  .topbar-logout { min-height: 36px; padding: 6px 9px; font-size: .78rem; }
  .avatar-link { width: 38px; height: 38px; }
  .hero {
    min-height: 0;
    border-radius: 22px;
    padding: 22px 16px 20px;
    align-items: stretch;
  }
  .hero h1 {
    font-size: clamp(1.72rem, 8vw, 2.2rem);
    line-height: 1.08;
  }
  .hero-welcome-image {
    width: min(220px, 70vw);
    margin: 13px auto 15px;
    border-radius: 14px;
    box-shadow: 0 12px 28px rgba(0,24,64,.28);
  }
  .hero--welcome {
    min-height: 0;
  }
  .hero--welcome .hero-content {
    display: block;
  }
  .hero--welcome .hero-welcome-image {
    width: min(180px, 58vw);
    margin: 14px auto 0;
    border-radius: 12px;
    box-shadow: 0 9px 22px rgba(0,24,64,.24);
  }
  .hero--welcome .hero-actions {
    margin-top: 14px;
  }
  .discover-news-grid .news-card img {
    height: 220px;
  }
  .hero-actions {
    gap: 9px;
    margin-top: 0;
  }
  .hero-actions .button {
    min-height: 44px;
    padding-block: 9px;
  }
  .service-grid, .news-grid, .dashboard-grid, .form-grid, .choice-grid, .travel-planning-grid { grid-template-columns: 1fr; }
  .field-full { grid-column: auto; }
  .section-head { display: block; }
  .section-head .button { margin-top: 12px; }
  .card { padding: 20px; }
  .panel { padding: 22px 17px; }
  .fieldset { padding: 17px 13px; }
  .button:not(.button-small) { width: 100%; }
  .bottom-nav { bottom: max(7px, env(safe-area-inset-bottom)); width: calc(100% - 14px); border-radius: 19px; }
  .bottom-nav.has-management { width: calc(100% - 14px); }
  .bottom-nav a { font-size: clamp(.5rem, 2.1vw, .6rem); }
  .bottom-nav.has-management a { font-size: clamp(.45rem, 1.85vw, .53rem); }
  .bottom-nav a span { font-size: 1.12rem; }
  .travel-planning-activities { align-items: flex-start; flex-direction: column; }
  .travel-planning-activities .button { width: 100%; }
  .logbook-plan-grid, .logbook-entry-grid { grid-template-columns: 1fr; }
  .logbook-form-guide { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 8px; }
  .logbook-form-guide span { align-items: flex-start; font-size: .7rem; }
  .logbook-gas-calculator, .logbook-detail-grid, .logbook-story-grid { grid-template-columns: 1fr; }
  .logbook-detail-summary { gap: 8px; }
  .logbook-detail-summary article { padding: 13px; }
  .logbook-detail-summary strong { font-size: 1.05rem; }
  .logbook-photo-grid, .logbook-photo-preview, .logbook-detail-photos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .logbook-animal-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .logbook-detail-hero { display: block; padding: 26px 21px; border-radius: 22px; }
  .logbook-detail-hero .card-actions { margin-top: 20px; }
  .logbook-data-list div { grid-template-columns: 1fr; gap: 3px; }
  .embedded-booking-actions { display: grid; grid-template-columns: 1fr; }
  .embedded-booking-actions .button { width: 100%; }
  .embedded-booking-shell { width: calc(100% + 24px); margin-left: -12px; border-radius: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
