/* ═══════════════════════════════════════════════════════════════
   T-SHIRT LAB BY INANA — Design System
   Brand: navy profondo · sky blue #38BDF8 · viola #B073FF
   ═══════════════════════════════════════════════════════════════ */

:root {
  --bg-0: #030713;
  --bg-1: #050B1F;
  --bg-2: #0A1535;
  --bg-card: rgba(10, 21, 53, 0.72);
  --accent: #38BDF8;
  --accent-soft: #7BB9FF;
  --violet: #B073FF;
  --violet-deep: #7C3AED;
  --text-1: #F2F6FF;
  --text-2: #94A3B8;
  --success: #10B981;
  --error: #EF4444;
  --border: rgba(56, 189, 248, 0.18);
  --font-display: 'Fredoka', sans-serif;
  --font-body: 'Nunito', sans-serif;
  --radius: 14px;
  --nav-h: 76px;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

[hidden] { display: none !important; }

html, body {
  height: 100%;
  background: var(--bg-0);
  color: var(--text-1);
  font-family: var(--font-body);
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  background:
    radial-gradient(1200px 700px at 75% -10%, rgba(124, 58, 237, 0.16), transparent 60%),
    radial-gradient(900px 600px at -10% 40%, rgba(56, 189, 248, 0.10), transparent 55%),
    linear-gradient(175deg, var(--bg-1) 0%, var(--bg-0) 70%, #000 100%);
}

::selection { background: rgba(56, 189, 248, 0.35); }

/* ── Scrollbar ─────────────────────────────── */
.step-viewport::-webkit-scrollbar { width: 6px; }
.step-viewport::-webkit-scrollbar-thumb { background: rgba(56, 189, 248, 0.25); border-radius: 3px; }

/* ═══════════ LOADER ═══════════ */
.loader {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center;
  background:
    radial-gradient(900px 500px at 70% 0%, rgba(124, 58, 237, 0.20), transparent 60%),
    linear-gradient(175deg, var(--bg-1), var(--bg-0));
  transition: opacity 0.7s ease, visibility 0.7s;
}
.loader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-inner { display: flex; flex-direction: column; align-items: center; gap: 18px; width: min(320px, 80vw); }
.loader-logo {
  width: 96px; height: 96px; border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(176, 115, 255, 0.35), 0 0 42px rgba(124, 58, 237, 0.45);
  animation: loader-float 3s ease-in-out infinite;
}
@keyframes loader-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.loader-title {
  font-family: var(--font-display); font-size: 2rem; font-weight: 600; letter-spacing: 0.5px;
  background: linear-gradient(90deg, var(--accent-soft), var(--violet));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.loader-title span { font-weight: 700; }
.loader-bar-track {
  width: 100%; height: 6px; border-radius: 3px;
  background: rgba(255, 255, 255, 0.08); overflow: hidden;
}
.loader-bar {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--violet));
  border-radius: 3px; box-shadow: 0 0 14px rgba(56, 189, 248, 0.8);
  transition: width 0.3s ease;
}
.loader-msg { color: var(--text-2); font-size: 0.9rem; min-height: 1.4em; font-style: italic; }

/* ═══════════ DOODLES DI SFONDO ═══════════ */
.bg-doodles { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.doodle {
  position: absolute; width: 64px; height: 64px;
  color: rgba(56, 189, 248, 0.10);
  filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.18));
  animation: doodle-drift 16s ease-in-out infinite;
}
.doodle.d1 { top: 8%; left: 4%; animation-delay: 0s; }
.doodle.d2 { top: 68%; left: 8%; width: 52px; color: rgba(176, 115, 255, 0.10); animation-delay: -4s; }
.doodle.d3 { top: 22%; right: 5%; width: 76px; animation-delay: -8s; }
.doodle.d4 { top: 78%; right: 9%; width: 48px; color: rgba(176, 115, 255, 0.09); animation-delay: -12s; }
.doodle.d5 { top: 45%; left: 46%; width: 40px; color: rgba(56, 189, 248, 0.07); animation-delay: -6s; }
@keyframes doodle-drift {
  0%, 100% { transform: translate(0, 0) rotate(-6deg); }
  50% { transform: translate(14px, -22px) rotate(8deg); }
}

/* ═══════════ LAYOUT APP ═══════════ */
.app {
  position: relative; z-index: 1;
  display: flex; flex-direction: column;
  height: 100dvh;
}

/* Colonna 3D */
.stage { position: sticky; top: 0; z-index: 2; flex: none; }
.canvas-wrap {
  position: relative; height: 46dvh; min-height: 300px;
  border-bottom: 1px solid var(--border);
  background: radial-gradient(ellipse 90% 70% at 50% 40%, rgba(30, 42, 94, 0.55), transparent 75%);
}
#three-canvas { width: 100%; height: 100%; display: block; touch-action: none; }

.stage-brand {
  position: absolute; top: 12px; left: 14px;
  display: flex; align-items: center; gap: 9px;
  pointer-events: none; user-select: none;
}
.stage-brand img {
  width: 34px; height: 34px; border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(176, 115, 255, 0.4), 0 0 16px rgba(124, 58, 237, 0.5);
}
.stage-brand span { font-family: var(--font-display); font-size: 1rem; color: var(--text-1); letter-spacing: 0.4px; }
.stage-brand b { color: var(--accent-soft); }
.stage-brand i {
  font-style: normal; font-size: 0.72rem; color: var(--violet); display: block;
  margin-top: -3px; letter-spacing: 1px;
}

.stage-controls {
  position: absolute; right: 12px; bottom: 14px;
  display: flex; flex-direction: column; gap: 10px;
}
.stage-btn {
  width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(10, 21, 53, 0.75); backdrop-filter: blur(8px);
  color: var(--accent-soft); cursor: pointer;
  display: grid; place-items: center;
  transition: transform 0.2s, box-shadow 0.2s, color 0.2s;
}
.stage-btn svg { width: 24px; height: 24px; }
.stage-btn:hover { transform: translateY(-2px); box-shadow: 0 0 16px rgba(56, 189, 248, 0.4); }
.stage-btn.active {
  color: #fff; border-color: var(--accent);
  box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.6);
  animation: pulse-ring 1.6s ease-out infinite;
}
@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.55); }
  100% { box-shadow: 0 0 0 14px rgba(56, 189, 248, 0); }
}

.stage-info { position: absolute; top: 12px; right: 12px; }

