:root {
  --blue-950: #06346f;
  --blue-900: #075bbd;
  --blue-800: #0877df;
  --blue-700: #0b91f2;
  --blue-500: #24b8ff;
  --blue-100: #eaf7ff;
  --text: #07539c;
  --muted: #7891aa;
  --line: #d8e5f0;
  --white: #fff;
  --shadow: 0 9px 22px rgba(9, 93, 181, .2);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 32px;
  --space-8: 40px;
  --font-xs: 10px;
  --font-sm: 12px;
  --font-md: 14px;
  --font-lg: 16px;
  --font-xl: 18px;
  --font-2xl: 22px;
  --lh-tight: 1.15;
  --lh-base: 1.35;
  --radius-xs: 5px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --radius-pill: 999px;
  --shadow-soft: 0 6px 16px rgba(12, 78, 148, .10);
  --shadow-card: 0 8px 20px rgba(9, 94, 180, .16);
  --shadow-floating: 0 14px 34px rgba(0, 83, 171, .30);
  --shadow-modal: 0 26px 76px rgba(0, 22, 58, .42);
  --z-content: 50;
  --z-promo: 60;
  --z-floating: 70;
  --z-modal: 80;
  --z-priority: 90;
  --z-system: 100;
  --transition-fast: 140ms ease;
  --transition-base: 220ms ease;
  --transition-slow: 360ms cubic-bezier(.2, .8, .2, 1);
  --overlay-bg: rgba(2, 17, 39, .68);
  --button-h-sm: 34px;
  --button-h-md: 42px;
  --button-h-lg: 48px;
  --nav-h: 66px;
  --gradient-premium: linear-gradient(135deg, #21c4ff 0%, #0668d9 58%, #044fb7 100%);
  --gradient-header: linear-gradient(180deg, #2f65a2 0%, #1067c6 54%, #069cf3 100%);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; overflow-x: hidden; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background: #eef7ff;
  color: var(--text);
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }

.app-shell {
  width: min(430px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 0 0 calc(92px + var(--safe-bottom));
  background: #f7fbff;
  overflow: hidden;
}

.topbar {
  min-height: 92px;
  padding: 6px 14px 5px;
  display: grid;
  grid-template-columns: 1fr 86px 86px 34px;
  grid-template-areas:
    "rating app app close"
    "logo signup login menu";
  gap: 4px 8px;
  align-items: center;
  background: linear-gradient(180deg, #315f9a 0%, #105fbf 58%, #069af4 100%);
  color: #fff;
  border-radius: 0 0 3px 3px;
}

.app-rating { grid-area: rating; display: flex; align-items: center; gap: 9px; min-width: 0; }
.app-rating img { width: 42px; height: 42px; border-radius: 9px; }
.app-rating strong { display: block; color: #e8f4ff; font-size: 13px; line-height: 1; }
.app-rating span { display: block; color: #ffe35c; font-size: 14px; letter-spacing: 1px; margin-top: 3px; }
.app-btn {
  grid-area: app;
  height: 31px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  background: #fff;
  color: #1262bb;
  font-weight: 900;
  font-size: 13px;
  box-shadow: inset 0 -2px 0 rgba(0,0,0,.08);
}
.gift-close {
  grid-area: close;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(180deg, #ffdc63, #ff6b31);
  font-size: 19px;
  line-height: 29px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55), 0 5px 12px rgba(110, 45, 0, .24);
}
.brand-logo-img { grid-area: logo; width: 102px; max-width: 100%; align-self: center; }
.top-link {
  height: 31px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
}
.top-link.ghost { grid-area: signup; background: #fff; color: #145fad; }
.top-link.solid { grid-area: login; border: 1px solid rgba(255,255,255,.8); color: #fff; }
.menu-grid {
  grid-area: menu;
  width: 28px;
  height: 28px;
  justify-self: center;
  display: grid;
  grid-template-columns: repeat(2, 9px);
  gap: 4px;
  padding: 4px;
  border: 0;
  background: transparent;
}
.menu-grid span { border-radius: 3px; background: #fff; }

.hero-slider { margin: 0; background: #fff; }
.hero-card { height: 98px; overflow: hidden; background: #0a64c6; }
.hero-card img { width: 100%; height: 100%; display: block; object-fit: cover; }
.hero-dots { height: 15px; margin-top: -20px; position: relative; z-index: 2; text-align: center; }
.hero-dots span {
  display: inline-block;
  width: 22px;
  height: 5px;
  margin: 0 3px;
  border-radius: 20px;
  background: rgba(255,255,255,.45);
}
.hero-dots .active { background: #fff; }

.notice-bar {
  height: 36px;
  margin: 8px 14px 8px;
  display: grid;
  grid-template-columns: 34px 1fr 38px;
  align-items: center;
  gap: 8px;
  border: 1px solid #edf1f5;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(55, 105, 155, .08);
  overflow: hidden;
}
.notice-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: #f9bd00;
  font-size: 18px;
}
.notice-bar marquee { color: #1e2630; font-weight: 800; font-size: 13px; }
.notice-chat {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: #6f849b;
  color: #fff;
  font-weight: 900;
}

.home-layout {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 8px;
  padding: 0 14px;
}
.category-sidebar { display: grid; gap: 10px; align-content: start; }
.cat {
  min-height: 64px;
  border: 1px solid #e1edf7;
  border-radius: 12px;
  background: linear-gradient(180deg, #fff, #f6fbff);
  color: #1677c9;
  box-shadow: 0 4px 10px rgba(32, 98, 170, .08);
  font-weight: 900;
  font-size: 12px;
  text-transform: uppercase;
}
.cat img { width: 32px; height: 32px; display: block; margin: 0 auto 5px; object-fit: contain; }
.cat.active {
  color: #fff;
  background: linear-gradient(180deg, #1bb5ff, #0767d5);
  border-color: #0d8bed;
}

.game-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  align-content: start;
}
.game-card {
  min-width: 0;
  border: 0;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 5px 13px rgba(2, 95, 180, .14);
}
.game-card img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(430px, 100%);
  height: calc(66px + var(--safe-bottom));
  padding: 6px 4px var(--safe-bottom);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: #fff;
  border-top: 1px solid #d9e5ef;
  box-shadow: 0 -6px 22px rgba(0, 44, 96, .15);
  z-index: 20;
}
.bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: #59636d;
  font-size: 10px;
  font-weight: 800;
  text-align: center;
  min-width: 0;
}
.bottom-nav a.active { color: #0671d7; }
.bottom-nav span {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 2px solid currentColor;
  border-radius: 9px;
  font-size: 16px;
  line-height: 1;
}
.deposit-float { margin-top: -28px; color: #1279d8 !important; }
.deposit-float span {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 6px solid #fff;
  color: #fff;
  background: linear-gradient(180deg, #1ebdff, #045fbf);
  box-shadow: 0 8px 22px rgba(3, 100, 202, .35);
  font-size: 27px;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(0, 0, 0, .76);
  backdrop-filter: blur(3px);
}
.modal-overlay.show { display: flex; }
.security-modal,
.phone-modal {
  width: min(410px, 96vw);
  position: relative;
  border-radius: 8px;
  background: #dff1ff;
  box-shadow: 0 20px 70px rgba(0,0,0,.45);
  border: 1px solid #bfe4ff;
}
.security-modal { padding: 22px 8px 10px; }
.modal-close {
  position: absolute;
  right: -12px;
  top: -18px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: #ff4f59;
  color: #fff;
  font-size: 42px;
  line-height: 36px;
  z-index: 2;
}
.security-modal h2 {
  margin: 0 8px 8px;
  color: #1487e7;
  text-align: center;
  font-size: 21px;
  line-height: 1.15;
}
.security-copy {
  max-height: 390px;
  overflow: hidden;
  padding: 8px;
  border-radius: 6px;
  background: #fff;
  color: #6e6e6e;
  font-size: 18px;
  line-height: 1.42;
}
.security-copy p { margin: 0 0 8px; }
.security-copy strong { color: #626262; }
.popup-pager {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  color: #0b0b0b;
  font-size: 22px;
}
.popup-pager span { font-weight: 500; }
.popup-pager .active { color: #0a67c1; }
.popup-pager button { border: 0; background: transparent; color: #8b9bad; font-size: 28px; }

.page-auth { background: #fff; }
.auth-shell {
  width: min(430px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  background: #fff;
  padding-bottom: 34px;
}
.auth-header {
  height: 118px;
  padding: 28px 18px 16px;
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  align-items: center;
  position: relative;
  background: linear-gradient(90deg, #1bbdff 0%, #0561cc 100%);
}
.auth-header img { width: 172px; justify-self: center; }
.back-btn {
  width: 38px;
  height: 52px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 58px;
  font-weight: 200;
  line-height: 1;
}
.auth-card {
  margin: 28px 34px 0;
  padding: 0;
  background: #fff;
}
.auth-card:not(.register-card) .auth-form { gap: 18px; }
.auth-card:not(.register-card) .auth-form label { gap: 12px; }
.auth-card:not(.register-card) .safe-note { margin: 0 0 -2px; }
.auth-card:not(.register-card) .recover-actions { margin-top: 36px; }
.register-card { margin: 22px 12px 0; padding: 0 1px; }
.page-register .auth-shell { max-width: 390px; }
.page-register .auth-header {
  height: 65px;
  padding: 0;
  display: block;
}
.page-register .auth-header img {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 190px;
  transform: translate(-50%, -50%);
}
.page-register .back-btn {
  position: absolute;
  left: 16px;
  top: 50%;
  width: 30px;
  height: 34px;
  transform: translateY(-50%);
  font-size: 40px;
}
.auth-form { display: grid; gap: 28px; }
.page-register .register-card {
  margin: 15px 7px 0;
  padding: 0;
}
.page-register .register-card .auth-form { gap: 24px; }
.auth-form label {
  display: grid;
  gap: 14px;
  color: #0b62b6;
  font-size: 20px;
  font-weight: 900;
}
.page-register .register-card .auth-form label {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.2;
  gap: 9px;
}
.auth-form input {
  width: 100%;
  height: 52px;
  min-width: 0;
  border: 1px solid #d8d8d8;
  border-radius: 27px;
  background: #fff;
  padding: 0 18px;
  color: #1c2b39;
  outline: 0;
  font-size: 17px;
  box-shadow: inset 0 1px 2px rgba(0,0,0,.05);
}
.page-register .register-card .auth-form input {
  height: 36px;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 0 10px;
  color: #1f3347;
  font-size: 13px;
  font-weight: 400;
  line-height: 36px;
}
.page-register .register-card .auth-form input::placeholder {
  color: #a8a8a8;
  font-size: 13px;
  font-weight: 400;
  line-height: 36px;
}
.page-register .register-card .password-wrap input { padding-right: 36px; }
.page-register .register-card .password-wrap button {
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 12px;
  line-height: 1;
}
.auth-form input::placeholder { color: #a9a9a9; }
.auth-form input:focus { border-color: #1592ef; box-shadow: 0 0 0 3px rgba(21,146,239,.12); }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 50px; }
.password-wrap button {
  position: absolute;
  right: 8px;
  top: 7px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: #1f6fb7;
  font-size: 18px;
}
.safe-note {
  margin: -4px 0 -8px;
  color: #1261ae;
  text-align: center;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.25;
}
.primary-btn {
  height: 56px;
  border: 0;
  border-radius: 30px;
  background: linear-gradient(90deg, #20bbff, #0562d2);
  color: #fff;
  box-shadow: 0 8px 18px rgba(5, 103, 210, .22);
  font-size: 22px;
  font-weight: 900;
}
.wide { width: 100%; }
.switch-auth {
  margin: -10px 0 0;
  text-align: center;
  color: #222;
  font-size: 17px;
}
.switch-auth a { color: #111; font-weight: 900; }
.recover-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 38px;
}
.recover-actions a {
  min-height: 54px;
  display: grid;
  place-items: center;
  border: 1px solid #0a69bf;
  border-radius: 28px;
  color: #0a62ad;
  text-align: center;
  font-weight: 900;
  font-size: 13px;
  text-decoration: underline;
  line-height: 1.18;
  padding: 0 8px;
}
.recover-actions a:first-child { background: linear-gradient(90deg, #23b9ff, #0863d0); color: #fff; border: 0; }
.page-register .phone-field { position: relative; display: grid; grid-template-columns: 92px 1fr; align-items: center; border: 1px solid #ddd; border-radius: 4px; overflow: hidden; }
.page-register .phone-field span { height: 36px; display: grid; place-items: center; color: #0c65b6; border-right: 1px solid #ddd; font-size: 15px; }
.phone-field input { border: 0 !important; border-radius: 0 !important; box-shadow: none !important; }
.terms {
  grid-template-columns: 28px 1fr !important;
  align-items: start;
  gap: 10px !important;
  color: #4b4b4b !important;
  font-size: 17px !important;
  font-weight: 800 !important;
  line-height: 1.25;
}
.page-register .terms {
  grid-template-columns: 24px 1fr !important;
  gap: 7px !important;
  font-size: 14px !important;
  line-height: 1.25;
}
.terms input {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  -webkit-appearance: none;
  appearance: none;
  border: 1.5px solid #1b6ba8;
  border-radius: 999px !important;
  background: #fff;
  accent-color: #096fcb;
  margin: 0;
}
.page-register .terms input {
  width: 18px;
  height: 18px;
}
.page-register .terms input:checked::before {
  font-size: 15px;
}
.page-register .primary-btn {
  height: 42px;
  border-radius: 22px;
  font-size: 17px;
  background: linear-gradient(90deg, #21bcff 0%, #0770dd 100%);
}
.page-register .switch-auth {
  margin: -8px 0 0;
  font-size: 14px;
}

.page-login .auth-shell { max-width: 390px; }
.page-login .auth-header {
  height: 65px;
  padding: 0;
  display: block;
}
.page-login .auth-header img {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 190px;
  transform: translate(-50%, -50%);
}
.page-login .back-btn {
  position: absolute;
  left: 16px;
  top: 50%;
  width: 30px;
  height: 34px;
  transform: translateY(-50%);
  font-size: 40px;
}
.page-login .auth-card {
  margin: 21px 32px 0;
}
.page-login .auth-card:not(.register-card) .auth-form {
  gap: 17px;
}
.page-login .auth-card:not(.register-card) .auth-form label {
  gap: 9px;
}
.page-login .auth-form label {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.2;
}
.page-login .auth-form input {
  height: 36px;
  border: 1px solid #ddd;
  border-radius: 20px;
  padding: 0 14px;
  font-size: 13px;
  line-height: 36px;
  box-shadow: inset 0 1px 2px rgba(0,0,0,.04);
}
.page-login .auth-form input::placeholder {
  font-size: 13px;
  color: #a8a8a8;
}
.page-login .password-wrap input {
  padding-right: 38px;
}
.page-login .password-wrap button {
  right: 10px;
  top: 50%;
  width: 20px;
  height: 20px;
  transform: translateY(-50%);
  font-size: 13px;
}
.page-login .safe-note {
  margin: 1px 0 -1px;
  font-size: 13px;
  line-height: 1.2;
  font-weight: 900;
}
.page-login .primary-btn {
  height: 44px;
  border-radius: 23px;
  font-size: 18px;
  background: linear-gradient(90deg, #22bdff 0%, #0669d9 100%);
}
.page-login .switch-auth {
  margin: -5px 0 0;
  font-size: 14px;
}
.page-login .recover-actions {
  gap: 14px;
  margin-top: 25px;
}
.page-login .recover-actions a {
  min-height: 50px;
  border-radius: 25px;
  font-size: 13px;
  line-height: 1.1;
}
.terms input:checked::before {
  content: "✓";
  color: #1b6ba8;
  font-size: 19px;
  font-weight: 700;
  line-height: 1;
}
.phone-modal {
  padding: 24px 18px 18px;
  text-align: center;
  background: linear-gradient(180deg, #fff, #eef8ff);
  border-radius: 20px;
}
.phone-modal h2 { margin: 0 0 8px; color: #0866c7; }
.phone-modal p { margin: 0 0 14px; color: #546b82; }
.phone-modal input {
  width: 100%;
  height: 50px;
  margin-bottom: 14px;
  border: 1px solid #bcdff9;
  border-radius: 25px;
  padding: 0 16px;
  outline: 0;
}
.toast {
  position: fixed;
  left: 50%;
  bottom: 100px;
  z-index: 90;
  transform: translateX(-50%) translateY(12px);
  width: min(360px, 90vw);
  padding: 13px 15px;
  border-radius: 16px;
  background: rgba(6, 91, 189, .96);
  color: #fff;
  text-align: center;
  font-weight: 800;
  box-shadow: 0 14px 34px rgba(0, 46, 106, .35);
  opacity: 0;
  pointer-events: none;
  transition: .22s ease;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.error { background: rgba(220, 45, 58, .97); }
.toast.loading { background: rgba(6, 91, 189, .97); }

@media (max-width: 390px) {
  .topbar { padding-inline: 10px; grid-template-columns: 1fr 78px 78px 30px; }
  .brand-logo-img { width: 104px; }
  .top-link { font-size: 13px; }
  .home-layout { grid-template-columns: 72px minmax(0, 1fr); gap: 8px; padding-inline: 8px; }
  .game-grid { gap: 6px; }
  .cat { min-height: 60px; font-size: 11px; }
  .auth-card { margin-inline: 28px; }
  .register-card { margin-inline: 12px; }
  .auth-form label { font-size: 19px; }
  .recover-actions { gap: 10px; }
}

/* Production mobile UI system */
body {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.modal-open {
  overflow: hidden;
  touch-action: none;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button:active,
.top-link:active,
.app-btn:active,
.game-card:active,
.cat:active,
.bottom-nav a:active,
.floating-main:active,
.floating-action:active {
  transform: scale(.97);
}
.app-shell {
  position: relative;
  background:
    radial-gradient(circle at 50% -40px, rgba(38, 191, 255, .18), transparent 190px),
    linear-gradient(180deg, #f7fbff 0%, #eef7ff 100%);
  padding-bottom: calc(var(--nav-h) + 26px + var(--safe-bottom));
}
.topbar {
  position: sticky;
  top: 0;
  z-index: var(--z-content);
  padding-top: calc(var(--space-2) + env(safe-area-inset-top, 0px));
  background: var(--gradient-header);
  box-shadow: 0 8px 22px rgba(3, 73, 149, .18);
}
.app-btn,
.top-link,
.primary-btn {
  min-height: var(--button-h-sm);
  transition: transform var(--transition-fast), filter var(--transition-fast), box-shadow var(--transition-fast);
}
.primary-btn {
  background: var(--gradient-premium);
  box-shadow: var(--shadow-floating);
  letter-spacing: 0;
}
.primary-btn:active {
  filter: brightness(.96);
}
.hero-card {
  box-shadow: var(--shadow-soft);
}
.notice-bar {
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-soft);
}
.home-layout {
  grid-template-columns: 68px minmax(0, 1fr);
  gap: var(--space-2);
  padding: 0 var(--space-3);
}
.category-sidebar {
  position: sticky;
  top: calc(104px + env(safe-area-inset-top, 0px));
  max-height: calc(100vh - 245px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(var(--nav-h) + 18px);
  scrollbar-width: none;
}
.category-sidebar::-webkit-scrollbar {
  display: none;
}
.cat {
  min-height: 58px;
  border-radius: var(--radius-md);
  font-size: var(--font-xs);
  line-height: var(--lh-tight);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(10px);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-base);
}
.cat img {
  width: 28px;
  height: 28px;
}
.cat.active {
  position: relative;
  box-shadow: var(--shadow-card);
}
.cat.active::after {
  content: "";
  position: absolute;
  right: -5px;
  top: 50%;
  width: 4px;
  height: 22px;
  border-radius: var(--radius-pill);
  background: #0c79df;
  transform: translateY(-50%);
}
.game-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  padding-bottom: calc(var(--nav-h) + 22px);
}
.game-card {
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  transform: translateZ(0);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), filter var(--transition-fast);
}
.game-card:hover {
  box-shadow: var(--shadow-floating);
}
.game-card img {
  aspect-ratio: 1 / 1;
  background: linear-gradient(110deg, #eef7ff 8%, #fff 18%, #eef7ff 33%);
  background-size: 200% 100%;
}
.bottom-nav {
  height: calc(var(--nav-h) + var(--safe-bottom));
  z-index: var(--z-floating);
  box-shadow: 0 -10px 28px rgba(0, 42, 96, .14);
}
.bottom-nav a {
  font-size: var(--font-xs);
  line-height: var(--lh-tight);
}
.bottom-nav span {
  border-radius: var(--radius-sm);
}
.deposit-float span {
  width: 54px;
  height: 54px;
  background: var(--gradient-premium);
  box-shadow: var(--shadow-floating);
}
.floating-hub {
  position: fixed;
  right: max(14px, env(safe-area-inset-right, 0px));
  bottom: calc(var(--nav-h) + var(--safe-bottom) + 14px);
  z-index: var(--z-floating);
  display: grid;
  justify-items: end;
  gap: var(--space-2);
  transition: opacity var(--transition-base), transform var(--transition-base);
}
body.modal-open .floating-hub,
.floating-hub.scrolling {
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
}
.floating-dismiss {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  justify-self: end;
  margin: 0 4px -2px 0;
  border: 2px solid #fff;
  border-radius: 50%;
  color: #fff;
  background: #e84149;
  box-shadow: var(--shadow-soft);
  font-size: 18px;
  line-height: 1;
}
.floating-hub.collapsed .floating-actions,
.floating-hub.collapsed .floating-dismiss {
  display: none;
}
.floating-main {
  width: 50px;
  height: 50px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: var(--gradient-premium);
  box-shadow: 0 0 0 6px rgba(31, 177, 255, .14), var(--shadow-floating);
  font-size: 26px;
  font-weight: 800;
  display: grid;
  place-items: center;
  transition: transform var(--transition-base);
}
.floating-hub.open .floating-main {
  transform: rotate(45deg);
}
.floating-actions {
  display: grid;
  gap: var(--space-2);
  transform: translateY(0) scale(1);
  transform-origin: bottom right;
  opacity: 1;
  pointer-events: auto;
  transition: opacity var(--transition-base), transform var(--transition-base);
}
.floating-hub:not(.open):not(.promo-visible) .floating-actions {
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px) scale(.96);
}
.floating-action {
  min-width: 78px;
  min-height: 34px;
  border: 0;
  border-radius: var(--radius-pill);
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: var(--space-2);
  color: #07539c;
  background: rgba(255, 255, 255, .94);
  box-shadow: var(--shadow-card);
  font-size: 10px;
  font-weight: 800;
  backdrop-filter: blur(12px);
}
.floating-action.featured { color: #075fbb; }
.floating-action.cashback { color: #1c8a4a; }
.floating-action.support { color: #8a4b00; }
.floating-action.telegram { color: #0a78c9; }
.side-drawer {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  background: rgba(2, 17, 39, .56);
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
}
.side-drawer.show {
  opacity: 1;
  pointer-events: auto;
}
.drawer-panel {
  width: min(318px, 84vw);
  min-height: 100%;
  padding: 0 0 calc(var(--space-5) + var(--safe-bottom));
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(232,247,255,.96));
  box-shadow: var(--shadow-modal);
  transform: translateX(-100%);
  transition: transform var(--transition-slow);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.side-drawer.show .drawer-panel {
  transform: translateX(0);
}
.drawer-head {
  min-height: calc(82px + env(safe-area-inset-top, 0px));
  padding: calc(12px + env(safe-area-inset-top, 0px)) 46px 12px 18px;
  display: grid;
  align-items: center;
  position: relative;
  background: var(--gradient-header);
  box-shadow: var(--shadow-soft);
}
.drawer-close {
  right: 12px;
  top: calc(18px + env(safe-area-inset-top, 0px));
}
.drawer-logo {
  width: 156px;
  display: block;
  margin: 0;
}
.drawer-login {
  height: 44px;
  margin: 14px 16px 10px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-pill);
  color: #fff;
  background: var(--gradient-premium);
  box-shadow: var(--shadow-card);
  font-size: 16px;
  font-weight: 900;
}
.drawer-menu {
  display: grid;
  gap: 8px;
  padding: 0 14px;
}
.drawer-menu a {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  border-radius: 12px;
  color: var(--blue-900);
  background: rgba(255,255,255,.78);
  box-shadow: var(--shadow-soft);
  font-size: 12px;
  font-weight: 800;
}
.drawer-menu a span {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  flex: 0 0 26px;
  border-radius: 50%;
  color: #fff;
  background: var(--gradient-premium);
  font-size: 14px;
}
.drawer-decor {
  margin: 14px 14px 0;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.drawer-decor img {
  width: 100%;
  display: block;
  aspect-ratio: 2.5 / 1;
  object-fit: cover;
  object-position: center;
}
.modal-overlay {
  z-index: var(--z-modal);
  background: var(--overlay-bg);
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
}
.modal-overlay.show {
  opacity: 1;
  pointer-events: auto;
}
#depositModal {
  z-index: 65;
  align-items: flex-end;
  padding: 0 max(10px, env(safe-area-inset-right, 0px)) calc(var(--nav-h) + var(--safe-bottom) + 8px) max(10px, env(safe-area-inset-left, 0px));
}
.security-modal,
.phone-modal,
.payment-modal {
  width: min(356px, calc(100vw - 28px));
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(232,247,255,.98));
  box-shadow: var(--shadow-modal);
  transform: translateY(8px) scale(.98);
  transition: transform var(--transition-slow);
}
.modal-overlay.show .security-modal,
.modal-overlay.show .phone-modal,
.modal-overlay.show .payment-modal {
  transform: translateY(0) scale(1);
}
.security-modal {
  padding: var(--space-6) var(--space-4) var(--space-4);
  text-align: center;
}
.modal-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto var(--space-3);
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(180deg, #f2f9ff, #d9efff);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8), var(--shadow-soft);
  font-size: 26px;
}
.modal-close {
  right: 10px;
  top: 10px;
  width: 34px;
  height: 34px;
  line-height: 28px;
  font-size: 30px;
  box-shadow: var(--shadow-soft);
}
.security-modal h2,
.phone-modal h2 {
  margin: 0 36px var(--space-2);
  color: var(--blue-900);
  font-size: var(--font-2xl);
  font-weight: 900;
  line-height: var(--lh-tight);
}
.security-copy {
  max-height: none;
  overflow: visible;
  padding: 0;
  background: transparent;
  color: #47627a;
  font-size: var(--font-md);
  line-height: var(--lh-base);
  text-align: left;
}
.security-copy p {
  margin: 0 0 var(--space-3);
  text-align: center;
}
.security-copy ul {
  margin: 0 0 var(--space-4);
  padding: 0;
  list-style: none;
  display: grid;
  gap: var(--space-2);
}
.security-copy li {
  position: relative;
  padding-left: 24px;
}
.security-copy li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: #0b8fe8;
  font-weight: 900;
}
.phone-modal,
.payment-modal {
  padding: var(--space-6) var(--space-4) var(--space-5);
}
.phone-modal p,
.payment-modal p {
  color: #5a7088;
  font-size: var(--font-md);
  line-height: var(--lh-base);
  text-align: center;
}
.phone-modal input {
  height: var(--button-h-lg);
  border-radius: var(--radius-pill);
}
.payment-modal {
  position: relative;
  text-align: center;
}
.payment-modal.bottom-sheet {
  width: min(430px, 100%);
  border-radius: 22px 22px 18px 18px;
  padding: 16px 16px 18px;
  transform: translateY(110%);
}
.modal-overlay.show .payment-modal.bottom-sheet {
  transform: translateY(0);
}
.sheet-handle {
  width: 42px;
  height: 5px;
  margin: 0 auto 12px;
  border-radius: 999px;
  background: #bfd8ef;
}
.payment-modal h2 {
  margin: 0 36px var(--space-2);
  color: var(--blue-900);
  font-size: var(--font-2xl);
  line-height: var(--lh-tight);
}
.payment-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: var(--space-4);
}
.pay-btn {
  min-height: 56px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: #fff;
  box-shadow: var(--shadow-card);
  font-size: 17px;
  font-weight: 900;
}
.pay-btn.deposit {
  background: linear-gradient(180deg, #26d5ff, #0870da);
}
.pay-btn.withdraw {
  background: linear-gradient(180deg, #ffba39, #f07816);
}
.secondary-btn {
  height: var(--button-h-lg);
  display: grid;
  place-items: center;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(8, 104, 211, .32);
  color: var(--blue-900);
  background: #fff;
  box-shadow: var(--shadow-soft);
  font-size: var(--font-lg);
  font-weight: 900;
}
.toast {
  z-index: var(--z-toast, 95);
  box-shadow: var(--shadow-modal);
}
.page-login .auth-header,
.page-register .auth-header {
  background: linear-gradient(90deg, #21bdff 0%, #0766d2 100%);
  box-shadow: var(--shadow-soft);
}
.page-login .auth-form input,
.page-register .register-card .auth-form input {
  box-shadow: inset 0 1px 2px rgba(0,0,0,.04);
}
@media (max-width: 390px) {
  .home-layout {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: var(--space-2);
    padding-inline: var(--space-2);
  }
  .game-grid {
    gap: 6px;
  }
  .cat {
    min-height: 56px;
    font-size: 9px;
  }
  .cat img {
    width: 26px;
    height: 26px;
  }
  .floating-hub {
    right: var(--space-3);
  }
}

/* Final mobile polish pass */
:root {
  --overlay-bg: rgba(2, 17, 39, .61);
  --shadow-card: 0 5px 14px rgba(9, 94, 180, .11);
  --shadow-floating: 0 10px 24px rgba(0, 83, 171, .22);
  --shadow-modal: 0 18px 48px rgba(0, 22, 58, .30);
}

.topbar {
  min-height: 90px;
  grid-template-columns: minmax(112px, 1fr) 82px 82px 32px;
  gap: 5px 7px;
  align-items: center;
}
.app-rating {
  gap: 7px;
}
.app-rating img {
  width: 38px;
  height: 38px;
  border-radius: 8px;
}
.app-rating strong {
  font-size: 12px;
}
.app-rating span {
  font-size: 12px;
  letter-spacing: .5px;
}
.app-btn,
.top-link {
  height: 30px;
  min-height: 30px;
  border-radius: 8px;
  font-size: 12px;
}
.app-btn {
  border-radius: 18px;
}
.gift-close {
  width: 31px;
  height: 31px;
  font-size: 17px;
}
.brand-logo-img {
  width: 104px;
}
.menu-grid {
  width: 27px;
  height: 27px;
  gap: 3px;
}

.home-layout {
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 7px;
  padding-inline: 8px;
}
.category-sidebar {
  gap: 7px;
  top: calc(98px + env(safe-area-inset-top, 0px));
}
.cat {
  min-height: 54px;
  padding: 5px 3px;
  border-width: 1px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 3px;
  font-size: 9px;
}
.cat img {
  width: 24px;
  height: 24px;
  margin: 0;
}
.cat.active {
  box-shadow: 0 6px 14px rgba(6, 112, 218, .20);
}
.cat.active::after {
  right: -4px;
  width: 3px;
  height: 18px;
}

.game-grid {
  gap: 6px;
}
.game-card {
  border: 1px solid rgba(14, 126, 219, .13);
  border-radius: 9px;
  box-shadow: 0 4px 11px rgba(11, 86, 164, .10);
}
.game-card:hover {
  box-shadow: 0 6px 14px rgba(11, 86, 164, .14);
}
.game-card img {
  aspect-ratio: 1 / .86;
}
.game-card h3 {
  height: 26px;
  margin: 0;
  padding: 0 4px;
  display: grid;
  place-items: center;
  color: #0a5fac;
  background: linear-gradient(180deg, #fff, #f4faff);
  font-size: 8px;
  font-weight: 900;
  line-height: 1.08;
  text-align: center;
  overflow: hidden;
}

.seo-content,
.site-footer {
  width: min(100%, 430px);
  margin: 14px auto 0;
  padding: 0 14px;
  color: #31526f;
}
.seo-content h1 {
  margin: 0 0 8px;
  color: #075bbd;
  font-size: 18px;
  line-height: 1.25;
}
.seo-content h2 {
  margin: 12px 0 5px;
  color: #0a68c7;
  font-size: 14px;
  line-height: 1.25;
}
.seo-content p,
.site-footer p {
  margin: 0 0 8px;
  font-size: 12px;
  line-height: 1.5;
}
.seo-content article {
  border-top: 1px solid rgba(8, 119, 223, .10);
  padding-top: 3px;
}
.site-footer {
  padding-bottom: 8px;
  text-align: center;
}
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 12px;
  font-size: 11px;
  font-weight: 800;
  color: #0868c8;
}

.floating-hub {
  right: max(8px, env(safe-area-inset-right, 0px));
  bottom: calc(var(--nav-h) + var(--safe-bottom) + 10px);
  gap: 5px;
}
body:not(.modal-open) .floating-hub.promo-visible:not(.scrolling):not(.collapsed) {
  opacity: .94;
  pointer-events: auto;
  transform: none;
}
.floating-actions {
  gap: 5px;
}
.floating-action {
  min-width: 70px;
  min-height: 29px;
  padding: 0 7px;
  gap: 5px;
  font-size: 9px;
  box-shadow: 0 4px 10px rgba(10, 78, 145, .14);
}
.floating-dismiss {
  width: 21px;
  height: 21px;
  margin: 0 2px -1px 0;
  font-size: 15px;
  border-width: 1.5px;
}
.floating-main {
  width: 47px;
  height: 47px;
  font-size: 24px;
  box-shadow: 0 0 0 5px rgba(31, 177, 255, .11), var(--shadow-floating);
}

.modal-overlay {
  background: var(--overlay-bg);
  backdrop-filter: blur(6px);
}
.security-modal {
  width: min(348px, calc(100vw - 32px));
  max-height: calc(100vh - 86px - var(--safe-bottom));
  padding: 22px 16px 16px;
  border-radius: 20px;
  box-shadow: var(--shadow-modal);
  overflow: visible;
}
.modal-icon {
  width: 56px;
  height: 56px;
  margin-bottom: 12px;
  background: radial-gradient(circle at 50% 35%, #ffffff 0%, #e6f6ff 52%, #c7eaff 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.95), 0 7px 16px rgba(6, 112, 218, .16);
  font-size: 26px;
}
.security-modal .modal-close {
  width: 30px;
  height: 30px;
  right: 9px;
  top: 9px;
  font-size: 25px;
  line-height: 23px;
  box-shadow: 0 5px 12px rgba(218, 36, 54, .18);
}
.security-modal h2 {
  margin-bottom: 10px;
  font-size: 20px;
}
.security-copy {
  font-size: 13px;
  line-height: 1.38;
}
.security-copy ul {
  margin-bottom: 18px;
  gap: 9px;
}
.popup-pager {
  height: 38px;
  margin: 2px 0 8px;
  gap: 17px;
  font-size: 18px;
}
.security-modal .primary-btn {
  height: 48px;
  border-radius: 22px;
  font-size: 18px;
  box-shadow: 0 8px 18px rgba(6, 112, 218, .20);
}

@media (max-width: 390px) {
  .topbar {
    grid-template-columns: minmax(104px, 1fr) 76px 76px 30px;
    padding-inline: 8px;
  }
  .home-layout {
    grid-template-columns: 60px minmax(0, 1fr);
    gap: 6px;
    padding-inline: 7px;
  }
  .game-grid {
    gap: 5px;
  }
  .game-card h3 {
    height: 24px;
    font-size: 7.5px;
  }
  .floating-hub {
    right: 6px;
  }
}

/* Production final spacing polish */
:root {
  --overlay-bg: rgba(2, 17, 39, .58);
  --shadow-card: 0 4px 11px rgba(9, 94, 180, .09);
  --shadow-floating: 0 8px 20px rgba(0, 83, 171, .18);
  --shadow-modal: 0 16px 42px rgba(0, 22, 58, .26);
}
.bottom-nav {
  padding-inline: 6px;
}
.bottom-nav a {
  gap: 2px;
}
.bottom-nav span {
  width: 24px;
  height: 24px;
  font-size: 14px;
}
.deposit-float span {
  width: 52px;
  height: 52px;
  font-size: 25px;
}
.floating-hub {
  right: max(5px, env(safe-area-inset-right, 0px));
}
.floating-action {
  min-width: 64px;
  min-height: 28px;
  padding: 0 6px;
  font-size: 8.5px;
}
.floating-dismiss {
  transform: translateX(3px);
}
.drawer-menu {
  gap: 7px;
}
.drawer-menu a {
  min-height: 40px;
  border-radius: 11px;
}
.game-card {
  border-color: rgba(14, 126, 219, .10);
  box-shadow: 0 3px 9px rgba(11, 86, 164, .08);
}
.security-modal,
.phone-modal,
.payment-modal {
  box-shadow: var(--shadow-modal);
}

/* Reference UI restore: match captured SIU88 H5 screens */
.topbar {
  min-height: 104px;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 16px 8px;
  grid-template-columns: minmax(150px, 1fr) 92px 44px;
  grid-template-areas:
    "rating app close"
    "logo signup login menu";
  gap: 8px 10px;
  background: #3f6096;
  box-shadow: none;
}
.app-rating img {
  width: 44px;
  height: 44px;
  border-radius: 10px;
}
.app-rating strong {
  font-size: 15px;
  color: #fff;
}
.app-rating span {
  font-size: 15px;
  letter-spacing: 2px;
}
.app-btn {
  height: 36px;
  min-height: 36px;
  border-radius: 24px;
  font-size: 16px;
}
.gift-close {
  width: 38px;
  height: 38px;
  background: #ee5657;
  font-size: 28px;
  box-shadow: none;
}
.brand-logo-img {
  width: 118px;
}
.top-link {
  height: 34px;
  min-height: 34px;
  border-radius: 7px;
  font-size: 14px;
}
.menu-grid {
  width: 34px;
  height: 34px;
  grid-template-columns: repeat(2, 8px);
  place-content: center;
}

.hero-card {
  height: 118px;
}
.notice-bar {
  margin: 10px 16px;
  height: 38px;
}
.home-layout {
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 12px;
  padding: 0 16px 0 16px;
}
.category-sidebar {
  top: calc(112px + env(safe-area-inset-top, 0px));
  gap: 10px;
  max-height: calc(100vh - 190px);
}
.cat {
  min-height: 92px;
  padding: 8px 4px;
  border-radius: 12px;
  border: 1px solid #e4edf7;
  background: linear-gradient(180deg, #fff, #f8fbff);
  color: #2a7bd7;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 2px 7px rgba(30, 90, 150, .08);
}
.cat img {
  width: 42px;
  height: 42px;
}
.cat.active {
  color: #fff;
  background: linear-gradient(135deg, #22b7ff, #125fe3);
  box-shadow: 0 5px 13px rgba(10, 99, 220, .24);
}
.cat.active::after {
  right: -11px;
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 7px solid #1c78f1;
  border-radius: 0;
  background: transparent;
}
.game-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  min-width: 0;
}
.game-card {
  border: 2px solid #2382df;
  border-radius: 7px;
  background: #fff;
  overflow: hidden;
  box-shadow: none;
}
.game-card:hover {
  box-shadow: none;
}
.game-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / .86;
  object-fit: contain;
  object-position: center;
  background: #fff;
}
.game-card h3 {
  height: 30px;
  padding: 0 3px;
  color: #fff;
  background: linear-gradient(180deg, #3f9cf3, #1e72dc);
  font-size: 10px;
  line-height: 1.08;
}

.modal-overlay {
  background: rgba(0, 0, 0, .72);
  backdrop-filter: blur(1px);
}
.security-modal {
  width: min(680px, calc(100vw - 28px));
  max-height: min(742px, calc(100vh - 180px));
  padding: 62px 8px 0;
  border-radius: 9px;
  border: 1px solid #c7e4fb;
  background: #dff0ff;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .30);
  overflow: visible;
  text-align: left;
}
.security-modal .modal-close {
  right: -13px;
  top: -14px;
  width: 48px;
  height: 48px;
  border: 0;
  color: #fff;
  background: #f25a5e;
  font-size: 46px;
  line-height: 38px;
  box-shadow: 0 4px 10px rgba(0,0,0,.14);
}
.security-modal h2 {
  position: absolute;
  left: 8px;
  right: 8px;
  top: 16px;
  margin: 0;
  color: #3c88e5;
  text-align: center;
  font-size: 25px;
  font-weight: 900;
  line-height: 1.15;
}
.security-copy {
  height: min(588px, calc(100vh - 300px));
  padding: 0 8px 8px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 8px;
  background: #fff;
  color: #8a8a8a;
  font-size: 25px;
  line-height: 1.32;
}
.security-copy p {
  margin: 0 0 8px;
  text-align: left;
}
.security-copy strong {
  color: #777;
  font-weight: 900;
}
.popup-pager {
  height: 66px;
  margin: 0;
  gap: 20px;
  color: #111;
  font-size: 23px;
}
.popup-pager span {
  font-weight: 500;
}
.popup-pager .active {
  color: #2b7ee0;
}
.popup-pager button {
  border: 0;
  background: transparent;
  color: #677b91;
  font-size: 32px;
}

.side-drawer {
  background: rgba(0, 0, 0, .72);
  backdrop-filter: blur(2px);
}
.drawer-panel {
  width: min(462px, 65vw);
  background:
    radial-gradient(circle at 45% 88%, rgba(22, 117, 220, .10), transparent 180px),
    linear-gradient(180deg, #fff, #f5f7f8);
  box-shadow: none;
}
.drawer-head {
  min-height: 226px;
  padding: calc(38px + env(safe-area-inset-top, 0px)) 58px 26px 58px;
  justify-items: center;
  align-content: center;
  border-radius: 0 0 28px 28px;
  background: linear-gradient(135deg, #35b8ff, #155fe2);
}
.drawer-logo {
  width: 190px;
  margin-bottom: 12px;
}
.drawer-head strong {
  color: #fff;
  font-size: 30px;
  line-height: 1.12;
  text-align: center;
}
.drawer-close {
  right: 20px;
  top: calc(22px + env(safe-area-inset-top, 0px));
  width: 44px;
  height: 44px;
  font-size: 42px;
  line-height: 34px;
}
.drawer-menu {
  gap: 17px;
  padding: 38px 48px 0;
}
.drawer-menu a {
  min-height: 35px;
  gap: 22px;
  padding: 0;
  border-radius: 0;
  color: #111;
  background: transparent;
  box-shadow: none;
  font-size: 22px;
  font-weight: 900;
}
.drawer-menu a span {
  width: 34px;
  height: 34px;
  flex-basis: 34px;
  color: #3d84df;
  background: transparent;
  font-size: 28px;
}
.drawer-login {
  height: 66px;
  margin: 40px 30px 28px;
  border-radius: 26px;
  font-size: 26px;
}
.drawer-decor {
  margin: 0 28px;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}
.drawer-decor img {
  height: 230px;
  aspect-ratio: auto;
  object-fit: cover;
  object-position: center;
  border-radius: 12px;
}

#depositModal {
  align-items: flex-end;
  padding: 0 0 calc(var(--nav-h) + var(--safe-bottom));
}
.payment-modal.bottom-sheet {
  width: min(430px, 100%);
  padding: 12px 58px 16px;
  border: 0;
  border-radius: 0;
  background: #fff;
  box-shadow: 0 -5px 18px rgba(0,0,0,.14);
}
.payment-modal .modal-close,
.payment-modal .sheet-handle,
.payment-modal h2,
.payment-modal p {
  display: none;
}
.payment-actions {
  grid-template-columns: 1fr 1fr;
  gap: 126px;
  margin: 0;
}
.pay-btn {
  min-height: 74px;
  border-radius: 8px;
  color: #fff;
  border: 3px solid #fff;
  box-shadow: 0 2px 9px rgba(0,0,0,.25);
  font-size: 28px;
  font-weight: 500;
}
.pay-btn span {
  margin-right: 10px;
}
.pay-btn.deposit {
  background: #63b4ff;
}
.pay-btn.withdraw {
  background: #ee9b34;
}

.floating-hub {
  right: 12px;
  bottom: calc(var(--nav-h) + var(--safe-bottom) + 42px);
  gap: 7px;
}
body:not(.modal-open) .floating-hub.scrolling {
  opacity: .96;
  pointer-events: auto;
  transform: none;
}
.floating-hub.collapsed .floating-promo,
.floating-hub.collapsed .mini-close,
.floating-hub.collapsed .top,
.floating-hub.collapsed .floating-dismiss {
  display: none;
}
.floating-main {
  display: none;
}
.floating-dismiss {
  position: absolute;
  right: 0;
  top: -12px;
  width: 41px;
  height: 41px;
  border: 0;
  background: #e64f51;
  color: #fff;
  font-size: 36px;
  transform: none;
  z-index: 2;
}
.floating-action.mini-close,
.floating-action.top {
  min-width: 0;
  width: 38px;
  height: 38px;
  min-height: 38px;
  padding: 0;
  display: grid;
  place-items: center;
  justify-self: end;
  border-radius: 50%;
  color: #fff;
  box-shadow: 0 2px 7px rgba(0,0,0,.18);
  font-size: 24px;
}
.floating-action.mini-close {
  background: rgba(88, 88, 88, .86);
}
.floating-action.top {
  background: #ff7330;
}
.floating-promo {
  width: 86px;
  min-height: 74px;
  position: relative;
  display: grid;
  place-items: center;
  overflow: visible;
  border-radius: 10px;
  color: #fff;
  text-align: center;
  font-size: 11px;
  font-weight: 900;
  text-shadow: 0 1px 2px rgba(0,0,0,.45);
}
.floating-promo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 10px;
  object-fit: cover;
}
.floating-promo span {
  position: relative;
  z-index: 1;
}
.floating-promo.featured {
  height: 86px;
}
.floating-promo.featured i {
  position: absolute;
  right: -3px;
  top: -4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #e63635;
  z-index: 2;
}
.floating-promo.cashback {
  height: 78px;
}

@media (max-width: 430px) {
  .topbar {
    min-height: 96px;
    padding-inline: 14px;
    grid-template-columns: minmax(138px, 1fr) 86px 38px;
  }
  .brand-logo-img { width: 112px; }
  .app-rating img { width: 42px; height: 42px; }
  .app-btn { height: 34px; min-height: 34px; font-size: 14px; }
  .gift-close { width: 36px; height: 36px; }
  .top-link { height: 31px; min-height: 31px; font-size: 13px; }
  .home-layout {
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 10px;
    padding-inline: 14px;
  }
  .cat { min-height: 82px; font-size: 11px; }
  .cat img { width: 38px; height: 38px; }
  .game-grid { gap: 8px; }
  .game-card { border-width: 1.5px; }
  .game-card h3 { height: 27px; font-size: 9px; }
  .security-modal {
    width: calc(100vw - 28px);
    max-height: calc(100vh - 180px);
  }
  .security-modal h2 { font-size: 22px; }
  .security-copy {
    height: min(560px, calc(100vh - 300px));
    font-size: 22px;
  }
  .drawer-panel { width: 65vw; }
  .drawer-head {
    min-height: 190px;
    padding-inline: 34px;
  }
  .drawer-logo { width: 160px; }
  .drawer-head strong { font-size: 27px; }
  .drawer-menu {
    padding: 34px 44px 0;
    gap: 15px;
  }
  .drawer-menu a { font-size: 20px; gap: 20px; }
  .drawer-login { height: 62px; font-size: 24px; }
  .payment-modal.bottom-sheet { padding-inline: 38px; }
  .payment-actions { gap: 112px; }
  .pay-btn { min-height: 70px; font-size: 26px; }
}

@media (max-width: 390px) {
  .topbar {
    grid-template-columns: minmax(128px, 1fr) 82px 36px;
    padding-inline: 14px;
  }
  .home-layout {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 8px;
    padding-inline: 12px;
  }
  .cat { min-height: 78px; font-size: 10px; }
  .cat img { width: 34px; height: 34px; }
  .game-grid { gap: 7px; }
  .game-card h3 { height: 25px; font-size: 8px; }
  .security-modal h2 { font-size: 20px; }
  .security-copy { font-size: 20px; }
  .drawer-menu { padding-inline: 36px; }
  .drawer-menu a { font-size: 18px; gap: 17px; }
  .payment-modal.bottom-sheet { padding-inline: 34px; }
  .payment-actions { gap: 88px; }
  .pay-btn { min-height: 64px; font-size: 23px; }
  .floating-hub { right: 9px; }
}

/* Final header/floating/spacing correction */
.topbar {
  min-height: 88px;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 14px 7px;
  grid-template-columns: minmax(112px, 1fr) 82px 82px 32px;
  grid-template-areas:
    "rating app app close"
    "logo signup login menu";
  gap: 5px 8px;
}
.app-rating {
  gap: 8px;
  min-width: 0;
}
.app-rating img {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
}
.app-rating strong {
  font-size: 14px;
  white-space: nowrap;
}
.app-rating span {
  font-size: 13px;
  letter-spacing: 1px;
  white-space: nowrap;
}
.app-btn {
  justify-self: stretch;
  height: 32px;
  min-height: 32px;
  font-size: 14px;
}
.gift-close {
  width: 32px;
  height: 32px;
  justify-self: end;
  font-size: 24px;
  line-height: 27px;
}
.brand-logo-img {
  width: 108px;
  height: auto;
  object-fit: contain;
}
.top-link {
  min-width: 0;
  height: 30px;
  min-height: 30px;
  padding: 0 6px;
  white-space: nowrap;
  font-size: 13px;
}
.top-link.solid {
  min-width: 82px;
}
.menu-grid {
  width: 30px;
  height: 30px;
  grid-template-columns: repeat(2, 8px);
  gap: 4px;
}
.menu-grid span {
  width: 8px;
  height: 8px;
}

.hero-card {
  height: 104px;
}
.hero-card img {
  object-fit: cover;
  object-position: center;
}
.notice-bar {
  margin: 8px 14px;
}
.home-layout {
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 8px;
  padding-inline: 10px;
}
.category-sidebar {
  gap: 8px;
  top: calc(94px + env(safe-area-inset-top, 0px));
}
.cat {
  min-height: 74px;
  font-size: 10px;
}
.cat img {
  width: 34px;
  height: 34px;
}
.game-grid {
  gap: 6px;
}
.game-card {
  border-width: 1.5px;
  border-radius: 7px;
}
.game-card img {
  aspect-ratio: 1 / .84;
}
.game-card h3 {
  height: 23px;
  font-size: 8px;
}

.floating-hub {
  right: max(4px, env(safe-area-inset-right, 0px));
  bottom: calc(var(--nav-h) + var(--safe-bottom) + 32px);
  gap: 5px;
}
.floating-dismiss {
  width: 32px;
  height: 32px;
  right: -2px;
  top: -8px;
  font-size: 28px;
  line-height: 27px;
}
.floating-action.mini-close,
.floating-action.top {
  width: 32px;
  height: 32px;
  min-height: 32px;
  font-size: 20px;
}
.floating-promo {
  width: 68px;
  min-height: 58px;
  font-size: 9px;
}
.floating-promo.cashback {
  height: 60px;
}
.floating-promo.featured {
  height: 68px;
}
.floating-promo.featured i {
  width: 12px;
  height: 12px;
}
.app-shell {
  padding-bottom: calc(var(--nav-h) + 34px + var(--safe-bottom));
}
.bottom-nav {
  height: calc(66px + var(--safe-bottom));
  padding-top: 5px;
}
.deposit-float {
  margin-top: -24px;
}
.deposit-float span {
  width: 50px;
  height: 50px;
}

@media (max-width: 430px) {
  .topbar {
    min-height: 86px;
    padding-inline: 12px;
    grid-template-columns: minmax(108px, 1fr) 78px 78px 30px;
    gap: 5px 7px;
  }
  .brand-logo-img { width: 104px; }
  .app-rating img { width: 36px; height: 36px; flex-basis: 36px; }
  .app-rating strong { font-size: 13px; }
  .app-rating span { font-size: 12px; letter-spacing: .7px; }
  .app-btn { height: 31px; min-height: 31px; font-size: 13px; }
  .gift-close { width: 31px; height: 31px; }
  .top-link { height: 29px; min-height: 29px; font-size: 12px; }
  .top-link.solid { min-width: 78px; }
  .menu-grid { width: 28px; height: 28px; }
  .hero-card { height: 100px; }
  .home-layout {
    grid-template-columns: 68px minmax(0, 1fr);
    gap: 7px;
    padding-inline: 9px;
  }
  .cat { min-height: 70px; font-size: 9.5px; }
  .cat img { width: 32px; height: 32px; }
  .game-grid { gap: 6px; }
}

@media (max-width: 390px) {
  .topbar {
    min-height: 84px;
    grid-template-columns: minmax(102px, 1fr) 72px 76px 28px;
    padding-inline: 10px;
    gap: 5px 6px;
  }
  .brand-logo-img { width: 98px; }
  .top-link.solid { min-width: 76px; }
  .top-link { font-size: 11px; padding: 0 4px; }
  .app-btn { font-size: 12px; }
  .home-layout {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 6px;
    padding-inline: 8px;
  }
  .cat {
    min-height: 66px;
    font-size: 8.5px;
  }
  .cat img { width: 30px; height: 30px; }
  .game-grid { gap: 5px; }
  .game-card h3 {
    height: 22px;
    font-size: 7.5px;
  }
  .floating-hub { right: 3px; }
}
