/* Solar System for Kids - Kids Kingdom (scoped under .kk-sx; EN + HI) */
.kk-sx {max-width: 1240px; margin: 0 auto; display: flex; flex-direction: column; gap: 22px;}
.kk-sx .card {background: #fff; border-radius: 20px; padding: 22px; box-shadow: 0 10px 30px rgba(0,0,0,0.08);}
.kk-sx .card-head {display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px;}
.kk-sx .card-head h3 {font-size: 19px; color: #1f2937; margin: 0;}
.kk-sx .card-head h3 small {font-size: 12px; color: #6b7280; font-weight: 600; margin-left: 8px;}
.kk-sx .head-actions {display: flex; gap: 8px; flex-wrap: wrap;}
.kk-sx .muted {color: #6b7280; font-weight: 500; font-size: 12px;}
.kk-sx .lbl {display: block; font-size: 13px; font-weight: 700; color: #374151; margin-bottom: 8px;}
.kk-sx .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-sx .txt:focus {outline: none; border-color: #0891b2;}
.kk-sx .seg {display: inline-flex; background: #f3f4f6; border-radius: 10px; padding: 3px; gap: 3px; flex-wrap: wrap;}
.kk-sx .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-sx .seg button:hover {color: #0891b2;}
.kk-sx .seg button.active {background: #fff; color: #0891b2; box-shadow: 0 2px 8px rgba(0,0,0,0.12);}
.kk-sx .code-tabs {display: flex; gap: 4px; flex-wrap: wrap; background: #f3f4f6; padding: 3px; border-radius: 10px;}
.kk-sx .code-tabs button {border: none; background: transparent; padding: 8px 14px; border-radius: 8px; font-weight: 700; font-size: 13px; color: #4b5563; cursor: pointer;}
.kk-sx .code-tabs button.active {background: #fff; color: #0891b2; box-shadow: 0 2px 8px rgba(0,0,0,0.12);}
.kk-sx .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-sx .code-foot {display: flex; justify-content: flex-end; gap: 10px; margin-top: 12px;}
.kk-sx .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-sx .btn:hover:not(:disabled) {transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.15);}
.kk-sx .btn:disabled {opacity: .45; cursor: not-allowed;}
.kk-sx .btn-primary {background: linear-gradient(135deg, #0f172a 0%, #3730a3 100%); color: white;}
.kk-sx .btn-ghost {background: white; border: 2px solid rgba(0,0,0,0.1); color: #1f2937;}
.kk-sx .btn-ghost:hover:not(:disabled) {border-color: #0891b2; color: #0891b2;}
.kk-sx .btn-sm {padding: 8px 14px; font-size: 13px;}
.kk-sx .btn-xs {padding: 6px 10px; font-size: 12px; border-radius: 8px; box-shadow: none;}
.kk-sx .link-btn {border: none; background: none; color: #0891b2; font-weight: 700; font-size: 13px; cursor: pointer; padding: 0; font-family: inherit;}
.kk-sx .link-btn:hover {text-decoration: underline;}
.kk-sx .sx-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-sx .sx-toast.show {opacity: 1; transform: translate(-50%, 0);}
.kk-sx .mt {margin-top: 16px;}
.kk-sx .stage {position: relative; height: clamp(560px, 82vh, 860px); border-radius: 20px; overflow: hidden; background: #03040a; box-shadow: 0 10px 30px rgba(0,0,0,0.25); touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab;}
.kk-sx .stage.grabbing {cursor: grabbing;}
.kk-sx .stage:fullscreen {height: 100vh; border-radius: 0;}
.kk-sx .gl-canvas {position: absolute; inset: 0; width: 100%; height: 100%; display: block; z-index: 0;}
.kk-sx .loader {position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #cbd5e1; font-weight: 700; font-size: 18px; z-index: 5; background: #03040a; text-align: center; padding: 20px;}
.kk-sx .labels {position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden;}
.kk-sx .lbl3d {position: absolute; left: 0; top: 0; color: #e2e8f0; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: rgba(15,23,42,.55); border: 1px solid rgba(255,255,255,.12); white-space: nowrap; pointer-events: auto; cursor: pointer; will-change: transform;}
.kk-sx .lbl3d.active {background: #0891b2; color: #fff; border-color: #67e8f9;}
.kk-sx .ui-layer {position: absolute; z-index: 3; cursor: default;}
.kk-sx .topbar {top: 0; left: 0; right: 0; display: flex; flex-wrap: wrap; gap: 8px 14px; padding: 12px; background: linear-gradient(180deg, rgba(3,4,10,.85), rgba(3,4,10,0)); align-items: center;}
.kk-sx .tb-group {display: flex; flex-wrap: wrap; gap: 6px; align-items: center;}
.kk-sx .tb-group.right {margin-left: auto;}
.kk-sx .date {color: #e2e8f0; font-size: 13px; font-weight: 600; background: rgba(15,23,42,.6); border: 1px solid rgba(255,255,255,.12); padding: 7px 11px; border-radius: 10px;}
.kk-sx .date b {color: #fff;}
.kk-sx .sel {background: rgba(15,23,42,.7); color: #e2e8f0; border: 1px solid rgba(255,255,255,.15); border-radius: 10px; padding: 7px 8px; font-size: 13px; font-weight: 600; font-family: inherit;}
.kk-sx .tb {background: rgba(15,23,42,.7); color: #e2e8f0; border: 1px solid rgba(255,255,255,.15); border-radius: 10px; padding: 7px 12px; font-size: 13px; font-weight: 700; cursor: pointer; font-family: inherit; transition: all .15s;}
.kk-sx .tb:hover {background: rgba(8,145,178,.7); border-color: #67e8f9; color: #fff;}
.kk-sx .tb.tog {opacity: .55;}
.kk-sx .tb.tog.active {opacity: 1; background: rgba(8,145,178,.55); border-color: #67e8f9;}
.kk-sx .tb.cyan {background: rgba(8,145,178,.65); border-color: #22d3ee; color: #fff;}
.kk-sx .tb.cyan.active {background: rgba(220,38,38,.7); border-color: #fca5a5;}
.kk-sx .tb:disabled {opacity: .6; cursor: wait;}
.kk-sx .seg-mini {display: inline-flex; border: 1px solid rgba(255,255,255,.15); border-radius: 10px; overflow: hidden;}
.kk-sx .seg-mini button {background: rgba(15,23,42,.7); color: #cbd5e1; border: none; padding: 7px 11px; font-size: 12.5px; font-weight: 700; cursor: pointer; font-family: inherit;}
.kk-sx .seg-mini button.active {background: #0891b2; color: #fff;}
.kk-sx .botbar {left: 0; right: 0; bottom: 0; padding: 10px 12px 12px; background: linear-gradient(0deg, rgba(3,4,10,.9), rgba(3,4,10,0));}
.kk-sx .body-bar {display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: thin; justify-content: center; flex-wrap: wrap;}
.kk-sx .body-bar button {display: inline-flex; align-items: center; gap: 6px; background: rgba(15,23,42,.72); color: #e2e8f0; border: 1px solid rgba(255,255,255,.14); border-radius: 999px; padding: 7px 13px; font-size: 13px; font-weight: 700; cursor: pointer; font-family: inherit; white-space: nowrap; transition: all .15s;}
.kk-sx .body-bar button i {width: 10px; height: 10px; border-radius: 50%; background: var(--c, #fff); display: inline-block; box-shadow: 0 0 8px var(--c, #fff);}
.kk-sx .body-bar button:hover {border-color: var(--c, #67e8f9);}
.kk-sx .body-bar button.active {background: #0891b2; border-color: #a5f3fc; color: #fff;}
.kk-sx .hint {position: absolute; z-index: 2; left: 50%; bottom: 62px; transform: translateX(-50%); color: rgba(226,232,240,.55); font-size: 12px; font-weight: 600; pointer-events: none; text-align: center; width: 90%;}
.kk-sx .info {top: 70px; right: 12px; width: min(360px, calc(100% - 24px)); max-height: calc(100% - 150px); overflow-y: auto; background: rgba(10,14,30,.88); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,.14); border-radius: 16px; padding: 16px; color: #e2e8f0; transform: translateX(120%); opacity: 0; transition: all .3s ease; pointer-events: none;}
.kk-sx .info.open {transform: none; opacity: 1; pointer-events: auto;}
.kk-sx .info-head {display: flex; justify-content: space-between; gap: 10px; align-items: flex-start;}
.kk-sx .info-name {font-size: 24px; font-weight: 900; color: #fff;}
.kk-sx .info-type {font-size: 12.5px; color: #a5f3fc; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; margin-top: 2px;}
.kk-sx .x {background: rgba(255,255,255,.1); border: none; color: #e2e8f0; width: 30px; height: 30px; border-radius: 8px; cursor: pointer; font-size: 14px; flex: 0 0 auto;}
.kk-sx .x:hover {background: rgba(255,255,255,.22);}
.kk-sx .info-desc {font-size: 13.5px; line-height: 1.6; color: #cbd5e1; margin: 12px 0;}
.kk-sx .facts {display: grid; gap: 6px;}
.kk-sx .fact {display: flex; justify-content: space-between; gap: 12px; font-size: 12.5px; padding: 7px 10px; background: rgba(255,255,255,.06); border-radius: 8px;}
.kk-sx .fact span {color: #94a3b8; font-weight: 600;}
.kk-sx .fact b {color: #f1f5f9; text-align: right; font-weight: 700;}
.kk-sx .info-fun {margin-top: 12px; font-size: 13px; line-height: 1.5; color: #fde68a; background: rgba(250,204,21,.1); border: 1px solid rgba(250,204,21,.25); padding: 10px 12px; border-radius: 10px;}
.kk-sx .info-nav {display: flex; justify-content: space-between; gap: 8px; margin-top: 12px;}
.kk-sx .cam-box {left: 12px; bottom: 76px; width: 220px; height: 165px; border: 2px solid #22d3ee; border-radius: 14px; overflow: hidden; background: #000; box-shadow: 0 0 18px rgba(34,211,238,.35); display: none;}
.kk-sx .cam-box.on {display: block;}
.kk-sx .cam-box video, .kk-sx .cam-box canvas {position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1);}
.kk-sx .cam-status {position: absolute; left: 0; right: 0; bottom: 0; padding: 5px 8px; font-size: 12px; font-weight: 700; color: #fff; background: rgba(0,0,0,.65); text-align: center; z-index: 2;}
.kk-sx .gest-grid {display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px;}
.kk-sx .gest {background: #ecfeff; border: 1px solid #e0e7ff; border-radius: 12px; padding: 12px; font-size: 13px; color: #4b5563; display: flex; flex-direction: column; gap: 2px;}
.kk-sx .gest span {font-size: 26px;}
.kk-sx .gest b {color: #1e1b4b;}
.kk-sx .note {margin-top: 14px; font-size: 13px; line-height: 1.6; color: #6b7280;}
.kk-sx .keys {margin-top: 12px; font-size: 13px; color: #4b5563; line-height: 2;}
.kk-sx kbd {background: #f3f4f6; border: 1px solid #d1d5db; border-bottom-width: 2px; border-radius: 6px; padding: 1px 7px; font-size: 12px; font-family: inherit; font-weight: 700; color: #111827;}
@media (max-width: 760px) {
    .kk-sx .stage {height: 80vh; min-height: 520px;}
    .kk-sx .topbar {padding: 8px; gap: 6px;}
    .kk-sx .tb-group.right {margin-left: 0;}
    .kk-sx .info {top: auto; bottom: 62px; right: 8px; left: 8px; width: auto; max-height: 52%; transform: translateY(120%);}
    .kk-sx .info.open {transform: none;}
    .kk-sx .cam-box {width: 130px; height: 98px; bottom: auto; top: 118px;}
    .kk-sx .hint {display: none;}
    .kk-sx .body-bar {flex-wrap: nowrap; justify-content: flex-start;}
}

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