.speed-pop {
  position: absolute; right: 70px;
  display: flex; align-items: center; gap: 8px;
  background: rgba(10, 21, 53, 0.85); backdrop-filter: blur(8px);
  border: 1px solid var(--border); border-radius: 999px;
  padding: 8px 14px;
  animation: hint-pop 0.25s ease;
}
@keyframes hint-pop { from { opacity: 0; transform: translateX(8px); } }
#walk-speed { bottom: 70px; }
#rot-speed { bottom: 14px; }
.speed-pop svg { width: 14px; height: 14px; color: var(--accent-soft); flex: none; }
.speed-pop input[type="range"] {
  width: 110px; -webkit-appearance: none; appearance: none; height: 4px; border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--violet)); outline: none;
}
.speed-pop input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; border: 3px solid var(--accent); cursor: pointer;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.7);
}
.speed-pop output { font-size: 0.7rem; color: var(--accent-soft); width: 36px; text-align: right; font-variant-numeric: tabular-nums; }

/* Info prodotto (modal) */
.pi-sub { color: var(--accent-soft); font-size: 0.85rem; margin: -6px 0 14px; font-weight: 700; }
.pi-list { list-style: none; }
.pi-list li {
  font-size: 0.86rem; padding: 7px 0 7px 22px; position: relative;
  border-bottom: 1px solid rgba(56, 189, 248, 0.08); color: var(--text-1);
}
.pi-list li::before { content: '✦'; position: absolute; left: 2px; color: var(--violet); font-size: 0.7rem; }

.drag-hint {
  position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 8px;
  font-size: 0.78rem; color: var(--accent-soft);
  background: rgba(10, 21, 53, 0.8); backdrop-filter: blur(8px);
  border: 1px solid var(--border); border-radius: 999px;
  padding: 7px 14px; white-space: nowrap;
  animation: hint-bob 2.4s ease-in-out infinite;
}
.drag-hint svg { width: 16px; height: 16px; flex: none; }
@keyframes hint-bob { 0%, 100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(-4px); } }

/* Colonna pannello */
.panel { flex: 1; display: flex; flex-direction: column; min-height: 0; position: relative; z-index: 1; }

.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 16px 8px;
}
.price-tag {
  display: flex; flex-direction: column; line-height: 1.1;
  padding: 6px 14px; border-radius: 12px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.12), rgba(124, 58, 237, 0.12));
  border: 1px solid var(--border);
}
.price-label { font-size: 0.62rem; text-transform: uppercase; letter-spacing: 1.5px; color: var(--text-2); }
.price-value {
  font-family: var(--font-display); font-size: 1.25rem; font-weight: 600;
  color: var(--accent-soft); text-shadow: 0 0 18px rgba(56, 189, 248, 0.5);
  transition: transform 0.2s;
}
.price-value.bump { animation: price-bump 0.45s ease; }
@keyframes price-bump { 30% { transform: scale(1.16); color: #fff; } }

.progress { display: flex; align-items: center; gap: 7px; }
.progress-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  position: relative; cursor: pointer; border: none; padding: 0;
  transition: background 0.3s, box-shadow 0.3s, transform 0.3s;
}
.progress-dot.done { background: var(--success); }
.progress-dot.active {
  background: var(--accent); transform: scale(1.35);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.9);
}
.progress-dot:disabled { cursor: default; }

/* ═══════════ STEP CONTENT ═══════════ */
.step-viewport { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 4px 16px calc(var(--nav-h) + 14px); }
.step-content { max-width: 620px; margin: 0 auto; }

.step-kicker {
  font-size: 0.68rem; letter-spacing: 2.5px; text-transform: uppercase;
  color: var(--violet); font-weight: 800; margin-bottom: 6px;
}
.step-title {
  font-family: var(--font-display); font-weight: 600; font-size: 1.5rem;
  margin-bottom: 4px; letter-spacing: 0.3px;
}
.step-sub { color: var(--text-2); font-size: 0.92rem; margin-bottom: 18px; }

/* Intro */
.intro-hero { text-align: center; padding-top: 12px; }
.intro-hero .step-title {
  font-size: 2rem;
  background: linear-gradient(90deg, #fff 20%, var(--accent-soft) 60%, var(--violet));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.intro-features {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px;
  margin-top: 20px; text-align: left;
}
.intro-feat {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px;
}
.intro-feat svg { width: 22px; height: 22px; color: var(--accent); flex: none; margin-top: 1px; }
.intro-feat b { display: block; font-size: 0.85rem; font-family: var(--font-display); font-weight: 500; letter-spacing: 0.3px; }
.intro-feat span { font-size: 0.75rem; color: var(--text-2); }

/* Swatches colore */
.swatch-grid { display: flex; flex-wrap: wrap; gap: 14px; padding: 6px 2px; }
.swatch {
  position: relative; width: 52px; height: 52px; border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, 0.14); cursor: pointer; padding: 0;
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), border 0.2s, box-shadow 0.25s;
}
.swatch:hover { transform: scale(1.1); }
.swatch.selected {
  border-color: var(--accent); transform: scale(1.15);
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.8);
}
.swatch.selected::after {
  content: '✓'; position: absolute; inset: 0; display: grid; place-items: center;
  color: #fff; font-weight: 900; font-size: 1.15rem;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.85);
}
.swatch.soldout { opacity: 0.35; cursor: not-allowed; filter: saturate(0.3); }
.swatch.soldout::before {
  content: ''; position: absolute; left: 8%; top: 47%; width: 84%; height: 2.5px;
  background: var(--error); transform: rotate(-40deg); border-radius: 2px;
}
.swatch.shake { animation: shake 0.4s; }
@keyframes shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
.swatch-name {
  margin-top: 14px; font-size: 0.95rem; color: var(--text-2);
  min-height: 1.4em;
}
.swatch-name b { color: var(--text-1); }

