/* IL PORTALE (13/10): lo stesso aspetto della pagina d'accesso della vista (crepuscolo, montagne, pietra scura e oro).
   Lo sfondo e le cornici li mette portale.js; qui solo lo stile. Niente aspetti di ArcheAge prima del login */
:root { --fondo: #070b10; --testo: #ecf1f3; --tenue: #a7b6bf; --oro: #e7c57c; --oro-scuro: #9a7a3c; --linea: rgba(231, 197, 124, 0.35); --avviso: #ff8a66; --bene: #8fe0a8; --campo: rgba(4, 8, 12, 0.6); --pannello: rgba(10, 15, 21, 0.92); }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; color: var(--testo); font: 15px/1.45 system-ui, sans-serif; }
html { background: var(--fondo); }
body { background: transparent; min-height: 100vh; display: grid; place-items: center; padding: 24px 16px 56px; overflow-x: hidden; position: relative; }
a { color: var(--oro); }
.cielo { position: fixed; inset: 0; z-index: -3; background: linear-gradient(#060a14 0%, #10203a 38%, #2a3b5a 58%, #6b5468 74%, #c98a5e 88%, #e9b071 100%); }
.stelle { position: fixed; inset: 0 0 35% 0; z-index: -3; background-image:
    radial-gradient(1.2px 1.2px at 12% 18%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 27% 8%, #dfe8ff 50%, transparent 51%),
    radial-gradient(1.4px 1.4px at 41% 22%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 55% 12%, #fff 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 68% 26%, #e8f0ff 50%, transparent 51%), radial-gradient(1px 1px at 79% 6%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 90% 19%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 6% 33%, #cfe0ff 50%, transparent 51%),
    radial-gradient(1px 1px at 34% 36%, #fff 50%, transparent 51%), radial-gradient(1.2px 1.2px at 61% 40%, #fff 50%, transparent 51%);
  animation: brilla 6s ease-in-out infinite alternate; }
@keyframes brilla { from { opacity: 0.55; } to { opacity: 1; } }
.luna { position: fixed; z-index: -3; right: 14%; top: 11%; width: 64px; height: 64px; border-radius: 50%;
  background: radial-gradient(circle at 38% 36%, #fffbea, #f1e3bd 55%, #d6c494); box-shadow: 0 0 40px 12px rgba(255, 240, 200, 0.22), 0 0 120px 40px rgba(255, 220, 170, 0.08); }
.monti { position: fixed; left: 0; right: 0; bottom: 0; z-index: -2; width: 100%; height: 62vh; }
.nebbia { position: fixed; left: -50%; right: -50%; bottom: 6vh; height: 26vh; z-index: -2; pointer-events: none;
  background: radial-gradient(ellipse 40% 50% at 30% 60%, rgba(210, 190, 200, 0.18), transparent 70%), radial-gradient(ellipse 35% 45% at 75% 50%, rgba(200, 185, 210, 0.14), transparent 70%);
  animation: scorre 40s linear infinite alternate; }
@keyframes scorre { from { transform: translateX(-6%); } to { transform: translateX(6%); } }
@media (prefers-reduced-motion: reduce) { .stelle, .nebbia { animation: none; } }

/* il riquadro di pietra con la cornice d'oro */
.riquadro { position: relative; width: min(440px, 100%); padding: 34px 30px 24px; background: linear-gradient(rgba(14, 20, 27, 0.9), rgba(8, 12, 17, 0.93));
  border: 1px solid var(--linea); box-shadow: 0 0 0 4px rgba(8, 12, 17, 0.75), 0 0 0 5px rgba(231, 197, 124, 0.18), 0 24px 60px rgba(0, 0, 0, 0.6); backdrop-filter: blur(3px); }
.riquadro.largo { width: min(920px, 100%); }
.riquadro .angolo { position: absolute; width: 38px; height: 38px; pointer-events: none; }
.riquadro .angolo svg { width: 100%; height: 100%; display: block; }
.a1 { left: -9px; top: -9px; } .a2 { right: -9px; top: -9px; transform: scaleX(-1); } .a3 { left: -9px; bottom: -9px; transform: scaleY(-1); } .a4 { right: -9px; bottom: -9px; transform: scale(-1); }
h1, h2 { margin: 0; text-align: center; font: 600 27px/1.15 "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif; letter-spacing: 0.04em;
  background: linear-gradient(#fff3d1, var(--oro) 55%, var(--oro-scuro)); -webkit-background-clip: text; background-clip: text; color: transparent; }
h2 { font-size: 19px; text-align: left; margin: 18px 0 8px; }
.sotto { margin: 6px 0 20px; text-align: center; color: var(--tenue); font-size: 13.5px; }
.tenue { color: var(--tenue); }
.fregio { display: block; width: 70%; height: 10px; margin: 0 auto 20px; }
label { display: grid; gap: 6px; margin-bottom: 14px; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--tenue); }
input, select { font: inherit; font-size: 15px; letter-spacing: normal; text-transform: none; padding: 10px 12px; border-radius: 2px; border: 1px solid rgba(231, 197, 124, 0.25);
  background: var(--campo); color: var(--testo); box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.6); }
input[type=color] { padding: 2px; height: 40px; }
input:focus-visible, select:focus-visible { outline: none; border-color: var(--oro); box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.6), 0 0 0 2px rgba(231, 197, 124, 0.25); }
button, .bottone { display: block; width: 100%; margin-top: 10px; font: 600 16px/1 "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif; letter-spacing: 0.06em; padding: 13px; border-radius: 2px; cursor: pointer; text-align: center; text-decoration: none;
  color: #2e1d08; border: 1px solid #f5dc9c; background: linear-gradient(#f6dc9a, #d9ae5c 55%, #b8893d); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 2px 0 #6e5023, 0 6px 16px rgba(0, 0, 0, 0.45);
  text-shadow: 0 1px 0 rgba(255, 240, 200, 0.6); transition: filter 0.15s, transform 0.05s; }
button.secondario, .bottone.secondario { color: var(--testo); text-shadow: none; border-color: rgba(231, 197, 124, 0.35); background: linear-gradient(rgba(40, 50, 62, 0.95), rgba(20, 27, 35, 0.95)); box-shadow: 0 2px 0 #05080b, 0 6px 16px rgba(0, 0, 0, 0.35); }
button.grande { font-size: 22px; padding: 18px; }
button:hover:not(:disabled), .bottone:hover { filter: brightness(1.08); }
button:active:not(:disabled) { transform: translateY(1px); }
button:focus-visible, .bottone:focus-visible { outline: 2px solid #fff3d1; outline-offset: 3px; }
button:disabled { filter: grayscale(0.4) brightness(0.8); cursor: default; }
.errore { min-height: 1.4em; margin: 12px 0 0; color: var(--avviso); font-size: 13px; text-align: center; }
.esito { min-height: 1.4em; margin: 12px 0 0; font-size: 13px; text-align: center; color: var(--tenue); }
.piccolo { margin-top: 14px; padding-top: 14px; border-top: 1px solid rgba(231, 197, 124, 0.15); font-size: 12px; color: var(--tenue); text-align: center; }
.indietro { display: inline-block; margin-bottom: 8px; font-size: 13px; color: var(--tenue); text-decoration: none; }
.indietro:hover { color: var(--oro); }
/* la firma in fondo a ogni pagina */
.firma { position: fixed; left: 0; right: 0; bottom: 0; padding: 10px 16px; text-align: center; font-size: 12px; color: rgba(236, 241, 243, 0.75); background: linear-gradient(transparent, rgba(4, 7, 10, 0.85)); }
.firma a { color: var(--oro); text-decoration: none; font-weight: 600; }
/* il caricamento dei dati del gioco (precarica.js) nel menu */
#precarica { margin-top: 16px; display: flex; flex-direction: column; gap: 6px; padding: 12px; border: 1px solid rgba(231, 197, 124, 0.2); background: rgba(4, 8, 12, 0.55); }
#precarica .pc-fondo { height: 8px; border-radius: 4px; background: rgba(255,255,255,0.12); overflow: hidden; }
#precarica .pc-barra { height: 100%; width: 0; background: linear-gradient(90deg, #d9ae5c, #f6dc9a); transition: width 0.3s; }
#precarica .pc-testo { font-size: 12px; color: var(--tenue); }
#precarica > button { display: none; }
#precarica > span.tenue { font-size: 12.5px; }
@media (max-width: 420px) { .riquadro { padding: 30px 18px 20px; } h1 { font-size: 23px; } }
