*,
*::before,
*::after {
  box-sizing: border-box;
}

/* ===== Premium pass: in-game polish ===== */
#game-screen .game-hud-stats {
  border: 1px solid rgba(125, 211, 252, 0.24);
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(56, 189, 248, 0.12), transparent 52%),
    radial-gradient(120% 140% at 100% 100%, rgba(129, 140, 248, 0.12), transparent 56%),
    rgba(15, 23, 42, 0.86);
  box-shadow:
    0 10px 26px rgba(2, 6, 23, 0.38),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;
}

#game-screen .game-stat--current,
#game-screen .game-stat--record {
  border-color: rgba(186, 230, 253, 0.26);
  box-shadow:
    0 6px 16px rgba(2, 6, 23, 0.32),
    0 0 0 1px rgba(255, 255, 255, 0.06) inset;
}

#game-screen .btn-game-gear {
  border-color: rgba(125, 211, 252, 0.34);
  background: linear-gradient(180deg, rgba(51, 65, 85, 0.96) 0%, rgba(30, 41, 59, 0.94) 100%);
  box-shadow:
    0 6px 16px rgba(2, 6, 23, 0.34),
    0 0 0 1px rgba(148, 163, 184, 0.16) inset;
}

#game-screen .board-frame {
  border-color: rgba(125, 211, 252, 0.26);
  box-shadow:
    0 14px 34px rgba(2, 6, 23, 0.42),
    0 0 0 1px rgba(186, 230, 253, 0.08) inset,
    0 0 28px rgba(56, 189, 248, 0.12);
}

.tray-slot {
  border-color: rgba(148, 163, 184, 0.3);
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.72) 0%, rgba(15, 23, 42, 0.8) 100%);
  touch-action: none;
}

.tray-piece {
  filter: drop-shadow(0 2px 6px rgba(2, 6, 23, 0.35));
  transition: transform 0.12s ease, filter 0.16s ease;
}

.tray-piece:active:not(.tray-piece--dragging) {
  filter: drop-shadow(0 4px 10px rgba(2, 6, 23, 0.42));
}

/* Low-risk GPU hints for smoother motion on mid devices */
#game-screen .board-wrap,
#game-screen .board-frame,
#game-screen .tray-piece,
.board-toast,
.score-delta {
  will-change: transform, opacity;
  backface-visibility: hidden;
}

html,
body {
  margin: 0;
  min-height: 100%;
  max-width: 100%;
  overflow-x: hidden;
  font-family: system-ui, "Segoe UI", Roboto, sans-serif;
  background: linear-gradient(180deg, #0f2138 0%, #050a14 100%);
  color: #e8f0ff;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* Klasik / macera oyunu: tüm sayfa hafif kaymasın (WebView rubber-band) */
html:has(#game-screen:not(.hidden)),
body.bb-app:has(#game-screen:not(.hidden)) {
  overflow: hidden;
  overscroll-behavior: none;
  height: 100%;
  max-height: 100dvh;
}

/* Ana oyun (index): uzun basınca mavi metin seçimi / yazım çubuğu (WebView, mobil) */
body.bb-app {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

body.bb-app input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="image"]),
body.bb-app textarea,
body.bb-app select {
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
  -webkit-touch-callout: default;
}

/* İlk yükleme: logo + dönen L-blok + Loading (Capacitor WebView / tarayıcı) */
.bb-boot-splash {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(12px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right))
    max(12px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  background: linear-gradient(165deg, #102a45 0%, #0b1f35 40%, #060d18 100%);
  transition:
    opacity 0.342s ease,
    visibility 0.342s ease;
}

.bb-boot-splash.bb-boot-splash--hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.bb-boot-splash__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  flex-shrink: 0;
  /* Tam orta yerine: hafif yukarı (orta–üst bant) */
  margin-top: clamp(-120px, -9vh, -36px);
}

.bb-boot-splash__logo {
  width: min(42vw, 168px);
  height: auto;
  display: block;
  filter: drop-shadow(0 8px 28px rgba(0, 0, 0, 0.5));
}

.bb-boot-l {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  width: 56px;
  height: 56px;
  gap: 6px;
  flex-shrink: 0;
  transform: translateZ(0);
  backface-visibility: hidden;
  animation: bb-boot-l-spin 1.665s linear infinite;
}

.bb-boot-l__c {
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.bb-boot-l__c--a {
  grid-area: 1 / 1;
  background: linear-gradient(135deg, #ffb347, #c2410c);
}

.bb-boot-l__c--b {
  grid-area: 1 / 2;
  background: linear-gradient(135deg, #67e8f9, #0e7490);
}

.bb-boot-l__c--c {
  grid-area: 2 / 1;
  background: linear-gradient(135deg, #86efac, #15803d);
}

@keyframes bb-boot-l-spin {
  to {
    transform: translateZ(0) rotate(360deg);
  }
}

.bb-boot-splash__label {
  margin: 0;
  flex-shrink: 0;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(200, 220, 255, 0.88);
}

@media (prefers-reduced-motion: reduce) {
  .bb-boot-l {
    animation: none;
  }

  .bb-boot-splash {
    transition: none;
  }
}

.main-menu {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(16px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right))
    max(28px, calc(env(safe-area-inset-bottom) + 10px)) max(18px, env(safe-area-inset-left));
  overflow: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: linear-gradient(165deg, #102a45 0%, #0b1f35 40%, #060d18 100%);
}

.main-menu.hidden {
  display: none;
}

.main-menu.bb-screen-enter,
.adventure-screen.bb-screen-enter,
#game-screen.bb-screen-enter {
  animation: bb-screen-enter 0.26s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes bb-screen-enter {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.992);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.bb-menu-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 120% 70% at 50% -20%, rgba(255, 255, 255, 0.12) 0%, transparent 55%),
    radial-gradient(ellipse 80% 50% at 100% 80%, rgba(100, 180, 255, 0.1) 0%, transparent 45%);
}

.bb-menu-deco {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.bb-deco-glow {
  position: absolute;
  inset: -15%;
  z-index: 0;
  opacity: 0.4;
  /* Alt bölgede yumuşak “bulanık” hissi azaltır */
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 48%, transparent 86%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 48%, transparent 86%);
  background:
    radial-gradient(ellipse 38% 32% at 10% 22%, rgba(255, 100, 180, 0.34), transparent 52%),
    radial-gradient(ellipse 42% 36% at 92% 18%, rgba(0, 230, 255, 0.3), transparent 52%),
    radial-gradient(ellipse 48% 38% at 78% 88%, rgba(255, 202, 40, 0.28), transparent 55%),
    radial-gradient(ellipse 36% 34% at 18% 82%, rgba(0, 230, 118, 0.26), transparent 50%),
    radial-gradient(ellipse 40% 36% at 50% 8%, rgba(179, 136, 255, 0.3), transparent 52%),
    radial-gradient(ellipse 55% 45% at 55% 55%, rgba(255, 255, 255, 0.08), transparent 60%);
}

.bb-deco-board {
  display: none;
  position: absolute;
  left: 50%;
  top: 42%;
  z-index: 0;
  width: min(130vw, 480px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%) rotate(-11deg);
  opacity: 0.26;
  border-radius: 12%;
  background:
    linear-gradient(rgba(255, 255, 255, 0.32) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.32) 1px, transparent 1px);
  background-size: 11.11% 11.11%;
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.18),
    0 0 48px rgba(0, 40, 120, 0.2);
}

.bb-deco-stacks {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr minmax(0, min(360px, 100%)) 1fr;
  grid-template-rows: 1fr;
  align-items: center;
  padding: 0 clamp(8px, 3vw, 24px);
  /* Yan süzülen parçalar — dikeyde daha aşağı (yukarı-aşağı animasyon aynı kalır) */
  padding-top: calc(clamp(76px, 19vh, 180px) + 24px);
  box-sizing: border-box;
  pointer-events: none;
}

.bb-deco-stacks-spacer {
  min-width: 0;
}

.bb-deco-column--near-left {
  justify-self: end;
  margin-right: clamp(2px, 1.5vw, 10px);
}

.bb-deco-column--near-right {
  justify-self: start;
  margin-left: clamp(2px, 1.5vw, 10px);
}

.bb-deco-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 2.2vw, 14px);
  flex: 0 0 auto;
}

.bb-deco-column--drift {
  will-change: transform;
}

.bb-deco-column--drift.bb-deco-column--d2 {
  animation: bb-deco-float-2 10.8s ease-in-out infinite;
  animation-delay: -2.4s;
}

.bb-deco-column--drift.bb-deco-column--d4 {
  animation: bb-deco-float-4 11.2s ease-in-out infinite;
  animation-delay: -1.3s;
}

@keyframes bb-deco-float-2 {
  0%,
  100% {
    transform: translate3d(-7px, -20px, 0) rotate(1.4deg);
  }
  31% {
    transform: translate3d(9px, 14px, 0) rotate(-2deg);
  }
  58% {
    transform: translate3d(-4px, 38px, 0) rotate(0.4deg);
  }
  82% {
    transform: translate3d(5px, -6px, 0) rotate(-1.2deg);
  }
}

@keyframes bb-deco-float-4 {
  0%,
  100% {
    transform: translate3d(3px, 32px, 0) rotate(-0.9deg);
  }
  27% {
    transform: translate3d(-9px, 2px, 0) rotate(2.4deg);
  }
  52% {
    transform: translate3d(5px, -40px, 0) rotate(-1.7deg);
  }
  74% {
    transform: translate3d(8px, -12px, 0) rotate(0.8deg);
  }
}

/* Mobil / dokunmatik: yan sütun süzülme animasyonu kapatılır (sürekli kompozit maliyeti düşer, menü daha akıcı). */
@media (max-width: 520px), (pointer: coarse) {
  .bb-deco-column--drift {
    animation: none !important;
    will-change: auto;
  }
}

.bb-deco-column > * {
  animation: bb-deco-bob 5.4s ease-in-out infinite;
}

.bb-deco-column > *:nth-child(1) {
  animation-duration: 4.5s;
  animation-delay: 0s;
}
.bb-deco-column > *:nth-child(2) {
  animation-duration: 6.1s;
  animation-delay: -0.6s;
}
.bb-deco-column > *:nth-child(3) {
  animation-duration: 5.2s;
  animation-delay: -1.2s;
}
.bb-deco-column > *:nth-child(4) {
  animation-duration: 6.8s;
  animation-delay: -1.8s;
}
.bb-deco-column > *:nth-child(5) {
  animation-duration: 4.9s;
  animation-delay: -2.4s;
}
.bb-deco-column > *:nth-child(6) {
  animation-duration: 5.7s;
  animation-delay: -3s;
}

.bb-deco-block {
  display: block;
  aspect-ratio: 1;
  border-radius: 8px;
  opacity: 0.9;
  border: none;
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.38),
    inset 0 -2px 4px rgba(0, 20, 60, 0.22),
    0 4px 16px rgba(0, 35, 90, 0.42);
}

.bb-deco-piece {
  display: grid;
  gap: clamp(1px, 0.28vw, 3px);
  filter: drop-shadow(0 4px 14px rgba(0, 30, 80, 0.42));
}

.bb-deco-cell {
  display: block;
  width: var(--bb-deco-cs, 10px);
  height: var(--bb-deco-cs, 10px);
  border-radius: clamp(2px, 0.35vw, 4px);
  border: none;
  box-shadow:
    inset 0 2px 3px rgba(255, 255, 255, 0.38),
    inset 0 -2px 3px rgba(0, 25, 55, 0.2);
  opacity: 0.94;
}

/* 4×4 mini tahta parçası */
.bb-deco-piece--4x4 {
  --bb-deco-cs: clamp(6px, 1.6vw, 10px);
  grid-template-columns: repeat(4, var(--bb-deco-cs));
  grid-template-rows: repeat(4, var(--bb-deco-cs));
}

/* Yatay I (4×1) */
.bb-deco-piece--i4h {
  --bb-deco-cs: clamp(9px, 2.2vw, 13px);
  grid-template-columns: repeat(4, var(--bb-deco-cs));
  grid-template-rows: var(--bb-deco-cs);
}

/* Dikey I (1×4) */
.bb-deco-piece--i4v {
  --bb-deco-cs: clamp(9px, 2.2vw, 13px);
  grid-template-columns: var(--bb-deco-cs);
  grid-template-rows: repeat(4, var(--bb-deco-cs));
}

/* 2×2 kare (O) */
.bb-deco-piece--o2 {
  --bb-deco-cs: clamp(11px, 2.75vw, 16px);
  grid-template-columns: repeat(2, var(--bb-deco-cs));
  grid-template-rows: repeat(2, var(--bb-deco-cs));
}

/* L — 3×3 ızgara */
.bb-deco-piece--L {
  --bb-deco-cs: clamp(10px, 2.5vw, 14px);
  grid-template-columns: repeat(3, var(--bb-deco-cs));
  grid-template-rows: repeat(3, var(--bb-deco-cs));
}

.bb-deco-piece--L .bb-deco-cell:nth-child(1) {
  grid-column: 1;
  grid-row: 1;
}
.bb-deco-piece--L .bb-deco-cell:nth-child(2) {
  grid-column: 1;
  grid-row: 2;
}
.bb-deco-piece--L .bb-deco-cell:nth-child(3) {
  grid-column: 1;
  grid-row: 3;
}
.bb-deco-piece--L .bb-deco-cell:nth-child(4) {
  grid-column: 2;
  grid-row: 3;
}

/* T */
.bb-deco-piece--T {
  --bb-deco-cs: clamp(10px, 2.5vw, 14px);
  grid-template-columns: repeat(3, var(--bb-deco-cs));
  grid-template-rows: repeat(2, var(--bb-deco-cs));
}

.bb-deco-piece--T .bb-deco-cell:nth-child(1) {
  grid-column: 2;
  grid-row: 1;
}
.bb-deco-piece--T .bb-deco-cell:nth-child(2) {
  grid-column: 1;
  grid-row: 2;
}
.bb-deco-piece--T .bb-deco-cell:nth-child(3) {
  grid-column: 2;
  grid-row: 2;
}
.bb-deco-piece--T .bb-deco-cell:nth-child(4) {
  grid-column: 3;
  grid-row: 2;
}

/* S */
.bb-deco-piece--S {
  --bb-deco-cs: clamp(10px, 2.5vw, 14px);
  grid-template-columns: repeat(3, var(--bb-deco-cs));
  grid-template-rows: repeat(2, var(--bb-deco-cs));
}

.bb-deco-piece--S .bb-deco-cell:nth-child(1) {
  grid-column: 1;
  grid-row: 2;
}
.bb-deco-piece--S .bb-deco-cell:nth-child(2) {
  grid-column: 2;
  grid-row: 2;
}
.bb-deco-piece--S .bb-deco-cell:nth-child(3) {
  grid-column: 2;
  grid-row: 1;
}
.bb-deco-piece--S .bb-deco-cell:nth-child(4) {
  grid-column: 3;
  grid-row: 1;
}

/* J */
.bb-deco-piece--J {
  --bb-deco-cs: clamp(10px, 2.5vw, 14px);
  grid-template-columns: repeat(3, var(--bb-deco-cs));
  grid-template-rows: repeat(3, var(--bb-deco-cs));
}

.bb-deco-piece--J .bb-deco-cell:nth-child(1) {
  grid-column: 1;
  grid-row: 1;
}
.bb-deco-piece--J .bb-deco-cell:nth-child(2) {
  grid-column: 2;
  grid-row: 1;
}
.bb-deco-piece--J .bb-deco-cell:nth-child(3) {
  grid-column: 3;
  grid-row: 2;
}
.bb-deco-piece--J .bb-deco-cell:nth-child(4) {
  grid-column: 3;
  grid-row: 3;
}

@keyframes bb-deco-bob {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  38% {
    transform: translateY(-6px) rotate(2deg);
  }
  68% {
    transform: translateY(5px) rotate(-1.4deg);
  }
}

.bb-deco-block--s {
  width: clamp(22px, 5.8vw, 34px);
  border-radius: 6px;
}

.bb-deco-block--m {
  width: clamp(28px, 7.5vw, 44px);
}

.bb-deco-block--l {
  width: clamp(32px, 8.6vw, 50px);
  border-radius: 9px;
}

.bb-deco-b0 {
  background: linear-gradient(145deg, rgba(255, 194, 224, 0.95), rgba(255, 61, 154, 0.92), rgba(173, 20, 87, 0.88));
}
.bb-deco-b1 {
  background: linear-gradient(145deg, rgba(181, 255, 255, 0.95), rgba(0, 229, 255, 0.92), rgba(0, 105, 120, 0.88));
}
.bb-deco-b2 {
  background: linear-gradient(145deg, rgba(255, 245, 157, 0.95), rgba(255, 202, 40, 0.92), rgba(245, 127, 23, 0.88));
}
.bb-deco-b3 {
  background: linear-gradient(145deg, rgba(255, 171, 145, 0.95), rgba(255, 23, 68, 0.92), rgba(183, 28, 28, 0.88));
}
.bb-deco-b4 {
  background: linear-gradient(145deg, rgba(185, 255, 204, 0.95), rgba(0, 230, 118, 0.92), rgba(27, 94, 32, 0.88));
}
.bb-deco-b5 {
  background: linear-gradient(145deg, rgba(179, 136, 255, 0.95), rgba(101, 31, 255, 0.92), rgba(49, 27, 146, 0.88));
}

.bb-deco-b6 {
  background: linear-gradient(145deg, rgba(255, 213, 179, 0.95), rgba(255, 138, 80, 0.92), rgba(191, 54, 12, 0.88));
}

.bb-deco-b7 {
  background: linear-gradient(145deg, rgba(224, 247, 250, 0.95), rgba(77, 182, 172, 0.92), rgba(0, 77, 64, 0.88));
}

/* transform yok: aksi halde içteki position:fixed modallar viewport yerine bu kutuya göre hesaplanır (Yarış/Profil/Ödül taşması) */
.main-menu-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  /* Ana menü bloklarını aşağı (padding; transform kullanma) */
  padding-top: 36px;
  gap: 12px;
  width: 100%;
  max-width: min(340px, 100%);
  min-width: 0;
  margin: 0 auto;
  box-sizing: border-box;
  isolation: isolate;
}

/* Ana menü: ilk açılış — arka plan, dekor, logo, butonlar */
@keyframes menu-bg-in {
  from {
    opacity: 0;
    filter: brightness(1.12);
  }
  to {
    opacity: 1;
    filter: brightness(1);
  }
}

@keyframes menu-deco-in {
  from {
    opacity: 0;
    transform: scale(1.05);
  }
  to {
    opacity: 0.4;
    transform: scale(1);
  }
}

