/* ============================================================
   OpenHangar Web App
   Paper, ink-green, serif display. Desktop-first.
   ============================================================ */
:root {
  --paper: #f5f3ec;
  --surface: #fffdf8;
  --ink: #1d2b1f;
  --ink-soft: #51604f;
  --ink-faint: #8a987f;
  --brand: #2d7a2d;
  --brand-deep: #1e4d26;
  --brand-wash: #e8f5e8;
  --amber: #c98a1b;
  --amber-wash: #faf0d7;
  --danger: #b3402e;
  --danger-wash: #f7e3df;
  --heart: #e0314b;
  --line: #ddd9c9;
  --line-soft: #e9e6d8;
  --radius: 14px;
  --mono: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, monospace;
  --shadow-card: 0 1px 2px rgba(29,43,31,0.06), 0 8px 24px -12px rgba(29,43,31,0.18);
  --shadow-pop: 0 24px 64px -16px rgba(29,43,31,0.35);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; color: inherit; }
input, select, textarea { font-family: inherit; font-size: 15px; color: var(--ink); }
img { display: block; }
[hidden] { display: none !important; }

::selection { background: #cfe6cf; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }

.serif { font-family: 'Fraunces', Georgia, serif; }
.mono { font-family: var(--mono); letter-spacing: 0.04em; }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 32px; }

.ic { display: inline-flex; vertical-align: -3px; flex-shrink: 0; }
.ic svg { display: block; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
#view > section { animation: fadeUp 0.35s ease both; }

/* ---------------- Header ---------------- */
.app-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(245,243,236,0.92);
  backdrop-filter: blur(10px) saturate(160%);
  -webkit-backdrop-filter: blur(10px) saturate(160%);
  border-bottom: 1px solid var(--line);
}
.app-header .bar { display: flex; align-items: center; gap: 18px; height: 68px; }
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600; font-size: 21px; color: var(--brand-deep);
  flex-shrink: 0;
}
.brand img { width: 32px; height: 32px; border-radius: 8px; }

.app-nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.app-nav a, .app-nav button.navlink {
  background: none; border: none;
  font-size: 14px; font-weight: 550; color: var(--ink-soft);
  padding: 8px 13px; border-radius: 10px;
  transition: background 0.15s, color 0.15s;
  position: relative;
}
.app-nav a:hover, .app-nav button.navlink:hover { background: var(--line-soft); color: var(--ink); }
.app-nav a.active { color: var(--brand-deep); background: var(--brand-wash); }
.avatar-btn {
  border: 1.5px solid var(--line); background: var(--surface);
  border-radius: 999px; padding: 4px 12px 4px 4px;
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 600; color: var(--ink);
  transition: box-shadow 0.15s;
}
.avatar-btn:hover { box-shadow: var(--shadow-card); }
.face {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--brand); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; overflow: hidden; flex-shrink: 0;
}
.face img { width: 100%; height: 100%; object-fit: cover; }
.signin-btn {
  background: var(--brand-deep); color: #fff; border: none;
  font-size: 14px; font-weight: 600;
  padding: 9px 18px; border-radius: 999px;
  transition: background 0.15s;
}
.signin-btn:hover { background: var(--brand); }

/* ---------------- Search console ---------------- */
.console {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow-card);
  display: flex; align-items: stretch;
  max-width: 880px; margin: 0 auto;
  position: relative;
  transition: box-shadow 0.2s;
}
.console:focus-within { box-shadow: var(--shadow-pop); }
.console .cell {
  flex: 1; padding: 13px 24px;
  display: flex; flex-direction: column; justify-content: center;
  border: none; background: none; text-align: left;
  position: relative;
  min-width: 0;
  border-radius: 999px;
  transition: background 0.15s;
}
.console .cell::after {
  content: ""; position: absolute; right: 0; top: 14px; bottom: 14px;
  width: 1px; background: var(--line-soft);
}
.console .cell.radcell::after { display: none; }
.console .cell:hover { background: #f6f3e8; }
.console .cell:hover::after, .console .cell:has(+ .cell:hover)::after { opacity: 0; }
.console .cell.dest { flex: 1.7; }
.console .cell.datecell { flex: 1.5; cursor: pointer; }
.console .cell.radcell { flex: 0.95; cursor: pointer; }
.console label {
  font-family: var(--mono); font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-faint);
  cursor: inherit; pointer-events: none;
}
.console input {
  border: none; background: none; outline: none;
  font-size: 15px; font-weight: 550; width: 100%;
  padding: 2px 0;
  text-overflow: ellipsis;
}
.console .cellval {
  font-size: 15px; font-weight: 550; padding: 2px 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  display: flex; align-items: center; gap: 6px;
}
.console .cellval .arr { color: var(--ink-faint); padding: 0 2px; }
.console .cellval .chev { margin-left: auto; color: var(--ink-faint); display: inline-flex; }
.console .go {
  align-self: center; margin: 7px;
  background: var(--brand); color: #fff; border: none;
  height: 48px; padding: 0 24px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-size: 15px; font-weight: 650;
  flex-shrink: 0; transition: background 0.15s, transform 0.1s;
}
.console .go:hover { background: var(--brand-deep); }
.console .go:active { transform: scale(0.97); }

