/* What's on: the games people are in, to join in one click */
#gamespanel { border-top: 1px solid rgba(154, 168, 184, 0.3); }
#gameshead { display: flex; align-items: center; gap: 6px; width: 100%; padding: 8px 12px; background: none; border: none; cursor: pointer; font-family: var(--f-ui); font-size: 17px; font-weight: 800; color: var(--skin); letter-spacing: 0.04em; }
#gameshead b { color: var(--bile); } #gameshead .caret { margin-left: auto; transition: transform 0.2s; }
#gamespanel:not(.open) #gameshead .caret { transform: rotate(-90deg); } #gamespanel:not(.open) #gameslist { display: none; }
#gameshead .gdot { width: 9px; height: 9px; border-radius: 50%; background: #3a3f30; }
#gamespanel.live #gameshead .gdot { background: #ffcf4a; box-shadow: 0 0 8px #ffcf4a; animation: gapulse 1.4s ease-in-out infinite; }
#gameslist { list-style: none; margin: 0; padding: 0 8px 10px; max-height: 40vh; overflow-y: auto; text-align: left; display: flex; flex-direction: column; gap: 6px; }
#gameslist .gnone { padding: 4px 6px; font-family: var(--f-ui); font-size: 14px; color: var(--ink-dim); }
.gon { display: grid; grid-template-columns: auto 1fr auto; gap: 2px 8px; align-items: center; padding: 6px 8px; border-radius: 10px; background: rgba(0, 0, 0, 0.3); border: 1px solid rgba(154, 168, 184, 0.18); animation: galine 0.3s ease-out; }
.gon.mine { border-color: rgba(242, 182, 50, 0.5); }
body.idle .gon, body.idle #gamespanel.live #gameshead .gdot { animation-play-state: running !important; }
.gon .gico { grid-row: span 2; font-size: 22px; width: 30px; text-align: center; }
.gon .gtitle { font-family: var(--f-ui); font-size: 12px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gon .gtitle small { font-family: var(--f-ui); font-size: 13px; color: var(--ink-dim); font-weight: 400; margin-left: 4px; }
.gon .gwho b { color: var(--skin); font-weight: 700; }
.gon .gwho { grid-column: 2; font-family: var(--f-ui); font-size: 13px; color: var(--ink-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gon .gjoin { grid-row: 1 / span 2; grid-column: 3; padding: 5px 10px; border-radius: 999px; border: 2px solid #1a1e26; cursor: pointer; font-family: var(--f-ui); font-size: 11px; color: #142008; background: linear-gradient(#b8f05a, #6fa81a); box-shadow: 0 3px 0 #2a4008; white-space: nowrap; }
.gon .gjoin:hover { transform: translateY(-1px); } .gon .gjoin:active { transform: translateY(2px); box-shadow: none; }
.gon .gjoin.watch { background: rgba(255, 255, 255, 0.08); color: var(--ink-dim); border-color: rgba(255, 255, 255, 0.15); box-shadow: none; cursor: default; font-family: var(--f-ui); font-size: 13px; }
.gon .gjoin.in { background: rgba(242, 182, 50, 0.2); color: var(--gold); border-color: rgba(242, 182, 50, 0.5); box-shadow: none; }
#onlinelist li.self::after { content: " (you)"; font-family: var(--f-ui); color: var(--ink-dim); font-size: 14px; }
.lvl {
  display: inline-grid; place-items: center; min-width: 20px; height: 18px; padding: 0 5px; border-radius: 9px;
  font-family: var(--f-ui); font-size: 10px; line-height: 1; color: #0e1016; text-shadow: none; font-style: normal;
  background: linear-gradient(160deg, #e6f04a, #8fbf3a); border: 1px solid #0a0612; box-shadow: 0 1px 0 #0a0612; vertical-align: middle;
}
.xpbar.maxed .xpfill { background: linear-gradient(90deg, #f2b632, #ff9ee8, #9ee8ff, #f2b632); background-size: 200% 100%; }
.xpbar {
  position: relative; display: inline-block; width: 120px; height: 18px; vertical-align: middle; cursor: pointer; overflow: hidden;
  border-radius: 9px; background: rgba(0, 0, 0, 0.55); border: 1px solid rgba(154, 168, 184, 0.5);
}
.xpfill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: linear-gradient(90deg, #4f7a1c, #7aff2a, #e6f04a); transition: width 0.6s ease; }
.xptext { position: relative; display: block; text-align: center; font-family: var(--f-ui); font-size: 9px; line-height: 18px; color: #fff; text-shadow: 0 1px 2px #000; }
.bigxp { margin: 14px auto 6px; }
.bigxp .xpbar { width: min(420px, 100%); height: 26px; border-radius: 13px; }
.bigxp .xptext { font-size: 12px; line-height: 26px; }
.quest { margin: 10px 0; padding: 12px 14px; border-radius: 14px; background: rgba(0, 0, 0, 0.3); border: 2px solid rgba(154, 168, 184, 0.35); }
.quest.medium { border-color: rgba(79, 182, 255, 0.45); }
.quest.hard { border-color: rgba(255, 154, 60, 0.55); }
.quest.done { opacity: 0.6; }
.qtop { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.qtier { font-family: var(--f-ui); font-weight: 800; text-transform: uppercase; letter-spacing: 0.15em; font-size: 13px; color: #8fbf3a; }
.quest.medium .qtier { color: #4fb6ff; } .quest.hard .qtier { color: var(--torch); }
.qtext { flex: 1; font-family: var(--f-ui); font-size: 20px; color: var(--ink); }
.qxp { font-family: var(--f-ui); font-size: 12px; color: var(--bile); }
.qbar { height: 8px; margin-top: 8px; border-radius: 4px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.qbar div { height: 100%; background: linear-gradient(90deg, #4f7a1c, #7aff2a); transition: width 0.6s ease; }
.quest.done .qbar div { background: var(--gold); }
#chalbtn {
  font-family: var(--f-ui); font-size: 12px; color: #2b1d02; cursor: pointer; padding: 3px 10px; border-radius: 999px;
  border: 1px solid #6b5310; background: radial-gradient(circle at 30% 25%, #fff3b0, #f2b632 45%, #a8781a); box-shadow: 0 3px 0 #5c4108; vertical-align: middle;
}
#chalbtn:active { transform: translateY(2px); box-shadow: 0 1px 0 #5c4108; }
.chaltabs { display: flex; justify-content: center; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.chaltabs button {
  font-family: var(--f-ui); font-size: 18px; font-weight: 800; letter-spacing: 0.04em; color: var(--ink-dim); cursor: pointer;
  padding: 6px 16px; border-radius: 999px; background: rgba(0, 0, 0, 0.3); border: 2px solid rgba(154, 168, 184, 0.35);
}
.chaltabs button.on { color: #2b1d02; background: var(--gold); border-color: var(--gold); }
.chaltabs .ct { font-family: var(--f-ui); font-size: 11px; font-weight: 400; margin-left: 4px; }
#challist { list-style: none; margin: 16px 0 6px; padding: 0; text-align: left; }
.quest.career .qtier { color: var(--gold); }
.quest.career { border-color: rgba(242, 182, 50, 0.45); }
.quest.career.done { opacity: 1; background: rgba(242, 182, 50, 0.08); }
.pips { letter-spacing: 2px; font-size: 13px; color: var(--gold); }
.pips .off { color: rgba(255, 255, 255, 0.2); }
.qcount { margin-top: 4px; font-family: var(--f-ui); font-size: 14px; color: var(--ink-dim); text-align: right; }
.shopcard.wide { max-width: 900px; }
#roulettecoins { color: var(--gold); }
#roulettebtn {
  font-family: var(--f-ui); font-size: 12px; color: var(--ink); cursor: pointer; padding: 3px 10px; border-radius: 999px;
  border: 1px solid #0e3d1c; background: radial-gradient(circle at 30% 25%, #6fe08a, #1f8a3a 45%, #0b3d18);
  box-shadow: 0 3px 0 #08260f; vertical-align: middle; text-shadow: 0 1px 0 rgba(0, 0, 0, 0.5);
}
#soundbtn { background: none; border: none; cursor: pointer; font-size: 15px; padding: 0 2px; vertical-align: middle; }
#roulettebtn:active { transform: translateY(2px); box-shadow: 0 1px 0 #08260f; }
.rtop { display: flex; flex-wrap: wrap; gap: 20px; justify-content: center; align-items: flex-start; margin-top: 16px; }
.wheelwrap { position: relative; width: 300px; max-width: 100%; }
#wheel { width: 100%; height: auto; display: block; border-radius: 50%; box-shadow: 0 0 40px rgba(242, 182, 50, 0.35), 0 12px 30px rgba(0, 0, 0, 0.7); transition: transform 7s cubic-bezier(.12, .62, .1, 1); }
.pointer { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); z-index: 2; font-size: 28px; color: var(--gold); text-shadow: 0 2px 0 #4f3a08, 0 0 10px rgba(242, 182, 50, 0.8); }
#rresult {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(0.3); opacity: 0; pointer-events: none;
  padding: 12px 18px; border-radius: 18px; border: 3px solid var(--gold); background: rgba(21, 24, 30, 0.92); text-align: center; min-width: 170px;
  transition: transform 0.45s cubic-bezier(.3, 1.8, .5, 1), opacity 0.25s;
}
#rresult.show { transform: translate(-50%, -50%) scale(1); opacity: 1; }
#rresult .big { font-family: var(--f-head); font-size: 34px; }
#rresult.red .big { color: #ff4a57; } #rresult.black .big { color: #f4ecd6; } #rresult.green .big { color: #4fe07a; }
#rresult .line { font-family: var(--f-ui); font-size: 17px; color: var(--ink-dim); }
.rside { flex: 1; min-width: 220px; text-align: left; }
.rside h3 { margin: 4px 0 8px; font-family: var(--f-ui); font-weight: 800; font-size: 19px; color: var(--skin); }
#rrecent { display: flex; flex-wrap: wrap; gap: 6px; min-height: 30px; margin-bottom: 12px; }
.rnum { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-family: var(--f-ui); font-size: 12px; color: #f4ecd6; border: 2px solid #c99a2e; }
.rnum.red { background: #b3202c; } .rnum.black { background: #141414; } .rnum.green { background: #1f8a3a; }
#rplayers { list-style: none; margin: 0; padding: 0; font-family: var(--f-ui); font-size: 17px; color: var(--ink); }
#rplayers li { padding: 3px 0; } #rplayers li.empty { color: var(--ink-dim); }
.rcontrols { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin: 18px 0 10px; }
#chips { font-family: var(--f-ui); font-size: 18px; color: var(--ink-dim); display: flex; align-items: center; gap: 8px; }
.rchip {
  width: 42px; height: 42px; border-radius: 50%; cursor: pointer; font-family: var(--f-ui); font-size: 13px; color: #2b1d02;
  border: 3px dashed #fff3b0; background: radial-gradient(circle, #f2b632 55%, #a07418); box-shadow: 0 3px 0 #5c4108;
}
.rchip.on { outline: 3px solid var(--bile); outline-offset: 2px; transform: translateY(-3px); }
.ractions { display: flex; gap: 10px; align-items: center; }
.ractions button:disabled { opacity: 0.5; cursor: not-allowed; filter: grayscale(0.6); animation: none; }
.boardwrap { overflow-x: auto; padding-bottom: 6px; }
#board { display: grid; grid-template-columns: 44px repeat(12, minmax(36px, 1fr)); grid-template-rows: repeat(5, 40px); gap: 3px; min-width: 520px; }
#board.locked { opacity: 0.6; pointer-events: none; }
#board .cell {
  position: relative; cursor: pointer; font-family: var(--f-ui); font-size: 13px; color: #f4ecd6;
  border: 1px solid #c99a2e; border-radius: 6px; background: #141414;
}
#board .cell.red { background: #b3202c; } #board .cell.green { background: #1f8a3a; }
#board .cell.hit { outline: 3px solid #fff3b0; outline-offset: -3px; box-shadow: 0 0 18px #f2b632, inset 0 0 12px rgba(255, 243, 176, 0.6); animation: glowpulse 0.8s ease-in-out infinite; z-index: 1; }
#board .cell.outside { background: #0f3d22; font-family: var(--f-ui); font-size: 16px; }
#board .cell.outside.red { background: #b3202c; } #board .cell.outside.black { background: #141414; }
#board .cell:hover { filter: brightness(1.35); }
#board .stake {
  position: absolute; right: -4px; top: -6px; min-width: 22px; height: 22px; padding: 0 4px; border-radius: 11px; display: grid; place-items: center;
  font-size: 10px; color: #2b1d02; background: radial-gradient(circle, #fff3b0, #f2b632 60%, #a07418); border: 2px dashed #fff3b0; z-index: 1;
}
#duelcoins { color: var(--gold); }
#duelbody { text-align: left; margin-top: 10px; }
#duelbody h3 { margin: 18px 0 8px; font-family: var(--f-ui); font-weight: 800; font-size: 20px; color: var(--skin); }
.duelempty, .duelwait { text-align: center; font-family: var(--f-ui); font-size: 20px; color: var(--ink-dim); padding: 20px 0; }
.betrow { display: flex; align-items: center; gap: 10px; font-family: var(--f-ui); font-size: 18px; color: var(--ink-dim); }
.betrow input {
  width: 100px; padding: 8px 12px; font-family: var(--f-ui); font-size: 18px; color: var(--gold);
  background: rgba(0, 0, 0, 0.5); border: 2px solid rgba(242, 182, 50, 0.5); border-radius: 12px;
}
.weapons { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.weapons .gob { text-transform: capitalize; }
.weapons .gob:disabled { filter: grayscale(0.8) brightness(0.6); cursor: not-allowed; animation: none; }
.countdown { height: 6px; margin-top: 14px; border-radius: 3px; background: var(--torch); transform-origin: left; animation: countdown linear forwards; }
@keyframes countdown { from { transform: scaleX(1); } to { transform: scaleX(0); } }
#rich .fight { margin-left: 6px; padding: 0 4px; background: none; border: none; cursor: pointer; font-size: 14px; vertical-align: middle; }
#rich .fight:hover { transform: scale(1.3) rotate(-10deg); }
#duelbtn {
  font-family: var(--f-ui); font-size: 12px; color: var(--ink); cursor: pointer; padding: 3px 10px; border-radius: 999px;
  border: 1px solid #7a1c1c; background: radial-gradient(circle at 30% 25%, #ff8a7a, #c0392b 45%, #6e1414);
  box-shadow: 0 3px 0 #4a0d0d; vertical-align: middle; text-shadow: 0 1px 0 rgba(0, 0, 0, 0.5);
}
#duelbtn:active { transform: translateY(2px); box-shadow: 0 1px 0 #4a0d0d; }
#challenge {
  position: fixed; top: 16px; left: 50%; z-index: 75; width: min(520px, calc(100vw - 32px)); padding: 18px 18px 14px;
  transform: translate(-50%, -150%); transition: transform 0.5s cubic-bezier(.3, 1.6, .5, 1);
  border-radius: 24px 14px 26px 16px; background: linear-gradient(160deg, #3a1010, #120505); border: 3px solid #ff5a3c;
  box-shadow: 0 0 50px rgba(255, 70, 30, 0.5), 0 20px 50px rgba(0, 0, 0, 0.7);
}
#challenge.show { transform: translate(-50%, 0); animation: challenge-shake 0.5s 0.4s; }
@keyframes challenge-shake { 20%, 60% { rotate: -2deg; } 40%, 80% { rotate: 2deg; } }
#challengetext { margin: 0 0 14px; font-family: var(--f-ui); font-size: 21px; color: var(--ink); }
#challenge .chicken { margin-top: 12px; background: none; border: none; color: var(--ink-dim); font-family: var(--f-ui); font-size: 16px; cursor: pointer; text-decoration: underline; }
#rpsresult {
  position: fixed; left: 50%; top: 50%; z-index: 80; min-width: min(380px, calc(100vw - 32px)); padding: 24px 28px; text-align: center;
  transform: translate(-50%, -50%) scale(0.4); opacity: 0; pointer-events: none; transition: transform 0.45s cubic-bezier(.3, 1.8, .5, 1), opacity 0.25s;
  border-radius: 28px; background: linear-gradient(160deg, #2a2e36, #070b05); border: 4px solid var(--skin); box-shadow: 0 30px 90px rgba(0, 0, 0, 0.8);
}
#rpsresult.show { transform: translate(-50%, -50%) scale(1); opacity: 1; }
#rpsresult.win { border-color: var(--gold); box-shadow: 0 0 80px rgba(242, 182, 50, 0.6); }
#rpsresult.lose { border-color: #ff3b4a; }
#rpsresult .vs { font-size: 64px; display: flex; justify-content: center; align-items: center; gap: 18px; }
#rpsresult .vs .v { font-family: var(--f-head); font-size: 30px; color: var(--ink-dim); }
#rpsresult.win .mine, #rpsresult.lose .theirs { animation: bob 0.8s ease-in-out infinite; }
#rpsresult .who { font-family: var(--f-ui); font-size: 20px; color: var(--ink-dim); margin-top: 6px; }
#rpsresult .verdict { margin-top: 10px; font-family: var(--f-head); font-size: 34px; color: var(--bile); }
#rpsresult.win .verdict { color: var(--gold); }
#rpsresult.lose .verdict { color: #ff5a5a; }
.shopcard {
  position: relative; width: 100%; max-width: 760px; padding: 26px 22px 30px; border-radius: 30px 18px 34px 20px;
  background: linear-gradient(165deg, #2a2e36, #15181e); border: 2px solid rgba(242, 182, 50, 0.45);
  box-shadow: 0 0 60px rgba(242, 182, 50, 0.15), 0 30px 80px rgba(0, 0, 0, 0.7);
}
.shopcard h2 { margin: 0; font-family: var(--f-head); font-weight: 400; font-size: clamp(30px, 6vw, 46px); color: var(--gold); }
.shopclose { position: absolute; top: 14px; right: 16px; background: none; border: none; color: var(--ink-dim); font-size: 22px; cursor: pointer; }
.shoppurse { margin-top: 6px; font-family: var(--f-ui); font-size: 19px; color: var(--ink-dim); }
.shoppurse b { color: var(--gold); }
.odds { margin-top: 12px; font-family: var(--f-ui); font-size: 15px; color: var(--ink-dim); }
.r-common { color: #8fbf3a; }
.r-rare { color: #4fb6ff; }
.r-legendary { color: #ffd23c; }
.r-mythical { color: #c77dff; }
/* ---------- Founding a company ---------- */
#company { position: fixed; inset: 0; z-index: 88; display: none; align-items: flex-start; justify-content: center; overflow-y: auto; padding: 24px 16px; background: rgba(6, 7, 10, 0.88); }
#company.open { display: flex; }
#company.required .shopclose { display: none; }
#company .conote { font-family: var(--f-ui); font-size: 17px; color: var(--ink-dim); margin: 6px 0 12px; }
/* the ticker: capitals in a stamped box, magenta like everything about G$ */
.coform .cohint { display: block; font-size: 13px; color: var(--ink-dim); }
input.coticker { width: 7.5em; min-height: 44px; font: 800 22px var(--f-ui); letter-spacing: 0.18em; text-transform: uppercase; color: var(--wk-magenta); text-align: center; }
#tickerask .shopcard { max-width: 420px; }
#tickerask .conote { font-family: var(--f-ui); font-size: 17px; color: var(--ink-dim); margin: 6px 0 12px; }
#tickerask .tklabel { display: flex; align-items: center; gap: 12px; font-family: var(--f-ui); font-size: 17px; color: var(--ink); margin-bottom: 12px; }
.cobody { display: flex; gap: 18px; align-items: flex-start; text-align: left; }
#copreview { flex: none; width: 140px; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 8px; border-radius: 16px; background: radial-gradient(circle at 50% 35%, rgba(242, 182, 50, 0.18), transparent 70%); }
#copreview svg { overflow: visible; }
.coform { flex: 1; min-width: 0; }
.coform label { display: block; margin-bottom: 8px; font-family: var(--f-ui); font-size: 17px; color: var(--ink); }
.coform input { display: block; width: 100%; margin-top: 3px; padding: 7px 10px; border-radius: 10px; font-family: var(--f-ui); font-size: 14px; color: var(--gold); background: rgba(0, 0, 0, 0.45); border: 2px solid rgba(242, 182, 50, 0.4); box-sizing: border-box; }
.coform h4 { margin: 10px 0 4px; font-family: var(--f-ui); font-weight: 800; font-size: 16px; color: var(--skin); }
.coopts { display: flex; flex-wrap: wrap; gap: 5px; }
.coopt { padding: 2px; border-radius: 10px; cursor: pointer; background: rgba(0, 0, 0, 0.3); border: 2px solid transparent; line-height: 0; }
.coopt.on { border-color: var(--gold); box-shadow: 0 0 8px rgba(242, 182, 50, 0.6); }
.coopt .swatch { display: block; width: 24px; height: 24px; border-radius: 6px; border: 1px solid rgba(255, 255, 255, 0.25); }
.cobtns { display: flex; gap: 10px; justify-content: center; margin-top: 16px; flex-wrap: wrap; }
#cobtn { display: inline-flex; align-items: center; gap: 4px; font-family: var(--f-ui); font-size: 12px; color: var(--ink); cursor: pointer; padding: 2px 10px 2px 4px; border-radius: 999px; vertical-align: middle;
  border: 1px solid #5c4108; background: rgba(0, 0, 0, 0.35); box-shadow: 0 3px 0 #2a1d06; }
@media (max-width: 640px) { .cobody { flex-direction: column; align-items: center; } }

/* ---------- A new version is out ---------- */
#update { position: fixed; inset: 0; z-index: 95; display: none; align-items: center; justify-content: center; padding: 16px; background: rgba(0, 0, 0, 0.55); }
#update.show { display: flex; }
#update .card {
  width: min(420px, 100%); padding: 24px 22px 20px; border-radius: 24px; text-align: center;
  background: radial-gradient(ellipse at 50% 0%, rgba(122, 255, 42, 0.25), transparent 60%), linear-gradient(165deg, #2a2e36, #15181e);
  border: 2px solid var(--bile); box-shadow: 0 0 50px rgba(122, 255, 42, 0.35), 0 30px 80px rgba(0, 0, 0, 0.7); animation: cardpop 0.6s cubic-bezier(.2, 1.6, .4, 1);
}
#update .brew { font-size: 56px; line-height: 1; animation: stir 0.9s ease-in-out infinite alternate; display: inline-block; }
#update h2 { margin: 8px 0 4px; font-family: var(--f-head); font-weight: 400; font-size: 32px; color: var(--gold); }
#update p { margin: 0 0 16px; font-family: var(--f-ui); font-size: 18px; color: var(--ink-dim); }
#update .btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
body.idle #update .card, body.idle #update .brew { animation-play-state: running !important; }