@keyframes menu-header-in {
  from {
    opacity: 0;
    transform: translateY(-16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes menu-logo-pop {
  from {
    opacity: 0;
    transform: scale(0.82) rotate(-5deg);
  }
  to {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

@keyframes menu-masters-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes menu-btn-rise {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.main-menu .bb-menu-bg {
  animation: menu-bg-in 0.78s ease-out both;
}

.main-menu .bb-deco-glow {
  animation: menu-deco-in 1.05s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.main-menu .bb-inner > .bb-menu-header-row {
  animation: menu-header-in 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.main-menu .bb-logo-mark-wrap {
  animation: menu-logo-pop 0.64s cubic-bezier(0.34, 1.2, 0.64, 1) 0.05s both;
}

.main-menu .bb-line-masters {
  animation:
    menu-masters-in 0.56s cubic-bezier(0.22, 1, 0.36, 1) 0.08s both,
    bb-masters-shine 6s ease-in-out 0.68s infinite;
}

.main-menu .bb-inner > .bb-btn-play {
  animation: menu-btn-rise 0.48s cubic-bezier(0.22, 1, 0.36, 1) 0.17s both;
}

.main-menu .bb-inner > .bb-btn-adventure {
  animation: menu-btn-rise 0.48s cubic-bezier(0.22, 1, 0.36, 1) 0.28s both;
}

@media (prefers-reduced-motion: reduce) {
  .main-menu.bb-screen-enter,
  .adventure-screen.bb-screen-enter,
  #game-screen.bb-screen-enter {
    animation: none !important;
  }

  .main-menu .bb-menu-bg,
  .main-menu .bb-deco-glow,
  .main-menu .bb-inner > .bb-menu-header-row,
  .main-menu .bb-logo-mark-wrap,
  .main-menu .bb-line-masters,
  .main-menu .bb-inner > .bb-btn-play,
  .main-menu .bb-inner > .bb-btn-adventure {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }

  .main-menu .bb-line-masters {
    animation: bb-masters-shine 6s ease-in-out infinite !important;
  }
}

/*
 * Yarış / Profil / Ödüller / Ses: modal, header satırının İÇİNDE (fixed).
 * Klasik & Macera butonları aynı .bb-inner içinde bu satırdan SONRA geldiği için
 * varsayılan boyamada üstte kalıyordu — overlay açıkken gizlenir.
 */
.main-menu:has(.bb-details[open]) .bb-inner > .bb-btn-play,
.main-menu:has(.bb-details[open]) .bb-inner > .bb-btn-adventure {
  visibility: hidden !important;
  pointer-events: none !important;
  opacity: 0 !important;
}

.bb-logo-wrap {
  text-align: center;
}

/* Ana menü: logo + başlık (bb-menu-header-row--brand içinde ikinci satır) */
.bb-logo-wrap--menu {
  width: 100%;
  margin: 0;
  padding-top: 0;
  box-sizing: border-box;
}

.bb-logo-wrap--menu .bb-logo-mark-wrap {
  margin-top: -14px;
  margin-bottom: 10px;
}

/* Başlık satırı ikonu kapatmasın — global .bb-logo-title margin-top: -2px burada iptal */
.bb-logo-wrap--menu .bb-logo-title {
  margin-top: 6px;
}

.bb-logo-wrap--menu .kk-logo-svg--menu {
  width: clamp(82px, 24vw, 112px);
}

.bb-logo-wrap--menu .bb-line-gems--long {
  font-size: clamp(1.42rem, 5.4vw, 2.38rem);
}

.bb-logo-wrap--menu .bb-line-masters {
  font-size: clamp(1.75rem, 8vw, 2.72rem);
}

.bb-logo-mark-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 0;
}

.kk-logo-svg {
  display: block;
}

.kk-logo-image {
  display: block;
}

.kk-logo-image--menu {
  width: clamp(76px, 22vw, 102px);
  height: auto;
  border-radius: 22%;
  filter: drop-shadow(0 7px 20px rgba(8, 24, 54, 0.62)) drop-shadow(0 1px 0 rgba(255, 255, 255, 0.22));
}

.kk-logo-svg--menu {
  width: clamp(84px, 24vw, 114px);
  height: auto;
  filter: drop-shadow(0 10px 22px rgba(4, 14, 34, 0.66)) drop-shadow(0 2px 0 rgba(255, 255, 255, 0.26));
}

.kk-logo-svg--hud {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 3px 8px rgba(8, 24, 54, 0.42));
}

.bb-logo-title {
  margin: 0;
  margin-top: -2px;
  font-weight: 900;
  line-height: 1.02;
}

/* Ana menü başlık: daha sade üst satır + metalik alt satır */
.bb-logo-title--hero .bb-line--brand {
  letter-spacing: 0.06em;
}

.bb-logo-title--hero .bb-line--brand .bb-ch {
  animation: none;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.35),
    0 2px 8px rgba(0, 0, 0, 0.45);
}

.bb-line-masters {
  display: block;
  margin-top: 0;
  font-size: clamp(1.5rem, 7vw, 2.35rem);
  font-weight: 900;
  font-style: italic;
  line-height: 1;
  letter-spacing: 0.42em;
  padding-right: 0.08em;
  text-indent: 0.12em;
  text-transform: uppercase;
  background: linear-gradient(
    105deg,
    #94a3b8 0%,
    #e2e8f0 14%,
    #fde68a 38%,
    #fbbf24 52%,
    #f59e0b 58%,
    #fef3c7 78%,
    #64748b 100%
  );
  background-size: 200% 120%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 10px rgba(251, 191, 36, 0.35));
  animation: bb-masters-shine 6s ease-in-out infinite;
}

@keyframes bb-masters-shine {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bb-line-masters {
    animation: none;
  }
}

.bb-line-gems {
  display: block;
  font-size: clamp(1.85rem, 8vw, 2.65rem);
  letter-spacing: -0.02em;
}

.bb-line-gems--long {
  font-size: clamp(1.22rem, 4.6vw, 2.05rem);
  letter-spacing: -0.035em;
}

.bb-word-gap {
  display: inline-block;
  width: clamp(5px, 1.4vw, 11px);
}

.bb-ch {
  display: inline-block;
  margin: 0 1px;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4), 0 3px 0 rgba(0, 0, 0, 0.12), 0 5px 12px rgba(0, 0, 0, 0.28);
  animation: bb-float 2.8s ease-in-out infinite;
}

.bb-ch:nth-child(2n) {
  animation-delay: 0.15s;
}
.bb-c1 {
  color: #ff9f3c;
}
.bb-c2 {
  color: #5dade2;
}
.bb-c3 {
  color: #ff5252;
}
.bb-c4 {
  color: #ffd93d;
}
.bb-c5 {
  color: #9b59b6;
}
.bb-c6 {
  color: #2ecc71;
}
.bb-c7 {
  color: #ff6b9d;
}

.bb-line-mosaic {
  display: block;
  margin-top: 4px;
  font-size: clamp(1.75rem, 8.5vw, 2.5rem);
  font-style: italic;
  font-weight: 900;
  color: #ffc971;
  text-shadow: 0 2px 0 rgba(120, 60, 0, 0.35), 0 4px 14px rgba(0, 0, 0, 0.35);
}

.bb-info-card {
  border-radius: 20px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 6px 0 rgba(0, 40, 100, 0.18), 0 14px 32px rgba(0, 0, 0, 0.28);
}

.bb-info-bar {
  padding: 10px 14px;
  text-align: center;
  font-size: 0.8125rem;
  font-weight: 800;
  color: #153a7a;
  background: linear-gradient(180deg, #c8dcff 0%, #a8c8ff 100%);
}

.bb-info-body {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  position: relative;
  min-height: 88px;
}

.bb-trophy {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(180deg, #3d8aed 0%, #1565d8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.35), 0 4px 0 #0d4a9e;
}

.bb-trophy-icon {
  font-size: 1.75rem;
}

.bb-info-stat {
  flex: 1;
}
.bb-info-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: #5a6b85;
  text-transform: uppercase;
}
.bb-info-num {
  font-size: clamp(1.75rem, 8vw, 2.25rem);
  font-weight: 900;
  color: #e8941a;
}

.bb-check {
  position: absolute;
  right: 12px;
  bottom: 10px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #2ecc71;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bb-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin: 0;
  padding: 16px 20px;
  border: none;
  border-radius: 18px;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 800;
  font-style: italic;
  color: #fff;
  cursor: pointer;
  list-style: none;
  box-shadow: 0 5px 0 rgba(0, 0, 0, 0.2), 0 10px 24px rgba(0, 0, 0, 0.22);
  transition: transform 0.1s ease, filter 0.15s ease;
}

.main-menu .bb-btn {
  transform: translateZ(0);
  backface-visibility: hidden;
}

/* Ana menü: üstte Klasik (mor–mavi), altta Macera (turuncu) */
.main-menu .bb-btn-play,
.main-menu .bb-btn-adventure {
  align-self: center;
  width: min(246px, 82%);
  max-width: 100%;
  padding: 13px 17px;
  font-size: 0.98rem;
  gap: 10px;
}

.main-menu .bb-btn-play .bb-btn-ico,
.main-menu .bb-btn-adventure .bb-btn-ico {
  width: 32px;
  height: 32px;
  border-radius: 11px;
}

.main-menu .bb-btn-play {
  margin-top: 66px;
  background: linear-gradient(180deg, #9d8cff 0%, #7c6ce8 28%, #5b4ddb 58%, #4338b8 100%);
  box-shadow: 0 6px 0 #2e2a6e, 0 12px 28px rgba(45, 38, 120, 0.45);
}

.main-menu .bb-btn-adventure {
  margin-top: 14px;
}

.main-menu .bb-btn-play:hover {
  filter: brightness(1.05);
}

.main-menu .bb-btn-play .bb-btn-txt {
  color: #f5f3ff;
  text-shadow: 0 1px 2px rgba(15, 23, 42, 0.55);
}

.main-menu .bb-btn-adventure .bb-btn-txt {
  color: #fff7ed;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.35);
}

.bb-btn::-webkit-details-marker {
  display: none;
}

.bb-btn:active {
  transform: translateY(3px);
}

.bb-btn-ico {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  font-style: normal;
  font-weight: 900;
}

.bb-btn-adventure {
  margin-top: 10px;
  background: linear-gradient(180deg, #ff9a3c 0%, #f97316 48%, #ea580c 100%);
  box-shadow: 0 6px 0 #9a3412, 0 12px 28px rgba(234, 88, 12, 0.35);
}

.bb-btn-adventure:hover {
  filter: brightness(1.05);
}

.bb-btn-ico--pin {
  display: flex;
  align-items: center;
  justify-content: center;
}

.bb-btn-ico--pin svg {
  display: block;
}

.bb-btn-play {
  margin-top: 4px;
  background: linear-gradient(180deg, #4ade80 0%, #16a34a 52%, #15803d 100%);
  box-shadow: 0 6px 0 #14532d, 0 12px 28px rgba(0, 0, 0, 0.28);
  animation: bb-pulse-play 2.4s ease-in-out infinite;
}

.bb-btn-teal {
  background: linear-gradient(180deg, #3ee0b8 0%, #1ec8a0 100%);
  box-shadow: 0 5px 0 #128f72, 0 10px 22px rgba(0, 0, 0, 0.22);
}

.bb-btn-stats {
  background: linear-gradient(180deg, #b794f4 0%, #805ad5 52%, #6b46c1 100%);
  box-shadow: 0 5px 0 #4c1d95, 0 10px 22px rgba(45, 27, 105, 0.35);
}

.bb-btn-badges {
  position: relative;
  background: linear-gradient(180deg, #f6d365 0%, #fda085 48%, #f6a050 100%);
  box-shadow: 0 5px 0 #c45a28, 0 10px 22px rgba(196, 90, 40, 0.35);
}

.bb-details-badges > summary.bb-btn-badges {
  gap: 10px;
}

.bb-badges-pill {
  margin-left: auto;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 900;
  font-style: normal;
  background: rgba(0, 0, 0, 0.2);
  color: #fff;
  letter-spacing: 0.04em;
}

.bb-sheet.bb-sheet-badges {
  padding: 0;
  overflow: visible;
  border: 1px solid rgba(59, 130, 246, 0.45);
  box-shadow:
    0 12px 44px rgba(30, 64, 120, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
  background: linear-gradient(165deg, #eff6ff 0%, #dbeafe 32%, #bfdbfe 68%, #93c5fd 100%);
}

/* Ödüller — referans: koyu mavi/mor, üst istatistik + madalya ızgarası */
.bb-sheet.bb-sheet-badges.bb-sheet-badges--awards {
  border: 1px solid rgba(120, 90, 200, 0.4);
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  background: linear-gradient(168deg, #1a1f4a 0%, #252060 38%, #1c1840 72%, #14102e 100%);
  color: #e8eaff;
}

.bb-awards-head {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  align-items: center;
  gap: 6px;
  padding: 12px 10px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.bb-awards-head-spacer {
  width: 40px;
  height: 40px;
}

.bb-awards-title {
  margin: 0;
  text-align: center;
  font-size: clamp(0.85rem, 2.9vw, 1rem);
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #eef2ff;
  text-shadow: none;
  -webkit-font-smoothing: antialiased;
}

.bb-awards-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 10px 12px 8px;
}

.bb-awards-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 66px;
  padding: 9px 6px;
  border-radius: 12px;
  border: 1.5px solid rgba(130, 110, 210, 0.45);
  background: rgba(0, 0, 0, 0.28);
  text-align: center;
}

.bb-awards-stat-val {
  font-size: clamp(0.88rem, 3.4vw, 1.06rem);
  font-weight: 900;
  letter-spacing: 0.02em;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
  text-shadow: none;
  -webkit-font-smoothing: antialiased;
}

.bb-awards-stat-lbl {
  font-size: clamp(0.65rem, 2.15vw, 0.74rem);
  font-weight: 800;
  color: #eef2ff;
  line-height: 1.3;
  max-width: 100%;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-shadow: none;
  -webkit-font-smoothing: antialiased;
}

.bb-awards-quests-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-bottom: 4px;
}

.bb-awards-quest-section {
  margin: 0;
}

.bb-awards-quest-hint {
  margin: 0 8px 10px;
  font-size: 0.68rem;
  line-height: 1.35;
  color: rgba(148, 163, 184, 0.92);
  max-width: 28em;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.bb-awards-quest-tip {
  margin: 2px 10px 10px;
  padding: 9px 12px;
  font-size: 0.74rem;
  line-height: 1.4;
  font-weight: 600;
  color: #f1f5f9;
  background: rgba(30, 41, 59, 0.94);
  border: 1px solid rgba(148, 163, 184, 0.4);
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
  max-width: 26em;
  margin-left: auto;
  margin-right: auto;
}

.bb-awards-quest-tip[hidden] {
  display: none !important;
}

.bb-awards-medal[aria-disabled="true"] {
  cursor: help;
}

.bb-awards-medal[aria-disabled="true"]:focus-visible {
  outline: 2px solid rgba(96, 165, 250, 0.85);
  outline-offset: 3px;
}

.bb-awards-quest-heading {
  margin: 0;
  padding: 10px 14px 6px;
  font-size: clamp(0.72rem, 2.35vw, 0.8rem);
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #eef2ff;
  text-shadow: none;
  -webkit-font-smoothing: antialiased;
}

.bb-awards-quest-section + .bb-awards-quest-section .bb-awards-quest-heading {
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.bb-awards-medals {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px 6px;
  padding: 4px 10px 14px;
}

.bb-awards-medals--fixed {
  /* tek ızgara: 4 sütun taşmada satır kırılır */
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 380px) {
  .bb-awards-medals--fixed {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.bb-awards-medal--done-fixed {
  border-color: rgba(52, 211, 153, 0.55);
  box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.25);
}

.bb-awards-medals--weekly {
  padding-bottom: 18px;
}

.bb-awards-medal {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 4px 2px;
  border: none;
  background: transparent;
  border-radius: 12px;
  cursor: default;
  color: inherit;
  font: inherit;
  -webkit-tap-highlight-color: transparent;
  text-rendering: optimizeLegibility;
}

/* Tamamlanan görev: günlük gümüş, haftalık sarı çerçeve */
.bb-awards-medal--done-daily {
  padding: 6px 4px;
  border-radius: 14px;
  box-shadow:
    0 0 0 2px rgba(200, 210, 230, 0.95),
    0 0 0 1px rgba(255, 255, 255, 0.35) inset,
    0 4px 14px rgba(180, 195, 220, 0.25);
  background: rgba(255, 255, 255, 0.05);
}

.bb-awards-medal--done-weekly {
  padding: 6px 4px;
  border-radius: 14px;
  box-shadow:
    0 0 0 2px rgba(250, 204, 21, 0.95),
    0 0 0 1px rgba(255, 250, 200, 0.25) inset,
    0 4px 16px rgba(234, 179, 8, 0.35);
  background: rgba(255, 220, 100, 0.07);
}

.bb-awards-medal-ring {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: linear-gradient(145deg, #fde047 0%, #eab308 40%, #ca8a04 100%);
  box-shadow:
    0 0 0 2px rgba(250, 204, 21, 0.45),
    0 4px 12px rgba(0, 0, 0, 0.35);
}

.bb-awards-medal--locked .bb-awards-medal-ring {
  background: linear-gradient(145deg, #94a3b8 0%, #64748b 100%);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.bb-awards-medal-inner {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #1e3a8a 0%, #0f172a 100%);
}

.bb-awards-medal--locked .bb-awards-medal-inner {
  background: linear-gradient(180deg, #475569 0%, #1e293b 100%);
}

.bb-awards-medal-icon {
  font-size: 1.12rem;
  line-height: 1;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.4));
}

.bb-awards-medal--locked .bb-awards-medal-icon {
  filter: grayscale(0.85) brightness(0.95);
}

.bb-awards-medal-name {
  font-size: clamp(0.64rem, 2.45vw, 0.76rem);
  font-weight: 800;
  color: #ffffff;
  text-align: center;
  line-height: 1.28;
  text-shadow: none;
  -webkit-font-smoothing: antialiased;
}

.bb-awards-medal-sub {
  font-size: clamp(0.56rem, 2.05vw, 0.66rem);
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #d8e2ff;
  text-align: center;
  line-height: 1.3;
  -webkit-font-smoothing: antialiased;
}

.bb-awards-medal--claimed .bb-awards-medal-sub {
  color: #a7f3d0;
}

.bb-badges-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px 10px;
  border-bottom: 1px solid rgba(37, 99, 235, 0.2);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 100%);
}

.bb-badges-modal-title {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 900;
  color: #1e3a8a;
  letter-spacing: 0.02em;
}

.bb-badges-modal-close {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid rgba(153, 27, 27, 0.55);
  border-radius: 50%;
  background: linear-gradient(180deg, #ef4444 0%, #dc2626 48%, #b91c1c 100%);
  color: #fff;
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow:
    0 3px 0 #991b1b,
    0 6px 14px rgba(185, 28, 28, 0.45);
  transition:
    filter 0.15s ease,
    transform 0.12s ease;
}

.bb-badges-modal-close:hover {
  filter: brightness(1.08);
}

.bb-badges-modal-close:active {
  transform: translateY(2px);
  box-shadow:
    0 1px 0 #991b1b,
    0 3px 10px rgba(185, 28, 28, 0.4);
}

.bb-badges-modal-close:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.bb-badges-intro {
  margin: 0;
  padding: 10px 14px 0;
  font-size: 0.74rem;
  font-weight: 600;
  color: #1e40af;
  line-height: 1.4;
}

.bb-quests-section {
  padding: 10px 12px 6px;
}

.bb-quests-section--weekly {
  padding-top: 4px;
  padding-bottom: 14px;
  border-top: 1px dashed rgba(37, 99, 235, 0.35);
  margin-top: 0;
}

.bb-quests-section-title {
  margin: 0 0 2px;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: #1e40af;
  text-transform: uppercase;
}

.bb-quests-section-meta {
  margin: 0 0 8px;
  font-size: 0.65rem;
  font-weight: 600;
  color: #3b82f6;
}

.bb-quests-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bb-quest-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: auto auto auto;
  column-gap: 10px;
  row-gap: 6px;
  align-items: start;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid rgba(191, 219, 254, 0.95);
  background: linear-gradient(168deg, #ffffff 0%, #f0f9ff 100%);
  box-shadow:
    0 2px 0 rgba(59, 130, 246, 0.08),
    0 6px 16px rgba(30, 64, 120, 0.08);
}

.bb-quest-row--done {
  border-color: rgba(147, 197, 253, 0.85);
  background: linear-gradient(168deg, #f0fdf4 0%, #ecfdf5 100%);
}

.bb-quest-row--claimed {
  opacity: 0.88;
}

.bb-quest-icon {
  grid-row: 1 / span 2;
  align-self: start;
  font-size: 1.35rem;
  line-height: 1;
  width: 2.1rem;
  text-align: center;
}

.bb-quest-text {
  min-width: 0;
}

.bb-quest-title {
  display: block;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: #1e2d44;
}

.bb-quest-desc {
  display: block;
  margin-top: 2px;
  font-size: 0.64rem;
  font-weight: 600;
  color: #64748b;
  line-height: 1.25;
}

.bb-quest-reward {
  grid-column: 3;
  grid-row: 1 / span 2;
  align-self: start;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: #1e40af;
  background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
  border: 1px solid rgba(59, 130, 246, 0.4);
  white-space: nowrap;
}

.bb-quest-progress-wrap {
  grid-column: 1 / -1;
  height: 6px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.15);
  overflow: hidden;
}

.bb-quest-progress-bar {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #60a5fa 0%, #3b82f6 55%, #2563eb 100%);
  transition: width 0.25s ease;
}

.bb-quest-row--done .bb-quest-progress-bar {
  background: linear-gradient(90deg, #4ade80 0%, #22c55e 100%);
}

.bb-quest-foot {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.bb-quest-count {
  font-size: 0.68rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #1e3a8a;
}

.bb-quest-claim {
  padding: 6px 12px;
  border: none;
  border-radius: 999px;
  font: inherit;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.03em;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
  box-shadow: 0 2px 0 #1d4ed8;
}

.bb-quest-claim:hover {
  filter: brightness(1.05);
}

.bb-quest-claim:active {
  transform: translateY(1px);
}

.bb-quest-claim:disabled {
  cursor: default;
  opacity: 0.55;
  filter: grayscale(0.2);
}

.bb-quest-claim--claimed {
  background: linear-gradient(180deg, #94a3b8 0%, #64748b 100%);
  box-shadow: 0 2px 0 #475569;
}

.bb-btn-sky {
  background: linear-gradient(180deg, #5eb8ff 0%, #2d9cdb 100%);
  box-shadow: 0 5px 0 #1a6fb0, 0 10px 22px rgba(0, 0, 0, 0.22);
}

.bb-details {
  margin: 0;
}

.bb-details > summary.bb-btn::after {
  content: "▼";
  margin-left: auto;
  font-size: 0.55em;
  font-style: normal;
  opacity: 0.75;
}

.bb-details[open] > summary.bb-btn::after {
  content: "▲";
}

.bb-details .bb-sheet {
  margin-top: 10px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
  color: #1e2d44;
}

.bb-sheet.bb-sheet-settings {
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow: 0 10px 32px rgba(15, 40, 70, 0.14);
}

.bb-sheet.bb-sheet-stats {
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(107, 70, 193, 0.22);
  box-shadow: 0 12px 40px rgba(45, 27, 105, 0.2);
  background: transparent;
}

/* Ortak istatistik kartı — ana menü + oyun içi ayar */
.kk-stat-panel {
  border-radius: 14px;
  overflow: hidden;
}

.kk-stat-panel--menu {
  background: linear-gradient(165deg, #fbfcff 0%, #eef3ff 42%, #e4ecff 100%);
  border: 1px solid rgba(107, 70, 193, 0.14);
}

.kk-stat-panel-head {
  padding: 12px 14px 11px;
  text-align: center;
  border-bottom: 1px solid rgba(107, 70, 193, 0.12);
  background: linear-gradient(180deg, rgba(128, 90, 213, 0.12) 0%, rgba(128, 90, 213, 0.02) 100%);
}

.kk-stat-panel-title {
  display: block;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #553c9a;
}

.kk-stat-panel-sub {
  display: block;
  margin-top: 4px;
  font-size: 0.68rem;
  font-weight: 600;
  color: #64748b;
}

.kk-stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 12px;
}

.kk-stat-grid--menu-only {
  padding-top: 14px;
  padding-bottom: 14px;
}

.kk-stat-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  padding: 11px 11px 12px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow:
    0 2px 0 rgba(21, 60, 120, 0.05),
    0 6px 16px rgba(30, 60, 120, 0.08);
}

.kk-stat-tile--hero {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, #fff 0%, #fffbf5 55%, #fff8ed 100%);
  border-color: rgba(232, 148, 26, 0.28);
  box-shadow:
    0 2px 0 rgba(232, 148, 26, 0.12),
    0 8px 22px rgba(232, 148, 26, 0.12);
}

.kk-stat-tile-label {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #64748b;
  line-height: 1.25;
}

.kk-stat-tile-val {
  font-size: 1.28rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  color: #c05621;
}

.kk-stat-tile--hero .kk-stat-tile-val {
  font-size: clamp(1.65rem, 7vw, 2.05rem);
  color: #dd6b20;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
}

/* Oyun içi ayar paneli (koyu) */
.game-settings-stats {
  margin: 0 0 12px;
  padding: 0;
  background: transparent;
  border-radius: 0;
}

.kk-stat-panel--ingame {
  background: linear-gradient(155deg, rgba(30, 58, 95, 0.55) 0%, rgba(12, 35, 58, 0.72) 100%);
  border: 1px solid rgba(186, 230, 253, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.kk-stat-panel-head--ingame {
  border-bottom-color: rgba(255, 255, 255, 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0%, transparent 100%);
}

.kk-stat-panel--ingame .kk-stat-panel-title {
  color: #e9d5ff;
  text-shadow: 0 0 20px rgba(167, 139, 250, 0.35);
}

.kk-stat-panel--ingame .kk-stat-panel-sub {
  color: rgba(255, 255, 255, 0.52);
}

.kk-stat-grid--ingame {
  padding: 10px;
  gap: 7px;
}

.kk-stat-tile--ingame {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.kk-stat-tile--ingame .kk-stat-tile-label {
  color: rgba(255, 255, 255, 0.55);
}

.kk-stat-tile--ingame .kk-stat-tile-val {
  color: #fde68a;
  text-shadow: 0 0 18px rgba(251, 191, 36, 0.35);
}

.kk-stat-tile--hero.kk-stat-tile--ingame {
  background: linear-gradient(125deg, rgba(251, 191, 36, 0.2) 0%, rgba(124, 58, 237, 0.18) 100%);
  border-color: rgba(253, 230, 138, 0.35);
}

.kk-stat-tile--hero.kk-stat-tile--ingame .kk-stat-tile-val {
  color: #fef3c7;
  font-size: clamp(1.45rem, 5vw, 1.85rem);
  text-shadow: 0 0 22px rgba(252, 211, 77, 0.45);
}

.bb-settings-banner {
  padding: 14px 16px 12px;
  background: linear-gradient(180deg, rgba(21, 101, 216, 0.07) 0%, rgba(21, 101, 216, 0.02) 100%);
  border-bottom: 1px solid rgba(30, 45, 68, 0.09);
}

.bb-settings-banner-title {
  display: block;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #2a3d5c;
}

.bb-settings-banner-sub {
  display: block;
  margin-top: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #5a6b85;
  opacity: 0.92;
}

.bb-settings-list {
  padding: 12px 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bb-settings-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0;
  padding: 12px 14px;
  border-radius: 14px;
  cursor: pointer;
  background: rgba(30, 45, 68, 0.035);
  border: 1px solid rgba(30, 45, 68, 0.07);
  transition: background 0.15s ease, border-color 0.15s ease;
}

.bb-settings-item:hover {
  background: rgba(30, 45, 68, 0.055);
  border-color: rgba(30, 45, 68, 0.1);
}

.bb-settings-item > .bb-settings-label {
  flex: 1;
  min-width: 0;
}

.bb-settings-label {
  font-size: 0.9rem;
  font-weight: 700;
  color: #1e2d44;
  letter-spacing: -0.01em;
}

.bb-switch-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  margin: 0;
}

.bb-switch-track {
  position: relative;
  flex-shrink: 0;
  width: 50px;
  height: 30px;
  border-radius: 15px;
  background: #c5ced9;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.12);
  transition: background 0.2s ease;
}

.bb-switch-track::after {
  content: "";
  position: absolute;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  left: 3px;
  top: 3px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s cubic-bezier(0.34, 1.2, 0.64, 1);
}

.bb-settings-item:focus-within {
  outline: none;
}

.bb-switch-input:focus-visible + .bb-switch-track {
  outline: 2px solid #1565d8;
  outline-offset: 2px;
}

.bb-switch-input:checked + .bb-switch-track {
  background: linear-gradient(180deg, #3ee0b8 0%, #1ab88f 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.bb-switch-input:checked + .bb-switch-track::after {
  transform: translateX(20px);
}

.bb-help-list {
  margin: 0;
  padding-left: 1.15rem;
  font-size: 0.875rem;
  line-height: 1.55;
  color: #3d4f66;
}

@keyframes bb-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-3px);
  }
}

@keyframes bb-pulse-play {
  0%,
  100% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.06);
  }
}

@media (prefers-reduced-motion: reduce) {
  .bb-ch,
  .bb-btn-play {
    animation: none;
  }

  .bb-deco-column--drift {
    animation: none;
    transform: none;
  }

  .bb-deco-column > * {
    animation: none;
  }
}

/* —— Macera haritası (düz, sade yüzey) —— */
.adventure-screen {
  position: fixed;
  inset: 0;
  z-index: 199;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  box-sizing: border-box;
  min-height: 100vh;
  min-height: 100dvh;
  padding: max(6px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right))
    max(6px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
  overflow: hidden;
  background: #0b1526;
}

.adventure-screen.hidden {
  display: none;
}

.adventure-screen-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 120% 70% at 50% 0%, rgba(30, 58, 95, 0.35), transparent 55%);
  opacity: 1;
}

.adventure-screen-orbs {
  display: none;
}

.adventure-orb {
  display: none;
}

.adventure-screen-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 100%;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-height: 0;
  flex: 1 1 auto;
  max-height: 100%;
  padding: 4px 6px 6px;
  border-radius: 12px;
  background: rgba(15, 27, 48, 0.92);
  border: 1px solid rgba(71, 85, 105, 0.55);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.28);
  box-sizing: border-box;
}

.adventure-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-shrink: 0;
  margin-bottom: 3px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(71, 85, 105, 0.45);
}

.adventure-back {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  border: 1px solid rgba(100, 116, 139, 0.55);
  background: rgba(30, 41, 59, 0.9);
  color: #e0f2fe;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: none;
}

.adventure-title {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #e2e8f0;
}

.adventure-top-spacer {
  width: 40px;
  height: 40px;
}

.adventure-hero {
  text-align: center;
  flex-shrink: 0;
  margin-bottom: 3px;
  padding: 5px 4px 6px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(51, 65, 85, 0.5);
  box-shadow: none;
}

.adventure-hero-visual {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 11px;
  margin-bottom: 8px;
  flex-wrap: wrap;
  animation: none;
}

/* Macera üst kupası: tamamen statik (animasyon / filter / transform yok) */
.adventure-hero-trophy {
  box-sizing: border-box;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  filter: none;
  animation: none !important;
  transition: none !important;
  transform: none;
  will-change: auto;
  contain: strict;
  isolation: isolate;
}

.adventure-hero-trophy-svg {
  display: block;
  flex-shrink: 0;
  pointer-events: none;
  animation: none !important;
  transition: none !important;
  transform: none;
}

.adventure-hero-chips {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.adventure-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.1rem;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  color: #fef08a;
  background: rgba(113, 63, 18, 0.35);
  border: 1px solid rgba(202, 138, 4, 0.45);
  box-shadow: none;
}

.adventure-chip--mark {
  padding: 5px 10px;
}

.adventure-chip--mark .kk-ico {
  display: block;
}

.adventure-chip--cry {
  color: #fecdd3;
  background: rgba(136, 19, 55, 0.32);
  border-color: rgba(225, 29, 72, 0.4);
}

.adventure-chip--num {
  font-variant-numeric: tabular-nums;
  color: #bae6fd;
  background: rgba(12, 74, 110, 0.4);
  border-color: rgba(14, 165, 233, 0.4);
}

.adventure-tagline {
  margin: 0;
  font-size: 0.66rem;
  line-height: 1.45;
  color: rgba(203, 213, 225, 0.92);
  padding: 0 6px;
  max-width: 28em;
  margin-left: auto;
  margin-right: auto;
}

.adventure-map-panel {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(51, 65, 85, 0.55);
  box-shadow: none;
  overflow: hidden;
}

.adventure-map-panel-head {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  padding: 5px 6px 4px;
  flex-shrink: 0;
}

.adventure-map-panel-kicker {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.95);
  white-space: nowrap;
}

.adventure-map-panel-line {
  flex: 1;
  height: 1px;
  background: rgba(71, 85, 105, 0.55);
  min-width: 0;
}

.adventure-map-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 3px 8px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  justify-content: safe center;
}

.adventure-map {
  --adv-max-cols: 13;
  /* Satırdaki gap toplamı hesaba katılır; aksi halde hücreler taşar ve rakamlar üst üste biner */
  --adv-gap: 2px;
  --adv-cell-size: 20px;
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 4px 2px 5px;
  width: 100%;
  max-width: 100%;
  margin: auto 0;
  box-sizing: border-box;
}

.adv-map-row {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: var(--adv-gap, 2px);
  width: 100%;
  max-width: min(
    100%,
    calc(
      var(--adv-max-cols, 13) * var(--adv-cell-size, 20px) +
        (var(--adv-max-cols, 13) - 1) * var(--adv-gap, 2px)
    )
  );
}

.adv-map-spacer {
  width: calc(
    (100% - (var(--adv-max-cols, 13) - 1) * var(--adv-gap, 2px)) / var(--adv-max-cols, 13)
  );
  max-width: var(--adv-cell-size, 20px);
  min-width: 0;
  flex: 0 0 auto;
  aspect-ratio: 1;
  visibility: hidden;
  pointer-events: none;
}

.adv-map-cell {
  width: calc(
    (100% - (var(--adv-max-cols, 13) - 1) * var(--adv-gap, 2px)) / var(--adv-max-cols, 13)
  );
  max-width: var(--adv-cell-size, 20px);
  min-width: 0;
  aspect-ratio: 1;
  flex: 0 0 auto;
  border: none;
  border-radius: 4px;
  padding: 0 1px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  font-size: clamp(0.42rem, 1.85vw, 0.55rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  overflow: hidden;
  transition:
    transform 0.12s ease,
    box-shadow 0.15s ease,
    filter 0.15s ease;
}

.adv-map-cell--done {
  background: #0ea5e9;
  color: #f0f9ff;
  box-shadow: none;
  border: 1px solid rgba(14, 165, 233, 0.35);
}

.adv-map-cell--next {
  background: #eab308;
  color: #422006;
  box-shadow: none;
  border: 1px solid rgba(202, 138, 4, 0.55);
  transform: scale(1.02);
  z-index: 1;
  position: relative;
}

.adv-map-cell--locked {
  background: rgba(30, 41, 59, 0.85);
  color: rgba(100, 116, 139, 0.55);
  border: 1px solid rgba(51, 65, 85, 0.65);
  cursor: default;
  box-shadow: none;
}

.adv-map-cell--locked:active {
  transform: none;
}

/* Telefon: 13 sütun satırı yatay kayar; --adv-cell-size ile taban boy eşleşir */
@media (max-width: 480px) {
  .adventure-map-scroll {
    overflow-x: auto;
    padding-left: 8px;
    padding-right: 8px;
    justify-content: flex-start;
  }

  .adventure-map {
    width: max-content;
    max-width: none;
    margin-left: auto;
    margin-right: auto;
    padding: 5px 3px 8px;
    gap: 3px;
  }

  .adv-map-row {
    max-width: none;
    width: calc(
      var(--adv-max-cols, 13) * var(--adv-cell-size, 20px) +
        (var(--adv-max-cols, 13) - 1) * var(--adv-gap, 2px)
    );
    flex-shrink: 0;
    gap: var(--adv-gap, 2px);
  }

  .adv-map-cell,
  .adv-map-spacer {
    width: var(--adv-cell-size, 20px);
    min-width: var(--adv-cell-size, 20px);
    max-width: var(--adv-cell-size, 20px);
    flex: 0 0 var(--adv-cell-size, 20px);
    box-sizing: border-box;
    border-radius: 4px;
    font-size: clamp(0.42rem, 1.85vw, 0.55rem);
    font-weight: 800;
  }

  .adventure-screen-inner {
    padding-left: 6px;
    padding-right: 6px;
  }
}

@media (hover: hover) {
  .adv-map-cell--done:hover,
  .adv-map-cell--next:hover {
    filter: brightness(1.04);
  }
}

.game-stat--adventure-target {
  min-width: 0;
}

.game-stat--adventure-target .game-stat-label--adventure {
  color: rgba(253, 224, 71, 0.78);
}

.game-stat-crown--flag {
  filter: drop-shadow(0 0 4px rgba(251, 191, 36, 0.26));
}

.game-adventure-obj-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 0;
  padding-top: 2px;
  /* wrap: dar HUD’da ★ / ✦ alt alta iner, kombo sonrası yan yana — tahta zıplar */
  flex-wrap: nowrap;
}

.game-adventure-obj {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 5px;
  min-width: 0;
  flex-shrink: 0;
}

.game-adventure-obj-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.4));
}

.game-adventure-obj-ico .kk-ico {
  display: block;
}

.game-adventure-obj-val {
  font-size: clamp(0.95rem, 3.5vw, 1.12rem);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  color: #fef9c3;
  -webkit-text-fill-color: #fef9c3;
  text-shadow:
    0 1px 0 rgba(0, 0, 0, 0.24),
    0 0 4px rgba(251, 191, 36, 0.11);
}

/* Macera: patlayan ★/✦ işaretleri HUD hedefe uçar — yalnız transform (layout yok, daha akıcı) */
.adv-mark-fly {
  position: fixed;
  z-index: 280;
  left: 0;
  top: 0;
  width: 24px;
  height: 24px;
  margin: 0;
  pointer-events: none;
  will-change: transform;
  /* Başlangıç/bitiş game.js içinde translate3d ile verilir */
  transition: transform 0.4s cubic-bezier(0.12, 0.88, 0.18, 1.08);
  opacity: 1;
}

.adv-mark-fly--star {
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.36)) drop-shadow(0 0 5px rgba(251, 191, 36, 0.3));
}

.adv-mark-fly--crystal {
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.36)) drop-shadow(0 0 5px rgba(236, 72, 153, 0.26));
}

@media (pointer: coarse) {
  .adv-mark-fly--star {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.38)) drop-shadow(0 0 4px rgba(251, 191, 36, 0.28));
  }

  .adv-mark-fly--crystal {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.38)) drop-shadow(0 0 4px rgba(236, 72, 153, 0.24));
  }

  #game-screen:has(.game-hud--adventure) .adv-mark-fly--star {
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.36)) drop-shadow(0 0 3px rgba(251, 191, 36, 0.16));
  }

  #game-screen:has(.game-hud--adventure) .adv-mark-fly--crystal {
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.36)) drop-shadow(0 0 3px rgba(236, 72, 153, 0.14));
  }
}

.adv-mark-fly-svg {
  display: block;
  width: 24px;
  height: 24px;
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.22));
}

#game-adventure-fly-target-star.adv-fly-merged,
#game-adventure-fly-target-crystal.adv-fly-merged {
  animation: adv-fly-hud-merge 0.4s cubic-bezier(0.34, 1.35, 0.64, 1);
  transform-origin: center center;
}

@keyframes adv-fly-hud-merge {
  0% {
    transform: scale(1);
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
  }
  40% {
    transform: scale(1.14);
    filter: drop-shadow(0 0 10px rgba(251, 191, 36, 0.35));
  }
  100% {
    transform: scale(1);
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.4));
  }
}

#game-adventure-fly-target-crystal.adv-fly-merged {
  animation-name: adv-fly-hud-merge-crystal;
}

@keyframes adv-fly-hud-merge-crystal {
  0% {
    transform: scale(1);
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
  }
  40% {
    transform: scale(1.14);
    filter: drop-shadow(0 0 10px rgba(236, 72, 153, 0.36));
  }
  100% {
    transform: scale(1);
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.4));
  }
}

@media (prefers-reduced-motion: reduce) {
  .adv-mark-fly {
    transition: none;
  }

  #game-adventure-fly-target-star.adv-fly-merged,
  #game-adventure-fly-target-crystal.adv-fly-merged {
    animation: none;
  }
}

.modal--game-over--adventure-win .modal-game-over__head--record .modal-game-over__title {
  filter: drop-shadow(0 2px 20px rgba(251, 191, 36, 0.45));
}

.game-screen.hidden {
  display: none;
}

#game-screen:not(.hidden) {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  overscroll-behavior: none;
  max-height: 100dvh;
  min-height: 0;
}

/* Tahta alanı üst sınır içinde kalsın; 100dvh .app taşırmasın */
#game-screen:not(.hidden) .app {
  flex: 1 1 auto;
  min-height: 0;
  max-height: 100%;
}

.app {
  width: 100%;
  max-width: min(480px, 100%);
  margin: 0 auto;
  padding: max(10px, env(safe-area-inset-top)) 16px 28px;
  min-height: 100dvh;
  box-sizing: border-box;
}

/* Oyun: tahta + tepsi blokunu dikeyde ortala; kenar / üst boşluk dar, tahta geniş */
#game-screen .app {
  display: flex;
  flex-direction: column;
  /* Oyun + macera içeriğini birkaç adım aşağı al */
  padding-top: max(36px, env(safe-area-inset-top));
  padding-left: max(8px, env(safe-area-inset-left));
  padding-right: max(8px, env(safe-area-inset-right));
  padding-bottom: max(10px, env(safe-area-inset-bottom));
}

/* Klasik / macera: skor üstte; alt şeritte «Full combo» + ⚙ yan yana (.game-hud-combo-gear-row) */
#game-screen .game-hud-main {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
  /* Şerit küçülünce içeriği aynı ölçüde aşağı */
  margin-top: 10px;
}

/* —— Oyun üstü: vitrin / HUD —— */
.game-hud {
  position: relative;
  z-index: 2;
  margin-bottom: 16px;
}

#game-screen .game-hud {
  flex-shrink: 0;
  margin-bottom: 2px;
}

/* Alt şerit: «Full combo» + ⚙ — eski kahverengi kutu; yazı toast ile aynı gradyan tipografi */
#game-screen .game-hud-combo-gear-row {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
  flex-shrink: 0;
  min-height: 2.95rem;
  padding: 6px 8px 7px 10px;
  margin: 0;
  border-radius: 12px;
  border: 1px solid rgba(251, 191, 36, 0.22);
  background:
    linear-gradient(180deg, rgba(255, 248, 220, 0.06) 0%, transparent 42%),
    linear-gradient(168deg, rgba(120, 70, 10, 0.62) 0%, rgba(30, 18, 8, 0.94) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 0 6px rgba(251, 146, 60, 0.12),
    0 4px 14px rgba(0, 0, 0, 0.22);
  position: relative;
  z-index: 1;
}

#game-screen .game-hud-combo-gear-row .game-stat--clear-streak {
  grid-column: unset;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0 4px 0 0;
  border: none;
  box-shadow: none;
  background: transparent !important;
  justify-content: center;
}

/* .game-stat::before üst beyaz cilayı — kombo yazısının yanında görünmesin */
#game-screen .game-hud-combo-gear-row .game-stat--clear-streak::before {
  display: none;
}

