/* ==========================================================================
   BOUNCER — design system v3
   Carta calda, schede bianche, bordi sottili al posto delle ombre.
   Un solo peso (400): la gerarchia la fanno misura e spaziatura.
   Un solo colore: il giallo evidenziatore, solo dove si agisce o qualcosa è attivo.
   Raggi: 6 pulsanti e tag, 10 campi, 12 riquadri tenui, 16 schede.
   ========================================================================== */

@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('/assets/fonts/inter-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('/assets/fonts/inter-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --yellow: #e4f222;
  --yellow-hover: #d6e40f;
  --ink: #0c0a08;
  --obsidian: #1a1919;
  --paper: #ffffff;
  --bone: #f4f2f0;
  --ash: #6d6c6b;
  --hairline: #e5e7eb;
  --smoke: #d3d3d3;
  --line: rgba(33, 33, 33, 0.14);
  --on-dark-soft: rgba(255, 255, 255, 0.58);
  --on-dark-line: rgba(255, 255, 255, 0.12);

  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --t-label: 11px;
  --t-small: 14px;
  --t-body: 16px;
  --t-sub: 20px;
  --t-h3: 24px;
  --t-h2: 28px;
  --t-h1: 32px;
  --t-display: 48px;

  --r-tag: 6px;
  --r-btn: 6px;
  --r-input: 10px;
  --r-wash: 12px;
  --r-card: 16px;

  --gutter: 16px;
  --page: 1200px;
  --nav-h: 60px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}
@media (min-width: 720px) {
  :root { --gutter: 32px; --t-h1: 40px; --t-display: 64px; --nav-h: 68px; }
}

/* --------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  background: var(--bone);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 400;
  font-size: var(--t-body);
  line-height: 1.5;
  font-feature-settings: 'ss01', 'cv11';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  min-height: 100dvh;
}
img, svg, canvas { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; background: none; border: 0; }
button { cursor: pointer; text-align: inherit; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, h5, h6, strong, b, th { font-weight: 400; }
::selection { background: var(--yellow); color: var(--ink); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.inverse :focus-visible { outline-color: var(--yellow); }
[hidden] { display: none !important; }

/* --------------------------------------------------------------- testo */
.t-display { font-size: var(--t-display); line-height: 1; letter-spacing: -0.04em; }
.t-h1 { font-size: var(--t-h1); line-height: 1.05; letter-spacing: -0.03em; }
.t-h2 { font-size: var(--t-h2); line-height: 1.14; letter-spacing: -0.02em; }
.t-h3 { font-size: var(--t-sub); line-height: 1.3; letter-spacing: -0.01em; }
.t-body { font-size: var(--t-body); line-height: 1.5; }
.t-small { font-size: var(--t-small); line-height: 1.45; }
.t-label { font-size: var(--t-label); line-height: 1.4; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ash); }
.t-muted { color: var(--ash); }
.inverse .t-muted, .inverse .t-label { color: var(--on-dark-soft); }
.t-num { font-variant-numeric: tabular-nums; }
.t-break { overflow-wrap: anywhere; }
.measure { max-width: 56ch; }