/* Taglie */
.size-row { display: flex; flex-wrap: wrap; gap: 10px; }
.size-pill {
  min-width: 58px; padding: 13px 16px; border-radius: 12px;
  background: var(--bg-card); border: 1.5px solid var(--border);
  color: var(--text-1); font-family: var(--font-display); font-weight: 500; font-size: 1rem;
  cursor: pointer; text-align: center;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), border 0.2s, box-shadow 0.25s, background 0.25s;
}
.size-pill:hover { transform: translateY(-2px); }
.size-pill.selected {
  border-color: var(--accent);
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.22), rgba(124, 58, 237, 0.18));
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.55);
  transform: translateY(-2px) scale(1.06);
}
.size-pill.unavailable {
  opacity: 0.38; cursor: not-allowed; text-decoration: line-through;
  background: rgba(107, 114, 128, 0.12);
}
.size-pill .nd { display: block; font-size: 0.55rem; letter-spacing: 1px; color: var(--error); text-decoration: none; }
.size-guide-link {
  margin-top: 18px; display: inline-flex; align-items: center; gap: 8px;
  color: var(--accent-soft); background: none; border: none;
  font-family: var(--font-body); font-size: 0.9rem; cursor: pointer;
  border-bottom: 1px dashed rgba(56, 189, 248, 0.4); padding-bottom: 2px;
}
.size-guide-link:hover { color: #fff; }

/* Tabs macro aree */
.tabs { display: flex; gap: 8px; margin-bottom: 16px; overflow-x: auto; padding-bottom: 4px; }
.tab {
  padding: 9px 16px; border-radius: 999px; white-space: nowrap;
  background: var(--bg-card); border: 1.5px solid var(--border);
  color: var(--text-2); font-family: var(--font-display); font-weight: 500; font-size: 0.85rem;
  letter-spacing: 0.8px; cursor: pointer;
  transition: all 0.25s;
}
.tab:hover { color: var(--text-1); }
.tab.active {
  color: #fff; border-color: var(--accent);
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.25), rgba(124, 58, 237, 0.2));
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.4);
}
.tab .badge-done {
  display: inline-grid; place-items: center; width: 16px; height: 16px;
  background: var(--success); color: #fff; border-radius: 50%;
  font-size: 0.62rem; margin-left: 6px; vertical-align: 1px;
}

/* Card area di stampa */
.area-card {
  background: var(--bg-card); border: 1.5px solid var(--border);
  border-radius: var(--radius); margin-bottom: 12px; overflow: hidden;
  backdrop-filter: blur(8px);
  transition: border-color 0.3s, box-shadow 0.3s;
}
.area-card.on { border-color: rgba(56, 189, 248, 0.55); box-shadow: 0 0 18px rgba(56, 189, 248, 0.18); }
.area-head {
  display: flex; align-items: center; gap: 12px;
  padding: 14px; cursor: pointer; user-select: none;
}
.area-check {
  width: 24px; height: 24px; border-radius: 8px; flex: none;
  border: 2px solid rgba(148, 163, 184, 0.5);
  display: grid; place-items: center;
  transition: all 0.25s; color: transparent; font-size: 0.85rem; font-weight: 900;
}
.area-card.on .area-check {
  background: linear-gradient(135deg, var(--accent), var(--violet-deep));
  border-color: transparent; color: #fff;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.6);
}
.area-info { flex: 1; min-width: 0; }
.area-info b { font-family: var(--font-display); font-weight: 500; font-size: 0.98rem; display: block; }
.area-info small { color: var(--text-2); font-size: 0.74rem; }
.area-price { font-family: var(--font-display); color: var(--accent-soft); font-weight: 600; font-size: 0.95rem; white-space: nowrap; }
.area-body { display: none; padding: 0 14px 14px; }
.area-card.on .area-body { display: block; animation: area-open 0.35s ease; }
@keyframes area-open { from { opacity: 0; transform: translateY(-8px); } }

/* Upload zone */
.upzone {
  display: block; /* label è inline di default: il bordo si frammenterebbe */
  border: 2px dashed rgba(56, 189, 248, 0.4); border-radius: 12px;
  padding: 20px 14px; text-align: center; cursor: pointer;
  transition: all 0.25s; position: relative;
}
.upzone:hover, .upzone.dragover {
  border-color: var(--accent); background: rgba(56, 189, 248, 0.07);
  box-shadow: inset 0 0 24px rgba(56, 189, 248, 0.08);
}
.upzone.dragover { animation: up-pulse 1s infinite; }
@keyframes up-pulse { 50% { border-color: var(--violet); } }
.upzone svg { width: 30px; height: 30px; color: var(--accent); margin-bottom: 6px; }
.upzone b { display: block; font-size: 0.9rem; font-weight: 700; }
.upzone small { color: var(--text-2); font-size: 0.72rem; }
.upzone input { display: none; }
.upzone .spinner { margin: 4px auto; }

/* Editor immagine */
.img-editor { margin-top: 12px; }
.img-editor-preview {
  display: flex; align-items: center; gap: 12px; margin-bottom: 12px;
  background: rgba(3, 7, 19, 0.5); border-radius: 10px; padding: 10px;
  border: 1px solid rgba(56, 189, 248, 0.15);
}
.img-editor-preview img.thumb {
  width: 56px; height: 56px; object-fit: contain;
  background:
    conic-gradient(rgba(255,255,255,0.09) 90deg, transparent 90deg 180deg, rgba(255,255,255,0.09) 180deg 270deg, transparent 270deg) 0 0/14px 14px;
  border-radius: 8px;
}
.img-editor-preview .fmeta { flex: 1; min-width: 0; }
.img-editor-preview .fmeta b { font-size: 0.8rem; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.img-editor-preview .fmeta small { color: var(--text-2); font-size: 0.7rem; }
.btn-icon-sm {
  background: none; border: 1px solid rgba(239, 68, 68, 0.4); color: var(--error);
  width: 34px; height: 34px; border-radius: 9px; cursor: pointer; font-size: 0.9rem;
  transition: all 0.2s; flex: none;
}
.btn-icon-sm:hover { background: rgba(239, 68, 68, 0.15); }

.slider-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
/* il cursore della scala si è fermato: spieghiamo perché, altrimenti sembra rotto */
.avviso-scala {
  margin: -4px 0 10px 74px; padding: 6px 10px; border-radius: 8px;
  font-size: 0.68rem; line-height: 1.35; color: #FCD9A0;
  background: rgba(245, 158, 11, 0.12); border: 1px solid rgba(245, 158, 11, 0.3);
}
.slider-row svg { width: 18px; height: 18px; color: var(--text-2); flex: none; }
.slider-row label { font-size: 0.72rem; color: var(--text-2); width: 64px; flex: none; }
.slider-row input[type="range"] {
  flex: 1; -webkit-appearance: none; appearance: none; height: 4px; border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--violet)); outline: none;
}
.slider-row input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; border: 3px solid var(--accent); cursor: pointer;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.7);
}
.slider-row output { font-size: 0.72rem; color: var(--accent-soft); width: 42px; text-align: right; font-variant-numeric: tabular-nums; }
.editor-actions { display: flex; gap: 8px; }
.btn-mini {
  flex: 1; padding: 9px; border-radius: 9px; border: 1px solid var(--border);
  background: rgba(56, 189, 248, 0.08); color: var(--text-1);
  font-family: var(--font-body); font-size: 0.76rem; font-weight: 700; cursor: pointer;
  transition: all 0.2s;
}
.btn-mini:hover { background: rgba(56, 189, 248, 0.18); }