/* HUD’da genel .game-clear-streak__* gradyanı kalır; sadece punto */
#game-screen .game-hud-combo-gear-row .game-clear-streak__label {
  font-size: clamp(1.02rem, 3.75vw, 1.26rem);
  -webkit-text-stroke: 1.58px #0c2d5c;
}

#game-screen .game-hud-combo-gear-row .game-clear-streak__times {
  font-size: clamp(0.92rem, 3.35vw, 1.14rem);
}

#game-screen .game-hud-combo-gear-row .game-clear-streak__num {
  font-size: clamp(1.24rem, 4.65vw, 1.78rem);
  min-width: 1em;
  -webkit-text-stroke: 2.05px #0a2347;
}

/* Ayarlar: altın çerçeve + vektör dişli */
#game-screen .game-hud-combo-gear-row .btn-game-gear {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  font-size: 1rem;
  color: #fffbeb;
  background: linear-gradient(
    165deg,
    rgba(255, 253, 245, 0.22) 0%,
    rgba(251, 191, 36, 0.14) 38%,
    rgba(146, 64, 14, 0.42) 100%
  );
  border: 1px solid rgba(253, 224, 71, 0.48);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    inset 0 -1px 0 rgba(0, 0, 0, 0.22),
    0 2px 10px rgba(0, 0, 0, 0.38),
    0 0 18px rgba(251, 191, 36, 0.14);
}

@media (hover: hover) {
  #game-screen .game-hud-combo-gear-row .btn-game-gear:hover {
    color: #fff;
    border-color: rgba(254, 240, 138, 0.62);
    background: linear-gradient(
      165deg,
      rgba(255, 255, 255, 0.3) 0%,
      rgba(253, 224, 71, 0.22) 42%,
      rgba(180, 83, 9, 0.45) 100%
    );
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.35),
      0 0 22px rgba(251, 191, 36, 0.22),
      0 6px 18px rgba(0, 0, 0, 0.32);
  }
}

#game-screen .game-hud-combo-gear-row .btn-game-gear:active {
  transform: scale(0.94);
}

#game-screen .game-hud-combo-gear-row .btn-game-gear .btn-game-gear-svg {
  display: block;
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.35));
}

#game-screen .game-hud-combo-gear-row .game-stat--clear-streak:not(.game-stat--clear-streak--active) {
  border-color: transparent;
  box-shadow: none;
}

#game-screen .game-hud-combo-gear-row .game-stat--clear-streak--hot {
  border: none;
  box-shadow: none;
}

#game-screen .game-hud-combo-gear-row:has(.game-stat--clear-streak--hot) {
  border-color: rgba(252, 211, 77, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 0 10px rgba(250, 204, 21, 0.14),
    0 3px 12px rgba(0, 0, 0, 0.22);
}

#game-screen .game-hud-combo-gear-row .game-hud-actions {
  flex-shrink: 0;
  margin-top: 0;
  align-self: center;
}

#game-screen:has(.game-hud--adventure) .game-hud-combo-gear-row {
  border-color: rgba(251, 191, 36, 0.09);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 0 2px rgba(251, 146, 60, 0.022),
    0 2px 8px rgba(0, 0, 0, 0.14);
}

#game-screen:has(.game-hud--adventure) .game-hud-combo-gear-row:has(.game-stat--clear-streak--hot) {
  border-color: rgba(252, 211, 77, 0.12);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 0 2px rgba(250, 204, 21, 0.03),
    0 2px 6px rgba(0, 0, 0, 0.14);
}

/* Yalnızca skor satırının dışındaki koyu şerit kaldırıldı; Score/Best kartları eski stilleriyle */
#game-screen .game-hud-stats {
  flex: 1;
  min-width: 0;
  padding: 1px;
  gap: 9px;
  border-radius: 18px;
  background: transparent;
  box-shadow: none;
}

#game-screen .game-stat--current {
  padding: 11px 14px 12px 16px;
  border-radius: 16px;
}

#game-screen .game-stat--current::after {
  top: 10px;
  bottom: 10px;
}

#game-screen .game-stat--record {
  padding: 6px 9px 7px;
  border-radius: 12px;
  transform: scale(0.94);
}

#game-screen .game-stat-head {
  margin-bottom: 2px;
}

#game-screen .game-stat--current .game-stat-value {
  font-size: clamp(1.55rem, 6.5vw, 2.05rem);
}

#game-screen .game-stat--record .game-stat-value {
  font-size: clamp(0.95rem, 3.5vw, 1.18rem);
}

#game-screen .game-stat-label--score {
  padding: 3px 8px 3px 6px;
  font-size: 0.6rem;
}

#game-screen .game-stat-rekor {
  margin: 0 0 3px;
  min-height: 1em;
}

#game-screen .game-stat-rekor-text {
  font-size: 0.58rem;
}

/* Tahta + tepsi: negatif margin + overflow-y:hidden üst satırı kırpar — kullanma */
#game-screen #game-play-area.game-play-area {
  padding-top: 0;
  /* Yatay tahta kenarı + gölge kırpılmasın (overflow-x:hidden kesiyordu) */
  overflow-x: visible;
  overflow-y: hidden;
}

#game-screen .board-wrap {
  overflow: visible;
}

/* Dış gölge (box-shadow) + köşe yayı tahta sütununda kırpılmasın */
#game-screen .board-column {
  overflow: visible;
  padding: 0 4px;
  box-sizing: border-box;
}

#game-screen .tray-with-rotate {
  margin-top: -6px;
}

.game-hud-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 213, 79, 0.14) 50%, transparent 100%) bottom /
    100% 1px no-repeat;
}

.game-hud-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.game-hud-mark {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(255, 213, 79, 0.35),
    0 5px 16px rgba(26, 15, 50, 0.65);
  border: 1px solid rgba(255, 213, 79, 0.38);
}

.game-hud-brand-text {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}

.game-hud-title {
  font-size: clamp(1.02rem, 3.6vw, 1.26rem);
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.12;
  background: linear-gradient(188deg, #e1f5fe 0%, #b39ddb 38%, #ffd54f 72%, #ff8f00 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 8px rgba(126, 87, 194, 0.28));
}

@supports not (background-clip: text) {
  .game-hud-title {
    color: #ffd54f;
    background: none;
  }
}

.game-hud-actions {
  flex-shrink: 0;
}

.game-hud-stats {
  display: grid;
  grid-template-columns: minmax(0, 1.48fr) minmax(0, 0.68fr);
  gap: 13px;
  position: relative;
  align-items: stretch;
  padding: 3px;
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.07) 0%, rgba(0, 0, 0, 0.12) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 4px 24px rgba(0, 0, 0, 0.18);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.game-stat {
  position: relative;
  border-radius: 16px;
  padding: 11px 13px 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.11);
  background: linear-gradient(168deg, rgba(255, 255, 255, 0.1) 0%, rgba(20, 12, 35, 0.58) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 8px 26px rgba(0, 0, 0, 0.3);
}

.game-stat::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(128deg, rgba(255, 255, 255, 0.09) 0%, transparent 48%);
  pointer-events: none;
}

.game-stat--current {
  z-index: 2;
  padding: 15px 17px 17px 19px;
  border-radius: 19px;
  padding-left: 19px;
  border-color: rgba(255, 224, 130, 0.36);
  background:
    linear-gradient(175deg, rgba(255, 252, 235, 0.065) 0%, transparent 40%),
    linear-gradient(205deg, rgba(55, 40, 72, 0.55) 0%, rgba(10, 6, 20, 0.94) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 -1px 0 rgba(0, 0, 0, 0.12),
    0 0 0 1px rgba(255, 193, 7, 0.13),
    0 0 16px rgba(255, 193, 7, 0.055),
    0 12px 30px rgba(0, 0, 0, 0.32);
  animation: none;
}

.game-stat-corner {
  position: absolute;
  top: 0;
  right: 0;
  width: 64px;
  height: 64px;
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 248, 200, 0.12) 0%, transparent 52%),
    radial-gradient(circle at 88% 8%, rgba(255, 193, 7, 0.055) 0%, transparent 45%);
  pointer-events: none;
  z-index: 0;
}

.game-stat--current::after {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: linear-gradient(180deg, #fff8e1 0%, #ffc107 45%, #ff6f00 100%);
  box-shadow: 0 0 6px rgba(255, 193, 7, 0.22);
  pointer-events: none;
}

.game-stat--record {
  position: relative;
  align-self: center;
  padding: 8px 11px 9px;
  border-radius: 14px;
  border-color: rgba(186, 104, 200, 0.26);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, transparent 52%),
    linear-gradient(168deg, rgba(90, 55, 110, 0.42) 0%, rgba(24, 12, 38, 0.9) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -1px 0 rgba(0, 0, 0, 0.15),
    0 5px 18px rgba(0, 0, 0, 0.26);
  opacity: 0.95;
  transform: scale(0.96);
  transform-origin: center right;
}

.game-stat--record .game-stat-head {
  margin-bottom: 2px;
}

.game-stat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 4px;
  position: relative;
  z-index: 1;
}

.game-stat-label {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(232, 213, 255, 0.62);
}

.game-stat-label--score {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 7px;
  margin: -4px 0 0 -6px;
  border-radius: 999px;
  letter-spacing: 0.17em;
  font-size: 0.66rem;
  color: rgba(255, 251, 235, 0.95);
  background: linear-gradient(105deg, rgba(255, 213, 79, 0.22) 0%, rgba(255, 152, 0, 0.1) 100%);
  border: 1px solid rgba(255, 224, 130, 0.38);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 2px 12px rgba(255, 193, 7, 0.12);
}

.game-stat-spark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  filter: drop-shadow(0 0 6px rgba(255, 235, 59, 0.55));
  animation: game-stat-spark-twinkle 2s ease-in-out infinite;
}

.game-stat-spark .kk-ico {
  display: block;
}

.game-stat-label--record {
  font-size: 0.55rem;
  letter-spacing: 0.12em;
  opacity: 0.82;
  color: rgba(230, 210, 245, 0.72);
}

.game-stat-crown {
  font-size: 0.95rem;
  line-height: 1;
  filter: drop-shadow(0 0 6px rgba(255, 213, 79, 0.45));
}

.game-stat--record .game-stat-crown {
  font-size: 0.72rem;
  opacity: 0.85;
}

/* Rekor kutlaması — kart + başlık */
.game-stat--record.game-stat--rekor-celebrate {
  overflow: visible;
  opacity: 1;
  transform: scale(1);
  border-color: rgba(255, 213, 79, 0.55);
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(255, 224, 130, 0.22) 0%, transparent 55%),
    linear-gradient(168deg, rgba(110, 50, 130, 0.55) 0%, rgba(22, 10, 32, 0.96) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 -1px 0 rgba(0, 0, 0, 0.12),
    0 0 0 1px rgba(255, 193, 7, 0.42),
    0 0 22px rgba(255, 193, 7, 0.38),
    0 10px 26px rgba(0, 0, 0, 0.4);
  /* Eskiden filter+box-shadow animasyonu burada sürekü yeniden boyuyordu — sabit parlaklık */
  z-index: 3;
}

.game-stat--record.game-stat--rekor-celebrate .game-stat-label--record {
  color: rgba(255, 248, 220, 0.92);
  opacity: 1;
  text-shadow: 0 0 12px rgba(255, 213, 79, 0.35);
}

.game-stat-rekor {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0 0 5px;
  min-height: 1.1em;
}

.game-stat-rekor-text {
  font-size: 0.62rem;
  font-weight: 900;
  font-style: italic;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: linear-gradient(105deg, #fffde7 0%, #ffe082 28%, #ffc107 55%, #ff8f00 85%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.45));
  animation: game-stat-rekor-pop 0.44s cubic-bezier(0.34, 1.45, 0.64, 1) both;
}

.game-stat-rekor-spark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  filter: drop-shadow(0 0 6px rgba(255, 235, 59, 0.45));
  animation: none;
}

.game-stat-rekor-spark .kk-ico {
  display: block;
}

.game-stat-rekor-spark--l {
  animation-delay: 0s;
}

.game-stat-rekor-spark--r {
  animation-delay: 0.35s;
}

@keyframes game-stat-rekor-pop {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.88);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .game-stat--record.game-stat--rekor-celebrate {
    animation: none;
  }

  .game-stat-rekor-text {
    animation: none;
    color: #ffe082;
    background: none;
    -webkit-background-clip: unset;
    background-clip: unset;
    filter: none;
  }

  .game-stat-rekor-spark {
    animation: none;
  }
}

.game-stat-value {
  position: relative;
  z-index: 1;
  display: block;
  font-size: clamp(1.45rem, 5.5vw, 1.85rem);
  font-weight: 800;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.game-stat--current .game-stat-value {
  font-size: clamp(1.75rem, 7.4vw, 2.24rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  color: #fffef8;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.22),
    0 0 12px rgba(255, 213, 79, 0.18),
    0 0 24px rgba(255, 152, 0, 0.055),
    0 3px 1px rgba(60, 35, 0, 0.45);
}

.game-stat--record .game-stat-value {
  font-size: clamp(1.04rem, 3.9vw, 1.3rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: #ffeaa7;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.1),
    0 0 9px rgba(255, 193, 7, 0.18),
    0 2px 1px rgba(50, 30, 0, 0.32);
}

.game-hud--adventure .game-stat--record {
  display: none !important;
}

.game-hud--adventure .game-stat--adventure-target {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  gap: 6px;
  padding: 12px 11px 13px;
  overflow: visible;
  /* İçerik satırı wrap olunca yükseklik değişmesin — ızgara sabit */
  min-height: 5.5rem;
  box-sizing: border-box;
}

.game-stat--adventure-target .game-stat-head {
  margin-bottom: 0;
  flex-shrink: 0;
}

.game-stat--adventure-target .game-adventure-obj-row {
  flex: 0 0 auto;
  flex-wrap: nowrap !important;
  justify-content: center;
  gap: clamp(8px, 2.2vw, 14px);
}

/* Üst üste sıra: HUD — toast’taki Full combo ile aynı tipografi (etiket + büyük sayı) */
.game-stat--clear-streak {
  grid-column: 1 / -1;
  justify-self: stretch;
  box-sizing: border-box;
  /* Seri 2+ iken satır görünür; yükseklik her zaman aynı kalsın — tahta yukarı-aşağı zıplamasın */
  min-height: 3.75rem;
  padding: 9px 14px 10px;
  margin: 0;
  border-radius: 14px;
  border: 1px solid rgba(251, 191, 36, 0.22);
  background:
    linear-gradient(180deg, rgba(255, 248, 220, 0.06) 0%, transparent 42%),
    linear-gradient(168deg, rgba(120, 70, 10, 0.62) 0%, rgba(30, 18, 8, 0.94) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 0 6px rgba(251, 146, 60, 0.12),
    0 4px 14px rgba(0, 0, 0, 0.22);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Seri yokken de yer tutar; tahta / HUD aşağı zıplamaz */
.game-stat--clear-streak:not(.game-stat--clear-streak--active) {
  visibility: hidden;
  pointer-events: none;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.game-clear-streak-line {
  display: block;
  width: 100%;
}

.game-clear-streak__row {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 0.12em 0.38em;
  max-width: 100%;
}

/* «Full combo» — tahta toast .board-toast__kombo-label ile aynı dil */
.game-clear-streak__label {
  font-family: system-ui, "Segoe UI", Roboto, "Nunito", sans-serif;
  font-size: clamp(1.12rem, 4.2vw, 1.42rem);
  font-weight: 900;
  font-style: italic;
  letter-spacing: 0.03em;
  line-height: 1.05;
  text-transform: none;
  background: linear-gradient(180deg, #ffffff 0%, #e8f6ff 38%, #7dd3fc 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-stroke: 1.85px #0c2d5c;
  paint-order: stroke fill;
  filter: drop-shadow(1px 2px 0 rgba(8, 32, 72, 0.82));
}

.game-clear-streak__numwrap {
  display: inline-flex;
  align-items: baseline;
  gap: 0.02em;
  font-variant-numeric: tabular-nums;
}

.game-clear-streak__times {
  font-size: clamp(1.02rem, 3.8vw, 1.28rem);
  font-weight: 900;
  font-style: italic;
  color: rgba(224, 242, 254, 0.98);
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.55),
    0 0 8px rgba(56, 189, 248, 0.26);
}

/* Çarpan — toast .board-toast__kombo-num */
.game-clear-streak__num {
  font-family: system-ui, "Segoe UI", Roboto, sans-serif;
  font-size: clamp(1.42rem, 5.4vw, 2.1rem);
  font-weight: 900;
  font-style: italic;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  min-width: 1.15em;
  text-align: center;
  background: linear-gradient(180deg, #f0f9ff 0%, #bae6fd 34%, #38bdf8 70%, #2563eb 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-stroke: 2.35px #0a2347;
  paint-order: stroke fill;
  filter: drop-shadow(2px 3px 0 rgba(8, 28, 58, 0.92));
}

.game-stat--clear-streak--hot {
  border-color: rgba(252, 211, 77, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 0 10px rgba(250, 204, 21, 0.14),
    0 3px 12px rgba(0, 0, 0, 0.22);
}

/* ×2 / ×3 ile aynı punto: yazı büyümesin — HUD + tahta dikeyde zıplamasın */
.game-stat--clear-streak--hot .game-clear-streak__label {
  filter: drop-shadow(2px 3px 0 rgba(8, 32, 72, 0.95)) drop-shadow(0 0 12px rgba(125, 211, 252, 0.22));
}

.game-stat--clear-streak--hot .game-clear-streak__num {
  filter: drop-shadow(2px 3px 0 rgba(8, 28, 58, 0.94)) drop-shadow(0 0 14px rgba(251, 191, 36, 0.2));
}

@keyframes game-stat-current-glow {
  0%,
  100% {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.14),
      inset 0 -1px 0 rgba(0, 0, 0, 0.12),
      0 0 0 1px rgba(255, 193, 7, 0.13),
      0 0 16px rgba(255, 193, 7, 0.055),
      0 12px 30px rgba(0, 0, 0, 0.32);
  }
  50% {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.17),
      inset 0 -1px 0 rgba(0, 0, 0, 0.1),
      0 0 0 1px rgba(255, 224, 130, 0.2),
      0 0 20px rgba(255, 193, 7, 0.09),
      0 12px 32px rgba(0, 0, 0, 0.3);
  }
}

@keyframes game-stat-current-glow-adv {
  0%,
  100% {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.11),
      inset 0 -1px 0 rgba(0, 0, 0, 0.12),
      0 0 0 1px rgba(255, 193, 7, 0.09),
      0 0 10px rgba(255, 193, 7, 0.035),
      0 10px 24px rgba(0, 0, 0, 0.28);
  }
  50% {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.13),
      inset 0 -1px 0 rgba(0, 0, 0, 0.1),
      0 0 0 1px rgba(255, 224, 130, 0.14),
      0 0 13px rgba(255, 193, 7, 0.055),
      0 10px 26px rgba(0, 0, 0, 0.26);
  }
}

@keyframes game-stat-spark-twinkle {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.65;
    transform: scale(0.92);
  }
}

.btn-game-gear {
  width: 44px;
  height: 44px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0.05) 100%);
  border: 1px solid rgba(201, 162, 39, 0.38);
  color: #f3e5ff;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 4px 14px rgba(0, 0, 0, 0.22);
  transition:
    transform 0.18s ease,
    box-shadow 0.22s ease,
    border-color 0.22s ease,
    background 0.22s ease,
    color 0.22s ease;
}

@media (hover: hover) {
  .btn-game-gear:hover {
    background: linear-gradient(165deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 213, 79, 0.1) 100%);
    border-color: rgba(255, 213, 79, 0.55);
    color: #fff;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.18),
      0 0 20px rgba(255, 193, 7, 0.15),
      0 6px 18px rgba(0, 0, 0, 0.28);
  }
}

.btn-game-gear:active {
  transform: scale(0.94);
}

.btn-game-gear-ico {
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-game-gear-svg {
  display: block;
}

/* Mobil / dar ekran: istatistik barı padding + daha hafif blur (okunurluk & GPU) */
@media (max-width: 480px) {
  .app {
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
  }

  .game-hud {
    margin-bottom: 12px;
  }

  #game-screen .game-hud {
    margin-bottom: 2px;
  }

  .game-hud-top {
    margin-bottom: 12px;
    padding-bottom: 10px;
    gap: 10px;
  }

  #game-screen .game-hud-main {
    gap: 6px;
    margin-top: 9px;
  }

  #game-screen .game-hud-stats {
    padding: 1px;
    gap: 8px;
    border-radius: 16px;
    background: transparent !important;
    box-shadow: none !important;
  }

  #game-screen .game-stat--current {
    padding: 10px 11px 11px 14px;
    border-radius: 15px;
  }

  #game-screen .game-stat--record {
    padding: 5px 8px 6px;
    border-radius: 11px;
  }

  .game-hud-stats {
    padding: 5px 6px;
    gap: 10px;
    border-radius: 20px;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(14, 10, 28, 0.94);
  }

  .btn-game-gear {
    transition: transform 0.12s ease, border-color 0.12s ease;
  }

  .game-stat--current {
    padding: 13px 12px 14px 16px;
    border-radius: 17px;
  }

  .game-stat--record {
    padding: 7px 9px 8px;
    border-radius: 13px;
  }
}

@media (max-width: 360px) {
  #game-screen .game-hud-main {
    margin-top: 9px;
  }

  #game-screen .game-hud-stats {
    gap: 7px;
    border-radius: 15px;
    background: transparent !important;
    box-shadow: none !important;
  }

  #game-screen .game-stat--current {
    padding: 9px 10px 10px 12px;
  }

  #game-screen .game-stat--record {
    padding: 5px 7px 6px;
  }

  .game-hud-stats {
    padding: 4px 5px;
    gap: 8px;
    grid-template-columns: minmax(0, 1.42fr) minmax(0, 0.74fr);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(14, 10, 28, 0.94);
  }

  .game-stat--current {
    padding: 12px 10px 13px 14px;
  }

  .game-stat-label--score {
    font-size: 0.6rem;
    padding: 3px 7px 3px 5px;
    margin-left: -4px;
  }

  .game-hud-mark {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }
}

.game-settings-overlay {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(16px, env(safe-area-inset-top)) 18px max(20px, env(safe-area-inset-bottom));
  isolation: isolate;
  contain: layout style;
}

.game-settings-overlay.hidden {
  display: none;
}

.game-settings-overlay--menu .game-settings-actions-row--main {
  display: none;
}

/* Oyun içi — istatistik ayrı pencere (ayarların üstünde) */
.game-stats-overlay {
  position: fixed;
  inset: 0;
  z-index: 450;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(16px, env(safe-area-inset-top)) 18px max(20px, env(safe-area-inset-bottom));
  isolation: isolate;
  contain: layout style;
}

.game-stats-overlay.hidden {
  display: none;
}

.game-stats-scrim {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0;
  border: none;
  background: rgba(0, 0, 0, 0.62);
  cursor: pointer;
}

.game-stats-dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 318px;
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.52);
}

.game-stats-inner {
  padding-bottom: 16px;
}

.game-settings-scrim {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0;
  border: none;
  background:
    radial-gradient(ellipse 120% 80% at 50% 0%, rgba(56, 189, 248, 0.15), transparent 58%),
    rgba(2, 6, 23, 0.74);
  backdrop-filter: blur(6px) saturate(1.15);
  -webkit-backdrop-filter: blur(6px) saturate(1.15);
  cursor: pointer;
}

.game-settings-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 336px;
  box-shadow: 0 28px 56px rgba(2, 6, 23, 0.62);
  animation: game-settings-pop-in 0.28s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.game-settings-frame {
  border-radius: 24px;
  padding: 2px;
  background: linear-gradient(
    145deg,
    rgba(186, 230, 253, 0.92) 0%,
    rgba(125, 211, 252, 0.85) 24%,
    rgba(96, 165, 250, 0.72) 52%,
    rgba(129, 140, 248, 0.64) 78%,
    rgba(37, 99, 235, 0.8) 100%
  );
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.18) inset,
    0 26px 52px rgba(15, 23, 42, 0.48),
    0 0 44px rgba(56, 189, 248, 0.2);
}

.game-settings-inner {
  border-radius: 21px;
  padding: 18px 16px 16px;
  background:
    radial-gradient(120% 110% at 12% 0%, rgba(56, 189, 248, 0.14), transparent 46%),
    radial-gradient(120% 110% at 100% 100%, rgba(99, 102, 241, 0.14), transparent 52%),
    linear-gradient(168deg, #19233f 0%, #121a33 45%, #0c1020 100%);
  color: #f0f4ff;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    inset 0 -1px 0 rgba(0, 0, 0, 0.35),
    0 8px 20px rgba(2, 6, 23, 0.24);
}

.game-settings-head {
  position: relative;
  text-align: center;
  margin: 0 0 16px;
  padding: 0 36px;
  min-height: 40px;
}

.game-settings-head-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.game-settings-title {
  margin: 0;
  font-size: clamp(1.15rem, 4vw, 1.35rem);
  font-weight: 900;
  letter-spacing: 0.03em;
  line-height: 1.15;
  color: #eef7ff;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.38),
    0 0 18px rgba(56, 189, 248, 0.2);
}

.game-settings-subtitle {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(200, 210, 255, 0.72);
  letter-spacing: 0.02em;
}

.game-settings-x {
  position: absolute;
  right: 0;
  top: 0;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background 0.15s ease,
    transform 0.12s ease;
}

.game-settings-x:hover {
  background: rgba(255, 255, 255, 0.16);
}

.game-settings-x:active {
  transform: scale(0.94);
  background: rgba(255, 255, 255, 0.12);
}

/* Ayarlar penceresi — kapatma (×) kırmızı */
.game-settings-panel .game-settings-x {
  color: #ff3b3b;
  border-color: rgba(255, 80, 80, 0.55);
  background: rgba(180, 30, 30, 0.22);
  text-shadow: 0 0 12px rgba(255, 100, 100, 0.35);
}

.game-settings-panel .game-settings-x:hover {
  background: rgba(220, 50, 50, 0.38);
  border-color: rgba(255, 120, 120, 0.75);
  color: #ff6b6b;
}

.game-settings-panel .game-settings-x:active {
  background: rgba(160, 30, 30, 0.45);
  color: #ffc9c9;
}

.game-settings-toggles {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 14px;
}

.game-set-toggle {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 7px 10px;
  border: 1px solid rgba(186, 230, 253, 0.24);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(40, 60, 100, 0.58) 0%, rgba(15, 25, 50, 0.68) 100%);
  color: #fff;
  font-family: inherit;
  font-size: 0.68rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition:
    border-color 0.12s ease,
    transform 0.1s ease,
    opacity 0.12s ease;
}