/* shared popover look (airport, radius, filters share this language) */
.pop {
  position: fixed; z-index: 130;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 16px; box-shadow: var(--shadow-pop);
  overflow: hidden;
  animation: fadeUp 0.18s ease both;
}
.airport-pop {
  position: absolute; top: calc(100% + 10px); left: 0;
  width: min(440px, 90vw);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 16px; box-shadow: var(--shadow-pop);
  z-index: 50; max-height: 340px; overflow-y: auto;
  padding: 6px;
  animation: fadeUp 0.18s ease both;
}
.opt {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; cursor: pointer; border: none; background: none;
  width: 100%; text-align: left; font-size: 14px;
  border-radius: 10px;
}
.opt:hover, .opt.hot { background: var(--brand-wash); }
.opt .code {
  font-family: var(--mono); font-weight: 700; color: var(--brand-deep);
  min-width: 64px; flex-shrink: 0;
}
.opt .name { color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.opt .tick { margin-left: auto; color: var(--brand); display: inline-flex; }
.select-pop { padding: 6px; width: 220px; }
.select-pop .opt { font-weight: 550; }

/* ---------------- Range calendar ---------------- */
.cal-pop {
  position: fixed; z-index: 130;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow-pop);
  padding: 20px 22px 12px;
  animation: fadeUp 0.2s ease both;
}
.cal-months { display: flex; gap: 32px; }
.cal-month { width: 266px; }
.cal-title {
  text-align: center; font-weight: 650; font-size: 14.5px;
  margin-bottom: 12px; font-family: 'Fraunces', Georgia, serif;
}
.cal-grid { display: grid; grid-template-columns: repeat(7, 38px); justify-content: center; row-gap: 2px; }
.cal-grid .dow {
  font-family: var(--mono); font-size: 10px; color: var(--ink-faint);
  text-align: center; padding-bottom: 8px;
}
.cal-grid .day {
  height: 38px; border: none; background: none;
  font-size: 13.5px; font-weight: 550; color: var(--ink);
  position: relative;
}
/* range band: half-cell bands on the endpoints keep the fill continuous */
.cal-grid .day::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: 0; right: 0;
  background: transparent; z-index: -2;
}
.cal-grid .day.mid::before { background: var(--brand-wash); }
.cal-grid .day.start.has-range::before { left: 50%; background: var(--brand-wash); }
.cal-grid .day.end::before { right: 50%; background: var(--brand-wash); }
/* selected endpoints: green circle drawn above the band */
.cal-grid .day.sel { color: #fff; }
.cal-grid .day.sel::after {
  content: ""; position: absolute; inset: 1px;
  border-radius: 50%; background: var(--brand-deep); z-index: -1;
}
.cal-grid .day:hover:not(:disabled):not(.sel):not(.blk-b)::after {
  content: ""; position: absolute; inset: 1px;
  border-radius: 50%; box-shadow: inset 0 0 0 1.6px var(--brand); z-index: -1;
}
.cal-grid .day:disabled { color: #c9c4b2; cursor: default; }
.cal-grid .day:disabled.mid::before, .cal-grid .day:disabled.end::before { background: var(--brand-wash); }
/* manage-availability variants */
.cal-grid .day.blk-m { color: var(--danger); }
.cal-grid .day.blk-m::after {
  content: ""; position: absolute; inset: 1px;
  border-radius: 50%; background: var(--danger-wash); z-index: -1;
}
.cal-grid .day.blk-b { color: var(--brand-deep); cursor: default; }
.cal-grid .day.blk-b::after {
  content: ""; position: absolute; inset: 1px;
  border-radius: 50%; background: var(--brand-wash); z-index: -1;
}
.cal-nav {
  position: absolute; top: 18px;
  width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--surface);
  font-size: 17px; line-height: 1; color: var(--ink-soft);
  transition: background 0.15s;
}
.cal-nav:hover { background: var(--brand-wash); color: var(--brand-deep); }
.cal-nav.prev { left: 20px; }
.cal-nav.next { right: 20px; }
.cal-foot {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  margin-top: 12px; padding: 10px 2px 4px;
  border-top: 2px dashed var(--line-soft);
  font-size: 12.5px; color: var(--ink-soft);
}
.cal-foot .cal-clear {
  border: none; background: none; font-weight: 650;
  color: var(--brand-deep); font-size: 12.5px; padding: 4px 6px;
}
.cal-foot .cal-clear:hover { text-decoration: underline; }
.cal-legend { display: flex; gap: 14px; align-items: center; font-size: 12px; }
.cal-legend .key { display: inline-flex; align-items: center; gap: 5px; }
.cal-legend .swatch { width: 11px; height: 11px; border-radius: 50%; }
.cal-legend .swatch.m { background: var(--danger-wash); border: 1px solid var(--danger); }
.cal-legend .swatch.b { background: var(--brand-wash); border: 1px solid var(--brand); }

/* ---------------- Flight motifs ---------------- */
.hero-flight {
  position: absolute; left: 50%; top: 14px;
  transform: translateX(-50%);
  width: min(920px, 96vw); height: auto;
  color: var(--brand);
  opacity: 0.5;
  pointer-events: none;
}
.rule-plane {
  position: absolute; top: -9px; left: 0;
  width: 16px; height: 16px; color: var(--brand);
  opacity: 0; pointer-events: none;
}
.rule-plane svg { width: 100%; height: 100%; display: block; }
.rule.fly .rule-plane { animation: ruleFly 2.1s cubic-bezier(0.45, 0, 0.25, 1) 0.2s forwards; }
@keyframes ruleFly {
  0%   { left: 0; opacity: 0; }
  8%   { opacity: 1; }
  100% { left: calc(100% - 16px); opacity: 1; }
}
.flyby { position: relative; height: 40px; overflow: hidden; margin: -8px -30px 4px; }
.fb-plane { position: absolute; left: -34px; top: 16px; width: 26px; height: 26px; color: var(--brand); }
.fb-plane svg { width: 100%; height: 100%; display: block; }
.flyby .fb-plane { animation: flyby 2s cubic-bezier(0.5, 0, 0.4, 1) 0.15s forwards; }
@keyframes flyby {
  0%   { transform: translate(0, 10px) rotate(-12deg); }
  45%  { transform: translate(280px, -6px) rotate(5deg); }
  100% { transform: translate(660px, -16px) rotate(-4deg); }
}
@media (prefers-reduced-motion: reduce) {
  .rule.fly .rule-plane, .flyby .fb-plane { animation: none; }
  .rule.fly .rule-plane { opacity: 1; left: calc(100% - 16px); }
  .fb-plane { left: calc(50% - 13px); top: 8px; }
  #view > section { animation: none; }
}

/* ---------------- Hero ---------------- */
.hero-app {
  padding: 84px 0 64px;
  text-align: center;
  position: relative;
  overflow: hidden;
  background: radial-gradient(1000px 360px at 50% -100px, rgba(45,122,45,0.10), transparent);
}
.hero-app .wrap { position: relative; }
.hero-app h1 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600; font-size: clamp(36px, 5.6vw, 62px);
  line-height: 1.05; letter-spacing: -0.01em; color: var(--brand-deep);
  margin-bottom: 14px;
}
.hero-app h1 em { font-style: italic; color: var(--brand); }
.hero-app .sub { color: var(--ink-soft); font-size: 17.5px; margin-bottom: 38px; }

