/* younifeed v2 — store manager a voce. Estende il sistema "bancone" di styles.css:
   stessi token, nuove sezioni. Niente colori o font fuori dai token. */

:root {
  --night: #4a1951;
  --night-soft: #5a2462;
  --tag-night: #f2c6ee;
  --on-night: #efe8db;
  --on-night-soft: rgba(239, 232, 219, 0.72);
  --scrim: linear-gradient(90deg, rgba(46, 12, 52, 0.86) 0%, rgba(46, 12, 52, 0.55) 46%, rgba(46, 12, 52, 0) 78%);
  --scrim-mobile: linear-gradient(0deg, rgba(46, 12, 52, 0.92) 0%, rgba(46, 12, 52, 0.6) 55%, rgba(46, 12, 52, 0.15) 100%);
  --dur-in: 700ms;
}

/* ---------- testata sopra il video ---------- */
.masthead.v2 { position: absolute; inset: 0 0 auto 0; z-index: 5; border-bottom: 1px solid var(--line-on-ink); color: var(--on-night); }
.masthead.v2 .masthead-meta .mono { color: var(--on-night-soft); }
.masthead.v2 .masthead-cta { color: var(--on-night); }

/* ---------- apertura: video a tutta pagina, testo a sinistra ---------- */
.stage { position: relative; min-height: min(100svh, 56rem); display: grid; align-items: end; background: var(--night); color: var(--on-night); overflow: hidden; isolation: isolate; }
.stage-media { position: absolute; inset: 0; z-index: -2; }
.stage-media video, .stage-media img { width: 100%; height: 100%; object-fit: cover; object-position: 70% 40%; }
.stage::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--scrim); }
.stage > .wrap { padding-block: calc(4rem + var(--s-8)) var(--s-8); display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: var(--s-7); align-items: end; }
.stage .eyebrow { color: var(--on-night); display: inline-flex; align-items: center; gap: var(--s-3); }
.stage .eyebrow::before { content: ""; width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--tag-night); box-shadow: 0 0 0 0 var(--tag-night); animation: rec 1.8s var(--ease) infinite; }
.stage h1 { font-size: var(--fs-mega); text-transform: uppercase; margin-bottom: var(--s-6); max-width: 13ch; }
.stage h1 .line { display: block; }
.stage h1 .hl { color: var(--night); -webkit-text-stroke: 0; background: var(--tag-night); padding: 0 0.12em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.stage .lead { font-size: var(--fs-lead); max-width: 34rem; color: var(--on-night); }
.stage .opening-actions { margin-top: var(--s-6); }
.stage .btn { background: var(--tag-night); border-color: var(--tag-night); color: var(--night); }
.stage .btn:hover { background: var(--receipt); border-color: var(--receipt); color: var(--ink); }
.link-quiet { font-family: var(--font-mono); font-size: var(--fs-mono); text-transform: uppercase; letter-spacing: 0.04em; color: var(--on-night); text-decoration: underline; }

@keyframes rec {
  0% { box-shadow: 0 0 0 0 rgba(242, 198, 238, 0.7); }
  70% { box-shadow: 0 0 0 0.7rem rgba(242, 198, 238, 0); }
  100% { box-shadow: 0 0 0 0 rgba(242, 198, 238, 0); }
}

/* il vocale: cartellino con onda e trascrizione */
.voice-card { justify-self: end; width: min(100%, 25rem); background: var(--receipt); color: var(--ink); border-radius: var(--r-tag); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.7); padding: var(--s-5); font-family: var(--font-mono); font-size: 0.875rem; position: relative; margin: 0; }
.voice-card::before { content: ""; position: absolute; top: var(--s-4); right: var(--s-4); width: 0.7rem; height: 0.7rem; border-radius: 50%; border: 2px solid var(--ink); background: var(--paper); }
.voice-card .vc-head { font-size: 0.6875rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: var(--s-3); }
.wave { display: flex; align-items: center; gap: 3px; height: 2.4rem; margin-bottom: var(--s-3); }
.wave i { display: block; width: 4px; border-radius: 2px; background: var(--tag); height: 30%; transform-origin: center; animation: bar 1.1s var(--ease) infinite alternate; }
.wave i:nth-child(3n) { animation-delay: -0.3s; }
.wave i:nth-child(3n+1) { animation-delay: -0.6s; }
.wave i:nth-child(4n) { animation-duration: 0.8s; }
.wave i:nth-child(5n) { animation-duration: 1.4s; }
.wave .dur { margin-left: var(--s-3); color: var(--ink-faint); font-size: var(--fs-mono); }
@keyframes bar { from { height: 18%; } to { height: 100%; } }
.vc-said { font-weight: 500; min-height: 3em; margin: 0 0 var(--s-4); }
.vc-said .caret { display: inline-block; width: 0.55em; height: 1em; background: var(--ink); vertical-align: -0.15em; margin-left: 2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.vc-done { list-style: none; margin: 0; padding: var(--s-3) 0 0; border-top: 1px dashed var(--ink-faint); color: var(--thread); }
.vc-done li { display: flex; gap: var(--s-2); padding: 0.15rem 0; opacity: 0; transform: translateY(4px); transition: opacity 300ms var(--ease), transform 300ms var(--ease); }
.vc-done li::before { content: "✓"; font-weight: 500; }
.vc-done li.on { opacity: 1; transform: none; }

/* ---------- striscia canali (marquee) ---------- */
.rail { border-block: 1px solid var(--rule-strong); background: var(--paper); overflow: hidden; }
.rail-track { display: flex; width: max-content; gap: var(--s-7); padding-block: var(--s-4); animation: rail 42s linear infinite; }
.rail-track span { font-family: var(--font-display); font-stretch: 72%; font-weight: 800; font-size: clamp(1.4rem, 1.1rem + 1.2vw, 2.2rem); text-transform: uppercase; white-space: nowrap; display: inline-flex; align-items: center; gap: var(--s-7); }
.rail-track span::after { content: ""; width: 0.55rem; height: 0.55rem; background: var(--tag); border-radius: 50%; }
@keyframes rail { to { transform: translateX(-50%); } }

/* ---------- una giornata: foto fissa a sinistra, ore che scorrono ---------- */
.day { padding-block: var(--s-9); }
.day-head { max-width: 44rem; margin-bottom: var(--s-8); }
.day-head h2, .sync h2, .space h2, .tills2 h2, .apply h2 { font-size: var(--fs-h2); text-transform: uppercase; }
.day-head p { font-size: var(--fs-lead); color: var(--ink-soft); margin-top: var(--s-5); }
.day-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-8); align-items: start; }
.day-photos { position: sticky; top: var(--s-6); aspect-ratio: 4 / 5; border-radius: var(--r-tag); overflow: hidden; background: var(--paper-deep); box-shadow: var(--shadow-tag); }
.day-photos > * { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.04); transition: opacity 600ms var(--ease), transform 1200ms var(--ease); }
.day-photos > .on { opacity: 1; transform: none; }
.day-clock { position: absolute; left: var(--s-4); bottom: var(--s-4); z-index: 2; background: var(--receipt); color: var(--ink); font-family: var(--font-mono); font-weight: 500; font-size: 1rem; padding: var(--s-1) var(--s-3); border-radius: var(--r-ctrl); opacity: 1 !important; transform: none !important; width: auto; height: auto; inset: auto var(--s-4) var(--s-4) auto; }
.hours { list-style: none; margin: 0; padding: 0; }
.hour { min-height: 70vh; display: flex; flex-direction: column; justify-content: center; padding-block: var(--s-6); border-top: 1px solid var(--rule); }
.hour:first-child { border-top: 0; min-height: 52vh; justify-content: flex-start; }
.hour time { font-family: var(--font-mono); font-size: var(--fs-mono); color: var(--tag); letter-spacing: 0.06em; font-weight: 500; }
.hour h3 { font-size: var(--fs-h3); text-transform: uppercase; margin: var(--s-2) 0 var(--s-4); line-height: 1.05; }
.hour .said { font-family: var(--font-mono); font-size: 0.9375rem; font-weight: 500; margin-bottom: var(--s-3); display: flex; gap: var(--s-3); align-items: baseline; }
.hour .said .chan { flex: none; font-size: 0.6875rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-faint); border: 1px solid var(--rule); border-radius: var(--r-ctrl); padding: 0 var(--s-2); }
.hour .reply { background: var(--receipt); border-left: 3px solid var(--thread); padding: var(--s-4) var(--s-5); font-family: var(--font-mono); font-size: 0.875rem; color: var(--thread); box-shadow: var(--shadow-receipt); max-width: 32rem; }
.hour .reply p { margin: 0; }
.hour .reply p + p { margin-top: var(--s-2); }
.hour-photo { display: none; }