.game-set-toggle:not(.is-off) {
  border-color: rgba(125, 211, 252, 0.72);
  box-shadow:
    0 0 0 1px rgba(56, 189, 248, 0.36),
    0 6px 16px rgba(14, 116, 144, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.game-set-toggle:active {
  transform: scale(0.97);
}

.game-set-toggle-visual {
  position: relative;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.2);
}

.game-set-toggle:not(.is-off) .game-set-toggle-visual {
  background: rgba(0, 80, 140, 0.35);
}

.game-set-emoji {
  font-size: 1.5rem;
  line-height: 1;
}

.game-set-toggle-visual--slash::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 48px;
  height: 3px;
  margin: -1.5px 0 0 -24px;
  background: linear-gradient(90deg, transparent, #ff6b6b, #ff5252, transparent);
  border-radius: 2px;
  transform: rotate(-42deg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.game-set-toggle.is-off .game-set-toggle-visual--slash::after {
  opacity: 1;
}

.game-set-toggle.is-off .game-set-toggle-visual:not(.game-set-toggle-visual--slash) {
  opacity: 0.45;
}

.game-set-toggle.is-off {
  border-color: rgba(255, 255, 255, 0.06);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.game-set-toggle-label {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.95;
}

.game-settings-rule {
  height: 1px;
  margin: 2px 0 14px;
  background: linear-gradient(90deg, transparent, rgba(140, 170, 255, 0.35), transparent);
}

.game-settings-about {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.22);
  font-size: 0.8rem;
  line-height: 1.5;
  color: rgba(230, 235, 255, 0.9);
}

.game-settings-about p {
  margin: 0;
}

.game-settings-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.game-settings-actions-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  align-items: stretch;
}

.game-settings-actions-row--tools {
  grid-auto-rows: minmax(52px, auto);
}

.game-settings-actions-row--tools .game-set-action {
  min-height: 52px;
  justify-self: stretch;
  align-self: stretch;
}

.game-settings-actions-row--main {
  gap: 10px;
}

.game-settings-actions-row--main .game-set-action {
  min-height: 58px;
  padding: 13px 14px;
}

.game-set-action {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 12px 12px;
  border: none;
  border-radius: 14px;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 800;
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  text-align: left;
  transition:
    transform 0.1s ease,
    filter 0.16s ease,
    box-shadow 0.16s ease,
    border-color 0.16s ease;
}

.game-set-action:active {
  transform: scale(0.98);
}

.game-set-action--ghost {
  background: linear-gradient(180deg, rgba(59, 90, 145, 0.58) 0%, rgba(27, 46, 84, 0.72) 100%);
  border: 1px solid rgba(186, 230, 253, 0.25);
  box-shadow:
    0 4px 12px rgba(2, 6, 23, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  color: #e8ecff;
}

.game-set-action--ghost:hover {
  border-color: rgba(186, 230, 253, 0.52);
  background: linear-gradient(180deg, rgba(77, 114, 179, 0.62) 0%, rgba(35, 61, 104, 0.76) 100%);
}

.game-set-action--menu {
  background: linear-gradient(180deg, #3d5a9e 0%, #2a4080 48%, #1e2f64 100%);
  border: 1px solid rgba(140, 178, 255, 0.52);
  box-shadow:
    0 3px 0 rgba(15, 25, 60, 0.9),
    0 8px 20px rgba(30, 50, 120, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.06) inset;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.35);
}

@media (hover: hover) and (pointer: fine) {
  .game-set-action--menu:hover {
    filter: brightness(1.06);
  }

  .game-set-action--play:hover {
    filter: brightness(1.05);
  }
}

.game-set-action--play {
  background: linear-gradient(180deg, #34d399 0%, #10b981 45%, #059669 100%);
  border: 1px solid rgba(187, 255, 225, 0.62);
  box-shadow:
    0 3px 0 #047857,
    0 8px 22px rgba(16, 185, 129, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.08) inset;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.25);
}

.game-settings-actions-row--main .game-set-action {
  transform: translateY(0);
}

.game-settings-actions-row--main .game-set-action:hover {
  transform: translateY(-1px);
}

@keyframes game-settings-pop-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.game-settings-actions-row--main .game-set-action .game-set-action-txt {
  font-size: 0.92rem;
  font-weight: 900;
  letter-spacing: 0.03em;
}

.game-set-action-ico {
  flex-shrink: 0;
  width: 28px;
  text-align: center;
  font-size: 1.12rem;
  line-height: 1;
}

.game-set-action-txt {
  flex: 1;
  letter-spacing: 0.02em;
}

/* Feedback / Privacy metinleri bir tık büyük görünüyor; tools satırında eşitle */
#game-settings-feedback-link .game-set-action-txt,
#game-settings-privacy-link .game-set-action-txt {
  font-size: 0.84rem;
  line-height: 1.12;
}

.btn {
  border: none;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  background: rgba(201, 162, 39, 0.25);
  color: #ffd54f;
}

.btn-menu {
  background: rgba(255, 255, 255, 0.08);
  color: #e8d5ff;
}

.btn.primary {
  background: linear-gradient(180deg, #ffd54f, #c9a227);
  color: #1a0f2e;
  width: 100%;
  margin-top: 8px;
}

.btn-modal-secondary {
  width: 100%;
  margin-top: 10px;
  background: rgba(255, 255, 255, 0.1);
  color: #e8d5ff;
  border: 1px solid rgba(201, 162, 39, 0.35);
}

.btn-modal-secondary:active {
  transform: scale(0.98);
}

.game-stat--current .score-delta {
  right: 12px;
  top: 10px;
}

.score-delta {
  position: absolute;
  right: 8px;
  top: 6px;
  z-index: 3;
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: #7dffb3;
  text-shadow:
    0 0 3px rgba(105, 240, 174, 0.14),
    0 0 6px rgba(0, 200, 140, 0.06);
  pointer-events: none;
  opacity: 0;
}

.score-delta.score-delta--clear {
  color: #ffe082;
  text-shadow:
    0 0 3px rgba(255, 213, 79, 0.13),
    0 0 5px rgba(255, 160, 40, 0.05);
}

.score-delta.score-delta--big {
  font-size: 1.18rem;
  color: #fff176;
  text-shadow:
    0 0 3px rgba(255, 235, 59, 0.13),
    0 0 5px rgba(255, 145, 0, 0.06),
    0 2px 0 rgba(180, 80, 0, 0.11);
}

.score-delta.score-delta--fullboard {
  font-size: 1.28rem;
  color: #e8f4ff;
  text-shadow:
    0 0 14px rgba(129, 212, 250, 0.55),
    0 0 26px rgba(79, 195, 247, 0.28),
    0 2px 0 rgba(30, 80, 120, 0.32);
}

.score-delta.is-on {
  animation: score-delta-pop 0.58s cubic-bezier(0.34, 1.2, 0.64, 1) forwards;
}

/* Sadece blok koyma (patlama yok): +puan daha uzun görünür */
.score-delta.score-delta--place-only.is-on {
  animation: score-delta-pop-place 1.18s cubic-bezier(0.34, 1.2, 0.64, 1) forwards;
}

/* Tek satır patlama: varsayılan kısa anim yerine uzatılmış */
.score-delta.score-delta--clear:not(.score-delta--big):not(.score-delta--fullboard).is-on {
  animation: score-delta-pop-clear 1.08s cubic-bezier(0.34, 1.2, 0.64, 1) forwards;
}

.score-delta.score-delta--big.is-on {
  animation: score-delta-pop-big 1.08s cubic-bezier(0.34, 1.35, 0.64, 1) forwards;
}

.score-delta.score-delta--fullboard.is-on {
  animation: score-delta-pop-fullboard 1.18s cubic-bezier(0.32, 1.45, 0.52, 1) forwards;
}

@keyframes score-delta-pop {
  0% {
    opacity: 0;
    transform: translateY(8px) scale(0.82);
  }
  20% {
    opacity: 1;
    transform: translateY(0) scale(1.08);
  }
  55% {
    opacity: 1;
    transform: translateY(-2px) scale(1.02);
  }
  100% {
    opacity: 0;
    transform: translateY(-18px) scale(0.92);
  }
}

/* Patlama yok, sadece +puan: ekranda daha uzun kalsın (son ~%28’de soluklar) */
@keyframes score-delta-pop-place {
  0% {
    opacity: 0;
    transform: translateY(8px) scale(0.82);
  }
  16% {
    opacity: 1;
    transform: translateY(0) scale(1.08);
  }
  45% {
    opacity: 1;
    transform: translateY(-2px) scale(1.02);
  }
  72% {
    opacity: 1;
    transform: translateY(-3px) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-16px) scale(0.94);
  }
}

/* Tek satır patlama +puanı */
@keyframes score-delta-pop-clear {
  0% {
    opacity: 0;
    transform: translateY(8px) scale(0.82);
  }
  16% {
    opacity: 1;
    transform: translateY(0) scale(1.08);
  }
  44% {
    opacity: 1;
    transform: translateY(-2px) scale(1.02);
  }
  70% {
    opacity: 1;
    transform: translateY(-4px) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-17px) scale(0.93);
  }
}

@keyframes score-delta-pop-big {
  0% {
    opacity: 0;
    transform: translateY(10px) scale(0.78);
  }
  20% {
    opacity: 1;
    transform: translateY(-2px) scale(1.18);
  }
  48% {
    opacity: 1;
    transform: translateY(-4px) scale(1.1);
  }
  72% {
    opacity: 1;
    transform: translateY(-6px) scale(1.05);
  }
  100% {
    opacity: 0;
    transform: translateY(-22px) scale(0.9);
  }
}

@keyframes score-delta-pop-fullboard {
  0% {
    opacity: 0;
    transform: translateY(14px) scale(0.72);
    filter: brightness(1);
  }
  18% {
    opacity: 1;
    transform: translateY(-4px) scale(1.28);
    filter: brightness(1.08);
  }
  36% {
    opacity: 1;
    transform: translateY(-6px) scale(1.2);
    filter: brightness(1.04);
  }
  70% {
    opacity: 1;
    transform: translateY(-8px) scale(1.12);
  }
  100% {
    opacity: 0;
    transform: translateY(-28px) scale(0.88);
    filter: brightness(1);
  }
}

.score-delta.score-delta--kombo {
  color: rgba(241, 245, 249, 0.96);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.38);
}

.score-delta.score-delta--big.score-delta--kombo.is-on {
  animation: score-delta-pop-kombo-lite 1.02s ease-out forwards;
}

@keyframes score-delta-pop-kombo-lite {
  0% {
    opacity: 0;
    transform: translateY(6px);
  }
  16% {
    opacity: 1;
    transform: translateY(0);
  }
  72% {
    opacity: 1;
    transform: translateY(-2px);
  }
  100% {
    opacity: 0;
    transform: translateY(-12px);
  }
}

.board-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  /* flex-start: kısa ekranda tepsi altta kırpılmasın; center tahta+tepsi bloğunu üst/alt eşit taşırırdı */
  justify-content: flex-start;
  flex: 1 1 auto;
  min-height: 0;
  margin-bottom: 4px;
}

/* İlk giriş görsel öğretici: tepsi → tahta (hayalet parça + el + nabız) */
.visual-ftue-layer {
  /* İşaretçi + hayalet döngüsü; süre %10 kısaltılabilir (--visual-ftue-cycle) */
  --visual-ftue-cycle: 6.75s;
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  z-index: 18;
  pointer-events: none;
}

.visual-ftue-layer.hidden {
  display: none !important;
}

.visual-ftue-march {
  position: absolute;
  /* JS --ftue-sx/--ftue-sy atanana kadar yüzde kullanma: ilk karede yanlış ölçüm (el sağa sola / aşağı kaçar). */
  left: var(--ftue-sx, 0px);
  top: var(--ftue-sy, 0px);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  transform: translate(-50%, -50%);
  animation: visual-ftue-march var(--visual-ftue-cycle, 6.75s) ease-in-out infinite;
  will-change: transform;
  filter:
    drop-shadow(0 8px 16px rgba(0, 25, 55, 0.28))
    drop-shadow(0 0 18px rgba(56, 189, 248, 0.14));
}

.visual-ftue-ghost-host {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.visual-ftue-ghost-host .tray-piece.visual-ftue-ghost-tray-piece {
  opacity: 0.58;
  filter: saturate(1.08) brightness(1.05);
  pointer-events: none;
}

.visual-ftue-pointer {
  margin-top: 0;
  margin-left: 0;
  /* Parmak ucunu hedefe yaklaştır; konum hesabı JS’te SVG ucuna göre */
  transform: rotate(-12deg) translateY(-10px);
  transform-origin: 50% 90%;
  filter: drop-shadow(0 4px 10px rgba(8, 45, 75, 0.28));
}

.visual-ftue-pointer-svg {
  display: block;
  overflow: visible;
  animation: visual-ftue-pointer-nudge var(--visual-ftue-cycle, 6.75s) ease-in-out infinite;
}

/* Hedefe yaklaşınca parmak ucu hafif oynar */
@keyframes visual-ftue-pointer-nudge {
  0%,
  18% {
    transform: translateY(0);
  }
  46%,
  54% {
    transform: translateY(-3px);
  }
  86%,
  100% {
    transform: translateY(0);
  }
}

.visual-ftue-pointer-ripple {
  transform-origin: 16px 11px;
  transform-box: fill-box;
  animation: visual-ftue-pointer-ripple-kf var(--visual-ftue-cycle, 6.75s) ease-in-out infinite;
}

.visual-ftue-pointer-ripple--b {
  animation-delay: calc(var(--visual-ftue-cycle, 6.75s) * 0.09);
}

@keyframes visual-ftue-pointer-ripple-kf {
  0%,
  38% {
    opacity: 0;
    transform: scale(0.55);
  }
  49%,
  53% {
    opacity: 0.85;
    transform: scale(1);
  }
  66%,
  100% {
    opacity: 0;
    transform: scale(0.82);
  }
}

@keyframes visual-ftue-march {
  0%,
  20% {
    transform: translate(-50%, -50%) translate(0, 0);
  }
  44%,
  56% {
    transform: translate(-50%, -50%) translate(var(--ftue-dx, 0px), var(--ftue-dy, -140px));
  }
  82%,
  100% {
    transform: translate(-50%, -50%) translate(0, 0);
  }
}

.board-wrap--visual-ftue .cell.cell--ftue-hint {
  box-shadow:
    inset 0 0 0 1.5px rgba(125, 211, 252, 0.85),
    0 0 10px rgba(56, 189, 248, 0.28);
  border-radius: 5px;
}

.tray-slot--ftue-pick {
  position: relative;
  border-radius: 14px;
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.65),
    0 0 14px rgba(56, 189, 248, 0.38);
}

/* Gerçek tepsi parçası: üstte hayalet sürüklemesi okunaklı olsun */
.board-wrap--visual-ftue .tray-slot--ftue-pick .tray-piece {
  opacity: 0.4;
}

.board-wrap--visual-ftue .tray-bar-item--rotate-col .board-side-rotate,
.board-wrap--visual-ftue .tray-bar-item--rotate-col .tray-kalan-badge {
  visibility: hidden !important;
  pointer-events: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .visual-ftue-march {
    animation: none;
  }

  .visual-ftue-pointer-svg,
  .visual-ftue-pointer-ripple {
    animation: none;
  }

  .visual-ftue-pointer-ripple {
    opacity: 0.32;
    transform: scale(0.92);
  }

  .visual-ftue-ghost-host .tray-piece.visual-ftue-ghost-tray-piece {
    opacity: 0.42;
  }
}

/* Rekor kırılınca tahta üstü tebrik (pointer-events yok — oyun sürer) */
.record-celebration {
  position: absolute;
  inset: 0;
  z-index: 27;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.16s ease, visibility 0s linear 0.16s;
}

.record-celebration.record-celebration--show {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.16s ease, visibility 0s;
}

.record-celebration.record-celebration--show.record-celebration--exit {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.8, 0.45), visibility 0s linear 0.3s;
}

/* Rekor overlay: ayrı kompozit katman — ana tahta boyamasıyla çakışmayı azaltır */
.record-celebration.record-celebration--show {
  contain: layout style paint;
}

.record-celebration.record-celebration--show .record-celebration__card {
  will-change: transform, opacity;
}

.record-celebration__backdrop {
  position: absolute;
  inset: 0;
  border-radius: 18px;
  background: radial-gradient(ellipse 85% 70% at 50% 45%, rgba(40, 15, 60, 0.55) 0%, rgba(8, 4, 18, 0.35) 55%, transparent 72%);
  animation: record-cel-backdrop-in 0.34s ease-out both;
}

.record-celebration__card {
  position: relative;
  z-index: 1;
  min-width: min(92%, 260px);
  padding: 18px 22px 20px;
  text-align: center;
  border-radius: 20px;
  border: 2px solid rgba(255, 213, 79, 0.55);
  background: linear-gradient(165deg, rgba(55, 25, 75, 0.92) 0%, rgba(18, 8, 32, 0.96) 100%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.1) inset,
    0 0 28px rgba(255, 193, 7, 0.42),
    0 14px 36px rgba(0, 0, 0, 0.45);
  transform: scale(0.82) translateY(12px);
  animation: record-cel-card-in 0.46s cubic-bezier(0.34, 1.45, 0.55, 1) both;
}

.record-celebration--show .record-celebration__card {
  animation: record-cel-card-in 0.44s cubic-bezier(0.34, 1.45, 0.55, 1) both;
}

.record-celebration--show.record-celebration--exit .record-celebration__card {
  animation: record-cel-card-out 0.3s cubic-bezier(0.55, 0, 0.95, 0.45) forwards !important;
}

.record-celebration__kicker {
  margin: 0 0 4px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(255, 248, 220, 0.95);
  text-shadow: 0 0 18px rgba(255, 213, 79, 0.5);
  animation: record-cel-kicker-in 0.44s cubic-bezier(0.34, 1.35, 0.64, 1) 0.06s both;
}

.record-celebration__title {
  margin: 0 0 8px;
  font-size: clamp(1.35rem, 5vw, 1.75rem);
  font-weight: 900;
  font-style: italic;
  letter-spacing: 0.06em;
  background: linear-gradient(105deg, #fffde7 0%, #ffe082 35%, #ffc107 70%, #ff8f00 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.45));
  animation: record-cel-title-in 0.48s cubic-bezier(0.34, 1.45, 0.64, 1) 0.1s both;
}

.record-celebration__score {
  margin: 0;
  font-size: clamp(1rem, 3.8vw, 1.2rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #ffeaa7;
  text-shadow: 0 0 20px rgba(255, 193, 7, 0.55);
  animation:
    record-cel-score-in 0.4s cubic-bezier(0.34, 1.35, 0.64, 1) 0.18s both,
    record-cel-score-pop 0.44s cubic-bezier(0.34, 1.5, 0.64, 1) 0.68s 1 forwards;
}

.record-celebration__spark {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  pointer-events: none;
  filter: drop-shadow(0 0 6px rgba(255, 235, 59, 0.45));
  animation: none;
  opacity: 0.82;
}

.record-celebration__spark .kk-ico {
  display: block;
}

.record-celebration__spark--a {
  top: 10px;
  left: 14px;
  animation-delay: 0s;
}

.record-celebration__spark--b {
  top: 16px;
  right: 18px;
  animation-delay: 0.25s;
}

.record-celebration__spark--c {
  bottom: 14px;
  left: 50%;
  margin-left: -6px;
  animation-delay: 0.5s;
}

@keyframes record-cel-backdrop-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes record-cel-card-in {
  from {
    opacity: 0;
    transform: scale(0.72) translateY(24px) rotate(-3deg);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0) rotate(0deg);
  }
}

@keyframes record-cel-card-out {
  from {
    opacity: 1;
    transform: scale(1) translateY(0) rotate(0deg);
  }
  to {
    opacity: 0;
    transform: scale(0.88) translateY(-18px) rotate(2deg);
  }
}

@keyframes record-cel-kicker-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes record-cel-title-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.92);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes record-cel-score-in {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes record-cel-score-pop {
  0%,
  100% {
    transform: scale(1);
  }
  45% {
    transform: scale(1.1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .record-celebration.record-celebration--show.record-celebration--exit {
    transition: opacity 0.14s ease-out, visibility 0s linear 0.14s;
  }

  .record-celebration__backdrop,
  .record-celebration__card,
  .record-celebration__kicker,
  .record-celebration__title,
  .record-celebration__score {
    animation: none !important;
  }

  .record-celebration--show .record-celebration__card {
    animation: none !important;
  }

  .record-celebration--show.record-celebration--exit .record-celebration__card {
    animation: none !important;
    opacity: 0;
    transform: scale(0.96);
  }

  .record-celebration__spark {
    animation: none !important;
    opacity: 0.75;
  }

  .record-celebration__title {
    color: #ffe082;
    background: none;
    -webkit-background-clip: unset;
    background-clip: unset;
    filter: none;
  }
}

/* Kombo: tüm tahtaya filter/drop-shadow animasyonu WebView'da ağır — sadece ::before üzerinde opacity */
.board-wrap.board-wrap--combo-pulse::before {
  content: "";
  position: absolute;
  inset: -8px;
  z-index: 0;
  pointer-events: none;
  border-radius: 24px;
  background: radial-gradient(
    ellipse 88% 80% at 50% 42%,
    rgba(255, 200, 130, 0.07) 0%,
    rgba(255, 130, 200, 0.026) 45%,
    transparent 70%
  );
  opacity: 0;
  transform: translateZ(0);
  animation: board-wrap-combo-pulse-lite 0.82s ease-out forwards;
}

.board-wrap.board-wrap--fullboard-clear {
  animation: board-wrap-fullboard-clear 0.92s cubic-bezier(0.34, 1.15, 0.45, 1);
  transform-origin: 50% 48%;
}

@keyframes board-wrap-fullboard-clear {
  0% {
    filter: drop-shadow(0 0 0 transparent);
    transform: scale(1);
  }
  22% {
    filter:
      drop-shadow(0 0 14px rgba(180, 235, 255, 0.72)) drop-shadow(0 0 32px rgba(80, 180, 255, 0.38))
      drop-shadow(0 0 48px rgba(200, 255, 240, 0.22));
    transform: scale(1.014);
  }
  55% {
    filter:
      drop-shadow(0 0 9px rgba(200, 245, 255, 0.55)) drop-shadow(0 0 24px rgba(100, 200, 255, 0.28));
    transform: scale(1.004);
  }
  100% {
    filter: drop-shadow(0 0 0 transparent);
    transform: scale(1);
  }
}

/* Yeni oyun / tekrar oyna — tahta + tepsi girişi */
.board-wrap.board-wrap--newgame-flourish {
  animation: board-wrap-newgame-flourish 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
  transform-origin: 50% 44%;
}

.tray.tray--newgame-flourish {
  animation: tray-newgame-flourish 0.42s cubic-bezier(0.22, 1, 0.36, 1) 0.05s both;
}

@keyframes board-wrap-newgame-flourish {
  0% {
    opacity: 0.78;
    transform: scale(0.93);
  }
  55% {
    opacity: 1;
    transform: scale(1.012);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes tray-newgame-flourish {
  0% {
    opacity: 0.42;
    transform: translateY(16px);
  }
  68% {
    opacity: 1;
    transform: translateY(-3px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .board-wrap.board-wrap--newgame-flourish,
  .tray.tray--newgame-flourish {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

@keyframes board-wrap-combo-pulse-lite {
  0% {
    opacity: 0;
  }
  38% {
    opacity: 0.22;
  }
  100% {
    opacity: 0;
  }
}

.board-toast {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 200000;
  max-width: 90%;
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 800;
  color: #fff;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%);
  isolation: isolate;
  will-change: transform, opacity;
  background: linear-gradient(180deg, rgba(255, 171, 64, 0.95), rgba(230, 120, 20, 0.98));
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.board-toast.board-toast--bonus {
  padding: 0;
  font-size: clamp(2.08rem, 7.8vw, 2.95rem);
  font-weight: 900;
  font-style: italic;
  letter-spacing: 0.03em;
  line-height: 1.02;
  border: none;
  background: transparent;
  box-shadow: none;
  color: #67e8f9;
  text-shadow:
    0 2px 0 rgba(14, 116, 144, 0.95),
    0 0 10px rgba(34, 211, 238, 0.72),
    0 0 20px rgba(56, 189, 248, 0.48);
}

.board-toast.board-toast--bonus.board-toast--bonus-good {
  color: #67e8f9;
  text-shadow:
    0 2px 0 rgba(14, 116, 144, 0.95),
    0 0 10px rgba(34, 211, 238, 0.72),
    0 0 20px rgba(56, 189, 248, 0.48);
}

.board-toast.board-toast--bonus.board-toast--bonus-perfect {
  color: #fb923c;
  text-shadow:
    0 2px 0 rgba(154, 52, 18, 0.95),
    0 0 10px rgba(251, 146, 60, 0.78),
    0 0 22px rgba(249, 115, 22, 0.58);
}

.board-toast.board-toast--bonus.board-toast--bonus-fullclear {
  font-size: clamp(1.58rem, 5.95vw, 2.28rem);
  transform: translate(-50%, -68%);
}

.board-toast.is-on {
  animation: board-toast-in 0.82s cubic-bezier(0.34, 1.35, 0.64, 1) forwards;
}

.board-toast.board-toast--bonus.is-on {
  animation: board-toast-bonus-in 1.05s cubic-bezier(0.34, 1.45, 0.64, 1) forwards;
}

/* Full combo toast — saydam zemin; HUD ile aynı «Full combo» stili, biraz daha büyük */
.board-toast.board-toast--combo {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 2147483647;
  padding: 0;
  border-radius: 0;
  font-size: clamp(2.24rem, 8.9vw, 3.42rem);
  font-weight: 900;
  font-style: italic;
  letter-spacing: 0.02em;
  line-height: 1;
  white-space: nowrap;
  color: #ffffff;
  overflow: visible;
  border: none;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  text-shadow:
    0 2px 0 rgba(40, 18, 76, 0.92),
    0 0 10px rgba(255, 255, 255, 0.72),
    0 0 22px rgba(168, 85, 247, 0.62);
  transform: translate(-50%, -50%);
}

.board-toast.board-toast--combo .board-toast__kombo-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 0.08em 0.32em;
  margin: 0 auto;
  text-shadow: none;
}

.board-toast.board-toast--combo .board-toast__kombo-label {
  font-family: system-ui, "Segoe UI", Roboto, "Nunito", sans-serif;
  font-size: clamp(1.74rem, 6.55vw, 2.44rem);
  font-weight: 900;
  font-style: italic;
  letter-spacing: 0.03em;
  line-height: 1.05;
  text-transform: none;
  background: none;
  color: #f5f3ff;
  -webkit-text-stroke: 0;
  paint-order: stroke fill;
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.24)) drop-shadow(0 0 8px rgba(196, 181, 253, 0.55));
}

.board-toast.board-toast--combo .board-toast__kombo-num {
  font-family: system-ui, "Segoe UI", Roboto, sans-serif;
  font-size: clamp(2.56rem, 9.7vw, 3.82rem);
  font-weight: 900;
  font-style: italic;
  line-height: 1;
  letter-spacing: -0.03em;
  background: none;
  color: #ffffff;
  -webkit-text-stroke: 0;
  paint-order: stroke fill;
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.24)) drop-shadow(0 0 10px rgba(255, 255, 255, 0.58));
  margin: 0 0 0 0.06em;
}

.board-toast.board-toast--combo.board-toast--at-blast {
  position: fixed;
  left: var(--board-toast-x, 50%);
  top: var(--board-toast-y, 50%);
  transform: translate(-50%, -560%);
}

.board-toast.board-toast--combo.board-toast--at-blast.is-on {
  animation: board-toast-combo-fade-at-blast 1.48s ease-out forwards;
}

@keyframes board-toast-combo-fade-at-blast {
  0% {
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  78% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

.board-toast.board-toast--combo .board-toast__kombo-sub {
  margin-top: 8px;
  font-size: clamp(0.82rem, 2.8vw, 0.95rem);
  font-weight: 800;
  letter-spacing: 0.08em;
  color: rgba(255, 251, 235, 0.97);
  text-shadow:
    0 1px 3px rgba(0, 0, 0, 0.55),
    0 0 10px rgba(251, 191, 36, 0.12);
  text-align: center;
}

.board-toast.board-toast--combo.is-on {
  animation: board-toast-combo-fade 1.48s ease-out forwards;
}

/* Zincir / uyarı toastları: bonus-combo çizgisinde saydam metin stili */
.board-toast.board-toast--streak {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 920;
  min-width: 0;
  padding: 0;
  border-radius: 0;
  font-size: clamp(1.62rem, 6.1vw, 2.22rem);
  font-weight: 900;
  font-style: italic;
  letter-spacing: 0.03em;
  line-height: 1.04;
  white-space: normal;
  color: #60a5fa;
  overflow: visible;
  border: none;
  background: transparent;
  box-shadow: none;
  text-shadow:
    0 2px 0 rgba(30, 64, 175, 0.95),
    0 0 10px rgba(96, 165, 250, 0.74),
    0 0 20px rgba(59, 130, 246, 0.48);
  font-variant-numeric: tabular-nums;
  transform: translate(-50%, -50%);
}

.board-toast.board-toast--streak::after {
  display: none;
}

.board-toast.board-toast--streak.is-on::after {
  animation: board-toast-streak-ring 1.48s ease-out forwards;
}

.board-toast.board-toast--streak.is-on {
  animation: board-toast-streak-in 1.68s cubic-bezier(0.34, 1.45, 0.55, 1) forwards;
}

.board-toast.board-toast--record {
  padding: 0;
  font-size: clamp(1.68rem, 6.3vw, 2.34rem);
  font-weight: 900;
  font-style: italic;
  letter-spacing: 0.03em;
  line-height: 1.02;
  border: none;
  background: transparent;
  box-shadow: none;
  color: #fb923c;
  text-shadow:
    0 2px 0 rgba(154, 52, 18, 0.95),
    0 0 10px rgba(251, 146, 60, 0.78),
    0 0 22px rgba(249, 115, 22, 0.58);
}

.board-toast.board-toast--record.is-on {
  animation: board-toast-record-in 1.05s cubic-bezier(0.34, 1.45, 0.64, 1) forwards;
}

@keyframes board-toast-in {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.85);
  }
  15% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.06);
  }
  78% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -58%) scale(0.96);
  }
}

@keyframes board-toast-bonus-in {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.75);
  }
  12% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.12);
  }
  25% {
    transform: translate(-50%, -52%) scale(1.06);
  }
  72% {
    opacity: 1;
    transform: translate(-50%, -54%) scale(1.02);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -62%) scale(0.94);
  }
}

@keyframes board-toast-combo-fade {
  0% {
    opacity: 0;
    transform: translateX(-50%);
  }
  10% {
    opacity: 1;
    transform: translateX(-50%);
  }
  78% {
    opacity: 1;
    transform: translateX(-50%);
  }
  100% {
    opacity: 0;
    transform: translateX(-50%);
  }
}

@keyframes board-toast-streak-in {
  0% {
    opacity: 0;
    background-position: 0% 40%;
    transform: translateX(-50%) scale(0.78);
  }
  14% {
    opacity: 1;
    transform: translateX(-50%) scale(1.1);
  }
  28% {
    background-position: 45% 55%;
    transform: translateX(-50%) scale(1.05);
  }
  48% {
    opacity: 1;
    background-position: 85% 60%;
    transform: translateX(-50%) scale(1.03);
  }
  72% {
    opacity: 1;
    background-position: 100% 50%;
    transform: translateX(-50%) scale(1.01);
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) scale(0.93);
  }
}

@keyframes board-toast-streak-ring {
  0% {
    opacity: 0;
    transform: scale(0.94);
  }
  18% {
    opacity: 0.75;
    transform: scale(1);
  }
  52% {
    opacity: 0.3;
    transform: scale(1.06);
  }
  100% {
    opacity: 0;
    transform: scale(1.18);
  }
}

@keyframes board-toast-streak-in-reduced {
  0% {
    opacity: 0;
    transform: translateX(-50%) scale(0.96);
  }
  18% {
    opacity: 1;
    transform: translateX(-50%) scale(1.04);
  }
  70% {
    opacity: 1;
    transform: translateX(-50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) scale(0.98);
  }
}

@keyframes board-toast-record-in {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.65) rotate(-2deg);
  }
  10% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.14) rotate(0deg);
  }
  22% {
    transform: translate(-50%, -52%) scale(1.08);
  }
  38% {
    transform: translate(-50%, -50%) scale(1.05);
  }
  55% {
    opacity: 1;
    transform: translate(-50%, -51%) scale(1.02);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -58%) scale(0.96);
  }
}

@media (prefers-reduced-motion: reduce) {
  .board-toast.board-toast--combo .board-toast__kombo-label,
  .board-toast.board-toast--combo .board-toast__kombo-num,
  .game-clear-streak__label,
  .game-clear-streak__num {
    filter: none;
    -webkit-text-stroke-width: 1.5px;
  }

  .board-toast.board-toast--combo.is-on {
    animation: board-toast-combo-fade 1.12s ease-out forwards;
  }

  .board-toast.board-toast--streak.is-on {
    animation: board-toast-streak-in-reduced 1.05s ease-out forwards;
  }

  .board-toast.board-toast--streak.is-on::after {
    animation: none;
  }

  .board-wrap.board-wrap--combo-pulse::before {
    animation: none !important;
    opacity: 0;
  }

  .board-wrap.board-wrap--fullboard-clear {
    animation: none;
  }

  .score-delta.score-delta--fullboard.is-on {
    animation: score-delta-pop-fullboard 0.95s cubic-bezier(0.32, 1.45, 0.52, 1) forwards;
  }

  .score-delta.score-delta--big.score-delta--kombo.is-on {
    animation: score-delta-pop-kombo-lite 0.88s ease-out forwards;
  }
}

.game-stat--record-burst {
  animation: game-stat-record-pop 1.12s cubic-bezier(0.34, 1.45, 0.64, 1) both;
  z-index: 2;
}

.game-stat--record-burst .game-stat-crown {
  animation: game-stat-crown-pop 1s cubic-bezier(0.34, 1.6, 0.64, 1) both;
}

.game-stat--record-burst .game-stat-value {
  animation: game-stat-value-shine 1.45s ease-out both;
}

.game-stat--rekor-celebrate.game-stat--record-burst {
  animation: game-stat-record-pop-rekor 1.35s cubic-bezier(0.34, 1.45, 0.64, 1) both;
}

.game-stat--rekor-celebrate.game-stat--record-burst .game-stat-crown {
  animation: game-stat-crown-pop 1.15s cubic-bezier(0.34, 1.6, 0.64, 1) both;
}

.game-stat--rekor-celebrate.game-stat--record-burst .game-stat-value {
  animation: game-stat-value-shine-rekor 1.35s ease-out both;
}

@keyframes game-stat-record-pop-rekor {
  0% {
    transform: scale(0.96);
  }
  12% {
    transform: scale(1.1);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.22),
      0 0 0 2px rgba(255, 213, 79, 0.65),
      0 0 24px rgba(255, 193, 7, 0.5),
      0 8px 24px rgba(0, 0, 0, 0.28);
  }
  28% {
    transform: scale(1.05);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.16),
      0 0 0 1px rgba(255, 193, 7, 0.5),
      0 0 18px rgba(255, 193, 7, 0.42),
      0 8px 22px rgba(0, 0, 0, 0.26);
  }
  100% {
    transform: scale(1);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.14),
      0 0 0 1px rgba(255, 193, 7, 0.4),
      0 0 28px rgba(255, 193, 7, 0.42),
      0 10px 28px rgba(0, 0, 0, 0.32);
  }
}

