/* ============================================================
   plan-redesign.css — Pagina temporanea "piano di viaggio"
   Overlay a schermo intero con un grande rettangolo bianco
   diviso in due colonne: Organizzazione | Prezzo.
   ============================================================ */

/* ---- Overlay a schermo intero (la "pagina temporanea") ---- */
.board-overlay {
  position: fixed;
  inset: 0;
  z-index: 9500;
  background:
    radial-gradient(120% 90% at 90% -10%, color-mix(in srgb, var(--hero-1) 50%, transparent), transparent 60%),
    linear-gradient(165deg, var(--hero-1) 0%, var(--hero-2) 50%, var(--hero-3) 100%);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: clamp(16px, 4vw, 44px);
  animation: overlay-in .4s ease both;
}
@keyframes overlay-in { from { opacity: 0; } to { opacity: 1; } }

/* Blocca lo scroll del body quando il piano è aperto */
body.board-open { overflow: hidden; }

/* ---- Il rettangolo bianco (il "foglio") ------------------- */
.board-panel {
  max-width: 1180px;
  margin: 0 auto;
  background: var(--bg-elev);
  border-radius: 26px;
  box-shadow: 0 30px 80px rgba(8,40,30,.28), 0 4px 14px rgba(8,40,30,.12);
  padding: clamp(22px, 3.5vw, 44px);
  animation: panel-in .5s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes panel-in { from { opacity: 0; transform: translateY(26px) scale(.985); } to { opacity: 1; transform: none; } }

/* ---- Intestazione del viaggio ----------------------------- */
.board__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 20px;
  margin-bottom: 28px;
  border-bottom: 2px solid var(--ink);
}
.board__route { min-width: 0; }
.board__eyebrow {
  display: block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}
.board__title {
  font-family: "Fraunces", serif;
  font-weight: 500;
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  line-height: 1.04;
  margin: 0;
  letter-spacing: -.01em;
}
.board__arrow { color: var(--accent-2); font-weight: 400; padding: 0 .12em; }
.board__meta {
  display: flex;
  align-items: center;
  gap: 6px 18px;
  flex-wrap: wrap;
  margin-top: 10px;
  font-size: .9rem;
  color: var(--ink-soft);
}
.board__metaitem { white-space: nowrap; }
.board__metaitem + .board__metaitem { position: relative; padding-left: 18px; }
.board__metaitem + .board__metaitem::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 4px; height: 4px; border-radius: 50%; background: var(--ink-soft); opacity: .5;
}

/* ---- Pulsante chiudi -------------------------------------- */
.board__close {
  flex: 0 0 auto;
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s, transform .12s;
}
.board__close:hover { background: var(--accent); color: #fff; border-color: var(--accent); transform: rotate(90deg); }
.board__close svg { width: 18px; height: 18px; }

/* ---- Griglia a due colonne -------------------------------- */
.board__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 0;
  align-items: start;
}
.board__col--org   { padding-right: clamp(20px, 3vw, 38px); border-right: 1.5px solid var(--line); min-width: 0; }
.board__col--price { padding-left: clamp(20px, 3vw, 34px); position: sticky; top: 0; min-width: 0; }

.board__coltitle {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Fraunces", serif;
  font-weight: 500;
  font-size: 1.2rem;
  margin: 0 0 20px;
}
.board__colicon {
  width: 28px; height: 28px;
  border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; flex: 0 0 auto;
}
.board__colicon svg { width: 16px; height: 16px; }
.board__colicon--org   { background: var(--accent); }
.board__colicon--price { background: var(--accent-2); }

.board__subtitle {
  font-family: "Fraunces", serif;
  font-weight: 500;
  font-size: 1.05rem;
  margin: 30px 0 4px;
}
.board__hint { color: var(--ink-soft); font-size: .86rem; margin: 0 0 14px; }
.board__hint strong { color: var(--ink); }

/* Le vecchie intestazioni di sezione non servono più */
.board-overlay .results__head { display: none; }
.board-overlay .route, .board-overlay .trip-cal,
.board-overlay .planner, .board-overlay .plan-summary {
  max-width: none; margin: 0; padding: 0; min-width: 0;
}
.board-overlay .route-chain, .board-overlay .leg, .board-overlay .day-card, .board-overlay .excursion { min-width: 0; }

