/* Blok Adası — Şeker Bloklar görsel dili: parlak plastik bloklar, gökyüzü, deniz, tombul butonlar */
:root {
  --ink: #183153;
  --ink-soft: #4a6283;
  --accent: #ff4f8b;
  --accent-dark: #c2306a;
  --good: #2fd174;
  --good-dark: #1b9b52;
  --bad: #ff5a5f;
  --gold: #ffc61a;
  --white: #ffffff;
  --card: rgba(255, 255, 255, .9);
  --m0: #eaf5fc;
  --m1: #ffe28a;
  --m2: #8fe0a6;
  --m3: #22b866;
  --font: 'Baloo 2', 'Fredoka', ui-rounded, 'Arial Rounded MT Bold', system-ui, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: #8fdcff;
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
}
body[data-bg="sky"] {
  background:
    radial-gradient(ellipse 90px 30px at 16% 9%, #fff 70%, transparent 72%),
    radial-gradient(ellipse 60px 22px at 24% 6%, #fff 70%, transparent 72%),
    radial-gradient(ellipse 80px 26px at 86% 16%, #fff 70%, transparent 72%),
    linear-gradient(#72d1ff, #c9f0ff 78%, #a8ea8a 78.2%, #7ed468);
}
body[data-bg="sea"] {
  background:
    radial-gradient(ellipse 34px 6px at 30% 20%, rgba(255,255,255,.35) 60%, transparent 62%) 0 0 / 130px 96px,
    radial-gradient(ellipse 24px 5px at 70% 70%, rgba(255,255,255,.28) 60%, transparent 62%) 0 0 / 150px 118px,
    linear-gradient(#63cdfa, #2c93dc);
}
body[data-bg="boss"] {
  background:
    radial-gradient(#fff 1px, transparent 1.6px) 0 0 / 41px 37px,
    linear-gradient(#3b2a7a, #7a4fc4 70%, #b678d8);
}

#app {
  height: 100%;
  max-width: 620px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
}
.screen { flex: 1; min-height: 0; display: flex; flex-direction: column; position: relative; }

button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; padding: 0; }
button:focus-visible, input:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
svg.ic { width: 1em; height: 1em; fill: currentColor; flex: none; display: block; }

/* ---------- butonlar ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 56px; padding: 0 22px;
  font-size: 22px; font-weight: 800;
  background: var(--white); color: var(--ink);
  border-radius: 20px;
  box-shadow: 0 6px 0 #b7cde0;
  transition: transform .08s, box-shadow .08s;
}
.btn:active { transform: translateY(4px); box-shadow: 0 2px 0 #b7cde0; }
.btn.primary { background: var(--accent); color: #fff; box-shadow: 0 6px 0 var(--accent-dark); }
.btn.primary:active { box-shadow: 0 2px 0 var(--accent-dark); }
.btn.green { background: var(--good); color: #fff; box-shadow: 0 6px 0 var(--good-dark); }
.btn.green:active { box-shadow: 0 2px 0 var(--good-dark); }
.btn.wide { width: 100%; }

/* ---------- blok karakterleri ---------- */
.blk { display: inline-grid; grid-template-columns: repeat(var(--cols), var(--s)); gap: var(--g); position: relative; vertical-align: bottom; }
.blk > i {
  display: block; width: var(--s); height: var(--s);
  background: var(--c);
  background: linear-gradient(150deg, color-mix(in srgb, var(--c), #fff 38%), var(--c) 55%);
  border-radius: calc(var(--s) * .24);
  box-shadow: inset 0 calc(var(--s) * -.13) 0 rgba(0,0,0,.17), 0 1px 0 rgba(0,0,0,.08);
}
.blk > i.gone { visibility: hidden; }
.face { position: absolute; top: calc(var(--s) * .2); left: 50%; transform: translateX(-50%); display: flex; gap: calc(var(--s) * .2); pointer-events: none; }
.face u {
  display: block; width: calc(var(--s) * .36); height: calc(var(--s) * .36); min-width: 3px; min-height: 3px;
  border-radius: 50%; background: radial-gradient(circle at 55% 55%, #1b1b1b 0 36%, #fff 38%);
}
.face s {
  position: absolute; top: calc(var(--s) * .46); left: 50%; transform: translateX(-50%);
  width: calc(var(--s) * .34); height: calc(var(--s) * .16);
  border: max(1.5px, calc(var(--s) * .07)) solid #1b1b1b; border-top: 0; border-radius: 0 0 999px 999px;
}
.face s.o { width: calc(var(--s) * .2); height: calc(var(--s) * .2); border-top: max(1.5px, calc(var(--s) * .07)) solid #1b1b1b; border-radius: 50%; }
.face s.sad { border-bottom: 0; border-top: max(1.5px, calc(var(--s) * .07)) solid #1b1b1b; border-radius: 999px 999px 0 0; top: calc(var(--s) * .52); }
.face u.zz { background: none; border-bottom: max(1.5px, calc(var(--s) * .07)) solid #6b7f99; border-radius: 0 0 999px 999px; height: calc(var(--s) * .2); }
.face-boss u { background: radial-gradient(circle at 50% 60%, #1b1b1b 0 34%, #fffbe0 36%); }
.face-boss em { position: absolute; top: calc(var(--s) * -.12); left: calc(var(--s) * -.06); width: calc(var(--s) * .42); height: calc(var(--s) * .1); background: #1b1b1b; border-radius: 4px; transform: rotate(18deg); }
.face-boss em.r { left: auto; right: calc(var(--s) * -.06); transform: rotate(-18deg); }
.face-boss s.teeth { width: calc(var(--s) * .7); height: calc(var(--s) * .22); top: calc(var(--s) * .5); border: 0; border-radius: 3px; background: repeating-linear-gradient(90deg, #fff 0 calc(var(--s) * .12), #1b1b1b calc(var(--s) * .12) calc(var(--s) * .175)); box-shadow: 0 0 0 2px #1b1b1b; }
.blk .badge {
  position: absolute; left: 50%; bottom: 100%; transform: translate(-50%, -6px);
  background: #fff; color: var(--accent); font-weight: 800; font-size: max(16px, calc(var(--s) * .7)); line-height: 1.15;
  padding: 0 .45em; border-radius: 999px; box-shadow: 0 3px 0 rgba(0,0,0,.12); white-space: nowrap;
}
.blk.asleep > i { background: #a9bdd3; box-shadow: inset 0 calc(var(--s) * -.13) 0 rgba(0,0,0,.08); }

/* ---------- üst çubuk ---------- */
.top { display: flex; align-items: center; gap: 10px; padding: 12px max(14px, env(safe-area-inset-left, 0px)) 6px; position: relative; z-index: 5; }
.top h2 { margin: 0; font-size: 24px; line-height: 1.1; flex: 1; text-wrap: balance; }
.back {
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  background: #fff; box-shadow: 0 4px 0 #b7cde0; font-size: 24px; flex: none;
}
.back:active { transform: translateY(3px); box-shadow: 0 1px 0 #b7cde0; }
.pill { display: inline-flex; align-items: center; gap: 4px; font-size: 17px; font-weight: 800; padding: 4px 11px; background: #fff; border-radius: 999px; box-shadow: 0 3px 0 rgba(0,0,0,.12); font-variant-numeric: tabular-nums; }
.pill .ic { color: var(--gold); font-size: 18px; }
.pill.fl .ic { color: #ff6a2a; }
.stars { display: inline-flex; gap: 1px; }
.stars .on { color: var(--gold); }
.stars .off { color: rgba(24, 49, 83, .18); }
.stars .ic { filter: drop-shadow(0 1px 0 rgba(0,0,0,.15)); }

/* ---------- karşılama ---------- */
.welcome { align-items: center; justify-content: center; gap: 22px; padding: 24px 20px; text-align: center; }
.logo { font-size: clamp(46px, 13vw, 68px); font-weight: 800; line-height: .95; color: #fff; text-shadow: 0 5px 0 var(--accent), 0 9px 0 rgba(0,0,0,.12); letter-spacing: -.5px; }
.welcome .heroes { display: flex; align-items: flex-end; gap: 14px; justify-content: center; min-height: 140px; }
.welcome .heroes .blk:nth-child(2) { animation: hop 1.2s .2s ease-in-out infinite; }
.welcome .heroes .blk:nth-child(1) { animation: hop 1.2s ease-in-out infinite; }
.welcome .heroes .blk:nth-child(3) { animation: hop 1.2s .4s ease-in-out infinite; }
.field { display: grid; gap: 8px; width: min(100%, 360px); }
.field label { font-size: 22px; font-weight: 800; }
.field input {
  font: inherit; font-size: 26px; font-weight: 700; text-align: center; color: var(--ink);
  padding: 8px 14px; border: 0; border-radius: 18px; background: #fff; box-shadow: inset 0 -4px 0 #d8e6f1;
  -webkit-user-select: text; user-select: text;
}
.swatches { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.swatches button { width: 44px; height: 44px; border-radius: 50%; background: var(--c); box-shadow: 0 4px 0 rgba(0,0,0,.15); border: 4px solid transparent; }
.swatches button[aria-pressed="true"] { border-color: #fff; outline: 3px solid var(--ink); }

/* ---------- harita ---------- */
.hud { display: flex; align-items: center; gap: 8px; padding: 12px 14px 8px; position: relative; z-index: 5; }
.av { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 22px; color: #fff; background: var(--pc, var(--accent)); box-shadow: 0 4px 0 rgba(0,0,0,.2); flex: none; }
.hud .nm { font-weight: 800; font-size: 20px; margin-right: auto; color: #fff; text-shadow: 0 2px 0 rgba(0,0,0,.18); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.mapscroll { flex: 1; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; position: relative; }
.mapin { position: relative; width: 100%; }
.mapin svg.path { position: absolute; inset: 0; width: 100%; height: 100%; }
.mapin svg.path polyline { stroke: #fff; stroke-width: 6; stroke-dasharray: 2 14; stroke-linecap: round; fill: none; opacity: .8; }
.node { position: absolute; width: 120px; transform: translateX(-50%); display: grid; justify-items: center; gap: 2px; }
.node .stand { position: relative; display: grid; justify-items: center; align-items: end; height: 84px; }
.node .stand > .blk, .node .stand > .lockic { position: relative; z-index: 2; margin-bottom: -16px; }
.node .isle { width: 108px; height: 46px; border-radius: 50%; background: radial-gradient(ellipse at 40% 30%, #8ff09a, #4fc65e 70%); box-shadow: 0 8px 0 #f6d488, 0 15px 0 rgba(10, 60, 110, .2); }
.node .lbl { margin-top: 12px; background: #fff; font-weight: 800; font-size: 21px; line-height: 1.3; border-radius: 999px; padding: 0 14px; box-shadow: 0 3px 0 rgba(0,0,0,.15); }
.node .stars .off { color: rgba(255,255,255,.55); }
.node .stars .ic { font-size: 18px; }
.node.cur .stand > .blk { animation: hop 1.1s ease-in-out infinite; }
.node.cur .lbl { background: var(--accent); color: #fff; }
.node .me { position: absolute; top: 0; right: 0; z-index: 4; background: var(--accent); color: #fff; font-weight: 800; font-size: 14px; border-radius: 999px; padding: 0 9px; box-shadow: 0 2px 0 var(--accent-dark); }
.node.locked .stand, .node.locked .lbl { filter: grayscale(1); opacity: .6; }
.node .lockic { font-size: 30px; color: #fff; filter: drop-shadow(0 2px 0 rgba(0,0,0,.2)); }
.dock { display: flex; gap: 10px; padding: 8px 14px 12px; }
.dock .btn { flex: 1; font-size: 17px; line-height: 1.1; min-height: 52px; padding: 0 10px; }
.dock .btn .ic { font-size: 22px; color: var(--accent); }
.dock .btn.sq { flex: none; width: 56px; }

/* ---------- ada ---------- */
.island { overflow-y: auto; }
.island .hero { display: flex; align-items: flex-end; gap: 14px; padding: 18px 18px 6px; }
.island .hero .blk { animation: hop 1.4s ease-in-out infinite; flex: none; }
.bubble { position: relative; background: #fff; border-radius: 20px; padding: 10px 14px; font-size: 18px; line-height: 1.3; box-shadow: 0 4px 0 rgba(0,0,0,.1); margin-bottom: 20px; }
.bubble::before { content: ""; position: absolute; left: -10px; bottom: 16px; border: 10px solid transparent; border-right-color: #fff; border-left: 0; }
.bubble b { color: var(--accent); }
.stages { display: grid; gap: 12px; padding: 10px 16px 20px; }
.stage { display: grid; grid-template-columns: 56px 1fr auto; align-items: center; gap: 12px; text-align: left; background: #fff; border-radius: 22px; padding: 10px 14px 10px 10px; box-shadow: 0 6px 0 #b7cde0; min-height: 76px; }
.stage:active { transform: translateY(4px); box-shadow: 0 2px 0 #b7cde0; }
.stage .si { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; font-size: 30px; color: #fff; background: var(--sc); box-shadow: inset 0 -5px 0 rgba(0,0,0,.18); }
.stage .st { display: grid; gap: 0; min-width: 0; }
.stage .st b { font-size: 21px; line-height: 1.2; }
.stage .st span { font-size: 15px; color: var(--ink-soft); line-height: 1.25; }
.stage .sr { font-size: 15px; font-weight: 800; text-align: right; display: grid; justify-items: end; gap: 2px; }
.stage .sr .ic { font-size: 22px; }
.stage .done { color: var(--good); }
.stage .gold { color: var(--gold); }
.stage.locked { opacity: .55; filter: grayscale(.8); }
.tip { margin: 0 16px 24px; background: rgba(255,255,255,.65); border-radius: 18px; padding: 10px 14px; font-size: 16px; line-height: 1.35; }

/* ---------- keşfet ---------- */
.explore .exarea { flex: 1; min-height: 0; display: flex; flex-direction: column-reverse; justify-content: flex-start; align-items: center; gap: 4px; padding: 6px 16px; overflow: hidden; }
.exrow { display: flex; align-items: center; gap: 10px; animation: drop .32s cubic-bezier(.3,1.6,.5,1) both; }
.exrow .lab { min-width: 96px; display: flex; align-items: baseline; gap: 6px; white-space: nowrap; }
.exrow .lab b { font-size: 24px; line-height: 1; color: var(--ink); min-width: 1.6em; text-align: right; }
.exrow .lab small { font-size: 14px; color: var(--ink-soft); }
.excount { text-align: center; font-size: 22px; font-weight: 800; padding: 4px 16px 0; min-height: 40px; }
.excount b { font-size: 34px; color: var(--accent); }
.foot { padding: 10px 16px 16px; display: grid; gap: 10px; }

/* ---------- soru ekranları ---------- */
.prog { display: flex; gap: 5px; flex: 1; }
.prog i { flex: 1; height: 10px; border-radius: 999px; background: rgba(255,255,255,.7); }
.prog i.ok { background: var(--good); }
.prog i.no { background: var(--bad); }
.prog i.now { background: var(--accent); }
.qtext { text-align: center; font-size: clamp(48px, 14vw, 72px); font-weight: 800; line-height: 1; padding: 8px 0 4px; font-variant-numeric: tabular-nums; text-shadow: 0 4px 0 rgba(255,255,255,.85); white-space: nowrap; }
.qtext .blank { display: inline-block; min-width: 1.3em; color: var(--accent); }
.qtext .blank.ok { color: var(--good-dark); animation: pop .35s; }
.qtext .blank.no { color: var(--good-dark); }
.viz { flex: 1; min-height: 0; display: grid; place-items: center; position: relative; padding: 8px 16px 4px; }
.viz .blk { transition: transform .3s; }
.viz .rowsums { position: absolute; display: grid; gap: var(--g); font-weight: 800; color: var(--ink); }
.viz .wrap-arr { position: relative; display: flex; align-items: flex-start; gap: 10px; }
.viz .sums { display: grid; gap: var(--g); }
.viz .sums span { height: var(--s); display: flex; align-items: center; font-size: clamp(14px, calc(var(--s) * .6), 22px); font-weight: 800; color: var(--ink-soft); animation: drop .3s both; }
.viz .sums span:last-child { color: var(--accent); }
.viz .hint { position: absolute; bottom: 0; left: 0; right: 0; text-align: center; font-size: 16px; color: var(--ink-soft); }
.ans { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 10px 16px 16px; }
.ans button { height: clamp(62px, 10vh, 84px); font-size: clamp(30px, 8vw, 40px); font-weight: 800; background: #fff; border-radius: 22px; box-shadow: 0 6px 0 #b7cde0; font-variant-numeric: tabular-nums; }
.ans button:active { transform: translateY(4px); box-shadow: 0 2px 0 #b7cde0; }
.ans button.ok { background: var(--good); color: #fff; box-shadow: 0 6px 0 var(--good-dark); }
.ans button.no { background: var(--bad); color: #fff; box-shadow: 0 6px 0 #c23b40; animation: shake .4s; }
.ans button:disabled { cursor: default; }

/* tuş takımı */
.statrow { display: flex; justify-content: space-between; align-items: center; padding: 4px 16px; font-size: 20px; font-weight: 800; min-height: 40px; }
.combo { background: var(--accent); color: #fff; border-radius: 999px; padding: 0 12px; font-size: 18px; animation: pop .3s; }
.combo:empty { display: none; }
.timer { height: 14px; margin: 2px 16px 0; background: rgba(255,255,255,.7); border-radius: 999px; overflow: hidden; }
.timer b { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #22c56b, #a3ea3f); border-radius: 999px; transform-origin: left; }
.timer.low b { background: linear-gradient(90deg, #ff5a5f, #ff9a1f); }
.inbox { display: inline-block; min-width: 1.6em; padding: 0 .15em; border-radius: 16px; background: #fff; box-shadow: inset 0 -5px 0 #d8e6f1; color: var(--ink); text-shadow: none; text-align: center; }
.inbox.ok { background: var(--good); color: #fff; box-shadow: inset 0 -5px 0 var(--good-dark); }
.inbox.no { background: var(--bad); color: #fff; box-shadow: inset 0 -5px 0 #c23b40; animation: shake .4s; }
.mid { flex: 1; min-height: 0; display: grid; place-items: center; }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 8px 16px 16px; }
.keypad button { height: clamp(56px, 9vh, 76px); font-size: clamp(28px, 7.5vw, 36px); font-weight: 800; background: #fff; border-radius: 18px; box-shadow: 0 5px 0 #b7cde0; display: grid; place-items: center; }
.keypad button.pressed { transform: translateY(4px); box-shadow: 0 1px 0 #b7cde0; }
.keypad .kdel { color: var(--bad); }
.keypad .kok { background: var(--good); color: #fff; box-shadow: 0 5px 0 var(--good-dark); }
.count3 { position: absolute; inset: 0; display: grid; place-items: center; z-index: 20; background: rgba(255,255,255,.35); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); }
.count3 span { font-size: 130px; font-weight: 800; color: #fff; text-shadow: 0 8px 0 var(--accent); animation: pop .5s; }

/* ---------- boss ---------- */
.bosshp { display: flex; align-items: center; gap: 8px; flex: 1; }
.bosshp .bar { flex: 1; height: 16px; background: rgba(0,0,0,.25); border-radius: 999px; overflow: hidden; box-shadow: inset 0 2px 0 rgba(0,0,0,.2); }
.bosshp .bar b { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #ff5a5f, #ff9a1f); border-radius: 999px; transition: width .35s; }
.boss-screen .top h2 { color: #fff; }
.arena { flex: 1; min-height: 0; display: grid; place-items: center; position: relative; }
.bossbox { position: relative; }
.bossbox .blk { animation: breathe 1.6s ease-in-out infinite; }
.bossbox.hit .blk { animation: hit .4s; }
.bossbox.attack { animation: lunge .5s; }
.bossbox .blk > i.gone { visibility: visible; animation: poof .45s forwards; }
.bossbox .blk > i.gone-done { visibility: hidden; }
.hearts { position: absolute; top: 6px; right: 16px; display: flex; gap: 4px; font-size: 28px; color: #ff5a8a; filter: drop-shadow(0 2px 0 rgba(0,0,0,.25)); }
.hearts .lost { color: rgba(255,255,255,.3); }
.boss-screen .qtext { color: #fff; text-shadow: 0 4px 0 rgba(0,0,0,.25); }
.boss-screen .qtimer { height: 10px; margin: 0 16px; background: rgba(0,0,0,.25); border-radius: 999px; overflow: hidden; }
.boss-screen .qtimer b { display: block; height: 100%; width: 100%; background: #ffd23a; border-radius: 999px; transform-origin: left; }
.proj { position: fixed; z-index: 30; pointer-events: none; }
.shake-screen { animation: shake .4s; }

/* ---------- sonuç ---------- */
.results { overflow-y: auto; align-items: center; padding: 26px 16px 20px; gap: 12px; text-align: center; }
.results .top { align-self: stretch; padding-left: 0; padding-right: 0; }
.results h1 { margin: 6px 0 0; font-size: clamp(34px, 10vw, 46px); line-height: 1.05; color: var(--accent); text-shadow: 0 3px 0 #fff; text-wrap: balance; }
.results .sub { font-size: 19px; margin: 0; }
.results .stars { font-size: 46px; gap: 6px; }
.results .stars .new { animation: starIn .6s .3s both; }
.card { width: 100%; background: var(--card); border-radius: 22px; padding: 12px 16px; box-shadow: 0 4px 0 rgba(0,0,0,.08); }
.score { display: grid; gap: 2px; font-size: 18px; }
.score div { display: flex; justify-content: space-between; font-variant-numeric: tabular-nums; }
.score .tot { font-weight: 800; font-size: 22px; border-top: 2px dashed #cfe0ee; padding-top: 4px; margin-top: 4px; color: var(--accent); }
.statgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.statgrid div { display: grid; gap: 0; }
.statgrid b { font-size: 26px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.statgrid span { font-size: 14px; color: var(--ink-soft); }
.friends { display: flex; flex-wrap: wrap; gap: 22px 18px; justify-content: center; align-items: flex-end; padding-top: 30px; }
.friends .fr { display: grid; justify-items: center; gap: 6px; animation: drop .5s both; }
.friends h3 { width: 100%; margin: 0 0 8px; font-size: 20px; }
.results .btns { display: grid; gap: 14px; width: 100%; margin-top: 4px; }

/* ---------- çarpım haritası ---------- */
.grid-screen, .coll-screen { overflow-y: auto; }
.msum { text-align: center; font-size: 19px; padding: 0 16px; }
.msum b { color: var(--accent); font-size: 24px; }
.mgrid { display: grid; grid-template-columns: repeat(11, 1fr); gap: 4px; padding: 10px 12px; width: 100%; max-width: 520px; margin: 0 auto; }
.mgrid .h { display: grid; place-items: center; font-weight: 800; font-size: clamp(14px, 4vw, 20px); color: var(--ink); aspect-ratio: 1; }
.mgrid button { aspect-ratio: 1; border-radius: 22%; font-weight: 800; font-size: clamp(11px, 3.4vw, 17px); display: grid; place-items: center; font-variant-numeric: tabular-nums; box-shadow: inset 0 -3px 0 rgba(0,0,0,.12); }
.mgrid .l0 { background: var(--m0); color: #9fb3c8; }
.mgrid .l1 { background: var(--m1); }
.mgrid .l2 { background: var(--m2); }
.mgrid .l3 { background: var(--m3); color: #fff; }
.mgrid button.sel { outline: 3px solid var(--accent); outline-offset: 1px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: center; font-size: 15px; padding: 0 16px; }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend i { width: 16px; height: 16px; border-radius: 5px; display: inline-block; }
.mdetail { margin: 10px 16px 20px; text-align: center; min-height: 64px; display: grid; place-items: center; font-size: 18px; }

/* ---------- koleksiyon ---------- */
.collgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 12px; padding: 12px 16px 24px; }
.collgrid .cc { background: rgba(255,255,255,.75); border-radius: 18px; height: 118px; display: grid; grid-template-rows: 1fr auto; justify-items: center; align-items: end; padding: 8px 4px 6px; }
.collgrid .cc b { font-size: 18px; line-height: 1.2; }
.collgrid .cc.sl b { color: #9fb3c8; }

/* ---------- ayarlar ---------- */
.sheet-bg { position: fixed; inset: 0; z-index: 50; background: rgba(24, 49, 83, .45); display: grid; place-items: end center; animation: fade .2s; }
.sheet { width: min(100%, 620px); background: #f2f9ff; border-radius: 28px 28px 0 0; padding: 20px max(18px, env(safe-area-inset-left, 0px)) calc(20px + env(safe-area-inset-bottom, 0px)); display: grid; gap: 16px; justify-items: center; animation: up .25s; }
.sheet h2 { margin: 0; font-size: 26px; }
.sheet .row { display: flex; gap: 10px; width: 100%; }
.sheet .row .btn { flex: 1; font-size: 18px; }
.sheet .danger { color: var(--bad); }
.sheet .note { font-size: 15px; color: var(--ink-soft); text-align: center; margin: 0; }

/* ---------- efektler ---------- */
.float { position: fixed; z-index: 40; pointer-events: none; font-weight: 800; font-size: 30px; color: var(--accent); text-shadow: 0 2px 0 #fff, 0 -2px 0 #fff, 2px 0 0 #fff, -2px 0 0 #fff; animation: floatUp 1s forwards; transform: translate(-50%, -50%); white-space: nowrap; }
.conf { position: fixed; inset: 0; pointer-events: none; z-index: 45; overflow: hidden; }
.conf i { position: absolute; top: -20px; width: 12px; height: 12px; border-radius: 3px; animation: fall var(--d) linear forwards; }
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 60; background: var(--ink); color: #fff; font-size: 18px; font-weight: 700; padding: 10px 18px; border-radius: 18px; max-width: calc(100% - 32px); text-align: center; animation: up .25s; }
.pop { animation: pop .4s; }

@keyframes hop { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes drop { from { transform: translateY(-24px) scale(.9); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes bounce { 0%, 100% { transform: scale(1); } 40% { transform: scale(1.12, .92); } 70% { transform: scale(.96, 1.05); } }
.bounce { animation: bounce .45s; }
.bossbox.friendly .blk { animation: hop 1s ease-in-out infinite; }
@keyframes pop { 0% { transform: scale(.6); } 60% { transform: scale(1.15); } 100% { transform: scale(1); } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-8px); } 40% { transform: translateX(8px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(5px); } }
@keyframes floatUp { from { opacity: 1; transform: translate(-50%, -50%); } to { opacity: 0; transform: translate(-50%, -130%); } }
@keyframes fall { to { transform: translate(var(--dx), 110vh) rotate(var(--r)); } }
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.04, .97); } }
@keyframes hit { 0% { transform: translateX(0); filter: brightness(2); } 30% { transform: translateX(-10px) rotate(-4deg); } 60% { transform: translateX(8px) rotate(3deg); } 100% { transform: none; filter: none; } }
@keyframes lunge { 0%, 100% { transform: none; } 40% { transform: translateY(30px) scale(1.15); } }
@keyframes poof { 0% { transform: scale(1); opacity: 1; } 100% { transform: scale(1.8) rotate(30deg); opacity: 0; } }
@keyframes starIn { 0% { transform: scale(0) rotate(-90deg); } 70% { transform: scale(1.4) rotate(10deg); } 100% { transform: scale(1); } }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translate(var(--tx, 0), 40px); opacity: 0; } }
.toast { --tx: -50%; }

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

/* =====================================================================
   2. sürüm: bloklar (para), görevler, adam, bonus oyunlar, düello
   ===================================================================== */
.famlink { font-size: 17px; color: var(--ink); opacity: .8; }
.pill.coin .ic { color: inherit; }
svg.coinic { font-size: 18px; }
.hud { gap: 6px; }
.hud .pill { padding: 4px 9px; font-size: 16px; }

.dock { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; padding: 8px 10px calc(10px + env(safe-area-inset-bottom, 0px) * 0); }
.dk { position: relative; display: grid; justify-items: center; gap: 2px; padding: 8px 2px 6px; background: #fff; border-radius: 18px; box-shadow: 0 5px 0 #b7cde0; font-weight: 800; font-size: 13px; line-height: 1.1; }
.dk:active { transform: translateY(3px); box-shadow: 0 2px 0 #b7cde0; }
.dk .ic { font-size: 26px; color: var(--accent); }
.dk:nth-child(2) .ic { color: #36d07a; }
.dk:nth-child(3) .ic { color: #29b8f0; }
.dk:nth-child(4) .ic { color: #8a5cff; }
.dk:nth-child(5) .ic { color: #ff9a1f; }
.dk .dot { position: absolute; top: -6px; right: 4px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px; background: var(--bad); color: #fff; font-size: 14px; display: grid; place-items: center; box-shadow: 0 2px 0 rgba(0,0,0,.2); animation: hop 1s ease-in-out infinite; }

.bonushead { margin: 6px 18px 0; font-size: 20px; display: flex; align-items: baseline; gap: 8px; }
.bonushead small { font-size: 14px; color: var(--ink-soft); }
.stage .si.txt { font-size: 30px; font-weight: 800; }
.coinrow { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 0 10px; text-align: left; }
.coinrow span { display: inline-flex; align-items: center; gap: 6px; font-size: 18px; }
.coinrow span .ic { font-size: 22px; }
.coinrow b { font-size: 26px; color: #d9761a; }
.coinrow small { grid-column: 1 / -1; color: var(--ink-soft); font-size: 14px; }
.cointag { display: inline-flex; align-items: center; gap: 3px; font-weight: 800; }
.cointag .ic { font-size: 1em; }

.linked { display: flex; gap: 12px; align-items: center; width: 100%; background: #fff; border-radius: 18px; padding: 10px 14px; }
.linked b { display: block; font-size: 20px; }
.linked span { font-size: 15px; color: var(--ink-soft); line-height: 1.3; }
.sheet .btn .ic { font-size: 22px; }
.sheet a.btn { text-decoration: none; }

/* görevler */
.quests { justify-items: stretch; }
.qlist { display: grid; gap: 10px; width: 100%; }
.quest { display: flex; align-items: center; gap: 12px; background: #fff; border-radius: 18px; padding: 10px 12px; box-shadow: 0 3px 0 rgba(0,0,0,.06); }
.quest .qt { flex: 1; min-width: 0; display: grid; gap: 4px; }
.quest .qt b { font-size: 17px; line-height: 1.25; }
.quest .qt small { font-size: 13px; color: var(--ink-soft); }
.qbar { height: 10px; border-radius: 99px; background: #e8f1f8; overflow: hidden; }
.qbar i { display: block; height: 100%; background: linear-gradient(90deg, #29b8f0, #36d07a); border-radius: 99px; }
.quest.done .qbar i { background: var(--good); }
.quest.claimed { opacity: .65; }
.qrew { font-size: 17px; color: #d9761a; }
.qok { width: 40px; height: 40px; border-radius: 50%; background: var(--good); color: #fff; display: grid; place-items: center; font-size: 24px; }
.qclaim { min-height: 46px; font-size: 18px; padding: 0 14px; }
.chest { display: flex; align-items: center; gap: 12px; width: 100%; background: #fff7e6; border: 3px dashed #f3c97a; border-radius: 20px; padding: 10px 14px; }
.chest.ready { border-style: solid; border-color: var(--gold); animation: hop 1.2s ease-in-out infinite; }
.chest > div { flex: 1; display: grid; }
.chest b { font-size: 18px; }
.chest span { font-size: 14px; color: var(--ink-soft); }
.chestsvg { width: 58px; height: 52px; flex: none; }

/* benim adam */
.myisland .top h2 { flex: 1; }
.isstage { flex: 1; min-height: 0; position: relative; overflow: hidden; touch-action: none; }
.bigisle { position: absolute; left: 4%; right: 4%; bottom: 9%; aspect-ratio: 1.55 / 1; max-height: 70%; margin: 0 auto; border-radius: 50%; background: radial-gradient(ellipse at 40% 30%, #8ff09a, #4fc65e 70%); box-shadow: 0 14px 0 #f6d488, 0 26px 0 rgba(10, 60, 110, .18); }
.placed { position: absolute; inset: 0; }
.pl { position: absolute; transform: translate(-50%, -100%); cursor: grab; touch-action: none; transition: transform .1s; }
.pl.item .dsvg { width: 64px; height: 64px; display: block; filter: drop-shadow(0 4px 0 rgba(0,0,0,.12)); }
.pl.drag { transform: translate(-50%, -100%) scale(1.15); z-index: 999 !important; cursor: grabbing; }
.stagehint { position: absolute; left: 50%; transform: translateX(-50%); top: 8px; width: max-content; max-width: calc(100% - 32px); margin: 0; text-align: center; color: var(--ink); background: rgba(255,255,255,.85); border-radius: 14px; padding: 6px 12px; font-weight: 700; font-size: 15px; pointer-events: none; }
.tray { background: rgba(255,255,255,.92); border-radius: 26px 26px 0 0; padding: 10px 12px 14px; display: grid; gap: 8px; transition: background .15s; }
.tray.drop { background: #ffe1e1; }
.traytabs { display: flex; gap: 6px; align-items: center; }
.traytabs [data-t] { padding: 6px 12px; border-radius: 12px; font-weight: 800; font-size: 16px; color: var(--ink-soft); }
.traytabs [data-t][aria-pressed="true"] { background: #e8f4ff; color: var(--ink); }
.shopbtn { margin-left: auto; min-height: 42px; font-size: 18px; padding: 0 16px; }
.trayrow { display: flex; gap: 8px; overflow-x: auto; min-height: 84px; align-items: stretch; padding-bottom: 2px; }
.tile { flex: none; width: 76px; display: grid; justify-items: center; align-content: end; gap: 2px; background: #fff; border-radius: 16px; box-shadow: 0 4px 0 #d8e6f1; padding: 6px 4px 4px; }
.tile .dsvg { width: 52px; height: 52px; }
.tile small { font-size: 13px; font-weight: 800; color: var(--ink-soft); }
.tile.none { opacity: .4; }
.trayempty { margin: 0; align-self: center; color: var(--ink-soft); font-size: 15px; padding: 0 6px; }

/* mağaza */
.shophead { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.shopgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; width: 100%; max-height: 56vh; overflow-y: auto; padding: 2px; }
.shopitem { background: #fff; border-radius: 18px; padding: 10px 8px; display: grid; justify-items: center; gap: 2px; text-align: center; }
.shopitem .dsvg { width: 64px; height: 64px; }
.shopitem b { font-size: 17px; }
.shopitem small { font-size: 13px; color: var(--ink-soft); }
.shopitem .btn { min-height: 42px; font-size: 16px; padding: 0 10px; width: 100%; margin-top: 4px; }
.shopitem .btn[disabled] { opacity: .6; font-size: 14px; }
.shopnote { margin: 0; font-size: 14px; color: var(--ink-soft); text-align: center; }

/* bonus oyunlar */
.problem { font-size: clamp(20px, 5.6vw, 26px); line-height: 1.3; font-weight: 700; white-space: normal; text-shadow: none; background: #fff; border-radius: 20px; padding: 12px 16px; margin: 0 16px; text-align: left; box-shadow: 0 4px 0 rgba(0,0,0,.06); }
.mode-market .qtext { padding-top: 4px; }
.viz .hint.big { position: static; font-size: 20px; color: var(--ink); max-width: 24ch; line-height: 1.35; }
.groups { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; max-width: 100%; }
.grp { display: grid; grid-template-columns: repeat(var(--per), auto); gap: 1px; padding: 6px; border-radius: 14px; background: rgba(255,255,255,.75); border: 2px dashed rgba(24,49,83,.2); }
.grp i { font-style: normal; font-size: var(--fs); line-height: 1.1; }
.ans.pairs button { font-size: clamp(26px, 7vw, 34px); }

/* düello */
.vs { display: flex; align-items: center; justify-content: center; gap: 18px; padding: 10px 0; }
.vs > div { display: grid; justify-items: center; gap: 6px; }
.vs b { font-size: 18px; }
.vs > span { font-size: 26px; font-weight: 800; color: var(--accent); }
a.btn { text-decoration: none; }