@keyframes game-stat-value-shine-rekor {
  0% {
    color: #ffe082;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.2), 0 0 10px rgba(255, 193, 7, 0.35);
  }
  45% {
    color: #fffef5;
    text-shadow: 0 0 16px rgba(255, 235, 59, 0.75), 0 0 28px rgba(255, 152, 0, 0.55);
  }
  100% {
    color: #ffeaa7;
    text-shadow:
      0 1px 0 rgba(255, 255, 255, 0.12),
      0 0 14px rgba(255, 193, 7, 0.35);
  }
}

@keyframes game-stat-record-pop {
  0% {
    transform: scale(0.96);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.08),
      inset 0 -1px 0 rgba(0, 0, 0, 0.15),
      0 5px 18px rgba(0, 0, 0, 0.26);
  }
  20% {
    transform: scale(1.08);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.2),
      inset 0 -1px 0 rgba(0, 0, 0, 0.12),
      0 0 0 2px rgba(255, 213, 79, 0.65),
      0 0 22px rgba(255, 193, 7, 0.48),
      0 8px 22px rgba(0, 0, 0, 0.26);
  }
  45% {
    transform: scale(1.03);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.12),
      inset 0 -1px 0 rgba(0, 0, 0, 0.14),
      0 0 0 2px rgba(255, 193, 7, 0.45),
      0 0 20px rgba(255, 152, 0, 0.32),
      0 6px 20px rgba(0, 0, 0, 0.26);
  }
  100% {
    transform: scale(0.96);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.08),
      inset 0 -1px 0 rgba(0, 0, 0, 0.15),
      0 5px 18px rgba(0, 0, 0, 0.26);
  }
}

@keyframes game-stat-crown-pop {
  0% {
    transform: scale(1) rotate(0deg);
  }
  30% {
    transform: scale(1.45) rotate(-14deg);
  }
  55% {
    transform: scale(1.2) rotate(8deg);
  }
  100% {
    transform: scale(1) rotate(0deg);
  }
}

@keyframes game-stat-value-shine {
  0% {
    color: #ffeaa7;
    text-shadow: 0 0 14px rgba(255, 193, 7, 0.28);
  }
  35% {
    color: #fffde7;
    text-shadow:
      0 0 20px rgba(255, 235, 59, 0.9),
      0 0 40px rgba(255, 152, 0, 0.55);
  }
  100% {
    color: #ffeaa7;
    text-shadow: 0 0 14px rgba(255, 193, 7, 0.28);
  }
}

/* Tahta çerçevesi içinde: 8×8 ızgarayla aynı dikdörtgen (fx-canvas ile aynı inset) */
.defeat-layer {
  position: absolute;
  inset: 2px;
  z-index: 18;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 10px;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease;
  border-radius: 11px;
  background: radial-gradient(ellipse 78% 70% at 50% 50%, rgba(120, 25, 55, 0.38) 0%, transparent 62%);
}

.defeat-layer--show {
  opacity: 1;
}

.defeat-head {
  margin: 0;
  font-size: clamp(1.22rem, 4.9vw, 1.56rem);
  font-weight: 900;
  color: #ffcdd2;
  text-shadow: 0 0 22px rgba(255, 82, 82, 0.9), 0 2px 0 rgba(0, 0, 0, 0.55);
  transform: scale(0.88);
  opacity: 0;
}

.defeat-layer--show .defeat-head {
  animation: defeat-title-in 0.7s cubic-bezier(0.34, 1.35, 0.64, 1) 0.12s forwards;
}

.defeat-sub {
  margin: 0;
  font-size: 0.8rem;
  color: rgba(255, 236, 244, 0.78);
  opacity: 0;
}

.defeat-layer--show .defeat-sub {
  animation: defeat-sub-in 0.55s ease 0.42s forwards;
}

@keyframes defeat-title-in {
  to {
    transform: scale(1);
    opacity: 1;
  }
}
@keyframes defeat-sub-in {
  to {
    opacity: 1;
  }
}

.board-wrap--defeat .board-frame {
  animation: defeat-shake 0.62s cubic-bezier(0.36, 0.07, 0.19, 0.97) 0s 2;
}

.board-wrap--defeat .board .cell.filled {
  animation: defeat-gem-fade 2.15s ease 0.08s forwards;
}

@keyframes defeat-shake {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  20% {
    transform: translate3d(-7px, 0, 0);
  }
  40% {
    transform: translate3d(7px, 0, 0);
  }
  60% {
    transform: translate3d(-4px, 0, 0);
  }
  80% {
    transform: translate3d(4px, 0, 0);
  }
}

@keyframes defeat-gem-fade {
  to {
    filter: grayscale(0.88) brightness(0.52);
  }
}

/* El bitimi: tepsiye transform/opacity verme — yuva «camı» kayboluyordu; sadece parçaya hafif solukluk */
.tray--defeat {
  pointer-events: none;
}

.tray--defeat .tray-piece {
  animation: defeat-tray-piece-dim 1.85s ease forwards;
}

@keyframes defeat-tray-piece-dim {
  to {
    opacity: 0.9;
  }
}

/* Yenilmiş tepsi: dolu yuvaların camı kaybolmasın (boş yuva --gameover-empty kendi stilinde) */
.tray--defeat .tray-slot:not(.tray-slot--gameover-empty) {
  background: rgba(255, 255, 255, 0.07);
  box-shadow:
    inset 0 -1px 0 rgba(0, 0, 0, 0.22),
    0 4px 18px rgba(0, 0, 0, 0.28);
}

/* Önizleme geçerliyken tahta çerçevesi: tek renkli dış gölge (yeşil halo çok katmanlı boyamayı artırıyordu) */
.board-wrap:has(.board.preview-valid) .board-frame {
  box-shadow: 0 0 0 2px #2a1f10, 0 8px 22px rgba(0, 0, 0, 0.38);
}

.board-wrap:has(.board.preview-invalid) .board-frame {
  box-shadow: 0 0 0 2px #2a1f10, 0 0 16px rgba(255, 82, 82, 0.2), 0 10px 28px rgba(0, 0, 0, 0.4);
}

.fx-canvas {
  position: absolute;
  inset: 2px;
  width: calc(100% - 4px);
  height: calc(100% - 4px);
  pointer-events: none;
  z-index: 5;
  border-radius: 11px;
  contain: paint;
  isolation: isolate;
}

/* Oyun ekranı: tahta padding’i üstte ince yatay şerit gibi görünüyordu; hücreler çerçeve içine tam oturur */
#game-screen .board-frame .fx-canvas {
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 11px;
  /* Parçacıklar tahtanın üstünde kalsın; contain:paint tahta köşelerinde kırpma yapabiliyordu */
  z-index: 5;
  contain: none;
  background: transparent;
}

/* İç tahta köşeleri çerçeve iç yay ile hizalı olmalı; kare köşe altın köşeyi örter */
#game-screen .board {
  /* Köşe hücreleri çerçeve yayında kesilmesin diye mikroskobik iç pay bırak. */
  padding: 1px;
  overflow: hidden;
  transform: translateZ(0);
  border-radius: 11px;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  grid-template-rows: repeat(8, minmax(0, 1fr));
}

#game-screen .board-frame {
  overflow: visible;
  box-sizing: border-box;
}

#game-screen .board-frame .defeat-layer {
  inset: 0;
  border-radius: 11px;
}

/* Tahta tam sütun; «Kalan» + döndür üst şerit, altında üç tepsi yuvası */
.board-frame-with-rotate {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  flex: 1 1 auto;
  min-height: 0;
  box-sizing: border-box;
}

/* Oyun: 8×8 + tepsi/döndür bloğunu HUD’dan hafif ayır */
#game-screen .board-frame-with-rotate {
  margin-top: 10px;
}

/* Tahta + (tepsi | döndür) aynı sütunda — flex-start: döndür modunda tepsi uzayınca tahta yukarı zıplamasın */
.board-column {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 0;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  width: 100%;
  max-width: min(464px, 100%);
}

.board-column > .board-frame {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Oyun: 8×8 tahta — HUD altında çok kısa boşluk */
#game-screen .board-column > .board-frame {
  margin-top: 0;
  align-self: center;
  /*
   * Kısa ekranda sütun yüksekliği daralınca tahta tam genişlikte kalırsa tepsi + döndür
   * overflow:hidden ile kırpılabiliyordu; tahta kenarını viewport’a göre küçült.
   */
  width: min(100%, calc(100dvh - 228px));
  max-width: min(464px, 100%);
}

/* Tepsi şeridi: solda Kalan (üstte) + döndür, sağda üç yuva */
.tray-with-rotate {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 0;
  width: 100%;
  flex-shrink: 0;
  box-sizing: border-box;
  /* Tahta alt gölgesiyle hizalı: şeridi hafif yukarı çek (üstte boş şerit azalır) */
  margin-top: -6px;
}

.tray-stack {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  gap: 4px;
  box-sizing: border-box;
  flex-shrink: 0;
}

.tray-stack.tray-stack--bar {
  flex-direction: row;
  align-items: flex-end;
  justify-content: flex-start;
  flex-wrap: nowrap;
  gap: clamp(6px, 2vw, 12px);
}

.tray-with-rotate:has(#board-side-rotate[hidden]) .tray-bar-item--rotate-col {
  display: none;
}

.tray-bar-item {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.tray-bar-item--rotate-col {
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
}

.tray-kalan-badge {
  pointer-events: none;
}

.board-column .tray {
  min-width: 0;
  width: auto;
  max-width: none;
  box-sizing: border-box;
}

.board-column .tray-stack--bar > .tray {
  flex: 1 1 0;
  min-width: 0;
  margin-top: 0;
}

.board-side-rotate {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 54px;
  padding: 8px 5px 10px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.06) 0%, transparent 38%),
    linear-gradient(180deg, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.98) 100%);
  color: #e2e8f0;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 -1px 0 rgba(0, 0, 0, 0.25) inset,
    0 8px 22px rgba(0, 0, 0, 0.38);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  -webkit-touch-callout: none;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.14s ease,
    filter 0.18s ease;
}

.board-side-rotate[hidden] {
  display: none !important;
}

.board-side-rotate:hover:not(:disabled) {
  border-color: rgba(148, 163, 184, 0.42);
  filter: brightness(1.05);
}

.board-side-rotate:active:not(:disabled) {
  transform: scale(0.96);
}

.board-side-rotate:focus-visible {
  outline: 2px solid rgba(56, 189, 248, 0.85);
  outline-offset: 3px;
}

.board-side-rotate:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  filter: grayscale(0.15);
}

/* Döndürme düğmesi üstte; «Kalan» rozeti altta (tahta / tepsi hizası) */
.board-side-rotate--compact {
  width: 54px;
  padding: 6px 5px 8px;
  gap: 3px;
}

/* Aktif döndür: tahta temasına uygun sıcak vurgu (mavi yok, titreme yok) */
.board-side-rotate.board-side-rotate--armed {
  border-color: rgba(251, 191, 36, 0.5);
  color: #fffbeb;
  animation: none;
  box-shadow:
    0 0 0 1px rgba(217, 119, 6, 0.38),
    0 0 18px rgba(245, 158, 11, 0.2),
    0 1px 0 rgba(255, 255, 255, 0.08) inset,
    0 8px 22px rgba(0, 0, 0, 0.36);
}

/* Kalan + sayı: tepsi yanında akışta, birleşik rozet */
.board-side-rotate-badge {
  position: relative;
  top: auto;
  left: auto;
  z-index: 2;
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0.15em;
  align-self: stretch;
  max-width: 100%;
  padding: 3px 5px 4px;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  line-height: 1;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.board-side-rotate.board-side-rotate--armed .board-side-rotate-badge {
  background: rgba(55, 38, 12, 0.92);
  border-color: rgba(251, 191, 36, 0.42);
}

.tray-with-rotate:has(.board-side-rotate--armed) .tray-kalan-badge {
  background: rgba(55, 38, 12, 0.92);
  border-color: rgba(251, 191, 36, 0.42);
}

.board-side-rotate-divider {
  width: 72%;
  height: 1px;
  border-radius: 1px;
  background: linear-gradient(90deg, transparent, rgba(148, 163, 184, 0.35), transparent);
  opacity: 0.95;
}

.board-side-rotate-icon-ring {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.09) 0%, rgba(15, 23, 42, 0.75) 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.1) inset,
    0 3px 10px rgba(0, 0, 0, 0.32);
  color: #cbd5e1;
}

.board-side-rotate.board-side-rotate--armed .board-side-rotate-icon-ring {
  background: linear-gradient(160deg, rgba(255, 251, 235, 0.16) 0%, rgba(120, 70, 15, 0.52) 100%);
  color: #fde68a;
  box-shadow:
    0 0 12px rgba(245, 158, 11, 0.22),
    0 1px 0 rgba(255, 255, 255, 0.1) inset;
}

.board-side-rotate-svg {
  flex-shrink: 0;
  display: block;
}

.board-side-rotate-caption {
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.88);
  margin-top: -1px;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.board-side-rotate.board-side-rotate--armed .board-side-rotate-caption {
  color: rgba(253, 230, 138, 0.92);
}

.board-side-rotate-hak {
  font-size: 0.5rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(203, 213, 225, 0.88);
  margin: 0;
  font-variant-numeric: normal;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.board-side-rotate-n {
  font-size: 0.78rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  color: #f8fafc;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.tray-with-rotate:has(.board-side-rotate--empty) .tray-kalan-badge .board-side-rotate-n {
  color: #fca5a5;
  text-shadow: none;
}

.tray.tray--rotate-pick {
  position: relative;
  border-radius: 20px;
  margin: 0;
  /* Döndür açıkken mavi dış çerçeve yok — ipuçları yine görünür */
  background: transparent;
  box-shadow: none;
  /* flex-start kaldırıldı: parçalar yukarı sıçramasın; yuva alt hizası döndür sütunuyla aynı */
  overflow-y: visible;
  overflow-x: auto;
}

.board-frame {
  position: relative;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 1;
  flex: 0 0 auto;
  border-radius: 14px;
  padding: 2px;
  background: linear-gradient(145deg, #8b6914, #c9a227 40%, #5c4a0f);
  box-shadow: 0 0 0 2px #2a1f10, 0 12px 32px rgba(0, 0, 0, 0.45);
  transform: translateZ(0);
}

/* Çoklu satır/sütun patlaması — yalnız transform, kısa süre */
.board-frame.board-frame--line-shake {
  animation: board-frame-line-shake 0.44s ease-out;
  will-change: transform;
}

.board-frame.board-frame--line-shake.board-frame--line-shake--hard {
  animation: board-frame-line-shake-hard 0.56s ease-out;
}

.board-frame.board-frame--line-shake.board-frame--line-shake--lite {
  animation: board-frame-line-shake-lite 0.34s ease-out;
}

@keyframes board-frame-line-shake {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  25% {
    transform: translate3d(-3px, 2px, 0);
  }
  50% {
    transform: translate3d(3px, -2px, 0);
  }
  75% {
    transform: translate3d(-2px, -1px, 0);
  }
}

@keyframes board-frame-line-shake-hard {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  20% {
    transform: translate3d(-6px, 3px, 0);
  }
  40% {
    transform: translate3d(6px, -3px, 0);
  }
  60% {
    transform: translate3d(-5px, -2px, 0);
  }
  80% {
    transform: translate3d(4px, 2px, 0);
  }
}

@keyframes board-frame-line-shake-lite {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  33% {
    transform: translate3d(-2px, 1px, 0);
  }
  66% {
    transform: translate3d(2px, -1px, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .board-frame.board-frame--line-shake {
    animation: none;
    will-change: auto;
  }
}

.board {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  grid-template-rows: repeat(8, 1fr);
  gap: 2px;
  padding: 2px;
  background: #120a22;
  border-radius: 11px;
}

/*
 * Macera: patlamada .gem-burst hücreyi şeffaflattığında tahta dolgusu (#120a22) çok koyu görünüyor;
 * patlayan sıranın “arkası” siyah şerit gibi. Boş hücre tonuna yakın gradyan — yalnız macera HUD açıkken.
 */
#game-screen:has(.game-hud--adventure) .board {
  background: linear-gradient(155deg, #1e1630 0%, #171028 44%, #120e1f 100%);
}

/* Macera: tahta “kayması” — rubber-band / zincir kaydırmayı kes (sürükleme çocuklarda touch-action ile kalır) */
#game-screen:has(.game-hud--adventure) #game-play-area.game-play-area {
  overscroll-behavior: none;
}

#game-screen:has(.game-hud--adventure) .board-wrap {
  /* overflow:hidden tahta köşelerini kesiyordu; rubber-band için touch-action yeterli */
  overflow: visible;
}

/* backface-visibility + translateZ bazı WebView’larda ilk patlamada tahtayı milim oynatıyordu */
#game-screen:has(.game-hud--adventure) .board-frame {
  transform: translateZ(0);
}

#game-screen:has(.game-hud--adventure) .board {
  transform: translateZ(0);
}

/* Macera oyunu: çok hücreli patlamada transform/filter yerine hafif opacity — WebView’da daha akıcı */
#game-screen:has(.game-hud--adventure) .cell.gem-burst,
#game-screen:has(.game-hud--adventure) .cell.gem-burst.gem-burst--row:not(.gem-burst--col),
#game-screen:has(.game-hud--adventure) .cell.gem-burst.gem-burst--col:not(.gem-burst--row),
#game-screen:has(.game-hud--adventure) .cell.gem-burst.gem-burst--row.gem-burst--col {
  animation: gem-burst-fade-touch 0.1s ease-out forwards !important;
  will-change: opacity;
  transform: none !important;
  filter: none !important;
  box-shadow: none !important;
}

#game-screen:has(.game-hud--adventure) .board.board--line-burst {
  animation: none !important;
  filter: none !important;
}

#game-screen:has(.game-hud--adventure) .board-wrap.board-wrap--combo-pulse::before {
  animation: none !important;
  opacity: 0 !important;
}

/* Macera: kombo / zincir toast, +puan, seri HUD, hedef sayaç — klasik moddaki yeni seviyenin altında tutulur */
#game-screen:has(.game-hud--adventure) .game-stat--current {
  animation: game-stat-current-glow-adv 3.2s ease-in-out infinite;
  border-color: rgba(255, 224, 130, 0.28);
}

#game-screen:has(.game-hud--adventure) .game-stat--current::after {
  box-shadow: 0 0 4px rgba(255, 193, 7, 0.14);
}

#game-screen:has(.game-hud--adventure) .game-stat--current .game-stat-value {
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.16),
    0 0 8px rgba(255, 213, 79, 0.1),
    0 0 14px rgba(255, 152, 0, 0.035),
    0 3px 1px rgba(60, 35, 0, 0.36);
}

#game-screen:has(.game-hud--adventure) .game-stat-corner {
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 248, 200, 0.07) 0%, transparent 52%),
    radial-gradient(circle at 88% 8%, rgba(255, 193, 7, 0.035) 0%, transparent 45%);
}

#game-screen:has(.game-hud--adventure) .board-toast.board-toast--streak {
  border-color: rgba(165, 243, 252, 0.22);
  box-shadow:
    0 0 0 1px rgba(186, 230, 253, 0.1),
    0 0 10px rgba(14, 165, 233, 0.12),
    0 0 14px rgba(99, 102, 241, 0.08),
    0 6px 18px rgba(0, 0, 0, 0.22);
  text-shadow:
    0 2px 5px rgba(0, 0, 0, 0.45),
    0 0 6px rgba(125, 211, 252, 0.1);
}

#game-screen:has(.game-hud--adventure) .board-toast.board-toast--streak::after {
  border-color: rgba(186, 230, 253, 0.14);
}

#game-screen:has(.game-hud--adventure) .score-delta {
  text-shadow:
    0 0 2px rgba(105, 240, 174, 0.09),
    0 0 4px rgba(0, 200, 140, 0.04);
}

#game-screen:has(.game-hud--adventure) .score-delta.score-delta--clear {
  text-shadow:
    0 0 2px rgba(255, 213, 79, 0.08),
    0 0 3px rgba(255, 160, 40, 0.035);
}

#game-screen:has(.game-hud--adventure) .score-delta.score-delta--big {
  text-shadow:
    0 0 2px rgba(255, 235, 59, 0.08),
    0 0 3px rgba(255, 145, 0, 0.04),
    0 2px 0 rgba(180, 80, 0, 0.08);
}

#game-screen:has(.game-hud--adventure) .game-clear-streak__times {
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.45),
    0 0 6px rgba(251, 191, 36, 0.12);
}

#game-screen:has(.game-hud--adventure) .game-adventure-obj-val {
  text-shadow:
    0 1px 0 rgba(0, 0, 0, 0.2),
    0 0 2px rgba(251, 191, 36, 0.065);
}

#game-screen:has(.game-hud--adventure) .game-stat--adventure-target .game-stat-label--adventure {
  color: rgba(253, 224, 71, 0.62);
}

#game-screen:has(.game-hud--adventure) .game-stat-crown--flag {
  filter: drop-shadow(0 0 3px rgba(251, 191, 36, 0.15));
}

#game-screen:has(.game-hud--adventure) .adv-mark-fly--star {
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.34)) drop-shadow(0 0 3px rgba(251, 191, 36, 0.18));
}

#game-screen:has(.game-hud--adventure) .adv-mark-fly--crystal {
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.34)) drop-shadow(0 0 3px rgba(236, 72, 153, 0.15));
}

#game-screen:has(.game-hud--adventure) .board .cell.filled[data-mark="star"]::after,
#game-screen:has(.game-hud--adventure) .board .cell.preview[data-preview-mark="star"]::after {
  width: clamp(12px, 64%, 24px);
  height: clamp(12px, 64%, 24px);
  max-width: 24px;
  max-height: 24px;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.52));
}

#game-screen:has(.game-hud--adventure) .board .cell.filled[data-mark="crystal"]::after,
#game-screen:has(.game-hud--adventure) .board .cell.preview[data-preview-mark="crystal"]::after {
  width: clamp(12px, 64%, 24px);
  height: clamp(12px, 64%, 24px);
  max-width: 24px;
  max-height: 24px;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.52));
}

#game-screen:has(.game-hud--adventure) .cell.filled.cell--place-glow {
  animation: cell-place-glow-adv 0.42s ease-out forwards;
}

