/* =========================================================
   FISH and RIC · diario di pesca
   Design system: layout "Catcher" (canvas chiaro su cornice
   scura, tab verticale, mono da etichetta, titoli spaziati)
   Palette: naturale desaturata, oliva, salvia, rosa antico,
   grigio-azzurro, greige.
   ========================================================= */

:root {
  --ink:       #272b23;   /* cornice + inchiostro (oliva profondo) */
  --plate:     #2f3b36;   /* plate foto (ardesia verde) */
  --canvas:    #f3f0e6;   /* canvas */
  --surface:   #e7e3d4;   /* superfici secondarie */
  --card:      #faf7ee;   /* card chiare */
  --accent:    #a67676;   /* accento, rosa antico (solo ME, sempre) */
  --accent-2:  #92605f;
  --teal:      #648c84;   /* pill / secondario, salvia (tutti gli altri pescatori) */
  --olive:     #767554;
  --blue:      #9da8b9;
  --zero:      #b99a3e;   /* skunkato, 0 catture, sempre questo colore, mai l'accento */
  --muted:     #8b8a80;   /* testo secondario (greige) */
  --ink-soft:  #5c5f52;
  --line:      rgba(39, 43, 35, 0.14);
  --line-2:    rgba(39, 43, 35, 0.30);

  --sans:  "Archivo", system-ui, sans-serif;
  --mono:  "Space Mono", ui-monospace, monospace;
  --serif: "Playfair Display", Georgia, serif;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  padding: clamp(10px, 2.4vw, 28px);
  background: var(--ink);
  font-family: var(--sans);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.canvas {
  background: var(--canvas);
  border-radius: 6px;
  min-height: calc(100vh - clamp(20px, 4.8vw, 56px));
  overflow: hidden;
  position: relative;
}

/* =========================================================
   TOPBAR
   ========================================================= */
.topbar {
  position: sticky;               /* logo + Statistiche sempre in alto */
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(16px, 3vw, 30px) clamp(20px, 4.5vw, 52px) clamp(12px, 1.6vw, 18px);
  background: var(--canvas);
}
.topbar::after {   /* sfumatura sotto la barra quando il contenuto le scorre sotto */
  content: ""; position: absolute; left: 0; right: 0; bottom: -18px; height: 18px;
  background: linear-gradient(var(--canvas), transparent);
  pointer-events: none;
}
.logo {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--ink);
}
.logo__mark { width: 30px; height: 26px; flex: none; }
.logo__text {
  font-weight: 700;
  font-size: 0.86rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  white-space: nowrap;
}
.cta-pill {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-decoration: none;
  color: var(--canvas);
  background: var(--ink);
  padding: 10px 22px;
  border-radius: 999px;
  transition: background 0.25s var(--ease), transform 0.25s var(--ease);
}
.cta-pill:hover { background: var(--plate); transform: translateY(-1px); }

/* =========================================================
   LAYOUT
   ========================================================= */
.app { position: relative; }
.view { animation: rise 0.5s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* =========================================================
   HERO (titolo blog)
   ========================================================= */
.hero {
  text-align: center;
  padding: clamp(8px, 2.4vw, 26px) 20px 4px;
}
.hero__title {
  margin: 0;
  position: relative;
  display: inline-block;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(3rem, 9vw, 6.2rem);
  line-height: 1.04;
  letter-spacing: 0.01em;
  color: var(--ink);
}
.hero__amp {
  /* & in Playfair italic, tono d'accento: legatura editoriale */
  font-size: 0.74em;
  color: var(--accent);
  margin: 0 0.14em;
}
.hero__title .flag {
  position: absolute;             /* fuori dal flusso: non sposta la centratura */
  top: -0.08em; right: -0.62em;
  width: 0.42em; height: 0.42em;
  transform: rotate(10deg);
}
.hero__sub {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 18px 0 0;
}

/* =========================================================
   STRISCIA SPECIE (filtro)
   ========================================================= */
.species-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: clamp(8px, 2.6vw, 30px);
  padding: clamp(14px, 2.6vw, 28px) 24px 4px;
}
.fish-chip {
  display: inline-flex; align-items: center; gap: 11px;
  background: none;
  border: 1.5px solid transparent;
  border-radius: 999px;
  padding: 9px 18px;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--ink);
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease), color 0.25s var(--ease);
}
.fish-chip svg { width: 58px; height: auto; flex: none; }
.fish-chip small {
  font-size: 0.62rem;
  color: var(--muted);
  margin-left: 5px;
}
.fish-chip:hover { transform: translateY(-2px); }
.fish-chip.is-active {
  border-color: var(--accent);
  color: var(--accent);
  font-style: italic;
}
.fish-chip.is-active small { color: var(--accent); }

