/* Mosaic Shot teması */
@font-face { font-family: 'Grandstander'; font-weight: 800; font-display: swap; src: url(vendor/fonts/grandstander-latin-800.woff2) format('woff2'); }
@font-face { font-family: 'Grandstander'; font-weight: 900; font-display: swap; src: url(vendor/fonts/grandstander-latin-900.woff2) format('woff2'); }
@font-face { font-family: 'Grandstander'; font-weight: 800; font-display: swap; src: url(vendor/fonts/grandstander-latin-ext-800.woff2) format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF; }
@font-face { font-family: 'Grandstander'; font-weight: 900; font-display: swap; src: url(vendor/fonts/grandstander-latin-ext-900.woff2) format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF; }
@font-face { font-family: 'Nunito'; font-weight: 800; font-display: swap; src: url(vendor/fonts/nunito-latin-800.woff2) format('woff2'); }
@font-face { font-family: 'Nunito'; font-weight: 900; font-display: swap; src: url(vendor/fonts/nunito-latin-900.woff2) format('woff2'); }
@font-face { font-family: 'Nunito'; font-weight: 800; font-display: swap; src: url(vendor/fonts/nunito-latin-ext-800.woff2) format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF; }
@font-face { font-family: 'Nunito'; font-weight: 900; font-display: swap; src: url(vendor/fonts/nunito-latin-ext-900.woff2) format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF; }
@font-face { font-family: 'Nunito'; font-weight: 800; font-display: swap; src: url(vendor/fonts/nunito-cyrillic-800.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Nunito'; font-weight: 900; font-display: swap; src: url(vendor/fonts/nunito-cyrillic-900.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }

:root {
  --k-font-d: 'Grandstander', system-ui, sans-serif;
  --k-font-b: 'Nunito', system-ui, sans-serif;
  --bg1: #fff3e4; --bg2: #f9dcc4; --bg3: #f0b99a;
  --k-ink: #4a2c22; --k-ink2: #8a6252;
  --k-pill: rgba(92, 52, 38, .62);
  --k-panel: #fffaf3; --k-panel2: #fbeadb; --k-edge: #e9c3a2; --k-panel-shadow: #c48c63;
  --k-title1: #ff8aa6; --k-title2: #ec5577; --k-title-edge: #b8324f;
  --k-shout-edge: #ec5577;
  --hard1: #b26bd6; --hard2: #7a2f9e;
}
body { background: var(--bg2); font-weight: 800; }
body, .k-btn, .k-panel-title, .lvlpill, .k-pill { font-weight: 900; }
#bg { position: fixed; inset: 0; z-index: 0; background:
  radial-gradient(120% 60% at 50% 0%, rgba(255, 255, 255, .22), transparent 60%),
  linear-gradient(180deg, var(--bg1) 0%, var(--bg2) 55%, var(--bg3) 100%); transition: filter .6s; }
/* hafif mozaik deseni */
#bg::after { content: ''; position: absolute; inset: 0; opacity: .5; background-size: 36px 30px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='30'%3E%3Cpath d='M4 4c4 6 8 14 14 22M32 4c-4 6-8 14-14 22' stroke='%23e9bfa0' stroke-width='5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); }
body.hard #bg { --bg1: #ffd6dd; --bg2: #f39bb0; --bg3: #d9607f; }
body.super #bg { --bg1: #e8a0c0; --bg2: #b8427a; --bg3: #6e1d48; }
#c { z-index: 1; }

/* yükleme */
#loading { background: linear-gradient(180deg, var(--bg1), var(--bg2) 60%, var(--bg3)); }
#loading .lg-bar { background: rgba(92, 52, 38, .15); }
#loading .lg-bar i { background: repeating-linear-gradient(-45deg, #ff8aa6 0 8px, #ff6f91 8px 16px); }
.ms-logo { display: flex; flex-direction: column; align-items: center; line-height: .9; font-family: var(--k-font-d); text-align: center; transform: rotate(-3deg); }
.ms-logo span { display: block; font-size: 96px; font-weight: 900; letter-spacing: .01em; }
.ms-logo .a { display: flex; gap: 0; }
.ms-logo .a b { display: inline-block; font-weight: 900; -webkit-text-stroke: 4px #5c3426; paint-order: stroke fill; text-shadow: 0 7px 0 #5c3426, 0 14px 22px rgba(92, 52, 38, .3); animation: ms-bob 2.2s ease-in-out infinite; }
.ms-logo .a b:nth-child(1) { color: #ff6f91; } .ms-logo .a b:nth-child(2) { color: #ffc23d; animation-delay: .15s; } .ms-logo .a b:nth-child(3) { color: #5ec9b8; animation-delay: .3s; } .ms-logo .a b:nth-child(4) { color: #8f7bff; animation-delay: .45s; } .ms-logo .a b:nth-child(5) { color: #ff9a4d; animation-delay: .6s; }
.ms-logo .sub { font-size: 20px; color: #8a6252; letter-spacing: .25em; margin-top: 6px; font-family: var(--k-font-b); text-transform: uppercase; }
.ms-logo .tiles { display: flex; gap: 6px; justify-content: center; margin-bottom: 10px; transform: rotate(4deg); }
.ms-logo .tiles i { width: 22px; height: 22px; border-radius: 6px; box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .2), inset 0 3px 0 rgba(255, 255, 255, .45), 0 4px 0 #1d1460; animation: ms-bob 1.6s ease-in-out infinite; }
.ms-logo .tiles i:nth-child(2) { animation-delay: .15s; } .ms-logo .tiles i:nth-child(3) { animation-delay: .3s; } .ms-logo .tiles i:nth-child(4) { animation-delay: .45s; } .ms-logo .tiles i:nth-child(5) { animation-delay: .6s; }
@keyframes ms-bob { 50% { transform: translateY(-8px); } }

/* ---- ana sayfa ---- */
.home { display: flex; flex-direction: column; align-items: center; padding: calc(var(--k-safe-t) + 66px) 16px calc(var(--k-safe-b) + 30px); }
.home > * { pointer-events: auto; }
.home .ms-logo { margin-top: 0; pointer-events: none; }
.home .ms-logo .a b { font-size: min(21vw, 92px); }
.home .grow { flex: 1; }
.home .playwrap { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.home .playbtn { min-width: 250px; }
.home .playbtn .lvl { display: block; font-size: 17px; opacity: .9; margin-top: -2px; }
.home .playbtn .k-btn-t { display: flex; flex-direction: column; line-height: 1; }
.home .tierTag { font-family: var(--k-font-d); font-size: 18px; color: #fff; padding: 5px 16px; border-radius: 12px; background: linear-gradient(var(--hard1), var(--hard2)); box-shadow: 0 4px 0 #8c0f2c; animation: ms-pulse 1.2s infinite; }
@keyframes ms-pulse { 50% { transform: scale(1.06); } }
.side { position: absolute; top: calc(var(--k-safe-t) + 236px); display: flex; flex-direction: column; gap: 30px; }
.side.l { left: 12px; } .side.r { right: 12px; }
.sbtn { position: relative; width: 64px; height: 64px; border: 0; border-radius: 20px; padding: 8px; cursor: pointer; background: linear-gradient(180deg, #fff, #e5ecff); box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .08), 0 5px 0 #c48c63, 0 10px 16px rgba(92, 52, 38, .2); display: grid; place-items: center; }
.sbtn:active { transform: translateY(4px); box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .1), 0 1px 0 #c48c63; }
.sbtn .k-ic { width: 40px; height: 40px; }
.sbtn small { position: absolute; bottom: -20px; left: 50%; transform: translateX(-50%); font-family: var(--k-font-d); font-size: 14px; color: #5c3426; white-space: nowrap; }
.sbtn .dot { position: absolute; top: -5px; right: -5px; width: 20px; height: 20px; border-radius: 50%; background: #ff3d5a; border: 3px solid #fff; animation: ms-pulse 1s infinite; }
.sbtn.album svg { color: #6a3cff; }

/* ---- oyun içi ---- */
.hud { position: absolute; inset: 0; pointer-events: none; }
.hud > * { pointer-events: auto; }
.lvlpill { position: absolute; top: calc(var(--k-safe-t) + 12px); left: 72px; padding: 6px 16px 8px; border-radius: 16px; font-family: var(--k-font-d); font-size: 20px; color: #fff; white-space: nowrap; background: linear-gradient(180deg, #ff9db4, #ec5577); box-shadow: inset 0 3px 0 rgba(255, 255, 255, .35), 0 4px 0 #b8324f, 0 8px 14px rgba(92, 52, 38, .25); text-shadow: 0 2px 0 rgba(0, 0, 0, .25); }
.lvlpill.hard, .lvlpill.super { background: linear-gradient(180deg, var(--hard1), var(--hard2)); box-shadow: inset 0 3px 0 rgba(255, 255, 255, .35), 0 4px 0 #4f1a6b, 0 8px 14px rgba(0, 0, 0, .25); }
.lvlpill small { display: block; font-size: 12px; text-align: center; margin-top: -2px; opacity: .95; letter-spacing: .06em; }
.hud .k-top { padding-left: 12px; }
/* */ .hud .pausebtn { position: absolute; left: 12px; top: calc(var(--k-safe-t) + 10px); }
.progress { position: absolute; left: 50%; transform: translateX(-50%); top: calc(var(--k-safe-t) + 68px); width: min(220px, 50vw); height: 12px; border-radius: 6px; background: rgba(0, 0, 0, .25); overflow: hidden; box-shadow: inset 0 2px 3px rgba(0, 0, 0, .3); }
.progress i { display: block; height: 100%; width: 0; border-radius: 6px; background: repeating-linear-gradient(-45deg, #ff8aa6 0 8px, #ff6f91 8px 16px); transition: width .25s; }
.trays { position: absolute; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 12px; background: rgba(92, 52, 38, .72); color: #fff; font-family: var(--k-font-d); font-size: 16px; pointer-events: none; white-space: nowrap; transition: background .2s; }
.trays b { min-width: 30px; text-align: center; }
.trays i { width: 9px; height: 9px; border-radius: 3px; background: #fff; opacity: .95; }
.trays i.off { opacity: .2; }
.trays.full { background: rgba(214, 31, 69, .85); }
.boostbar { position: absolute; left: 50%; bottom: calc(var(--k-safe-b) + 10px); transform: translateX(-50%); display: flex; gap: 10px; padding: 9px 12px 11px; border-radius: 24px; background: rgba(140, 86, 56, .3); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .25); }
.bst { position: relative; width: 60px; height: 60px; border: 0; border-radius: 50%; padding: 0; cursor: pointer; background: radial-gradient(circle at 35% 30%, #7fd9c9, #3a9e8f); box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .18), inset 0 3px 0 rgba(255, 255, 255, .45), 0 4px 0 #276f64; display: grid; place-items: center; transition: transform .1s; }
.bst svg { width: 42px; height: 42px; filter: drop-shadow(0 2px 0 rgba(0, 0, 0, .2)); }
.bst:active { transform: translateY(3px); }
.bst .n { position: absolute; right: -6px; top: -6px; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 12px; display: grid; place-items: center; background: #ff3d5a; color: #fff; font-family: var(--k-font-d); font-size: 15px; border: 2.5px solid #fff; }
.bst .n.plus { background: #39d353; }
.bst.locked { background: linear-gradient(180deg, #b7bfd6, #8890aa); box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .18), 0 4px 0 #5d6480; }
.bst.locked svg { opacity: .35; }
.bst .lk { position: absolute; inset: auto 0 4px 0; font-family: var(--k-font-d); font-size: 13px; color: #fff; text-shadow: 0 1px 0 rgba(0, 0, 0, .4); }
/* kilitli güçlendirici: dil bağımsız kilit + bölüm no (dar düğmelere her dilde sığar) */
.bst .lk { display: flex; align-items: center; justify-content: center; gap: 2px; line-height: 1; }
.bst .lk i { display: block; width: 12px; height: 12px; filter: drop-shadow(0 1px 0 rgba(0, 0, 0, .35)); }
.bst .lk i svg { width: 100%; height: 100%; }
.bst.active { background: linear-gradient(180deg, #ffe066, #ffab1a); box-shadow: 0 0 0 4px #fff, 0 0 20px 6px rgba(255, 210, 60, .8); animation: ms-pulse .8s infinite; }
.speed { background: linear-gradient(180deg, #ffd36b, #ff9a1f); box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .18), inset 0 3px 0 rgba(255, 255, 255, .45), 0 4px 0 #c46a00; font-family: var(--k-font-d); font-size: 22px; color: #fff; text-shadow: 0 2px 0 rgba(0, 0, 0, .25); }
.speed.on { background: linear-gradient(180deg, #7ef06a, #2fcf4f); box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .18), inset 0 3px 0 rgba(255, 255, 255, .45), 0 4px 0 #1e9a3a; }
.helpbar { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(var(--k-safe-b) + 96px); padding: 10px 18px; border-radius: 16px; background: rgba(255, 255, 255, .95); color: var(--k-ink); font-weight: 900; font-size: 17px; text-align: center; box-shadow: 0 6px 18px rgba(0, 0, 0, .25); max-width: calc(100% - 32px); animation: k-pop .3s both; }
.helpbar .x { margin-left: 10px; color: #ff4757; cursor: pointer; }

/* öğretici balon */
.tip { position: absolute; transform: translate(-50%, -100%); max-width: min(300px, 80vw); padding: 12px 16px; border-radius: 18px; background: #fff; color: var(--k-ink); font-weight: 900; font-size: 17px; line-height: 1.25; text-align: center; box-shadow: 0 8px 20px rgba(0, 0, 0, .3); pointer-events: none; z-index: 30; animation: k-pop .35s cubic-bezier(.2, 1.5, .4, 1) both; }
.tip::after { content: ''; position: absolute; left: 50%; bottom: -9px; transform: translateX(-50%) rotate(45deg); width: 18px; height: 18px; background: #fff; border-radius: 3px; }
.tip.down { transform: translate(-50%, 0); }
.tip.down::after { bottom: auto; top: -9px; }

/* zor bölüm uyarısı */
.hardBanner { position: fixed; left: 0; right: 0; top: 40%; z-index: 40; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 18px 0 20px; background: linear-gradient(90deg, transparent, rgba(214, 31, 69, .92) 15%, rgba(214, 31, 69, .92) 85%, transparent); color: #fff; font-family: var(--k-font-d); pointer-events: none; animation: ms-banner 2.2s both; }
.hardBanner b { font-size: 46px; text-shadow: 0 4px 0 #7a0d26; }
.hardBanner span { font-size: 18px; opacity: .95; }
.hardBanner .sk { width: 48px; height: 48px; color: #fff; }
@keyframes ms-banner { 0% { transform: scaleY(0); opacity: 0; } 12% { transform: scaleY(1); opacity: 1; } 80% { opacity: 1; } 100% { opacity: 0; } }

/* sonuç ekranları */
.k-panel.win { padding-top: 54px; }
.winPic { width: 210px; height: 210px; margin: 0 auto; image-rendering: pixelated; filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .25)); animation: ms-reveal .9s cubic-bezier(.2, 1.4, .4, 1) .1s both; }
@keyframes ms-reveal { from { transform: scale(.3) rotate(-10deg); opacity: 0; } }
.winName { text-align: center; font-family: var(--k-font-d); font-size: 22px; color: var(--k-ink2); margin-top: -4px; }
.winName::first-letter { text-transform: uppercase; }
.rewardRow { display: flex; align-items: center; justify-content: center; gap: 8px; font-family: var(--k-font-d); font-size: 34px; }
.rewardRow .k-ic { width: 44px; height: 44px; }
.failIc { width: 110px; height: 110px; margin: 0 auto; color: #ff4757; animation: ms-shake .5s both; }
.failIc .k-ic { width: 100%; height: 100%; }
@keyframes ms-shake { 20%, 60% { transform: rotate(-8deg); } 40%, 80% { transform: rotate(8deg); } }
.offer { display: flex; flex-direction: column; gap: 10px; }
.slotPreview { display: flex; justify-content: center; gap: 6px; }
.slotPreview i { width: 32px; height: 38px; border-radius: 10px; background: #dfe6f5; box-shadow: inset 0 3px 4px rgba(0, 0, 0, .15); }
.slotPreview i.full { background: #ff8a9a; }
.slotPreview i.new { background: #7ef06a; box-shadow: 0 0 0 3px #fff, 0 0 12px 4px rgba(63, 208, 106, .7); animation: ms-pulse .8s infinite; }

/* albüm */
.k-panel.album { width: min(460px, 100%); }
.albumGrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.albumGrid .pic { position: relative; aspect-ratio: 1; border-radius: 16px; background: #fff; box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .07), 0 0 0 3px #f3dcbc; display: grid; place-items: center; overflow: hidden; }
.albumGrid .pic canvas { width: 82%; height: 82%; image-rendering: pixelated; }
.albumGrid .pic.locked { background: #e9e2d6; }
.albumGrid .pic.locked span { font-family: var(--k-font-d); font-size: 28px; color: #c7b9a3; }
.albumGrid .pic b { position: absolute; left: 6px; top: 4px; font-family: var(--k-font-d); font-size: 12px; color: var(--k-ink2); }
.albumHead { text-align: center; font-weight: 900; color: var(--k-ink2); }
.albumBig { width: min(280px, 70vw); height: min(280px, 70vw); margin: 0 auto; image-rendering: pixelated; }

/* renk seçimi (renk bombası) */
.colorPick { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.colorPick button { width: 58px; height: 58px; border: 0; border-radius: 16px; cursor: pointer; box-shadow: inset 0 -5px 0 rgba(0, 0, 0, .2), inset 0 3px 0 rgba(255, 255, 255, .45), 0 4px 0 rgba(0, 0, 0, .25); }
.colorPick button:active { transform: translateY(3px); }

@media (max-height: 700px) {
  .bst { width: 52px; height: 52px; border-radius: 16px; }
  .bst svg { width: 36px; height: 36px; }
  .home .ms-logo .a b { font-size: 70px; }
}
@media (min-aspect-ratio: 1/1) {
  .side { top: calc(var(--k-safe-t) + 120px); }
}
.boostbar:empty { display: none; }
.hud > .k-top { pointer-events: none; }
.winPic, .albumBig, .albumGrid .pic canvas { object-fit: contain; }
.albumGrid { gap: 0; border: 4px dashed #e9c3a2; border-radius: 16px; padding: 6px; background: #fff7ee; }
.albumGrid .pic { border-radius: 4px; box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 5px rgba(236, 85, 119, .25); }
.albumGrid .pic:nth-child(odd) { background: #fde9ee; } .albumGrid .pic:nth-child(even) { background: #e9f6f3; }

/* yan düğme etiketleri: ekrana sığsın, gerekirse iki satır */
.sbtn small { top: calc(100% + 4px); bottom: auto; width: 84px; white-space: normal; text-align: center; line-height: 1.05; font-size: 13px; }
.side { gap: 40px; }
.side.l { left: 16px; } .side.r { right: 16px; }

/* ---- kazanma: seri ödülü ve "yorgana dikildi" anı ---- */
.winPic, .albumBig { border-radius: 10px; }
.streakRow { margin: -2px auto 4px; padding: 4px 12px; border-radius: 999px; background: #fff1d6; color: #b4630c; font-weight: 900; font-size: 15px; width: fit-content; }
.quiltBeat { display: flex; align-items: center; gap: 10px; margin: 6px 0 10px; padding: 10px 12px; border: 3px dashed #e9c3a2; border-radius: 14px; background: #fff7ee; text-align: left; }
.quiltBeat .qIc { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; background: #fde9ee; color: #e05577; box-shadow: inset 0 0 0 2px #fff, inset 0 0 0 4px rgba(236, 85, 119, .3); }
.quiltBeat .qIc svg { width: 24px; height: 24px; }
.quiltBeat .qT { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.quiltBeat b { font-size: 15px; color: var(--k-ink); }
.quiltBeat small { font-size: 13px; font-weight: 800; color: var(--k-ink2); }
.quiltBeat .qBar { height: 8px; border-radius: 99px; background: #f1e1cf; overflow: hidden; }
.quiltBeat .qBar i { display: block; height: 100%; border-radius: 99px; background: repeating-linear-gradient(45deg, #ec5577 0 6px, #f37b96 6px 12px); transition: width .6s ease .7s; }
.quiltBeat.new { opacity: .55; transform: scale(.94); transition: opacity .3s, transform .45s cubic-bezier(.2, 1.6, .4, 1); }
.quiltBeat.new.sewn { opacity: 1; transform: none; border-color: #ec5577; }
.quiltBeat.new.sewn .qIc { animation: q-stitch .6s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes q-stitch { 0% { transform: scale(.4) rotate(-25deg); } 100% { transform: none; } }

/* ---- yorgan sayfaları ---- */
.quiltPages { display: flex; flex-direction: column; gap: 14px; max-height: 62vh; overflow-y: auto; padding: 2px; }
.quiltPage .qpHead { display: flex; justify-content: space-between; align-items: center; margin: 0 4px 6px; font-family: var(--k-font-d); color: var(--k-ink2); }
.quiltPage .qpReward { display: inline-flex; align-items: center; gap: 3px; font-weight: 900; font-size: 14px; color: #b4630c; opacity: .75; }
.quiltPage .qpReward svg { width: 18px; height: 18px; }
.quiltPage .qpReward.got { opacity: 1; color: #2f9a52; }
.quiltPage .albumGrid { grid-template-columns: repeat(5, 1fr); }
.quiltPage.full .albumGrid { border-style: solid; border-color: #ec9bb0; }
.pctDone { margin: 2px auto 10px; padding: 6px 14px; width: max-content; border-radius: 999px; background: #ffe36b; color: #6b3d00; font: 900 18px Nunito, sans-serif; box-shadow: 0 3px 0 rgba(0, 0, 0, .15); }