/* ---------- sincronizzazione canali ---------- */
.sync { background: var(--night); color: var(--on-night); padding-block: var(--s-9); overflow: hidden; }
.sync-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: var(--s-8); align-items: center; }
.sync .eyebrow { color: var(--paper-deep); }
.sync p.lead { color: var(--on-night-soft); font-size: var(--fs-lead); margin-top: var(--s-5); max-width: 32rem; }
.board { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-3); }
.board .core { grid-column: 1 / -1; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--s-4); align-items: center; background: var(--receipt); color: var(--ink); border-radius: var(--r-tag); padding: var(--s-4) var(--s-5); margin-bottom: var(--s-3); }
.core .ph { width: 3.5rem; height: 3.5rem; border-radius: var(--r-ctrl); overflow: hidden; background: var(--paper-deep); }
.core .ph img { width: 100%; height: 100%; object-fit: cover; }
.core .nm { font-family: var(--font-display); font-stretch: 90%; font-weight: 800; font-size: 1.15rem; text-transform: uppercase; line-height: 1.05; }
.core .nm small { display: block; font-family: var(--font-mono); font-stretch: normal; font-weight: 400; font-size: var(--fs-mono); letter-spacing: 0.04em; color: var(--ink-faint); margin-top: 0.2rem; }
.core .qty { font-family: var(--font-display); font-stretch: 68%; font-weight: 800; font-size: 2.8rem; line-height: 1; color: var(--tag); text-align: right; min-width: 2ch; transition: transform 300ms var(--ease); }
.core .qty.tick { transform: scale(1.25); }
.core .qty small { display: block; font-family: var(--font-mono); font-stretch: normal; font-size: 0.625rem; font-weight: 500; letter-spacing: 0.08em; color: var(--ink-faint); text-transform: uppercase; }
.chan-cell { border: 1px solid var(--line-on-ink); border-radius: var(--r-ctrl); padding: var(--s-3); font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.04em; text-transform: uppercase; display: flex; justify-content: space-between; gap: var(--s-2); align-items: center; transition: background-color 250ms var(--ease), color 250ms var(--ease), border-color 250ms var(--ease); min-width: 0; }
.chan-cell b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chan-cell span { color: var(--on-night-soft); flex: none; }
.chan-cell.sold { background: var(--tag-night); border-color: var(--tag-night); color: var(--night); }
.chan-cell.sold span { color: var(--night); }
.chan-cell.synced { border-color: var(--paper-deep); }
.chan-cell.synced span { color: var(--on-night); }
.sync-log { grid-column: 1 / -1; margin-top: var(--s-4); font-family: var(--font-mono); font-size: 0.8125rem; color: var(--on-night-soft); min-height: 1.6em; }
.sync-log b { color: var(--on-night); font-weight: 500; }

