@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@500;600;700;800;900&family=DM+Sans:wght@400;500;600;700;800&display=swap');
:root{color-scheme:dark;--dark:#0c0913;--panel:#17111f;--violet:#da25ff;--violet2:#8b22dd;--yellow:#ffe421;--gray:#a8a1ad;--white:#f6f3f8}
*{box-sizing:border-box}html{height:100%;scroll-behavior:smooth}body{margin:0;min-height:100vh;min-height:100dvh;background:radial-gradient(ellipse at 50% 15%,#281435 0%,#100c18 45%,#08080d 100%);color:var(--white);font-family:'DM Sans',Arial,sans-serif;overflow-x:hidden}button,select{font:inherit}button{cursor:pointer;-webkit-tap-highlight-color:transparent}button:focus-visible,select:focus-visible{outline:3px solid var(--yellow);outline-offset:3px}button:disabled{cursor:not-allowed;opacity:.32}.ambient{pointer-events:none;position:fixed;border-radius:50%;filter:blur(90px);opacity:.20;z-index:0}.ambient-one{background:#9f08f3;width:560px;height:560px;left:-290px;top:120px}.ambient-two{background:#c826e7;width:500px;height:500px;right:-240px;bottom:-200px}.site{position:relative;z-index:1;max-width:1510px;margin:0 auto;padding:20px clamp(12px,3vw,42px) 14px}.topbar{display:flex;justify-content:space-between;align-items:center;gap:15px;margin-bottom:20px}.brand{display:flex;align-items:center;gap:10px}.brand-mark{width:63px;height:63px;display:grid;place-items:center;border-radius:13px;background:linear-gradient(160deg,#2e2035,#0b0810);border:1px solid #6b2c80;box-shadow:0 0 22px #a200cc35;overflow:hidden}.brand-mark img{width:96%;height:96%;object-fit:contain}.brand-text{display:flex;flex-direction:column;line-height:1}.brand-kicker{font-size:9px;font-weight:800;letter-spacing:3.5px;color:#d99de8;margin-bottom:4px}.brand-text strong{font-family:'Barlow Condensed','Arial Narrow',Impact,sans-serif;font-size:36px;font-weight:900;letter-spacing:.8px;line-height:.86}.brand-text strong em{color:var(--yellow);font-style:normal}.brand-sub{font-size:10px;letter-spacing:2.7px;font-weight:800;color:#d8b6e3;margin-top:7px}.top-actions{display:flex;align-items:center;gap:9px}.circle-button,.header-button{height:42px;background:linear-gradient(#21172b,#17101d);color:#f8f2fa;border:1px solid #52365c;border-radius:10px;font-weight:900;transition:background .16s,border .16s,transform .12s}.circle-button{width:44px;font-size:27px}.circle-button.muted{color:#756d7c}.header-button{padding:0 16px;font-size:11px;letter-spacing:1px}.header-button span{color:var(--yellow);margin-left:8px}.circle-button:hover,.header-button:hover,.utility-button:hover:not(:disabled){background:#34223e;border-color:var(--violet)}.circle-button:active,.header-button:active,.primary-button:active,.utility-button:active{transform:scale(.97)}
.arena{display:grid;grid-template-columns:minmax(0,1fr) minmax(265px,310px);gap:25px;align-items:start}.board-column{min-width:0}.live-ribbon{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:12px;min-height:45px;padding:7px 14px;border:1px solid #5f2a75;border-bottom:0;border-radius:11px 11px 0 0;background:linear-gradient(90deg,#291231,#1a0f26 52%,#291332);font-family:'Barlow Condensed',Impact,sans-serif;letter-spacing:1px}.live-left{font-size:13px;color:#ecb9fa;display:flex;align-items:center;gap:8px;font-weight:800;white-space:nowrap}.live-dot{width:8px;height:8px;background:#adff20;border-radius:50%;box-shadow:0 0 8px #adff20}.live-main{text-align:center;font-size:15px;font-weight:900;color:var(--yellow);text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.turn-badge{font-size:13px;color:#9d90a7;font-weight:800;white-space:nowrap}.board-mount{position:relative;width:100%;aspect-ratio:1/1;overflow:hidden;background:#121015;box-shadow:0 25px 50px #0009,0 0 35px #c500ea33;border:1px solid #602777;touch-action:manipulation;user-select:none}.board-art{display:block;position:absolute;inset:0;width:100%;height:100%;object-fit:fill;pointer-events:none;user-select:none}.board-grid{position:absolute;left:15.80%;top:16.43%;width:68.65%;height:70.23%;display:grid;grid-template-columns:repeat(8,1fr);grid-template-rows:repeat(8,1fr);isolation:isolate}.sq{min-width:0;min-height:0;width:100%;height:100%;border:none;border-radius:0;background:transparent;margin:0;padding:0;position:relative;display:flex;align-items:center;justify-content:center;transition:background .16s;user-select:none;touch-action:manipulation}.sq:not(.dark){pointer-events:none}.sq.dark{cursor:pointer}.sq.dark:focus-visible{outline:2px solid #ffe31a;outline-offset:-3px;z-index:10}.sq.selectable::before{content:"";position:absolute;inset:7%;border:2px dashed #efd32e6d;border-radius:50%;pointer-events:none}.sq.selected{background:#f1df1234;box-shadow:inset 0 0 0 3px #ffde2c,inset 0 0 17px #fbce25;z-index:3}.sq.available::after{content:"";position:absolute;width:29%;aspect-ratio:1;border-radius:50%;background:#e2fb27be;box-shadow:0 0 0 7px #d9ff2028,0 0 18px #d8fa00b8;pointer-events:none}.sq.available:has(.token)::after{width:76%;background:none;box-shadow:inset 0 0 0 3px var(--yellow),0 0 18px #fcdd41}.sq.last-from{background:#f2dc2320}.sq.last-to{box-shadow:inset 0 0 0 2px #fae54888}.sq.hinted{background:#15dcf944;box-shadow:inset 0 0 0 2px #36eaff,0 0 12px #26e1ff}.token{position:relative;z-index:1;display:block;width:91%;height:91%;object-fit:contain;filter:drop-shadow(0 2px 2px #090609ca) drop-shadow(0 0 2px #ffffff91);pointer-events:none;user-select:none}.sq.selected .token{filter:drop-shadow(0 0 6px #ffe025) drop-shadow(0 0 4px #ffdd16);transform:scale(1.04)}.sq.newly-moved .token{animation:arrive .24s ease-out both}.sq.capturable .token{filter:drop-shadow(0 0 5px #ff4b4b)}@keyframes arrive{from{opacity:.7;transform:scale(.68)}to{opacity:1;transform:scale(1)}}.king-symbol{position:absolute;z-index:2;top:4%;right:8%;line-height:1;font-size:clamp(12px,2.5vw,31px);font-family:Arial,sans-serif;color:#ffdf13;-webkit-text-stroke:1px #111;filter:drop-shadow(0 0 2px #f7cd06);pointer-events:none}.king-symbol.white-king{color:#f7d500}.sq.selected .king-symbol{transform:scale(1.1)}

/* Licked Lego game-piece visibility: every occupied square receives a precise
   neon-red circular rim, switching to electric green only while selected.
   This is a live overlay, preserving the approved black/white face textures. */
.sq.has-piece::before{
  content:"";
  position:absolute;
  inset:4.8%;
  border:clamp(2px,0.27vw,3.5px) solid #ff2345;
  border-radius:50%;
  box-shadow:0 0 3px 1px #ff284f,0 0 8px #ff183bbb,0 0 13px #f00a4a66,
             inset 0 0 5px #ff284f88;
  z-index:3;
  pointer-events:none;
  transition:border-color .13s ease,box-shadow .13s ease;
}
.sq.has-piece.selected::before{
  border-color:#39ff72;
  box-shadow:0 0 3px 1px #3bff75,0 0 9px #16fa59,0 0 16px #19ff70bd,
             inset 0 0 6px #22ff6c88;
}
.sq.selected{background:#26ff6624;box-shadow:inset 0 0 0 2px #36ff7280,inset 0 0 16px #17fa6070}
.sq.selected .token{filter:drop-shadow(0 0 5px #23ff6e) drop-shadow(0 0 4px #18eb59);transform:scale(1.015)}
.toast{position:absolute;left:50%;top:48%;transform:translate(-50%,-50%) scale(.94);z-index:40;max-width:75%;padding:10px 19px;background:linear-gradient(135deg,#281032ed,#1b122de9);border:2px solid #ffe733;box-shadow:0 10px 34px #000e,0 0 25px #c020eb9e;border-radius:10px;color:#fff;font-family:'Barlow Condensed',Impact,sans-serif;font-size:clamp(14px,3vw,30px);font-weight:900;letter-spacing:1.4px;text-align:center;opacity:0;pointer-events:none;transition:opacity .18s,transform .18s}.toast.visible{opacity:1;transform:translate(-50%,-50%) scale(1)}.board-bottom{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:12px 4px;font-family:'Barlow Condensed',Impact,sans-serif;color:#ac96b5;font-size:12px;font-weight:800;letter-spacing:1px}.legend-dot{display:inline-block;width:6px;height:6px;background:var(--yellow);border-radius:50%;margin-right:5px}
.sidebar{display:flex;flex-direction:column;gap:17px}.panel{background:linear-gradient(145deg,#24142aee,#14101bec 75%);border:1px solid #4a2a53;border-radius:15px;padding:18px 16px;box-shadow:0 15px 35px #0005}.panel-eyebrow{font-family:'Barlow Condensed',Impact,sans-serif;font-size:13px;letter-spacing:2px;font-weight:800;color:#c6a6d1;margin-bottom:17px;display:flex;justify-content:space-between}.mini-cross{color:var(--violet);letter-spacing:5px}.fighter{display:flex;align-items:center;gap:8px;padding:12px 9px;border-radius:11px;border:1px solid #443248;background:#100d17;transition:border-color .18s,box-shadow .18s}.fighter.active{border-color:#e9c819;box-shadow:0 0 0 1px #ba9111,0 0 18px #edbc0a35}.fighter img{width:58px;height:58px;object-fit:contain;flex-shrink:0}.fighter-text{display:flex;flex-direction:column;gap:3px;min-width:0;flex:1}.fighter-text small{color:#98909e;font-family:'Barlow Condensed',Impact,sans-serif;font-weight:700;letter-spacing:1.5px;font-size:11px}.fighter-text strong{font-family:'Barlow Condensed',Impact,sans-serif;font-size:24px;line-height:1;font-weight:900;letter-spacing:.2px}.fighter-text span{font-size:11px;color:#ac9caf;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.fighter-count{font-family:'Barlow Condensed',Impact,sans-serif;font-size:28px;font-weight:900;color:#fff}.fighter-black .fighter-count{color:#ffdc21}.versus{height:24px;display:flex;gap:9px;align-items:center;justify-content:center;color:#da28ff;font-family:'Barlow Condensed',Impact,sans-serif;font-size:14px;font-weight:900}.versus span{width:29%;height:1px;background:linear-gradient(90deg,transparent,#733481,transparent)}.status-message{margin-top:15px;min-height:51px;padding:12px;border:1px solid #5b2871;border-radius:9px;background:#37134362;color:#eabef3;font-size:12px;line-height:1.55;text-align:center;font-weight:600}.controls-panel .panel-eyebrow{margin-bottom:14px}.primary-button{display:block;width:100%;min-height:51px;border:1px solid #ffea66;border-radius:10px;background:linear-gradient(180deg,#ffef41,#e8b80a);color:#18101a;font-family:'Barlow Condensed',Impact,sans-serif;font-size:21px;font-weight:900;letter-spacing:1.1px;box-shadow:0 5px 0 #8f5f05,0 10px 25px #0007;transition:filter .14s,transform .14s}.primary-button:hover{filter:brightness(1.09)}.primary-button:active{box-shadow:0 2px 0 #8f5f05;transform:translateY(3px)}.control-row{display:flex;gap:10px;margin-top:16px}.utility-button{display:flex;align-items:center;justify-content:center;gap:7px;flex:1;min-height:47px;background:#26182e;border:1px solid #674375;border-radius:9px;color:#f2e8f4;font-family:'Barlow Condensed',Impact,sans-serif;font-size:24px;font-weight:900;transition:background .16s}.utility-button span{font-size:15px;letter-spacing:.7px}.message-detail{display:flex;gap:8px;align-items:start;padding-top:18px;font-size:11px;line-height:1.55;color:#a69aaa}.small-star{color:var(--yellow);font-size:16px}.rules-hint{border:1px dashed #5f3b68;border-radius:11px;padding:14px 16px;background:#120d17bf}.rules-hint strong{font-family:'Barlow Condensed',Impact,sans-serif;letter-spacing:1px;color:#f0da63}.rules-hint p{font-size:12px;line-height:1.7;color:#b1a3b6;margin:6px 0 0}.footline{margin-top:18px;padding:13px 2px;border-top:1px solid #3a253f;display:flex;justify-content:space-between;gap:10px;font-family:'Barlow Condensed',Impact,sans-serif;letter-spacing:1.5px;font-size:11px;font-weight:700;color:#847189}
.overlay{position:fixed;inset:0;z-index:999;display:none;align-items:center;justify-content:center;padding:14px;background:#07070cc7;backdrop-filter:blur(6px);overflow:auto}.overlay.visible{display:flex}.dialog{width:min(100%,480px);max-height:calc(100dvh - 28px);overflow:auto;border-radius:19px;border:1px solid #a933ce;background:linear-gradient(147deg,#2a1834,#120e1d 68%);padding:28px 30px 26px;box-shadow:0 0 0 4px #a829d01a,0 20px 95px #000f,0 0 90px #a41ec340;position:relative}.dialog::before{position:absolute;content:"";height:4px;top:0;left:10%;right:10%;background:var(--yellow);box-shadow:0 0 20px #ffe82b}.dialog-eyebrow{font-family:'Barlow Condensed',Impact,sans-serif;color:#df9af1;font-size:13px;letter-spacing:3px;font-weight:900;margin-bottom:9px}.dialog h1,.dialog h2{font-family:'Barlow Condensed',Impact,sans-serif;font-size:clamp(39px,8vw,57px);line-height:.91;font-weight:900;margin:0 0 12px;text-transform:uppercase}.dialog h1 span,.dialog h2 span{color:var(--yellow)}.dialog p{line-height:1.6;color:#c2b3c6;font-size:13px}.dialog .subhead{margin:6px 0 19px}.mode-choice{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:15px 0 18px}.mode-option{background:#1b1424;border:2px solid #53325f;border-radius:11px;text-align:left;padding:14px 12px;color:#f6e7fa;min-height:104px;display:flex;flex-direction:column;align-items:start;gap:5px}.mode-option.selected{border-color:var(--yellow);box-shadow:0 0 18px #ffde2233;background:#37272c}.mode-option strong{font-family:'Barlow Condensed',Impact,sans-serif;font-size:21px;font-weight:900}.mode-option span{color:#beaac2;font-size:11px;line-height:1.35}.mode-icon{font-size:22px;line-height:1;color:var(--yellow)}.difficulty-wrap{display:flex;justify-content:space-between;align-items:center;gap:20px;background:#181220;border:1px solid #51335f;border-radius:9px;padding:12px 15px;margin-bottom:20px}.difficulty-wrap label{font-family:'Barlow Condensed',Impact,sans-serif;font-weight:900;letter-spacing:1px}.difficulty-wrap select{background:#291734;color:#fff;border:1px solid #814092;padding:7px 10px;border-radius:7px;font-weight:700;min-width:118px}.dialog .primary-button{margin-top:8px}.secondary-button{margin-top:16px;width:100%;min-height:40px;background:#0000;border:1px solid #62476c;border-radius:8px;color:#d5bfdc;font-size:12px;letter-spacing:1px;font-weight:800}.secondary-button:hover{border-color:var(--violet);background:#38233e}.rules-text{padding-left:21px;color:#decde2;line-height:1.7;font-size:13px}.rules-text li{margin-bottom:8px}.winner-emblem{display:block;margin:9px auto 11px;width:114px;height:114px;object-fit:contain;filter:drop-shadow(0 0 13px #e9cb3482)}.result-title{text-align:center}.result-title h2{font-size:50px}.result-title p{margin:0 0 21px}.result-kicker{text-align:center;color:var(--yellow);letter-spacing:2px;font-weight:900;font-family:'Barlow Condensed',Impact,sans-serif}.dialog::-webkit-scrollbar{width:7px}.dialog::-webkit-scrollbar-thumb{background:#54315f;border-radius:4px}
@media(max-width:1040px){.arena{grid-template-columns:minmax(0,1fr) 265px;gap:14px}.panel{padding:14px 12px}.sidebar{gap:12px}.fighter img{width:44px;height:44px}.fighter-text strong{font-size:22px}.fighter-count{font-size:25px}.live-left{font-size:11px}.live-main{font-size:12px}}
@media(max-width:780px){.site{padding:12px 10px}.topbar{margin-bottom:12px}.arena{grid-template-columns:1fr;gap:13px}.sidebar{display:grid;grid-template-columns:1fr 1fr;gap:10px}.rules-hint{grid-column:1/-1}.panel{padding:12px}.board-column{width:min(100%,700px);margin:auto}.fighter img{width:48px;height:48px}.panel-eyebrow{margin-bottom:11px}.status-message{margin-top:8px}.controls-panel .primary-button{margin:4px 0 0}.controls-panel .control-row{margin-top:16px}.board-bottom{font-size:10px}.brand-mark{width:49px;height:49px}.brand-text strong{font-size:29px}.brand-kicker{font-size:8px;letter-spacing:2px}.brand-sub{font-size:8px}.header-button{padding:0 10px}.top-actions{gap:5px}.circle-button{width:39px;height:39px}.header-button{height:39px}}
@media(max-width:530px){.sidebar{display:flex}.battle-panel{display:grid;grid-template-columns:1fr 1fr;gap:8px}.battle-panel .panel-eyebrow,.battle-panel .status-message{grid-column:1/-1;margin:0}.battle-panel .panel-eyebrow{margin-bottom:3px}.battle-panel .versus{display:none}.fighter{min-width:0;padding:8px 5px;gap:3px}.fighter img{width:39px;height:39px}.fighter-text small{font-size:9px}.fighter-text strong{font-size:19px}.fighter-text span{font-size:10px}.fighter-count{font-size:23px}.status-message{min-height:0;padding:10px}.controls-panel .panel-eyebrow{margin-bottom:7px}.controls-panel .control-row{margin-top:12px}.rules-hint{display:none}.live-ribbon{grid-template-columns:auto minmax(0,1fr);padding:6px 8px;gap:5px;min-height:37px}.live-left{font-size:10px}.live-main{font-size:11px;text-align:right}.turn-badge{display:none}.brand-mark{width:44px;height:44px}.brand-text strong{font-size:25px}.brand-sub{font-size:8px;letter-spacing:1px}.brand-kicker{letter-spacing:1px;font-size:7px}.header-button{font-size:0;width:36px;padding:0}.header-button span{font-size:16px;margin:0}.circle-button{width:36px;height:36px;font-size:21px}.board-bottom #boardFoot{display:none}.footline span:last-child{display:none}.dialog{padding:25px 18px}.mode-option{padding:12px 9px}.mode-option strong{font-size:19px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.01ms!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}
/* Keep player names readable on narrow mobile screens. */
@media(max-width:530px){.battle-panel .fighter-count{display:none}.battle-panel .fighter-text strong{font-size:17px}.battle-panel .fighter img{width:41px;height:41px}}
