:root {
  --bg: #f3f6fa;
  --panel: #ffffff;
  --panel-2: #e8eef5;
  --border: #d9e2ec;
  --text: #10151d;
  --muted: #5c6b7a;
  --sky: #1c6dd0;
  --sky-dark: #144f9c;
  --gold: #d9a441;
  --gold-dark: #a97b1f;
  --good: #1f9d63;
  --bad: #c0392b;
  --shadow: 0 1px 2px rgba(16,21,29,0.04), 0 14px 34px rgba(16,21,29,0.08);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c1116;
    --panel: #141b23;
    --panel-2: #1a222c;
    --border: #253140;
    --text: #eef2f6;
    --muted: #8b98a6;
    --sky: #4f92e6;
    --sky-dark: #7bb0f0;
    --gold: #e6b957;
    --gold-dark: #f2ce85;
    --good: #3ecb8c;
    --bad: #e0665a;
    --shadow: 0 1px 2px rgba(0,0,0,0.35), 0 14px 34px rgba(0,0,0,0.4);
  }
}
:root[data-theme="dark"] {
  --bg: #0c1116;
  --panel: #141b23;
  --panel-2: #1a222c;
  --border: #253140;
  --text: #eef2f6;
  --muted: #8b98a6;
  --sky: #4f92e6;
  --sky-dark: #7bb0f0;
  --gold: #e6b957;
  --gold-dark: #f2ce85;
  --good: #3ecb8c;
  --bad: #e0665a;
  --shadow: 0 1px 2px rgba(0,0,0,0.35), 0 14px 34px rgba(0,0,0,0.4);
}

* { box-sizing: border-box; }
html, body { overflow-x: hidden; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Manrope", -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1, h2, .display { font-family: "Bebas Neue", sans-serif; letter-spacing: 0.02em; text-wrap: balance; font-weight: 400; }
.mono { font-family: "JetBrains Mono", ui-monospace, monospace; font-variant-numeric: tabular-nums; }
a { color: inherit; }

.board-strip {
  background: #0c1116;
  padding: 10px 16px;
  display: flex;
  justify-content: center;
  gap: 28px;
  flex-wrap: wrap;
  border-bottom: 3px solid var(--gold);
}
.board-item { text-align: center; }
.board-label { font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: #7c8a99; margin-bottom: 3px; }
.board-value { font-family: "JetBrains Mono", monospace; font-weight: 700; font-size: 20px; color: #eef2f6; }
.board-value.gold { color: var(--gold); }

header.hero {
  text-align: center;
  padding: 52px 20px 36px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--sky) 10%, var(--bg)), var(--bg) 70%);
}
.flight-no {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: "JetBrains Mono", monospace;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--sky-dark);
  background: color-mix(in srgb, var(--sky) 10%, var(--panel));
  border: 1px solid color-mix(in srgb, var(--sky) 30%, var(--border));
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 20px;
}
h1.title { margin: 0 auto 14px; max-width: 680px; font-size: clamp(44px, 9vw, 92px); line-height: 0.92; }
h1.title .accent { color: var(--sky); }
.by-line {
  margin: 0 0 22px;
  font-family: "Manrope", sans-serif;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
}
.by-line a { color: var(--text); font-weight: 700; text-decoration: none; border-bottom: 1px solid var(--border); }
.subhead {
  max-width: 460px; margin: 0 auto 8px; color: var(--muted);
  font-size: 16px; line-height: 1.6; font-family: "Manrope", sans-serif;
}
.subhead strong { color: var(--text); }

.live-presence {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  margin: 18px 0 0; font-size: 12.5px; color: var(--muted);
}
.live-presence[hidden] { display: none; }
.live-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--good);
  box-shadow: 0 0 0 0 rgba(62,203,140,0.6);
  animation: live-dot-pulse 1.6s ease-out infinite;
  flex-shrink: 0;
}
@keyframes live-dot-pulse {
  0% { box-shadow: 0 0 0 0 rgba(62,203,140,0.55); }
  70% { box-shadow: 0 0 0 6px rgba(62,203,140,0); }
  100% { box-shadow: 0 0 0 0 rgba(62,203,140,0); }
}
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }

.activity-board {
  background: #0c1116;
  margin: 32px 16px 0;
  border-radius: 16px;
  border: 1px solid #253140;
  padding: 22px 20px 20px;
}
.activity-board-head { text-align: center; margin-bottom: 16px; }
.activity-board-head h2 { margin: 0 0 6px; font-size: 22px; color: #eef2f6; }
.activity-board-head p { margin: 0; font-size: 12.5px; color: #7c8a99; max-width: 440px; margin: 0 auto; line-height: 1.5; }
.activity-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 18px; }
@media (max-width: 560px) { .activity-columns { grid-template-columns: 1fr; } }
.activity-col { background: #141b23; border: 1px solid #253140; border-radius: 12px; padding: 12px 14px 6px; min-height: 60px; }
.activity-col-title {
  margin: 0 0 8px; font-family: "JetBrains Mono", monospace; font-size: 11px; font-weight: 700;
  letter-spacing: 0.1em; padding-bottom: 8px; border-bottom: 1px solid #253140;
}
.activity-col-title.arrivals { color: #3ecb8c; }
.activity-col-title.departures { color: #8b98a6; }
.activity-list { list-style: none; margin: 0; padding: 0; max-height: 260px; overflow-y: auto; }
.activity-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 0; border-bottom: 1px solid #1a222c; font-size: 12.5px; color: #eef2f6;
}
.activity-item:last-child { border-bottom: none; }
.activity-favicon { width: 16px; height: 16px; border-radius: 4px; flex-shrink: 0; }
.activity-favicon-placeholder { width: 16px; height: 16px; border-radius: 4px; background: #253140; flex-shrink: 0; }
.activity-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.activity-time { flex-shrink: 0; font-family: "JetBrains Mono", monospace; font-size: 10.5px; color: #5c6b7a; }
.activity-empty { text-align: center; font-size: 12.5px; color: #5c6b7a; margin: 10px 0 0; }
.activity-empty[hidden] { display: none; }
.activity-columns[hidden] { display: none; }

section.crew { padding: 44px 20px 8px; }
.crew-head { text-align: center; margin-bottom: 24px; }
.crew-head h2 { margin: 0 0 8px; font-size: 30px; }
.crew-head p { max-width: 460px; margin: 0 auto; color: var(--muted); font-size: 14px; line-height: 1.6; font-family: "Manrope", sans-serif; }
.crew-list { max-width: 520px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.crew-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 18px;
  background: var(--panel);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  cursor: pointer;
}
.crew-row.rank-1 {
  background: linear-gradient(135deg, color-mix(in srgb, var(--gold) 14%, var(--panel)), var(--panel));
  border-color: var(--gold);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold) 12%, transparent), var(--shadow);
}
.crew-row.rank-2 { border-color: #b9c2cc; }
.crew-row.rank-3 { border-color: #cf9a5c; }
.crew-badge {
  flex-shrink: 0;
  width: 46px; height: 46px;
  border-radius: 11px;
  background: var(--panel-2);
  color: var(--muted);
  display: flex; align-items: center; justify-content: center;
  font-family: "Bebas Neue", sans-serif;
  font-size: 12px;
  text-align: center;
  line-height: 1.05;
}
.crew-row.rank-1 .crew-badge {
  background: var(--gold); color: #241a04;
  box-shadow: 0 4px 14px color-mix(in srgb, var(--gold) 60%, transparent);
  animation: seat-pulse 2.4s ease-in-out infinite;
}
.crew-row.rank-2 .crew-badge { background: #b9c2cc; color: #1c232b; }
.crew-row.rank-3 .crew-badge { background: #cf9a5c; color: #2b1a08; }
@keyframes seat-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}
@media (prefers-reduced-motion: reduce) { .crew-row.rank-1 .crew-badge { animation: none; } }
.crew-info { flex: 1; min-width: 0; text-align: left; }
.crew-role { font-size: 10.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 0 0 3px; }
.crew-row.rank-1 .crew-role { color: var(--gold-dark); }
.crew-holder { font-size: 15px; font-weight: 700; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crew-holder .by { font-weight: 500; color: var(--muted); }
.crew-favicon { width: 15px; height: 15px; border-radius: 4px; vertical-align: -2px; margin-right: 5px; }
.crew-cta { flex-shrink: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.crew-amount { font-family: "JetBrains Mono", monospace; font-weight: 700; font-size: 16px; }
.crew-btn {
  font-family: "Manrope", sans-serif;
  font-size: 11.5px; font-weight: 700; color: #fff;
  background: var(--sky); border: none;
  padding: 7px 13px; border-radius: 8px; cursor: pointer; white-space: nowrap;
}
.crew-row.rank-1 .crew-btn { color: #241a04; background: var(--gold); }

section.cabin { padding: 20px 20px 20px; }
.cabin-legend {
  display: flex; justify-content: center; gap: 22px; flex-wrap: wrap;
  margin: 0 auto 28px; font-size: 12.5px; color: var(--muted);
}
.cabin-legend span { display: inline-flex; align-items: center; gap: 6px; }
.swatch { width: 13px; height: 13px; border-radius: 4px; display: inline-block; }
.swatch.first { background: var(--gold); }
.swatch.biz { background: var(--sky); }
.swatch.eco { background: var(--panel-2); border: 1px solid var(--border); }
.swatch.taken { background: var(--good); }

.fuselage {
  max-width: 460px;
  margin: 0 auto;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 140px 140px 26px 26px;
  box-shadow: var(--shadow);
  padding: 30px 20px 34px;
  position: relative;
}
.fuselage::before {
  content: 'NOSE';
  position: absolute;
  top: 10px; left: 50%; transform: translateX(-50%);
  font-family: "JetBrains Mono", monospace;
  font-size: 9px; letter-spacing: 0.2em; color: var(--muted); opacity: 0.5;
}
.cabin-class-label {
  text-align: center;
  font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted); margin: 18px 0 10px;
}
.cabin-class-label:first-of-type { margin-top: 4px; }
.row {
  display: grid;
  grid-template-columns: repeat(3, 1fr) 20px repeat(3, 1fr);
  gap: 6px;
  max-width: 320px;
  margin: 0 auto 6px;
  align-items: center;
}
.row-num {
  display: grid;
  grid-template-columns: repeat(3, 1fr) 20px repeat(3, 1fr);
  gap: 6px;
  max-width: 320px;
  margin: 0 auto -2px;
  font-family: "JetBrains Mono", monospace;
  font-size: 9px;
  color: var(--muted);
  text-align: center;
}
.aisle { }
.seat {
  position: relative;
  aspect-ratio: 1;
  border-radius: 6px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: transform 0.1s ease;
  padding: 0;
  overflow: hidden;
}
.seat:hover { transform: scale(1.12); }
.seat:focus-visible { outline: 2px solid var(--sky); outline-offset: 2px; }
.seat.first { background: color-mix(in srgb, var(--gold) 35%, var(--panel-2)); border-color: var(--gold); }
.seat.business { background: color-mix(in srgb, var(--sky) 30%, var(--panel-2)); border-color: var(--sky); }
.seat.taken { background: var(--good); border-color: #157a4c; }
.seat-favicon {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.seat-favicon[hidden] { display: none; }

.price-strip {
  max-width: 320px; margin: 22px auto 0;
  display: flex; justify-content: space-between;
  font-size: 11.5px; color: var(--muted);
}
.price-strip strong { color: var(--text); font-family: "JetBrains Mono", monospace; }

section.pricing { padding: 44px 20px; }
.pricing-grid {
  max-width: 720px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}
.price-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px 18px;
  text-align: center;
  box-shadow: var(--shadow);
}
.price-card.first { border-top: 4px solid var(--gold); }
.price-card.biz { border-top: 4px solid var(--sky); }
.price-card.eco { border-top: 4px solid var(--border); }
.price-card h3 { margin: 0 0 6px; font-size: 22px; }
.price-card .amount { font-family: "JetBrains Mono", monospace; font-weight: 700; font-size: 26px; margin-bottom: 6px; }
.price-card .desc { font-size: 12.5px; color: var(--muted); line-height: 1.5; }

.pricing-hint { max-width: 420px; margin: 22px auto 0; text-align: center; font-size: 12px; color: var(--muted); }

section.about { padding: 8px 20px 48px; }
.about-head { text-align: center; margin-bottom: 22px; }
.about-head h2 { margin: 0; font-size: 30px; }
.about-grid {
  max-width: 720px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px;
}
.about-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px 20px;
  box-shadow: var(--shadow);
}
.about-card h3 { margin: 0 0 10px; font-size: 20px; }
.about-card p { margin: 0; font-size: 13.5px; line-height: 1.65; color: var(--muted); }
.about-card p a { color: var(--sky-dark); text-decoration: none; border-bottom: 1px solid currentColor; }
@media (max-width: 560px) {
  .about-grid { grid-template-columns: 1fr; }
}

.lang-switch { display: flex; align-items: center; gap: 5px; font-family: "JetBrains Mono", monospace; }
.lang-switch button {
  background: none; border: none; cursor: pointer;
  font-family: inherit; font-size: 13px; font-weight: 700;
  color: #5c6b7a; padding: 2px 3px;
}
.lang-switch button.active { color: var(--gold); }
.lang-switch .lang-sep { color: #3a4653; font-size: 12px; }

.cta-band {
  text-align: center; padding: 56px 20px 70px;
  background: var(--text); color: var(--bg);
}
.cta-band h2 { margin: 0 0 12px; font-size: 34px; color: var(--bg); }
.cta-band p { max-width: 440px; margin: 0 auto 26px; color: color-mix(in srgb, var(--bg) 65%, transparent); font-size: 14.5px; font-family: "Manrope", sans-serif; }
.cta-btn {
  display: inline-block; background: var(--sky); color: #fff;
  font-weight: 700; font-size: 15px; padding: 14px 30px; border-radius: 10px; text-decoration: none; border: none; cursor: pointer;
}

footer.note {
  text-align: center; padding: 26px 20px 40px;
  color: var(--muted); font-size: 12.5px; line-height: 1.7;
  max-width: 520px; margin: 0 auto;
}
footer.note a { color: var(--muted); }

/* --- Popover posto occupato (visita il link o scalza) --- */
.seat-popover {
  position: fixed;
  z-index: 90;
  background: var(--panel);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 14px 16px;
  width: 220px;
}
.seat-popover[hidden] { display: none; }
.seat-popover-label { margin: 0 0 3px; font-size: 10.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.seat-popover-holder-row { display: flex; align-items: center; gap: 6px; min-width: 0; }
.seat-popover-favicon { width: 17px; height: 17px; border-radius: 4px; flex-shrink: 0; }
.seat-popover-holder { margin: 0; font-size: 15px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seat-popover-amount { margin: 2px 0 12px; font-family: "JetBrains Mono", monospace; font-size: 13px; color: var(--muted); }
.seat-popover-actions { display: flex; flex-direction: column; gap: 8px; }
.seat-popover-visit, .seat-popover-bid {
  display: block; text-align: center; text-decoration: none;
  font-family: "Manrope", sans-serif; font-size: 13px; font-weight: 700;
  padding: 9px; border-radius: 9px; border: none; cursor: pointer;
}
.seat-popover-visit { background: var(--sky); color: #fff; }
.seat-popover-bid { background: var(--panel-2); color: var(--text); border: 1.5px solid var(--border); }

/* --- Modale offerta --- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(8,11,15,0.6);
  display: flex; align-items: center; justify-content: center;
  padding: 20px; z-index: 100;
}
.modal-overlay[hidden] { display: none; }
.modal {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  width: 100%; max-width: 380px;
  padding: 26px 24px 22px;
}
.modal h3 { margin: 0 0 4px; font-size: 24px; }
.modal .modal-sub { margin: 0 0 18px; color: var(--muted); font-size: 13px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 11.5px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.field input {
  width: 100%; padding: 10px 12px; border-radius: 9px;
  border: 1.5px solid var(--border); background: var(--panel-2); color: var(--text);
  font-family: inherit; font-size: 14.5px;
}
.field input:focus { outline: 2px solid var(--sky); outline-offset: 1px; }
.field .hint { font-size: 11.5px; color: var(--muted); margin-top: 5px; }

.link-input-row { position: relative; }
.link-input-row input { padding-left: 38px; }
.link-favicon-preview {
  position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; border-radius: 4px; pointer-events: none;
}

.amount-stepper { display: flex; align-items: stretch; gap: 8px; }
.amount-stepper input {
  width: 100%; padding: 10px 12px; border-radius: 9px;
  border: 1.5px solid var(--border); background: var(--panel-2); color: var(--text);
  font-family: "JetBrains Mono", monospace; font-size: 15px; text-align: center;
}
.amount-stepper input:focus { outline: 2px solid var(--sky); outline-offset: 1px; }
.stepper-btn {
  flex-shrink: 0; width: 42px;
  border-radius: 9px; border: 1.5px solid var(--border); background: var(--panel-2);
  color: var(--text); font-size: 19px; font-weight: 700; line-height: 1; cursor: pointer;
}
.stepper-btn:hover { background: var(--border); }
.stepper-btn:active { transform: scale(0.95); }
.error-msg { color: var(--bad); font-size: 13px; margin: 0 0 12px; min-height: 0; }
.error-msg:empty { display: none; }
.modal-actions { display: flex; gap: 10px; margin-top: 6px; }
.modal-actions button { flex: 1; padding: 12px; border-radius: 10px; font-weight: 700; font-size: 14px; cursor: pointer; border: none; }
.modal-cancel { background: var(--panel-2); color: var(--text); }
.modal-submit { background: var(--sky); color: #fff; }
.modal-submit:disabled { opacity: 0.6; cursor: default; }

.loading-note { text-align: center; color: var(--muted); font-size: 13px; padding: 30px 20px; }

@media (max-width: 560px) {
  .pricing-grid { grid-template-columns: 1fr; }
  .board-strip { gap: 18px; }
  .board-value { font-size: 16px; }
}