/* ---------- casse ---------- */
.tills2 { padding-block: var(--s-9); border-bottom: 1px solid var(--rule-strong); }
.tills2-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-8); align-items: center; }
.tills2 figure { margin: 0; position: relative; }
.tills2 figure video, .tills2 figure img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--r-tag); box-shadow: var(--shadow-tag); }
.tills2 p.lead { font-size: var(--fs-lead); color: var(--ink-soft); margin-top: var(--s-5); }
.no-list { list-style: none; padding: 0; margin: var(--s-6) 0; display: grid; gap: var(--s-2); }
.no-list li { font-family: var(--font-mono); font-size: 0.9375rem; display: flex; gap: var(--s-3); align-items: baseline; }
.no-list li s { color: var(--ink-faint); text-decoration-color: var(--tag); text-decoration-thickness: 2px; }
.no-list li.yes { font-weight: 500; color: var(--thread); }
.till-chips { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.till-chips li { list-style: none; font-family: var(--font-mono); font-size: var(--fs-mono); letter-spacing: 0.04em; text-transform: uppercase; border: 1px solid var(--ink); border-radius: var(--r-ctrl); padding: var(--s-1) var(--s-3); }
.till-chips { padding: 0; margin: 0; }

/* ---------- spazio separato ---------- */
.space { padding-block: var(--s-9); }
.space-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: var(--s-8); align-items: center; }
.space img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--r-tag); box-shadow: var(--shadow-tag); }
.vow { list-style: none; margin: var(--s-6) 0 0; padding: 0; counter-reset: vow; }
.vow li { counter-increment: vow; display: grid; grid-template-columns: 3rem minmax(0, 1fr); gap: var(--s-4); padding: var(--s-5) 0; border-top: 2px solid var(--ink); }
.vow li::before { content: counter(vow, decimal-leading-zero); font-family: var(--font-mono); font-weight: 500; color: var(--tag); }
.vow h3 { font-size: var(--fs-h3); text-transform: uppercase; line-height: 1.05; margin-bottom: var(--s-2); }
.vow p { color: var(--ink-soft); margin: 0; }