/* --------------------------------------------------------------- impaginazione */
.page { width: 100%; max-width: var(--page); margin: 0 auto; padding: 0 var(--gutter); }
.page-narrow { max-width: calc(760px + 2 * var(--gutter)); }
.stack > * + * { margin-top: var(--stack, 16px); }
.stack-8 { --stack: 8px; } .stack-12 { --stack: 12px; } .stack-24 { --stack: 24px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.row-between { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; }
.grow { flex: 1 1 auto; min-width: 0; }
.row-tight { flex-wrap: nowrap; gap: 8px; }
.row-tight > .input { width: auto; flex: 1 1 auto; min-width: 0; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; } .mt-48 { margin-top: 48px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.only-touch { display: none; }
@media (pointer: coarse) { .only-touch { display: revert; } .only-mouse { display: none; } }
@media (max-width: 719px) { .hide-sm { display: none !important; } }

/* --------------------------------------------------------------- barra in alto */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: rgba(244, 242, 240, 0.86);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hairline);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: var(--nav-h); }
.logo {
  display: inline-flex; align-items: center; height: 34px; padding: 0 12px 0 13px;
  background: var(--yellow); color: var(--ink); border-radius: var(--r-btn);
  font-size: 17px; font-weight: 650; line-height: 1; letter-spacing: 0.12em; text-transform: uppercase; white-space: nowrap; /* unico punto con un peso diverso: è il marchio */
  transition: background-color 0.3s var(--ease);
}
a.logo:hover { background: var(--yellow-hover); }
.nav-links { display: flex; align-items: center; gap: 4px; min-width: 0; }
.nav-note { font-size: var(--t-small); color: var(--ash); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }

/* --------------------------------------------------------------- pulsanti */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 44px; padding: 0 20px; border-radius: var(--r-btn);
  font-size: var(--t-body); line-height: 1; white-space: nowrap; cursor: pointer;
  transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease), color 0.3s var(--ease);
}
.btn:disabled, .btn[aria-disabled='true'] { opacity: 0.4; cursor: not-allowed; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { background: var(--yellow); color: var(--ink); }
.btn-primary:hover:not(:disabled) { background: var(--yellow-hover); }
.btn-outline { border: 1px solid var(--ink); padding: 0 16px; }
.btn-outline:hover:not(:disabled) { background: var(--paper); }
.btn-ghost { padding: 0 12px; }
.btn-ghost:hover:not(:disabled), .btn-ghost[aria-current='page'] { background: rgba(12, 10, 8, 0.06); }
.btn-lg { height: 52px; padding: 0 24px; font-size: 18px; }
.btn-sm { height: 36px; padding: 0 12px; font-size: var(--t-small); }
.btn-block { width: 100%; }
/* Pulsante Google: bianco con il logo a colori, come chiedono le linee guida di Google. */
.btn-google { background: var(--paper); color: #1f1f1f; border: 1px solid #747775; height: 48px; padding: 0 20px 0 14px; gap: 12px; }
.btn-google:hover { background: #f7f8f8; }
.btn-google svg { width: 20px; height: 20px; }

.link { text-decoration: underline; text-decoration-color: var(--smoke); text-decoration-thickness: 1px; text-underline-offset: 0.22em; cursor: pointer; transition: text-decoration-color 0.3s; }
.link:hover { text-decoration-color: currentColor; }
.inverse .link { text-decoration-color: var(--on-dark-soft); }

/* --------------------------------------------------------------- superfici */
.card { background: var(--paper); border: 1px solid var(--hairline); border-radius: var(--r-card); padding: 24px; }
.card.card-flush { padding: 0; overflow: hidden; }
.card + .card { margin-top: 16px; }
.wash { background: var(--bone); border-radius: var(--r-wash); padding: 16px; }
.inverse { background: var(--obsidian); color: var(--paper); }
.card.inverse { border-color: var(--obsidian); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
@media (max-width: 719px) { .card { padding: 20px; } }

/* --------------------------------------------------------------- campi */
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.label { font-size: var(--t-small); color: var(--ash); }
.hint { font-size: 13px; line-height: 1.45; color: var(--ash); }
.input, .textarea {
  width: 100%; height: 48px; padding: 0 16px;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-input);
  font-size: var(--t-body); outline: none;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
  -webkit-appearance: none; appearance: none;
}
.textarea { height: auto; min-height: 88px; padding: 12px 16px; line-height: 1.5; resize: vertical; }
.input:focus, .textarea:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(228, 242, 34, 0.75); }
.input::placeholder, .textarea::placeholder { color: #a3a2a1; }
.input:-webkit-autofill { -webkit-text-fill-color: var(--ink); transition: background-color 9999s; }
input[type='date'].input { padding-right: 12px; }
.input.code { font-variant-numeric: tabular-nums; letter-spacing: 0.14em; text-transform: uppercase; }
/* Testo modificabile che sembra testo: titolo del progetto, titoli delle tracce. */
.input-bare {
  width: calc(100% + 16px); padding: 4px 8px; margin: 0 -8px; border-radius: var(--r-input);
  border: 1px solid transparent; outline: none; background: transparent; resize: none; overflow: hidden;
  transition: background-color 0.3s, border-color 0.3s;
}
.input-bare:hover { background: rgba(12, 10, 8, 0.04); }
.input-bare:focus { background: var(--paper); border-color: var(--line); }

.check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.check input {
  -webkit-appearance: none; appearance: none; flex: none;
  width: 20px; height: 20px; border: 1px solid var(--ink); border-radius: var(--r-btn);
  background: var(--paper); display: grid; place-content: center; cursor: pointer;
  transition: background-color 0.3s;
}
.check input::after { content: ''; width: 10px; height: 5px; border-left: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: translateY(-1px) rotate(-45deg); opacity: 0; }
.check input:checked { background: var(--yellow); }
.check input:checked::after { opacity: 1; }

.seg { display: inline-flex; gap: 4px; padding: 4px; background: var(--bone); border: 1px solid var(--hairline); border-radius: var(--r-input); max-width: 100%; width: fit-content; }
.seg button { height: 38px; padding: 0 16px; border-radius: var(--r-btn); color: var(--ash); transition: background-color 0.3s, color 0.3s; }
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed='true'] { background: var(--yellow); color: var(--ink); }

.stepper { display: inline-flex; align-items: center; width: fit-content; height: 48px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-input); }
.stepper button { width: 46px; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 20px; transition: background-color 0.3s; }
.stepper button:first-child { border-radius: 9px 0 0 9px; }
.stepper button:last-child { border-radius: 0 9px 9px 0; }
.stepper button:hover { background: var(--bone); }
.stepper output { min-width: 40px; text-align: center; font-size: var(--t-sub); font-variant-numeric: tabular-nums; }

/* --------------------------------------------------------------- etichette */
.tag { display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border-radius: var(--r-tag); font-size: 13px; line-height: 1; white-space: nowrap; background: var(--bone); }
.tag-line { background: transparent; border: 1px solid var(--hairline); }
.tag-dashed { background: transparent; border: 1px dashed var(--smoke); color: var(--ash); }
.tag-dark { background: var(--obsidian); color: var(--paper); }
.tag-yellow { background: var(--yellow); }

/* --------------------------------------------------------------- zona di rilascio */
.drop {
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 20px;
  min-height: 360px; padding: 40px 32px;
  background: var(--paper); border: 1.5px dashed #c4c2bf; border-radius: var(--r-card);
  cursor: pointer; transition: border-color 0.3s var(--ease), background-color 0.3s var(--ease);
}
.drop:hover { border-color: var(--ash); }
.drop.is-over { border-style: solid; border-color: var(--ink); background: #fbfbf9; }
.drop-icon { width: 48px; height: 48px; border-radius: var(--r-wash); background: var(--bone); display: grid; place-content: center; }
.drop-icon svg { width: 22px; height: 22px; }
.drop-title { font-size: var(--t-h2); line-height: 1.14; letter-spacing: -0.02em; }
.drop-file { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 16px; border-radius: var(--r-wash); background: var(--bone); }
.drop-sm { min-height: 0; padding: 14px 18px; flex-direction: row; align-items: center; justify-content: flex-start; gap: 12px; border-radius: var(--r-wash); }
.drop-sm .drop-icon { width: 32px; height: 32px; border-radius: var(--r-btn); }
.drop-sm .drop-icon svg { width: 16px; height: 16px; }
.drop-sm .drop-title { font-size: var(--t-body); letter-spacing: 0; }
@media (max-width: 719px) { .drop:not(.drop-sm) { min-height: 240px; padding: 28px 20px; } }

.progress { height: 3px; background: var(--hairline); position: relative; overflow: hidden; }
.progress > i { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--ink); transition: width 0.2s linear; }
.progress.is-indeterminate > i { width: 30%; animation: indeterminate 1.1s linear infinite; }
@keyframes indeterminate { from { left: -30%; } to { left: 100%; } }
.loading-line { height: 3px; width: 100%; background: var(--yellow); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 0.2; } 50% { opacity: 1; } }

