@font-face {
  font-family: "Overpass";
  src: url("fonts/overpass-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Overpass";
  src: url("fonts/overpass-latin-ext-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --night: #060c1c;
  --deep: #0b1531;
  --surface: #0f1c3d;
  --raised: #16295a;
  --line: rgba(169, 210, 247, 0.14);
  --line-strong: rgba(169, 210, 247, 0.3);
  --sky: #a9d2f7;
  --sky-pale: #e3f1fe;
  --text: #eef5fd;
  --muted: #9aaecb;
  --faint: #6f84a6;
  --amber: #f29a2e;
  --amber-ink: #1a1006;
  --warn: #ffc77a;
  --radius-panel: 22px;
  --radius-card: 16px;
  --radius-ctl: 12px;
  --rail-w: 244px;
  --tab-w: 380px;
  --gutter: clamp(16px, 3.2vw, 40px);
  --font: "Overpass", "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background-color: var(--night);
  background-image:
    radial-gradient(900px 700px at 105% 18%, rgba(74, 132, 204, 0.32), transparent 62%),
    radial-gradient(700px 600px at -10% 100%, rgba(40, 80, 150, 0.18), transparent 60%);
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; }
a { color: var(--sky); }
:focus-visible { outline: 2px solid var(--sky); outline-offset: 3px; border-radius: 6px; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--sky); color: var(--night); padding: 10px 14px; border-radius: 10px; font-weight: 700; text-decoration: none;
}
.skip:focus { top: 12px; }

/* ---------- Layout ---------- */
.shell {
  display: grid;
  grid-template-columns: var(--rail-w) minmax(0, 1fr) var(--tab-w);
  min-height: 100vh;
}
.rail {
  position: sticky; top: 0; height: 100vh;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(11, 21, 49, 0.85), rgba(6, 12, 28, 0.6));
}
.rail-inner { height: 100%; overflow-y: auto; padding: 28px 18px 32px 22px; }
.main { padding: 34px var(--gutter) 80px; min-width: 0; outline: none; }
.tab {
  position: sticky; top: 0; height: 100vh;
  border-left: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(15, 28, 61, 0.92), rgba(11, 21, 49, 0.96));
}
.tab-inner { height: 100%; display: flex; flex-direction: column; padding: 26px 22px 22px; overflow: hidden; }

/* ---------- Rail ---------- */
.client-logo { height: 30px; width: auto; margin-bottom: 30px; }
.client-logo--top { display: none; height: 26px; margin: 0; }
.rail-group + .rail-group { margin-top: 26px; }
.rail-group-title {
  font-size: 13px; font-weight: 600; color: var(--faint); margin: 0 0 8px 10px; letter-spacing: 0.01em;
}
.rail-market { font-size: 12.5px; color: var(--muted); margin: 12px 0 4px 10px; }
.rail-link {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
  width: 100%; text-align: left; background: none; border: 0; cursor: pointer;
  padding: 9px 10px; border-radius: 10px; color: var(--text); font-size: 15px; font-weight: 500;
}
.rail-link:hover { background: rgba(169, 210, 247, 0.07); }
.rail-link[aria-current="page"] { background: rgba(169, 210, 247, 0.13); color: var(--sky-pale); font-weight: 700; }
.rail-link .n { font-size: 12.5px; color: var(--faint); font-weight: 500; white-space: nowrap; }
.rail-link .picked { color: var(--sky); font-weight: 700; }
.rail-sections { margin: 4px 0 6px 12px; padding-left: 10px; border-left: 1px solid var(--line); }
.rail-sec {
  display: block; padding: 5px 8px; color: var(--muted); font-size: 13.5px; text-decoration: none; border-radius: 8px;
}
.rail-sec:hover { color: var(--text); background: rgba(169, 210, 247, 0.06); }
.rail-empty { color: var(--faint); font-size: 13.5px; margin: 0 10px; }

