/* ARVELL RP - Area giocatore. Linguaggio della schermata di caricamento (Impact corsivo, spaziature, verde ARVELL)
   con una grafica propria: mappa a curve di livello disegnata, griglia tecnica e il documento d'identita del personaggio.
   Nessuna foto: tutto vettoriale o CSS. Vale solo per le pagine dei giocatori. */
:root {
  --pl-display: italic 400 1em/0.95 Impact, 'Haettenschweiler', 'Arial Narrow Bold', sans-serif;
  --pl-glass: rgba(17, 22, 25, .74); --pl-edge: rgba(232, 237, 223, .09); --pl-edge-2: rgba(139, 213, 179, .22);
}

/* ------------------------------------------------------------ Sfondo comune */
.pl-bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; background: #0d1113; }
.pl-bg-topo { position: absolute; inset: -4%; background: url('portale/topo.svg') center / cover no-repeat; opacity: .5; animation: pl-drift 60s ease-in-out infinite alternate; }
.pl-bg-glow { position: absolute; inset: 0;
  background: radial-gradient(48% 60% at 78% 22%, rgba(139, 213, 179, .16), transparent 70%), radial-gradient(38% 50% at 8% 92%, rgba(139, 213, 179, .09), transparent 70%),
    linear-gradient(rgba(255, 255, 255, .022) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .022) 1px, transparent 1px),
    radial-gradient(120% 90% at 50% 40%, transparent 40%, rgba(5, 8, 9, .85) 100%);
  background-size: auto, auto, 32px 32px, 32px 32px, auto; }