/* ============================================================
   TIMELINE catena viaggio (terra → volo → terra)
   ============================================================ */
.board-overlay .route-chain {
  position: relative;
  padding-left: 34px;
}
.board-overlay .route-chain::before {
  content: "";
  position: absolute;
  left: 10px; top: 14px; bottom: 14px;
  width: 2px;
  background: linear-gradient(var(--accent-2), var(--line));
  border-radius: 2px;
}

/* Selettori aeroporto sopra la timeline */
.board-overlay .route-airports {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  margin: 0 0 20px;
}
.board-overlay .route-airports:empty { display: none; }
.board-overlay .air-select {
  display: flex; flex-direction: column; gap: 5px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  min-width: 0;
}
.board-overlay .air-select > span {
  font-size: .64rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--ink-soft);
}
.board-overlay .air-select select {
  border: none; background: transparent; color: var(--ink);
  font: inherit; font-weight: 600; font-size: .9rem;
  padding: 2px 0; cursor: pointer;
  width: 100%; max-width: 100%; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  -webkit-appearance: none; appearance: none;
}
.board-overlay .air-select select:focus { outline: none; color: var(--accent); }

/* Blocco tappa (leg) sulla timeline */
.board-overlay .leg {
  position: relative;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 14px;
  box-shadow: 0 1px 2px rgba(8,40,30,.04);
  border-right: 1px solid var(--line) !important;  /* annulla regola vecchia */
}
.board-overlay .leg::before {
  content: "";
  position: absolute;
  left: -34px; top: 16px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent-2);
  box-sizing: border-box;
}
/* Pallino "volo" pieno e accentato */
.board-overlay .leg--flight { border: 1.5px solid var(--accent); box-shadow: 0 6px 20px rgba(11,110,81,.10); }
.board-overlay .leg--flight::before { background: var(--accent); border-color: var(--accent); }

.board-overlay .leg__h {
  display: flex; align-items: center; gap: 8px;
  font-family: "Hanken Grotesk", sans-serif;
  font-size: .72rem; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--accent-2);
  margin: 0 0 10px;
}
.board-overlay .leg--flight .leg__h { color: var(--accent); }
.board-overlay .leg__h svg { width: 15px; height: 15px; flex: 0 0 auto; }
.board-overlay .leg__sub { font-size: .85rem; color: var(--ink-soft); margin: -6px 0 10px; }

/* ---- Connessioni bus/treno (righe selezionabili) ---------- */
.board-overlay .conns { display: flex; flex-direction: column; gap: 8px; }
.board-overlay .conn {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto auto auto;
  align-items: center; gap: 6px 12px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 10px 13px;
  cursor: pointer; text-align: left;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.board-overlay .conn:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); background: var(--bg-elev); }
