/**
 * T1 Flash â Coach satellite (T1-FLASH)
 * Token Flash â grammar theme_globals (affinitÃ  Studio). Non A/B/C Palco.
 * Breakpoint: L / H / pointer â mai modello device.
 */

:root {
  /* FS7b â atmosfera Studio: deep black + sala + glass frost (theme_globals) */
  --flash-bg: var(--t1-deep-black, #030305);
  --flash-bg-elevated: var(--t1-vault-glass-bg-elevated, rgba(8, 12, 22, 0.72));
  --flash-surface: var(--gw-glass-surface-bg, rgba(10, 15, 24, 0.65));
  --flash-border: var(--gw-glass-border, color-mix(in srgb, var(--t1-cyan-gateway, #00f2ff) 12%, rgba(255, 255, 255, 0.07)));
  --flash-text: color-mix(in srgb, var(--t1-pearl, #d6dff1) 94%, #fff);
  --flash-text-muted: color-mix(
    in srgb,
    var(--gw-text-hint-cold, #8a95a8) 86%,
    var(--t1-pearl, #d6dff1) 14%
  );
  --flash-accent: var(--t1-cyan-gateway, #00f2ff);
  /* SK5 â tipografia sala Studio (stesso stack token; densitÃ  Flash) */
  --flash-text-title: color-mix(in srgb, var(--t1-pearl, #d6dff1) 90%, var(--flash-accent) 10%);
  --flash-type-brand-size: clamp(0.98rem, 2.6vw, 1.1rem);
  --flash-type-title-size: clamp(1rem, 2.4vw, 1.12rem);
  --flash-type-title-weight: 600;
  --flash-type-title-track: 0.02em;
  --flash-type-eyebrow-size: 0.72rem;
  --flash-type-eyebrow-weight: 600;
  --flash-type-eyebrow-track: 0.07em;
  --flash-type-body: 0.95rem;
  --flash-type-muted-size: 0.82rem;
  --flash-type-cta-size: 0.95rem;
  --flash-type-cta-weight: 600;
  --flash-type-cta-track: 0.025em;
  /* Tacche segno â champagne (â  ciano fill/play) Â· SK1 materia shard Studio */
  --flash-mark-tick: var(--t1-amber-ghost, #c89a48);
  --flash-mark-glow: var(--neon-glow-intensity, 1);
  /* SK2 â cornice + transport (densitÃ  Flash ~0.55; rif. player-wrapper / cockpit-transport) */
  --flash-frame-edge-hi: color-mix(in srgb, var(--flash-accent) 30%, transparent);
  --flash-frame-edge-soft: color-mix(in srgb, white 7%, transparent);
  --flash-transport-blur: blur(16px) saturate(1.12);
  /* SK3 â icone bar â rail Studio (stroke ~1.9, gem inset) */
  --flash-icon-stroke: 1.9;
  --flash-btn-gem:
    inset 0 2px 4px rgba(0, 0, 0, 0.48),
    inset 1px 1px 0 color-mix(in srgb, var(--flash-accent) 14%, transparent),
    0 4px 12px rgba(0, 0, 0, 0.38);
  --flash-gap: clamp(0.75rem, 2.5vw, 1.25rem);
  --flash-pad: clamp(0.85rem, 3vw, 1.35rem);
  --flash-topbar-h: clamp(2.75rem, 8vw, 3.25rem);
  --flash-radius: 10px;
  --flash-font: var(--t1-font-ui, system-ui, sans-serif);
  --flash-font-mono: var(--t1-font-mono, ui-monospace, monospace);
  --flash-glass-blur: var(--gw-glass-surface-blur, blur(12px) saturate(1.12));
  --flash-inset-hi: inset 0 1px 0 var(--gw-glass-border-top, rgba(255, 255, 255, 0.11));
  --flash-panel-shadow:
    0 4px 28px rgba(0, 0, 0, 0.45),
    0 0 22px var(--t1-cyan-glow-faint, rgba(0, 229, 255, 0.07));
  /* SK4 â vetro a strati (densitÃ  Flash ~0.55; Material Â§4.1) */
  --flash-glass-blur-deep: blur(16px) saturate(1.14);
  --flash-sheet-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 0 0 1px color-mix(in srgb, white 5%, transparent),
    0 12px 48px rgba(0, 0, 0, 0.55),
    0 0 28px color-mix(in srgb, var(--flash-accent) 7%, transparent);
  --flash-panel-glass-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.11),
    0 4px 28px rgba(0, 0, 0, 0.42),
    0 0 20px color-mix(in srgb, var(--flash-accent) 6%, transparent);
  --flash-tile-bg: linear-gradient(
    165deg,
    color-mix(in srgb, white 5.5%, transparent) 0%,
    color-mix(in srgb, var(--flash-surface) 82%, transparent) 46%,
    color-mix(in srgb, var(--flash-bg-elevated) 90%, transparent) 100%
  );
  --flash-tile-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.09),
    0 4px 18px rgba(0, 0, 0, 0.38),
    0 0 14px color-mix(in srgb, var(--flash-accent) 4%, transparent);
  /* FP-ATM â bordo soft (Material Â§4.1); phone MQ alza radius + trasparenza */
  --flash-edge-soft: color-mix(in srgb, white 7%, transparent);
  --flash-sala: var(
    --t1-sala-tunnel,
    radial-gradient(
      ellipse 85% 72% at 50% 42%,
      color-mix(in srgb, var(--t1-cyan-gateway, #00f2ff) 4%, #12141a) 0%,
      var(--t1-sala-base, #0a0b0d) 68%
    )
  );
}

html.flash-html,
html.flash-html body.flash-app {
  margin: 0;
  min-height: 100%;
  background-color: var(--flash-bg);
  background-image: var(--flash-sala);
  color: var(--flash-text);
  font-family: var(--flash-font);
  font-size: var(--flash-type-body);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.flash-app {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

.flash-topbar {
  /* Mai fixed/sticky: su phone/touch il brand deve uscire dallo schermo con lo scroll pagina. */
  position: relative;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--flash-gap);
  min-height: var(--flash-topbar-h);
  padding: 0 var(--flash-pad);
  border-bottom: 1px solid var(--flash-border);
  background: color-mix(in srgb, var(--flash-bg-elevated) 88%, transparent);
  backdrop-filter: var(--flash-glass-blur);
  -webkit-backdrop-filter: var(--flash-glass-blur);
  box-shadow: var(--flash-inset-hi);
}

/* SK5 â brand Torri + surface (parity Studio rail) Â· CTA Studio a fianco */
.flash-topbar__start {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  flex: 1 1 auto;
}

.flash-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
  min-width: 0;
}

.flash-brand__mark {
  display: block;
  width: 26px;
  height: auto;
  flex-shrink: 0;
  overflow: visible;
  filter: drop-shadow(0 0 4px color-mix(in srgb, var(--flash-accent) 14%, transparent));
}

.flash-brand__label {
  font-size: var(--flash-type-brand-size);
  font-weight: var(--flash-type-title-weight);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--flash-text-title);
  text-shadow: var(--gw-text-glow-primary, none);
  line-height: 1;
  white-space: nowrap;
}

.flash-topbar__end {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

/* Chrome topbar â stesso vetro Palco (Flash CTA / gear / FS) */
.flash-studio-cta,
.flash-settings-btn,
.flash-fs-browser {
  box-sizing: border-box;
  margin: 0;
  border-radius: 10px;
  cursor: pointer;
  opacity: 0.48;
  color: rgba(248, 252, 255, 0.65);
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.07) 0%, rgba(10, 12, 18, 0.88) 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom-color: rgba(0, 0, 0, 0.48);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(14px) saturate(1.05);
  -webkit-backdrop-filter: blur(14px) saturate(1.05);
  transition:
    opacity 0.18s ease,
    color 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease;
}

.flash-studio-cta:hover,
.flash-studio-cta:focus-visible,
.flash-settings-btn:hover,
.flash-settings-btn:focus-visible,
.flash-fs-browser:hover,
.flash-fs-browser:focus-visible {
  opacity: 0.92;
  color: var(--flash-accent, #00e5ff);
  border-color: color-mix(in srgb, var(--flash-accent, #00e5ff) 42%, rgba(255, 255, 255, 0.14));
  outline: none;
  box-shadow:
    0 0 20px color-mix(in srgb, var(--flash-accent, #00e5ff) 18%, transparent),
    0 8px 24px rgba(0, 0, 0, 0.48);
}

.flash-fs-browser.is-active {
  opacity: 0.92;
  color: var(--flash-accent, #00e5ff);
  border-color: color-mix(in srgb, var(--flash-accent, #00e5ff) 48%, rgba(255, 255, 255, 0.12));
  box-shadow:
    0 0 22px color-mix(in srgb, var(--flash-accent, #00e5ff) 22%, transparent),
    0 8px 24px rgba(0, 0, 0, 0.48);
}

.flash-topbar__nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* T1 Studio â riquadro + label (gemello .gateway-palco-flash-cta) */
.flash-studio-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 34px;
  padding: 0 9px;
  text-decoration: none;
  font-family: inherit;
  font-size: 11px;
  font-weight: 500;
  line-height: 1;
}

.flash-studio-cta svg {
  display: block;
  flex-shrink: 0;
}

.flash-settings-btn,
.flash-fs-browser {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
}

.flash-settings-btn svg,
.flash-fs-browser svg {
  display: block;
  flex-shrink: 0;
}

.flash-settings-btn[hidden] {
  display: none !important;
}

/* Phone: niente FS browser (solo desktop/tablet â¥768) */
@media (max-width: 767px) {
  .flash-fs-browser {
    display: none !important;
  }
}

.flash-main {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: var(--flash-gap);
  padding: var(--flash-pad);
}

.flash-status {
  margin: 0;
  font-size: var(--flash-type-muted-size);
  line-height: 1.4;
  letter-spacing: 0.01em;
  color: var(--flash-text-muted);
}

.flash-status[hidden] {
  display: none;
}

.flash-status.is-error {
  color: color-mix(in srgb, var(--t1-red, #ef4444) 85%, white);
}

/*
 * F5-flicker soft â guardia sincrona (aggiunta da JS prima del primo paint).
 * !important necessario: .flash-panels { display:flex } (author CSS, spec 0-1-0)
 * batte [hidden] { display:none } (UA stylesheet, stessa spec ma autore > UA).
 * flash-deep-link viene rimossa dopo il restore â zero residui.
 */
html.flash-deep-link #flash-panels {
  display: none !important;
  visibility: hidden !important;
}

/* Backup body-class (applicata un attimo dopo il sincrono). */
body.flash-url-restoring #flash-panels {
  display: none !important;
  visibility: hidden !important;
}

.flash-panels {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: var(--flash-gap);
}

/* SK4 â pannello vetro a strati (Clienti / stage / rail) */
.flash-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border: 1px solid var(--flash-edge-soft);
  border-top-color: color-mix(in srgb, white 12%, transparent);
  border-radius: var(--flash-radius);
  background: var(--flash-tile-bg);
  overflow: hidden;
  backdrop-filter: var(--flash-glass-blur-deep);
  -webkit-backdrop-filter: var(--flash-glass-blur-deep);
  box-shadow: var(--flash-panel-glass-shadow);
}

.flash-panel__head {
  flex-shrink: 0;
  padding: 0.7rem var(--flash-pad);
  border-bottom: 1px solid color-mix(in srgb, var(--flash-edge-soft) 90%, transparent);
  background: color-mix(in srgb, var(--t1-glass-frost, rgba(255, 255, 255, 0.03)) 70%, transparent);
  box-shadow: var(--flash-inset-hi);
}

.flash-panel__title {
  margin: 0;
  font-size: var(--flash-type-eyebrow-size);
  font-weight: var(--flash-type-eyebrow-weight);
  letter-spacing: var(--flash-type-eyebrow-track);
  text-transform: none;
  color: color-mix(in srgb, var(--flash-text-muted) 70%, var(--flash-text-title) 30%);
}

.flash-panel__body {
  flex: 1 1 auto;
  min-height: 0;
  padding: var(--flash-pad);
}

.flash-placeholder {
  margin: 0;
  font-size: var(--flash-type-muted-size);
  line-height: 1.45;
  letter-spacing: 0.01em;
  color: var(--flash-text-muted);
}

.flash-send-off {
  margin: 0 0 0.85rem;
  font-size: var(--flash-type-muted-size);
  line-height: 1.4;
  letter-spacing: 0.01em;
  color: var(--flash-text-muted);
}

.flash-send-off[hidden] {
  display: none;
}

.flash-clients-search-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.flash-clients-search {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin: 0 0 0.85rem;
  border: 1px solid var(--flash-edge-soft);
  border-radius: calc(var(--flash-radius) - 2px);
  background: color-mix(in srgb, black 32%, var(--flash-bg-elevated));
  color: var(--flash-text);
  font: inherit;
  font-size: 1rem;
  padding: 0.65rem 0.75rem;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35), var(--flash-inset-hi);
}

.flash-clients-search::placeholder {
  color: var(--flash-text-muted);
}

.flash-clients-search:focus {
  outline: 2px solid color-mix(in srgb, var(--flash-accent) 55%, transparent);
  outline-offset: 1px;
}

.flash-new-client {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-bottom: 1rem;
}

.flash-new-client[hidden] {
  display: none;
}

.flash-new-client__label {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: none;
  color: var(--flash-text-muted);
}

.flash-new-client__row {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
}

.flash-new-client__input {
  flex: 1 1 auto;
  min-width: 0;
  border: 1px solid var(--flash-border);
  border-radius: calc(var(--flash-radius) - 2px);
  background: color-mix(in srgb, black 35%, var(--flash-bg-elevated));
  color: var(--flash-text);
  font: inherit;
  font-size: 1rem;
  padding: 0.65rem 0.75rem;
}

.flash-new-client__input::placeholder {
  color: var(--flash-text-muted);
}

.flash-new-client__input:focus {
  outline: 2px solid color-mix(in srgb, var(--flash-accent) 55%, transparent);
  outline-offset: 1px;
}

.flash-new-client__submit {
  flex: 0 0 auto;
  border: 1px solid color-mix(in srgb, var(--flash-accent) 40%, transparent);
  border-radius: calc(var(--flash-radius) - 2px);
  background: color-mix(in srgb, var(--flash-accent) 16%, transparent);
  color: var(--flash-accent);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.65rem 0.85rem;
  cursor: pointer;
  white-space: nowrap;
}

.flash-new-client__submit:disabled {
  opacity: 0.55;
  cursor: wait;
}

.flash-new-client__submit:hover:not(:disabled),
.flash-new-client__submit:focus-visible:not(:disabled) {
  background: color-mix(in srgb, var(--flash-accent) 26%, transparent);
  outline: none;
}

.flash-clients-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.flash-clients-list[hidden] {
  display: none;
}

.flash-clients-list__row {
  display: flex;
  gap: 0.35rem;
  align-items: stretch;
}

.flash-clients-list__btn {
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  text-align: left;
  border: 1px solid var(--flash-edge-soft);
  border-radius: calc(var(--flash-radius) - 2px);
  background: var(--flash-tile-bg);
  color: var(--flash-text);
  font: inherit;
  font-size: 0.98rem;
  font-weight: 400;
  padding: 0.75rem 0.85rem;
  cursor: pointer;
  box-shadow: var(--flash-tile-shadow);
}

.flash-clients-list__item.is-selected .flash-clients-list__btn,
.flash-clients-list__btn:hover,
.flash-clients-list__btn:focus-visible {
  border-color: color-mix(in srgb, var(--flash-accent) 28%, var(--flash-edge-soft));
  background: color-mix(in srgb, var(--flash-accent) 8%, var(--flash-surface));
  box-shadow:
    var(--flash-inset-hi),
    0 0 18px var(--t1-cyan-glow-faint, rgba(0, 229, 255, 0.07));
  outline: none;
}

.flash-clients {
  flex: 0 1 auto;
  min-height: 10rem;
}

.flash-rail[hidden] {
  display: none;
}

.flash-rail__body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 0;
}

.flash-stage {
  flex: 1 1 auto;
  min-height: 12rem;
}

.flash-stage__head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.flash-stage-back {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  margin: 0;
  padding: 0;
  border: 1px solid var(--flash-border);
  border-radius: calc(var(--flash-radius) - 2px);
  background: color-mix(in srgb, white 4%, transparent);
  color: var(--flash-text);
  cursor: pointer;
}

.flash-stage-back[hidden] {
  display: none;
}

.flash-stage-back:hover,
.flash-stage-back:focus-visible {
  border-color: color-mix(in srgb, var(--flash-accent) 45%, transparent);
  outline: none;
}

.flash-stage__title-wrap,
.flash-panel__title#flash-stage-title {
  flex: 1 1 auto;
  min-width: 0;
  /* Testo a sinistra subito dopo Indietro (come prima dello split nome). */
  text-align: left;
}

/* Nome cliente centrato nel riquadro stage (lista take). */
.flash-stage-client {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  max-width: min(42%, 16rem);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
  font: inherit;
  font-size: var(--flash-type-title-size);
  font-weight: var(--flash-type-title-weight);
  letter-spacing: var(--flash-type-title-track);
  color: var(--flash-text-title);
  pointer-events: none;
}

.flash-stage-client[hidden] {
  display: none;
}

/* Phone/tablet touch: nome nel titolo a sx, non absolute. */
@media (max-width: 767px), ((hover: none) and (pointer: coarse)) {
  .flash-stage-client {
    display: none !important;
  }
}

.flash-stage-hint {
  margin-top: 0.35rem;
  font-size: var(--flash-type-muted-size);
  letter-spacing: 0.01em;
  color: var(--flash-text-muted);
}

.flash-stage__actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.4rem;
}

.flash-open-clients,
.flash-stage-send {
  flex: 0 0 auto;
  border: 1px solid color-mix(in srgb, var(--flash-accent) 40%, transparent);
  border-radius: calc(var(--flash-radius) - 2px);
  background: color-mix(in srgb, var(--flash-accent) 14%, transparent);
  color: var(--flash-accent);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.4rem 0.65rem;
  cursor: pointer;
  box-shadow: 0 0 14px var(--t1-cyan-glow-faint, rgba(0, 229, 255, 0.07));
}

.flash-stage-rename {
  flex: 0 0 auto;
  border: 1px solid var(--flash-border);
  border-radius: calc(var(--flash-radius) - 2px);
  background: color-mix(in srgb, white 4%, transparent);
  color: var(--flash-text-muted, var(--flash-text));
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.4rem 0.65rem;
  cursor: pointer;
}

.flash-open-clients[hidden],
.flash-stage-send[hidden],
.flash-stage-rename[hidden] {
  display: none;
}

.flash-open-clients:hover,
.flash-open-clients:focus-visible,
.flash-stage-send:hover,
.flash-stage-send:focus-visible {
  background: color-mix(in srgb, var(--flash-accent) 26%, transparent);
  border-color: var(--t1-edge-active, color-mix(in srgb, var(--flash-accent) 42%, rgba(255, 255, 255, 0.12)));
  box-shadow: 0 0 22px var(--t1-cyan-glow-faint, rgba(0, 229, 255, 0.07));
  outline: none;
}

.flash-stage-rename:hover,
.flash-stage-rename:focus-visible {
  border-color: color-mix(in srgb, var(--flash-accent) 35%, var(--flash-border));
  color: var(--flash-text);
  background: color-mix(in srgb, white 6%, transparent);
  outline: none;
}

.flash-stage-empty {
  margin: 0.5rem 0 0;
  color: var(--flash-text-muted);
  font-size: 0.95rem;
  line-height: 1.4;
}

.flash-stage-empty[hidden] {
  display: none;
}

.flash-home {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin: 0.35rem 0 0.5rem;
}

.flash-home[hidden] {
  display: none;
}

.flash-home-btn {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 0.95rem 1rem;
  border: 1px solid var(--flash-edge-soft);
  border-top-color: color-mix(in srgb, white 11%, transparent);
  border-radius: var(--flash-radius);
  background: var(--flash-tile-bg);
  color: var(--flash-text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  box-shadow: var(--flash-tile-shadow);
}

.flash-home-btn[hidden] {
  display: none;
}

.flash-home-btn:hover,
.flash-home-btn:focus-visible {
  border-color: color-mix(in srgb, var(--flash-accent) 32%, transparent);
  background: color-mix(in srgb, var(--flash-accent) 7%, var(--flash-bg-elevated));
  box-shadow:
    var(--flash-inset-hi),
    0 0 20px color-mix(in srgb, var(--flash-accent) 10%, transparent);
  outline: none;
}

.flash-home-btn__icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: calc(var(--flash-radius) - 2px);
  border: 1px solid color-mix(in srgb, var(--flash-accent) 28%, transparent);
  background: color-mix(in srgb, var(--flash-accent) 10%, transparent);
  color: var(--flash-accent);
}

.flash-home-btn__title {
  flex: 1 1 auto;
  min-width: 0;
  font-size: var(--flash-type-title-size);
  font-weight: var(--flash-type-title-weight);
  letter-spacing: var(--flash-type-title-track);
  color: var(--flash-text-title);
}

.flash-home-btn__icon--notify {
  position: relative;
}

.flash-home-notify-badge {
  position: absolute;
  top: -0.28rem;
  right: -0.28rem;
  min-width: 1.15rem;
  height: 1.15rem;
  padding: 0 0.28rem;
  border-radius: 999px;
  background: var(--flash-accent, #c9a227);
  color: var(--flash-bg, #0b0d10);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.15rem;
  text-align: center;
  letter-spacing: 0;
  box-shadow: 0 0 0 2px var(--flash-bg-elevated, #12151a);
}

.flash-home-notify-badge[hidden] {
  display: none !important;
}

.flash-notify-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  max-height: min(52dvh, 22rem);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.flash-notify-empty {
  margin: 0.35rem 0 0;
  padding: 0.15rem 0.1rem;
  color: color-mix(in srgb, var(--flash-text) 62%, transparent);
  font-size: 0.92rem;
  line-height: 1.4;
}

.flash-notify-empty[hidden] {
  display: none !important;
}

.flash-notify-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--flash-border);
  border-radius: var(--flash-radius);
  background: color-mix(in srgb, var(--flash-surface) 80%, transparent);
  color: var(--flash-text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.flash-notify-row:hover,
.flash-notify-row:focus-visible {
  border-color: color-mix(in srgb, var(--flash-accent) 42%, transparent);
  background: color-mix(in srgb, var(--flash-accent) 7%, var(--flash-bg-elevated));
  outline: none;
}

/* N3 — consegna Flash aperta (allinea tono Centro / verde prato Studio) */
.flash-notify-row--opened .flash-notify-row__meta {
  color: color-mix(in srgb, #4a8f5c 78%, var(--flash-text));
}

.flash-notify-row__name {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.flash-notify-row__meta {
  font-size: 0.82rem;
  color: color-mix(in srgb, var(--flash-text) 58%, transparent);
}

/* Desk rail sx â Centro notifiche + Nuovo (sempre sopra accordion) */
.flash-desk-notify-cta,
.flash-desk-new-cta {
  display: none;
  margin: 0 0 0.55rem;
}

.flash-desk-notify-cta[hidden],
.flash-desk-new-cta[hidden] {
  display: none !important;
}

.flash-clients-browse[hidden] {
  display: none !important;
}

.flash-clients-browse {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1 1 auto;
}

/* Accordion Â«I tuoi clientiÂ» â stessa colonna, chevron su/giÃ¹ (metriche = Nuovo) */
.flash-clients-acc {
  display: none;
  align-items: center;
  justify-content: flex-start;
  gap: 0.85rem;
  width: 100%;
  box-sizing: border-box;
  margin: 0 0 0.55rem;
  padding: 0.95rem 1rem;
  border: 1px solid var(--flash-edge-soft);
  border-top-color: color-mix(in srgb, white 11%, transparent);
  border-radius: var(--flash-radius);
  background: var(--flash-tile-bg);
  color: var(--flash-text-title);
  font: inherit;
  font-weight: var(--flash-type-title-weight);
  letter-spacing: var(--flash-type-title-track);
  cursor: pointer;
  box-shadow: var(--flash-tile-shadow);
  text-align: left;
}

.flash-clients-acc[hidden] {
  display: none !important;
}

.flash-clients-acc:hover,
.flash-clients-acc:focus-visible {
  border-color: color-mix(in srgb, var(--flash-accent) 32%, transparent);
  background: color-mix(in srgb, var(--flash-accent) 7%, var(--flash-bg-elevated));
  outline: none;
}

.flash-clients-acc__icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: calc(var(--flash-radius) - 2px);
  border: 1px solid color-mix(in srgb, var(--flash-accent) 28%, transparent);
  background: color-mix(in srgb, var(--flash-accent) 10%, transparent);
  color: var(--flash-accent);
}

.flash-clients-acc__label {
  flex: 1 1 auto;
  min-width: 0;
  font-size: var(--flash-type-title-size);
  font-weight: var(--flash-type-title-weight);
  letter-spacing: var(--flash-type-title-track);
  color: var(--flash-text-title);
}

.flash-clients-acc__chev {
  flex: 0 0 auto;
  color: var(--flash-text-muted);
  transition: transform 0.18s ease;
}

.flash-clients-acc.is-open .flash-clients-acc__chev {
  transform: rotate(180deg);
  color: var(--flash-accent);
}

/* Pill Nascondi / Mostra menu (play desk) */
.flash-menu-zen {
  display: none;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.25rem;
  padding: 0.35rem 0.75rem;
  border: 1px solid color-mix(in srgb, var(--flash-border) 90%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--flash-bg-elevated) 62%, transparent);
  color: var(--flash-text-muted);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  backdrop-filter: var(--flash-glass-blur);
  -webkit-backdrop-filter: var(--flash-glass-blur);
  box-shadow: var(--flash-inset-hi);
}

.flash-menu-zen[hidden] {
  display: none !important;
}

.flash-menu-zen:hover,
.flash-menu-zen:focus-visible {
  color: var(--flash-accent);
  border-color: color-mix(in srgb, var(--flash-accent) 40%, transparent);
  outline: none;
}

.flash-menu-zen.is-active {
  color: var(--flash-accent);
  border-color: color-mix(in srgb, var(--flash-accent) 42%, transparent);
  background: color-mix(in srgb, var(--flash-accent) 10%, transparent);
}

.flash-menu-zen__icon {
  flex: 0 0 auto;
  opacity: 0.9;
}

.flash-menu-zen__label {
  white-space: nowrap;
}

.flash-new-sheet__hint {
  margin: 0 0 1rem;
  color: var(--flash-text-muted);
  font-size: 0.92rem;
  line-height: 1.4;
}

.flash-voice-limit-hint {
  margin: 0;
  padding: 0.55rem var(--flash-pad) 0;
  color: var(--flash-text-muted);
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.35;
}

.flash-new-client__submit--icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.85rem;
  min-width: 2.85rem;
  padding: 0;
}

.flash-new-client__submit--icon[aria-busy='true'],
.flash-new-client__submit[aria-busy='true'] {
  opacity: 0.55;
  cursor: wait;
}

.flash-library[hidden],
.flash-player[hidden] {
  display: none;
}

.flash-library-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.flash-library-list__row {
  display: flex;
  gap: 0.35rem;
  align-items: stretch;
}

.flash-list-destroy {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.65rem;
  min-width: 2.65rem;
  padding: 0;
  border: 1px solid var(--flash-border);
  border-radius: calc(var(--flash-radius) - 2px);
  background: color-mix(in srgb, white 3%, transparent);
  color: color-mix(in srgb, var(--t1-red, #e85d5d) 62%, var(--flash-text));
  opacity: 0.78;
  cursor: pointer;
}

.flash-list-rename {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.65rem;
  min-width: 2.65rem;
  padding: 0;
  border: 1px solid var(--flash-border);
  border-radius: calc(var(--flash-radius) - 2px);
  background: color-mix(in srgb, white 3%, transparent);
  color: color-mix(in srgb, var(--flash-text) 82%, transparent);
  opacity: 0.78;
  cursor: pointer;
}

.flash-list-destroy:hover,
.flash-list-destroy:focus-visible {
  border-color: color-mix(in srgb, var(--t1-red, #e85d5d) 45%, var(--flash-border));
  background: color-mix(in srgb, var(--t1-red, #e85d5d) 12%, transparent);
  opacity: 1;
  outline: none;
}

.flash-list-rename:hover,
.flash-list-rename:focus-visible {
  border-color: color-mix(in srgb, var(--flash-accent) 42%, var(--flash-border));
  background: color-mix(in srgb, var(--flash-accent) 10%, transparent);
  color: var(--flash-text);
  opacity: 1;
  outline: none;
}

.flash-list-destroy:disabled,
.flash-list-rename:disabled {
  opacity: 0.45;
  cursor: wait;
}

/* FP-DESTROY / rename: niente azioni riga in play. */
.flash-panels--playing .flash-list-destroy,
.flash-panels--playing .flash-list-rename {
  display: none;
}

/* Desk mouse: matita solo via CTA stage (rail stretta). Phone/tablet: matita in riga. */
@media (min-width: 768px) and (hover: hover) and (pointer: fine) {
  .flash-list-rename {
    display: none;
  }
}

.flash-library-list__btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  text-align: left;
  border: 1px solid var(--flash-edge-soft);
  border-radius: calc(var(--flash-radius) - 2px);
  background: var(--flash-tile-bg);
  color: var(--flash-text);
  font-family: var(--flash-font-mono);
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 0.7rem 0.8rem;
  cursor: pointer;
  box-shadow: var(--flash-tile-shadow);
}

.flash-library-list__play {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: calc(var(--flash-radius) - 4px);
  border: 1px solid color-mix(in srgb, var(--flash-accent) 32%, transparent);
  background: color-mix(in srgb, var(--flash-accent) 12%, transparent);
  color: var(--flash-accent);
}

.flash-library-list__label {
  flex: 1 1 auto;
  min-width: 0;
}

.flash-library-list__meta {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 1.1rem;
  min-width: 0;
}

.flash-library-list__date {
  color: var(--flash-text-muted);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

/* FP-PDF â badge awareness in lista (cornice soft rossa) */
.flash-library-list__btn .t1-companion-doc-badge {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  padding: 0.12rem 0.4rem;
  border-radius: 999px;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid color-mix(in srgb, var(--t1-red, #ef4444) 34%, transparent);
  color: var(--flash-text-muted);
  background: color-mix(in srgb, var(--t1-red, #ef4444) 8%, rgba(0, 0, 0, 0.35));
  pointer-events: none;
  user-select: none;
}

/* Desktop chip â sheet PDF */
.flash-companion-chip {
  display: none;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  margin: 0.15rem 0 0;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--t1-red, #ef4444) 36%, transparent);
  background: color-mix(in srgb, var(--t1-red, #ef4444) 10%, rgba(0, 0, 0, 0.32));
  color: var(--flash-text);
  font-family: var(--flash-font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}

.flash-companion-chip[hidden] {
  display: none !important;
}

.flash-companion-chip:hover,
.flash-companion-chip:focus-visible {
  border-color: color-mix(in srgb, var(--t1-red, #ef4444) 55%, transparent);
  color: color-mix(in srgb, var(--t1-red, #ef4444) 70%, #fff);
  outline: none;
}

/* Chip PDF: solo desktop mouse â touch/Mini usano lâicona phone-bar */
@media (min-width: 768px) and (hover: hover) and (pointer: fine) {
  .flash-companion-chip:not([hidden]) {
    display: inline-flex;
  }
}

.flash-library-list__btn:hover,
.flash-library-list__btn:focus-visible {
  border-color: var(--t1-edge-active, color-mix(in srgb, var(--flash-accent) 42%, rgba(255, 255, 255, 0.12)));
  box-shadow: 0 0 16px var(--t1-cyan-glow-faint, rgba(0, 229, 255, 0.07));
  outline: none;
}

.flash-library__empty {
  margin: 0 0 0.75rem;
  color: var(--flash-text-muted);
  font-size: 0.92rem;
}

.flash-player {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.flash-player__back {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  border-radius: calc(var(--flash-radius) - 2px);
  background: transparent;
  color: var(--flash-text-muted);
  padding: 0;
  cursor: pointer;
}

/* Label leggibile solo desk mouse (sotto); phone = icona sola */
.flash-player__back-label {
  display: none;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.flash-player__back:hover,
.flash-player__back:focus-visible {
  color: var(--flash-accent);
  outline: none;
}

.flash-player__stage {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-width: 0;
  min-height: 0;
}

.flash-player__media {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
  min-height: 0;
  flex: 1 1 auto;
}

/* SK2 â cornice video: inset + bordo soft (peso Studio, densitÃ  Flash) */
.flash-player__frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: calc(var(--flash-radius) - 2px);
  overflow: hidden;
  background: #000;
  border-top: 1px solid var(--flash-frame-edge-hi);
  border-left: 1px solid color-mix(in srgb, var(--flash-accent) 20%, transparent);
  border-right: 1px solid var(--flash-frame-edge-soft);
  border-bottom: 1px solid color-mix(in srgb, black 40%, transparent);
  box-shadow:
    var(--flash-inset-hi),
    inset 0 -1px 0 color-mix(in srgb, black 28%, transparent),
    0 4px 28px rgba(0, 0, 0, 0.45),
    0 0 20px color-mix(in srgb, var(--flash-accent) 7%, transparent);
}

/* FS player â sulla lama (parity Studio transport); non angolo frame */
.flash-lama__fs {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  padding: 0;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, white 10%, transparent);
  background: color-mix(in srgb, black 18%, transparent);
  color: color-mix(in srgb, white 55%, transparent);
  cursor: pointer;
  box-shadow: none;
}

.flash-lama__fs:hover,
.flash-lama__fs:focus-visible {
  border-color: color-mix(in srgb, white 18%, transparent);
  background: color-mix(in srgb, black 28%, transparent);
  color: color-mix(in srgb, white 78%, transparent);
  outline: none;
}

.flash-lama__fs[aria-pressed='true'],
.flash-lama__fs.is-active {
  color: var(--flash-accent);
  border-color: color-mix(in srgb, var(--flash-accent) 35%, transparent);
}

.flash-lama__fs svg {
  display: block;
  width: 0.95rem;
  height: 0.95rem;
}

.flash-lama__fs .flash-fs-icon[hidden] {
  display: none;
}

.flash-phone-bar {
  display: none;
}

.flash-phone-bar__tools {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 0.55rem;
}

/* Hint Invia: nascosto di default; visibile solo in play (desk sx / phone portrait) */
.flash-deliver-hint {
  display: none;
  margin: 0;
  padding: 0.35rem 0.15rem 0;
  font-size: var(--flash-type-muted-size, 0.78rem);
  line-height: 1.35;
  letter-spacing: 0.01em;
  color: var(--flash-text-muted);
  text-align: center;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.flash-deliver-hint__mark {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 7px;
  border: 1px solid color-mix(in srgb, var(--flash-edge-soft, rgba(255, 255, 255, 0.12)) 70%, var(--flash-accent) 8%);
  background: color-mix(in srgb, black 22%, rgba(10, 12, 18, 0.62));
  box-shadow: inset 0 1px 0 color-mix(in srgb, white 3%, transparent);
  color: color-mix(in srgb, var(--flash-text-muted) 78%, var(--flash-accent) 14%);
}

.flash-deliver-hint__icon {
  display: block;
  width: 1.15rem;
  height: 1.15rem;
  opacity: 1;
}

/* SK3 â bottoni bar pari peso (ciano solo hover/pressed); size contento */
.flash-phone-bar__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.7rem;
  height: 2.7rem;
  border-radius: 11px;
  border: 1px solid color-mix(in srgb, white 8%, transparent);
  border-bottom-color: color-mix(in srgb, black 45%, transparent);
  background: linear-gradient(
    165deg,
    rgba(255, 255, 255, 0.07) 0%,
    color-mix(in srgb, var(--flash-bg-elevated) 72%, transparent) 42%,
    rgba(4, 6, 12, 0.88) 100%
  );
  color: color-mix(in srgb, var(--flash-text) 82%, var(--flash-text-muted));
  cursor: pointer;
  padding: 0;
  box-shadow: var(--flash-btn-gem);
  transition:
    color 0.22s ease,
    border-color 0.22s ease,
    filter 0.22s ease,
    box-shadow 0.22s ease;
}

.flash-phone-bar__btn svg {
  width: 1.2rem;
  height: 1.2rem;
  fill: none;
  stroke: currentColor;
  stroke-width: var(--flash-icon-stroke);
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.88;
  transition: opacity 0.22s ease, filter 0.22s ease;
}

.flash-phone-bar__btn:hover,
.flash-phone-bar__btn:focus-visible {
  border-color: color-mix(in srgb, var(--flash-accent) 34%, transparent);
  color: var(--flash-accent);
  outline: none;
  filter: brightness(1.08);
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.48),
    inset 1px 1px 0 color-mix(in srgb, var(--flash-accent) 22%, transparent),
    0 0 14px color-mix(in srgb, var(--flash-accent) 18%, transparent),
    0 5px 14px rgba(0, 0, 0, 0.42);
}

.flash-phone-bar__btn:hover svg,
.flash-phone-bar__btn:focus-visible svg {
  opacity: 1;
  filter: brightness(1.06);
}

/* Freccia: stesso gem a riposo; ciano solo pressed (allineata, no margin laterale) */
.flash-phone-bar__btn--arrow {
  margin-inline-end: 0;
}

.flash-phone-bar__btn--arrow[aria-pressed='true'] {
  border-color: color-mix(in srgb, var(--flash-accent) 70%, transparent);
  background:
    radial-gradient(
      circle at 30% 28%,
      color-mix(in srgb, var(--flash-accent) 26%, transparent),
      transparent 55%
    ),
    linear-gradient(
      165deg,
      color-mix(in srgb, var(--flash-accent) 14%, transparent) 0%,
      color-mix(in srgb, var(--flash-accent) 18%, var(--flash-bg-elevated)) 55%,
      rgba(4, 6, 12, 0.92) 100%
    );
  color: var(--flash-accent);
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.4),
    inset 1px 1px 0 color-mix(in srgb, var(--flash-accent) 28%, transparent),
    0 0 16px color-mix(in srgb, var(--flash-accent) 28%, transparent);
}

.flash-phone-bar__btn--arrow[aria-pressed='true'] svg {
  opacity: 1;
}

/* Overlay freccia: draft (is-placing) o replay salvato (is-replay, pointer-events none). */
.flash-arrow-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.flash-arrow-layer.is-placing {
  pointer-events: auto;
  cursor: crosshair;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.flash-arrow-layer__svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.flash-arrow-layer__shaft {
  stroke: var(--flash-accent);
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  stroke-width: 3px;
  pointer-events: none;
  filter:
    drop-shadow(0 0 1.5px rgba(0, 0, 0, 0.78))
    drop-shadow(0 0 5px color-mix(in srgb, var(--flash-accent) 55%, transparent));
}

.flash-arrow-layer__head {
  fill: var(--flash-accent);
  stroke: none;
  pointer-events: none;
  filter:
    drop-shadow(0 0 1.5px rgba(0, 0, 0, 0.72))
    drop-shadow(0 0 5px color-mix(in srgb, var(--flash-accent) 50%, transparent));
}

.flash-arrow-layer__tip-hit {
  fill: color-mix(in srgb, var(--flash-accent) 22%, transparent);
  stroke: color-mix(in srgb, var(--flash-accent) 82%, #fff 10%);
  stroke-width: 1.25px;
  vector-effect: non-scaling-stroke;
  /* Hit test = layer JS (isNearArrowTip); cerchio solo affordance piccola */
  pointer-events: none;
  cursor: grab;
  opacity: 0;
}

.flash-arrow-layer.has-draft .flash-arrow-layer__tip-hit {
  opacity: 0.95;
}

/* Replay coach: solo freccia â niente pallino in visione. */
.flash-arrow-layer.is-replay .flash-arrow-layer__tip-hit {
  opacity: 0;
  cursor: default;
  filter: none;
}

.flash-arrow-layer.is-rotating .flash-arrow-layer__tip-hit {
  cursor: grabbing;
  fill: color-mix(in srgb, var(--flash-accent) 38%, transparent);
}

.flash-arrow-layer__hint {
  position: absolute;
  left: 50%;
  bottom: 0.65rem;
  transform: translateX(-50%);
  margin: 0;
  padding: 0.35rem 0.7rem;
  max-width: min(90%, 16rem);
  border-radius: 999px;
  background: color-mix(in srgb, var(--flash-bg) 78%, transparent);
  border: 1px solid var(--flash-border);
  color: var(--flash-text);
  font-family: var(--flash-font);
  font-size: 0.78rem;
  line-height: 1.25;
  text-align: center;
  pointer-events: none;
  backdrop-filter: var(--flash-glass-blur);
}

.flash-arrow-layer__hint[hidden] {
  display: none;
}

.flash-arrow-layer__choice {
  position: absolute;
  left: 50%;
  top: 0.55rem;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
  gap: 0.35rem;
  max-width: calc(100% - 0.75rem);
  pointer-events: auto;
}

.flash-arrow-layer__choice[hidden] {
  display: none;
}

.flash-arrow-layer__choice-btn {
  margin: 0;
  flex: 0 1 auto;
  white-space: nowrap;
  padding: 0.38rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--flash-border);
  background: color-mix(in srgb, var(--flash-bg) 82%, transparent);
  color: var(--flash-text);
  font-family: var(--flash-font);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: var(--flash-glass-blur);
}

@media (max-width: 380px) {
  .flash-arrow-layer__choice {
    gap: 0.28rem;
  }

  .flash-arrow-layer__choice-btn {
    padding: 0.34rem 0.5rem;
    font-size: 0.7rem;
  }
}

/* Stessa famiglia vetro + pearl: Voce primaria (bordo ciano), Nota media, Annulla piÃ¹ leggera. */
.flash-arrow-layer__choice-btn--voice {
  border-color: color-mix(in srgb, var(--flash-accent) 58%, transparent);
  background: color-mix(in srgb, var(--flash-bg) 82%, transparent);
  color: var(--flash-text);
}

.flash-arrow-layer__choice-btn--note {
  border-color: color-mix(in srgb, var(--flash-text) 28%, transparent);
  background: color-mix(in srgb, var(--flash-bg) 74%, transparent);
  color: var(--flash-text);
}

.flash-arrow-layer__choice-btn--cancel {
  border-color: color-mix(in srgb, var(--flash-text-muted) 35%, transparent);
  background: color-mix(in srgb, var(--flash-bg) 62%, transparent);
  color: var(--flash-text);
  font-weight: 500;
}

.flash-arrow-layer__choice-btn:focus-visible {
  outline: 2px solid var(--flash-accent);
  outline-offset: 2px;
}

.flash-player__frame.is-arrow-placing {
  outline: 1px solid color-mix(in srgb, var(--flash-accent) 40%, transparent);
}

.flash-player__stage {
  position: relative;
  min-width: 0;
  min-height: 0;
}

.flash-player__stage:fullscreen,
.flash-player__stage:-webkit-full-screen {
  width: 100%;
  height: 100%;
  max-height: 100%;
  background: #000;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 0.35rem;
  box-sizing: border-box;
  /* direction: portrait/landscape â contratto in fondo al file */
  gap: 0.35rem;
}

.flash-player__stage:fullscreen .flash-player__media,
.flash-player__stage:-webkit-full-screen .flash-player__media {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.flash-player__stage:fullscreen .flash-player__frame,
.flash-player__stage:-webkit-full-screen .flash-player__frame {
  flex: 1 1 auto;
  width: auto;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  aspect-ratio: 16 / 9;
  margin-inline: auto;
}

/* Chrome FS: contratto portrait/landscape in coda (FS = non-FS, solo senza chrome browser) */

.flash-phone-bar__btn--pdf {
  /* Stesso gem; tint rosso soft (pari opacitÃ  icona, non âspentoâ) */
  border-color: color-mix(in srgb, var(--t1-red, #ef4444) 22%, color-mix(in srgb, white 8%, transparent));
  color: color-mix(in srgb, var(--t1-red, #ef4444) 58%, var(--flash-text) 42%);
}

.flash-phone-bar__btn--pdf svg {
  opacity: 0.88;
}

.flash-phone-bar__btn--pdf:hover,
.flash-phone-bar__btn--pdf:focus-visible {
  border-color: color-mix(in srgb, var(--t1-red, #ef4444) 48%, transparent);
  color: color-mix(in srgb, var(--t1-red, #ef4444) 78%, #fff);
  filter: brightness(1.06);
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.4),
    inset 1px 1px 0 color-mix(in srgb, var(--t1-red, #ef4444) 20%, transparent),
    0 0 14px color-mix(in srgb, var(--t1-red, #ef4444) 22%, transparent),
    0 5px 14px rgba(0, 0, 0, 0.4);
}

.flash-phone-bar__btn--pdf:hover svg,
.flash-phone-bar__btn--pdf:focus-visible svg {
  opacity: 1;
}

.flash-phone-bar__btn[hidden] {
  display: none;
}

/* Invia consegna â sheet note (phone/tablet/desk) */
.flash-deliver-host {
  display: none;
}

.flash-deliver-host--marks:has(.flash-deliver-cta:not([hidden])) {
  display: flex;
  flex-shrink: 0;
  width: 100%;
  max-width: none;
  margin: 0.75rem 0 0;
  justify-content: stretch;
}

.flash-deliver-cta {
  display: none;
  box-sizing: border-box;
  margin: 0;
  border: 1px solid color-mix(in srgb, var(--flash-accent) 28%, rgba(255, 255, 255, 0.1));
  border-radius: calc(var(--flash-radius) - 2px);
  background: color-mix(in srgb, var(--flash-accent) 10%, rgba(0, 0, 0, 0.28));
  color: var(--flash-text-title);
  font: inherit;
  font-size: var(--flash-type-cta-size);
  font-weight: var(--flash-type-cta-weight);
  letter-spacing: var(--flash-type-cta-track);
  cursor: pointer;
  box-shadow: var(--flash-inset-hi);
}

.flash-deliver-cta:not([hidden]) {
  display: block;
}

.flash-deliver-cta:hover,
.flash-deliver-cta:focus-visible {
  border-color: color-mix(in srgb, var(--flash-accent) 48%, rgba(255, 255, 255, 0.12));
  background: color-mix(in srgb, var(--flash-accent) 16%, rgba(0, 0, 0, 0.22));
  outline: none;
}

.flash-deliver-cta:disabled {
  opacity: 0.5;
  cursor: wait;
}

.flash-deliver-host--marks .flash-deliver-cta:not([hidden]) {
  width: 100%;
  flex-shrink: 0;
  min-height: 2.75rem;
  font-size: var(--flash-type-cta-size);
}

.flash-pdf-sheet__actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.flash-pdf-sheet__name {
  margin: 0 0 0.25rem;
  font-size: 0.82rem;
  color: var(--flash-text-muted);
  word-break: break-word;
}

.flash-pdf-sheet__name[hidden] {
  display: none !important;
}

.flash-pdf-sheet__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.65rem 1rem;
  border-radius: calc(var(--flash-radius) - 2px);
  border: 1px solid var(--flash-border);
  background: color-mix(in srgb, white 5%, transparent);
  color: var(--flash-text);
  font-family: var(--flash-font);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}

.flash-pdf-sheet__btn:hover,
.flash-pdf-sheet__btn:focus-visible {
  border-color: color-mix(in srgb, var(--t1-red, #ef4444) 45%, transparent);
  color: color-mix(in srgb, var(--t1-red, #ef4444) 72%, #fff);
  outline: none;
}

.flash-sheet__card--pdf {
  max-width: 22rem;
}

.flash-sheet {
  display: none;
}

/* SK4 â sheet card: vetro layered (Impostazioni / Voce / Nota / notify) */
.flash-sheet__card {
  border: 1px solid color-mix(in srgb, white 9%, var(--flash-edge-soft));
  border-top-color: color-mix(in srgb, white 14%, transparent);
  background: color-mix(in srgb, var(--flash-bg-elevated) 82%, transparent);
  backdrop-filter: var(--flash-glass-blur-deep);
  -webkit-backdrop-filter: var(--flash-glass-blur-deep);
  box-shadow: var(--flash-sheet-shadow);
}

.flash-sheet__head {
  border-bottom: 1px solid color-mix(in srgb, var(--flash-edge-soft) 90%, transparent);
  background: color-mix(in srgb, var(--t1-glass-frost, rgba(255, 255, 255, 0.03)) 65%, transparent);
  box-shadow: var(--flash-inset-hi);
}

.flash-sheet__title {
  margin: 0;
  font-size: var(--flash-type-title-size);
  font-weight: var(--flash-type-title-weight);
  letter-spacing: var(--flash-type-title-track);
  color: var(--flash-text-title);
}

.flash-sheet__slot .flash-clients {
  min-height: 0;
}

/* FP5 â settings sheet form (Home) */
.flash-settings {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.flash-settings__block {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.flash-settings__label {
  margin: 0;
  font-size: 0.9rem;
  font-weight: var(--flash-type-title-weight);
  letter-spacing: 0.015em;
  color: var(--flash-text-title);
}

.flash-settings__hint {
  margin: 0;
  font-size: var(--flash-type-muted-size);
  line-height: 1.4;
  letter-spacing: 0.01em;
  color: var(--flash-text-muted);
}

.flash-settings__row {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
}

.flash-settings__input,
.flash-settings__select {
  flex: 1 1 auto;
  min-width: 0;
  box-sizing: border-box;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--flash-edge-soft);
  border-radius: calc(var(--flash-radius) - 2px);
  background: color-mix(in srgb, black 28%, var(--flash-bg-elevated));
  color: var(--flash-text);
  font: inherit;
  font-size: 0.9rem;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.32), var(--flash-inset-hi);
}

.flash-settings__input:focus,
.flash-settings__select:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--flash-accent) 55%, transparent);
}

.flash-settings__save {
  flex: 0 0 auto;
  padding: 0.55rem 0.85rem;
  border: 1px solid color-mix(in srgb, var(--flash-accent) 45%, transparent);
  border-radius: calc(var(--flash-radius) - 2px);
  background: color-mix(in srgb, var(--flash-accent) 18%, transparent);
  color: var(--flash-accent);
  font: inherit;
  font-size: 0.88rem;
  font-weight: var(--flash-type-cta-weight);
  letter-spacing: var(--flash-type-cta-track);
  cursor: pointer;
}

.flash-settings__save:hover,
.flash-settings__save:focus-visible {
  background: color-mix(in srgb, var(--flash-accent) 28%, transparent);
  outline: none;
}

.flash-settings__save:disabled {
  opacity: 0.55;
  cursor: default;
}

.flash-settings__lang {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.flash-settings__lang-btn {
  padding: 0.35rem 0.55rem;
  border: 1px solid transparent;
  border-radius: calc(var(--flash-radius) - 4px);
  background: transparent;
  color: var(--flash-text-muted);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.flash-settings__lang-btn[aria-pressed='true'] {
  color: var(--flash-accent);
  border-color: color-mix(in srgb, var(--flash-accent) 40%, transparent);
  background: color-mix(in srgb, var(--flash-accent) 12%, transparent);
}

.flash-settings__lang-btn:hover,
.flash-settings__lang-btn:focus-visible {
  color: var(--flash-accent);
  outline: none;
}

.flash-settings__lang-sep {
  color: var(--flash-text-muted);
  opacity: 0.5;
}

.flash-settings__status {
  margin: 0;
  font-size: 0.82rem;
  color: var(--flash-accent);
}

.flash-settings__status[hidden] {
  display: none;
}

.flash-settings__status.is-error {
  color: color-mix(in srgb, var(--t1-red, #ef4444) 85%, white);
}

.flash-settings__block--section {
  padding-top: 0.85rem;
  border-top: 1px solid color-mix(in srgb, var(--flash-border) 85%, transparent);
}

.flash-settings-meter {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-top: 0.15rem;
}

.flash-settings-meter__track {
  position: relative;
  height: 0.5rem;
  border-radius: 999px;
  overflow: hidden;
  background: color-mix(in srgb, black 42%, var(--flash-bg-elevated));
  border: 1px solid color-mix(in srgb, white 7%, transparent);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35);
}

.flash-settings-meter__fill {
  height: 100%;
  min-width: 0;
  border-radius: inherit;
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--flash-accent) 72%, #0a3d42),
    var(--flash-accent)
  );
  box-shadow: 0 0 10px color-mix(in srgb, var(--flash-accent) 42%, transparent);
  transition: width 280ms ease;
}

.flash-settings-meter__track.is-warn .flash-settings-meter__fill {
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--t1-amber-ghost, #c89a48) 70%, #4a3808),
    var(--t1-amber-ghost, #c89a48)
  );
}

.flash-settings-meter__track.is-high .flash-settings-meter__fill {
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--t1-red, #ef4444) 72%, #4a0818),
    var(--t1-red, #ef4444)
  );
}

.flash-settings-meter__label {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--flash-text-muted);
}

.flash-settings__disclose {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  box-sizing: border-box;
  margin: 0.15rem 0 0;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--flash-edge-soft);
  border-radius: calc(var(--flash-radius) - 2px);
  background: color-mix(in srgb, var(--flash-bg-elevated) 70%, transparent);
  color: var(--flash-text);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.flash-settings__disclose:hover,
.flash-settings__disclose:focus-visible {
  border-color: color-mix(in srgb, var(--flash-accent) 36%, transparent);
  outline: none;
}

.flash-settings__disclose[aria-expanded='true'] .flash-settings__disclose-chev {
  transform: rotate(180deg);
  color: var(--flash-accent);
}

.flash-settings__disclose-chev {
  flex: 0 0 auto;
  color: var(--flash-text-muted);
  transition: transform 0.18s ease;
}

.flash-settings__disclose-panel[hidden] {
  display: none !important;
}

.flash-settings__disclose-panel {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-top: 0.45rem;
}

.flash-settings__pass-form {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.flash-settings__pass-username {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.flash-settings__save--block {
  align-self: stretch;
  margin-top: 0.25rem;
}

.flash-settings__pass-hint {
  margin: 0.15rem 0 0;
  min-height: 1.1em;
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--flash-text-muted);
}

.flash-settings__pass-hint.is-error {
  color: color-mix(in srgb, var(--t1-red, #ef4444) 85%, white);
}

.flash-settings__logout {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin-top: 0.65rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid color-mix(in srgb, var(--t1-red, #ef4444) 42%, transparent);
  border-radius: calc(var(--flash-radius) - 2px);
  background: color-mix(in srgb, var(--t1-red, #ef4444) 10%, transparent);
  color: color-mix(in srgb, var(--t1-red, #ef4444) 88%, white);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.flash-settings__logout:hover,
.flash-settings__logout:focus-visible {
  background: color-mix(in srgb, var(--t1-red, #ef4444) 18%, transparent);
  outline: none;
}

/* Reveal password (Flash sheet â senza gateway_styles) */
.flash-settings .t1-password-field {
  position: relative;
  display: block;
}

.flash-settings .t1-password-field > input {
  width: 100%;
  padding-right: 2.5rem;
}

.flash-settings .t1-password-reveal {
  position: absolute;
  top: 50%;
  right: 0.35rem;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: calc(var(--flash-radius) - 4px);
  background: transparent;
  color: var(--flash-text-muted);
  cursor: pointer;
}

.flash-settings .t1-password-reveal:hover,
.flash-settings .t1-password-reveal:focus-visible {
  color: var(--flash-accent);
  outline: none;
}

.flash-settings .t1-password-reveal svg {
  width: 1.1rem;
  height: 1.1rem;
}

.flash-settings__toggle-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem;
}

.flash-settings__toggle-copy {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.flash-settings__switch {
  flex: 0 0 auto;
  position: relative;
  display: inline-flex;
  width: 2.75rem;
  height: 1.55rem;
  cursor: pointer;
  margin-top: 0.15rem;
}

.flash-settings__switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.flash-settings__switch-ui {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  border: 1px solid var(--flash-border);
  background: color-mix(in srgb, white 8%, transparent);
  transition: background 0.15s ease, border-color 0.15s ease;
}

.flash-settings__switch-ui::after {
  content: '';
  position: absolute;
  top: 0.18rem;
  left: 0.18rem;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 999px;
  background: var(--flash-text-muted);
  transition: transform 0.15s ease, background 0.15s ease;
}

.flash-settings__switch input:checked + .flash-settings__switch-ui {
  border-color: color-mix(in srgb, var(--flash-accent) 45%, transparent);
  background: color-mix(in srgb, var(--flash-accent) 22%, transparent);
}

.flash-settings__switch input:checked + .flash-settings__switch-ui::after {
  transform: translateX(1.15rem);
  background: var(--flash-accent);
}

.flash-settings__switch input:focus-visible + .flash-settings__switch-ui {
  outline: 2px solid color-mix(in srgb, var(--flash-accent) 55%, transparent);
  outline-offset: 2px;
}

.flash-video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #000;
  cursor: pointer;
}

/* FP2 â lama seek coach (tacche = segni; no overlay frame) Â· SK2 transport weight */
.flash-lama {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-shrink: 0;
  min-width: 0;
  padding: 0.45rem 0.55rem 0.4rem;
  touch-action: none;
  border-radius: 12px;
  background: color-mix(in srgb, var(--flash-bg-elevated) 52%, transparent);
  backdrop-filter: var(--flash-transport-blur);
  -webkit-backdrop-filter: var(--flash-transport-blur);
  border-top: 1px solid color-mix(in srgb, var(--flash-accent) 20%, transparent);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 2px 0 color-mix(in srgb, var(--flash-accent) 8%, transparent),
    0 -6px 20px rgba(0, 0, 0, 0.32);
}

.flash-lama[hidden] {
  display: none;
}

/* SK2 â play â cockpit-playpause (ciano, inset, alone) */
.flash-lama__play {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--flash-accent) 42%, transparent);
  border-bottom-color: color-mix(in srgb, black 55%, transparent);
  background:
    radial-gradient(
      circle at 30% 28%,
      color-mix(in srgb, var(--flash-accent) 22%, transparent),
      transparent 52%
    ),
    linear-gradient(
      165deg,
      color-mix(in srgb, white 8%, transparent) 0%,
      color-mix(in srgb, var(--flash-bg) 88%, #041012) 100%
    );
  color: var(--flash-accent);
  cursor: pointer;
  padding: 0;
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.45),
    inset 1px 1px 0 color-mix(in srgb, var(--flash-accent) 18%, transparent),
    0 4px 12px rgba(0, 0, 0, 0.5);
  transition: filter 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.flash-lama__play:hover,
.flash-lama__play:focus-visible {
  filter: brightness(1.12);
  border-color: color-mix(in srgb, var(--flash-accent) 55%, transparent);
  color: var(--flash-accent);
  outline: none;
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.45),
    inset 1px 1px 0 color-mix(in srgb, var(--flash-accent) 26%, transparent),
    0 0 18px color-mix(in srgb, var(--flash-accent) 32%, transparent),
    0 6px 14px rgba(0, 0, 0, 0.55);
}

.flash-lama__play.is-playing .flash-lama__play-icon {
  display: none;
}

.flash-lama__play.is-playing .flash-lama__pause-icon {
  display: block;
}

.flash-lama__play:not(.is-playing) .flash-lama__pause-icon {
  display: none;
}

.flash-lama__track-wrap {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  height: 1.75rem;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.flash-lama__track {
  position: relative;
  width: 100%;
  height: 0.3rem;
  border-radius: 999px;
  background: color-mix(in srgb, white 10%, transparent);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35);
  overflow: visible;
}

.flash-lama__fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--flash-accent) 55%, transparent),
    color-mix(in srgb, var(--flash-accent) 78%, white 10%)
  );
  box-shadow: 0 0 8px color-mix(in srgb, var(--flash-accent) 32%, transparent);
  pointer-events: none;
}

.flash-lama__thumb {
  position: absolute;
  top: 50%;
  left: 0%;
  width: 0.7rem;
  height: 0.7rem;
  margin-left: -0.35rem;
  margin-top: -0.35rem;
  border-radius: 50%;
  background: var(--flash-accent);
  box-shadow:
    0 0 0 2px color-mix(in srgb, var(--flash-bg) 70%, transparent),
    0 0 10px color-mix(in srgb, var(--flash-accent) 42%, transparent);
  pointer-events: none;
  z-index: 2;
}

.flash-lama__ticks {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

/* SK1 â aghi shard-like (rif. Studio .t1-shard); hue champagne; fill/play ciano */
.flash-lama__tick {
  position: absolute;
  top: 50%;
  width: 3px;
  height: 14px;
  border: none;
  border-radius: 1.5px;
  padding: 0;
  opacity: 0.62;
  cursor: pointer;
  pointer-events: auto;
  z-index: 1;
  transform: translate(-50%, -50%);
  background: linear-gradient(
    180deg,
    transparent 0%,
    color-mix(in srgb, var(--flash-mark-tick) 70%, transparent) 22%,
    var(--flash-mark-tick) 50%,
    color-mix(in srgb, var(--flash-mark-tick) 70%, transparent) 78%,
    transparent 100%
  );
  box-shadow:
    0 0 calc(5px * var(--flash-mark-glow)) color-mix(in srgb, var(--flash-mark-tick) 80%, transparent),
    0 0 calc(10px * var(--flash-mark-glow)) color-mix(in srgb, var(--flash-mark-tick) 35%, transparent);
  transition:
    opacity 180ms ease,
    transform 220ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 200ms ease,
    filter 200ms ease;
}

/* Hit pad phone â ago sottile, tap area umana */
.flash-lama__tick::before {
  content: '';
  position: absolute;
  inset: -10px -8px;
}

.flash-lama__tick:hover,
.flash-lama__tick:focus-visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.65, 1.5);
  filter: brightness(1.12);
  outline: none;
  z-index: 3;
}

.flash-lama__tick.is-near {
  opacity: 1;
  background: linear-gradient(
    180deg,
    transparent 0%,
    color-mix(in srgb, var(--flash-mark-tick) 72%, #fff4dc 28%) 22%,
    color-mix(in srgb, var(--flash-mark-tick) 68%, #fff4dc 32%) 50%,
    color-mix(in srgb, var(--flash-mark-tick) 72%, #fff4dc 28%) 78%,
    transparent 100%
  );
  box-shadow:
    0 0 calc(6px * var(--flash-mark-glow)) color-mix(in srgb, var(--flash-mark-tick) 85%, transparent),
    0 0 calc(12px * var(--flash-mark-glow)) color-mix(in srgb, var(--flash-mark-tick) 45%, transparent);
  filter: brightness(1.08);
}

.flash-lama.is-scrubbing .flash-lama__tick {
  pointer-events: none;
}

.flash-lama__clock {
  flex: 0 0 auto;
  min-width: 2.6rem;
  font-family: var(--flash-font-mono);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  color: var(--flash-text-muted);
  text-align: right;
  user-select: none;
}

.flash-lama.is-scrubbing .flash-lama__thumb {
  transform: scale(1.15);
}

.flash-mark {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0;
  flex-shrink: 0;
}

.flash-mark[hidden] {
  display: none;
}

.flash-mark__meta {
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
}

.flash-mark__save-prefix {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--flash-text-muted);
}

.flash-mark__label {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: none;
  color: var(--flash-text-muted);
}

.flash-mark__time {
  font-family: var(--flash-font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 0.95rem;
  color: var(--flash-accent);
  font-weight: 600;
  text-shadow: 0 0 12px var(--t1-cyan-glow-faint, rgba(0, 229, 255, 0.07));
}

.flash-mark__text {
  width: 100%;
  box-sizing: border-box;
  resize: vertical;
  min-height: 2.75rem;
  border: 1px solid var(--flash-border);
  border-radius: calc(var(--flash-radius) - 2px);
  background: color-mix(in srgb, black 35%, var(--flash-bg-elevated));
  color: var(--flash-text);
  font: inherit;
  font-size: 1rem;
  padding: 0.65rem 0.75rem;
}

.flash-mark__text[hidden] {
  display: none;
}

.flash-mark__text:focus {
  outline: 2px solid color-mix(in srgb, var(--flash-accent) 55%, transparent);
  outline-offset: 1px;
}

.flash-mark__actions {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
}

.flash-mark__mic,
.flash-mark__play,
.flash-mark__save,
.flash-mark__cancel {
  flex: 1 1 auto;
  min-height: 2.75rem;
  border-radius: calc(var(--flash-radius) - 2px);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}

.flash-mark__mic {
  border: 1px solid color-mix(in srgb, var(--flash-accent) 45%, transparent);
  background: color-mix(in srgb, var(--flash-accent) 18%, transparent);
  color: var(--flash-accent);
}

.flash-mark__mic.is-recording {
  border-color: color-mix(in srgb, var(--t1-red, #ef4444) 55%, transparent);
  background: color-mix(in srgb, var(--t1-red, #ef4444) 22%, transparent);
  color: #fecaca;
}

.flash-mark__mic[hidden] {
  display: none;
}

.flash-mark__play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border: 1px solid color-mix(in srgb, var(--flash-accent) 45%, transparent);
  background: color-mix(in srgb, var(--flash-accent) 18%, transparent);
  color: var(--flash-accent);
}

.flash-mark__play[hidden] {
  display: none !important;
}

.flash-mark__play.is-playing {
  border-color: color-mix(in srgb, var(--flash-accent) 70%, transparent);
  background: color-mix(in srgb, var(--flash-accent) 28%, transparent);
}

.flash-mark__play-label {
  font: inherit;
  font-weight: 600;
}

.flash-mark__save {
  border: 1px solid color-mix(in srgb, var(--flash-accent) 40%, transparent);
  background: color-mix(in srgb, var(--flash-accent) 14%, transparent);
  color: var(--flash-accent);
  font-weight: var(--flash-type-cta-weight);
  letter-spacing: var(--flash-type-cta-track);
}

.flash-mark__cancel {
  border: 1px solid var(--flash-border);
  background: transparent;
  color: var(--flash-text-muted);
}

.flash-mark__cancel[hidden] {
  display: none;
}

/* Un compito: mic = solo voce Â· nota = solo testo (desk + phone) */
.flash-mark--layer-voice .flash-mark__text {
  display: none !important;
}

.flash-mark--layer-note .flash-mark__mic {
  display: none !important;
}

.flash-mark--layer-note .flash-mark__cancel {
  display: none !important;
}

.flash-mark__save:disabled,
.flash-mark__mic:disabled,
.flash-mark__cancel:disabled {
  opacity: 0.55;
  cursor: wait;
}

.flash-mark__status {
  margin: 0;
  font-size: 0.88rem;
  color: var(--flash-text-muted);
}

.flash-mark__status.is-error {
  color: color-mix(in srgb, var(--t1-red, #ef4444) 85%, white);
}

.flash-mark__status[hidden] {
  display: none;
}

.flash-marks {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-top: 0.35rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--flash-border);
}

.flash-marks__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.65rem;
}

.flash-marks__title {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: none;
  color: var(--flash-text-muted);
}

.flash-marks__hint {
  margin: 0;
  flex: 1 1 8rem;
  min-width: 0;
  font-size: 0.72rem;
  line-height: 1.35;
  font-weight: 400;
  color: color-mix(in srgb, var(--flash-text-muted) 88%, transparent);
}

/* Sheet ha giÃ  il titolo in head â evita doppio Â«NoteÂ». */
.flash-sheet__slot .flash-marks__title {
  display: none;
}

.flash-marks__empty {
  margin: 0;
  font-size: 0.88rem;
  color: var(--flash-text-muted);
}

.flash-marks__empty[hidden] {
  display: none;
}

.flash-marks-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-height: 9rem;
  overflow-y: auto;
}

.flash-marks-list__item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid var(--flash-border);
  border-radius: calc(var(--flash-radius) - 2px);
  background: color-mix(in srgb, white 3%, transparent);
  padding: 0.4rem 0.5rem;
  cursor: pointer;
}

.flash-marks-list__item:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--flash-accent) 55%, transparent);
  outline-offset: 1px;
}

.flash-marks-list__seek {
  flex: 0 0 auto;
  border: none;
  background: transparent;
  color: var(--flash-accent);
  font-family: var(--flash-font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: inherit;
  padding: 0.2rem 0.25rem;
  pointer-events: none;
}

.flash-marks-list__item:hover .flash-marks-list__seek,
.flash-marks-list__item:focus-visible .flash-marks-list__seek {
  text-decoration: underline;
}

.flash-marks-list__body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.9rem;
  color: var(--flash-text);
  overflow: hidden;
}

.flash-marks-list__mic,
.flash-marks-list__play {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--flash-accent);
}

.flash-marks-list__arrow {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--flash-accent);
  opacity: 0.92;
}

.flash-marks-list__play {
  width: 1.85rem;
  height: 1.85rem;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--flash-accent) 40%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--flash-accent) 14%, transparent);
  cursor: inherit;
  pointer-events: none;
  box-sizing: border-box;
}

.flash-marks-list__item:hover .flash-marks-list__play {
  background: color-mix(in srgb, var(--flash-accent) 26%, transparent);
}

.flash-marks-list__play.is-playing {
  background: color-mix(in srgb, var(--flash-accent) 34%, transparent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--flash-accent) 35%, transparent);
}

.flash-marks-list__dur {
  flex: 0 0 auto;
  font-variant-numeric: tabular-nums;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--flash-text-muted);
}

.flash-marks-list__text {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.flash-marks-list__del {
  flex: 0 0 auto;
  border: 1px solid color-mix(in srgb, var(--t1-red, #ef4444) 40%, transparent);
  border-radius: calc(var(--flash-radius) - 2px);
  background: transparent;
  color: color-mix(in srgb, var(--t1-red, #ef4444) 85%, white);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.5rem;
  cursor: pointer;
}

.flash-marks-list__del:hover,
.flash-marks-list__del:focus-visible {
  background: color-mix(in srgb, var(--t1-red, #ef4444) 14%, transparent);
  outline: none;
}

/* Phone / tablet touch: no colonna clienti+player Â· play = player + icone Â· sheet */
@media (max-width: 767px), ((hover: none) and (pointer: coarse)) {
  /*
   * Contratto Flash phone (fondatore): scroll **pagina intera**, non riquadro.
   * Brand puÃ² salire col contenuto (scelta B). Sheet aperti â lock temporaneo.
   */
  /*
   * FP-ATM â atmosfera filo phone: vetro piÃ¹ leggero, riquadri morbidi.
   * Solo token/superfici esistenti â zero blur per-riga lista (GPU).
   */
  html.flash-html {
    --flash-radius: 14px;
    --flash-surface: color-mix(
      in srgb,
      var(--gw-glass-surface-bg, rgba(10, 15, 24, 0.65)) 68%,
      transparent
    );
    --flash-bg-elevated: color-mix(
      in srgb,
      var(--t1-vault-glass-bg-elevated, rgba(8, 12, 22, 0.72)) 76%,
      transparent
    );
    --flash-border: color-mix(
      in srgb,
      var(--t1-cyan-gateway, #00f2ff) 7%,
      rgba(255, 255, 255, 0.055)
    );
    --flash-glass-blur: blur(16px) saturate(1.14);
    --flash-panel-shadow:
      0 6px 32px rgba(0, 0, 0, 0.36),
      0 0 18px var(--t1-cyan-glow-faint, rgba(0, 229, 255, 0.055));
  }

  html.flash-html,
  html.flash-html body.flash-app {
    height: auto;
    max-height: none;
    overflow-x: hidden;
    overflow-y: auto;
  }

  body.flash-app {
    min-height: 100dvh;
    height: auto;
  }

  body.flash-app.flash-sheet-open {
    overflow: hidden;
  }

  /* â¤767: niente Centro. Tablet touch â¥768: ripristinato sotto. */
  .flash-topbar__nav {
    display: none;
  }

  .flash-topbar {
    position: relative;
    flex-shrink: 0;
    box-sizing: border-box;
    padding-top: env(safe-area-inset-top, 0px);
    background: color-mix(in srgb, var(--flash-bg-elevated) 72%, transparent);
    border-bottom-color: color-mix(in srgb, var(--flash-border) 75%, transparent);
  }

  .flash-main {
    flex: 0 1 auto;
    min-height: auto;
    overflow: visible;
  }

  /* Drill-down phone: Home (2 porte) â Lista clienti â Video â Player. */
  .flash-panels > .flash-clients {
    display: none;
  }

  .flash-panels > .flash-stage {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
  }

  .flash-panels--clients > .flash-clients {
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1 1 auto;
  }

  .flash-panels--clients > .flash-stage {
    display: none;
  }

  .flash-panels--library > .flash-clients,
  .flash-panels--playing > .flash-clients {
    display: none;
  }

  .flash-panels--library > .flash-stage,
  .flash-panels--playing > .flash-stage {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
  }

  .flash-panels--home .flash-stage__head {
    display: none;
  }

  .flash-clients__head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  .flash-clients__head .flash-panel__title {
    flex: 1 1 auto;
    min-width: 0;
  }

  .flash-panels {
    flex: 0 1 auto;
    min-height: auto;
  }

  .flash-panel {
    overflow: visible;
    min-height: auto;
    border-radius: var(--flash-radius);
    /* SK4: gem/blur da base â non flatten surface piatta */
  }

  .flash-panel__head {
    background: color-mix(in srgb, var(--t1-glass-frost, rgba(255, 255, 255, 0.03)) 65%, transparent);
    border-bottom-color: color-mix(in srgb, var(--flash-edge-soft) 90%, transparent);
  }

  .flash-panel__body {
    overflow: visible;
  }

  /* Tile morbidi â home / clienti / video (semi-trasparenza, no backdrop-filter riga) */
  .flash-home {
    gap: 0.55rem;
    margin: 0.15rem 0 0.25rem;
  }

  /* Home portrait: due CTA a vista senza scroll inutile (S22) */
  .flash-main {
    padding: max(0.55rem, env(safe-area-inset-left, 0px))
      max(0.75rem, env(safe-area-inset-right, 0px))
      max(0.75rem, env(safe-area-inset-bottom, 0px));
    gap: 0.55rem;
  }

  .flash-status:not([hidden]) {
    font-size: 0.82rem;
    margin: 0 0 0.15rem;
  }

  .flash-home-btn {
    padding: 0.82rem 0.9rem;
    gap: 0.7rem;
  }

  .flash-home-btn__icon {
    width: 2.25rem;
    height: 2.25rem;
  }

  .flash-home-btn__title {
    font-size: var(--flash-type-title-size);
  }

  .flash-clients-list,
  .flash-library-list {
    gap: 0.5rem;
  }

  .flash-home-btn,
  .flash-clients-list__btn,
  .flash-library-list__btn {
    border-radius: calc(var(--flash-radius) - 2px);
    border-color: var(--flash-edge-soft);
    background: var(--flash-tile-bg);
    box-shadow: var(--flash-tile-shadow);
  }

  .flash-home-btn:hover,
  .flash-home-btn:focus-visible,
  .flash-clients-list__item.is-selected .flash-clients-list__btn,
  .flash-clients-list__btn:hover,
  .flash-clients-list__btn:focus-visible,
  .flash-library-list__btn:hover,
  .flash-library-list__btn:focus-visible {
    border-color: color-mix(in srgb, var(--flash-accent) 26%, rgba(255, 255, 255, 0.1));
    background: color-mix(in srgb, var(--flash-accent) 8%, var(--flash-surface));
  }

  .flash-clients-search,
  .flash-new-client__input {
    border-radius: calc(var(--flash-radius) - 2px);
    border-color: var(--flash-edge-soft);
    background: color-mix(in srgb, black 26%, var(--flash-bg-elevated));
  }

  .flash-stage-back {
    border-radius: calc(var(--flash-radius) - 2px);
    border-color: var(--flash-edge-soft);
    background: color-mix(in srgb, white 5%, transparent);
  }

  .flash-player__frame {
    border-radius: calc(var(--flash-radius) - 2px);
    /* SK2: cornice asimmetrica resta (non flatten edge-soft) */
  }

  /* SK3: phone â gem resta; radius soft */
  .flash-phone-bar__btn {
    border-radius: 11px;
  }

  .flash-phone-bar__btn--pdf {
    opacity: 1;
  }

  .flash-panels--playing .flash-rail {
    display: none !important;
  }

  .flash-panels--playing .flash-stage {
    border: none;
    background: transparent;
  }

  .flash-panels--playing .flash-stage__head {
    display: none;
  }

  .flash-panels--playing .flash-player__frame {
    aspect-ratio: 16 / 9;
    min-height: 0;
    max-height: none;
    width: 100%;
  }

  .flash-panels--playing .flash-phone-bar:not([hidden]) {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.55rem;
  }

  .flash-panels--playing .flash-phone-bar__tools {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 0.55rem;
  }

  .flash-panels--playing .flash-phone-bar__btn--pdf:not([hidden]) {
    margin-top: 0.1rem;
  }

  /* Phone/touch portrait play: hint un filo sotto la bar (icone+PDF) */
  @media (orientation: portrait) {
    .flash-panels--playing .flash-deliver-hint--phone {
      display: inline-flex;
      flex-shrink: 0;
      max-width: 22rem;
      margin-top: 1.5rem;
      margin-inline: auto;
      padding: 0.25rem 0.5rem max(0.45rem, env(safe-area-inset-bottom, 0px));
    }
  }

  .flash-sheet:not([hidden]) {
    display: flex;
    position: fixed;
    inset: 0;
    z-index: 80;
    align-items: stretch;
    justify-content: center;
    padding: env(safe-area-inset-top, 0px) var(--flash-pad)
      env(safe-area-inset-bottom, 0px);
    background: color-mix(in srgb, black 72%, transparent);
  }

  .flash-sheet__card {
    display: flex;
    flex-direction: column;
    width: min(100%, 28rem);
    margin: auto 0;
    max-height: min(92dvh, 100%);
    border-radius: calc(var(--flash-radius) + 2px);
    overflow: hidden;
    /* SK4: vetro layered da token base */
  }

  .flash-sheet--voice .flash-sheet__card {
    min-height: min(78dvh, 36rem);
  }

  .flash-sheet__head {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem var(--flash-pad);
    border-bottom: 1px solid var(--flash-border);
  }

  .flash-sheet__title {
    margin: 0;
    font-size: var(--flash-type-title-size);
    font-weight: var(--flash-type-title-weight);
    letter-spacing: var(--flash-type-title-track);
    color: var(--flash-text-title);
  }

  .flash-sheet__close {
    border: none;
    background: transparent;
    color: var(--flash-text-muted);
    font: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0.35rem 0.25rem;
  }

  .flash-sheet__slot {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: var(--flash-pad);
    display: flex;
    flex-direction: column;
  }

  .flash-mark--layer-voice {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1rem;
    min-height: 100%;
  }

  .flash-mark--layer-voice .flash-mark__text {
    display: none;
  }

  .flash-mark--layer-voice .flash-mark__meta {
    justify-content: center;
  }

  .flash-mark--layer-voice .flash-mark__save-prefix {
    font-size: 0.95rem;
  }

  .flash-mark--layer-voice .flash-mark__time {
    font-size: 1.35rem;
  }

  .flash-mark--layer-voice .flash-mark__actions {
    flex-direction: column;
    gap: 0.65rem;
  }

  .flash-mark--layer-voice .flash-mark__mic {
    min-height: 4.75rem;
    min-width: 4.75rem;
    width: 4.75rem;
    align-self: center;
    flex: 0 0 auto;
    font-size: 1.15rem;
    border-radius: 999px;
    border-color: color-mix(in srgb, var(--t1-red, #ef4444) 55%, transparent);
    background: color-mix(in srgb, var(--t1-red, #ef4444) 22%, transparent);
    color: #fecaca;
  }

  .flash-mark--layer-voice .flash-mark__mic.is-recording {
    animation: flash-rec-pulse 1.2s ease-in-out infinite;
  }

  /* Idle/rec: solo Rec/Stop. Ready: Ascolta | Salva | Annulla */
  .flash-mark--layer-voice:not(.is-voice-ready) .flash-mark__save,
  .flash-mark--layer-voice:not(.is-voice-ready) .flash-mark__cancel,
  .flash-mark--layer-voice:not(.is-voice-ready) .flash-mark__play {
    display: none;
  }

  .flash-mark--layer-voice.is-voice-ready .flash-mark__mic {
    display: none;
  }

  .flash-mark--layer-voice.is-voice-ready .flash-mark__actions {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .flash-mark--layer-voice.is-voice-ready .flash-mark__play,
  .flash-mark--layer-voice.is-voice-ready .flash-mark__save,
  .flash-mark--layer-voice.is-voice-ready .flash-mark__cancel {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3rem;
  }

  .flash-mark--layer-voice.is-voice-ready .flash-mark__play {
    flex: 1 1 100%;
    min-height: 3.25rem;
    border-radius: 999px;
  }

  .flash-mark--layer-voice.is-voice-ready .flash-mark__play .flash-mark__play-label {
    font-size: 1.05rem;
  }

  .flash-mark--layer-voice.is-voice-ready .flash-mark__save,
  .flash-mark--layer-voice.is-voice-ready .flash-mark__cancel {
    flex: 1 1 auto;
  }

  .flash-mark--layer-note .flash-mark__mic {
    display: none;
  }

  .flash-mark--layer-note .flash-mark__cancel {
    display: none;
  }

  .flash-mark--layer-note .flash-mark__text {
    min-height: 7rem;
    font-size: 1.05rem;
  }

  @keyframes flash-rec-pulse {
    0%,
    100% {
      box-shadow: 0 0 0 0 color-mix(in srgb, var(--t1-red, #ef4444) 35%, transparent);
    }
    50% {
      box-shadow: 0 0 0 10px transparent;
    }
  }

  .flash-marks-list {
    max-height: none;
    overflow: visible;
  }

  .flash-mark--voice-off .flash-mark__mic {
    display: none;
  }
}

/* Tablet touch â¥768: shell phone ma Centro di controllo resta (solo â¤767 lo nasconde) */
@media (min-width: 768px) and (hover: none) and (pointer: coarse) {
  .flash-topbar__nav {
    display: flex;
  }
}

/* Desktop â¥768 + mouse: lock body Â· browse: clienti | stage Â· play: rail | video grande */
@media (min-width: 768px) and (hover: hover) and (pointer: fine) {
  html.flash-html,
  html.flash-html body.flash-app {
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
  }

  body.flash-app {
    height: 100%;
  }

  .flash-main {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
  }

  .flash-status:not([hidden]) {
    flex-shrink: 0;
  }

  .flash-panels {
    flex: 1 1 auto;
    min-height: 0;
    flex-direction: row;
    align-items: stretch;
  }

  .flash-home {
    display: none !important;
  }

  #flash-clients-back[hidden] {
    display: none !important;
  }

  #flash-clients-back:not([hidden]) {
    display: inline-flex !important;
  }

  .flash-clients__head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  .flash-clients__head .flash-panel__title {
    flex: 1 1 auto;
    min-width: 0;
  }

  .flash-sheet:not([hidden]) {
    display: flex;
    position: fixed;
    inset: 0;
    z-index: 80;
    align-items: center;
    justify-content: center;
    padding: var(--flash-pad);
    background: color-mix(in srgb, black 72%, transparent);
  }

  .flash-sheet__card {
    display: flex;
    flex-direction: column;
    width: min(100%, 26rem);
    max-height: min(92dvh, 42rem);
    border-radius: var(--flash-radius);
    overflow: hidden;
    /* SK4: vetro layered da token base */
  }

  /* Impostazioni: come tablet â quasi tutto il viewport, scroll solo se serve */
  .flash-sheet--settings .flash-sheet__card {
    max-height: min(92dvh, 100%);
  }

  .flash-sheet__head {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem var(--flash-pad);
    border-bottom: 1px solid var(--flash-border);
  }

  .flash-sheet__title {
    margin: 0;
    font-size: var(--flash-type-title-size);
    font-weight: var(--flash-type-title-weight);
    letter-spacing: var(--flash-type-title-track);
    color: var(--flash-text-title);
  }

  .flash-sheet__close {
    border: none;
    background: transparent;
    color: var(--flash-text-muted);
    font: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0.35rem 0.25rem;
  }

  .flash-sheet__slot {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: var(--flash-pad);
  }

  .flash-clients,
  .flash-rail,
  .flash-stage {
    display: flex;
    flex-direction: column;
    min-height: 0;
  }

  .flash-rail[hidden] {
    display: none;
  }

  .flash-clients {
    flex: 0 0 min(32%, 18rem);
    max-width: 20rem;
  }

  .flash-clients-acc:not([hidden]) {
    display: inline-flex;
  }

  .flash-desk-notify-cta:not([hidden]),
  .flash-desk-new-cta:not([hidden]) {
    display: flex;
  }

  .flash-menu-zen:not([hidden]) {
    display: inline-flex;
  }

  .flash-panels--menu-hidden .flash-clients {
    display: none !important;
  }

  .flash-stage {
    flex: 1 1 auto;
  }

  .flash-panel__head {
    flex-shrink: 0;
  }

  .flash-panel__body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
  }

  .flash-library-list {
    padding-bottom: 0.25rem;
  }

  .flash-panels--playing .flash-clients {
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 0 0 min(28%, 16rem);
    max-width: 18rem;
  }

  .flash-panels--playing .flash-clients .flash-panel__body {
    display: flex;
    flex-direction: column;
    min-height: 0;
  }

  .flash-panels--playing .flash-clients-browse {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
  }

  /* Desk play: hint Invia in basso a sinistra (rail Clienti) */
  .flash-panels--playing .flash-deliver-hint--desk {
    display: inline-flex;
    flex-shrink: 0;
    margin-top: auto;
    padding: 0.55rem 0.15rem 0.1rem;
    justify-content: flex-start;
    text-align: left;
  }

  .flash-panels--playing .flash-deliver-hint--phone {
    display: none !important;
  }

  .flash-panels--playing.flash-panels--menu-hidden .flash-clients {
    display: none !important;
  }

  /* Play desk: no rail segni â icone a dx come landscape */
  .flash-panels--playing .flash-rail {
    display: none !important;
  }

  .flash-panels--playing .flash-stage {
    flex: 1 1 auto;
    min-width: 0;
    border: none;
    background: transparent;
  }

  .flash-panels--playing .flash-stage__head {
    display: none;
  }

  .flash-panels--playing .flash-stage__body {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    overflow: hidden;
    padding: 0;
  }

  .flash-panels--playing .flash-player {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 0.35rem;
    overflow: hidden;
  }

  .flash-panels--playing .flash-player__stage {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 0.45rem;
    position: relative;
  }

  .flash-panels--playing .flash-player__media {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.3rem;
  }

  /* Indietro sopra il take (contenuto) — non colonna tra rail e video */
  .flash-panels--playing .flash-player__back {
    flex-shrink: 0;
    align-self: flex-start;
    width: auto;
    min-width: 2.25rem;
    height: 2.25rem;
    padding: 0 0.65rem 0 0.3rem;
    margin: 0 0 0.15rem;
    border: 1px solid var(--flash-edge-soft);
    border-radius: calc(var(--flash-radius) - 3px);
    background: color-mix(in srgb, var(--flash-bg-elevated) 45%, transparent);
    color: var(--flash-text-muted);
  }

  .flash-panels--playing .flash-player__back-label {
    display: inline;
  }

  .flash-panels--playing .flash-player__back:hover,
  .flash-panels--playing .flash-player__back:focus-visible {
    border-color: color-mix(in srgb, var(--flash-accent) 28%, transparent);
    color: var(--flash-text);
  }

  .flash-panels--playing .flash-player__frame {
    flex: 0 1 auto;
    width: 100%;
    min-width: 0;
    min-height: 0;
    aspect-ratio: 16 / 9;
    max-height: 100%;
    height: auto;
  }

  .flash-panels--playing .flash-lama {
    flex-shrink: 0;
  }

  .flash-panels--playing .flash-companion-chip {
    display: none !important;
  }

  /* Desk play: icone in colonna a dx (in flow) â FS player sulla lama */
  .flash-panels--playing .flash-phone-bar:not([hidden]) {
    display: flex;
    position: static;
    transform: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    align-self: stretch;
    gap: 0.9rem;
    flex: 0 0 auto;
    margin: 0;
    padding: 0;
    min-height: 0;
    border-radius: 0;
    border: none;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
  }

  .flash-panels--playing .flash-phone-bar__tools {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.9rem;
    flex: 0 0 auto;
  }

  .flash-panels--playing .flash-phone-bar__btn--pdf:not([hidden]) {
    position: static;
    transform: none;
    margin-top: 0.85rem;
  }

  /* FP-DESK S2 â atmosfera stage/player (linee sottili, vetro quieto); CTA resta in sheet note */
  .flash-panels--playing .flash-player__frame {
    border-color: var(--flash-edge-soft);
    box-shadow:
      var(--flash-inset-hi),
      0 8px 36px rgba(0, 0, 0, 0.55),
      0 0 28px var(--t1-cyan-glow-faint, rgba(0, 229, 255, 0.05));
  }

  /* Desk play: icone piÃ¹ aria + un filo piÃ¹ grandi */
  .flash-panels--playing .flash-phone-bar__btn:not(.flash-phone-bar__btn--fs) {
    width: 2.95rem;
    height: 2.95rem;
  }

  .flash-panels--playing .flash-phone-bar__btn:not(.flash-phone-bar__btn--fs) svg {
    width: 1.35rem;
    height: 1.35rem;
  }

  .flash-panels--playing .flash-phone-bar__btn:not(.flash-phone-bar__btn--fs):hover,
  .flash-panels--playing .flash-phone-bar__btn:not(.flash-phone-bar__btn--fs):focus-visible,
  .flash-panels--playing .flash-phone-bar__btn--pdf:hover,
  .flash-panels--playing .flash-phone-bar__btn--pdf:focus-visible {
    outline: none;
  }

  .flash-panels--playing .flash-lama {
    padding: 0.35rem 0.5rem 0.3rem;
  }

  .flash-panels--playing .flash-lama__track {
    height: 0.24rem;
  }

  /* SK2: solo size â materia play resta base (ciano inset) */
  .flash-panels--playing .flash-lama__play {
    width: 2.15rem;
    height: 2.15rem;
  }

  .flash-panels--playing .flash-stage__body {
    padding: 0.15rem 0.35rem 0.35rem 0;
  }

  /* Rail Clienti desk â Centro + Nuovo + accordion (stesso padding / gap / icona / titolo) */
  .flash-desk-notify-cta,
  .flash-desk-new-cta,
  .flash-clients-acc:not([hidden]) {
    padding: 0.85rem 0.9rem;
    gap: 0.85rem;
    border-color: var(--flash-edge-soft);
    background: var(--flash-tile-bg);
    backdrop-filter: var(--flash-glass-blur-deep);
    -webkit-backdrop-filter: var(--flash-glass-blur-deep);
    box-shadow: var(--flash-tile-shadow);
  }

  .flash-desk-notify-cta .flash-home-btn__title,
  .flash-desk-new-cta .flash-home-btn__title,
  .flash-clients-acc__label {
    font-size: var(--flash-type-title-size);
    font-weight: var(--flash-type-title-weight);
    letter-spacing: var(--flash-type-title-track);
    color: var(--flash-text-title);
  }

  .flash-desk-notify-cta .flash-home-btn__icon,
  .flash-desk-new-cta .flash-home-btn__icon,
  .flash-clients-acc__icon {
    width: 2.25rem;
    height: 2.25rem;
  }

  .flash-clients {
    border-color: var(--flash-edge-soft);
    background: var(--flash-tile-bg);
    backdrop-filter: var(--flash-glass-blur-deep);
    -webkit-backdrop-filter: var(--flash-glass-blur-deep);
    box-shadow: var(--flash-panel-glass-shadow);
  }

  .flash-clients__head {
    border-bottom: 1px solid color-mix(in srgb, var(--flash-edge-soft) 90%, transparent);
    background: color-mix(in srgb, var(--t1-glass-frost, rgba(255, 255, 255, 0.03)) 65%, transparent);
    box-shadow: var(--flash-inset-hi);
  }

  .flash-clients-search {
    margin-bottom: 0.65rem;
    border-color: var(--flash-edge-soft);
    background: color-mix(in srgb, black 28%, var(--flash-bg-elevated));
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35), var(--flash-inset-hi);
  }

  .flash-clients-list {
    gap: 0.45rem;
  }

  .flash-clients-list__btn {
    border-radius: calc(var(--flash-radius) - 2px);
    border-color: var(--flash-edge-soft);
    background: var(--flash-tile-bg);
    box-shadow: var(--flash-tile-shadow);
    padding: 0.7rem 0.8rem;
    font-size: 0.92rem;
  }

  .flash-clients-list__item.is-selected .flash-clients-list__btn,
  .flash-clients-list__btn:hover,
  .flash-clients-list__btn:focus-visible {
    border-color: color-mix(in srgb, var(--flash-accent) 32%, rgba(255, 255, 255, 0.1));
    background: color-mix(in srgb, var(--flash-accent) 9%, transparent);
  }

  .flash-stage {
    border-color: var(--flash-edge-soft);
    background: color-mix(in srgb, var(--flash-surface) 72%, transparent);
    backdrop-filter: var(--flash-glass-blur);
    -webkit-backdrop-filter: var(--flash-glass-blur);
  }

  .flash-panels--playing .flash-stage {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: transparent;
    box-shadow: none;
  }

  .flash-stage-empty {
    margin: 1.25rem auto 0;
    max-width: 22rem;
    text-align: center;
    padding: 1rem 1.1rem;
    border: 1px solid var(--flash-edge-soft);
    border-radius: var(--flash-radius);
    background: color-mix(in srgb, var(--flash-bg-elevated) 55%, transparent);
    box-shadow: var(--flash-inset-hi);
  }

  .flash-library-list__btn {
    border-color: var(--flash-edge-soft);
    background: color-mix(in srgb, var(--flash-bg-elevated) 50%, transparent);
    box-shadow: var(--flash-inset-hi);
  }
}

/*
 * Touch (phone/tablet): in browse la pagina scorre intera â topbar esce dallo schermo.
 * Non usare il lock desktop â¥768 (prima il brand restava âappiccicatoâ mentre scorrevano i pannelli).
 * Play landscape corto: sotto, media cinema.
 */
@media (hover: none) and (pointer: coarse) {
  html.flash-html:has(body.flash-app:not(:has(.flash-panels--playing))),
  html.flash-html:has(body.flash-app:not(:has(.flash-panels--playing))) body.flash-app {
    height: auto !important;
    max-height: none !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }

  body.flash-app:not(:has(.flash-panels--playing)) {
    height: auto !important;
    min-height: 100dvh;
    overflow: visible !important;
  }

  body.flash-app:not(:has(.flash-panels--playing)) .flash-topbar {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    inset: auto !important;
  }

  body.flash-app:not(:has(.flash-panels--playing)) .flash-main {
    flex: 0 1 auto !important;
    min-height: auto !important;
    height: auto !important;
    overflow: visible !important;
  }

  body.flash-app:not(:has(.flash-panels--playing)) .flash-panels,
  body.flash-app:not(:has(.flash-panels--playing)) .flash-panel,
  body.flash-app:not(:has(.flash-panels--playing)) .flash-panel__body {
    overflow: visible !important;
    min-height: auto;
  }
}

/*
 * Landscape cinema: touch (phone + Mini/Air) â play = layout phone, no scroll.
 * Ex-max-height 520 escludeva Mini (~740â800). Browse: scroll pagina ok.
 */
@media (orientation: landscape) and (pointer: coarse) {
  /* Browse: pagina scorre; main non Ã¨ riquadro */
  html.flash-html:has(body.flash-app:not(:has(.flash-panels--playing))),
  html.flash-html:has(body.flash-app:not(:has(.flash-panels--playing))) body.flash-app {
    height: auto;
    max-height: none;
    overflow-x: hidden;
    overflow-y: auto;
  }

  body.flash-app:not(:has(.flash-panels--playing)) {
    height: auto;
    min-height: 100dvh;
  }

  body.flash-app:not(:has(.flash-panels--playing)) .flash-topbar {
    position: relative;
    flex-shrink: 0;
  }

  body.flash-app:not(:has(.flash-panels--playing)) .flash-main {
    flex: 0 1 auto;
    min-height: auto;
    overflow: visible;
  }

  /* Play: lock allâaltezza *visibile* (visualViewport / svh â barre Chrome + tastiera) */
  html.flash-html:has(body.flash-app .flash-panels--playing),
  html.flash-html:has(body.flash-app .flash-panels--playing) body.flash-app {
    height: 100dvh;
    max-height: 100dvh;
    height: 100svh;
    max-height: 100svh;
    height: var(--flash-vv-h, 100svh);
    max-height: var(--flash-vv-h, 100svh);
    overflow: hidden;
  }

  body.flash-app:has(.flash-panels--playing) {
    height: 100%;
    min-height: 0;
  }

  /* â¤767 play: gear fuori (cinema). â¥768 topbar: gear sempre. */
  @media (max-width: 767px) {
    body.flash-app:has(.flash-panels--playing) .flash-settings-btn {
      display: none !important;
    }
  }

  body.flash-app:has(.flash-panels--playing) .flash-main {
    flex: 1 1 auto;
    min-height: 0;
    padding: 0.35rem 0.5rem;
    overflow: hidden;
  }

  .flash-panels--playing {
    flex: 1 1 auto;
    min-height: 0;
    flex-direction: row !important;
    overflow: hidden;
  }

  .flash-panels--playing .flash-clients,
  .flash-panels--playing .flash-rail {
    display: none !important;
  }

  .flash-panels--playing .flash-stage {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    border: none;
    background: transparent;
    display: flex;
    flex-direction: column;
  }

  .flash-panels--playing .flash-stage__head {
    display: none;
  }

  .flash-panels--playing .flash-stage__body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 0;
  }

  .flash-panels--playing .flash-player {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 0.55rem;
    overflow: hidden;
  }

  .flash-panels--playing .flash-player__back {
    flex-shrink: 0;
    align-self: flex-start;
  }

  .flash-panels--playing .flash-player__stage {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 0.65rem;
    position: relative;
  }

  .flash-panels--playing .flash-player__media {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.3rem;
  }

  /* 16:9 â non stirare in altezza su Mini (viewport piÃ¹ alto del phone) */
  .flash-panels--playing .flash-player__frame {
    flex: 0 1 auto;
    width: 100%;
    min-width: 0;
    min-height: 0;
    aspect-ratio: 16 / 9;
    max-height: 100%;
    height: auto;
  }

  .flash-panels--playing .flash-lama {
    flex-shrink: 0;
  }

  /* Landscape: colonna a dx in flow â segni + PDF; FS player sulla lama */
  .flash-panels--playing .flash-phone-bar:not([hidden]) {
    display: flex;
    position: static;
    transform: none;
    z-index: auto;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    align-self: stretch;
    gap: 0.9rem;
    flex: 0 0 auto;
    margin: 0;
    padding: 0;
    min-height: 0;
    border-radius: 0;
    border: none;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
  }

  .flash-panels--playing .flash-phone-bar__tools {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.65rem;
    flex: 0 0 auto;
  }

  /* Landscape: piÃ¹ piccoli del portrait, allineati (no margin freccia) */
  .flash-panels--playing .flash-phone-bar__btn:not(.flash-phone-bar__btn--fs) {
    width: 2.35rem;
    height: 2.35rem;
    margin-inline-end: 0;
  }

  .flash-panels--playing .flash-phone-bar__btn:not(.flash-phone-bar__btn--fs) svg {
    width: 1.05rem;
    height: 1.05rem;
  }

  /* Default landscape touch (Mini): PDF sotto il trio â non compete col Centro in topbar */
  .flash-panels--playing .flash-phone-bar__btn--pdf:not([hidden]) {
    position: static;
    transform: none;
    margin-top: 0.85rem;
  }

  .flash-sheet:not([hidden]) {
    display: flex;
    position: fixed;
    inset: 0;
    z-index: 80;
    align-items: stretch;
    justify-content: center;
    padding: 0.35rem;
    background: color-mix(in srgb, black 72%, transparent);
  }

  .flash-sheet__card {
    display: flex;
    flex-direction: column;
    width: min(100%, 36rem);
    max-height: 96dvh;
    max-height: 96svh;
    max-height: min(96svh, var(--flash-vv-h, 96svh));
    margin: auto;
    border-radius: var(--flash-radius);
    overflow: hidden;
    /* SK4: vetro layered da token base */
  }

  .flash-sheet__slot {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: var(--flash-pad);
  }

  /*
   * Landscape + tastiera: libera altezza (topbar off, niente min 100dvh).
   * Search / nuovo nome / nota / settings restano usabili nello spazio ridotto.
   */
  body.flash-app:not(:has(.flash-panels--playing)):has(
    input:focus,
    textarea:focus,
    select:focus
  ) {
    min-height: 0 !important;
  }

  body.flash-app:not(:has(.flash-panels--playing)):has(
    input:focus,
    textarea:focus,
    select:focus
  )
    .flash-topbar {
    display: none;
  }

  body.flash-app.flash-sheet-open:has(input:focus, textarea:focus, select:focus)
    .flash-sheet__card {
    max-height: var(--flash-vv-h, 100svh);
    margin-block: 0;
  }
}

/*
 * Phone landscape corto (Chrome+barre / S22): cinema sullâaltezza utile.
 * Topbar off Â· frame guidato dallâaltezza â meno nero ai lati.
 * Soglia 640 + classe .flash-vv-short (visualViewport) per barre Chrome dinamiche.
 * Portrait e Mini alti restano sulle regole landscape generali.
 */
@media (orientation: landscape) and (pointer: coarse) and (max-height: 640px) {
  body.flash-app:has(.flash-panels--playing) .flash-topbar {
    display: none;
  }

  body.flash-app:has(.flash-panels--playing) .flash-main {
    padding: 0.12rem 0.3rem;
  }

  .flash-panels--playing .flash-player {
    gap: 0.2rem;
  }

  .flash-panels--playing .flash-player__stage {
    gap: 0.28rem;
  }

  .flash-panels--playing .flash-player__media {
    justify-content: stretch;
    gap: 0.12rem;
  }

  /* Altezza riempie; larghezza da 16:9 â evita riquadro stretto + pillarbox */
  .flash-panels--playing .flash-player__frame {
    flex: 1 1 auto;
    width: auto;
    max-width: 100%;
    height: 100%;
    min-height: 0;
    aspect-ratio: 16 / 9;
    margin-inline: auto;
  }

  .flash-panels--playing .flash-lama {
    padding: 0.28rem 0.4rem 0.22rem;
    gap: 0.35rem;
  }

  .flash-panels--playing .flash-lama__play {
    width: 1.95rem;
    height: 1.95rem;
  }

  .flash-panels--playing .flash-lama__clock {
    font-size: 0.7rem;
    min-width: 2.2rem;
  }

  .flash-panels--playing .flash-phone-bar:not([hidden]) {
    position: relative;
    gap: 0.4rem;
    padding: 0;
    background: transparent;
    border: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .flash-panels--playing .flash-phone-bar__tools {
    gap: 0.55rem;
  }

  .flash-panels--playing .flash-phone-bar__btn--pdf:not([hidden]) {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: auto;
    transform: translateX(-50%);
    margin-top: 0;
  }

  .flash-panels--playing .flash-phone-bar__btn:not(.flash-phone-bar__btn--fs) {
    width: 2.35rem;
    height: 2.35rem;
  }

  .flash-panels--playing .flash-phone-bar__btn:not(.flash-phone-bar__btn--fs) svg {
    width: 1.05rem;
    height: 1.05rem;
  }
}

/* Stesso cinema corto quando visualViewport â¤640 (Chrome URL bar) anche se CSS max-height mente */
html.flash-vv-short body.flash-app:has(.flash-panels--playing) .flash-topbar {
  display: none;
}

html.flash-vv-short body.flash-app:has(.flash-panels--playing) .flash-main {
  padding: 0.12rem 0.3rem;
}

html.flash-vv-short .flash-panels--playing .flash-player {
  gap: 0.2rem;
}

html.flash-vv-short .flash-panels--playing .flash-player__stage {
  gap: 0.28rem;
}

html.flash-vv-short .flash-panels--playing .flash-player__media {
  justify-content: stretch;
  gap: 0.12rem;
}

html.flash-vv-short .flash-panels--playing .flash-player__frame {
  flex: 1 1 auto;
  width: auto;
  max-width: 100%;
  height: 100%;
  min-height: 0;
  aspect-ratio: 16 / 9;
  margin-inline: auto;
}

html.flash-vv-short .flash-panels--playing .flash-lama {
  padding: 0.28rem 0.4rem 0.22rem;
  gap: 0.35rem;
}

html.flash-vv-short .flash-panels--playing .flash-lama__play {
  width: 1.95rem;
  height: 1.95rem;
}

html.flash-vv-short .flash-panels--playing .flash-lama__clock {
  font-size: 0.7rem;
  min-width: 2.2rem;
}

html.flash-vv-short .flash-panels--playing .flash-phone-bar:not([hidden]) {
  position: relative;
  transform: none;
  right: auto;
  top: auto;
  gap: 0.4rem;
  padding: 0;
  background: transparent;
  border: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

html.flash-vv-short .flash-panels--playing .flash-phone-bar__tools {
  gap: 0.55rem;
}

html.flash-vv-short .flash-panels--playing .flash-phone-bar__btn--pdf:not([hidden]) {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: auto;
  transform: translateX(-50%);
  margin-top: 0;
}

html.flash-vv-short .flash-panels--playing .flash-phone-bar__btn:not(.flash-phone-bar__btn--fs) {
  width: 2.35rem;
  height: 2.35rem;
}

html.flash-vv-short .flash-panels--playing .flash-phone-bar__btn:not(.flash-phone-bar__btn--fs) svg {
  width: 1.05rem;
  height: 1.05rem;
}

/*
 * === Contratto chrome play (tutti i device) â in coda, vince sulle MQ precedenti ===
 *
 * Non-FS: portrait lama+icone sotto; landscape colonna dx / cinema corto.
 * FS cinema (sotto, dopo queste MQ): rail + lama nascoste â solo take + exit FS sul frame.
 */
@media (orientation: portrait) {
  /* Non-FS: colonna classica */
  body.flash-app .flash-panels--playing .flash-player__stage {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.55rem !important;
  }

  /*
   * Portrait FS: stessa colonna del non-FS, cluster centrato.
   * Non stretch-distributivo sullâaltezza: media/frame flex 0 (override base :fullscreen).
   */
  body.flash-app .flash-player__stage:fullscreen,
  body.flash-app .flash-player__stage:-webkit-full-screen,
  body.flash-app.flash-is-fs .flash-panels--playing .flash-player__stage {
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: center !important;
    gap: 0.55rem !important;
  }

  body.flash-app .flash-player__stage:fullscreen .flash-player__media,
  body.flash-app .flash-player__stage:-webkit-full-screen .flash-player__media,
  body.flash-app.flash-is-fs .flash-panels--playing .flash-player__media {
    flex: 0 1 auto !important;
    width: 100% !important;
    min-height: 0 !important;
    justify-content: flex-start !important;
  }

  body.flash-app .flash-player__stage:fullscreen .flash-player__frame,
  body.flash-app .flash-player__stage:-webkit-full-screen .flash-player__frame,
  body.flash-app.flash-is-fs .flash-panels--playing .flash-player__frame {
    flex: 0 1 auto !important;
    width: 100% !important;
    height: auto !important;
    max-height: 100% !important;
  }

  body.flash-app .flash-panels--playing .flash-phone-bar:not([hidden]),
  body.flash-app .flash-player__stage:fullscreen .flash-phone-bar:not([hidden]),
  body.flash-app .flash-player__stage:-webkit-full-screen .flash-phone-bar:not([hidden]),
  body.flash-app.flash-is-fs .flash-panels--playing .flash-phone-bar:not([hidden]) {
    display: flex !important;
    position: static !important;
    transform: none !important;
    inset: auto !important;
    right: auto !important;
    top: auto !important;
    z-index: auto !important;
    flex: 0 0 auto !important;
    flex-direction: column !important;
    align-items: center !important;
    align-self: stretch !important;
    gap: 0.55rem !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: none !important;
  }

  body.flash-app .flash-panels--playing .flash-phone-bar__tools,
  body.flash-app .flash-player__stage:fullscreen .flash-phone-bar__tools,
  body.flash-app .flash-player__stage:-webkit-full-screen .flash-phone-bar__tools,
  body.flash-app.flash-is-fs .flash-panels--playing .flash-phone-bar__tools {
    flex-direction: row !important;
    justify-content: center !important;
    gap: 0.75rem !important;
  }

  body.flash-app .flash-panels--playing .flash-phone-bar__btn--pdf:not([hidden]),
  body.flash-app .flash-player__stage:fullscreen .flash-phone-bar__btn--pdf:not([hidden]),
  body.flash-app .flash-player__stage:-webkit-full-screen .flash-phone-bar__btn--pdf:not([hidden]),
  body.flash-app.flash-is-fs .flash-panels--playing .flash-phone-bar__btn--pdf:not([hidden]) {
    position: static !important;
    transform: none !important;
    margin-top: 0.1rem !important;
  }

  body.flash-app .flash-panels--playing .flash-phone-bar__btn:not(.flash-phone-bar__btn--fs),
  body.flash-app .flash-player__stage:fullscreen .flash-phone-bar__btn:not(.flash-phone-bar__btn--fs),
  body.flash-app.flash-is-fs .flash-panels--playing .flash-phone-bar__btn:not(.flash-phone-bar__btn--fs) {
    width: 3rem !important;
    height: 3rem !important;
  }
}

@media (orientation: landscape) {
  body.flash-app .flash-player__stage:fullscreen,
  body.flash-app .flash-player__stage:-webkit-full-screen,
  body.flash-app.flash-is-fs .flash-panels--playing .flash-player__stage {
    flex-direction: row !important;
    align-items: stretch !important;
    position: relative !important;
  }

  body.flash-app .flash-player__stage:fullscreen .flash-player__media,
  body.flash-app .flash-player__stage:-webkit-full-screen .flash-player__media,
  body.flash-app.flash-is-fs .flash-panels--playing .flash-player__media {
    flex: 1 1 auto !important;
    width: auto !important;
    min-width: 0 !important;
  }

  /* Landscape FS = non-FS: colonna dx in flow (no absolute sul pillarbox) */
  body.flash-app .flash-player__stage:fullscreen .flash-phone-bar:not([hidden]),
  body.flash-app .flash-player__stage:-webkit-full-screen .flash-phone-bar:not([hidden]),
  body.flash-app.flash-is-fs .flash-panels--playing .flash-phone-bar:not([hidden]) {
    display: flex !important;
    position: static !important;
    transform: none !important;
    inset: auto !important;
    right: auto !important;
    top: auto !important;
    z-index: auto !important;
    flex: 0 0 auto !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    align-self: stretch !important;
    gap: 0.55rem !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: none !important;
  }

  body.flash-app .flash-player__stage:fullscreen .flash-phone-bar__tools,
  body.flash-app .flash-player__stage:-webkit-full-screen .flash-phone-bar__tools,
  body.flash-app.flash-is-fs .flash-panels--playing .flash-phone-bar__tools {
    flex-direction: column !important;
    gap: 0.55rem !important;
  }

  body.flash-app .flash-player__stage:fullscreen .flash-phone-bar__btn--pdf:not([hidden]),
  body.flash-app .flash-player__stage:-webkit-full-screen .flash-phone-bar__btn--pdf:not([hidden]),
  body.flash-app.flash-is-fs .flash-panels--playing .flash-phone-bar__btn--pdf:not([hidden]) {
    position: static !important;
    transform: none !important;
    margin: 0 !important;
  }

  body.flash-app .flash-player__stage:fullscreen .flash-phone-bar__btn:not(.flash-phone-bar__btn--fs),
  body.flash-app.flash-is-fs .flash-panels--playing .flash-phone-bar__btn:not(.flash-phone-bar__btn--fs) {
    width: 2.65rem !important;
    height: 2.65rem !important;
  }
}

/*
 * Landscape FS touch:
 * Mini (viewport alto): overlay sul video (cinema pieno).
 * Phone (max-height 500): override sotto â icone in flow, fuori dal take.
 * Desk mouse: flow (blocco landscape sopra).
 */
@media (orientation: landscape) and (pointer: coarse) {
  body.flash-app .flash-player__stage:fullscreen .flash-player__media,
  body.flash-app .flash-player__stage:-webkit-full-screen .flash-player__media,
  body.flash-app.flash-is-fs .flash-panels--playing .flash-player__media {
    flex: 1 1 auto !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  body.flash-app .flash-player__stage:fullscreen .flash-phone-bar:not([hidden]),
  body.flash-app .flash-player__stage:-webkit-full-screen .flash-phone-bar:not([hidden]),
  body.flash-app.flash-is-fs .flash-panels--playing .flash-phone-bar:not([hidden]) {
    display: flex !important;
    position: absolute !important;
    right: var(--flash-fs-bar-right, max(0.75rem, env(safe-area-inset-right, 0px))) !important;
    top: var(--flash-fs-bar-top, 50%) !important;
    bottom: auto !important;
    left: auto !important;
    transform: translateY(-50%) !important;
    z-index: 8 !important;
    flex: none !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    align-self: auto !important;
    gap: 0.4rem !important;
    margin: 0 !important;
    padding: 0.28rem !important;
    border-radius: 12px !important;
    border: 1px solid color-mix(in srgb, white 8%, transparent) !important;
    background: color-mix(in srgb, black 14%, transparent) !important;
    backdrop-filter: blur(5px) !important;
    -webkit-backdrop-filter: blur(5px) !important;
    box-shadow: none !important;
  }

  body.flash-app .flash-player__stage:fullscreen .flash-phone-bar__tools,
  body.flash-app .flash-player__stage:-webkit-full-screen .flash-phone-bar__tools,
  body.flash-app.flash-is-fs .flash-panels--playing .flash-phone-bar__tools {
    flex-direction: column !important;
    gap: 0.4rem !important;
  }

  body.flash-app .flash-player__stage:fullscreen .flash-phone-bar__btn:not(.flash-phone-bar__btn--fs),
  body.flash-app.flash-is-fs .flash-panels--playing .flash-phone-bar__btn:not(.flash-phone-bar__btn--fs) {
    width: 2.65rem !important;
    height: 2.65rem !important;
  }
}

/* Sheet dentro lo stage FS â altrimenti resta sotto il top-layer Fullscreen API */
.flash-player__stage:fullscreen > .flash-sheet:not([hidden]),
.flash-player__stage:-webkit-full-screen > .flash-sheet:not([hidden]),
.flash-sheet.flash-sheet--in-fs:not([hidden]) {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 0.35rem;
  box-sizing: border-box;
  background: color-mix(in srgb, black 72%, transparent);
}

/*
 * Phone landscape FS: frame 16:9 a proporzioni giuste;
 * lama sotto + icone a dx â tutto FUORI dal take (come non-FS).
 * Mini (>500px) tiene overlay icone sopra.
 */
@media (orientation: landscape) and (pointer: coarse) and (max-height: 500px) {
  body.flash-app .flash-player__stage:fullscreen,
  body.flash-app .flash-player__stage:-webkit-full-screen,
  body.flash-app.flash-is-fs .flash-panels--playing .flash-player__stage {
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.35rem !important;
  }

  body.flash-app .flash-player__stage:fullscreen .flash-player__media,
  body.flash-app .flash-player__stage:-webkit-full-screen .flash-player__media,
  body.flash-app.flash-is-fs .flash-panels--playing .flash-player__media {
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto !important;
    width: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-height: 100% !important;
    justify-content: center !important;
    gap: 0.28rem !important;
  }

  /* Frame: altezza libera per la lama sotto â no height 100% / no overlay */
  body.flash-app .flash-player__stage:fullscreen .flash-player__frame,
  body.flash-app .flash-player__stage:-webkit-full-screen .flash-player__frame,
  body.flash-app.flash-is-fs .flash-panels--playing .flash-player__frame {
    flex: 0 1 auto !important;
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: calc(100% - 2.75rem) !important;
    aspect-ratio: 16 / 9 !important;
    margin-inline: auto !important;
  }

  body.flash-app .flash-player__stage:fullscreen .flash-lama,
  body.flash-app .flash-player__stage:-webkit-full-screen .flash-lama,
  body.flash-app.flash-is-fs .flash-panels--playing .flash-lama {
    position: static !important;
    inset: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    z-index: auto !important;
    flex: 0 0 auto !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0.2rem 0.35rem !important;
    background: color-mix(in srgb, black 14%, transparent) !important;
    border-radius: 8px !important;
    box-sizing: border-box !important;
  }

  /* Colonna icone a dx, fuori dal video */
  body.flash-app .flash-player__stage:fullscreen .flash-phone-bar:not([hidden]),
  body.flash-app .flash-player__stage:-webkit-full-screen .flash-phone-bar:not([hidden]),
  body.flash-app.flash-is-fs .flash-panels--playing .flash-phone-bar:not([hidden]) {
    display: flex !important;
    position: static !important;
    transform: none !important;
    inset: auto !important;
    right: auto !important;
    top: auto !important;
    z-index: auto !important;
    flex: 0 0 auto !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    align-self: center !important;
    gap: 0.4rem !important;
    margin: 0 0.1rem !important;
    padding: 0.35rem !important;
    border-radius: 14px !important;
    border: 1px solid color-mix(in srgb, white 9%, transparent) !important;
    /* Velo leggero sul nero â meno evidente */
    background: color-mix(in srgb, white 6%, transparent) !important;
    backdrop-filter: blur(6px) !important;
    -webkit-backdrop-filter: blur(6px) !important;
    box-shadow: inset 0 1px 0 color-mix(in srgb, white 7%, transparent) !important;
  }

  body.flash-app .flash-player__stage:fullscreen .flash-phone-bar__tools,
  body.flash-app .flash-player__stage:-webkit-full-screen .flash-phone-bar__tools,
  body.flash-app.flash-is-fs .flash-panels--playing .flash-phone-bar__tools {
    flex-direction: column !important;
    gap: 0.4rem !important;
  }

  body.flash-app .flash-player__stage:fullscreen .flash-phone-bar__btn:not(.flash-phone-bar__btn--fs),
  body.flash-app.flash-is-fs .flash-panels--playing .flash-phone-bar__btn:not(.flash-phone-bar__btn--fs) {
    width: 2.75rem !important;
    height: 2.75rem !important;
  }

  body.flash-app .flash-player__stage:fullscreen .flash-phone-bar__btn:not(.flash-phone-bar__btn--fs) svg,
  body.flash-app.flash-is-fs .flash-panels--playing .flash-phone-bar__btn:not(.flash-phone-bar__btn--fs) svg {
    width: 1.3rem !important;
    height: 1.3rem !important;
  }

  body.flash-app .flash-player__stage:fullscreen .flash-lama__play,
  body.flash-app .flash-player__stage:-webkit-full-screen .flash-lama__play,
  body.flash-app.flash-is-fs .flash-panels--playing .flash-lama__play {
    width: 2.25rem !important;
    height: 2.25rem !important;
  }

  body.flash-app .flash-player__stage:fullscreen .flash-lama__play svg,
  body.flash-app.flash-is-fs .flash-panels--playing .flash-lama__play svg {
    width: 1.1rem !important;
    height: 1.1rem !important;
  }
}

/*
 * FS cinema â take puro: nascondi rail; lama solo con .is-fs-chrome (tap).
 * :not([hidden]) obbligatorio â altrimenti perde vs display:flex !important delle MQ sopra.
 */
body.flash-app .flash-player__stage:fullscreen .flash-phone-bar:not([hidden]),
body.flash-app .flash-player__stage:-webkit-full-screen .flash-phone-bar:not([hidden]),
body.flash-app.flash-is-fs .flash-panels--playing .flash-phone-bar:not([hidden]) {
  display: none !important;
}

body.flash-app .flash-player__stage:fullscreen .flash-lama:not([hidden]):not(.is-fs-chrome),
body.flash-app .flash-player__stage:-webkit-full-screen .flash-lama:not([hidden]):not(.is-fs-chrome),
body.flash-app.flash-is-fs .flash-panels--playing .flash-lama:not([hidden]):not(.is-fs-chrome),
body.flash-app .flash-player__stage:fullscreen .flash-lama:not(.is-fs-chrome),
body.flash-app .flash-player__stage:-webkit-full-screen .flash-lama:not(.is-fs-chrome),
body.flash-app.flash-is-fs .flash-panels--playing .flash-lama:not(.is-fs-chrome) {
  display: none !important;
}

/* Lama on-tap in FS: overlay semitrasparente in basso sul media (= bordo video) */
body.flash-app .flash-player__stage:fullscreen .flash-player__media,
body.flash-app .flash-player__stage:-webkit-full-screen .flash-player__media,
body.flash-app.flash-is-fs .flash-panels--playing .flash-player__media {
  position: relative !important;
  /* Non stirare a tutta altezza stage â altrimenti bottom lama â  bordo video */
  flex: 0 1 auto !important;
  width: auto !important;
  max-width: 100% !important;
  max-height: 100% !important;
  height: auto !important;
  align-self: center !important;
  justify-content: center !important;
  gap: 0 !important;
}

body.flash-app .flash-player__stage:fullscreen .flash-lama.is-fs-chrome:not([hidden]),
body.flash-app .flash-player__stage:-webkit-full-screen .flash-lama.is-fs-chrome:not([hidden]),
body.flash-app.flash-is-fs .flash-panels--playing .flash-lama.is-fs-chrome:not([hidden]) {
  display: flex !important;
  position: absolute !important;
  top: auto !important;
  left: max(0.4rem, env(safe-area-inset-left, 0px)) !important;
  right: max(0.4rem, env(safe-area-inset-right, 0px)) !important;
  bottom: max(0.45rem, env(safe-area-inset-bottom, 0px)) !important;
  transform: none !important;
  z-index: 5;
  flex: 0 0 auto !important;
  align-self: flex-end !important;
  width: auto !important;
  max-width: calc(100% - 0.8rem) !important;
  margin: 0 !important;
  padding: 0.35rem 0.55rem !important;
  border-radius: 10px !important;
  border: 1px solid color-mix(in srgb, white 10%, transparent) !important;
  background: color-mix(in srgb, black 48%, transparent) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35) !important;
  box-sizing: border-box !important;
}

body.flash-app .flash-player__stage:fullscreen .flash-companion-chip:not([hidden]),
body.flash-app .flash-player__stage:-webkit-full-screen .flash-companion-chip:not([hidden]),
body.flash-app.flash-is-fs .flash-panels--playing .flash-companion-chip:not([hidden]),
body.flash-app .flash-player__stage:fullscreen .flash-companion-chip,
body.flash-app .flash-player__stage:-webkit-full-screen .flash-companion-chip,
body.flash-app.flash-is-fs .flash-panels--playing .flash-companion-chip {
  display: none !important;
}

body.flash-app .flash-player__stage:fullscreen .flash-player__frame,
body.flash-app .flash-player__stage:-webkit-full-screen .flash-player__frame,
body.flash-app.flash-is-fs .flash-panels--playing .flash-player__frame {
  flex: 1 1 auto !important;
  width: auto !important;
  max-width: 100% !important;
  height: auto !important;
  max-height: 100% !important;
  aspect-ratio: 16 / 9 !important;
  margin-inline: auto !important;
}

/* Exit FS: bottone resta sulla lama (.flash-lama__fs) — chrome on-tap .is-fs-chrome */

/*
 * COACH-UHD-READABILITY S4c — Flash topbar @4K (ex 34px chrome / topbar ~3.25rem).
 * Stessa gate densita coach; phone/Mini non match.
 */
@media (min-width: 2400px) and (min-height: 1200px) and (hover: hover) and (pointer: fine) {
  :root {
    --flash-topbar-h: clamp(3.75rem, 5vh, 4.5rem);
    --flash-pad: clamp(1.25rem, 2vw, 2rem);
    --flash-gap: clamp(1rem, 1.5vw, 1.5rem);
    --flash-type-brand-size: clamp(1.15rem, 1.4vw, 1.4rem);
    --flash-type-title-size: clamp(1.12rem, 1.35vw, 1.32rem);
    --flash-type-body: 1.1rem;
    --flash-type-muted-size: 0.95rem;
    --flash-type-cta-size: 1.05rem;
    --flash-type-eyebrow-size: 0.82rem;
  }

  .flash-brand__mark {
    width: 36px;
  }

  .flash-topbar__end {
    gap: 0.75rem;
  }

  .flash-studio-cta {
    height: clamp(48px, 1.4vw, 60px);
    padding: 0 14px;
    gap: 8px;
    font-size: clamp(0.88rem, 0.8rem + 0.22vw, 1.05rem);
    border-radius: 12px;
  }

  .flash-studio-cta svg {
    width: 20px;
    height: 20px;
  }

  .flash-settings-btn,
  .flash-fs-browser {
    width: clamp(48px, 1.4vw, 60px);
    height: clamp(48px, 1.4vw, 60px);
    border-radius: 12px;
  }

  .flash-settings-btn svg,
  .flash-fs-browser svg {
    width: 24px;
    height: 24px;
  }
}
