:root{--bg:#050505;--card:rgba(12,12,12,.92);--line:rgba(245,189,39,.28);--gold:#f5bd27;--gold2:#ffe08a;--text:#f8f4ea;--muted:#c8bea9;--red:#a92727;--green:#2cc36b;--stone:#22242a}*{box-sizing:border-box}body{margin:0;background:radial-gradient(circle at 70% 10%,rgba(245,189,39,.12),transparent 25%),#050505;color:var(--text);font-family:Arial,Helvetica,sans-serif;min-height:100vh}button,input,select,textarea{font:inherit}button{border:0;border-radius:14px;padding:12px 16px;font-weight:900;cursor:pointer;background:linear-gradient(135deg,var(--gold),#d99506);color:#15100a;box-shadow:0 10px 25px rgba(0,0,0,.3)}button.secondary{background:#242424;color:#fff;border:1px solid rgba(255,255,255,.14)}button.danger{background:#8b1818;color:#fff}button:disabled{opacity:.45;cursor:not-allowed}input,select,textarea{width:100%;padding:13px 14px;border-radius:14px;border:1px solid rgba(255,255,255,.16);background:#050505;color:#fff;margin:7px 0 12px}label{display:block;text-transform:uppercase;font-size:12px;font-weight:900;letter-spacing:1px;color:#ddd}.header{width:min(1240px,calc(100% - 28px));margin:14px auto;border:1px solid var(--line);border-radius:24px;padding:12px 16px;display:flex;justify-content:space-between;align-items:center;gap:14px;background:rgba(5,5,5,.84);box-shadow:0 15px 60px rgba(0,0,0,.5);position:sticky;top:8px;z-index:10;backdrop-filter:blur(8px)}.brand{display:flex;align-items:center;gap:14px}.brand img{height:56px;max-width:150px;object-fit:contain}.brand h1{font-size:22px;margin:0}.brand small{letter-spacing:2px;color:#d6c6a2;text-transform:uppercase}.nav{display:flex;gap:8px;flex-wrap:wrap;align-items:center}.nav a{color:#fff;text-decoration:none;background:#1f1f1f;border:1px solid rgba(255,255,255,.13);border-radius:12px;padding:10px 12px;font-weight:800}.nav .gold{background:var(--gold);color:#171000}.container{width:min(1180px,calc(100% - 28px));margin:0 auto;padding:20px 0 40px}.hero{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(330px,.8fr);border:1px solid var(--line);border-radius:30px;overflow:hidden;background:var(--card);box-shadow:0 28px 90px rgba(0,0,0,.55)}.hero-cover{min-height:390px;background:#000}.hero-cover img{width:100%;height:100%;object-fit:cover;display:block}.hero-copy{padding:34px;display:flex;flex-direction:column;justify-content:center;background:radial-gradient(circle at 10% 10%,rgba(245,189,39,.13),transparent 30%)}.kicker{color:var(--gold);text-transform:uppercase;font-size:12px;font-weight:900;letter-spacing:3px}.hero h2{font-size:clamp(38px,5vw,68px);line-height:1.02;margin:16px 0}.hero p{font-size:17px;color:#e8dec9;line-height:1.55}.grid{display:grid;gap:18px}.grid-2{grid-template-columns:1fr 1fr}.grid-3{grid-template-columns:repeat(3,1fr)}.card{background:linear-gradient(180deg,rgba(18,18,18,.94),rgba(5,5,5,.98));border:1px solid var(--line);border-radius:24px;padding:22px;box-shadow:0 20px 70px rgba(0,0,0,.35)}.card h3{margin-top:0}.muted{color:var(--muted)}.actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center}.forms{margin-top:20px}.toast{position:fixed;right:18px;bottom:18px;background:#111;border:1px solid var(--line);color:#fff;border-radius:16px;padding:14px 16px;z-index:50;box-shadow:0 18px 40px #000}.hidden{display:none!important}.table{width:100%;border-collapse:collapse}.table th,.table td{border-bottom:1px solid rgba(255,255,255,.1);padding:10px;text-align:left}.badge{display:inline-block;border:1px solid var(--line);border-radius:999px;padding:5px 10px;color:var(--gold);font-weight:900;font-size:12px}.game-shell{display:grid;grid-template-columns:minmax(320px,1fr) 340px;gap:18px}.board-wrap{background:radial-gradient(circle at 50% 20%,rgba(245,189,39,.1),transparent 25%),#101010;border:1px solid var(--line);border-radius:28px;padding:18px}.board-head{display:flex;justify-content:space-between;gap:10px;align-items:center;margin-bottom:12px;flex-wrap:wrap}.board{display:grid;grid-template-columns:repeat(8,1fr);width:min(78vh,100%);max-width:720px;margin:0 auto;border:6px solid #6f4610;border-radius:14px;overflow:hidden;box-shadow:0 25px 70px #000}.sq{aspect-ratio:1;display:flex;align-items:center;justify-content:center;font-size:clamp(28px,6vw,64px);cursor:pointer;position:relative;user-select:none}.sq.light{background:#c5b18b}.sq.dark{background:#4b3a2d}.sq.sel{outline:5px solid var(--gold);z-index:2}.sq.legal:after{content:"";width:28%;height:28%;border-radius:50%;background:rgba(245,189,39,.75);position:absolute}.sq.last{box-shadow:inset 0 0 0 5px rgba(255,255,255,.35)}.piece.white{color:#fff;text-shadow:0 2px 8px #000}.piece.black{color:#111;text-shadow:0 1px 0 #fff,0 2px 8px rgba(0,0,0,.5)}.side{display:flex;flex-direction:column;gap:14px}.moves{height:230px;overflow:auto;background:#050505;border:1px solid rgba(255,255,255,.1);border-radius:14px;padding:12px}.chat{height:170px;overflow:auto;background:#050505;border:1px solid rgba(255,255,255,.1);border-radius:14px;padding:12px}.msg{border-bottom:1px solid rgba(255,255,255,.08);padding:6px 0}.status{font-size:18px;font-weight:900}.promo{position:fixed;inset:0;background:rgba(0,0,0,.72);z-index:60;display:flex;align-items:center;justify-content:center}.promo-card{background:#111;border:1px solid var(--line);border-radius:24px;padding:24px;text-align:center}.promo .piecebtn{font-size:52px;padding:10px 18px;background:#222;color:#fff}.room-row{display:flex;justify-content:space-between;gap:12px;align-items:center;border-bottom:1px solid rgba(255,255,255,.08);padding:10px 0}.room-row:last-child{border-bottom:0}@media(max-width:960px){.header{position:relative;top:auto;flex-direction:column;align-items:flex-start}.hero{grid-template-columns:1fr}.hero-cover{min-height:240px}.grid-2,.grid-3,.game-shell{grid-template-columns:1fr}.board{width:100%}.sq{font-size:clamp(24px,10vw,54px)}.nav{width:100%}.nav a,.nav button{flex:1;text-align:center}.hero-copy{padding:24px}}

/* ==============================
   V11 XADREZ PREMIUM A CAVERNA
   Tabuleiro 2D funcional + tema burger pub
   ============================== */
body{
  background:
    radial-gradient(circle at 50% 0%,rgba(245,189,39,.16),transparent 30%),
    radial-gradient(circle at 12% 18%,rgba(97,52,19,.34),transparent 28%),
    linear-gradient(180deg,#060503,#0a0704 44%,#050505 100%) !important;
}
.header,.card,.board-wrap{
  border-color:rgba(197,144,46,.42) !important;
}
.game-container{width:min(1420px,calc(100% - 28px));}
.game-shell{grid-template-columns:minmax(620px,1fr) 360px;align-items:start;}
.premium-board-stage{
  position:relative;
  overflow:hidden;
  background:
    linear-gradient(180deg,rgba(18,13,8,.92),rgba(4,3,2,.98)),
    url('/xadrez/assets/chessboard-premium-reference.png') center/cover no-repeat !important;
  border:1px solid rgba(197,144,46,.55) !important;
  box-shadow:0 35px 110px rgba(0,0,0,.72), inset 0 0 70px rgba(245,189,39,.07);
}
.premium-board-stage:before{
  content:"";
  position:absolute;
  inset:0;
  background:radial-gradient(circle at 50% 8%,rgba(246,190,83,.16),transparent 28%),rgba(0,0,0,.68);
  pointer-events:none;
}
.premium-board-stage>*{position:relative;z-index:1;}
.chess-board-outer{
  width:min(78vh,100%);
  max-width:760px;
  margin:0 auto;
  padding:18px;
  border-radius:24px;
  background:
    linear-gradient(135deg,rgba(245,189,39,.62),rgba(93,55,17,.92) 24%,rgba(22,16,11,.96) 48%,rgba(225,164,50,.5) 72%,rgba(41,25,11,.98)),
    #24170c;
  box-shadow:0 30px 90px rgba(0,0,0,.74), inset 0 0 0 2px rgba(255,229,149,.22), inset 0 0 32px rgba(0,0,0,.68);
}
.board{
  width:100% !important;
  max-width:none !important;
  margin:0 auto !important;
  border:4px solid rgba(255,216,128,.42) !important;
  border-radius:14px !important;
  overflow:hidden;
  position:relative;
  background:
    linear-gradient(rgba(0,0,0,.1),rgba(0,0,0,.1)),
    url('/xadrez/assets/logo.png') center 51% / 52% auto no-repeat,
    radial-gradient(circle at 50% 50%,rgba(245,189,39,.08),transparent 58%),
    #23170d !important;
  box-shadow:inset 0 0 0 2px rgba(0,0,0,.72),0 16px 40px rgba(0,0,0,.58) !important;
}
.board:before{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(135deg,rgba(255,255,255,.05),transparent 22%,rgba(0,0,0,.1) 63%,rgba(255,220,137,.04));
  pointer-events:none;
  z-index:4;
}
.sq{
  border:0 !important;
  border-radius:0 !important;
  box-shadow:inset 0 0 0 1px rgba(0,0,0,.12);
  transition:filter .12s ease, transform .12s ease, box-shadow .12s ease;
  overflow:hidden;
}
.sq.light{
  background:
    radial-gradient(circle at 30% 22%,rgba(255,255,255,.12),transparent 36%),
    linear-gradient(135deg,rgba(226,204,159,.92),rgba(167,136,88,.92)) !important;
}
.sq.dark{
  background:
    radial-gradient(circle at 60% 24%,rgba(255,222,130,.04),transparent 35%),
    linear-gradient(135deg,rgba(55,38,24,.94),rgba(12,10,8,.94)) !important;
}
.sq:hover{filter:brightness(1.12);}
.sq.mine .xpiece{filter:drop-shadow(0 0 10px rgba(245,189,39,.18));}
.sq.sel{
  outline:0 !important;
  box-shadow:inset 0 0 0 5px rgba(245,189,39,.95),inset 0 0 22px rgba(245,189,39,.35) !important;
  z-index:3;
}
.sq.legal:after{
  content:"";
  width:32%;
  height:32%;
  border-radius:50%;
  background:rgba(245,189,39,.78) !important;
  border:2px solid rgba(255,248,205,.45);
  box-shadow:0 0 18px rgba(245,189,39,.5);
  position:absolute;
  z-index:2;
}
.sq.legal .xpiece:after{
  content:"";
  position:absolute;
  inset:-8px;
  border-radius:50%;
  border:4px solid rgba(245,189,39,.68);
  box-shadow:0 0 22px rgba(245,189,39,.34);
}
.sq.last{
  box-shadow:inset 0 0 0 5px rgba(255,255,255,.35), inset 0 0 24px rgba(245,189,39,.28) !important;
}
.xpiece{
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
  width:78%;
  height:78%;
  border-radius:50%;
  font-size:clamp(18px,4.2vw,45px);
  font-weight:900;
  line-height:1;
  user-select:none;
  transform:translateY(-1px);
}
.xpiece .piece-core{position:relative;z-index:2;filter:drop-shadow(0 3px 3px rgba(0,0,0,.55));}
.xpiece .piece-mini{position:absolute;z-index:3;font-size:.18em;letter-spacing:.04em;font-weight:900;color:#ffdf77;bottom:24%;left:50%;transform:translateX(-50%);text-shadow:0 1px 2px #000;}
.xpiece.white{
  color:#f7d07b;
  background:radial-gradient(circle at 32% 20%,#fff1b8,#c88625 43%,#4b270d 100%);
  border:1px solid rgba(255,238,171,.45);
  box-shadow:inset 0 0 0 2px rgba(0,0,0,.26),0 8px 14px rgba(0,0,0,.38);
  text-shadow:0 2px 2px rgba(0,0,0,.62);
}
.xpiece.black{
  color:#d9a84c;
  background:radial-gradient(circle at 32% 20%,#52504b,#151515 48%,#050505 100%);
  border:1px solid rgba(224,166,66,.35);
  box-shadow:inset 0 0 0 2px rgba(255,255,255,.05),0 8px 14px rgba(0,0,0,.45);
  text-shadow:0 2px 2px #000;
}
.piece-pawn{width:56%;height:56%;font-size:clamp(16px,3.1vw,34px);}
.piece-king{border-radius:42%;font-size:clamp(22px,4.5vw,48px);}
.piece-queen{font-size:clamp(22px,4.8vw,52px);}
.piece-rook{border-radius:28%;}
.piece-bishop{border-radius:38%;}
.piece-knight{border-radius:44%;}
.piece-king .piece-core:after{content:"✦";font-size:.34em;position:absolute;top:-.75em;left:50%;transform:translateX(-50%);color:#ffe08a;text-shadow:0 1px 2px #000;}
.piece-queen .piece-core:after{content:"●";font-size:.25em;position:absolute;top:.08em;left:50%;transform:translateX(-50%);color:#54240a;text-shadow:none;}
.board-help{text-align:center;margin-top:12px;font-size:13px;}
.side .card{background:linear-gradient(180deg,rgba(23,20,17,.94),rgba(7,6,5,.98));}
@media(max-width:1100px){.game-shell{grid-template-columns:1fr}.chess-board-outer{width:min(100%,760px)}}
@media(max-width:620px){.chess-board-outer{padding:9px;border-radius:16px}.xpiece{width:82%;height:82%;}.piece-pawn{width:60%;height:60%;}.board-help{font-size:12px}.sq.legal:after{width:26%;height:26%;}}

/* ==============================
   V12 XADREZ: ARTE REAL EM ASSETS
   Usa o tabuleiro premium gerado e sprites PNG por peça.
   Mantém grid 8x8 e mecânica intactos.
   ============================== */
.premium-board-stage{
  background:linear-gradient(180deg,rgba(11,8,4,.94),rgba(3,2,1,.99)) !important;
}
.chess-board-outer{
  width:min(88vh,100%) !important;
  max-width:920px !important;
  aspect-ratio:1/1;
  margin:0 auto !important;
  padding:7.58% !important;
  border:0 !important;
  border-radius:0 !important;
  background:url('/xadrez/assets/premium/board-empty-full.png') center / 100% 100% no-repeat !important;
  box-shadow:0 32px 100px rgba(0,0,0,.82) !important;
}
.chess-board-outer .board{
  width:100% !important;
  height:100% !important;
  display:grid !important;
  grid-template-columns:repeat(8,1fr) !important;
  border:0 !important;
  border-radius:0 !important;
  background:transparent !important;
  box-shadow:none !important;
  overflow:visible !important;
}
.chess-board-outer .board:before{display:none !important;}
.chess-board-outer .sq{
  background:transparent !important;
  border:0 !important;
  box-shadow:none !important;
  overflow:visible !important;
  padding:0 !important;
  z-index:2;
}
.chess-board-outer .sq.light,
.chess-board-outer .sq.dark{
  background:transparent !important;
}
.chess-board-outer .sq:hover{
  filter:brightness(1.13);
}
.chess-board-outer .sq.sel{
  outline:3px solid rgba(245,189,39,.95) !important;
  outline-offset:-3px;
  background:rgba(245,189,39,.11) !important;
  z-index:6;
}
.chess-board-outer .sq.legal:after{
  content:"";
  position:absolute;
  left:50%;top:50%;
  transform:translate(-50%,-50%);
  width:28%;height:28%;
  border-radius:999px;
  background:radial-gradient(circle,rgba(255,222,118,.92),rgba(245,189,39,.38) 58%,transparent 68%);
  box-shadow:0 0 18px rgba(245,189,39,.65);
  z-index:3;
  pointer-events:none;
}
.chess-board-outer .sq.last{
  background:rgba(255,255,255,.08) !important;
  box-shadow:inset 0 0 0 3px rgba(255,238,174,.45) !important;
}
.xpiece{
  width:100%;height:100%;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  position:relative;
  z-index:5;
  font-size:0 !important;
  text-shadow:none !important;
  transform:translateY(-1%);
  pointer-events:none;
}
.piece-img{
  display:block;
  max-width:102%;
  max-height:104%;
  object-fit:contain;
  filter:drop-shadow(0 8px 7px rgba(0,0,0,.62));
  user-select:none;
  -webkit-user-drag:none;
}
.xpiece.piece-pawn .piece-img{max-width:74%;max-height:76%;transform:translateY(4%);}
.xpiece.piece-rook .piece-img{max-width:96%;max-height:98%;}
.xpiece.piece-knight .piece-img{max-width:95%;max-height:98%;}
.xpiece.piece-bishop .piece-img{max-width:82%;max-height:96%;}
.xpiece.piece-queen .piece-img{max-width:98%;max-height:100%;}
.xpiece.piece-king .piece-img{max-width:99%;max-height:104%;}
.board-help{
  text-align:center;
  margin-top:10px;
  color:#f4e5bd !important;
  text-shadow:0 2px 8px #000;
}
@media(max-width:960px){
  .chess-board-outer{width:100% !important;max-width:100% !important;padding:7.58% !important;}
  .piece-img{filter:drop-shadow(0 5px 5px rgba(0,0,0,.66));}
}

/* ==============================
   V13 XADREZ: PEÇAS OURO E PRATA + NAV PREMIUM
   ============================== */
.header .nav a.delivery.ifood{background:#e42424;color:#fff;border-color:rgba(255,255,255,.08)}
.header .nav a.delivery.sirrus{background:#f5bd27;color:#130d03;border-color:rgba(255,235,160,.25)}
.room-code-badge{font-size:14px;padding:8px 12px;border-color:rgba(245,189,39,.7);background:rgba(245,189,39,.12);color:#ffe28d;letter-spacing:.08em;text-transform:uppercase}
.checkline{display:flex;align-items:center;gap:8px;margin:14px 0;color:#f7e7bd;font-weight:800;text-transform:none;letter-spacing:.02em}.checkline input{width:auto;min-height:auto;accent-color:#f5bd27}
.xpiece,.xpiece.white,.xpiece.black,.piece-pawn,.piece-king,.piece-queen,.piece-rook,.piece-bishop,.piece-knight{
  background:transparent !important;
  border:0 !important;
  border-radius:0 !important;
  box-shadow:none !important;
  text-shadow:none !important;
  color:transparent !important;
}
.piece-img{filter:drop-shadow(0 10px 8px rgba(0,0,0,.66)) drop-shadow(0 0 7px rgba(245,189,39,.15)) !important;}
.xpiece.black .piece-img{filter:drop-shadow(0 10px 8px rgba(0,0,0,.68)) drop-shadow(0 0 8px rgba(255,255,255,.22)) brightness(1.12) contrast(1.08) !important;}
.xpiece.piece-pawn .piece-img{max-width:82% !important;max-height:82% !important;transform:translateY(5%)}
.xpiece.piece-rook .piece-img{max-width:98% !important;max-height:105% !important;}
.xpiece.piece-knight .piece-img{max-width:96% !important;max-height:104% !important;}
.xpiece.piece-bishop .piece-img{max-width:88% !important;max-height:104% !important;}
.xpiece.piece-queen .piece-img{max-width:104% !important;max-height:108% !important;}
.xpiece.piece-king .piece-img{max-width:100% !important;max-height:108% !important;}

/* V14 - relógio e peças Ouro/Prata em assets reais */
.clock-panel{margin-top:10px;display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.clock-panel small{display:block;width:100%;color:#d8c99b;font-size:12px;line-height:1.35}
.clock-pill{border:1px solid rgba(218,165,32,.42);background:linear-gradient(180deg,rgba(10,10,10,.88),rgba(45,31,12,.62));border-radius:14px;padding:8px 12px;min-width:105px;text-align:center;box-shadow:inset 0 0 18px rgba(0,0,0,.5)}
.clock-pill span{display:block;color:#e7d29a;font-size:11px;text-transform:uppercase;letter-spacing:1px;font-weight:900}.clock-pill strong{display:block;font-size:23px;color:#fff5be;line-height:1.05}.clock-pill.active{border-color:#f5bd27;box-shadow:0 0 24px rgba(245,189,39,.22),inset 0 0 18px rgba(0,0,0,.48)}.solo-clock{color:#e7d29a}.solo-clock span{margin-left:8px}
.chess-board-outer .piece-img{max-width:108%;max-height:108%;filter:drop-shadow(0 8px 7px rgba(0,0,0,.62)) drop-shadow(0 0 8px rgba(255,226,143,.14));}
.xpiece.black .piece-img{filter:drop-shadow(0 8px 7px rgba(0,0,0,.62)) drop-shadow(0 0 9px rgba(240,240,240,.20)) brightness(1.08) contrast(1.08);}
.xpiece.piece-pawn .piece-img{max-width:82%;max-height:82%;transform:translateY(5%)}
.xpiece.piece-rook .piece-img{max-width:108%;max-height:112%}.xpiece.piece-knight .piece-img{max-width:110%;max-height:112%}.xpiece.piece-bishop .piece-img{max-width:96%;max-height:110%}.xpiece.piece-queen .piece-img{max-width:112%;max-height:112%}.xpiece.piece-king .piece-img{max-width:112%;max-height:114%}

/* ==============================
   V15 XADREZ: IA por nível, resultado e mobile/tablet
   ============================== */
.piece-name-pop{
  position:absolute;
  left:50%;
  top:-22px;
  transform:translateX(-50%);
  z-index:20;
  padding:4px 8px;
  border-radius:999px;
  background:rgba(8,6,3,.88);
  border:1px solid rgba(245,189,39,.72);
  color:#ffe29a;
  font-size:12px;
  font-weight:900;
  letter-spacing:.2px;
  white-space:nowrap;
  pointer-events:none;
  box-shadow:0 8px 22px rgba(0,0,0,.45),0 0 18px rgba(245,189,39,.12);
  text-shadow:0 1px 2px #000;
}
.result-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
  margin:12px 0 0;
}
.result-card{
  border:1px solid rgba(245,189,39,.42);
  border-radius:16px;
  padding:12px;
  background:linear-gradient(180deg,rgba(24,18,8,.92),rgba(6,5,3,.96));
  box-shadow:0 12px 30px rgba(0,0,0,.35);
}
.result-card span{
  display:block;
  color:#cfc2a6;
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:1.2px;
  font-weight:900;
}
.result-card strong{
  display:block;
  color:#fff;
  font-size:16px;
  line-height:1.2;
  margin-top:4px;
}
.result-card small{color:#ffe08a;font-weight:900;}
.result-card.winner{border-color:rgba(97,255,166,.52);background:linear-gradient(180deg,rgba(28,76,42,.55),rgba(5,18,9,.92));}
.result-card.winner strong{color:#b8ffd2;}
.result-card.loser{border-color:rgba(255,78,78,.45);background:linear-gradient(180deg,rgba(95,24,24,.48),rgba(24,6,6,.92));}
.result-card.loser strong{color:#ffc8c8;}
.result-card.reason{grid-column:auto;}
.result-card.draw{margin-top:12px;border-color:rgba(255,224,128,.55);}
.clock-panel{
  margin-top:10px;
  border:1px solid rgba(245,189,39,.28);
  border-radius:16px;
  padding:10px;
  background:rgba(0,0,0,.32);
}
.clock-panel small{
  display:block;
  margin-top:7px;
  color:#c9bfa8;
  line-height:1.35;
}
.clock-pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:7px 10px;
  border:1px solid rgba(255,255,255,.13);
  border-radius:999px;
  margin:2px 5px 2px 0;
  background:rgba(0,0,0,.35);
}
.clock-pill.active{border-color:rgba(245,189,39,.7);box-shadow:0 0 18px rgba(245,189,39,.16);}
.clock-pill span{font-size:12px;color:#d5c8ac;font-weight:900;}
.clock-pill strong{color:#fff3bb;font-variant-numeric:tabular-nums;}
.solo-clock span{display:inline-block;margin-left:8px;color:#ffdfa0;}
.checkline{display:flex;align-items:center;gap:8px;margin:12px 0;color:#f4e4bd;font-weight:900;}
.checkline input{width:auto;}
@media(max-width:760px){
  .game-container{width:100%;padding:8px 8px 28px;}
  .board-head{gap:10px;}
  .board-head .actions{display:flex;gap:8px;width:100%;}
  .board-head .actions button{flex:1;min-height:42px;}
  .result-grid{grid-template-columns:1fr;}
  .piece-name-pop{top:-18px;font-size:10px;padding:3px 6px;}
  .clock-pill{width:100%;justify-content:space-between;margin:4px 0;}
  .side .card{padding:14px;}
}

/* ==============================
   V16 XADREZ: MODAL FINAL, RESET E IA SOLO
   ============================== */
.match-modal-backdrop{
  position:fixed;
  inset:0;
  z-index:90;
  background:rgba(0,0,0,.72);
  backdrop-filter:blur(7px);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:18px;
}
.match-modal-card{
  width:min(560px,94vw);
  border:1px solid rgba(97,255,166,.45);
  border-radius:28px;
  padding:26px 24px;
  background:linear-gradient(180deg,rgba(18,18,18,.98),rgba(4,6,5,.98));
  box-shadow:0 30px 120px rgba(0,0,0,.8),0 0 70px rgba(72,255,141,.12);
  text-align:center;
}
.match-modal-card img{height:86px;max-width:210px;object-fit:contain;margin-bottom:12px;filter:drop-shadow(0 8px 12px #000)}
.match-modal-card h2{margin:6px 0 8px;color:#94ffb5;font-size:clamp(28px,5vw,42px);letter-spacing:.5px;text-transform:uppercase;line-height:1.05;}
.match-modal-card p{color:#e9dec8;margin:0 0 16px;line-height:1.45;}
.match-result-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:14px 0 18px;text-align:left;}
.match-stat{border:1px solid rgba(245,189,39,.28);border-radius:16px;padding:12px;background:rgba(255,255,255,.035);}
.match-stat span{display:block;color:#d8cbb1;font-size:11px;font-weight:900;text-transform:uppercase;letter-spacing:1.1px;}
.match-stat strong{display:block;color:#fff;font-size:16px;line-height:1.2;margin-top:4px;}
.match-stat small{color:#ffe08a;font-weight:900;}
.match-stat.winner{border-color:rgba(97,255,166,.50);background:rgba(38,119,62,.18);}
.match-stat.winner strong{color:#b8ffd2;}
.match-stat.loser{border-color:rgba(255,78,78,.46);background:rgba(120,30,30,.18);}
.match-stat.loser strong{color:#ffcaca;}
.match-stat.draw{grid-column:1/-1;text-align:center;border-color:rgba(255,224,128,.55);}
.modal-actions{justify-content:center;margin-top:6px;}
.reset-confirm-card{text-align:left;max-width:480px}.reset-confirm-card h3{text-align:center;margin-top:0}.reset-confirm-card .actions{justify-content:center;margin-top:16px}
@media(max-width:620px){.match-modal-backdrop{align-items:flex-end;padding:10px}.match-modal-card{padding:22px 16px;border-radius:24px}.match-result-grid{grid-template-columns:1fr}.modal-actions button{width:100%;}.match-modal-card img{height:68px}.match-modal-card h2{font-size:28px}}

/* ==============================
   V20 XADREZ: AJUSTE FINO DO GRID VISUAL
   Corrige a folga superior e alinha marcação/seleção com a arte do tabuleiro.
   Mantém mecânica, peças e validação intactas.
   ============================== */
.chess-board-outer{
  padding:6.65% 7.58% 8.51% 7.58% !important;
  background-position:center center !important;
  background-size:100% 100% !important;
}
.chess-board-outer .board{
  align-self:stretch !important;
  justify-self:stretch !important;
}
.chess-board-outer .sq{
  position:relative !important;
  isolation:isolate;
}
.chess-board-outer .sq.sel{
  outline:0 !important;
  outline-offset:0 !important;
  background:rgba(245,189,39,.10) !important;
  box-shadow:
    inset 0 0 0 3px rgba(255,235,160,.88),
    inset 0 0 14px rgba(245,189,39,.35) !important;
  z-index:8 !important;
}
.chess-board-outer .sq.last{
  outline:0 !important;
  box-shadow:
    inset 0 0 0 3px rgba(255,255,255,.34),
    inset 0 0 14px rgba(245,189,39,.20) !important;
}
.chess-board-outer .sq.legal:after{
  width:24% !important;
  height:24% !important;
  z-index:6 !important;
}
.piece-name-pop{
  z-index:30 !important;
}
@media(max-width:960px){
  .chess-board-outer{
    padding:6.65% 7.58% 8.51% 7.58% !important;
  }
}
@media(max-width:620px){
  .chess-board-outer{
    padding:6.65% 7.58% 8.51% 7.58% !important;
  }
  .chess-board-outer .sq.sel{
    box-shadow:
      inset 0 0 0 2px rgba(255,235,160,.92),
      inset 0 0 10px rgba(245,189,39,.32) !important;
  }
}

/* V21 - botão de declaração de derrota por falta de chances */
button.warn{background:linear-gradient(135deg,#5b3812,#f5bd27);color:#fff;border:1px solid rgba(245,189,39,.45);text-shadow:0 1px 2px #000;}
button.warn:hover{filter:brightness(1.08)}
.reset-confirm-card .danger{background:#8b1818;color:#fff}

/* ==============================
   V23 XADREZ: GRID REALINHADO + MECÂNICA RESTAURADA
   Base funcional restaurada da V19/V21. Este patch mexe somente na camada visual:
   o grid funcional 8x8 fica exatamente sobre a área útil do PNG premium.
   ============================== */
.chess-board-outer{
  position:relative !important;
  padding:0 !important;
  width:min(88vh,100%) !important;
  max-width:920px !important;
  aspect-ratio:1/1 !important;
  background:url('/xadrez/assets/premium/board-empty-full.png') center / 100% 100% no-repeat !important;
  overflow:visible !important;
}
.chess-board-outer .board{
  position:absolute !important;
  left:8.93% !important;
  top:8.93% !important;
  width:81.66% !important;
  height:81.66% !important;
  display:grid !important;
  grid-template-columns:repeat(8,1fr) !important;
  grid-template-rows:repeat(8,1fr) !important;
  margin:0 !important;
  padding:0 !important;
  border:0 !important;
  background:transparent !important;
  box-shadow:none !important;
  overflow:visible !important;
  transform:none !important;
}
.chess-board-outer .sq{
  width:100% !important;
  height:100% !important;
  min-width:0 !important;
  min-height:0 !important;
  aspect-ratio:auto !important;
  position:relative !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  background:transparent !important;
  border:0 !important;
  outline:0 !important;
  box-shadow:none !important;
  overflow:visible !important;
  padding:0 !important;
  isolation:isolate;
}
.chess-board-outer .sq.light,
.chess-board-outer .sq.dark{
  background:transparent !important;
}
.chess-board-outer .sq.sel{
  outline:0 !important;
  background:rgba(245,189,39,.10) !important;
  box-shadow:
    inset 0 0 0 2px rgba(255,238,174,.92),
    inset 0 0 14px rgba(245,189,39,.32) !important;
  z-index:8 !important;
}
.chess-board-outer .sq.last{
  background:rgba(255,255,255,.055) !important;
  box-shadow:
    inset 0 0 0 2px rgba(255,255,255,.30),
    inset 0 0 12px rgba(245,189,39,.18) !important;
}
.chess-board-outer .sq.legal:after{
  content:"" !important;
  position:absolute !important;
  left:50% !important;
  top:50% !important;
  transform:translate(-50%,-50%) !important;
  width:22% !important;
  height:22% !important;
  border-radius:999px !important;
  background:radial-gradient(circle,rgba(255,229,124,.96),rgba(245,189,39,.42) 58%,transparent 72%) !important;
  border:0 !important;
  box-shadow:0 0 15px rgba(245,189,39,.58) !important;
  z-index:4 !important;
  pointer-events:none !important;
}
.chess-board-outer .xpiece{
  width:100% !important;
  height:100% !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  transform:none !important;
  pointer-events:none !important;
  z-index:6 !important;
}
.chess-board-outer .piece-img{
  display:block !important;
  object-fit:contain !important;
  max-width:92% !important;
  max-height:92% !important;
  transform:none !important;
  filter:drop-shadow(0 7px 6px rgba(0,0,0,.62)) drop-shadow(0 0 7px rgba(255,226,143,.12)) !important;
}
.chess-board-outer .xpiece.black .piece-img{
  filter:drop-shadow(0 7px 6px rgba(0,0,0,.62)) drop-shadow(0 0 9px rgba(240,240,240,.22)) brightness(1.10) contrast(1.08) !important;
}
.chess-board-outer .xpiece.piece-pawn .piece-img{max-width:74% !important;max-height:74% !important;}
.chess-board-outer .xpiece.piece-rook .piece-img{max-width:91% !important;max-height:91% !important;}
.chess-board-outer .xpiece.piece-knight .piece-img{max-width:91% !important;max-height:91% !important;}
.chess-board-outer .xpiece.piece-bishop .piece-img{max-width:86% !important;max-height:90% !important;}
.chess-board-outer .xpiece.piece-queen .piece-img{max-width:94% !important;max-height:94% !important;}
.chess-board-outer .xpiece.piece-king .piece-img{max-width:94% !important;max-height:94% !important;}
.piece-name-pop{z-index:30 !important;}
@media(max-width:960px){
  .chess-board-outer .board{left:8.93% !important;top:8.93% !important;width:81.66% !important;height:81.66% !important;}
}
@media(max-width:620px){
  .chess-board-outer{width:100% !important;max-width:100% !important;}
  .chess-board-outer .board{left:8.93% !important;top:8.93% !important;width:81.66% !important;height:81.66% !important;}
  .chess-board-outer .sq.sel{box-shadow:inset 0 0 0 2px rgba(255,238,174,.92),inset 0 0 10px rgba(245,189,39,.28) !important;}
  .chess-board-outer .piece-img{max-width:90% !important;max-height:90% !important;}
  .chess-board-outer .xpiece.piece-pawn .piece-img{max-width:72% !important;max-height:72% !important;}
}

/* V29 - ajuste fino solicitado: desce apenas as peças Ouro, sem mexer nas Prata. */
.chess-board-outer .xpiece.white .piece-img{transform:translateY(6%) !important;}
.chess-board-outer .xpiece.white.piece-pawn .piece-img{transform:translateY(10%) !important;}
.chess-board-outer .xpiece.black .piece-img{transform:translateY(0) !important;}


/* V34 - Página inicial do Xadrez no mesmo padrão visual da Batalha Naval.
   Somente tela inicial/hero; não altera tabuleiro, regras ou sala de jogo. */
@media (min-width: 961px){
  body:not(.mobile-game) .container{width:min(1080px, calc(100vw - 36px));}
  body:not(.mobile-game) .hero{
    max-width:1000px;
    margin:18px auto 0;
    display:grid;
    grid-template-columns:minmax(0,1.65fr) minmax(300px,.78fr);
    align-items:stretch;
    border-radius:22px;
    overflow:hidden;
    min-height:0;
  }
  body:not(.mobile-game) .hero-cover{
    min-height:0;
    display:flex;
    align-items:stretch;
    background:#020202;
  }
  body:not(.mobile-game) .hero-cover img{
    width:100%;
    height:auto;
    aspect-ratio:1672/941;
    min-height:0;
    max-height:none;
    object-fit:cover;
    object-position:center;
  }
  body:not(.mobile-game) .hero-copy{
    padding:clamp(22px,2.6vw,34px);
    gap:8px;
    justify-content:center;
  }
  body:not(.mobile-game) .hero-copy img{max-width:190px;max-height:96px;object-fit:contain;}
  body:not(.mobile-game) .hero-copy .kicker{
    max-width:290px;
    font-size:.68rem;
    letter-spacing:.18em;
    line-height:1.45;
    margin:0 0 4px;
  }
  body:not(.mobile-game) .hero-copy h2{
    font-size:clamp(1.7rem,2.85vw,2.65rem);
    line-height:1.05;
    margin:0;
    max-width:340px;
  }
  body:not(.mobile-game) .hero-copy p{
    font-size:clamp(.92rem,1.05vw,1.06rem);
    max-width:370px;
    line-height:1.55;
  }
}

/* V35 - Padronização visual com Batalha Naval + cor vermelho/rosé no Xadrez.
   Só afeta menu/hero/formulários; o tabuleiro e a mecânica não são alterados. */
:root{--gold:#f5bd27;--line:rgba(255,92,128,.34);--redrose:#e64666;--redrose2:#ff6f91;}
@media (min-width: 961px){
  body:not(.mobile-game){background:radial-gradient(circle at 72% 12%,rgba(230,70,102,.12),transparent 27%),linear-gradient(135deg,#070405,#100609 58%,#050505) !important;}
  body:not(.mobile-game) .header{max-width:1080px;border-color:rgba(255,92,128,.38);background:rgba(8,5,7,.88);}
  body:not(.mobile-game) .nav a,body:not(.mobile-game) .nav button.secondary{border-color:rgba(255,92,128,.28);}
  body:not(.mobile-game) .nav .delivery.ifood{background:linear-gradient(135deg,#e21d2e,#ff4f74)!important;color:#fff!important;}
  body:not(.mobile-game) .nav .delivery.sirrus{background:linear-gradient(135deg,#f5bd27,#ffe37a)!important;color:#120b03!important;}
  body:not(.mobile-game) .hero{max-width:1000px;grid-template-columns:minmax(0,1.65fr) minmax(300px,.78fr);border-color:rgba(255,92,128,.32);}
  body:not(.mobile-game) .hero-cover{min-height:0;display:flex;align-items:stretch;background:#050304;}
  body:not(.mobile-game) .hero-cover img{aspect-ratio:1672/941;width:100%;height:auto;max-height:none;object-fit:cover;object-position:center;}
  body:not(.mobile-game) .hero-copy{background:radial-gradient(circle at 10% 10%,rgba(255,92,128,.14),transparent 32%),rgba(8,5,7,.78);}
  body:not(.mobile-game) .hero-copy h2{font-size:clamp(1.75rem,2.85vw,2.65rem);max-width:330px;}
  body:not(.mobile-game) .hero-copy .kicker{color:#ff8ba3;}
  body:not(.mobile-game) .card{border-color:rgba(255,92,128,.30);}
  body:not(.mobile-game) button:not(.secondary):not(.danger){background:linear-gradient(135deg,var(--redrose2),var(--redrose));color:#fff;}
  body:not(.mobile-game) .forms{max-width:1000px;margin:20px auto 0;grid-template-columns:1fr 1fr;align-items:stretch;}
  body:not(.mobile-game) .forms .card{min-height:230px;padding:22px;}
}
@media (max-width: 960px){
  .hero-copy h2{font-size:clamp(2rem,10vw,3.2rem);}
  .forms{margin-top:14px;}
}

/* V41 - Home Xadrez padronizada no modelo Batalha Naval/Truco, com tema vermelho-rosé.
   Apenas tela inicial/menu; não altera tabuleiro nem regras. */
:root{--rose:#ef476f;--rose2:#ff6f91;--roseLine:rgba(239,71,111,.45)}
body:not(.mobile-game){background:radial-gradient(circle at 75% 8%,rgba(239,71,111,.18),transparent 32%),radial-gradient(circle at 8% 18%,rgba(245,189,39,.08),transparent 24%),#050303 !important;}
body:not(.mobile-game) .header{border-color:var(--roseLine) !important;background:rgba(8,4,6,.90) !important;}
body:not(.mobile-game) .nav a,body:not(.mobile-game) .nav button.secondary{border-color:rgba(239,71,111,.32);}
body:not(.mobile-game) .nav .gold,body:not(.mobile-game) button:not(.secondary):not(.danger){background:linear-gradient(135deg,var(--rose),var(--rose2)) !important;color:#fff !important;}
body:not(.mobile-game) .container{width:min(1180px,calc(100% - 28px));}
body:not(.mobile-game) .hero{max-width:1000px;margin:18px auto 0;grid-template-columns:minmax(0,1.72fr) minmax(300px,.82fr);border-radius:22px;border-color:var(--roseLine);background:linear-gradient(145deg,rgba(17,5,9,.95),rgba(4,3,3,.98));box-shadow:0 28px 90px rgba(0,0,0,.55),0 0 32px rgba(239,71,111,.12);}
body:not(.mobile-game) .hero-cover{min-height:0;aspect-ratio:16/9;background:#000;}
body:not(.mobile-game) .hero-cover img{width:100%;height:100%;object-fit:cover;object-position:center;}
body:not(.mobile-game) .hero-copy{padding:clamp(22px,2.4vw,34px);background:radial-gradient(circle at 14% 12%,rgba(239,71,111,.16),transparent 34%),rgba(5,4,4,.78);}
body:not(.mobile-game) .hero-copy img{max-width:160px;object-fit:contain;margin-bottom:10px;}
body:not(.mobile-game) .kicker{color:#ff8aa5;font-size:12px;letter-spacing:2.5px;}
body:not(.mobile-game) .hero h2{font-size:clamp(2rem,3.05vw,3.2rem);line-height:1.05;margin:12px 0;}
body:not(.mobile-game) .hero p{font-size:clamp(.95rem,1.08vw,1.08rem);line-height:1.55;max-width:350px;}
body:not(.mobile-game) .forms{max-width:1000px;margin:20px auto 0;}
body:not(.mobile-game) .forms .card{min-height:230px;border-color:var(--roseLine);}
body:not(.mobile-game) .card{border-color:var(--roseLine);}
@media(max-width:960px){.hero{grid-template-columns:1fr}.hero-cover{aspect-ratio:16/9;min-height:0}.forms{grid-template-columns:1fr}}

/* V41 — PADRÃO MILIMÉTRICO BATALHA NAVAL PARA HOME/MENU DO XADREZ
   Escopo: somente tela inicial, cards de acesso e menu superior. Não altera tabuleiro, regras ou sala. */
@media (min-width: 961px){
  body:not(.mobile-game){
    --homeW:1080px;
    --heroW:1000px;
    --heroImgRatio:1672/941;
    --heroCols:minmax(0,1.65fr) minmax(300px,.78fr);
    --navFont:.9rem;
    --navPadY:11px;
    --navPadX:15px;
    --navRadius:15px;
    background:radial-gradient(circle at 72% 12%,rgba(239,71,111,.18),transparent 31%),#050303 !important;
  }
  body:not(.mobile-game) .header{
    width:min(var(--homeW),calc(100vw - 36px));
    max-width:var(--homeW);
    min-height:76px;
    margin:14px auto 18px;
    padding:12px 16px;
    border-radius:22px;
    border-color:rgba(239,71,111,.42)!important;
    background:rgba(8,4,6,.90)!important;
    box-shadow:0 18px 60px rgba(0,0,0,.42), inset 0 0 0 1px rgba(255,255,255,.03);
  }
  body:not(.mobile-game) .brand{min-width:250px;gap:13px;}
  body:not(.mobile-game) .brand img{width:118px;height:52px;max-width:118px;object-fit:contain;}
  body:not(.mobile-game) .brand h1{font-size:clamp(1.02rem,1.35vw,1.28rem);line-height:1;margin:0;}
  body:not(.mobile-game) .brand small{font-size:.78rem;letter-spacing:.22em;color:#d5c9b1;}
  body:not(.mobile-game) .nav{gap:10px;align-items:center;justify-content:flex-end;}
  body:not(.mobile-game) .nav a,
  body:not(.mobile-game) .nav button,
  body:not(.mobile-game) .nav .badge{
    min-height:42px;
    border-radius:var(--navRadius);
    padding:var(--navPadY) var(--navPadX);
    font-size:var(--navFont);
    font-weight:900;
    line-height:1;
    white-space:nowrap;
  }
  body:not(.mobile-game) .nav .delivery.ifood{background:linear-gradient(135deg,#ef3e57,#ff6580)!important;color:#fff!important;border-color:rgba(239,71,111,.48)!important;}
  body:not(.mobile-game) .nav .delivery.sirrus{background:linear-gradient(135deg,#f5bd27,#ffe07a)!important;color:#160e00!important;border-color:rgba(245,189,39,.54)!important;}
  body:not(.mobile-game) .container{width:min(var(--homeW),calc(100vw - 36px));margin:0 auto;padding:0 0 40px;}
  body:not(.mobile-game) .container > .hero{
    width:100%;
    max-width:var(--heroW);
    margin:18px auto 0;
    display:grid;
    grid-template-columns:var(--heroCols)!important;
    align-items:stretch;
    min-height:0;
    border-radius:22px;
    overflow:hidden;
    border-color:rgba(239,71,111,.42)!important;
    background:linear-gradient(145deg,rgba(17,5,9,.95),rgba(4,3,3,.98));
  }
  body:not(.mobile-game) .container > .hero .hero-cover{
    min-height:0!important;
    height:auto!important;
    aspect-ratio:var(--heroImgRatio)!important;
    background:#050304;
  }
  body:not(.mobile-game) .container > .hero .hero-cover img{
    width:100%!important;
    height:100%!important;
    min-height:0!important;
    max-height:none!important;
    aspect-ratio:auto!important;
    object-fit:cover!important;
    object-position:center!important;
    display:block;
  }
  body:not(.mobile-game) .container > .hero .hero-copy{
    padding:clamp(22px,2.6vw,34px)!important;
    display:flex;
    flex-direction:column;
    justify-content:center;
    gap:8px;
    background:radial-gradient(circle at 10% 10%,rgba(239,71,111,.14),transparent 32%),rgba(8,5,7,.78);
  }
  body:not(.mobile-game) .container > .hero .hero-copy img{width:64px!important;height:48px!important;max-width:64px!important;max-height:48px!important;object-fit:contain;margin:0 0 8px!important;}
  body:not(.mobile-game) .container > .hero .kicker{max-width:290px;margin:0 0 4px;font-size:.68rem!important;letter-spacing:.18em;line-height:1.45;color:#ff8aa5!important;}
  body:not(.mobile-game) .container > .hero h2{max-width:340px!important;font-size:clamp(1.7rem,2.85vw,2.65rem)!important;line-height:1.05!important;letter-spacing:.01em;margin:0!important;}
  body:not(.mobile-game) .container > .hero p{max-width:300px!important;margin:8px 0 0!important;font-size:.98rem!important;line-height:1.42!important;}
  body:not(.mobile-game) .forms{
    width:100%;
    max-width:var(--heroW);
    margin:20px auto 0!important;
    display:grid;
    grid-template-columns:1fr 1fr!important;
    gap:18px;
    align-items:stretch;
  }
  body:not(.mobile-game) .forms .card{min-height:230px;padding:20px;border-radius:24px;border-color:rgba(239,71,111,.38)!important;}
  body:not(.mobile-game) .forms .card h3{font-size:1.12rem;margin:0 0 8px;}
  body:not(.mobile-game) .forms label{font-size:.82rem;}
  body:not(.mobile-game) .forms input,body:not(.mobile-game) .forms select{min-height:48px;padding:13px 14px;border-radius:16px;}
  body:not(.mobile-game) .forms button{min-height:42px;border-radius:15px;padding:11px 15px;font-size:.9rem;}
  body:not(.mobile-game) .container > h2{max-width:var(--heroW);margin:18px auto 12px;font-size:1.35rem;}
  body:not(.mobile-game) .container > .grid.grid-3{max-width:var(--heroW);margin:0 auto;gap:16px;}
  body:not(.mobile-game) .container > .grid.grid-3 .card{min-height:132px;padding:18px;border-radius:22px;}
  body:not(.mobile-game) .container > .grid.grid-3 .card h3{font-size:1.08rem;margin:0 0 8px;}
  body:not(.mobile-game) .container > .grid.grid-3 .card p{font-size:.94rem;line-height:1.42;}
}
@media (max-width:960px){
  .header{position:relative;top:auto;width:min(100% - 24px,1080px);margin:10px auto 12px;}
  .container > .hero{grid-template-columns:1fr!important;}
  .container > .hero .hero-cover{aspect-ratio:16/9!important;}
  .forms{grid-template-columns:1fr!important;}
}