/* --------------------------------------------------------------- elenchi */
.list-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 24px; align-items: center; padding: 18px 24px; border-top: 1px solid var(--hairline); transition: background-color 0.3s; }
.list-row:first-child { border-top: 0; }
.list-row:hover { background: #fbfaf9; }
.list-title { display: block; font-size: var(--t-sub); line-height: 1.3; letter-spacing: -0.01em; }
.list-meta { display: block; font-size: var(--t-small); color: var(--ash); margin-top: 2px; }
.list-side { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 719px) {
  .list-row { grid-template-columns: minmax(0, 1fr); padding: 16px 20px; }
  .list-side { justify-content: flex-start; }
}

.trow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 16px; align-items: center; padding: 12px 0; border-top: 1px solid var(--hairline); }
.trow:first-child { border-top: 0; padding-top: 0; }
.trow-main { min-width: 0; }
.trow-meta { font-size: 13px; color: var(--ash); }
.trow .progress { grid-column: 1 / -1; margin-top: 8px; }

/* --------------------------------------------------------------- pannello */
.head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 40px 0 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 32px; }
.grid-2 .span-2 { grid-column: 1 / -1; }
@media (max-width: 719px) { .grid-2 { grid-template-columns: minmax(0, 1fr); gap: 20px; } .head { padding: 28px 0 20px; } }
.foot-note { font-size: 13px; color: var(--ash); padding: 20px 0 48px; }

