:root {
	--accent: #C9A45C;
	--bg: #0A1124;
	--bg2: #131D3A;
	--line: rgba(255,255,255,.09);
	--txt: #F4F1EA;
	--muted: #A9AEC2;
	--ok: #35D29A;
	--bad: #FF5D6C;
	--gold: #E2C27A;
	--r: 18px;
	--safe-b: env(safe-area-inset-bottom, 0px);
	--safe-t: env(safe-area-inset-top, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--txt); }
body {
	font: 16px/1.5 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	min-height: 100vh;
	background:
		radial-gradient(120% 60% at 50% -10%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 60%),
		var(--bg);
	background-attachment: fixed;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }

#app { max-width: 560px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; }

/* Header */
.top {
	position: sticky; top: 0; z-index: 5;
	display: flex; align-items: center; gap: 12px;
	padding: calc(12px + var(--safe-t)) 18px 12px;
	background: color-mix(in srgb, var(--bg) 82%, transparent);
	backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
	border-bottom: 1px solid var(--line);
}
.top-logo { width: 34px; height: 34px; border-radius: 10px; }
.top-title { font-weight: 700; letter-spacing: .2px; line-height: 1.1; }
.top-title small { display: block; font-weight: 500; font-size: 12px; color: var(--accent); letter-spacing: 1.2px; text-transform: uppercase; margin-top: 2px; }

main { flex: 1; padding: 20px 18px calc(96px + var(--safe-b)); }

