/* OddLock: nero, stelle, angoli vivi */

@property --ang {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}

:root {
  --bg: #000000;
  --surface: rgba(7, 8, 12, 0.86);
  --surface-2: rgba(13, 15, 21, 0.9);
  --tk: rgba(236, 238, 242, 0.32);
  --line: #1A1E26;
  --line-2: #2A303B;
  --ink: #ECEEF2;
  --ink-2: #9299A5;
  --ink-3: #5D6470;
  --ok: #3FBF7F;
  --bad: #FF4A3D;
  --gold: #E9C046;
  --rune: #B6FF3D;
  --focus: #7FB2FF;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --nav-h: 60px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; border-radius: 0; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.4;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
body.locked { overflow: hidden; }
#sky { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }

h1, h2, h3 { margin: 0; line-height: 1.1; font-weight: 750; letter-spacing: -0.015em; font-stretch: 80%; }
h1 { font-size: 26px; }
h2 { font-size: 17px; }
h3 { font-size: 15px; }
p { margin: 0; }
button, input, select { font: inherit; color: inherit; }
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }

.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); font-size: 0.92em; letter-spacing: 0; }
.muted { color: var(--ink-2); }
.dim { color: var(--ink-3); }
.small { font-size: 13px; }
.ok { color: var(--ok); }
.bad { color: var(--bad); }
.center { text-align: center; }
.ellipsis { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
:focus-visible { outline: 1px solid var(--focus); outline-offset: 2px; }

.ico { display: inline-flex; flex: none; }
.ico svg { width: 18px; height: 18px; }
.ico-coin, .ico-rune { width: 14px !important; height: 14px !important; }

/* ------------------------------------------------------------ avvio */

.boot { position: fixed; inset: 0; z-index: 400; display: grid; place-content: center; text-align: center; gap: 14px; padding: 24px; }
.boot-brand { font-size: 34px; font-weight: 800; font-stretch: 72%; letter-spacing: -0.02em; }
.boot-brand span { color: var(--ink-3); }
.boot-line { font-family: var(--mono); font-size: 13px; color: var(--ink-2); max-width: 340px; }
.boot-line::after { content: ""; display: inline-block; width: 8px; height: 13px; margin-left: 6px; background: var(--rune); vertical-align: -2px; animation: caret 1s steps(2) infinite; }
@keyframes caret { 50% { opacity: 0; } }

/* ------------------------------------------------------------ guscio */

#app { position: relative; z-index: 1; max-width: 560px; margin: 0 auto; min-height: 100dvh; padding: 0 16px calc(var(--nav-h) + var(--safe-b) + 28px); }
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 6px; margin: 0 -16px; padding: calc(var(--safe-t) + 10px) 16px 10px; background: rgba(0, 0, 0, 0.9); border-bottom: 1px solid var(--line); }
.brand { font-size: 21px; font-weight: 800; font-stretch: 72%; letter-spacing: -0.02em; margin-right: auto; white-space: nowrap; }
.brand span { color: var(--ink-3); }
.brand.glitch-now { animation: brandGlitch 320ms steps(2) 1; }
@keyframes brandGlitch {
  0% { transform: translate(2px, 0); text-shadow: -2px 0 #FF2BD6, 2px 0 #3DF5E8; }
  50% { transform: translate(-3px, 1px) skewX(-12deg); text-shadow: 3px 0 #FF2BD6, -3px 0 #3DF5E8; clip-path: inset(20% 0 30% 0); }
  100% { transform: none; text-shadow: none; clip-path: none; }
}
.wallet { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 9px; border: 1px solid var(--line-2); background: none; font-weight: 700; font-variant-numeric: tabular-nums; cursor: pointer; }
.wallet.rune { color: var(--rune); }
.wallet:hover { border-color: var(--ink-3); }
.wallet.bump { animation: bump 380ms var(--ease-spring); }
.wallet.drop { animation: drop 300ms var(--ease-out); }
@keyframes bump { 40% { transform: scale(1.08); border-color: currentColor; } }
@keyframes drop { 30% { transform: translateY(2px); } }
.wallet-inline { display: inline-flex; align-items: center; padding: 6px 9px; border: 1px solid var(--line-2); color: var(--rune); font-weight: 700; }
.icon-btn { width: 34px; height: 34px; border: 1px solid var(--line-2); background: none; display: grid; place-items: center; cursor: pointer; flex: none; color: var(--ink-2); padding: 0; }
.icon-btn svg { width: 17px; height: 17px; }
.icon-btn:hover { color: var(--ink); border-color: var(--ink-3); }

.nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: rgba(0, 0, 0, 0.92); border-top: 1px solid var(--line); padding-bottom: var(--safe-b); }
.nav-inner { position: relative; max-width: 560px; margin: 0 auto; display: grid; grid-template-columns: repeat(5, 1fr); }
.nav-bar { position: absolute; top: -1px; left: 0; width: 20%; height: 2px; pointer-events: none; transition: transform 420ms var(--ease-spring), opacity 200ms; }
.nav-bar::before { content: ""; position: absolute; left: 22%; right: 22%; top: 0; bottom: 0; background: var(--ink); box-shadow: 0 0 14px rgba(255, 255, 255, 0.7); }
.nav-btn svg { transition: transform 260ms var(--ease-spring), filter 200ms; }
.nav-btn[aria-current="page"] svg { transform: translateY(-1px) scale(1.08); filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.45)); }
.nav-btn { position: relative; height: var(--nav-h); border: 0; background: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 11px; font-weight: 600; color: var(--ink-3); cursor: pointer; min-width: 0; }
.nav-btn svg { width: 21px; height: 21px; }
.nav-btn[aria-current="page"] { color: var(--ink); }
.badge { position: absolute; top: 7px; left: calc(50% + 6px); min-width: 17px; height: 17px; padding: 0 4px; background: var(--bad); color: #fff; font-size: 11px; font-weight: 700; line-height: 17px; text-align: center; }

.view { padding-top: 8px; }
.view.enter { animation: viewIn 200ms var(--ease-out); }
@keyframes viewIn { from { opacity: 0; transform: translateY(5px); } }
.page-title { margin: 6px 0 12px; }
.page-row { margin: 6px 0 12px; }
.section { margin-top: 24px; }
.head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.link { border: 0; background: none; padding: 6px 0; color: var(--ink-2); font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-2); }
.link:hover { color: var(--ink); }
.row { display: flex; gap: 8px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.row.between, .between { justify-content: space-between; }
.row > .grow, .grow { flex: 1; min-width: 0; }
.rows { display: grid; gap: 6px; }
.rows.tight { gap: 0; }

/* ------------------------------------------------------------ comandi */

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 0 16px; border: 1px solid var(--line-2); background: var(--bg); color: var(--ink); font-weight: 700; cursor: pointer; transition: border-color 120ms, background-color 120ms, transform 100ms; user-select: none; -webkit-user-select: none; white-space: nowrap; text-decoration: none; }
.btn > span { display: inline-flex; align-items: center; gap: 6px; }
.btn:hover:not(:disabled) { border-color: var(--ink-2); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: 0.35; cursor: not-allowed; }
.btn-primary { background: var(--ink); border-color: var(--ink); color: #000; }
.btn-primary:hover:not(:disabled) { background: #fff; border-color: #fff; }
.btn-danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 50%, transparent); }
.btn-block { width: 100%; }
.btn-sm { min-height: 34px; padding: 0 11px; font-size: 13px; }
.btn-lg { min-height: 50px; font-size: 16px; }
.btn.more { margin-top: 10px; }
.admin-link { border-style: dashed; color: var(--ink-2); }
.price { display: inline-flex; align-items: center; gap: 5px; font-variant-numeric: tabular-nums; }
.price.rune { color: var(--rune); }
.btn-primary .price.rune { color: #1E3300; }

.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; height: 32px; padding: 0 11px; border: 1px solid var(--line-2); background: var(--bg); font-size: 13px; font-weight: 600; color: var(--ink-2); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #000; }
.sq { display: inline-block; width: 8px; height: 8px; background: var(--rc); flex: none; }
.sep { flex: none; width: 1px; background: var(--line-2); margin: 4px 2px; }

.tabs { display: flex; border-bottom: 1px solid var(--line); margin-top: 4px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { position: relative; flex: 1 0 auto; border: 0; background: none; min-height: 42px; font-size: 13px; font-weight: 650; color: var(--ink-3); cursor: pointer; white-space: nowrap; padding: 0 10px; }
.tabs button[aria-selected="true"] { color: var(--ink); }
.tabs button[aria-selected="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--ink); }
.tabs .count { margin-left: 4px; color: var(--bad); font-variant-numeric: tabular-nums; }

.empty { padding: 32px 12px; text-align: center; color: var(--ink-2); }
.empty .btn { margin-top: 14px; }
.bar { height: 3px; background: var(--line); }
.bar > i { display: block; height: 100%; background: var(--rc, var(--ink-2)); transition: width 400ms var(--ease-out); }

.input { min-height: 44px; padding: 0 12px; border: 1px solid var(--line-2); background: var(--bg); width: 100%; min-width: 0; }
.input:focus { outline: none; border-color: var(--ink-2); }
select.input { width: auto; flex: none; }
.toolbar { display: flex; gap: 8px; align-items: center; margin-top: 10px; min-width: 0; }
.toolbar.small-gap { margin-bottom: 10px; }
.toolbar select { min-height: 40px; height: 40px; font-size: 13px; padding: 0 8px; }
.search { position: relative; flex: 1; min-width: 0; }
.search .ico { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.search .ico svg { width: 15px; height: 15px; }
.search .input { padding-left: 34px; min-height: 40px; }
.sticky-search { position: sticky; top: -14px; background: var(--surface); padding: 0 0 8px; z-index: 2; }

#toast { position: fixed; left: 50%; bottom: calc(var(--nav-h) + var(--safe-b) + 14px); z-index: 300; transform: translate(-50%, 16px); opacity: 0; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); padding: 10px 14px; background: var(--ink); color: #000; font-size: 14px; font-weight: 650; transition: opacity 160ms, transform 240ms var(--ease-out); }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.bad { background: var(--bad); color: #fff; }

.data { margin: 0; display: grid; grid-template-columns: auto 1fr; font-size: 13px; border-top: 1px solid var(--line); }
.data dt, .data dd { padding: 8px 0; border-bottom: 1px solid var(--line); margin: 0; }
.data dt { color: var(--ink-3); padding-right: 14px; }
.data dd { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; min-width: 0; overflow-wrap: anywhere; display: flex; justify-content: flex-end; }

.banner { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; margin-top: 10px; padding: 10px 12px; border: 1px solid var(--line-2); background: var(--surface); font-size: 13px; font-weight: 650; color: var(--ink); text-align: left; cursor: default; }
button.banner { cursor: pointer; }
.banner.gold { border-color: var(--gold); color: var(--gold); }
.banner.ok { border-color: color-mix(in srgb, var(--ok) 60%, transparent); color: var(--ok); }
.banner.rune { border-color: color-mix(in srgb, var(--rune) 50%, transparent); }
.banner.rune > span:nth-child(2) { margin-right: auto; }
.note { margin-top: 10px; padding: 8px 10px; border-left: 2px solid var(--rune); background: var(--surface-2); font-size: 13px; color: var(--ink-2); }
.dot { display: inline-block; width: 7px; height: 7px; margin-right: 6px; background: var(--ink-3); flex: none; vertical-align: 1px; }
.dot.on { background: var(--ok); box-shadow: 0 0 6px var(--ok); }
.mtag-sm { display: inline-flex; align-items: center; height: 16px; margin: 0 4px; padding: 0 4px; background: var(--ink); color: #000; font-size: 10px; font-weight: 800; }
.mtag-sm.sale { background: var(--rune); }

/* ------------------------------------------------------------ immagini degli oggetti */

.art { position: relative; width: 100%; aspect-ratio: 1; display: grid; place-items: center; }
.art img, .art svg { width: 100%; height: 100%; object-fit: contain; }
.art img:not([src]) { visibility: hidden; }
.fx-holo img, .fx-holo svg { animation: holo 5s linear infinite; }
@keyframes holo { to { filter: hue-rotate(360deg); } }
.fx-glitch img, .fx-glitch svg { animation: artGlitch 2.4s steps(1) infinite; }
@keyframes artGlitch {
  0%, 58%, 64%, 86%, 90%, 100% { transform: none; filter: none; }
  59% { transform: translate(4%, -2%); filter: drop-shadow(-3px 0 #FF2BD6) drop-shadow(3px 0 #3DF5E8); }
  61% { transform: translate(-5%, 1%) skewX(8deg); filter: drop-shadow(3px 0 #FF2BD6) drop-shadow(-3px 0 #3DF5E8) hue-rotate(90deg); }
  63% { transform: translate(2%, 0) scaleY(0.9); filter: invert(1); }
  87% { transform: skewX(-14deg); filter: drop-shadow(-2px 0 #3DF5E8); }
}
.flat.mut-fossile svg { filter: sepia(0.95) saturate(0.6); }
.flat.mut-inversa svg { filter: invert(1) hue-rotate(180deg); }
.flat.mut-eclissi svg { filter: brightness(0.3) drop-shadow(0 0 4px #FFC070); }
.sil.flat svg { filter: brightness(0); }

/* ------------------------------------------------------------ cornici di rarità (stili scelti dall'admin) */

.rf { position: relative; border: 1px solid var(--line-2); }
.fr-nessuna { border-color: transparent; }
.fr-semplice { border-color: color-mix(in srgb, var(--rc) 55%, #000); }
.fr-angoli, .fr-angoli-forti, .fr-oro, .fr-gelo, .fr-angelico { border-color: var(--rc); }
.fr-angoli::after, .fr-angoli-forti::after, .fr-oro::after, .fr-gelo::after, .fr-angelico::after, .fr-delta::after {
  content: "";
  position: absolute;
  inset: -1px;
  pointer-events: none;
  z-index: 2;
  --t: 2px;
  --l: 10px;
  --cc: var(--rc);
  background:
    linear-gradient(var(--cc), var(--cc)) top left / var(--l) var(--t) no-repeat,
    linear-gradient(var(--cc), var(--cc)) top left / var(--t) var(--l) no-repeat,
    linear-gradient(var(--cc), var(--cc)) top right / var(--l) var(--t) no-repeat,
    linear-gradient(var(--cc), var(--cc)) top right / var(--t) var(--l) no-repeat,
    linear-gradient(var(--cc), var(--cc)) bottom left / var(--l) var(--t) no-repeat,
    linear-gradient(var(--cc), var(--cc)) bottom left / var(--t) var(--l) no-repeat,
    linear-gradient(var(--cc), var(--cc)) bottom right / var(--l) var(--t) no-repeat,
    linear-gradient(var(--cc), var(--cc)) bottom right / var(--t) var(--l) no-repeat;
}
.fr-angoli-forti { box-shadow: inset 0 0 18px color-mix(in srgb, var(--rc) 22%, transparent); }
.fr-angoli-forti::after { --t: 3px; --l: 14px; }

/* bordi animati: maschera che lascia vedere solo il contorno */
.fr-oro::before, .fr-sdoppiato::before, .fr-arcobaleno::before, .fr-fuoco::before, .fr-onda::before, .fr-prisma::before, .fr-abisso::before, .fr-radiazione::before, .fr-cosmico::before, .fr-gamma::before {
  content: "";
  position: absolute;
  inset: -1px;
  padding: 2px;
  pointer-events: none;
  z-index: 2;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.fr-oro, .fr-sdoppiato, .fr-arcobaleno, .fr-fuoco, .fr-onda, .fr-prisma, .fr-abisso, .fr-radiazione, .fr-cosmico, .fr-gamma { border-color: transparent; }
@keyframes ang { to { --ang: 360deg; } }

.fr-oro { box-shadow: inset 0 0 22px color-mix(in srgb, var(--rc) 20%, transparent); }
.fr-oro::before { background: conic-gradient(from var(--ang), var(--rc) 0deg, #FFF8E0 30deg, var(--rc) 60deg, color-mix(in srgb, var(--rc) 35%, #000) 180deg, var(--rc) 300deg); animation: ang 3s linear infinite; }

.fr-sdoppiato { box-shadow: -2px 0 0 rgba(255, 43, 214, 0.55), 2px 0 0 rgba(61, 245, 232, 0.55), inset 0 0 24px color-mix(in srgb, var(--rc) 18%, transparent); animation: anomaly 4s steps(1) infinite; }
.fr-sdoppiato::before { background: conic-gradient(from var(--ang), var(--rc), #071A19 25%, var(--rc) 50%, #071A19 75%, var(--rc)); animation: ang 6s linear infinite reverse; }
@keyframes anomaly {
  0%, 70%, 74%, 100% { box-shadow: -2px 0 0 rgba(255, 43, 214, 0.55), 2px 0 0 rgba(61, 245, 232, 0.55); }
  72% { box-shadow: -5px 0 0 rgba(255, 43, 214, 0.8), 5px 0 0 rgba(61, 245, 232, 0.8); }
}

.fr-arcobaleno { box-shadow: -2px 0 0 #FF2BD6, 2px 0 0 #3DF5E8; animation: tileGlitch 2.8s steps(1) infinite; }
.fr-arcobaleno::before { background: conic-gradient(from var(--ang), #FF2B2B, #FFC53D, #3FFF6A, #3DF5E8, #3D6BFF, #FF2BD6, #FF2B2B); animation: ang 1.6s linear infinite; }
@keyframes tileGlitch {
  0%, 52%, 56%, 80%, 84%, 100% { transform: none; filter: none; clip-path: none; }
  53% { transform: translate(3px, -1px); clip-path: inset(0 0 55% 0); filter: hue-rotate(120deg); }
  54% { transform: translate(-4px, 2px); clip-path: inset(40% 0 10% 0); }
  55% { transform: translate(2px, 0) skewX(-6deg); filter: invert(1); }
  81% { transform: translate(-2px, 0); clip-path: inset(10% 0 70% 0); }
  83% { transform: translate(5px, 0); filter: saturate(3) hue-rotate(-90deg); }
}

.fr-pulsante { border-color: var(--rc); animation: pulseFrame 2.4s ease-in-out infinite; }
@keyframes pulseFrame { 50% { box-shadow: 0 0 14px color-mix(in srgb, var(--rc) 55%, transparent), inset 0 0 18px color-mix(in srgb, var(--rc) 30%, transparent); } }

.fr-fantasma { border: 1px dashed color-mix(in srgb, var(--rc) 80%, transparent); box-shadow: inset 0 0 20px color-mix(in srgb, var(--rc) 18%, transparent); animation: ghost 3.2s ease-in-out infinite; }
@keyframes ghost { 0%, 100% { opacity: 1; } 45% { opacity: 0.55; } 50% { opacity: 0.85; } 55% { opacity: 0.5; } }

.fr-fuoco { box-shadow: inset 0 -14px 22px -8px rgba(255, 90, 31, 0.45); }
.fr-fuoco::before { padding: 2px; background: conic-gradient(from var(--ang), #FF2A00, #FF8A00, #FFD23F, #FF5A1F, #8A1500, #FF2A00); animation: ang 1.2s linear infinite; }

.fr-gelo { box-shadow: inset 0 0 20px rgba(159, 232, 255, 0.25), 0 0 8px rgba(159, 232, 255, 0.2); }
.fr-gelo::after { --cc: #FFFFFF; --t: 2px; --l: 12px; }

.fr-pixel { border: 2px solid var(--rc); animation: pixelStep 1.6s steps(1) infinite; }
@keyframes pixelStep {
  0%, 100% { box-shadow: 4px 4px 0 -2px color-mix(in srgb, var(--rc) 50%, transparent); }
  50% { box-shadow: -4px 4px 0 -2px color-mix(in srgb, var(--rc) 50%, transparent); }
  75% { box-shadow: 4px -4px 0 -2px color-mix(in srgb, var(--rc) 50%, transparent); }
}

.fr-neon { border-color: var(--rc); box-shadow: 0 0 6px var(--rc), inset 0 0 8px color-mix(in srgb, var(--rc) 40%, transparent); animation: neon 3s steps(1) infinite; }
@keyframes neon { 0%, 6%, 9%, 100% { box-shadow: 0 0 6px var(--rc), inset 0 0 8px color-mix(in srgb, var(--rc) 40%, transparent); } 7% { box-shadow: none; } }

.fr-onda::before { background: conic-gradient(from var(--ang), #FFFFFF, #6E7884, #E8EEF5, #3E4650, #FFFFFF); animation: ang 4s linear infinite; }

.fr-prisma { box-shadow: inset 0 0 18px rgba(255, 255, 255, 0.12); }
.fr-prisma::before { background: conic-gradient(from var(--ang), #FF6B6B, #FFD93D, #6BFF8A, #6BD9FF, #B06BFF, #FF6BD0, #FF6B6B); animation: ang 6s linear infinite; }

.fr-radiazione { box-shadow: 0 0 10px rgba(184, 255, 31, 0.3); animation: rad 1.8s ease-in-out infinite; }
.fr-radiazione::before { background: repeating-linear-gradient(45deg, #B8FF1F 0 6px, #0A0D02 6px 12px); }
@keyframes rad { 50% { box-shadow: 0 0 18px rgba(184, 255, 31, 0.55), inset 0 0 16px rgba(184, 255, 31, 0.2); } }

.fr-abisso { box-shadow: inset 0 0 26px #000, 0 0 10px color-mix(in srgb, var(--rc) 40%, transparent); }
.fr-abisso::before { background: conic-gradient(from var(--ang), var(--rc), #000 20%, #120A33 50%, var(--rc) 70%, #000); animation: ang 2.4s linear infinite reverse; }

.fr-fulmine { border-color: var(--rc); animation: bolt 2.2s steps(1) infinite; }
@keyframes bolt { 0%, 40%, 44%, 70%, 72%, 100% { box-shadow: none; } 41%, 71% { box-shadow: 0 0 18px var(--rc), inset 0 0 14px var(--rc); border-color: #fff; } }

.fr-delta { border-color: var(--rc); }
.fr-delta::after { --t: 2px; --l: 16px; animation: deltaShift 2s steps(4) infinite; }
@keyframes deltaShift { 50% { --l: 8px; } }

.fr-gamma { box-shadow: inset 0 0 18px color-mix(in srgb, var(--rc) 20%, transparent); }
.fr-gamma::before { background: linear-gradient(180deg, transparent 0 40%, var(--rc) 48% 52%, transparent 60% 100%), linear-gradient(var(--rc), var(--rc)); background-size: 100% 300%, 100% 100%; background-blend-mode: screen; opacity: 0.9; animation: gammaScan 2.2s linear infinite; }
@keyframes gammaScan { from { background-position: 0 100%, 0 0; } to { background-position: 0 -200%, 0 0; } }

.fr-angelico { box-shadow: 0 0 14px rgba(255, 244, 214, 0.35), inset 0 0 22px rgba(255, 220, 140, 0.18); }
.fr-angelico::after { --cc: #FFD27A; --t: 2px; --l: 14px; }

.fr-cosmico { box-shadow: inset 0 0 26px rgba(155, 107, 255, 0.28), 0 0 14px rgba(155, 107, 255, 0.35); }
.fr-cosmico::before { padding: 3px; background: conic-gradient(from var(--ang), #3D1A7A, #9B6BFF, #FF5FA8, #3DA9FF, #FFFFFF, #3D1A7A); animation: ang 8s linear infinite; }

.rname { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--rc); white-space: nowrap; }
.rname::before { content: ""; width: 7px; height: 7px; background: var(--rc); flex: none; }
.rname.rn-glitch { color: #fff; text-shadow: -1px 0 #FF2BD6, 1px 0 #3DF5E8; animation: textGlitch 2s steps(1) infinite; }
.rname.rn-glitch::before { background: conic-gradient(#FF2B2B, #FFC53D, #3FFF6A, #3DF5E8, #3D6BFF, #FF2BD6, #FF2B2B); }
@keyframes textGlitch {
  0%, 60%, 66%, 100% { transform: none; text-shadow: -1px 0 #FF2BD6, 1px 0 #3DF5E8; }
  61% { transform: translateX(2px) skewX(-10deg); text-shadow: -3px 0 #FF2BD6, 3px 0 #3DF5E8; }
  63% { transform: translateX(-2px); text-shadow: 2px 0 #FF2BD6, -2px 0 #3DF5E8; }
}

/* ------------------------------------------------------------ base */

.hero { margin-top: 12px; border: 1px solid var(--line-2); background: var(--surface); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; }
.hero-cap { aspect-ratio: 1.1; cursor: pointer; min-width: 0; }
.hero-cap canvas { width: 100%; height: 100%; }
.hero-cap .cap { width: 100%; height: 100%; }
.hero-info { padding: 12px 14px 12px 0; min-width: 0; }
.hero-info .label { font-size: 12px; color: var(--ink-3); font-weight: 600; }
.hero-info h2 { font-size: 20px; margin-top: 3px; }
.hero-info .count { font-size: 24px; font-weight: 700; margin-top: 4px; }
.hero-state { display: inline-block; margin-top: 8px; font-size: 12px; font-weight: 700; padding: 2px 7px; border: 1px solid var(--line-2); }
.hero-state.on { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 50%, transparent); }
.hero-act { grid-column: 1 / -1; padding: 0 12px 12px; display: grid; }
.boosts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; }
.boosts .label { font-size: 12px; color: var(--ink-3); margin-right: 4px; }
.boost { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 8px; border: 1px solid color-mix(in srgb, var(--ok) 50%, transparent); font-size: 12px; font-weight: 650; }
.boost .ico svg { width: 15px; height: 15px; }
.boost b { color: var(--ok); }

.cap { aspect-ratio: 1.15; display: grid; place-items: center; }
.cap img { width: 100%; height: 100%; object-fit: contain; }

.cgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.ccard { display: flex; flex-direction: column; border: 1px solid var(--line); background: var(--surface); min-width: 0; position: relative; }
.ccard::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--cc); }
.ccard.runic { border-color: color-mix(in srgb, var(--rune) 35%, var(--line)); }
.ccard .cap { cursor: pointer; padding: 4px 8px 0; }
.ccard-info { padding: 0 10px; flex: 1; min-width: 0; }
.ccard-info h3 { font-size: 15px; }
.ccard-info .tag { font-size: 11px; color: var(--ink-3); margin-top: 3px; }
.teaser { display: flex; gap: 4px; margin-top: 8px; }
.teaser .mini { width: 28px; height: 28px; }
.ccard-act { display: grid; gap: 6px; padding: 10px; }
.ccard.wide { display: grid; grid-template-columns: 120px minmax(0, 1fr); }
.ccard.wide .ccard-info { padding: 12px 12px 0 0; }
.ccard.wide .ccard-act { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; }
.credit { display: block; font-size: 12px; font-weight: 700; color: var(--ok); margin-top: 6px; }

.srow { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px; border: 1px solid var(--line); background: var(--surface); }
.srow-ico { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--line-2); color: var(--ok); }
.srow-ico.rune { color: var(--rune); }
.srow-ico svg { width: 22px; height: 22px; }
.srow-ico .ico-rune { width: 20px !important; height: 20px !important; }
.srow-cap { width: 44px; }
.srow-mid { min-width: 0; }

.feed-row { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13px; cursor: pointer; }
.feed-row:last-child { border-bottom: 0; }
.feed-row.new { animation: feedIn 400ms var(--ease-out); }
@keyframes feedIn { from { opacity: 0; transform: translateX(-8px); } }
.feed-row > .rf { width: 46px; height: 46px; background: var(--surface); }
.feed-mid { min-width: 0; }
.feed-row .who { display: flex; align-items: center; gap: 4px; color: var(--ink-3); font-size: 12px; min-width: 0; }
.feed-row b { font-weight: 650; }
.feed-time { color: var(--ink-3); font-size: 12px; font-family: var(--mono); white-space: nowrap; }

/* ------------------------------------------------------------ teca */

.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); margin-top: 10px; }
.stats.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat { padding: 10px 12px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); min-width: 0; background: var(--surface); }
.stat span { display: block; font-size: 12px; color: var(--ink-3); }
.stat strong { display: block; font-size: 19px; font-weight: 750; font-variant-numeric: tabular-nums; margin-top: 2px; overflow-wrap: anywhere; }

.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 4px; }
@media (min-width: 440px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tile { border-width: 1px; padding: 0; background: var(--surface); color: var(--ink); text-align: left; cursor: pointer; min-width: 0; display: flex; flex-direction: column; font: inherit; }
.tile.ghost { visibility: hidden; }
.tile .art { padding: 10% 10% 2%; }
.tile-info { display: block; padding: 0 7px 7px; line-height: 1.3; position: relative; z-index: 3; }
.tile-name { display: block; font-size: 12px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-val { display: block; font-size: 12px; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-serial, .tile-count { position: absolute; top: 5px; right: 6px; z-index: 3; font-family: var(--mono); font-size: 10px; color: var(--ink-3); }
.tile-count { color: var(--ink); background: var(--line-2); padding: 0 4px; font-size: 11px; }
.tile-flag { position: absolute; top: 5px; left: 6px; z-index: 3; font-size: 10px; font-weight: 800; color: #fff; background: var(--bad); padding: 0 4px; }
.tile-flag.sale { background: var(--rune); color: #1E3300; }
.tile-mut { position: absolute; bottom: 42px; left: 6px; z-index: 3; font-size: 9px; font-weight: 800; padding: 1px 4px; background: var(--ink); color: #000; }
.tile-lock { position: absolute; top: 5px; left: 6px; z-index: 3; font-size: 10px; color: var(--ink-3); }
.tile.selected { outline: 2px solid var(--ink); outline-offset: -2px; }
.tile[aria-disabled="true"] { opacity: 0.3; cursor: not-allowed; }
.slot-tile.missing { background: #020203; }
.slot-tile.missing .tile-name { color: var(--ink-3); }
.slot-tile.missing.rf { filter: saturate(0.4); }

.sellbar { position: fixed; left: 0; right: 0; bottom: calc(var(--nav-h) + var(--safe-b)); z-index: 25; background: var(--bg); border-top: 1px solid var(--line-2); transform: translateY(110%); transition: transform 220ms var(--ease-out); }
.sellbar.show { transform: none; }
.sellbar-inner { max-width: 560px; margin: 0 auto; padding: 10px 16px; display: flex; gap: 8px; align-items: center; }

.colrow { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 12px; align-items: center; width: 100%; padding: 8px 12px 8px 6px; border: 1px solid var(--line); background: var(--surface); text-align: left; cursor: pointer; }
.colrow:hover { border-color: var(--line-2); }
.colrow-cap { width: 64px; }
.colrow-art { width: 56px; height: 56px; margin: 4px; background: var(--bg); }
.colrow-mid { display: grid; gap: 6px; min-width: 0; }
.setbox { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.setbox:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.setbox.complete .set-head b { color: var(--ok); }
.set-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.set-head .price { margin-left: 4px; }

/* ------------------------------------------------------------ fogli */

.sheet-backdrop { position: fixed; inset: 0; z-index: 80; background: rgba(0, 0, 0, 0.72); opacity: 0; transition: opacity 200ms; }
.sheet-backdrop.show { opacity: 1; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 81; max-width: 560px; margin: 0 auto; max-height: calc(100dvh - var(--safe-t) - 24px); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line-2); border-bottom: 0; transform: translateY(100%); transition: transform 300ms var(--ease-out); padding-bottom: var(--safe-b); }
.sheet.wide { max-width: 760px; }
.sheet.show { transform: none; }
.sheet.dragging { transition: none; }
.sheet-head { flex: none; display: flex; align-items: center; gap: 10px; padding: 12px 12px 10px 16px; border-bottom: 1px solid var(--line); touch-action: none; cursor: grab; }
.sheet-head h2 { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet-body { overflow-y: auto; overscroll-behavior: contain; padding: 14px 16px 20px; }
.sheet-foot { flex: none; padding: 10px 16px 12px; border-top: 1px solid var(--line); display: flex; gap: 8px; flex-wrap: wrap; }
.sheet-foot .btn { flex: 1 1 auto; }
.sheet.glitch-hit { animation: screenGlitch 300ms steps(2) 1; }
.confirm-line { margin-top: 10px; font-size: 14px; color: var(--ink-2); }

.viewer { position: relative; aspect-ratio: 1.1; background: #000; }
.viewer canvas { width: 100%; height: 100%; }
.viewer > .art { width: 70%; margin: auto; height: 100%; }
.viewer .hint { position: absolute; left: 10px; bottom: 8px; font-size: 11px; color: var(--ink-3); pointer-events: none; z-index: 3; }
.viewer .vtag { position: absolute; top: 8px; right: 10px; font-family: var(--mono); font-size: 12px; color: var(--ink-2); pointer-events: none; z-index: 3; }
.viewer .mtag { position: absolute; top: 8px; left: 10px; font-size: 11px; font-weight: 800; padding: 1px 5px; background: var(--ink); color: #000; pointer-events: none; z-index: 3; }
.title-block { margin-top: 14px; }
.title-block h2 { font-size: 24px; margin: 4px 0 2px; }
.specs { display: flex; gap: 6px; overflow-x: auto; margin-top: 12px; padding-bottom: 2px; scrollbar-width: none; }
.spec-chip { flex: none; display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 9px; border: 1px solid var(--line-2); background: var(--bg); color: var(--ink-2); font-size: 12px; cursor: pointer; }
.spec-chip.on { border-color: var(--ink); color: var(--ink); }
.value-line { display: flex; align-items: center; gap: 8px; margin-top: 14px; }
.value-line strong { font-size: 28px; font-weight: 800; font-variant-numeric: tabular-nums; font-stretch: 85%; }
.value-line .ico-coin { width: 18px !important; height: 18px !important; }
.breakdown { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 4px; font-size: 12px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.breakdown span { padding: 2px 6px; border: 1px solid var(--line-2); }
.breakdown span.up { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.block { margin-top: 16px; }
.block h3 { margin-bottom: 6px; }
.patina-row { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; margin-bottom: 6px; }
.history { margin: 6px 0 0; padding: 0; list-style: none; font-size: 13px; }
.history li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.history time { color: var(--ink-3); font-family: var(--mono); font-size: 12px; white-space: nowrap; }
.drop-row { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border: 0; border-bottom: 1px solid var(--line); background: none; width: 100%; font-size: 13px; cursor: pointer; text-align: left; }
.drop-row:hover span { text-decoration: underline; }
.market-info { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px; border: 1px solid color-mix(in srgb, var(--rune) 30%, var(--line)); }
.market-info .small { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }

.odds-group { margin-bottom: 16px; }
.odds-head { display: flex; align-items: center; gap: 10px; padding-bottom: 6px; border-bottom: 1px solid var(--line-2); }
.odds-head b { margin-left: auto; }
.odds-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 5px 0; border: 0; border-bottom: 1px solid var(--line); background: none; width: 100%; text-align: left; cursor: pointer; }
.odds-row > .rf { width: 40px; height: 40px; background: var(--bg); }
.odds-mid { min-width: 0; }
.odds-row .name { font-weight: 650; font-size: 14px; }
.odds-row .sub { font-size: 12px; color: var(--ink-3); display: flex; gap: 10px; flex-wrap: wrap; font-variant-numeric: tabular-nums; }
.odds-row .pct { font-family: var(--mono); font-weight: 700; text-align: right; font-size: 13px; }
.odds-list .btn { margin-top: 6px; }

/* ------------------------------------------------------------ mercato */

.mrow { display: grid; grid-template-columns: 54px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px; border: 1px solid var(--line); background: var(--surface); }
.mrow-art { width: 54px; height: 54px; padding: 0; background: var(--bg); cursor: pointer; }
.mrow-mid { min-width: 0; display: grid; gap: 3px; font-size: 13px; }
.mrow-mid .who { display: flex; align-items: center; gap: 4px; min-width: 0; }
.mrow-act { display: grid; gap: 6px; justify-items: end; }
.mrow-act.col { justify-items: stretch; }
.mrow-act .price { font-weight: 800; font-size: 15px; }
.seller { display: inline-flex; align-items: center; gap: 0; border: 0; background: none; padding: 0; color: var(--ink-2); font-size: 12px; cursor: pointer; min-width: 0; text-align: left; }
.seller:hover span { text-decoration: underline; }
.price-in { width: 92px; min-height: 34px; height: 34px; padding: 0 8px; }
.price-box { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 6px 10px; border: 1px solid color-mix(in srgb, var(--rune) 40%, var(--line-2)); }
.price-box .ico-rune { width: 22px !important; height: 22px !important; }
.big-in { border: 0; font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; padding: 0; min-height: 48px; }
.big-in:focus { border: 0; }
.hrow { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; }

/* ------------------------------------------------------------ social */

.trade-list { display: grid; gap: 8px; margin-top: 12px; }
.trade { border: 1px solid var(--line); background: var(--surface); padding: 12px; }
.trade-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 13px; }
.trade-sides { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 10px; }
.trade-side { border: 1px solid var(--line); padding: 8px; min-width: 0; }
.trade-side h4 { margin: 0 0 6px; font-size: 12px; color: var(--ink-3); font-weight: 600; }
.trade-side .total { margin-top: 6px; font-size: 12px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.minis { display: flex; flex-wrap: wrap; gap: 4px; }
.mini { width: 40px; height: 40px; background: var(--bg); }
.coin-line { margin-top: 4px; font-size: 13px; font-weight: 700; }
.trade-actions { display: flex; gap: 6px; margin-top: 10px; }
.trade-actions .btn { flex: 1; }
.status { font-size: 12px; font-weight: 700; color: var(--ink-3); }
.status.ok { color: var(--ok); }
.status.bad { color: var(--bad); }
.verdict { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; font-size: 13px; font-variant-numeric: tabular-nums; }
.verdict.good strong { color: var(--ok); }
.verdict.bad strong { color: var(--bad); }
.player-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; align-items: center; min-height: 54px; padding: 8px 0; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; cursor: pointer; width: 100%; }
.player-row .name { font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; }
.player-row .sub { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.player-row .go { grid-row: 1 / 3; grid-column: 2; color: var(--ink-2); font-size: 13px; }
.picker { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; margin-top: 8px; }
.picker .tile-info { padding: 0 5px 5px; }
.picker .tile-name, .picker .tile-val { font-size: 11px; }
.picker .tile-mut { display: none; }
.side-block { margin-top: 18px; }
.coin-input { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.coin-input .input { max-width: 150px; }
.frow { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 6px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); background: var(--surface); }
.frow-name { display: grid; gap: 2px; border: 0; background: none; padding: 0; text-align: left; cursor: pointer; min-width: 0; }
.frow-name b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb { margin-top: 6px; }
.lb-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 10px; align-items: center; min-height: 52px; padding: 6px 4px; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; cursor: pointer; width: 100%; }
.lb-rank { font-family: var(--mono); font-weight: 700; color: var(--ink-3); text-align: center; }
.lb-row.podium .lb-rank { color: var(--ink); }
.lb-name { min-width: 0; }
.lb-name b { display: flex; align-items: center; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-name small { display: block; font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-score { font-weight: 700; font-variant-numeric: tabular-nums; }
.lb-row.me { background: var(--surface-2); outline: 1px solid var(--ink-3); outline-offset: -1px; }
.lb-pinned { margin-top: 8px; }

/* ------------------------------------------------------------ profilo */

.e2e-tag { display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; padding: 6px 10px; border: 1px solid color-mix(in srgb, var(--ok) 55%, transparent); background: color-mix(in srgb, var(--ok) 8%, transparent); color: var(--ok); font-size: 12px; font-weight: 800; letter-spacing: 0.01em; cursor: pointer; }
.e2e-tag svg { width: 15px; height: 15px; }
.e2e-big { display: flex; align-items: center; gap: 10px; color: var(--ok); font-size: 18px; }
.e2e-big svg { width: 26px; height: 26px; }
.fp { padding: 10px; border: 1px solid var(--line-2); font-size: 12px; line-height: 1.7; word-spacing: 4px; overflow-wrap: anywhere; }
.profile-head { display: flex; align-items: flex-start; gap: 12px; margin-top: 12px; }
.profile-head > div { flex: 1; min-width: 0; }
.profile-head h1 { overflow-wrap: anywhere; }
.showcase { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.slot { border: 1px dashed var(--line-2); aspect-ratio: 0.78; display: grid; place-items: center; font-size: 12px; color: var(--ink-3); background: none; cursor: pointer; }
.slot:hover { border-color: var(--ink-3); color: var(--ink-2); }
.code-box { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 8px 8px 12px; border: 1px solid var(--line-2); font-family: var(--mono); font-size: 18px; font-weight: 700; letter-spacing: 0.04em; }
.code-box .btn { font-family: var(--font); letter-spacing: 0; }
.rules h3 { margin-top: 20px; margin-bottom: 6px; }
.rules h3:first-child { margin-top: 0; }
.rules table { width: 100%; border-collapse: collapse; font-size: 13px; }
.rules td { padding: 7px 0; border-bottom: 1px solid var(--line); }
.rules td:last-child { text-align: right; font-family: var(--mono); white-space: nowrap; padding-left: 10px; }
.rules .frames { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.rules .frames > div { aspect-ratio: 1; display: grid; align-content: end; justify-items: start; gap: 2px; padding: 6px; background: var(--bg); min-width: 0; }
.rules .frames .rname { font-size: 11px; white-space: normal; position: relative; z-index: 3; }
.rules .mk { font-size: 9px; color: var(--rune); position: relative; z-index: 3; }

/* ------------------------------------------------------------ apertura */

#stage { position: fixed; inset: 0; z-index: 100; background: #000; color: var(--ink); overflow: hidden; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
#stage[hidden] { display: none; }
#stage.in { animation: fadeIn 180ms ease-out; }
#stage.out { animation: fadeOut 200ms ease-in forwards; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes fadeOut { to { opacity: 0; } }
.stage-inner { position: absolute; inset: 0; }
.stage-inner.shake { animation: shake 520ms cubic-bezier(.36, .07, .19, .97); }
@keyframes shake {
  10%, 90% { transform: translate(-2px, 1px); }
  20%, 80% { transform: translate(4px, -2px); }
  30%, 50%, 70% { transform: translate(-8px, 3px); }
  40%, 60% { transform: translate(8px, -3px); }
}
.stage-inner.storm { animation: screenGlitch 140ms steps(2) infinite; }
@keyframes screenGlitch {
  0% { transform: translate(6px, 0); filter: hue-rotate(90deg) saturate(2); clip-path: inset(10% 0 40% 0); }
  25% { transform: translate(-10px, 2px) skewX(6deg); filter: invert(1); clip-path: inset(50% 0 5% 0); }
  50% { transform: translate(4px, -2px); filter: hue-rotate(-120deg); clip-path: none; }
  75% { transform: translate(-3px, 0) scaleY(1.02); filter: contrast(2) saturate(3); clip-path: inset(0 0 70% 0); }
  100% { transform: none; filter: none; clip-path: none; }
}
body.glitch-hit #app, body.glitch-hit .nav { animation: screenGlitch 260ms steps(2) 1; }
.warp, .fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.warp { z-index: 0; }
.fx { z-index: 7; }
.stage-bar { position: absolute; top: 0; left: 0; right: 0; z-index: 8; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: calc(var(--safe-t) + 12px) 16px 12px; font-size: 13px; color: var(--ink-3); }
.stage-skip { min-height: 38px; padding: 0 14px; border: 1px solid var(--line-2); background: #000; color: var(--ink); font-weight: 700; cursor: pointer; transition: opacity 200ms; }
.stage-skip:disabled, .stage-skip[hidden] { display: none; }
.stage-close[hidden] { display: none; }
.capsule { position: absolute; left: 0; right: 0; top: 50%; height: min(80vw, 440px); transform: translateY(-55%); z-index: 3; }
.capsule canvas { width: 100%; height: 100%; }
.beam { position: absolute; left: 50%; top: 0; width: 220px; height: 52%; margin-left: -110px; background: #fff; filter: blur(28px); opacity: 0; z-index: 2; transform-origin: 50% 100%; pointer-events: none; }
.reel { position: absolute; left: 0; right: 0; top: 50%; height: 152px; margin-top: -76px; z-index: 4; opacity: 0; pointer-events: none; }
.reel.live { pointer-events: auto; cursor: pointer; }
.reel-rail { position: absolute; inset: 0; border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); background: rgba(0, 0, 0, 0.85); }
.reel-clip { position: absolute; inset: 0; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent); mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent); }
.reel-track { position: absolute; top: 12px; left: 0; display: flex; will-change: transform; }
.reel-tile { position: relative; flex: none; width: 112px; height: 126px; margin-right: 8px; background: var(--surface); padding: 6px 10px 12px; transition: opacity 340ms, filter 340ms; }
.reel-tile .art { transform-origin: 50% 55%; }
.reel.landed .reel-tile:not(.win) { opacity: 0.15; filter: grayscale(1); }
.reel-marker { position: absolute; top: -14px; bottom: -14px; left: 50%; width: 2px; margin-left: -1px; z-index: 5; background: var(--mc, #fff); }
.reel-marker::before, .reel-marker::after { content: ""; position: absolute; left: 50%; width: 10px; height: 10px; margin-left: -5px; background: var(--mc, #fff); transition: transform 70ms; }
.reel-marker::before { top: 0; clip-path: polygon(0 0, 100% 0, 50% 100%); transform-origin: 50% 0; }
.reel-marker::after { bottom: 0; clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.reel-marker.tick::before { transform: scaleY(1.7); transition: none; }
.reveal { position: absolute; inset: 0; z-index: 6; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: calc(var(--safe-t) + 52px) 20px calc(var(--safe-b) + 18px); pointer-events: none; overflow-y: auto; }
.reveal.on { pointer-events: auto; }
.reveal-view { position: relative; width: min(320px, 78vw, 40vh); aspect-ratio: 1; opacity: 0; flex: none; }
.reveal-view canvas { width: 100%; height: 100%; }
.reveal-view > .art { width: 100%; height: 100%; }
.reveal-text { position: relative; width: 100%; max-width: 380px; text-align: center; margin-top: 4px; }
.reveal-text > * { opacity: 0; }
.reveal-text .rname { font-size: 13px; }
.reveal-name { display: block; margin-top: 8px; font-size: 30px; font-weight: 800; font-stretch: 75%; line-height: 1.05; letter-spacing: -0.02em; }
.reveal-name.glitchy { animation: textGlitch 1.6s steps(1) infinite; text-shadow: -2px 0 #FF2BD6, 2px 0 #3DF5E8; }
.reveal-meta { display: block; margin-top: 6px; color: var(--ink-3); font-family: var(--mono); font-size: 13px; }
.reveal-flags { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; margin-top: 8px; min-height: 22px; }
.flag { display: inline-flex; align-items: center; height: 22px; padding: 0 7px; border: 1px solid var(--ink-2); font-size: 12px; font-weight: 700; }
.flag.rune { border-color: var(--rune); color: var(--rune); }
.reveal-value { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 10px; font-size: 32px; font-weight: 800; font-variant-numeric: tabular-nums; font-stretch: 85%; }
.reveal-value .ico-coin { width: 20px !important; height: 20px !important; }
.reveal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 16px; width: 100%; max-width: 380px; opacity: 0; }
.reveal-actions .btn { min-height: 48px; }
.reveal-actions .btn:first-child { grid-column: 1 / -1; }
.stamp { position: absolute; top: 8%; right: -2%; z-index: 3; padding: 5px 9px; border: 2px solid var(--ink); background: #000; color: var(--ink); font-size: 13px; font-weight: 850; line-height: 1.15; text-align: center; opacity: 0; pointer-events: none; }
.stamp small { display: block; font-family: var(--mono); font-size: 11px; font-weight: 700; color: var(--ink-2); }
.flash { position: absolute; inset: 0; z-index: 9; background: #fff; opacity: 0; pointer-events: none; }

@media (min-width: 720px) {
  .reel-tile { width: 128px; height: 140px; }
  .reel { height: 166px; margin-top: -83px; }
  .cgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sheet.wide .grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
@media (max-width: 360px) {
  .wallet { padding: 0 6px; gap: 4px; font-size: 13px; }
  .brand { font-size: 19px; }
  .top { gap: 4px; }
  .icon-btn { width: 32px; height: 32px; }
  .ccard.wide { grid-template-columns: 96px minmax(0, 1fr); }
}
@media (max-height: 640px) {
  .reveal-name { font-size: 24px; }
  .reveal-value { font-size: 26px; margin-top: 6px; }
}

/* ------------------------------------------------------------ progressi ed economia */

.rel { position: relative; z-index: 3; }
.icon-btn { position: relative; }
.icon-btn .badge { top: -7px; left: auto; right: -7px; }
.ico-frag { width: 14px !important; height: 14px !important; }
.price.frag { color: #7FD8FF; }
.price.xp { color: var(--gold); font-size: 12px; font-weight: 700; }
.btn-primary .price.frag { color: #0B3550; }
.frag-c { color: #7FD8FF; }
.wallet-inline.frag { color: #7FD8FF; }
.reward { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 12px; }
.rw-chest, .rw-title, .rw-frame { display: inline-flex; align-items: center; height: 18px; padding: 0 5px; font-size: 11px; font-weight: 700; border: 1px solid var(--line-2); white-space: nowrap; }
.rw-chest { border-color: color-mix(in srgb, var(--cc) 60%, transparent); color: var(--cc); }
.rw-title { color: var(--gold); border-color: color-mix(in srgb, var(--gold) 50%, transparent); }
.rw-frame { color: var(--rc); border-color: var(--rc); }
.chips.wrap { flex-wrap: wrap; overflow: visible; }
.srow-ico.gold { color: var(--gold); }
.banner.frag { border-color: color-mix(in srgb, #7FD8FF 45%, transparent); }
.banner.frag > span:nth-child(2) { margin-right: auto; }
.tile-flag.busy { background: var(--ink-2); color: #000; }
.drop-row.off { color: var(--ink-3); }

/* stagioni */
.banner.season { border-color: var(--sc); cursor: pointer; }
.banner.season .season-name { color: var(--sc); font-weight: 750; }
.season-box { border-top: 2px solid var(--sc); padding-top: 12px; }
.season-box h2 { color: var(--sc); }
.season-chip { display: inline-flex; align-items: center; height: 20px; padding: 0 6px; font-size: 11px; font-weight: 750; color: var(--sc); border: 1px solid var(--sc); }

/* giorni di fila */
.streak { margin-top: 12px; padding: 12px; border: 1px solid var(--line-2); background: var(--surface); }
.streak-ico { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid color-mix(in srgb, #FF8A3D 50%, transparent); color: #FF8A3D; flex: none; }
.streak-ico svg { width: 19px; height: 19px; }
.streak-strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin-top: 10px; }
.sday { display: grid; justify-items: center; gap: 4px; padding: 6px 0; border: 1px solid var(--line); color: var(--ink-3); font-size: 11px; }
.sday .ico svg, .sday .ico-coin, .sday .ico-rune, .sday .ico-frag { width: 13px !important; height: 13px !important; }
.sday.done { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 35%, transparent); }
.sday.today { border-color: #FF8A3D; color: var(--ink); box-shadow: inset 0 -2px 0 #FF8A3D; }
.sq-cap { width: 12px; height: 12px; background: var(--cc); }

/* livello */
.lvl { margin-top: 10px; padding: 10px 12px; border: 1px solid var(--line); background: var(--surface); }
.lvl > .row { gap: 12px; }
.lvl.compact { margin-top: 0; }
.lvl-badge { flex: none; width: 46px; height: 46px; display: grid; place-content: center; text-align: center; border: 1px solid var(--gold); background: none; color: var(--gold); cursor: pointer; padding: 0; line-height: 1; }
.lvl-badge span { font-size: 10px; font-weight: 700; color: var(--ink-3); }
.lvl-badge b { font-size: 19px; font-weight: 800; font-variant-numeric: tabular-nums; }
.xpbar { height: 4px; margin-top: 6px; }
.xpbar > i { background: var(--gold); }
.lvl-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.lvl-row .mono { color: var(--ink-3); font-weight: 700; }
.lvl-row.reached .mono { color: var(--gold); }
.lvl-row.mile { background: linear-gradient(90deg, color-mix(in srgb, var(--gold) 8%, transparent), transparent); }
.lvl-chip { font-size: 11px; font-weight: 750; color: var(--gold); border: 1px solid color-mix(in srgb, var(--gold) 50%, transparent); padding: 0 5px; }

/* missioni */
.mgroup { display: grid; gap: 6px; margin-top: 8px; }
.mission { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px; border: 1px solid var(--line); background: var(--surface); }
.mission-mid { display: grid; gap: 6px; min-width: 0; }
.mission-text { font-size: 14px; font-weight: 650; }
.mission.done { border-color: color-mix(in srgb, var(--ok) 55%, transparent); }
.mission.claimed { opacity: 0.55; }

/* forgia */
.recipe { display: grid; gap: 10px; padding: 12px; border: 1px solid var(--line); background: var(--surface); }
.recipe-flow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.recipe-in { display: inline-flex; align-items: center; gap: 6px; padding: 6px 8px; background: var(--bg); }
.recipe-in > * { position: relative; z-index: 3; }
.recipe-arrow { color: var(--ink-3); display: inline-flex; }
.recipe-arrow svg { width: 22px; height: 22px; }
.recipe-out { display: inline-flex; flex-wrap: wrap; gap: 6px; }

/* laboratorio */
.lab-chances { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); }
.lab-chances > div { display: grid; justify-items: center; gap: 2px; padding: 12px 6px; border-right: 1px solid var(--line); background: var(--surface); }
.lab-chances > div:last-child { border-right: 0; }
.lab-chances b { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.lab-chances span { font-size: 12px; color: var(--ink-3); }
.lab-odds { width: 100%; border-collapse: collapse; font-size: 13px; }
.lab-odds td { padding: 7px 0; border-bottom: 1px solid var(--line); }
.lab-odds td:last-child { text-align: right; }
.lab-verdict { margin-top: 12px; padding: 12px; border: 1px solid var(--line-2); text-align: center; font-weight: 750; font-size: 16px; color: var(--ink-2); }
.lab-verdict.ok { color: var(--ok); border-color: var(--ok); }
.lab-verdict.bad { color: var(--bad); border-color: var(--bad); }
.viewer.lab-brew { animation: labBrew 900ms ease-in-out infinite; }
@keyframes labBrew { 50% { box-shadow: inset 0 0 40px color-mix(in srgb, var(--rune) 35%, transparent); filter: hue-rotate(40deg) brightness(1.15); } }
.viewer.shatter canvas, .viewer.shatter .art { animation: shatter 900ms var(--ease-out) forwards; }
@keyframes shatter { 20% { transform: scale(1.06) rotate(-2deg); filter: brightness(2); } 100% { transform: scale(0.6) rotate(8deg); filter: blur(8px) brightness(0.4); opacity: 0; } }
.viewer.pop-in { animation: popIn 520ms var(--ease-spring); }
@keyframes popIn { from { transform: scale(0.92); filter: brightness(2.2); } }
.viewer.short { aspect-ratio: 1.5; }

/* spedizioni */
.exp-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px; border: 1px solid var(--line); background: var(--surface); }
.exp-row .grow { display: grid; gap: 5px; min-width: 0; font-size: 13px; }
.exp-row.back { border-color: color-mix(in srgb, var(--ok) 55%, transparent); }
.dest { padding: 12px; border: 1px solid var(--line); background: var(--surface); }
.dest .reward .ico svg, .dest .reward .ico-coin, .dest .reward .ico-rune, .dest .reward .ico-frag { width: 14px !important; height: 14px !important; }

/* mercato: aste, richieste, grafico */
.mrow.auction.leading { border-color: color-mix(in srgb, var(--ok) 55%, transparent); }
.auc-now { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-top: 14px; padding: 12px; border: 1px solid color-mix(in srgb, var(--rune) 35%, var(--line)); }
.auc-now .right { text-align: right; }
.auc-price .price { font-size: 26px; font-weight: 800; }
.auc-price .ico-rune { width: 20px !important; height: 20px !important; }
.market-block { padding: 12px; border: 1px solid color-mix(in srgb, var(--rune) 28%, var(--line)); }
.market-block .data { margin-top: 10px; }
.market-block .data dd { align-items: center; gap: 4px; }
.chart-box { position: relative; margin-top: 8px; }
.chart { width: 100%; height: 96px; display: block; background: var(--bg); border: 1px solid var(--line); }
.chart .grid-l { stroke: var(--line); stroke-width: 1; }
.chart .line { fill: none; stroke: var(--ink-3); stroke-width: 1.2; }
.chart .pt { fill: var(--ink); }
.chart .pt-auction { fill: var(--gold); }
.chart .pt-order { fill: var(--rune); }
.chart-axis { position: absolute; top: 4px; bottom: 26px; left: 6px; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; font-size: 10px; }
.chart-legend { display: flex; gap: 12px; margin-top: 6px; font-size: 11px; }
.chart-legend .lg::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 5px; vertical-align: 0; background: var(--ink); }
.chart-legend .lg-auction::before { background: var(--gold); }
.chart-legend .lg-order::before { background: var(--rune); }

/* profilo */
.profile-head.rf { padding: 12px; background: var(--surface); }
.profile-head.small-head { margin: 0 0 10px; }
.ptitle { color: var(--gold); font-weight: 650; }
.profile-card { padding: 16px; border: 1px solid var(--line-2); background: var(--surface); }
.frames-pick { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pframe-tile { position: relative; min-height: 64px; display: grid; place-items: center; padding: 6px; background: var(--bg); border: 1px solid var(--line-2); color: var(--ink-2); font-size: 12px; font-weight: 650; cursor: pointer; }
.pframe-tile.on { outline: 2px solid var(--ink); outline-offset: 2px; color: var(--ink); }
.ach { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px; border: 1px solid var(--line); background: var(--surface); }
.ach-ico { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--line-2); color: var(--ink-3); }
.ach-ico svg { width: 18px; height: 18px; }
.ach.done { border-color: color-mix(in srgb, var(--gold) 60%, transparent); }
.ach.done .ach-ico, .ach.claimed .ach-ico { color: var(--gold); border-color: color-mix(in srgb, var(--gold) 50%, transparent); }
.ach.claimed { opacity: 0.6; }
.item-extra { margin-top: 12px; }
.item-extra .btn .ico svg { width: 15px; height: 15px; }
.busy-line { color: var(--ink-2); }

@media (prefers-reduced-motion: reduce) {
  .view.enter, .feed-row.new, .wallet.bump, .wallet.drop, .brand.glitch-now, .boot-line::after { animation: none; }
  .fx-holo img, .fx-holo svg, .fx-glitch img, .fx-glitch svg { animation: none; }
  .rf, .rf::before, .rf::after, .rname.rn-glitch, .reveal-name.glitchy { animation: none !important; }
  .viewer.lab-brew, .viewer.pop-in, .viewer.shatter canvas, .viewer.shatter .art { animation: none; }
  .stage-inner.storm, body.glitch-hit #app, body.glitch-hit .nav, .sheet.glitch-hit { animation: none; }
}

.noscript { position: relative; z-index: 1; padding: 40px 16px; text-align: center; }

/* ------------------------------------------------------------ effetti */

/* angoli tecnici sulle superfici */
.hero, .streak, .lvl, .mission, .recipe, .dest, .market-block, .exp-row, .ach, .srow, .colrow, .auc-now, .mrow, .ccard, .stats, .profile-card {
  background-image:
    linear-gradient(var(--tk), var(--tk)), linear-gradient(var(--tk), var(--tk)),
    linear-gradient(var(--tk), var(--tk)), linear-gradient(var(--tk), var(--tk)),
    linear-gradient(var(--tk), var(--tk)), linear-gradient(var(--tk), var(--tk)),
    linear-gradient(var(--tk), var(--tk)), linear-gradient(var(--tk), var(--tk));
  background-size: 7px 1px, 1px 7px, 7px 1px, 1px 7px, 7px 1px, 1px 7px, 7px 1px, 1px 7px;
  background-position: left -1px top -1px, left -1px top -1px, right -1px top -1px, right -1px top -1px, left -1px bottom -1px, left -1px bottom -1px, right -1px bottom -1px, right -1px bottom -1px;
  background-repeat: no-repeat;
  background-origin: border-box;
}
.recipe, .dest, .colrow, .srow, .ach, .mission, .exp-row, .mrow { position: relative; }

/* inclinazione e riflesso col puntatore */
.tile, .ccard, .mrow-art, .recipe, .dest, .colrow, .srow, .ach, .mission, .exp-row { transition: transform 320ms var(--ease-out), border-color 160ms; }
.tilting { transform: perspective(820px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateZ(0); transition: transform 80ms linear; z-index: 2; }
.glare { position: absolute; inset: 0; z-index: 5; pointer-events: none; background: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%), rgba(255, 255, 255, 0.14), transparent 58%); mix-blend-mode: screen; }
.tile .art img, .ccard .cap img { transition: transform 420ms var(--ease-spring); }
.tile:hover .art img { transform: translateY(-3px) scale(1.07); }
.ccard .cap img { animation: capFloat 5.5s ease-in-out infinite; }
.ccard:nth-child(2n) .cap img { animation-delay: -2.2s; }
.ccard:nth-child(3n) .cap img { animation-delay: -3.7s; }
@keyframes capFloat { 50% { transform: translateY(-4px) rotate(-1.5deg); } }

/* titoli delle sezioni */
.head h2::before { content: ""; display: inline-block; flex: none; width: 5px; height: 5px; margin-right: 8px; vertical-align: 3px; background: var(--ink); box-shadow: 0 0 8px rgba(255, 255, 255, 0.6); }
h2.row { display: flex; align-items: center; gap: 0; }

/* cambio schermata: una linea di scansione scende */
.view.enter::before { content: ""; position: fixed; left: 0; right: 0; top: 0; height: 1px; z-index: 25; pointer-events: none; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.85) 30%, rgba(255, 255, 255, 0.85) 70%, transparent); box-shadow: 0 0 18px rgba(255, 255, 255, 0.5); animation: scan 560ms var(--ease-out) forwards; }
@keyframes scan { from { transform: translateY(56px); opacity: 1; } to { transform: translateY(100vh); opacity: 0; } }

/* pulsanti: riflesso al passaggio, pressione */
.btn { position: relative; overflow: hidden; }
.btn-primary::after { content: ""; position: absolute; top: 0; bottom: 0; left: -70%; width: 45%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.75), transparent); transform: skewX(-20deg); pointer-events: none; }
.btn-primary:hover:not(:disabled)::after { left: 130%; transition: left 650ms var(--ease-out); }
.btn:active:not(:disabled) { transform: translateY(1px) scale(0.985); }
.btn-primary:not(:disabled) { box-shadow: 0 0 0 rgba(255, 255, 255, 0); transition: box-shadow 200ms, background-color 120ms, transform 100ms; }
.btn-primary:hover:not(:disabled) { box-shadow: 0 0 22px rgba(255, 255, 255, 0.22); }

/* notifiche */
#toast { background: rgba(9, 11, 15, 0.97); color: var(--ink); border: 1px solid var(--line-2); border-left: 3px solid var(--ok); padding: 11px 14px 13px 12px; box-shadow: 0 14px 40px rgba(0, 0, 0, 0.7), 0 0 24px rgba(63, 191, 127, 0.12); overflow: hidden; }
#toast.bad { background: rgba(22, 6, 6, 0.97); border-left-color: var(--bad); color: #fff; box-shadow: 0 14px 40px rgba(0, 0, 0, 0.7), 0 0 24px rgba(255, 74, 61, 0.15); }
#toast::after { content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: currentColor; opacity: 0.35; transform-origin: left; }
#toast.show::after { animation: toastLife 2.6s linear forwards; }
@keyframes toastLife { to { transform: scaleX(0); } }

/* raggi di luce dietro i pezzi rari */
.viewer { overflow: hidden; }
.viewer canvas, .reveal-view canvas, .viewer > .art, .reveal-view > .art { position: relative; z-index: 1; }
.rays { position: absolute; inset: -35%; z-index: 0; pointer-events: none; opacity: 0.75;
  background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--rc) 26%, transparent) 0deg 5deg, transparent 5deg 17deg);
  -webkit-mask: radial-gradient(circle, #000 0%, rgba(0, 0, 0, 0.6) 25%, transparent 60%); mask: radial-gradient(circle, #000 0%, rgba(0, 0, 0, 0.6) 25%, transparent 60%);
  animation: raysSpin 30s linear infinite; }
.rays.strong { opacity: 1; animation-duration: 14s; background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--rc) 40%, transparent) 0deg 7deg, transparent 7deg 14deg); }
.rays.still { animation: none; }
@keyframes raysSpin { to { transform: rotate(360deg); } }

/* capsula del giorno */
.hero { position: relative; overflow: hidden; }
.hero-cap { position: relative; }
.orbit { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

/* informazioni */
.info-btn { flex: none; width: 22px; height: 22px; display: inline-grid; place-items: center; margin-left: 8px; padding: 0; border: 1px solid var(--line-2); background: none; color: var(--ink-3); font: 700 12px/1 var(--mono); cursor: pointer; vertical-align: middle; }
.info-btn:hover { color: var(--ink); border-color: var(--ink-2); }
.toolbar > .info-btn { margin-left: 0; }
.mk-chip { display: inline-flex; align-items: center; height: 20px; padding: 0 6px; border: 1px solid color-mix(in srgb, var(--rune) 55%, transparent); background: none; color: var(--rune); font-size: 11px; font-weight: 750; cursor: pointer; }
.info-p { font-size: 14px; color: var(--ink-2); line-height: 1.55; margin-bottom: 12px; }

/* segnaposto */
.skel { display: grid; gap: 6px; margin-top: 12px; }
.skel i { display: block; height: 58px; border: 1px solid var(--line); background: linear-gradient(90deg, rgba(255, 255, 255, 0.015) 0%, rgba(255, 255, 255, 0.06) 45%, rgba(255, 255, 255, 0.015) 90%); background-size: 260% 100%; animation: skel 1.3s linear infinite; }
.skel i:nth-child(2) { animation-delay: 0.12s; } .skel i:nth-child(3) { animation-delay: 0.24s; } .skel i:nth-child(4) { animation-delay: 0.36s; }
@keyframes skel { from { background-position: 130% 0; } to { background-position: -130% 0; } }

@media (prefers-reduced-motion: reduce) {
  .view.enter::before, .ccard .cap img, .skel i, #toast.show::after { animation: none; }
  .tilting { transform: none; }
}

/* ------------------------------------------------------------ account */

.form-field { display: grid; gap: 6px; margin-bottom: 12px; font-size: 13px; }
.form-field > span { color: var(--ink-2); font-weight: 650; font-size: 12px; }
.form-field small { font-size: 11px; }
.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 82px; }
.pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); height: 30px; padding: 0 8px; border: 1px solid var(--line-2); background: var(--bg); color: var(--ink-2); font-size: 11px; font-weight: 700; cursor: pointer; }
.pw-meter { height: 3px; margin-top: 6px; background: var(--line); }
.pw-meter > i { display: block; height: 100%; width: 0; background: var(--pc, var(--bad)); transition: width 200ms, background-color 200ms; }
.acc-card .data dd { justify-content: flex-end; }
.acc-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.acc-row small { font-size: 12px; }
.acc-lock { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; color: var(--ok); }
.acc-lock .ico svg { width: 14px; height: 14px; }
.tag-ok { margin-left: 8px; font-size: 10px; font-weight: 800; padding: 1px 5px; color: #000; background: var(--ok); vertical-align: 2px; }
.gold-t { color: var(--gold); }
.acc-banner { padding: 0; }
.acc-banner-go { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 0; background: none; color: var(--ink); font: inherit; font-weight: 650; text-align: left; cursor: pointer; }
.acc-banner .icon-btn { border: 0; margin-right: 4px; }
.sent-box { display: grid; gap: 6px; padding: 14px; border: 1px solid color-mix(in srgb, var(--ok) 50%, transparent); }
.boot.gate { gap: 18px; background: #000; }
.gate-msg { color: var(--ink-2); font-size: 14px; max-width: 320px; }
.gate-actions { display: grid; gap: 8px; width: min(320px, calc(100vw - 48px)); margin: 6px auto 0; }
.lang-pick { display: flex; gap: 6px; }
