/* Collezione — stile scuro come dash.alet.me, pensato prima per il telefono. */
:root {
  --bg: #0f1117;
  --card: #1c1f2e;
  --card-2: #161927;
  --border: #2e3150;
  --line: #1a1d29;
  --accent: #4a6cf7;
  --accent-soft: #9fb0ff;
  --text: #e0e0e0;
  --muted: #8a90a8;
  --dim: #5c6178;
  --star: #f2c14e;
  --radius: 10px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { color-scheme: dark; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg); color: var(--text); min-height: 100vh;
  padding: 20px 16px 48px; line-height: 1.4;
}
a { color: var(--accent-soft); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 1180px; margin: 0 auto; }

/* Testata */
header { display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap; margin-bottom: 18px; }
header h1 { font-size: 1.45rem; font-weight: 500; color: #fff; }
header h1 a { color: #fff; }
header nav { display: flex; gap: 16px; font-size: .88rem; }
header nav a { color: var(--dim); padding-bottom: 3px; }
header nav a.on { color: #fff; border-bottom: 2px solid var(--accent); }
header nav a:hover { text-decoration: none; color: #fff; }
header .meta { margin-left: auto; color: var(--dim); font-size: .78rem; }

/* Ricerca e filtri */
.search { display: flex; gap: 10px; margin-bottom: 12px; }
.search input {
  flex: 1; background: var(--card); border: 1px solid var(--border); color: var(--text);
  font: inherit; font-size: 1rem; padding: 11px 14px; border-radius: var(--radius); outline: none;
}
.search input:focus { border-color: var(--accent); background: var(--card-2); }
.search input::placeholder { color: var(--dim); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.chip {
  background: var(--card); border: 1px solid var(--border); color: var(--muted);
  border-radius: 999px; padding: 6px 12px; font-size: .82rem; cursor: pointer; white-space: nowrap;
}
.chip b { color: var(--text); font-weight: 500; }
.chip .n { color: var(--dim); margin-left: 4px; font-variant-numeric: tabular-nums; }
.chip.on { background: #242842; border-color: var(--accent); color: #fff; }
.chip.on .n { color: var(--accent-soft); }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; font-size: .83rem; color: var(--muted); }
.filters select {
  background: var(--card); border: 1px solid var(--border); color: var(--text); font: inherit;
  font-size: .83rem; padding: 7px 10px; border-radius: 8px;
}
.filters .count { margin-left: auto; color: var(--dim); font-variant-numeric: tabular-nums; }
.filters .reset { color: var(--accent-soft); cursor: pointer; background: none; border: 0; font: inherit; font-size: .83rem; }

/* Card */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; color: var(--text); display: flex; flex-direction: column; transition: border-color .15s, transform .15s;
}
.card:hover { border-color: var(--accent); text-decoration: none; transform: translateY(-2px); }
.cover { aspect-ratio: 3 / 4; background: var(--card-2); display: grid; place-items: center; position: relative; }
.cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover .icon { font-size: 2.6rem; opacity: .55; }
.cover .stars { position: absolute; top: 6px; right: 8px; color: var(--star); font-size: .8rem; text-shadow: 0 1px 3px #000; }
.card .body { padding: 9px 10px 11px; display: flex; flex-direction: column; gap: 2px; }
.card .title { font-size: .9rem; font-weight: 500; color: #fff; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .who { font-size: .78rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .tag { font-size: .72rem; color: var(--dim); margin-top: 4px; display: flex; justify-content: space-between; gap: 6px; }
.card .tag span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty { color: var(--dim); padding: 40px 0; text-align: center; }

/* Scheda */
.back { display: inline-block; margin-bottom: 14px; font-size: .85rem; }
.scheda { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 720px) { .scheda { grid-template-columns: 320px 1fr; align-items: start; } }
.scheda .cover { border-radius: var(--radius); border: 1px solid var(--border); max-width: 420px; }
@media (max-width: 719px) { .scheda .cover { max-width: 240px; margin: 0 auto; } .scheda .cover:has(img) { max-width: 100%; } }
.scheda .cover .icon { font-size: 5rem; }
.scheda .thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.scheda .thumbs img { width: 64px; height: 84px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); cursor: pointer; }
.scheda h2 { font-size: 1.5rem; font-weight: 500; color: #fff; line-height: 1.2; }
.scheda .sub { color: var(--muted); font-size: 1rem; margin-top: 4px; }
.scheda .kind { color: var(--accent-soft); font-size: .82rem; margin-bottom: 8px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.scheda .kind .stars { color: var(--star); }
.fields { display: grid; grid-template-columns: max-content 1fr; gap: 7px 16px; margin-top: 16px; font-size: .9rem; }
.fields dt { color: var(--dim); font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; padding-top: 3px; }
.fields dd { color: var(--text); }
.fields dd.muted { color: var(--muted); }
.fields dd .pill { display: inline-block; background: var(--card-2); border: 1px solid var(--border); border-radius: 999px; padding: 1px 9px; font-size: .8rem; margin: 2px 4px 2px 0; }
.block { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; margin-top: 14px; font-size: .9rem; }
.block h3 { font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--dim); font-weight: 500; margin-bottom: 6px; }
.block.dubbi { color: var(--muted); border-style: dashed; }
.dates { color: var(--dim); font-size: .76rem; margin-top: 16px; }

/* Statistiche */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 20px; }
.tile { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.tile .n { font-size: 1.5rem; color: #fff; font-weight: 600; font-variant-numeric: tabular-nums; }
.tile .l { font-size: .72rem; color: var(--dim); text-transform: uppercase; letter-spacing: .05em; margin-top: 2px; }
.panels { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.panel { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.panel h3 { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--dim); font-weight: 500; margin-bottom: 10px; }
.bars { display: grid; grid-template-columns: max-content 1fr max-content; gap: 7px 10px; align-items: center; font-size: .85rem; }
.bars .lab { color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px; }
.bars .lab a { color: var(--text); }
.bars .bar { height: 10px; background: var(--line); border-radius: 4px; overflow: hidden; }
.bars .bar i { display: block; height: 100%; background: var(--accent); border-radius: 0 4px 4px 0; min-width: 2px; }
.bars .val { color: var(--muted); font-variant-numeric: tabular-nums; text-align: right; }
.recent { list-style: none; display: flex; flex-direction: column; gap: 6px; font-size: .88rem; }
.recent li { display: flex; gap: 10px; align-items: baseline; }
.recent .d { color: var(--dim); font-size: .76rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.recent .k { color: var(--dim); font-size: .76rem; }

footer { color: var(--dim); font-size: .74rem; margin-top: 36px; }
