/* Robot Rotası 1.1 — "Kodding Bahçesi" (site başlığı/altbilgisi styles.css'ten). Tüm çizimler SVG/CSS;
   dış görsel, yazı tipi ya da kütüphane yok. Dokunmatik öncelikli: blok ve düğmelerde en az 56×56 px.
   Palet: #5f57f0 mor · #12b5a5 turkuaz · #f2a516 sarı · #1e1b4b lacivert. */
.robot-game-page main { padding: 0; }
.robot-game-page .whatsapp-button { display: none; } /* oyun düğmelerinin üstüne binmesin */
.rr-wrap { max-width: 1120px; margin: 0 auto; padding: 12px 16px 40px; }
.rr-noscript { padding: 24px; border-radius: 16px; background: #fff6df; }

.rr-game { --rr-ink: #1e1b4b; --rr-purple: #5f57f0; --rr-teal: #12b5a5; --rr-yellow: #f2a516; --rr-orange: #f59e0b; --rr-line: #e3e6ef; --rr-muted: #4b4f63; color: var(--rr-ink); }
.rr-card:focus-visible, .rr-btn:focus-visible, .rr-run:focus-visible, .rr-tool:focus-visible, .rr-dot:focus-visible, .rr-count:focus-visible, .rr-sound:focus-visible, .rr-read:focus-visible, .rr-block:focus-visible { outline: 4px solid var(--rr-purple, #5f57f0); outline-offset: 2px; }

/* ---------- Üst bölüm: başlık · ses · ilerleme noktaları · talimat balonu */
.rr-top-row { display: flex; align-items: center; gap: 10px; }
.rr-title { flex: 1; margin: 0; font-size: clamp(1.2rem, 4.4vw, 1.7rem); line-height: 1.2; }
.rr-title span { color: var(--rr-purple); }
.rr-title small { font-size: .62em; font-weight: 800; color: var(--rr-muted); white-space: nowrap; }
.rr-stars { font-size: 1.25rem; letter-spacing: 1px; white-space: nowrap; }
.rr-sound { flex: none; width: 52px; height: 52px; border: 2px solid var(--rr-line); border-radius: 50%; background: #fff; font-size: 1.45rem; cursor: pointer; }
.rr-sound[aria-pressed="false"] { background: #f1f2f6; }

.rr-dots { display: flex; justify-content: space-between; align-items: center; gap: 2px; margin: 10px 0 8px; padding: 0 2px; position: relative; }
.rr-dots::before { content: ""; position: absolute; left: 14px; right: 14px; top: 50%; height: 4px; margin-top: -2px; border-radius: 2px; background: #e6e8f2; }
.rr-dot { position: relative; display: grid; place-items: center; flex: 0 1 34px; min-width: 28px; height: 44px; padding: 0; border: 0; background: none; cursor: pointer; font: inherit; color: var(--rr-ink); }
.rr-dot span { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--rr-teal); background: #fff; font-size: .78rem; font-weight: 900; line-height: 1; box-sizing: border-box; }
.rr-dot.is-done span { background: var(--rr-teal); color: var(--rr-ink); }
.rr-dot.is-current span { width: 32px; height: 32px; border-color: var(--rr-purple); background: var(--rr-purple); color: #fff; font-size: 1rem; box-shadow: 0 0 0 4px #dcd9ff; }
.rr-dot.is-locked { cursor: default; }
.rr-dot.is-locked span { border-color: #c9cddb; background: #f4f5f9; }

.rr-bubble-row { display: flex; align-items: flex-end; gap: 8px; margin-bottom: 12px; }
.rr-mini-robot { flex: none; width: 44px; height: 44px; }
.rr-mini-robot svg { width: 100%; height: 100%; }
.rr-bubble { position: relative; flex: 1; display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 18px 18px 18px 6px; background: #fff; border: 2px solid #dcd9ff; box-shadow: 0 4px 12px -8px rgba(30, 27, 75, .35); }
.rr-bubble::before { content: ""; position: absolute; left: -9px; bottom: 6px; border: 8px solid transparent; border-right-color: #dcd9ff; border-left: 0; }
.rr-task { flex: 1; margin: 0; font-size: 1.05rem; font-weight: 800; line-height: 1.4; }
.rr-read { flex: none; display: inline-flex; align-items: center; gap: 4px; min-height: 48px; padding: 0 12px; border: 2px solid var(--rr-line); border-radius: 999px; background: #f6f5ff; font: inherit; font-weight: 800; color: var(--rr-ink); cursor: pointer; }

/* ---------- Düzen */
/* Telefon: tek sütun (ızgara · palet · kod · düğmeler) · tablet 768–1023: 2 sütun · masaüstü ≥1024: 3 sütun
   (sol ızgara + düğmeler, orta dar palet, sağ geniş kod alanı). */
.rr-main { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); grid-template-areas: "garden" "palette" "code" "actions" "message"; }
.rr-garden { grid-area: garden; } .rr-actions { grid-area: actions; } .rr-message { grid-area: message; }
.rr-palette { grid-area: palette; } .rr-code { grid-area: code; }
@media (min-width: 768px) {
    /* Son satır 1fr: uzun kod alanının yüksekliği o satıra gider, düğmeler ızgaranın hemen altında kalır. */
    .rr-main { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto auto auto 1fr; align-items: start;
        grid-template-areas: "garden palette" "garden code" "actions code" "message code"; }
}
@media (min-width: 1024px) {
    .rr-main { grid-template-columns: minmax(0, 1.15fr) 132px minmax(300px, 1fr); grid-template-rows: auto auto 1fr;
        grid-template-areas: "garden palette code" "actions palette code" "message palette code"; }
}

/* ---------- Bahçe + ızgara */
.rr-garden { position: relative; display: flex; justify-content: center; padding: 16px; border-radius: 24px; overflow: hidden;
    background-color: #7cc46a;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, .12) 0 2px, transparent 3px),
        radial-gradient(circle at 70% 80%, rgba(30, 90, 40, .18) 0 2px, transparent 3px),
        repeating-linear-gradient(115deg, rgba(255, 255, 255, .07) 0 3px, transparent 3px 9px),
        repeating-linear-gradient(65deg, rgba(20, 80, 30, .08) 0 2px, transparent 2px 11px);
    background-size: 22px 22px, 26px 26px, auto, auto;
    box-shadow: inset 0 0 0 4px #5fae55; }
.rr-flower { position: absolute; width: 30px; height: 30px; pointer-events: none; }
.rr-flower svg { width: 100%; height: 100%; }
.rr-flower-tl { left: -4px; top: -2px; } .rr-flower-tr { right: -3px; top: 2px; transform: rotate(12deg); }
.rr-flower-bl { left: 0; bottom: -6px; transform: rotate(-10deg); } .rr-flower-br { right: -2px; bottom: -4px; }

.rr-board { position: relative; display: grid; grid-template-columns: repeat(var(--cols), 1fr); grid-template-rows: repeat(var(--rows), 1fr);
    /* Telefonda ızgara ekranın ~%40'ını geçmesin: bloklar ve Çalıştır aynı ekranda kalsın. */
    width: min(100%, calc(var(--cols) * 76px), calc(38vh * var(--cols) / var(--rows))); gap: 5px; padding: 7px; border-radius: 16px;
    background: #9a6a3f; box-shadow: 0 6px 0 #7a4f2c, 0 12px 20px -10px rgba(30, 27, 75, .55); box-sizing: border-box; }
.rr-cell { position: relative; display: grid; place-items: center; border-radius: 10px; min-width: 0; min-height: 0;
    background: linear-gradient(160deg, #f8ecd2, #ecd8b0); box-shadow: inset 0 -3px 0 rgba(122, 79, 44, .28), inset 0 2px 0 rgba(255, 255, 255, .6); }
.rr-cell.is-alt { background: linear-gradient(160deg, #f3e3c3, #e5cd9f); }
.rr-cell > svg, .rr-cell > span { width: 82%; height: 82%; }
.rr-cell > span > svg { width: 100%; height: 100%; display: block; }
.rr-cell.is-wall { background: linear-gradient(160deg, #a9d98f, #8cc674); box-shadow: inset 0 -3px 0 rgba(30, 90, 40, .25); }
.rr-cell.is-goal { background: radial-gradient(circle, #fff7c2 0 40%, #f6df9c 75%); }
.rr-star { animation: rr-pulse 1.6s ease-in-out infinite; filter: drop-shadow(0 0 6px rgba(255, 210, 63, .9)); }
.rr-cell.is-goal.is-reached .rr-star { animation: rr-pop .5s ease 2; }
.rr-key { animation: rr-float 2s ease-in-out infinite; }
.rr-cell.is-door { background: linear-gradient(160deg, #e9d6b2, #d9bf8f); }
.rr-door-leaf { transform-origin: 9px 20px; transition: transform .45s ease; }
.rr-cell.is-open .rr-door-leaf { transform: scaleX(.22) skewY(8deg); }
@keyframes rr-pulse { 0%, 100% { transform: scale(.92); } 50% { transform: scale(1.06); } }
@keyframes rr-float { 0%, 100% { transform: translateY(0) rotate(-8deg); } 50% { transform: translateY(-8%) rotate(6deg); } }
@keyframes rr-pop { 50% { transform: scale(1.25); } }

/* Robot */
.rr-robot { position: absolute; padding: 6px; box-sizing: border-box; transition: left .3s ease, top .3s ease; pointer-events: none; z-index: 2; }
.rr-robot.no-anim { transition: none; }
.rr-robot-body { width: 100%; height: 100%; }
.rr-robot svg { width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 3px 2px rgba(30, 27, 75, .3)); }
.rr-eyes { transform: translate(var(--ex, 0), var(--ey, 0)); transition: transform .15s ease; }
.rr-arm { transition: transform .25s ease; }
.rr-arm-l { transform-origin: 12px 30px; } .rr-arm-r { transform-origin: 52px 30px; }
.is-cheer .rr-arm-l { transform: rotate(65deg); }
.is-cheer .rr-arm-r { transform: rotate(-65deg); }
.rr-robot.is-hop .rr-robot-body { animation: rr-hop .28s ease-out; }
.rr-robot.is-shake { animation: rr-shake .45s ease; }
.rr-bang { position: absolute; top: -32%; right: -18%; display: none; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #fff; border: 3px solid #dc2626; color: #b91c1c; font-weight: 900; font-size: 1rem; box-shadow: 0 2px 6px rgba(0, 0, 0, .2); }
.rr-robot.is-bump .rr-bang { display: grid; animation: rr-pop .4s ease; }
@keyframes rr-hop { 0% { transform: translateY(0); } 45% { transform: translateY(-16%) scale(1.02, .98); } 100% { transform: translateY(0); } }
@keyframes rr-shake { 0%, 100% { translate: 0 0; rotate: 0deg; } 20% { translate: -6px 0; rotate: -6deg; } 40% { translate: 6px 0; rotate: 6deg; } 60% { translate: -4px 0; rotate: -3deg; } 80% { translate: 4px 0; rotate: 3deg; } }

/* Konfeti (1,2 sn) */
.rr-confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 3; }
.rr-confetti i { position: absolute; top: -12px; left: var(--x); width: 9px; height: 14px; border-radius: 2px; background: var(--c); transform: rotate(var(--r)) scale(var(--s)); animation: rr-fall 1.2s cubic-bezier(.3, .6, .5, 1) var(--d) forwards; opacity: 0; }
@keyframes rr-fall { 0% { opacity: 1; top: -12px; transform: rotate(var(--r)) scale(var(--s)); } 80% { opacity: 1; } 100% { opacity: 0; top: 100%; transform: rotate(calc(var(--r) + 540deg)) scale(var(--s)); } }

/* ---------- Bloklar (yapboz) */
.rr-block { position: relative; display: inline-flex; align-items: center; gap: 8px; min-width: 56px; min-height: 56px; padding: 6px 14px; border: 0; border-radius: 10px;
    background: #fff; color: var(--rr-ink); font: inherit; text-align: left; cursor: pointer; touch-action: manipulation;
    box-shadow: inset 0 -4px 0 rgba(30, 27, 75, .16); --rr-bc: #fff; background: var(--rr-bc); }
.rr-block b { font-size: 1.55rem; line-height: 1; }
.rr-block span { font-weight: 900; font-size: 1rem; }
.rr-block small { font-size: .74rem; font-weight: 700; color: var(--rr-muted); }
.rr-block:disabled { opacity: .45; cursor: default; }
.rr-dir-up { --rr-bc: #bfe3ff; }
.rr-dir-down { --rr-bc: #bdf0cd; }
.rr-dir-left { --rr-bc: #ffc9c9; }
.rr-dir-right { --rr-bc: #ffe98a; }
.rr-loop { --rr-bc: #5f57f0; color: #fff; }
.rr-loop small { color: #eceaff; }
.rr-loop.is-new { animation: rr-pop 1s ease 3; }

/* Bloklar menüsü */
.rr-palette, .rr-code { padding: 10px; border-radius: 16px; background: #f8fafc; border: 1px solid var(--rr-line); }
.rr-palette > strong, .rr-code-head strong { display: block; font-size: .95rem; }
.rr-palette > strong { margin-bottom: 6px; }
.rr-palette { position: relative; }
.rr-palette-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
@media (min-width: 1024px) { .rr-palette-cards { grid-template-columns: 1fr; } }
.rr-palette-cards .rr-block { flex-direction: column; justify-content: center; gap: 0; padding: 6px 4px; text-align: center; min-height: 64px; }
.rr-palette-cards .rr-block:active, .rr-loop-dirs .rr-block:active { transform: translateY(2px); box-shadow: none; }

/* Kodum: turuncu "Başlayınca ▶" + birbirine geçen bloklar */
.rr-code-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.rr-code-tools { display: flex; gap: 6px; }
.rr-tool { min-width: 56px; min-height: 56px; border: 2px solid var(--rr-line); border-radius: 14px; background: #fff; font-size: 1.4rem; cursor: pointer; }
.rr-tool:disabled { opacity: .4; cursor: default; }
.rr-code { display: flex; flex-direction: column; min-height: 200px; box-sizing: border-box; }
@media (min-width: 768px) { .rr-code { align-self: stretch; height: max(360px, calc(100vh - 290px)); } }
.rr-stack { position: relative; flex: 1; display: flex; flex-direction: column; align-items: stretch; min-height: 150px; overflow-y: auto; padding: 2px 6px 18px 2px; overscroll-behavior: contain; }
.rr-hat { align-self: flex-start; }
.rr-hat { position: relative; z-index: 20; display: inline-flex; align-items: center; gap: 6px; min-height: 48px; padding: 8px 18px 6px; border-radius: 22px 22px 10px 10px;
    background: var(--rr-orange); color: var(--rr-ink); font-weight: 900; box-shadow: inset 0 -4px 0 rgba(122, 63, 0, .25); }
.rr-program { flex: 1; display: flex; flex-direction: column; align-items: stretch; gap: 0; min-height: 60px; margin: 0; padding: 0; list-style: none; width: 100%; }
.rr-program li { display: flex; position: relative; }
/* Yapboz çıkıntısı: her bloğun altında küçük bir "diş" bir sonrakine geçer; üstte aynı yerde girinti izi. */
.rr-placed { width: 100%; min-width: 0; margin-top: -2px; }
.rr-placed::before { content: ""; position: absolute; left: 18px; top: -1px; width: 22px; height: 7px; border-radius: 0 0 8px 8px; background: rgba(30, 27, 75, .14); }
.rr-placed::after, .rr-hat::after { content: ""; position: absolute; left: 18px; bottom: -6px; width: 22px; height: 8px; border-radius: 0 0 8px 8px; background: var(--rr-bc, var(--rr-orange)); box-shadow: inset 0 -3px 0 rgba(30, 27, 75, .16); z-index: 1; }
.rr-hat::after { background: var(--rr-orange); box-shadow: inset 0 -3px 0 rgba(122, 63, 0, .25); }
.rr-program li:nth-child(1) { z-index: 19; } .rr-program li:nth-child(2) { z-index: 18; } .rr-program li:nth-child(3) { z-index: 17; }
.rr-program li:nth-child(4) { z-index: 16; } .rr-program li:nth-child(5) { z-index: 15; } .rr-program li:nth-child(6) { z-index: 14; }
.rr-program li:nth-child(7) { z-index: 13; } .rr-program li:nth-child(8) { z-index: 12; } .rr-program li:nth-child(9) { z-index: 11; }
.rr-program li:nth-child(10) { z-index: 10; } .rr-program li:nth-child(11) { z-index: 9; } .rr-program li:nth-child(12) { z-index: 8; }
.rr-empty { flex: 1; display: grid !important; place-items: center; min-height: 120px; margin-top: 10px; padding: 12px; border: 3px dashed #c4bff5; border-radius: 16px; background: rgba(255, 255, 255, .7); color: var(--rr-muted); font-weight: 800; text-align: center; }

/* Sürükle-bırak */
.rr-block { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: none; }
.rr-palette-cards .rr-block { touch-action: pan-x; } /* telefonda palet yana kaydırılabilsin */
.rr-loop-dirs .rr-block { touch-action: manipulation; }
.rr-block.is-dragging { opacity: .35; }
.rr-ghost { position: fixed !important; left: 0; top: 0; z-index: 1000; margin: 0 !important; opacity: .72; pointer-events: none; box-shadow: 0 14px 28px -10px rgba(30, 27, 75, .6) !important; }
.rr-dragging, .rr-dragging * { cursor: grabbing; }
.rr-drop-line { position: absolute; left: 4px; right: 8px; height: 5px; border-radius: 3px; background: #f59e0b; box-shadow: 0 0 0 2px #fff; display: none; z-index: 60; pointer-events: none; }
.rr-drop-line.is-on { display: block; }
.rr-drop-delete { display: none; }
.rr-drag-delete .rr-drop-delete { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; border-radius: 16px; background: rgba(254, 226, 226, .94); color: #7f1d1d; font-weight: 900; font-size: 1.05rem; text-align: center; outline: 3px dashed #dc2626; }
.rr-drag-delete .rr-trash { background: #fee2e2; border-color: #dc2626; }
.rr-cblock.is-drop-ok .rr-c-inner { outline: 3px dashed #f59e0b; outline-offset: -3px; background: rgba(255, 255, 255, .25); }
.rr-cblock.is-drop-full .rr-c-inner { outline: 3px dashed #dc2626; outline-offset: -3px; }
.rr-cblock.is-reject { animation: rr-wobble .3s ease 2; }

/* Döngü "C" bloğu: üst kol (sayı rozetli) · girintili içerik · alt kol */
.rr-cblock { flex-direction: column; align-items: stretch; gap: 0; padding: 0; min-width: 0; --rr-bc: #5f57f0; color: #fff; background: transparent; box-shadow: none; }
.rr-c-head { display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 4px 12px; border-radius: 10px 10px 10px 0; background: var(--rr-bc); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .15); }
.rr-c-head small { color: #eceaff; }
.rr-badge { margin-left: auto; display: grid; place-items: center; min-width: 40px; height: 32px; padding: 0 8px; border-radius: 999px; background: #fff; color: var(--rr-purple); font-style: normal; font-weight: 900; font-size: 1rem; }
.rr-c-inner { display: flex; flex-direction: column; gap: 4px; margin-left: 0; padding: 6px 8px 6px 16px; border-left: 16px solid var(--rr-bc); }
.rr-mini { display: flex; align-items: center; gap: 6px; min-height: 44px; padding: 2px 10px; border-radius: 8px; background: var(--rr-bc); color: var(--rr-ink); box-shadow: inset 0 -3px 0 rgba(30, 27, 75, .16); }
.rr-c-inner .rr-mini { --rr-bc: #fff; }
.rr-c-inner .rr-mini.rr-dir-up { --rr-bc: #bfe3ff; } .rr-c-inner .rr-mini.rr-dir-down { --rr-bc: #bdf0cd; }
.rr-c-inner .rr-mini.rr-dir-left { --rr-bc: #ffc9c9; } .rr-c-inner .rr-mini.rr-dir-right { --rr-bc: #ffe98a; }
.rr-mini b { font-size: 1.25rem; }
.rr-mini span { color: var(--rr-ink); }
.rr-c-foot { display: block; height: 16px; border-radius: 0 0 10px 10px; background: var(--rr-bc); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .15); width: 45%; }
.rr-cblock::after { background: #5f57f0; }

/* Durumlar: seçili · çalışan (parlar, büyür) · hatalı (kırmızı + titreme) */
.rr-placed.is-selected { outline: 4px solid var(--rr-purple); outline-offset: 2px; }
.rr-cblock.is-selected { outline-color: #1e1b4b; }
.rr-placed.is-active:not(.rr-cblock), .rr-mini.is-active { transform: scale(1.08); box-shadow: 0 0 0 4px #fff, 0 0 0 7px var(--rr-yellow), 0 0 18px 6px rgba(242, 165, 22, .55); z-index: 30; transition: transform .12s ease; }
.rr-cblock.is-active .rr-c-head { box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--rr-yellow); }
.rr-placed.is-fail { --rr-bc: #fecaca; box-shadow: 0 0 0 4px #dc2626; animation: rr-wobble .4s ease 2; }
.rr-cblock.is-fail { box-shadow: none; }
.rr-cblock.is-fail .rr-c-head { box-shadow: 0 0 0 4px #dc2626; }
@keyframes rr-wobble { 0%, 100% { translate: 0 0; } 25% { translate: -5px 0; } 75% { translate: 5px 0; } }
.rr-bug { position: absolute; top: -12px; right: -10px; z-index: 40; padding: 1px 6px; border-radius: 999px; background: #b91c1c; color: #fff; font-style: normal; font-size: .72rem; font-weight: 800; white-space: nowrap; }

@media (min-width: 768px) {
    /* Izgara + düğmeler bir ekrana sığsın (üstte başlık, ilerleme ve görev balonu var). */
    .rr-board { width: min(100%, calc(var(--cols) * 80px), calc(max(240px, 100vh - 400px) * var(--cols) / var(--rows))); }
}

/* ---------- Düğmeler */
.rr-actions { display: flex; gap: 8px; align-items: stretch; }
.rr-run, .rr-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 56px; padding: 0 18px; border-radius: 999px; font: inherit; font-weight: 900; font-size: 1.05rem; cursor: pointer; text-decoration: none; touch-action: manipulation; }
.rr-run { flex: 1 1 140px; border: 0; background: var(--rr-orange, #f59e0b); color: #1e1b4b; box-shadow: 0 4px 0 #b45309; font-size: 1.15rem; }
.rr-run:active { transform: translateY(2px); box-shadow: 0 2px 0 #b45309; }
.rr-run:disabled, .rr-btn:disabled { opacity: .5; cursor: default; }
.rr-btn { flex: 0 1 auto; border: 2px solid var(--rr-line, #e3e6ef); background: #fff; color: var(--rr-ink, #1e1b4b); }
.rr-ic { flex: 0 0 auto; flex-direction: column; gap: 0; min-width: 60px; padding: 2px 6px; border-radius: 16px; }
.rr-ic b { font-size: 1.3rem; line-height: 1.1; }
.rr-ic small { font-size: .72rem; font-weight: 800; }
.rr-message { min-height: 1.5em; margin: 12px 0 0; padding: 10px 12px; border-radius: 14px; font-weight: 700; line-height: 1.45; }
.rr-message:empty { padding: 0; }
.rr-message[data-kind="fail"] { background: #fee2e2; color: #7f1d1d; }
.rr-message[data-kind="warn"] { background: #fff6df; color: #78350f; }
.rr-message[data-kind="hint"] { background: #eef6ff; color: #1e3a8a; }
.rr-message[data-kind="win"] { background: #dcfce7; color: #14532d; }
.rr-win { font-size: 1.2rem; }
.rr-win-stars span { display: inline-block; }
.rr-win-stars span.is-on { animation: rr-pop .35s ease; }
.rr-next { display: flex; width: 100%; margin-top: 10px; }
.rr-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Bölüm bitti kartı */
.rr-win-dialog { width: min(420px, calc(100vw - 24px)); max-height: calc(100vh - 24px); border: 0; border-radius: 26px; padding: 0; color: #1e1b4b; box-shadow: 0 30px 70px -20px rgba(15, 23, 42, .6); overflow: auto; }
.rr-win-dialog::backdrop { background: rgba(15, 23, 42, .6); }
.rr-win-dialog[open] { animation: rr-win-in .38s cubic-bezier(.2, .9, .3, 1.25); }
@keyframes rr-win-in { from { opacity: 0; transform: translateY(18px) scale(.92); } to { opacity: 1; transform: none; } }
.rr-win-card { padding: 22px 20px 20px; text-align: center; background: radial-gradient(circle at 50% 0, #fff7c2 0, transparent 55%), linear-gradient(160deg, #eef0ff, #fff); }
.rr-win-robot { width: 112px; height: 112px; margin: 0 auto; }
.rr-win-robot svg { width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 6px 4px rgba(30, 27, 75, .25)); }
.rr-win-card h2 { margin: 6px 0 2px; font-size: 2.1rem; color: #5f57f0; }
.rr-win-stars { margin: 2px 0 6px; font-size: 2.6rem; letter-spacing: 6px; line-height: 1.1; }
.rr-win-stars span { display: inline-block; color: #c9cddb; }
.rr-win-stars span.is-on { animation: rr-pop .35s ease; }
.rr-win-used { margin: 4px 0; font-size: 1.15rem; font-weight: 900; }
.rr-win-tip { margin: 4px 0 0; padding: 8px 10px; border-radius: 12px; background: #fff6df; color: #78350f; font-weight: 800; }
.rr-win-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.rr-win-next { flex: 0 0 auto; min-height: 60px; font-size: 1.25rem; }

/* ---------- Döngü penceresi */
.rr-loop-dialog { width: min(420px, calc(100vw - 24px)); border: 0; border-radius: 20px; padding: 18px; color: #1e1b4b; box-shadow: 0 24px 60px -20px rgba(30, 27, 75, .5); --rr-muted: #4b4f63; --rr-ink: #1e1b4b; }
.rr-loop-dialog::backdrop { background: rgba(15, 23, 42, .45); }
.rr-loop-dialog h2 { margin: 0 0 6px; font-size: 1.3rem; color: #5f57f0; }
.rr-loop-dialog p { margin: 10px 0 6px; font-weight: 700; }
.rr-loop-counts, .rr-loop-dirs, .rr-loop-actions, .rr-loop-body { display: flex; flex-wrap: wrap; gap: 8px; }
.rr-loop-dirs .rr-block { flex-direction: column; gap: 0; padding: 4px 8px; min-width: 72px; }
.rr-count { min-width: 64px; min-height: 56px; border: 2px solid #e3e6ef; border-radius: 14px; background: #fff; font: inherit; font-weight: 800; font-size: 1.2rem; cursor: pointer; }
.rr-count[aria-pressed="true"] { border-color: #5f57f0; background: #5f57f0; color: #fff; }
.rr-slot { display: grid; place-items: center; min-width: 96px; min-height: 56px; padding: 0 10px; border: 2px dashed #a49cf5; border-radius: 12px; font-weight: 800; color: #4b44d6; background: #f6f5ff; }
.rr-slot.is-filled { border-style: solid; border-color: transparent; background: var(--rr-bc); color: #1e1b4b; }
.rr-loop-actions { margin-top: 14px; }
.rr-loop-actions .rr-run { flex: 1 1 120px; }

/* ---------- Bitiş */
.rr-finish { display: grid; gap: 16px; }
.rr-finish-card { padding: 22px; border-radius: 22px; background: linear-gradient(160deg, #eef0ff, #fff7d6); text-align: center; }
.rr-finish-robot { width: 96px; height: 96px; margin: 0 auto 6px; }
.rr-finish-card h2 { margin: 4px 0; font-size: 1.8rem; }
.rr-finish-card h2:focus { outline: none; }
.rr-finish-lead { font-size: 1.1rem; line-height: 1.5; }
.rr-finish-stars { font-size: 1.6rem; font-weight: 800; }
.rr-finish-actions, .rr-parent-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.rr-parent { padding: 18px; border-radius: 18px; border: 2px solid var(--line, #e3e6ef); background: #fff; }
.rr-parent h3 { margin: 0 0 6px; }
.rr-parent-actions { justify-content: flex-start; }
.rr-parent-actions a { min-height: 56px; display: inline-flex; align-items: center; }

/* ---------- Hareket azaltma: zıplama, konfeti, titreme, nabız yok; konum anlık değişir. */
@media (prefers-reduced-motion: reduce) {
    .rr-win-dialog[open], .rr-cblock.is-reject,
    .rr-robot, .rr-robot-body, .rr-block, .rr-loop.is-new, .rr-star, .rr-key, .rr-eyes, .rr-arm, .rr-door-leaf, .rr-placed, .rr-mini, .rr-bang, .rr-win-stars span,
    .rr-cell.is-goal.is-reached .rr-star { transition: none !important; animation: none !important; }
}

/* ---------- Telefon (dikey): düğmeler ekranın altında hep görünür. */
@media (max-width: 767px) {
    .rr-actions { position: sticky; bottom: 0; z-index: 50; margin: 0 -16px; padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, .97); border-top: 1px solid var(--rr-line); box-shadow: 0 -8px 20px -14px rgba(30, 27, 75, .5); gap: 6px; }
    .rr-run { flex: 1 1 auto; padding: 0 10px; min-width: 0; }
    .rr-ic { min-width: 56px; padding: 2px 2px; }
    .rr-task { font-size: 1rem; }
    .rr-read span { display: none; }
    .rr-garden { padding: 12px; margin: 0 -4px; }
    .rr-palette-cards { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
    .rr-palette-cards .rr-block { flex: 0 0 82px; scroll-snap-align: start; }
    .rr-code { min-height: 200px; }
    .rr-stack { max-height: 60vh; }
}
@media (max-width: 359px) {
    .rr-ic small { font-size: .62rem; }
    .rr-ic { min-width: 52px; }
}