/* Box cards */
.box-cards { display: grid; gap: 12px; }
.box-card {
  position: relative; text-align: left;
  background: var(--bg-card); border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 16px; cursor: pointer;
  font-family: var(--font-body); color: var(--text-1);
  transition: transform 0.25s, border-color 0.3s, box-shadow 0.3s;
  display: flex; gap: 14px; align-items: center;
}
.box-card:hover { transform: translateY(-2px); }
.box-card.selected {
  border-color: var(--accent);
  box-shadow: 0 0 22px rgba(56, 189, 248, 0.35), inset 0 0 30px rgba(56, 189, 248, 0.05);
  transform: translateY(-2px);
}
.box-card .bc-icon {
  width: 46px; height: 46px; flex: none; color: var(--accent);
  display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.14), rgba(124, 58, 237, 0.14));
  border-radius: 12px;
}
.box-card .bc-icon svg { width: 26px; height: 26px; }
.box-card b { font-family: var(--font-display); font-weight: 600; font-size: 1.02rem; display: block; }
.box-card p { color: var(--text-2); font-size: 0.78rem; margin-top: 2px; }
.box-card .bc-price { margin-left: auto; font-family: var(--font-display); color: var(--accent-soft); font-weight: 600; white-space: nowrap; }
.box-card.selected::after {
  content: '✓'; position: absolute; top: -9px; right: -9px;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--success); color: #fff; font-weight: 900;
  display: grid; place-items: center; font-size: 0.8rem;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.7);
}
.box-colors { margin-top: 22px; }
.box-colors h3 { font-family: var(--font-display); font-weight: 500; font-size: 0.95rem; margin-bottom: 10px; letter-spacing: 0.3px; }

/* Riepilogo */
.summary-block {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px; margin-bottom: 12px;
}
.summary-block h3 {
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-display); font-weight: 500; font-size: 0.82rem;
  letter-spacing: 2px; text-transform: uppercase; color: var(--violet);
  margin-bottom: 10px;
}
.summary-block h3 button {
  background: none; border: none; color: var(--accent-soft); cursor: pointer;
  font-size: 0.74rem; font-family: var(--font-body); font-weight: 700;
  display: inline-flex; align-items: center; gap: 4px;
  letter-spacing: 0; text-transform: none;
}
.summary-block h3 button:hover { text-decoration: underline; }
.summary-row {
  display: flex; justify-content: space-between; gap: 10px;
  font-size: 0.88rem; padding: 5px 0; align-items: center;
}
.summary-row .lbl { color: var(--text-2); }
.summary-row .val { font-weight: 700; display: flex; align-items: center; gap: 8px; }
.summary-row .val .chip {
  width: 18px; height: 18px; border-radius: 50%; display: inline-block;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
}
.summary-row.total {
  border-top: 1.5px solid var(--border); margin-top: 8px; padding-top: 12px;
  font-family: var(--font-display); font-size: 1.15rem; font-weight: 600;
}
.summary-row.total .val { color: var(--accent-soft); text-shadow: 0 0 16px rgba(56, 189, 248, 0.5); }
.summary-thumb {
  width: 40px; height: 40px; object-fit: contain; border-radius: 7px;
  background: rgba(255, 255, 255, 0.06);
}

/* ═══════════ NAVBAR ═══════════ */
.navbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 5;
  height: var(--nav-h);
  display: flex; gap: 12px; align-items: center;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, transparent, rgba(3, 7, 19, 0.88) 30%);
  backdrop-filter: blur(10px);
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 13px; border: none; cursor: pointer;
  font-family: var(--font-display); font-weight: 600; font-size: 1rem; letter-spacing: 0.4px;
  padding: 15px 22px; position: relative; overflow: hidden;
  transition: transform 0.18s, box-shadow 0.18s, opacity 0.2s;
}
.btn svg { width: 19px; height: 19px; }
.btn-primary {
  flex: 1; color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--violet-deep));
  box-shadow: 0 6px 22px rgba(56, 189, 248, 0.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(124, 58, 237, 0.5); }
.btn-primary:active { transform: translateY(0) scale(0.98); }
.btn-primary:disabled { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-ghost {
  color: var(--text-2); background: rgba(148, 163, 184, 0.1);
  border: 1px solid rgba(148, 163, 184, 0.22);
}
.btn-ghost:hover { color: var(--text-1); background: rgba(148, 163, 184, 0.18); }
.btn .ripple {
  position: absolute; border-radius: 50%; transform: scale(0);
  background: rgba(255, 255, 255, 0.45);
  animation: ripple 0.55s ease-out forwards; pointer-events: none;
}
@keyframes ripple { to { transform: scale(3.4); opacity: 0; } }

/* ═══════════ MODAL ═══════════ */
.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 18px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(3, 7, 19, 0.7); backdrop-filter: blur(6px); }
.modal-card {
  position: relative; width: min(480px, 94vw); max-height: 84dvh; overflow-y: auto;
  background: linear-gradient(165deg, var(--bg-2), var(--bg-1));
  border: 1px solid var(--border); border-radius: 18px; padding: 24px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6), 0 0 40px rgba(56, 189, 248, 0.08);
}
.modal-close {
  position: absolute; top: 12px; right: 12px;
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--border);
  background: rgba(148, 163, 184, 0.08); color: var(--text-2); cursor: pointer;
  transition: all 0.2s;
}
.modal-close:hover { color: #fff; transform: rotate(90deg); }
.modal h2 { font-family: var(--font-display); font-weight: 600; font-size: 1.3rem; margin-bottom: 14px; }
.size-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.size-table th {
  text-align: left; color: var(--accent-soft); font-family: var(--font-display); font-weight: 500;
  padding: 8px 6px; border-bottom: 1.5px solid var(--border); letter-spacing: 0.5px;
}
.size-table td { padding: 8px 6px; border-bottom: 1px solid rgba(56, 189, 248, 0.08); }
.size-table tr:hover td { background: rgba(56, 189, 248, 0.05); }
.size-note { margin-top: 12px; font-size: 0.72rem; color: var(--text-2); font-style: italic; }

/* Ordine completato */
.order-done { text-align: center; padding: 10px 0; }
.order-done .check-wrap {
  width: 86px; height: 86px; margin: 0 auto 16px; border-radius: 50%;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.25), transparent 70%);
  display: grid; place-items: center;
}
.order-done svg.check { width: 62px; height: 62px; }
.order-done svg.check circle {
  fill: none; stroke: var(--success); stroke-width: 2.4;
  stroke-dasharray: 166; stroke-dashoffset: 166;
  animation: draw-circle 0.7s ease forwards;
}
.order-done svg.check path {
  fill: none; stroke: var(--success); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 48; stroke-dashoffset: 48;
  animation: draw-check 0.45s 0.55s ease forwards;
}
@keyframes draw-circle { to { stroke-dashoffset: 0; } }
@keyframes draw-check { to { stroke-dashoffset: 0; } }
.order-done h2 { margin: 6px 0 8px; }
.order-done p { color: var(--text-2); font-size: 0.9rem; margin-bottom: 6px; }
.order-done .order-id { font-family: monospace; color: var(--accent-soft); font-size: 0.82rem; }
.order-done .btn { margin-top: 16px; width: 100%; }