.actions-bar {
  position: sticky; bottom: 0; z-index: 15; margin-top: 24px;
  padding: 12px 0 calc(12px + env(safe-area-inset-bottom));
  background: rgba(244, 242, 240, 0.9);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-top: 1px solid var(--hairline);
}
.actions-bar .page { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.actions-bar .row { gap: 8px; }
.save-state { font-size: var(--t-small); color: var(--ash); min-width: 0; }
@media (max-width: 719px) {
  .actions-bar .row { width: 100%; }
  .actions-bar .row > .btn { flex: 1 1 0; }
  .save-state { width: 100%; }
}

details.more { margin-top: 16px; }
details.more > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; margin-left: -12px; border-radius: var(--r-btn); color: var(--ash); transition: background-color 0.3s, color 0.3s; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::after { content: ''; width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform 0.3s; }
details.more[open] > summary::after { transform: translateY(1px) rotate(-135deg); }
details.more > summary:hover { background: rgba(12, 10, 8, 0.05); color: var(--ink); }
details.more[open] > summary { margin-bottom: 12px; }

.modal { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(12, 10, 8, 0.4); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.modal-box { width: min(480px, 100%); }
.share-url { font-size: var(--t-small); overflow-wrap: anywhere; }

.meter { height: 6px; background: var(--hairline); position: relative; }
.meter > i { position: absolute; inset: 0 auto 0 0; background: var(--ink); max-width: 100%; }

.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; color: var(--ash); padding: 0 16px 8px 0; white-space: nowrap; }
.table td { padding: 10px 16px 10px 0; border-top: 1px solid var(--hairline); vertical-align: baseline; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table th.t-right, .table td.t-right { text-align: right; padding-right: 0; padding-left: 16px; }
.grid-cards { gap: 16px; }
.grid-cards > .card + .card { margin-top: 0; }
.nowrap { white-space: nowrap; }
@media (max-width: 719px) {
  .table:not(.table-keep) thead { display: none; }
  .table:not(.table-keep) tr { display: block; padding: 10px 0; border-top: 1px solid var(--hairline); }
  .table:not(.table-keep) td { display: block; padding: 1px 0; border: 0; }
}

/* --------------------------------------------------------------- commenti */
.comments { list-style: none; }
.comments li { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 2px 12px; align-items: baseline; padding: 12px 0; border-top: 1px solid var(--hairline); }
.comments li:first-child { border-top: 0; }
.comments .at { font-size: var(--t-small); font-variant-numeric: tabular-nums; text-align: left; }
.comments .who { font-size: 13px; color: var(--ash); }
.inverse .comments li { border-top-color: var(--on-dark-line); }
.inverse .comments .who { color: var(--on-dark-soft); }
.comment-form { display: flex; gap: 8px; }
.comments .comment-form { min-width: 0; }
.comment-actions { gap: 12px; }
.inverse .input { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.16); color: var(--paper); }
.inverse .input::placeholder { color: rgba(255, 255, 255, 0.45); }
.inverse .input:focus { border-color: var(--yellow); box-shadow: none; }

/* --------------------------------------------------------------- player del cliente */
.player-top { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: center; }
.play { width: 64px; height: 64px; border-radius: var(--r-wash); background: var(--yellow); color: var(--ink); display: grid; place-content: center; transition: background-color 0.3s; }
.play:hover:not(:disabled) { background: var(--yellow-hover); }
.play svg { width: 24px; height: 24px; }
.play:disabled { background: rgba(255, 255, 255, 0.1); color: rgba(255, 255, 255, 0.4); cursor: not-allowed; }
.plays-left { font-size: var(--t-h3); line-height: 1.17; letter-spacing: -0.015em; }
.wave-wrap { position: relative; margin-top: 24px; }
.wave { width: 100%; height: 56px; cursor: pointer; touch-action: none; }
.wave-marks { position: absolute; left: 0; right: 0; bottom: -7px; height: 4px; pointer-events: none; }
.wave-marks i { position: absolute; top: 0; width: 2px; height: 4px; background: var(--yellow); transform: translateX(-1px); }
.player-time { display: flex; justify-content: space-between; margin-top: 10px; font-size: 13px; color: var(--on-dark-soft); font-variant-numeric: tabular-nums; }
.player-msg { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-top: 12px; font-size: var(--t-small); }
.player-msg:empty { display: none; }
.player-msg .link { color: var(--yellow); text-decoration-color: var(--yellow); }
.player-comments { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--on-dark-line); }
.player-comments .comments { margin-top: 8px; }

/* --------------------------------------------------------------- pagine pubbliche */
.home { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 56px; align-items: center; min-height: calc(100vh - var(--nav-h) - 64px); min-height: calc(100dvh - var(--nav-h) - 64px); padding-top: 40px; padding-bottom: 40px; }
@media (max-width: 899px) { .home { grid-template-columns: minmax(0, 1fr); gap: 28px; align-content: start; padding-top: 28px; padding-bottom: 24px; min-height: 0; } }
.claim { font-size: clamp(48px, 9vw, 112px); line-height: 0.95; letter-spacing: -0.05em; }
.claim-line { display: block; }
body.one-screen { display: flex; flex-direction: column; }
body.one-screen main { flex: 1; }
.foot { display: flex; flex-wrap: wrap; gap: 8px 20px; padding-top: 20px; padding-bottom: calc(20px + env(safe-area-inset-bottom)); font-size: 13px; color: var(--ash); }

