/* NOVAE super alpha
   Tokens: one accent (crimson star), thin grey rings on black (from the app reference video).
   Shape rule: frames 14px radius (--wobble), icon buttons are circles,
   inputs/buttons are pills. Nothing else. */

:root {
  --bg: #020202;
  --bg-2: #0d0d0e;
  --bg-3: #161617;
  --ink: #eeede9;
  --ink-2: #b4b2ad;
  --ink-3: #85837e;
  --line: #4e4d4b;
  --line-hi: #8c8a86;
  --accent: #b3122f;
  --accent-hi: #d61c40;
  --star-off: #2c2c2e;

  /* labels: clean bold uppercase sans, as in the reference */
  --hand: 'Outfit', system-ui, sans-serif;
  --hand-w: 600;
  --sans: 'Outfit', system-ui, sans-serif;

  --stroke: 1.5px;
  --wobble: 14px;
  --col: min(100vw, 560px);
  --dock-h: 96px;
  --ease: cubic-bezier(.16, 1, .3, 1);

  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--bg); scrollbar-width: none; }
html::-webkit-scrollbar { display: none; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
input { font: inherit; color: inherit; }
.hand { font-family: var(--hand); font-weight: var(--hand-w); }
:focus-visible { outline: 2px solid var(--accent-hi); outline-offset: 3px; border-radius: 6px; }

/* Image skeleton: shimmer until loaded */
.ph-img { background: linear-gradient(100deg, var(--bg-2) 30%, var(--bg-3) 50%, var(--bg-2) 70%) 0 0 / 300% 100%; animation: shimmer 1.6s linear infinite; }
.ph-img.loaded { animation: none; background: var(--bg-2); }
img.fade { opacity: 0; transition: opacity .6s var(--ease); }
img.fade.loaded { opacity: 1; }
@keyframes shimmer { to { background-position: -150% 0; } }

/* ---------- Crop: pulls a single drawn icon out of the source sketches ---------- */
.crop {
  display: block;
  flex: none;
  width: var(--w);
  height: calc(var(--w) * var(--ar, 1));
  background-image: var(--img);
  background-repeat: no-repeat;
  background-size: calc(var(--w) / var(--sz));
  background-position:
    calc(var(--w) / 2 - var(--fx) * var(--w) / var(--sz))
    calc(var(--w) * var(--ar, 1) / 2 - var(--fy) * var(--w) / var(--sz));
  mix-blend-mode: lighten;
  filter: contrast(1.35) brightness(1.05); /* crush JPEG near-blacks so the crop edge disappears */
}
.star-svg { display: block; object-fit: contain; user-select: none; } /* the logo star image */

/* ---------- Sky: tiny faint four-point sparkles ---------- */
#sky { position: fixed; inset: 0; pointer-events: none; z-index: 0; transition: opacity .6s; }
#sky svg { position: absolute; width: var(--sz, 7px); height: var(--sz, 7px); fill: #8f8d89; opacity: .4; }
body[data-screen="invito"] #sky,
body[data-screen="vista"] #sky,
body[data-screen="opera"] #sky,
body[data-screen="messaggi"] #sky,
body[data-screen="impostazioni"] #sky { opacity: 0; }

@media (prefers-reduced-motion: no-preference) {
  #sky svg { animation: twinkle var(--d, 5s) ease-in-out var(--dl, 0s) infinite alternate; }
}
@keyframes twinkle { from { opacity: .12; } to { opacity: .6; } }

/* ---------- Screens ---------- */
#app { position: relative; } /* no z-index: crops must blend with the sky behind */
.screen {
  display: none;
  width: var(--col);
  margin: 0 auto;
  min-height: 100dvh;
  padding-bottom: calc(var(--dock-h) + 32px);
}
.screen.wide { --col: min(100vw, 1120px); }
.screen.active { display: block; }
@media (prefers-reduced-motion: no-preference) {
  .screen.active { animation: screenIn .55s var(--ease); }
}
@keyframes screenIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.page-head { padding: 34px 20px 18px; text-align: center; }
.page-head h1 { font-size: clamp(30px, 8vw, 44px); letter-spacing: .14em; text-transform: uppercase; }
.page-head p { color: var(--ink-3); margin-top: 6px; font-size: 15px; }

.sketch-box { border: var(--stroke) solid var(--line); border-radius: var(--wobble); }
.icon-btn { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; font-size: 24px; transition: transform .2s var(--ease), color .2s; }
.icon-btn:hover { color: #fff; }
.icon-btn:active { transform: scale(.92); }

.btn-accent {
  background: var(--accent); color: #fff; border-radius: 999px; padding: 12px 24px; font-weight: 500; letter-spacing: .02em;
  transition: background .2s, transform .15s var(--ease); white-space: nowrap;
}
.btn-accent:hover { background: var(--accent-hi); }
.btn-accent:active { transform: scale(.97); }
.btn-ghost {
  border: var(--stroke) solid var(--line); border-radius: 999px; padding: 10px 20px; white-space: nowrap; transition: background .2s, transform .15s var(--ease);
}
.btn-ghost:hover { background: rgba(255,255,255,.06); }
.btn-ghost:active { transform: scale(.97); }

/* ---------- Rating (crimson four-point stars) ---------- */
.rating { position: relative; display: inline-flex; line-height: 0; }
.rating .r-off, .rating .r-on { display: flex; gap: 3px; }
.rating .r-on { position: absolute; inset: 0 auto 0 0; overflow: hidden; }
.rating svg { width: var(--s, 18px); height: var(--s, 18px); flex: none; }
.rating .r-off svg { fill: var(--star-off); }
.rating .r-on svg { fill: var(--accent); }

/* ---------- 1. Gate ---------- */
.gate { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 34px; padding: 40px 24px; }
.gate-star { width: 92px; height: 104px; object-fit: contain; }
@media (prefers-reduced-motion: no-preference) {
  .gate-star { animation: pulse 3.2s ease-in-out infinite; }
}
@keyframes pulse { 50% { transform: scale(1.06); } }
.gate-msg { width: min(100%, 340px); padding: 30px 18px; text-align: center; font-size: 19px; letter-spacing: .02em; }
.gate-qr { position: relative; width: min(100%, 340px); aspect-ratio: 1; display: grid; place-items: center; overflow: hidden; }
.gate-qr canvas { width: 72%; height: 72%; }
.qr-scan { position: absolute; left: 10%; right: 10%; height: 2px; background: var(--accent-hi); box-shadow: 0 0 14px 2px rgba(214,28,64,.45); top: 14%; }
@media (prefers-reduced-motion: no-preference) {
  .qr-scan { animation: scan 2.6s ease-in-out infinite alternate; }
}
@keyframes scan { to { top: 86%; } }
.gate-form { width: min(100%, 340px); display: grid; gap: 8px; }
.gate-form label { font-size: 16px; color: var(--ink-2); }
.gate-row { display: flex; gap: 8px; }
.gate-row input {
  flex: 1; min-width: 0; background: var(--bg-2); border: 1.5px solid #55534f; border-radius: 999px; padding: 12px 18px;
  letter-spacing: .12em; text-transform: uppercase; outline: none; transition: border-color .2s;
}
.gate-row input::placeholder { color: #75736e; }
.gate-row input:focus { border-color: var(--line); }
.gate-help { font-size: 13px; color: var(--ink-3); line-height: 1.5; }
.gate-help.err { color: #ff8a9c; }
.gate.leaving .gate-star { transition: transform .9s var(--ease), opacity .9s; transform: scale(14) rotate(45deg); opacity: 0; }
.gate.leaving > :not(.gate-star) { transition: opacity .3s; opacity: 0; }

/* ---------- 2. Hub ---------- */
.screen[data-screen="hub"] { padding-bottom: 0; display: none; }
.screen[data-screen="hub"].active { display: grid; place-items: center; }
/* Compact ring measured from the reference video: offsets are in units of --hw (hub width). */
.hub {
  --hw: min(100vw - 20px, 470px, 92dvh);
  --cy: calc(var(--hw) * .45);
  --c: calc(var(--hw) * .185);
  position: relative; width: var(--hw); height: calc(var(--hw) * 1.04);
}
.hub-core { position: absolute; left: 50%; top: var(--cy); transform: translate(-50%, -50%); }
.hub-core .star-svg { width: calc(var(--hw) * .2); height: calc(var(--hw) * .215); }
/* no transform here: a transform would isolate the crop's blend from the background */
.hub-wordmark { position: absolute; --w: calc(var(--hw) * .36); left: calc(50% - var(--w) / 2); top: calc(var(--cy) + var(--hw) * .158 - var(--w) * .13); }
@media (prefers-reduced-motion: no-preference) {
  .hub-core .star-svg { animation: pulse 4s ease-in-out infinite; }
}
.hub-item {
  position: absolute; left: calc(50% + var(--dx) * var(--hw)); top: calc(var(--cy) + var(--dy) * var(--hw));
  transform: translate(-50%, calc(var(--c) / -2));
}
.hub-btn { display: grid; justify-items: center; gap: calc(var(--hw) * .012); border-radius: 12px; }
.hub-circle {
  position: relative; width: var(--c); aspect-ratio: 1; border-radius: 50%; border: var(--stroke) solid #5a5957; background: #050505;
  display: grid; place-items: center; overflow: visible; --w: calc(var(--hw) * .105);
  transition: transform .35s var(--ease), border-color .3s;
}
.hub-circle .star-svg { width: 48%; height: 52%; }
.hub-circle.i-stile { --w: calc(var(--hw) * .115); }
.hub-circle.i-mercato { --w: calc(var(--hw) * .158); }
/* Galleria and Scopri: the drawing is bigger than the ring and crosses it, as in the menu sketch
   (needle out at the bottom left; flame touching the top, tail out at the bottom left) */
.hub-circle.i-galleria { --w: calc(var(--hw) * .177); }
.hub-circle.i-galleria .crop { transform: translate(calc(var(--hw) * -.0144), calc(var(--hw) * .0226)); }
.hub-circle.i-scopri { --w: calc(var(--hw) * .183); }
.hub-circle.i-scopri .crop { transform: translate(calc(var(--hw) * .0063), calc(var(--hw) * .0081)); }
/* Profilo: the drawing is symmetric but ends in a rounded, top-like base; cut it flat at the
   shoulders' widest point (29.75% from the bottom of the crop) and centre what remains */
.hub-circle.i-profilo { --w: calc(var(--hw) * .154); }
.i-profilo .crop { clip-path: inset(0 0 29.75% 0); transform: translateY(9.75%); }
.hub-label {
  font-family: var(--hand); font-weight: 700; font-size: clamp(9px, calc(var(--hw) * .026), 12px); line-height: 1.15;
  letter-spacing: .04em; text-transform: uppercase; text-align: center; white-space: nowrap;
}
.hub-btn:hover .hub-circle, .hub-btn:focus-visible .hub-circle { transform: scale(1.06); border-color: var(--line-hi); }
.hub-btn:active .hub-circle { transform: scale(.95); }
.hub-last .hub-circle { border-color: var(--line-hi); }

/* ---------- Dock ---------- */
.dock {
  position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); width: min(100vw, 560px); height: var(--dock-h); z-index: 30;
  background: linear-gradient(to bottom, transparent 0 38px, var(--bg) 38px);
}
body[data-screen="invito"] .dock, body[data-screen="hub"] .dock { display: none; }
.dock-line::before, .dock-line::after {
  content: ""; position: absolute; top: 36px; height: var(--stroke); background: var(--line); border-radius: 2px;
}
.dock-line::before { left: 0; right: calc(50% + 52px); }
.dock-line::after { right: 0; left: calc(50% + 52px); }
.dock-bump {
  position: absolute; left: 50%; top: -12px; width: 108px; height: 50.5px; transform: translateX(-50%);
  border: var(--stroke) solid var(--line); border-bottom: 0; border-radius: 54px 54px 0 0; background: var(--bg);
}
.dock-side { position: absolute; bottom: 12px; width: 48px; height: 48px; display: grid; place-items: center; font-size: 30px; transition: transform .2s var(--ease); }
.dock-side:active { transform: scale(.9); }
.dock-search { left: 10px; }
.dock-menu { right: 10px; }
.dock-star { position: absolute; left: 50%; top: 4px; width: 76px; height: 84px; transform: translateX(-50%); display: grid; place-items: center; }
.dock-star img { width: 64px; height: 70px; object-fit: contain; transition: transform .5s var(--ease), filter .2s; user-select: none; }
.dock-star:hover img { filter: brightness(1.2); }
.dock-star[aria-expanded="true"] img { transform: rotate(45deg) scale(.9); }

/* Spin wheel: centred on the dock star; JS sets each item's transform from the wheel rotation */
.arc { position: absolute; left: 50%; top: 42px; width: 0; height: 0; pointer-events: none; }
.arc.open { pointer-events: auto; }
.wheel-hit {
  position: absolute; left: -190px; top: -200px; width: 380px; height: 160px; border-radius: 190px 190px 0 0; /* ends above the star, so the star stays tappable */
  touch-action: none; cursor: grab;
}
.arc.dragging .wheel-hit, .arc.dragging .arc-item { cursor: grabbing; }
.arc:not(.open) .wheel-hit { display: none; }
.wheel-label {
  position: absolute; left: 0; top: -70px; transform: translate(-50%, -50%); pointer-events: none;
  font-weight: 700; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; white-space: nowrap;
  text-shadow: 0 0 8px #000, 0 0 14px #000; opacity: 0; transition: opacity .3s;
}
.arc.open .wheel-label { opacity: 1; }
.arc.closing, .arc.closing * { pointer-events: none !important; }
.arc.closing .wheel-label { opacity: 0; }
.arc-item {
  position: absolute; left: 0; top: 0; display: grid; place-items: center; opacity: 0;
  transform: translate(-50%, -50%) scale(.3); will-change: transform, opacity; touch-action: none;
}
.arc:not(.open) .arc-item { opacity: 0 !important; pointer-events: none !important; transition: opacity .2s; }
.arc-circle { width: 60px; height: 60px; border-radius: 50%; border: var(--stroke) solid var(--line); background: var(--bg); display: grid; place-items: center; --w: 38px; transition: border-color .2s, box-shadow .2s; }
.arc-circle .star-svg { width: 60%; height: 60%; }
.arc-item.sel .arc-circle { border-color: var(--ink); box-shadow: 0 0 0 5px rgba(214,28,64,.16); }
.arc-item:not(.sel):hover .arc-circle { border-color: var(--line-hi); }
.dock-star img { transition: transform .5s var(--ease), filter .2s; }
.dock.spinning .dock-star img { transition: none; }
.scrim { position: fixed; inset: 0; z-index: 25; background: rgba(3,3,3,.72); backdrop-filter: blur(3px); opacity: 0; pointer-events: none; transition: opacity .3s; }
.scrim.open { opacity: 1; pointer-events: auto; }

/* ---------- Scroll rail ---------- */
.rail {
  position: fixed; z-index: 20; top: 28vh; right: max(4px, calc(50% - 280px + 2px)); display: none; flex-direction: column; align-items: center; gap: 6px; color: var(--ink-2); font-size: 18px;
}
body[data-screen="disciplina"] .rail { display: flex; }
body[data-screen="disciplina"] .rail { right: max(4px, calc(50% - 560px + 2px)); }
.rail-track { position: relative; width: 2px; height: 34vh; background-image: radial-gradient(circle, var(--ink-2) 1px, transparent 1.5px); background-size: 2px 14px; background-position: center; }
.rail-dot { position: absolute; left: 50%; top: 0; width: 11px; height: 11px; margin-left: -5.5px; margin-top: -5.5px; border-radius: 50%; background: var(--ink); }
@supports (animation-timeline: scroll()) {
  .rail-dot { animation: railMove linear both; animation-timeline: scroll(root block); }
}
@keyframes railMove { to { transform: translateY(34vh); } }

/* ---------- 3. Feed ---------- */
.feed { display: grid; gap: 36px; padding: 32px 36px 0 14px; }
.post { display: grid; grid-template-columns: 62px minmax(0, 1fr) 44px; column-gap: 12px; }
.post .rating { grid-column: 2; grid-row: 1; margin: 0 0 10px 14px; justify-self: start; }
.post > .post-side { grid-column: 1; grid-row: 2; }
.post > .frame { grid-column: 2; grid-row: 2; }
.post > .post-actions { grid-column: 3; grid-row: 2; }
.post > .post-title { grid-column: 2; grid-row: 3; }
.post-side { display: grid; justify-items: center; align-content: start; gap: 14px; padding-top: 8px; }
.avatar-ring { width: 62px; height: 62px; border-radius: 50%; border: var(--stroke) solid var(--line); padding: 4px; display: block; flex: none; transition: border-color .2s; }
.avatar-ring:hover { border-color: var(--accent-hi); }
.avatar-ring img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.avatar-ring.sm { width: 42px; height: 42px; padding: 3px; border-width: 2px; }
.avatar-ring.lg { width: 112px; height: 112px; padding: 6px; }
.post-by { font-family: var(--hand); font-size: 11px; color: var(--ink-3); text-align: center; line-height: 1.2; max-width: 70px; }
.frame {
  position: relative; display: block; border: var(--stroke) solid var(--line); border-radius: var(--wobble); padding: 13px; aspect-ratio: 4 / 3.3; background: var(--bg);
  transition: transform .35s var(--ease);
}
.frame:hover { transform: translateY(-2px) rotate(-.3deg); }
.frame-inner { display: block; position: relative; width: 100%; height: 100%; overflow: hidden; border: var(--stroke) solid var(--line); border-radius: 2px; }
.frame-inner img { width: 100%; height: 100%; object-fit: cover; }
.frame-inner.tall img { object-position: center 30%; }
.play-ico {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 64px; height: 64px; display: grid; place-items: center;
  border-radius: 50%; background: rgba(3,3,3,.45); backdrop-filter: blur(4px); border: 1.5px solid rgba(236,235,230,.7); font-size: 26px;
}
.audio-bar {
  position: absolute; left: 10%; right: 10%; top: 50%; transform: translateY(-50%); display: flex; align-items: center; gap: 12px; padding: 12px 16px;
  border: var(--stroke) solid var(--line); border-radius: 4px; background: rgba(3,3,3,.72); backdrop-filter: blur(6px);
}
.audio-bar i { font-size: 22px; }
.wave { flex: 1; display: flex; align-items: center; gap: 2px; height: 28px; }
.wave span { flex: 1; background: var(--ink-2); border-radius: 2px; height: var(--h); }
.post-actions { display: grid; justify-items: center; align-content: space-around; gap: 18px; padding: 20px 0; }
.act { display: grid; justify-items: center; gap: 2px; font-size: 32px; transition: transform .2s var(--ease), color .2s; }
.act small { font-size: 11px; color: var(--ink-3); font-family: var(--sans); }
.act:active { transform: scale(.88); }
.act.on { color: var(--accent-hi); }
.act.pop i { animation: pop .45s var(--ease); }
@keyframes pop { 40% { transform: scale(1.35); } }
.post-title { grid-column: 2; margin: 10px 0 0 14px; font-family: var(--hand); font-size: 15px; color: var(--ink-2); letter-spacing: .03em; }

/* ---------- 4. Vista: full-screen reels (scroll-snap, one work per screen) ---------- */
.screen[data-screen="vista"] { padding-bottom: 0; --col: min(100vw, calc(100dvh * 9 / 16)); } /* phone: full width; desktop: a 9:16 column */
.vista { position: relative; height: 100dvh; overflow: hidden; background: #000; }
.vista-back { position: absolute; left: 6px; top: 10px; z-index: 5; font-size: 30px; filter: drop-shadow(0 1px 4px rgba(0, 0, 0, .6)); }
.reels { position: relative; height: 100%; overflow-y: auto; scroll-snap-type: y mandatory; overscroll-behavior: contain; scrollbar-width: none; }
.reels::-webkit-scrollbar { display: none; }
.reel { position: relative; height: 100dvh; overflow: hidden; scroll-snap-align: start; scroll-snap-stop: always; }
.reel-media { position: absolute; inset: 0; }
.reel-media img { width: 100%; height: 100%; object-fit: cover; }
.reel-shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to top, rgba(0, 0, 0, .78) 0%, rgba(0, 0, 0, .25) 30%, transparent 48%), linear-gradient(to bottom, rgba(0, 0, 0, .4), transparent 14%); }
.reel-rail { position: absolute; right: 8px; bottom: calc(var(--dock-h) + 16px); z-index: 2; display: grid; justify-items: center; gap: 12px; }
.reel-rail .act { font-size: 32px; filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .55)); }
.reel-rail .act small { font-size: 12px; font-weight: 600; color: var(--ink); }
.reel-ava { position: relative; margin-bottom: 8px; }
.reel-ava .avatar-ring { width: 50px; height: 50px; padding: 2px; border-color: var(--ink); }
.reel-follow { position: absolute; left: 50%; bottom: -10px; transform: translateX(-50%); width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 17px; line-height: 1; display: grid; place-items: center; }
.reel-follow:hover { background: var(--accent-hi); }
.reel-meta { position: absolute; left: 14px; right: 80px; bottom: calc(var(--dock-h) + 18px); z-index: 2; text-shadow: 0 1px 4px rgba(0, 0, 0, .55); }
.reel-by { font-weight: 600; font-size: 15px; }
.reel-meta h2 { font-weight: 700; font-size: 19px; letter-spacing: .05em; text-transform: uppercase; line-height: 1.15; margin: 4px 0 6px; }
.reel-desc { font-size: 14px; line-height: 1.42; color: rgba(238, 237, 233, .9); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; cursor: pointer; }
.reel-desc.open { -webkit-line-clamp: unset; display: block; }
.reel-tags { display: flex; align-items: center; gap: 10px; margin-top: 8px; font-size: 12px; color: var(--ink-2); }
.reel-tags .new-tag { line-height: 1; }
.reel-paused { position: absolute; left: 50%; top: 50%; z-index: 2; width: 76px; height: 76px; border-radius: 50%; background: rgba(0, 0, 0, .45); display: grid; place-items: center; font-size: 32px; opacity: 0; pointer-events: none; transform: translate(-50%, -50%) scale(.8); transition: opacity .2s, transform .2s var(--ease); }
.reel.paused .reel-paused { opacity: 1; transform: translate(-50%, -50%); }
.reel .progress { position: absolute; left: 0; right: 0; bottom: var(--dock-h); height: 2px; z-index: 2; background: rgba(255, 255, 255, .18); }
.reel .progress span { background: var(--ink); }
@media (prefers-reduced-motion: no-preference) {
  /* "playing": slow push-in on video and audio works, with a progress line */
  .reel.active:not(.paused):not([data-type="image"]) .reel-media img { transform: scale(1.1); transition: transform 14s linear; }
  .reel.active:not(.paused) .progress span { width: 100%; transition: width 14s linear; }
}
.vista-hint { position: absolute; left: 50%; top: 42%; z-index: 6; transform: translate(-50%, -50%); display: grid; justify-items: center; gap: 8px; padding: 16px 20px; border-radius: 16px; background: rgba(0, 0, 0, .55); font-size: 14px; font-weight: 600; pointer-events: none; opacity: 0; }
.vista-hint i { font-size: 38px; }
.vista.hint .vista-hint { animation: hint 2.8s ease forwards; }
@keyframes hint { 10%, 75% { opacity: 1; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: no-preference) { .vista.hint .vista-hint i { animation: nudge 1s ease-in-out 3; } }
@keyframes nudge { 50% { transform: translateY(-10px); } }
/* shared by the opera player */
.vista-play { position: absolute; left: 45%; top: 45%; transform: translate(-50%, -50%); z-index: 3; width: 92px; height: 92px; display: grid; place-items: center; font-size: 60px; transition: opacity .3s, transform .3s var(--ease); }
.vista-play:hover { transform: translate(-50%, -50%) scale(1.08); }
.progress { position: absolute; left: 4%; right: max(84px, 20%); bottom: calc(var(--dock-h) - 6px); height: 3px; z-index: 4; background: rgba(255,255,255,.08); }
.progress span { display: block; height: 100%; width: 0; background: var(--accent-hi); }

/* ---------- 5. Galleria ---------- */
.pills { display: flex; gap: 8px; overflow-x: auto; padding: 0 20px 22px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.pills::-webkit-scrollbar { display: none; }
.pill { scroll-snap-align: start; flex: none; border: 1.5px solid #4a4845; border-radius: 999px; padding: 8px 16px; font-size: 14px; color: var(--ink-2); transition: all .2s; }
.pill:hover { color: var(--ink); border-color: var(--ink-2); }
.pill[aria-selected="true"] { border-color: var(--accent); background: var(--accent); color: #fff; }
.masonry { columns: 2; column-gap: 14px; padding: 0 14px; }
@media (min-width: 640px) { .masonry { columns: 3; } }
.m-tile { break-inside: avoid; margin-bottom: 22px; display: block; }
.m-tile .m-img { border: var(--stroke) solid var(--line); border-radius: var(--wobble); padding: 8px; transition: transform .35s var(--ease); }
.m-tile:hover .m-img { transform: translateY(-3px); }
.m-tile .m-img > div { position: relative; overflow: hidden; }
.m-tile img { width: 100%; height: auto; }
.m-tile .play-ico { width: 44px; height: 44px; font-size: 18px; }
.m-cap { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-top: 8px; padding: 0 4px; }
.m-cap strong { font-family: var(--hand); font-weight: var(--hand-w); font-size: 15px; }
.m-cap span { font-size: 12px; color: var(--ink-3); white-space: nowrap; }
@media (min-width: 900px) { .masonry { columns: 4; padding: 0 32px; } }

/* ---------- 6. Stile ---------- */
.disciplines { display: grid; padding: 0 18px; }
.disc { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; padding: 22px 4px; border-bottom: 1.5px solid #2a2927; transition: padding .3s var(--ease); }
.disc:last-child { border-bottom: 0; }
.disc:hover { padding-left: 14px; }
.disc h2 { font-family: var(--hand); font-weight: var(--hand-w); font-size: clamp(22px, 6vw, 30px); letter-spacing: .1em; text-transform: uppercase; }
.disc p { color: var(--ink-3); font-size: 13px; margin-top: 2px; }
.disc-thumbs { display: flex; }
.disc-thumbs img { width: 52px; height: 64px; object-fit: cover; border: var(--stroke) solid var(--line); border-radius: 3px; margin-left: -18px; transform: rotate(var(--r)); background: var(--bg-2); transition: transform .3s var(--ease); }
.disc:hover .disc-thumbs img { transform: rotate(0) translateY(-3px); }
.disc.active h2 { color: var(--accent-hi); }

/* ---------- 7. Disciplina / Cinematografia ---------- */
.cine-title { text-align: center; padding: 26px 52px 70px; font-family: var(--hand); font-size: clamp(22px, 6.2vw, 46px); letter-spacing: .16em; text-transform: uppercase; }
.cine-back { position: absolute; left: 12px; top: 22px; font-size: 28px; }
.cine { position: relative; }
.tabs { display: grid; grid-template-columns: auto auto 1.4fr 1.4fr; border-top: var(--stroke) solid var(--line); border-bottom: var(--stroke) solid var(--line); margin-bottom: 44px; }
.tab { font-family: var(--hand); font-size: clamp(15px, 4.2vw, 24px); letter-spacing: .08em; text-transform: uppercase; padding: 14px 16px; border-right: var(--stroke) solid var(--line); text-align: left; transition: color .2s, background .2s; white-space: nowrap; }
.tab:last-child { border-right: 0; font-size: clamp(13px, 3.6vw, 20px); }
.tab[aria-selected="true"] { color: var(--accent-hi); }
.tab:hover { background: rgba(255,255,255,.03); }
.sortmenu { position: absolute; right: 8px; z-index: 5; background: var(--bg-2); border: var(--stroke) solid var(--line); border-radius: 10px; padding: 6px; display: grid; min-width: 180px; }
.sortmenu button { text-align: left; padding: 10px 12px; border-radius: 6px; font-size: 14px; }
.sortmenu button:hover, .sortmenu button[aria-checked="true"] { background: var(--bg-3); }
.sortmenu button[aria-checked="true"] { color: var(--accent-hi); }

.cf-row { position: relative; margin-bottom: 30px; padding: 0 8px; }
.cf-head { display: flex; justify-content: space-between; align-items: end; padding: 0 12px 0 8px; }
.cf-label { font-family: var(--hand); font-size: clamp(20px, 5vw, 30px); letter-spacing: .06em; text-transform: uppercase; }
.cf-label.red { color: var(--accent-hi); }
.cf-views { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); margin-right: 14%; }
.cf-views i { font-size: 24px; }
.cf { display: flex; align-items: flex-end; justify-content: center; height: clamp(150px, 40vw, 300px); border-bottom: var(--stroke) solid var(--line); margin: 0 3%; }
.cf-item {
  position: relative; height: var(--h); width: var(--wd); flex: none; margin-left: calc(var(--stroke) * -1); border: var(--stroke) solid var(--line); border-bottom: 0; overflow: hidden; background: var(--bg);
  transition: width .5s var(--ease), height .5s var(--ease);
}
.cf-item img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .5; filter: grayscale(1); transition: opacity .4s, filter .4s; }
.cf-item:hover img { opacity: .8; }
.cf-item.center img { opacity: 1; filter: none; }
.cf-item.center::before, .cf-item.center::after { content: ""; position: absolute; top: 0; bottom: 0; width: 2.5px; background: var(--line); z-index: 2; }
.cf-item.center::before { left: 15%; }
.cf-item.center::after { right: 15%; }
.cf-foot { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 10px 18% 0; }
.cf-foot .act { font-size: 28px; justify-self: start; grid-auto-flow: column; gap: 6px; align-items: center; }
.cf-foot .act:last-child { justify-self: end; }
.cf-foot a { font-family: var(--hand); font-size: clamp(16px, 4vw, 22px); letter-spacing: .1em; text-transform: uppercase; text-align: center; }
.cf-foot a:hover { color: var(--accent-hi); }

/* expanded band (variant from sketch) */
.band { display: grid; grid-template-columns: 24% 1fr 22%; border-top: var(--stroke) solid var(--line); border-bottom: var(--stroke) solid var(--line); height: clamp(180px, 42vw, 320px); }
.band-left { padding: 12px 8px; display: grid; align-content: start; gap: 12px; border-right: 0; }
.band-left .line { height: 2px; background: var(--line); width: 90%; }
.band-left small { font-size: 12px; color: var(--ink-2); }
.band-media { position: relative; border-left: var(--stroke) solid var(--line); border-right: var(--stroke) solid var(--line); overflow: hidden; }
.band-media img { width: 100%; height: 100%; object-fit: cover; }
.band-media::before, .band-media::after { content: ""; position: absolute; top: 0; bottom: 0; width: 2.5px; background: var(--line); z-index: 2; }
.band-media::before { left: 16%; }
.band-media::after { right: 16%; }
.band-info { padding: 12px; overflow-y: auto; font-size: 13px; color: var(--ink-2); line-height: 1.5; }
.band-info h4 { font-family: var(--hand); font-weight: var(--hand-w); font-size: 16px; color: var(--ink); letter-spacing: .1em; margin-bottom: 6px; }
.band-info .btn-ghost { display: inline-block; margin-top: 10px; font-size: 13px; padding: 7px 14px; color: var(--ink); }
.band-close { position: absolute; right: 12px; top: -4px; font-size: 22px; }
@media (min-width: 900px) {
  .cine-title { padding-bottom: 50px; }
  .cf-row { max-width: 980px; margin-left: auto; margin-right: auto; }
}

/* ---------- 8. Scheda opera ---------- */
.screen[data-screen="opera"] { --col: min(100vw, 640px); }
.player { position: relative; aspect-ratio: 16 / 10.5; border-bottom: var(--stroke) solid var(--line); overflow: hidden; }
.player img { width: 100%; height: 100%; object-fit: cover; opacity: .75; transition: transform 10s linear, opacity .5s; }
.player.playing img { transform: scale(1.12); opacity: .95; }
.player::before, .player::after { content: ""; position: absolute; top: 0; bottom: 0; width: 1.5px; background: var(--line); opacity: .8; }
.player::before { left: 19%; }
.player::after { right: 20%; }
.player .vista-play { left: 50%; top: 50%; }
.player.playing .vista-play { opacity: 0; }
.player .back { position: absolute; left: 10px; top: 12px; z-index: 3; font-size: 32px; }
.player .progress { left: 0; right: 0; bottom: 0; }
.player.playing .progress span { width: 100%; transition: width 12s linear; }
.d-title { display: flex; align-items: center; gap: 14px; padding: 16px 16px; border-bottom: var(--stroke) solid var(--line); }
.d-title h1 { flex: 1; font-family: var(--hand); font-weight: var(--hand-w); font-size: clamp(22px, 6vw, 32px); letter-spacing: .08em; text-transform: uppercase; line-height: 1.1; min-width: 0; }
.d-actions { display: flex; align-items: center; gap: 18px; padding: 14px 16px 30px; }
.d-actions .act { grid-auto-flow: column; align-items: center; gap: 8px; font-size: 34px; }
.d-actions .act.like small { font-size: 26px; font-weight: 600; color: var(--ink); font-family: var(--sans); }
.d-actions .grow { flex: 1; }
.d-body { display: grid; grid-template-columns: 58px 1fr 52px; align-items: stretch; gap: 0; min-height: 52dvh; padding-right: 6px; }
.d-author { border: var(--stroke) solid var(--line); border-right: 0; border-bottom: 0; margin-top: 60px; padding: 14px 6px; display: grid; justify-items: center; align-content: start; gap: 8px; }
.d-author .avatar-ring { width: 44px; height: 44px; padding: 3px; border-width: 1.5px; }
.d-desc { position: relative; border: var(--stroke) solid var(--line); border-bottom: 0; padding: 16px 18px; }
.d-desc h3 { font-family: var(--hand); font-weight: var(--hand-w); font-size: 22px; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 14px; }
.d-desc p { color: var(--ink-2); line-height: 1.65; max-width: 60ch; font-size: 15px; }
.d-desc dl { margin-top: 22px; display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: 14px; }
.d-desc dt { color: var(--ink-3); }
.related-tab { border: var(--stroke) solid var(--line); border-left: 0; border-bottom: 0; margin-top: 90px; writing-mode: vertical-rl; font-family: var(--hand); font-size: 18px; letter-spacing: .14em; text-transform: uppercase; padding: 16px 10px; text-align: left; transition: color .2s, background .2s; }
.related-tab:hover, .related-tab[aria-expanded="true"] { color: var(--accent-hi); background: rgba(179,18,47,.06); }
.related-panel { position: absolute; inset: 0; background: var(--bg); padding: 16px; overflow-y: auto; opacity: 0; pointer-events: none; transform: translateX(14px); transition: opacity .3s, transform .4s var(--ease); }
.related-panel.open { opacity: 1; pointer-events: auto; transform: none; }
.related-panel h3 { margin-bottom: 12px; }
.rel { display: grid; grid-template-columns: 88px 1fr; gap: 12px; align-items: center; padding: 8px 0; }
.rel img { width: 88px; height: 62px; object-fit: cover; border: var(--stroke) solid var(--line); border-radius: 3px; }
.rel strong { font-family: var(--hand); font-weight: var(--hand-w); display: block; }
.rel span { font-size: 12px; color: var(--ink-3); }
.rel:hover strong { color: var(--accent-hi); }

/* ---------- 9. Scopri ---------- */
.discover { padding: 26px 16px 0; display: grid; justify-items: center; }
.globe-wrap { position: relative; width: min(100%, 460px); aspect-ratio: 1; margin-top: 6vh; }
#globe { width: 100%; height: 100%; cursor: grab; touch-action: none; overflow: visible; }
#globe:active { cursor: grabbing; }
#globe .sphere { fill: var(--bg); stroke: var(--line); stroke-width: 3; }
#globe .grat { fill: none; stroke: rgba(236,235,230,.06); stroke-width: 1; }
#globe .land { fill: none; stroke: var(--line); stroke-width: 1.5; stroke-linejoin: round; }
#globe .hit { fill: transparent; stroke: none; cursor: pointer; }
#globe .hit:hover { fill: rgba(236,235,230,.05); }
#globe .sel { fill: rgba(179,18,47,.12); stroke: var(--accent-hi); stroke-width: 2.5; stroke-linejoin: round; }
#globe .mk { pointer-events: none; }
.globe-msg { position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink-3); font-family: var(--hand); pointer-events: none; }
.country-nav { display: flex; align-items: center; gap: 6px; margin-top: 36px; width: min(100%, 440px); }
.country-nav h2 { font-size: 20px; letter-spacing: .1em; text-transform: uppercase; min-width: 10ch; text-align: center; }
.country-nav .dots { flex: 1; height: 3px; background-image: radial-gradient(circle, var(--ink-2) 1.3px, transparent 1.6px); background-size: 16px 3px; }
.country-meta { color: var(--ink-3); font-size: 13px; margin-top: 6px; }
.country-artists { display: flex; gap: 18px; margin-top: 22px; flex-wrap: wrap; justify-content: center; }
.c-artist { display: grid; justify-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); }
.c-artist:hover { color: var(--ink); }

/* ---------- 10. Mercato ---------- */
.market-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 30px 20px 26px; flex-wrap: wrap; }
.market-head h1 { font-family: var(--hand); font-weight: var(--hand-w); font-size: clamp(26px, 7vw, 40px); letter-spacing: .12em; text-transform: uppercase; display: flex; align-items: center; gap: 14px; }
.market-head h1 .crop { --w: 54px; }
.wallet { display: flex; align-items: center; gap: 10px; border: var(--stroke) solid var(--line); border-radius: 999px; padding: 6px 16px 6px 8px; }
.wallet .crop { --w: 30px; }
.wallet strong { font-size: 18px; font-weight: 500; }
.wallet small { color: var(--ink-3); font-size: 12px; }
.market-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 26px 16px; padding: 0 16px; }
.m-item { display: grid; gap: 8px; }
.m-item .frame { aspect-ratio: 1; padding: 8px; }
.m-item h3 { font-family: var(--hand); font-weight: var(--hand-w); font-size: 16px; }
.m-item .by { font-size: 12px; color: var(--ink-3); }
.m-buy { display: flex; justify-content: space-between; align-items: center; }
.price { display: flex; align-items: center; gap: 4px; font-weight: 500; }
.price .crop { --w: 22px; }
.m-buy .btn-ghost { padding: 6px 14px; font-size: 13px; }
.m-feature { margin: 0 16px 34px; display: grid; grid-template-columns: 1.2fr 1fr; gap: 20px; align-items: center; border: var(--stroke) solid var(--line); border-radius: var(--wobble); padding: 16px; }
.m-feature img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border: var(--stroke) solid var(--line); }
.m-feature h2 { font-family: var(--hand); font-weight: var(--hand-w); font-size: clamp(22px, 5vw, 32px); letter-spacing: .06em; }
.m-feature p { color: var(--ink-2); font-size: 14px; line-height: 1.55; margin: 8px 0 16px; }
@media (max-width: 640px) { .m-feature { grid-template-columns: 1fr; } }