/* ═══════════ TOAST ═══════════ */
.toasts {
  position: fixed; bottom: calc(var(--nav-h) + 12px); left: 50%; transform: translateX(-50%);
  z-index: 70; display: flex; flex-direction: column; gap: 8px; align-items: center;
  pointer-events: none; width: min(400px, 92vw);
}
.toast {
  display: flex; align-items: center; gap: 10px;
  background: rgba(10, 21, 53, 0.94); backdrop-filter: blur(10px);
  border: 1px solid var(--border); border-radius: 12px;
  padding: 12px 18px; font-size: 0.86rem; width: 100%;
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.5);
}
.toast.err { border-color: rgba(239, 68, 68, 0.5); }
.toast.err::before { content: '⚠'; color: var(--error); }
.toast.ok { border-color: rgba(16, 185, 129, 0.5); }
.toast.ok::before { content: '✓'; color: var(--success); font-weight: 900; }

/* Spinner */
.spinner {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2.5px solid rgba(56, 189, 248, 0.25); border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Confetti canvas */
.confetti-canvas { position: fixed; inset: 0; z-index: 90; pointer-events: none; }

/* Skeleton per demo banner */
.demo-note {
  margin-top: 14px; font-size: 0.7rem; color: var(--text-2);
  border: 1px dashed rgba(148, 163, 184, 0.3); border-radius: 9px; padding: 8px 10px;
}

/* ═══════════ DESKTOP ═══════════ */
@media (min-width: 900px) {
  .app { flex-direction: row; }
  .stage { position: relative; flex: 1.15; height: 100dvh; }
  .canvas-wrap { height: 100dvh; border-bottom: none; border-right: 1px solid var(--border); }
  .panel { flex: 1; max-width: 620px; height: 100dvh; }
  .navbar { position: absolute; }
  .stage-brand img { width: 44px; height: 44px; }
  .stage-brand span { font-size: 1.25rem; }
  .step-title { font-size: 1.75rem; }
  .intro-hero .step-title { font-size: 2.5rem; }
  .topbar { padding: 18px 24px 10px; }
  .step-viewport { padding: 8px 24px calc(var(--nav-h) + 18px); }
  .stage-controls { right: 20px; bottom: 22px; }
  .toasts { left: auto; right: 24px; transform: none; align-items: flex-end; }
}

@media (max-width: 380px) {
  .swatch { width: 44px; height: 44px; }
  .size-pill { min-width: 50px; padding: 11px 12px; }
}

/* ═══════════════════════════════════════════════════════════════
   MODALITÀ OPERATORE · VETRINA · ASSISTENZA LIVE
   ═══════════════════════════════════════════════════════════════ */

/* ── Barre di modalità ── */
.mode-bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  display: flex; align-items: center; justify-content: center; gap: 12px;
  padding: 9px 16px; font-size: 0.82rem;
  backdrop-filter: blur(10px);
}
.mode-bar.admin {
  background: linear-gradient(90deg, rgba(234, 179, 8, 0.22), rgba(234, 179, 8, 0.1));
  border-bottom: 1px solid rgba(234, 179, 8, 0.45); color: #FDE68A;
}
.mode-bar.showcase {
  background: linear-gradient(90deg, rgba(56, 189, 248, 0.18), rgba(124, 58, 237, 0.18));
  border-bottom: 1px solid var(--border); color: var(--text-1);
}
.mode-bar img { width: 26px; height: 26px; border-radius: 50%; }
.mode-bar-link { color: inherit; font-weight: 800; text-decoration: underline; white-space: nowrap; }
body.mode-admin .app, body.mode-showcase .app { padding-top: 38px; }

/* Vetrina: solo modello 3D + riepilogo */
body.mode-showcase .progress,
body.mode-showcase .navbar,
body.mode-showcase .summary-block h3 button,
body.mode-showcase #btn-info { display: none !important; }
body.mode-showcase .step-viewport { padding-bottom: 24px; }

/* ── Lancio assistenza ── */
.assist-launcher {
  position: fixed; left: 16px; bottom: calc(var(--nav-h) + 14px); z-index: 55;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 16px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.9), rgba(124, 58, 237, 0.9));
  color: #fff; font-family: var(--font-body); font-weight: 800; font-size: 0.82rem;
  box-shadow: 0 8px 26px rgba(56, 189, 248, 0.35);
  transition: transform 0.2s, box-shadow 0.2s;
}
.assist-launcher:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(124, 58, 237, 0.5); }
.assist-launcher svg { width: 18px; height: 18px; }

/*
 * Variante nella barra in alto: non è più un riquadro che galleggia sopra il
 * configuratore, ma un pulsante in riga accanto al totale. Più discreto e
 * soprattutto fuori dai piedi mentre si lavora sulla maglia.
 */
.assist-launcher.in-topbar {
  position: static; z-index: auto;
  padding: 7px 13px; font-size: 0.76rem; gap: 6px;
  box-shadow: 0 4px 14px rgba(56, 189, 248, 0.22);
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.22), rgba(124, 58, 237, 0.22));
  border-color: rgba(56, 189, 248, 0.45);
  flex-shrink: 0;
}
.assist-launcher.in-topbar:hover {
  transform: none;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.42), rgba(124, 58, 237, 0.42));
  box-shadow: 0 6px 18px rgba(56, 189, 248, 0.3);
}
.assist-launcher.in-topbar svg { width: 15px; height: 15px; }
/* nascosto senza far saltare la riga: lo spazio resta occupato */
.assist-launcher.in-topbar.open { opacity: 0; pointer-events: none; }
.assist-launcher.open { opacity: 0; pointer-events: none; }
.assist-launcher.pulse { animation: al-pulse 1s ease-in-out 2; }
@keyframes al-pulse { 50% { transform: scale(1.08); box-shadow: 0 0 0 10px rgba(56, 189, 248, 0.18); } }
.al-badge {
  font-style: normal; background: var(--error); color: #fff;
  min-width: 18px; height: 18px; border-radius: 9px; font-size: 0.68rem;
  display: grid; place-items: center; padding: 0 5px;
}