/* ---------------- Section heads ---------------- */
.exp-head { display: flex; align-items: baseline; gap: 16px; margin: 48px 0 22px; }
.exp-head h2 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600; font-size: 27px; color: var(--ink);
}
.exp-head .rule { flex: 1; border-top: 2px dashed var(--line); transform: translateY(-4px); position: relative; }
.exp-head .count { font-family: var(--mono); font-size: 12px; color: var(--ink-faint); letter-spacing: 0.06em; }

/* ---------------- Card grid ---------------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 28px;
  padding-bottom: 72px;
}
.hcard {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s;
  position: relative;
  display: block;
}
.hcard:hover { transform: translateY(-4px); box-shadow: var(--shadow-card); border-color: #cdc8b4; }
.ph-wrap {
  position: relative; overflow: hidden;
  aspect-ratio: 4 / 3; width: 100%;
  background: linear-gradient(150deg, #d8e2cf, #a9c09c);
}
.ph-wrap img.ph {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.65s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.hcard:hover .ph-wrap img.ph { transform: scale(1.055); }
.ph-empty {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(150deg, #d8e2cf, #a9c09c);
}
.ph-empty img { width: 52px; opacity: 0.3; filter: saturate(0.4); }
.hcard .body { padding: 15px 17px 17px; }
.hcard .row1 { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.hcard .apt {
  font-family: var(--mono); font-weight: 700; font-size: 13px;
  color: var(--brand-deep); background: var(--brand-wash);
  padding: 2px 8px; border-radius: 6px;
}
.hcard .dist { font-size: 12px; color: var(--ink-faint); }
.hcard .rate { margin-left: auto; font-size: 13px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.hcard .rate .star { color: var(--amber); }
.hcard .title { font-weight: 600; font-size: 15.5px; margin-bottom: 2px; }
.hcard .meta { font-size: 13px; color: var(--ink-soft); margin-bottom: 9px; }
.hcard .price { font-size: 15px; }
.hcard .price b { font-weight: 700; font-size: 16px; }
.hcard .price span { color: var(--ink-soft); font-size: 13px; }
.stamp {
  position: absolute; top: 10px; left: 10px;
  font-family: var(--mono); font-size: 10px; font-weight: 700;
  letter-spacing: 0.1em; color: #fff;
  background: rgba(30,77,38,0.85); backdrop-filter: blur(4px);
  padding: 4px 8px; border-radius: 6px;
  z-index: 2;
  display: inline-flex; align-items: center; gap: 4px;
}
.stamp .ic { vertical-align: 0; }
.fav-btn {
  position: absolute; top: 8px; right: 8px;
  width: 36px; height: 36px; border-radius: 50%;
  border: none; background: rgba(255,253,248,0.92);
  display: flex; align-items: center; justify-content: center;
  color: #7d8a7d;
  transition: transform 0.12s, color 0.15s;
  z-index: 2;
  box-shadow: 0 1px 4px rgba(29,43,31,0.15);
}
.fav-btn svg path { fill: transparent; transition: fill 0.15s; }
.fav-btn:hover { transform: scale(1.1); }
.fav-btn.on { color: var(--heart); }
.fav-btn.on svg path { fill: currentColor; }
.fav-btn.inline { position: static; box-shadow: none; background: none; width: 34px; height: 34px; }

/* ---------------- Listing detail ---------------- */
.listing { padding: 30px 0 88px; }
.crumb { font-size: 13.5px; color: var(--ink-soft); margin-bottom: 16px; }
.crumb a { color: var(--brand-deep); font-weight: 600; }
.crumb a:hover { text-decoration: underline; }
.listing h1.title {
  font-family: 'Fraunces', Georgia, serif; font-weight: 600;
  font-size: clamp(27px, 3.8vw, 40px); margin-bottom: 4px;
}
.listing .subline {
  color: var(--ink-soft); font-size: 15px; margin-bottom: 22px;
  display: flex; gap: 16px; flex-wrap: wrap; align-items: center;
}
.listing .subline .star { color: var(--amber); }
.listing .subline .instant { color: var(--brand-deep); font-weight: 650; display: inline-flex; align-items: center; gap: 5px; }