.board-overlay .conn.is-selected {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 5%, var(--bg-elev));
  box-shadow: 0 0 0 2px var(--ring);
}
.board-overlay .conn__mode {
  width: 24px; height: 24px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--accent); flex: 0 0 auto;
}
.board-overlay .conn__mode svg { width: 19px; height: 19px; }
.board-overlay .conn__op { font-size: .92rem; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-overlay .conn__time { font-variant-numeric: tabular-nums; font-size: .84rem; color: var(--ink-soft); white-space: nowrap; }
.board-overlay .conn__price { font-family: "Fraunces", serif; font-weight: 600; text-align: right; white-space: nowrap; }
.board-overlay .conn__check {
  width: 22px; height: 22px; border-radius: 50%; flex: 0 0 auto;
  background: var(--accent); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  margin-left: 2px;
}
.board-overlay .conn__check svg { width: 13px; height: 13px; }

/* ---- Card opzione volo ------------------------------------ */
.board-overlay .flights { display: flex; flex-direction: column; gap: 10px; }
.board-overlay .fopt {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 16px; align-items: center;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  cursor: pointer; text-align: left;
  transition: border-color .15s, box-shadow .15s, transform .12s, background .15s;
}
.board-overlay .fopt:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); transform: translateY(-1px); }
.board-overlay .fopt.is-selected {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 5%, var(--bg-elev));
  box-shadow: 0 0 0 2px var(--ring);
}
.board-overlay .fopt__rows { display: flex; flex-direction: column; gap: 4px; min-width: 0; overflow: hidden; }
.board-overlay .fopt__row {
  display: grid;
  grid-template-columns: 56px minmax(0, auto) minmax(20px, 1fr) minmax(0, auto) minmax(0, auto);
  align-items: center; gap: 4px 8px;
  min-width: 0;
}
.board-overlay .fopt__row + .fopt__row { padding-top: 6px; border-top: 1px dashed var(--line); }
.board-overlay .fopt__dir {
  font-size: .66rem; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: var(--ink-soft); white-space: nowrap;
}
.board-overlay .fopt__t { font-family: "Fraunces", serif; font-weight: 600; font-size: 1.02rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.board-overlay .fopt__path { position: relative; height: 14px; display: flex; align-items: center; min-width: 20px; }
.board-overlay .fopt__path::before {
  content: ""; position: absolute; left: 0; right: 0; top: 50%;
  height: 2px; background: var(--line); border-radius: 2px;
}
.board-overlay .fopt__via {
  position: relative; margin: 0 auto;
  font-size: .62rem; color: var(--ink-soft);
  background: var(--bg); padding: 0 6px; white-space: nowrap;
}
.board-overlay .fopt.is-selected .fopt__via, .board-overlay .fopt:hover .fopt__via { background: color-mix(in srgb, var(--accent) 5%, var(--bg-elev)); }
.board-overlay .fopt__codes { font-size: .68rem; font-weight: 600; color: var(--ink-soft); letter-spacing: .02em; white-space: nowrap; }
.board-overlay .fopt__side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; white-space: nowrap; min-width: 92px; }
.board-overlay .fopt__price { font-family: "Fraunces", serif; font-weight: 600; font-size: 1.3rem; color: var(--accent); line-height: 1; }
.board-overlay .fopt__tag {
  font-size: .58rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent);
  padding: 3px 8px; border-radius: 999px;
}
.board-overlay .fopt__pick {
  font-size: .66rem; font-weight: 700; color: var(--ink-soft);
  border: 1px solid var(--line); padding: 3px 10px; border-radius: 999px;
}
.board-overlay .fopt:hover .fopt__pick { color: var(--accent); border-color: var(--accent); }

.board-overlay .ground-note { color: var(--ink-soft); font-size: .9rem; padding: 4px 0; }
.board-overlay .ground-note .spin { margin-right: 6px; }

/* ============================================================
   CALENDARIO del soggiorno
   ============================================================ */
.board-overlay .trip-cal__grid {
  display: flex; flex-direction: column; flex-wrap: nowrap; gap: 22px;
}
.board-overlay .cal-month { min-width: 0; flex: 1 1 auto; }
.board-overlay .cal-month__name {
  font-family: "Fraunces", serif; font-weight: 500; font-size: 1rem;
  text-transform: capitalize; margin: 0 0 10px;
}
.board-overlay .cal-dows { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; margin-bottom: 6px; }
.board-overlay .cal-dows span {
  text-align: center; font-size: .62rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .03em; color: var(--ink-soft);
}
.board-overlay .cal-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.board-overlay .cal-cell {
  position: relative;
  aspect-ratio: auto;
  min-height: 0; height: clamp(40px, 7vw, 52px);
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px; border: 1px solid transparent;
  background: transparent; color: var(--ink-soft);
  font: inherit; padding: 0; visibility: visible;
}
.board-overlay .cal-cell--empty { background: transparent; border: none; visibility: hidden; }
.board-overlay .cal-cell--stay {
  background: color-mix(in srgb, var(--accent-2) 13%, var(--bg));
  border-color: color-mix(in srgb, var(--accent-2) 28%, transparent);
  color: var(--ink); cursor: pointer;
  transition: transform .12s, border-color .15s, box-shadow .15s;
}
.board-overlay .cal-cell--stay:hover { transform: translateY(-1px); border-color: var(--accent-2); box-shadow: 0 3px 10px rgba(17,194,205,.18); }
.board-overlay .cal-cell--move {
  background: color-mix(in srgb, var(--accent) 15%, var(--bg));
  border-color: color-mix(in srgb, var(--accent) 32%, transparent);
}
.board-overlay .cal-num { font-size: .9rem; font-weight: 600; }
.board-overlay .cal-badge {
  position: absolute; top: -6px; right: -6px;
  min-width: 18px; height: 18px; padding: 0 4px;
  border-radius: 999px; background: var(--accent); color: #fff;
  font-size: .62rem; font-weight: 700; line-height: 18px; text-align: center;
  box-shadow: 0 0 0 2px var(--bg-elev);
}
.board-overlay .cal-legend {
  margin: 18px 0 0;
  display: flex; align-items: center; gap: 10px 18px;
  flex-wrap: wrap; font-size: .76rem; color: var(--ink-soft);
  clear: both;
}
.board-overlay .cal-legend .dot { width: 11px; height: 11px; border-radius: 4px; display: inline-block; vertical-align: -1px; margin-right: 3px; }
.board-overlay .cal-legend .dot--stay { background: color-mix(in srgb, var(--accent-2) 45%, var(--bg)); border: 1px solid var(--accent-2); }
.board-overlay .cal-legend .dot--move { background: color-mix(in srgb, var(--accent) 45%, var(--bg)); border: 1px solid var(--accent); }