.filter-clear-wrap { text-align: center; padding-top: 14px; }
.filter-clear {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: var(--canvas);
  background: var(--accent);
  border: 0;
  border-radius: 999px;
  padding: 7px 16px;
  cursor: pointer;
  transition: background 0.25s var(--ease);
}
.filter-clear:hover { background: var(--accent-2); }

/* =========================================================
   PROSPETTINO SPECIE (pannello in-portale)
   ========================================================= */
.spanel {
  position: fixed; inset: 0; z-index: 50;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  background: rgba(39, 43, 35, 0.55);
  animation: fadein 0.25s var(--ease) both;
}
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.spanel[hidden] { display: none; }
.spanel__card {
  position: relative;
  width: min(720px, 94vw);
  max-height: min(97vh, 960px);
  overflow-y: auto;
  background: var(--canvas);
  border-radius: 8px;
  padding: 28px 34px 24px;
  box-shadow: 0 40px 90px -30px rgba(20, 22, 17, 0.65);
  animation: rise 0.35s var(--ease) both;
}
.spanel__close {
  position: absolute; top: 14px; right: 14px;
  width: 34px; height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: none;
  color: var(--ink-soft);
  font-size: 0.9rem;
  cursor: pointer;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.spanel__close:hover { color: var(--accent); border-color: var(--accent); transform: rotate(90deg); }
.spanel__fish { text-align: center; margin-bottom: 4px; }
.spanel__fish svg { width: 106px; height: auto; }
.spanel__name {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: 1.9rem;
  text-align: center;
  margin: 0;
}
.spanel__sci {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: center;
  color: var(--muted);
  margin: 6px 0 14px;
}
.spanel__desc { font-size: 0.9rem; line-height: 1.58; color: var(--ink-soft); }
.spanel__desc p { margin: 0 0 0.6em; }
.spanel__grid {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
  margin: 14px 0;
}
@media (max-width: 480px) { .spanel__grid { grid-template-columns: 1fr; gap: 10px; } }
.spanel__grid .k {
  display: block;
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}
.spanel__grid .v { font-size: 0.8rem; line-height: 1.5; color: var(--ink); }
.spanel__curio { margin: 0 0 12px; padding: 0; list-style: none; }
.spanel__curio li {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.86rem;
  line-height: 1.4;
  color: var(--ink-soft);
  padding: 3px 0 3px 20px;
  position: relative;
}
.spanel__curio li::before { content: "→"; position: absolute; left: 0; color: var(--accent); font-family: var(--mono); font-style: normal; font-size: 0.75rem; }
.spanel__mine {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 16px;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--ink);
  margin-bottom: 14px;
}
.spanel__mine b { color: var(--accent); }
.spanel__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.spanel__filter {
  flex: 1;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  color: var(--canvas);
  background: var(--ink);
  border: 0;
  border-radius: 999px;
  padding: 11px 18px;
  cursor: pointer;
  transition: background 0.25s var(--ease);
}
.spanel__filter:hover { background: var(--accent-2); }
.spanel__wiki {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  color: var(--ink);
  text-decoration: none;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  padding: 11px 18px;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.spanel__wiki:hover { color: var(--accent); border-color: var(--accent); }

/* =========================================================
   SESSIONE · HERO CARD (feed & dettaglio)
   ========================================================= */
.session-block {
  max-width: 1120px;
  margin: clamp(40px, 6vw, 76px) auto 0;
  padding: 0 clamp(18px, 4vw, 48px);
}
.session-no {
  display: flex; align-items: center; gap: 16px;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 26px;
}
.session-no b { color: var(--accent); font-weight: 700; }
.session-no i { flex: 1; height: 1px; background: var(--line); }

.session-link { display: block; text-decoration: none; color: inherit; }

.session-grid {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 430px) 1fr;
  gap: clamp(22px, 3.4vw, 44px);
  align-items: center;
}

