.xhh-rps{--g:#2e8b7d;max-width:760px;margin:24px auto;padding:clamp(14px,3vw,26px);border:1px solid #dce9e5;border-radius:20px;background:#fff;color:#183b36;box-shadow:0 10px 35px rgba(18,70,59,.08);font-family:Arial,sans-serif}.xhh-rps *{box-sizing:border-box}.xhh-rps header{display:flex;justify-content:space-between;align-items:center;gap:12px;padding-bottom:18px;border-bottom:1px solid #e7efec}.xhh-rps h2{font-size:clamp(23px,5vw,32px);margin:5px 0;color:#155f54}.xhh-rps header p{margin:0;color:#66817b}.xhh-rps-kicker{font-size:11px;font-weight:800;letter-spacing:1.4px;color:#2e8b7d}.xhh-rps-pill{background:#e9f6f2;border-radius:30px;padding:8px 12px;font-size:12px;font-weight:700;color:#23786b}.xhh-rps-points{padding:11px 14px;margin-bottom:14px;background:#f0f8f5;border-radius:10px}.xhh-rps-points small{color:#66817b}.xhh-rps-tabs{display:flex;gap:8px;margin:18px 0}.xhh-rps button{cursor:pointer;border:1px solid #d5e5df;background:#fff;color:#245b51;border-radius:11px;padding:11px 14px;font-weight:700}.xhh-rps button:hover,.xhh-rps button.active{background:#e8f5f1;border-color:#83bdb0}.xhh-rps-tabs button{flex:1}.xhh-rps-panel{padding:16px;background:#f8fbfa;border:1px solid #e5efeb;border-radius:15px}.xhh-rps-arena{display:flex;align-items:center;justify-content:center;gap:clamp(10px,5vw,42px);padding:18px 4px}.xhh-rps-player{display:flex;flex-direction:column;align-items:center;gap:8px;min-width:90px}.xhh-rps-player small{font-size:11px;letter-spacing:1px;color:#78918a;font-weight:800}.xhh-rps-player b{font-size:13px}.xhh-rps .gesture{width:clamp(82px,18vw,120px);height:clamp(82px,18vw,120px);display:grid;place-items:center;background:white;border:1px solid #dceae5;border-radius:22px;font-size:clamp(42px,9vw,62px);box-shadow:0 5px 16px rgba(20,80,66,.06)}.xhh-rps-vs{font-size:13px;font-weight:900;color:#9bb1aa}.xhh-rps-choices{display:flex;justify-content:center;gap:12px;margin:8px 0 16px}.xhh-rps-choices button{min-width:82px;display:flex;flex-direction:column;align-items:center;gap:4px;font-size:30px;background:#fff}.xhh-rps-choices button span{font-size:12px}.xhh-rps-choices button:hover{transform:translateY(-2px);border-color:var(--g)}.xhh-rps-result{text-align:center;padding:13px;border-radius:10px;background:#eaf5f1;color:#24695d;font-weight:700;min-height:46px}.xhh-rps-score{text-align:center;margin:12px;font-weight:700;color:#55766e}.xhh-rps-reset{display:block;margin:0 auto}.xhh-rps-room-actions{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:14px}.xhh-rps .primary{background:#2e8b7d;color:white;border-color:#2e8b7d}.xhh-rps-join{display:flex;gap:6px;flex:1;min-width:220px}.xhh-rps input{min-width:0;flex:1;border:1px solid #d5e5df;border-radius:10px;padding:10px;font-size:15px}.xhh-rps-room-head{display:flex;justify-content:space-between;align-items:center;gap:8px;margin:12px 0}.xhh-rps footer{font-size:12px;color:#718a83;line-height:1.6;margin-top:16px}.xhh-rps [hidden]{display:none!important}@media(max-width:480px){.xhh-rps{border-radius:14px;margin:14px auto}.xhh-rps header{align-items:flex-start;flex-direction:column}.xhh-rps-room-actions{flex-direction:column}.xhh-rps-join{width:100%}.xhh-rps-panel{padding:10px}.xhh-rps-choices{gap:7px}.xhh-rps-choices button{min-width:0;flex:1;padding:10px 5px}.xhh-rps-tabs button{padding:10px 6px;font-size:13px}}

.xhh-rps-ai-info{margin:0 auto 12px;max-width:560px;padding:10px 12px;border:1px solid #d8e9e3;border-radius:10px;background:#f0f8f5;color:#38675d;text-align:center;font-size:12px;line-height:1.5}
.xhh-rps-stake{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:12px 0;padding:10px 12px;background:#f3f8f7;border:1px solid #d8e9e5;border-radius:12px;color:#174f47;font-weight:600}.xhh-rps-stake input{width:110px;max-width:40vw;padding:9px 10px;border:1px solid #b9d4ce;border-radius:8px;background:#fff;color:#163e38}.xhh-rps-stake small{font-weight:400;color:#54736d}.xhh-rps-choices button:disabled{opacity:.45;cursor:not-allowed}

.xhh-rps-room-list-wrap{margin:18px 0;padding:14px;border:1px solid #dce8e4;border-radius:16px;background:#fff}
.xhh-rps-room-list-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px;color:#245c53}
.xhh-rps-room-list-head button,.xhh-rps-room-card button{border:1px solid #9bc7ba;background:#e9f5f1;color:#245c53;border-radius:10px;padding:9px 13px;font-weight:600}
.xhh-rps-room-list{display:grid;gap:9px}
.xhh-rps-room-card{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px;border:1px solid #e1ebe7;border-radius:12px;background:#f8fbfa}
.xhh-rps-room-card>div{display:grid;gap:4px;min-width:0}
.xhh-rps-room-card small{color:#718781}
.xhh-rps-empty{margin:4px 0;color:#718781;text-align:center}
.xhh-rps-countdown{margin:12px 0;padding:13px;border-radius:12px;text-align:center;background:#fff4df;color:#865a12;font-weight:700;font-size:18px}
.xhh-rps-countdown.is-urgent{background:#fde9e7;color:#a33128}

.xhh-rps-chat{margin-top:18px;padding:14px;border:1px solid #dce8e4;border-radius:16px;background:#fff}
.xhh-rps-chat-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:5px;margin-bottom:10px;color:#245c53}
.xhh-rps-chat-head small,.xhh-rps-chat-hint{color:#82938e;font-size:12px}
.xhh-rps-chat-messages{height:210px;overflow-y:auto;overscroll-behavior:contain;padding:10px;background:#f6faf8;border:1px solid #e5eeea;border-radius:12px;display:flex;flex-direction:column;gap:9px}
.xhh-rps-chat-empty{margin:auto;color:#82938e;text-align:center}
.xhh-rps-chat-message{max-width:88%;align-self:flex-start;padding:8px 11px;border-radius:12px 12px 12px 3px;background:#e8f2ee;overflow-wrap:anywhere}
.xhh-rps-chat-message.mine{align-self:flex-end;background:#dff1eb;border-radius:12px 12px 3px 12px}
.xhh-rps-chat-meta{font-size:11px;color:#718781;margin-bottom:3px}
.xhh-rps-chat-body{font-size:14px;color:#294b45;white-space:pre-wrap}
.xhh-rps-chat-form{display:flex;gap:8px;margin-top:9px}
.xhh-rps-chat-form input{flex:1;min-width:0;border:1px solid #d6e3de;border-radius:10px;padding:11px 12px;font-size:14px}
.xhh-rps-chat-form button{border:0;border-radius:10px;padding:10px 18px;background:#2e8b7d;color:#fff;font-weight:700}
.xhh-rps-chat-form button:disabled{opacity:.55}
@media(max-width:420px){.xhh-rps-chat-messages{height:180px}.xhh-rps-chat-form button{padding:10px 13px}}


/* XHH RPS 1.2.4 – borderless, full-bleed mobile layout */
@media (max-width: 600px) {
  .xhh-rps {
    width: 100vw !important;
    max-width: none !important;
    margin: 0 0 0 calc(50% - 50vw) !important;
    padding: 16px 14px 22px !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: #fff;
    overflow: hidden;
  }
  .xhh-rps header {
    padding-top: 4px;
    border-bottom: 0;
  }
  .xhh-rps-panel,
  .xhh-rps-room-list-wrap,
  .xhh-rps-chat {
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }
  .xhh-rps-panel {
    padding: 12px 0 !important;
    background: #fff;
  }
  .xhh-rps-room-list-wrap,
  .xhh-rps-chat {
    padding: 14px 0 !important;
    margin-left: 0;
    margin-right: 0;
    background: #fff;
  }
  .xhh-rps-room-card {
    border-radius: 12px;
  }
  .xhh-rps-points,
  .xhh-rps-stake,
  .xhh-rps-result,
  .xhh-rps-ai-info {
    border-radius: 12px;
  }
  .xhh-rps footer {
    padding: 0 2px;
  }
}

/* XHH Caro module */
.xhh-caro{--caro-green:#2e8b7d;max-width:760px;margin:24px auto;padding:clamp(14px,3vw,26px);border:1px solid #dce9e5;border-radius:20px;background:#fff;color:#183b36;box-shadow:0 10px 35px rgba(18,70,59,.08);font-family:Arial,sans-serif;box-sizing:border-box}
.xhh-caro *{box-sizing:border-box}
.xhh-caro-head{display:flex;justify-content:space-between;align-items:center;gap:12px;padding-bottom:16px;border-bottom:1px solid #e7efec}
.xhh-caro h2{font-size:clamp(23px,5vw,32px);margin:5px 0;color:#155f54}
.xhh-caro p{color:#66817b}
.xhh-caro-tabs{display:flex;gap:8px;margin:18px 0}
.xhh-caro button{cursor:pointer;border:1px solid #d5e5df;background:#fff;color:#245b51;border-radius:11px;padding:10px 13px;font-weight:700}
.xhh-caro button.active,.xhh-caro button:hover{background:#e8f5f1;border-color:#83bdb0}
.xhh-caro-tabs button{flex:1}
.xhh-caro-panel{padding:14px;background:#f8fbfa;border:1px solid #e5efeb;border-radius:15px}
.xhh-caro-toolbar{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:12px;color:#245b51}
.xhh-caro-board{width:min(100%,540px);aspect-ratio:1;margin:12px auto;display:grid;grid-template-columns:repeat(15,minmax(0,1fr));grid-template-rows:repeat(15,minmax(0,1fr));background:#fff;border:1px solid #d5dedb;border-radius:5px;overflow:hidden;touch-action:manipulation}
.xhh-caro-cell{min-width:0;min-height:0;padding:0!important;border:0!important;border-radius:0!important;border-right:1px solid #e2e8e6!important;border-bottom:1px solid #e2e8e6!important;background:transparent!important;color:#173d37;font-size:clamp(9px,2.5vw,19px);font-weight:900;line-height:1}
.xhh-caro-cell:disabled{opacity:1;cursor:default}
.xhh-caro-cell.v1{color:#182522;text-shadow:0 0 1px #fff}
.xhh-caro-cell.v2{color:#fff;text-shadow:0 1px 2px #333}
.xhh-caro-turn{text-align:center;padding:10px;border-radius:10px;background:#eaf5f1;color:#24695d;font-weight:700}
.xhh-caro-help{font-size:13px;text-align:center;margin:12px 0 0}
.xhh-caro-online-actions{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:12px}
.xhh-caro-online-actions>.primary{background:#2e8b7d;color:white;border-color:#2e8b7d}
.xhh-caro .xhh-rps-join{display:flex;flex:1;min-width:210px;gap:6px}
.xhh-caro .xhh-rps-join input{min-width:0;flex:1}
.xhh-caro [hidden]{display:none!important}
@media(max-width:600px){
 .xhh-caro{width:100vw!important;max-width:none!important;margin:0 0 0 calc(50% - 50vw)!important;padding:16px 12px 22px!important;border:0!important;border-radius:0!important;box-shadow:none!important}
 .xhh-caro-head{align-items:flex-start;flex-direction:column;border:0}
 .xhh-caro-panel,.xhh-caro .xhh-rps-room-list-wrap,.xhh-caro .xhh-rps-chat{border:0!important;border-radius:0!important;box-shadow:none!important;background:#fff;padding:10px 0}
 .xhh-caro-board{width:100%;max-width:100%;border-radius:2px}
 .xhh-caro-cell{font-size:clamp(8px,2.3vw,14px)}
 .xhh-caro-toolbar{font-size:13px}
 .xhh-caro-online-actions{flex-direction:column}
 .xhh-caro .xhh-rps-join{width:100%}
}

.xhh-caro-stake{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 14px;margin:10px 0 14px;background:#edf7f3;border:1px solid #d5e9e1;border-radius:12px;color:#245b51}
.xhh-caro-stake label{display:flex;align-items:center;gap:10px;font-weight:700}
.xhh-caro-stake input{width:120px;max-width:40%;padding:10px;border:1px solid #c9ddd5;border-radius:9px;background:#fff;color:#183b36}
.xhh-caro-stake small{font-size:12px;color:#67827b}
@media(max-width:600px){.xhh-caro-stake{align-items:flex-start;flex-direction:column}.xhh-caro-stake label{width:100%;justify-content:space-between}.xhh-caro-stake input{max-width:50%}}


.xhh-battle{max-width:1000px;margin:18px auto;padding:16px;background:#fff;border:1px solid #e5efeb;border-radius:18px;color:#24443e;box-sizing:border-box}.xhh-battle *{box-sizing:border-box}.xhh-battle-head{text-align:center;margin:12px 0 20px}.xhh-battle-head h2{margin:5px 0;color:#24685d}.xhh-battle-tabs{display:flex;gap:8px;margin:12px 0}.xhh-battle-tabs button,.xhh-battle button{border:1px solid #d6e5e0;border-radius:10px;background:#fff;padding:10px 14px;color:#245b51;cursor:pointer}.xhh-battle-tabs button.active,.xhh-battle button:hover{background:#eaf5f1}.xhh-battle-panel{padding:12px 0}.xhh-battle-stake{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px;background:#eff7f4;border-radius:12px;margin:10px 0}.xhh-battle-stake input,.xhh-battle-join input{width:120px;padding:10px;border:1px solid #ccdcd6;border-radius:8px}.xhh-battle-grids{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-top:16px}.xhh-battle-grid{display:grid;grid-template-columns:repeat(10,minmax(0,1fr));aspect-ratio:1;width:100%;max-width:420px;margin:8px auto;background:#fff;border:1px solid #cbd8d4}.xhh-battle-cell{min-width:0!important;min-height:0!important;padding:0!important;border:0!important;border-right:1px solid #e0e8e5!important;border-bottom:1px solid #e0e8e5!important;border-radius:0!important;background:#fff!important;color:#315b53;font-size:clamp(9px,2vw,16px);line-height:1}.xhh-battle-cell.ship{background:#b8d5cc!important}.xhh-battle-cell.hit{background:#f5c5bd!important;color:#a32618}.xhh-battle-cell.miss{background:#e9f0f4!important;color:#8296a0}.xhh-battle-setup{margin:10px 0}.xhh-battle-place{max-width:360px}.xhh-battle-room{padding:10px;margin:6px 0;background:#f4f8f6;border-radius:8px}.xhh-battle-join{display:flex;gap:8px;margin:10px 0}.xhh-battle-status{padding:12px;background:#eaf5f1;border-radius:10px;margin:10px 0}.xhh-battle-shipbar{font-weight:600;margin-bottom:8px}@media(max-width:600px){.xhh-battle{padding:10px;border-radius:10px}.xhh-battle-grids{grid-template-columns:1fr}.xhh-battle-grid{max-width:360px}.xhh-battle-stake{align-items:flex-start;flex-direction:column}}


/* XHH Battleship 1.5.1 – naval theme, scoped only to the Battleship shortcode */
.xhh-battle{--navy:#092d3d;--deep:#061e2b;--sea:#0b6270;--aqua:#45c6c0;--foam:#d9f6ef;--gold:#f2c66d;--ink:#dff8f3;max-width:1080px!important;padding:0!important;overflow:hidden;border:0!important;border-radius:22px!important;background:linear-gradient(180deg,#e9f7f4 0%,#f8fcfb 45%,#fff 100%)!important;box-shadow:0 18px 48px rgba(7,48,59,.16);color:#173f47}
.xhh-battle .xhh-rps-points{margin:0;padding:12px 18px;background:#082c3c;color:#eafffa;border-bottom:1px solid rgba(255,255,255,.12)}
.xhh-battle-head{margin:0!important;padding:0!important;text-align:left!important}
.xhh-battle-hero{position:relative;min-height:205px;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:25px 26px 30px;overflow:hidden;color:#eafffa;background:radial-gradient(ellipse at 78% 25%,rgba(67,198,192,.34),transparent 38%),linear-gradient(118deg,#061e2b 0%,#0a4656 55%,#0d7880 100%)}
.xhh-battle-hero:before,.xhh-battle-hero:after{content:"";position:absolute;left:-8%;width:116%;height:34px;border:1px solid rgba(196,255,246,.18);border-radius:50%;transform:rotate(-4deg);pointer-events:none}
.xhh-battle-hero:before{bottom:10px}.xhh-battle-hero:after{bottom:-8px;left:15%;opacity:.7}
.xhh-battle-hero-copy{position:relative;z-index:2;max-width:56%}
.xhh-battle-kicker{font-size:10px;letter-spacing:2.5px;font-weight:800;color:#9ee8dc}
.xhh-battle-hero h2{margin:7px 0 0!important;color:#fff!important;font-size:clamp(34px,7vw,58px)!important;line-height:.98!important;letter-spacing:2px;font-weight:950!important;text-shadow:0 4px 18px rgba(0,0,0,.25)}
.xhh-battle-hero-copy>strong{display:block;margin-top:8px;color:#f4d58d;font-size:12px;letter-spacing:3px}
.xhh-battle-hero-copy p{max-width:340px;margin:9px 0 12px!important;color:#d4f1eb;font-size:13px;line-height:1.5}
.xhh-battle-hero-tags{display:flex;flex-wrap:wrap;gap:7px}.xhh-battle-hero-tags i{font-style:normal;font-size:9px;letter-spacing:1px;padding:5px 9px;border:1px solid rgba(220,255,249,.28);border-radius:30px;background:rgba(255,255,255,.08)}
.xhh-battle-ship-art{position:relative;z-index:1;width:45%;max-width:330px;height:auto;filter:drop-shadow(0 10px 12px rgba(0,0,0,.24));animation:xhhShipFloat 4s ease-in-out infinite}
.xhh-battle-radar{position:absolute;right:16px;top:13px;color:#a8fff0;font-size:12px}.xhh-battle-radar span{font-size:8px;letter-spacing:1px}
@keyframes xhhShipFloat{0%,100%{transform:translateY(0)}50%{transform:translateY(-7px)}}
.xhh-battle-tabs{margin:0!important;padding:12px 16px;background:#0a3544;gap:9px!important}
.xhh-battle-tabs button{flex:1;border:1px solid rgba(198,247,239,.22)!important;border-radius:12px!important;background:rgba(255,255,255,.07)!important;color:#dffaf5!important;font-weight:700}
.xhh-battle-tabs button.active{background:linear-gradient(135deg,#f4d58d,#e8ad55)!important;color:#163d48!important;border-color:#f8e3ad!important;box-shadow:0 4px 14px rgba(0,0,0,.18)}
.xhh-battle-panel{padding:16px!important}
.xhh-battle-status{border:1px solid #c3e6df;background:linear-gradient(90deg,#e0f5ef,#f1fbf8)!important;color:#164b51;font-weight:700}
.xhh-battle-stake{border:1px solid #d3e9e4!important;background:#f1faf7!important;color:#164b51}
.xhh-battle button{font-weight:700;transition:transform .16s,box-shadow .16s}
.xhh-battle button:not(:disabled):active{transform:scale(.97)}
.xhh-battle-shipbar{padding:10px 12px;border-radius:10px;background:#0d4352;color:#f4dfaa;font-size:13px}
.xhh-battle-fleet-legend{display:flex;flex-wrap:wrap;gap:6px;margin:9px 0 12px}
.xhh-battle-fleet-legend span{padding:5px 8px;border-radius:8px;background:#e6f4f0;color:#24575a;font-size:10px;font-weight:700}
.xhh-battle-board-wrap{min-width:0;padding:12px;border-radius:16px;background:linear-gradient(180deg,#f1faf8,#fff);border:1px solid #d6ebe6;box-shadow:0 5px 16px rgba(8,58,67,.06)}
.xhh-battle-board-wrap>b{display:block;color:#164d55;font-size:15px}
.xhh-battle-board-wrap>small{display:block;margin-top:3px;color:#64868a;font-size:11px}
.xhh-battle-grid{position:relative;gap:1px!important;padding:5px!important;max-width:460px!important;aspect-ratio:1;width:100%;border:1px solid #0c6673!important;border-radius:9px!important;overflow:hidden;background:#0b6675!important;box-shadow:inset 0 0 25px rgba(0,25,37,.18),0 6px 14px rgba(9,67,75,.13)}
.xhh-battle-cell{position:relative;min-width:0!important;min-height:0!important;padding:0!important;border:0!important;border-radius:2px!important;background:linear-gradient(145deg,#d7f0ed,#b8e1df)!important;color:#123f4a!important;font-size:clamp(8px,1.8vw,15px)!important;line-height:1!important;box-shadow:inset 0 0 0 1px rgba(255,255,255,.34)}
.xhh-battle-cell:not(:disabled):hover{background:#fff4cf!important;box-shadow:inset 0 0 0 2px #eab75d!important;z-index:1}
.xhh-battle-cell.sea-cell{background:radial-gradient(circle at 35% 30%,rgba(255,255,255,.62) 0 1px,transparent 2px),linear-gradient(145deg,#a8dfe0,#5eb7c1)!important}
.xhh-battle-cell.ship{background:linear-gradient(180deg,#f4e2ae 0%,#d5b66e 48%,#927548 52%,#e7d29b 100%)!important;box-shadow:inset 0 2px 3px rgba(255,255,255,.85),inset 0 -2px 3px rgba(62,50,28,.28),0 0 0 1px #735f3c!important;color:#123c48!important}
.xhh-battle-cell.ship-h{border-radius:4px!important}
.xhh-battle-cell.ship-v{border-radius:4px!important}
.xhh-battle-cell.ship-bow{border-top-left-radius:45%!important;border-bottom-left-radius:45%!important}
.xhh-battle-cell.ship-stern{border-top-right-radius:45%!important;border-bottom-right-radius:45%!important}
.xhh-battle-cell.ship:after{content:"";position:absolute;left:12%;right:12%;top:22%;height:2px;background:rgba(255,255,255,.65);border-radius:50%}
.xhh-battle-cell.hit{background:radial-gradient(circle,#ffefbd 0 18%,#ff7c50 20% 45%,#bb382c 70%)!important;color:#fff!important;font-size:clamp(11px,2.2vw,19px)!important;text-shadow:0 1px 3px #76251e;animation:xhhHitPulse .35s ease-out}
.xhh-battle-cell.miss{background:radial-gradient(circle,#eaffff 0 7%,#8ee3e4 9% 22%,#328caa 25% 100%)!important;color:#eaffff!important;font-size:clamp(11px,2vw,17px)!important}
@keyframes xhhHitPulse{0%{transform:scale(.65)}100%{transform:scale(1)}}
.xhh-battle-place .xhh-battle-cell.ship{background:linear-gradient(180deg,#f7e9c7,#c7a65d)!important}
.xhh-battle-place .xhh-battle-cell{cursor:crosshair}
.xhh-battle-grids{gap:12px!important}
.xhh-battle-join input{min-width:0}
@media(max-width:620px){.xhh-battle{border-radius:0!important;margin:0!important}.xhh-battle-hero{min-height:172px;padding:20px 15px 25px}.xhh-battle-hero-copy{max-width:64%}.xhh-battle-hero h2{font-size:34px!important}.xhh-battle-hero-copy p{font-size:11px}.xhh-battle-ship-art{width:43%;margin-right:-16px}.xhh-battle-radar{right:10px;top:7px;font-size:10px}.xhh-battle-panel{padding:10px!important}.xhh-battle-board-wrap{padding:8px}.xhh-battle-grid{max-width:100%!important;padding:3px!important}.xhh-battle-grids{grid-template-columns:1fr!important;gap:13px!important}.xhh-battle-fleet-legend span{font-size:9px}}

/* Owner controls for waiting Rock-Paper-Scissors rooms */
.xhh-rps-room-actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:7px}
.xhh-rps-room-actions .xhh-rps-delete-room{border:1px solid #e7b9b5!important;background:#fff7f6!important;color:#a5362d!important;font-size:13px!important;padding:8px 12px!important}
.xhh-rps-room-actions .xhh-rps-delete-room:disabled{opacity:.55;cursor:wait}
@media(max-width:520px){.xhh-rps-room-card{gap:10px;align-items:flex-start}.xhh-rps-room-actions{flex-direction:column;align-items:stretch}.xhh-rps-room-actions button{white-space:nowrap}}


/* Oẳn tù xì – lightweight throw/reveal animations, scoped to RPS */
#xhh-rps-app .xhh-rps-arena{position:relative;isolation:isolate}
#xhh-rps-app .xhh-rps-arena.throwing:after{content:"OẲN  TÙ  XÌ!";position:absolute;z-index:4;left:50%;top:50%;transform:translate(-50%,-50%);white-space:nowrap;padding:10px 19px;border-radius:30px;background:linear-gradient(135deg,#0b665b,#20a58d);color:#fff;font-size:clamp(14px,3.6vw,21px);font-weight:900;letter-spacing:2px;box-shadow:0 8px 24px rgba(8,88,76,.28);animation:xhhRpsCallout .78s ease both;pointer-events:none}
#xhh-rps-app .gesture{transform-origin:50% 75%;will-change:transform}
#xhh-rps-app .gesture.hand-shake{animation:xhhRpsHandShake .78s cubic-bezier(.36,.07,.19,.97) both}
#xhh-rps-app .xhh-rps-arena.revealed .gesture{animation:xhhRpsReveal .48s cubic-bezier(.18,.89,.32,1.28) both}
#xhh-rps-app .xhh-rps-arena.revealed .xhh-rps-player:first-child .gesture{animation-delay:.04s}
#xhh-rps-app .xhh-rps-arena.revealed .xhh-rps-player:last-child .gesture{animation-delay:.12s}
#xhh-rps-app .xhh-rps-choices button{transition:transform .18s ease,box-shadow .18s ease,background .18s ease}
#xhh-rps-app .xhh-rps-choices button:not(:disabled):active{transform:translateY(2px) scale(.94)}
#xhh-rps-app .xhh-rps-choices button:disabled{opacity:.65}
#xhh-rps-app .xhh-rps-result.result-pop{animation:xhhRpsResult .55s cubic-bezier(.2,.8,.2,1) both}
#xhh-rps-app .xhh-rps-result{transition:background .2s ease,box-shadow .2s ease}
@keyframes xhhRpsHandShake{0%,100%{transform:translateY(0) rotate(0) scale(1)}15%{transform:translateY(-8px) rotate(-13deg) scale(1.06)}30%{transform:translateY(1px) rotate(12deg) scale(.98)}45%{transform:translateY(-7px) rotate(-11deg) scale(1.05)}60%{transform:translateY(1px) rotate(10deg) scale(.98)}75%{transform:translateY(-5px) rotate(-7deg) scale(1.04)}90%{transform:translateY(0) rotate(5deg) scale(1)}}
@keyframes xhhRpsReveal{0%{transform:scale(.35) rotate(-18deg);opacity:.25}65%{transform:scale(1.22) rotate(5deg);opacity:1}100%{transform:scale(1) rotate(0)}}
@keyframes xhhRpsCallout{0%{opacity:0;transform:translate(-50%,-50%) scale(.5)}22%{opacity:1;transform:translate(-50%,-50%) scale(1.08)}78%{opacity:1}100%{opacity:0;transform:translate(-50%,-50%) scale(.92)}}
@keyframes xhhRpsResult{0%{transform:scale(.96);box-shadow:0 0 0 rgba(32,165,141,0)}55%{transform:scale(1.025);box-shadow:0 0 0 7px rgba(32,165,141,.12)}100%{transform:scale(1);box-shadow:0 0 0 rgba(32,165,141,0)}}
@media(prefers-reduced-motion:reduce){#xhh-rps-app .xhh-rps-arena.throwing:after,#xhh-rps-app .gesture.hand-shake,#xhh-rps-app .xhh-rps-arena.revealed .gesture,#xhh-rps-app .xhh-rps-result.result-pop{animation:none!important}#xhh-rps-app .xhh-rps-choices button{transition:none!important}}


/* XHH Caro 1.5.7 – lightweight board and move animations */
.xhh-caro .xhh-caro-board{position:relative;isolation:isolate;overflow:hidden}
.xhh-caro .xhh-caro-cell{position:relative;transform:translateZ(0);transition:background-color .18s ease,box-shadow .18s ease,transform .18s ease}
.xhh-caro .xhh-caro-cell:not(:disabled):hover{transform:scale(.94);box-shadow:0 0 0 2px rgba(46,139,125,.28) inset}
.xhh-caro .xhh-caro-cell.v1{color:#fff!important;text-shadow:0 1px 2px rgba(0,0,0,.28)}
.xhh-caro .xhh-caro-cell.v2{color:#2459b8!important;text-shadow:0 1px 1px rgba(255,255,255,.55)}
.xhh-caro .xhh-caro-cell.xhh-caro-stone-enter{animation:xhhCaroStoneDrop .38s cubic-bezier(.18,.8,.25,1.25) both;z-index:2}
.xhh-caro .xhh-caro-cell.xhh-caro-stone-enter:after{content:"";position:absolute;inset:12%;border:2px solid currentColor;border-radius:50%;opacity:0;animation:xhhCaroRipple .55s ease-out both;pointer-events:none}
.xhh-caro .xhh-caro-board-active{animation:xhhCaroBoardGlow 2.8s ease-in-out infinite}
.xhh-caro .xhh-caro-board-finished{animation:none;box-shadow:0 0 0 2px rgba(46,139,125,.18),0 10px 28px rgba(26,95,83,.12)}
.xhh-caro .xhh-caro-toolbar>b,.xhh-caro .xhh-caro-turn{transition:background-color .2s ease,transform .2s ease}
.xhh-caro .xhh-caro-result-pop{animation:xhhCaroResult .55s cubic-bezier(.2,.8,.2,1) both;background:linear-gradient(100deg,rgba(46,139,125,.10),rgba(91,184,157,.22),rgba(46,139,125,.10));border-radius:12px;padding:10px 12px}
@keyframes xhhCaroStoneDrop{0%{opacity:0;transform:scale(.25) rotate(-18deg)}65%{opacity:1;transform:scale(1.22) rotate(4deg)}100%{opacity:1;transform:scale(1) rotate(0)}}
@keyframes xhhCaroRipple{0%{transform:scale(.45);opacity:.65}100%{transform:scale(1.8);opacity:0}}
@keyframes xhhCaroBoardGlow{0%,100%{box-shadow:0 0 0 0 rgba(46,139,125,0)}50%{box-shadow:0 0 0 3px rgba(46,139,125,.12)}}
@keyframes xhhCaroResult{0%{transform:scale(.97);opacity:.65}65%{transform:scale(1.025)}100%{transform:scale(1);opacity:1}}
@media(prefers-reduced-motion:reduce){.xhh-caro .xhh-caro-cell,.xhh-caro .xhh-caro-board,.xhh-caro .xhh-caro-result-pop{animation:none!important;transition:none!important}.xhh-caro .xhh-caro-cell.xhh-caro-stone-enter:after{display:none}}


/* Caro 1.5.9: larger, high-contrast X/O stones for mobile readability */
.xhh-caro .xhh-caro-cell{
 font-size:clamp(19px,4.3vw,31px)!important;
 font-weight:950!important;
 line-height:1!important;
 letter-spacing:-1px;
 -webkit-text-stroke:.35px currentColor;
 text-align:center!important;
 vertical-align:middle;
}
.xhh-caro .xhh-caro-cell.v1{
 color:#172b27!important;
 text-shadow:0 1px 0 #fff,0 0 2px rgba(0,0,0,.22)!important;
}
.xhh-caro .xhh-caro-cell.v2{
 color:#145da8!important;
 text-shadow:0 1px 0 #fff,0 0 3px rgba(20,93,168,.25)!important;
}
@media(max-width:600px){
 .xhh-caro .xhh-caro-cell{font-size:clamp(20px,4.8vw,30px)!important}
}

/* Guest login and customer registration gate */
.xhh-minigame-auth{box-sizing:border-box;width:100%;padding:18px 12px;margin:0 auto;background:#f5f8f7;border-radius:16px;color:#20332f}
.xhh-minigame-auth *{box-sizing:border-box}
.xhh-minigame-auth-card{max-width:480px;margin:0 auto;padding:24px;background:#fff;border:1px solid #e3ece8;border-radius:18px;box-shadow:0 8px 28px rgba(20,70,58,.08)}
.xhh-minigame-auth-mark{font-size:34px;margin-bottom:8px}
.xhh-minigame-auth h2{font-size:24px;margin:8px 0;color:#173f38}
.xhh-minigame-auth p{line-height:1.55}
.xhh-minigame-auth-login form,.xhh-minigame-register-form{display:grid;gap:12px}
.xhh-minigame-auth label{display:grid;gap:6px;font-weight:600}
.xhh-minigame-auth input[type=text],.xhh-minigame-auth input[type=email],.xhh-minigame-auth input[type=password]{width:100%;min-height:46px;padding:10px 12px;border:1px solid #ccd9d4;border-radius:10px;font-size:16px}
.xhh-minigame-auth input[type=submit],.xhh-minigame-register-form button{width:100%;min-height:48px;border:0;border-radius:10px;background:#218575;color:#fff;font-weight:700;font-size:16px;cursor:pointer}
.xhh-minigame-auth-login .login-remember{display:flex;align-items:center;gap:8px}
.xhh-minigame-auth-divider{text-align:center;border-top:1px solid #e7eeeb;margin:22px 0 14px}
.xhh-minigame-auth-divider span{display:inline-block;position:relative;top:-11px;padding:0 10px;background:#fff;color:#71817b;font-size:11px;font-weight:700}
.xhh-minigame-auth-register-box{border:1px solid #cfe2dc;border-radius:12px;padding:12px}
.xhh-minigame-auth-register-box summary{color:#187664;font-weight:700;cursor:pointer;padding:5px}
.xhh-minigame-register-form{padding:14px 4px 4px}
.xhh-minigame-auth small{display:block;margin-top:14px;color:#697a74;line-height:1.5}
.xhh-minigame-auth-error{padding:10px;background:#fff1f0;color:#a12e27;border-radius:8px}
@media(max-width:600px){.xhh-minigame-auth{padding:10px 8px;border-radius:0}.xhh-minigame-auth-card{padding:20px 16px;border-radius:14px}}

/* Public minigame leaderboards */
.xhh-mg-rank{max-width:1180px;margin:18px auto;padding:0 12px;box-sizing:border-box;color:#18313b}
.xhh-mg-rank-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.xhh-mg-rank-grid section{background:#fff;border:1px solid #dce8e5;border-radius:14px;padding:14px;box-shadow:0 4px 16px rgba(20,60,55,.06);min-width:0}
.xhh-mg-rank h3{font-size:15px;line-height:1.35;margin:0 0 10px;color:#176b5c}
.xhh-mg-rank ol{list-style:none;margin:0;padding:0;counter-reset:rank}
.xhh-mg-rank li{counter-increment:rank;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 0;border-bottom:1px solid #edf2f1;font-size:13px}
.xhh-mg-rank li:before{content:counter(rank);flex:0 0 22px;width:22px;height:22px;border-radius:50%;display:grid;place-items:center;background:#e8f4f1;color:#176b5c;font-weight:700}
.xhh-mg-rank li span{flex:1;min-width:0;overflow-wrap:anywhere}
.xhh-mg-rank li b{white-space:nowrap;color:#14765f;font-variant-numeric:tabular-nums}
.xhh-mg-rank small{display:block;margin-top:9px;color:#647875;font-size:11px;line-height:1.45}
@media(max-width:640px){.xhh-mg-rank-grid{grid-template-columns:1fr}.xhh-mg-rank{padding:0 8px}.xhh-mg-rank-grid section{padding:12px}}

/* Minigame leaderboard refresh 1.6.6 */
.xhh-mg-rank{margin:18px 0 26px;color:#243447}
.xhh-mg-rank-heading{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:6px;margin:0 0 12px;padding:15px 17px;border-radius:16px;background:linear-gradient(120deg,#eaf7f3,#f3f7fb);border:1px solid #dceee8}
.xhh-mg-rank-heading span{font-weight:800;letter-spacing:.04em;color:#176b5c}
.xhh-mg-rank-heading small{color:#718096;font-size:12px}
.xhh-mg-rank-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.xhh-mg-rank-card{min-width:0;padding:16px;border:1px solid #e5ecef;border-radius:18px;background:#fff;box-shadow:0 5px 18px rgba(25,55,70,.06)}
.xhh-mg-rank-card h3{margin:0 0 12px;font-size:16px;line-height:1.35;color:#203447}
.xhh-mg-rank-card ol{list-style:none;margin:0;padding:0}
.xhh-mg-rank-row{display:flex;align-items:center;gap:10px;padding:10px 0;border-bottom:1px solid #eef2f4}
.xhh-mg-rank-row:last-child{border-bottom:0}
.xhh-mg-rank-pos{width:28px;flex:0 0 28px;text-align:center;font-size:19px}
.xhh-mg-rank-number{display:inline-flex;width:24px;height:24px;align-items:center;justify-content:center;border-radius:50%;background:#f0f4f6;color:#64748b;font-size:12px;font-weight:800}
.xhh-mg-rank-name{flex:1;min-width:0;font-weight:700;overflow-wrap:anywhere}
.xhh-mg-rank-name small{display:block;margin-top:2px;color:#8a98a5;font-size:11px;font-weight:500}
.xhh-mg-rank-row>b{white-space:nowrap;color:#176b5c;font-size:14px}
.xhh-mg-rank-row>b small{font-size:11px;font-weight:500;color:#82918f}
.xhh-mg-rank-card>p{margin:12px 0 0;color:#7b8791;font-size:11px;line-height:1.5}
.xhh-mg-rank-empty{padding:16px 4px;color:#89949e;font-size:13px}
@media(max-width:640px){.xhh-mg-rank-grid{grid-template-columns:1fr;gap:10px}.xhh-mg-rank-card{padding:14px}.xhh-mg-rank-heading{align-items:flex-start;flex-direction:column}.xhh-mg-rank-row{padding:9px 0}}

/* Public live points ticker 1.6.7 */
.xhh-mg-live{margin:14px 0 22px;border:1px solid #dcebe7;border-radius:16px;background:#fff;box-shadow:0 7px 22px rgba(25,70,60,.07);overflow:hidden;color:#263746}
.xhh-mg-live-head{display:flex;align-items:center;gap:9px;padding:12px 15px;background:linear-gradient(110deg,#eaf7f2,#f4f8fb);border-bottom:1px solid #e3efeb}
.xhh-mg-live-head b{font-size:13px;letter-spacing:.035em;color:#176b5c}
.xhh-mg-live-head small{margin-left:auto;padding:4px 8px;border-radius:20px;background:#d8f2e7;color:#16734f;font-size:10px;font-weight:800}
.xhh-mg-live-dot{width:8px;height:8px;border-radius:50%;background:#19b779;box-shadow:0 0 0 4px rgba(25,183,121,.13);animation:xhh-live-pulse 1.7s infinite}
.xhh-mg-live-list{max-height:270px;overflow:auto;padding:2px 14px}
.xhh-mg-live-row{display:flex;align-items:center;gap:10px;padding:10px 0;border-bottom:1px solid #eff3f4}
.xhh-mg-live-row:last-child{border-bottom:0}
.xhh-mg-live-avatar{width:30px;height:30px;display:flex;align-items:center;justify-content:center;flex:0 0 30px;border-radius:50%;background:#e8f6f0;color:#16845e;font-size:18px;font-weight:800}
.xhh-mg-live-info{flex:1;min-width:0}
.xhh-mg-live-info b{display:block;overflow-wrap:anywhere;font-size:13px;color:#344657}
.xhh-mg-live-info small{display:block;margin-top:2px;color:#87949f;font-size:11px}
.xhh-mg-live-row strong{white-space:nowrap;font-size:13px}
.xhh-mg-live-row .is-plus{color:#159765}
.xhh-mg-live-row .is-minus{color:#d45a55}
.xhh-mg-live-empty{padding:18px 4px;color:#8b98a2;font-size:12px;text-align:center}
@keyframes xhh-live-pulse{50%{box-shadow:0 0 0 7px rgba(25,183,121,.04);opacity:.7}}
@media(max-width:640px){.xhh-mg-live{border-radius:13px}.xhh-mg-live-head{padding:11px 12px}.xhh-mg-live-list{max-height:230px;padding:2px 11px}}

/* Compact positive-credit-only activity feed 1.6.8 */
.xhh-mg-live-head b{font-size:12px;letter-spacing:.04em}
.xhh-mg-live-list{max-height:220px;padding:3px 14px}
.xhh-mg-live-row{display:flex;align-items:center;gap:10px;padding:10px 0;border-bottom:1px solid #edf2f1}
.xhh-mg-live-plus{width:28px;height:28px;display:flex;align-items:center;justify-content:center;flex:0 0 28px;border-radius:50%;background:#e3f7ed;color:#128454;font-size:19px;font-weight:800}
.xhh-mg-live-amount{flex:1;color:#148456;font-size:14px;font-weight:800}
.xhh-mg-live-row time{white-space:nowrap;color:#82918f;font-size:11px}
@media(max-width:640px){.xhh-mg-live-list{max-height:190px;padding:2px 11px}.xhh-mg-live-row{gap:8px}.xhh-mg-live-row time{font-size:10px}}

/* Activity feed identity and game labels 1.6.9 */
.xhh-mg-live-row{display:flex;align-items:center;gap:10px}
.xhh-mg-live-detail{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.xhh-mg-live-detail b{font-size:13px;color:#344657;overflow-wrap:anywhere}
.xhh-mg-live-detail small{font-size:11px;color:#85939d}
.xhh-mg-live-right{display:flex;flex-direction:column;align-items:flex-end;gap:3px;white-space:nowrap}
.xhh-mg-live-right strong{color:#148456;font-size:13px}
.xhh-mg-live-right time{font-size:10px;color:#82918f}

.xhh-room-ledger{margin:14px 0;padding:14px;border:1px solid #dcebe7;border-radius:14px;background:#fff}
.xhh-room-ledger h4{margin:0 0 10px;color:#176b5c;font-size:15px}
.xhh-room-ledger table{width:100%;border-collapse:collapse;font-size:12px}
.xhh-room-ledger td,.xhh-room-ledger th{padding:7px 5px;border-bottom:1px solid #edf1f2;text-align:left}
.xhh-room-ledger .plus{color:#148456;font-weight:700}.xhh-room-ledger .minus{color:#c45b55;font-weight:700}
.xhh-room-leave{margin-top:10px;padding:9px 14px;border:0;border-radius:9px;background:#fff0ef;color:#b5433d;font-weight:700}

/* Friendly animated children showdown for online rock-paper-scissors */
.xhh-rps-kids-stage{margin:14px auto 12px;max-width:390px;text-align:center}
.xhh-rps-kids-scene{width:100%;aspect-ratio:1/1;max-height:310px;background-image:url("rps-kids-1.png");background-size:contain;background-repeat:no-repeat;background-position:center;transition:background-image .12s ease;filter:drop-shadow(0 8px 14px rgba(24,90,77,.10))}
.xhh-rps-kids-scene.is-shaking{animation:xhhKidsBounce .22s ease-in-out infinite alternate}
.xhh-rps-kids-result{display:flex;align-items:center;justify-content:center;gap:18px;margin:8px auto 0}
.xhh-rps-kids-hand{flex:1;max-width:145px;padding:12px 8px;border:1px solid #dcebe7;border-radius:16px;background:linear-gradient(180deg,#fff,#f2faf7);box-shadow:0 5px 15px rgba(25,85,73,.07)}
.xhh-rps-kids-hand .emoji{display:block;font-size:48px;line-height:1.2}
.xhh-rps-kids-hand b{display:block;margin-top:5px;color:#285f54;font-size:13px}
.xhh-rps-kids-vs{font-weight:800;color:#8ca59f}
.xhh-rps-kids-caption{margin-top:9px;color:#2d7062;font-weight:700;font-size:14px}
@keyframes xhhKidsBounce{from{transform:translateY(0) scale(1)}to{transform:translateY(-5px) scale(1.015)}}
@media(max-width:600px){.xhh-rps-kids-stage{max-width:310px}.xhh-rps-kids-scene{max-height:260px}.xhh-rps-kids-hand .emoji{font-size:42px}}

/* 1.7.5: fix visible illustration sizing and round-by-round audit */
.xhh-rps-kids-stage{width:100%;max-width:340px;margin:10px auto 14px;display:block;text-align:center}
img.xhh-rps-kids-scene{display:block;width:min(100%,320px);height:auto;max-height:250px;aspect-ratio:1/1;object-fit:contain;margin:0 auto;opacity:1;visibility:visible}
.xhh-rps-kids-result{width:100%;gap:8px}
.xhh-rps-kids-hand{min-width:0;padding:10px 5px}
.xhh-rps-kids-hand b{font-size:12px;overflow-wrap:anywhere}
.xhh-rps-kids-hand small{display:block;color:#71847f;margin-top:3px}
.xhh-room-ledger-scroll{width:100%;overflow-x:auto}
.xhh-room-ledger-note{margin:9px 0 0;color:#71817d;font-size:12px;line-height:1.5}
#room-round-history table{min-width:420px}
#room-round-history td,#room-round-history th{font-size:12px}
@media(max-width:600px){.xhh-rps-kids-stage{max-width:300px}img.xhh-rps-kids-scene{width:min(100%,280px);max-height:220px}}

/* 1.7.6: compact, visible RPS animation stage; override theme image/layout rules */
#xhh-rps-app .xhh-rps-kids-stage{display:block;width:min(100%,360px);margin:12px auto 16px;padding:0;text-align:center;min-height:0}
#xhh-rps-app .xhh-rps-kids-scene{display:block;width:100%;height:clamp(210px,68vw,300px);max-height:300px;aspect-ratio:auto;background-size:contain;background-repeat:no-repeat;background-position:center;margin:0 auto;border:0;object-fit:contain;filter:drop-shadow(0 7px 12px rgba(24,90,77,.10))}
#xhh-rps-app .xhh-rps-kids-result[hidden]{display:none!important}
#xhh-rps-app .xhh-rps-kids-result{display:flex;align-items:stretch;justify-content:center;gap:10px;margin:8px auto 0}
#xhh-rps-app .xhh-rps-kids-caption{margin:8px auto 0;line-height:1.45}
#xhh-rps-app .xhh-room-ledger-scroll{max-width:100%;overflow-x:auto}
#xhh-rps-app #room-round-history{margin-top:14px}
@media(max-width:480px){#xhh-rps-app .xhh-rps-kids-stage{width:min(100%,310px)}#xhh-rps-app .xhh-rps-kids-scene{height:clamp(190px,66vw,250px)}#xhh-rps-app .xhh-rps-kids-hand .emoji{font-size:40px}}

/* 1.7.8: visible two-hand animation in waiting and reveal states */
#xhh-rps-app .xhh-rps-kids-stage{display:block!important;width:min(100%,360px);max-width:360px;margin:14px auto 18px;padding:14px 10px;border:1px solid #e0eee9;border-radius:20px;background:linear-gradient(180deg,#fff,#f1faf6);box-sizing:border-box;text-align:center}
#xhh-rps-app .xhh-rps-duel{display:flex;align-items:center;justify-content:space-around;gap:8px;min-height:150px}
#xhh-rps-app .xhh-rps-player{display:flex;flex:1;min-width:0;flex-direction:column;align-items:center;gap:7px}
#xhh-rps-app .xhh-rps-player-name{max-width:100%;font-size:13px;font-weight:700;color:#28675a;overflow-wrap:anywhere;text-align:center}
#xhh-rps-app .xhh-rps-animated-hand{display:grid;place-items:center;width:104px;height:104px;border-radius:22px;background:#fff;border:1px solid #dcece6;box-shadow:0 5px 16px rgba(25,85,73,.08);font-size:66px;line-height:1}
#xhh-rps-app .xhh-rps-move-label{font-size:13px;font-weight:700;color:#54766e;min-height:20px}
#xhh-rps-app .xhh-rps-duel-vs{font-size:12px;font-weight:900;color:#9ab0aa}
#xhh-rps-app .xhh-rps-kids-caption{margin:12px auto 0;color:#2d7062;font-size:14px;font-weight:700;line-height:1.45}
#xhh-rps-app .xhh-rps-animated-hand.is-spinning{animation:xhhHandPulse .16s ease-in-out infinite alternate}
#xhh-rps-app .xhh-rps-kids-stage.is-waiting .xhh-rps-animated-hand{animation:xhhHandIdle .75s ease-in-out infinite alternate}
#xhh-rps-app .xhh-rps-kids-stage.is-waiting .xhh-rps-player:last-child .xhh-rps-animated-hand{animation-delay:.2s}
#xhh-rps-app .xhh-rps-animated-hand.is-locked{transform:scale(1.08);border-color:#9bd5c3;background:#edfaf4}
@keyframes xhhHandIdle{from{transform:translateY(2px) rotate(-5deg)}to{transform:translateY(-5px) rotate(5deg)}}
@keyframes xhhHandPulse{from{transform:scale(.94) rotate(-7deg)}to{transform:scale(1.06) rotate(7deg)}}
@media(max-width:480px){#xhh-rps-app .xhh-rps-kids-stage{width:100%;padding:10px 6px}#xhh-rps-app .xhh-rps-duel{min-height:128px}#xhh-rps-app .xhh-rps-animated-hand{width:82px;height:82px;font-size:54px}}
@media(prefers-reduced-motion:reduce){#xhh-rps-app .xhh-rps-animated-hand{animation:none!important}}


/* XHH Chess - isolated styles */
.xhh-chess{max-width:760px;margin:18px auto;padding:clamp(12px,3vw,22px);border-radius:18px;background:#fff;color:#17212b;box-shadow:0 8px 28px rgba(0,0,0,.08);box-sizing:border-box}
.xhh-chess *{box-sizing:border-box}.xhh-chess-head{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}.xhh-chess-head h2{margin:5px 0;font-size:clamp(22px,5vw,30px)}.xhh-chess-head p{margin:0;color:#64748b}.xhh-chess-tag{background:#e7f5ef;color:#176b4d;padding:8px 12px;border-radius:30px;font-size:13px;font-weight:700}
.xhh-chess-toolbar{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin:16px 0}.xhh-chess-toolbar label{display:flex;align-items:center;gap:6px;font-size:13px}.xhh-chess-toolbar select,.xhh-chess-toolbar button{min-height:38px;border:1px solid #d6dee8;border-radius:9px;padding:7px 10px;background:#fff;color:#17212b}.xhh-chess-toolbar button{cursor:pointer;font-weight:700}.xhh-chess-toolbar button:disabled{opacity:.45;cursor:not-allowed}
.xhh-chess-status{padding:10px 12px;background:#f1f5f9;border-radius:10px;margin:10px 0;font-weight:700}.xhh-chess-board{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));width:min(100%,560px);margin:0 auto;border:5px solid #493b30;border-radius:7px;overflow:hidden;aspect-ratio:1}.xhh-chess-square{border:0;border-radius:0;padding:0;margin:0;min-width:0;aspect-ratio:1;display:flex;align-items:center;justify-content:center;font-family:"Segoe UI Symbol","DejaVu Sans",serif;font-size:clamp(23px,7.5vw,53px);line-height:1;cursor:pointer;touch-action:manipulation}.xhh-chess-square.light{background:#f0d9b5;color:#fff;text-shadow:0 1px 2px #333}.xhh-chess-square.dark{background:#b58863;color:#171717;text-shadow:0 1px 2px #eee}.xhh-chess-square.selected{box-shadow:inset 0 0 0 4px #facc15}.xhh-chess-square.target{position:relative}.xhh-chess-square.target:after{content:"";width:23%;height:23%;border-radius:50%;background:#166534;opacity:.55;position:absolute}.xhh-chess-foot{display:flex;justify-content:space-between;gap:10px;max-width:560px;margin:10px auto;color:#475569;font-size:13px}.xhh-chess-note{font-size:12px;color:#64748b;line-height:1.5;margin:12px 0 0}
@media(max-width:480px){.xhh-chess{margin:8px auto;padding:10px;border-radius:12px}.xhh-chess-toolbar{gap:6px}.xhh-chess-toolbar label{font-size:12px}.xhh-chess-toolbar select,.xhh-chess-toolbar button{font-size:12px;padding:6px 8px}.xhh-chess-board{border-width:3px}}

.xhh-chess-online{margin-top:18px;padding-top:14px;border-top:1px solid #e2e8f0}.xhh-chess-online h3{margin:0 0 10px;font-size:18px}.xhh-chess-room-actions{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:10px}.xhh-chess-room-actions select,.xhh-chess-room-actions button,.xhh-chess-room-row button{border:1px solid #cbd5e1;border-radius:8px;padding:8px 11px;background:#fff;cursor:pointer}.xhh-chess-room-row{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:10px;border:1px solid #e2e8f0;border-radius:9px;margin:7px 0;font-size:13px;flex-wrap:wrap}.xhh-chess-room-row button{font-weight:700;color:#176b4d}

.xhh-chess-live{margin:14px 0;padding:12px;border:1px solid #dbe4ec;border-radius:12px;background:#f8fafc}.xhh-chess-live[hidden]{display:none!important}.xhh-chess-live-head{display:flex;justify-content:space-between;gap:8px;align-items:center;margin-bottom:10px;flex-wrap:wrap}.xhh-chess-live-status{font-size:13px;color:#176b4d;font-weight:700}.xhh-chess-live-board{max-width:480px}.xhh-chess-live-board .xhh-chess-square{font-size:clamp(22px,7vw,46px)}


/* XHH Chess online lobby refresh — scoped to online mode only */
.xhh-chess-online{margin-top:24px;padding:22px;border:1px solid #dce7e4;border-radius:16px;background:linear-gradient(180deg,#fbfdfc,#f4f8f6);min-width:0}
.xhh-chess-online h3{font-size:clamp(20px,4vw,25px);line-height:1.25;margin:0 0 6px;color:#172b28}
.xhh-chess-online>h3:after{content:"";display:block;width:42px;height:3px;margin-top:10px;border-radius:9px;background:#2e8b7d}
.xhh-chess-room-actions{align-items:stretch;gap:10px;margin:16px 0}
.xhh-chess-room-actions select{flex:1 1 100%;min-width:0;min-height:48px;padding:11px 14px;border-radius:11px;background:#fff;font-size:15px}
.xhh-chess-room-actions button{flex:1 1 auto;min-height:46px;padding:10px 15px;border-radius:11px;font-weight:700;font-size:14px;color:#176b58;background:#fff;box-shadow:0 2px 7px rgba(20,55,45,.06)}
.xhh-chess-room-actions button[data-chess-create]{background:#237d6d;color:#fff;border-color:#237d6d}
.xhh-chess-room-row{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:14px;margin:9px 0;border:1px solid #e0e9e6;border-radius:13px;background:#fff;box-shadow:0 2px 8px rgba(20,55,45,.035);font-size:14px}
.xhh-chess-room-meta{display:flex;flex:1 1 170px;min-width:0;flex-direction:column;gap:5px}
.xhh-chess-room-meta strong{font-size:15px;color:#203b35;letter-spacing:.02em}
.xhh-chess-room-meta small{font-size:12px;line-height:1.4;color:#687b75}
.xhh-chess-room-buttons{display:flex;flex-wrap:wrap;gap:7px}
.xhh-chess-room-row button{min-height:38px;padding:8px 12px;border-radius:9px;font-size:13px;font-weight:700;color:#176b58;background:#fff}
.xhh-chess-room-row button:last-child{color:#a33a36}
.xhh-chess-empty{padding:18px;border:1px dashed #cbdad5;border-radius:12px;background:#fff;color:#667873;font-size:14px;line-height:1.5}
.xhh-chess-live{margin:18px 0 0;padding:16px;border:1px solid #dce7e4;border-radius:16px;background:#fff;box-shadow:0 4px 18px rgba(20,55,45,.05)}
.xhh-chess-live-head{align-items:flex-start}
.xhh-chess-live-head strong{font-size:17px;color:#203b35}
.xhh-chess-live-status{font-size:13px;line-height:1.45}
.xhh-chess-live-board{width:min(100%,480px);max-width:480px;margin:12px auto;border:4px solid #493b30;border-radius:10px;overflow:hidden;aspect-ratio:1;display:grid;grid-template-columns:repeat(8,minmax(0,1fr));grid-template-rows:repeat(8,minmax(0,1fr));touch-action:manipulation}
.xhh-chess-live-board .xhh-chess-square{width:100%;height:100%;min-width:0;min-height:0;padding:0;display:flex;align-items:center;justify-content:center;line-height:1;font-size:clamp(22px,7.3vw,48px);border:0;border-radius:0}
.xhh-chess-live-board .xhh-chess-square:focus-visible{outline:3px solid #167b68;outline-offset:-3px;z-index:1}
.xhh-chess-live-board .xhh-chess-square.light{background:#f0d9b5}
.xhh-chess-live-board .xhh-chess-square.dark{background:#b58863}
.xhh-chess-live-board .xhh-chess-square{color:#171717;text-shadow:0 1px 1px rgba(255,255,255,.55)}
.xhh-chess-live-board .xhh-chess-square:empty:after{content:""}
.xhh-chess-live .xhh-chess-room-actions{justify-content:center}
.xhh-chess-live .xhh-chess-room-actions button{flex:1 1 140px}
.xhh-chess-online .xhh-chess-note{font-size:12px;line-height:1.55;color:#71817c;margin:12px 0 0}
@media(max-width:600px){
 .xhh-chess-online{padding:14px;margin-top:18px;border-radius:13px}
 .xhh-chess-room-row{align-items:stretch;flex-direction:column;padding:12px}
 .xhh-chess-room-buttons{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
 .xhh-chess-room-buttons button{width:100%;min-width:0}
 .xhh-chess-live{padding:10px;margin-top:14px}
 .xhh-chess-live-board{width:100%;max-width:100%;border-width:3px}
 .xhh-chess-live-board .xhh-chess-square{font-size:clamp(25px,9vw,39px)}
}


/* Online chess board: fixed 8x8 geometry and accessible touch targets */
.xhh-chess-live-board{display:grid!important;grid-template-columns:repeat(8,minmax(0,1fr))!important;grid-template-rows:repeat(8,minmax(0,1fr))!important;grid-auto-flow:row;aspect-ratio:1/1;width:min(100%,480px);height:auto;min-height:0;max-height:none;overflow:hidden;box-sizing:border-box}
.xhh-chess-live-board>.xhh-chess-square{width:100%;height:100%;min-width:0;min-height:0;aspect-ratio:auto!important;box-sizing:border-box;display:flex;align-items:center;justify-content:center;overflow:hidden;font-family:"Segoe UI Symbol","DejaVu Sans",serif;font-size:clamp(25px,7.2vw,46px);line-height:1}
.xhh-chess-live-board>.xhh-chess-square:disabled{opacity:1;cursor:default}
.xhh-chess-live-board>.xhh-chess-square.light{color:#fffdf4;text-shadow:0 1px 2px #29221b,0 0 2px #29221b}
.xhh-chess-live-board>.xhh-chess-square.dark{color:#171717;text-shadow:0 1px 1px #f4e8d6}
.xhh-chess-live-board>.xhh-chess-square.selected{box-shadow:inset 0 0 0 3px #facc15}
@media(max-width:600px){.xhh-chess-live-board{width:100%;max-width:100%;border-width:3px}.xhh-chess-live-board>.xhh-chess-square{font-size:clamp(27px,9vw,42px)}}


/* Online chess premium presentation and move feedback */
.xhh-chess-stake-control{display:flex;align-items:center;gap:8px;flex:1 1 100%;padding:10px 12px;border:1px solid #d9e6e1;border-radius:12px;background:#fff;color:#36534b;font-size:13px;font-weight:700}
.xhh-chess-stake-control input{width:110px;max-width:42%;min-height:40px;padding:8px 10px;border:1px solid #cbdcd5;border-radius:9px;background:#fbfdfc;color:#173b32;font-weight:700}
.xhh-chess-live{position:relative;isolation:isolate;overflow:hidden}
.xhh-chess-live:before{content:"";position:absolute;inset:0 0 auto;height:4px;background:linear-gradient(90deg,#2e8b7d,#a9d9c7,#d6b36a);z-index:1}
.xhh-chess-live-board{box-shadow:0 12px 30px rgba(40,32,24,.18),0 0 0 1px rgba(73,59,48,.12);background:#493b30}
.xhh-chess-live-board>.xhh-chess-square{position:relative;transition:filter .16s ease,box-shadow .16s ease,transform .16s ease}
.xhh-chess-live-board>.xhh-chess-square:not(:disabled):active{filter:brightness(1.12);transform:scale(.96)}
.xhh-chess-live-board>.xhh-chess-square.last-from{background-image:linear-gradient(rgba(250,204,21,.24),rgba(250,204,21,.24))}
.xhh-chess-live-board>.xhh-chess-square.last-to{background-image:linear-gradient(rgba(34,197,94,.28),rgba(34,197,94,.28));animation:xhhChessMoveGlow .75s ease-out 1}
.xhh-chess-live-board>.xhh-chess-square.in-check{background-image:radial-gradient(circle,rgba(220,38,38,.58),rgba(220,38,38,.08) 72%);animation:xhhChessCheckPulse 1.15s ease-in-out infinite}
.xhh-chess-live-status{display:inline-flex;align-items:center;gap:7px;padding:7px 10px;border-radius:999px;background:#eef7f3;color:#1c6856;font-weight:700}
.xhh-chess-live-hint,.xhh-chess-live [data-chess-live-hint]{display:block;margin-top:10px;padding:10px 12px;border-radius:10px;background:#f5f8f7;color:#52665f;font-size:12px;line-height:1.5}
@keyframes xhhChessMoveGlow{0%{box-shadow:inset 0 0 0 0 rgba(22,163,74,0)}35%{box-shadow:inset 0 0 0 5px rgba(22,163,74,.55)}100%{box-shadow:inset 0 0 0 2px rgba(22,163,74,.18)}}
@keyframes xhhChessCheckPulse{0%,100%{filter:brightness(1)}50%{filter:brightness(1.2)}}
@media(prefers-reduced-motion:reduce){.xhh-chess-live-board>.xhh-chess-square,.xhh-chess-live-board>.xhh-chess-square.last-to,.xhh-chess-live-board>.xhh-chess-square.in-check{animation:none!important;transition:none!important}}
@media(max-width:600px){.xhh-chess-stake-control{justify-content:space-between}.xhh-chess-stake-control input{width:100px}}

.xhh-chess-board>.xhh-chess-square{position:relative;transition:filter .16s ease,box-shadow .16s ease,transform .16s ease}
.xhh-chess-board>.xhh-chess-square:not(:disabled):active{filter:brightness(1.12);transform:scale(.96)}
.xhh-chess-board>.xhh-chess-square.last-from{background-image:linear-gradient(rgba(250,204,21,.24),rgba(250,204,21,.24))}
.xhh-chess-board>.xhh-chess-square.last-to{background-image:linear-gradient(rgba(34,197,94,.28),rgba(34,197,94,.28));animation:xhhChessMoveGlow .75s ease-out 1}
.xhh-chess-board>.xhh-chess-square.capture-flash{animation:xhhChessCapture .45s ease-out 1}
.xhh-chess-board>.xhh-chess-square.in-check{background-image:radial-gradient(circle,rgba(220,38,38,.58),rgba(220,38,38,.08) 72%);animation:xhhChessCheckPulse 1.15s ease-in-out infinite}
@keyframes xhhChessCapture{0%{filter:brightness(1.8)}100%{filter:brightness(1)}}
@media(prefers-reduced-motion:reduce){.xhh-chess-board>.xhh-chess-square{animation:none!important;transition:none!important}}