.prose-head { padding: 48px 0 24px; }
.steps { list-style: none; counter-reset: step; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.steps li { counter-increment: step; }
.steps li::before { content: counter(step); display: inline-grid; place-content: center; width: 28px; height: 28px; border-radius: var(--r-btn); background: var(--bone); font-size: var(--t-small); margin-bottom: 16px; }
.steps h2 { margin-bottom: 6px; }
@media (max-width: 719px) { .steps { grid-template-columns: minmax(0, 1fr); } }

.auth { max-width: 400px; padding: 72px 0; }
@media (max-width: 719px) { .auth { padding: 48px 0; } }
.gate { max-width: 440px; padding: 64px 0; }

/* --------------------------------------------------------------- avvisi */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 100;
  transform: translate(-50%, 12px); opacity: 0; pointer-events: none;
  max-width: calc(100vw - 32px); padding: 12px 16px; border-radius: var(--r-input);
  background: var(--obsidian); color: var(--paper); font-size: var(--t-small);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
body:has(.actions-bar) .toast { bottom: 96px; }
@media (max-width: 719px) { body:has(.actions-bar) .toast { bottom: 140px; } }
.notice { padding: 12px 16px; border-radius: var(--r-wash); font-size: var(--t-small); }


@media print { .nav, .actions-bar { display: none; } }
.notice-line { background: var(--paper); border: 1px solid var(--hairline); }

/* Home: spiegazione breve, passi, regole di default */
.home-intro { display: flex; flex-direction: column; gap: 24px; }
.lead { font-size: var(--t-sub); line-height: 1.35; letter-spacing: -0.01em; max-width: 30ch; }
.mini-steps { list-style: none; counter-reset: ms; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; max-width: 520px; font-size: var(--t-body); line-height: 1.3; }
.mini-steps li { counter-increment: ms; display: flex; flex-direction: column; gap: 6px; padding-top: 10px; border-top: 1px solid var(--ink); }
.mini-steps li::before { content: '0' counter(ms); font-size: 13px; color: var(--ash); font-variant-numeric: tabular-nums; }
.tag svg { width: 12px; height: 12px; margin-left: 6px; }
.drop-rules { gap: 8px; }
@media (max-width: 899px) { .home-intro { gap: 16px; } .lead { font-size: var(--t-body); } }
@media (max-width: 719px) {
  .mini-steps { font-size: var(--t-small); gap: 10px; }
  .home .drop { min-height: 0; gap: 16px; padding: 24px 20px; }
  .home .drop-icon { display: none; }
  .home .drop-title { font-size: var(--t-h3); }
}

/* Come funziona: passi in righe, domande */
.how-rows { list-style: none; border-top: 1px solid var(--line); }
.how-rows li { display: grid; grid-template-columns: 48px minmax(0, 15rem) minmax(0, 1fr); gap: 4px 24px; align-items: baseline; padding: 18px 0; border-bottom: 1px solid var(--line); }
.how-num { font-size: var(--t-small); color: var(--ash); font-variant-numeric: tabular-nums; }
@media (max-width: 719px) {
  .how-rows li { grid-template-columns: 36px minmax(0, 1fr); }
  .how-rows li p { grid-column: 2; }
}
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 0; font-size: var(--t-body); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 22px; line-height: 1; color: var(--ash); transition: transform 0.3s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:hover { color: var(--ash); }
.faq details p { padding: 0 0 18px; color: var(--ash); max-width: 62ch; }
.stepper.is-locked { background: var(--bone); }
.stepper.is-locked output { color: var(--ash); }
.stepper button:disabled, .seg button:disabled { cursor: not-allowed; opacity: 0.45; }
.stepper button:disabled:hover { background: transparent; }
.seg button[aria-pressed='true']:disabled { opacity: 0.7; }
.local-login { margin-top: 32px; padding-top: 24px; border-top: 1px dashed var(--smoke); }

/* Ricevuta di pagamento nel pannello */
.proof-card { border-color: var(--ink); }
.proof-row { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 20px; align-items: start; }
.proof-row + .proof-row { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--hairline); }
.proof-thumb { display: block; width: 120px; height: 150px; border-radius: var(--r-wash); overflow: hidden; background: var(--bone); border: 1px solid var(--hairline); }
.proof-thumb img { width: 100%; height: 100%; object-fit: cover; }
.proof-file { display: grid; place-content: center; font-size: var(--t-small); color: var(--ash); }
.proof-row .input[type='date'] { max-width: 220px; }
@media (max-width: 719px) { .proof-row { grid-template-columns: 88px minmax(0, 1fr); gap: 14px; } .proof-thumb { width: 88px; height: 110px; } }