/* ============================================================
   GIORNI / TAPPE
   ============================================================ */
.board-overlay .days-list { display: flex; flex-direction: column; gap: 12px; }
.board-overlay .day-card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
  box-shadow: 0 1px 2px rgba(8,40,30,.04);
  transition: box-shadow .25s, border-color .2s;
}
.board-overlay .day-card.flash { border-color: var(--accent-2); box-shadow: 0 0 0 3px var(--ring); }
.board-overlay .day-card__head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.board-overlay .day-card__head h4 {
  font-family: "Fraunces", serif; font-weight: 500; font-size: 1.02rem;
  text-transform: capitalize; margin: 0;
}
.board-overlay .day-base { font-size: .8rem; color: var(--ink-soft); }
.board-overlay .day-base strong { color: var(--accent); font-weight: 700; }

.board-overlay .day-excs { display: flex; flex-direction: column; gap: 10px; }
.board-overlay .excursion {
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 12px 13px;
  background: var(--bg);
}
.board-overlay .excursion__head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.board-overlay .exc-to { font-weight: 600; font-size: .95rem; flex: 1; min-width: 0; }
.board-overlay .exc-kind {
  border: 1px solid var(--line); background: var(--bg-elev); color: var(--ink);
  border-radius: 8px; padding: 5px 8px; font: inherit; font-size: .8rem; cursor: pointer;
}
.board-overlay .exc-kind:focus { outline: none; border-color: var(--accent); }
.board-overlay .exc-del {
  width: 28px; height: 28px; flex: 0 0 auto;
  border: 1px solid var(--line); background: var(--bg-elev); color: var(--ink-soft);
  border-radius: 8px; display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; transition: color .15s, border-color .15s, background .15s;
}
.board-overlay .exc-del:hover { color: #fff; background: var(--accent); border-color: var(--accent); }
.board-overlay .exc-del svg { width: 14px; height: 14px; }
.board-overlay .excursion__leg { margin-top: 8px; }
.board-overlay .leglabel {
  display: block; font-size: .7rem; font-weight: 700;
  letter-spacing: .03em; text-transform: uppercase; color: var(--ink-soft);
  margin-bottom: 6px;
}

/* Form aggiunta tappa */
.board-overlay .day-add { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }
.board-overlay .day-add__field { position: relative; flex: 1 1 200px; margin: 0; }
.board-overlay .day-add__field input {
  width: 100%; padding: 9px 12px;
  border: 1px solid var(--line); background: var(--bg-elev); color: var(--ink);
  border-radius: 9px; font: inherit; font-size: .9rem;
}
.board-overlay .day-add__field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); }
.board-overlay .day-add__kind { display: flex; gap: 12px; align-items: center; font-size: .82rem; color: var(--ink-soft); }
.board-overlay .day-add__kind label { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; }
.board-overlay .day-add__kind input { accent-color: var(--accent); }
.board-overlay .btn-mini {
  border: none; background: var(--accent); color: #fff;
  border-radius: 9px; padding: 9px 18px; font: inherit; font-weight: 700; font-size: .88rem;
  cursor: pointer; transition: filter .15s, transform .1s;
}
.board-overlay .btn-mini:hover { filter: brightness(1.08); }
.board-overlay .btn-mini:active { transform: scale(.97); }