/* --- colonna sinistra: la postazione --- */
.rail__label {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--ink);
  margin: 0 0 14px;
}
.loc-wrap {
  display: inline-block;
  margin-bottom: 14px;
  text-decoration: none;
  cursor: pointer;
}
.loc-circle {
  width: 112px; height: 112px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 14px 30px -16px rgba(39, 43, 35, 0.35);
  transition: box-shadow 0.25s var(--ease), transform 0.25s var(--ease);
}
.loc-wrap:hover .loc-circle {
  transform: translateY(-2px);
  box-shadow: 0 0 0 3px var(--canvas), 0 0 0 4.5px var(--accent), 0 16px 32px -16px rgba(39, 43, 35, 0.4);
}
.loc-circle img, .loc-circle svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.rail__maps {
  display: block;
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: 8px;
}
.rail__spot {
  font-weight: 600;
  font-size: 1.22rem;
  line-height: 1.2;
  margin: 0;
}
.rail__water {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 6px 0 0;
}
.rail__body {
  font-size: 0.82rem;
  color: var(--ink-soft);
  line-height: 1.65;
  margin: 12px 0 0;
  max-width: 26ch;
}
.rail__view {
  display: inline-block;
  font-family: var(--mono);
  font-style: italic;
  font-size: 0.76rem;
  color: var(--accent);
  margin-top: 12px;
}

/* --- colonna centrale: foto + tab --- */
.photo-wrap { position: relative; padding-right: 46px; }
.photo-wrap.photo-wrap--flat { padding-right: 0; } /* dettaglio: niente tab laterali */
.photo {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 6px;
  overflow: hidden;
  background: var(--plate);
  box-shadow: 0 34px 64px -34px rgba(39, 43, 35, 0.45);
}
.photo > img:not([class]) { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.photo svg.plate { position: absolute; inset: 0; width: 100%; height: 100%; }
.session-link:hover .photo > img:not([class]) { transform: scale(1.045); }

/* copertina composita: sfondo postazione (ritagliato) + soggetto scontornato che sfora dall'alto */
.photo--composite { overflow: visible; background: transparent; }
.photo__clip {
  position: absolute; inset: 0; z-index: 0;
  overflow: hidden;
  border-radius: 6px;
  background: var(--plate);
}
.photo__bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 42%;
  transform: scale(1.0);          /* sfondo meno zoomato: si vede più scena */
  filter: saturate(0.92) brightness(0.86);
  transition: transform 0.6s var(--ease);
}
.session-link:hover .photo__bg { transform: scale(1.05); }
.photo__scrim {
  position: absolute; inset: 0; z-index: 1;
  background:
    radial-gradient(120% 80% at 50% 8%, rgba(39,43,35,0) 40%, rgba(39,43,35,0.34) 100%),
    linear-gradient(180deg, rgba(39,43,35,0.12) 0%, rgba(39,43,35,0) 34%, rgba(39,43,35,0.44) 100%);
}
.photo__subject {
  position: absolute; z-index: 2;
  left: 50%; top: 50%; bottom: auto; right: auto;   /* centrato nella cornice */
  height: 108%; width: auto; max-width: 106%;        /* sfora ~4% sopra/sotto; il cap laterale evita che copra le colonne */
  transform: translate(-50%, -50%);
  object-fit: contain;
  filter: drop-shadow(0 16px 20px rgba(20, 22, 17, 0.4));
  transition: transform 0.55s var(--ease);
}
.session-link:hover .photo__subject { transform: translate(-50%, -50%) scale(1.02); }
.ph-cap {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(243, 240, 230, 0.6);
  padding: 12px 16px;
  pointer-events: none;
}
.side-tabs {
  position: absolute; top: 30px; right: 0;
  display: flex; flex-direction: column;
  width: 46px;
}
.tab-vert {
  background: var(--accent);
  color: var(--canvas);
  writing-mode: vertical-rl;
  font-weight: 600;
  font-size: 0.68rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  padding: 26px 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 0 4px 0 0;
  transition: background 0.25s var(--ease);
}
.session-link:hover .tab-vert { background: var(--accent-2); }
.tab-dark {
  background: var(--ink);
  color: var(--canvas);
  height: 46px;
  display: grid; place-items: center;
  font-size: 1rem;
  border-radius: 0 0 4px 0;
  transition: transform 0.25s var(--ease);
}
.session-link:hover .tab-dark { transform: translateX(3px); }

