:root{
  --ch-night:#100a26;
  --ch-indigo:#21164a;
  --ch-purple:#49307b;
  --ch-gold:#f2c45c;
  --ch-gold-deep:#9e6428;
  --ch-cream:#fff6d8;
  --ch-text:#fffaf0;
  --ch-muted:#d6c9e7;
}

html,body{background:#100a26!important}
body{font-family:Nunito,"Segoe UI",sans-serif}
#cv{opacity:.82;filter:saturate(1.08) contrast(1.04) brightness(.72)}
#fx{z-index:12}

/* Tata letak ringkas tetap dipertahankan, kulit visual kembali ke Dehayuk. */
#hud{
  position:fixed!important;z-index:20;height:56px;padding:6px max(8px,var(--dk-sr)) 6px max(8px,var(--dk-sl));
  align-items:center!important;background:linear-gradient(180deg,rgba(83,48,126,.98),rgba(27,17,61,.98));
  border-bottom:2px solid var(--ch-gold);box-shadow:0 4px 18px #05020db8,inset 0 1px #fff5c94d;
  filter:none!important
}
#hud::after{content:"";position:absolute;left:0;right:0;bottom:2px;height:1px;background:linear-gradient(90deg,transparent,#fff2ad,transparent);opacity:.72;pointer-events:none}
#hud .dk-circle{
  width:44px!important;height:44px!important;border:1px solid #ffdc7d!important;border-radius:12px!important;
  background:linear-gradient(145deg,#f5a640,#c85b29)!important;
  box-shadow:inset 0 1px #fff3bf,0 3px 0 #6e2e1f,0 5px 12px #08020d99!important
}
#hud .dk-circle svg{width:22px!important;height:22px!important}
.ch-brand{position:absolute;left:62px;top:0;height:56px;display:flex;align-items:center;gap:6px;color:var(--ch-text);font:900 18px/1 "Baloo 2",Nunito,sans-serif;letter-spacing:.35px;pointer-events:none;text-shadow:0 2px 0 #13071f,0 0 12px #8c50d788}
.ch-brand>span{color:var(--ch-gold);font-size:27px;filter:drop-shadow(0 2px #5a3215) drop-shadow(0 0 5px #ffd97866)}
.ch-brand>b{color:#ffe78f;font-size:10px;align-self:flex-end;margin:0 0 12px -34px;letter-spacing:1.25px}
.turn{left:auto!important;right:72px!important;top:9px!important;width:auto!important}
#hTurn{
  height:38px;padding:0 12px!important;border:1px solid #f2c45c!important;border-radius:11px!important;
  background:linear-gradient(180deg,#684796,#34215e)!important;color:#fff9e7!important;
  box-shadow:inset 0 1px #ffffff52,0 3px 0 #130b2e,0 0 12px #7d4fbd55!important;
  font:900 12px/1 Nunito,sans-serif!important;text-shadow:0 1px 0 #1b0d30
}
.hr{position:absolute;right:9px;top:9px!important;gap:0!important}
.hr small{
  display:grid;place-items:center;width:54px;height:38px;padding:0!important;border:1px solid #eac368!important;border-radius:11px!important;
  background:linear-gradient(180deg,#fff5cf,#e4c47a)!important;color:#3c2457!important;
  box-shadow:inset 0 1px #fff,0 3px 0 #795025!important;text-shadow:none!important;font-size:10px!important
}

/* Identitas dan jam menempel pada sisi papan agar alur pandang langsung terbaca. */
.pbar{
  box-sizing:border-box;height:48px!important;padding:4px 8px;gap:8px;color:var(--ch-text);
  background:linear-gradient(90deg,rgba(32,19,66,.97),rgba(58,31,86,.96))!important;
  border:1px solid #bb8c45!important;border-radius:9px!important;
  box-shadow:inset 0 1px #fff4bb2e,0 3px 9px #05010ba8!important
}
.pbar.on{
  background:linear-gradient(90deg,rgba(66,43,88,.98),rgba(33,64,70,.98))!important;
  border-color:#f3ce68!important;
  box-shadow:inset 5px 0 #f1c551,inset 0 1px #fff6cf4a,0 0 13px #e4b84e52,0 3px 9px #05010ba8!important
}
.pbar .av{
  width:38px;height:38px;border:1px solid #e7be63;border-radius:8px;
  background:linear-gradient(145deg,#fff9e8,#d9c598);box-shadow:inset 0 0 0 1px #fff,0 2px 0 #6b431e,0 3px 7px #08020eaa
}
.pbar .av svg{width:32px;height:32px}.pbar .nm b{font-size:14px;text-shadow:0 2px 0 #12091e}.pbar .tray{height:16px}.pbar .tray svg{width:15px;height:15px}.pbar .tray em{font-size:11px;color:#ffe488}
.co-clock{
  min-width:78px;padding:8px 7px;border:1px solid #e8c36e;border-radius:8px;color:#fff7dc;
  background:linear-gradient(180deg,#2c1b46,#150d29);box-shadow:inset 0 1px #fff2bf30,0 2px 0 #07030e;font-size:20px;text-shadow:0 2px 0 #09030f
}
.co-clock[data-running=true]{color:#382546;background:linear-gradient(180deg,#fff4bf,#e7be55);border-color:#fff0a6;box-shadow:inset 0 1px #fff,0 0 12px #ffd4677a}

/* Papan dan bidak lama dipertahankan, bingkai dibuat seperti properti premium Dehayuk. */
#bw{
  border:4px solid #d4a44c!important;border-radius:8px!important;background:#2b1840!important;
  box-shadow:inset 0 0 0 1px #fff1b6,0 4px 0 #6b341e,0 10px 25px #05010dbf,0 0 20px #cc8d3f3d!important;
  overflow:hidden
}
.pz svg{filter:drop-shadow(0 calc(var(--sz)*.04) calc(var(--sz)*.025) #15081db8)!important}
.hs.last{background:#ffd8497d;box-shadow:inset 0 0 0 2px #fff1a37a}.hs.sel{background:#fff06f9c;box-shadow:inset 0 0 0 3px #fff5b6b0}.hs.chk{background:radial-gradient(circle,#ff4d68ef 0,#a4003a90 42%,transparent 73%)}
.dot::after{background:#3922538c;box-shadow:0 0 0 2px #fff2bdad,0 0 8px #fff1a26e}.dot.cap::after{border-color:#4e277ca8}

/* Rel kontrol satu baris: bentuk konsisten, warna tindakan tetap mudah dibedakan. */
#acts{
  box-sizing:border-box;height:62px!important;padding:6px;gap:6px!important;
  background:linear-gradient(180deg,rgba(47,28,80,.98),rgba(20,12,43,.98));
  border:1px solid #a8793e;border-radius:10px;box-shadow:inset 0 1px #fff2c32b,0 4px 12px #05010da8
}
#acts .dk-btn{
  flex:1;min-width:0;height:50px;padding:4px 8px!important;border:1px solid #d1a34f!important;border-radius:10px!important;
  color:#fffaf0!important;box-shadow:inset 0 1px #ffffff4a,0 3px 0 #160928,0 5px 8px #05010c8f!important;
  text-shadow:0 2px 0 #160824!important;-webkit-text-stroke:0!important;font:900 12px/1.05 Nunito,sans-serif!important
}
#acts .dk-btn.dk-yellow,#aUndo{background:linear-gradient(180deg,#8c5ed0,#553085)!important}
#acts .dk-btn.dk-green,#aHint{background:linear-gradient(180deg,#2ea780,#176b65)!important}
#acts .dk-btn.dk-blue,#aOnlineDraw{background:linear-gradient(180deg,#3f90d9,#2856a4)!important}
#acts .dk-btn.dk-orange,#aOnlineMenu{background:linear-gradient(180deg,#f5af42,#d66c29)!important}
#acts .dk-btn svg{width:21px;height:21px;filter:drop-shadow(0 1px #220d32)}
#acts .dk-btn b{font-size:10px;background:#fff5d4;color:#382052;border:1px solid #8a5b28}
#acts .dk-btn:active{transform:translateY(2px);filter:brightness(1.08)}#acts .dk-btn[disabled]{opacity:.42;filter:saturate(.35)}
#hint{color:#fff7dc;text-shadow:0 2px #10061d,0 0 8px #000;font-size:13px}
#strip{
  background:linear-gradient(180deg,rgba(34,20,62,.98),rgba(17,10,35,.98));color:#eee4f6;
  border:1px solid #8b6438;border-radius:10px;box-shadow:inset 0 1px #fff2c31f,0 4px 12px #05010d91
}
#strip:empty::before{content:"Riwayat langkah akan tampil di sini";display:grid;place-items:center;height:100%;padding:18px;color:#b9a8ca;font:800 12px/1.4 Nunito,sans-serif;text-align:center}

/* Status online sudah dibaca dari header dan tag mode. Simpan pengumuman
   realtime untuk pembaca layar tanpa menimpanya di atas identitas pemain. */
#coLive{position:fixed!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}

@media(max-width:520px){
  .ch-brand{left:58px;font-size:16px}.ch-brand>span{font-size:24px}.ch-brand>b{font-size:9px;margin-left:-30px;margin-bottom:12px}
  .turn{right:66px!important}#hTurn{max-width:96px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px!important;padding:0 8px!important}
  .hr{right:7px}.hr small{width:54px;font-size:9px!important}
  .pbar{border-radius:7px!important}.pbar .nm b{font-size:13px}.co-clock{min-width:66px;font-size:17px}
  #acts .dk-btn{font-size:11px!important;padding:3px 5px!important}#acts .dk-btn svg{width:19px;height:19px}
}

@media(max-width:760px){#strip{display:none!important}}
@media(max-height:620px){#hint{display:none!important}}

@media(min-width:761px) and (min-height:501px){
  #hud{padding-left:max(12px,var(--dk-sl));padding-right:max(12px,var(--dk-sr))}
  .ch-brand{left:68px}
  #acts{height:auto!important;padding:7px}
}

@media(prefers-reduced-motion:reduce){.pbar.on{transition:none}.pz{transition:none!important}}