/* ---------- Masthead ---------- */
.masthead { max-width: 900px; margin-bottom: 30px; }
.masthead-top { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.prepared { margin: 0; color: var(--muted); font-size: 14px; }
.prepared strong { color: var(--text); font-weight: 600; }
.title {
  margin: 0 0 10px; font-size: clamp(30px, 4.2vw, 46px); line-height: 1.05; font-weight: 800; letter-spacing: -0.015em;
  background: linear-gradient(100deg, #ffffff 15%, var(--sky) 85%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lede { margin: 0 0 24px; color: var(--muted); font-size: 16.5px; max-width: 62ch; }

.switch {
  display: inline-flex; padding: 4px; gap: 4px; border-radius: 999px;
  background: rgba(6, 12, 28, 0.6); border: 1px solid var(--line);
}
.switch button {
  border: 0; background: none; cursor: pointer; border-radius: 999px; padding: 9px 18px 8px;
  font-size: 15px; font-weight: 600; color: var(--muted); display: inline-flex; gap: 8px; align-items: baseline;
}
.switch button .n { font-weight: 500; font-size: 13px; color: var(--faint); }
.switch button[aria-selected="true"] { background: var(--sky); color: var(--night); }
.switch button[aria-selected="true"] .n { color: rgba(6, 12, 28, 0.65); }

.chips { display: none; gap: 8px; margin-top: 14px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; border: 1px solid var(--line-strong); background: none; border-radius: 999px; padding: 8px 14px 7px;
  font-size: 14.5px; font-weight: 600; color: var(--text); cursor: pointer; white-space: nowrap;
}
.chip[aria-current="page"] { background: rgba(169, 210, 247, 0.16); border-color: var(--sky); color: var(--sky-pale); }
.chip .picked { color: var(--sky); margin-left: 6px; }

/* ---------- Proposal ---------- */
.prop-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.prop-title { margin: 0; font-size: clamp(24px, 2.6vw, 30px); font-weight: 800; letter-spacing: -0.01em; line-height: 1.15; }
.prop-meta { margin: 4px 0 0; color: var(--muted); font-size: 15px; }
.jump { display: flex; gap: 6px; flex-wrap: wrap; margin: 18px 0 8px; }
.jump a {
  font-size: 13.5px; color: var(--muted); text-decoration: none; padding: 6px 12px 5px; border-radius: 999px;
  border: 1px solid var(--line);
}
.jump a:hover { color: var(--text); border-color: var(--line-strong); }

.section { padding-top: 34px; scroll-margin-top: 16px; }
.section-head {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 12px 20px; margin-bottom: 16px;
}
.section-title { margin: 0; font-size: 21px; font-weight: 700; line-height: 1.2; }
.section-title .n { color: var(--faint); font-weight: 500; font-size: 16px; margin-left: 8px; }
.section-note { margin: 4px 0 0; color: var(--muted); font-size: 14.5px; max-width: 64ch; }
.section-tools { display: flex; gap: 8px; align-items: center; }

.map-thumb {
  display: block; width: 100%; margin: 0 0 18px; padding: 0; border: 1px solid var(--line);
  border-radius: var(--radius-card); overflow: hidden; background: var(--deep); cursor: zoom-in; position: relative;
}
.map-thumb img { width: 100%; height: 220px; object-fit: cover; }
.map-thumb span {
  position: absolute; left: 12px; bottom: 12px; background: rgba(6, 12, 28, 0.82); color: var(--text);
  font-size: 13px; padding: 6px 10px 5px; border-radius: 8px;
}

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

.card {
  position: relative; display: flex; flex-direction: column; border-radius: var(--radius-card);
  background: linear-gradient(180deg, rgba(22, 41, 90, 0.55), rgba(15, 28, 61, 0.7));
  border: 1px solid var(--line); overflow: hidden; min-width: 0;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.card.is-picked { border-color: var(--sky); box-shadow: 0 0 0 1px var(--sky), 0 10px 30px -14px rgba(169, 210, 247, 0.55); }
.card-photo { display: block; border: 0; padding: 0; background: var(--deep); cursor: zoom-in; aspect-ratio: 16 / 10; overflow: hidden; }
.card-photo img { width: 100%; height: 100%; object-fit: cover; }
.card-photo.is-map img { object-fit: contain; background: #e9eef3; }
.picked-flag {
  position: absolute; top: 10px; right: 10px; display: none; align-items: center; gap: 6px;
  background: var(--sky); color: var(--night); font-weight: 700; font-size: 13px; padding: 5px 10px 4px 8px; border-radius: 999px;
}
.picked-flag svg { width: 15px; height: 15px; stroke-width: 2.6; }
.card.is-picked .picked-flag { display: inline-flex; }

.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-id { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.unit-no { font-size: 27px; font-weight: 800; line-height: 1; letter-spacing: -0.01em; color: #fff; }
.unit-no--name { font-size: 20px; line-height: 1.15; }
.medium-tag {
  font-size: 12.5px; font-weight: 600; color: var(--muted); border: 1px solid var(--line-strong); border-radius: 999px; padding: 3px 9px 2px; white-space: nowrap;
}
.medium-tag--digital { color: var(--sky-pale); border-color: rgba(169, 210, 247, 0.55); background: rgba(169, 210, 247, 0.1); }
.card-format { margin: -4px 0 0; color: var(--muted); font-size: 14px; }
.card-desc {
  margin: 0; color: #c9d7ea; font-size: 14px; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; margin: 2px 0 0; }
.facts div { min-width: 0; }
.facts dt { font-size: 12.5px; color: var(--faint); }
.facts dd { margin: 1px 0 0; font-size: 15px; font-weight: 600; color: var(--text); overflow-wrap: anywhere; }
.facts .wide { grid-column: 1 / -1; }
.facts .rate dd { font-size: 17px; font-weight: 800; color: #fff; }

.card-actions { display: flex; gap: 8px; margin-top: auto; padding-top: 4px; }

/* Airport additions */
.pin-dot {
  display: inline-flex; align-items: center; justify-content: center; vertical-align: 0.12em;
  min-width: 24px; height: 24px; padding: 0 6px; margin-right: 9px; border-radius: 999px;
  background: var(--pin); color: #0f1c2e; font-size: 13px; font-weight: 800; letter-spacing: 0;
}
.detail-title .pin-dot { min-width: 28px; height: 28px; font-size: 15px; vertical-align: 0.18em; }
.rec-flag {
  position: absolute; top: 10px; left: 10px; background: #a78bfa; color: #160b33; font-weight: 700; font-size: 13px;
  padding: 5px 10px 4px; border-radius: 999px; pointer-events: none;
}
.rec-flag--inline { position: static; display: inline-block; margin-bottom: 8px; }
.more { color: var(--faint); font-weight: 500; }
.windows-label { margin: 0; font-size: 12.5px; color: var(--faint); }
.highlights { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 20px 0 0; }
.hl { padding: 16px 18px; border-radius: var(--radius-card); background: rgba(15, 28, 61, 0.65); border: 1px solid var(--line); }
.hl p { margin: 0; }
.hl-value {
  font-size: 30px; font-weight: 800; line-height: 1.05; letter-spacing: -0.01em;
  background: linear-gradient(95deg, #ffffff 10%, var(--sky) 90%); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hl-label { font-size: 13px; font-weight: 700; color: var(--sky-pale); margin-top: 6px !important; }
.hl-text { font-size: 14px; color: var(--muted); line-height: 1.45; margin-top: 4px !important; }
.prop-intro { margin: 16px 0 0; font-size: 16px; color: #d3e0f0; max-width: 70ch; }
.prop-terms { margin: 6px 0 0; font-size: 13px; color: var(--faint); max-width: 70ch; }
.prop-tools { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; margin-top: 14px; }
.prop-tools .jump { margin: 4px 0 0; flex: 1 1 420px; }
.rec-toggle {
  display: inline-flex; align-items: center; gap: 10px; background: none; border: 1px solid var(--line-strong); border-radius: 999px;
  padding: 7px 14px 6px 8px; cursor: pointer; font-size: 14px; font-weight: 600; color: var(--text); white-space: nowrap; min-height: 40px;
}
.rec-toggle .n { color: var(--faint); font-weight: 500; }
.rec-switch { width: 34px; height: 20px; border-radius: 999px; background: rgba(169, 210, 247, 0.18); position: relative; flex: none; transition: background 0.18s ease; }
.rec-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--sky-pale); transition: transform 0.18s ease; }
.rec-toggle[aria-pressed="true"] { border-color: #a78bfa; }
.rec-toggle[aria-pressed="true"] .rec-switch { background: #a78bfa; }
.rec-toggle[aria-pressed="true"] .rec-switch::after { transform: translateX(14px); background: #160b33; }
.map-thumb--plan { background: #0b1630; }
.map-thumb--plan img { height: auto; max-height: 420px; object-fit: contain; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px;
  padding: 10px 16px 9px; border-radius: var(--radius-ctl); border: 1px solid transparent; cursor: pointer;
  font-size: 15px; font-weight: 700; text-decoration: none; white-space: nowrap;
}
.btn--add { flex: 1; background: rgba(169, 210, 247, 0.12); border-color: rgba(169, 210, 247, 0.4); color: var(--sky-pale); }
.btn--add:hover { background: rgba(169, 210, 247, 0.2); }
.btn--add[aria-pressed="true"] { background: var(--sky); color: var(--night); border-color: var(--sky); }
.btn--map { background: var(--amber); color: #fff; border-radius: 999px; padding: 9px 16px 8px; font-size: 14px; min-height: 44px; text-shadow: 0 1px 0 rgba(120, 60, 0, 0.35); }
.btn--map:hover { filter: brightness(1.07); }
.btn--map svg { width: 16px; height: 16px; stroke-width: 2.1; }
.btn--sm { min-height: 36px; padding: 7px 14px 6px; font-size: 13.5px; }
.btn--primary { background: var(--sky); color: var(--night); width: 100%; }
.btn--primary:hover { background: var(--sky-pale); }
.btn--ghost { border-color: var(--line-strong); color: var(--text); background: rgba(169, 210, 247, 0.05); width: 100%; }
.btn--ghost:hover { border-color: var(--sky); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.45; pointer-events: none; }
.link { background: none; border: 0; padding: 6px 2px; color: var(--muted); font-size: 14px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(154, 174, 203, 0.45); }
.link:hover { color: var(--text); }

/* ---------- Tab ---------- */
.tab-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.tab-title { margin: 0; font-size: 22px; font-weight: 800; }
.tab-close { display: none; background: none; border: 1px solid var(--line-strong); color: var(--text); width: 40px; height: 40px; border-radius: 12px; cursor: pointer; align-items: center; justify-content: center; }

.weeks-default {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 14px 14px 14px 16px; border-radius: 16px; background: rgba(6, 12, 28, 0.45); border: 1px solid var(--line);
}
.wd-text { display: flex; flex-direction: column; min-width: 0; }
.wd-label { font-weight: 700; font-size: 15px; }
.wd-help { font-size: 12.5px; color: var(--muted); line-height: 1.35; margin-top: 2px; }

.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line-strong); border-radius: 12px; background: rgba(6, 12, 28, 0.5); flex: none; }
.stepper button {
  width: 34px; height: 34px; border: 0; background: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; color: var(--sky-pale); border-radius: 10px;
}
.stepper button:hover { background: rgba(169, 210, 247, 0.12); }
.stepper button[disabled] { opacity: 0.3; cursor: default; background: none; }
.stepper button svg { width: 16px; height: 16px; stroke-width: 2.2; }
.stepper input {
  width: 34px; border: 0; background: none; color: var(--text); text-align: center; font: inherit; font-weight: 700; font-size: 15px; padding: 2px 0 0;
  -moz-appearance: textfield; appearance: textfield;
}
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper .unit { font-size: 12.5px; color: var(--muted); padding-right: 6px; }
.stepper--lg button { width: 40px; height: 40px; }
.stepper--lg input { width: 40px; font-size: 18px; }

.lines { flex: 1; overflow-y: auto; margin: 16px -8px 0; padding: 0 8px; overscroll-behavior: contain; }
.lines-empty { color: var(--muted); font-size: 14.5px; padding: 22px 4px; }
.lines-empty strong { color: var(--text); display: block; font-size: 16px; margin-bottom: 4px; }
.line-group + .line-group { margin-top: 14px; }
.line-group-title { font-size: 13px; color: var(--faint); font-weight: 600; margin: 0 0 6px; }
.line {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; align-items: center;
  padding: 12px 0; border-bottom: 1px solid var(--line);
}
.line-name { font-weight: 700; font-size: 15px; line-height: 1.25; }
.line-sub { font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.line-price { font-weight: 800; font-size: 16px; text-align: right; white-space: nowrap; }
.line-controls { display: flex; align-items: center; gap: 8px; }
.line-remove {
  background: none; border: 0; color: var(--faint); cursor: pointer; width: 34px; height: 34px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center;
}
.line-remove:hover { color: var(--text); background: rgba(169, 210, 247, 0.08); }
.line-note { grid-column: 1 / -1; font-size: 12.5px; color: var(--warn); line-height: 1.35; }
.line-note--info { color: var(--muted); }
.line-reset { font-size: 12.5px; padding: 0; }

.total-block { border-top: 1px solid var(--line-strong); padding-top: 14px; margin-top: 4px; }
.total-row { display: flex; justify-content: space-between; align-items: baseline; }
.total-label { font-weight: 600; font-size: 14.5px; color: var(--muted); }
.total-count { font-size: 13.5px; color: var(--faint); }
.total {
  display: block; font-size: clamp(38px, 3.4vw, 46px); font-weight: 800; line-height: 1.05; letter-spacing: -0.02em; margin: 4px 0 8px;
  background: linear-gradient(95deg, #ffffff 10%, var(--sky) 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.total-note { margin: 0; font-size: 12.5px; color: var(--muted); line-height: 1.45; }

.actions { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.actions-minor { display: flex; justify-content: space-between; }

/* ---------- Dock (mobile) ---------- */
.dock {
  display: none; position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 30;
  align-items: center; gap: 12px; border: 1px solid var(--line-strong); border-radius: 18px; cursor: pointer;
  padding: 12px 12px 12px 18px; background: rgba(15, 28, 61, 0.94); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.7); text-align: left;
}
.dock-count { font-size: 14px; color: var(--muted); flex: 1; min-width: 0; }
.dock-total { font-size: 20px; font-weight: 800; }
.dock-cta { background: var(--sky); color: var(--night); font-weight: 700; font-size: 14.5px; padding: 10px 14px 9px; border-radius: 12px; }
.scrim { position: fixed; inset: 0; background: rgba(3, 7, 18, 0.62); z-index: 39; }

/* ---------- Detail dialog ---------- */
.detail {
  width: min(1040px, calc(100vw - 24px)); max-height: calc(100vh - 24px); padding: 0; border: 1px solid var(--line-strong);
  border-radius: var(--radius-panel); background: var(--deep); color: var(--text); overflow: hidden;
}
.detail::backdrop { background: rgba(3, 7, 18, 0.75); }
.detail-body { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); max-height: calc(100vh - 26px); }
.detail-media { background: #050b1a; display: flex; flex-direction: column; justify-content: center; overflow-y: auto; }
.detail-media img { width: 100%; height: auto; }
.detail-media img + img { border-top: 1px solid var(--line); }
.detail-media.is-map img { background: #e9eef3; }
.detail-info { padding: 22px 24px 24px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.detail-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.detail-title { margin: 0; font-size: 28px; font-weight: 800; line-height: 1.1; }
.detail-format { margin: 4px 0 0; color: var(--muted); }
.detail-close--float { display: none; }
.detail-close {
  background: none; border: 1px solid var(--line-strong); color: var(--text); width: 40px; height: 40px; flex: none;
  border-radius: 12px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.detail-desc { margin: 0; color: #d3e0f0; font-size: 15.5px; }
.detail .facts dd { font-size: 16px; }
.windows { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; }
.windows li { font-weight: 600; }
.stats { display: flex; gap: 18px; flex-wrap: wrap; }
.stats div { font-size: 13px; color: var(--faint); }
.stats strong { display: block; font-size: 18px; color: var(--text); }
.detail-actions { display: flex; gap: 10px; margin-top: auto; padding-top: 8px; }
.detail-actions .btn--add { flex: 1; }

/* ---------- Map lightbox ---------- */
.lightbox-img { width: 100%; height: auto; max-height: calc(100vh - 130px); object-fit: contain; background: #e9eef3; }
.lightbox-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; }
.lightbox-bar h3 { margin: 0; font-size: 18px; }
.detail.is-lightbox .detail-body { display: block; overflow-y: auto; }

/* ---------- Footer, toast, empty ---------- */
.foot { margin-top: 64px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; max-width: 900px; }
.foot p { margin: 0 0 4px; }
.foot a { color: var(--sky-pale); }
.empty {
  border: 1px dashed var(--line-strong); border-radius: var(--radius-panel); padding: 36px 28px; color: var(--muted); max-width: 640px;
}
.empty h2 { color: var(--text); margin: 0 0 6px; font-size: 20px; }
.empty p { margin: 0; }
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; z-index: 60;
  background: var(--sky-pale); color: var(--night); font-weight: 700; font-size: 14.5px; padding: 11px 16px 10px; border-radius: 12px;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Responsive ---------- */
@media (min-width: 1680px) {
  :root { --rail-w: 268px; --tab-w: 420px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
}

@media (max-width: 1239px) {
  .shell { grid-template-columns: minmax(0, 1fr) var(--tab-w); }
  :root { --tab-w: 350px; }
  .rail { display: none; }
  .client-logo--top { display: block; }
  .chips { display: flex; }
  .weeks-default { flex-wrap: wrap; }
}

@media (max-width: 1100px) and (min-width: 561px) {
  .highlights { grid-template-columns: 1fr; }
  .hl { display: grid; grid-template-columns: 120px 1fr; column-gap: 16px; }
  .hl-value { grid-row: span 2; }
  .hl-label { margin-top: 0 !important; }
  .hl-text { grid-column: 2; }
}

@media (max-width: 979px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .main { padding-top: 22px; padding-bottom: 120px; }
  .tab {
    position: fixed; left: 0; right: 0; bottom: 0; top: auto; height: auto; max-height: 88vh; z-index: 40;
    border-left: 0; border-top: 1px solid var(--line-strong); border-radius: 22px 22px 0 0;
    transform: translateY(105%); transition: transform 0.28s cubic-bezier(.2, .8, .2, 1); visibility: hidden;
    background: var(--deep);
  }
  .tab.open { transform: none; visibility: visible; }
  .tab-inner { max-height: 88vh; overflow-y: auto; overscroll-behavior: contain; padding: 18px 18px calc(18px + env(safe-area-inset-bottom)); }
  .lines { flex: none; overflow: visible; margin: 12px 0 0; padding: 0; }
  .toast { bottom: calc(96px + env(safe-area-inset-bottom)); width: max-content; max-width: calc(100vw - 32px); text-align: center; }
  .tab-close { display: inline-flex; }
  .dock { display: flex; }
  .detail-body { grid-template-columns: 1fr; overflow-y: auto; }
  .detail-media { overflow: visible; }
  .detail-info { overflow: visible; }
  .map-thumb img { height: 170px; }
}

@media (max-width: 560px) {
  .grid { grid-template-columns: 1fr; gap: 14px; }
  .title { font-size: 30px; }
  .lede { font-size: 15.5px; }
  .section-head { grid-template-columns: 1fr; }
  .highlights { grid-template-columns: 1fr; gap: 10px; }
  .hl { display: grid; grid-template-columns: auto 1fr; column-gap: 14px; align-items: baseline; padding: 14px 16px; }
  .hl-value { font-size: 26px; grid-row: span 2; }
  .hl-label { margin-top: 0 !important; }
  .hl-text { grid-column: 2; }
  .detail { width: 100vw; max-height: 100vh; height: 100%; border-radius: 0; max-width: 100vw; margin: 0; }
  .detail-body { max-height: 100vh; height: 100%; }
  .detail-title { font-size: 24px; padding-right: 0; }
  .detail-top .detail-close { display: none; }
  .detail-close--float {
    display: inline-flex; position: fixed; top: calc(12px + env(safe-area-inset-top)); right: 12px; z-index: 5;
    background: rgba(6, 12, 28, 0.78); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  }
  .weeks-default { flex-wrap: wrap; }
  .switch { display: flex; width: 100%; }
  .switch button { flex: 1; justify-content: center; }
}

@media (max-width: 360px) {
  .unit-no { font-size: 24px; }
  .facts { grid-template-columns: 1fr; }
  .card-actions { flex-wrap: wrap; }
  .card-actions .btn--map { flex: 1; }
  .dock-count { display: none; }
}

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

@media print {
  .rail, .dock, .scrim, .actions, .card-actions, .switch, .chips, .tab-close { display: none !important; }
  .shell { display: block; }
  .tab { position: static; height: auto; border: 0; }
  body { background: #fff; color: #000; }
}

.detail .detail-close--float { display: none; }
@media (max-width: 560px) {
  .detail .detail-close--float { display: inline-flex; }
}