/* --- colonna destra: stats --- */
.fact { margin-bottom: 20px; }
.fact:last-child { margin-bottom: 0; }
.fact__k {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--ink);
  margin: 0 0 6px;
}
.fact__v {
  font-size: 0.82rem;
  color: var(--ink-soft);
  line-height: 1.6;
  margin: 0;
  max-width: 30ch;
}
.catch-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  padding: 5px 0;
}
.catch-row.is-pb { color: var(--ink); font-weight: 700; }
.catch-row__more { font-family: var(--mono); font-size: 0.68rem; color: var(--muted); padding-top: 6px; }
.pill {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.04em;
  color: var(--canvas);
  padding: 3px 11px;
  border-radius: 999px;
  white-space: nowrap;
  flex: none;
}
.pill--pb  { background: var(--accent); }
.pill--std { background: var(--teal); }
.pill--zero { background: transparent; color: var(--zero); border: 1px solid var(--zero); }   /* skunkato */
.pill--muted { background: transparent; color: var(--muted); border: 1px solid var(--line-2); }
.catch-card__data .nd { color: var(--muted); font-weight: 500; }

/* =========================================================
   WATERMARK outline
   ========================================================= */
.watermark {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(4.4rem, 13vw, 10rem);
  line-height: 1.4;                  /* niente taglio verticale: glifi interi */
  white-space: nowrap;
  text-align: center;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(39, 43, 35, 0.16);
  user-select: none;
  pointer-events: none;
  margin: clamp(34px, 5vw, 70px) 0 clamp(6px, 1.4vw, 16px);
  overflow: hidden;                  /* solo clip orizzontale per parole molto larghe */
}
@supports not (-webkit-text-stroke: 1px black) {
  .watermark { color: rgba(39, 43, 35, 0.07); }
}
/* firma piccola (al posto del watermark gigante) */
.watermark--sign {
  font-size: clamp(1.25rem, 3.4vw, 2.3rem);
  white-space: normal;
  line-height: 1.2;
  letter-spacing: 0.01em;
  -webkit-text-stroke-width: 1px;
  padding: 0 20px;
  margin: clamp(34px, 5vw, 64px) 0 8px;
  overflow: visible;
}

/* =========================================================
   FEED LAYOUT + TIMELINE (indice a sinistra)
   ========================================================= */
.feed-blocks { min-width: 0; }
.feed-blocks .session-block:first-child { margin-top: clamp(6px, 1.5vw, 16px); }

/* precedenza alla centratura: le sessioni restano centrate sulla pagina (come l'hero);
   la timeline compare a sinistra SOLO quando il margine è abbastanza largo da ospitarla
   senza spostare il contenuto dal centro. left agganciato al bordo del contenuto centrato. */
