/* Sıla Sapanı — gökyüzü mavisi + bayrak kırmızısı; tam ekran, kaydırmasız */
:root {
  --sky: #0f3d6e; --sky2: #2b7bd0; --ink: #10243b; --paper: #ffffff; --muted: #5d7188; --red: #e30a17; --red2: #ff3b45;
  --gold: #f5b31a; --green: #18b35a; --r: 20px; --f-d: "Baloo 2", system-ui, sans-serif; --f-b: "Nunito", system-ui, sans-serif;
  --st: env(safe-area-inset-top, 0px); --sb: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; overflow: hidden; overscroll-behavior: none; }
body { position: fixed; inset: 0; font: 15px/1.4 var(--f-b); color: var(--ink); user-select: none; -webkit-user-select: none; touch-action: none;
  background: linear-gradient(#5fb2f2, #bfe4ff 45%, #d8f2ff); }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
#map { position: absolute; inset: 0; }
#touch { position: absolute; inset: 0; z-index: 2; touch-action: none; cursor: grab; }
#touch:active { cursor: grabbing; }
.maplibregl-ctrl-bottom-left { z-index: 3; }
#loading { position: absolute; inset: 0; z-index: 20; display: grid; place-items: center; margin: 0; font: 800 20px var(--f-d); color: var(--sky); background: #d8f2ff; }

/* üst bilgi */
#hud { position: absolute; z-index: 5; top: calc(10px + var(--st)); left: 10px; right: 10px; display: flex; gap: 8px; align-items: center; pointer-events: none; }
#hud > *, #hud button { pointer-events: auto; }
.pill { display: flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: rgb(255 255 255 / .88); box-shadow: 0 4px 14px rgb(0 0 0 / .15); backdrop-filter: blur(6px); }
.pill small { color: var(--muted); font-weight: 800; font-size: 12px; }
.pill b { font: 800 18px/1 var(--f-d); font-variant-numeric: tabular-nums; }
.pill.wind .arrow { display: inline-block; font-size: 18px; color: var(--sky2); transition: transform .4s; }
#hud .right { margin-left: auto; display: flex; gap: 6px; }
.icon { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; font-size: 20px; background: rgb(255 255 255 / .88); box-shadow: 0 4px 14px rgb(0 0 0 / .15); }
.icon:active { transform: scale(.93); }
.icon.big { width: 54px; height: 54px; font-size: 26px; border-radius: 18px; }

/* nişan */
#aimUi { position: absolute; z-index: 5; left: 0; right: 0; bottom: calc(14px + var(--sb)); pointer-events: none; }
#aimUi button { pointer-events: auto; }
.aimrow { display: flex; align-items: center; justify-content: center; gap: 14px; }
.dir { padding: 8px 14px; border-radius: 999px; background: rgb(255 255 255 / .9); font-weight: 800; color: var(--muted); box-shadow: 0 4px 14px rgb(0 0 0 / .15); }
.dir b { color: var(--ink); font: 800 18px var(--f-d); }
#hint { margin: 0 auto 10px; width: fit-content; max-width: 92vw; padding: 8px 14px; border-radius: 999px; background: rgb(16 36 59 / .82); color: #fff; font-weight: 800; text-align: center; transition: opacity .6s; }
#hint.gone { opacity: 0; }
.power { position: fixed; right: 14px; bottom: calc(110px + var(--sb)); width: 22px; height: min(38vh, 240px); border-radius: 12px; background: rgb(255 255 255 / .7); box-shadow: 0 4px 14px rgb(0 0 0 / .15); overflow: hidden; }
.power i { position: absolute; inset: 0; transform-origin: bottom; transform: scaleY(0); background: linear-gradient(0deg, var(--green), var(--gold) 55%, var(--red)); }
.power b { position: absolute; left: 50%; top: -24px; transform: translateX(-50%); font: 800 14px var(--f-d); }
.power { overflow: visible; }
.power i { border-radius: 12px; }

#say { position: absolute; z-index: 6; left: 50%; top: calc(64px + var(--st)); transform: translateX(-50%); margin: 0; max-width: 90vw; padding: 10px 18px; border-radius: 18px;
  background: #fff; font: 800 20px var(--f-d); box-shadow: 0 8px 24px rgb(0 0 0 / .2); animation: pop .45s cubic-bezier(.2, 1.5, .4, 1); text-align: center; }
#say::after { content: ""; position: absolute; left: 50%; bottom: -8px; border: 8px solid transparent; border-top-color: #fff; border-bottom: 0; transform: translateX(-50%); }
@keyframes pop { from { transform: translateX(-50%) scale(.5); opacity: 0; } }
#flyTxt { position: absolute; z-index: 5; right: 12px; bottom: calc(14px + var(--sb)); margin: 0; font: 800 22px var(--f-d); color: #fff; text-shadow: 0 2px 8px rgb(0 0 0 / .45); }

/* kartlar */
.card { background: var(--paper); border-radius: 24px; box-shadow: 0 20px 60px rgb(0 0 0 / .25); }
.btn { padding: 12px 18px; border-radius: 16px; font: 800 17px var(--f-d); color: #fff; background: linear-gradient(140deg, var(--red2), var(--red)); box-shadow: 0 8px 20px rgb(227 10 23 / .35); }
.btn:active { transform: scale(.97); }
.btn.big { padding: 14px 22px; font-size: 20px; }
.btn.ghost { background: #eef3f8; color: var(--ink); box-shadow: none; }

.result { position: absolute; z-index: 7; left: 50%; bottom: calc(14px + var(--sb)); transform: translateX(-50%); width: min(440px, calc(100vw - 24px)); padding: 14px 16px; animation: up .4s cubic-bezier(.2, 1.3, .4, 1); }
@keyframes up { from { transform: translate(-50%, 40px); opacity: 0; } }
.r-top { display: flex; align-items: center; gap: 12px; }
.r-ic { font-size: 34px; }
.r-top h2 { margin: 0; font: 800 22px/1.1 var(--f-d); }
.r-top small { color: var(--muted); font-weight: 800; }
.pts { margin-left: auto; font: 800 30px var(--f-d); }
.pts.good { color: var(--green); } .pts.mid { color: var(--gold); } .pts.bad { color: var(--muted); }
.r-say { margin: 8px 0 10px; font-weight: 700; font-size: 15.5px; }
.r-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.r-foot small { color: var(--muted); font-weight: 800; }

.menu { position: absolute; inset: 0; z-index: 8; display: grid; align-items: end; justify-items: center; padding: 16px 12px calc(18px + var(--sb)); background: linear-gradient(transparent 40%, rgb(15 61 110 / .45)); }
.menu .card { width: min(460px, 100%); padding: 20px; display: grid; gap: 10px; text-align: center; animation: up2 .5s cubic-bezier(.2, 1.3, .4, 1); max-height: calc(100dvh - 32px); overflow-y: auto; overflow-x: hidden; }
@keyframes up2 { from { transform: translateY(40px); opacity: 0; } }
.menu h1 { margin: 0; font: 800 clamp(36px, 10vw, 52px)/1 var(--f-d); color: var(--sky); }
.menu h1 span { color: var(--red); }
.menu h2 { margin: 0; font: 800 28px/1.1 var(--f-d); color: var(--sky); }
.sub { margin: 0; color: var(--muted); font-weight: 700; }
.lbl { margin: 4px 0 0; font-weight: 800; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.chip { padding: 7px 12px; border-radius: 999px; background: #eef3f8; font-weight: 800; font-size: 14px; }
.chip.on { background: var(--sky); color: #fff; }
.best { color: var(--muted); font-weight: 800; }
.total small { display: block; color: var(--muted); font-weight: 800; }
.total b { font: 800 52px/1 var(--f-d); color: var(--red); }
.rec { display: block; font-weight: 800; color: var(--gold); }
.olist { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; text-align: left; }
.olist li { display: flex; gap: 8px; padding: 7px 12px; border-radius: 12px; background: #f3f6fa; font-weight: 700; }
.olist em { margin-left: auto; font-style: normal; font-weight: 800; color: var(--muted); }
.olist em.good { color: var(--green); }
.row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }

#confetti { position: fixed; inset: 0; z-index: 30; pointer-events: none; width: 100%; height: 100%; }

@media (min-width: 900px) {
  .menu { align-items: center; justify-items: end; padding-right: 5vw; background: linear-gradient(90deg, transparent 40%, rgb(15 61 110 / .35)); }
}
@media (max-height: 560px) { .sub { display: none; } .menu h1 { font-size: 34px; } }