/* ── Pannello chat ── */
.assist-panel {
  position: fixed; left: 16px; bottom: calc(var(--nav-h) + 14px); z-index: 56;
  width: min(340px, calc(100vw - 32px)); max-height: min(70vh, 520px);
  display: flex; flex-direction: column;
  background: linear-gradient(165deg, var(--bg-2), var(--bg-1));
  border: 1px solid var(--border); border-radius: 16px; overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 32px rgba(56, 189, 248, 0.12);
  animation: ap-in 0.28s ease;
}
@keyframes ap-in { from { opacity: 0; transform: translateY(14px); } }
.ap-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 14px; border-bottom: 1px solid var(--border);
  background: rgba(56, 189, 248, 0.07);
}
.ap-head b { font-family: var(--font-display); font-weight: 600; font-size: 0.95rem; display: block; }
.ap-status { font-size: 0.68rem; color: var(--text-2); display: flex; align-items: center; gap: 5px; }
.ap-status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--text-2); }
.ap-status.online::before { background: var(--success); box-shadow: 0 0 7px var(--success); }
.ap-close {
  background: none; border: none; color: var(--text-2); cursor: pointer;
  font-size: 1rem; width: 28px; height: 28px; border-radius: 8px;
}
.ap-close:hover { color: #fff; background: rgba(148, 163, 184, 0.15); }
.ap-msgs { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 7px; }
.ap-msg {
  max-width: 82%; padding: 8px 12px; border-radius: 14px;
  font-size: 0.83rem; line-height: 1.45; word-wrap: break-word;
}
.ap-msg.me { align-self: flex-end; background: linear-gradient(135deg, var(--accent), var(--violet-deep)); color: #fff; border-bottom-right-radius: 4px; }
.ap-msg.them { align-self: flex-start; background: rgba(148, 163, 184, 0.16); border-bottom-left-radius: 4px; }
.ap-msg.sys {
  align-self: center; max-width: 100%; text-align: center;
  background: none; color: var(--text-2); font-size: 0.72rem; font-style: italic;
}
.ap-msg.ai {
  align-self: flex-start; border-bottom-left-radius: 4px;
  background: linear-gradient(135deg, rgba(176, 115, 255, 0.22), rgba(56, 189, 248, 0.16));
  border: 1px solid rgba(176, 115, 255, 0.35);
}
.ap-msg.ai::before {
  content: '🤖 Assistente'; display: block;
  font-size: 0.6rem; letter-spacing: 1px; text-transform: uppercase;
  color: var(--violet); font-weight: 800; margin-bottom: 3px;
}
.ap-att { max-width: 100%; border-radius: 10px; display: block; }
.ap-att-file { color: var(--accent-soft); text-decoration: underline; font-size: 0.8rem; }
.ap-apply {
  margin-top: 7px; width: 100%; font-size: 0.72rem; padding: 6px 8px; border-radius: 8px;
  background: rgba(3, 7, 19, 0.7); color: var(--text-1); border: 1px solid var(--border);
}
.ap-attach {
  display: grid; place-items: center; width: 38px; flex: none; cursor: pointer;
  border-radius: 50%; font-size: 1rem; color: var(--text-2);
  transition: background 0.2s, color 0.2s;
}
.ap-attach:hover { background: rgba(56, 189, 248, 0.14); color: var(--accent-soft); }
/* Avanzamento delle modifiche in corso */
.ap-progress { padding: 8px 14px 12px; border-top: 1px solid rgba(56, 189, 248, 0.12); }
.apr-head {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.72rem; color: var(--accent-soft); font-weight: 700; margin-bottom: 6px;
}
.apr-track { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.09); overflow: hidden; }
.apr-bar {
  height: 100%; width: 0%; border-radius: 3px;
  background: linear-gradient(90deg, var(--accent), var(--violet));
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.7);
  transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.ap-typing { display: flex; gap: 4px; padding: 0 18px 10px; }
.ap-typing span {
  width: 7px; height: 7px; border-radius: 50%; background: var(--violet);
  animation: typing 1.1s infinite;
}
.ap-typing span:nth-child(2) { animation-delay: 0.15s; }
.ap-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes typing { 0%, 60%, 100% { opacity: 0.25; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }

/* Evidenziazione del pulsante di caricamento guidata dall'assistente */
.upzone-hint {
  animation: upzone-glow 1.1s ease-in-out infinite;
  border-color: var(--violet) !important;
}
@keyframes upzone-glow {
  50% { box-shadow: 0 0 0 6px rgba(176, 115, 255, 0.22), inset 0 0 30px rgba(176, 115, 255, 0.15); }
}
.ap-tools { display: flex; gap: 8px; padding: 0 12px 10px; }
.ap-tools .btn-mini { flex: 1; }
.ap-form { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--border); }
.ap-form input {
  flex: 1; background: rgba(3, 7, 19, 0.6); border: 1px solid var(--border);
  border-radius: 999px; color: var(--text-1); padding: 10px 14px;
  font-family: var(--font-body); font-size: 0.84rem;
}
.ap-form input:focus { outline: none; border-color: var(--accent); }
.ap-form button {
  width: 40px; border: none; border-radius: 50%; cursor: pointer;
  background: linear-gradient(135deg, var(--accent), var(--violet-deep));
  color: #fff; font-size: 0.9rem;
}

/* ── Controllo remoto attivo ── */
.assist-banner {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  display: flex; align-items: center; justify-content: center; gap: 14px;
  padding: 10px 16px; font-size: 0.82rem; font-weight: 700;
  background: linear-gradient(90deg, rgba(124, 58, 237, 0.9), rgba(56, 189, 248, 0.9));
  color: #fff; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  animation: ab-in 0.35s ease;
}
@keyframes ab-in { from { transform: translateY(-100%); } }
.assist-banner .btn-mini { background: rgba(255, 255, 255, 0.2); border-color: rgba(255, 255, 255, 0.5); color: #fff; }
body.assist-locked .panel .step-viewport { opacity: 0.55; pointer-events: none; filter: saturate(0.7); }
body.assist-locked .navbar { opacity: 0.5; pointer-events: none; }

.assist-input {
  width: 100%; background: rgba(3, 7, 19, 0.6); border: 1px solid var(--border);
  border-radius: 9px; color: var(--text-1); font-family: var(--font-body);
  font-size: 0.9rem; padding: 10px 12px;
}
.assist-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 8px rgba(56, 189, 248, 0.3); }
.fld-label { display: block; font-size: 0.7rem; color: var(--text-2); font-weight: 800; margin: 12px 0 5px; letter-spacing: 0.5px; }
.modal-actions { display: flex; gap: 10px; margin-top: 18px; }
.modal-actions .btn { flex: 1; padding: 13px 10px; font-size: 0.9rem; }
/* .btn-mini è già definita sopra: qui solo la variante accento */
.btn-mini.accent { background: linear-gradient(135deg, rgba(56, 189, 248, 0.35), rgba(124, 58, 237, 0.35)); border-color: var(--accent); }
.link-row { display: flex; gap: 8px; }
.link-row input {
  flex: 1; min-width: 0; background: rgba(3, 7, 19, 0.6); border: 1px solid var(--border);
  border-radius: 9px; color: var(--accent-soft); padding: 10px 12px; font-size: 0.76rem;
}

@media (min-width: 900px) {
  /* la posizione flottante vale solo dove il pulsante non è entrato nella barra */
  .assist-launcher:not(.in-topbar), .assist-panel { left: auto; right: 24px; bottom: 24px; }
}

/* Su schermo stretto la barra è già affollata: resta l'icona con il pallino */
@media (max-width: 560px) {
  .assist-launcher.in-topbar { padding: 7px 9px; }
  .assist-launcher.in-topbar .al-label { display: none; }
  .topbar { gap: 8px; padding: 10px 12px 8px; }
}

/* Riduzione animazioni */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ── Orientamento del foglio di stampa (solo aree A4) ────────── */

.area-orient {
  display: flex; gap: 6px; padding: 0 14px 12px;
}
.orient-btn {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 7px;
  padding: 8px 6px; border-radius: 10px; cursor: pointer;
  background: rgba(3, 7, 19, 0.5); border: 1px solid var(--border);
  color: var(--text-2); font-family: var(--font-body); font-size: 0.74rem; font-weight: 800;
  transition: all 0.15s;
}
.orient-btn i {
  display: block; border: 2px solid currentColor; border-radius: 2px;
}
.orient-btn i.orizzontale { width: 18px; height: 13px; }
.orient-btn i.verticale { width: 13px; height: 18px; }
.orient-btn:hover { color: var(--text-1); border-color: var(--accent); }
.orient-btn.on {
  color: var(--accent); border-color: var(--accent);
  background: rgba(56, 189, 248, 0.14);
}

.summary-nota { color: var(--text-2); font-weight: 600; font-size: 0.72rem; }

/* ── Accesso al profilo nel primo passo ─────────────────────── */

.intro-account {
  margin-top: 20px; padding: 14px; border-radius: 14px;
  background: rgba(10, 21, 53, 0.6); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap;
}
.acc-chip { display: flex; align-items: center; gap: 11px; min-width: 0; flex: 1; }
.acc-avatar {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center; font-size: 0.8rem; font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--violet)); color: #061024;
}
.acc-avatar.ospite { background: rgba(148, 163, 184, 0.25); color: var(--text-2); }
.acc-testo { min-width: 0; }
.acc-testo b { display: block; font-size: 0.88rem; }
.acc-testo span { font-size: 0.74rem; color: var(--text-2); line-height: 1.45; }
.acc-azioni { display: flex; gap: 8px; flex-shrink: 0; }