/* ---------- 11. Profilo ---------- */
.prof-top { display: grid; justify-items: center; padding: 40px 20px 10px; text-align: center; }
.prof-ring { width: 124px; height: 124px; border-radius: 50%; border: var(--stroke) solid var(--line); display: grid; place-items: center; --w: 84px; position: relative; }
.prof-ring .edit { position: absolute; right: -2px; bottom: 4px; width: 34px; height: 34px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; font-size: 16px; }
.prof-top h1 { font-family: var(--hand); font-weight: var(--hand-w); font-size: 28px; letter-spacing: .1em; text-transform: uppercase; margin-top: 16px; }
.prof-top .handle { color: var(--ink-3); font-size: 14px; }
.prof-top .bio { color: var(--ink-2); font-size: 14px; max-width: 36ch; margin-top: 10px; line-height: 1.5; }
.stats { display: flex; justify-content: center; gap: 34px; margin: 24px 0 8px; }
.stats div { display: grid; justify-items: center; }
.stats strong { font-size: 22px; font-weight: 500; }
.stats span { font-size: 12px; color: var(--ink-3); }
.prof-cta { display: flex; gap: 10px; justify-content: center; margin: 16px 0 26px; }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); border-top: var(--stroke) solid var(--line); border-bottom: var(--stroke) solid var(--line); margin-bottom: 14px; }
.seg button { font-family: var(--hand); font-size: 15px; letter-spacing: .1em; text-transform: uppercase; padding: 12px; border-right: var(--stroke) solid var(--line); }
.seg button:last-child { border-right: 0; }
.seg button[aria-selected="true"] { color: var(--accent-hi); }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 0 6px; }
.grid3 a { aspect-ratio: 1; overflow: hidden; border: 1.5px solid #3a3936; }
.grid3 img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.grid3 a:hover img { transform: scale(1.05); }
.empty { display: grid; justify-items: center; gap: 12px; text-align: center; padding: 48px 24px; color: var(--ink-3); }
.empty .star-svg { width: 42px; height: 46px; filter: grayscale(1) brightness(2.4); opacity: .35; }
.empty strong { color: var(--ink); font-family: var(--hand); font-weight: var(--hand-w); font-size: 20px; letter-spacing: .06em; }
.empty p { max-width: 34ch; line-height: 1.5; font-size: 14px; }

/* ---------- 12. Messaggi ---------- */
.msg-head { display: flex; align-items: center; gap: 12px; padding: 26px 16px 18px; }
.msg-head h1 { font-family: var(--hand); font-weight: var(--hand-w); font-size: 30px; letter-spacing: .12em; text-transform: uppercase; flex: 1; }
.msg-head .crop { --w: 40px; }
.thread { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 14px 16px; transition: background .2s; }
.thread:hover { background: var(--bg-2); }
.thread strong { font-weight: 500; display: block; }
.thread p { color: var(--ink-3); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thread.unread p { color: var(--ink-2); }
.thread time { font-size: 12px; color: var(--ink-3); display: grid; justify-items: end; gap: 6px; }
.badge { min-width: 20px; height: 20px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 11px; display: grid; place-items: center; padding: 0 6px; }
.chat { display: flex; flex-direction: column; min-height: calc(100dvh - var(--dock-h) - 32px); }
.chat-top { display: flex; align-items: center; gap: 12px; padding: 16px 12px; border-bottom: 1.5px solid #2a2927; position: sticky; top: 0; background: var(--bg); z-index: 2; }
.chat-top strong { font-weight: 500; }
.chat-top small { display: block; color: var(--ink-3); font-size: 12px; }
.bubbles { flex: 1; display: flex; flex-direction: column; gap: 8px; padding: 20px 14px; }
.bubble { max-width: 78%; padding: 10px 14px; border-radius: 18px 18px 18px 4px; background: var(--bg-3); line-height: 1.45; font-size: 15px; }
.bubble.me { align-self: flex-end; background: var(--accent); color: #fff; border-radius: 18px 18px 4px 18px; }
.bubble time { display: block; font-size: 10px; opacity: .6; margin-top: 4px; }
.composer { display: flex; gap: 8px; padding: 10px 12px 16px; position: sticky; bottom: var(--dock-h); background: var(--bg); }
.composer input { flex: 1; min-width: 0; background: var(--bg-2); border: 1.5px solid #4a4845; border-radius: 999px; padding: 12px 18px; outline: none; }
.composer input:focus { border-color: var(--line); }
.composer input::placeholder { color: #807e79; }
.composer button { width: 46px; height: 46px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; font-size: 20px; flex: none; }

/* ---------- 13. Impostazioni ---------- */
.set-head { display: flex; align-items: center; gap: 14px; padding: 28px 18px 10px; }
.set-head .crop { --w: 38px; }
.set-head h1 { font-family: var(--hand); font-weight: var(--hand-w); font-size: 28px; letter-spacing: .12em; text-transform: uppercase; }
.set-group { padding: 18px 18px 6px; }
.set-group h2 { font-family: var(--hand); font-weight: var(--hand-w); font-size: 15px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 6px; }
.set-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 0; border-bottom: 1px solid #1f1e1d; }
.set-row:last-child { border-bottom: 0; }
.set-row span small { display: block; color: var(--ink-3); font-size: 13px; margin-top: 2px; }
.switch { position: relative; width: 50px; height: 28px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: #2e2d2b; transition: background .25s; }
.switch span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--ink); transition: transform .3s var(--ease); }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(22px); }
.switch input:focus-visible + span { outline: 2px solid var(--accent-hi); outline-offset: 2px; }
.set-row select { background: var(--bg-2); border: 1.5px solid #4a4845; border-radius: 999px; padding: 8px 14px; color: var(--ink); font: inherit; }
.invite-code { font-family: var(--hand); font-size: 20px; letter-spacing: .18em; color: var(--ink); }
.danger { color: #ff8a9c; }

/* ---------- Search ---------- */
.search { position: fixed; inset: 0; z-index: 50; background: rgba(3,3,3,.94); backdrop-filter: blur(8px); overflow-y: auto; }
.search[hidden] { display: none; }
.search-inner { width: min(100%, 560px); margin: 0 auto; padding: 40px 16px; }
.search-inner > label { font-size: 22px; letter-spacing: .06em; display: block; margin-bottom: 14px; }
.search-row { display: flex; align-items: center; gap: 10px; border-bottom: var(--stroke) solid var(--line); padding: 4px 0 8px; font-size: 24px; }
.search-row input { flex: 1; min-width: 0; background: none; border: 0; outline: none; font-size: 20px; }
.search-row input::placeholder { color: #77756f; }
.search-results { padding-top: 18px; display: grid; gap: 4px; }
.search-results h3 { font-family: var(--hand); font-weight: var(--hand-w); font-size: 14px; letter-spacing: .14em; color: var(--ink-3); text-transform: uppercase; margin: 14px 0 6px; }
.sr { display: grid; grid-template-columns: 56px 1fr; gap: 12px; align-items: center; padding: 8px; border-radius: 10px; }
.sr:hover { background: var(--bg-2); }
.sr img { width: 56px; height: 56px; object-fit: cover; border-radius: 6px; }
.sr img.round { border-radius: 50%; }
.sr span { display: block; font-size: 12px; color: var(--ink-3); }

/* ---------- Sheet ---------- */
.sheet-scrim { position: fixed; inset: 0; z-index: 44; background: rgba(0,0,0,.6); opacity: 0; pointer-events: none; transition: opacity .3s; }
.sheet-scrim.open { opacity: 1; pointer-events: auto; }
.sheet {
  position: fixed; left: 50%; bottom: 0; z-index: 45; width: min(100vw, 560px); max-height: 78dvh; overflow-y: auto; background: var(--bg-2);
  border: var(--stroke) solid var(--line); border-bottom: 0; border-radius: 22px 22px 0 0; padding: 12px 20px 34px;
  transform: translate(-50%, 102%); transition: transform .45s var(--ease);
}
.sheet.open { transform: translate(-50%, 0); }
.sheet-grip { display: block; width: 44px; height: 4px; border-radius: 4px; background: #4a4845; margin: 0 auto 16px; }
.sheet h3 { font-family: var(--hand); font-weight: var(--hand-w); font-size: 22px; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 12px; }
.sheet p { color: var(--ink-2); line-height: 1.6; font-size: 15px; }
.sheet .btn-ghost { display: inline-block; margin-top: 18px; }
.comment { display: grid; grid-template-columns: auto 1fr; gap: 12px; padding: 10px 0; }
.comment strong { font-weight: 500; font-size: 14px; }
.comment p { font-size: 14px; }
.sheet .composer { position: static; padding: 14px 0 0; background: none; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--dock-h) + 18px); z-index: 60; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-size: 14px; font-weight: 500; transition: all .35s var(--ease); white-space: nowrap;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* ---------- Reference-video refinements: clean sans, thin rings ---------- */
.page-head h1, .cine-title, .market-head h1, .prof-top h1, .msg-head h1, .set-head h1 { font-weight: 300; letter-spacing: .3em; }
.page-head h1 { font-size: clamp(20px, 5.6vw, 30px); }
.cine-title { font-size: clamp(17px, 5vw, 32px); }
.market-head h1 { font-size: clamp(18px, 5vw, 28px); }
.prof-top h1 { font-size: 20px; }
.msg-head h1, .set-head h1 { font-size: 20px; }
.gate-msg { font-weight: 600; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; }
.frame { padding: 8px; }
.frame-inner { border: 0; border-radius: 8px; }
.m-tile .m-img > div { border-radius: 8px; }
.post-title { font-weight: 500; font-size: 14px; letter-spacing: .01em; }
.post-by { font-weight: 600; font-size: 10px; letter-spacing: .04em; text-transform: uppercase; }
.avatar-ring { border-color: #5a5957; }
.tab { font-size: clamp(11px, 3.2vw, 16px); font-weight: 700; }
.tab:last-child { font-size: clamp(10px, 2.9vw, 15px); }
.cf-label { font-size: clamp(14px, 3.8vw, 20px); font-weight: 700; letter-spacing: .08em; }
.cf-foot a { font-size: clamp(12px, 3.3vw, 16px); font-weight: 600; }
.cf-item { border-radius: 6px 6px 0 0; }
.d-title h1 { font-size: clamp(17px, 4.8vw, 24px); font-weight: 700; }
.d-desc h3, .sheet h3 { font-size: 15px; font-weight: 700; letter-spacing: .12em; }
.related-tab { font-size: 13px; font-weight: 700; }
.disc h2 { font-size: clamp(17px, 4.8vw, 22px); font-weight: 600; letter-spacing: .14em; }
.country-nav h2 { font-size: 15px; font-weight: 700; letter-spacing: .14em; }
.seg button { font-size: 12px; font-weight: 700; }
.invite-code { font-weight: 600; font-size: 16px; }
.arc-circle { border-color: #5a5957; background: #050505; }
.arc-label { font-weight: 700; font-size: 9.5px; letter-spacing: .05em; }
.arc-item.current .arc-circle { border-color: var(--accent-hi); }
.arc-circle.i-profilo { --w: 50px; }
#globe .sphere { stroke: #6b6a67; stroke-width: 1.5; }
#globe .land { stroke: #cfcdc8; stroke-width: 1; }

/* ---------- QOL ---------- */
.burst {
  position: absolute; left: var(--x); top: var(--y); width: 96px; height: 96px; margin: -48px 0 0 -48px; z-index: 6;
  display: grid; place-items: center; font-size: 92px; color: var(--accent-hi); pointer-events: none;
  filter: drop-shadow(0 6px 18px rgba(0,0,0,.5)); animation: burst .85s var(--ease) forwards;
}
@keyframes burst {
  0% { transform: scale(.2); opacity: 0; }
  25% { transform: scale(1.12); opacity: 1; }
  60% { transform: scale(1); opacity: 1; }
  100% { transform: scale(1.15) translateY(-24px); opacity: 0; }
}
.recent { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.recent .pill { font-size: 13px; padding: 6px 14px; }
.recent-clear { font-size: 12px; color: var(--ink-3); text-decoration: underline; margin-left: 4px; }
.kbd-hint { display: none; margin-top: 18px; font-size: 12px; color: var(--ink-3); }
.kbd-hint kbd { font-family: var(--sans); border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; margin: 0 2px; color: var(--ink-2); }
@media (hover: hover) and (pointer: fine) { .kbd-hint { display: block; } }
.seguiti-pills .pill img { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; display: inline-block; vertical-align: middle; margin: -3px 6px 0 -6px; }
.cf-foot { padding: 10px 6% 0; gap: 10px; }
.cf-foot a { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cf-foot .act small { font-size: 10px; }

/* ---------- QOL: save, publish, edit profile, action list, pull to refresh ---------- */
.post-by small { display: block; margin-top: 2px; font-size: 9.5px; font-weight: 500; letter-spacing: .02em; text-transform: none; color: var(--ink-3); }
.post .new-tag { font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-hi); line-height: 18px; }
.post-actions { gap: 4px; padding: 0; align-content: start; }
.post-actions .act { font-size: 25px; width: 40px; height: 36px; place-items: center; }
.act.save.on { color: var(--ink); }
.action-list { display: grid; border: var(--stroke) solid var(--line); border-radius: var(--wobble); overflow: hidden; }
.action-list > * { display: flex; align-items: center; gap: 12px; padding: 14px 16px; font-size: 15px; text-align: left; border-bottom: var(--stroke) solid var(--line); transition: background .15s; }
.action-list > :last-child { border-bottom: 0; }
.action-list > :hover { background: rgba(255, 255, 255, .04); }
.action-list i { font-size: 22px; color: var(--ink-2); }
.action-list .danger, .action-list .danger i { color: #ff8a9c; }
.sheet p + .action-list { margin-top: 16px; }
.pub { display: grid; gap: 14px; }
.pub .btn-accent { width: 100%; padding: 14px; }
.pub-drop { position: relative; display: grid; place-items: center; aspect-ratio: 4 / 3; border: var(--stroke) dashed var(--line-hi); border-radius: var(--wobble); overflow: hidden; cursor: pointer; color: var(--ink-2); transition: border-color .2s; }
.pub-drop:hover, .pub-drop:focus-within { border-color: var(--ink-2); }
.pub-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; z-index: 2; }
.pub-drop span { display: grid; justify-items: center; gap: 6px; font-size: 14px; }
.pub-drop span i { font-size: 34px; }
.pub-drop img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pub-drop.has { border-style: solid; }
.pub-drop.has span { display: none; }
.field { display: grid; gap: 6px; }
.field label { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.field input, .field select, .field textarea {
  background: var(--bg); border: var(--stroke) solid var(--line); border-radius: 12px; padding: 11px 14px;
  color: var(--ink); font: inherit; font-size: 16px; outline: none; resize: vertical; transition: border-color .2s;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--line-hi); }
.field ::placeholder { color: #75736e; }
.pub-err { color: #ff8a9c; font-size: 13px; min-height: 1em; }
.set-link { width: 100%; text-align: left; font: inherit; color: inherit; }
.set-link i { color: var(--ink-3); font-size: 18px; }
.ptr {
  position: fixed; top: 10px; left: 50%; z-index: 29; width: 36px; height: 36px; margin-left: -18px; display: grid; place-items: center;
  border-radius: 50%; border: var(--stroke) solid var(--line); background: var(--bg); opacity: 0; pointer-events: none;
  transform: translateY(calc(var(--pull, 0px) - 30px)) rotate(calc(var(--pull, 0px) * 3));
}
.ptr img { width: 16px; height: 18px; object-fit: contain; filter: grayscale(1) brightness(2.4); opacity: .6; }
.ptr.ready img, .ptr.spin img { filter: none; opacity: 1; }
.ptr.spin { opacity: 1 !important; transform: translateY(40px); transition: transform .2s; }
@media (prefers-reduced-motion: no-preference) { .ptr.spin img { animation: ptrspin .8s linear infinite; } }
@keyframes ptrspin { to { transform: rotate(360deg); } }

/* labels stay above icons that overflow their ring (Galleria, Scopri) */
.hub-label { position: relative; z-index: 1; }

/* ---------- Rating: red stars cropped from the logo asset ---------- */
.rating img { width: var(--s, 18px); height: var(--s, 18px); object-fit: contain; flex: none; }
.rating .r-off img { filter: grayscale(1) brightness(3); opacity: .4; } /* grey, empty stars */

/* ---------- Scopri post: title on top, stars under the frame ---------- */
.post > .post-title { grid-column: 2; grid-row: 1; margin: 0 0 10px 14px; font-size: 15px; font-weight: 600; color: var(--ink); }
.post > .post-side { grid-row: 2; }
.post > .frame { grid-row: 2; }
.post > .post-actions { grid-row: 2; }
.post > .rating { grid-column: 2; grid-row: 3; margin: 12px 0 0 14px; }
/* the picture is pinned to the frame's padding box: percent heights on an aspect-ratio box
   don't resolve in every browser (Safari), which let tall pictures spill out at the bottom */
.frame { overflow: hidden; }
.frame-inner { position: absolute; inset: 8px; width: auto; height: auto; }

/* ---------- Scopri: X-style feed (from the feed sketch) ---------- */
#feed.xfeed { display: block; padding: 0; }
.xpost { display: grid; grid-template-columns: 58px minmax(0, 1fr); column-gap: 14px; padding: 18px 14px 8px 12px; border-bottom: var(--stroke) solid var(--line-hi); cursor: pointer; transition: background .15s; }
.xpost:hover { background: rgba(255, 255, 255, .018); }
.xpost.open { cursor: default; border-bottom-color: var(--line); }
.xpost.open:hover { background: none; }
.x-ava .avatar-ring { width: 58px; height: 58px; padding: 3px; }
.x-body { min-width: 0; }
.x-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.x-meta { min-width: 0; font-size: 13px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-top: 2px; }
.x-name { font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.x-name:hover { text-decoration: underline; }
.x-time { color: var(--ink-3); font-weight: 500; letter-spacing: .06em; }
.x-head .rating { flex: none; margin-top: 1px; }
.x-head .new-tag { flex: none; font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-hi); }
.x-title { margin-top: 6px; font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.x-desc { margin-top: 5px; font-size: 14px; line-height: 1.45; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.x-desc.open { -webkit-line-clamp: unset; display: block; font-size: 15px; color: var(--ink); }
/* the frame follows the work's shape (aspect-ratio and width are set per post) */
.x-media { position: relative; display: block; margin-top: 12px; border: var(--stroke) solid var(--line-hi); border-radius: 14px; overflow: hidden; background: var(--bg-2); max-width: 100%; }
.x-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.x-media .play-ico { width: 54px; height: 54px; font-size: 22px; }
.x-actions { display: flex; align-items: center; justify-content: space-between; margin: 8px -6px 0 -10px; }
.x-actions .act { display: flex; align-items: center; gap: 5px; height: 40px; padding: 0 8px; font-size: 22px; color: var(--ink-2); border-radius: 999px; transition: color .15s, background .15s; }
.x-actions .act:hover { color: var(--ink); background: rgba(255, 255, 255, .05); }
.x-actions .act small { font-size: 12.5px; color: var(--ink-3); font-family: var(--sans); }
.x-actions .act.like.on, .x-actions .act.like.on small { color: var(--accent-hi); }
.x-actions .act.repost.on, .x-actions .act.repost.on small { color: #3ecf8e; }
.x-actions .grow { flex: 1; }
.x-actions [data-act="more"] { min-width: 0; }
.x-actions.big .act { font-size: 25px; }
.x-actions.big .act small { display: none; }
/* comments page */
.screen[data-screen="post"] .x-top { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; gap: 8px; padding: 8px 8px; background: rgba(3, 3, 3, .88); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: var(--stroke) solid var(--line); }
.x-top h1 { font-size: 18px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.x-stats { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 14px; padding: 12px 0; border-top: var(--stroke) solid var(--line); border-bottom: var(--stroke) solid var(--line); font-size: 13px; color: var(--ink-3); }
.x-stats strong { color: var(--ink); font-weight: 600; }
.x-compose { display: grid; grid-template-columns: 40px 1fr auto; gap: 10px; align-items: center; padding: 12px 14px; border-bottom: var(--stroke) solid var(--line); }
.x-compose .x-me { width: 40px; height: 40px; border-radius: 50%; }
.x-compose input { min-width: 0; background: none; border: 0; outline: none; color: var(--ink); font: inherit; font-size: 16px; padding: 8px 0; }
.x-compose input::placeholder { color: #75736e; }
.x-compose .btn-accent { padding: 9px 18px; font-size: 14px; }
.x-reply { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 12px; padding: 14px 14px; border-bottom: var(--stroke) solid var(--line); }
.x-reply .avatar-ring.sm { width: 42px; height: 42px; }
.x-text { margin-top: 3px; font-size: 15px; line-height: 1.45; }
.x-reply-likes { margin-top: 6px; font-size: 12px; color: var(--ink-3); display: flex; align-items: center; gap: 5px; }
.x-none { padding: 30px 14px; text-align: center; color: var(--ink-3); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* toast with an undo button */
.toast.has-act { pointer-events: auto; display: flex; align-items: center; gap: 14px; }
.toast-act { font-weight: 700; color: var(--accent); text-decoration: underline; }