/* ------------------------------------------------------------ Accesso */
.pl-login { margin: 0; min-height: 100vh; overflow-x: hidden; color: var(--text); position: relative; isolation: isolate; background: #0d1113; }
.pl-topline { position: absolute; top: 5vh; left: 5vw; right: 5vw; display: flex; align-items: center; justify-content: space-between; gap: 20px; z-index: 2; }
.pl-lockup { display: flex; align-items: center; gap: 14px; }
.pl-logo { width: 46px; height: auto; }
.pl-wordmark { width: 128px; height: auto; }
.pl-lockup > span { border-left: 1px solid #e8eddf33; padding-left: 14px; font-size: 9px; letter-spacing: .28em; color: var(--muted); }
.pl-online { display: flex; align-items: center; gap: 9px; font-size: 9px; letter-spacing: .2em; color: #b4bfb6; }
.pl-online i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: pl-breathe 2.4s ease-in-out infinite; }
.pl-split { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); align-items: center; gap: 4vw; padding: 16vh 6vw 7vh; }
.pl-hero { animation: pl-enter .7s ease-out both; max-width: 640px; }
.pl-eyebrow { display: flex; align-items: center; gap: 12px; margin: 0 0 18px; font-size: 10px; font-weight: 600; letter-spacing: .24em; color: var(--muted); }
.pl-eyebrow > span { display: inline-grid; place-items: center; min-width: 28px; height: 22px; padding: 0 6px; border: 1px solid #8bd5b355; color: var(--accent); font-size: 9px; letter-spacing: 0; }
.pl-hero h1 { margin: 0; font: var(--pl-display); font-size: clamp(56px, 6.6vw, 124px); letter-spacing: -.01em; }
.pl-hero h1 em, .pc-hero h1 em, .pc-wallet-job em { display: block; margin-top: 12px; font: inherit; font-size: .46em; line-height: 1.1; color: var(--accent); }
.pl-lead { margin: 22px 0 0; max-width: 520px; color: #a7b2aa; font-size: 15px; line-height: 1.6; letter-spacing: .02em; }
.pl-notice { margin-top: 18px; }
.pl-feats { list-style: none; margin: 28px 0; padding: 0; display: grid; gap: 0; max-width: 520px; border-top: 1px solid var(--pl-edge); }
.pl-feats li { display: flex; gap: 16px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--pl-edge); font-size: 13px; color: var(--text-2); }
.pl-feats li > span { flex: none; font: var(--pl-display); font-size: 26px; color: var(--accent); width: 38px; }
.pl-feats b { display: block; color: var(--text); font-size: 14px; }
.pl-discord { display: inline-flex; align-items: center; gap: 14px; padding: 14px 30px 14px 20px; background: var(--accent); color: #0d1412; text-decoration: none; clip-path: polygon(0 0, 100% 0, calc(100% - 16px) 100%, 0 100%); transition: transform .15s, filter .15s; }
.pl-discord:hover { transform: translateX(4px); filter: brightness(1.08); }
.pl-discord .icon { width: 22px; height: 22px; }
.pl-discord b { display: block; font: var(--pl-display); font-size: 24px; letter-spacing: .04em; }
.pl-discord small { font-size: 11px; opacity: .75; }
.pl-foot { display: flex; align-items: center; gap: 7px; margin: 22px 0 0; font-size: 11.5px; color: var(--muted); }
.pl-foot .icon { width: 13px; height: 13px; }
.pl-stage { position: relative; display: grid; place-items: center; perspective: 1400px; min-height: 420px; }
.pl-stage-ring { position: absolute; width: min(560px, 90%); aspect-ratio: 1; border-radius: 50%; border: 1px dashed rgba(139, 213, 179, .18); animation: pl-spin 80s linear infinite; }
.pl-stage-ring::before { content: ""; position: absolute; inset: 9%; border-radius: 50%; border: 1px solid rgba(139, 213, 179, .1); }
.pl-stage .pc-id { width: min(500px, 100%); transform: rotateY(-16deg) rotateX(7deg) rotateZ(-2deg); animation: pl-float 7s ease-in-out infinite; box-shadow: 30px 40px 80px rgba(0, 0, 0, .55), 0 0 0 1px rgba(139, 213, 179, .2); }

/* ------------------------------------------------------------ Documento d'identita */
.pc-id { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 16px; padding: 20px 22px 16px; border-radius: 16px; color: #e9eee4;
  background: radial-gradient(130% 120% at 100% 0%, rgba(139, 213, 179, .2), transparent 55%), repeating-linear-gradient(115deg, rgba(255, 255, 255, .018) 0 2px, transparent 2px 9px), linear-gradient(145deg, #1b2a27, #121a1b 55%, #0f1516);
  border: 1px solid rgba(139, 213, 179, .28); box-shadow: 0 24px 60px rgba(0, 0, 0, .45); isolation: isolate; }
.pc-id::before { content: ""; position: absolute; right: -60px; bottom: -70px; width: 280px; height: 280px; z-index: -1; opacity: .06; background: url('portale/logo.png') center / contain no-repeat; }
.pc-id::after { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5;
  background: repeating-radial-gradient(circle at 18% 60%, transparent 0 7px, rgba(139, 213, 179, .05) 7px 8px); mask-image: linear-gradient(90deg, #000, transparent 70%); }
.pc-id-holo { position: absolute; inset: -40%; z-index: 0; pointer-events: none; opacity: .22; mix-blend-mode: screen;
  background: conic-gradient(from 0deg, transparent, rgba(139, 213, 179, .9), rgba(143, 180, 232, .8), rgba(217, 178, 111, .7), transparent 60%); filter: blur(40px); animation: pl-holo 9s linear infinite; }
.pc-id > * { position: relative; z-index: 1; }
.pc-id-head { display: flex; align-items: center; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid rgba(139, 213, 179, .22); }
.pc-id-head img { width: 34px; height: auto; }
.pc-id-head b { display: block; font: var(--pl-display); font-size: 22px; letter-spacing: .05em; }
.pc-id-head small { font-size: 8.5px; letter-spacing: .22em; color: #9fb0a6; }
.pc-id-chip { margin-left: auto; width: 42px; height: 32px; border-radius: 6px; background: linear-gradient(135deg, #d9c48f, #a98c4e 45%, #e6d4a2 55%, #9c7f43); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .25);
  -webkit-mask: linear-gradient(#000 0 0); }
.pc-id-chip::before { content: ""; position: absolute; }
.pc-id-body { display: grid; grid-template-columns: 112px 1fr; gap: 20px; align-items: start; }
.pc-id-photo { position: relative; aspect-ratio: 4 / 5; border-radius: 10px; display: grid; place-items: center; overflow: hidden;
  background: repeating-radial-gradient(circle at 50% 120%, rgba(139, 213, 179, .14) 0 1px, transparent 1px 6px), linear-gradient(160deg, #24342f, #141c1d); border: 1px solid rgba(139, 213, 179, .3); }
.pc-id-photo span { font: var(--pl-display); font-size: 46px; color: var(--accent); text-shadow: 0 0 24px rgba(139, 213, 179, .4); }
.pc-id-live { position: absolute; left: 6px; right: 6px; bottom: 6px; padding: 2px 0; text-align: center; font: 700 8.5px var(--mono); font-style: normal; letter-spacing: .14em; color: #0d1412; background: var(--accent); border-radius: 4px; }
.pc-id-fields { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; }
.pc-id-fields div { min-width: 0; }
.pc-id-fields dt { font: 600 8.5px var(--mono); letter-spacing: .18em; text-transform: uppercase; color: #8fa198; }
.pc-id-fields dd { margin: 2px 0 0; font-weight: 700; font-size: 14.5px; letter-spacing: .02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-id-fields dd small { font-weight: 500; color: #a7b2aa; font-size: 11px; }
.pc-id-num { font-family: var(--mono) !important; color: var(--accent); }
.pc-id-mrz { display: flex; flex-direction: column; gap: 2px; padding-top: 12px; border-top: 1px dashed rgba(139, 213, 179, .25); font: 600 13px/1.25 'Consolas', 'OCR A Std', var(--mono); letter-spacing: .18em; color: #c9d4cc; overflow: hidden; white-space: nowrap; }
.pc-id-ro { position: absolute !important; top: 18px; right: 74px; display: inline-flex; align-items: center; gap: 4px; font: 600 8.5px var(--mono); letter-spacing: .16em; color: #8fa198; }
.pc-id-ro .icon { width: 11px; height: 11px; }

/* ------------------------------------------------------------ Area interna */
.portal-page { background: #0d1113; position: relative; isolation: isolate; }
.portal-page .portal-top { background: rgba(10, 14, 16, .72); backdrop-filter: blur(14px); border-bottom-color: var(--pl-edge); height: 66px; }
.portal-logo { width: 32px; height: auto; }
.portal-page .portal-wordmark { height: auto; width: 94px; }
.portal-page .portal-brand small { letter-spacing: .3em; color: var(--muted); }
.portal-page .portal-nav { margin-left: 10px; }
.portal-page .portal-nav a { height: 66px; border-radius: 0; padding: 0 16px; font: var(--pl-display); font-size: 19px; letter-spacing: .05em; text-transform: uppercase; color: #9aa69f; }
.portal-page .portal-nav a .icon { width: 17px; height: 17px; }
.portal-page .portal-nav a:hover { background: transparent; color: var(--text); }
.portal-page .portal-nav a.active { background: linear-gradient(0deg, rgba(139, 213, 179, .14), transparent 75%); color: var(--text); box-shadow: inset 0 -3px 0 var(--accent); }
.portal-page .portal-nav .tk-unread { font: 700 10.5px var(--mono); font-style: normal; }
.portal-page .portal-flash { backdrop-filter: blur(10px); }

.pc-top { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); gap: 18px; align-items: stretch; }
.pc-top .pc-id { min-height: 300px; justify-content: space-between; }
.pc-wallet { display: flex; flex-direction: column; justify-content: center; gap: 14px; padding: 22px 24px; border-radius: 16px; background: var(--pl-glass); border: 1px solid var(--pl-edge); backdrop-filter: blur(14px); }
.pc-wallet .pl-eyebrow { margin: 0; }
.pc-wallet-job { margin: 0; font: var(--pl-display); font-size: clamp(32px, 3.2vw, 52px); overflow-wrap: anywhere; }
.pc-wallet-job em { margin-top: 6px; font-size: .5em; }
.pc-wallet .pc-kpis { grid-template-columns: 1fr 1fr; gap: 8px; }
.portal-page .pc-kpi { display: flex; flex-direction: column; gap: 2px; padding: 11px 14px; border-radius: 10px; background: rgba(8, 11, 12, .45); border: 1px solid var(--pl-edge); position: relative; overflow: hidden; }
.portal-page .pc-kpi::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 2px; background: var(--accent); }
.portal-page .pc-kpi b { font: var(--pl-display); font-size: 27px; letter-spacing: .01em; }
.pc-last { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 12px; color: #9aa69f; }
.pc-last i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.pc-last i.is-on { background: var(--ok); animation: pl-breathe 1.6s infinite; }

.portal-page .pc-card, .portal-page .pc-switch button, .portal-page .card, .portal-page .notice { background: var(--pl-glass); border-color: var(--pl-edge); backdrop-filter: blur(14px); }
.portal-page .pc-card { border-radius: 14px; }
.portal-page .pc-card h2, .portal-page .pc-h2 { color: #aebbb1; }
.portal-page .pc-car { background: rgba(8, 11, 12, .5); }
.portal-page .pc-note { color: #8f9b95; }

.portal-page .pc-hero.is-small { position: relative; display: flex; align-items: center; min-height: 190px; padding: 30px 34px; border-radius: 16px; overflow: hidden; background: var(--pl-glass); border: 1px solid var(--pl-edge); backdrop-filter: blur(14px); }
.portal-page .pc-hero.is-small::after { display: none; }
.pc-hero-mark { position: absolute; right: -30px; top: 50%; width: 300px; transform: translateY(-50%); opacity: .07; pointer-events: none; }
.portal-page .pc-hero.is-small h1 { margin: 0; font: var(--pl-display); font-size: clamp(40px, 4.2vw, 64px); }
.portal-page .pc-hero.is-small h1 em { font-size: .44em; margin-top: 8px; }
.portal-page .pc-hero .pl-lead { font-size: 14px; margin-top: 14px; }

.portal-page .tk-portal { margin: 16px; height: calc(100vh - 66px - 32px); border: 1px solid var(--pl-edge); border-radius: 16px; background: var(--pl-glass); backdrop-filter: blur(16px); }
.portal-page .tk-portal .tk-side { background: rgba(8, 11, 12, .45); }
.portal-page .tk-portal .tk-main { background: transparent; }
.portal-page .tk-portal .tk-foot { background: rgba(8, 11, 12, .45); }
.portal-page .tk-portal .tk-msgs { background-image: none; }
.portal-page .tk-empty strong { font: var(--pl-display); font-size: 32px; letter-spacing: .01em; }
.portal-page .tk-new-head h2 { font: var(--pl-display); font-size: 32px; }

@keyframes pl-drift { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(-2%, 1.5%, 0) scale(1.04); } }
@keyframes pl-float { 0%, 100% { transform: rotateY(-16deg) rotateX(7deg) rotateZ(-2deg) translateY(0); } 50% { transform: rotateY(-11deg) rotateX(4deg) rotateZ(-1deg) translateY(-12px); } }
@keyframes pl-holo { to { transform: rotate(360deg); } }
@keyframes pl-spin { to { transform: rotate(360deg); } }
@keyframes pl-enter { from { opacity: 0; transform: translateY(12px); } }
@keyframes pl-breathe { 50% { opacity: .35; } }

@media (max-width: 1100px) {
  .pl-split { grid-template-columns: 1fr; padding-top: 18vh; } .pl-stage { min-height: 340px; order: -1; } .pl-stage .pc-id { width: min(460px, 100%); }
  .pc-top { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .pl-online { display: none; } .pl-topline { left: 20px; right: 20px; top: 20px; } .pl-split { padding: 90px 20px 40px; gap: 30px; }
  .pl-stage { min-height: 0; } .pl-stage-ring { display: none; } .pl-stage .pc-id { transform: none; animation: none; }
  .portal-page .portal-top { height: 58px; } .portal-page .portal-nav a { height: 58px; padding: 0 12px; } .portal-logo { width: 26px; }
  .pc-id { padding: 16px; } .pc-id-body { grid-template-columns: 80px 1fr; gap: 14px; } .pc-id-photo span { font-size: 32px; } .pc-id-fields { gap: 8px 12px; } .pc-id-fields dd { font-size: 13px; }
  .pc-id-mrz { font-size: 10px; letter-spacing: .1em; } .pc-id-ro { display: none !important; } .pc-id-head small { letter-spacing: .12em; }
  .portal-page .tk-portal { margin: 0; border-radius: 0; height: calc(100vh - 58px); }
}
@media (prefers-reduced-motion: reduce) { .pl-bg-topo, .pc-id-holo, .pl-stage .pc-id, .pl-stage-ring, .pl-hero { animation: none; } }

.portal-page .pc-kpi { align-items: flex-start; text-align: left; }
.portal-page .pc-grid .pc-cars { grid-template-columns: 1fr; }

/* ------------------------------------------------------------ Personaggio: ritratto a sinistra, dettagli in linea a destra */
.pg { display: grid; grid-template-columns: minmax(340px, 40%) minmax(0, 1fr); min-height: calc(100vh - 66px); }
.pg[hidden] { display: none; }
.pg-stage { position: sticky; top: 66px; height: calc(100vh - 66px); min-height: 560px; overflow: hidden; border-right: 1px solid var(--pl-edge);
  background: radial-gradient(60% 50% at 50% 78%, rgba(139, 213, 179, .2), transparent 70%), linear-gradient(180deg, rgba(10, 14, 16, .2), rgba(10, 14, 16, .7)); }
.pg-stage-rings { position: absolute; left: 50%; bottom: 96px; width: 120%; aspect-ratio: 1; transform: translateX(-50%) scaleY(.32); border-radius: 50%;
  background: repeating-radial-gradient(circle, transparent 0 34px, rgba(139, 213, 179, .1) 34px 35px); mask-image: radial-gradient(circle, #000 30%, transparent 70%); }
.pg-stage-floor { position: absolute; left: 50%; bottom: 112px; width: 62%; height: 74px; transform: translateX(-50%); border-radius: 50%;
  background: radial-gradient(closest-side, rgba(139, 213, 179, .5), rgba(139, 213, 179, .12) 60%, transparent); box-shadow: 0 0 0 1px rgba(139, 213, 179, .35), 0 0 60px rgba(139, 213, 179, .25); }
.pg-portrait { position: absolute; left: 50%; bottom: 140px; height: calc(100% - 210px); max-height: 900px; width: auto; max-width: 92%; object-fit: contain; transform: translateX(-50%);
  filter: drop-shadow(0 26px 30px rgba(0, 0, 0, .55)) drop-shadow(0 0 1px rgba(139, 213, 179, .4)); animation: pg-in .9s ease-out both; }
.pg-portrait.is-new { animation: pg-flash 1.2s ease-out both; }
.pg-portrait-empty { position: absolute; left: 50%; bottom: 160px; transform: translateX(-50%); width: min(300px, 80%); display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.pg-portrait-empty img { width: 120px; opacity: .25; filter: drop-shadow(0 0 30px rgba(139, 213, 179, .4)); }
.pg-portrait-empty b { font: var(--pl-display); font-size: 30px; letter-spacing: .03em; }
.pg-portrait-empty span { color: #9aa69f; font-size: 13px; line-height: 1.5; }
.pg-shot { position: absolute; left: 0; right: 0; bottom: 26px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.pg-shot-btn { display: inline-flex; align-items: center; gap: 12px; padding: 11px 26px 11px 16px; border: 1px solid rgba(139, 213, 179, .45); background: rgba(10, 14, 16, .7); color: var(--text); cursor: pointer;
  clip-path: polygon(0 0, 100% 0, calc(100% - 12px) 100%, 0 100%); transition: background .15s, border-color .15s; text-align: left; backdrop-filter: blur(8px); }
.pg-shot-btn:hover:not(:disabled) { background: rgba(139, 213, 179, .16); border-color: var(--accent); }
.pg-shot-btn:disabled { opacity: .45; cursor: not-allowed; }
.pg-shot-btn .icon { width: 20px; height: 20px; color: var(--accent); }
.pg-shot-btn b { display: block; font: var(--pl-display); font-size: 19px; letter-spacing: .04em; }
.pg-shot-btn small { font-size: 11px; color: #9aa69f; }
.pg-shot.is-busy .pg-shot-btn .icon { animation: pl-breathe .8s infinite; }
.pg-shot-info { margin: 0; min-height: 16px; font: 600 10.5px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: #8f9b95; }
.pg-shot-info.is-bad { color: var(--danger); text-transform: none; letter-spacing: .02em; font-family: var(--font); font-size: 12.5px; }

.pg-info { padding: 44px 5vw 60px 4vw; min-width: 0; }
.pg-info .pc-switch { margin-bottom: 22px; }
.pg-name { margin: 0; font: var(--pl-display); font-size: clamp(52px, 5.4vw, 96px); letter-spacing: -.005em; overflow-wrap: anywhere; }
.pg-name em { display: block; margin-top: 10px; font: inherit; font-size: .4em; line-height: 1.1; color: var(--accent); }
.pg-status { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 18px 0 0; font: 600 11px var(--mono); letter-spacing: .14em; color: #9aa69f; }
.pg-status span { color: #3d4a46; }
.pg-status i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.pg-status i.is-on { background: var(--ok); box-shadow: 0 0 0 4px rgba(139, 213, 179, .15); animation: pl-breathe 1.6s infinite; }
.pg-money { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 30px 0 8px; border-top: 1px solid var(--pl-edge); border-bottom: 1px solid var(--pl-edge); }
.pg-money > div { padding: 16px 20px 16px 0; display: flex; flex-direction: column; gap: 2px; }
.pg-money > div + div { padding-left: 22px; border-left: 1px solid var(--pl-edge); }
.pg-money small { font: 600 9.5px var(--mono); letter-spacing: .2em; color: #8f9b95; }
.pg-money b { font: var(--pl-display); font-size: clamp(30px, 2.6vw, 42px); letter-spacing: .01em; }
.pg-money em { font-style: normal; font-size: 11.5px; color: #8f9b95; }
.pg-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 52px; }
.pg-wide { grid-column: 1 / -1; }
.pg-sec { min-width: 0; padding-top: 22px; }
.pg-sec h2, .pg-sub { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; font: 600 10.5px var(--mono); letter-spacing: .24em; color: #c8d1cb; }
.pg-sub { margin-top: 22px; }
.pg-sec h2 span, .pg-sub span { color: var(--accent); }
.pg-sec h2::after, .pg-sub::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, rgba(139, 213, 179, .35), transparent); }
.pg-sec dl { margin: 0; }
.pg-row { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid rgba(232, 237, 223, .06); }
.pg-row dt { font-size: 13px; color: #9aa69f; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pg-row dd { margin: 0; font-size: 14px; font-weight: 600; text-align: right; color: var(--text); min-width: 0; overflow-wrap: anywhere; }
.pg-row dd small { margin-left: 6px; font-weight: 500; font-size: 11.5px; color: #8f9b95; }
.pg-row.is-accent dd { font-family: var(--mono); color: var(--accent); letter-spacing: .06em; }
.pg-row.is-plate dt { font: 700 11.5px var(--mono); letter-spacing: .12em; color: var(--text); padding: 2px 8px; border: 1px solid var(--line); border-radius: 4px; background: rgba(255, 255, 255, .04); }
.pg-ok { color: var(--ok); } .pg-bad, .pg-danger { color: var(--danger) !important; } .pg-off, .pg-muted { color: #6f7b76 !important; } .pg-warn { color: var(--warn) !important; }
.pg-row b { font: 700 11px var(--mono); letter-spacing: .14em; }
.pg-bar { display: grid; grid-template-columns: 100px 1fr 48px; align-items: center; gap: 14px; padding: 11px 0; border-bottom: 1px solid rgba(232, 237, 223, .06); font-size: 13px; color: #9aa69f; }
.pg-bar b { font: 600 12px var(--mono); text-align: right; color: var(--text); }
.pg-empty { margin: 10px 0 0; font-size: 13px; color: #8f9b95; }
.pg-story { margin: 6px 0 0; white-space: pre-wrap; font-size: 14px; line-height: 1.7; color: #b7c0b9; max-width: 820px; }
.pg-note { display: flex; align-items: center; gap: 7px; margin: 34px 0 0; font-size: 12px; color: #8f9b95; }
.pg-note .icon { width: 13px; height: 13px; }
.pg-none { min-height: calc(100vh - 66px); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 30px; }
.pg-none img { width: 110px; opacity: .3; margin-bottom: 18px; }
.pg-none h1 { margin: 0; font: var(--pl-display); font-size: clamp(44px, 5vw, 80px); }
.pg-none h1 em { display: block; margin-top: 10px; font: inherit; font-size: .42em; color: var(--accent); }
@keyframes pg-in { from { opacity: 0; transform: translateX(-50%) translateY(22px); } }
@keyframes pg-flash { 0% { opacity: 0; filter: brightness(2.2) drop-shadow(0 0 30px rgba(139, 213, 179, .9)); } 100% { opacity: 1; } }
@media (max-width: 1100px) { .pg-cols { grid-template-columns: 1fr; } .pg { grid-template-columns: minmax(300px, 42%) minmax(0, 1fr); } }
@media (max-width: 860px) {
  .pg { grid-template-columns: 1fr; } .pg-stage { position: relative; top: 0; height: 74vh; min-height: 480px; border-right: 0; border-bottom: 1px solid var(--pl-edge); }
  .pg-info { padding: 28px 20px 48px; } .pg-money { grid-template-columns: 1fr; } .pg-money > div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--pl-edge); }
}
/* Scena notturna generata (scena.svg) dietro i dettagli, sfumata verso il ped a sinistra */
.pg { position: relative; isolation: isolate; }
.pg::before { content: ""; position: fixed; top: 66px; left: 0; right: 0; bottom: 0; z-index: -1; pointer-events: none;
  background: url('portale/scena.svg') right bottom / cover no-repeat;
  -webkit-mask-image: linear-gradient(90deg, transparent 6%, rgba(0, 0, 0, .28) 26%, rgba(0, 0, 0, .85) 46%, #000 62%);
          mask-image: linear-gradient(90deg, transparent 6%, rgba(0, 0, 0, .28) 26%, rgba(0, 0, 0, .85) 46%, #000 62%);
  animation: pg-scene 1.6s ease-out both; }
.pg::after { content: ""; position: fixed; top: 66px; left: 0; right: 0; bottom: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(90deg, transparent 34%, rgba(9, 13, 14, .5) 50%, rgba(9, 13, 14, .62) 100%),
    linear-gradient(180deg, rgba(9, 13, 14, .8) 0%, rgba(9, 13, 14, .25) 38%, rgba(9, 13, 14, .1) 62%, rgba(9, 13, 14, .7) 100%); }
.pg-stage { background: radial-gradient(60% 50% at 50% 78%, rgba(139, 213, 179, .18), transparent 70%); border-right-color: transparent; }
.pg-info { position: relative; }
.pg-info .pg-name, .pg-info .pg-money b { text-shadow: 0 4px 24px rgba(0, 0, 0, .6); }
.pg-row dt { color: #a9b4ad; }
.pg-row { border-bottom-color: rgba(232, 237, 223, .08); }
@keyframes pg-scene { from { opacity: 0; transform: scale(1.03); } }
@media (max-width: 860px) {
  .pg::before { -webkit-mask-image: linear-gradient(180deg, transparent 10%, #000 60%); mask-image: linear-gradient(180deg, transparent 10%, #000 60%); top: 58px; }
  .pg::after { top: 58px; background: linear-gradient(180deg, rgba(9, 13, 14, .3), rgba(9, 13, 14, .75)); }
}/* Rifinitura: citta luminosa in basso, piu scura dietro il testo, pannello vetro inclinato dietro i dettagli */
.pg::after { background: linear-gradient(90deg, transparent 34%, rgba(9, 13, 14, .32) 52%, rgba(9, 13, 14, .4) 100%),
  linear-gradient(180deg, rgba(9, 13, 14, .85) 0%, rgba(9, 13, 14, .45) 40%, rgba(9, 13, 14, .12) 72%, rgba(9, 13, 14, .05) 100%); }
.pg-info { z-index: 0; }
.pg-info::before { content: ""; position: absolute; inset: 0 0 0 -40px; z-index: -1; pointer-events: none;
  clip-path: polygon(70px 0, 100% 0, 100% 100%, 0 100%);
  background: linear-gradient(100deg, rgba(10, 14, 16, .0) 0%, rgba(10, 14, 16, .55) 14%, rgba(10, 14, 16, .62) 100%);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.pg-info::after { content: ""; position: absolute; top: 0; bottom: 0; left: -40px; width: 70px; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(139, 213, 179, .55) 30%, rgba(139, 213, 179, .15) 75%, transparent);
  clip-path: polygon(68px 0, 70px 0, 2px 100%, 0 100%); }
@media (max-width: 860px) { .pg-info::before { inset: 0; clip-path: none; } .pg-info::after { display: none; } }/* Personaggio in una sola schermata: niente barra di scorrimento */
@media (min-width: 861px) {
  body[data-tab="personaggio"] { overflow: hidden; height: 100vh; }
  .pg { height: calc(100vh - 66px); min-height: 0; overflow: hidden; }
  .pg-stage { position: relative; top: 0; height: 100%; min-height: 0; }
  .pg-info { height: 100%; display: flex; flex-direction: column; padding: clamp(18px, 3.4vh, 40px) 4.5vw clamp(14px, 2.4vh, 28px) 4vw; overflow: hidden; }
  .pg-info .pc-switch { margin-bottom: 1.6vh; }
  .pg-info .pl-eyebrow { margin-bottom: 1.4vh; }
  .pg-name { font-size: clamp(40px, min(5vw, 8.4vh), 92px); }
  .pg-status { margin-top: 1.6vh; }
  .pg-money { margin: 2.4vh 0 0; }
  .pg-money > div { padding-top: 1.4vh; padding-bottom: 1.4vh; }
  .pg-money b { font-size: clamp(26px, min(2.5vw, 4.4vh), 42px); }
  .pg-panels { flex: 1; min-height: 0; overflow: hidden; }
  .pg-panel { height: 100%; }
  .pg-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 34px; }
  .pg-sec { padding-top: 1.6vh; }
  .pg-row { padding: clamp(5px, 1vh, 10px) 0; }
  .pg-bar { padding: clamp(6px, 1.1vh, 11px) 0; grid-template-columns: 82px 1fr 40px; gap: 10px; }
  .pg-sub { margin-top: 1.8vh; }
  .pg-note { margin-top: 1.2vh; }
}
.pg-tabs { display: flex; gap: 4px; margin-top: 2.4vh; border-bottom: 1px solid var(--pl-edge); }
.pg-tabs button { position: relative; padding: 9px 14px 10px; border: 0; background: transparent; color: #8f9b95; font: var(--pl-display); font-size: 17px; letter-spacing: .05em; text-transform: uppercase; cursor: pointer; }
.pg-tabs button i { font: 700 10px var(--mono); font-style: normal; margin-left: 4px; color: var(--accent); }
.pg-tabs button:hover { color: var(--text); }
.pg-tabs button.active { color: var(--text); }
.pg-tabs button.active::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 3px; background: var(--accent); clip-path: polygon(0 0, 100% 0, calc(100% - 4px) 100%, 0 100%); }
.pg-panel[hidden] { display: none !important; }
.pg-panel:not(.pg-cols) { padding-top: 1.8vh; }
.pg-cars { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 0 30px; }
.pg-car { display: flex; align-items: center; gap: 14px; padding: 11px 0; border-bottom: 1px solid rgba(232, 237, 223, .08); }
.pg-car b { display: block; font-size: 14px; } .pg-car small { font-size: 11.5px; color: #8f9b95; }
.pg-plate { flex: none; font: 700 12px var(--mono); letter-spacing: .14em; padding: 4px 9px; border-radius: 4px; color: #0d1412; background: #e9eee4; box-shadow: inset 0 0 0 2px #1d2a2c; }
.pg-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 34px; margin: 0; }
.pg-panel .pg-story { max-height: 100%; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 14; -webkit-box-orient: vertical; }
@media (max-width: 1250px) and (min-width: 861px) { .pg-cols { gap: 0 20px; } .pg-row dt, .pg-row dd { font-size: 12.5px; } .pg { grid-template-columns: minmax(300px, 36%) minmax(0, 1fr); } }
@media (max-width: 860px) { .pg-two { grid-template-columns: 1fr; } .pg-cols { grid-template-columns: 1fr; } }/* Scena piu visibile in basso, testo sempre leggibile */
.pg::after { background: linear-gradient(90deg, transparent 36%, rgba(9, 13, 14, .22) 54%, rgba(9, 13, 14, .3) 100%),
  linear-gradient(180deg, rgba(9, 13, 14, .78) 0%, rgba(9, 13, 14, .4) 36%, rgba(9, 13, 14, .05) 70%, transparent 100%); }
.pg-info::before { background: linear-gradient(180deg, rgba(10, 14, 16, .62) 0%, rgba(10, 14, 16, .5) 45%, rgba(10, 14, 16, .3) 100%); }
.pg-row dd, .pg-row b { white-space: nowrap; }
.pg-row dt { flex: 1 1 auto; min-width: 0; }
.pg-row dd { flex: 0 1 auto; overflow: hidden; text-overflow: ellipsis; }
.pg-row dt, .pg-row dd, .pg-sec h2, .pg-bar { text-shadow: 0 1px 8px rgba(0, 0, 0, .7); }.pg::after { background: linear-gradient(90deg, transparent 38%, rgba(9, 13, 14, .12) 56%, rgba(9, 13, 14, .18) 100%),
  linear-gradient(180deg, rgba(9, 13, 14, .5) 0%, rgba(9, 13, 14, .18) 30%, transparent 60%); }
.pg-info::before { background: linear-gradient(180deg, rgba(10, 14, 16, .42) 0%, rgba(10, 14, 16, .3) 50%, rgba(10, 14, 16, .16) 100%); backdrop-filter: none; -webkit-backdrop-filter: none; }
.pg::before { -webkit-mask-image: linear-gradient(90deg, transparent 4%, rgba(0, 0, 0, .35) 24%, rgba(0, 0, 0, .9) 44%, #000 58%); mask-image: linear-gradient(90deg, transparent 4%, rgba(0, 0, 0, .35) 24%, rgba(0, 0, 0, .9) 44%, #000 58%); }
/* ------------------------------------------------------------ Campanella delle notifiche */
.nt { position: relative; margin-left: auto; }
.portal-page .portal-user { margin-left: 12px; }
.nt-bell { position: relative; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: rgba(10, 14, 16, .6); color: var(--text-2); cursor: pointer; transition: .15s; }
.nt-bell:hover { color: var(--text); border-color: var(--text-2); }
.nt-bell.has-new { color: var(--accent); border-color: rgba(139, 213, 179, .5); }
.nt-bell.has-new .icon { animation: nt-ring 2.6s ease-in-out infinite; transform-origin: 50% 10%; }
@keyframes nt-ring { 0%, 86%, 100% { transform: rotate(0); } 89% { transform: rotate(14deg); } 93% { transform: rotate(-12deg); } 96% { transform: rotate(6deg); } }
.nt-count { position: absolute; top: -6px; right: -6px; min-width: 19px; height: 19px; padding: 0 5px; display: grid; place-items: center; border-radius: 10px; background: var(--danger); color: #1a0f0f; font: 700 10.5px var(--mono); box-shadow: 0 0 0 2px #0d1113; }
.nt-count[hidden] { display: none; }
.nt-panel { position: absolute; right: 0; top: calc(100% + 10px); z-index: 30; width: min(380px, calc(100vw - 24px)); border-radius: 14px; border: 1px solid var(--pl-edge); background: rgba(14, 19, 21, .97); backdrop-filter: blur(16px); box-shadow: 0 24px 60px rgba(0, 0, 0, .6); overflow: hidden; }
.nt-panel[hidden] { display: none; }
.nt-panel header { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--pl-edge); }
.nt-panel header strong { font: 600 10.5px var(--mono); letter-spacing: .22em; color: #aebbb1; }
.nt-list { max-height: 420px; overflow-y: auto; }
.nt-empty { margin: 0; padding: 28px 16px; text-align: center; font-size: 13px; color: var(--muted); }
.nt-item { display: flex; gap: 12px; width: 100%; padding: 12px 14px; border: 0; border-bottom: 1px solid rgba(232, 237, 223, .05); background: transparent; color: var(--text); text-align: left; font: inherit; cursor: pointer; }
.nt-item:hover { background: rgba(139, 213, 179, .06); }
.nt-item.is-new { background: rgba(139, 213, 179, .05); box-shadow: inset 3px 0 0 var(--accent); }
.nt-ic { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--panel-2); color: var(--accent); }
.nt-ic .icon { width: 16px; height: 16px; }
.nt-item.t-regolamento .nt-ic { color: var(--warn); } .nt-item.t-vocale .nt-ic { color: #fff; background: #3c7c62; }
.nt-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.nt-body b { font-size: 13px; }
.nt-body small { font-size: 12px; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.nt-body time { font: 10.5px var(--mono); color: var(--muted); }

/* ------------------------------------------------------------ Cronologia, garage, attivita */
.pg-pager { display: flex; align-items: center; gap: 10px; margin-top: 10px; font: 600 11px var(--mono); color: #8f9b95; }
.pg-pager button { width: 30px; height: 28px; border-radius: 7px; border: 1px solid var(--line); background: rgba(10, 14, 16, .6); color: var(--text); font-size: 18px; line-height: 1; cursor: pointer; }
.pg-pager button:disabled { opacity: .35; cursor: default; }
[data-pager] > [hidden] { display: none !important; }
.pg-tl { list-style: none; margin: 0; padding: 4px 0 0 4px; position: relative; }
.pg-tl::before { content: ""; position: absolute; left: 19px; top: 10px; bottom: 10px; width: 2px; background: linear-gradient(180deg, var(--accent), rgba(139, 213, 179, .1)); }
.pg-tl-item { position: relative; display: flex; gap: 16px; align-items: flex-start; padding: clamp(5px, 1vh, 9px) 0; }
.pg-tl-dot { position: relative; z-index: 1; flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #0f1617; border: 2px solid rgba(139, 213, 179, .5); color: var(--accent); }
.pg-tl-dot .icon { width: 15px; height: 15px; }
.pg-tl-item.is-accent .pg-tl-dot { background: var(--accent); color: #0d1412; border-color: var(--accent); }
.pg-tl-item.is-warn .pg-tl-dot { border-color: var(--warn); color: var(--warn); } .pg-tl-item.is-danger .pg-tl-dot { border-color: var(--danger); color: var(--danger); }
.pg-tl-item > div { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.pg-tl-item time { font: 600 10.5px var(--mono); letter-spacing: .1em; color: #8f9b95; }
.pg-tl-item b { font-size: 14px; }
.pg-tl-item small { font-size: 12.5px; color: #a9b4ad; }
.pg-garage { display: grid !important; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 18px; }
.pg-garage[hidden] { display: none !important; }
.pg-garage > .pg-empty { grid-column: 1 / -1; }
.pg-garage-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-content: start; }
.pg-garage-list + .pg-pager { grid-column: 1; }
.pg-gcar { display: flex; flex-direction: column; border-radius: 12px; overflow: hidden; border: 1px solid var(--pl-edge); background: rgba(10, 14, 16, .55); cursor: pointer; transition: border-color .15s, transform .15s; }
.pg-gcar:hover { border-color: rgba(139, 213, 179, .4); transform: translateY(-2px); }
.pg-gcar.active { border-color: var(--accent); }
.pg-gcar-photo { aspect-ratio: 16 / 9; display: grid; place-items: center; background: radial-gradient(circle at 50% 70%, rgba(139, 213, 179, .15), transparent 70%), #0b1112; overflow: hidden; }
.pg-gcar-photo img { width: 100%; height: 100%; object-fit: cover; }
.pg-gcar-photo img.is-logo { width: 34%; height: auto; object-fit: contain; opacity: .25; }
.pg-gcar-info { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 9px 11px; }
.pg-gcar-info b { flex-basis: 100%; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pg-gcar-info small { font: 600 11px var(--mono); }
.pg-garage-map { min-height: 260px; height: 100%; border-radius: 12px; overflow: hidden; border: 1px solid var(--pl-edge); background: #0b1112; }
.pg-garage-map .leaflet-popup-content-wrapper, .pg-garage-map .leaflet-popup-tip { background: #141b1d; color: var(--text); }
.pg-ok { color: var(--ok); }
.pg-activity { display: grid !important; grid-template-columns: auto minmax(0, 1fr); gap: 34px; align-items: start; }
.pg-activity[hidden] { display: none !important; }
.pg-cal { display: grid; grid-template-columns: auto auto; gap: 8px 10px; }
.pg-cal-days { display: grid; grid-template-rows: repeat(7, 1fr); gap: 5px; font: 600 10px var(--mono); color: #8f9b95; }
.pg-cal-days span { display: flex; align-items: center; height: clamp(22px, 4.2vh, 34px); }
.pg-cal-grid { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, auto); gap: 5px; }
.pg-cal-cell { display: block; width: clamp(22px, 4.2vh, 34px); height: clamp(22px, 4.2vh, 34px); border-radius: 6px; background: rgba(232, 237, 223, .06); border: 1px solid rgba(232, 237, 223, .05); }
.pg-cal-cell.lv-1 { background: rgba(139, 213, 179, .25); } .pg-cal-cell.lv-2 { background: rgba(139, 213, 179, .45); }
.pg-cal-cell.lv-3 { background: rgba(139, 213, 179, .7); } .pg-cal-cell.lv-4 { background: #8bd5b3; box-shadow: 0 0 12px rgba(139, 213, 179, .45); }
.pg-cal-cell.is-today { outline: 2px solid #e9eee4; outline-offset: 1px; }
.pg-cal-cell.is-future { background: transparent; border-style: dashed; }
.pg-cal-legend { grid-column: 2; display: flex; align-items: center; gap: 4px; font: 600 10px var(--mono); color: #8f9b95; }
.pg-cal-legend i.pg-cal-cell { width: 14px; height: 14px; border-radius: 3px; }
.pg-activity-stats { margin: 0; }

/* ------------------------------------------------------------ Regolamento (area giocatore) */
.rl-page { display: grid; grid-template-columns: minmax(280px, 340px) minmax(0, 1fr); gap: 4vw; width: min(1240px, calc(100% - 40px)); margin: 0 auto; padding: 34px 0 60px; }
.rl-index { position: sticky; top: 90px; align-self: start; display: flex; flex-direction: column; gap: 12px; }
.rl-index h1 { margin: 0; font: var(--pl-display); font-size: clamp(40px, 4vw, 64px); }
.rl-index h1 em { display: block; margin-top: 8px; font: inherit; font-size: .45em; color: var(--accent); }
.rl-meta { margin: 0; font: 600 11px var(--mono); letter-spacing: .12em; color: #8f9b95; }
.rl-changes { margin: 0; padding: 10px 12px; border-left: 3px solid var(--warn); background: rgba(217, 178, 111, .08); font-size: 13px; color: var(--text-2); }
.rl-changes b { display: block; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--warn); margin-bottom: 2px; }
.rl-index nav { display: flex; flex-direction: column; border-top: 1px solid var(--pl-edge); }
.rl-index nav a { display: flex; gap: 10px; padding: 8px 2px; border-bottom: 1px solid rgba(232, 237, 223, .06); color: var(--text-2); font-size: 13.5px; }
.rl-index nav a:hover { color: var(--text); }
.rl-index nav a span { font: 700 11px var(--mono); color: var(--accent); }
.rl-confirm { display: flex; flex-direction: column; gap: 12px; padding: 14px; border-radius: 12px; border: 1px solid rgba(139, 213, 179, .35); background: rgba(139, 213, 179, .06); }
.rl-confirm .pl-discord { align-self: flex-start; border: 0; cursor: pointer; }
.rl-ok { display: flex; align-items: center; gap: 8px; margin: 0; padding: 10px 12px; border-radius: 10px; color: var(--ok); background: rgba(139, 213, 179, .08); font-size: 13px; }
.rl-player { padding: 26px 30px; border-radius: 16px; background: var(--pl-glass); border: 1px solid var(--pl-edge); backdrop-filter: blur(14px); }
.rl-alert { max-width: 480px; border: 1px solid rgba(217, 178, 111, .45) !important; }
.rl-alert h2 { margin: 0 0 6px; font: var(--pl-display); font-size: 34px; }
@media (max-width: 1050px) { .pg-garage { grid-template-columns: 1fr; } .pg-garage-map { min-height: 240px; } .pg-activity { grid-template-columns: 1fr; } }
@media (max-width: 860px) { .rl-page { grid-template-columns: 1fr; padding-top: 22px; } .rl-index { position: static; } .rl-player { padding: 18px; } .nt { margin-left: auto; } }
.nt-panel header .link { border: 0; background: none; padding: 0; color: var(--accent); font: 600 12px var(--font); cursor: pointer; }
.nt-panel header .link:hover { text-decoration: underline; }

/* Regolamento pubblico (regole.php) e sezioni nell'area giocatore */
.rules-public .portal-top { gap: 18px; }
.rp-search { flex: 1; max-width: 460px; display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: rgba(10, 14, 16, .7); color: var(--muted); }
.rp-search input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text); font: inherit; font-size: 13.5px; outline: 0; }
.rp-search:focus-within { border-color: var(--accent); }
.rp-area { margin-left: auto; }
.rp-page { display: grid; grid-template-columns: minmax(260px, 320px) minmax(0, 1fr); gap: 4vw; width: min(1240px, calc(100% - 40px)); margin: 0 auto; padding: 34px 0 70px; }
.rp-index { position: sticky; top: 90px; align-self: start; display: flex; flex-direction: column; gap: 14px; }
.rp-index h1 { margin: 0; font: var(--pl-display); font-size: clamp(40px, 4vw, 64px); }
.rp-index h1 em { display: block; margin-top: 8px; font: inherit; font-size: .45em; color: var(--accent); }
.rp-live { display: flex; flex-wrap: wrap; gap: 6px; }
.rp-live span { padding: 4px 9px; border-radius: 6px; font-size: 12px; color: var(--text-2); background: rgba(10, 14, 16, .6); border: 1px solid var(--pl-edge); }
.rp-live b { font: 700 13px var(--mono); color: var(--accent); }
.rp-index nav, .rl-index nav { display: flex; flex-direction: column; border-top: 1px solid var(--pl-edge); }
.rp-index nav a, .rl-index nav a { display: flex; align-items: center; gap: 10px; padding: 9px 2px; border-bottom: 1px solid rgba(232, 237, 223, .06); color: var(--text-2); font-size: 14px; }
.rp-index nav a:hover, .rl-index nav a:hover { color: var(--text); }
.rp-index nav a span, .rl-index nav a span { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; font: 700 11px var(--mono); color: #0d1412; background: var(--accent); }
.rp-empty { margin: 0; font-size: 13px; color: var(--warn); }
.rp-empty[hidden] { display: none; }
.rp-doc { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.rp-sec, .rl-section { padding: 26px 30px; border-radius: 16px; background: var(--pl-glass); border: 1px solid var(--pl-edge); backdrop-filter: blur(14px); scroll-margin-top: 84px; }
.rp-sec.is-filtered, .rl-section.is-filtered { display: none; }
.rp-sec-head { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--pl-edge); }
.rp-sec-num { flex: none; display: grid; place-items: center; width: 54px; height: 54px; border-radius: 14px; font: var(--pl-display); font-size: 30px; color: #0d1412; background: linear-gradient(135deg, var(--accent), #5fae8d); }
.rp-sec-head h2 { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font: var(--pl-display); font-size: 32px; letter-spacing: .01em; color: var(--text); }
.rp-sec-head small { font-size: 12px; color: #8f9b95; }
.rp-sec .rl-title, .rl-section .rl-title { display: none; }
.rl-chip { padding: 3px 9px; border-radius: 6px; font: 700 10px var(--mono); font-style: normal; letter-spacing: .12em; text-transform: uppercase; margin-left: auto; }
.rl-chip.is-warn { color: #1a1406; background: var(--warn); } .rl-chip.is-ok { color: var(--ok); background: rgba(139, 213, 179, .1); border: 1px solid rgba(139, 213, 179, .3); }
.rl-chip.is-muted { color: #8f9b95; border: 1px solid var(--line); }
.rp-sec-head h2 .rl-chip { margin-left: 0; font-family: var(--mono); letter-spacing: .12em; }
.rl-player { display: flex; flex-direction: column; gap: 22px; min-width: 0; padding: 0 !important; background: none !important; border: 0 !important; backdrop-filter: none !important; }
.rl-section.is-pending { border-color: rgba(217, 178, 111, .45); }
.rl-section .rl-confirm { margin-top: 18px; }
.rl-search-box { max-width: none; }
.rl-alert-list { margin: 6px 0 12px; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.rl-alert-list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; padding: 8px 10px; border-radius: 8px; background: rgba(217, 178, 111, .08); font-size: 14px; }
.rl-alert-list b { font: 700 12px var(--mono); color: var(--warn); }
.rl-alert-list small { flex-basis: 100%; font-size: 12px; color: var(--text-2); }
@media (max-width: 860px) { .rp-page { grid-template-columns: 1fr; padding-top: 20px; } .rp-index { position: static; } .rp-sec, .rl-section { padding: 18px; } .rules-public .portal-top { flex-wrap: wrap; height: auto; padding: 10px 14px; } .rp-search { order: 3; flex-basis: 100%; max-width: none; } }
/* Candidature nell'area giocatore */
.cd-pbando { display: flex; flex-direction: column; gap: 16px; padding: 24px 28px; border-radius: 16px; background: var(--pl-glass); border: 1px solid rgba(139, 213, 179, .3); backdrop-filter: blur(14px); }
.cd-pbando > header { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; }
.cd-pbando h2 { margin: 0; font: var(--pl-display); font-size: clamp(30px, 3vw, 44px); }
.cd-pmeta { display: flex; gap: 8px; }
.cd-pmeta span { padding: 6px 12px; border-radius: 8px; font-size: 12.5px; color: var(--text-2); background: rgba(10, 14, 16, .6); border: 1px solid var(--pl-edge); }
.cd-pmeta b { font: 700 14px var(--mono); color: var(--accent); }
.cd-pdesc { margin: 0; font-size: 14.5px; line-height: 1.65; color: #b7c0b9; max-width: 860px; }
.cd-preq { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.cd-preq h3 { margin: 0 0 8px; font: 600 10.5px var(--mono); letter-spacing: .2em; text-transform: uppercase; color: #aebbb1; }
.cd-preq ul { margin: 0; padding-left: 18px; font-size: 13.5px; color: var(--text-2); line-height: 1.7; }
.cd-checks { list-style: none; padding: 0 !important; }
.cd-checks li { display: flex; align-items: center; gap: 8px; }
.cd-checks .icon { width: 16px; height: 16px; flex: none; }
.cd-checks .is-ok { color: var(--text); } .cd-checks .is-ok .icon { color: var(--ok); }
.cd-checks .is-bad { color: var(--text); } .cd-checks .is-bad .icon { color: var(--danger); }
.cd-checks small { color: #8f9b95; }
.cd-apply summary { list-style: none; display: inline-flex; cursor: pointer; }
.cd-apply summary::-webkit-details-marker { display: none; }
.cd-apply[open] summary { opacity: .6; }
.cd-pform { display: flex; flex-direction: column; gap: 14px; margin-top: 16px; padding: 18px; border-radius: 12px; background: rgba(8, 11, 12, .55); border: 1px solid var(--pl-edge); }
.cd-pq span { text-transform: none; letter-spacing: 0; font-size: 13.5px; color: var(--text); font-family: var(--font); }
.cd-pq b { color: var(--accent); }
.cd-pform .btn-primary { align-self: flex-start; }
.cd-mine { display: flex; flex-direction: column; gap: 12px; }
.cd-mapp { padding: 14px 0; border-top: 1px solid var(--pl-edge); }
.cd-mapp-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.cd-mapp-head b { font-size: 14.5px; }
.cd-withdraw { margin-left: auto; }
.cd-withdraw button { border: 0; background: none; color: var(--danger); cursor: pointer; }
.cd-steps { list-style: none; display: flex; margin: 12px 0 0; padding: 0; }
.cd-steps li { flex: 1; position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 11.5px; color: #6f7b76; text-align: center; }
.cd-steps li::before { content: ""; position: absolute; top: 13px; left: -50%; right: 50%; height: 2px; background: var(--line); z-index: 0; }
.cd-steps li:first-child::before { display: none; }
.cd-steps li span { position: relative; z-index: 1; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; font: 700 12px var(--mono); background: #0f1617; border: 2px solid var(--line); }
.cd-steps li.is-done, .cd-steps li.is-now { color: var(--text); }
.cd-steps li.is-done span { background: var(--accent); border-color: var(--accent); color: #0d1412; }
.cd-steps li.is-done::before, .cd-steps li.is-now::before { background: var(--accent); }
.cd-steps li.is-now span { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 0 4px rgba(139, 213, 179, .15); }
.cd-steps li.is-win span { background: var(--ok); border-color: var(--ok); color: #0d1412; }
.cd-steps li.is-lose span { background: #b84d4d; border-color: #b84d4d; color: #fff; }
.is-searching .rp-sec > p, .is-searching .rl-section > p, .is-searching .rl-section > .rl-changes, .is-searching .rp-sec > .rl-changes { display: none; }

/* ---- Ingresso unico: Area giocatore / Area staff ---- */
.gate .pl-hero h1 { font-size: clamp(54px, 6vw, 112px); }
.gate-cards { display: flex; flex-direction: column; gap: 18px; animation: pl-enter .8s ease-out .1s both; }
.gate-card { position: relative; display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 6px 20px; padding: 26px 28px 22px; border: 1px solid var(--pl-edge); background: var(--pl-glass);
  backdrop-filter: blur(10px); color: var(--text); text-decoration: none; overflow: hidden; transition: border-color .18s, transform .18s, background .18s; }
.gate-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--accent); transform: scaleY(.25); transform-origin: top; transition: transform .25s; }
.gate-card:hover { border-color: rgba(139, 213, 179, .55); transform: translateX(6px); background: rgba(139, 213, 179, .06); }
.gate-card:hover::before, .gate-card.is-in::before { transform: scaleY(1); }
.gate-card.is-error { border-color: rgba(224, 127, 127, .55); }
.gate-num { position: absolute; right: 22px; top: 12px; font: var(--pl-display); font-size: 64px; line-height: 1; color: rgba(232, 237, 223, .05); pointer-events: none; }
.gate-ico { grid-row: span 2; width: 64px; height: 64px; display: grid; place-items: center; border: 1px solid #8bd5b355; color: var(--accent); background: rgba(139, 213, 179, .07); }
.gate-ico .icon { width: 28px; height: 28px; }
.gate-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.gate-body small { font-size: 10px; font-weight: 600; letter-spacing: .24em; color: var(--muted); }
.gate-body b { font: var(--pl-display); font-size: 34px; letter-spacing: .02em; line-height: 1.05; }
.gate-text { color: #a7b2aa; font-size: 13.5px; line-height: 1.55; }
.gate-need { display: inline-flex; align-items: center; gap: 7px; margin-top: 6px; font-size: 11.5px; color: var(--muted); }
.gate-need .icon { width: 13px; height: 13px; color: var(--accent); }
.gate-card.is-in .gate-need { color: var(--accent); }
.gate-go { grid-column: 2; justify-self: start; display: inline-flex; align-items: center; gap: 10px; margin-top: 12px; padding: 10px 26px 10px 16px; background: var(--accent); color: #0d1412;
  font: var(--pl-display); font-size: 18px; letter-spacing: .05em; clip-path: polygon(0 0, 100% 0, calc(100% - 12px) 100%, 0 100%); transition: filter .15s; }
.gate-go .icon { width: 18px; height: 18px; }
.gate-card:hover .gate-go { filter: brightness(1.08); }
@media (max-width: 1100px) { .gate.pl-split { grid-template-columns: minmax(0, 1fr); padding-top: 18vh; } }
@media (max-width: 560px) {
  .gate-card { grid-template-columns: minmax(0, 1fr); padding: 22px 18px 18px; }
  .gate-ico { grid-row: auto; width: 48px; height: 48px; }
  .gate-go { grid-column: 1; }
  .gate-body b { font-size: 28px; }
}@media (max-width: 860px) {
  .gate.pl-split { display: block; min-height: 0; padding: 120px 16px 40px; }
  .gate .pl-hero, .gate .pl-lead { max-width: 100%; }
  .gate-cards { margin-top: 30px; }
  .gate-num { font-size: 46px; }
}

/* ------------------------------------------------------------ Telefono: barra delle schede in basso, come un'app */
@media (max-width: 860px) {
  .portal-page { padding-bottom: calc(70px + env(safe-area-inset-bottom)); }
  .portal-page .portal-top { gap: 10px; padding: 0 14px; padding-top: env(safe-area-inset-top); height: calc(58px + env(safe-area-inset-top)); backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(10, 14, 16, .95); }
  .portal-page .portal-wordmark { display: block; width: 78px; }
  .portal-page .portal-nav { position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; margin: 0; gap: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr);
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); background: rgba(9, 13, 14, .9); backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3);
    border-top: 1px solid var(--pl-edge); box-shadow: 0 -18px 40px rgba(0, 0, 0, .45); }
  .portal-page .portal-nav a { position: relative; height: 56px; padding: 0 2px; flex-direction: column; justify-content: center; gap: 4px; border-radius: 12px; font: 600 10px var(--font); letter-spacing: .02em; text-transform: none; color: #8d9992; -webkit-tap-highlight-color: transparent; transition: color .2s, background .2s, transform .15s; }
  .portal-page .portal-nav a:active { transform: scale(.94); }
  .portal-page .portal-nav a .icon { width: 21px; height: 21px; transition: transform .25s cubic-bezier(.2, .9, .3, 1.4); }
  .portal-page .portal-nav a span:not(.tk-unread) { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .portal-page .portal-nav a.active { color: var(--text); background: rgba(139, 213, 179, .1); box-shadow: none; }
  .portal-page .portal-nav a.active .icon { color: var(--accent); transform: translateY(-1px) scale(1.08); filter: drop-shadow(0 0 8px rgba(139, 213, 179, .55)); }
  .portal-page .portal-nav a.active::before { content: ""; position: absolute; top: -7px; left: 50%; width: 26px; height: 3px; margin-left: -13px; border-radius: 0 0 3px 3px; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
  .portal-page .portal-nav .tk-unread { position: absolute; top: 5px; left: calc(50% + 6px); min-width: 16px; height: 16px; padding: 0 4px; margin: 0; display: grid; place-items: center; border-radius: 8px; font-size: 9.5px; line-height: 1; }
  .nt { margin-left: auto; }
  .nt-panel { position: fixed; left: 10px; right: 10px; top: calc(64px + env(safe-area-inset-top)); width: auto; max-height: calc(100dvh - 160px); overflow: auto; }
  .portal-page .tk-portal { height: calc(100dvh - 58px - 70px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); }
  .portal-page .portal-flash { width: calc(100% - 24px); }
}
@media (max-width: 860px) and (prefers-reduced-motion: reduce) { .portal-page .portal-nav a, .portal-page .portal-nav a .icon { transition: none; } }
@media (max-width: 860px) {
  .pg-stage { height: min(64vh, 560px); min-height: 420px; }
  .pg-portrait { bottom: 120px; height: calc(100% - 170px); }
  .pg-shot { bottom: 18px; } .pg-shot-btn { padding: 10px 22px 10px 14px; }
  .pg-name { font-size: clamp(40px, 12vw, 60px); }
  .pg-money { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pg-money > div + div { border-top: 0; }
  .pg-money > div:nth-child(2) { padding-left: 16px; border-left: 1px solid var(--pl-edge); }
  .pg-money > div:nth-child(3) { grid-column: 1 / -1; border-top: 1px solid var(--pl-edge); }
  .pg-tabs { overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; margin-left: -20px; margin-right: -20px; padding: 0 16px;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 16px, #000 calc(100% - 24px), transparent); mask-image: linear-gradient(90deg, transparent, #000 16px, #000 calc(100% - 24px), transparent); }
  .pg-tabs::-webkit-scrollbar { display: none; }
  .pg-tabs button { flex: none; scroll-snap-align: start; font-size: 16px; padding: 10px 12px 11px; }
  .pg-cars { grid-template-columns: 1fr; }
  .pg-row dd { max-width: 62%; }
}
@media (max-width: 860px) {
  .portal-page.rules-public { padding-bottom: 0; }
  .portal-page.rules-public .portal-top { height: auto; padding: calc(10px + env(safe-area-inset-top)) 14px 10px; row-gap: 10px; }
}
