/* SNAKE KO cabinet/auth/admin refresh — cab6 */
.auth-form-card { padding: 14px; border: 1px solid rgba(242,193,78,.24); border-radius: 16px; background: rgba(4,15,12,.55); }
.auth-form-card .cta { margin-top: 4px; }
.quick-auth { margin-top: 12px; }
.auth-divider { display: flex; align-items: center; gap: 10px; color: #81765f; font-size: 11px; text-transform: uppercase; letter-spacing: .14em; }
.auth-divider::before,.auth-divider::after { content:""; height:1px; flex:1; background:linear-gradient(90deg,transparent,rgba(234,215,162,.35),transparent); }
.tg-quick { width:100%; min-height:58px; margin-top:10px; border:1px solid #54a9eb; border-radius:14px; background:linear-gradient(135deg,#168dd0,#08679f); color:#fff; display:flex; justify-content:center; align-items:center; gap:12px; box-shadow:0 10px 28px rgba(17,139,205,.2); }
.tg-quick .tg-plane { width:34px; height:34px; border-radius:50%; background:#fff; color:#168dd0; display:grid; place-items:center; font-size:18px; }
.tg-quick span:last-child { display:flex; flex-direction:column; text-align:left; }
.tg-quick small { opacity:.75; font-size:10px; }

/* Rebuilt logo mount: a larger centered badge with a fresh frame over it. */
.logo-stage { width:min(278px,86vw) !important; height:min(176px,54vw) !important; }
.logo-clip {
  position:relative; width:min(158px,46vw) !important; height:min(158px,46vw) !important;
  display:block; overflow:visible !important; border:0 !important; border-radius:50%;
  background:transparent !important; box-shadow:none !important; animation:none !important;
}
.logo-clip::after {
  content:""; position:absolute; inset:0; z-index:3; border-radius:50%; pointer-events:none;
  border:3px solid #ffd24a; box-shadow:0 0 0 4px #ff3d8a,0 0 24px rgba(255,61,138,.5),inset 0 0 12px rgba(255,210,74,.28);
}
.logo-img {
  position:absolute; left:50%; top:50%; transform:translate(-50%,-50%);
  width:116% !important; height:116% !important; margin:0 !important;
  object-fit:contain !important; object-position:center !important; max-width:none !important;
}
.logo-stars { position:absolute; top:50%; transform:translateY(-50%); display:flex; flex-direction:column; align-items:center; gap:2px; color:#ffd24a; pointer-events:none; z-index:2; }
.logo-stars.left { left:0; }.logo-stars.right { right:0; }
.logo-stars i { font-style:normal; line-height:1; text-shadow:0 0 8px #ff3d8a,0 0 15px #ffd24a; animation:starblink 1.15s ease-in-out infinite; }
.logo-stars i:nth-child(1),.logo-stars i:nth-child(3){ font-size:15px; opacity:.75; }
.logo-stars i:nth-child(2){ font-size:30px; animation-delay:.25s; }
.logo-stars i:nth-child(3){ animation-delay:.5s; }
.logo-stars.right i { animation-delay:.6s; }.logo-stars.right i:nth-child(2){ animation-delay:.85s; }.logo-stars.right i:nth-child(3){ animation-delay:1.1s; }

.payment-methods { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; margin:12px 0; }
.payment-method { min-width:0; min-height:96px; padding:10px 5px; border:1px solid rgba(234,215,162,.25); border-radius:14px; background:linear-gradient(180deg,rgba(16,33,27,.92),rgba(6,15,12,.96)); color:#d9ceb4; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:3px; transition:.18s ease; }
.payment-method b { font-size:clamp(10px,2.8vw,13px); white-space:nowrap; }
.payment-method small { color:#847b69; font-size:9px; text-transform:uppercase; letter-spacing:.08em; }
.payment-method.on { border-color:#ffd24a; color:#fff1b2; transform:translateY(-2px); box-shadow:0 0 0 1px rgba(255,61,138,.45),0 10px 24px rgba(0,0,0,.28),inset 0 0 22px rgba(255,210,74,.07); }
.pay-icon { width:34px; height:34px; border-radius:11px; display:grid; place-items:center; font:800 17px Russo One,sans-serif; margin-bottom:3px; }
.bot-icon { background:linear-gradient(145deg,#35b9f2,#0874b8); color:#fff; }
.coin-icon { background:linear-gradient(145deg,#42dfb0,#087b65); color:#04241c; }
.ram-icon { background:linear-gradient(145deg,#ffd86a,#b98212); color:#2a1803; }
.payment-panel { padding:14px; border:1px solid rgba(234,215,162,.22); border-radius:16px; background:linear-gradient(145deg,rgba(10,28,21,.9),rgba(12,10,18,.92)); }
.pay-method-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:10px; }
.pay-method-head > div { display:flex; flex-direction:column; }
.pay-method-head b { color:#ffe9a0; font-family:Russo One,sans-serif; }
.pay-method-head small { color:#8e8677; margin-top:2px; }
.method-badge { border:1px solid rgba(61,255,197,.5); border-radius:999px; color:#3dffc5; padding:4px 7px; font:700 8px Russo One,sans-serif; letter-spacing:.1em; }
.pay-continue { box-shadow:0 8px 22px rgba(224,181,74,.16); }
.payment-status { min-height:17px; margin-top:8px; color:#3dffc5; font-size:11px; text-align:center; }

.crypto-network-tabs { display:grid !important; grid-template-columns:repeat(3,1fr); gap:8px; }
.crypto-network-tabs button { min-width:0; min-height:78px; padding:7px 4px; border-radius:13px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px; font-style:normal; }
.crypto-network-tabs button.on { box-shadow:0 0 0 1px rgba(255,210,74,.35),inset 0 0 16px rgba(255,210,74,.08); }
.crypto-network-tabs small { color:#eee2c2; font-weight:800; font-size:10px; }
.crypto-network-tabs em { color:#817967; font-style:normal; font-size:8px; letter-spacing:.08em; }
.crypto-symbol { width:31px; height:31px; display:grid; place-items:center; border-radius:50%; color:#fff; font:800 18px Arial,sans-serif; box-shadow:inset 0 2px 5px rgba(255,255,255,.25),0 4px 10px rgba(0,0,0,.25); }
.crypto-symbol.usdt { background:#26a17b; }.crypto-symbol.eth { background:linear-gradient(145deg,#7187c8,#4b5c9d); }.crypto-symbol.btc { background:#f7931a; }
#accCopy { flex:0 0 auto; min-width:92px; height:36px; padding:0 13px; border:1px solid #ffd24a; border-radius:10px; background:linear-gradient(180deg,#f6dc88,#bd8b20); color:#211404; font:800 11px Russo One,sans-serif; text-transform:uppercase; letter-spacing:.05em; box-shadow:0 5px 14px rgba(0,0,0,.3),inset 0 1px rgba(255,255,255,.55); transition:.15s ease; }
#accCopy:active { transform:translateY(1px) scale(.98); box-shadow:0 2px 6px rgba(0,0,0,.3); }

.tables-heading { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:8px; min-height:34px; margin-bottom:10px; }
.tables-heading h3 { margin:0 !important; padding:0 !important; text-align:left !important; }
.online-badge { height:28px; padding:0 9px; border:1px solid rgba(61,255,197,.5); border-radius:999px; background:rgba(3,31,23,.8); display:flex; align-items:center; gap:5px; color:#cffff0; box-shadow:inset 0 0 12px rgba(61,255,197,.08); font:700 9px Russo One,sans-serif; white-space:nowrap; }
.online-badge i { width:7px; height:7px; border-radius:50%; background:#3dffc5; box-shadow:0 0 10px #3dffc5; animation:onlinePulse 1.4s ease-in-out infinite; }
.online-badge b { color:#fff2b5; font-size:11px; }
.online-badge span { color:#8fcbb8; text-transform:uppercase; letter-spacing:.06em; }
@keyframes onlinePulse { 50% { opacity:.45; transform:scale(.76); } }
.table-list { display:grid !important; grid-template-columns:repeat(2,minmax(0,1fr)) !important; gap:10px !important; }
.table-card { display:flex !important; flex-direction:column; align-items:stretch; min-height:176px; padding:12px !important; gap:8px !important; }
.table-card > div:first-child { flex:1 1 auto; }
.table-card h4 { font-size:clamp(15px,4.5vw,20px); line-height:1.15; overflow-wrap:anywhere; }
.table-card .meta { margin-top:6px; font-size:10px; line-height:1.35; }
.table-card .buy { font-size:17px; }
.table-card button { width:100%; grid-column:auto !important; margin-top:auto; }
.join-btn { font-size:12px !important; text-transform:uppercase; letter-spacing:.1em !important; }
.hud-mid { display:flex; flex-direction:column; align-items:center; gap:4px; }
.zone-pill { color:#fff0d0; border-color:#ffb13b; background:rgba(75,28,8,.88); font-size:9px; }
.zone-pill.warning { border-color:#ff405f; background:rgba(96,8,24,.92); animation:zoneWarning .7s ease-in-out infinite; }
@keyframes zoneWarning { 50% { transform:scale(1.05); box-shadow:0 0 18px rgba(255,50,90,.65); } }
.history-row { align-items:center; }
.history-row > span:first-child { display:flex; flex-direction:column; min-width:0; }
.history-row small { display:block; color:#807969; font-size:9px; margin-top:2px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width:52vw; }
.history-money { display:flex; flex-direction:column; align-items:flex-end; flex:0 0 auto; }
.history-money b { color:#ffe9a0; }
.history-money small { max-width:none; }
.status-pending { color:#ffd24a !important; }.status-paid { color:#3dffc5 !important; }.status-rejected { color:#ff7ab0 !important; }
.empty-history { color:#817969; justify-content:center !important; }

.admin-console { margin-top:20px; padding-top:16px; border-top:1px solid rgba(242,193,78,.34); }
.admin-title { display:flex; justify-content:space-between; align-items:center; }
.admin-title .subh { margin-bottom:0; }
.admin-live { color:#3dffc5; font:700 9px Russo One,sans-serif; letter-spacing:.1em; }
.admin-kpis { display:grid; grid-template-columns:repeat(2,1fr); gap:8px; margin:12px 0; }
.admin-kpis div { padding:10px; border:1px solid rgba(242,193,78,.22); border-radius:12px; background:rgba(2,12,9,.45); }
.admin-kpis span { display:block; color:#8d836e; font-size:9px; text-transform:uppercase; letter-spacing:.08em; }
.admin-kpis b { color:#ffe9a0; font-size:17px; }
.admin-error { padding:14px 16px; border:1px solid rgba(255,122,176,.45); border-radius:12px; background:rgba(70,10,26,.35); color:#ff9dbc; font:700 13px Nunito,sans-serif; text-align:center; }
.crm-row.player-row { grid-template-columns:1.2fr .75fr 1fr 1fr auto; }
.admin-credit { display:flex; align-items:center; gap:5px; }
.admin-credit input { width:82px; height:34px; border:1px solid var(--line); border-radius:8px; background:#07110d; color:#fff; padding:0 7px; font-size:11px; }
.admin-credit button { width:34px; height:34px; padding:0; border-radius:8px; background:linear-gradient(180deg,#f0d78c,#c4a227); color:#1a1408; font-size:18px; font-weight:900; }
.balance-adjust { display:flex; gap:4px; }
.balance-adjust input { min-width:60px; width:80px; height:30px; border:1px solid var(--line); border-radius:7px; background:#07110d; color:#fff; padding:0 6px; }
@media(max-width:640px){
  .crm-row,.crm-row.player-row { grid-template-columns:1fr auto; }
  .crm-row > :nth-child(3),.crm-row > :nth-child(4){ grid-column:auto; }
  .balance-adjust,.admin-credit { grid-column:1/-1; justify-content:flex-end; }
  .payment-method { min-height:88px; }
  .logo-stars.left{left:3px}.logo-stars.right{right:3px}
}

.lang-menu { min-width:190px; width:max-content; max-width:calc(100vw - 24px); max-height:min(70dvh,360px); overflow-y:auto; overflow-x:hidden; overscroll-behavior:contain; scrollbar-width:thin; }
.lang-menu button { min-height:42px; white-space:normal; line-height:1.25; overflow-wrap:anywhere; }
/* FAQ drawer and community column */
body.modal-open { overflow:hidden; }
.header-faq { font:800 16px Russo One,sans-serif; border-color:#ffd24a; color:#ffd24a; }
.header-tg { text-decoration:none; background:linear-gradient(145deg,#35b9f2,#0874b8); border-color:#dff5ff; color:#fff; }
.header-faq:hover,.header-faq:focus-visible,.header-tg:hover,.header-tg:focus-visible { filter:brightness(1.14); transform:translateY(-1px); }
.faq-modal { align-items:center; padding:12px; }
.faq-sheet { width:min(760px,100%); max-height:min(90dvh,820px); border-radius:20px; padding-top:20px; }
.faq-sheet > h3 { margin:0 34px 14px 0; color:#ffd24a; font-size:21px; }
.faq-list { display:grid; grid-template-columns:1fr; gap:7px; }
.faq-item { border:1px solid rgba(234,215,162,.2); border-radius:12px; background:rgba(4,15,12,.48); overflow:hidden; }
.faq-item summary { min-height:46px; padding:10px 12px; display:flex; align-items:center; justify-content:space-between; gap:12px; cursor:pointer; list-style:none; color:#f6e7b9; font-size:13px; font-weight:800; }
.faq-item summary::-webkit-details-marker { display:none; }
.faq-item summary i { flex:0 0 auto; color:#ffd24a; font:400 20px Russo One,sans-serif; transition:transform .2s ease; }
.faq-item[open] summary i { transform:rotate(45deg); }
.faq-item p { padding:0 12px 12px; color:#afa58e; font-size:12px; line-height:1.55; }
.responsibility-note { margin-top:10px; padding:10px 12px; border-left:3px solid #c99b32; border-radius:8px; background:rgba(65,42,8,.24); color:#9f947d; font-size:10px; line-height:1.5; }

/* Fluid layout guards for phones, tablets, desktop and short landscape screens. */
html { -webkit-text-size-adjust:100%; }
body,#app,.screen { width:100%; max-width:100%; }
.frame,.sheet,.panel-screen .frame { min-width:0; max-width:calc(100vw - 20px); }
img,svg,canvas { max-width:100%; }
button,input,code,.crm-row,.table-card,.history-row { min-width:0; }
code,.muted,.table-card .meta,.faq-item p { overflow-wrap:anywhere; word-break:break-word; }
@media(max-width:520px){
  .topbar { flex-wrap:wrap; }
  .ctrl-cluster { flex:0 0 auto; }
  .top-actions { margin-left:auto; max-width:calc(100% - 86px); justify-content:flex-end; }
  #authBtn { max-width:128px; overflow:hidden; text-overflow:ellipsis; }
  #walletBtn { max-width:112px; overflow:hidden; }
  #balanceLabel { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .lang-menu { left:0; right:auto; }
  .zone-pill { max-width:126px; white-space:normal; text-align:center; line-height:1.15; }
}
@media(max-width:480px){
  #lobby,.panel-screen,#tableLobby { padding-left:6px; padding-right:6px; }
  .frame { max-width:calc(100vw - 12px); padding-left:10px; padding-right:10px; border-radius:14px; }
  .topbar { gap:5px; }
  .ctrl-cluster,.top-actions { gap:5px; }
  .ghost-btn,.wallet-chip { padding-left:9px; padding-right:9px; font-size:11px; }
  .brand-name { font-size:clamp(23px,9vw,32px); }
  .logo-stage { width:min(248px,82vw) !important; }
  .hero-card { padding-left:8px; padding-right:8px; }
  .slot-frame { width:min(250px,96%); }
  .table-card { padding:11px; }
  .payment-methods { gap:5px; }
  .payment-method { min-height:82px; padding:7px 2px; }
  .payment-method b { font-size:9px; }
  .pay-icon { width:30px; height:30px; }
  .addr-box { align-items:stretch; flex-direction:column; }
  #accCopy { width:100%; }
  .admin-kpis,.stat-grid { gap:6px; }
  .crm-row.player-row { grid-template-columns:1fr 1fr; }
  .crm-row.player-row > div { padding:2px; }
  .minimap-wrap { width:82px; height:82px; }
  .lb { width:112px; font-size:9px; }
  .boost-btn { width:66px; height:66px; right:12px; }
}
@media(max-width:340px){
  .topbar { flex-wrap:wrap; }
  .top-actions { margin-left:auto; }
  .tables-heading { grid-template-columns:1fr; }
  .tables-heading h3 { text-align:center !important; }
  .online-badge { justify-self:center; height:26px; }
  .payment-methods { grid-template-columns:1fr; }
  .payment-method { min-height:58px; flex-direction:row; gap:8px; }
  .payment-method small { display:none; }
  .crypto-network-tabs { grid-template-columns:1fr !important; }
  .admin-kpis,.stat-grid { grid-template-columns:1fr; }
}
@media(orientation:landscape) and (max-height:620px){
  #lobby { padding-top:5px; }
  .lang-menu { max-height:58dvh; }
  .lang-menu button { min-height:38px; padding-top:6px; padding-bottom:6px; }
  .frame { padding-top:10px; }
  .logo-wrap { padding:5px 0; }
  .brand-name { margin-bottom:2px; font-size:24px; }
  .logo-stage { height:92px !important; width:200px !important; }
  .logo-clip { width:84px !important; height:84px !important; }
  .logo-stars i:nth-child(2){font-size:22px}
  .tag { margin-top:5px; font-size:10px; }
  .hero-card { margin:5px 0 10px; padding:10px; }
  .slot-frame { margin-bottom:8px; }
  .hero-card p { font-size:12px; }
  .sheet { max-height:96dvh; border-radius:16px; }
}
@media(min-width:1000px){
  .frame.wide { width:min(1040px,calc(100vw - 40px)); }
  .admin-kpis { grid-template-columns:repeat(4,1fr); }
}

/* ---- recent wins ticker ---- */
.recent-panel { margin-top:18px; padding-top:14px; border-top:1px solid rgba(234,215,162,.14); }
.recent-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:10px; }
.recent-head h3 { font:700 12px "Russo One",sans-serif; color:#ead7a2; letter-spacing:.06em; text-transform:uppercase; }
.ghost-btn.small { font-size:10px; padding:6px 12px; }
.recent-ticker { overflow:hidden; white-space:nowrap; border:1px solid rgba(234,215,162,.18); border-radius:12px; background:rgba(4,15,12,.6); padding:8px 0; position:relative; }
.recent-ticker::before,.recent-ticker::after { content:""; position:absolute; top:0; bottom:0; width:32px; z-index:2; pointer-events:none; }
.recent-ticker::before { left:0; background:linear-gradient(90deg,rgba(4,15,12,1),transparent); }
.recent-ticker::after { right:0; background:linear-gradient(270deg,rgba(4,15,12,1),transparent); }
.ticker-track { display:inline-block; white-space:nowrap; animation:ticker-scroll 40s linear infinite; }
.recent-ticker:hover .ticker-track { animation-play-state:paused; }
.tick { display:inline-block; margin:0 18px; color:#9fb6ac; font:600 12px Nunito,sans-serif; }
.tick b { color:#ffd24a; }
@keyframes ticker-scroll { from { transform:translateX(0); } to { transform:translateX(-50%); } }

/* ---- leaderboard ---- */
.leaderboard-sheet { max-width:420px; }
.leaderboard-list { list-style:none; margin:12px 0 0; padding:0; max-height:60dvh; overflow-y:auto; }
.leaderboard-list li { display:grid; grid-template-columns:28px 1fr auto auto; gap:10px; align-items:center; padding:9px 10px; border-bottom:1px solid rgba(234,215,162,.1); font:600 13px Nunito,sans-serif; color:#d9ceb4; }
.leaderboard-list li .rank { width:24px; height:24px; border-radius:50%; background:rgba(234,215,162,.12); color:#ffd24a; display:grid; place-items:center; font-size:11px; font-weight:800; }
.leaderboard-list li:nth-child(1) .rank { background:#ffd24a; color:#1a100c; }
.leaderboard-list li:nth-child(2) .rank { background:#c0c6cd; color:#1a100c; }
.leaderboard-list li:nth-child(3) .rank { background:#d98b4a; color:#1a100c; }
.leaderboard-list li .wins { color:#ffd24a; font-weight:800; }
.leaderboard-list li .kos { color:#7f968b; font-size:11px; }
.leaderboard-list li.seed b { color:#8fb2a4; }

/* ---- admin search + detail ---- */
.admin-search { margin:12px 0; }
.admin-search input { width:100%; padding:10px 12px; border:1px solid rgba(234,215,162,.24); border-radius:12px; background:rgba(4,15,12,.6); color:#e6dcc4; font:600 13px Nunito,sans-serif; }
.admin-search input::placeholder { color:#6d7a73; }
.player-detail { display:flex; align-items:baseline; gap:10px; padding:10px 12px; border:1px solid rgba(234,215,162,.18); border-radius:12px; background:rgba(4,15,12,.5); }
.player-detail b { font:700 18px "Russo One",sans-serif; color:#ffd24a; }
.admin-credit button[data-player] { background:transparent; border:1px solid rgba(234,215,162,.3); color:#cfe3d9; }

.connection-banner { position:fixed; left:50%; top:calc(12px + env(safe-area-inset-top)); transform:translateX(-50%); z-index:120; padding:8px 14px; border:1px solid #ffd24a; border-radius:999px; background:rgba(30,12,24,.94); color:#ffe9a0; font:800 11px Russo One,sans-serif; box-shadow:0 6px 22px rgba(0,0,0,.4); }
/* Close controls stay in the sheet corner and never overlap tabs or titles. */
.closable-sheet { padding-top:48px !important; }
.closable-sheet > .close {
  right:4px !important;
  top:4px !important;
  width:36px;
  height:36px;
  display:grid;
  place-items:center;
  z-index:5;
  border:1px solid rgba(234,215,162,.28);
  border-radius:50%;
  background:rgba(7,17,13,.88);
  line-height:1;
}
.closable-sheet > .close:hover,.closable-sheet > .close:focus-visible { background:#2a1325; border-color:#ffd24a; }

/* Unified touch controls: floating left-hand joystick + independent right BOOST. */
#game .joystick {
  display:none !important;
  position:absolute;
  left:0;
  top:0;
  bottom:auto;
  width:120px;
  height:120px;
  transform:translate(-50%,-50%);
  border:2px solid rgba(234,215,162,.48);
  background:radial-gradient(circle,rgba(234,215,162,.12),rgba(8,18,14,.38));
  box-shadow:0 0 0 3px rgba(255,61,138,.16),inset 0 0 24px rgba(0,0,0,.32);
  opacity:0;
  pointer-events:none;
  z-index:6;
}
#game .joystick.active { display:block !important; opacity:1; }
#game .joystick .stick { left:42px; top:42px; transition:none; }
@media (pointer:coarse) { #game .joystick:not(.active) { display:none !important; } }