:root {
  /* Biraz daha kontrastlı orta ton + belirgin kenar hissi */
  --gem-0: linear-gradient(142deg, #ffd0ea 0%, #ff4db3 36%, #e91e7a 68%, #880e4f 100%);
  --gem-1: linear-gradient(142deg, #c8ffff 0%, #18e0ff 38%, #0097a7 72%, #004d56 100%);
  --gem-2: linear-gradient(142deg, #fff8b0 0%, #ffd54f 38%, #f9a825 70%, #e65100 100%);
  --gem-3: linear-gradient(142deg, #ffc4b5 0%, #ff4560 40%, #d32f2f 72%, #7f1010 100%);
  --gem-4: linear-gradient(142deg, #d8ffe5 0%, #38f090 38%, #00c853 70%, #0d3b16 100%);
  --gem-5: linear-gradient(142deg, #d4c4ff 0%, #7c4dff 40%, #4a148c 72%, #1a0e30 100%);
  /* Tahta / mini: yıldız = sıcak altın + siyah çerçeve; kristal = pembe-fuşya + koyu bordo çerçeve */
  --kk-svg-star-mark: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2032%2032%22%3E%3Cdefs%3E%3ClinearGradient%20id%3D%22g%22%20x1%3D%2216%22%20y1%3D%222%22%20x2%3D%2216%22%20y2%3D%2230%22%20gradientUnits%3D%22userSpaceOnUse%22%3E%3Cstop%20offset%3D%220%25%22%20stop-color%3D%22%23fffef5%22/%3E%3Cstop%20offset%3D%2238%25%22%20stop-color%3D%22%23fde047%22/%3E%3Cstop%20offset%3D%22100%25%22%20stop-color%3D%22%23b45309%22/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath%20fill%3D%22url%28%23g%29%22%20stroke%3D%22%231c1917%22%20stroke-width%3D%221.15%22%20stroke-linejoin%3D%22round%22%20paint-order%3D%22stroke%20fill%22%20d%3D%22M16%202.8l4.35%209.05L30%2013.4l-7.15%206.2%202.2%209.4L16%2024.05%206.95%2028.95l2.2-9.35L2%2013.4l9.65-1.55z%22/%3E%3C/svg%3E");
  --kk-svg-crystal-mark: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2032%2032%22%3E%3Cdefs%3E%3ClinearGradient%20id%3D%22c%22%20x1%3D%2216%22%20y1%3D%222%22%20x2%3D%2216%22%20y2%3D%2230%22%20gradientUnits%3D%22userSpaceOnUse%22%3E%3Cstop%20offset%3D%220%25%22%20stop-color%3D%22%23fff0f7%22/%3E%3Cstop%20offset%3D%2240%25%22%20stop-color%3D%22%23fb7185%22/%3E%3Cstop%20offset%3D%22100%25%22%20stop-color%3D%22%239d174d%22/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath%20fill%3D%22url%28%23c%29%22%20stroke%3D%22%233f0d1f%22%20stroke-width%3D%221.1%22%20stroke-linejoin%3D%22round%22%20paint-order%3D%22stroke%20fill%22%20d%3D%22M16%201.5l3.1%2012.2L31%2016l-11.9%202.3L16%2030.5l-3.1-12.2L1%2016l11.9-2.3z%22/%3E%3Cpath%20fill%3D%22rgba%28255%2C255%2C255%2C0.5%29%22%20d%3D%22M16%206.8l2%205.6%206.2%201.6-5.2%203.6L16%2024l-2.8-6.4-5.2-3.6%206.2-1.6z%22/%3E%3C/svg%3E");
}

/* Oyunda “Soluk renk”: yalnız tahta + tepsi + sürükleme hayaleti (HUD / üst alan renkli kalır) */
#game-play-area.game-play-area--pale {
  /* 0 gül kuvars, 1 su yeşili-beril, 2 bal / şampanya, 3 tozlu garnet, 4 yeşimimsi, 5 ametist-gri */
  --gem-0: linear-gradient(148deg, #f0e6e6 0%, #d4c0c0 38%, #9a7d80 72%, #5c4a4d 100%);
  --gem-1: linear-gradient(152deg, #e8f0f2 0%, #b8ccd4 40%, #6d8490 72%, #3d4f58 100%);
  --gem-2: linear-gradient(145deg, #f2ebe0 0%, #d9c9a8 38%, #a08f6e 70%, #6b5d45 100%);
  --gem-3: linear-gradient(150deg, #e5d8d8 0%, #b89898 40%, #7a5c5e 72%, #4a3839 100%);
  --gem-4: linear-gradient(146deg, #e2ebe4 0%, #a8b8ae 38%, #6a7a6e 72%, #3d463f 100%);
  --gem-5: linear-gradient(149deg, #eae6ef 0%, #c4b8cc 40%, #8a7c90 72%, #52485c 100%);
}

#game-play-area.game-play-area--pale .board {
  background: linear-gradient(168deg, #1a1614 0%, #12100e 48%, #0e0c0b 100%);
  box-shadow: inset 0 0 0 1px rgba(60, 52, 44, 0.35);
}

#game-screen:has(.game-hud--adventure) #game-play-area.game-play-area--pale .board {
  background: linear-gradient(168deg, #242018 0%, #1c1814 48%, #161412 100%);
  box-shadow: inset 0 0 0 1px rgba(60, 52, 44, 0.35);
}

#game-play-area.game-play-area--pale .cell:not(.filled) {
  background: linear-gradient(145deg, #3e3834, #2a2622);
  border-color: rgba(120, 105, 88, 0.38);
}

#game-play-area.game-play-area--pale .cell.filled {
  border-color: rgba(195, 168, 120, 0.78);
  box-shadow:
    inset 3px 3px 7px rgba(255, 252, 245, 0.32),
    inset -3px -4px 9px rgba(0, 0, 0, 0.2),
    0 2px 0 rgba(0, 0, 0, 0.12),
    0 4px 7px rgba(0, 0, 0, 0.26);
}

#game-play-area.game-play-area--pale .tray-piece .mini[data-gem],
#game-play-area.game-play-area--pale .drag-ghost .mini[data-gem] {
  box-shadow:
    inset 3px 3px 6px rgba(255, 252, 245, 0.28),
    inset -2px -3px 7px rgba(0, 0, 0, 0.14),
    0 3px 5px rgba(0, 0, 0, 0.28),
    0 1px 0 rgba(255, 255, 255, 0.08);
}

.cell {
  border-radius: 5px;
  background: linear-gradient(145deg, #3d2f55, #2a1f3d);
  border: 1px solid rgba(201, 162, 39, 0.35);
  min-width: 0;
  min-height: 0;
  transform: translateZ(0);
}

.cell.filled {
  border: 2px solid rgba(255, 214, 120, 0.65);
  box-shadow:
    inset 2px 2px 6px rgba(255, 255, 255, 0.26),
    inset -2px -3px 8px rgba(0, 0, 0, 0.24),
    0 2px 0 rgba(0, 0, 0, 0.14),
    0 2px 5px rgba(0, 0, 0, 0.22);
}

/* filter/z-index kullanma: grid hücrelerinde patlama ile birleşince satır/sütun kaybolabiliyor */
@keyframes cell-place-glow {
  0%,
  100% {
    box-shadow:
      inset 2px 2px 6px rgba(255, 255, 255, 0.26),
      inset -2px -3px 8px rgba(0, 0, 0, 0.24),
      0 2px 0 rgba(0, 0, 0, 0.14),
      0 2px 5px rgba(0, 0, 0, 0.22),
      0 0 0 0 rgba(255, 230, 150, 0);
  }
  50% {
    box-shadow:
      inset 2px 2px 6px rgba(255, 255, 255, 0.26),
      inset -2px -3px 8px rgba(0, 0, 0, 0.22),
      0 2px 0 rgba(0, 0, 0, 0.12),
      0 2px 5px rgba(0, 0, 0, 0.2),
      0 0 0 0 rgba(255, 228, 140, 0.014);
  }
}

/* Macera: yerleşim nabzında ek sarı halka yok — yalnız çok hafif derinlik */
@keyframes cell-place-glow-adv {
  0%,
  100% {
    box-shadow:
      inset 2px 2px 6px rgba(255, 255, 255, 0.26),
      inset -2px -3px 8px rgba(0, 0, 0, 0.24),
      0 2px 0 rgba(0, 0, 0, 0.14),
      0 2px 5px rgba(0, 0, 0, 0.22),
      0 0 0 0 rgba(255, 230, 150, 0);
  }
  50% {
    box-shadow:
      inset 2px 2px 6px rgba(255, 255, 255, 0.24),
      inset -2px -3px 8px rgba(0, 0, 0, 0.23),
      0 2px 0 rgba(0, 0, 0, 0.13),
      0 2px 5px rgba(0, 0, 0, 0.21),
      0 0 0 0 rgba(255, 230, 150, 0);
  }
}

.cell.filled.cell--place-glow {
  /* Yerleşim parlaklığı hafif/sabit: düşük cihazlarda animasyon kaynaklı jankı azaltır. */
  animation: none;
  box-shadow:
    inset 2px 2px 6px rgba(255, 255, 255, 0.24),
    inset -2px -3px 8px rgba(0, 0, 0, 0.22),
    0 2px 0 rgba(0, 0, 0, 0.12),
    0 2px 5px rgba(0, 0, 0, 0.2);
}

@media (prefers-reduced-motion: reduce) {
  .cell.filled.cell--place-glow {
    animation: none;
    box-shadow:
      inset 2px 2px 6px rgba(255, 255, 255, 0.28),
      inset -2px -3px 8px rgba(0, 0, 0, 0.22),
      0 2px 0 rgba(0, 0, 0, 0.12),
      0 2px 5px rgba(0, 0, 0, 0.22),
      0 0 1px 0 rgba(255, 228, 140, 0.028);
  }

  #game-screen:has(.game-hud--adventure) .cell.filled.cell--place-glow {
    animation: none;
    box-shadow:
      inset 2px 2px 6px rgba(255, 255, 255, 0.26),
      inset -2px -3px 8px rgba(0, 0, 0, 0.22),
      0 2px 0 rgba(0, 0, 0, 0.12),
      0 2px 5px rgba(0, 0, 0, 0.22),
      0 0 0 0 rgba(255, 228, 140, 0);
  }
}

.cell[data-gem="0"],
.mini[data-gem="0"] {
  background: var(--gem-0);
}
.cell[data-gem="1"],
.mini[data-gem="1"] {
  background: var(--gem-1);
}
.cell[data-gem="2"],
.mini[data-gem="2"] {
  background: var(--gem-2);
}
.cell[data-gem="3"],
.mini[data-gem="3"] {
  background: var(--gem-3);
}
.cell[data-gem="4"],
.mini[data-gem="4"] {
  background: var(--gem-4);
}
.cell[data-gem="5"],
.mini[data-gem="5"] {
  background: var(--gem-5);
}

.board .cell.filled,
.board .cell.preview,
.tray-piece .mini[data-gem],
.drag-ghost .mini[data-gem] {
  position: relative;
  isolation: isolate;
}

/* Üst-sol parlama: blok hacmi (çok hücre yan yana birleşince göz yormasın) */
.board .cell.filled::before,
.tray-piece .mini[data-gem]::before,
.drag-ghost .mini[data-gem]::before {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: 3px;
  background: linear-gradient(
    148deg,
    rgba(255, 255, 255, 0.16) 0%,
    rgba(255, 255, 255, 0.04) 44%,
    transparent 68%
  );
  pointer-events: none;
  z-index: 1;
}

.board .cell.preview:not(.preview-blast)::before {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: 3px;
  background: linear-gradient(
    148deg,
    rgba(255, 255, 255, 0.17) 0%,
    rgba(255, 255, 255, 0.04) 48%,
    transparent 68%
  );
  pointer-events: none;
  z-index: 1;
}

.board .cell.filled[data-mark="star"]::after,
.tray-piece .mini[data-mark="star"]::after,
.drag-ghost .mini[data-mark="star"]::after,
.board .cell.preview[data-preview-mark="star"]::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -54%);
  width: clamp(13px, 72%, 28px);
  height: clamp(13px, 72%, 28px);
  max-width: 28px;
  max-height: 28px;
  background: var(--kk-svg-star-mark) center / contain no-repeat;
  filter:
    drop-shadow(0 0 1px rgba(0, 0, 0, 0.95))
    drop-shadow(0 1px 2px rgba(0, 0, 0, 0.88))
    drop-shadow(0 0 2px rgba(255, 255, 255, 0.55))
    drop-shadow(0 0 10px rgba(250, 204, 21, 0.95));
  pointer-events: none;
  z-index: 2;
}

.board .cell.filled[data-mark="crystal"]::after,
.tray-piece .mini[data-mark="crystal"]::after,
.drag-ghost .mini[data-mark="crystal"]::after,
.board .cell.preview[data-preview-mark="crystal"]::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -54%);
  width: clamp(13px, 72%, 28px);
  height: clamp(13px, 72%, 28px);
  max-width: 28px;
  max-height: 28px;
  background: var(--kk-svg-crystal-mark) center / contain no-repeat;
  filter:
    drop-shadow(0 0 1px rgba(0, 0, 0, 0.95))
    drop-shadow(0 1px 2px rgba(0, 0, 0, 0.88))
    drop-shadow(0 0 3px rgba(251, 207, 232, 0.75))
    drop-shadow(0 0 11px rgba(236, 72, 153, 0.92));
  pointer-events: none;
  z-index: 2;
}

.tray-piece .mini[data-gem],
.drag-ghost .mini[data-gem] {
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 5px;
  box-shadow:
    inset 1px 1px 3px rgba(255, 255, 255, 0.22),
    inset -1px -1px 4px rgba(0, 0, 0, 0.16),
    0 1px 3px rgba(0, 0, 0, 0.24);
}

.drag-layer {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 30;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.drag-ghost {
  position: fixed;
  left: 0;
  top: 0;
  transform-origin: 0 0;
  will-change: transform;
  transform: translateZ(0);
  /* filter: drop-shadow her karede pahalı — küçük bulanık = daha akıcı sürükleme */
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.26));
  pointer-events: none;
  backface-visibility: hidden;
}

/* Dokunmayla sürüklerken parça parmağın üstünde */
.drag-ghost--lifted {
  filter: drop-shadow(0 4px 9px rgba(0, 0, 0, 0.32));
}

@media (pointer: coarse) {
  .drag-ghost {
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.28));
  }

  .drag-ghost--lifted {
    filter: drop-shadow(0 4px 9px rgba(0, 0, 0, 0.32));
  }
}

/* Dokunmatik sürükleme: filter kapatılır — her karede daha hızlı bileşen güncellemesi */
.drag-ghost.drag-ghost--lite-fx,
.drag-ghost.drag-ghost--lite-fx.drag-ghost--lifted {
  filter: none;
}

.drag-ghost-inner {
  display: grid;
  gap: 2px;
  transform-origin: center center;
  will-change: transform;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

@keyframes drag-ghost-shake {
  0%,
  100% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-6px);
  }
  40% {
    transform: translateX(6px);
  }
  60% {
    transform: translateX(-4px);
  }
  80% {
    transform: translateX(4px);
  }
}

.drag-ghost-inner--shake {
  animation: drag-ghost-shake 0.11s ease;
}

@media (prefers-reduced-motion: reduce) {
  .drag-ghost-inner--shake {
    animation: none;
  }
}

.drag-ghost-inner .mini {
  width: clamp(26px, 7.6vw, 38px);
  aspect-ratio: 1;
  border-radius: 5px;
}

.tray {
  display: flex;
  justify-content: center;
  /* Alt hiza: yuvaların tabanı ile döndür sütunu (bar flex-end) aynı çizgide */
  align-items: flex-end;
  gap: 10px;
  flex-wrap: nowrap;
  flex-shrink: 0;
  /* Üst/yan; alt 0 — ızgaraya yakın; min-height yalın (168 yerine) üstte dev boşluk oluşmasın */
  padding: 0 6px 0;
  /* Yuva 126px + döndür ipucu için az pay; mod değişince yükseklik sabit kalır */
  min-height: 132px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.tray::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

/* Tepsi önizlemesi: cq birimleri için (parça boyutuna göre kare ölçek) */
.tray-slot {
  container-type: size;
  container-name: tray-slot;
  box-sizing: border-box;
  flex: 0 0 auto;
  width: 126px;
  height: 126px;
  min-width: 126px;
  min-height: 126px;
  border-radius: 14px;
  border: none;
  background: rgba(255, 255, 255, 0.05);
  box-shadow:
    inset 0 -1px 0 rgba(0, 0, 0, 0.22),
    0 4px 18px rgba(0, 0, 0, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  /* Daha geniş dokunma alanı — parçayı yakalamak kolay */
  padding: 14px 12px 16px;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

/* Uzun çubuklar (1×5 / 5×1) dahil tüm parçalar yuva içinde kalsın */
.tray-slot > .tray-piece {
  width: auto;
  max-height: 100%;
}

/* Oyun bitti: boş yuva yer tutar — fazla silik olmasın */
.tray-slot--gameover-empty {
  opacity: 0.58;
  pointer-events: none;
  background: rgba(28, 22, 40, 0.38);
  box-shadow:
    inset 0 -1px 0 rgba(0, 0, 0, 0.28),
    0 2px 10px rgba(0, 0, 0, 0.2);
}

.tray-slot--with-rotate-hint {
  position: relative;
  overflow: visible;
}

.tray-slot--with-rotate-hint .tray-piece {
  max-width: 100%;
}

.tray-rotate-hint {
  position: absolute;
  top: 6px;
  right: 6px;
  pointer-events: none;
  width: auto;
  z-index: 2;
  animation: tray-hint-pop 0.38s cubic-bezier(0.34, 1.2, 0.52, 1) both;
}

@keyframes tray-hint-pop {
  from {
    opacity: 0;
    transform: translateY(4px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.tray-rotate-hint-glass {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.09) 0%, rgba(15, 23, 42, 0.75) 100%);
  border: 1px solid rgba(148, 163, 184, 0.28);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.1) inset,
    0 3px 10px rgba(0, 0, 0, 0.32);
}

.tray-rotate-hint-row {
  display: flex;
  align-items: center;
  justify-content: center;
}

.tray-rotate-hint-ico {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #cbd5e1;
  filter: none;
}

@media (prefers-reduced-motion: reduce) {
  .tray-rotate-hint {
    animation: none;
  }

  .tray-piece:active:not(.tray-piece--dragging) {
    transform: none;
  }
}

#game-play-area.game-play-area {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
  overflow-x: hidden;
  overflow-y: hidden;
  overflow-anchor: none;
  overscroll-behavior: none;
  /* Dikey kaydırma konteyneri olmasın; parça sürüklemede ekran zıplamasın */
  touch-action: none;
  -webkit-touch-callout: none;
  user-select: none;
  -webkit-user-select: none;
}

/* İsteğe bağlı: küçük kişisel / geliştirici şerit (game.js + ?devstrip=1). Reklam ağı değil. */
.kk-self-strip--hidden {
  display: none !important;
}

.kk-self-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-shrink: 0;
  margin-top: 2px;
  margin-bottom: max(2px, env(safe-area-inset-bottom));
  padding: 5px 10px 6px;
  border-radius: 10px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(226, 232, 240, 0.78);
  background: rgba(15, 23, 42, 0.52);
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-sizing: border-box;
  max-width: 100%;
}

.kk-self-strip__link {
  flex: 1;
  min-width: 0;
  color: inherit;
  text-decoration: none;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kk-self-strip__link:hover {
  color: #fde68a;
  text-decoration: underline;
}

.kk-self-strip__link[aria-disabled="true"] {
  cursor: default;
  text-decoration: none;
}

.kk-self-strip__link[aria-disabled="true"]:hover {
  color: rgba(226, 232, 240, 0.78);
}

.kk-self-strip__x {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  line-height: 1;
  color: rgba(226, 232, 240, 0.75);
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
}

.kk-self-strip__x:active {
  transform: scale(0.94);
}

/* Dar / kısa ekran: tahta + döndür yan yana; tepsi üç yuva ekrana sığsın */
@media (max-width: 480px) {
  .app {
    padding-bottom: max(14px, env(safe-area-inset-bottom));
  }

  #game-screen .app {
    padding-bottom: max(14px, env(safe-area-inset-bottom));
  }

  #game-play-area.game-play-area {
    max-width: 100%;
    padding-left: max(0px, env(safe-area-inset-left));
    padding-right: max(0px, env(safe-area-inset-right));
  }

  .board-frame-with-rotate {
    max-width: 100%;
  }

  .tray-stack {
    gap: 6px;
  }

  .board-column {
    width: 100%;
    max-width: min(464px, 100%);
  }

  .tray {
    align-items: flex-end;
    justify-content: center;
    gap: 8px;
    padding: 0 6px 0;
    box-sizing: border-box;
    min-height: min(132px, 28vh);
  }

  /* Üç ayrı yuva: calc genişlik tek şerit gibi birleştiriyordu; flex + gap ile ayrılık */
  .tray-slot {
    flex: 1 1 0;
    min-width: 0;
    width: auto;
    height: auto;
    min-height: 100px;
    aspect-ratio: 1;
    max-width: min(126px, 34vw);
    box-sizing: border-box;
    padding: 6px 5px;
  }

  .tray.tray--rotate-pick {
    overflow-y: visible;
  }

  .tray-slot.tray-slot--with-rotate-hint {
    overflow: visible;
  }
}

@media (max-height: 720px) {
  .app {
    padding-top: max(8px, env(safe-area-inset-top));
    padding-bottom: max(12px, env(safe-area-inset-bottom));
  }

  #game-screen .app {
    padding-top: max(36px, env(safe-area-inset-top));
  }

  .game-hud {
    margin-bottom: 8px;
  }

  #game-screen .game-hud {
    margin-bottom: 2px;
  }

  .board-wrap {
    margin-bottom: 4px;
  }

  .tray {
    padding: 0 6px 0;
    min-height: min(130px, 26vh);
  }
}

/* Büyük ekran + yatay: içerik sıkışmasın, tahta/tray daha rahat yerleşsin */
@media (min-width: 900px) and (orientation: landscape) {
  #game-screen:not(.hidden) .app {
    max-width: min(1100px, 100%);
    padding-top: max(14px, env(safe-area-inset-top));
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
    padding-bottom: max(10px, env(safe-area-inset-bottom));
  }

  #game-screen .game-hud {
    margin-bottom: 8px;
  }

  #game-screen #game-play-area.game-play-area {
    align-items: center;
  }

  #game-screen .board-column {
    max-width: min(700px, 96vw);
  }

  #game-screen .board-column > .board-frame {
    width: min(100%, calc(100dvh - 176px));
    max-width: min(620px, 96vw);
  }

  #game-screen .tray-stack {
    max-width: min(700px, 96vw);
    margin-inline: auto;
  }
}

.tray-slot--stuck {
  opacity: 0.48;
}

.tray-slot--stuck .tray-piece {
  filter: grayscale(0.4) brightness(0.92);
}

.tray-piece {
  display: grid;
  gap: 2px;
  cursor: grab;
  touch-action: none;
  max-width: 100%;
  max-height: 100%;
  justify-content: center;
  align-content: center;
  justify-items: center;
  align-items: center;
  position: relative;
  z-index: 0;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  transition:
    opacity 0.08s ease,
    transform 0.14s cubic-bezier(0.22, 1, 0.36, 1);
  /* Referans oyun: tepsi parçasında hafif parıltı */
  filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.24));
  will-change: transform;
}

.tray-piece:active:not(.tray-piece--dragging) {
  cursor: grabbing;
  z-index: 4;
  transform: scale(1.14);
  filter:
    drop-shadow(0 2px 7px rgba(0, 0, 0, 0.3));
}

.tray-piece--dragging {
  opacity: 0;
  transform: scale(0.97);
  pointer-events: none;
}

/* Tepsi parçası hücresi: parça içinde bitişik kalır, büyük şekillerde akıllı küçülür */
.tray-piece .mini {
  width: var(--tray-mini-size, 18px);
  height: var(--tray-mini-size, 18px);
  aspect-ratio: 1;
  box-sizing: border-box;
  border-radius: 4px;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

@keyframes gem-burst {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  22% {
    transform: scale(1.12);
    filter: brightness(1.45);
  }
  58% {
    transform: scale(0.4);
    opacity: 0.4;
  }
  100% {
    transform: scale(0.1);
    opacity: 0;
  }
}

/* Satır temizliği — yatay ışık şeridi (video referansı) */
@keyframes gem-burst-rowflash {
  0% {
    transform: scale(1);
    opacity: 1;
    box-shadow: none;
    filter: brightness(1);
  }
  28% {
    transform: scale(1.22);
    opacity: 1;
    box-shadow:
      -16px 0 22px rgba(255, 255, 255, 0.75),
      16px 0 22px rgba(255, 255, 255, 0.75),
      0 0 28px rgba(186, 104, 255, 0.55);
    filter: brightness(2.1);
  }
  100% {
    transform: scale(0.08);
    opacity: 0;
    box-shadow: none;
    filter: brightness(1);
  }
}

/* Sütun temizliği — dikey neon huzme */
@keyframes gem-burst-colflash {
  0% {
    transform: scale(1);
    opacity: 1;
    box-shadow: none;
    filter: brightness(1);
  }
  28% {
    transform: scale(1.24);
    opacity: 1;
    box-shadow:
      0 -18px 26px rgba(220, 240, 255, 0.9),
      0 18px 26px rgba(180, 130, 255, 0.65),
      0 0 32px rgba(255, 255, 255, 0.45);
    filter: brightness(2.05);
  }
  100% {
    transform: scale(0.08);
    opacity: 0;
    box-shadow: none;
    filter: brightness(1);
  }
}

@keyframes gem-burst-cornerflash {
  0% {
    transform: scale(1);
    opacity: 1;
    filter: brightness(1);
  }
  30% {
    transform: scale(1.26);
    opacity: 1;
    box-shadow:
      -12px 0 18px rgba(255, 255, 255, 0.65),
      12px 0 18px rgba(255, 255, 255, 0.65),
      0 -14px 20px rgba(200, 230, 255, 0.75),
      0 14px 20px rgba(160, 100, 255, 0.5);
    filter: brightness(2.2);
  }
  100% {
    transform: scale(0.06);
    opacity: 0;
    box-shadow: none;
    filter: brightness(1);
  }
}

/* Varsayılan: ağır filter/box-shadow yok; yumuşak eğri — ani scale(0.1) “kasma” hissi vermesin */
.cell.gem-burst {
  animation: gem-burst-fade-touch 0.1s ease-out forwards;
  filter: none;
  box-shadow: none;
  z-index: 4;
  position: relative;
  pointer-events: none;
  will-change: opacity;
  backface-visibility: hidden;
}

.cell.gem-burst.gem-burst--row:not(.gem-burst--col) {
  animation: gem-burst-fade-touch 0.1s ease-out forwards;
}

.cell.gem-burst.gem-burst--col:not(.gem-burst--row) {
  animation: gem-burst-fade-touch 0.1s ease-out forwards;
}

.cell.gem-burst.gem-burst--row.gem-burst--col {
  animation: gem-burst-fade-touch 0.1s ease-out forwards;
}

.board.board--line-burst {
  animation: none;
  filter: none;
}

/* Satır patlaması: tüm tahtada filter/drop-shadow animasyonu ağır — sadece hafif parlaklık */
@keyframes board-line-burst-aura {
  0%,
  100% {
    filter: brightness(1);
  }
  40% {
    filter: brightness(1.025);
  }
}

@keyframes gem-burst-lite {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  32% {
    transform: scale(1.06);
    opacity: 0.97;
  }
  72% {
    transform: scale(0.94);
    opacity: 0.45;
  }
  100% {
    transform: scale(0.82);
    opacity: 0;
  }
}

/* Dokunmatik: transform+filter yerine yalnız opacity — çok hücre aynı anda patlarken daha akıcı */
@keyframes gem-burst-fade-touch {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

@media (max-width: 480px), (pointer: coarse) {
  .cell.gem-burst,
  .cell.gem-burst.gem-burst--row:not(.gem-burst--col),
  .cell.gem-burst.gem-burst--col:not(.gem-burst--row),
  .cell.gem-burst.gem-burst--row.gem-burst--col {
    animation: gem-burst-fade-touch 0.09s ease-out forwards !important;
    will-change: opacity;
    transform: none !important;
    filter: none !important;
    box-shadow: none !important;
  }

  /* Kombo / tertemiz tahta: ağır filter-drop-shadow animasyonları kapalı */
  .board-wrap.board-wrap--combo-pulse::before {
    animation: none !important;
    opacity: 0 !important;
  }

  .board-wrap.board-wrap--fullboard-clear {
    animation: none !important;
    filter: none !important;
    transform: none !important;
  }

  .score-pulse {
    animation: none !important;
  }

  .board.board--line-burst {
    animation: none !important;
    filter: none !important;
  }

  .board-side-rotate.board-side-rotate--armed {
    animation: none !important;
    box-shadow:
      0 0 0 1px rgba(217, 119, 6, 0.4),
      0 0 14px rgba(245, 158, 11, 0.18),
      0 1px 0 rgba(255, 255, 255, 0.08) inset,
      0 8px 22px rgba(0, 0, 0, 0.36);
  }

  .game-stat--current {
    animation: none !important;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.14),
      inset 0 -1px 0 rgba(0, 0, 0, 0.12),
      0 0 0 1px rgba(255, 193, 7, 0.13),
      0 0 16px rgba(255, 193, 7, 0.055),
      0 12px 30px rgba(0, 0, 0, 0.32);
  }

  #game-screen:has(.game-hud--adventure) .game-stat--current {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.11),
      inset 0 -1px 0 rgba(0, 0, 0, 0.12),
      0 0 0 1px rgba(255, 193, 7, 0.09),
      0 0 10px rgba(255, 193, 7, 0.035),
      0 10px 24px rgba(0, 0, 0, 0.28);
  }

  .game-stat-spark {
    animation: none !important;
  }

  .tray-piece {
    filter: none;
  }

  .board.preview-valid .cell.preview.preview-blast {
    animation: none !important;
  }

  #game-adventure-fly-target-star.adv-fly-merged,
  #game-adventure-fly-target-crystal.adv-fly-merged {
    animation: none !important;
  }
}

.board.preview-valid .cell.preview:not(.preview-blast) {
  outline: 2px solid rgba(120, 255, 180, 0.34);
  outline-offset: -1px;
  background: rgba(72, 160, 120, 0.08);
}

/* Patlayacak hücreler: çok hücrede sonsuz outline animasyonu WebView’da kasmaya yol açıyordu — sabit vurgu */
.board.preview-valid .cell.preview.preview-blast {
  outline: 2px solid rgba(150, 255, 205, 0.72);
  outline-offset: -1px;
}


.board.preview-invalid .cell.preview[data-preview-gem="0"] {
  background: linear-gradient(145deg, rgba(255, 194, 224, 0.82), rgba(255, 61, 154, 0.88), rgba(173, 20, 87, 0.78));
}
.board.preview-invalid .cell.preview[data-preview-gem="1"] {
  background: linear-gradient(145deg, rgba(181, 255, 255, 0.82), rgba(0, 229, 255, 0.88), rgba(0, 105, 120, 0.78));
}
.board.preview-invalid .cell.preview[data-preview-gem="2"] {
  background: linear-gradient(145deg, rgba(255, 245, 157, 0.85), rgba(255, 202, 40, 0.9), rgba(245, 127, 23, 0.78));
}
.board.preview-invalid .cell.preview[data-preview-gem="3"] {
  background: linear-gradient(145deg, rgba(255, 171, 145, 0.82), rgba(255, 23, 68, 0.88), rgba(183, 28, 28, 0.78));
}
.board.preview-invalid .cell.preview[data-preview-gem="4"] {
  background: linear-gradient(145deg, rgba(185, 255, 204, 0.82), rgba(0, 230, 118, 0.88), rgba(27, 94, 32, 0.78));
}
.board.preview-invalid .cell.preview[data-preview-gem="5"] {
  background: linear-gradient(145deg, rgba(179, 136, 255, 0.82), rgba(101, 31, 255, 0.88), rgba(49, 27, 146, 0.78));
}

/* Patlayacak hücre önizlemesi: düz renk (gradient yok) = daha az boyama */
.board.preview-valid .cell.preview.preview-blast[data-preview-gem="0"] {
  background: rgba(236, 64, 122, 0.52);
}
.board.preview-valid .cell.preview.preview-blast[data-preview-gem="1"] {
  background: rgba(0, 188, 212, 0.5);
}
.board.preview-valid .cell.preview.preview-blast[data-preview-gem="2"] {
  background: rgba(255, 179, 0, 0.52);
}
.board.preview-valid .cell.preview.preview-blast[data-preview-gem="3"] {
  background: rgba(229, 57, 53, 0.52);
}
.board.preview-valid .cell.preview.preview-blast[data-preview-gem="4"] {
  background: rgba(0, 200, 83, 0.5);
}
.board.preview-valid .cell.preview.preview-blast[data-preview-gem="5"] {
  background: rgba(124, 77, 255, 0.52);
}

.board.preview-invalid .cell.preview {
  outline: 2px solid rgba(255, 100, 100, 0.85);
  outline-offset: -1px;
}

#game-play-area.game-play-area--pale .board.preview-valid .cell.preview:not(.preview-blast) {
  outline-color: rgba(130, 150, 125, 0.5);
  background: rgba(70, 78, 65, 0.2);
}

#game-play-area.game-play-area--pale .board.preview-valid .cell.preview.preview-blast {
  outline-color: rgba(175, 200, 165, 0.95);
}

#game-play-area.game-play-area--pale .board.preview-invalid .cell.preview[data-preview-gem="0"] {
  background: linear-gradient(148deg, rgba(240, 230, 230, 0.88), rgba(180, 160, 160, 0.9), rgba(110, 88, 90, 0.78));
}
#game-play-area.game-play-area--pale .board.preview-invalid .cell.preview[data-preview-gem="1"] {
  background: linear-gradient(152deg, rgba(232, 240, 242, 0.88), rgba(160, 190, 200, 0.9), rgba(70, 95, 105, 0.78));
}
#game-play-area.game-play-area--pale .board.preview-invalid .cell.preview[data-preview-gem="2"] {
  background: linear-gradient(145deg, rgba(242, 235, 224, 0.88), rgba(210, 195, 160, 0.9), rgba(130, 115, 80, 0.78));
}
#game-play-area.game-play-area--pale .board.preview-invalid .cell.preview[data-preview-gem="3"] {
  background: linear-gradient(150deg, rgba(229, 216, 216, 0.88), rgba(170, 140, 140, 0.9), rgba(85, 62, 64, 0.78));
}
#game-play-area.game-play-area--pale .board.preview-invalid .cell.preview[data-preview-gem="4"] {
  background: linear-gradient(146deg, rgba(226, 235, 228, 0.88), rgba(155, 175, 165, 0.9), rgba(75, 90, 80, 0.78));
}
#game-play-area.game-play-area--pale .board.preview-invalid .cell.preview[data-preview-gem="5"] {
  background: linear-gradient(149deg, rgba(234, 230, 239, 0.88), rgba(180, 168, 190, 0.9), rgba(95, 82, 105, 0.78));
}

#game-play-area.game-play-area--pale .board.preview-valid .cell.preview.preview-blast[data-preview-gem="0"] {
  background: rgba(190, 165, 165, 0.55);
}
#game-play-area.game-play-area--pale .board.preview-valid .cell.preview.preview-blast[data-preview-gem="1"] {
  background: rgba(150, 175, 185, 0.55);
}
#game-play-area.game-play-area--pale .board.preview-valid .cell.preview.preview-blast[data-preview-gem="2"] {
  background: rgba(195, 175, 130, 0.55);
}
#game-play-area.game-play-area--pale .board.preview-valid .cell.preview.preview-blast[data-preview-gem="3"] {
  background: rgba(175, 145, 145, 0.55);
}
#game-play-area.game-play-area--pale .board.preview-valid .cell.preview.preview-blast[data-preview-gem="4"] {
  background: rgba(145, 165, 150, 0.55);
}
#game-play-area.game-play-area--pale .board.preview-valid .cell.preview.preview-blast[data-preview-gem="5"] {
  background: rgba(165, 155, 175, 0.55);
}

#game-play-area.game-play-area--pale .board.preview-invalid .cell.preview {
  outline-color: rgba(190, 120, 105, 0.62);
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 4, 18, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 24px;
}

.overlay--game-over {
  animation: overlay-fade-in 0.16s ease-out;
}

@keyframes overlay-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.overlay.hidden {
  display: none;
}

/* Yeni oyun onayı (ayarlar) */
.confirm-new-overlay {
  position: fixed;
  inset: 0;
  z-index: 520;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(20px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom));
  animation: overlay-fade-in 0.2s ease-out;
}

.confirm-new-overlay.hidden {
  display: none;
}

/* El bitişi: 5 sn geri sayım → reklam veya menü */
.ad-gate-overlay {
  position: fixed;
  inset: 0;
  z-index: 115;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(20px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom));
  background: rgba(6, 4, 14, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: overlay-fade-in 0.2s ease-out;
}

.ad-gate-overlay.hidden {
  display: none;
}

.ad-gate-panel {
  width: 100%;
  max-width: 292px;
  padding: 18px 16px 16px;
  border-radius: 18px;
  text-align: center;
  background: linear-gradient(165deg, rgba(32, 28, 48, 0.97) 0%, rgba(14, 12, 24, 0.99) 100%);
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.05) inset,
    0 12px 32px rgba(0, 0, 0, 0.4);
}

.ad-gate-revive-title {
  margin: 0 0 5px;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #e2e8f0;
}

.ad-gate-revive-sub {
  margin: 0 0 12px;
  font-size: 0.8rem;
  line-height: 1.38;
  color: rgba(148, 163, 184, 0.95);
}

.ad-gate-ring-wrap {
  position: relative;
  width: 118px;
  height: 118px;
  margin: 0 auto 12px;
}

.ad-gate-ring-svg {
  display: block;
  width: 118px;
  height: 118px;
}

.ad-gate-ring-progress {
  transition: stroke 0.22s ease, filter 0.22s ease;
  filter: drop-shadow(0 0 6px rgba(34, 197, 94, 0.32));
}

.ad-gate-ring-wrap .ad-gate-count {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  min-width: 0;
  font-size: 2.05rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  color: #ffffff;
  transition: transform 0.2s ease, color 0.2s ease, text-shadow 0.2s ease;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
  background: none;
  border: none;
}

.ad-gate-ring-wrap--urgent .ad-gate-ring-progress {
  stroke: #f59e0b;
  filter: drop-shadow(0 0 12px rgba(245, 158, 11, 0.55));
}

.ad-gate-ring-wrap--critical .ad-gate-ring-progress {
  stroke: #ef4444;
  filter: drop-shadow(0 0 14px rgba(239, 68, 68, 0.65));
}

.ad-gate-ring-wrap--urgent .ad-gate-count {
  color: #fde68a;
  transform: scale(1.04);
}

.ad-gate-ring-wrap--critical .ad-gate-count {
  color: #fecaca;
  animation: ad-gate-count-pulse 0.42s ease-in-out infinite;
}

@keyframes ad-gate-count-pulse {
  0%,
  100% {
    transform: scale(1);
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
  }
  50% {
    transform: scale(1.1);
    text-shadow: 0 0 20px rgba(239, 68, 68, 0.65);
  }
}

.ad-gate-hint {
  margin: 0 0 12px;
  font-size: 0.74rem;
  line-height: 1.4;
  color: rgba(100, 116, 139, 0.92);
}

