/* Parti aggiunte con la nuova base: utente nel menu, news, spoiler, articoli, social. */
.nav-menu { gap: 1.1rem; }
.nav-menu a { font-size: .95rem; }
.nav-user { display: flex; align-items: center; gap: .5rem; font-size: .95rem; color: var(--muted); }
.nav-user img { border-radius: 50%; }
.nav-user span { max-width: 9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-menu .btn { padding: .5rem .9rem; font-size: .95rem; }
.empty { padding-bottom: 5rem; }
.post-meta { color: var(--muted); font-size: .93rem; margin-bottom: .4rem; }
.post-meta a { color: var(--accent); }

.news-list { list-style: none; margin: 0; padding: 0; }
.news-list li { padding: 1rem 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; gap: .2rem 1.5rem; }
.news-list li:first-child { padding-top: 0; }
.news-list a { color: var(--text); text-decoration: none; font-size: 1.15rem; }
.news-list a:hover { color: var(--accent); }
.news-list p { grid-column: 1 / -1; margin: 0; color: var(--muted); }

.post-list { padding-bottom: 5rem; max-width: 56rem; }
.post-row { display: grid; grid-template-columns: 15rem 1fr; gap: 2rem; padding: 2rem 0; border-top: 1px solid var(--line); align-items: start; }
.post-row > div:only-child { grid-column: 1 / -1; }
.post-row h2 { font-size: 1.8rem; margin-bottom: .6rem; }
.post-row h2 a { color: var(--text); text-decoration: none; }
.post-row h2 a:hover { color: var(--accent); }
.post-row p { max-width: 60ch; }
.post-cover img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border: 1px solid var(--line); }
@media (max-width: 760px) { .post-row { grid-template-columns: 1fr; gap: 1rem; } }

.article { max-width: 48rem; padding-top: 4rem; padding-bottom: 5rem; }
.article h1 { font-size: clamp(2.2rem, 5.5vw, 3.6rem); }
.article-lead { font-size: 1.25rem; color: var(--muted); }
.article-cover { display: block; width: 100%; max-height: 32rem; object-fit: cover; margin: 2rem 0; border: 1px solid var(--line); }
.prose h3 { margin-top: 2rem; font-size: 1.5rem; }
.prose figure { margin: 2rem 0; }
.prose figure img { display: block; border: 1px solid var(--line); }
.prose blockquote { margin: 1.5rem 0; padding-left: 1.2rem; border-left: 2px solid var(--accent); color: var(--muted); font-style: italic; }

/* Spoiler: coperti finché non scegli di guardare */
.spoiler-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr)); gap: 2.5rem 2rem; padding-bottom: 5rem; }
.veil { position: relative; border: 1px solid var(--line); background: var(--surface); min-height: 12rem; overflow: hidden; }
.veil img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.veil-text { padding: 1.1rem 1.2rem 1.2rem; }
.veil-text h2 { font-size: 1.5rem; margin-bottom: .5rem; }
.veil > * { filter: blur(22px) saturate(.4); transition: filter .35s; pointer-events: none; user-select: none; }
.veil.open > * { filter: none; pointer-events: auto; user-select: auto; }
.veil:not(.open)::after { content: "Spoiler"; position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-display); font-style: italic; font-weight: 800; font-size: 2rem; color: var(--accent); background: rgba(7, 5, 13, .4); }
.spoiler .reveal { margin: .9rem 0 .5rem; }

/* Social */
.social-block { padding-bottom: 4rem; }
.social-block h2 { font-size: 1.9rem; }
.channel-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 0 2.5rem; }
.channel-list a { display: flex; flex-direction: column; padding: 1rem 0; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none; }
.channel-list a:hover strong { color: var(--accent); }
.channel-list span { font-size: .9rem; }
.channel-list strong { font-family: var(--font-display); font-size: 1.4rem; }
.streamer-grid { display: grid; gap: 1rem; max-width: 56rem; }
.streamer { border: 1px solid var(--line); background: var(--surface); padding: 1.1rem 1.25rem; }
.streamer-head { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; }
.streamer h3 { margin: 0; }
.streamer .btn { padding: .5rem .9rem; font-size: .95rem; }
.player { margin-top: 1.1rem; color: var(--muted); }
.player iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; background: #000; }