@media (max-width: 560px) {
  .intro-account { flex-direction: column; align-items: stretch; }
  .acc-azioni { justify-content: stretch; }
  .acc-azioni .btn { flex: 1; justify-content: center; }
}

/* ── I miei modelli ──────────────────────────────────────────── */

.top-mini-non-usato {
  display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0;
  padding: 7px 12px; border-radius: 999px; cursor: pointer;
  background: rgba(10, 21, 53, 0.8); border: 1px solid var(--border);
  color: var(--text-2); font-family: var(--font-body); font-size: 0.76rem; font-weight: 800;
  transition: color 0.15s, border-color 0.15s;
}
.top-mini svg { width: 15px; height: 15px; }
.top-mini:hover { color: var(--text-1); border-color: var(--accent); }

.mm-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px; margin: 18px 0 4px; max-height: 56vh; overflow-y: auto;
}
.mm-card {
  background: rgba(3, 7, 19, 0.5); border: 1px solid var(--border);
  border-radius: 13px; overflow: hidden; display: flex; flex-direction: column;
}
.mm-card.bozza { border-color: rgba(234, 179, 8, 0.4); }

.mm-cover {
  position: relative; aspect-ratio: 4 / 3; display: grid; place-items: center;
  background: rgba(5, 11, 31, 0.7); overflow: hidden;
}
.mm-cover img { width: 100%; height: 100%; object-fit: contain; }
.mm-cover span { color: var(--text-2); font-size: 0.72rem; }
.mm-badge {
  position: absolute; left: 8px; bottom: 8px; font-style: normal;
  padding: 3px 9px; border-radius: 999px; font-size: 0.62rem; font-weight: 800;
  background: rgba(234, 179, 8, 0.9); color: #1a1300;
}

