/* Black Hole for Kids - Kids Kingdom (scoped under .kk-bh; EN + HI) */
.kk-bh {max-width: 1240px; margin: 0 auto; display: flex; flex-direction: column; gap: 22px;}
.kk-bh .card {background: #fff; border-radius: 20px; padding: 22px; box-shadow: 0 10px 30px rgba(0,0,0,0.08);}
.kk-bh .card-head {display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px;}
.kk-bh .card-head h3 {font-size: 19px; color: #1f2937; margin: 0;}
.kk-bh .card-head h3 small {font-size: 12px; color: #6b7280; font-weight: 600; margin-left: 8px;}
.kk-bh .head-actions {display: flex; gap: 8px; flex-wrap: wrap;}
.kk-bh .muted {color: #6b7280; font-weight: 500; font-size: 12px;}
.kk-bh .lbl {display: block; font-size: 13px; font-weight: 700; color: #374151; margin-bottom: 8px;}
.kk-bh .txt {width: 100%; box-sizing: border-box; padding: 11px 12px; border: 2px solid #e5e7eb; border-radius: 10px; font-size: 14px; font-weight: 600; background: #fff; font-family: inherit;}
.kk-bh .txt:focus {outline: none; border-color: #f97316;}
.kk-bh .seg {display: inline-flex; background: #f3f4f6; border-radius: 10px; padding: 3px; gap: 3px; flex-wrap: wrap;}
.kk-bh .seg button {flex: 1 1 auto; border: none; background: transparent; padding: 8px 14px; border-radius: 8px; font-weight: 700; font-size: 13px; color: #4b5563; cursor: pointer; transition: all .2s; white-space: nowrap;}
.kk-bh .seg button:hover {color: #f97316;}
.kk-bh .seg button.active {background: #fff; color: #f97316; box-shadow: 0 2px 8px rgba(0,0,0,0.12);}
.kk-bh .code-tabs {display: flex; gap: 4px; flex-wrap: wrap; background: #f3f4f6; padding: 3px; border-radius: 10px;}
.kk-bh .code-tabs button {border: none; background: transparent; padding: 8px 14px; border-radius: 8px; font-weight: 700; font-size: 13px; color: #4b5563; cursor: pointer;}
.kk-bh .code-tabs button.active {background: #fff; color: #f97316; box-shadow: 0 2px 8px rgba(0,0,0,0.12);}
.kk-bh .code-box {width: 100%; box-sizing: border-box; background: #0f172a; color: #e2e8f0; border: none; border-radius: 12px; padding: 16px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; line-height: 1.6; resize: vertical; white-space: pre; overflow: auto;}
.kk-bh .code-foot {display: flex; justify-content: flex-end; gap: 10px; margin-top: 12px;}
.kk-bh .btn {padding: 12px 24px; border-radius: 10px; border: none; cursor: pointer; font-weight: 700; font-size: 14px; transition: all 0.3s; display: inline-flex; align-items: center; justify-content: center; gap: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.1); font-family: inherit;}
.kk-bh .btn:hover:not(:disabled) {transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.15);}
.kk-bh .btn:disabled {opacity: .45; cursor: not-allowed;}
.kk-bh .btn-primary {background: linear-gradient(135deg, #0b0b14 0%, #c2410c 100%); color: white;}
.kk-bh .btn-ghost {background: white; border: 2px solid rgba(0,0,0,0.1); color: #1f2937;}
.kk-bh .btn-ghost:hover:not(:disabled) {border-color: #f97316; color: #f97316;}
.kk-bh .btn-sm {padding: 8px 14px; font-size: 13px;}
.kk-bh .btn-xs {padding: 6px 10px; font-size: 12px; border-radius: 8px; box-shadow: none;}
.kk-bh .link-btn {border: none; background: none; color: #f97316; font-weight: 700; font-size: 13px; cursor: pointer; padding: 0; font-family: inherit;}
.kk-bh .link-btn:hover {text-decoration: underline;}
.kk-bh .bh-toast {position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 30px); background: #111827; color: #fff; padding: 12px 22px; border-radius: 12px; font-weight: 700; font-size: 14px; opacity: 0; pointer-events: none; transition: all .3s; z-index: 9999; max-width: 90vw; text-align: center;}
.kk-bh .bh-toast.show {opacity: 1; transform: translate(-50%, 0);}
.kk-bh .mt {margin-top: 16px;}
.kk-bh .two-col {display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 22px; align-items: start;}
.kk-bh .col-stack {display: flex; flex-direction: column; gap: 22px;}
.kk-bh .stage {position: relative; height: clamp(520px, 78vh, 820px); border-radius: 20px; overflow: hidden; background: #000; box-shadow: 0 10px 30px rgba(0,0,0,.3); cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none;}
.kk-bh .stage.grabbing {cursor: grabbing;}
.kk-bh .stage:fullscreen {height: 100vh; border-radius: 0;}
.kk-bh .stage canvas {position: absolute; inset: 0; width: 100%; height: 100%; display: block;}
.kk-bh .loader {position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; padding: 24px; color: #cbd5e1; font-weight: 700; background: #000; z-index: 6;}
.kk-bh .ui {position: absolute; z-index: 3; cursor: default;}
.kk-bh .ui.top {top: 12px; right: 12px; display: flex; gap: 8px; align-items: center;}
.kk-bh .tb {background: rgba(15,15,25,.72); color: #f1f5f9; border: 1px solid rgba(255,255,255,.18); border-radius: 10px; padding: 8px 14px; font-size: 13.5px; font-weight: 700; cursor: pointer; font-family: inherit; transition: all .15s;}
.kk-bh .tb:hover:not(:disabled) {background: rgba(234,88,12,.75); border-color: #fdba74;}
.kk-bh .tb:disabled {opacity: .4; cursor: default;}
.kk-bh .tb.fall {background: linear-gradient(135deg, #f97316, #b91c1c); border-color: #fdba74; color: #fff;}
.kk-bh .tb.fall:hover {filter: brightness(1.15);}
.kk-bh .seg-mini {display: inline-flex; border: 1px solid rgba(255,255,255,.18); border-radius: 10px; overflow: hidden;}
.kk-bh .seg-mini button {background: rgba(15,15,25,.72); color: #cbd5e1; border: none; padding: 8px 12px; font-size: 13px; font-weight: 800; cursor: pointer; font-family: inherit;}
.kk-bh .seg-mini button.active {background: #f97316; color: #fff;}
.kk-bh .readout {top: 12px; left: 12px; background: rgba(15,15,25,.68); border: 1px solid rgba(255,255,255,.14); border-radius: 12px; padding: 9px 13px; color: #e2e8f0; font-size: 13px; max-width: 62%;}
.kk-bh .r-line {line-height: 1.7;}
.kk-bh .r-line b {color: #fff;}
.kk-bh .readout .r-line.warn b, .kk-bh .readout .warn b {color: #fdba74;}
.kk-bh .tour {left: 12px; bottom: 12px; width: min(430px, calc(100% - 24px)); background: rgba(10,10,20,.82); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,.16); border-radius: 16px; padding: 15px 17px; color: #e2e8f0;}
.kk-bh .tour-step {font-size: 11.5px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; color: #fdba74;}
.kk-bh .tour h3 {margin: 4px 0 6px; font-size: 20px; color: #fff;}
.kk-bh .tour p {margin: 0 0 12px; font-size: 14px; line-height: 1.6; color: #cbd5e1;}
.kk-bh .tour-btns {display: flex; gap: 8px; flex-wrap: wrap;}
.kk-bh .stage.falling .tour {display: none;}
.kk-bh .stage.falling .ui.top {opacity: .6;}
.kk-bh .tags {position: absolute; inset: 0; z-index: 2; pointer-events: none;}
.kk-bh .tag {position: absolute; left: 0; top: 0; font-size: 11.5px; font-weight: 800; color: #fff; background: rgba(0,0,0,.6); border: 1px solid rgba(255,255,255,.4); padding: 3px 9px; border-radius: 999px; white-space: nowrap; will-change: transform;}
.kk-bh .tag.ring {border-color: #fde68a; color: #fde68a;}
.kk-bh .tag.disk {border-color: #fdba74; color: #fdba74;}
.kk-bh .hint {position: absolute; z-index: 2; right: 14px; bottom: 14px; color: rgba(226,232,240,.5); font-size: 12px; font-weight: 600; pointer-events: none; text-align: right; max-width: 40%;}
.kk-bh .blackout {position: absolute; inset: 0; z-index: 5; background: #000; display: flex; align-items: center; justify-content: center; text-align: center; padding: 24px; opacity: 0; pointer-events: none; transition: opacity 1.4s ease;}
.kk-bh .blackout.show {opacity: 1; pointer-events: auto;}
.kk-bh .bo-in {max-width: 460px; color: #e2e8f0;}
.kk-bh .bo-icon {font-size: 54px;}
.kk-bh .bo-in h3 {font-size: 24px; margin: 8px 0; color: #fff;}
.kk-bh .bo-in p {font-size: 15px; line-height: 1.7; color: #94a3b8; margin-bottom: 18px;}
.kk-bh .presets {display: flex; flex-wrap: wrap; gap: 8px;}
.kk-bh .presets button {border: 2px solid #f1f5f9; background: #f9fafb; color: #374151; font-weight: 800; font-size: 12.5px; padding: 7px 14px; border-radius: 999px; cursor: pointer; font-family: inherit; transition: all .15s;}
.kk-bh .presets button:hover {border-color: #f97316; color: #c2410c; background: #fff4e6;}
.kk-bh .presets button.active {background: #f97316; border-color: #f97316; color: #fff;}
.kk-bh .frow {margin-bottom: 12px;}
.kk-bh .frow .lbl b {float: right; color: #f97316; font-weight: 800;}
.kk-bh .frow input[type="range"] {width: 100%; accent-color: #f97316;}
.kk-bh .chk {display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 700; color: #374151; margin: 10px 0; cursor: pointer;}
.kk-bh .chk input {accent-color: #f97316; width: 16px; height: 16px;}
.kk-bh .muted-p {font-size: 14px; color: #4b5563; line-height: 1.6; margin: 0 0 12px;}
.kk-bh .sq-row {display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px;}
.kk-bh .sq-row button {border: 2px solid #f1f5f9; background: #f9fafb; color: #374151; font-weight: 700; font-size: 13px; padding: 8px 13px; border-radius: 12px; cursor: pointer; font-family: inherit; text-align: left;}
.kk-bh .sq-row button:hover {border-color: #f97316; background: #fff4e6;}
.kk-bh .sq-row button.active {background: #f97316; border-color: #f97316; color: #fff;}
.kk-bh .sq-out {background: #0b0b14; border-radius: 14px; padding: 16px 18px; color: #e2e8f0;}
.kk-bh .sq-need {font-size: 13px; color: #94a3b8; font-weight: 600;}
.kk-bh .sq-val {font-size: 34px; font-weight: 900; color: #fdba74; margin: 4px 0; word-break: break-word;}
.kk-bh .sq-cmp {font-size: 14px; line-height: 1.6; color: #cbd5e1;}
.kk-bh .sq-formula {margin-top: 10px; font-size: 12px; color: #64748b; font-family: ui-monospace, Menlo, Consolas, monospace;}
.kk-bh .quiz-n {font-size: 12px; font-weight: 800; color: #f97316; letter-spacing: .5px;}
.kk-bh .quiz-q {font-size: 17px; font-weight: 800; color: #1f2937; margin: 6px 0 12px; line-height: 1.4;}
.kk-bh .quiz-opts {display: grid; gap: 8px;}
.kk-bh .opt {text-align: left; border: 2px solid #e5e7eb; background: #fff; border-radius: 12px; padding: 11px 14px; font-size: 14px; font-weight: 600; color: #374151; cursor: pointer; font-family: inherit; transition: all .15s;}
.kk-bh .opt:hover:not(:disabled) {border-color: #f97316; background: #fff4e6;}
.kk-bh .opt.right {border-color: #16a34a; background: #f0fdf4; color: #166534;}
.kk-bh .opt.wrong {border-color: #dc2626; background: #fef2f2; color: #991b1b;}
.kk-bh .opt:disabled {cursor: default;}
.kk-bh .quiz-fb {margin: 12px 0 10px; font-weight: 800; color: #1f2937;}
.kk-bh .quiz-done {text-align: center; padding: 10px 0;}
.kk-bh .quiz-done .big {font-size: 54px;}
.kk-bh .quiz-done h4 {margin: 8px 0 14px; font-size: 20px; color: #1f2937;}
@media (max-width: 960px) {
    .kk-bh .two-col {grid-template-columns: 1fr;}
}
@media (max-width: 640px) {
    .kk-bh .stage {height: 78vh; min-height: 520px;}
    .kk-bh .tour {bottom: 8px; left: 8px; width: calc(100% - 16px); padding: 12px 14px;}
    .kk-bh .tour h3 {font-size: 17px;}
    .kk-bh .tour p {font-size: 13px; margin-bottom: 10px;}
    .kk-bh .readout {max-width: 60%; font-size: 12px; padding: 7px 10px;}
    .kk-bh .hint {display: none;}
}

/* ===== Kids Kingdom skin ===== */
.kk-bh, .kk-bh * { box-sizing: border-box; }
.kk-tool-section { max-width: 1240px; margin: 0 auto 36px; padding: 0 16px; }
.kk-bh { --kk-a: #f97316; --kk-ad: #c2410c; --kk-soft: #ffedd5; --kk-line: #fed7aa; font-family: inherit; position: relative; }
.kk-bh .card { border-radius: 28px; border: 3px solid var(--kk-line); box-shadow: 0 7px 0 var(--kk-line); background: #fff; }
.kk-bh .card-head h3 { font-weight: 900; }
.kk-bh .stage { border-radius: 28px; border: 4px solid var(--kk-a); box-shadow: 0 8px 0 var(--kk-ad); }
.kk-bh .btn, .kk-bh .tb, .kk-bh .seg-mini, .kk-bh .seg-mini button { border-radius: 999px; }
.kk-bh .btn { box-shadow: 0 4px 0 rgba(0,0,0,.18); font-weight: 800; }
.kk-bh .btn:active { transform: translateY(2px); box-shadow: 0 2px 0 rgba(0,0,0,.18); }
.kk-bh .presets button, .kk-bh .sq-row button, .kk-bh .opt, .kk-bh .seg, .kk-bh .seg button, .kk-bh .txt, .kk-bh .sel { border-radius: 999px; }
.kk-bh .opt { border-radius: 18px; border-width: 3px; }
.kk-bh .sq-out { border-radius: 22px; }
.kk-bh .tb { font-weight: 800; }
.kk-bh .gest { border-radius: 20px; }
.kk-bh .toast, .kk-bh .bh-toast { border-radius: 999px; }
.kk-bh input[type="range"] { accent-color: var(--kk-a); }
@media (max-width: 640px) { .kk-tool-section { padding: 0 10px; } .kk-bh .card { border-radius: 22px; padding: 16px; } .kk-bh .stage { border-radius: 22px; } }

/* language switch (sits in the hero) */
.kk-lang { display: inline-flex; gap: 4px; margin-top: 14px; padding: 4px; background: #fff; border: 3px solid #fed7aa; border-radius: 999px; box-shadow: 0 4px 0 #fed7aa; }
.kk-lang button { border: 0; background: transparent; padding: 7px 18px; border-radius: 999px; font: inherit; font-weight: 800; font-size: 14px; color: #475569; cursor: pointer; }
.kk-lang button:hover { color: #c2410c; }
.kk-lang button.active { background: #f97316; color: #fff; }