/* Dati affiancati: una linea sottile al posto del puntino */
.meta { display: inline-flex; flex-wrap: wrap; align-items: baseline; row-gap: 2px; overflow: hidden; margin-left: -10px; }
/* La linea sta a sinistra di ogni voce: quella a inizio riga resta fuori dal riquadro e non si vede, anche quando le voci vanno a capo. */
.meta > span { margin-left: -1px; padding-left: 10px; margin-right: 10px; border-left: 1px solid var(--smoke); }
.inverse .meta > span { border-left-color: var(--on-dark-line); }
.list-meta.meta { display: flex; }

@media (max-width: 719px) { .prose-head { padding: 32px 0 20px; } }

/* Caselle una sotto l'altra con aria tra le righe */
.checks { display: flex; flex-direction: column; gap: 18px; padding-top: 4px; }

/* Campanella degli avvisi: un pallino giallo, niente numeri urlati */
.bell-wrap { position: relative; }
/* Foto del profilo (o iniziale) che apre il menu, con il pallino degli avvisi. */
.me-btn { position: relative; width: 44px; padding: 0; }
.me-btn[aria-expanded='true'] { background: rgba(12, 10, 8, 0.06); }
.avatar { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; overflow: hidden; background: var(--paper); border: 1px solid var(--line); font-size: var(--t-small); font-weight: 500; line-height: 1; color: var(--ink); }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.me-btn .bell-dot { top: 5px; right: 3px; }
.bell-panel.menu-panel { width: 248px; }
@media (max-width: 719px) { .bell-panel.menu-panel { left: auto; right: 12px; width: min(248px, calc(100vw - 24px)); } }
.menu-who { padding: 8px 12px 10px; font-size: 13px; color: var(--ash); }
.menu-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 10px 12px; border-radius: var(--r-wash); font-size: var(--t-body); text-align: left; transition: background-color 0.2s; }
.menu-item:hover, .menu-item:focus-visible { background: var(--bone); }
.menu-count { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--yellow); border: 1px solid var(--ink); font-size: 12px; line-height: 20px; text-align: center; font-variant-numeric: tabular-nums; }
.menu-sep { border: 0; border-top: 1px solid var(--hairline); margin: 6px 4px; }
/* Pannello: il footer resta in fondo anche nelle pagine corte. */
#app { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
#app > main { flex: 1 0 auto; }
.bell { position: relative; width: 44px; padding: 0; }
.bell svg { width: 20px; height: 20px; }
.bell-dot { position: absolute; top: 9px; right: 10px; width: 9px; height: 9px; border-radius: 50%; background: var(--yellow); border: 1.5px solid var(--ink); }
.bell-panel { position: absolute; top: calc(100% + 8px); right: -8px; z-index: 40; width: 360px; max-height: min(70vh, 520px); overflow-y: auto; padding: 8px; border-color: var(--line); }
@media (max-width: 719px) { .bell-panel { position: fixed; top: calc(var(--nav-h) + 8px); left: 12px; right: 12px; width: auto; } }
.bell-head { padding: 6px 4px 6px 12px; }
.bell-item { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 12px; border-radius: var(--r-wash); transition: background-color 0.2s; }
.bell-item:hover { background: var(--bone); }
.bell-item.is-unread { padding-left: 30px; }
.bell-item.is-unread::before { content: ''; position: absolute; left: 12px; top: 18px; width: 8px; height: 8px; border-radius: 50%; background: var(--yellow); border: 1px solid var(--ink); }
.bell-text { font-size: var(--t-small); line-height: 1.4; }
.bell-quote { font-size: 13px; color: var(--ash); }
.bell-meta { font-size: 12px; color: var(--ash); }
.bell-empty { padding: 12px; }