.ad-gate-watch {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.ad-gate-watch-ico {
  display: inline-flex;
  opacity: 0.95;
}

.ad-gate-watch.ad-gate-watch--pending {
  opacity: 0.88;
}

/* Döndürme hakkı bittiğinde: reklam teklifi (küçük panel) */
.rotate-offer-overlay {
  position: fixed;
  inset: 0;
  z-index: 118;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(16px, env(safe-area-inset-top)) 16px max(20px, env(safe-area-inset-bottom));
  animation: overlay-fade-in 0.22s ease-out;
}

.rotate-offer-overlay.hidden {
  display: none;
}

.rotate-offer-scrim {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0;
  border: none;
  background: rgba(6, 4, 14, 0.58);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
}

.rotate-offer-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 280px;
  margin: 0;
  padding: 18px 16px 16px;
  overflow: hidden;
  border-radius: 18px;
  text-align: center;
  background: linear-gradient(165deg, rgba(34, 28, 52, 0.97) 0%, rgba(14, 12, 24, 0.99) 100%);
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.05) inset,
    0 14px 36px rgba(0, 0, 0, 0.42);
  animation: rotate-offer-panel-in 0.38s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes rotate-offer-panel-in {
  0% {
    opacity: 0;
    transform: scale(0.92) translateY(12px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.rotate-offer-visual {
  position: relative;
  width: 76px;
  height: 76px;
  margin: 0 auto 10px;
}

.rotate-offer-orbit {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(
    from 200deg,
    rgba(148, 163, 184, 0.22),
    rgba(100, 116, 139, 0.12),
    rgba(148, 163, 184, 0.22)
  );
  animation: rotate-offer-orbit-spin 24s linear infinite;
  opacity: 0.85;
  mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px));
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px));
}

@media (prefers-reduced-motion: reduce) {
  .rotate-offer-orbit {
    animation: none;
  }
}

@keyframes rotate-offer-orbit-spin {
  to {
    transform: rotate(360deg);
  }
}

.rotate-offer-icon-wrap {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: auto;
  width: 58px;
  height: 58px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 16px;
  color: #e2e8f0;
  background: linear-gradient(160deg, rgba(51, 65, 85, 0.55), rgba(15, 23, 42, 0.92));
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 6px 16px rgba(0, 0, 0, 0.35);
}

.rotate-offer-icon {
  margin-top: 1px;
  opacity: 0.92;
}

.rotate-offer-deg {
  margin-top: 0;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: rgba(226, 232, 240, 0.88);
}

.rotate-offer-title {
  margin: 0 0 8px;
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: #f1f5f9;
}

.rotate-offer-lead {
  margin: 0 0 6px;
  font-size: 0.8rem;
  line-height: 1.45;
  color: rgba(148, 163, 184, 0.95);
}

.rotate-offer-lead strong {
  color: #cbd5e1;
  font-weight: 600;
}

.rotate-offer-fine {
  margin: 0 0 14px;
  min-height: 1.15em;
  font-size: 0.72rem;
  line-height: 1.35;
  color: rgba(100, 116, 139, 0.95);
}

.rotate-offer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.rotate-offer-actions .btn {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.88rem;
  padding: 0.52em 0.75em;
}

.rotate-offer-watch-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-weight: 600;
}

.rotate-offer-watch-ico {
  display: inline-flex;
  opacity: 0.88;
}

@media (max-width: 360px) {
  .rotate-offer-panel {
    padding: 18px 14px 16px;
  }

  .rotate-offer-actions {
    flex-direction: column;
  }

  .rotate-offer-actions .btn {
    width: 100%;
  }
}

.confirm-new-scrim {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0;
  border: none;
  background: rgba(6, 4, 14, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
}

.confirm-new-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 340px;
  margin: 0;
  padding: 26px 22px 22px;
  overflow: hidden;
  border-radius: 22px;
  text-align: center;
  background: linear-gradient(165deg, rgba(36, 28, 58, 0.98) 0%, rgba(14, 10, 28, 0.99) 100%);
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 24px 56px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  animation: confirm-new-panel-pop 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes confirm-new-panel-pop {
  0% {
    opacity: 0;
    transform: scale(0.94) translateY(14px);
  }
  70% {
    opacity: 1;
    transform: scale(1.02) translateY(0);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.confirm-new-panel__icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  border-radius: 20px;
  color: rgba(255, 230, 150, 0.95);
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.12), transparent 55%),
    linear-gradient(145deg, rgba(201, 162, 39, 0.22), rgba(30, 20, 55, 0.6));
  border: 1px solid rgba(201, 162, 39, 0.35);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 10px 28px rgba(0, 0, 0, 0.35);
}

.confirm-new-panel__icon-wrap svg {
  width: 26px;
  height: 26px;
}

.confirm-new-title {
  margin: 0 0 12px;
  font-size: 1.22rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: #f0f4ff;
}

.confirm-new-text {
  margin: 0 0 22px;
  padding: 0 2px;
  font-size: 0.88rem;
  line-height: 1.5;
  color: rgba(226, 232, 240, 0.88);
}

.confirm-new-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.confirm-new-actions .btn {
  width: 100%;
  margin-top: 0;
}

