:root {
  color-scheme: dark;
  --background: #090911;
  --surface: #141424;
  --text: #f3f2ff;
  --secondary: #bcbcd6;
  --line: #41435e;
  --accent: #b6adff;
  --focus: #9ad4ff;
  --glow-violet: #2b2448;
  --glow-blue: #172a40;
  font: 16px/1.55 Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(ellipse at 76% 0, var(--glow-violet) 0, transparent 55%),
    radial-gradient(ellipse at 5% 28%, var(--glow-blue) 0, transparent 54%),
    var(--background);
}

header, main { position: relative; margin-inline: auto; }
header {
  max-width: 820px;
  padding: 22px 24px;
  display: flex;
  align-items: center;
  gap: 13px;
  border-bottom: 1px solid var(--line);
}
.wordmark {
  font: 700 1.5rem/1 ui-monospace, Menlo, Consolas, monospace;
  text-transform: uppercase;
  letter-spacing: .26em;
}
main { max-width: 690px; padding: clamp(30px, 8vw, 70px) 24px 48px; }
section { animation: appear .26s ease-out; }
@keyframes appear {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
h1 {
  font-size: clamp(2rem, 6.5vw, 3.5rem);
  line-height: 1.08;
  letter-spacing: -.045em;
  margin: 12px 0 20px;
  overflow-wrap: anywhere;
}
p, output { color: var(--secondary); }
button, a.download {
  font: inherit;
  font-weight: 700;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 50px;
  padding: 12px 17px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: background-color .15s, border-color .15s;
}
button.primary, a.download, .timeline button[aria-pressed=true] {
  background: var(--accent);
  color: #13102a;
  border-color: var(--accent);
}
button:disabled { opacity: .55; cursor: default; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
@media (hover: hover) {
  button:hover:not(:disabled), a.download:hover { border-color: var(--focus); }
  button.primary:hover:not(:disabled), a.download:hover { background: #cbc4ff; }
}
@media (prefers-reduced-motion: reduce) {
  section { animation: none; }
  button, a.download { transition: none; }
}
.stack { display: grid; gap: 12px; margin-top: 24px; }
.card {
  text-align: left;
  padding: 19px 18px;
  border-left: 3px solid #8f87ef;
  background: linear-gradient(110deg, #1b1b31, var(--surface));
  overflow-wrap: anywhere;
}
.card span { display: block; font-size: .9375rem; font-weight: 400; color: var(--secondary); margin-top: 4px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
textarea, input[type=text] {
  width: 100%;
  background: #10101d;
  color: inherit;
  border: 1px solid #666987;
  border-radius: 8px;
  padding: 12px;
  font: inherit;
}
textarea { min-height: 115px; }
textarea::placeholder { color: #a3a4c1; }
video {
  display: block;
  background: #06060d;
  border: 1px solid var(--line);
  width: 100%;
  max-height: 44vh;
  border-radius: 10px;
  margin-top: 18px;
}
progress { width: 100%; }
progress, input { accent-color: var(--accent); }
.hint { padding: 13px 16px; border-left: 3px solid var(--focus); border-radius: 8px; background: #1b2340; }
output { display: block; margin-top: 14px; }
label { display: block; font-weight: 700; margin-bottom: 7px; }
fieldset { min-width: 0; margin: 18px 0 0; padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: #11111e; }
legend { padding: 0 6px; font-weight: 700; }
.timeline-time { display: flex; justify-content: space-between; color: var(--secondary); }
.timeline-grid {
  display: grid; grid-template-columns: 3.8rem minmax(0, 1fr); align-items: center;
  gap: 6px; position: relative; margin-top: 8px;
}
.timeline-grid::after {
  content: ""; position: absolute; inset: 0 0 0 calc(3.8rem + 6px); pointer-events: none;
  background: linear-gradient(#fff, #fff) var(--playhead, 0%) center / 1px 100% no-repeat;
}
.timeline-track {
  position: relative; height: 46px; border-radius: 6px;
  background: repeating-linear-gradient(90deg, #ffffff16 0 1px, transparent 1px 25%), #080812;
}
.timeline-track button {
  position: absolute; top: 0; min-height: 0; height: 100%; padding: 0 5px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .875rem;
  border-radius: 5px; background: #252540;
}
.timeline-track button[aria-pressed=true] { background: var(--accent); color: #13102a; }
#music-track button { background: #234562; }
#text-track button { background: #49326b; }
fieldset input[type=range] { display: block; width: 100%; height: 34px; margin: 0; }
fieldset input[type=text] { margin-bottom: 9px; }
#clip-preview { max-height: 36vh; }

select {
  max-width: 100%;
  min-height: 46px;
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
}
#business-form textarea { margin-bottom: 12px; }

.entry, .home { padding-top: clamp(14px, 8vw, 64px); }
.entry h1, .home h1 { margin-bottom: 26px; }
header { z-index: 3; }
.account-wrap { margin-left: auto; position: relative; }
#account {
  display: grid; place-items: center; padding: 0; width: 44px; min-height: 44px;
  border-radius: 15px; background: var(--surface); color: var(--focus);
}
#account-menu {
  position: absolute; right: 0; top: calc(100% + 9px); width: min(250px,calc(100vw - 48px));
  padding: 7px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface);
  box-shadow: 0 15px 40px #08081940; animation: appear .15s ease-out;
}
.menu-title { margin: 3px 8px 5px; padding: 6px; font-size: .875rem; overflow-wrap: anywhere; }
#account-menu button {
  width: 100%; min-height: 44px; text-align: left; padding: 8px 12px; border-color: transparent;
}
#account-menu button:hover, #account-menu button:focus-visible { border-color: var(--focus); }
.settings-toggle { margin-top: 15px; }
.account-name { color: var(--accent); margin: 0; }
.composer {
  display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: end; gap: 8px;
  padding: 10px; border: 1px solid #666987; border-radius: 14px; background: #10101d;
}
.composer:focus-within { border-color: var(--focus); }
.composer textarea { border: 0; min-height: 80px; padding: 8px; resize: vertical; }
#dictate { width: 46px; min-height: 46px; padding: 0; color: var(--accent); }
#dictate[aria-pressed=true] { background: var(--accent); color: #13102a; }
.mic-icon { display: inline-block; width: 10px; height: 16px; border: 2px solid; border-radius: 6px; position: relative; }
.mic-icon::after {
  content: ""; position: absolute; left: -5px; bottom: -5px; width: 12px; height: 9px;
  border: 2px solid; border-top: none; border-radius: 0 0 9px 9px;
}
.home-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.home-actions button { font-size: .875rem; min-height: 44px; }
.home-projects { margin-top: 28px; border-top: 1px solid var(--line); padding-top: 18px; }
#dictation-status:empty { display: none; }
.project-card { border: 1px solid var(--line); padding: 16px; border-radius: 10px; background: var(--surface); }
.project-card h2 { margin: 0; font-size: 1.125rem; overflow-wrap: anywhere; }

#brand {
  display: inline-flex; align-items: center; gap: 10px; padding: 0;
  min-height: 44px; border: 0; background: transparent;
}
#brand svg { color: var(--focus); }
.screen-nav { max-width: 820px; margin: 0 auto; padding-inline: 24px; position: relative; }
#screen-back { margin-top: 14px; min-height: 44px; background: transparent; }
#screen-back::before { content: '←'; margin-right: 9px; color: var(--focus); }
.entry-options { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.entry-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 12px;
  padding: clamp(12px,3vw,24px); text-align: left; border-radius: 18px;
  background: linear-gradient(145deg,#172c44,#111524);
}
.entry-card:nth-child(2) { background: linear-gradient(145deg,#322654,#171327); }
.entry-card strong { line-height: 1.2; font-size: clamp(1rem,3.5vw,1.3rem); }
.entry-card > span:last-child { color: var(--secondary); font-size: .875rem; font-weight: 400; }
.entry-icon { color: #a5d8ff; }
.entry-card:nth-child(2) .entry-icon { color: #c8baff; }
.entry-icon svg { width: 44px; height: 44px; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.home .composer { background: #16162a; border-color: #8d81da; }
.home .composer textarea { background: transparent; }
.home-actions button:not(.primary) { background: transparent; }
.home-projects button { border-color: transparent; background: transparent; padding-left: 0; color: var(--focus); }

.home .composer { grid-template-columns: minmax(0,1fr) auto auto; }
.home .composer textarea { grid-column: 1 / -1; }
.home #dictate { grid-column: 2; }
.home .composer button[type=submit] { min-height: 46px; }
.edit-options { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; }
#music-style { margin-bottom: 12px; }

:root[data-theme=light] {
  color-scheme: light;
  --background: #f5f4fb;
  --surface: #fff;
  --text: #201a35;
  --secondary: #514a66;
  --line: #b1a8c7;
  --accent: #c2b7ff;
  --focus: #413995;
  --glow-violet: #e7dfff;
  --glow-blue: #deefff;
}
[data-theme=light] :is(textarea,input[type=text],fieldset,.card,.home .composer) { background: #fff; }
[data-theme=light] .home .composer textarea { background: transparent; }
[data-theme=light] textarea::placeholder { color: #625b74; }
[data-theme=light] .hint { background: #eae7ff; }
[data-theme=light] .entry-card { background: linear-gradient(145deg,#e4f3ff,#fff); }
[data-theme=light] .entry-card:nth-child(2) { background: linear-gradient(145deg,#eee7ff,#fff); }
[data-theme=light] .entry-icon, [data-theme=light] .entry-card:nth-child(2) .entry-icon { color: var(--focus); }
[data-theme=light] .timeline-track button { color: #fff; }
[data-theme=light] .timeline-track button[aria-pressed=true] { color: #13102a; }
[data-theme=light] :is(.account-name,#dictate) { color: var(--focus); }
@media (hover: hover) {
  :root button:hover:not(:disabled), :root a.download:hover { box-shadow: 0 0 16px color-mix(in srgb,var(--focus) 24%,transparent); }
}
[data-motion=off] *, [data-motion=off] *::before, [data-motion=off] *::after { animation: none !important; transition: none !important; }
@media (prefers-reduced-motion: reduce) { #account-menu { animation: none; } }

.reference-facts { display: flex; flex-wrap: wrap; gap: 8px; }
.reference-facts span {
  background: var(--surface); border: 1px solid var(--line); color: var(--secondary);
  padding: 5px 10px; border-radius: 20px; font-size: .875rem;
}
.reference-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,230px),1fr)); gap: 10px; margin-top: 18px; }
.reference-card h3, #reference-proposal h3 { margin: 0; font-size: 1.05rem; }
.reference-card p { margin-bottom: 0; }
.reference-idea { margin-top: 28px; padding-top: 12px; border-top: 1px solid var(--line); }
#reference-proposal { margin-top: 14px; }
#adapt-reference output:empty { display: none; }

.shoot-how { margin: 16px 0; padding: 14px 16px; border-left: 3px solid var(--focus); background: var(--surface); border-radius: 8px; }
.shoot-how h2 { font-size: .95rem; margin: 0 0 5px; }
.shoot-how p { margin: 0; }
.shoot-how .shoot-duration { margin-top: 8px; font-size: .875rem; }
.shoot-diagram { margin: 14px 0 0; border: 1px solid var(--line); background: var(--surface); border-radius: 12px; overflow: hidden; }
.shoot-diagram canvas { display: block; width: 100%; height: auto; }
.shoot-diagram figcaption { padding: 10px 13px; color: var(--secondary); }

body {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}
body > header,
body > .screen-nav,
body > main {
  width: 100%;
}
.site-footer {
  width: min(100%, 820px);
  margin: auto auto 0;
  padding: 16px 24px max(16px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 20px;
  color: var(--secondary);
}
.site-footer small { font-size: .875rem; }
.site-support {
  min-height: 44px;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  color: var(--accent);
  font-size: .875rem;
  text-underline-offset: 4px;
}
.site-support:hover { color: var(--focus); }
.site-support:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }

.zion-launch {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  pointer-events: none;
  color: #f3f2ff;
  background: radial-gradient(ellipse at center, #21203b 0%, #090911 67%);
  animation: zion-launch-exit 1.45s ease both;
}
.zion-launch-lockup {
  display: grid;
  justify-items: center;
  gap: 18px;
}
.zion-launch-lockup svg {
  width: 92px;
  height: 92px;
  filter: drop-shadow(0 0 22px #8c96ff72);
  animation: zion-launch-mark .78s cubic-bezier(.18,.8,.28,1) both;
}
.zion-launch-lockup .wordmark {
  font-size: clamp(2.25rem, 9vw, 3.5rem);
  letter-spacing: .12em;
  animation: zion-launch-type .64s .17s ease-out both;
}
@keyframes zion-launch-mark {
  from { opacity: 0; transform: translateY(14px) rotate(-18deg) scale(.72); }
  to { opacity: 1; transform: translateY(0) rotate(0) scale(1); }
}
@keyframes zion-launch-type {
  from { opacity: 0; transform: translateY(9px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes zion-launch-exit {
  0%, 70% { opacity: 1; visibility: visible; }
  100% { opacity: 0; visibility: hidden; }
}
[data-motion=off] .zion-launch,
body:has(:focus-visible) .zion-launch { display: none; }
@media (prefers-reduced-motion: reduce) {
  .zion-launch { display: none; }
}

.shoot-script { margin-block: 14px; }
.shoot-script summary { cursor: pointer; font-weight: 700; }
.shoot-script p { white-space: pre-wrap; }
#script-result { margin-block: 16px; }
#talk-script { resize: vertical; }
#event-list li { margin-block: 4px; }

.tutorial-list { padding-inline-start: 24px; }
.tutorial-list li { margin-block: 14px; }
.tutorial-list li p { margin-top: 4px; }
.camera-coach { position: relative; overflow: hidden; border-radius: 12px; }
.camera-coach video { display: block; width: 100%; margin: 0; }
.camera-grid {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to right, transparent 33%, #fff6 33%, #fff6 33.4%, transparent 33.4%, transparent 66%, #fff6 66%, #fff6 66.4%, transparent 66.4%),
    linear-gradient(to bottom, transparent 33%, #fff6 33%, #fff6 33.4%, transparent 33.4%, transparent 66%, #fff6 66%, #fff6 66.4%, transparent 66.4%);
}
.camera-cue, .take-clock {
  position: absolute; margin: 0; z-index: 1; color: white; background: #101024dd;
  border-radius: 7px; padding: 6px 10px; font-size: .875rem; pointer-events: none;
}
.camera-cue { bottom: 10px; left: 10px; right: 10px; }
.take-clock { top: 10px; right: 10px; font-variant-numeric: tabular-nums; }

.subject-outline { position: absolute; inset: 0; pointer-events: none; }
.subject-outline i,.subject-outline b {
  position:absolute; left:50%; transform:translateX(-50%);
  border: 2px dashed #e5fbff; filter: drop-shadow(0 1px 3px #050510);
}
.subject-outline i { top:16%; width:26%; height:36%; border-radius:50%; }
.subject-outline b { top:54%; width:54%; height:30%; border-radius:50% 50% 0 0; border-bottom:0; }
.subject-outline.face-close i { top:11%; width:44%; height:64%; }
.subject-outline.body-outline i { top:10%; width:13%; height:16%; }
.subject-outline.body-outline b { top:28%; width:27%; height:55%; border-radius:42% 42% 22% 22%; border-bottom:2px dashed #e5fbff; }

.field-dictation { display:flex; gap:10px; align-items:center; margin:4px 0 12px; }
.field-dictation button { min-height:36px; padding:4px 10px; }
.field-dictation span { color:var(--secondary); font-size:.875rem; }

.safe-guide { position:absolute; inset:0; pointer-events:none; background:linear-gradient(to top,#0d112087 0 17%,transparent 17%),linear-gradient(to left,#0d112087 0 13%,transparent 13%); }

.production-options { display:grid; gap:10px; }
.production-options button { min-height:48px; text-align:left; }
.field-dictation button { min-width:44px; min-height:44px; display:inline-grid; place-items:center; }
.site-footer nav { display:flex; gap:14px; }

.capture-desk {
  border:1px solid var(--line); border-radius:14px; overflow:hidden;
  background:var(--surface); margin-block:12px;
}
.capture-desk .camera-coach { border-radius:0; }
.capture-desk video { max-height:56dvh; object-fit:contain; background:#080910; }
.capture-signals { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; margin:0; padding:12px; }
.capture-signals div { min-width:0; }
.capture-signals dt { color:var(--secondary); font-size:.875rem; }
.capture-signals dd { margin:0; font-size:.875rem; font-weight:700; overflow-wrap:anywhere; }
.capture-signals .capture-warn { color:var(--text); text-decoration:underline; text-decoration-color:#e5a640; text-underline-offset:4px; }
#capture-level { display:block; width:calc(100% - 24px); margin:0 12px 10px; }
.capture-alert { margin:0; padding:8px 12px; border-top:1px solid var(--line); font-size:.875rem; }
.capture-tools { margin-block:12px; }
.capture-actions { position:sticky; bottom:0; z-index:5; padding:8px 0 max(8px,env(safe-area-inset-bottom)); background:var(--background); }
.capture-actions #record { min-height:48px; }

.capture-desk .camera-coach { margin-inline:auto; background:#080910; }
.capture-desk .camera-coach[data-format=portrait] { width:min(100%,31.5dvh); }
.capture-desk .camera-coach video { max-height:none; }
.capture-desk .camera-coach[data-format=portrait] video { aspect-ratio:9/16; }
.capture-desk .camera-coach[data-format=landscape] video { aspect-ratio:16/9; }

.subject-outline[data-alignment=ok] :is(i,b) { border-color:#46e69f; }
.subject-outline[data-alignment=off] :is(i,b) { border-color:#ff6577; }
.face-indicator { display:block; padding:0 12px 10px; font-size:.875rem; }
.face-indicator[data-alignment=ok] { color:#46c790; }
.face-indicator[data-alignment=off] { color:#ec697a; }
#capture-level::-webkit-meter-optimum-value { background:#46c790; }
#capture-level[data-level=high]::-webkit-meter-optimum-value { background:#ea616c; }
#capture-level[data-level=low]::-webkit-meter-optimum-value { background:#e8ac57; }
#capture-level::-moz-meter-bar { background:#46c790; }
#capture-level[data-level=high]::-moz-meter-bar { background:#ea616c; }
.needs-file { outline: 2px solid var(--focus); outline-offset: 4px; border-radius: 8px; }
.montage-beta { margin-top: 20px; }
.montage-beta summary { cursor: pointer; color: var(--secondary); }

/* ───────── Montaggio: preparazione ───────── */
.montage-prep { text-align: center; padding-top: 12px; }
.prep-orb { position: relative; width: 120px; height: 120px; margin: 0 auto 26px; }
.prep-orb i { position: absolute; inset: 0; border-radius: 50%; border: 2px solid transparent; border-top-color: #8edaff; border-right-color: #a898ff; animation: prep-spin 1.6s linear infinite; }
.prep-orb i:nth-child(2) { inset: 16px; animation-duration: 2.3s; animation-direction: reverse; border-top-color: #a898ff; border-right-color: #ff9bd2; }
.prep-orb i:nth-child(3) { inset: 34px; background: radial-gradient(circle, #a898ff55, transparent 70%); border: 0; animation: prep-pulse 1.2s ease-in-out infinite alternate; }
@keyframes prep-spin { to { transform: rotate(360deg); } }
@keyframes prep-pulse { from { transform: scale(.8); opacity: .5; } to { transform: scale(1.1); opacity: 1; } }
.prep-steps { list-style: none; padding: 0; margin: 26px auto 0; max-width: 360px; text-align: left; display: grid; gap: 12px; }
.prep-steps li { color: #6d6f8f; padding-left: 30px; position: relative; transition: color .3s; }
.prep-steps li::before { content: ''; position: absolute; left: 4px; top: .45em; width: 12px; height: 12px; border-radius: 50%; border: 2px solid currentColor; }
.prep-steps li[data-state=active] { color: var(--text); }
.prep-steps li[data-state=active]::before { border-color: #8edaff; box-shadow: 0 0 12px #8edaff; animation: prep-pulse .8s ease-in-out infinite alternate; }
.prep-steps li[data-state=done] { color: var(--secondary); }
.prep-steps li[data-state=done]::before { background: #46c790; border-color: #46c790; }

/* ───────── Studio ───────── */
main:has(.studio) { max-width: 760px; padding-top: 18px; padding-inline: 14px; }
.studio-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.studio-top h1 { font-size: clamp(1.25rem, 5vw, 1.7rem); margin: 0; line-height: 1.2; }
.studio-kicker { margin: 0 0 2px; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; background: linear-gradient(90deg,#8edaff,#a898ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.studio-top .primary { border-radius: 999px; padding-inline: 22px; box-shadow: 0 6px 24px #a898ff55; }
.studio-stage { position: relative; margin: 0 auto; border-radius: 18px; overflow: hidden; background: #000; box-shadow: 0 20px 60px #000a, 0 0 0 1px #ffffff14; }
.studio-stage[data-orientation=portrait] { width: min(100%, 46dvh); aspect-ratio: 9 / 16; }
.studio-stage[data-orientation=landscape] { width: 100%; aspect-ratio: 16 / 9; }
.studio-stage canvas { display: block; width: 100%; height: 100%; cursor: pointer; }
.studio-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; padding: 0; background: #0009; border: 1px solid #fff4; color: #fff; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); transition: opacity .25s, transform .25s; }
.studio-play[data-playing=true] { opacity: 0; transform: translate(-50%,-50%) scale(.85); }
.studio-stage:hover .studio-play[data-playing=true] { opacity: .85; }
.studio-time { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; margin: 12px auto 6px; max-width: 520px; font-variant-numeric: tabular-nums; color: var(--secondary); font-size: .875rem; }
.studio-time input { width: 100%; accent-color: #a898ff; margin: 0; }
.studio-looks { display: flex; gap: 8px; overflow-x: auto; padding: 10px 2px 4px; scrollbar-width: none; }
.studio-looks::-webkit-scrollbar { display: none; }
.look-chip { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; padding: 8px 14px 8px 8px; border-radius: 999px; min-height: 44px; font-size: .92rem; }
.look-chip[aria-checked=true] { border-color: #a898ff; background: #a898ff22; box-shadow: inset 0 0 0 1px #a898ff; }
.look-swatch { width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; }
.remix-icon { background: var(--surface); border: 1px solid var(--line); font-size: 1rem; }
.studio-hint { font-size: .85rem; margin: 6px 2px 10px; }
.studio-strip { display: flex; align-items: stretch; gap: 0; overflow-x: auto; padding: 6px 2px 12px; scroll-snap-type: x proximity; }
.strip-clip { position: relative; flex: 0 0 auto; height: 86px; padding: 0; border-radius: 10px; background: #1c1d33 center / cover no-repeat; border: 2px solid transparent; overflow: hidden; scroll-snap-align: center; }
.strip-clip::after { content: ''; position: absolute; inset: 0; background: linear-gradient(#0000 40%, #000c); }
.strip-clip.selected { border-color: #8edaff; box-shadow: 0 0 0 3px #8edaff33; }
.strip-clip.playing { border-color: #a898ff; }
.strip-badge, .strip-length { position: absolute; left: 6px; z-index: 1; font-size: .68rem; line-height: 1.2; color: #fff; }
.strip-badge { bottom: 20px; font-weight: 700; }
.strip-length { bottom: 5px; color: #d6d6ee; font-weight: 400; }
.strip-transition { flex: 0 0 auto; align-self: center; width: 26px; height: 26px; min-height: 0; margin: 0 3px; padding: 0; border-radius: 8px; transform: rotate(45deg); background: var(--surface); border: 1px solid var(--line); }
.strip-transition:not([data-type=cut]) { background: linear-gradient(135deg,#8edaff,#a898ff); border-color: transparent; }
.studio-tabs { display: grid; grid-template-columns: repeat(3,1fr); gap: 4px; padding: 4px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.studio-tabs button { border: 0; background: transparent; min-height: 40px; border-radius: 10px; }
.studio-tabs button[aria-selected=true] { background: #a898ff; color: #13102a; }
.studio-panel { padding: 16px 4px 6px; min-height: 180px; }
.studio-panel h2 { font-size: 1rem; margin: 0 0 10px; }
.studio-panel label { display: block; margin-top: 10px; }
.studio-panel input[type=range] { width: 100%; accent-color: #8edaff; }
.studio-panel select { width: 100%; margin-top: 4px; }
.studio-row { display: grid; grid-template-columns: repeat(auto-fit,minmax(150px,1fr)); gap: 12px; }
.studio-small { font-size: .82rem; }
.segmented { display: flex; gap: 6px; flex-wrap: wrap; }
.segmented button[aria-pressed=true] { background: #a898ff; color: #13102a; border-color: #a898ff; }
.studio-captions { margin-top: 16px; }
.music-list { display: grid; gap: 6px; max-height: 280px; overflow-y: auto; margin-top: 10px; }
.music-list button { display: flex; justify-content: space-between; gap: 10px; text-align: left; font-weight: 400; }
.music-list button span { color: var(--secondary); font-size: .8rem; }
.music-list button[aria-checked=true] { border-color: #8edaff; box-shadow: inset 0 0 0 1px #8edaff; }
.studio-foot { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }

/* ───────── Esportazione ───────── */
.export-overlay { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px; background: #05050cdd; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.export-card { width: min(360px,100%); text-align: center; }
.export-card canvas { width: min(180px, 40vw); max-height: 40dvh; object-fit: contain; border-radius: 14px; box-shadow: 0 16px 50px #000; background: #000; }
.export-card h2 { margin: 18px 0 4px; }
.export-card progress { width: 100%; accent-color: #a898ff; height: 10px; }
.export-percent { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--text); }
.montage-result video { width: 100%; max-height: 62dvh; border-radius: 16px; background: #000; }
.montage-result a.download.secondary { background: transparent; color: var(--text); border-color: var(--line); }
.look-chip[aria-checked=true] { background: linear-gradient(135deg,#8edaff33,#a898ff44); border-color: transparent; box-shadow: inset 0 0 0 2px #a898ff, 0 4px 18px #a898ff33; }

/* ——— Ripresa immersiva ——— */
.capture-actions #record .rec-label { position: relative; }
.fx-title, .fx-level, .fx-mic, .fx-prompter, .fx-ring { display: none; }
body.camera-live { overflow: hidden; }
body.camera-live .capture-desk {
  position: fixed; inset: 0; z-index: 40; margin: 0; border: 0; border-radius: 0;
  background: radial-gradient(120% 80% at 50% 0%, #1b1734 0%, #04040a 60%);
}
body.camera-live .capture-desk .camera-coach {
  position: absolute; inset: 0; margin: auto; border-radius: 22px; background: #000;
  box-shadow: 0 0 0 1px #ffffff14, 0 30px 80px #000c;
}
body.camera-live .capture-desk .camera-coach[data-format=portrait] { aspect-ratio: 9/16; width: min(100vw, calc(100dvh * 9 / 16)); height: auto; max-height: 100dvh; }
body.camera-live .capture-desk .camera-coach[data-format=landscape] { aspect-ratio: 16/9; width: min(100vw, calc(100dvh * 16 / 9)); height: auto; max-height: 100dvh; }
body.camera-live .capture-desk .camera-coach video { width: 100%; height: 100%; aspect-ratio: auto; object-fit: cover; }
body.camera-live .camera-grid { opacity: .55; }
body.camera-live .camera-cue {
  left: 50%; right: auto; bottom: 16px; transform: translateX(-50%); width: max-content; max-width: calc(100% - 28px);
  text-align: center; border-radius: 999px; padding: 7px 14px; background: #0009; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  transition: opacity .3s;
}
body.camera-rolling .camera-cue { opacity: .55; }
body.camera-live .fx-title {
  display: block; position: absolute; top: 12px; left: 12px; max-width: 58%; margin: 0; z-index: 2;
  padding: 6px 12px; border-radius: 999px; background: #0009; color: #fff; font-size: .8rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
body.camera-live .fx-title b { color: #b6adff; margin-right: 4px; }
body.camera-live .take-clock {
  top: 12px; right: 12px; z-index: 3; border-radius: 999px; padding: 6px 12px 6px 26px; font-weight: 700;
  background: #e3304a; box-shadow: 0 0 0 4px #e3304a40, 0 8px 22px #e3304a55; letter-spacing: .02em;
}
body.camera-live .take-clock::before {
  content: ""; position: absolute; left: 11px; top: 50%; width: 8px; height: 8px; margin-top: -4px;
  border-radius: 50%; background: #fff; animation: fx-blink 1s steps(2, start) infinite;
}
body.camera-live .take-clock.reached { background: #17a86b; box-shadow: 0 0 0 4px #17a86b40, 0 8px 22px #17a86b66; }
@keyframes fx-blink { to { visibility: hidden; } }

/* Segnali come pillole sopra l'inquadratura */
body.camera-live .capture-signals {
  position: absolute; z-index: 3; top: calc(env(safe-area-inset-top) + 12px); left: 64px; right: 64px;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; padding: 0;
}
body.camera-live .capture-signals div {
  display: flex; align-items: center; gap: 6px; padding: 5px 10px 5px 8px; border-radius: 999px;
  background: #0b0b16cc; border: 1px solid #ffffff1c; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
body.camera-live .capture-signals div::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #46e69f; box-shadow: 0 0 8px #46e69f; }
body.camera-live .capture-signals div:has(.capture-warn)::before { background: #ffb547; box-shadow: 0 0 8px #ffb547; }
body.camera-live .capture-signals dt { font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; color: #c9c7e8; }
body.camera-live .capture-signals dd { font-size: .74rem; color: #fff; }
body.camera-live .capture-signals .capture-warn { text-decoration: none; color: #ffd08a; }
body.camera-live #capture-level { display: none; }
body.camera-live .face-indicator {
  position: absolute; z-index: 3; top: calc(env(safe-area-inset-top) + 60px); left: 50%; transform: translateX(-50%);
  padding: 4px 12px; border-radius: 999px; background: #0009; color: #fff; font-size: .78rem; white-space: nowrap;
}
body.camera-live .face-indicator[data-alignment=ok] { background: #0f7a4ecc; color: #fff; }
body.camera-live .face-indicator[data-alignment=off] { background: #a3273acc; color: #fff; }
body.camera-live .capture-alert, body.camera-live .fx-micstatus {
  position: absolute; z-index: 4; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 132px); transform: translateX(-50%);
  width: max-content; max-width: calc(100vw - 32px); margin: 0; padding: 8px 14px; border: 0; border-radius: 14px;
  background: #2a1d07e6; color: #ffe2b0; font-size: .85rem; text-align: center; box-shadow: 0 10px 30px #0008;
}
body.camera-live .fx-micstatus { background: #101a2ee6; color: #d8e8ff; bottom: calc(env(safe-area-inset-bottom) + 180px); }
body.camera-live main output:not(:empty) {
  position: fixed; z-index: 47; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 132px); transform: translateX(-50%);
  width: max-content; max-width: calc(100vw - 32px); padding: 8px 14px; border-radius: 14px; background: #101024ee; color: #fff; font-size: .85rem;
}

/* Barra dei comandi in basso */
body.camera-live .capture-actions {
  position: fixed; z-index: 45; left: 0; right: 0; bottom: 0; margin: 0;
  display: flex; align-items: center; justify-content: center; gap: 22px;
  padding: 18px 16px calc(env(safe-area-inset-bottom) + 18px);
  background: linear-gradient(to top, #000c, #0000);
}
body.camera-live .capture-actions button:not(#record) {
  min-height: 40px; padding: 6px 14px; border-radius: 999px; font-size: .8rem;
  background: #ffffff1f; color: #fff; border: 1px solid #ffffff2e; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
body.camera-live #record {
  position: relative; width: 78px; height: 78px; min-height: 78px; padding: 0; flex: none; border-radius: 50%;
  background: #ffffff22; border: 4px solid #fff; box-shadow: 0 10px 30px #0009; color: transparent;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
body.camera-live #record .rec-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
body.camera-live #record::before {
  content: ""; position: absolute; inset: 7px; border-radius: 50%; background: #ff3b55;
  box-shadow: 0 0 22px #ff3b5599; transition: inset .28s cubic-bezier(.3,1.4,.5,1), border-radius .28s;
}
body.camera-live #record:active::before { inset: 10px; }
body.camera-live #record.counting::before { inset: 12px; animation: fx-breathe .9s ease-in-out infinite; }
body.camera-rolling #record::before { inset: 21px; border-radius: 8px; }
body.camera-live #record[disabled]::before { background: #6b6b7a; box-shadow: none; }
@keyframes fx-breathe { 50% { transform: scale(.82); } }
body.camera-live .fx-ring { display: block; position: absolute; inset: -11px; pointer-events: none; }
.fx-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.fx-ring circle { fill: none; stroke-width: 5; }
.fx-ring .track { stroke: #ffffff00; }
.fx-ring .fill { stroke: #ff3b55; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; transition: stroke-dashoffset .12s linear, stroke .3s; filter: drop-shadow(0 0 6px #ff3b55); }
body.camera-rolling .fx-ring .track { stroke: #ffffff30; }
.fx-ring.reached .fill { stroke: #46e69f; filter: drop-shadow(0 0 8px #46e69f); }
.fx-ring.reached { animation: fx-pop .5s cubic-bezier(.3,1.6,.5,1); }
.fx-ring.open-ended .fill { stroke-dashoffset: 72 !important; animation: fx-spin 1.6s linear infinite; transform-origin: 50% 50%; }
@keyframes fx-spin { to { transform: rotate(360deg); } }
@keyframes fx-pop { 40% { transform: scale(1.12); } }
body.camera-live #stop-camera {
  position: fixed; top: calc(env(safe-area-inset-top) + 10px); left: 12px; width: 44px; height: 44px; min-height: 44px;
  padding: 0; font-size: 0; border-radius: 50%; z-index: 48;
}
body.camera-live #stop-camera::before { content: "✕"; font-size: 1.1rem; }
body.camera-rolling #show-shot-guide, body.camera-rolling .capture-tools, body.camera-rolling .capture-actions button:not(#record):not(#stop-camera) { opacity: 0; pointer-events: none; }
body.camera-live .capture-tools {
  position: fixed; z-index: 48; top: calc(env(safe-area-inset-top) + 10px); right: 12px; margin: 0; transition: opacity .25s;
}
body.camera-live .capture-tools summary {
  list-style: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; font-size: 0; cursor: pointer;
  background: #ffffff1f; border: 1px solid #ffffff2e; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
body.camera-live .capture-tools summary::-webkit-details-marker { display: none; }
body.camera-live .capture-tools summary::before { content: "⚙︎"; font-size: 1.2rem; color: #fff; }
body.camera-live .capture-tools[open] summary { background: #fff; }
body.camera-live .capture-tools[open] summary::before { color: #111; }
body.camera-live .capture-tools .actions {
  position: absolute; right: 0; top: 52px; display: flex; flex-direction: column; align-items: stretch; gap: 6px; margin: 0;
  width: max-content; padding: 8px; border-radius: 18px; background: #0d0d1ae8; border: 1px solid #ffffff1c;
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); animation: appear .18s ease-out;
}
body.camera-live .capture-tools .actions button { min-height: 40px; border-radius: 12px; font-size: .85rem; text-align: left; }
body.camera-live .capture-tools .actions button[aria-pressed=true] { background: #b6adff33; border-color: #b6adff; }
body.camera-live #shot-guide {
  position: fixed; z-index: 46; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 126px); transform: translateX(-50%);
  width: min(78vw, 360px); margin: 0; padding: 8px; border-radius: 18px; background: #0d0d1aee; box-shadow: 0 20px 50px #000a;
}
body.camera-live #shot-guide canvas { width: 100%; height: auto; border-radius: 12px; }

/* Livella */
body.camera-live .fx-level { display: flex; position: absolute; z-index: 2; top: 50%; left: 18%; right: 18%; height: 0; align-items: center; pointer-events: none; }
.fx-level span { flex: 1; height: 2px; margin: 0 6px; background: #fff; border-radius: 2px; box-shadow: 0 0 6px #000a; transition: background .2s; }
.fx-level i { width: 16px; height: 2px; background: #ffffffaa; }
.fx-level.flat span { background: #46e69f; box-shadow: 0 0 10px #46e69f; }
.fx-level.flat i { background: #46e69f; }

/* Barre del microfono */
body.camera-live .fx-mic {
  display: flex; position: absolute; z-index: 2; top: 50px; left: 12px; align-items: center; gap: 2px; height: 30px;
  padding: 0 10px 0 8px; border-radius: 999px; background: #0009; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.fx-mic svg { width: 15px; height: 15px; fill: #fff; margin-right: 4px; }
.fx-mic i { display: block; width: 3px; height: 16px; border-radius: 2px; background: #46e69f; transform-origin: 50% 50%; transform: scaleY(.12); }
.fx-mic[data-state=low] i { background: #ffb547; }
.fx-mic[data-state=high] i { background: #ff4d63; }
.fx-mic[data-state=off] { opacity: .5; }

/* Gobbo */
body.camera-live .fx-prompter {
  display: block; position: absolute; z-index: 2; top: 92px; left: 5%; right: 5%; height: 30%; overflow: hidden; cursor: pointer;
  padding: 14px 16px; border-radius: 18px; background: #000000a6; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 18%, #000 78%, transparent 100%); mask-image: linear-gradient(to bottom, transparent 0, #000 18%, #000 78%, transparent 100%);
}
.fx-prompter-text { color: #fff; font-size: clamp(1.25rem, 5.6vw, 1.9rem); line-height: 1.35; font-weight: 700; text-align: center; will-change: transform; padding-top: 6%; }
.fx-prompter.paused { outline: 2px solid #ffd15c; }
.fx-prompter.paused::after { content: "In pausa · tocca per riprendere"; position: absolute; bottom: 8px; left: 0; right: 0; text-align: center; font-size: .72rem; color: #ffd15c; }
body.camera-live:not(.camera-rolling) .fx-prompter { opacity: .85; }

/* Fantasma del prima */
.fx-ghost { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .36; pointer-events: none; mix-blend-mode: screen; z-index: 1; }

/* Conto alla rovescia e flash */
.fx-countdown { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; pointer-events: none; background: radial-gradient(circle, #0000 30%, #0008); }
.fx-countdown > * { grid-area: 1/1; }
.fx-countdown b { color: #fff; font-size: clamp(6rem, 34vw, 11rem); font-weight: 800; line-height: 1; text-shadow: 0 10px 40px #000c; animation: fx-count .9s cubic-bezier(.2,1.4,.4,1) both; }
.fx-countdown b.go { font-size: clamp(3rem, 16vw, 5rem); color: #ff3b55; letter-spacing: .1em; }
.fx-countdown svg { width: min(56vw, 240px); height: min(56vw, 240px); transform: rotate(-90deg); }
.fx-countdown circle { fill: none; stroke: #fff; stroke-width: 3; stroke-dasharray: 290; stroke-dashoffset: 0; animation: fx-sweep .9s linear both; opacity: .8; }
@keyframes fx-count { 0% { transform: scale(1.9); opacity: 0; } 25% { opacity: 1; } 70% { transform: scale(1); opacity: 1; } 100% { transform: scale(.85); opacity: 0; } }
@keyframes fx-sweep { to { stroke-dashoffset: 290; } }
.fx-flash { position: absolute; inset: 0; z-index: 6; background: #fff; pointer-events: none; animation: fx-flash .5s ease-out both; }
@keyframes fx-flash { from { opacity: .85; } to { opacity: 0; } }

/* Telefono girato in orizzontale: comandi sul lato destro */
@media (orientation: landscape) and (max-height: 540px) {
  body.camera-live .capture-actions {
    top: 0; bottom: 0; left: auto; right: 0; width: 120px; flex-direction: column; gap: 14px;
    padding: 12px calc(env(safe-area-inset-right) + 12px) 12px 12px; background: linear-gradient(to left, #000c, #0000);
  }
  body.camera-live .capture-desk .camera-coach[data-format] { right: 120px; width: min(calc(100vw - 132px), calc(100dvh * 16 / 9)); }
  body.camera-live .capture-tools { right: auto; left: 64px; }
  body.camera-live .capture-tools .actions { right: auto; left: 0; }
  body.camera-live .capture-signals { left: 120px; right: 140px; }
  body.camera-live .fx-prompter { top: 54px; height: 34%; left: 12%; right: 12%; }
}

/* Pagella della ripresa */
.fx-score {
  position: relative; display: grid; grid-template-columns: 116px 1fr; gap: 16px; align-items: center; margin-block: 14px;
  padding: 16px; border-radius: 20px; border: 1px solid var(--line);
  background: linear-gradient(135deg, var(--glow-violet), var(--surface) 55%, var(--glow-blue));
}
.fx-score-dial { position: relative; width: 116px; height: 116px; display: grid; place-items: center; align-content: center; }
.fx-score-dial svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.fx-score-dial circle { fill: none; stroke-width: 9; }
.fx-score-dial .track { stroke: #ffffff18; }
.fx-score-dial .fill { stroke: var(--accent); stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; transition: stroke .4s; }
.fx-score[data-grade=top] .fill { stroke: #46e69f; filter: drop-shadow(0 0 6px #46e69f88); }
.fx-score[data-grade=low] .fill { stroke: #ffb547; }
.fx-score-dial strong { font-size: 2.3rem; line-height: 1; font-variant-numeric: tabular-nums; }
.fx-score-dial span { font-size: .72rem; color: var(--secondary); }
.fx-score-verdict { margin: 0 0 8px; font-weight: 800; font-size: 1.1rem; }
.fx-score ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.fx-score li { display: grid; grid-template-columns: 74px 1fr 78px; align-items: center; gap: 8px; font-size: .82rem; }
.fx-score li i { height: 6px; border-radius: 6px; background: #ffffff14; overflow: hidden; }
.fx-score li b { display: block; height: 100%; width: 0; border-radius: 6px; background: var(--accent); transition: width .9s cubic-bezier(.2,.9,.3,1); }
.fx-score li[data-state=good] b { background: #46e69f; }
.fx-score li[data-state=ok] b { background: #ffd15c; }
.fx-score li[data-state=bad] b { background: #ff6577; }
.fx-score li em { font-style: normal; color: var(--secondary); text-align: right; white-space: nowrap; }
.fx-confetti { position: absolute; inset: 0; pointer-events: none; overflow: visible; }
.fx-confetti i { position: absolute; top: 50%; width: 7px; height: 11px; border-radius: 2px; animation: fx-confetti 1.5s cubic-bezier(.15,.7,.4,1) both; }
@keyframes fx-confetti { 0% { transform: translate(0,0) rotate(0); opacity: 1; } 100% { transform: translate(var(--dx), calc(var(--dy) + 260px)) rotate(var(--r)); opacity: 0; } }
@media (max-width: 420px) { .fx-score { grid-template-columns: 1fr; justify-items: center; } .fx-score-side { width: 100%; } .fx-score-verdict { text-align: center; } }
.shoot-prompter { margin-block: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.shoot-prompter summary { cursor: pointer; font-weight: 700; }
.shoot-prompter label { display: block; margin: 8px 0 6px; color: var(--secondary); font-size: .875rem; }
.shoot-prompter textarea { width: 100%; font-size: 1rem; }
body.camera-live #stop-camera { font-size: 0 !important; color: transparent; overflow: hidden; white-space: nowrap; }
body.camera-live #stop-camera::before { color: #fff; }
body.camera-live .capture-signals dt { display: none; }
body.camera-live .capture-signals { left: 64px; right: 64px; top: calc(env(safe-area-inset-top) + 16px); }
body.camera-live .face-indicator { top: calc(env(safe-area-inset-top) + 96px); }
body.camera-live .capture-desk > .fx-prompter { position: absolute; top: calc(env(safe-area-inset-top) + 124px); left: 4%; right: 4%; height: 25dvh; z-index: 4; }
@media (orientation: landscape) and (max-height: 540px) {
  body.camera-live .capture-desk > .fx-prompter { top: calc(env(safe-area-inset-top) + 56px); left: 14%; right: 140px; height: 36dvh; }
  body.camera-live .face-indicator { top: calc(env(safe-area-inset-top) + 56px); }
}

/* ——— Strategia e piano del video ——— */
.platform-cards .card[aria-checked=true], .card.recommended { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent) inset, 0 12px 30px #6f5cff26; }
.platform-cards .card[aria-checked=true]::after { content: "✓"; float: right; color: var(--accent); font-weight: 900; }
.goal-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.goal-chips button { min-height: 40px; border-radius: 999px; padding: 6px 14px; }
.goal-chips button[aria-checked=true] { background: var(--accent); color: #14121f; border-color: var(--accent); }
.plan-loading { text-align: center; }
.plan-steps { list-style: none; padding: 0; margin: 10px auto 18px; max-width: 340px; text-align: left; }
.plan-steps li { padding: 6px 0 6px 30px; position: relative; color: var(--secondary); transition: color .3s; }
.plan-steps li::before { content: ""; position: absolute; left: 4px; top: 50%; width: 12px; height: 12px; margin-top: -6px; border-radius: 50%; border: 2px solid var(--line); }
.plan-steps li[data-state=active] { color: var(--text); font-weight: 700; }
.plan-steps li[data-state=active]::before { border-color: var(--accent); border-top-color: transparent; animation: fx-spin .8s linear infinite; }
.plan-steps li[data-state=done]::before { background: #46c790; border-color: #46c790; }
.bp-meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.bp-meta span { padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); font-size: .8rem; color: var(--secondary); }
.bp-meta span:first-child { background: var(--accent); color: #14121f; border-color: var(--accent); font-weight: 700; }
.bp-angle { color: var(--secondary); }
.bp-warning { padding: 10px 14px; border-radius: 12px; background: #3a2a0c; color: #ffe1a8; }
:root[data-theme=light] .bp-warning { background: #fff1d6; color: #5a3b00; }
.bp-block { margin-block: 22px; animation: none; }
.bp-block h2 { display: flex; align-items: center; gap: 10px; }
.bp-block h2 b { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #14121f; font-size: .9rem; }
.bp-hooks { display: grid; gap: 10px; }
.bp-hook { display: grid; gap: 4px; text-align: left; padding: 14px 16px; border-radius: 16px; min-height: 0; }
.bp-hook strong { font-size: 1.15rem; line-height: 1.25; }
.bp-hook em { font-style: normal; color: var(--secondary); }
.bp-hook small { color: var(--secondary); font-size: .78rem; }
.bp-hook-type { justify-self: start; font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; padding: 2px 8px; border-radius: 999px; background: #ffffff14; }
.bp-hook[aria-checked=true] { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent) inset; background: linear-gradient(135deg, var(--glow-violet), var(--surface)); }
.bp-hook[aria-checked=true] .bp-hook-type { background: var(--accent); color: #14121f; }
.bp-bar { display: flex; gap: 3px; height: 12px; margin: 10px 0 14px; }
.bp-bar i { border-radius: 4px; min-width: 6px; }
[data-role=hook] { --role: #ff5b77; } [data-role=contesto] { --role: #ffb547; } [data-role=valore] { --role: #6aa8ff; }
[data-role=prova] { --role: #46c790; } [data-role=cta] { --role: #b6adff; } [data-role=stacco] { --role: #8c8ca8; }
.bp-bar i { background: var(--role); }
.bp-beats { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.bp-beats li { padding: 12px 14px 12px 16px; border: 1px solid var(--line); border-left: 4px solid var(--role); border-radius: 14px; background: var(--surface); }
.bp-beat-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2px; }
.bp-role { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--role); }
.bp-time { font-size: .78rem; color: var(--secondary); font-variant-numeric: tabular-nums; }
.bp-why { margin: 2px 0 8px; color: var(--secondary); font-size: .875rem; }
.bp-beats label { display: block; font-size: .8rem; color: var(--secondary); margin-top: 6px; }
.bp-beats textarea, .bp-beats input { width: 100%; margin-top: 3px; font-size: 1rem; }
.bp-shot { margin: 8px 0 0; font-size: .82rem; color: var(--secondary); }
.bp-shot span { font-weight: 700; color: var(--text); }
.bp-caption { white-space: pre-wrap; font-size: .9rem; }
.bp-tips { color: var(--secondary); font-size: .9rem; }
.bp-actions { position: sticky; bottom: 0; padding: 10px 0 max(10px, env(safe-area-inset-bottom)); background: linear-gradient(to top, var(--background) 70%, transparent); z-index: 5; }
.beat-tag { display: inline-flex; gap: 8px; align-items: center; margin: 0 0 4px; padding: 4px 12px 4px 4px; border-radius: 999px; background: #ffffff10; font-size: .85rem; }
.beat-tag b { padding: 2px 10px; border-radius: 999px; background: var(--role); color: #14121f; text-transform: uppercase; font-size: .72rem; letter-spacing: .06em; }
.beat-why { color: var(--secondary); margin-top: 4px; }
.beat-onscreen { padding: 10px 14px; border-radius: 12px; border: 1px dashed var(--line); }

/* ——— Kit di pubblicazione ——— */
.publish-kit { margin-block: 18px; padding: 16px; border-radius: 20px; border: 1px solid var(--line); background: linear-gradient(160deg, var(--glow-violet), var(--surface) 50%); animation: none; }
.publish-kit h2 { margin-top: 0; }
.publish-checks { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 6px; }
.publish-checks li { position: relative; padding-left: 28px; font-size: .92rem; }
.publish-checks li::before { position: absolute; left: 0; top: 1px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: .75rem; font-weight: 900; color: #14121f; }
.publish-checks li[data-ok=yes]::before { content: "✓"; background: #46c790; }
.publish-checks li[data-ok=warn]::before { content: "!"; background: #ffb547; }
.publish-checks li[data-ok=no]::before { content: "×"; background: #ff6577; }
.caption-card { margin-block: 10px; }
.caption-card > div { display: flex; justify-content: space-between; align-items: center; }
.caption-card h3 { margin: 0; font-size: 1rem; }
.caption-card button { min-height: 36px; padding: 4px 14px; }
.caption-card textarea { width: 100%; margin-top: 6px; font-size: .9rem; }
.publish-steps h3 { font-size: 1rem; margin-bottom: 4px; }
.bp-actions #start { width: 100%; min-height: 52px; font-size: 1.05rem; }
.bp-secondary button { font-size: .875rem; }

/* ——— Libreria dei format ——— */
.reel-family { display: inline-flex; align-items: center; gap: 4px; justify-self: start; padding: 2px 10px; border-radius: 999px; font-size: .72rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; background: #ffffff14; color: var(--text); }
.reel-family[data-family=parlato] { background: #6aa8ff2e; color: #a9cbff; }
.reel-family[data-family=voce] { background: #46c79030; color: #8ee6bd; }
.reel-family[data-family=muto] { background: #b6adff30; color: #d3cdff; }
.reel-family[data-family=tendenza] { background: #ff5b7730; color: #ffadbb; }
:root[data-theme=light] .reel-family { color: #201a35; }
.reel-card, .reel-hero { display: grid; gap: 6px; text-align: left; }
.reel-card strong, .reel-hero strong { font-size: 1.1rem; }
.reel-pitch { color: var(--secondary); font-weight: 400; }
.reel-when { font-size: .82rem; color: var(--secondary); font-weight: 400; border-top: 1px solid var(--line); padding-top: 6px; }
.reel-hero { padding: 18px; border-radius: 20px; border: 1px solid var(--accent); background: linear-gradient(135deg, var(--glow-violet), var(--surface) 60%, var(--glow-blue)); margin: 8px 0 14px; }
.reel-hero strong { font-size: 1.6rem; line-height: 1.15; }
.reel-why { font-size: 1rem; }
.reel-facts { display: grid; gap: 10px; margin: 0 0 16px; }
.reel-facts div { padding: 10px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.reel-facts dt { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--secondary); font-weight: 800; }
.reel-facts dd { margin: 2px 0 0; }
.reel-beats { display: flex; flex-wrap: wrap; gap: 6px; }
.reel-beats span { padding: 2px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; background: var(--role); color: #14121f; }
.reel-filters { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 8px; scrollbar-width: none; }
.reel-filters button { flex: none; min-height: 38px; border-radius: 999px; padding: 4px 14px; font-size: .85rem; }
.reel-filters button[aria-pressed=true] { background: var(--accent); color: #14121f; border-color: var(--accent); }
.bp-reel { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 8px; }
.bp-secret { padding: 10px 14px; border-radius: 12px; border: 1px dashed var(--accent); font-size: .92rem; }

/* ═══════════════════ Zion 2 · sistema visivo ═══════════════════
   Studio creativo notturno: nero profondo, aurora del logo (azzurro → viola),
   pillole morbide, vetro leggero, tipografia di sistema iOS. */
:root {
  --background: #07070d;
  --surface: #12121d;
  --surface-2: #1a1a28;
  --glass: rgba(255,255,255,.045);
  --glass-strong: rgba(255,255,255,.08);
  --hairline: rgba(255,255,255,.09);
  --text: #f6f5ff;
  --secondary: #a9a8c3;
  --line: #2a2a3d;
  --accent: #a898ff;
  --accent-2: #8edaff;
  --grad: linear-gradient(120deg, #8edaff 0%, #a898ff 55%, #d59bff 100%);
  --grad-soft: linear-gradient(140deg, rgba(142,218,255,.16), rgba(168,152,255,.12) 50%, rgba(213,155,255,.06));
  --rec: #ff3b55;
  --radius: 20px;
  --shadow: 0 18px 50px rgba(0,0,0,.45);
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
:root[data-theme=light] {
  --background: #f6f5fb; --surface: #ffffff; --surface-2: #f0eef8;
  --glass: rgba(20,16,50,.035); --glass-strong: rgba(20,16,50,.06); --hairline: rgba(20,16,50,.1);
  --text: #16132a; --secondary: #5a5570; --line: #dcd8ea; --accent: #6b5cff; --accent-2: #2a9fd6;
  --grad: linear-gradient(120deg, #2a9fd6 0%, #6b5cff 55%, #a35cff 100%);
  --grad-soft: linear-gradient(140deg, rgba(42,159,214,.12), rgba(107,92,255,.1) 50%, rgba(163,92,255,.05));
  --shadow: 0 14px 40px rgba(40,30,90,.12);
}
body {
  background:
    radial-gradient(90% 50% at 85% -10%, rgba(168,152,255,.22), transparent 60%),
    radial-gradient(70% 45% at -10% 10%, rgba(142,218,255,.14), transparent 60%),
    var(--background);
  background-attachment: fixed;
}
:root[data-theme=light] body {
  background: radial-gradient(90% 50% at 85% -10%, rgba(107,92,255,.14), transparent 60%), radial-gradient(70% 45% at -10% 10%, rgba(42,159,214,.1), transparent 60%), var(--background);
}

/* Intestazione in vetro, compatta e fissa */
body > header {
  position: sticky; top: 0; z-index: 30; max-width: none; padding: calc(env(safe-area-inset-top) + 12px) 20px 12px;
  border-bottom: 1px solid var(--hairline);
  background: color-mix(in srgb, var(--background) 72%, transparent);
  backdrop-filter: saturate(160%) blur(18px); -webkit-backdrop-filter: saturate(160%) blur(18px);
}
body > header > * { max-width: 760px; }
#brand { display: flex; align-items: center; gap: 10px; min-height: 0; padding: 0; border: 0; background: none; }
#brand svg { width: 32px; height: 32px; filter: drop-shadow(0 4px 14px rgba(168,152,255,.45)); }
.wordmark { font: 800 1.15rem/1 -apple-system, BlinkMacSystemFont, "SF Pro Display", Inter, sans-serif; letter-spacing: .32em; }
#account { width: 40px; height: 40px; min-height: 40px; padding: 0; border-radius: 50%; display: grid; place-items: center; background: var(--glass); border-color: var(--hairline); }

/* Indietro: piccola pillola, non un pulsante enorme */
.screen-nav { max-width: 720px; padding-inline: 20px; }
#screen-back {
  margin-top: 14px; min-height: 36px; padding: 6px 14px 6px 10px; border-radius: 999px; font-size: .875rem; font-weight: 600;
  background: var(--glass); border: 1px solid var(--hairline); color: var(--secondary);
}
#screen-back::before { content: '‹'; font-size: 1.3rem; line-height: 0; margin-right: 6px; color: var(--text); vertical-align: -1px; }

main { max-width: 720px; padding: clamp(20px, 6vw, 48px) 20px 64px; }

/* Tipografia */
h1 { font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", Inter, sans-serif; font-weight: 800; font-size: clamp(2rem, 8.4vw, 3.2rem); letter-spacing: -.035em; line-height: 1.05; margin: 8px 0 16px; }
h2 { font-weight: 800; letter-spacing: -.02em; font-size: 1.3rem; margin: 28px 0 12px; }
h3 { font-weight: 700; letter-spacing: -.01em; }
p, output { color: var(--secondary); }
.studio-kicker {
  display: inline-block; margin: 0 0 4px; font-size: .72rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
main > section > p:first-child:not([class]) { font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--secondary); margin: 0 0 6px; }

/* Pulsanti: pillole; il principale con l'aurora del logo */
button, a.download {
  border-radius: 999px; min-height: 48px; padding: 12px 20px; font-weight: 700; letter-spacing: -.005em;
  background: var(--glass); border: 1px solid var(--hairline); color: var(--text);
  transition: transform .12s ease, background-color .15s, border-color .15s, box-shadow .2s;
}
button:active:not(:disabled), a.download:active { transform: scale(.97); }
button.primary, a.download {
  background: var(--grad); color: #0c0a1d; border: 0;
  box-shadow: 0 10px 30px rgba(140,130,255,.35), inset 0 1px 0 rgba(255,255,255,.35);
}
:root[data-theme=light] button.primary, :root[data-theme=light] a.download { color: #fff; }
a.download.secondary { background: var(--glass); color: var(--text); border: 1px solid var(--hairline); box-shadow: none; }
@media (hover: hover) {
  button:hover:not(:disabled), a.download:hover { border-color: color-mix(in srgb, var(--accent) 55%, transparent); background-color: var(--glass-strong); }
  button.primary:hover:not(:disabled), a.download:hover { background: var(--grad); filter: brightness(1.06); box-shadow: 0 14px 36px rgba(140,130,255,.45); }
}
.actions { gap: 10px; margin-top: 22px; }
.actions > .primary:only-child, .actions > .primary:first-child { flex: 1 1 220px; }

/* Superfici: schede in vetro con bordo sottile */
.card {
  border: 1px solid var(--hairline); border-left: 1px solid var(--hairline); border-radius: var(--radius);
  background: var(--glass); padding: 18px; font-weight: 700; font-size: 1.05rem; box-shadow: none;
}
.card span { font-family: inherit; }
@media (hover: hover) { .card:hover:not(:disabled) { background: var(--glass-strong); } }
.platform-cards .card[aria-checked=true], .card.recommended, .bp-hook[aria-checked=true] {
  border-color: transparent; box-shadow: none;
  background: linear-gradient(var(--surface-2), var(--surface-2)) padding-box, var(--grad) border-box; border: 1.5px solid transparent;
}
.platform-cards .card[aria-checked=true]::after { color: var(--accent-2); }
.hint, .shoot-how {
  border: 1px solid var(--hairline); border-left: 1px solid var(--hairline); border-radius: 16px; background: var(--grad-soft); padding: 14px 16px;
}
:root[data-theme=light] .hint { background: var(--grad-soft); }
fieldset { border-radius: 16px; border-color: var(--hairline); background: var(--glass); }
details > summary { cursor: pointer; font-weight: 700; color: var(--text); list-style-position: inside; }
textarea, input[type=text], select {
  border-radius: 14px; border: 1px solid var(--hairline); background: var(--glass); color: var(--text); padding: 12px 14px;
  transition: border-color .15s, box-shadow .15s;
}
textarea:focus, input[type=text]:focus, select:focus { outline: none; border-color: color-mix(in srgb, var(--accent) 70%, transparent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
:root[data-theme=light] :is(textarea, input[type=text], select) { background: #fff; }
video { border-radius: 18px; border-color: var(--hairline); box-shadow: var(--shadow); }
progress { appearance: none; -webkit-appearance: none; height: 6px; border: 0; border-radius: 6px; background: var(--glass-strong); overflow: hidden; }
progress::-webkit-progress-bar { background: var(--glass-strong); border-radius: 6px; }
progress::-webkit-progress-value { background: var(--grad); border-radius: 6px; }
progress::-moz-progress-bar { background: var(--grad); border-radius: 6px; }

/* Piè di pagina solo in home */
body:not(.is-home) .site-footer { display: none; }
.site-footer { border-top: 1px solid var(--hairline); }

/* ───── Home ───── */
.home { padding-top: clamp(8px, 6vw, 40px); }
.home-hero { margin-bottom: 18px; }
.home-hero h1 { font-size: clamp(2.4rem, 11vw, 3.8rem); margin: 6px 0 10px; }
.home-hero h1 em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.home-hero p { font-size: 1.05rem; margin: 0; max-width: 34ch; }
.home .composer {
  position: relative; border-radius: 24px; padding: 10px; gap: 8px;
  background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--grad) border-box; border: 1.5px solid transparent;
  box-shadow: 0 20px 60px rgba(120,110,255,.18);
}
.home .composer textarea { min-height: 96px; font-size: 1.05rem; padding: 10px 12px; border: 0; background: transparent; box-shadow: none; }
.home .composer textarea:focus { box-shadow: none; }
.home #dictate { width: 48px; height: 48px; min-height: 48px; padding: 0; border-radius: 50%; display: grid; place-items: center; }
.home .composer button[type=submit] { min-height: 48px; padding-inline: 22px; }
.idea-chips { display: flex; gap: 8px; overflow-x: auto; margin: 14px -20px 0; padding: 2px 20px 6px; scrollbar-width: none; }
.idea-chips::-webkit-scrollbar { display: none; }
.idea-chips button { flex: none; min-height: 38px; padding: 6px 14px; font-size: .85rem; font-weight: 600; color: var(--secondary); }
.home-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 22px; }
.home-actions button {
  display: grid; gap: 6px; align-content: start; text-align: left; min-height: 104px; padding: 16px; border-radius: var(--radius);
  font-size: .95rem; background: var(--glass);
}
.home-actions button::before { font-size: 1.4rem; line-height: 1; }
.home-actions #idea::before { content: "✦"; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.home-actions #reference::before { content: "▶"; color: var(--accent-2); font-size: 1.1rem; }
.home-actions button small { display: block; font-weight: 500; font-size: .8rem; color: var(--secondary); }
.home-projects { border-top: 0; margin-top: 18px; padding-top: 0; }
.home-projects button { width: 100%; text-align: left; border: 1px solid var(--hairline); background: var(--glass); padding-left: 18px; color: var(--text); }
.home-projects button::after { content: "›"; float: right; color: var(--secondary); font-size: 1.3rem; line-height: 1; }

/* Schede format più ricche */
.reel-hero { border: 1.5px solid transparent; background: linear-gradient(var(--surface-2), var(--surface-2)) padding-box, var(--grad) border-box; box-shadow: var(--shadow); }
.reel-facts div, .bp-beats li { background: var(--glass); border-color: var(--hairline); }
.bp-beats li { border-left: 4px solid var(--role); }
.bp-block h2 b { background: var(--grad); }
.goal-chips button[aria-checked=true], .reel-filters button[aria-pressed=true] { background: var(--grad); color: #0c0a1d; border-color: transparent; }
.bp-actions { background: linear-gradient(to top, var(--background) 65%, transparent); }

/* Ripresa: testi più leggibili */
.beat-tag { background: var(--glass); border: 1px solid var(--hairline); }
.shoot-script, .shoot-prompter { border-radius: 16px; }
.shoot-prompter { background: var(--glass); border-color: var(--hairline); }
.capture-actions { background: color-mix(in srgb, var(--background) 85%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
#open-camera::before { content: "●"; color: var(--rec); margin-right: 8px; font-size: .8em; vertical-align: 1px; }
:root[data-theme=light] #open-camera::before { color: #d0021b; }
.capture-actions:not(body.camera-live *) { flex-wrap: nowrap; }
.capture-actions > .primary { flex: 1 1 auto; }
.capture-actions > button { white-space: nowrap; }

/* ═══════════════════ Hub e Zion Academy ═══════════════════ */
.hub .home-hero { text-align: center; }
.hub-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 28px; }
.hub-tile {
  aspect-ratio: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; gap: 6px; text-align: left;
  padding: 18px; border-radius: 28px; position: relative; overflow: hidden;
  background: linear-gradient(var(--surface-2), var(--surface-2)) padding-box, var(--grad) border-box; border: 1.5px solid transparent;
  box-shadow: var(--shadow);
}
.hub-tile::before { content: ''; position: absolute; inset: 0; background: var(--grad-soft); pointer-events: none; }
.hub-tile > * { position: relative; }
.hub-tile strong { font-size: clamp(1.05rem, 4.6vw, 1.4rem); font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.hub-tile span:not(.hub-icon) { font-size: .82rem; font-weight: 500; color: var(--secondary); line-height: 1.35; }
.hub-icon { position: absolute !important; top: 18px; left: 18px; width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--grad); }
.hub-icon svg { width: 30px; height: 30px; stroke: #16152d; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
#open-studio .hub-icon { background: linear-gradient(140deg, #d59bff, #a898ff); }
@media (max-width: 360px) { .hub-tiles { grid-template-columns: 1fr; } .hub-tile { aspect-ratio: 16 / 10; } }

.academy h1 em, .hub h1 em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.academy-course { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; text-align: left; width: 100%; }
.academy-course strong { font-size: 1.2rem; letter-spacing: -.015em; }
.academy-level { font-size: .7rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-2); }
.academy-sub { font-weight: 500; color: var(--secondary); font-size: .92rem; }
.academy-meta { font-size: .8rem; font-weight: 600; color: var(--secondary); }
.academy-bar { width: 100%; height: 6px; border-radius: 99px; background: var(--glass-strong); overflow: hidden; margin-top: 6px; }
.academy-bar span { display: block; height: 100%; background: var(--grad); border-radius: inherit; transition: width .4s ease; }
.academy-progress { display: grid; gap: 4px; font-size: .85rem; font-weight: 600; color: var(--secondary); margin: 14px 0 4px; }
.academy-lessons { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.academy-lesson { width: 100%; display: flex; gap: 14px; align-items: center; text-align: left; border-radius: 18px; padding: 12px 14px; }
.academy-lesson strong { display: block; font-size: .98rem; }
.academy-lesson small { display: block; font-weight: 500; color: var(--secondary); font-size: .8rem; }
.academy-check { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: .85rem; font-weight: 800; border: 1.5px solid var(--hairline); color: var(--secondary); }
.academy-lesson.done .academy-check { background: var(--grad); color: #0c0a1d; border: 0; }
.academy-title { font-size: clamp(1.6rem, 6.6vw, 2.4rem); }
.academy-player { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 20px; overflow: hidden; background: #000; box-shadow: var(--shadow); margin: 8px 0 10px; }
.academy-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.academy-soon { display: grid; place-content: center; justify-items: center; gap: 4px; background: var(--grad-soft), var(--surface-2); text-align: center; padding: 16px; }
.academy-soon span { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; background: var(--glass-strong); font-size: 1.2rem; }
.academy-soon small { color: var(--secondary); }
.academy-body { color: var(--text); }
.academy-body p { color: var(--text); opacity: .92; }
.academy-body ul { padding-left: 1.2em; margin: 4px 0 14px; }
.academy-body li { margin: 4px 0; }
.academy-practice { display: grid; gap: 6px; margin-top: 20px; }
.academy-practice span { color: var(--secondary); }
.academy-practice button { justify-self: start; margin-top: 4px; }
.academy-admin-link { text-align: center; margin-top: 36px; }
.link-button { min-height: 0; padding: 6px 10px; border: 0; background: none; color: var(--secondary); font-size: .85rem; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

.academy-admin input[type=url], .academy-admin input[type=number], #academy-login input[type=password] {
  width: 100%; border-radius: 14px; border: 1px solid var(--hairline); background: var(--glass); color: var(--text); padding: 12px 14px; font: inherit;
}
:root[data-theme=light] :is(.academy-admin input[type=url], .academy-admin input[type=number], #academy-login input[type=password]) { background: #fff; }
.admin-form { display: grid; gap: 6px; }
.admin-form label { margin-top: 10px; font-weight: 700; }
.admin-form textarea { min-height: 180px; }
.admin-list { display: grid; gap: 8px; margin: 10px 0; }
.admin-row { display: flex; gap: 8px; align-items: center; }
.admin-open { flex: 1; text-align: left; border-radius: 16px; display: grid; gap: 2px; }
.admin-open small { font-weight: 500; color: var(--secondary); font-size: .8rem; }
.admin-tools { display: flex; gap: 4px; flex: none; }
.admin-tools button { min-height: 40px; width: 40px; padding: 0; }
.admin-tools button:disabled { opacity: .3; }
.admin-module { border: 1px solid var(--hairline); border-radius: 20px; padding: 14px; margin-top: 18px; background: var(--glass); }
.admin-module-head { display: flex; gap: 8px; align-items: center; }
.admin-module-head input { flex: 1; font-weight: 700; }
.admin-save {
  position: sticky; bottom: calc(env(safe-area-inset-bottom) + 12px); margin-top: 26px; display: flex; gap: 12px; align-items: center; justify-content: space-between;
  padding: 10px 10px 10px 18px; border-radius: 999px; border: 1px solid var(--hairline);
  background: color-mix(in srgb, var(--surface) 80%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.admin-save output { font-size: .82rem; font-weight: 600; }
.youtube-thumb { width: 100%; max-width: 320px; border-radius: 14px; display: block; }
.admin-save button { white-space: nowrap; flex: none; }

/* ═══════════════════ Ingresso e area riservata ═══════════════════ */
.entry .home-hero { text-align: left; }
.entry-plans { grid-template-columns: 1fr; gap: 14px; margin-top: 8px; }
.entry-plans .entry-card {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; text-align: left; padding: 22px; border-radius: 26px;
  background: var(--glass); border: 1px solid var(--hairline); min-height: 0; aspect-ratio: auto;
}
.entry-plans .entry-member { background: linear-gradient(var(--surface-2), var(--surface-2)) padding-box, var(--grad) border-box; border: 1.5px solid transparent; box-shadow: var(--shadow); }
.entry-plans .entry-member::before { content: ''; position: absolute; inset: 0; border-radius: inherit; background: var(--grad-soft); pointer-events: none; }
.entry-plans .entry-card > * { position: relative; }
.entry-plans .entry-card > span:not(.entry-icon):not(.entry-badge) { color: var(--secondary); font-weight: 500; font-size: .92rem; }
.entry-plans .entry-icon { color: var(--accent-2); }
.entry-plans .entry-icon svg { width: 36px; height: 36px; }
.entry-badge { position: absolute !important; top: 18px; right: 18px; font-size: .68rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; padding: 5px 10px; border-radius: 99px; background: var(--grad); color: #0c0a1d; }
.entry-plans ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; font-size: .88rem; font-weight: 500; color: var(--text); }
.entry-plans li { padding-left: 24px; position: relative; }
.entry-plans li::before { content: '✓'; position: absolute; left: 0; color: var(--accent-2); font-weight: 800; }
.entry-plans li.off { color: var(--secondary); }
.entry-plans li.off::before { content: '–'; color: var(--secondary); }

.account-access { max-width: 460px; }
.segmented { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; gap: 4px; border-radius: 999px; background: var(--glass); border: 1px solid var(--hairline); margin: 18px 0 6px; }
.segmented button { min-height: 40px; border: 0; background: none; color: var(--secondary); }
.segmented button[aria-selected=true] { background: var(--glass-strong); color: var(--text); box-shadow: 0 2px 10px rgba(0,0,0,.25); }
.account-access input, .brand-profile input[type=email] {
  width: 100%; border-radius: 14px; border: 1px solid var(--hairline); background: var(--glass); color: var(--text); padding: 12px 14px; font: inherit;
}
:root[data-theme=light] .account-access input { background: #fff; }
.password-field { display: flex; gap: 8px; align-items: center; }
.password-field input { flex: 1; }
.password-field button { min-height: 46px; padding: 8px 14px; font-size: .85rem; flex: none; }
.account-access .primary { margin-top: 18px; }
.account-help { font-size: .85rem; margin-top: 14px; }
.menu-title small { display: block; font-weight: 500; color: var(--secondary); font-size: .78rem; }

.hub-tile.locked strong, .hub-tile.locked span:not(.hub-icon):not(.hub-lock) { opacity: .75; }
.hub-lock { position: absolute !important; top: 18px; right: 16px; font-size: .68rem !important; font-weight: 800 !important; letter-spacing: .06em; padding: 5px 9px; border-radius: 99px; background: var(--glass-strong); color: var(--text) !important; }
.hub-notice { margin-bottom: 8px; }
.brand-card { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; width: 100%; text-align: left; margin-top: 14px; }
.guest-banner { display: grid; gap: 6px; margin-top: 22px; padding: 18px; border-radius: 22px; border: 1px solid var(--hairline); background: var(--grad-soft); }
.guest-banner span { color: var(--secondary); font-size: .92rem; }
.guest-banner button { margin-top: 6px; }
.brand-pill { min-height: 0; padding: 6px 14px; font-size: .82rem; font-weight: 600; color: var(--secondary); margin-bottom: 4px; }
.brand-pill strong { color: var(--text); }

.brand-profile h1 em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand-profile fieldset { margin: 18px 0 0; padding: 16px; display: grid; gap: 6px; }
.brand-profile legend { font-weight: 800; padding: 0 6px; }
.brand-profile textarea { min-height: 0; }
.brand-score { display: grid; gap: 4px; margin: 10px 0 16px; }
.brand-score > div:first-child { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.brand-score span { font-size: .82rem; color: var(--secondary); }
.brandbook-drop { display: grid; gap: 6px; padding: 18px; border-radius: 22px; border: 1.5px dashed color-mix(in srgb, var(--accent) 55%, transparent); background: var(--grad-soft); }
.brandbook-drop span { color: var(--secondary); font-size: .9rem; }
.brandbook-drop label { justify-self: start; margin-top: 6px; cursor: pointer; }
.brandbook-drop output { font-size: .88rem; font-weight: 600; color: var(--text); }
.color-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.color-field { display: flex; gap: 8px; align-items: center; }
.color-field input[type=color] { width: 46px; height: 46px; flex: none; padding: 0; border: 1px solid var(--hairline); border-radius: 12px; background: none; }
.color-field input[type=text] { flex: 1; min-width: 0; }
.tone-chips { margin: 4px 0 6px; }
.filled-by-ai { border-color: color-mix(in srgb, var(--accent-2) 70%, transparent) !important; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-2) 16%, transparent); }

/* ═══════════════════ Documenti legali ═══════════════════ */
.legal-page > header { display: flex; align-items: center; }
.legal { max-width: 760px; }
.legal h1 { font-size: clamp(1.8rem, 7vw, 2.6rem); }
.legal h2 { margin-top: 34px; }
.legal p, .legal li { color: var(--text); opacity: .9; }
.legal ul { padding-left: 1.2em; }
.legal li { margin: 6px 0; }
.legal a { color: var(--accent-2); }
.legal-nav { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0 8px; }
.legal-nav a { padding: 7px 14px; border-radius: 99px; border: 1px solid var(--hairline); background: var(--glass); color: var(--text); text-decoration: none; font-weight: 600; font-size: .9rem; }
.legal-nav a[aria-current=page] { background: var(--grad); color: #0c0a1d; border-color: transparent; }
.legal-table { display: grid; gap: 8px; margin: 12px 0; font-size: .9rem; }
.legal-table > div { display: grid; grid-template-columns: 1.4fr 1.2fr 1fr 1fr; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--glass); border: 1px solid var(--hairline); }
.legal-table .legal-head { background: none; border: 0; padding-block: 0; font-weight: 800; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--secondary); }
@media (max-width: 640px) {
  .legal-table .legal-head { display: none; }
  .legal-table > div { grid-template-columns: 1fr; gap: 6px; }
  .legal-table span[role=cell]:nth-child(2)::before { content: 'Finalità · '; font-weight: 700; color: var(--secondary); }
  .legal-table span[role=cell]:nth-child(3)::before { content: 'Base · '; font-weight: 700; color: var(--secondary); }
  .legal-table span[role=cell]:nth-child(4)::before { content: 'Durata · '; font-weight: 700; color: var(--secondary); }
}
.consent { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; font-size: .88rem; color: var(--secondary); font-weight: 500; }
.consent input { width: 22px !important; height: 22px; flex: none; margin-top: 2px; accent-color: var(--accent); }
.consent a { color: var(--accent-2); }
.privacy-actions { display: grid; gap: 10px; margin-top: 12px; }
.privacy-actions button, .privacy-actions a { justify-content: flex-start; text-align: left; }
.danger { color: #ff8a9a !important; border-color: rgba(255,90,110,.35) !important; }
.yt-gate { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 8px; padding: 18px; text-align: center; background: var(--grad-soft), #0d0c16; }
.yt-gate img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .35; }
.yt-gate > *:not(img) { position: relative; }
.yt-gate small { color: var(--secondary); max-width: 34ch; font-size: .76rem; }
.privacy-screen h1 em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.privacy-actions .download { display: flex; align-items: center; }
.danger-fill { background: linear-gradient(120deg,#ff5a6e,#ff8a5a) !important; color: #fff !important; box-shadow: none !important; }
.academy-soon-icon { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; background: var(--glass-strong); font-size: 1.2rem; }
.studio-small { font-size: .85rem; }

/* ═══════════════════ Risultati ═══════════════════ */
.results h1 em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.results-card { display: flex; gap: 14px; align-items: center; width: 100%; text-align: left; margin-top: 14px; }
.results-card > span:last-child { display: grid; gap: 2px; }
.results-icon { flex: none; width: 52px; height: 52px; border-radius: 16px; background: var(--grad); display: flex; align-items: flex-end; justify-content: center; gap: 4px; padding: 12px; }
.results-icon i { width: 6px; border-radius: 3px 3px 1px 1px; background: #16152d; }
.results-icon i:nth-child(1) { height: 40%; } .results-icon i:nth-child(2) { height: 70%; } .results-icon i:nth-child(3) { height: 100%; }
.connect-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0; }
.connect-facts > div { padding: 16px; border-radius: 18px; background: var(--glass); border: 1px solid var(--hairline); font-size: .9rem; }
.connect-facts ul { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 6px; color: var(--secondary); }
.connect-facts li::before { content: '✓ '; color: var(--accent-2); font-weight: 800; }
.connect-facts ul.no li::before { content: '✕ '; color: #ff8a9a; }
@media (max-width: 520px) { .connect-facts { grid-template-columns: 1fr; } }
.connect-help { margin: 6px 0 4px; }
.ig-button { background: linear-gradient(120deg,#feda75,#fa7e1e 25%,#d62976 55%,#962fbf 80%,#4f5bd5) !important; color: #fff !important; }
.soon-row { display: grid; gap: 2px; margin-top: 22px; padding: 14px 16px; border-radius: 16px; border: 1px dashed var(--hairline); color: var(--secondary); }
.soon-row span { font-weight: 700; color: var(--text); }
.kpis { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; margin: 16px 0 6px; }
.kpis > div { display: grid; gap: 2px; padding: 14px; border-radius: 18px; background: var(--glass); border: 1px solid var(--hairline); }
.kpis span { font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--secondary); }
.kpis strong { font-size: 1.6rem; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpis small { font-size: .74rem; color: var(--secondary); }
@media (max-width: 520px) { .kpis { grid-template-columns: repeat(2, minmax(0,1fr)); } }
.bars { display: flex; align-items: flex-end; gap: 2px; height: 160px; padding: 8px 4px 0; border-bottom: 1px solid var(--hairline); }
.bar { flex: 1; height: 100%; min-height: 0; padding: 0; border: 0; border-radius: 0; background: none; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; }
.bar span { display: block; width: 100%; max-width: 26px; background: color-mix(in srgb, var(--accent) 55%, transparent); border-radius: 4px 4px 0 0; transition: background .15s; }
.bar.best span { background: var(--accent-2); }
.bar.active span, .bar:hover span { background: var(--accent); }
.bar em { position: absolute; top: -2px; font-style: normal; font-size: .72rem; font-weight: 700; color: var(--text); }
.bar-detail { min-height: 1.5em; margin-top: 8px; display: grid; gap: 2px; font-size: .9rem; }
.top-post { display: flex; gap: 12px; align-items: flex-start; text-decoration: none; color: var(--text); font-size: .95rem; }
.top-post > span:last-child, .bar-detail { display: grid; gap: 3px; }
.post-type { font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--secondary); }
.post-metrics { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .82rem; font-weight: 600; color: var(--secondary); font-variant-numeric: tabular-nums; }
.medal { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: #0c0a1d; font-weight: 800; font-size: .85rem; }
.all-posts { margin-top: 16px; }
.analysis { display: grid; gap: 12px; }
.analysis-summary { font-size: 1.05rem; color: var(--text); font-weight: 600; }
.analysis-block { padding: 14px 16px; border-radius: 18px; border: 1px solid var(--hairline); background: var(--glass); }
.analysis-block ul { margin: 6px 0 0; padding-left: 1.1em; color: var(--text); }
.analysis-block.good strong::before { content: '▲ '; color: #7be3a8; }
.analysis-block.fix strong::before { content: '● '; color: #ffcf6a; }
.next-title { margin-top: 6px; }
.next-idea { padding: 16px; border-radius: 20px; background: linear-gradient(var(--surface-2), var(--surface-2)) padding-box, var(--grad) border-box; border: 1.5px solid transparent; }
.next-idea p { margin: 0 0 6px; color: var(--text); }
.next-idea button { margin-top: 6px; }
.post-metrics { display: flex !important; flex-direction: row !important; } .post-metrics > span { display: inline !important; }
.caption-styles { grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)) !important; display: grid; }
.cover-designer { margin-top: 20px; padding: 16px; border-radius: 22px; border: 1px solid var(--hairline); background: var(--glass); display: grid; gap: 12px; }
.cover-designer h3 { margin: 0; }
.cover-stage { display: grid; place-items: center; }
.cover-stage canvas { width: min(100%, 260px); aspect-ratio: 9 / 16; border-radius: 16px; box-shadow: var(--shadow); background: #000; }
.cover-controls { display: grid; gap: 8px; }
.cover-controls input[type=range] { width: 100%; accent-color: var(--accent); }
.cover-layouts { grid-template-columns: repeat(3, 1fr) !important; display: grid; }
.cover-layouts button[aria-checked=true] { background: var(--glass-strong); color: var(--text); }
@media (min-width: 640px) { .cover-designer { grid-template-columns: 260px 1fr; align-items: start; } .cover-designer h3 { grid-column: 1 / -1; } }
.cover-layouts button { font-size: .85rem; padding: 8px 6px; white-space: nowrap; }

/* ═══════════════════ Voto e playbook ═══════════════════ */
.video-score { margin-bottom: 18px; }
.score-head { display: flex; gap: 16px; align-items: center; }
.score-head h2 { margin: 2px 0 4px; }
.score-head p { margin: 0; font-size: .92rem; }
.score-ring { --p: 0; flex: none; width: 96px; height: 96px; border-radius: 50%; display: grid; place-content: center; text-align: center; position: relative;
  background: conic-gradient(var(--accent-2) calc(var(--p) * 1%), var(--glass-strong) 0); }
.score-ring::before { content: ''; position: absolute; inset: 8px; border-radius: 50%; background: var(--surface-2); }
.score-ring > * { position: relative; }
.score-ring strong { font-size: 2rem; line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.score-ring span { font-size: .72rem; color: var(--secondary); }
.score-items { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 6px; }
.score-items li { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 10px 12px; border-radius: 14px; background: var(--glass); border: 1px solid var(--hairline); font-size: .9rem; }
.score-items li[data-good=true] span::before { content: '✓ '; color: #7be3a8; font-weight: 800; }
.score-items li[data-good=false] span::before { content: '↑ '; color: #ffcf6a; font-weight: 800; }
.score-items b { font-variant-numeric: tabular-nums; }
.score-items small { grid-column: 1 / -1; color: var(--secondary); }
.score-personal { margin-top: 12px; padding: 14px 16px; border-radius: 18px; background: var(--grad-soft); border: 1px solid var(--hairline); }
.score-personal ul { margin: 6px 0 0; padding-left: 1.1em; }
.playbook-lines { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.playbook-lines li { display: grid; gap: 2px; padding: 14px 16px; border-radius: 18px; background: linear-gradient(var(--surface-2), var(--surface-2)) padding-box, var(--grad) border-box; border: 1.5px solid transparent; }
.playbook-lines small { color: var(--secondary); }
.playbook-learning { display: grid; gap: 4px; padding: 16px; border-radius: 18px; border: 1px dashed var(--hairline); }
.playbook-learning span { color: var(--secondary); font-size: .92rem; }
.playbook-videos { margin-top: 12px; }
.playbook-video { display: grid; gap: 4px; font-size: .95rem; }
.playbook-video select { margin-top: 4px; width: 100%; }
.linked { color: #7be3a8 !important; }
.playbook-badge { display: inline-block; padding: 6px 12px; border-radius: 99px; background: var(--grad); color: #0c0a1d; font-weight: 700; font-size: .85rem; }

/* ——— Ripresa: schermo ordinato ———
   Tre fasce che non si sovrappongono mai: in alto i comandi e i segnali (fuori dall'immagine),
   al centro l'inquadratura con solo titolo, tempo e livello del microfono, in basso un'unica riga
   di messaggi sopra il pulsante di registrazione. */
body.camera-live {
  --cam-top: calc(env(safe-area-inset-top) + 66px);
  --cam-bottom: calc(env(safe-area-inset-bottom) + 172px);
  --cam-left: 8px; --cam-right: 8px;
  --cam-h: calc(100dvh - var(--cam-top) - var(--cam-bottom));
  --cam-w: calc(100vw - var(--cam-left) - var(--cam-right));
}
body.camera-live .capture-desk { background: #05050a; }
body.camera-live .capture-desk .camera-coach,
body.camera-live .capture-desk .camera-coach[data-format] {
  inset: var(--cam-top) var(--cam-right) var(--cam-bottom) var(--cam-left); margin: auto; aspect-ratio: auto; max-height: none; border-radius: 18px;
}
body.camera-live .capture-desk .camera-coach[data-format=portrait] { width: min(var(--cam-w), calc(var(--cam-h) * 9 / 16)); height: min(var(--cam-h), calc(var(--cam-w) * 16 / 9)); }
body.camera-live .capture-desk .camera-coach[data-format=landscape] { width: min(var(--cam-w), calc(var(--cam-h) * 16 / 9)); height: min(var(--cam-h), calc(var(--cam-w) * 9 / 16)); }
body.camera-live .camera-grid { opacity: .35; }
body.camera-live .fx-level span { height: 1px; opacity: .7; }

/* Fascia alta: chiudi · segnali · strumenti */
body.camera-live .capture-signals {
  top: calc(env(safe-area-inset-top) + 16px); left: 10px; right: 62px; flex-wrap: nowrap; gap: 5px; justify-content: center;
}
body.camera-live .capture-signals div { padding: 4px 9px 4px 7px; gap: 5px; background: #16162a; border-color: #ffffff14; min-width: 0; }
body.camera-live .capture-signals dd { font-size: .72rem; font-weight: 600; white-space: nowrap; }
body.camera-live .capture-signals div::before { flex: none; }
body.camera-live .capture-signals div:has(.capture-warn) { background: #3a2a0c; border-color: #ffb54766; }
body.camera-live .capture-signals [data-signal=frame] dd::before { content: "▭ "; color: #b6adff; }
body.camera-live .capture-signals [data-signal=light] dd::before { content: "☀︎ "; color: #ffd15c; }
body.camera-live .capture-signals [data-signal=mic] dd::before { content: "🎙︎ "; color: #8edaff; }
body.camera-rolling .capture-signals { opacity: .75; }

/* Sull'inquadratura: titolo, tempo, microfono, viso. Nient'altro. */
body.camera-live .fx-title { top: 10px; left: 10px; max-width: 62%; font-size: .76rem; padding: 5px 11px; }
body.camera-live .take-clock { top: 10px; right: 10px; font-size: .8rem; }
body.camera-live .fx-mic { top: 44px; left: 10px; height: 26px; }
body.camera-live .face-indicator { top: calc(var(--cam-top) + 46px); font-size: .74rem; }
body.camera-live .capture-desk > .fx-prompter, body.camera-live .fx-prompter {
  top: calc(var(--cam-top) + 80px); left: calc(var(--cam-left) + 14px); right: calc(var(--cam-right) + 14px); height: 26dvh;
}

/* Un'unica riga di messaggi sopra i comandi: l'avviso vince sul suggerimento */
body.camera-live .camera-cue,
body.camera-live .capture-alert,
body.camera-live main output:not(:empty) {
  position: fixed; z-index: 46; left: 50%; right: auto; top: auto; bottom: calc(env(safe-area-inset-bottom) + 120px); transform: translateX(-50%);
  width: max-content; max-width: calc(100vw - 32px); margin: 0; padding: 8px 14px; border-radius: 14px;
  font-size: .84rem; line-height: 1.3; text-align: center; box-shadow: 0 8px 24px #0008;
}
body.camera-live .camera-cue { background: #1b1b30; color: #e9e8ff; opacity: 1; }
body.camera-rolling .camera-cue { opacity: .9; }
body.camera-live .capture-desk:has(.capture-alert:not([hidden]):not(:empty)) .camera-cue,
body.camera-live:has(main output:not(:empty)) .camera-cue,
body.camera-live:has(main output:not(:empty)) .capture-alert { display: none; }
body.camera-live .fx-micstatus { bottom: calc(env(safe-area-inset-bottom) + 170px); }
body.camera-live .capture-actions { background: #05050a; padding-top: 14px; }

/* Telefono girato: comandi e segnali in colonna a destra, immagine al centro */
@media (orientation: landscape) and (max-height: 540px) {
  body.camera-live {
    --cam-top: calc(env(safe-area-inset-top) + 8px); --cam-bottom: calc(env(safe-area-inset-bottom) + 8px);
    --cam-left: calc(env(safe-area-inset-left) + 64px); --cam-right: calc(env(safe-area-inset-right) + 132px);
  }
  body.camera-live .capture-actions { width: 124px; background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; pointer-events: none; padding-top: 12px; justify-content: flex-end; padding-bottom: calc(env(safe-area-inset-bottom) + 16px); }
  body.camera-live .capture-tools { left: auto; right: calc(env(safe-area-inset-right) + 40px); }
  body.camera-live .capture-tools .actions { left: auto; right: 0; }
  body.camera-live .capture-signals {
    top: calc(env(safe-area-inset-top) + 62px); left: auto; right: calc(env(safe-area-inset-right) + 8px); width: 112px;
    flex-direction: column; align-items: stretch; gap: 5px;
  }
  body.camera-live .capture-signals div { justify-content: flex-start; }
  body.camera-live .capture-actions > * { pointer-events: auto; }
  body.camera-live .camera-cue, body.camera-live .capture-alert, body.camera-live main output:not(:empty) {
    bottom: calc(env(safe-area-inset-bottom) + 18px); left: calc(var(--cam-left) + (100vw - var(--cam-left) - var(--cam-right)) / 2);
    max-width: calc(100vw - var(--cam-left) - var(--cam-right) - 24px); background-color: #101020e6;
  }
  body.camera-live .capture-alert { background: #2a1d07ee; }
  body.camera-live .capture-desk > .fx-prompter, body.camera-live .fx-prompter { top: calc(var(--cam-top) + 44px); height: 40dvh; }
  body.camera-live .face-indicator { top: calc(var(--cam-top) + 12px); left: calc(var(--cam-left) + (100vw - var(--cam-left) - var(--cam-right)) / 2); }
  body.camera-live .fx-micstatus { bottom: calc(env(safe-area-inset-bottom) + 64px); }
  body.camera-live #stop-camera { position: fixed; top: calc(env(safe-area-inset-top) + 10px); left: calc(env(safe-area-inset-left) + 10px); }
  body.camera-live .capture-actions button:not(#record):not(#stop-camera) { font-size: .74rem; padding: 6px 10px; max-width: 108px; }
  body.camera-live #shot-guide { top: 10px; bottom: auto; left: calc(var(--cam-left) + (100vw - var(--cam-left) - var(--cam-right)) / 2); width: min(46vw, 340px); padding: 6px; }
  body.camera-live #shot-guide canvas { max-height: calc(100dvh - 90px); object-fit: contain; }
}

/* Scelta del formato */
.orient-why { color: var(--secondary); }
.orient-card { display: flex !important; align-items: center; gap: 16px; text-align: left; }
.orient-text { display: grid; gap: 4px; }
.orient-text strong { font-size: 1.05rem; }
.orient-badge { font-style: normal; font-size: .7rem; font-weight: 700; margin-left: 6px; padding: 2px 8px; border-radius: 999px; background: var(--accent); color: #111; vertical-align: middle; }
.orient-icon { flex: none; display: block; border: 2.5px solid currentColor; border-radius: 7px; opacity: .85; }
.orient-portrait { width: 30px; height: 50px; }
.orient-landscape { width: 50px; height: 30px; margin-block: 10px; }
.bp-brand { margin: 10px 0; padding: 10px 14px; border-radius: 14px; background: #46e69f14; border: 1px solid #46e69f44; font-size: .9rem; }

/* ——— Pannello di controllo e agenzie ——— */
.control-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 14px 0; }
.control-stats div { padding: 12px 8px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); text-align: center; }
.control-stats strong { display: block; font-size: 1.35rem; line-height: 1.1; }
.control-stats span { font-size: .74rem; color: var(--secondary); }
.control-stats [data-tone=warn] strong { color: #ffb547; }
.control-stats [data-tone=ok] strong { color: #46e69f; }
.control-tabs { margin: 10px 0 12px; flex-wrap: wrap; }
.control-tabs b { font-weight: 700; opacity: .7; margin-left: 2px; }
#control-search { width: 100%; margin-bottom: 12px; }
.control-list { display: grid; gap: 10px; }
.control-user { padding: 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.control-user[data-status=pending] { border-color: #ffb54766; }
.control-user-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.control-user-head > div { display: grid; gap: 2px; min-width: 0; }
.control-user-head span { font-size: .85rem; color: var(--secondary); }
.status-pill { flex: none; font-style: normal; font-size: .72rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: #ffffff14; }
.status-pill[data-status=pending] { background: #ffb54733; color: #ffd08a; }
.status-pill[data-status=active] { background: #46e69f26; color: #7ff0bd; }
.status-pill[data-status=suspended], .status-pill[data-status=rejected], .status-pill[data-status=expired] { background: #ff657726; color: #ff9aa6; }
.control-contacts, .control-meta { margin: 8px 0 0; font-size: .85rem; overflow-wrap: anywhere; }
.control-meta { color: var(--secondary); }
.control-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.control-actions button { min-height: 38px; padding: 6px 14px; font-size: .85rem; }
.control-invite { display: grid; gap: 6px; padding: 12px 14px; margin: 10px 0; border-radius: 14px; border: 1px dashed var(--line); }
.control-invite code, .control-meta code { font-size: .8rem; overflow-wrap: anywhere; }
.control-detail { display: grid; gap: 6px; margin: 12px 0 18px; }
.control-detail div { display: grid; grid-template-columns: 96px 1fr; gap: 8px; font-size: .9rem; }
.control-detail dt { color: var(--secondary); }
.control-detail dd { margin: 0; overflow-wrap: anywhere; }
.control-danger { margin-top: 22px; padding: 12px 14px; border-radius: 14px; border: 1px solid #ff657755; }
.control-danger summary { cursor: pointer; color: #ff9aa6; font-weight: 700; }
.agency-logo { width: 40px; height: 40px; object-fit: contain; border-radius: 8px; background: #fff; padding: 3px; margin-bottom: 4px; }
.agency-badge { display: inline-flex; align-items: center; gap: 6px; margin-left: 8px; padding: 3px 10px 3px 4px; border-radius: 999px; font-size: .72rem; color: var(--secondary); border: 1px solid var(--agency, var(--line)); white-space: nowrap; max-width: 46vw; overflow: hidden; text-overflow: ellipsis; }
.agency-badge img { width: 22px; height: 22px; object-fit: contain; border-radius: 6px; background: #fff; }
.agency-badge strong { color: var(--text); }
.agency-invite { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.agency-invite img { width: 36px; height: 36px; object-fit: contain; border-radius: 8px; background: #fff; padding: 2px; }
.site-admin { opacity: .6; }