/* Ascolti: numeri, tracce, giorni */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.stat { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 14px 16px; background: var(--bone); border-radius: var(--r-wash); }
.stat-value { font-size: var(--t-h3); line-height: 1.1; letter-spacing: -0.02em; white-space: nowrap; }
.stat-label { font-size: 13px; color: var(--ash); }
@media (max-width: 719px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .stat-value { font-size: var(--t-sub); } }
.usage { margin-top: 20px; }
.usage-row { display: grid; grid-template-columns: minmax(0, 1fr) auto 7.5rem; gap: 4px 16px; align-items: center; padding: 10px 0; border-top: 1px solid var(--hairline); }
.usage-row:first-child { border-top: 0; }
.usage-title { font-size: var(--t-small); }
.usage-count { font-size: 13px; color: var(--ash); text-align: right; }
.usage-count.is-done { color: var(--ink); }
.pips { display: inline-flex; gap: 3px; }
.pips i { width: 14px; height: 8px; border-radius: 2px; background: var(--hairline); }
.pips i.on { background: var(--ink); }
.usage-meter { width: 120px; height: 8px; border-radius: 2px; overflow: hidden; }
.funnel .usage-row { grid-template-columns: minmax(0, 1fr) 5.5rem; }
.funnel .usage-title { grid-column: 1 / -1; }
.funnel .usage-plain .usage-title { grid-column: auto; }
.funnel .usage-meter { width: 100%; }
@media (max-width: 719px) {
  .usage-row { grid-template-columns: minmax(0, 1fr) auto; }
  .usage-title { grid-column: 1 / -1; }
}
.chart { margin-top: 24px; }
.chart-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.chart-bars { position: relative; display: flex; align-items: flex-end; gap: 2px; height: 72px; border-bottom: 1px solid var(--line); }
.chart-col { flex: 1 1 0; height: 100%; display: flex; align-items: flex-end; justify-content: center; outline-offset: -2px; border-radius: 4px; }
.chart-col i { display: block; width: min(100%, 10px); background: var(--ink); border-radius: 4px 4px 0 0; transition: background-color 0.2s; }
.chart-col.is-zero i { height: 2px; background: var(--smoke); border-radius: 1px; }
.chart-col:hover i, .chart-col:focus-visible i { background: var(--yellow); }
.chart-col.is-zero:hover i, .chart-col.is-zero:focus-visible i { background: var(--ash); }
.chart-tip { position: absolute; bottom: calc(100% + 6px); transform: translateX(-50%); padding: 6px 10px; border-radius: var(--r-btn); background: var(--obsidian); color: var(--paper); font-size: 12px; line-height: 1.3; white-space: nowrap; pointer-events: none; }
.chart-axis { display: flex; justify-content: space-between; margin-top: 6px; font-size: 12px; color: var(--ash); }

/* Commento nuovo: un pallino accanto al minuto */
.comments .at { position: relative; }
.new-dot { position: absolute; left: -14px; top: 0.45em; width: 8px; height: 8px; border-radius: 50%; background: var(--yellow); border: 1px solid var(--ink); }

/* Pagina progetto: la traccia nel player si sceglie dall'elenco, i commenti la fanno partire */
.trow-pick { grid-template-columns: auto minmax(0, 1fr) auto; }
.trow-play { width: 36px; height: 36px; padding: 0; border-radius: 50%; display: grid; place-content: center; }
.trow-play svg { width: 14px; height: 14px; }
.trow-play:disabled { visibility: hidden; }
.trow.is-current .trow-play { background: var(--yellow); color: var(--ink); }
.comments .comment-text { cursor: pointer; }
.comments li.is-focus { margin: 0 -12px; padding-left: 12px; padding-right: 12px; border-radius: var(--r-btn); background: rgba(228, 242, 34, 0.1); }
.player-comments .comment-actions .link { color: var(--on-dark-soft); }