/* ---------- origine sopra il video della sera ---------- */
.dusk { position: relative; color: var(--on-night); display: grid; align-items: end; overflow: hidden; isolation: isolate; background: var(--night); }
.dusk video, .dusk > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.dusk::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--scrim-mobile); }
.dusk .wrap { padding-block: var(--s-8); }
.dusk .year { font-family: var(--font-display); font-stretch: 68%; font-weight: 800; font-size: clamp(4rem, 3rem + 6vw, 9rem); line-height: 0.85; color: var(--tag-night); display: block; }
.dusk p { max-width: 40rem; font-size: var(--fs-lead); }
.dusk .sign { font-family: var(--font-mono); font-size: var(--fs-mono); text-transform: uppercase; letter-spacing: 0.04em; color: var(--on-night-soft); }

/* ---------- comparsa allo scroll ---------- */
.js .rv { opacity: 0; transform: translateY(24px); transition: opacity var(--dur-in) var(--ease), transform var(--dur-in) var(--ease); }
.js .rv.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .stage { min-height: auto; }
  .stage::before { background: var(--scrim-mobile); }
  .stage > .wrap { grid-template-columns: minmax(0, 1fr); padding-block: calc(4rem + 34vh) var(--s-7); gap: var(--s-6); }
  .voice-card { justify-self: stretch; width: 100%; }
  .day-grid, .sync-grid, .tills2-grid, .space-grid { grid-template-columns: minmax(0, 1fr); gap: var(--s-6); }
  .day-photos { display: none; }
  .hour, .hour:first-child { min-height: 0; padding-block: var(--s-6); }
  .hour-photo { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r-tag); margin-bottom: var(--s-4); }
  .board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .space-grid img { order: -1; aspect-ratio: 4 / 3; }
  .tills2 figure video, .tills2 figure img { aspect-ratio: 4 / 3; }
  .day, .sync, .tills2, .space { padding-block: var(--s-8); }
}
@media (max-width: 420px) {
  .masthead.v2 .masthead-meta .mono { display: none; }
  .stage .opening-actions { flex-direction: column; align-items: stretch; }
  .stage .opening-actions .btn { white-space: normal; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  .wave i, .stage .eyebrow::before, .rail-track, .vc-said .caret { animation: none; }
  .js .rv { opacity: 1; transform: none; transition: none; }
  .day-photos > * { transition: none; }
}
@media (max-width: 360px) {
  .masthead.v2 .cta-long { display: none; }
}
