/* ALKİMO — 4. sınıf ek oyunları: Akıllı Ev, Dallanan Ağaç, Adil Robot (k4-) */
.k4 { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: clamp(16px, 3vw, 40px); padding: 16px; box-sizing: border-box; overflow: auto; color: var(--ink); }
.k4.narrow { flex-direction: column; justify-content: flex-start; gap: 14px; }
.k4-board { flex: 0 1 auto; display: flex; flex-direction: column; align-items: center; gap: 14px; max-width: 760px; }
.k4-pad { flex: none; display: flex; flex-direction: column; gap: 10px; width: 300px; box-sizing: border-box; padding: 16px; background: #fff; border: 4px solid var(--ink); border-radius: 24px; box-shadow: 0 7px 0 var(--ink); }
.k4-pad h4 { margin: 0; font-size: 22px; text-align: center; }
.k4-h { margin: 0; font-size: 27px; text-align: center; }
.k4-tip { margin: 0; min-height: 1.3em; font-size: 17px; font-weight: 600; line-height: 1.35; color: var(--ink-soft); text-align: center; }
.k4-q { margin: 0; font-size: 19px; font-weight: 700; text-align: center; line-height: 1.35; }
.k4-box { display: flex; flex-direction: column; gap: 12px; }
.k4-opts { display: flex; flex-direction: column; gap: 10px; }
.k4-btn { min-height: 56px; padding: 8px 14px; border: 4px solid var(--ink); border-radius: 16px; background: #fff; box-shadow: 0 5px 0 var(--ink); color: var(--ink); font: inherit; font-size: 18px; text-align: left; cursor: pointer; touch-action: manipulation; }
.k4-btn:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--ink); }
.k4-btn.ok { background: #DFF7EA; }
.k4-btn.on { background: #FFC531; }
.k4-btn.go { background: #2EC27E; color: #fff; text-align: center; }
.k4-row { display: flex; align-items: center; gap: 12px; }
.k4-row i { font-style: normal; font-size: 30px; line-height: 1; }
.k4-two { display: flex; gap: 22px; }
.k4-col { display: flex; flex-direction: column; gap: 12px; width: 280px; }
.k4-btn.sens { background: #DDEFFF; } .k4-btn.dev { background: #FFF1C2; }
.k4-btn.sens.on { background: #FFC531; } .k4-btn.ok { background: #DFF7EA; }
.k4-rules { display: flex; flex-direction: column; gap: 8px; }
.k4-rule { padding: 6px 10px; border-radius: 12px; background: #23214A; color: #fff; font-size: 15px; line-height: 1.4; }
.k4-rule b { color: #FFC531; }
.k4-tree { padding: 10px; border: 5px solid var(--ink); border-radius: 26px; background: linear-gradient(#DDEFFF, #F4FBF9); box-shadow: 0 8px 0 var(--ink); line-height: 0; }
.k4-code { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 14px; background: #23214A; color: #fff; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; white-space: pre; }
.k4-code b { color: #FFC531; }
.k4-cards { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; min-height: 84px; }
.k4-card { position: relative; display: flex; align-items: center; justify-content: center; width: 78px; height: 78px; border: 4px solid var(--ink); border-radius: 18px; background: #fff; box-shadow: 0 5px 0 var(--ink); font-size: 44px; line-height: 1; }
.k4-card i { position: absolute; top: -10px; right: -10px; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; border: 3px solid var(--ink); border-radius: 50%; font-style: normal; font-size: 15px; font-weight: 700; color: #fff; }
.k4-card.yes i { background: #2EC27E; } .k4-card.no { background: #FFE1DE; } .k4-card.no i { background: #E5483D; }
.k4-lab { font-weight: 700; color: var(--ink-soft); }
@keyframes k4-pop { 0% { transform: scale(.9); } 70% { transform: scale(1.03); } 100% { transform: scale(1); } }
.k4-pop { animation: k4-pop .35s ease; }
@media (hover: hover) { .k4-btn:hover { filter: brightness(.97); } }
.k4.big .k4-board { max-width: 1100px; }
.k4.big .k4-pad { width: 400px; }
.k4.big .k4-h { font-size: 36px; }
.k4.big .k4-btn { min-height: 74px; font-size: 24px; }
.k4.big .k4-q { font-size: 25px; }
.k4.big .k4-col { width: 380px; }
.k4.big .k4-card { width: 104px; height: 104px; font-size: 60px; }
.k4.big .k4-code { font-size: 17px; }
.k4.big .k4-rule { font-size: 19px; }
.k4.narrow .k4-pad { width: min(100%, 360px); }
.k4.narrow .k4-two { flex-direction: column; gap: 10px; }
.k4.narrow .k4-col { width: min(100%, 340px); }
.k4.narrow .k4-h { font-size: 21px; }