.mm-body { padding: 10px 12px 4px; }
.mm-body b { display: block; font-size: 0.86rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mm-body small { color: var(--text-2); font-size: 0.7rem; line-height: 1.4; }

.mm-actions { display: flex; flex-wrap: wrap; gap: 5px; padding: 10px 12px 12px; }

.mm-avvisi { margin: 12px 0 0; padding-left: 20px; }
.mm-avvisi li { font-size: 0.84rem; line-height: 1.6; color: var(--text-1); margin-bottom: 5px; }

/* nel modello condiviso non si vendono magliette: solo si guardano */
body.mode-modello #price-tag,
body.mode-modello .assist-launcher,
body.mode-modello .top-mini-non-usato { display: none !important; }

/* ── Menù della barra (account, modelli, strumenti) ──────────── */

.top-menu-btn {
  display: inline-flex; align-items: center; gap: 7px; flex-shrink: 0;
  padding: 5px 10px 5px 5px; border-radius: 999px; cursor: pointer;
  background: rgba(10, 21, 53, 0.8); border: 1px solid var(--border);
  color: var(--text-2); transition: border-color 0.15s, color 0.15s;
}
.top-menu-btn svg { width: 17px; height: 17px; }
.top-menu-btn:hover { color: var(--text-1); border-color: var(--accent); }

.tm-avatar {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center; font-size: 0.7rem; font-weight: 800;
  background: rgba(148, 163, 184, 0.25); color: var(--text-2);
}
.tm-avatar.dentro { background: linear-gradient(135deg, var(--accent), var(--violet)); color: #061024; }
.tm-avatar.grande { width: 40px; height: 40px; font-size: 0.94rem; }

.top-menu {
  position: fixed; z-index: 120; width: 262px; padding: 8px;
  background: #0A1535; border: 1px solid var(--border); border-radius: 14px;
  box-shadow: 0 22px 54px rgba(3, 7, 19, 0.85);
  animation: tm-in 0.15s ease;
}
@keyframes tm-in { from { opacity: 0; transform: translateY(-6px); } }

.tm-testa { display: flex; align-items: center; gap: 11px; padding: 10px 10px 12px; }
.tm-testa b { display: block; font-size: 0.88rem; }
.tm-testa span { font-size: 0.72rem; color: var(--text-2); line-height: 1.35; }

.tm-voce {
  display: block; width: 100%; text-align: left; text-decoration: none;
  padding: 10px 12px; border-radius: 10px; cursor: pointer;
  background: none; border: none; color: var(--text-1);
  font-family: var(--font-body); font-size: 0.84rem; font-weight: 700;
}
.tm-voce:hover { background: rgba(56, 189, 248, 0.12); }
.tm-voce.accento {
  background: linear-gradient(135deg, var(--accent), var(--violet));
  color: #04122B; text-align: center; margin-bottom: 4px;
}
.tm-voce.accento:hover { filter: brightness(1.08); }

.tm-sep { height: 1px; margin: 7px 6px; background: var(--border); }
.tm-gruppo {
  font-size: 0.62rem; font-weight: 800; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--text-2); padding: 6px 12px 4px;
}

/* ── Modello condiviso: scheda di sola lettura ───────────────── */

.mc-scheda { padding: 4px 2px 20px; }
.mc-titolo {
  font-family: var(--font-display); font-size: 0.94rem; font-weight: 600;
  margin: 20px 0 8px; color: var(--accent-soft);
}
.mc-righe { display: flex; flex-direction: column; gap: 2px; margin-top: 18px; }
.mc-riga {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 0; border-bottom: 1px solid rgba(56, 189, 248, 0.1);
}
.mc-riga span { color: var(--text-2); font-size: 0.84rem; }
.mc-riga b { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; }
.mc-punto { width: 16px; height: 16px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.25); }

.mc-elenco { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.mc-elenco li {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  padding: 9px 12px; border-radius: 10px;
  background: rgba(10, 21, 53, 0.6); border: 1px solid var(--border);
  font-size: 0.86rem; font-weight: 700;
}
.mc-elenco small { color: var(--text-2); font-weight: 600; font-size: 0.74rem; }

.mc-invito {
  margin-top: 26px; padding: 18px; border-radius: 14px; text-align: center;
  background: rgba(56, 189, 248, 0.08); border: 1px solid var(--border);
}
.mc-invito b { display: block; font-family: var(--font-display); font-size: 1.05rem; font-weight: 600; }
.mc-invito span { display: block; color: var(--text-2); font-size: 0.82rem; margin: 5px 0 14px; }

/* in vetrina non si configura: via tutto ciò che serve a farlo */
body.mode-modello .navbar,
body.mode-modello #price-tag,
body.mode-modello #progress,
body.mode-modello .assist-launcher,
body.mode-modello .top-menu-btn,
body.mode-modello #btn-info { display: none !important; }
body.mode-modello .step-viewport { padding-bottom: 24px; }

/* ── Installazione dell'app ──────────────────────────────────── */
.tm-installa { padding: 4px 6px 2px; }
.tm-installa .btn { width: 100%; justify-content: center; }
.pwa-nota { display: block; padding: 8px 12px; font-size: 0.72rem; color: var(--text-2); line-height: 1.5; }

/* Ponte verso Design Lab: sta sotto l'editor dell'area, invita senza gridare */
.btn-migliora {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  width: 100%; margin-top: 10px; padding: 10px 14px;
  border-radius: 12px; cursor: pointer; text-align: left;
  color: var(--text-1); font-family: var(--font-body);
  font-size: 0.8rem; font-weight: 800;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.22), rgba(56, 189, 248, 0.16));
  border: 1px solid rgba(124, 58, 237, 0.45);
  transition: border-color 0.18s, transform 0.18s;
}
.btn-migliora small { font-size: 0.68rem; font-weight: 600; color: var(--text-2); }
.btn-migliora:hover { border-color: var(--accent); transform: translateY(-1px); }

/* Attesa dentro le finestre: qualcosa si muove, quindi non è bloccato */
.mm-attesa {
  display: flex; align-items: center; gap: 14px;
  padding: 22px 4px 8px; color: var(--text-2); font-size: 0.9rem;
}

/* Community: stato del modello e proposta */
.mm-stato {
  display: inline-block; margin-top: 6px; padding: 3px 9px; border-radius: 999px;
  font-size: 0.66rem; font-weight: 800;
  background: rgba(148, 163, 184, 0.14); color: var(--text-2);
  border: 1px solid rgba(148, 163, 184, 0.25);
}
.mm-stato.attesa { color: #FCD9A0; background: rgba(245, 158, 11, 0.12); border-color: rgba(245, 158, 11, 0.3); }
.mm-stato.pubblicato { color: #86EFAC; background: rgba(16, 185, 129, 0.12); border-color: rgba(16, 185, 129, 0.32); }
.mm-stato.rifiutato { color: #FCA5A5; background: rgba(239, 68, 68, 0.12); border-color: rgba(239, 68, 68, 0.3); }
.btn-mini.community { border-color: rgba(176, 115, 255, 0.5); color: #DCC7FF; }
.mm-check {
  display: flex; align-items: flex-start; gap: 10px; margin: 14px 0 4px;
  font-size: 0.82rem; line-height: 1.5; color: var(--text-1); cursor: pointer;
}
.mm-check input { margin-top: 3px; width: 17px; height: 17px; accent-color: var(--accent); flex: none; }