@media (min-width: 1400px) {
  /* 3 colonne SIMMETRICHE: le due laterali uguali tengono le sessioni centrate come l'hero.
     Timeline COMPATTA nella colonna sinistra: mai attaccata al bordo (padding del grid),
     nomi su una riga con ellissi, tipografia ridotta. */
  .feed-layout {
    display: grid;
    grid-template-columns: minmax(172px, 1fr) minmax(0, 1120px) minmax(172px, 1fr);
    column-gap: clamp(18px, 2vw, 32px);
    align-items: start;
    padding: 0 clamp(16px, 1.8vw, 36px);
  }
  .feed-layout .feed-blocks { grid-column: 2; min-width: 0; }
  .feed-layout .session-block { margin-left: 0; margin-right: 0; }
  .feed-layout .timeline {
    display: block;
    grid-column: 1;
    justify-self: end;   /* accostata al contenuto centrato, col gap come respiro */
    width: min(172px, 100%);
    position: sticky;
    top: clamp(96px, 12vh, 130px);
    align-self: start;
    max-height: calc(100vh - 150px);
    overflow-y: auto;
    overflow-x: hidden;
  }
  /* versione compatta: tutto più piccolo e su una riga */
  .feed-layout .timeline__title { font-size: 0.6rem; margin-bottom: 14px; }
  .feed-layout .timeline__item { padding: 9px 0 9px 22px; }
  .feed-layout .timeline__dot { width: 11px; height: 11px; top: 13px; }
  .feed-layout .timeline__meta b { font-size: 0.62rem; }
  .feed-layout .timeline__spot {
    font-size: 0.78rem;
    margin: 2px 0 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .feed-layout .timeline__date { font-size: 0.6rem; }
}

/* indice sessioni: nascosto su mobile/tablet (le sessioni vanno a tutta larghezza),
   diventa colonna sticky affiancata alle sessioni da desktop in su (vedi .feed-layout) */
.timeline {
  display: none;
}
.timeline__title {
  display: block;
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 18px;
}
.timeline__list { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline__list::before {
  content: ""; position: absolute;
  left: 6px; top: 10px; bottom: 10px; width: 2px;
  background: linear-gradient(var(--line-2), var(--line), transparent);
}
.timeline__item {
  position: relative;
  display: block;
  padding: 12px 0 12px 26px;
  cursor: pointer;
  opacity: 0.62;
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}
.timeline__item:hover { opacity: 0.9; transform: translateX(2px); }
.timeline__item.is-active { opacity: 1; }
.timeline__dot {
  position: absolute; left: 0; top: 16px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--canvas);
  border: 2px solid var(--line-2);
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.timeline__item.is-active .timeline__dot {
  background: var(--accent); border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(166, 118, 118, 0.18);
}
.timeline__meta b {
  font-family: var(--mono); font-size: 0.68rem;
  letter-spacing: 0.08em; color: var(--muted);
}
.timeline__item.is-active .timeline__meta b { color: var(--accent); }
.timeline__spot { display: block; font-weight: 600; font-size: 0.9rem; margin: 3px 0 2px; line-height: 1.25; overflow-wrap: break-word; }
.timeline__date { display: block; font-family: var(--mono); font-size: 0.64rem; color: var(--muted); }

/* =========================================================
   CLASSIFICA CATTURE (tally) · dettaglio & statistiche
   ========================================================= */
.tally { display: flex; flex-direction: column; gap: 11px; }
.tally__row {
  display: grid;
  grid-template-columns: minmax(96px, auto) 1fr 1.8em;
  align-items: center;
  gap: 12px;
}
.tally__name {
  display: flex; align-items: center; gap: 8px;
  font-weight: 500; font-size: 0.9rem; color: var(--ink);
}
.tally__name em { font-style: italic; font-family: var(--serif); font-size: 0.82rem; color: var(--muted); }
.tally__row.is-me .tally__name { color: var(--accent); font-weight: 700; }
.tally__track { height: 8px; border-radius: 999px; background: var(--surface); overflow: hidden; }
.tally__track i { display: block; height: 100%; border-radius: 999px; background: var(--teal); transform-origin: left; animation: grow 0.9s var(--ease) both; }
.tally__row.is-me .tally__track i { background: var(--accent); }
.tally__n { font-family: var(--mono); font-weight: 700; font-size: 0.85rem; color: var(--ink); text-align: right; }
.tally__row.is-zero .tally__name,
.tally__row.is-zero .tally__n { color: var(--zero); }
.tally__row.is-zero .tally__track i { background: var(--zero); opacity: 0.35; }

.catch-card__angler {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 5px;
}

.stats-section-label {
  max-width: 1120px;
  margin: clamp(30px, 4vw, 46px) auto 14px;
  padding: 0 clamp(18px, 4vw, 48px);
  display: flex; align-items: center; gap: 16px;
}
.stats-section-label span {
  font-family: var(--mono); font-size: 0.72rem;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink);
}
.stats-section-label i { flex: 1; height: 1px; background: var(--line); }

/* =========================================================
   DETTAGLIO SESSIONE
   ========================================================= */
.back {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  text-decoration: none;
  margin: 26px 0 0 clamp(18px, 4vw, 48px);
  transition: color 0.2s var(--ease), gap 0.2s var(--ease);
}
.back:hover { color: var(--accent); gap: 13px; }

.detail-head {
  text-align: center;
  padding: clamp(14px, 3vw, 34px) 20px 0;
}
.detail-head__date {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}
.detail-head__spot {
  margin: 12px 0 0;
  font-weight: 500;
  font-size: clamp(1.7rem, 4.6vw, 3.2rem);
  letter-spacing: 0.18em;
  text-indent: 0.18em;
  text-transform: uppercase;
  line-height: 1.2;
}
.detail-head__zone {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 12px;
}

/* racconto */
.story-wrap {
  max-width: 1120px;
  margin: clamp(40px, 6vw, 72px) auto 0;
  padding: 0 clamp(18px, 4vw, 48px);
}
.story-layout { display: grid; grid-template-columns: 1fr; gap: clamp(22px, 3vw, 44px); align-items: start; }
.story-layout.has-sides {
  grid-template-columns: minmax(0, 210px) minmax(0, 600px) minmax(0, 210px);
  justify-content: center;
}
.story-side { display: flex; flex-direction: column; gap: 18px; }
.story-side:empty { display: none; }
.story-side--left { padding-top: 6px; }        /* piccolo sfalsamento estetico */
.story-side--right { padding-top: 30px; }

.catch-shot { margin: 0; animation: rise 0.5s var(--ease) both; }
.catch-shot__media {
  position: relative; aspect-ratio: 3 / 4;
  border-radius: 6px; overflow: hidden;
  background: var(--plate); cursor: zoom-in;
  box-shadow: 0 8px 20px -16px rgba(39, 43, 35, 0.45);
}
.catch-shot__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.catch-shot:hover .catch-shot__media img { transform: scale(1.05); }
.catch-shot:hover .shot__zoom { opacity: 1; }
.catch-shot figcaption {
  font-family: var(--serif); font-style: italic;
  font-size: 0.9rem; color: var(--muted);
  margin-top: 9px; line-height: 1.4;
}

.story__label, .catches__label {
  display: flex; align-items: center; gap: 18px;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 26px;
}
.story__label::before, .story__label::after,
.catches__label::before, .catches__label::after {
  content: ""; flex: 1; height: 1px; background: var(--line);
}
.story__text {
  font-size: 1.02rem;
  line-height: 1.85;
  color: var(--ink-soft);
}
.story__text p { margin: 0 0 1.2em; }
.story__text p:first-of-type::first-letter {
  font-family: var(--serif);
  font-style: italic;
  font-size: 3.1em;
  line-height: 0.75;
  float: left;
  color: var(--accent);
  padding: 8px 10px 0 0;
}

/* catture */
.catches {
  max-width: 1120px;
  margin: clamp(44px, 6vw, 76px) auto 0;
  padding: 0 clamp(18px, 4vw, 48px);
}
.catch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}
.tally + .catch-grid { margin-top: clamp(30px, 4vw, 52px); }   /* stacca le mie foto dall'istogramma */
.catch-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  animation: rise 0.5s var(--ease) both;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.catch-card:hover { transform: translateY(-3px); box-shadow: 0 18px 34px -22px rgba(39, 43, 35, 0.35); }
.catch-card__media { position: relative; aspect-ratio: 3 / 4; background: var(--plate); overflow: hidden; }   /* stessa dimensione della galleria */
.catch-card__media img, .catch-card__media svg.plate { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.catch-card__pb {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  background: var(--accent);
  color: var(--canvas);
  padding: 4px 10px;
  border-radius: 999px;
}
.catch-card__body { padding: 15px 17px 17px; }
.catch-card__species { font-weight: 600; font-size: 1.02rem; }
.catch-card__data {
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--ink-soft);
  margin-top: 7px;
}
.catch-card__data b { color: var(--ink); font-weight: 700; }
.catch-card__note {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.88rem;
  color: var(--muted);
  margin: 9px 0 0;
}

