/* Rumblo Tag — arayüz. Oyuncak hissi: kalın kenarlı, alt gölgeli tombul düğmeler; Fredoka yazı tipi. */
@font-face { font-family: 'Fredoka'; font-weight: 400; font-display: swap; src: url(vendor/fonts/fredoka-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Fredoka'; font-weight: 500; font-display: swap; src: url(vendor/fonts/fredoka-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: 'Fredoka'; font-weight: 600; font-display: swap; src: url(vendor/fonts/fredoka-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Fredoka'; font-weight: 700; font-display: swap; src: url(vendor/fonts/fredoka-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: 'Fredoka'; font-weight: 400 700; font-display: swap; src: url(vendor/fonts/fredoka-latin-ext-600-normal.woff2) format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF; }

:root {
  --ink: #1a1a2e; --paper: #ffffff; --blue: #3a86ff; --red: #ff006e; --yellow: #ffbe0b; --purple: #8338ec; --green: #06d6a0; --orange: #fb5607;
  --sky: #cfe8ff; --soft: #eef3ff; --muted: #6b7394;
  --sa-t: env(safe-area-inset-top, 0px); --sa-b: env(safe-area-inset-bottom, 0px); --sa-l: env(safe-area-inset-left, 0px); --sa-r: env(safe-area-inset-right, 0px);
  font-family: 'Fredoka', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--ink);
  -webkit-tap-highlight-color: transparent;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #9ad0ff; overscroll-behavior: none; touch-action: none; user-select: none; -webkit-user-select: none; }
canvas#gl { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
button:focus-visible, input:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
.screen { position: fixed; inset: 0; z-index: 10; }

/* ---------- ortak bileşenler ---------- */
.btn {
  position: relative; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: 52px; padding: 8px 22px; border-radius: 18px; font-weight: 700; font-size: 18px; letter-spacing: .02em;
  color: #fff; background: linear-gradient(#57a0ff, #2f6fe0); border: 3px solid var(--ink);
  box-shadow: 0 5px 0 var(--ink), inset 0 3px 0 rgba(255,255,255,.45); text-shadow: 0 2px 0 rgba(0,0,0,.25);
  transition: transform .08s, box-shadow .08s, filter .15s;
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink), inset 0 3px 0 rgba(255,255,255,.45); }
.btn.play { background: linear-gradient(#ffd84d, #ffae00); color: var(--ink); text-shadow: 0 2px 0 rgba(255,255,255,.5); }
.btn.play .big { font-size: 34px; line-height: 1; }
.btn.play small { font-size: 13px; font-weight: 600; opacity: .8; }
.btn.play.small .big, .btn.play.small { font-size: 20px; }
.btn.ghost { background: linear-gradient(#ffffff, #e6ecf8); color: var(--ink); text-shadow: none; }
.btn.red { background: linear-gradient(#ff4d94, #e0005c); }
.btn.green { background: linear-gradient(#3ee8b5, #00b388); color: var(--ink); text-shadow: none; }
.btn:disabled { filter: grayscale(.8) brightness(.95); cursor: default; }
.chip { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px 0 6px; border-radius: 20px; background: rgba(255,255,255,.92); border: 3px solid var(--ink); box-shadow: 0 3px 0 var(--ink); font-weight: 600; }
.iconbtn { width: 46px; height: 46px; border-radius: 14px; background: #fff; border: 3px solid var(--ink); box-shadow: 0 3px 0 var(--ink); font-size: 20px; display: grid; place-items: center; }
.iconbtn:active { transform: translateY(3px); box-shadow: none; }
.card { background: #fff; border: 3px solid var(--ink); border-radius: 26px; box-shadow: 0 8px 0 var(--ink); padding: 20px; }
.ic-coin { width: 26px; height: 26px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff6b0, #ffc300 45%, #e09200); border: 2.5px solid var(--ink); display: inline-block; flex: none; }

/* ---------- yükleniyor ---------- */
#loading { display: grid; place-content: center; gap: 28px; background: radial-gradient(circle at 50% 40%, #bfe3ff, #6eb6ff); }
#loading .bar { width: min(320px, 70vw); height: 16px; border-radius: 10px; border: 3px solid var(--ink); background: #fff; overflow: hidden; margin: 0 auto; }
#loading .bar i { display: block; height: 100%; width: 10%; background: linear-gradient(90deg, var(--yellow), var(--orange)); transition: width .25s; }
.logo { display: flex; flex-direction: column; align-items: center; line-height: .82; filter: drop-shadow(0 6px 0 var(--ink)); pointer-events: none; }
.logo span { font-weight: 700; -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; }
.logo .l1 { font-size: 42px; color: var(--yellow); letter-spacing: .04em; }
.logo .l2 { font-size: 66px; color: #fff; letter-spacing: .06em; transform: rotate(-3deg); }
.logo.big .l1 { font-size: 56px; } .logo.big .l2 { font-size: 90px; }

/* ---------- ana ekran ---------- */
#home { pointer-events: none; }
#home > * { pointer-events: auto; }
#home .topbar { position: absolute; top: calc(12px + var(--sa-t)); left: calc(14px + var(--sa-l)); right: calc(14px + var(--sa-r)); display: flex; align-items: center; gap: 10px; }
#home .spacer { flex: 1; }
.prof .lvl { width: 32px; height: 32px; border-radius: 50%; background: var(--purple); color: #fff; display: grid; place-items: center; border: 2.5px solid var(--ink); font-size: 15px; }
.prof .nm { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; max-width: 150px; }
.prof .nm b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.xpbar { display: block; width: 110px; height: 7px; border-radius: 4px; background: #dfe6f5; overflow: hidden; }
.xpbar i { display: block; height: 100%; width: 0; background: var(--green); }
.coin b { font-size: 17px; font-variant-numeric: tabular-nums; }
#home .logo { position: absolute; top: calc(70px + var(--sa-t)); left: 50%; transform: translateX(-50%); }
#home .side { position: absolute; left: calc(14px + var(--sa-l)); top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 12px; }
.tile { position: relative; width: 76px; height: 72px; border-radius: 18px; background: #fff; border: 3px solid var(--ink); box-shadow: 0 4px 0 var(--ink); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-weight: 600; font-size: 12.5px; padding: 0 3px; text-align: center; line-height: 1.05; overflow-wrap: anywhere; }
.tile .ico { font-size: 28px; line-height: 1; }
.tile:active { transform: translateY(4px); box-shadow: none; }
.tile .dot { position: absolute; top: -6px; inset-inline-end: -6px; width: 18px; height: 18px; border-radius: 50%; background: var(--red); border: 2.5px solid var(--ink); }
#home .modes { position: absolute; right: calc(16px + var(--sa-r)); top: calc(76px + var(--sa-t)); display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: min(360px, 44vw); }
.mcard { position: relative; text-align: start; padding: 10px 12px 10px 12px; min-height: 86px; border-radius: 18px; border: 3px solid var(--ink); box-shadow: 0 4px 0 var(--ink); color: #fff; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; }
.mcard b { font-size: 16px; line-height: 1.05; overflow-wrap: break-word; hyphens: auto; text-shadow: 0 2px 0 rgba(0,0,0,.3); }
.mcard b::before { content: ''; float: right; width: 30px; height: 1em; }
[dir=rtl] .mcard b::before { float: left; }
.mcard small { font-size: 11px; line-height: 1.2; opacity: .95; font-weight: 500; }
.mcard .mi { position: absolute; inset-inline-end: 8px; top: 4px; font-size: 30px; filter: drop-shadow(0 2px 0 rgba(0,0,0,.25)); }
.mcard.sel { outline: 4px solid var(--yellow); outline-offset: 2px; }
.mcard:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.mcard.infection { background: linear-gradient(135deg, #ff4d94, #c9184a); }
.mcard.classic { background: linear-gradient(135deg, #4d9bff, #1d4ed8); }
.mcard.paint { background: linear-gradient(135deg, #2ee6b6, #0f9d7a); }
.mcard.treasure { background: linear-gradient(135deg, #b079ff, #6a1fd6); }
#home .playbox { position: absolute; right: calc(16px + var(--sa-r)); bottom: calc(18px + var(--sa-b)); display: flex; gap: 12px; align-items: flex-end; }
#home .playbox .play { min-width: 210px; min-height: 92px; }
#home .playbox .friends { font-size: 15px; min-height: 58px; }
.netnote { position: absolute; left: 50%; bottom: calc(10px + var(--sa-b)); transform: translateX(-50%); font-size: 13px; color: var(--ink); background: rgba(255,255,255,.8); padding: 4px 12px; border-radius: 12px; font-weight: 500; }
.netnote:empty { display: none; }

/* dikey ekranda ana ekran */
@media (max-aspect-ratio: 1/1) {
  #home .logo { top: calc(62px + var(--sa-t)); transform: translateX(-50%) scale(.8); }
  #home .modes { left: 14px; right: 14px; width: auto; top: auto; bottom: calc(128px + var(--sa-b)); }
  #home .side { top: auto; bottom: calc(362px + var(--sa-b)); transform: none; flex-direction: row; left: 50%; translate: -50% 0; }
  #home .playbox { left: 14px; right: 14px; justify-content: center; }
  #home .playbox .play { flex: 1; }
  .tile { width: 78px; height: 62px; font-size: 11px; }
  /* uzun dillerde kartlar ikon sırasının üstüne taşmasın */
  #home .mcard { height: 104px; min-height: 0; justify-content: flex-start; padding-top: 12px; }
  #home .mcard small { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
  #home .mcard b { font-size: 15px; }
  /* olay akışı dikey ekranda HUD'un (mod, süre) altına */
  #feed { top: calc(118px + var(--sa-t)); max-width: 64vw; }
  #feed div { font-size: 12px; }
  .vopt { min-height: 132px; padding: 10px 6px; text-align: center; }
  .vopt .mi { font-size: 30px; }
}
@media (max-height: 460px) {
  #home .logo { transform: translateX(-50%) scale(.7); top: calc(40px + var(--sa-t)); }
  #home .mcard { min-height: 70px; }
  .tile { width: 64px; height: 56px; } .tile .ico { font-size: 22px; }
  #home .playbox .play { min-height: 76px; }
}

/* ---------- oyun içi ---------- */
#hud { position: fixed; inset: 0; z-index: 5; pointer-events: none; }
#hud button, #hud .wheel, #hud #paintbar { pointer-events: auto; }
/* rol rengi kenar parıltısı: büyük bulanık iç gölge yerine radyal geçiş (boyaması ucuz; zayıf GPU'da her kare dolum maliyeti az) */
.edge { position: absolute; inset: 0; pointer-events: none; contain: strict; --ec: transparent; --es: 62%;
  background: radial-gradient(ellipse 75% 75% at 50% 50%, transparent var(--es), var(--ec) 100%); }
.edge.run { --ec: rgba(58,134,255,.42); }
.edge.chase { --ec: rgba(255,0,110,.46); --es: 58%; }
.edge.hide { --ec: rgba(46,196,182,.36); }
.edge.hunt { --ec: rgba(251,86,7,.42); }
.edge.A { --ec: rgba(255,190,11,.42); }
.edge.B { --ec: rgba(131,56,236,.42); }
.edge.soak { --ec: rgba(90,170,255,.62); --es: 45%; }
.hud-top { position: absolute; top: calc(10px + var(--sa-t)); left: 0; right: 0; display: flex; justify-content: center; align-items: flex-start; gap: 10px; padding: 0 70px; }
.timer { min-width: 104px; text-align: center; font-size: 30px; font-weight: 700; color: #fff; background: var(--ink); border-radius: 18px; padding: 2px 16px; border: 3px solid #fff; font-variant-numeric: tabular-nums; box-shadow: 0 4px 0 rgba(0,0,0,.25); }
.timer.hurry { background: var(--red); animation: pulse .5s infinite alternate; }
@keyframes pulse { to { transform: scale(1.08); } }
.modepill, .rolepill { margin-top: 6px; padding: 5px 12px; border-radius: 14px; background: rgba(255,255,255,.92); border: 2.5px solid var(--ink); font-size: 14px; font-weight: 600; display: flex; flex-direction: column; align-items: center; line-height: 1.1; }
.modepill span { font-size: 12px; color: var(--muted); font-weight: 500; }
.rolepill { color: #fff; font-weight: 700; font-size: 15px; }
.rolepill.run { background: var(--blue); } .rolepill.chase { background: var(--red); } .rolepill.hide { background: #2ec4b6; } .rolepill.hunt { background: var(--orange); }
.rolepill.A { background: var(--yellow); color: var(--ink); } .rolepill.B { background: var(--purple); } .rolepill.out { background: #8d99ae; }
.teams { position: absolute; top: calc(64px + var(--sa-t)); left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 22px; }
.teams .ta, .teams .tb { min-width: 58px; text-align: center; padding: 2px 12px; border-radius: 14px; border: 3px solid var(--ink); }
.teams .ta { background: var(--yellow); } .teams .tb { background: var(--purple); color: #fff; }
.teams .goal { color: #fff; -webkit-text-stroke: 1px var(--ink); font-size: 16px; }
#feed { position: absolute; top: calc(12px + var(--sa-t)); left: calc(12px + var(--sa-l)); display: flex; flex-direction: column; gap: 4px; max-width: 42vw; }
#feed div { background: rgba(26,26,46,.72); color: #fff; font-size: 13px; padding: 4px 10px; border-radius: 10px; animation: fin .25s; }
@keyframes fin { from { transform: translateX(-20px); opacity: 0; } }
#banner { position: absolute; top: 24%; left: 50%; transform: translateX(-50%); text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px; animation: pop .35s cubic-bezier(.2,1.6,.4,1); }
#banner b { font-size: 64px; font-weight: 700; color: #fff; -webkit-text-stroke: 4px var(--ink); paint-order: stroke fill; line-height: 1; filter: drop-shadow(0 5px 0 var(--ink)); }
#banner span { font-size: 20px; font-weight: 600; background: rgba(255,255,255,.92); padding: 4px 14px; border-radius: 14px; border: 2.5px solid var(--ink); }
#banner.run b { color: #8ec5ff; } #banner.chase b { color: #ff5c9d; } #banner.hide b { color: #6ff0da; } #banner.hunt b { color: #ff9a5a; } #banner.A b { color: #ffd84d; } #banner.B b { color: #c29bff; }
@keyframes pop { from { transform: translateX(-50%) scale(.3); opacity: 0; } }
#count { position: absolute; top: 40%; left: 50%; transform: translate(-50%, -50%); font-size: 120px; font-weight: 700; color: #fff; -webkit-text-stroke: 6px var(--ink); paint-order: stroke fill; animation: pop .3s; }
#toasts { position: absolute; top: 34%; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; }
.toast { font-size: 26px; font-weight: 700; color: #fff; -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; text-align: center; animation: pop .3s cubic-bezier(.2,1.6,.4,1), fade 2.4s forwards; white-space: nowrap; }
.toast.red { color: #ff5c9d; } .toast.warn { color: #ffd84d; } .toast.good { color: #6ff0da; } .toast.big { font-size: 40px; }
@keyframes fade { 80% { opacity: 1; } to { opacity: 0; transform: translateX(0) translateY(-20px); } }
#meters { position: absolute; top: calc(70px + var(--sa-t)); right: calc(12px + var(--sa-r)); display: flex; flex-direction: column; gap: 8px; }
.meter { display: grid; grid-template-columns: auto 120px auto; align-items: center; gap: 8px; background: rgba(255,255,255,.92); border: 2.5px solid var(--ink); border-radius: 14px; padding: 5px 10px; font-size: 13px; font-weight: 600; }
.meter i { display: block; height: 12px; border-radius: 6px; background: #e3e8f4; overflow: hidden; }
.meter i i { height: 100%; width: 0; transition: width .3s, background .3s; }
.meter.vis i i { background: var(--green); } .meter.water i i { background: #4cc9f0; }
.meter b { min-width: 36px; text-align: right; font-variant-numeric: tabular-nums; }
#blind { position: absolute; inset: 0; background: radial-gradient(circle, rgba(20,20,40,.82), rgba(10,10,25,.97)); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: #fff; }
#blind b { font-size: 30px; } #blind span { font-size: 64px; font-weight: 700; color: var(--yellow); }
#itArrow { position: absolute; font-size: 34px; color: var(--red); -webkit-text-stroke: 2px var(--ink); transform-origin: center; }
.dashring { position: absolute; left: calc(18px + var(--sa-l)); bottom: calc(18px + var(--sa-b)); width: 52px; height: 52px; display: grid; place-items: center; }
.dashring svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.dashring circle { fill: rgba(255,255,255,.85); stroke-width: 4; } .dashring .bg { stroke: var(--ink); } .dashring .fg { fill: none; stroke: var(--yellow); stroke-dasharray: 107; stroke-dashoffset: 0; transition: stroke-dashoffset .1s linear; }
.dashring b { position: relative; font-size: 20px; }
.dashring.ready b { animation: pulse .4s 2 alternate; }
.pausebtn { position: absolute; top: calc(10px + var(--sa-t)); right: calc(12px + var(--sa-r)); width: 42px; height: 42px; font-size: 14px; }
.ping { position: absolute; bottom: calc(4px + var(--sa-b)); right: calc(8px + var(--sa-r)); font-size: 11px; color: rgba(26,26,46,.6); }
#tut { position: absolute; top: calc(64px + var(--sa-t)); left: 50%; transform: translateX(-50%); display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; background: rgba(255,255,255,.95); border: 3px solid var(--ink); border-radius: 18px; box-shadow: 0 4px 0 var(--ink); padding: 8px 10px 8px 16px; width: min(560px, 94vw); pointer-events: auto; }
#tut .ttl { grid-column: 1; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
#tut b { grid-column: 1; font-size: 19px; }
#tut .tbar { grid-column: 1; height: 8px; border-radius: 4px; background: #e3e8f4; overflow: hidden; display: block; }
#tut .tbar i { display: block; height: 100%; width: 0; background: var(--green); transition: width .4s; }
#tut .btn { grid-column: 2; grid-row: 1 / span 3; min-height: 44px; font-size: 14px; padding: 4px 14px; }
#tut .legal { grid-column: 1 / span 2; margin: 2px 0 0; font-size: 11px; color: var(--muted); line-height: 1.3; }
#crosshair { position: absolute; left: 50%; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; border: 2.5px solid #fff; border-radius: 50%; box-shadow: 0 0 0 2px var(--ink); }
body.touchui .dashring { display: none; }
.tbtn.dash { --cd: 0; }
.tbtn.dash::after { content: ''; position: absolute; inset: -3px; border-radius: 50%; background: conic-gradient(rgba(26,26,46,.55) calc(var(--cd) * 360deg), transparent 0); pointer-events: none; }
@media (max-width: 480px) { .hud-top { padding: 0 60px 0 8px; gap: 6px; justify-content: flex-start; } .timer { font-size: 24px; min-width: 84px; padding: 2px 10px; } .modepill { font-size: 12px; padding: 4px 8px; } .modepill span { font-size: 10.5px; } .rolepill { font-size: 13px; } }

/* dokunmatik */
#touch { position: absolute; inset: 0; pointer-events: none; }
#joy { position: absolute; width: 130px; height: 130px; margin: -65px 0 0 -65px; border-radius: 50%; background: rgba(255,255,255,.22); border: 3px solid rgba(255,255,255,.7); display: none; }
#joy i { position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; margin: -28px 0 0 -28px; border-radius: 50%; background: rgba(255,255,255,.9); border: 3px solid var(--ink); }
#joy.on { display: block; }
.tbtn { position: absolute; pointer-events: auto; border-radius: 50%; border: 3px solid var(--ink); box-shadow: 0 4px 0 var(--ink); font-weight: 700; color: #fff; text-shadow: 0 2px 0 rgba(0,0,0,.25); display: grid; place-items: center; font-size: 15px; touch-action: none; }
.tbtn.on { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); filter: brightness(1.1); }
.tbtn.jump { right: calc(26px + var(--sa-r)); bottom: calc(36px + var(--sa-b)); width: 96px; height: 96px; background: linear-gradient(#57a0ff, #2f6fe0); font-size: 17px; }
.tbtn.dash { right: calc(138px + var(--sa-r)); bottom: calc(30px + var(--sa-b)); width: 68px; height: 68px; background: linear-gradient(#ffd84d, #ffae00); font-size: 26px; }
.tbtn.slide { right: calc(40px + var(--sa-r)); bottom: calc(148px + var(--sa-b)); width: 64px; height: 64px; background: linear-gradient(#3ee8b5, #00b388); font-size: 13px; }
.tbtn.act { right: calc(118px + var(--sa-r)); bottom: calc(124px + var(--sa-b)); width: 80px; height: 80px; background: linear-gradient(#ff7a45, #fb5607); font-size: 14px; }
.tbtn.mini { width: 52px; height: 52px; font-size: 12px; background: linear-gradient(#ffffff, #e0e7f5); color: var(--ink); text-shadow: none; }
.tbtn.lock { right: calc(202px + var(--sa-r)); bottom: calc(40px + var(--sa-b)); }
.tbtn.taunt { right: calc(210px + var(--sa-r)); bottom: calc(104px + var(--sa-b)); }
.tbtn.paintb { right: calc(118px + var(--sa-r)); bottom: calc(124px + var(--sa-b)); width: 80px; height: 80px; background: linear-gradient(#3ee8b5, #00b388); color: #fff; font-size: 14px; }
.tbtn.emo { top: calc(62px + var(--sa-t)); right: calc(12px + var(--sa-r)); font-size: 22px; }
.tbtn.quick { top: calc(122px + var(--sa-t)); right: calc(12px + var(--sa-r)); font-size: 22px; }
body.lefty .tbtn:not(.emo):not(.quick) { right: auto; left: var(--x); }

/* çarklar */
.wheel { position: absolute; left: 50%; top: 50%; width: 300px; height: 300px; margin: -150px 0 0 -150px; border-radius: 50%; background: rgba(26,26,46,.55); border: 3px solid rgba(255,255,255,.6); }
.wheel button { position: absolute; width: 96px; height: 50px; margin: -25px 0 0 -48px; border-radius: 16px; background: #fff; border: 3px solid var(--ink); box-shadow: 0 3px 0 var(--ink); font-weight: 600; font-size: 13px; }
.wheel button:hover, .wheel button.hl { background: var(--yellow); }

/* boya araçları */
#paintbar { position: absolute; left: 50%; bottom: calc(12px + var(--sa-b)); transform: translateX(-50%); width: min(560px, 96vw); background: rgba(255,255,255,.96); border: 3px solid var(--ink); border-radius: 22px; box-shadow: 0 5px 0 var(--ink); padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.pal { display: grid; grid-template-columns: repeat(12, 1fr); gap: 5px; }
.pal button { aspect-ratio: 1; border-radius: 9px; border: 2.5px solid var(--ink); }
.pal button.sel { outline: 3px solid var(--yellow); outline-offset: 1px; transform: scale(1.08); }
.prow { display: flex; align-items: center; gap: 8px; }
.pbtn { display: flex; flex-direction: column; align-items: center; min-width: 58px; padding: 4px 8px; border-radius: 14px; background: var(--soft); border: 2.5px solid var(--ink); font-weight: 600; }
.pbtn span { font-size: 20px; line-height: 1.1; } .pbtn small { font-size: 11px; }
.pbtn.on { background: var(--yellow); }
.pbtn.done { background: var(--green); margin-inline-start: auto; min-height: 44px; justify-content: center; font-size: 15px; }
.psize { flex: 1; display: flex; flex-direction: column; font-size: 11px; font-weight: 600; }
.psize input { width: 100%; accent-color: var(--blue); }
.pcur { width: 38px; height: 38px; border-radius: 50%; border: 3px solid var(--ink); flex: none; }
.phint { margin: 0; font-size: 11.5px; color: var(--muted); text-align: center; }
body.touchui .phint { display: none; }

/* tur sonu / oylama */
#end, #vote { display: grid; place-items: center; background: rgba(20,20,45,.35); padding: 16px; }
.endcard { width: min(460px, 100%); text-align: center; animation: pop2 .4s cubic-bezier(.2,1.5,.4,1); }
@keyframes pop2 { from { transform: scale(.6); opacity: 0; } }
.endcard h2 { margin: 0; font-size: 38px; -webkit-text-stroke: 1px var(--ink); color: var(--yellow); text-shadow: 0 3px 0 var(--ink); }
.endcard h2.lose { color: #9aa5c4; }
.endcard p { margin: 4px 0 10px; font-weight: 500; color: var(--muted); }
.rank { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 5px; max-height: 38vh; overflow: auto; }
.rank li { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 12px; background: var(--soft); font-weight: 600; text-align: start; }
.rank li.me { background: #fff4c2; outline: 2.5px solid var(--yellow); }
.rank li.win .pl { background: var(--yellow); }
.rank .pl { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: #dfe6f5; font-size: 14px; }
.rank .sc { font-variant-numeric: tabular-nums; color: var(--muted); }
.reward { display: flex; justify-content: center; gap: 14px; align-items: center; margin-bottom: 12px; font-weight: 700; font-size: 20px; }
.reward .rc { display: flex; align-items: center; gap: 6px; }
.row { display: flex; gap: 10px; justify-content: center; }
.row .btn { flex: 1; }
.votecard { width: min(620px, 100%); text-align: center; }
.votecard h2 { margin: 0 0 12px; }
.vopts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.vopt { border-radius: 18px; border: 3px solid var(--ink); box-shadow: 0 4px 0 var(--ink); padding: 12px 8px; color: #fff; display: flex; flex-direction: column; gap: 4px; align-items: center; min-height: 120px; justify-content: center; }
.vopt .mi { font-size: 34px; } .vopt b { font-size: 15px; } .vopt small { font-size: 12px; opacity: .9; } .vopt .n { font-size: 22px; font-weight: 700; }
.vopt.sel { outline: 4px solid var(--yellow); outline-offset: 2px; transform: translateY(-3px); }
.vopt b::before { display: none; }
.vopt .mi { position: static; line-height: 1; }
.vopt .n.bump { animation: vbump .35s cubic-bezier(.2,1.6,.4,1); }
@keyframes vbump { from { transform: scale(1.7); } }
.vbar { height: 10px; border-radius: 5px; background: #e3e8f4; overflow: hidden; margin-top: 14px; }
.vbar i { display: block; height: 100%; background: var(--blue); width: 100%; transition: width .1s linear; }

/* panel */
.panel { display: grid; place-items: center; background: rgba(20,20,45,.45); padding: 12px; z-index: 30; }
.pcard { width: min(760px, 100%); max-height: 92vh; display: flex; flex-direction: column; padding: 16px; }
.phead { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.phead h2 { margin: 0; flex: 1; font-size: 26px; }
.phead .x { width: 40px; height: 40px; font-size: 16px; }
#panelBody { overflow: auto; min-height: 0; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.tabs button { padding: 7px 14px; border-radius: 12px; background: var(--soft); border: 2.5px solid var(--ink); font-weight: 600; font-size: 14px; }
.tabs button.on { background: var(--yellow); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.item { position: relative; border-radius: 16px; border: 3px solid var(--ink); background: var(--soft); padding: 8px 6px; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 600; min-height: 118px; }
.item canvas { width: 72px; height: 72px; }
.item.r1 { background: #e0f0ff; } .item.r2 { background: #f1e3ff; } .item.r3 { background: #fff1c9; }
.item.on { outline: 3.5px solid var(--green); outline-offset: 1px; }
.item .tag { font-size: 11px; padding: 2px 8px; border-radius: 10px; background: #fff; border: 2px solid var(--ink); display: inline-flex; align-items: center; gap: 4px; }
.item .tag .ic-coin { width: 14px; height: 14px; border-width: 1.5px; }
.item.locked { opacity: .65; }
.qlist { display: flex; flex-direction: column; gap: 8px; }
.q { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; align-items: center; padding: 10px 12px; border-radius: 14px; background: var(--soft); border: 2.5px solid var(--ink); }
.q .qb { grid-column: 1; height: 10px; border-radius: 5px; background: #fff; border: 2px solid var(--ink); overflow: hidden; }
.q .qb i { display: block; height: 100%; background: var(--green); }
.q .btn { grid-row: span 2; min-height: 42px; font-size: 14px; padding: 4px 14px; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 12px; }
.cal div { border-radius: 12px; border: 2.5px solid var(--ink); background: var(--soft); text-align: center; padding: 6px 2px; font-weight: 700; font-size: 13px; }
.cal div.done { background: #c9f7e7; } .cal div.now { background: var(--yellow); }
.form { display: flex; flex-direction: column; gap: 10px; }
.form label { font-weight: 600; font-size: 14px; display: flex; flex-direction: column; gap: 4px; }
.form input[type=text] { font: inherit; font-size: 18px; padding: 10px 12px; border-radius: 12px; border: 3px solid var(--ink); }
.srow { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 2px dashed #e3e8f4; font-weight: 600; }
.seg { display: inline-flex; border: 2.5px solid var(--ink); border-radius: 12px; overflow: hidden; flex-wrap: wrap; }
.seg button { padding: 6px 12px; font-weight: 600; font-size: 13px; background: #fff; border-inline-start: 2px solid var(--ink); }
.seg button:first-child { border-inline-start: 0; }
.seg button.on { background: var(--yellow); }
.srow input[type=range] { width: 150px; accent-color: var(--blue); }
.srow select { font: inherit; padding: 6px; border-radius: 10px; border: 2.5px solid var(--ink); }
.keys { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; font-size: 14px; }
.keys kbd { font: inherit; font-weight: 700; background: var(--soft); border: 2px solid var(--ink); border-radius: 8px; padding: 1px 8px; justify-self: start; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.stats div { border-radius: 14px; background: var(--soft); border: 2.5px solid var(--ink); padding: 10px; display: flex; flex-direction: column; }
.stats b { font-size: 24px; } .stats span { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.code { font-size: 38px; font-weight: 700; letter-spacing: .15em; text-align: center; background: var(--soft); border: 3px dashed var(--ink); border-radius: 16px; padding: 8px; }

#rotate { position: fixed; inset: 0; z-index: 50; background: var(--blue); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; font-size: 20px; text-align: center; padding: 20px; }
#rotate .phone { width: 60px; height: 100px; border: 5px solid #fff; border-radius: 14px; animation: rot 1.6s infinite; }
@keyframes rot { 50% { transform: rotate(-90deg); } }
#toast { position: fixed; left: 50%; bottom: calc(22px + var(--sa-b)); transform: translateX(-50%) translateY(120px); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 16px; font-weight: 600; z-index: 60; transition: transform .25s; max-width: 90vw; text-align: center; }
#toast.on { transform: translateX(-50%); }
#err { position: fixed; inset: 0; z-index: 70; background: #fff; display: grid; place-items: center; padding: 24px; text-align: center; font-size: 18px; }
.bubble { position: absolute; transform: translate(-50%, -100%); background: #fff; border: 2.5px solid var(--ink); border-radius: 14px; padding: 3px 10px; font-weight: 600; font-size: 14px; white-space: nowrap; pointer-events: none; animation: pop .25s, fade 2.6s forwards; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* ---------------- Davet ---------------- */
.tile.hot { background: linear-gradient(160deg, #fff3b0, #ffd6e8); }
.tile.hot .ico { animation: wiggle 2.8s ease-in-out infinite; }
@keyframes wiggle { 0%, 88%, 100% { transform: rotate(0); } 91% { transform: rotate(-14deg) scale(1.1); } 94% { transform: rotate(12deg) scale(1.1); } 97% { transform: rotate(-6deg); } }
.btn.friend { width: 100%; margin: 4px 0 10px; background: linear-gradient(#ff8fc3, #ff4d94); font-size: 16px; padding: 10px 14px; }
.reward .rc.gift { background: linear-gradient(#fff3b0, #ffd6e8); }
.inv-load { height: 280px; border-radius: 18px; background: linear-gradient(90deg, var(--soft) 25%, #f7f9ff 50%, var(--soft) 75%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.inv-hero { text-align: center; background: linear-gradient(150deg, #ffe066 0%, #ff9ecb 55%, #b39cff 100%); border: 3px solid var(--ink); border-radius: 22px; box-shadow: 0 5px 0 var(--ink); padding: 16px 14px 14px; }
.inv-h { font-size: 22px; font-weight: 700; line-height: 1.15; }
.inv-hero p { margin: 6px 0 12px; font-size: 14px; font-weight: 500; }
.inv-code { display: inline-flex; flex-direction: column; background: #fff; border: 3px dashed var(--ink); border-radius: 16px; padding: 6px 18px; margin-bottom: 12px; }
.inv-code span { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.inv-code b { font-size: 30px; letter-spacing: .14em; font-variant-numeric: tabular-nums; user-select: all; }
.inv-hero .row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.inv-hero .row .btn { flex: 1 1 140px; min-height: 48px; }
.inv-pend { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; padding: 10px 12px; border: 3px solid var(--ink); border-radius: 16px; background: #fff8d6; font-weight: 700; }
.inv-by { display: flex; gap: 10px; align-items: center; font-size: 28px; padding: 10px 12px; margin-bottom: 12px; border: 3px solid var(--ink); border-radius: 16px; background: #e9fff6; }
.inv-by div { display: flex; flex-direction: column; gap: 3px; font-size: 14px; flex: 1; }
.inv-by .bar { display: block; height: 8px; border-radius: 6px; background: #cdeee0; overflow: hidden; }
.inv-by .bar i { display: block; height: 100%; background: var(--green); }
#panelBody h3 { margin: 18px 0 8px; font-size: 16px; display: flex; align-items: baseline; gap: 8px; }
#panelBody h3 small { font-size: 12px; color: var(--muted); font-weight: 600; }
.inv-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.inv-steps li { display: flex; gap: 10px; align-items: center; background: var(--soft); border-radius: 12px; padding: 8px 10px; font-size: 14px; }
.inv-steps b { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: #fff; font-size: 14px; }
.inv-track { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.inv-track .ms { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; border: 3px solid #c9d2ea; border-radius: 16px; background: #fff; text-align: center; opacity: .75; }
.inv-track .ms.got { border-color: var(--ink); background: linear-gradient(#fffbe6, #ffe9f4); opacity: 1; box-shadow: 0 3px 0 var(--ink); }
.inv-track .ms .ic { height: 56px; display: grid; place-items: center; filter: grayscale(.7); }
.inv-track .ms.got .ic { filter: none; }
.inv-track .ms .ic canvas { width: 52px; height: 52px; }
.inv-track .ms .ic span { font-size: 34px !important; line-height: 56px !important; }
.inv-track .ms .n { font-size: 12px; font-weight: 700; }
.inv-track .ms .nm { font-size: 11px; color: var(--muted); line-height: 1.15; }
.inv-friends { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.inv-friends li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 10px; background: var(--soft); border-radius: 12px; font-weight: 600; font-size: 14px; }
.inv-friends li.empty { justify-content: center; color: var(--muted); font-weight: 500; }
.inv-friends .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip { flex: none; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: #fff; border: 2px solid #c9d2ea; }
.chip.ok { background: #d8fff1; border-color: var(--green); }
.chip.no { background: #f1f1f4; color: var(--muted); }
.inv-bind { margin-top: 14px; padding: 10px 12px; border: 2px dashed #c9d2ea; border-radius: 14px; display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
.inv-bind .row { display: flex; gap: 8px; }
.inv-bind input { flex: 1; min-width: 0; font: 700 18px/1 inherit; letter-spacing: .12em; text-transform: uppercase; padding: 8px 10px; border: 3px solid var(--ink); border-radius: 12px; }
.inv-note { font-size: 12px; color: var(--muted); margin: 10px 2px 0; line-height: 1.35; }
@media (max-aspect-ratio: 1/1) {
  /* 5 kutucuk telefona sığsın */
  #home .side { gap: 8px; }
  .tile { width: min(72px, calc((100vw - 28px - 32px) / 5)); }
  .inv-track .ms .ic { height: 48px; }
  .inv-track .ms .ic canvas { width: 44px; height: 44px; }
}
@media (max-width: 480px) { .inv-hero .row .btn { font-size: 16px; white-space: nowrap; padding-inline: 10px; flex-basis: 120px; } .inv-h { font-size: 20px; } }
@media (max-aspect-ratio: 1/1) and (max-width: 400px) { .tile { font-size: 10.5px; overflow-wrap: normal; hyphens: auto; letter-spacing: -.01em; } }
/* Dar ekranda eğitim kartı sağdaki emoji/sohbet düğmeleriyle çakışmasın (uzun "Überspringen" gibi metinler dahil) */
@media (max-width: 720px) {
  #tut { left: calc(8px + var(--sa-l, 0px)); right: calc(78px + var(--sa-r, 0px)); width: auto; transform: none; }
  #tut .btn { white-space: normal; max-width: 110px; line-height: 1.1; font-size: 13px; padding: 4px 10px; }
}
/* Uzun dillerde (de RUTSCH, ru СКОЛЬЖ.) küçük dairesel düğme metni taşmasın */
.tbtn.slide { font-size: 11px; letter-spacing: -.02em; padding: 0 4px; text-align: center; line-height: 1; }
.tbtn.act, .tbtn.mini { padding: 0 4px; text-align: center; line-height: 1.05; }

/* yasal satır (ilk açılış: oynayarak şartları kabul) ve bağlantılar */
.legal a, a[data-legal] { color: inherit; text-decoration: underline; cursor: pointer; }
#homeLegal { position: absolute; left: 50%; bottom: calc(40px + var(--sa-b)); transform: translateX(-50%); width: min(520px, 92vw); text-align: center; margin: 0; font-size: 12px; color: var(--ink); background: rgba(255,255,255,.75); padding: 4px 10px; border-radius: 10px; }
.legalrow { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 12px; font-size: 13px; color: var(--muted); }
.rrow { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.rrow .btn { min-height: 36px; font-size: 13px; padding: 2px 10px; }
.q .acts { display: flex; gap: 6px; }
.packs { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.pack { display: grid; gap: 4px; justify-items: center; padding: 10px; border: 3px solid var(--ink); border-radius: 16px; background: #fff; box-shadow: 0 3px 0 var(--ink); font: inherit; color: var(--ink); cursor: pointer; }
.pack.hot { background: #fff3b0; }
.pack b { font-size: 18px; }
.pack small { color: var(--muted); font-size: 12px; text-align: center; }
.pack .price { font-weight: 700; background: var(--green, #06d6a0); color: #fff; border-radius: 10px; padding: 2px 10px; }
.pack:disabled { opacity: .6; }
.q .acts .btn, .q .rrow .btn { grid-row: auto; min-height: 36px; font-size: 13px; padding: 2px 10px; }
.q .rrow { grid-column: 1 / -1; margin: 0; }
.q .rrow[hidden] { display: none; }