/* Tabs */
.tabs {
	position: fixed; left: 0; right: 0; bottom: 0; z-index: 6;
	display: flex; justify-content: center; gap: 4px;
	padding: 8px 10px calc(8px + var(--safe-b));
	background: color-mix(in srgb, var(--bg) 88%, transparent);
	backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
	border-top: 1px solid var(--line);
}
.tabs a {
	position: relative; flex: 0 1 140px;
	display: flex; flex-direction: column; align-items: center; gap: 3px;
	padding: 6px 4px; border-radius: 12px;
	font-size: 12px; font-weight: 600; color: var(--muted);
}
.tabs a.active { color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.tabs .dot { position: absolute; top: 5px; right: calc(50% - 18px); width: 8px; height: 8px; border-radius: 50%; background: var(--bad); }

/* Icone (SVG come mask, colore = currentColor) */
.ti { display: inline-block; width: 24px; height: 24px; background: currentColor; -webkit-mask: var(--i) center/contain no-repeat; mask: var(--i) center/contain no-repeat; flex: none; }
.ti.inline { width: 17px; height: 17px; vertical-align: -3px; }
.ti.big { width: 48px; height: 48px; color: var(--muted); }
.ti-check { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l7 3v5c0 4.5-3 8.5-7 10-4-1.5-7-5.5-7-10V6z'/%3E%3Cpath d='M8.5 12l2.5 2.5 4.5-5'/%3E%3C/svg%3E"); }
.ti-shield { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l7 3v5c0 4.5-3 8.5-7 10-4-1.5-7-5.5-7-10V6z'/%3E%3Cpath d='M12 8v4M12 15.5v.01'/%3E%3C/svg%3E"); }
.ti-stack { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'%3E%3Crect x='6' y='3' width='12' height='16' rx='2'/%3E%3Cpath d='M9 21h8a3 3 0 003-3V7'/%3E%3C/svg%3E"); }
.ti-bell { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 16V11a6 6 0 0112 0v5l2 2H4z'/%3E%3Cpath d='M10 20a2 2 0 004 0'/%3E%3C/svg%3E"); }
.ti-qr { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='7' rx='1'/%3E%3Crect x='14' y='3' width='7' height='7' rx='1'/%3E%3Crect x='3' y='14' width='7' height='7' rx='1'/%3E%3Cpath d='M14 14h3v3h-3zM20 14v1M14 20h1M18 18h3v3'/%3E%3C/svg%3E"); }
.ti-nfc { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 8a6 6 0 010 8M10 5a10 10 0 010 14M14 6.5a8 8 0 010 11M18 4a12 12 0 010 16'/%3E%3C/svg%3E"); }
.ti-book { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M4 5a2 2 0 012-2h13v16H6a2 2 0 00-2 2z'/%3E%3Cpath d='M4 21V5M8 7h7M8 11h7'/%3E%3C/svg%3E"); }
.ti-share { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v12M8 7l4-4 4 4'/%3E%3Cpath d='M6 11H5v10h14V11h-1'/%3E%3C/svg%3E"); }

/* Hero */
.hero { text-align: center; padding: 6px 0 18px; }
.hero h1 { font-size: 26px; line-height: 1.15; margin: 22px 0 8px; letter-spacing: -.3px; }
.hero p { margin: 0 auto; max-width: 360px; }
.hero-slab {
	width: 120px; margin: 0 auto; padding: 7px; border-radius: 12px;
	background: linear-gradient(160deg, rgba(255,255,255,.22), rgba(255,255,255,.06));
	border: 1px solid rgba(255,255,255,.25);
	box-shadow: 0 18px 50px -12px color-mix(in srgb, var(--accent) 60%, transparent), inset 0 1px 0 rgba(255,255,255,.3);
	transform: rotate(-4deg);
	animation: float 5s ease-in-out infinite;
}
.hero-label { display: flex; justify-content: space-between; align-items: center; padding: 4px 6px; border-radius: 5px; background: #fff; color: var(--bg); font-size: 8px; font-weight: 800; letter-spacing: .6px; }
.hero-label b { font-size: 14px; color: var(--accent); }
.hero-card { height: 128px; margin-top: 6px; border-radius: 6px; background:
	radial-gradient(60% 40% at 50% 45%, rgba(255,255,255,.55), transparent 70%),
	linear-gradient(135deg, var(--accent), #7B5CFF 55%, #FF7BAC); }
@keyframes float { 50% { transform: rotate(-2deg) translateY(-6px); } }

.muted { color: var(--muted); }
.small { font-size: 13px; }

/* Bottoni e form */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 10px;
	min-height: 50px; padding: 0 20px; border: 0; border-radius: 14px;
	background: var(--accent); color: #0A1124; font-weight: 700; font-size: 16px;
	box-shadow: 0 8px 22px -10px var(--accent);
	transition: transform .12s ease, filter .12s ease;
}
.btn:active { transform: scale(.97); }
.btn.ghost { background: rgba(255,255,255,.06); color: var(--txt); box-shadow: inset 0 0 0 1px var(--line); }
.btn.small { min-height: 38px; padding: 0 16px; font-size: 14px; }
.btn.wide { width: 100%; margin-top: 12px; }
.btn.busy { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { filter: brightness(1.3); } }

.code-form { display: flex; gap: 10px; }
.code-form input {
	flex: 1; min-width: 0; height: 56px; padding: 0 18px; border-radius: 14px;
	border: 1px solid var(--line); background: rgba(255,255,255,.05); color: var(--txt);
	font-size: 22px; font-weight: 700; letter-spacing: 2px; font-variant-numeric: tabular-nums;
	outline: none;
}
.code-form input::placeholder { color: rgba(169,174,194,.55); font-weight: 500; letter-spacing: 1px; font-size: 18px; }
.code-form input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); }
.code-form .btn { height: 56px; }

.panel {
	margin-top: 16px; padding: 16px; border-radius: var(--r);
	background: rgba(255,255,255,.045); border: 1px solid var(--line);
}
.panel.tip { display: flex; gap: 12px; align-items: flex-start; }
.panel.tip .ti { color: var(--accent); margin-top: 1px; }
.panel.tip p { margin: 0; font-size: 14px; color: var(--muted); }
.panel.tip strong { color: var(--txt); }
.panel.install { display: flex; align-items: center; gap: 14px; justify-content: space-between; border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.install-txt { display: flex; flex-direction: column; font-size: 14px; color: var(--muted); }
.install-txt strong { color: var(--txt); font-size: 15px; }
.panel.raw code { display: block; margin-top: 6px; word-break: break-all; font-size: 13px; color: var(--txt); }

/* Esito verifica */
.result { text-align: center; padding: 22px 18px; border-radius: var(--r); border: 1px solid; }
.result h2 { margin: 10px 0 4px; font-size: 22px; }
.result p { margin: 0; color: var(--muted); font-size: 14px; }
.r-ico { width: 54px; height: 54px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; font-size: 28px; font-weight: 800; }
.result.ok { border-color: color-mix(in srgb, var(--ok) 40%, transparent); background: color-mix(in srgb, var(--ok) 9%, transparent); }
.result.ok .r-ico { background: var(--ok); color: #03271A; box-shadow: 0 0 0 8px color-mix(in srgb, var(--ok) 18%, transparent); animation: pop .4s cubic-bezier(.3,1.6,.6,1); }
.result.bad { border-color: color-mix(in srgb, var(--bad) 45%, transparent); background: color-mix(in srgb, var(--bad) 10%, transparent); }
.result.bad .r-ico { background: var(--bad); color: #2B0006; box-shadow: 0 0 0 8px color-mix(in srgb, var(--bad) 18%, transparent); }
.result.warn { border-color: rgba(226,194,122,.4); background: rgba(226,194,122,.08); }
.result.warn .r-ico { background: var(--gold); color: #2B1D00; }
.result.pristine { border-color: rgba(226,194,122,.55); background: linear-gradient(160deg, rgba(226,194,122,.14), color-mix(in srgb, var(--ok) 8%, transparent)); }
@keyframes pop { from { transform: scale(.4); opacity: 0; } }

.card-detail { margin-top: 16px; padding: 16px; border-radius: var(--r); background: rgba(255,255,255,.045); border: 1px solid var(--line); }
.slab-img { display: block; width: 100%; padding: 0; border: 0; background: radial-gradient(70% 60% at 50% 40%, rgba(255,255,255,.08), transparent); border-radius: 12px; }
.slab-img img { margin: 0 auto; max-height: 440px; object-fit: contain; border-radius: 10px; }
.cd-head { display: flex; gap: 14px; justify-content: space-between; align-items: flex-start; margin-top: 14px; }
.cd-head h3 { margin: 8px 0 2px; font-size: 18px; line-height: 1.25; }
.cd-head p { margin: 0; }
.code-pill { display: inline-block; padding: 3px 10px; border-radius: 99px; background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); font-weight: 700; font-size: 13px; letter-spacing: .5px; font-variant-numeric: tabular-nums; }
.code-pill.small { font-size: 11px; padding: 2px 8px; }
.big-grade { flex: none; min-width: 78px; padding: 8px 10px; border-radius: 14px; text-align: center; background: #fff; color: var(--bg); }
.big-grade small { display: block; font-size: 10px; font-weight: 800; letter-spacing: 1.5px; color: var(--muted); }
.big-grade b { font-size: 32px; line-height: 1.05; font-variant-numeric: tabular-nums; }
.pristine-badge {
	margin-top: 14px; padding: 12px; border-radius: 12px; text-align: center;
	font-weight: 800; letter-spacing: 3px; color: #2B1D00;
	background: linear-gradient(110deg, #E9B44C, #FFF1C4 45%, #E9B44C 60%, #FFE08A);
	background-size: 200% 100%; animation: shine 3.5s linear infinite;
}
.pristine-badge small { display: block; font-size: 11px; letter-spacing: .3px; font-weight: 600; opacity: .8; }
@keyframes shine { to { background-position: -200% 0; } }

.subs { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; margin-top: 18px; }
.sub-top { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }
.sub-top b { color: var(--txt); font-variant-numeric: tabular-nums; }
.bar { height: 6px; margin-top: 6px; border-radius: 6px; background: rgba(255,255,255,.08); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 60%, #fff 0%), var(--accent)); }

.gallery-wrap { margin-top: 20px; }
.gallery-wrap h4 { margin: 0; font-size: 15px; }
.gallery-wrap p { margin: 2px 0 10px; }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.gallery button { padding: 0; border: 0; border-radius: 10px; overflow: hidden; background: rgba(255,255,255,.06); aspect-ratio: 1; }
.gallery img { width: 100%; height: 100%; object-fit: cover; }

.actions { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.actions .btn { width: 100%; }
.link-danger { text-align: center; padding: 10px; font-size: 14px; color: var(--bad); font-weight: 600; }

/* Liste */
.page-title { font-size: 26px; margin: 4px 0 16px; letter-spacing: -.3px; }
.section-title { font-size: 17px; margin: 26px 0 10px; }
.list { display: flex; flex-direction: column; gap: 10px; }
.row { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 14px; background: rgba(255,255,255,.045); border: 1px solid var(--line); }
.row img, .row-ph { width: 54px; height: 72px; border-radius: 8px; object-fit: cover; background: rgba(255,255,255,.08); flex: none; }
.row-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.row-txt strong { font-size: 15px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.row-txt .code-pill { align-self: flex-start; }
.row .pr { font-style: normal; font-size: 10px; font-weight: 800; letter-spacing: 1.5px; color: var(--gold); }
.row-grade { flex: none; min-width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: #fff; color: var(--bg); font-size: 17px; font-variant-numeric: tabular-nums; }
.row-x { flex: none; width: 32px; height: 32px; border: 0; border-radius: 50%; background: rgba(255,255,255,.07); color: var(--muted); font-size: 20px; line-height: 1; }
.news-row { align-items: flex-start; }
.news-ico { color: var(--accent); margin-top: 2px; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.stats div { padding: 12px; border-radius: 14px; background: rgba(255,255,255,.045); border: 1px solid var(--line); text-align: center; }
.stats b { display: block; font-size: 22px; font-variant-numeric: tabular-nums; }
.stats span { font-size: 12px; color: var(--muted); }

.empty { text-align: center; padding: 40px 10px; }
.empty .ti { margin: 0 auto 8px; display: block; }
.empty p { margin: 6px 0; }
.empty .btn { margin-top: 18px; }

.panel.push { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; }
.panel.push > .ti { color: var(--accent); }
.panel.push.busy { opacity: .6; pointer-events: none; }
.push-txt { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.switch { flex: none; width: 52px; height: 30px; padding: 3px; border: 0; border-radius: 99px; background: rgba(255,255,255,.15); transition: background .2s; }
.switch i { display: block; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .2s; }
.switch.on { background: var(--ok); }
.switch.on i { transform: translateX(22px); }

.panel.mag { display: flex; align-items: center; gap: 12px; }
.panel.mag .ti { color: var(--gold); }
.panel.mag div { flex: 1; display: flex; flex-direction: column; }
.chev { font-size: 26px; color: var(--muted); }

/* Caricamento */
.loading { text-align: center; padding: 70px 0; }
.spinner { width: 40px; height: 40px; margin: 0 auto 14px; border-radius: 50%; border: 3px solid rgba(255,255,255,.12); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Scanner */
.scanner { position: fixed; inset: 0; z-index: 20; background: #000; display: flex; align-items: center; justify-content: center; }
.scanner video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scan-frame { position: relative; width: min(68vw, 280px); aspect-ratio: 1; border-radius: 22px; box-shadow: 0 0 0 100vmax rgba(0,0,0,.55); border: 3px solid var(--accent); }
.scan-frame::after { content: ""; position: absolute; left: 8%; right: 8%; height: 2px; top: 10%; background: var(--accent); box-shadow: 0 0 12px var(--accent); animation: scan 2s ease-in-out infinite alternate; }
@keyframes scan { to { top: 88%; } }
.scan-hint { position: absolute; top: calc(40px + var(--safe-t)); left: 20px; right: 20px; text-align: center; font-weight: 600; text-shadow: 0 1px 6px #000; }
.scan-close { position: absolute; bottom: calc(30px + var(--safe-b)); left: 50%; transform: translateX(-50%); min-width: 160px; background: rgba(0,0,0,.5) !important; }

.lightbox { position: fixed; inset: 0; z-index: 30; background: rgba(0,0,0,.92); display: flex; align-items: center; justify-content: center; padding: 20px; }
.lightbox img { max-height: 100%; object-fit: contain; border-radius: 8px; }
.lb-x { position: absolute; top: calc(14px + var(--safe-t)); right: 14px; width: 42px; height: 42px; border: 0; border-radius: 50%; background: rgba(255,255,255,.15); font-size: 26px; }

.toast { position: fixed; left: 50%; bottom: calc(92px + var(--safe-b)); transform: translateX(-50%); z-index: 40; padding: 10px 18px; border-radius: 99px; background: #fff; color: var(--bg); font-weight: 600; font-size: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.4); white-space: nowrap; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* Account e proprietà */
.ti-user { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21a8 8 0 0116 0'/%3E%3C/svg%3E"); }
.result.stolen { margin-bottom: 12px; }
.result.dim { opacity: .55; }
.panel.own { margin-top: 16px; }
.own-title { margin: 0 0 10px; font-size: 16px; }
.own-status { display: flex; gap: 12px; align-items: flex-start; }
.own-status > div { display: flex; flex-direction: column; gap: 2px; }
.own-status .ti { color: var(--muted); }
.own-status.mine .ti { color: var(--ok); }
.own-status.free .ti { color: var(--accent); }
.own-tools { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.own-tools p { margin: 0; }
.own-tools details[open] > * + * { margin-top: 8px; }
.own-tools summary { cursor: pointer; font-weight: 600; font-size: 14px; color: var(--accent); }
.own-note { margin: 12px 0 0; }
.own-note a { color: var(--accent); }
.own-tools input { width: 100%; min-width: 0; height: 46px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.05); color: var(--txt); font-size: 16px; outline: none; flex: 1; }
.claim-row { display: flex; gap: 10px; align-items: center; }
.admin-box input, .field input { width: 100%; min-width: 0; height: 46px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.05); color: var(--txt); font-size: 16px; outline: none; }
.admin-box input:focus, .field input:focus { border-color: var(--accent); }
.own-links { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.link { padding: 4px 0; border: 0; background: none; color: var(--accent); font-size: 14px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.link.danger { color: var(--bad); }
.form-err { margin: 0; color: var(--bad); font-size: 14px; font-weight: 600; }
.admin-box { margin-top: 16px; padding: 14px; border-radius: 14px; background: color-mix(in srgb, var(--gold) 8%, transparent); border: 1px solid color-mix(in srgb, var(--gold) 35%, transparent); display: flex; flex-direction: column; gap: 10px; }
.admin-box h4 { margin: 0; display: flex; align-items: center; gap: 8px; color: var(--gold); font-size: 15px; }
.admin-box h4 .ti { width: 20px; height: 20px; }
.admin-box p { margin: 0; }
.admin-box details { display: flex; flex-direction: column; gap: 8px; }
.admin-box details[open] > * + * { margin-top: 8px; }
.admin-box summary { cursor: pointer; font-weight: 600; font-size: 14px; }
.history { margin: 0; padding-left: 18px; font-size: 13px; color: var(--muted); }
.panel.account { display: flex; align-items: center; gap: 12px; margin-top: 0; }
.acc-av { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #0A1124; font-weight: 800; font-size: 18px; }
.acc-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.panel.account-cta { margin-top: 0; border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.panel.account-cta p { margin: 6px 0 12px; }
.row-btns { display: flex; gap: 10px; }
.check { display: flex; gap: 10px; align-items: flex-start; margin-top: 12px; font-size: 14px; color: var(--muted); }
.check input { width: 20px; height: 20px; margin: 0; accent-color: var(--accent); flex: none; }
.check a { color: var(--accent); }
.auth-form { display: flex; flex-direction: column; gap: 12px; margin-top: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 600; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.auth-switch { display: flex; flex-direction: column; gap: 10px; align-items: center; margin-top: 20px; font-size: 14px; }
.auth-switch a { color: var(--accent); font-weight: 600; }
.ti-swap { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 8h14M14 4l4 4-4 4'/%3E%3Cpath d='M20 16H6M10 12l-4 4 4 4'/%3E%3C/svg%3E"); }
.tabs a { min-width: 0; }
.panel.info { display: flex; flex-direction: column; gap: 10px; }
.info-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.info-row strong { font-size: 15px; text-align: right; word-break: break-all; }
.suggest { margin-top: 6px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg2); overflow: hidden; }
.suggest-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; }
.suggest-item:last-child { border-bottom: 0; }
.suggest-item:active { background: rgba(255,255,255,.06); }
.suggest-av { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #0A1124; font-weight: 800; font-size: 14px; }
.suggest-txt { display: flex; flex-direction: column; min-width: 0; }
.suggest-txt small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suggest-empty { padding: 10px 12px; font-size: 13px; color: var(--muted); }
.confirm-box { background: var(--bg2); border: 1px solid var(--line); border-radius: 18px; padding: 20px; width: min(88vw, 380px); }
.confirm-box strong { font-size: 17px; }
.confirm-box p { margin: 10px 0 18px; color: var(--txt); font-size: 15px; line-height: 1.45; }
.confirm-box .row-btns .btn { flex: 1; }
.report-box { padding: 12px; border-radius: 12px; background: color-mix(in srgb, var(--bad) 12%, transparent); border: 1px solid color-mix(in srgb, var(--bad) 45%, transparent); display: flex; flex-direction: column; gap: 6px; }
.report-box strong { color: var(--bad); }
.report-desc { white-space: pre-wrap; color: var(--txt); }
.report-form { display: flex; flex-direction: column; gap: 10px; margin: 20px auto; }
.report-form p { margin: 0; }
.report-form .field input, .report-form textarea { width: 100%; min-width: 0; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.05); color: var(--txt); font: inherit; font-size: 16px; outline: none; }
.report-form textarea { resize: vertical; min-height: 72px; }
.report-form input[readonly] { opacity: .7; }
.segs { display: flex; gap: 8px; }
.seg { flex: 1; height: 42px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.05); color: var(--txt); font-weight: 700; }
.seg.on { background: var(--bad); border-color: var(--bad); color: #fff; }
.owner-link { color: var(--accent); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.ti-download { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v12M7 10l5 5 5-5'/%3E%3Cpath d='M5 21h14'/%3E%3C/svg%3E"); }
#splash { --b: min(65vw, 340px); position: fixed; inset: 0; z-index: 200; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: calc(var(--b) * .035); background: radial-gradient(circle calc(var(--b) * .42) at 50% calc(50% - var(--b) * .04), rgba(201,164,92,.28), rgba(201,164,92,0)), var(--bg); transition: opacity .5s ease; }
#splash img { width: calc(var(--b) * .53); height: auto; filter: drop-shadow(0 calc(var(--b) * .027) calc(var(--b) * .03) rgba(0,0,0,.45)); }
#splash span { font-weight: 900; font-size: calc(var(--b) * .066); line-height: .73; letter-spacing: .55em; padding-left: .55em; background: linear-gradient(90deg, #FF5FA2, #FFB3D4, #FF5FA2); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 calc(var(--b) * .018) rgba(255,95,162,.5)); }
#splash.hide { opacity: 0; pointer-events: none; }
@keyframes splashIn { from { opacity: 0; transform: scale(.85) translateY(10px); } }
.gallery button { position: relative; }
.g-label { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 5px 4px; font-size: 10px; font-weight: 700; line-height: 1.15; color: #fff; text-align: left; background: linear-gradient(transparent, rgba(0,0,0,.75)); }
.viewer { position: fixed; inset: 0; z-index: 60; background: #060B18; display: flex; flex-direction: column; }
.v-head { display: flex; align-items: center; gap: 12px; padding: calc(12px + var(--safe-t)) 14px 12px 18px; border-bottom: 1px solid var(--line); }
.v-titles { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.v-titles strong { font-size: 18px; }
.v-sub { font-size: 13px; color: var(--accent); font-weight: 700; }
.v-count { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.v-x { width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(255,255,255,.12); font-size: 24px; line-height: 1; }
.v-stage { flex: 1; display: flex; align-items: center; justify-content: center; padding: 16px; min-height: 0; }
.v-stage img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; }
.v-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 64px; border: 0; border-radius: 12px; background: rgba(255,255,255,.1); font-size: 34px; line-height: 1; color: #fff; }
.v-prev { left: 8px; }
.v-next { right: 8px; }
button.link-danger { background: none; border: 0; font-family: inherit; cursor: pointer; width: 100%; }
.report-form select { width: 100%; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.06); color: inherit; font: inherit; }
.report-form select option { color: #111; }

/* Proposte */
.offer-toggle, .offer-box { margin-top: 14px; padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255,255,255,.04); display: flex; align-items: center; gap: 14px; }
.offer-toggle > div, .offer-box > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.offer-box { flex-wrap: wrap; border-color: color-mix(in srgb, var(--ok) 45%, transparent); }
.offer-box .btn { width: 100%; }
.count-pill { margin-left: 8px; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 99px; background: var(--bad); color: #fff; font-size: 13px; line-height: 22px; display: inline-block; }
a.seg { display: flex; align-items: center; justify-content: center; text-decoration: none; }
.offer-segs { margin-bottom: 14px; }
.offer-segs .seg.on { background: var(--accent); border-color: var(--accent); color: #0A1124; }
.offer-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 14px; }
.offer-item { display: flex; flex-direction: column; gap: 10px; }
.offer-item .row { margin: 0; }
.offer-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--muted); }
.offer-st { font-style: normal; font-weight: 700; font-size: 12px; padding: 3px 9px; border-radius: 99px; background: rgba(255,255,255,.08); color: var(--txt); }
.offer-st.ok { background: color-mix(in srgb, var(--ok) 22%, transparent); color: var(--ok); }
.offer-st.bad { background: color-mix(in srgb, var(--bad) 20%, transparent); color: var(--bad); }
.offer-msg { margin: 0; white-space: pre-wrap; }
.row-grade.offer-amount { font-size: 15px; color: var(--ok); background: color-mix(in srgb, var(--ok) 16%, transparent); box-shadow: none; }

/* Conversazioni proposte */
a.offer-item { color: inherit; text-decoration: none; }
.offer-item.unread { border-color: var(--accent); }
.offer-head { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.offer-head img, .offer-head .row-ph { width: 48px; height: 64px; object-fit: cover; border-radius: 8px; flex: none; }
.offer-head .row-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.offer-head .offer-amount { flex: none; padding: 6px 10px; border-radius: 10px; font-size: 15px; color: var(--ok); background: color-mix(in srgb, var(--ok) 16%, transparent); }
.offer-last { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.offer-snip { flex: 1; min-width: 0; font-size: 14px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.offer-last .count-pill { margin: 0; }
.back-link { display: inline-block; margin: 0 0 10px; color: var(--accent); font-weight: 700; text-decoration: none; }
.card-link { margin-bottom: 10px; }
.chat-note { margin: 0 0 10px; }
.chat { display: flex; flex-direction: column; gap: 8px; margin: 6px 0 12px; }
.msg { max-width: 82%; align-self: flex-start; padding: 9px 12px; border-radius: 16px 16px 16px 4px; background: rgba(255,255,255,.08); }
.msg.mine { align-self: flex-end; border-radius: 16px 16px 4px 16px; background: color-mix(in srgb, var(--accent) 30%, transparent); }
.msg p { margin: 2px 0 0; white-space: pre-wrap; word-break: break-word; }
.msg-who { font-size: 11px; font-weight: 700; color: var(--muted); }
.chat-form { position: sticky; bottom: calc(84px + var(--safe-b)); display: flex; gap: 8px; align-items: flex-end; padding: 8px; border-radius: 16px; background: var(--bg); border: 1px solid var(--line); }
.chat-form textarea { flex: 1; min-width: 0; resize: none; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.05); color: var(--txt); font: inherit; font-size: 16px; outline: none; }
.chat-form .btn { flex: none; width: auto; padding: 0 18px; height: 44px; }
.chat-tools { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.chat-closed { color: var(--bad); font-weight: 600; text-align: center; }
.anon-note { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; border-radius: 12px; font-size: 13px; line-height: 1.4; background: color-mix(in srgb, var(--accent) 12%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); }
.anon-note strong { font-size: 14px; }

/* Gestione admin */
.manage-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.manage-filters .seg { flex: 1 1 auto; height: 38px; padding: 0 12px; font-size: 13px; white-space: nowrap; }
.manage-filters .seg.on { background: var(--accent); border-color: var(--accent); color: #0A1124; }
.row-txt .own-line { display: block; margin-top: 2px; }
.manage-filters + .own-tools input { height: 46px !important; min-height: 46px; -webkit-appearance: none; appearance: none; }

/* Attività utenti (admin) */
.feed { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.feed-item { display: flex; gap: 12px; padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255,255,255,.04); color: var(--txt); text-decoration: none; }
.feed-item.new { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.feed-ic { font-size: 22px; line-height: 1.2; }
.feed-txt { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.feed-body { white-space: pre-wrap; font-size: 14px; line-height: 1.45; color: var(--muted, #A9AEC2); overflow-wrap: anywhere; }

.tabs a { position: relative; }
.tabs .tab-badge { position: absolute; top: 2px; left: calc(50% + 4px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--bad); color: #fff; font-size: 11px; font-weight: 800; line-height: 18px; text-align: center; box-shadow: 0 0 0 2px var(--bg, #0A1124); }
.tabs .tab-badge[hidden] { display: none; }
.section-title .count-pill { vertical-align: middle; }

/* Notifiche compatte */
.feed { gap: 6px; }
.feed-item { padding: 10px 12px; cursor: pointer; align-items: flex-start; }
.feed-ic { font-size: 18px; }
.feed-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.feed-top strong { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.feed-when { font-size: 11px; color: var(--muted, #A9AEC2); white-space: nowrap; flex: none; }
.feed-prev { font-size: 13px; color: var(--muted, #A9AEC2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed-item.open .feed-prev { display: none; }
.feed-full { margin-top: 6px; }
.feed-full[hidden] { display: none; }
.feed-full .feed-body { margin: 0 0 10px; }
.feed-txt { flex: 1; }

/* Novità: intestazione con icone */
.news-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.news-head .page-title { margin-bottom: 0; }
.head-icons { display: flex; gap: 8px; }
.icon-btn { position: relative; width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.05); color: var(--txt); display: inline-flex; align-items: center; justify-content: center; font-size: 19px; text-decoration: none; cursor: pointer; }
.icon-btn.off { opacity: .85; }
.icon-btn.busy { opacity: .5; pointer-events: none; }
.icon-btn .icon-dot { position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--bad); }
.notif-banner { display: flex; align-items: center; gap: 6px; margin: 12px 0 4px; padding: 8px 10px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--accent) 50%, transparent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.notif-banner[hidden] { display: none; }
.notif-banner .nb-txt { flex: 1; text-align: left; background: none; border: 0; color: var(--txt); font-size: 13px; line-height: 1.35; padding: 0; cursor: pointer; }
.notif-banner .nb-x { background: none; border: 0; color: var(--muted, #A9AEC2); font-size: 20px; line-height: 1; cursor: pointer; padding: 0 4px; }
.list[hidden], .btn[hidden] { display: none; }
.np .np-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.np .np-row:first-of-type { border-top: 0; }
.np .np-row b { display: block; font-size: 14px; }

/* ---- VORN ---- */
h1, h2, h3, .page-title, .section-title, .top-title { font-family: Cinzel, Georgia, serif; letter-spacing: .02em; }
.top-title { font-weight: 700; color: #E2C27A; }
.top-title small { font-family: Inter, sans-serif; color: var(--muted); letter-spacing: .28em; font-size: 10px; }
.big-grade b, .row-grade, .hero-label b, .stats b { font-family: Cinzel, Georgia, serif; font-weight: 700; }
.row-grade { color: var(--bg); }
.btn { letter-spacing: .02em; }
#splash span { font-family: Inter, sans-serif; letter-spacing: .6em; color: #C9A45C; }

/* Selettore lingua */
.lang-pick { margin-left: auto; position: relative; }
.lang-btn { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px 0 11px; border: 1px solid rgba(201,164,92,.45); border-radius: 999px; background: rgba(10,17,36,.55); color: #E2C27A; font: 700 12.5px/1 Inter, sans-serif; letter-spacing: .1em; cursor: pointer; transition: border-color .2s, background .2s; -webkit-tap-highlight-color: transparent; }
.lang-btn:hover, .lang-pick.open .lang-btn { border-color: #C9A45C; background: rgba(201,164,92,.1); }
.lang-btn svg { opacity: .9; }
.lang-btn .chev { width: 6px; height: 6px; border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform .2s; margin-left: 1px; }
.lang-pick.open .chev { transform: translateY(1px) rotate(-135deg); }
.lang-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; min-width: 184px; padding: 6px; border: 1px solid rgba(201,164,92,.35); border-radius: 16px; background: linear-gradient(180deg, #121C38, #0B1328); box-shadow: 0 18px 44px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.03) inset; animation: langIn .16s ease-out; }
.lang-menu[hidden] { display: none; }
@keyframes langIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.lang-menu button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 0; border-radius: 11px; background: transparent; color: #E8E3D6; font: 500 14px/1.2 Inter, sans-serif; text-align: left; cursor: pointer; }
.lang-menu button:hover { background: rgba(201,164,92,.1); }
.lang-menu .lc { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 22px; border-radius: 6px; border: 1px solid rgba(201,164,92,.35); color: #C9A45C; font: 700 10.5px/1 Inter, sans-serif; letter-spacing: .08em; }
.lang-menu .ln { flex: 1; }
.lang-menu button.on { background: rgba(201,164,92,.14); color: #F1D99A; }
.lang-menu button.on .lc { background: #C9A45C; color: #0A1124; border-color: #C9A45C; }
.lang-menu button.on .ck { width: 6px; height: 11px; border-right: 2px solid #C9A45C; border-bottom: 2px solid #C9A45C; transform: rotate(45deg) translate(-2px,-2px); }