@media (min-width: 380px) {
  .confirm-new-actions {
    flex-direction: row-reverse;
    gap: 12px;
  }

  .confirm-new-actions .btn {
    flex: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .confirm-new-panel {
    animation: none;
  }
}

.modal {
  background: linear-gradient(180deg, #2d1f4a, #1a0f2e);
  border: 1px solid rgba(201, 162, 39, 0.4);
  border-radius: 16px;
  padding: 22px;
  max-width: 320px;
  width: 100%;
  text-align: center;
}

.modal--game-over {
  position: relative;
  overflow: hidden;
  max-width: 300px;
  padding: 26px 24px 22px;
  border-radius: 20px;
  border-color: rgba(180, 200, 255, 0.28);
  box-shadow:
    0 24px 56px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.modal--game-over--anim {
  animation: game-over-modal-pop 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes game-over-modal-pop {
  0% {
    opacity: 0;
    transform: scale(0.94) translateY(12px);
  }
  70% {
    opacity: 1;
    transform: scale(1.02) translateY(0);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-game-over__head {
  position: relative;
  margin: 0 0 6px;
  padding: 4px 4px 14px;
  overflow: hidden;
}

.modal-game-over__glow {
  position: absolute;
  left: 50%;
  top: 42%;
  width: 140%;
  height: 120%;
  transform: translate(-50%, -50%);
  background: radial-gradient(
    ellipse at 50% 40%,
    rgba(139, 92, 246, 0.22) 0%,
    rgba(167, 139, 250, 0.1) 42%,
    transparent 68%
  );
  pointer-events: none;
  z-index: 0;
}

.modal-game-over__head--record .modal-game-over__glow {
  background: radial-gradient(
    ellipse at 50% 40%,
    rgba(251, 191, 36, 0.28) 0%,
    rgba(245, 158, 11, 0.1) 45%,
    transparent 70%
  );
}

.modal-game-over__ornament {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 14px;
}

.modal-game-over__divider {
  width: 56px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(196, 181, 253, 0.55),
    rgba(125, 211, 252, 0.45),
    transparent
  );
  box-shadow: 0 0 14px rgba(167, 139, 250, 0.35);
}

.modal-game-over__head--record .modal-game-over__divider {
  background: linear-gradient(
    90deg,
    transparent,
    rgba(253, 224, 71, 0.65),
    rgba(251, 191, 36, 0.55),
    transparent
  );
  box-shadow: 0 0 16px rgba(251, 191, 36, 0.4);
}

.modal-game-over__gem {
  display: block;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  transform: rotate(45deg);
  background: linear-gradient(135deg, #c4b5fd 0%, #7dd3fc 100%);
  box-shadow:
    0 0 10px rgba(167, 139, 250, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.modal-game-over__head--record .modal-game-over__gem {
  background: linear-gradient(135deg, #fde047 0%, #f59e0b 100%);
  box-shadow:
    0 0 12px rgba(251, 191, 36, 0.65),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.modal-game-over__eyebrow {
  position: relative;
  z-index: 1;
  margin: 0 0 8px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(180, 170, 220, 0.82);
}

.modal-game-over__head--record .modal-game-over__eyebrow {
  color: rgba(253, 224, 71, 0.92);
  text-shadow: 0 0 20px rgba(251, 191, 36, 0.35);
}

.modal-game-over__title {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: 1.38rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  background: linear-gradient(180deg, #ffffff 0%, #ece8ff 38%, #c4b5fd 95%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 14px rgba(139, 92, 246, 0.25));
}

.modal-game-over__head--record .modal-game-over__title {
  background: linear-gradient(180deg, #fffbeb 0%, #fde68a 42%, #f59e0b 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 18px rgba(245, 158, 11, 0.35));
}

.modal--game-over--anim .modal-game-over__head {
  animation: game-over-head-in 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.04s both;
}

@keyframes game-over-head-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-game-over__score {
  position: relative;
  z-index: 1;
  margin: 0 0 8px;
  font-size: 2.45rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  color: #ffe082;
  text-shadow:
    0 0 28px rgba(255, 193, 7, 0.28),
    0 2px 0 rgba(0, 0, 0, 0.2);
}

.modal--game-over--anim .modal-game-over__score {
  animation: game-over-score-reveal 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.12s both;
}

@keyframes game-over-score-reveal {
  from {
    opacity: 0;
    transform: scale(0.88) translateY(6px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-game-over__sub {
  position: relative;
  z-index: 2;
  isolation: isolate;
  margin: 0 0 22px;
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
  color: #d4cce8;
  -webkit-text-fill-color: #d4cce8;
}

.modal-game-over__sub a,
.modal-game-over__sub a:visited {
  color: inherit;
  text-decoration: none;
  -webkit-text-fill-color: inherit;
}

.modal-game-over__sub.hidden {
  display: none;
}

.modal-game-over__sub--tight {
  margin-bottom: 10px;
  line-height: 1.35;
}

.modal-game-over__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal-game-over__actions .btn {
  width: 100%;
}

@keyframes score-pulse {
  40% {
    transform: scale(1.06);
    color: #fff59d;
  }
}

.score-pulse {
  animation: score-pulse 0.16s cubic-bezier(0.34, 1.4, 0.64, 1);
}

/* Ana menü üst şerit: taç + yarış | profil */
.bb-menu-header-row {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  margin: 0 0 0;
}

/* Logo: üst satır (istatistik | sağ ikonlar), alt satır tam genişlik logo */
.bb-menu-header-row--brand {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  grid-template-areas:
    "bb-menu-stat bb-menu-right"
    "bb-menu-logo bb-menu-logo";
  /* Üst satır: Yarış ile Profil aynı yatay bantta karşılıklı */
  column-gap: 6px;
  row-gap: 2px;
  align-items: start;
  margin-top: 0;
}

.bb-menu-header-row--brand .bb-menu-left-col {
  grid-area: bb-menu-stat;
  position: relative;
  /* Logo satırı z-index:2 ile yukarı çekiliyor; Yarış + skor onun altında kalmasın */
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  /* Profil sütunu ile aynı üst hiza (genel -208 / -192 farkını kapat) */
  margin-top: -200px;
}

.bb-menu-header-row--brand .bb-menu-right-col {
  grid-area: bb-menu-right;
  margin-left: 12px;
  margin-right: -14px;
  margin-top: -200px;
}

.bb-menu-header-row--brand .bb-logo-wrap--menu {
  grid-area: bb-menu-logo;
  justify-self: stretch;
  z-index: 2;
  /* İkinci satırı sağ sütun yüksekliğine göre hizala (makul örtüşme) */
  margin-top: -84px;
}

.bb-menu-left-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
  max-width: calc(100% - 96px);
  margin-left: 0;
  /* önceki -70px + translate(-12px) görünümü; transform yok (fixed modal hatası önlenir) */
  margin-top: -82px;
  align-self: start;
}

.bb-menu-right-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 0 0 auto;
  align-self: start;
  z-index: 3;
  margin-left: 0;
  margin-top: -192px;
  margin-right: 0;
  gap: 11px;
  width: 80px;
}

/* Profil / Ödüller / Ses: aynı genişlik ve ortalı — dikey hiza tutarlı */
.bb-menu-right-col > .bb-details {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  margin: 0;
}

/* Ana menü sağ sütun: bir tık daha büyük ikon kutuları + etiket */
.bb-menu-right-col .bb-profile-quick-frame,
.bb-menu-right-col .bb-badges-menu-crest,
.bb-menu-right-col .bb-menu-settings-trigger-frame {
  width: 54px;
  height: 54px;
  border-radius: 14px;
}

.bb-menu-right-col .bb-profile-quick-silhouette {
  width: 26px;
  height: 26px;
}

.bb-menu-right-col .bb-badges-crest-svg {
  height: clamp(33px, 7.8vw, 42px);
  max-width: 42px;
}

.bb-menu-right-col .bb-menu-settings-trigger-svg {
  width: 30px;
  height: 30px;
}

.bb-menu-right-col .bb-profile-quick-label,
.bb-menu-right-col .bb-badges-menu-label,
.bb-menu-right-col .bb-menu-settings-trigger-label {
  font-size: 0.72rem;
  margin-top: 4px;
  line-height: 1.2;
}

/* İkon ile etiket arasında boşluk (üst üste binmeyi önler) */
.bb-menu-right-col .bb-profile-quick {
  gap: 5px;
}

.bb-menu-right-col .bb-details-menu-badges > summary.bb-badges-menu-summary {
  gap: 5px;
}

.bb-menu-right-col .bb-menu-settings-trigger {
  gap: 5px;
}

/* Taç + Yarış: sağ sütundaki Profil ile üst satırda karşılıklı */
.bb-menu-header-row--brand .bb-menu-stats-hud {
  width: auto;
  max-width: min(236px, 100%);
  align-self: flex-start;
  /* Yarış pill ile taç satırı arası: taç/puan biraz daha aşağıda */
  gap: 14px;
}

/* Taç + skor: Yarış pill ile aynı sol izada (birlikte sola) */
.bb-menu-header-row--brand .bb-menu-stats-crown-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  margin-left: 0;
  width: 100%;
  max-width: none;
}

.bb-menu-header-row--brand .bb-menu-crown {
  flex-shrink: 0;
  margin-right: 0;
}

.bb-menu-header-row--brand .bb-menu-crown-val {
  box-sizing: border-box;
  min-width: 3.25em;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* Yarış: alttaki taç + puan satırıyla aynı sol izada (hud içinde genişlik dolsun) */
.bb-menu-header-row--brand .bb-details-menu-race {
  align-self: stretch;
  width: 100%;
  margin-left: 0;
  max-width: min(236px, 100%);
}

/* Ödüller — profil ile aynı sütun; kurdele + yıldız ikonu */
.bb-details-menu-badges {
  margin: 0;
  width: 100%;
  max-width: min(220px, 92vw);
}

.bb-details-menu-badges > summary.bb-btn-badges.bb-badges-menu-summary {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 2px;
  width: 100%;
  margin: 0;
  padding: 0;
  cursor: pointer;
  border: none;
  border-radius: 0;
  font-style: normal;
  font-weight: 700;
  color: #fff;
  background: transparent;
  box-shadow: none;
  list-style: none;
}

.bb-details-menu-badges > summary.bb-btn-badges.bb-badges-menu-summary:hover {
  filter: none;
}

.bb-details-menu-badges > summary.bb-btn-badges.bb-badges-menu-summary:active {
  transform: translateY(1px);
}

.bb-details-menu-badges > summary.bb-btn-badges.bb-badges-menu-summary::after {
  display: none;
}

/* Ödüller — Profil / Ses ile aynı mor kutu + altın yazı */
.bb-badges-menu-crest {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 11px;
  flex-shrink: 0;
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(ellipse 90% 55% at 30% 18%, rgba(255, 255, 255, 0.22) 0%, transparent 52%),
    linear-gradient(155deg, #6d28d9 0%, #4c1d95 28%, #312e81 55%, #1e1b4b 100%);
  border: 1px solid rgba(192, 132, 252, 0.85);
  box-shadow:
    0 2px 0 rgba(49, 46, 129, 0.95),
    0 4px 9px rgba(76, 29, 149, 0.55),
    0 7px 14px rgba(0, 0, 0, 0.45),
    0 0 12px rgba(168, 85, 247, 0.35);
  transition:
    border-color 0.2s ease,
    box-shadow 0.22s ease,
    transform 0.2s ease,
    filter 0.2s ease;
}

.bb-badges-menu-crest::before,
.bb-badges-menu-crest::after {
  display: none;
}

.bb-details-menu-badges > summary.bb-badges-menu-summary:hover .bb-badges-menu-crest,
.bb-details-menu-badges > summary.bb-badges-menu-summary:focus-visible .bb-badges-menu-crest {
  border-color: #e9d5ff;
  filter: saturate(1.08);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.3) inset,
    0 2px 0 rgba(67, 56, 202, 0.9),
    0 0 16px rgba(192, 132, 252, 0.55),
    0 7px 16px rgba(0, 0, 0, 0.5);
  transform: translateY(-1px);
}

.bb-details-menu-badges[open] .bb-badges-menu-crest {
  border-color: #f0abfc;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.28) inset,
    0 2px 0 rgba(91, 33, 182, 0.95),
    0 0 18px rgba(244, 114, 182, 0.45),
    0 6px 13px rgba(0, 0, 0, 0.55);
}

.bb-badges-crest-svg {
  position: relative;
  z-index: 2;
  display: block;
  width: auto;
  height: clamp(27px, 6.5vw, 34px);
  max-width: 34px;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.45));
}

.bb-badges-menu-label {
  margin-top: 1px;
  font-size: 0.6rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fef9c3;
  text-shadow:
    0 1px 0 rgba(120, 53, 15, 0.55),
    0 0 8px rgba(250, 204, 21, 0.45),
    0 1px 3px rgba(0, 0, 0, 0.5);
}

@media (prefers-reduced-motion: reduce) {
  .bb-details-menu-badges > summary.bb-badges-menu-summary:hover .bb-badges-menu-crest,
  .bb-details-menu-badges > summary.bb-badges-menu-summary:focus-visible .bb-badges-menu-crest {
    transform: none;
  }
}

/* Ana menü ayarlar butonu — profil/odullerle ayni kutu dili */
.bb-menu-settings-trigger {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 2px;
  width: 100%;
  margin: 0;
  padding: 0;
  cursor: pointer;
  border: none;
  border-radius: 0;
  font-family: inherit;
  font-style: normal;
  font-weight: 700;
  color: #fff;
  background: transparent;
  box-shadow: none;
}

.bb-menu-settings-trigger:hover {
  filter: brightness(1.04);
}

.bb-menu-settings-trigger:active {
  transform: translateY(1px);
}

.bb-menu-settings-trigger-frame {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 11px;
  flex-shrink: 0;
  isolation: isolate;
  background:
    radial-gradient(ellipse 95% 58% at 28% 16%, rgba(255, 255, 255, 0.26) 0%, transparent 54%),
    linear-gradient(152deg, #7c3aed 0%, #5b21b6 32%, #3730a3 58%, #1e1b4b 100%);
  border: 1px solid rgba(196, 181, 253, 0.75);
  box-shadow:
    0 2px 0 rgba(30, 27, 75, 0.92),
    0 5px 11px rgba(76, 29, 149, 0.42),
    0 0 14px rgba(139, 92, 246, 0.28);
  transition:
    border-color 0.2s ease,
    box-shadow 0.22s ease,
    transform 0.2s ease,
    filter 0.2s ease;
}

.bb-menu-settings-trigger-svg {
  position: relative;
  z-index: 2;
  display: block;
  flex-shrink: 0;
  color: #f8fafc;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.45));
}

.bb-menu-settings-trigger-label {
  margin-top: 2px;
  font-size: 0.6rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fef9c3;
  text-shadow:
    0 1px 0 rgba(120, 53, 15, 0.5),
    0 0 6px rgba(250, 204, 21, 0.4),
    0 1px 3px rgba(0, 0, 0, 0.45);
}

.bb-menu-settings-trigger:hover .bb-menu-settings-trigger-frame,
.bb-menu-settings-trigger:focus-visible .bb-menu-settings-trigger-frame {
  border-color: #ddd6fe;
  filter: saturate(1.06) brightness(1.03);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.28) inset,
    0 2px 0 rgba(49, 46, 129, 0.88),
    0 0 14px rgba(167, 139, 250, 0.45),
    0 6px 14px rgba(0, 0, 0, 0.48);
  transform: translateY(-1px);
}

@media (prefers-reduced-motion: reduce) {
  .bb-menu-settings-trigger:hover .bb-menu-settings-trigger-frame,
  .bb-menu-settings-trigger:focus-visible .bb-menu-settings-trigger-frame {
    transform: none;
  }

  .bb-menu-settings-trigger:active {
    transform: none;
  }
}

.bb-menu-stats-hud {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  box-sizing: border-box;
  width: 100%;
  max-width: min(236px, 100%);
}

.bb-menu-crown {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 0;
  overflow: visible;
}

.bb-menu-crown-svg {
  display: block;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  overflow: visible;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.55)) drop-shadow(0 0 8px rgba(255, 200, 60, 0.45));
}

.bb-menu-stats-crown-row {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  width: 100%;
  min-height: 1.5em;
  margin: 0;
  padding: 0;
  overflow: visible;
  font-size: 1rem;
  font-weight: 900;
  color: #ffeb3b;
  text-shadow:
    0 0 10px rgba(255, 210, 80, 0.75),
    0 0 18px rgba(255, 180, 40, 0.35),
    0 1px 2px rgba(0, 0, 0, 0.55);
}

.bb-menu-crown-val {
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  white-space: nowrap;
  color: #ffe082;
  letter-spacing: 0.02em;
}

.bb-details-menu-race {
  position: relative;
  z-index: 1;
  display: block;
  margin: 0 0 0 -14px;
  width: 100%;
  max-width: min(236px, 100%);
  flex-shrink: 0;
}

.bb-details-menu-race > summary.bb-menu-stats-pill--summary {
  list-style: none;
  display: grid;
  /* Tek sütun: eskiden sağda ayrılan boş skor alanı kalktı */
  grid-template-columns: 1fr;
  align-items: stretch;
  width: 100%;
  margin: 0;
  padding: 0;
  cursor: pointer;
  border-radius: 12px;
  border: 1.5px solid rgba(110, 210, 255, 0.92);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  font: inherit;
  text-align: left;
  background: rgba(8, 12, 32, 0.35);
  color: inherit;
  transition: none;
}

.bb-details-menu-race > summary.bb-menu-stats-pill--summary:hover {
  border-color: rgba(110, 210, 255, 0.92);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.bb-details-menu-race[open] > summary.bb-menu-stats-pill--summary {
  border-color: rgba(110, 210, 255, 0.92);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

/* Liderlik modalı açıkken üstteki taç+puan özet kartı görünmesin. */
.bb-details-menu-race[open] > summary.bb-menu-stats-pill--summary {
  opacity: 0;
  pointer-events: none;
}

/* Liderlik açıkken ana menüdeki taç+puan satırını da tamamen gizle. */
.bb-menu-stats-hud:has(.bb-details-menu-race[open]) .bb-menu-stats-crown-row {
  display: none;
}

/* Liderlik açıkken sağdaki profil kısayolu arkada net görünmesin. */
body:has(#menu-race-details[open]) .bb-details-menu-profile > summary.bb-profile-quick {
  opacity: 0;
  pointer-events: none;
}

.bb-details-menu-race > summary.bb-menu-stats-pill--summary::-webkit-details-marker {
  display: none;
}

.bb-details-menu-race > summary.bb-menu-stats-pill--summary::marker {
  content: "";
}

/* Sol: mavi grafik + Yarış — düz mor panel */
.bb-menu-stats-pill-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: min-content;
  padding: 12px 12px 12px 11px;
  background: linear-gradient(180deg, #7e4cdb 0%, #5c2eb8 48%, #4a2399 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.bb-menu-stats-pill-ico {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.bb-menu-pill-chart-svg {
  display: block;
  width: 15px;
  height: 15px;
}

.bb-menu-stats-pill-label {
  flex: 0 1 auto;
  min-width: min-content;
  font-size: 0.86rem;
  font-weight: 900;
  font-style: normal;
  letter-spacing: 0.06em;
  line-height: 1.25;
  white-space: nowrap;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

/* Sağ: puan — koyu lacivert panel, beyaz rakam (tek katman; grid sütunu) */
.bb-menu-stats-pill-val {
  box-sizing: border-box;
  min-width: 3.35em;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  font-size: 0.88rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  white-space: nowrap;
  color: #ffffff;
  background: transparent;
  box-shadow: none;
  border-left: none;
}

.bb-details-menu-race .bb-menu-stats-pill-val {
  margin-left: 0;
  position: relative;
  z-index: 1;
}

.bb-menu-modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: block;
  margin: 0;
  padding: 0;
  pointer-events: none;
}

.bb-details > .bb-menu-modal {
  pointer-events: none;
}

.bb-details[open] > .bb-menu-modal {
  pointer-events: auto;
}

/* Yarış: modal açılınca body’ye taşınır (game.js); ana menü stacking’inden çıkar, tam ekran üstte kalır */
#menu-race-modal.bb-menu-modal {
  z-index: 600;
}

body > #menu-race-modal.bb-menu-modal,
body > #menu-profile-modal.bb-menu-modal,
body > #menu-badges-modal.bb-menu-modal,
body > #menu-settings-modal.bb-menu-modal {
  pointer-events: auto;
}

.bb-menu-modal-scrim {
  position: absolute;
  inset: 0;
  border: none;
  padding: 0;
  margin: 0;
  background: rgba(5, 8, 24, 0.62);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  cursor: pointer;
}

@media (max-width: 480px), (pointer: coarse) {
  .bb-menu-modal-scrim {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(5, 8, 24, 0.84);
  }

  /* Mobilde Liderlik/Ödüller açılınca da Ayarlar benzeri blur kalsın. */
  #profile-modal-scrim.bb-menu-modal-scrim,
  #race-modal-scrim.bb-menu-modal-scrim,
  #badges-modal-scrim.bb-menu-modal-scrim {
    backdrop-filter: blur(8px) saturate(1.08);
    -webkit-backdrop-filter: blur(8px) saturate(1.08);
    background: rgba(5, 8, 24, 0.64);
  }

  .bb-details-menu-race > summary.bb-menu-stats-pill--summary {
    transition: none;
  }

  .bb-sheet.bb-sheet-modal-window {
    box-shadow: 0 14px 40px rgba(15, 25, 55, 0.32);
  }

  .bb-sheet.bb-sheet-settings.bb-sheet-modal-window {
    box-shadow: 0 14px 44px rgba(0, 12, 32, 0.52);
  }

  .bb-sound-sheet-head-ico svg {
    filter: none;
  }
}

.bb-menu-modal-panel {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 1;
  width: min(92vw, 420px);
  max-width: calc(100vw - max(42px, env(safe-area-inset-left) + env(safe-area-inset-right)));
  transform: translate(-50%, -50%);
  max-height: min(640px, calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 24px));
  overflow: auto;
  pointer-events: auto;
}

/* Rozetler — geniş panel, taşan ızgara kaydırılır; kaydırma çubuğu gizli (çizgi olmasın) */
.bb-menu-modal-panel.bb-menu-modal-panel--badges {
  width: min(94vw, 400px);
  max-height: min(620px, calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 32px));
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.bb-menu-modal-panel.bb-menu-modal-panel--badges::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

/* Liderlik tablosu — kaydırma sadece iç gövdede; üst başlık + × sabit */
.bb-menu-modal-panel.bb-menu-modal-panel--lb {
  display: flex;
  flex-direction: column;
  width: min(97vw, 440px);
  left: 50%;
  top: calc(50% + 24px);
  transform: translate(-50%, -50%);
  max-height: min(640px, calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 32px));
  overflow: hidden;
}

/* Ses / İstatistik — ortalanmış pencere paneli */
.bb-menu-modal-panel.bb-menu-modal-panel--sheet {
  width: min(92vw, 400px);
  max-height: min(560px, calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 32px));
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.bb-details > .bb-menu-modal .bb-sheet {
  margin-top: 0;
  padding: 0;
}

.bb-sheet.bb-sheet-modal-window {
  padding: 0;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.88);
  box-shadow:
    0 16px 48px rgba(15, 25, 55, 0.28),
    0 4px 0 rgba(255, 255, 255, 0.45) inset;
  background: rgba(255, 255, 255, 0.98);
  overflow: hidden;
}

.bb-sheet.bb-sheet-stats.bb-sheet-modal-window {
  background: linear-gradient(180deg, #ffffff 0%, #f8faff 100%);
}

/* Ana menü Ses — beyaz yerine oyun mavisi */
.bb-sheet.bb-sheet-settings.bb-sheet-modal-window {
  background:
    radial-gradient(ellipse 120% 80% at 50% -8%, rgba(56, 189, 248, 0.28) 0%, transparent 55%),
    radial-gradient(ellipse 90% 55% at 100% 100%, rgba(168, 85, 247, 0.12) 0%, transparent 50%),
    linear-gradient(168deg, #1a3550 0%, #0f2840 38%, #071a28 100%);
  color: #e2e8f0;
  border: 1px solid rgba(56, 189, 248, 0.45);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.1) inset,
    0 20px 56px rgba(0, 12, 32, 0.58),
    0 0 40px rgba(56, 189, 248, 0.12);
}

.bb-modal-sheet-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.bb-sound-sheet-head-ico {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  flex-shrink: 0;
  color: #bae6fd;
  background: linear-gradient(145deg, rgba(56, 189, 248, 0.28) 0%, rgba(14, 116, 144, 0.2) 100%);
  border: 1px solid rgba(56, 189, 248, 0.42);
  box-shadow:
    0 4px 14px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.bb-sound-sheet-head-ico svg {
  display: block;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.45));
}

.bb-sheet.bb-sheet-settings .bb-settings-list--sound {
  gap: 10px;
  padding: 12px 16px 18px;
}

.bb-settings-row-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.bb-settings-label-ico {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.35) inset,
    0 5px 0 rgba(0, 0, 0, 0.22);
}

.bb-settings-label-ico--sfx {
  background: linear-gradient(158deg, rgba(14, 165, 233, 0.38) 0%, rgba(12, 55, 112, 0.55) 100%);
}

.bb-settings-label-ico--music {
  background: linear-gradient(158deg, rgba(192, 132, 252, 0.42) 0%, rgba(76, 29, 149, 0.52) 100%);
}

.bb-settings-label-ico svg {
  display: block;
}

.bb-sheet.bb-sheet-settings .bb-modal-sheet-head {
  border-bottom: 1px solid rgba(56, 189, 248, 0.24);
  background: linear-gradient(180deg, rgba(12, 74, 110, 0.5) 0%, rgba(6, 36, 54, 0.15) 100%);
}

.bb-sheet.bb-sheet-settings .bb-modal-sheet-title {
  color: #f0f9ff;
  text-shadow: 0 2px 14px rgba(56, 189, 248, 0.35);
}

.bb-sheet.bb-sheet-settings .bb-modal-sheet-close {
  border-color: rgba(248, 113, 113, 0.55);
  background: linear-gradient(180deg, #b91c1c 0%, #991b1b 100%);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.bb-sheet.bb-sheet-settings .bb-modal-sheet-close:hover {
  background: linear-gradient(180deg, #dc2626 0%, #b91c1c 100%);
  border-color: rgba(252, 165, 165, 0.75);
  color: #fff;
}

.bb-sheet.bb-sheet-settings .bb-modal-sheet-close:active {
  background: linear-gradient(180deg, #991b1b 0%, #7f1d1d 100%);
  border-color: rgba(248, 113, 113, 0.5);
}

.bb-sheet.bb-sheet-settings .bb-modal-sheet-close:focus-visible {
  outline: 2px solid #fca5a5;
  outline-offset: 2px;
}

.bb-sheet.bb-sheet-settings .bb-modal-sheet-intro {
  color: rgba(186, 230, 253, 0.85);
}

.bb-sheet.bb-sheet-settings .bb-modal-sheet-intro--sound {
  margin: 8px 16px 10px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(56, 189, 248, 0.22);
  background: rgba(0, 0, 0, 0.22);
  border-left: 3px solid rgba(56, 189, 248, 0.55);
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.45;
  color: rgba(186, 230, 253, 0.92);
}

.bb-sheet.bb-sheet-settings .bb-settings-item {
  padding: 16px 18px;
  border-radius: 18px;
  gap: 14px;
  min-height: 72px;
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.07) 0%, rgba(0, 0, 0, 0.2) 100%);
  border: 1px solid rgba(56, 189, 248, 0.2);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.28) inset;
}

.bb-sheet.bb-sheet-settings .bb-settings-item:hover {
  background: linear-gradient(155deg, rgba(56, 189, 248, 0.14) 0%, rgba(0, 0, 0, 0.12) 100%);
  border-color: rgba(56, 189, 248, 0.38);
}

.bb-sheet.bb-sheet-settings .bb-settings-label {
  color: #f1f5f9;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.bb-sheet.bb-sheet-settings .bb-switch-track {
  background: rgba(100, 116, 139, 0.45);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.4);
}

.bb-sheet.bb-sheet-settings .bb-switch-input:checked + .bb-switch-track {
  background: linear-gradient(180deg, #38bdf8 0%, #0369a1 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.bb-sheet.bb-sheet-settings .bb-switch-input:focus-visible + .bb-switch-track {
  outline-color: #38bdf8;
}

.bb-modal-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px 12px;
  border-bottom: 1px solid rgba(30, 45, 68, 0.1);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 255, 0.88) 100%);
}

.bb-modal-sheet-title {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: #1e2d44;
}

.bb-modal-sheet-close {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(30, 45, 68, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  color: #334155;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  transition:
    background 0.15s ease,
    border-color 0.15s ease;
}

.bb-modal-sheet-close:hover {
  background: rgba(30, 45, 68, 0.06);
  border-color: rgba(30, 45, 68, 0.2);
}

.bb-modal-sheet-intro {
  margin: 0;
  padding: 10px 16px 0;
  font-size: 0.74rem;
  font-weight: 600;
  color: #5a6b85;
  line-height: 1.4;
}

.bb-sheet-modal-window .bb-settings-list {
  padding: 12px 14px 16px;
}

.bb-sheet-modal-window .kk-stat-panel--menu {
  border-radius: 0;
  border: none;
  border-top: 1px solid rgba(107, 70, 193, 0.12);
}

/* Ana menü: Ses / İstatistik — açılır satır oku yok (pencere modu) */
.bb-details-menu-modal > summary.bb-btn {
  list-style: none;
}

.bb-details-menu-modal > summary.bb-btn::-webkit-details-marker {
  display: none;
}

.bb-details-menu-modal > summary.bb-btn::after {
  display: none;
}

.bb-sheet-profile--dark {
  border-radius: 22px;
  border: 1px solid rgba(149, 140, 220, 0.55);
  background: linear-gradient(168deg, #2d2b58 0%, #1e1c3d 42%, #121028 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 14px 40px rgba(8, 6, 24, 0.55);
  color: #eef1ff;
}

/* Sadece profil modalı — mavi tonlar, üstten yumuşak vurgu */
.bb-sheet-menu-profile.bb-sheet-profile--dark {
  border: 1px solid rgba(120, 200, 255, 0.4);
  background:
    radial-gradient(ellipse 130% 70% at 50% -15%, rgba(100, 190, 255, 0.22) 0%, transparent 52%),
    linear-gradient(168deg, #2e5588 0%, #214a78 28%, #183a5c 58%, #0e2844 82%, #081a2e 100%);
  box-shadow:
    inset 0 1px 0 rgba(200, 235, 255, 0.16),
    0 10px 36px rgba(0, 18, 45, 0.45);
  color: #e8f4ff;
}

/* Profil açılışı: boya/layout kapsamını daralt (backdrop + SVG ızgarası) */
#menu-profile-modal .bb-menu-modal-panel {
  contain: layout paint;
}

/* Liderlik tablosu — koyu mavi panel, mor çerçeve, podyum + hap satırlar */
.bb-sheet.bb-sheet-menu-race.bb-lb-v2-sheet {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  padding: 16px 12px 14px;
  border-radius: 22px;
  border: 3px solid #6a0dad;
  background: linear-gradient(180deg, #12186e 0%, #10145e 45%, #0c1048 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 0 1px rgba(106, 13, 173, 0.35),
    0 0 28px rgba(138, 43, 226, 0.45),
    0 0 48px rgba(80, 20, 160, 0.35),
    0 16px 40px rgba(0, 0, 0, 0.55);
  color: #fff;
  overflow: hidden;
  max-width: 100%;
  box-sizing: border-box;
}

.bb-lb-v2-head {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  align-items: start;
  gap: 6px;
  flex-shrink: 0;
  margin: 0 0 12px;
  padding-top: 2px;
  position: relative;
  z-index: 2;
  background: linear-gradient(180deg, #1b2238 0%, #151b2d 55%, #101525 100%);
  border-radius: 14px 14px 10px 10px;
  box-shadow: 0 10px 18px rgba(0, 8, 28, 0.28);
}

.bb-lb-v2-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 0 10px 6px;
  box-sizing: border-box;
  /* Kenar boşluğu: kendi satırı sarı outline / gölge kesilmesin */
  /* Tek bileşik kaydırma katmanı — çocuklarda translateZ kaldırıldı */
  transform: translate3d(0, 0, 0);
}

.bb-lb-v2-head-spacer {
  width: 40px;
  height: 40px;
}

.bb-lb-v2-head-titles {
  min-width: 0;
  text-align: center;
}

.bb-lb-v2-title {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.bb-lb-v2-sub {
  margin: 5px 0 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: rgba(220, 230, 255, 0.88);
  opacity: 0.9;
  line-height: 1.3;
}

.bb-lb-v2-close {
  justify-self: end;
  align-self: start;
  border: 2px solid rgba(252, 165, 165, 0.45);
  background: linear-gradient(180deg, #dc2626 0%, #b91c1c 100%);
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.35rem;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 2px 8px rgba(185, 28, 28, 0.45);
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.bb-lb-v2-close:hover {
  background: linear-gradient(180deg, #ef4444 0%, #dc2626 100%);
  border-color: rgba(254, 202, 202, 0.75);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    0 3px 12px rgba(239, 68, 68, 0.5);
}

.bb-lb-v2-close:active {
  background: linear-gradient(180deg, #991b1b 0%, #7f1d1d 100%);
  border-color: rgba(248, 113, 113, 0.4);
}

.bb-lb-v2-close:focus-visible {
  outline: 2px solid #fca5a5;
  outline-offset: 3px;
}

/* Podyum: 2 — 1 — 3 (dar ekranda taşma olmasın) */
.bb-lb-v2-podium {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: flex-end;
  gap: clamp(4px, 1.8vw, 10px);
  margin: 0 0 14px;
  /* Üstte kesilme olmasın (2–3. sıra madalyası tahta üstüne yakın) */
  padding: 10px 0 2px;
  min-height: min(188px, 38vh);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.bb-lb-podium-card {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  border-radius: clamp(14px, 3.5vw, 22px);
  padding: clamp(7px, 1.8vw, 10px) clamp(4px, 1.2vw, 8px) clamp(9px, 2vw, 12px);
  box-shadow:
    0 0 24px rgba(120, 200, 255, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
  /* Madalya / iç gölge kesilmesin */
  overflow: visible;
}

.bb-lb-podium-card--2,
.bb-lb-podium-card--3 {
  /* 1. ile aradaki farkı biraz kapat — isim alanı genişlesin */
  flex: 1.03 1 0;
  padding-left: clamp(5px, 1.4vw, 9px);
  padding-right: clamp(5px, 1.4vw, 9px);
}

.bb-lb-podium-card--empty {
  opacity: 0.55;
}

.bb-lb-podium-card--empty .bb-lb-podium-medal-num {
  filter: grayscale(0.4);
}

.bb-lb-podium-card--2 {
  min-height: min(158px, 36vh);
  /* Dar sütunda madalya + satır sıkışmasın */
  padding-top: clamp(9px, 2.2vw, 12px);
  background: linear-gradient(180deg, #e8eef5 0%, #b8c4d4 38%, #8a96a8 100%);
  color: #1a1f2e;
}

.bb-lb-podium-card--1 {
  flex: 1.05 1 0;
  min-height: min(198px, 42vh);
  z-index: 1;
  padding-bottom: clamp(10px, 2.5vw, 14px);
  /* Taç ile aynı palet: sarı → amber → turuncu (hafif yumuşak üst) */
  background: linear-gradient(180deg, #ffecb3 0%, #ffd54f 22%, #ffc107 48%, #f59e0b 74%, #d97706 100%);
  color: #2a1f0a;
  box-shadow:
    0 0 32px rgba(255, 200, 80, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.bb-lb-podium-card--3 {
  min-height: min(158px, 36vh);
  padding-top: clamp(9px, 2.2vw, 12px);
  background: linear-gradient(180deg, #e8b896 0%, #cd8b5c 42%, #a65d3a 100%);
  color: #2b1810;
}

.bb-lb-podium-card--self {
  outline: 3px solid rgba(255, 241, 118, 0.98);
  outline-offset: 2px;
  box-shadow:
    0 0 0 2px rgba(255, 235, 120, 0.55),
    0 0 26px rgba(255, 220, 100, 0.55),
    0 8px 24px rgba(0, 0, 0, 0.28);
  z-index: 2;
}

.bb-lb-podium-medal {
  width: clamp(34px, 9vw, 44px);
  height: clamp(34px, 9vw, 44px);
  margin: 0 auto 6px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.35rem;
  line-height: 1;
  flex-shrink: 0;
  box-shadow:
    0 4px 8px rgba(0, 0, 0, 0.25),
    inset 0 2px 4px rgba(255, 255, 255, 0.35);
}

.bb-lb-podium-medal-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.bb-lb-podium-card--2 .bb-lb-podium-medal,
.bb-lb-podium-card--3 .bb-lb-podium-medal {
  width: clamp(38px, 10vw, 48px);
  height: clamp(38px, 10vw, 48px);
  min-width: 38px;
  min-height: 38px;
  font-size: clamp(1.25rem, 4.2vw, 1.55rem);
}

.bb-lb-podium-card--2 .bb-lb-podium-medal {
  background: linear-gradient(145deg, #f5f7fa 0%, #9aa5b8 100%);
  color: #3d4555;
}

.bb-lb-podium-card--1 .bb-lb-podium-medal {
  background: linear-gradient(145deg, #fff8e1 0%, #ffc400 45%, #ff8f00 100%);
  color: #5d3f00;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
}

.bb-lb-podium-card--3 .bb-lb-podium-medal {
  background: linear-gradient(145deg, #deb887 0%, #a0522d 100%);
  color: #3d2318;
}

/* Grid: dar 2–3. sütunda flex + % max-width isim sütununu 0’a sıkıştırabiliyordu */
.bb-lb-podium-id-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  justify-items: stretch;
  column-gap: 6px;
  width: 100%;
  max-width: 100%;
  margin-bottom: 6px;
  box-sizing: border-box;
}

.bb-lb-podium-id-row .bb-lb-podium-id {
  margin-bottom: 0;
  min-width: 0;
  max-width: 100%;
  justify-self: stretch;
}

.bb-lb-podium-avatar {
  flex-shrink: 0;
  width: clamp(28px, 8vw, 36px);
  height: clamp(28px, 8vw, 36px);
  border-radius: 50%;
  overflow: hidden;
  isolation: isolate;
  transform: translateZ(0);
  background: radial-gradient(circle at 32% 26%, #f5f7fb 0%, #c5cdd8 52%, #8b95a8 100%);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.22);
}

.bb-lb-podium-avatar .bb-av-svg {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  isolation: isolate;
}

.bb-lb-podium-card--2 .bb-lb-podium-avatar,
.bb-lb-podium-card--3 .bb-lb-podium-avatar {
  width: clamp(30px, 8.2vw, 38px);
  height: clamp(30px, 8.2vw, 38px);
  min-width: 30px;
  min-height: 30px;
}

.bb-lb-podium-card--2 .bb-lb-podium-id,
.bb-lb-podium-card--3 .bb-lb-podium-id {
  font-size: clamp(0.72rem, 2.15vw, 0.84rem);
}

.bb-lb-podium-id {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-align: center;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-bottom: 6px;
  opacity: 0.95;
}

.bb-lb-podium-score {
  width: 100%;
  padding: 6px 8px;
  border-radius: 12px;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #0d2a5c 0%, #0a1f48 100%);
  color: #fff;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.35);
  margin-bottom: 8px;
}

.bb-lb-podium-card--1 .bb-lb-podium-score {
  margin-bottom: 4px;
}

.bb-lb-podium-crown {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin-top: 2px;
  margin-bottom: 0;
}

.bb-lb-podium-crown-svg {
  width: clamp(26px, 7vw, 36px);
  height: clamp(26px, 7vw, 36px);
  filter: drop-shadow(0 2px 4px rgba(120, 55, 10, 0.45));
}

.bb-lb-v2-list-wrap {
  position: relative;
}

.bb-lb-v2-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: none;
  overflow: visible;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bb-lb-v2-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  padding: 10px 12px 10px 16px;
  margin: 0;
  border-radius: 50px;
  background: #1e88e5;
  font-size: 0.82rem;
  font-weight: 800;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 2px 8px rgba(0, 40, 100, 0.25);
}

.bb-lb-v2-row-rank {
  flex-shrink: 0;
  min-width: 1.1em;
  font-size: 1.05rem;
  font-weight: 900;
  color: #ffcc00;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Kendi satırın: sıra numarası daha belirgin */
.bb-lb-v2-row-rank.bb-lb-v2-row-rank--you {
  min-width: 1.35em;
  padding: 4px 8px;
  margin: -2px 2px -2px 0;
  font-size: 1.18rem;
  line-height: 1;
  color: #1a237e;
  background: linear-gradient(180deg, #fff9c4 0%, #ffeb3b 55%, #ffc107 100%);
  border-radius: 10px;
  box-shadow:
    0 0 0 2px rgba(255, 213, 79, 0.95),
    0 2px 8px rgba(0, 0, 0, 0.25);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45);
}

.bb-lb-v2-row-avatar {
  flex-shrink: 0;
  width: clamp(28px, 7vw, 34px);
  height: clamp(28px, 7vw, 34px);
  border-radius: 50%;
  overflow: hidden;
  /* SVG katmanı eksik çizilirse bile daire tutarlı kalsın */
  background: radial-gradient(circle at 32% 26%, #f5f7fb 0%, #c5cdd8 52%, #8b95a8 100%);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.28);
}

.bb-lb-v2-row-avatar .bb-av-svg {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 100%;
  min-height: 100%;
}

.bb-lb-v2-row-id {
  flex: 1;
  min-width: 0;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bb-lb-v2-row-score-wrap {
  flex-shrink: 0;
  margin-left: auto;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(10, 40, 90, 0.55);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.25);
}

.bb-lb-v2-row-score {
  color: #fff;
  font-variant-numeric: tabular-nums;
  font-weight: 900;
}

.bb-lb-v2-row--self {
  outline: 3px solid rgba(255, 241, 118, 0.95);
  outline-offset: 0;
  margin-left: 2px;
  margin-right: 2px;
  background: linear-gradient(95deg, #1565c0 0%, #1e88e5 42%, #26c6da 100%);
  box-shadow:
    0 0 20px rgba(255, 235, 120, 0.45),
    0 4px 14px rgba(0, 60, 120, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.bb-lb-v2-foot-you {
  display: inline-block;
  margin-right: 8px;
  padding: 3px 10px;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #1a237e;
  background: linear-gradient(180deg, #fffde7 0%, #ffeb3b 100%);
  border-radius: 999px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.bb-lb-v2-foot-rank-block {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}

.bb-lb-v2-foot-rank-label {
  font-weight: 700;
  color: rgba(200, 210, 230, 0.88);
}

.bb-lb-v2-foot-rank-num {
  font-size: 1.05rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  color: #fff;
  text-shadow: 0 0 12px rgba(77, 208, 225, 0.65);
}

.bb-lb-v2-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  margin-top: 0;
  padding-top: 12px;
  font-size: 0.7rem;
  position: relative;
  z-index: 2;
  background: linear-gradient(0deg, #0e1248 0%, #10145e 45%, #12186e 100%);
  border-radius: 10px 10px 14px 14px;
  box-shadow: 0 -10px 18px rgba(0, 8, 40, 0.38);
}

.bb-lb-v2-foot-l {
  color: rgba(200, 200, 210, 0.75);
  font-weight: 600;
}

.bb-lb-v2-foot-r {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #4dd0e1;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.bb-lb-v2-foot-clock {
  flex-shrink: 0;
  opacity: 0.95;
}

.bb-lb-v2-empty {
  margin: 0;
  padding: 24px 12px;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.75);
}

/* Leaderboard premium polish (override) */
.bb-sheet.bb-sheet-menu-race.bb-lb-v2-sheet {
  position: relative;
  border: 1px solid rgba(167, 139, 250, 0.52);
  background:
    radial-gradient(120% 62% at 50% -8%, rgba(147, 197, 253, 0.18) 0%, transparent 56%),
    radial-gradient(110% 45% at 10% 100%, rgba(236, 72, 153, 0.12) 0%, transparent 58%),
    linear-gradient(160deg, #191b55 0%, #12143d 42%, #0b0d2a 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    0 14px 42px rgba(3, 6, 28, 0.72),
    0 0 28px rgba(96, 165, 250, 0.2);
}

.bb-sheet.bb-sheet-menu-race.bb-lb-v2-sheet::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.14), transparent 35%),
    radial-gradient(circle at 85% 8%, rgba(255, 255, 255, 0.15) 0%, transparent 32%);
  mix-blend-mode: screen;
}

.bb-lb-v2-head-titles {
  padding: 8px 14px;
  border-radius: 14px;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.bb-lb-v2-title {
  color: #f8fbff;
  letter-spacing: 0.03em;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.bb-lb-v2-sub {
  color: rgba(198, 221, 255, 0.92);
}

.bb-lb-v2-row {
  border: 1px solid rgba(147, 197, 253, 0.24);
  background:
    linear-gradient(100deg, rgba(59, 130, 246, 0.26) 0%, rgba(56, 189, 248, 0.2) 46%, rgba(14, 165, 233, 0.18) 100%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.88) 0%, rgba(15, 23, 42, 0.72) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 8px 18px rgba(2, 20, 54, 0.38);
}

.bb-lb-v2-row-score-wrap {
  border: 1px solid rgba(186, 230, 253, 0.28);
  background:
    linear-gradient(180deg, rgba(30, 64, 175, 0.55) 0%, rgba(15, 23, 42, 0.66) 100%);
}

.bb-lb-v2-row--self {
  border-color: rgba(253, 224, 71, 0.72);
  background:
    linear-gradient(96deg, rgba(30, 64, 175, 0.8) 0%, rgba(37, 99, 235, 0.78) 45%, rgba(14, 165, 233, 0.7) 100%),
    linear-gradient(180deg, rgba(30, 58, 138, 0.78) 0%, rgba(8, 47, 73, 0.78) 100%);
  box-shadow:
    0 0 0 1px rgba(254, 240, 138, 0.35),
    0 0 24px rgba(250, 204, 21, 0.33),
    0 8px 18px rgba(2, 20, 54, 0.45);
}

.bb-lb-v2-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.24);
  background:
    linear-gradient(0deg, rgba(11, 14, 43, 0.96) 0%, rgba(16, 20, 59, 0.94) 100%);
}

.bb-lb-podium-medal {
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.42),
    inset 0 -2px 4px rgba(0, 0, 0, 0.2),
    0 6px 14px rgba(0, 0, 0, 0.3);
}

.bb-lb-podium-medal-num {
  font-size: clamp(1.12rem, 3.8vw, 1.42rem);
  letter-spacing: 0.01em;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.35),
    0 2px 5px rgba(0, 0, 0, 0.35);
}

.bb-lb-podium-card--1 .bb-lb-podium-medal-num {
  color: #4a2a00;
}

.bb-lb-podium-card--2 .bb-lb-podium-medal-num {
  color: #273142;
}

.bb-lb-podium-card--3 .bb-lb-podium-medal-num {
  color: #412618;
}

.bb-profile-quick {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  list-style: none;
  cursor: pointer;
  font-family: inherit;
  background: transparent;
  border: none;
  padding: 0;
  color: inherit;
}

.bb-profile-quick::-webkit-details-marker {
  display: none;
}

.bb-profile-quick-frame {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 11px;
  overflow: hidden;
  flex-shrink: 0;
  isolation: isolate;
  /* Ses (mor kutu) + Yarış (camgöbeği çerçeve / parlama) */
  background:
    radial-gradient(ellipse 90% 55% at 30% 18%, rgba(255, 255, 255, 0.22) 0%, transparent 52%),
    linear-gradient(155deg, #6d28d9 0%, #4c1d95 28%, #312e81 55%, #1e1b4b 100%);
  border: 1px solid rgba(110, 210, 255, 0.88);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.35) inset,
    0 2px 0 rgba(49, 46, 129, 0.92),
    0 0 8px rgba(80, 190, 255, 0.45),
    0 4px 9px rgba(76, 29, 149, 0.5),
    0 6px 12px rgba(0, 0, 0, 0.42);
  transition:
    border-color 0.2s ease,
    box-shadow 0.22s ease,
    transform 0.2s ease,
    filter 0.2s ease;
}

.bb-profile-quick-silhouette {
  display: block;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
}

.bb-profile-quick:hover .bb-profile-quick-frame,
.bb-profile-quick:focus-visible .bb-profile-quick-frame {
  border-color: rgba(150, 235, 255, 0.98);
  filter: saturate(1.06);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.3) inset,
    0 2px 0 rgba(67, 56, 202, 0.88),
    0 0 12px rgba(100, 210, 255, 0.55),
    0 0 16px rgba(192, 132, 252, 0.35),
    0 6px 13px rgba(0, 0, 0, 0.48);
  transform: translateY(-1px);
}

.bb-details-menu-profile[open] .bb-profile-quick-frame {
  border-color: rgba(170, 240, 255, 0.95);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.28) inset,
    0 2px 0 rgba(91, 33, 182, 0.9),
    0 0 13px rgba(120, 220, 255, 0.5),
    0 0 18px rgba(168, 85, 247, 0.28),
    0 5px 11px rgba(0, 0, 0, 0.52);
}

.bb-profile-quick-label {
  font-size: 0.6rem;
  font-weight: 900;
  font-style: normal;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fef9c3;
  text-shadow:
    0 1px 0 rgba(120, 53, 15, 0.5),
    0 0 6px rgba(250, 204, 21, 0.4),
    0 1px 3px rgba(0, 0, 0, 0.45);
}

@media (prefers-reduced-motion: reduce) {
  .bb-profile-quick:hover .bb-profile-quick-frame,
  .bb-profile-quick:focus-visible .bb-profile-quick-frame {
    transform: none;
  }

  .bb-profile-av-btn:hover {
    transform: none;
  }
}

.bb-profile-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.bb-sheet-menu-profile .bb-profile-modal-head {
  border-bottom-color: rgba(120, 190, 255, 0.26);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, transparent 100%);
}

.bb-profile-modal-title {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-shadow: 0 2px 12px rgba(0, 30, 60, 0.45);
  color: #f2f9ff;
}

.bb-profile-modal-close {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid rgba(153, 27, 27, 0.55);
  border-radius: 50%;
  background: linear-gradient(180deg, #ef4444 0%, #dc2626 48%, #b91c1c 100%);
  color: #fff;
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow:
    0 3px 0 #991b1b,
    0 6px 14px rgba(185, 28, 28, 0.45);
  transition:
    filter 0.15s ease,
    transform 0.12s ease;
}

.bb-profile-modal-close:hover {
  filter: brightness(1.08);
}

.bb-profile-modal-close:active {
  transform: translateY(2px);
  box-shadow:
    0 1px 0 #991b1b,
    0 3px 10px rgba(185, 28, 28, 0.4);
}

.bb-profile-modal-close:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.bb-profile-top {
  position: relative;
  padding: 16px 16px 20px;
}

.bb-profile-top::before {
  content: "";
  position: absolute;
  inset: 10px 12px 14px;
  border-radius: 18px;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.05) 0%, rgba(0, 20, 45, 0.2) 100%);
  border: 1px solid rgba(100, 170, 230, 0.12);
  pointer-events: none;
  z-index: 0;
}

.bb-profile-top > * {
  position: relative;
  z-index: 1;
}

.bb-profile-identity-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(100, 170, 220, 0.14);
}

.bb-profile-preview-avatar {
  flex-shrink: 0;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid transparent;
  background:
    linear-gradient(145deg, #0a1220, #0a1220) padding-box,
    linear-gradient(135deg, #7ecbff 0%, #4a9fff 40%, #7c4dff 100%) border-box;
  background-clip: padding-box, border-box;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.1) inset,
    0 0 32px rgba(70, 190, 255, 0.45),
    0 10px 28px rgba(0, 15, 40, 0.55);
}

.bb-profile-preview-avatar .bb-av-svg {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.bb-profile-name-field {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

/* Liderlik / Yarış pill ile uyumlu */
.bb-profile-name-pill {
  flex: 1;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  min-width: 0;
  border-radius: 999px;
  overflow: hidden;
  border: 2px solid rgba(130, 160, 255, 0.5);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.1) inset,
    0 0 26px rgba(80, 140, 255, 0.32),
    0 4px 16px rgba(0, 0, 0, 0.4);
  background: linear-gradient(180deg, rgba(28, 42, 85, 0.96) 0%, rgba(14, 22, 52, 0.98) 100%);
}

.bb-profile-name-pill-left {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0) 42%),
    linear-gradient(145deg, rgba(95, 65, 165, 0.42) 0%, rgba(45, 35, 95, 0.55) 55%, rgba(25, 20, 60, 0.62) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.bb-profile-name-pill-ico {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(120, 170, 255, 0.22) 0%, rgba(60, 90, 180, 0.18) 100%);
  color: rgba(200, 210, 255, 0.96);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.bb-profile-name-pill-svg {
  display: block;
}

.bb-profile-name-pill-input {
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 10px 12px 10px 10px;
  border: none;
  border-left: 1px solid rgba(100, 80, 180, 0.35);
  border-radius: 0;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: rgba(200, 220, 255, 0.98);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0) 38%),
    linear-gradient(165deg, #1e3d7a 0%, #143060 40%, #0c2048 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    inset 0 -1px 0 rgba(0, 0, 0, 0.25);
}

.bb-profile-name-pill-input::placeholder {
  color: rgba(180, 200, 255, 0.45);
  font-weight: 700;
}

/* Kayıtlı özel ad yokken gösterilen Player 1, 2, … (saydam) */
.bb-profile-name-pill-input.bb-profile-name-pill-input--auto-name {
  color: rgba(200, 220, 255, 0.42);
  font-weight: 700;
}

.bb-profile-name-pill-input.bb-profile-name-pill-input--auto-name:focus {
  color: rgba(200, 220, 255, 0.55);
}

.bb-profile-name-pill-input:focus {
  outline: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0) 40%),
    linear-gradient(165deg, #1f4588 0%, #153a72 40%, #0e2858 100%);
}

.bb-profile-name-edit {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 2px solid rgba(80, 200, 255, 0.65);
  border-radius: 10px;
  cursor: pointer;
  font: inherit;
  color: rgba(190, 240, 255, 0.95);
  background: linear-gradient(180deg, rgba(30, 70, 120, 0.95) 0%, rgba(12, 40, 80, 0.98) 100%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.1) inset,
    0 0 18px rgba(60, 180, 255, 0.35),
    0 4px 12px rgba(0, 0, 0, 0.35);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.bb-profile-name-edit:hover {
  border-color: rgba(140, 235, 255, 0.95);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.14) inset,
    0 0 26px rgba(80, 210, 255, 0.5),
    0 4px 16px rgba(0, 0, 0, 0.35);
}

.bb-profile-avatar-section-title {
  margin: 0 0 10px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(200, 230, 255, 0.88);
  opacity: 0.95;
}

.bb-profile-avatar-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.bb-profile-av-btn {
  border: 2px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  padding: 3px;
  aspect-ratio: 1;
  overflow: hidden;
  background: linear-gradient(160deg, rgba(20, 40, 70, 0.85) 0%, rgba(8, 18, 38, 0.95) 100%);
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 4px 12px rgba(0, 10, 30, 0.35);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.18s ease;
}

.bb-profile-av-btn:hover {
  border-color: rgba(140, 210, 255, 0.55);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 0 20px rgba(80, 180, 255, 0.35),
    0 6px 16px rgba(0, 10, 30, 0.4);
  transform: translateY(-2px);
}

.bb-profile-av-btn--on {
  border-color: rgba(255, 220, 120, 0.98);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    0 0 0 2px rgba(255, 190, 60, 0.34),
    0 0 12px rgba(255, 193, 7, 0.24);
  transform: scale(1.03);
}

.bb-av-svg {
  shape-rendering: geometricPrecision;
}

.bb-profile-av-btn .bb-av-svg {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 50%;
}

.bb-av-svg text {
  user-select: none;
  pointer-events: none;
  text-rendering: geometricPrecision;
}

.bb-av-face {
  pointer-events: none;
  shape-rendering: geometricPrecision;
}

.bb-profile-save-btn {
  width: 100%;
  padding: 15px 18px;
  border: none;
  border-radius: 14px;
  font-weight: 900;
  font-size: 1rem;
  letter-spacing: 0.06em;
  cursor: pointer;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  background: linear-gradient(180deg, #ffb74d 0%, #ff9800 38%, #f57c00 72%, #e65100 100%);
  box-shadow:
    0 4px 0 #c66900,
    0 12px 32px rgba(255, 140, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transition:
    filter 0.15s ease,
    transform 0.12s ease;
}

.bb-profile-save-btn:hover {
  filter: brightness(1.05);
}

.bb-profile-save-btn:active {
  transform: translateY(3px);
  box-shadow:
    0 1px 0 #c66900,
    0 6px 18px rgba(255, 140, 0, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

@media (prefers-reduced-motion: reduce) {
  .overlay--game-over {
    animation: none;
  }

  .modal--game-over--anim,
  .modal--game-over--anim .modal-game-over__head,
  .modal--game-over--anim .modal-game-over__score {
    animation: none !important;
  }

  .board.board--line-burst {
    animation: none !important;
  }

  .score-pulse,
  .cell.gem-burst,
  .board-toast.board-toast--record.is-on,
  .game-stat--record-burst,
  .game-stat--record-burst .game-stat-crown,
  .game-stat--record-burst .game-stat-value,
  .board-toast.is-on,
  .score-delta.is-on,
  .board-wrap--defeat .board-frame,
  .board-wrap--defeat .board .cell.filled,
  .tray--defeat,
  .tray--defeat .tray-piece {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .game-stat--current {
    animation: none !important;
  }

  .game-stat-spark {
    animation: none !important;
  }

  .game-hud-stats {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  .tray-piece,
  .cell {
    transition: none !important;
  }

  .board.preview-valid .cell.preview.preview-blast {
    animation: none;
  }
}
