/* ==========================================================================
   Baklava Crush — Sarayın Büyülü Lezzetleri
   Beyaz mermer zemin · gümüş taban · altın işleme (aurum & argent)
   ========================================================================== */

:root {
  /* metaller */
  --gold: #c9a227;
  --gold-bright: #e8c766;
  --gold-deep: #8a6812;
  --gold-soft: #f7e9bb;
  --gold-light: #fff8e2;
  --silver: #b7c0cc;
  --silver-bright: #eef2f8;
  --silver-deep: #79848f;
  --silver-soft: #e7ecf3;

  /* zemin */
  --pearl: #fcfcfe;
  --pearl-2: #f4f6fa;
  --pearl-3: #e9edf4;
  --card: #ffffff;
  --card-2: #f1f4f9;

  /* metin */
  --ink: #2e3440;
  --ink-soft: #59616f;
  --ink-faint: #8a929e;

  --danger: #b8342f;
  --radius: 18px;
  --font-display: "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  --font-body: "Trebuchet MS", "Segoe UI", Tahoma, sans-serif;

  /* metal folyo dokuları */
  --foil-gold: linear-gradient(135deg, #fff6d6 0%, #e8c766 22%, #c9a227 45%, #8a6812 62%, #e8c766 82%, #fff6d6 100%);
  --foil-silver: linear-gradient(135deg, #ffffff 0%, #e7ecf3 22%, #b7c0cc 45%, #79848f 62%, #dfe6ef 82%, #ffffff 100%);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(1200px 680px at 10% -10%, #ffffff 0%, rgba(255,255,255,0) 62%),
    radial-gradient(900px 560px at 100% 0%, #fbf7ea 0%, rgba(251,247,234,0) 58%),
    radial-gradient(1200px 820px at 50% 120%, #eef1f7 0%, rgba(238,241,247,0) 64%),
    linear-gradient(180deg, #ffffff 0%, var(--pearl) 40%, var(--pearl-2) 100%);
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

h1, h2, h3 { font-family: var(--font-display); }

button { font-family: inherit; }

[hidden] { display: none !important; }

/* Mermer damarı + saray sıvası kabartması -------------------------------- */
.bg-pattern {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .55;
  z-index: 0;
  background-image:
    /* ince altın damask */
    radial-gradient(circle at 50% 50%, rgba(201, 162, 39, 0) 0 7px, rgba(201, 162, 39, .20) 7px 7.8px, rgba(201, 162, 39, 0) 8px 15px),
    radial-gradient(circle at 0 0, rgba(121, 132, 143, .16) 0 1.6px, transparent 1.6px 22px),
    radial-gradient(circle at 22px 22px, rgba(201, 162, 39, .13) 0 1.6px, transparent 1.6px 22px),
    /* hafif mermer bulutu */
    radial-gradient(ellipse 60% 40% at 18% 12%, rgba(214, 222, 234, .55), transparent 70%),
    radial-gradient(ellipse 50% 36% at 82% 78%, rgba(230, 233, 240, .6), transparent 72%);
  background-size: 44px 44px, 44px 44px, 44px 44px, 100% 100%, 100% 100%;
  mask-image: radial-gradient(ellipse at 50% 28%, #000 18%, rgba(0,0,0,.55) 62%, transparent 92%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 28%, #000 18%, rgba(0,0,0,.55) 62%, transparent 92%);
}

/* Uçuşan altın varak ve gümüş toz ---------------------------------------- */
.petals { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.petal {
  position: absolute;
  top: -30px;
  width: 10px;
  height: 7px;
  border-radius: 2px 40% 2px 40%;
  background: var(--foil-gold);
  opacity: .5;
  box-shadow: 0 0 8px rgba(232, 199, 102, .6);
  animation: petalFall linear infinite;
}
.petal:nth-child(3n) {
  background: var(--foil-silver);
  box-shadow: 0 0 8px rgba(214, 224, 236, .7);
  border-radius: 50%;
  width: 6px; height: 6px;
}
@keyframes petalFall {
  0%   { transform: translate3d(0, -5vh, 0) rotate(0deg); }
  100% { transform: translate3d(var(--drift, 60px), 108vh, 0) rotate(540deg); }
}

.screen { position: relative; z-index: 1; }

/* ==========================================================================
   ÜST BAR + CÜZDAN
   ========================================================================== */
.topbar,
.gamebar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 22px 10px;
  max-width: 1180px;
  margin: 0 auto;
}

.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }

.brand-mark {
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  filter: drop-shadow(0 6px 12px rgba(120, 70, 40, .28));
  transition: transform .3s ease;
}
.brand:hover .brand-mark { transform: rotate(-8deg) scale(1.05); }
.brand-mark svg { width: 100%; height: 100%; display: block; }

.brand-text h1 {
  font-size: clamp(1.5rem, 3vw, 2.05rem);
  letter-spacing: .02em;
  margin: 0;
  line-height: 1.05;
  background: linear-gradient(180deg, #f6e2a0 0%, #c9a227 42%, #8a6812 62%, #e8c766 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 1px 0 #fff) drop-shadow(0 2px 3px rgba(138, 104, 18, .22));
}

.brand-text p {
  margin: 3px 0 0;
  font-size: .7rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--silver-deep);
}

/* Cüzdan — gümüş zemin, altın yazı */
.wallet { display: flex; gap: 8px; margin-left: auto; flex-wrap: wrap; }

.wallet-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: 99px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.98), rgba(233,238,246,.96) 62%, rgba(214,222,233,.96));
  border: 1px solid rgba(201, 162, 39, .55);
  font-size: .85rem;
  font-weight: 700;
  color: var(--gold-deep);
  box-shadow:
    inset 0 1px 0 #fff,
    inset 0 -1px 0 rgba(160,172,188,.5),
    0 5px 12px rgba(120, 135, 160, .18);
  white-space: nowrap;
}
.wallet-pill .w-icon { font-size: .95rem; line-height: 1; }
.wallet-pill.lives .w-icon { color: #c0392b; filter: drop-shadow(0 1px 1px rgba(255,255,255,.9)); }
.wallet-pill.coins .w-icon { filter: saturate(1.15) drop-shadow(0 1px 1px rgba(138,104,18,.35)); }
.wallet-pill.stars .w-icon { color: var(--gold); filter: drop-shadow(0 1px 1px rgba(255,255,255,.9)); }
.wallet-pill b { font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.life-timer {
  font-style: normal;
  font-size: .7rem;
  font-weight: 700;
  color: var(--silver-deep);
  font-variant-numeric: tabular-nums;
}
.life-timer:empty { display: none; }

.top-actions,
.gamebar-actions { display: flex; gap: 8px; align-items: center; }

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(201, 162, 39, .6);
  background: linear-gradient(180deg, #ffffff, #eef2f8 58%, #dbe2ec);
  color: var(--gold-deep);
  font-size: 1rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform .16s ease, background .16s ease, box-shadow .16s ease;
  box-shadow:
    inset 0 1px 0 #fff,
    inset 0 -1px 0 rgba(160,172,188,.55),
    0 5px 12px rgba(120, 135, 160, .18);
}
.icon-btn:hover { background: #fff; transform: translateY(-2px); box-shadow: 0 10px 20px rgba(120, 135, 160, .24), inset 0 1px 0 #fff; }
.icon-btn:active { transform: scale(.94); }
.icon-btn.muted { color: rgba(121, 132, 143, .45); }
.icon-btn.on-gold {
  background: var(--foil-gold);
  color: #5c4408;
  border-color: rgba(138, 104, 18, .5);
}

/* ==========================================================================
   SARAY HARİTASI
   ========================================================================== */
.map-head {
  max-width: 1180px;
  margin: 6px auto 4px;
  padding: 0 22px 6px;
  text-align: center;
}
.map-title {
  margin: 0;
  font-size: clamp(1.3rem, 2.6vw, 1.8rem);
  color: var(--ink);
  letter-spacing: .04em;
}
.map-sub {
  margin: 4px 0 0;
  font-size: .84rem;
  color: rgba(108, 66, 44, .62);
  font-style: italic;
  font-family: var(--font-display);
}

.map-scroll {
  max-width: 1180px;
  margin: 0 auto;
  padding: 6px 22px 30px;
  max-height: calc(100vh - 190px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
.map-scroll::-webkit-scrollbar { width: 8px; }
.map-scroll::-webkit-scrollbar-thumb {
  background: rgba(190, 143, 70, .4);
  border-radius: 99px;
}

.region {
  position: relative;
  margin: 0 0 26px;
  padding: 18px 16px 12px;
  border-radius: 24px;
  border: 1px solid rgba(201, 162, 39, .42);
  background:
    linear-gradient(165deg, rgba(255,255,255,.98), rgba(240,244,250,.96) 58%, rgba(228,234,243,.94));
  box-shadow:
    inset 0 1px 0 #fff,
    inset 0 0 0 4px rgba(255,255,255,.55),
    0 14px 34px rgba(120, 135, 160, .18);
  overflow: hidden;
}
.region::after {
  content: "";
  position: absolute;
  inset: auto -40px -70px auto;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  border: 1px dashed rgba(201, 162, 39, .34);
  pointer-events: none;
  z-index: 0;
  opacity: .6;
}
.region.locked { opacity: .8; }
.region.locked::before {
  content: "🔒";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 2.2rem;
  background: rgba(252, 252, 254, .66);
  backdrop-filter: blur(2px);
  z-index: 5;
  border-radius: 24px;
}

.region-head { text-align: center; position: relative; z-index: 1; }
.region-badge {
  display: inline-block;
  font-size: .68rem;
  letter-spacing: .16em;
  font-weight: 700;
  color: #5c4408;
  background: var(--foil-gold);
  border: 1px solid rgba(138, 104, 18, .45);
  border-radius: 99px;
  padding: 3px 12px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.85), 0 2px 6px rgba(138,104,18,.18);
}
.region-head h2 {
  margin: 8px 0 2px;
  font-size: 1.35rem;
  color: var(--gold-deep);
  text-shadow: 0 1px 0 #fff;
}
.region-head p {
  margin: 0;
  font-size: .8rem;
  color: var(--ink-faint);
  font-style: italic;
  font-family: var(--font-display);
}
.region-stats {
  display: flex;
  gap: 14px;
  justify-content: center;
  margin-top: 6px;
  font-size: .74rem;
  color: var(--silver-deep);
  font-weight: 700;
}
.region-stats span:first-child { color: var(--gold-deep); }

/* yol */
.path {
  position: relative;
  list-style: none;
  margin: 14px auto 0;
  padding: 0;
  max-width: 660px;
}

.path-row {
  position: relative;
  height: 76px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.path-row::before {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  top: 50%;
  height: 4px;
  transform: translateY(-50%);
  background-image: linear-gradient(90deg, rgba(190, 143, 70, .3) 0 7px, transparent 7px 16px);
  background-size: 16px 4px;
  background-repeat: repeat-x;
  pointer-events: none;
  border-radius: 2px;
}
.path-row.rtl::before {
  background-image: linear-gradient(90deg, rgba(190, 143, 70, .3) 0 7px, transparent 7px 16px);
}

/* satır geçişlerinde dikey bağ */
.path-row:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 4px;
  height: 76px;
  background-image: linear-gradient(180deg, rgba(190, 143, 70, .3) 0 7px, transparent 7px 16px);
  background-size: 4px 16px;
  background-repeat: repeat-y;
  pointer-events: none;
  border-radius: 2px;
}
.path-row.ltr:not(:last-child)::after { right: 8%; }
.path-row.rtl:not(:last-child)::after { left: 8%; }

.node {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  justify-content: center;
  z-index: 2;
}

.node button {
  position: relative;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 2px solid rgba(201, 162, 39, .5);
  background:
    radial-gradient(circle at 34% 24%, #ffffff 0%, #f1f4f9 48%, #dbe2ec 100%);
  color: var(--gold-deep);
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
  box-shadow:
    inset 0 1px 0 #fff,
    inset 0 -2px 4px rgba(160,172,188,.45),
    0 6px 14px rgba(120, 135, 160, .22);
  transition: transform .16s ease, box-shadow .16s ease;
}
.node button:hover { transform: translateY(-3px) scale(1.06); box-shadow: 0 12px 22px rgba(120, 135, 160, .28), inset 0 1px 0 #fff; }
.node button:active { transform: scale(.96); }

.node-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.02rem;
  line-height: 1;
  margin-top: -6px;
  text-shadow: 0 1px 0 #fff;
}
.node-stars {
  position: absolute;
  bottom: 5px;
  left: 0;
  right: 0;
  font-size: .58rem;
  letter-spacing: 1px;
  color: var(--gold);
  text-shadow: 0 1px 0 #fff;
}
.node.done button {
  background: radial-gradient(circle at 34% 24%, #fffdf4 0%, #f6e6b4 48%, #e0c274 100%);
  border-color: var(--gold);
}
.node.current button {
  background: var(--foil-gold);
  color: #4a3606;
  border-color: #8a6812;
  box-shadow:
    0 0 0 4px rgba(201, 162, 39, .22),
    0 0 22px rgba(232, 199, 102, .75),
    0 10px 22px rgba(138, 104, 18, .3),
    inset 0 1px 0 rgba(255,255,255,.9);
  animation: nodePulse 2.4s ease-in-out infinite;
}
.node.current .node-num { text-shadow: 0 1px 0 rgba(255,255,255,.6); }
@keyframes nodePulse {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}
.node.locked button {
  background: linear-gradient(170deg, #f7f9fc, #e4e9f1);
  border-color: rgba(160, 172, 188, .4);
  color: rgba(121, 132, 143, .62);
  cursor: not-allowed;
  box-shadow: inset 0 1px 0 #fff;
}
.node.locked .node-stars { color: rgba(160, 172, 188, .35); }

.node.hard button { border-color: #a8493c; }
.node-skull {
  position: absolute;
  top: -8px;
  right: -6px;
  font-size: .8rem;
  background: #fff;
  border: 1px solid rgba(168, 73, 60, .55);
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  color: #a8493c;
}
.node.boss button {
  border-color: #8a6812;
  box-shadow: 0 0 0 4px rgba(201, 162, 39, .25), 0 0 20px rgba(232,199,102,.6), 0 10px 22px rgba(138, 104, 18, .28);
}
.node-crown {
  position: absolute;
  top: -10px;
  right: -8px;
  font-size: .9rem;
  color: #5c4408;
  background: var(--foil-gold);
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(138, 104, 18, .5);
}

.path-tip {
  text-align: center;
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(150, 110, 60, .75);
  margin-top: 6px;
}

/* alt bilgi */
.footer {
  text-align: center;
  padding: 0 22px 26px;
  font-size: .72rem;
  color: rgba(108, 66, 44, .55);
  letter-spacing: .06em;
}
.ornament-row {
  display: flex; align-items: center; justify-content: center;
  gap: 10px; margin-bottom: 10px; opacity: .8;
}
.orn-line {
  height: 1px; flex: 1 1 auto; max-width: 220px;
  background: linear-gradient(90deg, transparent, rgba(190, 143, 70, .55), transparent);
}
.orn-dot { color: rgba(168, 118, 47, .8); font-size: .6rem; }
.orn-lokum {
  width: 18px; height: 16px; border-radius: 5px;
  background: linear-gradient(150deg, #ffd8b4, #cf9143);
  box-shadow: 0 0 0 1.5px rgba(190, 143, 70, .55), 0 0 12px rgba(217, 164, 74, .4);
  transform: rotate(-6deg);
}
.footer p { margin: 0; }

/* ==========================================================================
   OYUN EKRANI
   ========================================================================== */
/* ==========================================================================
   OYUN EKRANI — dikey akış (mobil)
   ========================================================================== */
/* Oyun ekranı tam yüksekliği kullanır: tahta ortada, joker çubuğu altta
   sabitlenir. Böylece ekranın altında boş alan kalmaz ve tahta olabildiğince
   büyük görünür (tahta genişlikle sınırlı olduğu için dikey alan tahtaya
   değil, çevresine yarar). */
.game-screen {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}
.game-screen[hidden] { display: none; }
/* KRİTİK: flex sütunda `margin: 0 auto` öğeyi içeriğe göre büzer ve 1fr
   tahta sütunu 0'a çöker — genişliği açıkça veriyoruz. */
.game-screen .play-area {
  flex: 1 1 auto;
  width: 100%;
  align-content: center;   /* dikeyde ortala: alt/üst boşluk dengelenir */
}
.game-screen > .booster-bar { flex: 0 0 auto; align-self: stretch; }

.gamebar {
  padding: 12px 18px 6px;
  gap: 10px;
}
.icon-btn.back { font-size: 1.15rem; }

.gamebar-title {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.gb-level {
  font-size: .66rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold-deep);
  font-weight: 700;
}
.gb-level b { font-size: .8rem; }
.gb-name {
  font-family: var(--font-display);
  font-size: 1.02rem;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gamebar-actions { margin-left: auto; }
.gamebar .wallet-pill { padding: 5px 10px; font-size: .78rem; gap: 5px; }

.play-area {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr) 210px;
  gap: 16px;
  align-items: start;
  max-width: 1120px;
  margin: 0 auto;
  padding: 4px 18px 0;
}

/* HUD sütunu */
.hud-rail { display: flex; flex-direction: column; gap: 10px; padding-top: 6px; }

.hud-card {
  position: relative;
  background:
    linear-gradient(165deg, #ffffff 0%, #f2f5fa 52%, #dfe5ee 100%);
  border: 1px solid rgba(201, 162, 39, .5);
  border-radius: 14px;
  padding: 10px 12px 9px;
  box-shadow:
    inset 0 1px 0 #fff,
    inset 0 0 0 3px rgba(255, 255, 255, .5),
    inset 0 -1px 0 rgba(150, 162, 178, .45),
    0 8px 18px rgba(120, 135, 160, .18);
}
.hud-card::before {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 10px;
  border: 1px solid rgba(201, 162, 39, .22);
  pointer-events: none;
}
.hud-label {
  display: block;
  font-size: .6rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--silver-deep);
  font-weight: 700;
}
.hud-value {
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 1.15;
  color: var(--gold-deep);
  display: block;
  white-space: nowrap;
  text-shadow: 0 1px 0 #fff;
}
.hud-sub {
  display: block;
  font-size: .66rem;
  color: var(--ink-faint);
}
#movesCard .hud-value { color: var(--gold-deep); }
#movesCard.low .hud-value { color: var(--danger); animation: lowPulse 1s ease-in-out infinite; }
@keyframes lowPulse { 50% { transform: scale(1.07); } }

.progress {
  position: relative;
  height: 7px;
  border-radius: 99px;
  background: linear-gradient(180deg, rgba(160,172,188,.35), rgba(255,255,255,.7));
  border: 1px solid rgba(150, 162, 178, .45);
  margin: 8px 0 2px;
  box-shadow: inset 0 1px 2px rgba(120,135,160,.3);
}
.progress i {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  border-radius: 99px;
  background: var(--foil-gold);
  box-shadow: 0 0 10px rgba(232, 199, 102, .85), inset 0 1px 0 rgba(255,255,255,.7);
  transition: width .45s cubic-bezier(.2, .8, .3, 1);
}
.progress-flag {
  position: absolute;
  right: -1px; top: 50%;
  width: 8px; height: 8px;
  transform: translateY(-50%) rotate(45deg);
  background: var(--foil-silver);
  border: 1px solid rgba(121,132,143,.6);
  border-radius: 2px;
  box-shadow: 0 0 6px rgba(255,255,255,.9);
}

/* Tahta */
.board-column { display: flex; flex-direction: column; align-items: center; min-width: 0; }

/* Gümüş taban · altın işleme çerçeve */
.board-frame {
  position: relative;
  /* Tahta kare olduğu için genişlik = yükseklik. Hem sütun genişliğine hem
     de kalan ekran yüksekliğine göre sınırlanır; hangisi küçükse o geçerli.
     290px = üst bar + HUD şeridi + hedefler satırı + joker çubuğu + boşluk */
  width: min(100%, 540px, calc(100dvh - 290px));
  padding: 15px;
  border-radius: 28px;
  background:
    linear-gradient(145deg, #ffffff 0%, #dfe6ef 18%, #aab5c3 42%, #f4f7fb 58%, #c9d2dd 78%, #ffffff 100%);
  box-shadow:
    0 0 0 1px rgba(121, 132, 143, .5),
    0 0 0 5px rgba(255, 255, 255, .85),
    0 0 0 6px rgba(201, 162, 39, .55),
    0 0 26px rgba(232, 199, 102, .28),
    0 24px 54px rgba(120, 135, 160, .34),
    inset 0 2px 0 rgba(255, 255, 255, .95);
}
.board-frame::before {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 22px;
  border: 1.5px solid rgba(201, 162, 39, .75);
  box-shadow:
    inset 0 0 0 3px rgba(255,255,255,.75),
    inset 0 0 0 4px rgba(121,132,143,.35),
    0 0 12px rgba(232, 199, 102, .35);
  pointer-events: none;
}
.board-frame::after {
  content: "";
  position: absolute;
  inset: 13px;
  border-radius: 18px;
  border: 1px solid rgba(201, 162, 39, .35);
  pointer-events: none;
}

.frame-corner {
  position: absolute;
  width: 26px; height: 26px;
  border: 2px solid var(--gold);
  filter: drop-shadow(0 1px 0 rgba(255,255,255,.9));
  z-index: 3;
  pointer-events: none;
}
.frame-corner.tl { top: 3px; left: 3px; border-right: 0; border-bottom: 0; border-radius: 14px 0 0 0; }
.frame-corner.tr { top: 3px; right: 3px; border-left: 0; border-bottom: 0; border-radius: 0 14px 0 0; }
.frame-corner.bl { bottom: 3px; left: 3px; border-right: 0; border-top: 0; border-radius: 0 0 0 14px; }
.frame-corner.br { bottom: 3px; right: 3px; border-left: 0; border-top: 0; border-radius: 0 0 14px 0; }

/* Sedefli tahta zemini */
.board {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 18px;
  background:
    radial-gradient(120% 90% at 50% -10%, #ffffff 0%, #f7f9fc 46%, #eaeef5 78%, #dee4ed 100%);
  box-shadow:
    inset 0 0 0 1px rgba(201, 162, 39, .35),
    inset 0 2px 10px rgba(255,255,255,.95),
    inset 0 -10px 26px rgba(150, 165, 190, .28),
    inset 0 0 0 6px rgba(255,255,255,.4);
  overflow: hidden;
  touch-action: none;
}
.board::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(150, 163, 184, .2) 1px, transparent 1px),
    linear-gradient(90deg, rgba(150, 163, 184, .2) 1px, transparent 1px),
    radial-gradient(circle at 50% 50%, rgba(201,162,39,.07) 0 1px, transparent 1.4px);
  background-size:
    calc(100% / var(--cols, 8)) calc(100% / var(--rows, 8)),
    calc(100% / var(--cols, 8)) calc(100% / var(--rows, 8)),
    16px 16px;
  pointer-events: none;
}
.board-shine {
  position: absolute;
  inset: 15px;
  border-radius: 18px;
  pointer-events: none;
  background:
    linear-gradient(118deg, rgba(255, 255, 255, .95) 0%, rgba(255,255,255,0) 30%),
    radial-gradient(60% 40% at 80% 100%, rgba(201,162,39,.12), transparent 70%);
  mix-blend-mode: soft-light;
}

.board-caption {
  height: 34px;
  display: grid;
  place-items: center;
  margin-top: 6px;
}
.combo-label {
  font-family: var(--font-display);
  font-size: 1.06rem;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--gold-deep);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .25s ease, transform .25s ease;
  text-shadow:
    0 1px 0 #fff,
    0 0 14px rgba(255, 248, 226, .95),
    0 0 26px rgba(232, 199, 102, .6);
}
.combo-label.show { opacity: 1; transform: translateY(0); }

.booster-hint {
  margin: 0;
  min-height: 18px;
  font-size: .76rem;
  color: var(--gold-deep);
  text-align: center;
  opacity: 0;
  transition: opacity .2s ease;
}
.booster-hint.show { opacity: 1; }

/* ==========================================================================
   KAROLAR
   ========================================================================== */
.tile {
  position: absolute;
  width: calc(100% / var(--cols, 8));
  height: calc(100% / var(--rows, 8));
  top: 0; left: 0;
  display: grid;
  place-items: center;
  transition: transform .26s cubic-bezier(.22, .9, .3, 1.15);
  will-change: transform;
  cursor: pointer;
  touch-action: none;
  z-index: 1;
}

.tile img {
  width: 91%;
  height: 91%;
  display: block;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  filter:
    drop-shadow(0 1px 1px rgba(90, 80, 60, .25))
    drop-shadow(0 7px 8px rgba(110, 120, 140, .28))
    drop-shadow(0 0 8px rgba(255, 255, 255, .9));
  transition: transform .16s ease;
}
.tile:hover img { transform: scale(1.05); }

/* taşın altında ince gümüş kaide gölgesi */
.tile.candy::before {
  content: "";
  position: absolute;
  left: 14%; right: 14%;
  bottom: 8%;
  height: 16%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(120, 132, 150, .3), rgba(120, 132, 150, 0) 72%);
  pointer-events: none;
  z-index: 0;
}

.tile.selected { z-index: 4; }
.tile.selected img {
  animation: tileBob .7s ease-in-out infinite;
  filter:
    drop-shadow(0 0 14px rgba(255, 236, 158, 1))
    drop-shadow(0 0 26px rgba(232, 199, 102, .85))
    drop-shadow(0 6px 7px rgba(110, 120, 140, .3));
}
@keyframes tileBob {
  0%, 100% { transform: scale(1.05) rotate(-2deg); }
  50%      { transform: scale(1.13) rotate(2deg); }
}

.tile.cursor { z-index: 4; }
.tile.cursor::after {
  content: "";
  position: absolute;
  inset: 5%;
  border-radius: 50%;
  border: 2px dashed rgba(255, 226, 160, .95);
}

.tile.pop { z-index: 3; pointer-events: none; }
.tile.pop img { animation: tilePop .3s ease-in forwards; }
@keyframes tilePop {
  0%   { transform: scale(1.08) rotate(0deg); opacity: 1; }
  40%  { transform: scale(1.24) rotate(6deg); opacity: 1; }
  100% { transform: scale(.15) rotate(-24deg); opacity: 0; }
}

.tile.spawn img { animation: tileSpawn .34s cubic-bezier(.2, 1.4, .5, 1); }
@keyframes tileSpawn {
  0%   { transform: scale(.35); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.tile.hint img { animation: tileHint .8s ease-in-out 2; }
@keyframes tileHint {
  0%, 100% { transform: scale(1) rotate(0); }
  30%      { transform: scale(1.14) rotate(-5deg); }
  60%      { transform: scale(1.14) rotate(5deg); }
}

.tile.special img {
  filter:
    drop-shadow(0 0 12px rgba(255, 236, 158, .95))
    drop-shadow(0 0 22px rgba(232, 199, 102, .6))
    drop-shadow(0 6px 7px rgba(110, 120, 140, .3));
}

/* Pudra şekeri — tatlıyı örtmeyen buzlu film (açık zeminde şeffaf) */
.tile .jelly {
  position: absolute;
  inset: 2%;
  border-radius: 26%;
  pointer-events: none;
  z-index: 2;
  border: 2px solid rgba(255, 255, 255, .95);
  background:
    linear-gradient(160deg, rgba(226, 245, 255, .5), rgba(184, 219, 245, .32) 60%, rgba(158, 203, 236, .42));
  box-shadow:
    inset 0 0 8px rgba(255, 255, 255, .9),
    inset 0 -3px 8px rgba(140, 185, 220, .3),
    0 0 10px rgba(180, 220, 250, .5);
  backdrop-filter: blur(.3px);
}
.tile .jelly::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 24%;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, .95) 0 1.5px, transparent 1.7px),
    radial-gradient(circle, rgba(255, 255, 255, .7) 0 1.1px, transparent 1.3px);
  background-size: 12px 12px, 17px 17px;
  background-position: 0 0, 6px 7px;
  opacity: .85;
}
.tile .jelly::after {
  content: "";
  position: absolute;
  inset: 7% 9% 58% 11%;
  border-radius: 50%;
  background: rgba(255, 255, 255, .75);
  filter: blur(1.4px);
}
/* ikinci kat: daha kalın buz, çift kenar */
.tile .jelly-2 {
  inset: 0%;
  border-width: 2.5px;
  border-color: rgba(255, 255, 255, .95);
  background:
    linear-gradient(160deg, rgba(240, 250, 255, .34), rgba(198, 230, 250, .22) 55%, rgba(166, 208, 238, .28));
  box-shadow:
    inset 0 2px 7px rgba(255, 255, 255, .95),
    inset 0 0 0 2px rgba(255, 255, 255, .6),
    inset 0 -5px 12px rgba(130, 180, 220, .28),
    0 0 12px rgba(200, 232, 255, .55);
}
/* tatlı jölenin üstünde dursun */
.tile.candy img { position: relative; z-index: 1; }

/* Zincir — gümüş halkalar */
.tile .chain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  border-radius: 26%;
  background:
    linear-gradient(45deg, transparent 45.5%, rgba(150, 162, 178, .95) 45.5% 54.5%, transparent 54.5%),
    linear-gradient(-45deg, transparent 45.5%, rgba(150, 162, 178, .95) 45.5% 54.5%, transparent 54.5%);
  background-size: 100% 100%;
  box-shadow:
    inset 0 0 0 3px rgba(184, 195, 209, .95),
    inset 0 1px 0 rgba(255,255,255,.95),
    inset 0 0 12px rgba(90, 102, 120, .5),
    0 0 10px rgba(255,255,255,.5);
  opacity: .97;
}
.tile .chain::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 26%;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, .8) 0%, rgba(255,255,255,0) 38%),
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, .55), transparent 55%);
}

/* Kaya şekeri — gümüş damarlı mermer */
.tile.blocker { cursor: default; z-index: 2; }
.rock-shape {
  width: 78%;
  height: 78%;
  border-radius: 26% 34% 30% 32%;
  background:
    radial-gradient(circle at 32% 26%, rgba(255, 255, 255, .95), transparent 46%),
    repeating-linear-gradient(120deg, rgba(150, 162, 178, .32) 0 3px, rgba(255, 255, 255, .5) 3px 9px),
    linear-gradient(160deg, #f6f8fb, #cfd7e2 55%, #9aa6b5);
  box-shadow:
    inset 0 -4px 10px rgba(90, 102, 120, .45),
    inset 0 2px 0 rgba(255,255,255,.95),
    0 5px 12px rgba(110, 122, 140, .4);
  border: 2px solid rgba(255, 255, 255, .85);
}
.tile.rock .rock-shape { filter: saturate(.95); }
.tile.rock-1 .rock-shape { transform: scale(.94); opacity: .94; }
.tile.rock-1 .rock-shape::after {
  content: "";
  position: absolute;
  inset: 20%;
  border-top: 2px solid rgba(121, 132, 143, .7);
  transform: rotate(-24deg);
}

/* Karamel barikat — altın şerbet akıntısı */
.caramel-fill {
  width: 96%;
  height: 96%;
  border-radius: 22%;
  background:
    radial-gradient(circle at 30% 24%, rgba(255, 246, 214, .85), transparent 42%),
    radial-gradient(circle at 72% 70%, rgba(138, 104, 18, .45), transparent 58%),
    linear-gradient(155deg, #f0c96a, #c9a227 55%, #8a6812);
  box-shadow:
    inset 0 -6px 14px rgba(90, 68, 8, .5),
    inset 0 4px 8px rgba(255, 246, 214, .55),
    0 5px 12px rgba(138, 104, 18, .35);
  border: 1px solid rgba(255, 246, 214, .7);
}

/* Malzeme (kaymak) */
.ing-shape {
  width: 62%;
  height: 62%;
  border-radius: 50% 50% 46% 46%;
  background:
    radial-gradient(circle at 34% 28%, #ffffff 0%, #fdf7ee 45%, #e8d6bc 78%, #c9b294 100%);
  box-shadow: inset 0 -5px 10px rgba(150, 120, 80, .4), 0 5px 12px rgba(0, 0, 0, .5);
  border: 2px solid rgba(255, 255, 255, .8);
  position: relative;
}
.ing-shape::after {
  content: "";
  position: absolute;
  left: 18%; right: 18%; top: 30%;
  height: 26%;
  border-radius: 50%;
  background: rgba(255, 255, 255, .9);
  filter: blur(1px);
}
.tile.ingredient { cursor: default; z-index: 2; }

/* efekt katmanı & puan yazısı */
.fx-layer {
  position: absolute;
  inset: 0;
  z-index: 8;
  pointer-events: none;
  border-radius: 16px;
}

.float-score {
  position: absolute;
  z-index: 9;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: #7a5c08;
  text-shadow:
    0 1px 0 #fff,
    0 0 3px #fff,
    0 0 14px rgba(255, 248, 226, .95),
    0 2px 4px rgba(120, 100, 40, .25);
  pointer-events: none;
  transform: translate(-50%, -50%);
  animation: floatUp .85s ease-out forwards;
  white-space: nowrap;
}
@keyframes floatUp {
  0%   { opacity: 0; transform: translate(-50%, -20%) scale(.7); }
  20%  { opacity: 1; transform: translate(-50%, -60%) scale(1.06); }
  100% { opacity: 0; transform: translate(-50%, -170%) scale(.95); }
}

/* ==========================================================================
   HEDEF SÜTUNU
   ========================================================================== */
.goals-rail {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 6px;
  min-width: 0;
}
.rail-title {
  margin: 0;
  font-size: .68rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gold-deep);
}

.goal-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }

.goal {
  display: flex;
  gap: 9px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 12px;
  background: linear-gradient(160deg, #ffffff, #eef2f8 60%, #e2e8f1);
  border: 1px solid rgba(201, 162, 39, .45);
  box-shadow:
    inset 0 1px 0 #fff,
    inset 0 0 0 2px rgba(255,255,255,.55),
    0 6px 14px rgba(120, 135, 160, .16);
}
.goal.done {
  border-color: rgba(201, 162, 39, .85);
  background: linear-gradient(160deg, #fffdf3, #f8edc8 60%, #efdfa4);
}

.goal-icon {
  width: 30px; height: 30px;
  flex: 0 0 auto;
  display: grid; place-items: center;
  border-radius: 9px;
  font-size: .9rem;
  background: linear-gradient(180deg, #ffffff, #eef2f8 60%, #dfe5ee);
  border: 1px solid rgba(201, 162, 39, .45);
  color: var(--gold-deep);
  box-shadow: inset 0 1px 0 #fff, inset 0 -1px 0 rgba(160,172,188,.4);
}
.goal-icon svg { width: 17px; height: 17px; display: block; }
.goal-icon.score { color: var(--gold); }
.goal-icon.jelly { color: #4b93c9; }
.goal-icon.chain { color: var(--silver-deep); }
.goal-icon.caramel { color: var(--gold-deep); }
.goal-icon.rock { color: #808b98; }
.goal-icon.ingredient { color: #a08054; }

.goal-body { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.goal-body b {
  font-size: .72rem;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.goal-count {
  font-size: .68rem;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
}
.goal-bar {
  display: block;
  height: 4px;
  border-radius: 99px;
  background: linear-gradient(180deg, rgba(160,172,188,.32), rgba(255,255,255,.7));
  margin-top: 4px;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(120,135,160,.25);
}
.goal-bar span {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: var(--foil-gold);
  transition: width .4s ease;
}
.goal.done .goal-bar span { background: var(--foil-gold); box-shadow: 0 0 8px rgba(232,199,102,.9); }

.rail-quote {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .78);
  border: 1px dashed rgba(201, 162, 39, .5);
}
.rail-quote p {
  margin: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: .78rem;
  line-height: 1.45;
  color: var(--ink-soft);
}

/* ==========================================================================
   JOKER ÇUBUĞU
   ========================================================================== */
.booster-bar {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  max-width: 900px;
  margin: 10px auto 22px;
  padding: 9px 12px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(240,244,250,.96) 60%, rgba(226,232,242,.96));
  border: 1px solid rgba(201, 162, 39, .5);
  box-shadow:
    inset 0 1px 0 #fff,
    inset 0 0 0 3px rgba(255,255,255,.6),
    0 10px 24px rgba(120, 135, 160, .18);
}

.booster {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  width: 74px;
  padding: 7px 4px 6px;
  border-radius: 14px;
  border: 1px solid rgba(201, 162, 39, .4);
  background: linear-gradient(180deg, #ffffff, #f3f6fb 62%, #e6ebf3);
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  box-shadow: inset 0 1px 0 #fff, inset 0 -1px 0 rgba(160,172,188,.4);
}
.booster:hover { transform: translateY(-2px); box-shadow: 0 8px 16px rgba(120, 135, 160, .24), inset 0 1px 0 #fff; }
.booster:active { transform: scale(.96); }

.booster-icon { font-size: 1.32rem; line-height: 1.15; filter: drop-shadow(0 1px 1px rgba(255,255,255,.9)); }
.booster-name {
  font-size: .58rem;
  letter-spacing: .04em;
  color: var(--silver-deep);
  white-space: nowrap;
}
.booster-count {
  position: absolute;
  top: -6px; right: -4px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 99px;
  background: var(--foil-gold);
  color: #4a3606;
  font-size: .64rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  border: 1px solid rgba(138, 104, 18, .5);
  box-shadow: 0 2px 6px rgba(138,104,18,.3), inset 0 1px 0 rgba(255,255,255,.8);
}
.booster.active {
  background: var(--foil-gold);
  border-color: #8a6812;
  box-shadow:
    0 0 0 3px rgba(201, 162, 39, .28),
    0 0 20px rgba(232, 199, 102, .75),
    0 8px 18px rgba(138, 104, 18, .22);
}
.booster.active .booster-name { color: #4a3606; font-weight: 700; }

/* ==========================================================================
   DÜĞMELER
   ========================================================================== */
.btn {
  font-size: .82rem;
  letter-spacing: .05em;
  padding: 12px 18px;
  border-radius: 12px;
  border: 1px solid rgba(138, 104, 18, .55);
  cursor: pointer;
  color: #4a3606;
  background: var(--foil-gold);
  font-weight: 700;
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
  box-shadow:
    0 8px 18px rgba(138, 104, 18, .28),
    inset 0 1px 0 rgba(255, 255, 255, .9),
    inset 0 -1px 0 rgba(138, 104, 18, .35);
  text-shadow: 0 1px 0 rgba(255, 255, 255, .55);
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.04); box-shadow: 0 12px 24px rgba(138, 104, 18, .34), inset 0 1px 0 rgba(255, 255, 255, .9); }
.btn:active { transform: scale(.98); }
.btn.soft {
  background: linear-gradient(180deg, #ffffff, #f1f4f9 60%, #e2e8f1);
  color: var(--silver-deep);
  border-color: rgba(150, 162, 178, .6);
  text-shadow: 0 1px 0 #fff;
  box-shadow: inset 0 1px 0 #fff, inset 0 -1px 0 rgba(160,172,188,.45), 0 4px 10px rgba(120,135,160,.12);
}
.btn.soft:hover { background: #fff; filter: none; }
.btn.ghost {
  background: transparent;
  color: var(--ink-faint);
  border-color: rgba(150, 162, 178, .45);
  box-shadow: none;
  text-shadow: none;
}
.btn.ghost:hover { background: rgba(255,255,255,.6); filter: none; }
.btn.wide { width: 100%; }
.btn.small { padding: 8px 12px; font-size: .74rem; }

/* Altın reklam düğmesi — kendi ışımasıyla */
.btn.reward {
  position: relative;
  background: var(--foil-gold);
  color: #43310a;
  font-size: .88rem;
  padding: 14px 18px;
  box-shadow:
    0 0 0 1px rgba(138, 104, 18, .5),
    0 0 22px rgba(232, 199, 102, .75),
    0 12px 26px rgba(138, 104, 18, .3),
    inset 0 1px 0 rgba(255, 255, 255, .95);
  animation: rewardGlow 2.2s ease-in-out infinite;
}
@keyframes rewardGlow {
  0%, 100% { box-shadow: 0 0 0 1px rgba(138,104,18,.5), 0 0 18px rgba(232,199,102,.55), 0 12px 26px rgba(138,104,18,.28), inset 0 1px 0 rgba(255,255,255,.95); }
  50%      { box-shadow: 0 0 0 1px rgba(138,104,18,.6), 0 0 34px rgba(255, 232, 150, .95), 0 14px 30px rgba(138,104,18,.36), inset 0 1px 0 rgba(255,255,255,.95); }
}
.btn.reward .reward-tag {
  display: inline-grid;
  place-items: center;
  width: 22px; height: 22px;
  margin-right: 8px;
  border-radius: 6px;
  background: #43310a;
  color: #ffeec2;
  font-size: .6rem;
  font-weight: 700;
  letter-spacing: .04em;
  vertical-align: middle;
  text-shadow: none;
}
.btn:disabled,
.btn[disabled] {
  filter: grayscale(.75) opacity(.6);
  cursor: not-allowed;
  animation: none;
  transform: none;
}

/* ==========================================================================
   KAPLAMA / MODAL
   ========================================================================== */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 18px;
}
.overlay[hidden] { display: none; }

.overlay-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 252, 244, .55), rgba(140, 152, 170, .42) 62%, rgba(90, 102, 120, .5));
  backdrop-filter: blur(7px) saturate(1.05);
}

.modal {
  position: relative;
  width: min(440px, 100%);
  max-height: 88vh;
  overflow-y: auto;
  background:
    linear-gradient(165deg, #ffffff 0%, #fbfcfe 46%, #eef2f8 78%, #e2e8f1 100%);
  border: 1px solid rgba(201, 162, 39, .7);
  border-radius: 24px;
  padding: 30px 26px 22px;
  text-align: center;
  box-shadow:
    0 0 0 4px rgba(255, 255, 255, .85),
    0 0 0 5px rgba(201, 162, 39, .45),
    0 30px 70px rgba(90, 102, 120, .4),
    inset 0 1px 0 #fff;
  animation: modalIn .36s cubic-bezier(.2, 1.2, .4, 1);
}
.modal::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 18px;
  border: 1px solid rgba(201, 162, 39, .35);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.7);
  pointer-events: none;
}
.modal::after {
  content: "❖";
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  font-size: .7rem;
  color: rgba(201, 162, 39, .65);
  pointer-events: none;
}
@keyframes modalIn {
  0%   { opacity: 0; transform: translateY(16px) scale(.95); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.modal .eyebrow {
  font-size: .66rem;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--silver-deep);
  margin-bottom: 8px;
  font-weight: 700;
}
.modal h2 {
  font-size: 1.8rem;
  margin: 0 0 6px;
  color: var(--gold-deep);
  line-height: 1.15;
  text-shadow: 0 1px 0 #fff;
}
.modal .lede {
  margin: 0 auto 16px;
  max-width: 34ch;
  font-size: .88rem;
  line-height: 1.55;
  color: var(--ink-soft);
  font-style: italic;
  font-family: var(--font-display);
}
.modal .big-stars { display: flex; justify-content: center; gap: 10px; margin: 4px 0 14px; }
.modal .star {
  font-size: 2.8rem;
  line-height: 1;
  color: rgba(150, 162, 178, .3);
  transition: color .3s ease, transform .3s ease;
}
.modal .star.on {
  color: var(--gold);
  text-shadow: 0 0 18px rgba(232, 199, 102, .9), 0 1px 0 #fff;
  transform: scale(1.08);
}

.modal .stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-bottom: 18px;
}
.modal .stat {
  background: linear-gradient(180deg, #ffffff, #f2f5fa 65%, #e6ebf3);
  border: 1px solid rgba(201, 162, 39, .4);
  border-radius: 12px;
  padding: 9px 8px;
  box-shadow: inset 0 1px 0 #fff;
}
.modal .stat span {
  display: block;
  font-size: .6rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--silver-deep);
}
.modal .stat strong {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--gold-deep);
}
.modal .actions { display: grid; gap: 9px; margin-top: 4px; }

.modal .swatch-row { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 10px 0 4px; }
.modal .swatch-row img { width: 36px; height: 36px; filter: drop-shadow(0 3px 4px rgba(120,135,160,.35)); }

.modal .rule {
  display: flex;
  gap: 10px;
  text-align: left;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px dashed rgba(201, 162, 39, .32);
  font-size: .81rem;
  color: var(--ink-soft);
  line-height: 1.45;
}
.modal .rule:last-of-type { border-bottom: 0; }
.modal .rule img { width: 32px; height: 32px; flex: 0 0 auto; }
.modal .rule b { color: #8a5315; }
.r-ico {
  width: 30px; height: 30px; flex: 0 0 auto;
  display: grid; place-items: center;
  border-radius: 9px;
  background: #fffaf1;
  border: 1px solid rgba(190, 143, 70, .35);
  color: var(--gold-deep);
}

/* dükkân */
.modal.shop { text-align: left; }
.modal.shop h2, .modal.shop .eyebrow, .modal.shop .lede { text-align: center; }
.shop-list { display: flex; flex-direction: column; gap: 8px; margin: 6px 0 16px; }
.shop-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 12px;
  background: #fffaf1;
  border: 1px solid rgba(190, 143, 70, .28);
}
.shop-row.focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(217, 164, 74, .2); }
.shop-icon { font-size: 1.35rem; }
.shop-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.shop-info b { font-size: .82rem; color: var(--ink); }
.shop-info i { font-size: .7rem; color: rgba(108, 66, 44, .68); font-style: normal; }
.shop-info em { font-size: .64rem; color: var(--gold-deep); font-style: normal; font-weight: 700; }

/* ==========================================================================
   BİLDİRİM
   ========================================================================== */
.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translate(-50%, 20px);
  background: #fffdf8;
  border: 1px solid rgba(190, 143, 70, .55);
  color: #7c4a14;
  font-size: .83rem;
  padding: 10px 18px;
  border-radius: 99px;
  box-shadow: 0 12px 28px rgba(120, 70, 40, .25);
  opacity: 0;
  pointer-events: none;
  transition: opacity .24s ease, transform .24s ease;
  z-index: 80;
  white-space: nowrap;
  max-width: 92vw;
  overflow: hidden;
  text-overflow: ellipsis;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ==========================================================================
   DUYARLI
   ========================================================================== */
@media (max-width: 1024px) {
  .play-area {
    grid-template-columns: 112px minmax(0, 1fr) 178px;
    gap: 12px;
  }
}

@media (max-width: 860px) {
  .topbar { flex-wrap: wrap; padding: 12px 14px 8px; }
  .wallet { order: 3; width: 100%; margin-left: 0; justify-content: center; }
  .top-actions { margin-left: auto; }

  .play-area { grid-template-columns: minmax(0, 1fr); }
  .hud-rail {
    flex-direction: row;
    order: -1;
    padding-top: 0;
  }
  .hud-rail .hud-card { flex: 1; }
  .goals-rail {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: stretch;
  }
  .rail-title { display: none; }
  .goal-list { flex-direction: row; flex: 1 1 100%; flex-wrap: wrap; }
  .goal { flex: 1 1 44%; min-width: 132px; }
  .rail-quote { display: none; }
  .goals-rail .btn { flex: 0 0 auto; }
  .map-scroll { max-height: none; padding-bottom: 20px; }
}

@media (max-width: 640px) {
  .brand-mark { width: 42px; height: 42px; }
  .brand-text p { font-size: .58rem; letter-spacing: .12em; }
  .brand-text h1 { font-size: 1.32rem; }
  .wallet-pill { padding: 6px 10px; font-size: .78rem; }
  .icon-btn { width: 36px; height: 36px; }

  .gamebar { padding: 8px 8px 2px; }
  .gb-name { font-size: .88rem; }
  /* mobilde tahta kenara kadar: 8 sütun için maksimum karo boyutu */
  .play-area { padding: 0 2px; gap: 6px; }
  .board-frame { padding: 5px; border-radius: 16px; }
  .board-shine { inset: 5px; }
  .frame-corner { width: 16px; height: 16px; }
  .board-caption { height: 16px; margin-top: 0; }
  .combo-label { font-size: .84rem; }

  /* hedefler + yeniden başlat tek satırda: tahtaya dikey yer açılır */
  .goals-rail {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 6px;
  }
  .goals-rail .goal-list { flex-direction: row; flex: 1 1 auto; gap: 5px; }
  .goals-rail .goal { flex: 0 1 auto; min-width: 0; }
  .goals-rail .goal-body { min-width: 0; }
  .goals-rail .goal-body b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .goals-rail .btn.small { flex: 0 0 auto; white-space: nowrap; }

  .hud-card { padding: 5px 8px 4px; border-radius: 10px; }
  .hud-value { font-size: 1.06rem; }
  .hud-sub { font-size: .55rem; }
  .hud-label { font-size: .5rem; letter-spacing: .12em; }

  /* mobilde alt paneller ince şerit: tahtaya yer açılır */
  .play-area { padding: 0 5px; gap: 5px; }
  .goals-rail { padding-top: 0; gap: 5px; }
  .goal { padding: 4px 7px; gap: 6px; border-radius: 10px; }
  .goal-icon { width: 22px; height: 22px; font-size: .7rem; }
  .goal-body b { font-size: .62rem; }
  .goal-count { font-size: .56rem; }
  .goals-rail .rail-quote { display: none; }        /* mobilde yer kaplamasın */
  .goals-rail .btn.small { min-height: 30px; padding: 0 10px; font-size: .68rem; }

  .booster-bar {
    gap: 4px;
    padding: 4px 6px;
    margin: 4px 6px 8px;
    border-radius: 12px;
  }
  .booster { width: 52px; padding: 3px 2px 2px; border-radius: 10px; }
  .booster-icon { font-size: 1rem; }
  .booster-name { font-size: .46rem; }

  .goal { padding: 6px 8px; gap: 7px; }
  .goal-icon { width: 26px; height: 26px; font-size: .78rem; }
  .goal-body b { font-size: .66rem; }
  .goal-count { font-size: .6rem; }

  .modal { padding: 24px 18px 18px; border-radius: 20px; }
  .modal h2 { font-size: 1.5rem; }
  .modal .lede { font-size: .82rem; }

  .region { padding: 14px 8px 8px; border-radius: 18px; }
  .region-head h2 { font-size: 1.14rem; }
  .node button { width: 50px; height: 50px; }
  .node-num { font-size: .86rem; }
  .node-stars { font-size: .5rem; bottom: 3px; }
  .path::before { inset: 8px 10% 18px; }
}

@media (max-width: 400px) {
  .booster { width: 50px; }
  .booster-name { display: none; }
  .node button { width: 44px; height: 44px; }
  .node-stars { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .05ms !important;
  }
}

/* ==========================================================================
   KALP GÖSTERGESİ (5 kalp + geri sayım)
   ========================================================================== */
.hearts {
  display: inline-flex;
  align-items: center;
  gap: 0;
  font-size: .9rem;
  line-height: 1;
  letter-spacing: -.06em;
  filter: drop-shadow(0 1px 0 #fff);
}
.heart {
  color: rgba(170, 182, 198, .75);
  transition: color .3s ease, text-shadow .3s ease, transform .3s ease;
}
.heart.full {
  color: #c0392b;
  text-shadow:
    0 0 6px rgba(235, 130, 120, .6),
    0 1px 0 #fff;
}
.heart.full:nth-child(odd) { color: #cf4436; }
.wallet-pill.lives { gap: 7px; }
.wallet-pill.lives b { font-size: .9rem; }
.game-lives .hearts { font-size: .78rem; }

/* ==========================================================================
   ÖDÜLLÜ REKLAM SAHNESİ
   ========================================================================== */
.modal.ad { width: min(420px, 100%); }
.ad-stage { position: relative; }
.ad-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.ad-tag {
  background: linear-gradient(180deg, #5c4408, #3a2a05);
  color: #ffeec2;
  font-size: .56rem;
  letter-spacing: .2em;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 4px;
  border: 1px solid rgba(201, 162, 39, .55);
}
.ad-clock {
  font-size: .72rem;
  font-weight: 700;
  color: var(--silver-deep);
  font-variant-numeric: tabular-nums;
}
.ad-clock b { color: var(--gold-deep); font-size: .92rem; }

.ad-creative {
  position: relative;
  margin: 16px 0 14px;
  padding: 24px 16px 20px;
  border-radius: 18px;
  background:
    radial-gradient(120% 90% at 50% 0%, #ffffff 0%, #fbf6e6 42%, #efe6cd 78%, #e2dcc9 100%);
  border: 1px solid rgba(201, 162, 39, .45);
  box-shadow:
    inset 0 1px 0 #fff,
    inset 0 0 0 4px rgba(255, 255, 255, .55),
    0 10px 24px rgba(120, 135, 160, .16);
  overflow: hidden;
}
.ad-creative::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 13px;
  border: 1px dashed rgba(201, 162, 39, .35);
  pointer-events: none;
}
.ad-glyph {
  display: block;
  font-size: 3.1rem;
  line-height: 1;
  filter: drop-shadow(0 6px 10px rgba(138, 104, 18, .35));
  animation: adFloat 3.2s ease-in-out infinite;
}
@keyframes adFloat {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50%      { transform: translateY(-7px) rotate(2deg); }
}
.ad-brand {
  display: block;
  margin-top: 10px;
  font-size: .58rem;
  letter-spacing: .24em;
  font-weight: 700;
  color: var(--gold-deep);
}
.ad-creative h3 {
  margin: 7px 0 3px;
  font-size: 1.12rem;
  color: #4a3606;
  text-shadow: 0 1px 0 #fff;
}
.ad-creative p {
  margin: 0;
  font-size: .78rem;
  font-style: italic;
  color: var(--ink-faint);
  font-family: var(--font-display);
}

.ad-progress {
  height: 9px;
  border-radius: 99px;
  background: linear-gradient(180deg, rgba(160,172,188,.35), rgba(255,255,255,.75));
  border: 1px solid rgba(150, 162, 178, .45);
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(120, 135, 160, .3);
}
.ad-progress i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 99px;
  background: var(--foil-gold);
  box-shadow: 0 0 12px rgba(232, 199, 102, .9), inset 0 1px 0 rgba(255,255,255,.8);
  transition: width 1s linear;
}
.ad-note {
  margin: 10px 0 0;
  font-size: .7rem;
  color: var(--ink-faint);
}
.ad-ornament {
  margin-top: 12px;
  font-size: .58rem;
  letter-spacing: .34em;
  color: rgba(201, 162, 39, .6);
}

.ad-done .ad-burst {
  width: 88px;
  height: 88px;
  margin: 2px auto 12px;
  border-radius: 50%;
  background: var(--foil-gold);
  color: #43310a;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 700;
  border: 1px solid rgba(138, 104, 18, .5);
  box-shadow:
    0 0 0 6px rgba(255, 255, 255, .9),
    0 0 34px rgba(232, 199, 102, .95),
    inset 0 2px 0 rgba(255, 255, 255, .9);
  animation: burstPop .62s cubic-bezier(.2, 1.5, .4, 1);
}
@keyframes burstPop {
  0%   { transform: scale(.3) rotate(-18deg); opacity: 0; }
  60%  { transform: scale(1.12) rotate(4deg); opacity: 1; }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}
.ad-reward {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  margin: 0 0 18px;
  padding: 9px 22px;
  border-radius: 99px;
  background: linear-gradient(180deg, #ffffff, #f2f5fa 62%, #e2e8f1);
  border: 1px solid rgba(201, 162, 39, .55);
  color: var(--gold-deep);
  font-size: .92rem;
  font-weight: 700;
  box-shadow: inset 0 1px 0 #fff, 0 6px 14px rgba(120, 135, 160, .16);
}
.ad-reward b {
  font-family: var(--font-display);
  font-size: 1.65rem;
  line-height: 1;
}
.ad-hearts { color: #c0392b; }
.ad-reward .ad-hearts { color: var(--gold); }

/* ==========================================================================
   TAHTA IŞIK PATLAMASI (büyük kombo)
   ========================================================================== */
.board.flash-gold::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 7;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 250, 232, .98) 0%, rgba(232, 199, 102, .45) 55%, rgba(232, 199, 102, 0) 100%);
  animation: boardFlash .62s ease-out forwards;
}
@keyframes boardFlash {
  0%   { opacity: 0; }
  22%  { opacity: 1; }
  100% { opacity: 0; }
}

/* ==========================================================================
   DUYARLI EKLER
   ========================================================================== */
@media (max-width: 640px) {
  .heart { font-size: .72rem; }
  .wallet-pill.lives { padding: 6px 9px; gap: 5px; }
  .wallet-pill.lives b { font-size: .78rem; }
  .ad-creative { padding: 18px 12px 16px; }
  .ad-glyph { font-size: 2.5rem; }
  .ad-creative h3 { font-size: 1rem; }
}
/* kalpler her boyutta görünür kalır — oyunun temel göstergesi */
@media (max-width: 400px) {
  .heart { font-size: .62rem; }
  .wallet-pill.lives { padding: 5px 7px; }
  .hearts { letter-spacing: -.1em; }
}

.life-note {
  margin: -6px 0 14px;
  font-size: .72rem;
  color: var(--ink-faint);
}
.life-note b { color: var(--gold-deep); }

/* Tahta dışı (oynanamayan) hücreler: oyulmuş gümüş yuva */
.board .hole {
  position: absolute;
  width: calc(100% / var(--cols, 8));
  height: calc(100% / var(--rows, 8));
  top: 0; left: 0;
  pointer-events: none;
  z-index: 0;
  box-sizing: border-box;
  border: 0;
  background:
    radial-gradient(circle at 50% 46%, rgba(198, 208, 222, .34) 0%, rgba(216, 224, 235, .18) 60%, rgba(216, 224, 235, 0) 74%);
  box-shadow: none;
}

/* ==========================================================================
   REKLAM ALANLARI + ÇEREZ ONAYI
   ========================================================================== */
.ad-slot {
  max-width: 728px;
  min-height: 0;
  margin: 14px auto 10px;
  padding: 0;
  text-align: center;
}
.ad-slot:empty { display: none; }
.ad-slot ins { min-height: 90px; }
.ad-slot-game { margin: 10px auto 26px; max-width: 728px; }

.consent-bar {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  z-index: 95;
  width: min(560px, calc(100vw - 24px));
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff, #f1f4f9 60%, #e4eaf2);
  border: 1px solid rgba(201, 162, 39, .55);
  box-shadow:
    inset 0 1px 0 #fff,
    0 16px 40px rgba(90, 102, 120, .3);
  font-size: .76rem;
  color: var(--ink-soft);
}
.consent-bar p { margin: 0; flex: 1; line-height: 1.45; }
.consent-bar a { color: var(--gold-deep); font-weight: 700; }
.consent-actions { display: flex; gap: 6px; flex: 0 0 auto; }
.consent-actions .btn { padding: 8px 12px; font-size: .72rem; }

@media (max-width: 520px) {
  .consent-bar { flex-direction: column; align-items: stretch; text-align: left; }
  .consent-actions { justify-content: flex-end; }
}
