/* the guide: a button always in the corner, and a book of tabs and pages */
#guidebtn { position: fixed; right: 16px; bottom: 16px; z-index: 96; display: flex; align-items: center; gap: 6px; padding: 8px 14px 8px 10px; border-radius: 999px; cursor: pointer;
  font-family: var(--f-ui); font-size: 14px; color: #2b1d02; background: linear-gradient(#ffe48a, #d9a514); border: 2px solid #1a1e26; box-shadow: 0 4px 0 #5c4108, 0 8px 18px rgba(0, 0, 0, 0.5); }
#guidebtn:hover { transform: translateY(-2px); } #guidebtn:active { transform: translateY(2px); box-shadow: 0 1px 0 #5c4108; }
@media (max-width: 600px) { #guidebtn span { display: none; } #guidebtn { padding: 8px 11px; font-size: 18px; } }
body:has(#zombie.playing) #guidebtn, body.inarena #guidebtn { bottom: auto; top: 54px; right: 12px; }
/* the notification history: a bell beside the guide */
#bellbtn { position: fixed; right: 132px; bottom: 16px; z-index: 96; width: 44px; height: 44px; border-radius: 50%; cursor: pointer; font-size: 20px; background: linear-gradient(170deg, #3a2a14, #1a1e26); border: 2px solid var(--gold); box-shadow: 0 4px 0 #5c4108, 0 8px 18px rgba(0, 0, 0, 0.5); }
#bellbtn i { position: absolute; right: -4px; top: -4px; display: none; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: #c0262f; color: #fff; font-style: normal; font-family: var(--f-ui); font-size: 10px; line-height: 18px; }
#bellbtn.unread i { display: block; }
@media (max-width: 600px) { #bellbtn { right: 72px; } }
body:has(#zombie.playing) #bellbtn, body.inarena #bellbtn { display: none; }
#bell { position: fixed; inset: 0; z-index: 99; display: none; align-items: flex-end; justify-content: flex-end; padding: 16px 16px 72px; background: rgba(0, 0, 0, 0.35); }
#bell.open { display: flex; }
.bellcard { width: min(420px, 100%); max-height: min(70vh, 640px); display: flex; flex-direction: column; border-radius: 18px; overflow: hidden; background: linear-gradient(170deg, #241a0e, #120c06); border: 2px solid var(--gold); box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7); }
.bellhead { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid rgba(242, 182, 50, 0.3); }
.bellhead h3 { margin: 0; font-family: var(--f-ui); font-size: 16px; color: var(--gold); }
.bellhead .shopclose { position: static; }
#belllist { list-style: none; margin: 0; padding: 6px 0; overflow-y: auto; text-align: left; }
#belllist li { padding: 8px 14px; border-bottom: 1px solid rgba(255, 255, 255, 0.05); font-family: var(--f-ui); font-size: 16px; color: var(--ink); }
#belllist li.new { background: rgba(242, 182, 50, 0.07); }
#belllist li small { display: block; color: var(--ink-dim); font-size: 14px; }
#belllist li time { float: right; margin-left: 8px; color: var(--ink-dim); font-size: 13px; }
#belllist .none { color: var(--ink-dim); text-align: center; }
#ginvite { bottom: 74px; }
#guide { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; padding: 16px; background: rgba(6, 7, 10, 0.8); backdrop-filter: blur(4px); }
#guide.open { display: flex; }
.gu-card { width: min(980px, 100%); height: min(760px, 100%); display: flex; flex-direction: column; border-radius: 20px; overflow: hidden;
  background: linear-gradient(170deg, #241a0e, #120c06); border: 2px solid rgba(242, 182, 50, 0.5); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7); animation: cardpop 0.35s cubic-bezier(.2, 1.4, .4, 1); }
.gu-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px 6px; }
.gu-head h2 { margin: 0; font-size: clamp(20px, 4vw, 30px); }
.gu-head .shopclose { position: static; }
.gu-tabs { display: flex; gap: 6px; padding: 4px 12px 10px; overflow-x: auto; flex: none; border-bottom: 1px solid rgba(242, 182, 50, 0.25); scrollbar-width: thin; }
.gu-tab { flex: none; display: flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; cursor: pointer; color: var(--ink); background: rgba(0, 0, 0, 0.35); border: 1px solid rgba(242, 182, 50, 0.3); font-family: var(--f-ui); font-size: 16px; }
.gu-tab b { font-weight: 700; } .gu-tab.on { background: var(--gold); color: #2b1d02; border-color: var(--gold); }
.gu-main { flex: 1; min-height: 0; display: grid; grid-template-columns: 230px 1fr; }
.gu-pages { display: flex; flex-direction: column; gap: 4px; padding: 12px; overflow-y: auto; border-right: 1px solid rgba(242, 182, 50, 0.2); }
.gu-page { text-align: left; padding: 8px 10px; border-radius: 10px; cursor: pointer; color: var(--ink); background: none; border: 1px solid transparent; font-family: var(--f-ui); font-size: 16px; }
.gu-page:hover { background: rgba(255, 255, 255, 0.05); } .gu-page.on { background: rgba(242, 182, 50, 0.15); border-color: rgba(242, 182, 50, 0.5); color: var(--gold); }
.gu-body { overflow-y: auto; padding: 14px 20px 20px; font-family: var(--f-ui); font-size: 17px; line-height: 1.4; color: var(--ink); }
.gu-body h3 { margin: 0 0 10px; font-family: var(--f-ui); font-size: 22px; color: var(--gold); }
.gu-body h4 { margin: 14px 0 4px; font-family: var(--f-ui); font-size: 15px; color: var(--skin); }
.gu-body p { margin: 0 0 8px; } .gu-body ul, .gu-body ol { margin: 0 0 8px; padding-left: 22px; } .gu-body li { margin-bottom: 3px; }
.gu-body b { color: #fff3b0; }
.gu-dim { color: var(--ink-dim); font-size: 0.9em; }
.gu-tip, .gu-note { padding: 8px 12px; border-radius: 10px; background: rgba(242, 182, 50, 0.1); border-left: 3px solid var(--gold); }
.gu-table { width: 100%; border-collapse: collapse; margin: 6px 0 10px; font-size: 15px; }
.gu-table th { text-align: left; padding: 6px 8px; color: var(--gold); border-bottom: 1px solid rgba(242, 182, 50, 0.4); font-family: var(--f-ui); font-size: 12px; }
.gu-table td { padding: 6px 8px; border-bottom: 1px solid rgba(255, 255, 255, 0.07); vertical-align: top; }
.gu-foot { flex: none; display: none; align-items: center; justify-content: flex-end; gap: 8px; padding: 8px 16px; border-top: 1px solid rgba(242, 182, 50, 0.25); font-family: var(--f-ui); font-size: 15px; color: var(--ink-dim); cursor: pointer; }
.gu-foot.on { display: flex; }
.gu-foot input { width: 17px; height: 17px; accent-color: var(--gold); cursor: pointer; }
.gu-release { margin: 0 0 14px; padding: 10px 14px; border-radius: 12px; background: rgba(0, 0, 0, 0.25); border: 1px solid rgba(242, 182, 50, 0.18); }
.gu-release.new { border-color: rgba(242, 182, 50, 0.7); background: rgba(242, 182, 50, 0.08); }
.gu-release h4 { margin: 0 0 4px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.gu-release time { font-family: var(--f-ui); font-size: 14px; color: var(--ink-dim); font-weight: 400; }
.gu-new { padding: 1px 8px; border-radius: 999px; background: var(--gold); color: #2b1d02; font-size: 11px; }
.gu-nav { display: flex; justify-content: space-between; gap: 8px; margin-top: 16px; padding-top: 10px; border-top: 1px solid rgba(242, 182, 50, 0.2); flex-wrap: wrap; }
@media (max-width: 700px) {
  .gu-main { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .gu-pages { flex-direction: row; overflow-x: auto; border-right: none; border-bottom: 1px solid rgba(242, 182, 50, 0.2); padding: 8px 12px; }
  .gu-page { flex: none; white-space: nowrap; }
  .gu-body { padding: 12px 14px 16px; font-size: 16px; }
  .gu-table { font-size: 13px; }
}
body.idle .gu-card { animation-play-state: running !important; }

/* zoom: a card held up to read */
#gzoom { position: fixed; inset: 0; z-index: 99; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 16px; background: rgba(0, 0, 0, 0.82); backdrop-filter: blur(6px); cursor: zoom-out; }
#gzoom.open { display: flex; }
#gzoom .gcard { --gw: min(360px, 82vw, 56vh); animation: gazoomin 0.35s cubic-bezier(.2, 1.4, .4, 1); transition: transform 0.08s; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.8); }
@keyframes gazoomin { from { transform: scale(0.5) rotate(-6deg); opacity: 0; } }
.gz-info { display: flex; flex-direction: column; align-items: center; gap: 4px; font-family: var(--f-ui); font-size: 17px; text-align: center; }
.gz-close { color: var(--ink-dim); font-size: 14px; }
body.idle #garena *, body.idle #gzoom * { animation-play-state: running !important; }
body.idle .jbox.playing .jbeq i, body.idle .jbox.long.playing .jbname span { animation-play-state: running !important; }

/* phones: cards beside their benches, the button along the bottom */
@media (max-width: 820px), (max-aspect-ratio: 4/5) {
  .a-minemat { grid-row: 4 / 7; }
  .ga-field { grid-template-columns: auto auto; grid-template-rows: auto auto auto auto auto auto; gap: 4px 10px; align-content: center; justify-content: center;
    grid-template-areas: "tplate tplate" "tcard tbench" "mid mid" "mcard mbench" "mplate macts" "mplate macts"; }
  .a-log { display: none; }
  .a-theirsplate, .a-mineplate { justify-self: center; } .a-theirsbench, .a-minebench { justify-self: start; }
  .ga-bench { flex-direction: column; gap: 6px; }
  .ga-slot .gcard { --gw: min(170px, 44vw, 23vh); }
  .ga-bench .gcard.mini { --gw: min(86px, 22vw, 11.5vh); }
  .ga-plate { padding: 3px 10px 3px 3px; } .ga-face { width: 34px; height: 34px; } .ga-face svg { width: 34px; height: 42px; }
  .a-acts { justify-self: center; flex-direction: row; }
  .ga-ring { width: 92px; height: 92px; } .ga-attack { width: 76px; height: 76px; } .ga-attack .sw { font-size: 24px; } .ga-attack b { font-size: 12px; }
  .ga-hint { display: none; }
  .ga-mid { gap: 8px; } .ga-tri { display: none; } .ga-said { max-width: 60%; font-size: 14px; }
  .ga-badges span { font-size: 11px; padding: 0 5px; }
  .ga-pop { font-size: 26px; } .ga-pop.crit { font-size: 36px; } .ga-pop.ko { font-size: 40px; }
}
.gamewin .gob:disabled { filter: grayscale(0.8) brightness(0.6); cursor: not-allowed; animation: none; }
.pkbody { display: flex; gap: 18px; align-items: flex-start; margin-top: 12px; text-align: left; }
#pkboard { flex: 1; min-width: 0; width: 100%; max-width: 440px; height: auto; aspect-ratio: 340 / 360; }
#pkboard .pkhit rect { animation: pkhit 0.6s ease-out; }
#pkboard .pkpeg { fill: #efd9ff; stroke: #6b3fa0; stroke-width: 1; transition: fill 0.2s; }
#pkboard .pkpeg.hot { fill: #ffe48a; stroke: #f2b632; transition: none; }
#pkboard .pkball { fill: #f2b632; stroke: #8a6414; stroke-width: 1.5; filter: drop-shadow(0 0 3px rgba(242, 182, 50, 0.7)); transition: opacity 0.3s; }
#pkboard .pkball.gone { opacity: 0; }
@keyframes pkhit { 0% { transform: translateY(6px); filter: brightness(1.8); } 100% { transform: none; } }
.pkside { width: 260px; flex: none; }
#pklog { display: flex; flex-wrap: wrap; gap: 4px; min-height: 22px; }
.pkchip { padding: 2px 7px; border-radius: 8px; font-family: var(--f-ui); font-size: 11px; color: #1a0f24; }
.slbody { display: flex; gap: 18px 44px; align-items: flex-start; justify-content: center; margin-top: 12px; flex-wrap: wrap; }
.slmachine { position: relative; width: 300px; padding: 16px 16px 18px; border-radius: 26px 26px 16px 16px; background: linear-gradient(180deg, #b3202c, #6a0f18); border: 3px solid #c9a03a; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), inset 0 2px 0 rgba(255, 255, 255, 0.2); }
.sltop { margin: -4px auto 10px; width: max-content; padding: 4px 14px; border-radius: 999px; font-family: var(--f-ui); font-size: 13px; color: #1a0f24; background: linear-gradient(90deg, #f2b632, #fff3b0, #f2b632); animation: glowpulse 1.2s ease-in-out infinite; }
.slwindow { position: relative; display: flex; gap: 6px; padding: 8px; border-radius: 12px; background: #1a1e26; border: 2px solid #c9a03a; }
.slreel { flex: 1; height: 90px; overflow: hidden; border-radius: 8px; background: linear-gradient(180deg, #d9cfb4, #fffaf0 30%, #fffaf0 70%, #d9cfb4); }
.slstrip { will-change: transform; }
.slsym { display: grid; place-items: center; height: 90px; }
.slsym svg { width: 60px; height: 60px; }
.slline { position: absolute; left: 4px; right: 4px; top: 50%; height: 2px; background: rgba(224, 48, 42, 0.6); pointer-events: none; }
.slwin { min-height: 26px; margin: 8px 0 4px; text-align: center; font-family: var(--f-ui); font-size: 15px; color: #fff3b0; }
.slwin.big { font-size: 18px; color: #f2b632; animation: glowpulse 0.8s ease-in-out infinite; }
.slwin.lose { color: rgba(255, 255, 255, 0.55); font-family: var(--f-ui); }
.slmachine .hbtns { justify-content: center; }
.slmachine .gob.big { display: block; margin: 10px auto 0; }
.sllever { position: absolute; right: -26px; top: 70px; width: 22px; height: 110px; padding: 0; border: none; background: none; cursor: pointer; }
.sllever i { position: absolute; left: 8px; bottom: 0; width: 6px; height: 90px; border-radius: 3px; background: linear-gradient(90deg, #8d939c, #e0e4ea, #8d939c); transform-origin: bottom center; }
.sllever i::before { content: ""; position: absolute; left: -7px; top: -14px; width: 20px; height: 20px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #ff6b6b, #b3202c); border: 2px solid #1a1e26; }
.sllever.pulled i { animation: leverpull 0.7s ease-in-out; }
@keyframes leverpull { 40% { transform: scaleY(-0.4); } 100% { transform: none; } }
.slpaywrap { width: 240px; }
.slrow { display: flex; align-items: center; gap: 2px; padding: 2px 0; font-family: var(--f-ui); font-size: 13px; color: var(--gold); }
.slrow .slsym { height: 30px; }
.slrow .slsym svg { width: 26px; height: 26px; }
.slrow b { margin-left: 8px; font-weight: 400; }
.slrow.small { font-family: var(--f-ui); font-size: 15px; color: var(--ink-dim); }
@media (max-width: 640px) { .pkbody { flex-direction: column; } .pkside { width: auto; } .sllever { display: none; } }
/* Ride the Cart */
#rdtrack { display: flex; justify-content: center; gap: 10px; margin: 16px 0 8px; position: relative; }
#rdtrack::before { content: ""; position: absolute; left: 6%; right: 6%; top: 58px; height: 6px; border-top: 2px solid #8a8270; border-bottom: 2px solid #8a8270; z-index: 0; }
.rdslot { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.rdslot.now .rcard { box-shadow: 0 0 0 3px var(--gold), 0 0 18px rgba(242, 182, 50, 0.6); }
.rdlab { font-family: var(--f-ui); font-size: 14px; color: var(--ink-dim); }
.rdslot.now .rdlab { color: var(--gold); }
.rcard { width: 78px; height: 112px; perspective: 600px; border-radius: 10px; }
.rcin { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform 0.55s cubic-bezier(.3, 1.3, .5, 1); }
.rcard.up .rcin { transform: rotateY(180deg); }
.rcback, .rcface { position: absolute; inset: 0; border-radius: 10px; backface-visibility: hidden; -webkit-backface-visibility: hidden; border: 2px solid #1a1e26; box-sizing: border-box; }
.rcback { display: grid; place-items: center; background: repeating-linear-gradient(45deg, #2f5a1c 0 6px, #3f6614 6px 12px); }
.rcback svg { width: 44px; height: 44px; }
.rcface { transform: rotateY(180deg); background: #fffaf0; color: #1a1a1a; display: grid; place-items: center; font-family: var(--f-ui); }
.rcface.red { color: #c0262f; }
.rcr { position: absolute; display: flex; flex-direction: column; align-items: center; font-size: 15px; line-height: 1; gap: 1px; }
.rcr.tl { top: 6px; left: 6px; } .rcr.br { bottom: 6px; right: 6px; transform: rotate(180deg); }
.rcard.good .rcface { box-shadow: 0 0 0 3px #7ee07a; }
.rcard.bad .rcin { animation: rdshake 0.5s 0.55s; } .rcard.bad .rcface { box-shadow: 0 0 0 3px #e0302a; }
@keyframes rdshake { 25% { transform: rotateY(180deg) translateX(-6px); } 75% { transform: rotateY(180deg) translateX(6px); } }
#rdinfo { text-align: center; }
.rdq { font-family: var(--f-ui); font-size: 17px; color: var(--gold); margin: 8px 0 4px; }
.rdq.bad { color: #ff8a7a; } .rdq.good { color: #7ee07a; }
.rdline { font-family: var(--f-ui); font-size: 16px; color: var(--ink); }
#rdbets { justify-content: center; margin-top: 10px; }
#rdacts { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 12px; }
.rdpick { --fs: 15px; display: inline-flex; flex-direction: column; align-items: center; min-width: 110px; }
.rdpick small { font-family: var(--f-ui); font-size: 13px; opacity: 0.85; }
.rdpick.red, .rdpick.hearts, .rdpick.diamonds { --skin-bg: radial-gradient(circle at 30% 25%, #ff8a8a, #c0262f 45%, #6a0f18); --edge: #4a0a10; color: #fff4f0; }
.rdpick.black, .rdpick.clubs, .rdpick.spades { --skin-bg: radial-gradient(circle at 30% 25%, #8a8a8a, #2e2e2e 45%, #121212); --edge: #050505; color: #f4f4f4; }
.rdpick .suiticon path { stroke: #fff; stroke-width: 0.8; }
.rdpick:disabled { filter: grayscale(0.8) brightness(0.6); cursor: not-allowed; animation: none; }
.rdcash { align-self: center; }
.rdclock { font-family: var(--f-ui); font-size: 17px; color: var(--ink-dim); margin-top: 2px; }
.rdclock.hurry { color: #ff8a7a; animation: rdhurry 0.5s ease-in-out infinite alternate; }
@keyframes rdhurry { to { opacity: 0.55; } }
#rdseats { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 10px; }
.rdseat { display: flex; flex-direction: column; align-items: center; padding: 4px 10px; border-radius: 10px; background: rgba(0, 0, 0, 0.3); border: 1px solid rgba(255, 255, 255, 0.12); min-width: 90px; }
.rdseat b { font-size: 14px; } .rdseat small { font-family: var(--f-ui); font-size: 13px; color: var(--ink-dim); }
.rdseat.me { border-color: var(--gold); }
.rdseat.picked small { color: var(--gold); } .rdseat.lost { opacity: 0.6; } .rdseat.lost small { color: #ff8a7a; }
.rdseat.won small, .rdseat.cashed small { color: #7ee07a; }
@media (max-width: 480px) { .rcard { width: 64px; height: 92px; } #rdtrack { gap: 6px; } #rdtrack::before { top: 48px; } .rdpick { min-width: 0; flex: 1 1 40%; } }