.gallery {
  display: grid; gap: 10px;
  grid-template-columns: 1.6fr 1fr;
  border-radius: 20px; overflow: hidden;
  height: 440px;
}
.gallery.solo { grid-template-columns: 1fr; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: filter 0.25s; }
.gallery img:hover { filter: brightness(1.06); }
.gallery .side { display: grid; gap: 10px; grid-template-rows: 1fr 1fr; min-height: 0; }
.gallery .side.four { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.gallery-empty {
  height: 320px; border-radius: 20px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(150deg, #d8e2cf, #a9c09c);
}
.gallery-empty img { width: 72px; opacity: 0.3; filter: saturate(0.4); }

.cols { display: grid; grid-template-columns: 1fr 384px; gap: 56px; margin-top: 38px; align-items: start; }

.host-line {
  display: flex; align-items: center; gap: 14px;
  padding-bottom: 24px; border-bottom: 2px dashed var(--line);
  margin-bottom: 24px;
}
.host-line .face { width: 50px; height: 50px; font-size: 16px; }
.host-line .who b { display: block; font-size: 16px; }
.host-line .who span { font-size: 13px; color: var(--ink-soft); }

.plate {
  border: 1.5px solid var(--ink);
  border-radius: 10px;
  font-family: var(--mono);
  margin: 6px 0 28px;
  overflow: hidden;
}
.plate .plate-head { background: var(--ink); color: var(--paper); font-size: 11px; letter-spacing: 0.18em; padding: 7px 14px; }
.plate .rows { display: grid; grid-template-columns: 1fr 1fr 1fr; }
.plate .cellp { padding: 13px 14px; border-top: 1px solid var(--line); border-right: 1px solid var(--line); }
.plate .cellp:nth-child(3n) { border-right: none; }
.plate .cellp .k { font-size: 10px; letter-spacing: 0.12em; color: var(--ink-faint); text-transform: uppercase; }
.plate .cellp .v { font-size: 15px; font-weight: 700; }

.amenity-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.chip {
  font-size: 13px; font-weight: 550; color: var(--brand-deep);
  background: var(--brand-wash); border: 1px solid #cfe6cf;
  padding: 6px 13px; border-radius: 999px;
}
.chip.toggle { background: var(--surface); color: var(--ink-soft); border-color: var(--line); cursor: pointer; transition: all 0.12s; }
.chip.toggle.on { background: var(--brand-wash); color: var(--brand-deep); border-color: #cfe6cf; }
.desc { color: var(--ink-soft); font-size: 15.5px; white-space: pre-wrap; margin-bottom: 32px; max-width: 64ch; }

.rev { border-top: 2px dashed var(--line); padding-top: 26px; }
.rev h3 { font-family: 'Fraunces', Georgia, serif; font-size: 21px; margin-bottom: 18px; }
.rev-item { margin-bottom: 20px; }
.rev-item .head { display: flex; gap: 10px; align-items: baseline; }
.rev-item .head b { font-size: 14.5px; }
.rev-item .head .stars { color: var(--amber); font-size: 13px; letter-spacing: 0.08em; }
.rev-item .head time { font-size: 12px; color: var(--ink-faint); }
.rev-item p { font-size: 14.5px; color: var(--ink-soft); margin-top: 3px; max-width: 60ch; }

/* booking / stay / owner side cards */
.bookcard {
  position: sticky; top: 88px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow-card);
  padding: 24px;
}
.bookcard .pricetop { font-size: 15px; margin-bottom: 16px; color: var(--ink-soft); }
.bookcard .pricetop b { font-size: 26px; font-family: 'Fraunces', Georgia, serif; color: var(--ink); }
.bookcard .dates {
  display: grid; grid-template-columns: 1fr 1fr;
  border: 1.5px solid var(--line); border-radius: 12px;
  overflow: hidden; margin-bottom: 16px;
  width: 100%; background: none; text-align: left;
  cursor: pointer;
  transition: border-color 0.15s;
}
.bookcard .dates:hover { border-color: var(--brand); }
.bookcard .dates .d { padding: 11px 13px; }
.bookcard .dates .d:first-child { border-right: 1.5px solid var(--line); }
.bookcard .dates label {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.12em;
  color: var(--ink-faint); text-transform: uppercase; display: block; cursor: pointer;
}
.bookcard .dates .val { font-size: 14px; font-weight: 600; }
.breakdown { font-size: 14px; color: var(--ink-soft); margin: 16px 0; }
.breakdown .li { display: flex; justify-content: space-between; padding: 3px 0; gap: 12px; }
.breakdown .li.total { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 10px; font-weight: 700; color: var(--ink); font-size: 15px; }
.breakdown .li.minus span:last-child { color: var(--danger); }
.btn-book {
  width: 100%; border: none; border-radius: 12px;
  background: var(--brand); color: #fff;
  font-size: 16px; font-weight: 700; padding: 15px;
  transition: background 0.15s, transform 0.1s;
}
.btn-book:hover { background: var(--brand-deep); }
.btn-book:active { transform: scale(0.99); }
.btn-book[disabled] { opacity: 0.55; cursor: not-allowed; }
.bookcard .note { font-size: 12.5px; color: var(--ink-faint); text-align: center; margin-top: 11px; }
.policy-tag {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--brand-deep);
  background: var(--brand-wash); border-radius: 10px;
  padding: 9px 12px; margin-top: 15px;
}
.staterow { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0; font-size: 14px; border-bottom: 1px solid var(--line-soft); }
.staterow:last-of-type { border-bottom: none; }
.staterow .k { color: var(--ink-soft); }
.staterow .v { font-weight: 600; text-align: right; }
.cardbtns { display: grid; gap: 9px; margin-top: 14px; }
.cardbtns .btn { width: 100%; padding: 12px; }

/* ---------------- Generic page / panels ---------------- */
.page { padding: 40px 0 88px; }
.page > .wrap > h1 {
  font-family: 'Fraunces', Georgia, serif; font-weight: 600;
  font-size: clamp(27px, 4vw, 38px); margin-bottom: 6px;
}
.page .lede { color: var(--ink-soft); margin-bottom: 30px; max-width: 70ch; }

.panel {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 20px;
  margin-bottom: 14px;
  display: flex; gap: 16px; align-items: center; flex-wrap: wrap;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.panel.click { cursor: pointer; }
.panel.click:hover { box-shadow: var(--shadow-card); border-color: #cdc8b4; }
.panel .thumb {
  width: 96px; height: 72px; border-radius: 10px; object-fit: cover;
  background: linear-gradient(150deg, #d8e2cf, #a9c09c); flex-shrink: 0;
}
.panel .info { flex: 1; min-width: 220px; }
.panel .info b { font-size: 15.5px; }
.panel .info .sub { font-size: 13.5px; color: var(--ink-soft); }
.panel .actions { display: flex; gap: 8px; flex-wrap: wrap; }

.status {
  font-family: var(--mono); font-size: 10.5px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 4px 9px; border-radius: 6px;
}
.status.confirmed, .status.approved, .status.active { background: var(--brand-wash); color: var(--brand-deep); }
.status.pending { background: var(--amber-wash); color: var(--amber); }
.status.cancelled, .status.declined, .status.rejected, .status.expired, .status.paused { background: var(--danger-wash); color: var(--danger); }
.status.completed { background: var(--line-soft); color: var(--ink-soft); }

.btn {
  border: none; border-radius: 10px; font-weight: 600; font-size: 14px;
  padding: 10px 16px; transition: filter 0.15s, transform 0.1s;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
}
.btn:hover { filter: brightness(0.94); }
.btn:active { transform: scale(0.98); }
.btn.primary { background: var(--brand); color: #fff; }
.btn.subtle { background: var(--line-soft); color: var(--ink); }
.btn.danger { background: var(--danger-wash); color: var(--danger); }
.btn.ghost { background: none; border: 1.5px solid var(--line); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

.empty { text-align: center; padding: 80px 20px; color: var(--ink-soft); }
.empty .art { color: var(--ink-faint); margin-bottom: 14px; display: flex; justify-content: center; }
.empty b { display: block; font-family: 'Fraunces', Georgia, serif; font-size: 22px; color: var(--ink); margin-bottom: 5px; }

/* stat cards (earnings) */
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 26px; }
.stat-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px 18px;
}
.stat-card.primary { background: var(--brand-deep); border-color: var(--brand-deep); color: #fff; }
.stat-card .k { font-size: 12.5px; color: var(--ink-faint); font-weight: 600; }
.stat-card.primary .k { color: rgba(255,255,255,0.7); }
.stat-card .v { font-family: 'Fraunces', Georgia, serif; font-size: 24px; font-weight: 600; margin-top: 2px; }

.connect-card {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: var(--surface); border: 1.5px dashed var(--line);
  border-radius: var(--radius); padding: 16px 18px; margin-bottom: 26px;
}
.connect-card.ok { border-style: solid; border-color: #cfe6cf; background: var(--brand-wash); }
.connect-card .info { flex: 1; min-width: 220px; }
.connect-card .info b { font-size: 15px; display: block; }
.connect-card .info span { font-size: 13.5px; color: var(--ink-soft); }

/* role chips for messages */
.role-chip {
  font-size: 11px; font-weight: 700; letter-spacing: 0.04em;
  padding: 2.5px 8px; border-radius: 6px; text-transform: uppercase;
  font-family: var(--mono);
}
.role-chip.hosting { background: var(--amber-wash); color: var(--amber); }
.role-chip.renting { background: var(--brand-wash); color: var(--brand-deep); }

/* ---------------- Messages (two-pane) ---------------- */
.msg-shell {
  display: grid; grid-template-columns: 350px 1fr;
  border: 1px solid var(--line); border-radius: 18px;
  background: var(--surface); overflow: hidden;
  height: calc(100vh - 240px); min-height: 460px;
}
.msg-list { border-right: 1px solid var(--line); overflow-y: auto; padding: 8px; }
.titem {
  display: flex; gap: 12px; align-items: center;
  padding: 12px; border-radius: 12px; cursor: pointer;
  transition: background 0.12s;
  width: 100%; border: none; background: none; text-align: left;
}
.titem:hover { background: var(--line-soft); }
.titem.active { background: var(--brand-wash); }
.titem .face { width: 42px; height: 42px; font-size: 14px; }
.titem .mid { flex: 1; min-width: 0; }
.titem .topline { display: flex; align-items: center; gap: 7px; }
.titem .topline b { font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.titem .topline time { margin-left: auto; font-size: 11.5px; color: var(--ink-faint); flex-shrink: 0; }
.titem .preview {
  font-size: 13px; color: var(--ink-soft);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  display: flex; align-items: center; gap: 6px;
}
.titem .preview .apt { font-family: var(--mono); color: var(--brand-deep); font-weight: 600; flex-shrink: 0; }
.titem.unread .preview, .titem.unread .topline b { font-weight: 700; color: var(--ink); }
.titem .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--brand); flex-shrink: 0; }

.msg-pane { display: flex; flex-direction: column; min-width: 0; }
.pane-head {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 18px; border-bottom: 1px solid var(--line);
}
.pane-head .face { width: 38px; height: 38px; }
.pane-head .who { min-width: 0; }
.pane-head .who b { font-size: 15px; display: block; }
.pane-head .who span { font-size: 12.5px; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.pane-head .spacer { flex: 1; }
.pane-head .backbtn { display: none; }
.pane-scroll { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 4px; }
.date-sep {
  text-align: center; font-size: 11.5px; color: var(--ink-faint);
  font-weight: 600; margin: 14px 0 8px;
}
.bubble { max-width: 70%; padding: 9px 14px; border-radius: 16px; font-size: 14.5px; margin-bottom: 2px; }
.bubble.me { align-self: flex-end; background: var(--brand); color: #fff; border-bottom-right-radius: 5px; }
.bubble.them { align-self: flex-start; background: var(--line-soft); border-bottom-left-radius: 5px; }
.receipt {
  align-self: flex-end; font-size: 11px; color: var(--ink-faint);
  margin: 1px 6px 4px 0;
}
.typing { align-self: flex-start; background: var(--line-soft); border-radius: 16px; border-bottom-left-radius: 5px; padding: 12px 14px; display: inline-flex; gap: 4px; }
.typing i {
  width: 7px; height: 7px; border-radius: 50%; background: var(--ink-faint);
  animation: tdot 1.2s infinite ease-in-out;
}
.typing i:nth-child(2) { animation-delay: 0.15s; }
.typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes tdot { 0%, 60%, 100% { transform: translateY(0); opacity: 0.5; } 30% { transform: translateY(-4px); opacity: 1; } }
.composer { display: flex; gap: 10px; padding: 13px; border-top: 1px solid var(--line); }
.composer input {
  flex: 1; border: 1.5px solid var(--line); border-radius: 999px;
  padding: 10px 18px; outline: none; background: var(--paper);
  transition: border-color 0.15s;
}
.composer input:focus { border-color: var(--brand); }
.composer .btn { border-radius: 999px; padding: 10px 18px; }
.msg-none {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: var(--ink-soft); gap: 8px; padding: 30px; text-align: center;
}

/* ---------------- Filters ---------------- */
.results-bar { display: flex; align-items: center; gap: 12px; margin: 26px 0 4px; }
.filter-pop { padding: 18px; width: 360px; max-height: 70vh; overflow-y: auto; }
.fgroup { margin-bottom: 16px; }
.fgroup > label { display: block; font-size: 12.5px; font-weight: 700; margin-bottom: 8px; color: var(--ink); }
.fgroup .chips { display: flex; flex-wrap: wrap; gap: 7px; }
.frange { display: flex; align-items: center; gap: 8px; }
.frange input {
  width: 100%; border: 1.5px solid var(--line); border-radius: 10px;
  padding: 9px 11px; background: var(--paper); outline: none;
}
.frange input:focus { border-color: var(--brand); }
.frow { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0; font-size: 14px; font-weight: 550; }
.fpop-foot { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line-soft); padding-top: 13px; margin-top: 4px; }
.linkbtn { border: none; background: none; color: var(--brand-deep); font-weight: 650; font-size: 13.5px; padding: 4px; }
.linkbtn:hover { text-decoration: underline; }
.fbadge {
  background: var(--brand-deep); color: #fff; border-radius: 999px;
  font-size: 11px; font-weight: 700; min-width: 18px; height: 18px;
  display: inline-flex; align-items: center; justify-content: center; padding: 0 5px;
}

/* Apple-style switch */
.switch { position: relative; width: 44px; height: 26px; flex-shrink: 0; }
.switch input { opacity: 0; width: 100%; height: 100%; position: absolute; cursor: pointer; z-index: 2; margin: 0; }
.switch .knob {
  position: absolute; inset: 0; border-radius: 999px;
  background: #d4d0c0; transition: background 0.18s;
}
.switch .knob::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 22px; height: 22px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
  transition: transform 0.18s;
}
.switch input:checked + .knob { background: var(--brand); }
.switch input:checked + .knob::after { transform: translateX(18px); }

/* ---------------- Aircraft (profile + booking) ---------------- */
.plane-row {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 0; border-bottom: 1px solid var(--line-soft);
}
.plane-row:last-of-type { border-bottom: none; }
.plane-row .picon { color: var(--brand); display: inline-flex; }
.plane-row .pmain { flex: 1; min-width: 0; }
.plane-row .pmain b { font-size: 14.5px; display: block; }
.plane-row .pmain span { font-size: 12.5px; color: var(--ink-soft); }
.plane-row .pbadge {
  font-size: 10.5px; font-weight: 700; font-family: var(--mono);
  color: var(--brand-deep); background: var(--brand-wash);
  padding: 2.5px 7px; border-radius: 6px; letter-spacing: 0.06em;
}
.plane-row .pacts { display: flex; gap: 4px; }
.iconbtn {
  width: 32px; height: 32px; border-radius: 9px; border: none;
  background: none; color: var(--ink-faint);
  display: inline-flex; align-items: center; justify-content: center;
  transition: background 0.12s, color 0.12s;
}
.iconbtn:hover { background: var(--line-soft); color: var(--ink); }
.iconbtn.danger:hover { background: var(--danger-wash); color: var(--danger); }

.unit-input { position: relative; }
.unit-input input { padding-right: 34px !important; }
.unit-input::after {
  content: "ft"; position: absolute; right: 12px; top: 50%;
  transform: translateY(-50%);
  font-size: 13px; color: var(--ink-faint); font-weight: 600;
  pointer-events: none;
}

.plane-pick { border: 1.5px solid var(--line); border-radius: 12px; overflow: hidden; margin-bottom: 14px; }
.plane-pick .prow {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 14px; cursor: pointer;
  border-bottom: 1px solid var(--line-soft);
  transition: background 0.12s;
}
.plane-pick .prow:last-child { border-bottom: none; }
.plane-pick .prow:hover { background: var(--paper); }
.plane-pick .prow.sel { background: var(--brand-wash); }
.plane-pick .prow.nofit { opacity: 0.55; cursor: not-allowed; }
.plane-pick .radio {
  width: 18px; height: 18px; border-radius: 50%;
  border: 1.7px solid var(--line); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.plane-pick .prow.sel .radio { border-color: var(--brand); }
.plane-pick .prow.sel .radio::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); }
.plane-pick .pmeta { flex: 1; min-width: 0; }
.plane-pick .pmeta b { font-size: 14px; display: block; }
.plane-pick .pmeta span { font-size: 12.5px; color: var(--ink-soft); }
.plane-pick .fitnote { font-size: 11.5px; font-weight: 700; color: var(--danger); flex-shrink: 0; }

/* guest detail modal bits */
.guest-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.guest-head .face { width: 56px; height: 56px; font-size: 18px; }
.guest-head .gwho b { font-size: 17px; display: block; }
.guest-head .gwho span { font-size: 13.5px; color: var(--ink-soft); display: inline-flex; align-items: center; gap: 4px; }
.guest-head .gwho .star { color: var(--amber); }

/* ---------------- Forms / modals ---------------- */
.overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(29,43,31,0.45);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  animation: fadeUp 0.2s ease both;
}
.modal {
  background: var(--surface); border-radius: 22px;
  box-shadow: var(--shadow-pop);
  width: 100%; max-width: 440px;
  max-height: 90vh; overflow-y: auto;
  padding: 30px;
  position: relative;
}
.modal.wide { max-width: 560px; }
.modal h2 { font-family: 'Fraunces', Georgia, serif; font-size: 25px; margin-bottom: 4px; }
.modal .sub { color: var(--ink-soft); font-size: 14px; margin-bottom: 20px; }
.modal .x {
  position: absolute; top: 14px; right: 14px;
  border: none; background: var(--line-soft); border-radius: 50%;
  width: 32px; height: 32px; color: var(--ink-soft);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
}
.modal .x:hover { background: var(--line); }
.field-g { margin-bottom: 14px; }
.field-g label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; }
.field-g input, .field-g textarea, .field-g select {
  width: 100%; border: 1.5px solid var(--line); border-radius: 10px;
  padding: 11px 13px; outline: none; background: var(--paper);
  transition: border-color 0.15s;
}
.field-g input:focus, .field-g textarea:focus { border-color: var(--brand); }
.form-err { color: var(--danger); font-size: 13.5px; min-height: 18px; margin-top: 8px; }
.form-err.ok { color: var(--brand-deep); }
.switch-auth { text-align: center; font-size: 13.5px; color: var(--ink-soft); margin-top: 16px; }
.switch-auth button { border: none; background: none; color: var(--brand-deep); font-weight: 700; font-size: 13.5px; }
.switch-auth button:hover { text-decoration: underline; }

.coi-banner {
  border: 1.5px dashed var(--amber); background: #fdf6e3;
  border-radius: 12px; padding: 14px 16px; font-size: 14px; margin-bottom: 16px;
}
.coi-banner b { display: block; margin-bottom: 2px; }

#payment-element { margin: 14px 0; }

.summary-mini {
  background: var(--paper); border-radius: 12px; padding: 14px 16px;
  font-size: 14px; margin-bottom: 14px;
}
.summary-mini .li { display: flex; justify-content: space-between; padding: 2px 0; }
.summary-mini .li.total { font-weight: 700; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 8px; }

.agree { display: flex; align-items: flex-start; gap: 9px; font-size: 13px; color: var(--ink-soft); margin: 14px 0; cursor: pointer; }
.agree input { margin-top: 3px; accent-color: var(--brand); }

/* ---------------- Skeleton / toast / footer ---------------- */
.skel { border-radius: var(--radius); background: linear-gradient(100deg, #e9e6d8 40%, #f2efe3 50%, #e9e6d8 60%); background-size: 200% 100%; animation: sk 1.4s infinite; }
@keyframes sk { to { background-position: -200% 0; } }
.skel.card { height: 320px; }

#toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: var(--paper);
  font-size: 14px; font-weight: 550;
  padding: 12px 24px; border-radius: 999px;
  box-shadow: var(--shadow-pop);
  opacity: 0; pointer-events: none; transition: 0.25s ease;
  z-index: 200; max-width: 90vw; text-align: center;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.app-footer {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding: 28px 0;
  font-size: 13px; color: var(--ink-faint);
}
.app-footer .wrap { display: flex; gap: 22px; flex-wrap: wrap; align-items: center; }
.app-footer a { color: var(--ink-soft); transition: color 0.15s; }
.app-footer a:hover { color: var(--brand-deep); }
.app-footer .right { margin-left: auto; font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; }

/* ---------------- Responsive ---------------- */
@media (max-width: 980px) {
  .stat-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 920px) {
  .cols { grid-template-columns: 1fr; }
  .bookcard { position: static; }
  .gallery { grid-template-columns: 1fr; height: auto; }
  .gallery .main { aspect-ratio: 16 / 10; }
  .gallery .side { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr; }
  .gallery .side img { aspect-ratio: 4 / 3; }
  .gallery .side.four { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr; }
  .gallery .side.four img:nth-child(n+3) { display: none; }
  .wrap { padding: 0 22px; }
}
@media (max-width: 860px) {
  .msg-shell { grid-template-columns: 1fr; height: calc(100vh - 200px); }
  .msg-shell.thread-open .msg-list { display: none; }
  .msg-shell:not(.thread-open) .msg-pane { display: none; }
  .msg-list { border-right: none; }
  .pane-head .backbtn {
    display: inline-flex; border: none; background: none;
    color: var(--brand-deep); padding: 6px; border-radius: 8px;
  }
  .pane-head .backbtn:hover { background: var(--line-soft); }
}
@media (max-width: 760px) {
  .console .go span { display: none; }
  .console .go { width: 48px; padding: 0; }
}
@media (max-width: 700px) {
  .console { flex-direction: column; border-radius: 22px; }
  .console .cell { border-radius: 14px; padding: 12px 18px; border-bottom: 1px solid var(--line-soft); }
  .console .cell::after { display: none; }
  .console .go { align-self: stretch; width: auto; border-radius: 14px; margin: 10px; height: 48px; }
  .console .go span { display: inline; }
  .app-nav a:not(.keep), .app-nav .hide-sm { display: none; }
  .plate .rows { grid-template-columns: 1fr 1fr; }
  .plate .cellp:nth-child(3n) { border-right: 1px solid var(--line); }
  .plate .cellp:nth-child(2n) { border-right: none; }
  .hero-flight { display: none; }
  .stat-row { grid-template-columns: 1fr 1fr; gap: 10px; }
}
