/* Pars Gammon web client — board/scoreboard/checker/dice/FX CSS ported from
   ParsGammon-Prototype-v0.4.html (luxury theme), plus lobby/match-end styles
   appended at the end of this file. */
:root{
        --bg:#04060c; --panel:#0c1322; --ink:#f3e9d2; --ink-soft:#b3a077;
        --line:#7a5f24; --gold:#c9a227; --gold-bright:#ecca5f;
        --btn-ink:#241a02;
        --wood-1:#3a2312; --wood-2:#241407; --wood-3:#150b03;
        --copper:#c97e46;
        color-scheme: dark;
      }
      *{ box-sizing:border-box; }
      html,body{ margin:0; padding:0; }
      body{
        background:
          radial-gradient(120% 60% at 50% -10%, rgba(46,74,120,.35), rgba(0,0,0,0) 60%),
          radial-gradient(100% 50% at 50% 115%, rgba(120,84,20,.16), rgba(0,0,0,0) 60%),
          linear-gradient(180deg, #070b16, var(--bg));
        color:var(--ink);
        font-family:"Segoe UI", system-ui, -apple-system, Tahoma, Arial, sans-serif;
        -webkit-tap-highlight-color: transparent;
      }
      #app{ max-width:640px; margin:0 auto; padding:10px 10px 26px; }

      /* ---------- header ---------- */
      header{
        display:flex; align-items:center; justify-content:space-between; gap:10px;
        padding:4px 2px 10px;
      }
      header h1{
        margin:0; font-size:24px; letter-spacing:.6px; font-weight:800;
        color:var(--ink); text-shadow:0 2px 10px rgba(0,0,0,.6);
      }
      header h1 .gold{ color:var(--gold-bright); text-shadow:0 0 12px rgba(236,202,95,.45); }
      #langBtn{
        min-height:40px; min-width:76px; padding:8px 14px;
        border-radius:999px; border:1.5px solid var(--gold);
        background:rgba(201,162,39,.08); color:var(--ink); font-size:15px; font-weight:700;
        cursor:pointer;
      }
      #langBtn:active{ transform:scale(.97); }

      /* ---------- scoreboard ---------- */
      #scoreboard{
        display:flex; gap:8px; align-items:stretch; margin-bottom:10px;
      }
      .pcard{
        flex:1; border-radius:12px; padding:8px 10px; min-width:0;
        background:linear-gradient(160deg, #111c33, #0a101f);
        border:1.5px solid rgba(201,162,39,.45);
        box-shadow:inset 0 1px 0 rgba(255,230,170,.14), 0 4px 12px rgba(0,0,0,.45);
      }
      .pcard.active{ border-color:var(--gold-bright); box-shadow:0 0 0 2px rgba(236,202,95,.35), 0 0 16px rgba(236,202,95,.22); }
      .pcard .who{ display:flex; align-items:center; gap:5px; font-weight:800; font-size:13.5px; white-space:nowrap; }
      .dot{ width:16px; height:16px; border-radius:50%; flex:none; }
            .dot.w{ background:radial-gradient(circle at 35% 28%, #ffffff, #e8f4ff 55%, #a9cdf2); border:1.5px solid #cfe2f5; box-shadow:0 0 6px rgba(190,225,255,.6); }
            .dot.b{ background:radial-gradient(circle at 35% 28%, #fff6c4, #f2c230 55%, #9a6d0a); border:1.5px solid #ffe98a; box-shadow:0 0 6px rgba(255,205,70,.55); }
      .pcard .big{ font-size:30px; font-weight:800; line-height:1.05; color:var(--gold-bright); }
      .pcard .sub{ font-size:12px; color:var(--ink-soft); display:flex; gap:10px; flex-wrap:wrap; }
      .pcard .sub b{ color:var(--ink); }
      .midcard{
        width:104px; flex:none; border-radius:12px; padding:8px 6px; text-align:center;
        background:linear-gradient(160deg, #111c33, #0a101f);
        border:1.5px solid rgba(201,162,39,.45);
        box-shadow:inset 0 1px 0 rgba(255,230,170,.14), 0 4px 12px rgba(0,0,0,.45);
        display:flex; flex-direction:column; justify-content:center; gap:2px;
      }
      .midcard .mt{ font-size:12px; color:var(--ink-soft); font-weight:700; }
      .midcard .mv{ font-size:15px; font-weight:800; color:var(--ink); }
      #crawfordBadge{
        display:none; margin-top:4px; font-size:11px; font-weight:800; color:#ffd9a8;
        background:#6e2110; border:1px solid rgba(236,202,95,.55); border-radius:999px; padding:3px 6px;
      }
      #crawfordBadge.on{ display:block; }

      /* ---------- board ---------- */
      #boardWrap{ direction:ltr; position:relative; }
            #board{
        display:flex; gap:0; border-radius:22px; padding:12px; position:relative;
        background:
          radial-gradient(circle, #ffc2cf 0 20%, #c01434 46%, #5c0518 76%, rgba(92,5,24,0) 100%) 7px 7px / 15px 15px no-repeat,
          radial-gradient(circle, #c9ffe2 0 20%, #0f9d63 46%, #04502f 76%, rgba(4,80,47,0) 100%) calc(100% - 7px) 7px / 15px 15px no-repeat,
          radial-gradient(circle, #c9ffe2 0 20%, #0f9d63 46%, #04502f 76%, rgba(4,80,47,0) 100%) 7px calc(100% - 7px) / 15px 15px no-repeat,
          radial-gradient(circle, #ffc2cf 0 20%, #c01434 46%, #5c0518 76%, rgba(92,5,24,0) 100%) calc(100% - 7px) calc(100% - 7px) / 15px 15px no-repeat,
          repeating-linear-gradient(93deg, rgba(0,0,0,.14) 0 3px, rgba(0,0,0,0) 3px 11px),
          repeating-linear-gradient(88deg, rgba(255,205,140,.05) 0 2px, rgba(0,0,0,0) 2px 8px),
          linear-gradient(145deg, var(--wood-1), var(--wood-2) 55%, var(--wood-3));
        box-shadow:
          0 18px 40px rgba(0,0,0,.75),
          0 0 0 2px rgba(217,140,80,.70),
          0 0 0 4px rgba(16,8,1,.9),
          0 0 52px rgba(255,190,80,.34),
          inset 0 2px 0 rgba(255,230,180,.55),
          inset 0 0 0 1px rgba(255,205,140,.35),
          inset 0 0 0 2px rgba(232,190,90,.16),
          inset 0 -6px 14px rgba(0,0,0,.55);
      }
            #pointsArea{
        flex:1; display:grid; position:relative;
        grid-template-columns:repeat(6, 1fr) .58fr repeat(6, 1fr);
        grid-template-rows:1fr 1fr;
        aspect-ratio: 12.58 / 9.7;
        background:
          radial-gradient(90% 72% at 50% 50%, rgba(110,155,205,.38), rgba(0,0,0,0) 62%),
          radial-gradient(56% 44% at 50% 46%, rgba(255,205,100,.17), rgba(0,0,0,0) 70%),
          linear-gradient(180deg, #0c1e38, #060d1a 55%, #03060e);
        border-radius:10px; overflow:hidden;
        box-shadow:
          inset 0 0 0 1px rgba(255,220,130,.55),
          inset 0 0 0 3px rgba(8,5,2,.85),
          inset 0 0 0 4px rgba(217,164,65,.40),
          inset 0 0 0 6px rgba(201,126,70,.35),
          inset 0 0 34px rgba(0,0,0,.75), inset 0 14px 26px rgba(0,0,0,.55), inset 0 -14px 26px rgba(0,0,0,.55);
      }
            #pointsArea::before{
        content:""; position:absolute; left:50%; top:50%; z-index:0;
        width:58%; aspect-ratio:1; transform:translate(-50%,-50%);
        background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cg fill='none' stroke='%23d9b45b' stroke-width='2.2'%3E%3Ccircle cx='50' cy='50' r='48'/%3E%3Ccircle cx='50' cy='50' r='44' stroke-width='1'/%3E%3Ccircle cx='50' cy='50' r='33' stroke-width='1.2'/%3E%3Cellipse cx='50' cy='25' rx='6.5' ry='12.5' transform='rotate(0 50 50)'/%3E%3Cellipse cx='50' cy='25' rx='6.5' ry='12.5' transform='rotate(45 50 50)'/%3E%3Cellipse cx='50' cy='25' rx='6.5' ry='12.5' transform='rotate(90 50 50)'/%3E%3Cellipse cx='50' cy='25' rx='6.5' ry='12.5' transform='rotate(135 50 50)'/%3E%3Cellipse cx='50' cy='25' rx='6.5' ry='12.5' transform='rotate(180 50 50)'/%3E%3Cellipse cx='50' cy='25' rx='6.5' ry='12.5' transform='rotate(225 50 50)'/%3E%3Cellipse cx='50' cy='25' rx='6.5' ry='12.5' transform='rotate(270 50 50)'/%3E%3Cellipse cx='50' cy='25' rx='6.5' ry='12.5' transform='rotate(315 50 50)'/%3E%3Cellipse cx='50' cy='11.5' rx='3' ry='6' transform='rotate(0.0 50 50)'/%3E%3Cellipse cx='50' cy='11.5' rx='3' ry='6' transform='rotate(22.5 50 50)'/%3E%3Cellipse cx='50' cy='11.5' rx='3' ry='6' transform='rotate(45.0 50 50)'/%3E%3Cellipse cx='50' cy='11.5' rx='3' ry='6' transform='rotate(67.5 50 50)'/%3E%3Cellipse cx='50' cy='11.5' rx='3' ry='6' transform='rotate(90.0 50 50)'/%3E%3Cellipse cx='50' cy='11.5' rx='3' ry='6' transform='rotate(112.5 50 50)'/%3E%3Cellipse cx='50' cy='11.5' rx='3' ry='6' transform='rotate(135.0 50 50)'/%3E%3Cellipse cx='50' cy='11.5' rx='3' ry='6' transform='rotate(157.5 50 50)'/%3E%3Cellipse cx='50' cy='11.5' rx='3' ry='6' transform='rotate(180.0 50 50)'/%3E%3Cellipse cx='50' cy='11.5' rx='3' ry='6' transform='rotate(202.5 50 50)'/%3E%3Cellipse cx='50' cy='11.5' rx='3' ry='6' transform='rotate(225.0 50 50)'/%3E%3Cellipse cx='50' cy='11.5' rx='3' ry='6' transform='rotate(247.5 50 50)'/%3E%3Cellipse cx='50' cy='11.5' rx='3' ry='6' transform='rotate(270.0 50 50)'/%3E%3Cellipse cx='50' cy='11.5' rx='3' ry='6' transform='rotate(292.5 50 50)'/%3E%3Cellipse cx='50' cy='11.5' rx='3' ry='6' transform='rotate(315.0 50 50)'/%3E%3Cellipse cx='50' cy='11.5' rx='3' ry='6' transform='rotate(337.5 50 50)'/%3E%3C/g%3E%3Cg fill='%23ecca5f'%3E%3Ccircle cx='77.7' cy='61.5' r='1.7'/%3E%3Ccircle cx='61.5' cy='77.7' r='1.7'/%3E%3Ccircle cx='38.5' cy='77.7' r='1.7'/%3E%3Ccircle cx='22.3' cy='61.5' r='1.7'/%3E%3Ccircle cx='22.3' cy='38.5' r='1.7'/%3E%3Ccircle cx='38.5' cy='22.3' r='1.7'/%3E%3Ccircle cx='61.5' cy='22.3' r='1.7'/%3E%3Ccircle cx='77.7' cy='38.5' r='1.7'/%3E%3C/g%3E%3Ccircle cx='50' cy='50' r='6' fill='%23c9a227'/%3E%3Cpath d='M50.0,45.4 L51.3,48.7 L54.6,50.0 L51.3,51.3 L50.0,54.6 L48.7,51.3 L45.4,50.0 L48.7,48.7 Z' fill='%23ffe98a'/%3E%3C/svg%3E") center / contain no-repeat;
        opacity:.20; pointer-events:none;
        filter:drop-shadow(0 0 14px rgba(236,202,95,.45));
      }
      #pointsArea::after{
        content:""; position:absolute; inset:9px; z-index:0;
        background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 300'%3E%3Cdefs%3E%3Cg id='c' fill='none' stroke='%23d9b45b' stroke-width='2'%3E%3Cpath d='M4 52 C4 20 20 4 52 4 C36 8 26 16 24 30 C34 24 46 26 54 34'/%3E%3Cpath d='M4 52 C12 38 24 28 40 24'/%3E%3Ccircle cx='17' cy='17' r='3.2'/%3E%3Ccircle cx='58' cy='10' r='1.8' fill='%23d9b45b' stroke='none'/%3E%3Ccircle cx='10' cy='58' r='1.8' fill='%23d9b45b' stroke='none'/%3E%3C/g%3E%3C/defs%3E%3Cuse href='%23c'/%3E%3Cuse href='%23c' transform='translate(400 0) scale(-1 1)'/%3E%3Cuse href='%23c' transform='translate(0 300) scale(1 -1)'/%3E%3Cuse href='%23c' transform='translate(400 300) scale(-1 -1)'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
        opacity:.16; pointer-events:none;
      }
      .point{ position:relative; }
      .tri{
        position:absolute; left:6%; right:6%; height:100%;
      }
      .point.top .tri{ top:0; clip-path:polygon(0 0, 100% 0, 50% 100%); }
      .point.bot .tri{ bottom:0; clip-path:polygon(0 100%, 100% 100%, 50% 0); }
      .tri{ filter:drop-shadow(0 2px 1.5px rgba(0,0,0,.5)) drop-shadow(0 0 3px rgba(255,215,110,.30)); }
      .point.bot .tri{ filter:drop-shadow(0 -2px 1.5px rgba(0,0,0,.5)) drop-shadow(0 0 3px rgba(255,215,110,.30)); }
      .tri.light{
        background:
          radial-gradient(circle at 24% 22%, rgba(255,255,255,.95) 0 1.1px, rgba(255,255,255,0) 2.1px),
          radial-gradient(circle at 57% 47%, rgba(255,246,200,.9) 0 1px, rgba(255,246,200,0) 2px),
          radial-gradient(circle at 79% 16%, rgba(255,255,255,.85) 0 1px, rgba(255,255,255,0) 1.9px),
          radial-gradient(circle at 38% 71%, rgba(255,240,190,.8) 0 1px, rgba(255,240,190,0) 1.9px),
          radial-gradient(circle at 86% 64%, rgba(255,255,255,.8) 0 .9px, rgba(255,255,255,0) 1.8px),
          radial-gradient(circle at 12% 55%, rgba(255,250,220,.75) 0 .9px, rgba(255,250,220,0) 1.7px),
          linear-gradient(115deg, rgba(255,255,255,0) 30%, rgba(255,255,255,.34) 46%, rgba(255,255,255,.07) 55%, rgba(255,255,255,0) 68%),
          repeating-linear-gradient(90deg, rgba(255,255,255,.07) 0 2px, rgba(0,0,0,0) 2px 6px),
          linear-gradient(180deg, #fdf3c8, #f0d78c 42%, #d8b25c 78%, #bb903d);
        background-size:34px 46px, 42px 58px, 29px 39px, 47px 63px, 38px 51px, 31px 43px, 100% 100%, auto, auto;
      }
            .point.bot .tri.light{
        background:
          radial-gradient(circle at 24% 22%, rgba(255,255,255,.95) 0 1.1px, rgba(255,255,255,0) 2.1px),
          radial-gradient(circle at 57% 47%, rgba(255,246,200,.9) 0 1px, rgba(255,246,200,0) 2px),
          radial-gradient(circle at 79% 16%, rgba(255,255,255,.85) 0 1px, rgba(255,255,255,0) 1.9px),
          radial-gradient(circle at 38% 71%, rgba(255,240,190,.8) 0 1px, rgba(255,240,190,0) 1.9px),
          radial-gradient(circle at 86% 64%, rgba(255,255,255,.8) 0 .9px, rgba(255,255,255,0) 1.8px),
          radial-gradient(circle at 12% 55%, rgba(255,250,220,.75) 0 .9px, rgba(255,250,220,0) 1.7px),
          linear-gradient(115deg, rgba(255,255,255,0) 30%, rgba(255,255,255,.34) 46%, rgba(255,255,255,.07) 55%, rgba(255,255,255,0) 68%),
          repeating-linear-gradient(90deg, rgba(255,255,255,.07) 0 2px, rgba(0,0,0,0) 2px 6px),
          linear-gradient(0deg, #fdf3c8, #f0d78c 42%, #d8b25c 78%, #bb903d);
        background-size:34px 46px, 42px 58px, 29px 39px, 47px 63px, 38px 51px, 31px 43px, 100% 100%, auto, auto;
      }
      .tri.dark{
        background:
          radial-gradient(circle at 24% 22%, rgba(255,244,214,.95) 0 1.1px, rgba(255,244,214,0) 2.1px),
          radial-gradient(circle at 57% 47%, rgba(255,230,180,.9) 0 1px, rgba(255,230,180,0) 2px),
          radial-gradient(circle at 79% 16%, rgba(255,248,225,.85) 0 1px, rgba(255,248,225,0) 1.9px),
          radial-gradient(circle at 38% 71%, rgba(255,226,170,.8) 0 1px, rgba(255,226,170,0) 1.9px),
          radial-gradient(circle at 86% 64%, rgba(255,244,214,.8) 0 .9px, rgba(255,244,214,0) 1.8px),
          radial-gradient(circle at 12% 55%, rgba(255,238,200,.75) 0 .9px, rgba(255,238,200,0) 1.7px),
          linear-gradient(115deg, rgba(255,255,255,0) 30%, rgba(255,230,190,.30) 46%, rgba(255,255,255,.05) 55%, rgba(255,255,255,0) 68%),
          repeating-linear-gradient(90deg, rgba(255,255,255,.06) 0 2px, rgba(0,0,0,0) 2px 6px),
          linear-gradient(180deg, #f8c078, #e09a4c 45%, #b06a28 80%, #86430f);
        background-size:34px 46px, 42px 58px, 29px 39px, 47px 63px, 38px 51px, 31px 43px, 100% 100%, auto, auto;
      }
            .point.bot .tri.dark{
        background:
          radial-gradient(circle at 24% 22%, rgba(255,244,214,.95) 0 1.1px, rgba(255,244,214,0) 2.1px),
          radial-gradient(circle at 57% 47%, rgba(255,230,180,.9) 0 1px, rgba(255,230,180,0) 2px),
          radial-gradient(circle at 79% 16%, rgba(255,248,225,.85) 0 1px, rgba(255,248,225,0) 1.9px),
          radial-gradient(circle at 38% 71%, rgba(255,226,170,.8) 0 1px, rgba(255,226,170,0) 1.9px),
          radial-gradient(circle at 86% 64%, rgba(255,244,214,.8) 0 .9px, rgba(255,244,214,0) 1.8px),
          radial-gradient(circle at 12% 55%, rgba(255,238,200,.75) 0 .9px, rgba(255,238,200,0) 1.7px),
          linear-gradient(115deg, rgba(255,255,255,0) 30%, rgba(255,230,190,.30) 46%, rgba(255,255,255,.05) 55%, rgba(255,255,255,0) 68%),
          repeating-linear-gradient(90deg, rgba(255,255,255,.06) 0 2px, rgba(0,0,0,0) 2px 6px),
          linear-gradient(0deg, #f8c078, #e09a4c 45%, #b06a28 80%, #86430f);
        background-size:34px 46px, 42px 58px, 29px 39px, 47px 63px, 38px 51px, 31px 43px, 100% 100%, auto, auto;
      }
      .point.dest{ cursor:pointer; }
      .point.dest .tri{ filter:brightness(1.22) drop-shadow(0 0 7px rgba(255,214,90,.95)); }
      .point.dest::after{
        content:""; position:absolute; left:50%; transform:translateX(-50%);
        width:34%; aspect-ratio:1; border-radius:50%;
        border:3px solid rgba(255,214,90,.95); background:rgba(255,205,60,.22); z-index:3;
        box-shadow:0 0 10px rgba(255,205,60,.55);
        animation:destPulse 1.05s ease-in-out infinite;
      }
      @keyframes destPulse{
        0%,100%{ transform:translateX(-50%) scale(1); opacity:.95; }
        50%{ transform:translateX(-50%) scale(1.22); opacity:.55; }
      }
      .point.top.dest::after{ bottom:4%; }
      .point.bot.dest::after{ top:4%; }
      .checker{
        position:absolute; left:5%; width:90%; aspect-ratio:1; border-radius:50%;
        z-index:4; display:flex; align-items:center; justify-content:center;
        font-size:11px; font-weight:800; user-select:none; -webkit-user-select:none;
        transition:transform .18s ease, filter .18s ease;
        overflow:hidden;
      }
            .checker::after{
        content:""; position:absolute; left:19%; top:19%; width:62%; height:62%;
        border-radius:50%; pointer-events:none; z-index:1;
        background-position:center; background-repeat:no-repeat; background-size:84%;
      }
            .checker.w{
        background:
          radial-gradient(circle at 30% 20%, rgba(255,255,255,.95), rgba(255,255,255,0) 44%),
          radial-gradient(circle at 33% 27%, #ffffff, #f2f9ff 40%, #d9edff 68%, #b7d6f5 88%, #8fb8e8);
        border:2px solid #b9d2ee; color:#33506e;
        box-shadow:0 3px 5px rgba(0,0,0,.65), 0 7px 12px rgba(0,0,0,.35), 0 0 12px rgba(190,225,255,.35), inset 0 2px 3px rgba(255,255,255,.95), inset 0 -3px 5px rgba(110,150,200,.45), inset 0 0 0 3px rgba(255,255,255,.55);
      }
            .checker.w::after{
        left:6%; top:6%; width:88%; height:88%;
        border:1.5px solid rgba(150,190,235,.75);
        box-shadow:inset 0 1px 2px rgba(120,160,210,.35);
        background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cdefs%3E%3CradialGradient id='g' cx='38%' cy='30%' r='85%'%3E%3Cstop offset='0%' stop-color='%23ffffff'/%3E%3Cstop offset='45%' stop-color='%23eef7ff'/%3E%3Cstop offset='78%' stop-color='%23d3e9fc'/%3E%3Cstop offset='100%' stop-color='%23a9cdef'/%3E%3C/radialGradient%3E%3C/defs%3E%3Ccircle cx='50' cy='50' r='49' fill='url(%23g)'/%3E%3Cg stroke='%238fb4dd' stroke-width='0.8'%3E%3Cpolygon points='98.0,50.0 73.1,59.6 73.1,40.4' fill='%23ffffff' fill-opacity='0.50'/%3E%3Cpolygon points='83.9,83.9 59.6,73.1 73.1,59.6' fill='%23dcedff' fill-opacity='0.55'/%3E%3Cpolygon points='50.0,98.0 40.4,73.1 59.6,73.1' fill='%23ffffff' fill-opacity='0.50'/%3E%3Cpolygon points='16.1,83.9 26.9,59.6 40.4,73.1' fill='%23dcedff' fill-opacity='0.55'/%3E%3Cpolygon points='2.0,50.0 26.9,40.4 26.9,59.6' fill='%23ffffff' fill-opacity='0.50'/%3E%3Cpolygon points='16.1,16.1 40.4,26.9 26.9,40.4' fill='%23dcedff' fill-opacity='0.55'/%3E%3Cpolygon points='50.0,2.0 59.6,26.9 40.4,26.9' fill='%23ffffff' fill-opacity='0.50'/%3E%3Cpolygon points='83.9,16.1 73.1,40.4 59.6,26.9' fill='%23dcedff' fill-opacity='0.55'/%3E%3Cpolygon points='73.1,59.6 59.6,73.1 50,50' fill='%23ffffff' fill-opacity='0.55'/%3E%3Cpolygon points='59.6,73.1 40.4,73.1 50,50' fill='%23e3f1ff' fill-opacity='0.50'/%3E%3Cpolygon points='40.4,73.1 26.9,59.6 50,50' fill='%23ffffff' fill-opacity='0.55'/%3E%3Cpolygon points='26.9,59.6 26.9,40.4 50,50' fill='%23e3f1ff' fill-opacity='0.50'/%3E%3Cpolygon points='26.9,40.4 40.4,26.9 50,50' fill='%23ffffff' fill-opacity='0.55'/%3E%3Cpolygon points='40.4,26.9 59.6,26.9 50,50' fill='%23e3f1ff' fill-opacity='0.50'/%3E%3Cpolygon points='59.6,26.9 73.1,40.4 50,50' fill='%23ffffff' fill-opacity='0.55'/%3E%3Cpolygon points='73.1,40.4 73.1,59.6 50,50' fill='%23e3f1ff' fill-opacity='0.50'/%3E%3C/g%3E%3Ccircle cx='50' cy='50' r='8' fill='%23ffffff' fill-opacity='0.85' stroke='%238fb4dd' stroke-width='0.8'/%3E%3Cpath d='M31.0,21.0 L33.1,25.9 L38.0,28.0 L33.1,30.1 L31.0,35.0 L28.9,30.1 L24.0,28.0 L28.9,25.9 Z' fill='%23ffffff'/%3E%3Cpath d='M68.0,61.0 L69.5,64.5 L73.0,66.0 L69.5,67.5 L68.0,71.0 L66.5,67.5 L63.0,66.0 L66.5,64.5 Z' fill='%23ffffff' fill-opacity='0.9'/%3E%3C/svg%3E");
        background-size:96%; opacity:.98;
      }
            .checker.b{
        background:
          radial-gradient(circle at 30% 20%, rgba(255,255,255,.9), rgba(255,255,255,0) 42%),
          linear-gradient(125deg, rgba(255,255,255,.38), rgba(255,255,255,0) 40%),
          radial-gradient(circle at 36% 28%, #fff8d6, #ffe066 30%, #f7c948 52%, #dd9a16 74%, #a86e07 90%, #7c4d03);
        border:2px solid #8a5f0c; color:#5e4304;
        box-shadow:0 3px 5px rgba(0,0,0,.7), 0 7px 12px rgba(0,0,0,.4), 0 0 12px rgba(255,200,60,.30), inset 0 2px 3px rgba(255,255,255,.75), inset 0 -3px 6px rgba(90,55,0,.55), inset 0 0 0 3px rgba(255,230,150,.38);
      }
            .checker.b::after{
        border:1.5px solid rgba(122,82,14,.60);
        box-shadow:inset 0 2px 3px rgba(90,55,0,.35), inset 0 -2px 3px rgba(255,240,200,.35);
        background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cg fill='none' stroke='%237a520e' stroke-width='5'%3E%3Ccircle cx='50' cy='50' r='41'/%3E%3Ccircle cx='50' cy='50' r='12'/%3E%3Cellipse cx='50' cy='30' rx='8' ry='15'/%3E%3Cellipse cx='50' cy='30' rx='8' ry='15' transform='rotate(45 50 50)'/%3E%3Cellipse cx='50' cy='30' rx='8' ry='15' transform='rotate(90 50 50)'/%3E%3Cellipse cx='50' cy='30' rx='8' ry='15' transform='rotate(135 50 50)'/%3E%3Cellipse cx='50' cy='30' rx='8' ry='15' transform='rotate(180 50 50)'/%3E%3Cellipse cx='50' cy='30' rx='8' ry='15' transform='rotate(225 50 50)'/%3E%3Cellipse cx='50' cy='30' rx='8' ry='15' transform='rotate(270 50 50)'/%3E%3Cellipse cx='50' cy='30' rx='8' ry='15' transform='rotate(315 50 50)'/%3E%3C/g%3E%3C/svg%3E");
      }
      .checker.movable{ cursor:pointer; }
      .checker.sel{
        outline:3px solid var(--gold-bright); outline-offset:1px; transform:scale(1.14); z-index:6;
        filter:brightness(1.08) drop-shadow(0 9px 9px rgba(0,0,0,.6));
      }
      #bar{
        grid-column:7; grid-row:1 / span 2; position:relative;
        background:linear-gradient(180deg, #38220f, #1c0f04 50%, #2a1809);
        box-shadow:inset 2px 0 0 rgba(201,126,70,.6), inset -2px 0 0 rgba(201,126,70,.6), inset 0 0 18px rgba(0,0,0,.75);
      }
      #bar::after{
        content:""; position:absolute; left:50%; top:50%; z-index:1;
        width:98%; aspect-ratio:1; transform:translate(-50%,-50%);
        background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cg fill='none' stroke='%23c9a227' stroke-width='3'%3E%3Ccircle cx='50' cy='50' r='47'/%3E%3Ccircle cx='50' cy='50' r='42'/%3E%3Ccircle cx='50' cy='50' r='17'/%3E%3Cellipse cx='50' cy='29' rx='6.5' ry='12'/%3E%3Cellipse cx='50' cy='29' rx='6.5' ry='12' transform='rotate(45 50 50)'/%3E%3Cellipse cx='50' cy='29' rx='6.5' ry='12' transform='rotate(90 50 50)'/%3E%3Cellipse cx='50' cy='29' rx='6.5' ry='12' transform='rotate(135 50 50)'/%3E%3Cellipse cx='50' cy='29' rx='6.5' ry='12' transform='rotate(180 50 50)'/%3E%3Cellipse cx='50' cy='29' rx='6.5' ry='12' transform='rotate(225 50 50)'/%3E%3Cellipse cx='50' cy='29' rx='6.5' ry='12' transform='rotate(270 50 50)'/%3E%3Cellipse cx='50' cy='29' rx='6.5' ry='12' transform='rotate(315 50 50)'/%3E%3C/g%3E%3Ccircle cx='50' cy='50' r='5.5' fill='%23c9a227'/%3E%3C/svg%3E") center / contain no-repeat;
        pointer-events:none;
        filter:drop-shadow(0 0 7px rgba(236,202,95,.8));
      }
      #bar.selBar{ box-shadow:inset 0 0 0 3px var(--gold-bright), inset 2px 0 0 rgba(201,126,70,.6), inset -2px 0 0 rgba(201,126,70,.6); }
      .barHalf{ position:absolute; left:0; right:0; height:50%; }
      .barHalf.top{ top:0; border-bottom:2px solid rgba(201,126,70,.55); } .barHalf.bot{ bottom:0; }
      .barChecker{
        position:absolute; left:4%; width:92%; aspect-ratio:1; border-radius:50%;
        display:flex; align-items:center; justify-content:center;
        font-size:10px; font-weight:800; user-select:none; -webkit-user-select:none;
      }
      #rail{
        width:46px; flex:none; margin-left:8px; display:flex; flex-direction:column;
        align-items:center; justify-content:space-between; gap:6px;
      }
      .tray{
        width:40px; flex:1; border-radius:8px; position:relative;
        background:rgba(5,8,16,.72); box-shadow:inset 0 0 0 2px rgba(201,126,70,.40), inset 0 10px 14px rgba(0,0,0,.7);
        display:flex; flex-direction:column; align-items:center; padding:4px 0; overflow:hidden;
      }
      .tray .tlabel{
        font-size:9px; font-weight:800; color:#ecca5f; letter-spacing:.3px; z-index:2;
        background:rgba(5,8,16,.75); padding:1px 3px; border-radius:4px;
      }
      .tray.dest{ box-shadow:inset 0 0 0 3px var(--gold-bright), 0 0 12px rgba(255,214,80,.7); cursor:pointer; }
      .mini{
        width:24px; height:24px; border-radius:50%; flex:none; margin-top:-13px;
        display:flex; align-items:center; justify-content:center; font-size:10px; font-weight:800;
      }
      .mini:first-of-type{ margin-top:2px; }
            .mini.w{ background:radial-gradient(circle at 35% 28%, #ffffff, #e8f4ff 58%, #a9cdf2); border:1.5px solid #cfe2f5; color:#33506e; }
            .mini.b{ background:radial-gradient(circle at 35% 28%, #fff6c4, #f2c230 58%, #9a6d0a); border:1.5px solid #ffe98a; color:#5e4304; }
      #cubeBox{ text-align:center; }
      #cube{
        width:42px; height:42px; border-radius:9px; margin:0 auto;
        background:linear-gradient(145deg, #3a2c12, #191104);
        border:2px solid var(--gold-bright); color:var(--gold-bright);
        display:flex; align-items:center; justify-content:center;
        font-size:19px; font-weight:900;
        box-shadow:0 3px 8px rgba(0,0,0,.6), 0 0 10px rgba(236,202,95,.35), inset 0 1px 2px rgba(255,240,200,.35);
      }
      #cube.off{ opacity:.28; filter:grayscale(.6); }
      #cubeOwner{ font-size:10px; font-weight:800; color:#d9bc6a; margin-top:3px; min-height:13px; }

      /* ---------- fx (v0.2 engine, luxury palette) ---------- */
      .hbtn{
        min-height:40px; padding:8px 10px; border-radius:999px; cursor:pointer;
        border:1.5px solid var(--gold); background:rgba(201,162,39,.08); color:var(--ink);
        font-size:14px; font-weight:700;
      }
      .hbtn:active{ transform:scale(.97); }
      .die.tumbling{
        animation:dieShake .13s linear infinite;
        box-shadow:0 0 0 2px rgba(236,202,95,.95), 0 0 18px rgba(236,202,95,.8), 0 3px 7px rgba(0,0,0,.5) !important;
      }
      @keyframes dieShake{
        0%{ transform:rotate(0deg) translate(0,0); }
        25%{ transform:rotate(9deg) translate(1px,-2px); }
        50%{ transform:rotate(-7deg) translate(-1px,1px); }
        75%{ transform:rotate(6deg) translate(1px,1px); }
        100%{ transform:rotate(0deg) translate(0,0); }
      }
      .fxGhost{ position:fixed; z-index:60; pointer-events:none; margin:0; }
      .fxRing{
        position:absolute; width:46px; height:46px; border-radius:50%;
        border:3px solid rgba(255,205,60,.95); pointer-events:none; z-index:30;
        box-shadow:0 0 14px rgba(255,190,40,.85), inset 0 0 12px rgba(255,190,40,.65);
      }
      .fxP{
        position:absolute; width:7px; height:7px; border-radius:2px; pointer-events:none; z-index:31;
        background:linear-gradient(145deg, #ffe98a, #d4af37);
        box-shadow:0 0 6px rgba(255,200,60,.9);
      }
      #banner{
        position:absolute; left:50%; top:50%; z-index:40; pointer-events:none;
        transform:translate(-50%,-50%) rotate(-2deg);
        font-size:46px; font-weight:900; letter-spacing:1px; white-space:nowrap;
        color:#ffe98a; text-shadow:0 3px 0 #4a2f08, 0 8px 22px rgba(0,0,0,.7);
      }
      @media (max-width:380px){ #banner{ font-size:36px; } }

      /* ---------- controls ---------- */
      #controls{ margin-top:12px; text-align:center; }
      #status{
        min-height:44px; font-size:16px; font-weight:700; line-height:1.45;
        display:flex; align-items:center; justify-content:center; padding:0 4px;
        color:var(--ink);
      }
      #diceRow{
        display:flex; gap:8px; justify-content:center; align-items:center;
        min-height:46px; margin:2px 0 8px;
      }
      .die{
        width:42px; height:42px; border-radius:9px; padding:6px;
        display:grid; grid-template-columns:repeat(3,1fr); grid-template-rows:repeat(3,1fr);
        box-shadow:0 3px 7px rgba(0,0,0,.55);
      }
            .die.w{ background:linear-gradient(155deg, rgba(255,255,255,.75), rgba(255,255,255,0) 46%), linear-gradient(145deg,#fffef9,#eee0b6); box-shadow:0 3px 7px rgba(0,0,0,.55), inset 0 0 0 1.5px rgba(154,122,52,.55), inset 0 -3px 6px rgba(120,90,30,.25); }
            .die.b{ background:linear-gradient(155deg, rgba(255,255,255,.34), rgba(255,255,255,0) 46%), linear-gradient(145deg,#3d4152,#101116); box-shadow:0 3px 7px rgba(0,0,0,.55), inset 0 0 0 1.5px rgba(217,180,91,.55), inset 0 -3px 6px rgba(0,0,0,.5); }
      .die .pip{ width:8px; height:8px; border-radius:50%; align-self:center; justify-self:center; visibility:hidden; }
      .die.w .pip{ background:radial-gradient(circle at 38% 32%, #4a3a16, #1d1404 75%); } .die.b .pip{ background:radial-gradient(circle at 38% 32%, #fff6c4, #f2c230 62%, #a87c10); box-shadow:0 0 4px rgba(255,205,70,.75); }
      .die .pip.on{ visibility:visible; }
      .die.used{ opacity:.32; }
      .dieLabel{ font-size:11px; font-weight:800; color:var(--ink-soft); align-self:center; }
      #btnRow{ display:flex; gap:8px; justify-content:center; flex-wrap:wrap; }
      button.act{
        min-height:46px; padding:10px 20px; border-radius:12px; cursor:pointer;
        font-size:16px; font-weight:800; border:1.5px solid transparent;
      }
      button.act:active{ transform:scale(.97); }
      button.act.primary{
        background:linear-gradient(180deg, #f0d06a, #c39a22); color:var(--btn-ink);
        box-shadow:0 4px 12px rgba(201,162,39,.4), inset 0 1px 0 rgba(255,248,220,.7);
      }
      button.act.ghost{ background:rgba(201,162,39,.06); border-color:var(--gold); color:var(--ink); }
      button.act.danger{ background:linear-gradient(180deg, #8c2f1b, #671f0f); color:#ffe9d2; border-color:rgba(236,202,95,.35); }
      button.act[hidden]{ display:none; }
      #footRow{ margin-top:14px; display:flex; justify-content:center; }
      #newMatchBtn{
        min-height:38px; padding:8px 14px; background:none; border:none; cursor:pointer;
        color:var(--ink-soft); font-size:13px; font-weight:700; text-decoration:underline;
      }
      @media (max-width:380px){
        header h1{ font-size:20px; }
        .pcard .big{ font-size:25px; }
        #rail{ width:40px; margin-left:6px; }
        #cube{ width:36px; height:36px; font-size:16px; }
        .tray{ width:34px; }
      }
    
      /* ---------- v0.4 jewel shimmer (transform/opacity only) ---------- */
      .checker::before{
        content:""; position:absolute; inset:-18%; z-index:2; pointer-events:none;
        background:linear-gradient(115deg, rgba(255,255,255,0) 40%, rgba(255,255,255,.6) 50%, rgba(255,255,255,0) 60%);
        transform:translateX(-135%) skewX(-14deg); opacity:0;
      }
      body[data-fx="full"] .point .checker:last-of-type::before,
      body[data-fx="full"] .barHalf .barChecker:last-of-type::before{
        animation:bandSweep 5.6s ease-in-out infinite;
      }
      body[data-fx="full"] .point:nth-child(3n) .checker:last-of-type::before{ animation-delay:1.8s; }
      body[data-fx="full"] .point:nth-child(4n+1) .checker:last-of-type::before{ animation-delay:3.4s; }
      @keyframes bandSweep{
        0%{ transform:translateX(-135%) skewX(-14deg); opacity:0; }
        5%{ opacity:.9; }
        19%{ transform:translateX(135%) skewX(-14deg); opacity:.9; }
        25%, 100%{ transform:translateX(135%) skewX(-14deg); opacity:0; }
      }
      body.page-hidden .checker::before{ animation-play-state:paused; }
      @media (prefers-reduced-motion: reduce){
        .point .checker:last-of-type::before,
        .barHalf .barChecker:last-of-type::before{ animation:none !important; }
      }
      /* v0.4: star glint on the top diamond of a stack */
      .point .checker.w:last-of-type::after,
      .barHalf .barChecker.w:last-of-type::after{
        background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cpath d='M20.0,3.0 L24.2,15.8 L37.0,20.0 L24.2,24.2 L20.0,37.0 L15.8,24.2 L3.0,20.0 L15.8,15.8 Z' fill='%23ffffff'/%3E%3C/svg%3E"), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cdefs%3E%3CradialGradient id='g' cx='38%' cy='30%' r='85%'%3E%3Cstop offset='0%' stop-color='%23ffffff'/%3E%3Cstop offset='45%' stop-color='%23eef7ff'/%3E%3Cstop offset='78%' stop-color='%23d3e9fc'/%3E%3Cstop offset='100%' stop-color='%23a9cdef'/%3E%3C/radialGradient%3E%3C/defs%3E%3Ccircle cx='50' cy='50' r='49' fill='url(%23g)'/%3E%3Cg stroke='%238fb4dd' stroke-width='0.8'%3E%3Cpolygon points='98.0,50.0 73.1,59.6 73.1,40.4' fill='%23ffffff' fill-opacity='0.50'/%3E%3Cpolygon points='83.9,83.9 59.6,73.1 73.1,59.6' fill='%23dcedff' fill-opacity='0.55'/%3E%3Cpolygon points='50.0,98.0 40.4,73.1 59.6,73.1' fill='%23ffffff' fill-opacity='0.50'/%3E%3Cpolygon points='16.1,83.9 26.9,59.6 40.4,73.1' fill='%23dcedff' fill-opacity='0.55'/%3E%3Cpolygon points='2.0,50.0 26.9,40.4 26.9,59.6' fill='%23ffffff' fill-opacity='0.50'/%3E%3Cpolygon points='16.1,16.1 40.4,26.9 26.9,40.4' fill='%23dcedff' fill-opacity='0.55'/%3E%3Cpolygon points='50.0,2.0 59.6,26.9 40.4,26.9' fill='%23ffffff' fill-opacity='0.50'/%3E%3Cpolygon points='83.9,16.1 73.1,40.4 59.6,26.9' fill='%23dcedff' fill-opacity='0.55'/%3E%3Cpolygon points='73.1,59.6 59.6,73.1 50,50' fill='%23ffffff' fill-opacity='0.55'/%3E%3Cpolygon points='59.6,73.1 40.4,73.1 50,50' fill='%23e3f1ff' fill-opacity='0.50'/%3E%3Cpolygon points='40.4,73.1 26.9,59.6 50,50' fill='%23ffffff' fill-opacity='0.55'/%3E%3Cpolygon points='26.9,59.6 26.9,40.4 50,50' fill='%23e3f1ff' fill-opacity='0.50'/%3E%3Cpolygon points='26.9,40.4 40.4,26.9 50,50' fill='%23ffffff' fill-opacity='0.55'/%3E%3Cpolygon points='40.4,26.9 59.6,26.9 50,50' fill='%23e3f1ff' fill-opacity='0.50'/%3E%3Cpolygon points='59.6,26.9 73.1,40.4 50,50' fill='%23ffffff' fill-opacity='0.55'/%3E%3Cpolygon points='73.1,40.4 73.1,59.6 50,50' fill='%23e3f1ff' fill-opacity='0.50'/%3E%3C/g%3E%3Ccircle cx='50' cy='50' r='8' fill='%23ffffff' fill-opacity='0.85' stroke='%238fb4dd' stroke-width='0.8'/%3E%3Cpath d='M31.0,21.0 L33.1,25.9 L38.0,28.0 L33.1,30.1 L31.0,35.0 L28.9,30.1 L24.0,28.0 L28.9,25.9 Z' fill='%23ffffff'/%3E%3Cpath d='M68.0,61.0 L69.5,64.5 L73.0,66.0 L69.5,67.5 L68.0,71.0 L66.5,67.5 L63.0,66.0 L66.5,64.5 Z' fill='%23ffffff' fill-opacity='0.9'/%3E%3C/svg%3E");
        background-size:36% 36%, 96% 96%;
        background-position:76% 10%, center;
      }
      /* v0.4: jewel tips on the points */
      .point::before{
        content:""; position:absolute; left:50%; z-index:1; pointer-events:none;
        width:9%; aspect-ratio:1; transform:translateX(-50%) rotate(45deg);
        background:linear-gradient(135deg, #fffbe8, #ffd94d 55%, #b8860b);
        box-shadow:0 0 6px rgba(255,210,80,.85), inset 0 0 2px rgba(255,255,255,.9);
        border-radius:1.5px;
      }
      .point.top::before{ bottom:1.2%; }
      .point.bot::before{ top:1.2%; }

/* ================================================================
   Web client additions: screens, lobby, forms, match-end, verify
   ================================================================ */
[hidden]{ display:none !important; }
button{ font-family:inherit; }
input, select{ font-family:inherit; }

.panel{
  border-radius:14px; padding:14px; margin-bottom:12px;
  background:linear-gradient(160deg, #111c33, #0a101f);
  border:1.5px solid rgba(201,162,39,.45);
  box-shadow:inset 0 1px 0 rgba(255,230,170,.14), 0 4px 12px rgba(0,0,0,.45);
}
.panel h2{ margin:0 0 10px; font-size:17px; color:var(--gold-bright); letter-spacing:.3px; }
.panel h3{ margin:12px 0 8px; font-size:14px; color:var(--ink); }

.playerLine{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.playerLine .pname{ font-size:19px; font-weight:800; }
.badge{
  font-size:11px; font-weight:800; padding:3px 8px; border-radius:999px;
  background:#6e4b10; color:#ffe9a8; border:1px solid rgba(236,202,95,.55);
}
.badge.guest{ background:#26314d; color:#c8d6f2; border-color:rgba(160,180,230,.4); }
.ratingLine{ font-size:14px; color:var(--ink-soft); }
.ratingLine b{ color:var(--ink); font-size:16px; }

.frow{ display:flex; gap:8px; flex-wrap:wrap; margin:8px 0; }
.frow input[type="text"], .frow input[type="password"]{
  flex:1 1 150px; min-height:44px; padding:10px 12px; border-radius:10px;
  background:#070d1a; border:1.5px solid rgba(201,162,39,.4); color:var(--ink);
  font-size:15px; outline:none;
}
.frow input:focus{ border-color:var(--gold-bright); }
button.act.small{ min-height:40px; padding:8px 14px; font-size:14px; border-radius:10px; }
button.act[disabled]{ opacity:.45; cursor:default; }
button.act[disabled]:active{ transform:none; }
.linkBtn{
  background:none; border:none; color:var(--ink-soft); cursor:pointer;
  font-size:13px; font-weight:700; text-decoration:underline; padding:6px 2px;
}
.formErr{ color:#ff9d7a; font-size:13.5px; font-weight:700; min-height:18px; }

.segRow{ display:flex; gap:6px; flex-wrap:wrap; margin:6px 0 12px; }
.segRow .seg{
  min-width:52px; min-height:42px; padding:8px 12px; border-radius:10px; cursor:pointer;
  border:1.5px solid rgba(201,162,39,.45); background:rgba(201,162,39,.06);
  color:var(--ink); font-size:15px; font-weight:800;
}
.segRow .seg.on{
  background:linear-gradient(180deg, #f0d06a, #c39a22); color:var(--btn-ink);
  border-color:transparent; box-shadow:0 3px 9px rgba(201,162,39,.4);
}
.bigBtns{ display:flex; flex-direction:column; gap:8px; }
.bigBtns button.act{ width:100%; }

#queueBox{
  border-radius:12px; padding:12px; text-align:center;
  background:rgba(201,162,39,.08); border:1.5px dashed rgba(201,162,39,.6);
}
#queueBox .qmsg{ font-size:16px; font-weight:800; margin-bottom:8px; }
#roomCodeBig{
  font-size:38px; font-weight:900; letter-spacing:6px; color:var(--gold-bright);
  text-align:center; margin:6px 0; direction:ltr;
}
.joinRow input{
  text-transform:uppercase; letter-spacing:3px; text-align:center; font-weight:800;
}

#historyList{ list-style:none; margin:0; padding:0; }
#historyList li{
  display:flex; justify-content:space-between; gap:8px; align-items:center;
  padding:8px 4px; border-bottom:1px solid rgba(201,162,39,.18); font-size:13.5px;
}
#historyList li:last-child{ border-bottom:none; }
#historyList .hres{ font-weight:900; }
#historyList .hres.win{ color:#9fe8a8; } #historyList .hres.loss{ color:#ff9d7a; }
#historyList .hmeta{ color:var(--ink-soft); font-size:12px; }
#historyList .hdelta{ font-weight:800; }
#historyList .hdelta.plus{ color:#9fe8a8; } #historyList .hdelta.minus{ color:#ff9d7a; }
.emptyNote{ color:var(--ink-soft); font-size:13.5px; }

/* board screen extras */
.pcard .who .pnameTxt{ overflow:hidden; text-overflow:ellipsis; }
.youTag{
  font-size:10px; font-weight:900; padding:2px 6px; border-radius:999px;
  background:var(--gold); color:var(--btn-ink); flex:none;
}
#connBanner{
  position:fixed; top:10px; left:50%; transform:translateX(-50%); z-index:80;
  background:#6e2110; color:#ffd9a8; border:1.5px solid rgba(236,202,95,.6);
  padding:8px 16px; border-radius:999px; font-weight:800; font-size:14px;
  box-shadow:0 6px 18px rgba(0,0,0,.6);
}
#toast{
  position:fixed; bottom:18px; left:50%; transform:translateX(-50%); z-index:80;
  background:#1a2438; color:var(--ink); border:1.5px solid rgba(236,202,95,.6);
  padding:10px 18px; border-radius:12px; font-weight:700; font-size:14px;
  box-shadow:0 6px 18px rgba(0,0,0,.6); max-width:92vw; text-align:center;
}
#resignMenu{
  display:flex; gap:8px; justify-content:center; flex-wrap:wrap; margin-top:8px;
}
#leaveRow{ margin-top:10px; display:flex; justify-content:center; gap:14px; flex-wrap:wrap; }
#cubePrompt{
  border-radius:12px; padding:10px 12px; margin:0 0 10px; text-align:center;
  background:rgba(110,33,16,.35); border:1.5px solid rgba(236,202,95,.55);
  font-weight:800; font-size:15px;
}

/* match-end overlay */
#endOverlay{
  position:fixed; inset:0; z-index:70; overflow-y:auto;
  background:rgba(2,4,9,.82); padding:18px 10px 40px;
}
#endCard{ max-width:560px; margin:0 auto; }
#endCard h2{ text-align:center; font-size:24px; margin:4px 0 6px; color:var(--gold-bright); }
#endCard .finalScore{ text-align:center; font-size:19px; font-weight:800; margin-bottom:10px; }
.rateTable{ width:100%; border-collapse:collapse; margin:8px 0; font-size:14.5px; }
.rateTable td, .rateTable th{ padding:7px 6px; border-bottom:1px solid rgba(201,162,39,.2); text-align:start; }
.rateTable th{ color:var(--ink-soft); font-size:12.5px; }
.verifyBox{
  margin-top:12px; border-radius:12px; padding:12px;
  background:rgba(5,8,16,.6); border:1px solid rgba(201,162,39,.35);
  font-size:13.5px; word-break:break-all;
}
.verifyBox .vrow{ margin:4px 0; color:var(--ink-soft); }
.verifyBox .vrow b{ color:var(--ink); }
.verifyVerdict{ font-size:22px; font-weight:900; text-align:center; margin:10px 0 4px; }
.verifyVerdict.ok{ color:#9fe8a8; } .verifyVerdict.fail{ color:#ff8a70; }
.verifyRolls{ max-height:180px; overflow-y:auto; font-size:12.5px; color:var(--ink-soft); }
.verifyRolls .bad{ color:#ff8a70; font-weight:700; }
.mono{ font-family:ui-monospace, Menlo, Consolas, monospace; font-size:11.5px; }