/* Spoiler letti dal canale Discord */
.spoiler-feed { max-width: 44rem; padding-bottom: 5rem; display: grid; gap: 2.5rem; }
.spoiler-feed .veil { min-height: 6rem; }
.spoiler-feed .veil img, .spoiler-feed .veil video { display: block; width: 100%; height: auto; aspect-ratio: auto; max-height: 40rem; object-fit: contain; background: #000; }
.spoiler-feed .veil-text p { margin: 0; overflow-wrap: anywhere; }
.d-head { font-family: var(--font-display); font-style: italic; font-size: 1.35rem; }

/* Carosello Instagram */
.block-head { display: flex; align-items: baseline; gap: 1.25rem; flex-wrap: wrap; }
.block-head h2 { margin-bottom: 1rem; }
.carousel-track { list-style: none; margin: 0; padding: 0 0 .75rem; display: flex; gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.carousel-track li { flex: 0 0 min(17.5rem, 78vw); scroll-snap-align: start; }
.carousel-track a { display: block; color: var(--text); text-decoration: none; }
.carousel-track img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.carousel-track a:hover img { border-color: var(--accent); }
.slide-meta { display: block; color: var(--muted); font-size: .88rem; margin-top: .6rem; }
.slide-text { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-size: .95rem; line-height: 1.45; margin-top: .2rem; overflow-wrap: anywhere; }
.carousel-nav { display: flex; gap: .5rem; margin-top: .6rem; flex-wrap: wrap; }
.mini { background: none; border: 1px solid var(--line); color: var(--text); font: inherit; font-size: .9rem; padding: .3rem .75rem; border-radius: var(--radius); cursor: pointer; }
.mini:hover { border-color: var(--accent); color: var(--accent); }
.tiktok-embed { background: transparent; }

/* Riquadri ufficiali di Instagram e TikTok */
.embed-frame { max-width: 780px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; box-shadow: 0 0 40px rgba(124, 58, 237, .25); }
.embed-frame blockquote { margin: 0 !important; padding: 1rem; }
.embed-frame iframe { display: block; margin: 0 !important; border: 0 !important; min-width: 0 !important; width: 100% !important; }

/* Schede degli streamer */
.streamer-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr)); gap: 1.5rem; }
.streamer-card { display: flex; flex-direction: column; height: 100%; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface); color: var(--text); text-decoration: none; transition: border-color .2s, box-shadow .2s, transform .2s; }
.streamer-card:hover, .streamer-card:focus-visible { border-color: var(--accent-strong); box-shadow: 0 0 34px rgba(124, 58, 237, .4); transform: translateY(-3px); }
.streamer-card.is-live { border-color: #ff4d5a; }
.card-cover { position: relative; display: block; aspect-ratio: 16 / 7; background: linear-gradient(135deg, #2a1259, #0d0820 60%, #3b1a6e) center / cover no-repeat; }
.card-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, transparent 40%, var(--surface)); }
.live-badge { position: absolute; z-index: 1; top: .8rem; left: .8rem; background: #e02434; color: #fff; font-weight: 600; font-size: .82rem; padding: .2rem .6rem; border-radius: 4px; }
.viewers { position: absolute; z-index: 1; top: .8rem; right: .8rem; background: rgba(0, 0, 0, .7); color: #fff; font-size: .82rem; padding: .2rem .6rem; border-radius: 4px; }
.card-body { position: relative; display: flex; flex-direction: column; gap: .2rem; padding: 0 1.3rem 1.3rem; margin-top: -2.9rem; flex: 1; }
.card-avatar { width: 5.5rem; height: 5.5rem; border-radius: 50%; border: 3px solid var(--accent-strong); background: var(--bg); box-shadow: 0 0 22px rgba(124, 58, 237, .6); margin-bottom: .5rem; }
.is-live .card-avatar { border-color: #ff4d5a; box-shadow: 0 0 22px rgba(255, 77, 90, .6); }
.avatar-ph { display: grid; place-items: center; font-family: var(--font-display); font-style: italic; font-weight: 800; font-size: 2.2rem; color: var(--accent); border-radius: 50%; }
.avatar-ph.big { width: 8rem; height: 8rem; font-size: 3.4rem; border: 3px solid var(--accent-strong); background: var(--bg); }
.streamer-card strong { font-family: var(--font-display); font-style: italic; font-weight: 800; font-size: 1.6rem; line-height: 1.15; overflow-wrap: anywhere; }
.card-sub { color: var(--muted); font-size: .93rem; }
.card-text { margin-top: .5rem; font-size: .97rem; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-go { margin-top: auto; padding-top: 1rem; color: var(--accent); font-weight: 600; font-size: .95rem; }
.live { color: #ff6b76; font-weight: 600; }
.live::before { content: ""; display: inline-block; width: .55rem; height: .55rem; border-radius: 50%; background: #ff4d5a; margin-right: .45rem; vertical-align: .08em; box-shadow: 0 0 10px #ff4d5a; }

/* Pagina dello streamer */
.streamer-page { padding-top: 2rem; padding-bottom: 5rem; }
.streamer-banner { height: clamp(8rem, 22vw, 15rem); margin-top: 1rem; border: 1px solid var(--line); border-radius: 14px; background: linear-gradient(135deg, #2a1259, #0d0820 60%, #3b1a6e) center / cover no-repeat; position: relative; overflow: hidden; }
.streamer-banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, transparent 30%, var(--bg)); }
.streamer-top { position: relative; display: flex; align-items: flex-end; gap: 1.75rem; flex-wrap: wrap; margin: -3.5rem 0 2rem; padding: 0 1.25rem; }
.streamer-top > div { flex: 1 1 18rem; }
.streamer-top h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); margin-bottom: .4rem; overflow-wrap: anywhere; }
.streamer-avatar { width: 8rem; height: 8rem; border-radius: 50%; border: 3px solid var(--accent-strong); background: var(--bg); box-shadow: 0 0 30px rgba(124, 58, 237, .6); flex: none; }
.streamer-status { margin: 0; }
.streamer-title { margin: .3rem 0 0; font-size: 1.15rem; max-width: 60ch; }
.stage { display: grid; gap: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #000; box-shadow: 0 0 40px rgba(124, 58, 237, .22); }
.stage.with-chat { grid-template-columns: minmax(0, 1fr) 21rem; }
.stage iframe { display: block; width: 100%; border: 0; }
.stage-player { aspect-ratio: 16 / 9; }
.stage-chat { height: 100%; min-height: 24rem; border-left: 1px solid var(--line) !important; }
@media (max-width: 900px) { .stage.with-chat { grid-template-columns: 1fr; } .stage-chat { height: 28rem; border-left: 0 !important; border-top: 1px solid var(--line) !important; } }
.streamer-about, .streamer-vods { margin-top: 3.5rem; }
.streamer-vods h2, .streamer-about h2 { font-size: 1.9rem; }
.vod-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 1.75rem 1.25rem; }
.vod-grid a { display: flex; flex-direction: column; gap: .3rem; color: var(--text); text-decoration: none; }
.vod-grid img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border: 1px solid var(--line); margin-bottom: .4rem; }
.vod-grid a:hover img { border-color: var(--accent); }
.vod-grid strong { font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vod-grid span { font-size: .9rem; }

/* Ticket */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
a.tab { text-decoration: none; display: inline-block; }
a.tab[aria-current="page"] { border-color: var(--accent-strong); color: var(--accent); background: var(--accent-soft); }
.ticket-list { list-style: none; margin: 0; padding: 0 0 5rem; }
.ticket-list a { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; padding: 1rem 1.1rem; margin-bottom: .6rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--text); text-decoration: none; }
.ticket-list a:hover { border-color: var(--accent-strong); }
.tl-main { display: flex; flex-direction: column; margin-right: auto; }
.tl-main span { font-size: .92rem; }
.status.waiting { border-color: var(--gold); color: var(--gold); }
.cat-pick { border: 0; padding: 0; margin: 0 0 1.75rem; display: grid; gap: .5rem; }
.cat-pick legend { font-weight: 600; margin-bottom: .6rem; padding: 0; }
.cat-option { display: flex; gap: .8rem; align-items: flex-start; padding: .8rem 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); cursor: pointer; }
.cat-option:hover, .cat-option:has(input:checked) { border-color: var(--accent-strong); }
.cat-option:has(input:checked) { background: var(--accent-soft); }
.cat-option input { width: auto; margin-top: .35rem; }
.cat-option span span { display: block; font-size: .93rem; }
.ticket-page { padding-top: 2.5rem; padding-bottom: 4rem; }
.ticket-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.ticket-head h1 { font-size: clamp(1.7rem, 4vw, 2.6rem); margin-bottom: .3rem; }
.ticket-head p { margin: 0; }
.ticket-layout { display: grid; grid-template-columns: minmax(0, 1fr) 16rem; gap: 1.5rem; align-items: start; }
.chat { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); padding: 1.25rem; height: min(62vh, 44rem); overflow-y: auto; display: flex; flex-direction: column; gap: 1.1rem; }
.msg { display: flex; gap: .8rem; max-width: 46rem; }
.msg.mine { flex-direction: row-reverse; margin-left: auto; }
.msg-avatar { width: 2.5rem; height: 2.5rem; border-radius: 50%; flex: none; }
.msg .avatar-ph { font-size: 1.1rem; border: 1px solid var(--line); background: var(--bg); }
.msg-main { min-width: 0; }
.msg-head { margin: 0 0 .25rem; font-size: .92rem; }
.msg.mine .msg-head { text-align: right; }
.msg time { color: var(--muted); font-size: .82rem; }
.msg-body { background: var(--bg); border: 1px solid var(--line); border-radius: 4px 14px 14px 14px; padding: .65rem .9rem; overflow-wrap: anywhere; line-height: 1.5; }
.msg.mine .msg-body { background: var(--accent-soft); border-color: rgba(139, 92, 246, .5); border-radius: 14px 4px 14px 14px; }
.msg.staff .msg-body { border-color: rgba(232, 196, 106, .5); }
.badge-staff { font-size: .74rem; font-weight: 600; color: #1a1205; background: var(--gold); padding: .05rem .45rem; border-radius: 4px; }
.msg.system { display: block; max-width: none; text-align: center; color: var(--muted); font-size: .92rem; }
.msg.system .msg-body { display: inline-block; background: none; border: 1px dashed var(--line); border-radius: 10px; text-align: left; }
.msg.system time { display: block; margin-top: .2rem; }
.msg-img img { display: block; max-width: min(100%, 22rem); max-height: 18rem; margin-top: .5rem; border: 1px solid var(--line); border-radius: 8px; }
.msg-file { margin: .4rem 0 0; font-size: .93rem; }
.msg-pending { margin: 0; text-align: right; color: var(--muted); font-style: italic; font-size: .92rem; overflow-wrap: anywhere; }
.pending-list:empty { display: none; }
.ticket-side { display: grid; gap: .75rem; }
.ticket-side .btn { text-align: center; }
.close-box { border: 1px solid var(--line); border-radius: var(--radius); padding: .7rem .9rem; }
.close-box summary { cursor: pointer; color: var(--danger); }
.close-box form { display: grid; gap: .5rem; margin-top: .8rem; }
.close-box .help { color: var(--muted); font-size: .88rem; margin: 0; }
.composer { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .75rem; align-items: end; margin-top: 1rem; max-width: calc(100% - 17.5rem); }
#tk-msg { margin-top: .75rem; }
.composer-hint { margin: .4rem 0 0; }
@media (pointer: coarse) { .composer-hint { display: none; } }
@media (max-width: 860px) { .ticket-layout { grid-template-columns: 1fr; } .composer { max-width: none; } .chat { height: 58vh; } }

/* Zoom delle immagini */
img[data-zoom] { cursor: zoom-in; }
dialog.zoom { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; display: none; place-items: center; cursor: zoom-out; overflow: hidden; }
dialog.zoom[open] { display: grid; }
dialog.zoom::backdrop { background: rgba(4, 2, 10, .93); }
dialog.zoom img { max-width: 96vw; max-height: 92vh; object-fit: contain; border-radius: 6px; box-shadow: 0 0 60px rgba(124, 58, 237, .5); }
dialog.zoom .btn { position: fixed; top: 1rem; right: 1rem; background: var(--bg); }