/* =========================================================
   GALLERIA (dettaglio)
   ========================================================= */
.gallery {
  max-width: 1120px;
  margin: clamp(44px, 6vw, 76px) auto 0;
  padding: 0 clamp(18px, 4vw, 48px);
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}
.shot {
  margin: 0;
  animation: rise 0.5s var(--ease) both;
}
.shot__media {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 6px;
  overflow: hidden;
  background: var(--plate);
  box-shadow: 0 6px 16px -14px rgba(39, 43, 35, 0.4);
}
.shot__media img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}
.shot:hover .shot__media img { transform: scale(1.05); }
.shot figcaption {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  margin-top: 9px;
  line-height: 1.4;
}

/* =========================================================
   STATISTICHE
   ========================================================= */
.stats-head { text-align: center; padding: clamp(8px, 2.4vw, 28px) 20px 0; }
.stats-head h1 {
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(2.8rem, 8.5vw, 5.6rem);
  line-height: 1.04;
  letter-spacing: 0.01em;
  color: var(--ink);
}
.stats-head p {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 16px 0 0;
}

.kpi-band {
  max-width: 1120px;
  margin: clamp(36px, 5vw, 60px) auto 0;
  padding: 0 clamp(18px, 4vw, 48px);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.kpi {
  text-align: center;
  padding: clamp(20px, 3vw, 34px) 10px;
  border-left: 1px solid var(--line);
}
.kpi:nth-child(4n + 1) { border-left: 0; }
.kpi:nth-child(n + 5) { border-top: 1px solid var(--line); }
.kpi__num {
  font-weight: 600;
  font-size: clamp(1.7rem, 3.6vw, 2.7rem);
  line-height: 1;
  color: var(--ink);
}
.kpi__num small { font-size: 0.85rem; font-weight: 500; color: var(--muted); margin-left: 3px; }
.kpi--accent .kpi__num { color: var(--accent); }
.kpi__label {
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 10px;
}

.panels {
  max-width: 1120px;
  margin: clamp(28px, 4vw, 44px) auto 0;
  padding: 0 clamp(18px, 4vw, 48px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 26px 30px;
}
.panel--wide { grid-column: 1 / -1; }
.panel h3 { margin: 0; font-weight: 600; font-size: 1.12rem; }
.panel__sub {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 5px 0 22px;
}

.bars { display: flex; flex-direction: column; gap: 15px; }
.bar__top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.bar__name { font-weight: 500; font-size: 0.9rem; }
.bar__val { font-family: var(--mono); font-size: 0.7rem; color: var(--muted); }
.bar__track { height: 8px; border-radius: 999px; background: var(--surface); overflow: hidden; }
.bar__fill { height: 100%; border-radius: 999px; background: var(--ink); transform-origin: left; animation: grow 0.9s var(--ease) both; }
.bar:first-child .bar__fill { background: var(--accent); }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.record {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
}
.record:last-child { border-bottom: 0; }
.record__species { font-weight: 600; font-size: 0.98rem; }
.record__meta { font-family: var(--mono); font-size: 0.66rem; color: var(--muted); margin-top: 3px; }
.record__weight {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--accent);
  white-space: nowrap;
}
.record__weight small { font-size: 0.62rem; color: var(--muted); font-weight: 400; }

.spot-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.spot-row:last-child { border-bottom: 0; }
.spot-row__name { font-weight: 500; font-size: 0.94rem; display: flex; align-items: center; gap: 14px; }
.spot-row__rank { font-family: var(--mono); font-weight: 700; font-size: 0.74rem; color: var(--accent); width: 24px; }
.spot-row__count { font-family: var(--mono); font-size: 0.72rem; color: var(--muted); }

/* =========================================================
   FOOTER / VARIE
   ========================================================= */
.footer {
  display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 30px clamp(20px, 4.5vw, 52px) 36px;
  border-top: 1px solid var(--line);
  margin-top: clamp(30px, 5vw, 60px);
}
.footer__mono {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.footer__hint { font-family: var(--serif); font-style: italic; font-size: 0.92rem; color: var(--ink-soft); }

.empty {
  text-align: center;
  padding: 70px 20px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--muted);
}

/* =========================================================
   STATISTICHE · toggle mie / gruppo con slider
   ========================================================= */
.stats-toggle {
  position: relative;
  display: flex;
  width: fit-content;
  margin: clamp(28px, 4vw, 44px) auto 0;
  background: var(--surface);
  border-radius: 999px;
  padding: 4px;
}
.stats-toggle__btn {
  border: 0; background: none; cursor: pointer;
  font-family: var(--mono);
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  padding: 10px 26px;
  border-radius: 999px;
  transition: color 0.25s var(--ease);
}
.stats-toggle__btn.is-active {
  color: var(--ink);
  background: var(--canvas);
  box-shadow: 0 4px 12px -6px rgba(39, 43, 35, 0.4);
}

.stats-slider {
  overflow-x: auto; overflow-y: hidden;
  scrollbar-width: none; -ms-overflow-style: none;
  transition: height 0.4s var(--ease);
}
.stats-slider::-webkit-scrollbar { display: none; }
.stats-track { display: flex; width: 200%; }
.stats-slide { flex: 0 0 50%; width: 50%; align-self: flex-start; }
.stats-slide .kpi-band { margin-top: clamp(22px, 3vw, 34px); }

/* =========================================================
   LIGHTBOX
   ========================================================= */
.shot__media { cursor: zoom-in; }
.shot__zoom {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(39, 43, 35, 0.5);
  color: var(--canvas);
  font-size: 0.9rem;
  opacity: 0; transition: opacity 0.25s var(--ease);
}
.shot:hover .shot__zoom { opacity: 1; }

.lightbox {
  position: fixed; inset: 0; z-index: 80;
  display: flex; align-items: center; justify-content: center;
  padding: clamp(16px, 4vw, 48px);
  background: rgba(20, 22, 17, 0.86);
  animation: fadein 0.25s var(--ease) both;
}
.lightbox[hidden] { display: none; }
.lb__figure { margin: 0; max-width: min(1000px, 100%); max-height: 100%; display: flex; flex-direction: column; align-items: center; animation: rise 0.3s var(--ease) both; }
.lb__figure img { max-width: 100%; max-height: 82vh; object-fit: contain; border-radius: 4px; box-shadow: 0 30px 70px -30px rgba(0,0,0,0.7); }
.lb__figure figcaption {
  font-family: var(--mono); font-size: 0.74rem;
  color: rgba(243, 240, 230, 0.85);
  margin-top: 16px; text-align: center;
  display: flex; gap: 14px; align-items: center; flex-wrap: wrap; justify-content: center;
}
.lb__count { color: rgba(243, 240, 230, 0.5); }
.lb__close {
  position: absolute; top: 18px; right: 20px;
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid rgba(243, 240, 230, 0.3);
  background: none; color: var(--canvas);
  font-size: 1rem; cursor: pointer;
  transition: background 0.2s var(--ease), transform 0.2s var(--ease);
}
.lb__close:hover { background: rgba(243, 240, 230, 0.14); transform: rotate(90deg); }
.lb__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 52px; height: 52px; border-radius: 50%;
  border: 1px solid rgba(243, 240, 230, 0.25);
  background: rgba(39, 43, 35, 0.4); color: var(--canvas);
  font-size: 1.7rem; line-height: 1; cursor: pointer;
  display: grid; place-items: center;
  transition: background 0.2s var(--ease);
}
.lb__nav:hover { background: rgba(166, 118, 118, 0.6); }
.lb__prev { left: clamp(10px, 3vw, 34px); }
.lb__next { right: clamp(10px, 3vw, 34px); }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 900px) {
  /* racconto: testo sopra, foto ai lati diventano una riga sotto */
  .story-layout.has-sides { grid-template-columns: 1fr; }
  .story__text { order: 1; }
  .story-side { flex-direction: row; flex-wrap: wrap; padding-top: 0; }
  .story-side--left { order: 2; }
  .story-side--right { order: 3; }
  .catch-shot { flex: 1 1 160px; }
}
@media (max-width: 960px) {
  .session-grid { grid-template-columns: 1fr; justify-items: center; gap: 30px; }
  .photo-wrap { width: min(430px, 100%); order: -1; }
  .rail--left, .rail--right { width: min(430px, 100%); }
  .rail__body { max-width: none; }
  .fact__v { max-width: none; }
  .kpi-band { grid-template-columns: repeat(2, 1fr); }
  .kpi:nth-child(4n + 1) { border-left: 1px solid var(--line); }
  .kpi:nth-child(2n + 1) { border-left: 0; }
  .kpi:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .panels { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .logo__text { display: none; }
  .fish-chip { padding: 7px 12px; }
  .fish-chip svg { width: 44px; }
  .photo-wrap { padding-right: 40px; }
  .side-tabs { width: 40px; }
  .tab-vert { font-size: 0.62rem; padding: 20px 0; }
  .tab-dark { height: 40px; }
}