/* Autocomplete tappe */
.board-overlay .ac-list {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 60;
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: 11px;
  box-shadow: var(--shadow); overflow: hidden; max-height: 280px; overflow-y: auto;
}
.board-overlay .ac-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 12px; cursor: pointer; font-size: .9rem;
}
.board-overlay .ac-item + .ac-item { border-top: 1px solid var(--line); }
.board-overlay .ac-item:hover { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.board-overlay .ac-air {
  font-size: .62rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--accent-2); background: color-mix(in srgb, var(--accent-2) 13%, transparent);
  padding: 2px 8px; border-radius: 999px; flex: 0 0 auto;
}

/* ============================================================
   COLONNA PREZZO
   ============================================================ */
.board-overlay .plan-card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px 22px;
  box-shadow: var(--shadow);
}
.board-overlay .plan-rows { display: flex; flex-direction: column; }
.board-overlay .plan-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 11px 0; border-bottom: 1px solid var(--line);
}
.board-overlay .plan-row:first-child { padding-top: 0; }
.board-overlay .plan-row__label { font-weight: 600; font-size: .92rem; min-width: 0; }
.board-overlay .plan-row__detail {
  flex: 1; text-align: right; font-size: .78rem; color: var(--ink-soft);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.board-overlay .plan-row__price { font-family: "Fraunces", serif; font-weight: 600; white-space: nowrap; font-size: 1rem; }
.board-overlay .plan-empty { color: var(--ink-soft); font-size: .88rem; padding: 12px 0; text-align: center; }

.board-overlay .plan-total-row {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-top: 18px; padding-top: 16px; border-top: 2px solid var(--ink);
}
.board-overlay .plan-total-row__label { font-weight: 700; font-size: .95rem; }
.board-overlay .plan-total {
  font-family: "Fraunces", serif; font-weight: 600;
  font-size: 2.1rem; color: var(--accent); line-height: 1;
}

.board-overlay .plan-actions { margin-top: 16px; }
.board-overlay .btn-save {
  width: 100%; padding: 12px; border: 1px solid var(--line); background: transparent;
  color: var(--ink); border-radius: 11px; font: inherit; font-weight: 700; font-size: .92rem;
  cursor: pointer; transition: border-color .15s, color .15s, background .15s;
}
.board-overlay .btn-save:hover { border-color: var(--accent); color: var(--accent); }

.board-overlay .plan-disclaimer { color: var(--ink-soft); font-size: .76rem; margin: 16px 0 0; line-height: 1.55; }

/* ============================================================
   RESPONSIVE — sotto 880px le colonne si impilano
   ============================================================ */
@media (max-width: 880px) {
  .board__grid { grid-template-columns: minmax(0, 1fr); }
  .board__col--org { padding-right: 0; border-right: none; padding-bottom: 28px; min-width: 0; }
  .board__col--price {
    position: static; padding-left: 0; padding-top: 28px;
    border-top: 1.5px solid var(--line); min-width: 0;
  }
  .route-airports { grid-template-columns: 1fr; }
  .board-panel { border-radius: 20px; }
}
@media (max-width: 600px) {
  .board-overlay { padding: 12px; }
  .board-panel { padding: 20px 16px; border-radius: 18px; }
  .board__close { width: 38px; height: 38px; }
  .fopt__codes { display: none; }
  .day-add { flex-direction: column; align-items: stretch; }
  .day-add__field { flex: 1 1 auto; }
  .day-add__kind { justify-content: flex-start; }
  .btn-mini { width: 100%; }
}
@media (max-width: 420px) {
  .fopt__row { grid-template-columns: 50px auto minmax(16px, 1fr) auto; }
  .fopt { gap: 10px; }
  .conn { grid-template-columns: 22px minmax(0, 1fr) auto auto; gap: 4px 8px; }
  .conn__time { grid-column: 2 / -1; font-size: .8rem; padding-top: 2px; }
  .board__title { font-size: 1.6rem; }
}

/* ============================================================
   STAMPA — solo il pannello del piano, pulito
   ============================================================ */
@media print {
  body > *:not(.board-overlay) { display: none !important; }
  .board-overlay {
    position: static; background: #fff; padding: 0; overflow: visible;
  }
  .board-panel { box-shadow: none; max-width: none; padding: 0; }
  .board__close, .plan-actions { display: none !important; }
  .board__col--org { border-right: none; }
  .board__col--price { position: static; }
  .plan-card, .leg, .day-card, .excursion { border: 1px solid #ccc; box-shadow: none; }
  body { background: #fff; color: #000; }
}
