:root {
    --ink: #3b2f63;
    --p: #7c5cff;
    --ok: #22c55e;
    --bad: #ef4444;
    --gold: #ffc93c;
    --card: #fff;
    --script: 'Fredoka', 'Nunito', system-ui, sans-serif;
    --inkblue: #2340b8;
    --rule: #cbd8f3;
    --margin: #f3a5a5
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent
}

html,
body {
    height: 100%;
    margin: 0
}

body {
    font-family: 'Fredoka', 'Nunito', system-ui, sans-serif;
    color: var(--ink);
    background-color: #f2f7ff;
    background-image:
        linear-gradient(rgba(84, 128, 214, .11) 1px, transparent 1px),
        linear-gradient(90deg, rgba(84, 128, 214, .11) 1px, transparent 1px),
        radial-gradient(1100px 600px at 105% -10%, rgba(255, 214, 120, .35), transparent 60%);
    background-size: 26px 26px, 26px 26px, auto;
    background-position: -1px -1px, -1px -1px, 0 0;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    overscroll-behavior: none;
    touch-action: manipulation
}

input,
select {
    user-select: text;
    -webkit-user-select: text;
    font: inherit
}

button {
    font: inherit;
    color: inherit;
    cursor: pointer
}

#app {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column
}

.screen {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    animation: pop .35s ease
}

.sp {
    flex: 1
}

.row {
    display: flex;
    gap: 14px;
    align-items: center;
    justify-content: center
}

.topbar {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 64px;
    flex: none;
    padding-right: 76px
}

.ibtn {
    width: 58px;
    height: 58px;
    border-radius: 20px;
    border: 0;
    background: #fff;
    font-size: 30px;
    box-shadow: 0 5px 0 rgba(0, 0, 0, .13);
    transition: transform .15s
}

.ibtn:active {
    transform: translateY(4px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, .13)
}

.ibtn.big {
    width: 72px;
    height: 72px;
    font-size: 36px;
    border-radius: 24px
}

.ibtn.ok {
    background: var(--ok)
}

.ibtn.no {
    background: #fecaca
}

.coinbox {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border-radius: 999px;
    padding: 8px 18px;
    font-size: 26px;
    font-weight: 700;
    box-shadow: 0 5px 0 rgba(0, 0, 0, .1)
}

.gear {
    position: fixed;
    top: 12px;
    right: 14px;
    z-index: 60;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    border: 0;
    background: #fff;
    font-size: 28px;
    box-shadow: 0 5px 0 rgba(0, 0, 0, .13);
    display: none
}

.gear.on {
    display: block
}

.gear i {
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 5px solid transparent;
    pointer-events: none
}

.gear.hold i {
    border-top-color: var(--p);
    border-right-color: var(--p);
    animation: spin 1.4s linear forwards
}

/* HOME */
.homebody {
    flex: 1;
    min-height: 0;
    display: flex;
    gap: 28px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    overflow: auto;
    padding: 6px
}

.herobig {
    height: min(50vh, 360px);
    aspect-ratio: 200/270;
    position: relative
}

.heromini {
    height: min(34vh, 230px);
    aspect-ratio: 200/270
}

.hsvg {
    width: 100%;
    height: 100%;
    overflow: visible;
    filter: drop-shadow(0 8px 10px rgba(80, 60, 140, .18))
}

.hsvg .eyes {
    animation: blink 4.5s infinite;
    transform-box: fill-box;
    transform-origin: center
}

.bob {
    animation: bob 3.2s ease-in-out infinite
}

.jump {
    animation: jump .7s ease 2 !important
}

.shake {
    animation: shake .45s ease !important
}

.bubble {
    position: absolute;
    top: -6px;
    right: -40px;
    background: #fff;
    border-radius: 26px;
    padding: 8px 16px;
    font-size: 36px;
    box-shadow: 0 6px 14px rgba(0, 0, 0, .12)
}

.bubble:after {
    content: '';
    position: absolute;
    left: 14px;
    bottom: -12px;
    border: 12px solid transparent;
    border-top-color: #fff;
    border-bottom: 0
}

.tiles {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    width: min(660px, 94vw)
}

.tile {
    position: relative;
    aspect-ratio: 1;
    border: 0;
    border-radius: 32px;
    background: var(--c);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding-bottom: 14px;
    box-shadow: 0 9px 0 rgba(0, 0, 0, .14), inset 0 -4px 0 rgba(0, 0, 0, .06);
    transition: transform .15s, box-shadow .15s;
    overflow: hidden
}

.tile .lbl {
    font-size: clamp(14px, 2.6vw, 21px);
    font-weight: 600;
    color: rgba(40, 30, 80, .78);
    letter-spacing: .01em
}

.tile:active {
    transform: translateY(7px);
    box-shadow: 0 2px 0 rgba(0, 0, 0, .14)
}

.tile .ico {
    font-size: clamp(40px, 8vw, 74px);
    line-height: 1;
    filter: drop-shadow(0 4px 0 rgba(0, 0, 0, .12))
}

.tile.locked {
    filter: grayscale(.75) brightness(.97)
}

.tile .lk {
    position: absolute;
    top: 8px;
    right: 10px;
    font-size: 30px;
    font-style: normal
}

.tile .pbar {
    position: absolute;
    left: 14%;
    right: 14%;
    bottom: 9px;
    height: 9px;
    border-radius: 9px;
    background: rgba(255, 255, 255, .65);
    overflow: hidden
}

.tile .pbar i {
    display: block;
    height: 100%;
    background: #fff;
    box-shadow: inset 0 0 0 3px rgba(0, 0, 0, .18);
    background: #22c55e;
    border-radius: 9px;
    transition: width .5s
}

.t1 {
    --c: #ffd166
}

.t2 {
    --c: #8ecae6
}

.t3 {
    --c: #c7b6ff
}

.t4 {
    --c: #ffadc6
}

.t5 {
    --c: #95e1a3
}

.t6 {
    --c: #ffb38a
}

.t7 {
    --c: #a78bfa
}

.t8 {
    --c: #67e8f9
}

.tile.unl {
    animation: wob 1s ease 3
}

/* LETTER GRID */
.cards {
    flex: 1;
    min-height: 0;
    overflow: auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
    gap: 14px;
    padding: 6px 4px 20px;
    align-content: start
}

.lcard {
    position: relative;
    border: 0;
    border-radius: 18px 22px 22px 18px;
    background: #fffefb;
    box-shadow: 0 6px 0 #d6e1f6, 0 7px 14px rgba(35, 64, 184, .08);
    padding: 4px 0 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0
}

.lcard:active {
    transform: translateY(5px);
    box-shadow: 0 2px 0 rgba(0, 0, 0, .12)
}

.lcard.full {
    background: #f1fbef;
    box-shadow: 0 6px 0 #bfe5c4, 0 7px 14px rgba(22, 120, 60, .08)
}

.lcard.full::after {
    content: '✓';
    position: absolute;
    top: 4px;
    right: 9px;
    font-size: 18px;
    font-weight: 700;
    color: #1f9d55
}

.daftar {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible
}

.lcard .daftar { width: 100% }
.opt .daftar { width: 92% }
.donepage { width: min(300px, 70vw); background: #fffefb; border-radius: 20px; padding: 6px 0; box-shadow: inset 0 0 0 2px #e3eafa }

.cur {
    font-family: var(--script);
    font-weight: 400;
    line-height: 1.25;
    color: var(--inkblue)
}

/* Ikki qatorli yozma harf wrap */
.cur-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1;
    font-family: var(--script);
    font-weight: 400;
    color: var(--inkblue)
}

.cur-upper {
    font-size: clamp(36px, 7vw, 64px);
    line-height: 1.05
}

.cur-lower {
    font-size: clamp(30px, 5.5vw, 52px);
    line-height: 1;
    opacity: 0.85
}

.lcard .cur-wrap {
    gap: 0
}

.lcard .cur-upper {
    font-size: 52px
}

.lcard .cur-lower {
    font-size: 42px
}

.lcard .cur {
    font-size: 64px;
    color: #1f5a4a
}

.tile-glyph {
    font-family: var(--script);
    font-weight: 700;
    font-size: 64px;
    line-height: 1;
    color: #1f5a4a
}

.stars {
    display: flex;
    gap: 5px;
    font-size: 0
}

.stars span {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #ddd5c1
}

.stars span.on {
    background: #f2a93b
}

/* LESSON */
.steps {
    display: flex;
    gap: 26px;
    justify-content: center;
    flex: none;
    margin: 2px 0 8px;
    position: relative;
    isolation: isolate
}

.steps::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 190px;
    height: 6px;
    margin: -3px 0 0 -95px;
    border-radius: 3px;
    background: repeating-linear-gradient(90deg, #c9d6f3 0 10px, transparent 10px 18px);
    z-index: -1
}

.stp {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: 0 5px 0 rgba(0, 0, 0, .12);
    border: 5px solid #e5e7eb;
    border-width: 5px;
    position: relative
}

.stp.cur2 {
    border-color: var(--p);
    transform: scale(1.12)
}

.stp.done {
    border-color: var(--ok);
    background: #e7fbe9
}

.stp.lock {
    filter: grayscale(1);
    opacity: .6
}

.lessonrow {
    flex: 1;
    min-height: 0;
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: center
}

.side {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex: none
}

.pic {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    background: #fffefb;
    border-radius: 22px;
    padding: 8px 16px 6px;
    box-shadow: 0 5px 0 #d6e1f6;
    max-width: 200px
}

.pic .emo {
    font-size: 52px;
    line-height: 1.1;
    word-break: break-all;
    text-align: center
}

.sline {
    display: block;
    overflow: visible;
    max-width: 100%;
    height: auto
}

.stage {
    flex: 0 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 0
}

.tools {
    display: flex;
    flex-direction: column;
    gap: 14px;
    flex: none
}

.padwrap {
    position: relative;
    width: min(76vh, 58vw, 640px);
    aspect-ratio: 1;
    border-radius: 30px;
    background: #fff;
    box-shadow: 0 10px 0 rgba(0, 0, 0, .12), inset 0 0 0 6px #fde68a;
    overflow: hidden
}

.padwrap canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%
}

#pad {
    touch-action: none;
    cursor: crosshair
}

#demo {
    pointer-events: none
}

.padwrap.ok {
    animation: okflash .8s
}

.padwrap.bad {
    animation: shake .45s
}

.cardgrid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    width: min(78vh, 64vw, 620px)
}

.opt {
    aspect-ratio: 1;
    border: 0;
    border-radius: 22px;
    background: #fffefb;
    box-shadow: 0 8px 0 rgba(0, 0, 0, .13);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform .15s
}

.opt:active {
    transform: translateY(6px)
}

.opt .cur {
    font-size: clamp(50px, 11vw, 98px);
    color: #5b3fd6
}

.opt .cur-wrap {
    gap: 2px
}

.opt .cur-upper {
    font-size: clamp(44px, 9vw, 84px)
}

.opt .cur-lower {
    font-size: clamp(36px, 7.5vw, 68px)
}

.opt.right {
    background: #bbf7d0;
    animation: jump .6s
}

.opt.wrong {
    background: #fecaca;
    animation: shake .4s;
    opacity: .7
}

/* overlays */
#ov {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(40, 30, 90, .5);
    backdrop-filter: blur(4px);
    padding: 14px;
    overflow: auto
}

#ov.on {
    display: flex
}

.modal {
    background: #fff;
    border-radius: 34px;
    padding: 22px;
    width: min(560px, 96vw);
    max-height: 96vh;
    overflow: auto;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .3);
    animation: pop .35s;
    text-align: center
}

.modal.kid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px
}

.bigglyph {
    font-size: 110px;
    line-height: 1
}

.pill {
    display: inline-block;
    background: #f1ecff;
    border-radius: 999px;
    padding: 6px 16px;
    font-weight: 600
}

#fx {
    position: fixed;
    inset: 0;
    z-index: 90;
    pointer-events: none
}

.fly {
    position: fixed;
    z-index: 95;
    font-size: 34px;
    pointer-events: none
}

/* words/math */
.wordrow {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap
}

.slot {
    width: clamp(56px, 10vw, 92px);
    aspect-ratio: .9;
    border-radius: 20px;
    border: 5px dashed #c4b5fd;
    background: #faf7ff;
    display: flex;
    align-items: center;
    justify-content: center
}

.slot .cur {
    font-size: clamp(46px, 8vw, 78px);
    color: #5b3fd6
}

.slot .sline, .tile2 .sline {
    max-height: 80%
}

.slot.fill {
    border-style: solid;
    border-color: var(--ok);
    background: #e7fbe9
}

.tile2 {
    width: clamp(64px, 11vw, 100px);
    aspect-ratio: .9;
    border: 0;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 7px 0 rgba(0, 0, 0, .13);
    display: flex;
    align-items: center;
    justify-content: center
}

.tile2 .cur {
    font-size: clamp(50px, 9vw, 84px);
    color: #5b3fd6
}

.tile2.used {
    opacity: .25;
    pointer-events: none
}

.tile2.wrong {
    animation: shake .4s;
    background: #fecaca
}

.center {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 22px;
    overflow: auto
}

.bigemo {
    font-size: clamp(80px, 17vh, 150px);
    line-height: 1
}

.eq {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: center;
    font-size: clamp(34px, 6vw, 54px)
}

.grp {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: center;
    max-width: 260px;
    background: #fff;
    border-radius: 24px;
    padding: 12px;
    box-shadow: 0 6px 0 rgba(0, 0, 0, .1)
}

.grp span.x {
    position: relative;
    opacity: .45
}

.grp span.x:after {
    content: '✖';
    position: absolute;
    inset: 0;
    color: #ef4444;
    font-size: .9em;
    text-align: center
}

.bubfield {
    position: relative;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    border-radius: 30px;
    background: linear-gradient(#bde7ff, #e8f9ff)
}

.bubble2 {
    position: absolute;
    bottom: -120px;
    border-radius: 50%;
    border: 0;
    box-shadow: inset -10px -10px 24px rgba(255, 255, 255, .55), inset 8px 8px 20px rgba(255, 255, 255, .7);
    animation: rise linear forwards
}

.shapebox {
    width: clamp(110px, 22vw, 170px);
    aspect-ratio: 1;
    background: #fff;
    border-radius: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    box-shadow: 0 8px 0 rgba(0, 0, 0, .12)
}

.shapebox svg {
    width: 70%;
    height: 70%
}

.shapebox.wrong {
    animation: shake .4s;
    background: #fecaca
}

.shapebox.right {
    background: #bbf7d0;
    animation: jump .6s
}

/* shop */
.shop {
    flex: 1;
    min-height: 0;
    display: flex;
    gap: 18px;
    align-items: stretch;
    justify-content: center;
    flex-wrap: wrap;
    overflow: auto
}

.shopL {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center
}

.shopR {
    flex: 1 1 360px;
    max-width: 640px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 0
}

.cats {
    display: flex;
    gap: 10px;
    justify-content: center
}

.cat {
    width: 68px;
    height: 68px;
    border-radius: 22px;
    border: 0;
    background: #fff;
    font-size: 34px;
    box-shadow: 0 5px 0 rgba(0, 0, 0, .12)
}

.cat.on {
    background: var(--gold);
    transform: translateY(-3px)
}

.items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
    gap: 12px;
    overflow: auto;
    padding: 4px 2px 18px
}

.item {
    position: relative;
    border: 0;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 6px 0 rgba(0, 0, 0, .12);
    padding: 10px 6px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-height: 118px;
    justify-content: center
}

.item.eq2 {
    outline: 5px solid var(--ok)
}

.item.shake {
    animation: shake .4s
}

.item .ic {
    height: 62px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 50px
}

.item .ic svg {
    height: 62px;
    width: 90px
}

.price {
    font-weight: 700;
    font-size: 20px;
    background: #fff7d6;
    border-radius: 999px;
    padding: 1px 12px
}

.sw {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    border: 4px solid #fff;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, .1)
}

/* auth */
.authwrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    overflow: auto;
    padding: 10px
}

.authart {
    width: min(520px, 92vw)
}

.authtitle {
    font-family: var(--script);
    font-weight: 400;
    font-size: clamp(34px, 7vw, 60px);
    line-height: 1.5;
    color: var(--inkblue)
}

.abtn {
    display: flex;
    align-items: center;
    gap: 14px;
    justify-content: center;
    width: min(420px, 92vw);
    padding: 16px 22px;
    border-radius: 22px;
    border: 0;
    font-weight: 600;
    font-size: 19px;
    box-shadow: 0 6px 0 rgba(0, 0, 0, .14)
}

.abtn.g {
    background: #fff
}

.abtn.t {
    background: #22c55e;
    color: #fff
}

.field {
    width: 100%;
    padding: 14px 16px;
    border-radius: 16px;
    border: 3px solid #ddd6fe;
    font-size: 19px;
    margin: 8px 0;
    outline: none
}

.field:focus {
    border-color: var(--p)
}

.pick {
    display: flex;
    gap: 26px;
    align-items: center;
    justify-content: center;
    flex: 1;
    flex-wrap: wrap
}

.pickcard {
    border: 0;
    border-radius: 36px;
    background: #fff;
    padding: 14px 22px;
    box-shadow: 0 10px 0 rgba(0, 0, 0, .14);
    height: min(62vh, 420px);
    aspect-ratio: 200/290
}

.pickcard:active {
    transform: translateY(8px)
}

/* parent */
.parent {
    flex: 1;
    overflow: auto;
    padding: 4px 2px 30px;
    user-select: text;
    -webkit-user-select: text
}

.parent * {
    user-select: text;
    -webkit-user-select: text
}

.pwrap {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px
}

.panel {
    background: #fff;
    border-radius: 26px;
    padding: 18px 20px;
    box-shadow: 0 6px 0 rgba(0, 0, 0, .08)
}

.panel h3 {
    margin: 0 0 10px;
    font-size: 22px
}

.grid2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px
}

.stat {
    background: #f6f2ff;
    border-radius: 20px;
    padding: 12px;
    text-align: center
}

.stat b {
    display: block;
    font-size: 30px
}

.chip {
    display: inline-flex;
    min-width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    margin: 3px;
    font-weight: 700;
    background: #eee;
    color: #888;
    padding: 0 6px
}

.chip.c3 {
    background: #bbf7d0;
    color: #166534
}

.chip.c1,
.chip.c2 {
    background: #fde68a;
    color: #854d0e
}

.days {
    display: flex;
    gap: 8px;
    justify-content: space-between
}

.day {
    flex: 1;
    text-align: center;
    font-size: 14px
}

.day .b {
    height: 90px;
    display: flex;
    align-items: flex-end;
    justify-content: center
}

.day .b i {
    display: block;
    width: 70%;
    background: #a78bfa;
    border-radius: 8px 8px 0 0;
    min-height: 4px
}

.rowset {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px dashed #e5e0f5
}

.rowset:last-child {
    border: 0
}

.btn {
    border: 0;
    border-radius: 16px;
    padding: 12px 18px;
    font-weight: 600;
    background: var(--p);
    color: #fff;
    box-shadow: 0 4px 0 rgba(0, 0, 0, .18)
}

.btn.alt {
    background: #eee;
    color: var(--ink)
}

.btn.red {
    background: #ef4444
}

select {
    padding: 8px 12px;
    border-radius: 12px;
    border: 2px solid #ddd6fe;
    background: #fff
}

.num {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 10px
}

.num button {
    padding: 16px;
    font-size: 26px;
    border: 0;
    border-radius: 18px;
    background: #f1ecff;
    font-weight: 600
}

.gval {
    font-size: 40px;
    font-weight: 700;
    min-height: 56px;
    letter-spacing: 4px
}

/* Recording indicator */
.recording {
    animation: pulse 1s infinite
}

@keyframes pulse {
    0%, 100% {
        opacity: 1
    }
    50% {
        opacity: .5
    }
}

/* Voice recording button active state */
.ibtn.recording {
    background: #ef4444;
    animation: pulse 1s infinite
}

/* Color preview */
.color-preview {
    width: 100px;
    height: 100px;
    border-radius: 20px;
    box-shadow: 0 5px 0 rgba(0, 0, 0, .13)
}

/* Maze grid */
#mazeGrid {
    touch-action: none
}

/* Memory card flip animation */
.mem-card {
    transition: transform .3s
}

.mem-card.flipped {
    transform: rotateY(180deg)
}

/* Animations */
@keyframes pop {
    from {
        transform: scale(.94);
        opacity: 0
    }

    to {
        transform: none;
        opacity: 1
    }
}

@keyframes bob {

    0%,
    100% {
        transform: translateY(0)
    }

    50% {
        transform: translateY(-8px)
    }
}

@keyframes jump {

    0%,
    100% {
        transform: translateY(0)
    }

    40% {
        transform: translateY(-26px) scale(1.04)
    }
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0)
    }

    20% {
        transform: translateX(-10px)
    }

    50% {
        transform: translateX(10px)
    }

    80% {
        transform: translateX(-6px)
    }
}

@keyframes blink {

    0%,
    92%,
    100% {
        transform: scaleY(1)
    }

    95% {
        transform: scaleY(.1)
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg)
    }
}

@keyframes rise {
    to {
        transform: translateY(-130vh)
    }
}

@keyframes wob {

    0%,
    100% {
        transform: rotate(0)
    }

    25% {
        transform: rotate(-6deg)
    }

    75% {
        transform: rotate(6deg)
    }
}

@keyframes okflash {
    0% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, .8), 0 10px 0 rgba(0, 0, 0, .12)
    }

    100% {
        box-shadow: 0 0 0 40px rgba(34, 197, 94, 0), 0 10px 0 rgba(0, 0, 0, .12)
    }
}

@media (max-width:700px) {
    .lessonrow {
        flex-direction: column;
        gap: 8px
    }

    .side {
        flex-direction: row
    }

    .heromini {
        height: 90px
    }

    .tools {
        flex-direction: row
    }

    .padwrap {
        width: min(90vw, 52vh)
    }

    .cardgrid {
        width: min(92vw, 52vh)
    }

    .tiles {
        gap: 10px
    }

    .bubble {
        right: -10px
    }
}

/* Ovoz tinglash: mikrofon belgisi pulsatsiyasi */
.mic-on {
    animation: micpulse 1s ease-in-out infinite
}

@keyframes micpulse {

    0%,
    100% {
        transform: scale(1)
    }

    50% {
        transform: scale(1.18)
    }
}

@media (prefers-reduced-motion: reduce) {
    .mic-on {
        animation: none
    }
}

/* ---------- Bir nechta bola ---------- */
.kidchip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 48px;
    padding: 0 14px 0 8px;
    border: 0;
    border-radius: 24px;
    background: #fff;
    color: var(--ink);
    font: inherit;
    font-size: 19px;
    font-weight: 700;
    box-shadow: 0 5px 0 rgba(0, 0, 0, .1);
    max-width: 42vw
}

.kidchip span:not(.kface) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.kidchip em { font-style: normal; opacity: .55; font-size: 16px }
.kidchip.still { box-shadow: none; background: rgba(255, 255, 255, .6) }

.kface {
    display: inline-flex;
    align-items: flex-start;
    justify-content: center;
    flex: none;
    border-radius: 50%;
    overflow: hidden;
    background: #fff4d6;
    vertical-align: middle
}

.kface svg { width: 100%; height: 100% }
.kface.letter { align-items: center; background: #ede9fe; color: #5b3fd6; font-weight: 700 }

.pickname {
    text-align: center;
    font-size: clamp(26px, 5vw, 40px);
    font-weight: 700;
    margin: 6px 0 4px
}

.kidsbody {
    flex: 1;
    min-height: 0;
    overflow: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 12px 0 24px
}

.kidgrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 14px;
    width: 100%;
    max-width: min(860px, calc(var(--n, 3) * 210px))
}

.kidcard {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 10px 16px;
    border: 4px solid transparent;
    border-radius: 28px;
    background: #fff;
    color: var(--ink);
    font: inherit;
    box-shadow: 0 7px 0 rgba(0, 0, 0, .1);
    transition: transform .15s
}

.kidcard:active { transform: translateY(4px); box-shadow: 0 3px 0 rgba(0, 0, 0, .1) }
.kidcard.cur { border-color: var(--p) }
.kidcard.add { background: rgba(255, 255, 255, .55); border: 4px dashed #c9bdf5; box-shadow: none }
.kidcard .kidpic { height: clamp(96px, 22vw, 130px); width: 110px; display: flex; align-items: center; justify-content: center }
.kidcard .kidpic svg { height: clamp(96px, 22vw, 130px); width: auto }
.kidcard b { font-size: 24px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.kidcard small { font-size: 13px; opacity: .7 }

.tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch }

.famtable { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 640px }
.famtable th { text-align: left; font-size: 13px; font-weight: 600; opacity: .65; padding: 6px 8px; border-bottom: 2px solid #f0ebfa; white-space: nowrap }
.famtable td { padding: 8px; border-bottom: 1px solid #f3effa; white-space: nowrap; font-variant-numeric: tabular-nums }
.famtable td small { display: block; font-size: 12px; opacity: .6 }
.famtable tr[data-a] { cursor: pointer }
.famtable tr.sel td { background: #f6f3ff }
.famtable td.nm { display: flex; align-items: center; gap: 8px }
.famtable .dot { width: 10px; height: 10px; border-radius: 50%; flex: none }

.famchart { width: 100%; height: auto; display: block; margin-top: 6px }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 14px; margin-top: 4px }
.legend .lg { display: inline-flex; align-items: center; gap: 6px }
.legend .lg i { width: 12px; height: 12px; border-radius: 3px; display: inline-block }
.legend .muted { opacity: .55 }

.kidtabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px }
.kidtab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px 6px 6px;
    border: 3px solid transparent;
    border-radius: 999px;
    background: rgba(255, 255, 255, .7);
    color: var(--ink);
    font: inherit;
    font-size: 18px;
    font-weight: 700
}

.kidtab.on { background: #fff; border-color: var(--kc, var(--p)); box-shadow: 0 4px 0 rgba(0, 0, 0, .08) }


/* ---------- Bosh ekran: salom, bugungi natija, navbatdagi dars ---------- */
.herocol {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px
}

.speech {
    position: relative;
    background: #fff;
    border-radius: 22px;
    padding: 8px 18px;
    font-size: clamp(20px, 3.2vw, 28px);
    font-weight: 600;
    box-shadow: 0 5px 0 #d6e1f6;
    max-width: 260px;
    text-align: center;
    overflow-wrap: anywhere
}

.speech::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -12px;
    margin-left: -10px;
    border: 10px solid transparent;
    border-top-color: #fff;
    border-bottom: 0
}

.todaychip {
    display: flex;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
    color: rgba(40, 30, 80, .75)
}

.todaychip span {
    background: rgba(255, 255, 255, .85);
    border-radius: 999px;
    padding: 4px 12px;
    box-shadow: 0 3px 0 rgba(35, 64, 184, .1)
}

.homecol {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    width: min(640px, 94vw, calc(100vh - 230px));
    min-width: min(320px, 94vw)
}

.homecol .tiles {
    width: 100%
}

.nextcard {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 16px;
    border: 0;
    border-radius: 26px;
    padding: 12px 18px 12px 12px;
    background: linear-gradient(100deg, #ffffff 0, #fff7e2 100%);
    box-shadow: 0 8px 0 #f2cf7a, 0 10px 24px rgba(242, 169, 59, .18);
    text-align: left;
    transition: transform .15s, box-shadow .15s
}

.nextcard:active {
    transform: translateY(6px);
    box-shadow: 0 2px 0 #f2cf7a
}

.nc-page {
    flex: none;
    width: clamp(96px, 18vw, 132px);
    background: #fffefb;
    border-radius: 16px;
    box-shadow: inset 0 0 0 2px #e3eafa
}

.nc-txt {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px
}

.nc-txt b {
    font-size: clamp(22px, 3.6vw, 30px);
    line-height: 1.1
}

.nc-txt > span:not(.nc-bar) {
    font-size: clamp(15px, 2.4vw, 19px);
    opacity: .75;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
}

.nc-txt small {
    font-size: 13px;
    opacity: .6
}

.nc-bar {
    display: block;
    height: 10px;
    border-radius: 6px;
    background: #f3e7c6;
    overflow: hidden;
    margin-top: 4px
}

.nc-bar i {
    display: block;
    height: 100%;
    border-radius: 6px;
    background: #f2a93b
}

.nc-go {
    flex: none;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 26px;
    color: #fff;
    background: #f2a93b;
    box-shadow: 0 5px 0 #c9852a;
    padding-left: 4px
}

.reviewbtn {
    align-self: center
}

/* harflar ro'yxatida navbatdagi harf */
.lcard.next {
    box-shadow: 0 6px 0 #f2cf7a, 0 0 0 4px #f2a93b;
    animation: nextpulse 1.8s ease-in-out infinite
}

.lcard.next::before {
    content: '▶';
    position: absolute;
    top: 4px;
    right: 8px;
    font-size: 14px;
    color: #f2a93b
}

@keyframes nextpulse {
    50% { box-shadow: 0 6px 0 #f2cf7a, 0 0 0 8px rgba(242, 169, 59, .35) }
}

@media (max-width: 700px) {
    .herocol { flex-direction: row; flex-wrap: wrap; justify-content: center }
    .herocol .herobig { height: 150px }
    .speech { order: 2 }
    .todaychip { order: 3; width: 100%; justify-content: center }
}

@media (prefers-reduced-motion: reduce) {
    .lcard.next { animation: none }
}

/* =====================================================================
   MAVZU: «Quyoshli Samarqand»
   Osmon, ufqdagi ko'k gumbazlar va bog' - barcha ekranlar shu olamda turadi.
   Ranglar: lojuvard ko'k, quyosh sarig'i, anor qizili, barg yashili.
   ===================================================================== */
:root {
    --lapis: #2f6fe4;
    --lapis-d: #1d4fb5;
    --sky: #4fbdf3;
    --sun: #ffc83d;
    --sun-d: #e09a00;
    --pom: #ff5d73;
    --pom-d: #d93b52;
    --leaf: #3ccb7f;
    --leaf-d: #22a260;
    --ink: #22305a;
    --paper: #fffefb;
    --p: #2f6fe4;
    --ok: #3ccb7f;
    --shade: 0 7px 0 rgba(20, 50, 120, .18);
}

body { background: #8fd6fb; color: var(--ink); }

#scene { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
#scene svg { width: 100%; height: 100%; display: block; }
#scene .cl { animation: drift 90s linear infinite; }
#scene .c2 { animation-duration: 120s; animation-delay: -40s; }
#scene .c3 { animation-duration: 75s; animation-delay: -20s; }
@keyframes drift { from { transform: translateX(-260px); } to { transform: translateX(1700px); } }
#app { z-index: 1; }

/* ---------- Yuqori panel ---------- */
.topbar { gap: 10px; padding-right: 74px; min-height: 66px; }
.topbar .sp { display: flex; justify-content: center; min-width: 0; }
.ttl {
    margin: 0;
    font-size: clamp(22px, 3.6vw, 34px);
    font-weight: 700;
    color: #fff;
    letter-spacing: .01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 2px 2px 0 var(--lapis-d), -2px 2px 0 var(--lapis-d), 2px -2px 0 var(--lapis-d), -2px -2px 0 var(--lapis-d), 0 3px 0 var(--lapis-d), 0 6px 0 rgba(20, 50, 120, .35);
}

/* ---------- Tugmalar: «konfet» uslubi ---------- */
.ibtn, .gear {
    display: inline-grid;
    place-items: center;
    width: 60px;
    height: 60px;
    border-radius: 20px;
    border: 0;
    color: var(--lapis);
    background: linear-gradient(#fff, #f1f6ff);
    box-shadow: 0 6px 0 #c3d4f2, 0 8px 16px rgba(20, 50, 120, .14);
    transition: transform .12s, box-shadow .12s;
    font-size: 30px;
}
.ibtn:active, .gear:active { transform: translateY(5px); box-shadow: 0 1px 0 #c3d4f2; }
.ibtn .ico-svg { width: 58%; height: 58%; }
.gear .ico-svg { width: 30px; height: 30px; }
.ibtn.big { width: 72px; height: 72px; border-radius: 24px; }
.ibtn.back { color: #fff; background: linear-gradient(#4a86f0, var(--lapis)); box-shadow: 0 6px 0 var(--lapis-d), 0 8px 16px rgba(20, 50, 120, .2); }
.ibtn.back:active { box-shadow: 0 1px 0 var(--lapis-d); }
.ibtn.ok { color: #fff; background: linear-gradient(#5fdc96, var(--leaf)); box-shadow: 0 6px 0 var(--leaf-d), 0 8px 16px rgba(20, 120, 60, .2); }
.ibtn.ok:active { box-shadow: 0 1px 0 var(--leaf-d); }
.ibtn.no { color: #fff; background: linear-gradient(#ff7d90, var(--pom)); box-shadow: 0 6px 0 var(--pom-d), 0 8px 16px rgba(160, 30, 50, .2); }
.ibtn.i-play { color: #fff; background: linear-gradient(#ffd25e, var(--sun)); box-shadow: 0 6px 0 var(--sun-d), 0 8px 16px rgba(180, 120, 0, .2); }
.ibtn.i-play:active { box-shadow: 0 1px 0 var(--sun-d); }
.gear { position: fixed; border-radius: 50%; display: none; }
.gear.on { display: inline-grid; }

.coinbox { gap: 6px; padding: 6px 16px 6px 8px; font-size: 24px; color: var(--ink); background: #fff; box-shadow: 0 5px 0 #c3d4f2; }
.coinbox .coin { width: 32px; height: 32px; }
.kidchip { box-shadow: 0 5px 0 #c3d4f2; }

.btn {
    border-radius: 18px;
    padding: 12px 20px;
    font-size: 17px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(#4a86f0, var(--lapis));
    box-shadow: 0 5px 0 var(--lapis-d);
    transition: transform .12s, box-shadow .12s;
}
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--lapis-d); }
.btn.alt { color: var(--lapis-d); background: #fff; box-shadow: 0 5px 0 #c3d4f2, inset 0 0 0 2px #dbe6fa; }
.btn.alt:active { box-shadow: 0 1px 0 #c3d4f2, inset 0 0 0 2px #dbe6fa; }
.btn.red { background: linear-gradient(#ff7d90, var(--pom)); box-shadow: 0 5px 0 var(--pom-d); }

/* ---------- Bosh ekran ---------- */
.homebody { gap: clamp(16px, 4vw, 48px); }
.homecol { width: min(860px, 94vw, calc((100vh - 250px) * 2.05)); }
.tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(10px, 1.6vw, 18px); }
.tile {
    --c: #ff8a3d; --cd: #d9661c;
    border-radius: 28px;
    background: radial-gradient(120% 80% at 30% 15%, rgba(255, 255, 255, .35), transparent 55%), var(--c);
    box-shadow: 0 9px 0 var(--cd), 0 14px 22px rgba(20, 50, 120, .18), inset 0 -6px 0 rgba(0, 0, 0, .06);
    gap: 6px;
    padding: 12px 8px 18px;
}
.tile:active { transform: translateY(7px); box-shadow: 0 2px 0 var(--cd), 0 4px 10px rgba(20, 50, 120, .15); }
.tile .art { width: 58%; aspect-ratio: 1; display: grid; place-items: center; filter: drop-shadow(0 4px 0 rgba(0, 0, 0, .14)); }
.tile .art svg { width: 100%; height: 100%; }
.tile .art .sline { width: 100%; height: auto; }
.tile .lbl { color: #fff; font-size: clamp(14px, 2vw, 21px); font-weight: 700; text-shadow: 0 2px 0 rgba(0, 0, 0, .18); }
.tile .pbar { left: 18%; right: 18%; bottom: 10px; height: 8px; background: rgba(255, 255, 255, .35); }
.tile .pbar i { background: #fff; box-shadow: none; }
.tile .lk { top: 10px; right: 10px; width: 30px; height: 30px; padding: 5px; border-radius: 50%; background: rgba(0, 0, 0, .22); }
.tile .lk svg { width: 100%; height: 100%; display: block; }
.tile.locked { filter: saturate(.25) brightness(1.02); }
.t1 { --c: #ff8a3d; --cd: #d9661c; }
.t2 { --c: #2f9bff; --cd: #1a73d1; }
.t3 { --c: #ff5d8f; --cd: #d63b6c; }
.t4 { --c: #ffb400; --cd: #d18f00; }
.t5 { --c: #3ccb7f; --cd: #22a260; }
.t6 { --c: #ff6b5b; --cd: #d94a3b; }
.t7 { --c: #9b6bff; --cd: #7646d9; }
.t8 { --c: #18b5a4; --cd: #0e8c7f; }
.gametiles { width: min(640px, 94vw); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gametiles .tile { aspect-ratio: 1.25; }
.gametiles .art { width: 44%; }

.speech { border-radius: 24px; padding: 10px 20px; box-shadow: 0 6px 0 #c3d4f2; }
.herobig { filter: drop-shadow(0 18px 10px rgba(20, 60, 30, .18)); }
.herocol .herobig::after { content: ''; position: absolute; left: 12%; right: 12%; bottom: -6px; height: 16px; border-radius: 50%; background: rgba(20, 70, 40, .2); z-index: -1; }
.todaychip span { box-shadow: 0 4px 0 #c3d4f2; color: var(--ink); }
.nextcard { border-radius: 28px; background: linear-gradient(100deg, #fff 0 55%, #fff6dc 100%); box-shadow: 0 8px 0 #f0c45a, 0 14px 26px rgba(20, 50, 120, .16); }
.nc-go { background: linear-gradient(#ffd25e, var(--sun)); box-shadow: 0 5px 0 var(--sun-d); }
.reviewbtn { margin-top: 2px; }

/* ---------- Bola tanlash, qahramon tanlash ---------- */
.pickname { color: #fff; font-size: clamp(30px, 5.6vw, 52px); text-shadow: 3px 3px 0 var(--lapis-d), -3px 3px 0 var(--lapis-d), 3px -3px 0 var(--lapis-d), -3px -3px 0 var(--lapis-d), 0 4px 0 var(--lapis-d), 0 9px 0 rgba(20, 50, 120, .3); }
.kidcard { border-radius: 30px; box-shadow: 0 8px 0 #c3d4f2, 0 14px 24px rgba(20, 50, 120, .16); }
.kidcard.cur { border-color: var(--sun); }
.kidcard.add { background: rgba(255, 255, 255, .6); border-color: #fff; }
.pickcard { border-radius: 40px; background: linear-gradient(#fff, #f3f8ff); box-shadow: 0 10px 0 #c3d4f2, 0 18px 30px rgba(20, 50, 120, .18); }

/* ---------- Kirish ---------- */
.authwrap { justify-content: center; }
.authcard {
    position: relative;
    width: min(460px, 94vw);
    margin-top: 90px;
    padding: 84px 26px 22px;
    border-radius: 36px;
    background: #fff;
    box-shadow: 0 10px 0 #c3d4f2, 0 24px 40px rgba(20, 50, 120, .2);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
.authcard::before { content: ''; position: absolute; left: 26px; right: 26px; top: 0; height: 10px; border-radius: 0 0 8px 8px; background: repeating-linear-gradient(-55deg, var(--lapis) 0 12px, var(--sun) 12px 24px, var(--pom) 24px 36px, #fff 36px 40px); }
.authheroes { position: absolute; top: -96px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; pointer-events: none; }
.authheroes > div { width: 116px; height: 160px; }
.authtitle { line-height: 1; margin-top: 2px; }
.authtitle .sline { margin: 0 auto; }
.authsub { color: #5f6a8a; font-size: 16px; margin: -4px 0 6px; text-align: center; }
.abtn { width: 100%; border-radius: 20px; font-size: 18px; padding: 15px 20px; transition: transform .12s, box-shadow .12s; }
.abtn:active { transform: translateY(4px); }
.abtn .ab-ic { font-size: 24px; }
.abtn.t { color: #fff; background: linear-gradient(#5fdc96, var(--leaf)); box-shadow: 0 6px 0 var(--leaf-d); }
.abtn.g { color: var(--lapis-d); background: #fff; box-shadow: 0 6px 0 #c3d4f2, inset 0 0 0 2px #dbe6fa; }
.abtn.r { color: var(--lapis-d); background: #eef4ff; box-shadow: 0 6px 0 #c3d4f2; }
.authnote { font-size: 12.5px; color: #7a84a3; text-align: center; line-height: 1.45; margin-top: 4px; }

/* ---------- Harflar ro'yxati ---------- */
.cards { gap: 16px; padding: 8px 6px 24px; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); max-width: 1100px; width: 100%; margin: 0 auto; }
.lcard { border-radius: 16px 22px 22px 16px; box-shadow: 0 6px 0 #c3d4f2, 0 10px 18px rgba(20, 50, 120, .12); }
.lcard:active { transform: translateY(5px); box-shadow: 0 1px 0 #c3d4f2; }

/* ---------- Dars ---------- */
.stp { width: 56px; height: 56px; border-width: 4px; border-color: #dbe6fa; box-shadow: 0 5px 0 #c3d4f2; font-size: 24px; }
.stp.cur2 { border-color: var(--sun); box-shadow: 0 5px 0 #c3d4f2, 0 0 0 5px rgba(255, 200, 61, .35); }
.stp.done { border-color: var(--leaf); background: #eafbf1; }
.steps::before { background: repeating-linear-gradient(90deg, #fff 0 10px, transparent 10px 18px); opacity: .9; }
.padwrap { border-radius: 26px; background: var(--paper); box-shadow: 0 10px 0 #c3d4f2, 0 20px 34px rgba(20, 50, 120, .2); }
.padwrap::after { content: ''; position: absolute; left: 0; right: 0; top: 10px; height: 16px; pointer-events: none; background: radial-gradient(circle at 50% 50%, #c7d3ea 0 4px, #8e9bb8 4.5px 6px, transparent 6.5px) 0 0 / 38px 16px repeat-x; opacity: .9; }
.pic { box-shadow: 0 6px 0 #c3d4f2; border-radius: 24px; }
.heromini { filter: drop-shadow(0 12px 8px rgba(20, 60, 30, .16)); }
.opt { border-radius: 22px; box-shadow: 0 7px 0 #c3d4f2, 0 12px 20px rgba(20, 50, 120, .12); }
.opt.right { background: #eafbf1; box-shadow: 0 7px 0 var(--leaf); }
.opt.wrong { background: #ffe8ec; }

/* ---------- Mashq ekranlari: oq doska ---------- */
.center {
    flex: 1 1 auto;
    align-self: center;
    width: min(860px, 100%);
    margin: 4px auto 14px;
    padding: clamp(14px, 3vw, 30px);
    border-radius: 34px;
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 10px 0 #c3d4f2, 0 22px 36px rgba(20, 50, 120, .16);
}
.tile2 { border-radius: 20px; background: #fff; box-shadow: 0 7px 0 #c3d4f2, inset 0 0 0 2px #e3ebfa; }
.tile2:active { transform: translateY(5px); box-shadow: 0 2px 0 #c3d4f2; }
.slot { border-color: #b9cbf2; background: #f5f8ff; border-radius: 18px; }
.slot.fill { border-color: var(--leaf); background: #eafbf1; }
.grp { box-shadow: 0 5px 0 #c3d4f2; }
.bubfield { border-radius: 34px; background: rgba(255, 255, 255, .35); box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .6); margin-bottom: 14px; }
.shapebox { box-shadow: 0 7px 0 #c3d4f2; border-radius: 26px; }

/* ---------- Do'kon ---------- */
.shopL .herobig { filter: drop-shadow(0 18px 10px rgba(20, 60, 30, .2)); }
.shopR { background: rgba(255, 255, 255, .92); border-radius: 30px; padding: 16px; box-shadow: 0 10px 0 #c3d4f2, 0 22px 36px rgba(20, 50, 120, .14); margin-bottom: 12px; }
.cat { border-radius: 20px; box-shadow: 0 5px 0 #c3d4f2, inset 0 0 0 2px #e3ebfa; }
.cat.on { background: linear-gradient(#ffd25e, var(--sun)); box-shadow: 0 5px 0 var(--sun-d); }
.item { border-radius: 22px; box-shadow: 0 6px 0 #c3d4f2, inset 0 0 0 2px #eef3fc; }
.item.eq2 { outline: 0; box-shadow: 0 6px 0 var(--leaf-d), inset 0 0 0 4px var(--leaf); }
.price { background: #fff4cf; color: #7a5200; }

/* ---------- Ota-onalar kabineti ---------- */
.panel { border-radius: 26px; box-shadow: 0 8px 0 #c3d4f2, 0 16px 28px rgba(20, 50, 120, .12); }
.parent .topbar div[style] { color: #fff; text-shadow: 0 2px 0 var(--lapis-d); }

/* ---------- Oynalar ---------- */
#ov { background: rgba(24, 48, 110, .45); backdrop-filter: blur(6px); }
.modal { position: relative; border-radius: 34px; padding: 28px 24px 24px; box-shadow: 0 12px 0 #c3d4f2, 0 30px 60px rgba(10, 30, 80, .35); overflow: auto; }
.modal::before { content: ''; position: absolute; left: 28px; right: 28px; top: 0; height: 9px; border-radius: 0 0 8px 8px; background: repeating-linear-gradient(-55deg, var(--lapis) 0 12px, var(--sun) 12px 24px, var(--pom) 24px 36px, #fff 36px 40px); }
.modal h2 { color: var(--ink); }
.field { border: 3px solid #dbe6fa; border-radius: 16px; }
.field:focus { border-color: var(--lapis); }
.num button { border-radius: 16px; box-shadow: 0 4px 0 #c3d4f2; }

@media (max-width: 700px) {
    .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .homecol { width: min(94vw, 520px); }
    .tile { aspect-ratio: 1.15; }
    .tile .art { width: 46%; }
    .authcard { margin-top: 80px; }
    .authheroes > div { width: 96px; height: 132px; }
    .authheroes { top: -80px; }
    .ttl { font-size: 22px; }
}

@media (prefers-reduced-motion: reduce) {
    #scene .cl { animation: none; }
}

/* ---------- Joylashuvni aniqlashtirish ---------- */
@media (min-width: 701px) {
    .homebody { flex-wrap: nowrap; }
    .homecol { width: min(780px, calc(100vw - 360px), calc((100vh - 230px) * 1.75)); }
}
.center { flex: 0 1 auto; margin: auto; max-height: 100%; min-height: min(56vh, 460px); }
.shop { align-items: center; }
.shopR { flex: 0 1 560px; max-height: calc(100% - 12px); overflow: auto; }
.ibtn, .coinbox, .kidchip { flex: none; }
.lcard .daftar, .opt .daftar { flex: none; height: auto; }
@media (max-width: 700px) {
    .topbar { gap: 8px; padding-right: 70px; }
    .topbar .ibtn { width: 52px; height: 52px; border-radius: 18px; }
    .coinbox { font-size: 20px; padding: 5px 12px 5px 6px; }
    .coinbox .coin { width: 26px; height: 26px; }
    .gear { width: 52px; height: 52px; }
    .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
    .tools { flex-wrap: wrap; justify-content: center; gap: 10px; }
    .tools .ibtn.big { width: 58px; height: 58px; border-radius: 20px; }
    .padwrap { width: min(92vw, 48vh); }
    .shopL .herobig { height: 26vh !important; }
    .center { min-height: 0; margin: 8px auto; }
}

/* ---------- O'yinlar ---------- */
.memcard {
    width: clamp(64px, 15vw, 96px);
    aspect-ratio: .8;
    border: 0;
    border-radius: 18px;
    font-size: clamp(30px, 6vw, 44px);
    background: repeating-linear-gradient(-55deg, #2f6fe4 0 10px, #4f8af0 10px 20px);
    box-shadow: 0 6px 0 #1d4fb5, inset 0 0 0 4px rgba(255, 255, 255, .35);
    transition: transform .2s;
}
.memcard.up { background: #fff; box-shadow: 0 6px 0 #c3d4f2, inset 0 0 0 3px #e3ebfa; animation: flipin .25s ease; }
.memcard.match { background: #eafbf1; box-shadow: 0 6px 0 #22a260, inset 0 0 0 3px #3ccb7f; }
.memcard:active { transform: translateY(4px); }
@keyframes flipin { from { transform: rotateY(90deg); } to { transform: none; } }
#mazeGrid { background: #c3d4f2 !important; border-radius: 18px !important; box-shadow: 0 6px 0 #9fb5e0; }
#mazeGrid > div { border-radius: 6px; }

/* =====================================================================
   ALIFBO KITOBI: naqshli hoshiyali sahifalar, unli - qizil, undosh - ko'k
   ===================================================================== */
:root { --vow: #e8344e; --vow-l: #fff0f2; --con: #2459d6; --con-l: #eef3ff; --dig: #12a374; --dig-l: #eafbf3; --page: #fffdf6; }
.bookpage, .book, .center {
    border: 18px solid transparent;
    border-image: var(--ornament) 24 round;
    background: var(--page) padding-box;
    box-shadow: 0 14px 0 rgba(20, 50, 120, .16), 0 26px 40px rgba(20, 50, 120, .2);
    border-radius: 0;
}

/* ---------- Alifbo jadvali ---------- */
.bookpage { flex: 1; min-height: 0; width: min(1120px, 100%); margin: 2px auto 14px; display: flex; flex-direction: column; }
.alegend { display: flex; justify-content: center; gap: 18px; padding: 10px 10px 0; font-size: 15px; font-weight: 600; color: #5f6a8a; }
.alegend span::before { content: ''; display: inline-block; width: 14px; height: 14px; border-radius: 4px; margin-right: 7px; vertical-align: -2px; }
.alegend .v::before { background: var(--vow); }
.alegend .c::before { background: var(--con); }
.acards { flex: 1; min-height: 0; overflow: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 12px; padding: 12px 14px 18px; align-content: start; }
.acard {
    --ac: var(--con); --acl: var(--con-l);
    position: relative;
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 8px 6px 9px;
    border: 0; border-radius: 18px;
    background: #fff;
    box-shadow: 0 5px 0 #d9e2f3, inset 0 0 0 2px #eef2fa;
    transition: transform .12s, box-shadow .12s;
}
.acard.v { --ac: var(--vow); --acl: var(--vow-l); }
.acard.d { --ac: var(--dig); --acl: var(--dig-l); }
.acard:active { transform: translateY(4px); box-shadow: 0 1px 0 #d9e2f3; }
.ac-pr { font-size: clamp(34px, 5vw, 46px); font-weight: 700; line-height: 1.05; color: var(--ac); letter-spacing: .01em; }
.ac-wr { height: 30px; display: flex; align-items: center; }
.ac-wr .sline { height: 100%; width: auto; }
.ac-wr .sline g { stroke: var(--ac); }
.ac-pic { height: 40px; display: grid; place-items: center; }
.ac-pic .pic-emo { font-size: 32px; line-height: 1; }
.ac-pic .pic-svg { width: 38px; height: 38px; }
.acard .stars { margin-top: 2px; }
.acard::before { content: ''; position: absolute; left: 10px; right: 10px; top: 0; height: 5px; border-radius: 0 0 5px 5px; background: var(--ac); opacity: .85; }
.acard.full { background: var(--acl); box-shadow: 0 5px 0 #c9e9d6, inset 0 0 0 2px #cfeedd; }
.acard.full::after { content: '✓'; position: absolute; top: 6px; right: 9px; font-weight: 700; color: #1f9d55; }
.acard.next { box-shadow: 0 5px 0 #f0c45a, 0 0 0 4px var(--sun); animation: nextpulse 1.8s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .acard.next { animation: none; } }

/* ---------- Dars: ochiq kitob ---------- */
.lessonrow { gap: 14px; }
.book { display: flex; align-items: stretch; position: relative; padding: 0; }
.book::after { content: ''; position: absolute; top: 0; bottom: 0; left: var(--spine, 36%); width: 34px; margin-left: -17px; pointer-events: none; background: linear-gradient(90deg, transparent, rgba(60, 50, 20, .14) 45%, rgba(60, 50, 20, .2) 50%, rgba(60, 50, 20, .14) 55%, transparent); }
.pg { display: flex; align-items: center; justify-content: center; padding: 14px; }
.pg.pl { flex: none; width: clamp(200px, 22vw, 290px); }
.pg.pr { padding: 14px 16px; }
.book .padwrap { width: min(64vh, 46vw, 560px); box-shadow: 0 6px 0 #d9e2f3; border-radius: 18px; }
.book .cardgrid { width: min(64vh, 46vw, 560px); }
.apage { --ac: var(--con); --acl: var(--con-l); position: relative; width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; }
.apage.v { --ac: var(--vow); --acl: var(--vow-l); }
.apage.d { --ac: var(--dig); --acl: var(--dig-l); }
.ap-letter { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 18px 8px; border-radius: 22px; background: var(--acl); box-shadow: inset 0 0 0 3px var(--ac); }
.ap-pr { font-size: clamp(54px, 7vw, 84px); font-weight: 700; line-height: 1; color: var(--ac); }
.ap-wr .sline g { stroke: var(--ac); }
.ap-pic { width: clamp(72px, 9vw, 104px); aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; background: #fff; box-shadow: 0 5px 0 #e6dcc3, inset 0 0 0 3px #f3ead5; }
.ap-pic .pic-emo { font-size: clamp(44px, 5.6vw, 64px); line-height: 1; }
.ap-pic .pic-svg { width: 74%; height: 74%; }
.ap-word .sline { margin: 0 auto; }
.ap-syl { font-size: clamp(20px, 2.4vw, 26px); font-weight: 600; color: #4a5578; letter-spacing: .02em; }
.ap-syl b { color: var(--ac); font-weight: 700; }
.ap-syl i { font-style: normal; color: #b4bdd4; margin: 0 4px; }
.apage .heromini { position: absolute; right: -6px; bottom: -8px; height: 92px; pointer-events: none; }
.side { display: none; }
.stage { padding: 0; }

/* Mashq doskalari ham kitob sahifasi */
.center { border-radius: 0; background: var(--page) padding-box; padding: clamp(12px, 2.6vw, 26px); }

@media (max-width: 700px) {
    .bookpage, .book, .center { border-width: 12px; }
    .acards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 10px 8px 14px; }
    .ac-pr { font-size: 30px; }
    .ac-pic { height: 32px; } .ac-pic .pic-emo { font-size: 26px; }
    .lessonrow { flex-direction: column; }
    .book { flex-direction: column; }
    .book::after { display: none; }
    .pg.pl { width: 100%; padding: 8px 10px; border-bottom: 2px dashed #eadfc6; }
    .apage { flex-direction: row; flex-wrap: wrap; gap: 8px 12px; }
    .ap-letter { flex-direction: row; gap: 10px; padding: 6px 12px; }
    .ap-pr { font-size: 40px; }
    .ap-pic { width: 58px; } .ap-pic .pic-emo { font-size: 36px; }
    .ap-syl { width: 100%; font-size: 18px; }
    .apage .heromini { display: none; }
    .book .padwrap, .book .cardgrid { width: min(84vw, 44vh); }
    .pg.pr { padding: 8px; }
}

/* =====================================================================
   KIRISH EKRANI (login), MUSIQA VA KUNDUZ/TUN TUGMALARI
   ===================================================================== */
.authcard { gap: 10px; }
.authh { margin: 2px 0 2px; font-size: 24px; color: var(--ink); }
.authp { margin: -2px 0 4px; font-size: 15px; color: #5f6a8a; text-align: center; line-height: 1.45; }
.authcard .field { margin: 0; font-size: 18px; padding: 13px 16px; }
.autherr { min-height: 20px; color: #c62f45; font-size: 14px; text-align: center; }
.linkbtn { border: 0; background: none; color: var(--lapis); font-weight: 600; font-size: 15px; padding: 4px 8px; text-decoration: underline; text-underline-offset: 3px; }
.authsep { display: flex; align-items: center; gap: 10px; width: 100%; color: #9aa3bd; font-size: 13px; }
.authsep::before, .authsep::after { content: ''; flex: 1; height: 1px; background: #e3e8f4; }
.abtn:disabled { opacity: .6; }
.klform { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; align-items: center; margin-top: 6px; }
.klform .field { margin: 0; font-size: 16px; padding: 10px 12px; }
@media (max-width: 700px) { .klform { grid-template-columns: 1fr; } }

.ibtn.tog { width: 50px; height: 50px; border-radius: 16px; }
.ibtn.tog .ico-svg { width: 56%; height: 56%; }
.ibtn.tog.off { color: #9aa3bd; }

/* ---------- Tungi rejim ---------- */
#scene .night, #scene .lights { display: none; }
html[data-theme="night"] body { background: #14214a; }
html[data-theme="night"] #scene .night, html[data-theme="night"] #scene .lights { display: inline; }
html[data-theme="night"] #scene .sun { display: none; }
html[data-theme="night"] #scene .clouds { opacity: .08; }
html[data-theme="night"] #scene .land { filter: brightness(.42) saturate(.75) hue-rotate(12deg); }
html[data-theme="night"] #scene .st1 { animation: twinkle 3.2s ease-in-out infinite; }
html[data-theme="night"] #scene .st2 { animation: twinkle 4.4s ease-in-out infinite 1s; }
@keyframes twinkle { 50% { opacity: .3; } }
html[data-theme="night"] #app { filter: brightness(.9) saturate(.95); }
html[data-theme="night"] .speech, html[data-theme="night"] .todaychip span { box-shadow: 0 5px 0 #0b1538; }
html[data-theme="night"] .ttl, html[data-theme="night"] .pickname { text-shadow: 2px 2px 0 #0b1538, -2px 2px 0 #0b1538, 2px -2px 0 #0b1538, -2px -2px 0 #0b1538, 0 4px 0 #0b1538, 0 8px 12px rgba(0, 0, 0, .4); }
html[data-theme="night"] .tile { box-shadow: 0 9px 0 var(--cd), 0 14px 22px rgba(0, 0, 0, .35), inset 0 -6px 0 rgba(0, 0, 0, .06); }
html[data-theme="night"] #ov { background: rgba(5, 10, 30, .6); }
@media (prefers-reduced-motion: reduce) { html[data-theme="night"] #scene .st1, html[data-theme="night"] #scene .st2 { animation: none; } }
@media (max-width: 700px) { .ibtn.tog { width: 44px; height: 44px; border-radius: 14px; } }

/* ---------- ☰ Yon panel ---------- */
#drawer { position: fixed; inset: 0; z-index: 75; pointer-events: none; }
#drawer.on { pointer-events: auto; }
.dr-back { position: absolute; inset: 0; background: rgba(24, 48, 110, .38); backdrop-filter: blur(3px); opacity: 0; transition: opacity .28s; }
#drawer.on .dr-back { opacity: 1; }
.dr-panel {
    position: absolute; top: 0; right: 0; bottom: 0; width: min(360px, 88vw);
    display: flex; flex-direction: column; gap: 8px; padding: 0 16px 22px; overflow-y: auto; overscroll-behavior: contain;
    background: var(--paper, #fffefb); color: var(--ink);
    border-radius: 28px 0 0 28px; box-shadow: -12px 0 40px rgba(20, 40, 100, .25);
    transform: translateX(104%); transition: transform .3s cubic-bezier(.2, .8, .25, 1);
    padding-top: env(safe-area-inset-top); padding-bottom: max(22px, env(safe-area-inset-bottom));
}
#drawer.on .dr-panel { transform: none; }
.dr-panel::before { content: ''; position: absolute; left: 22px; right: 22px; top: 0; height: 8px; border-radius: 0 0 8px 8px; background: repeating-linear-gradient(-55deg, var(--lapis) 0 12px, var(--sun) 12px 24px, var(--pom) 24px 36px, #fff 36px 40px); }
.dr-head { display: flex; align-items: center; justify-content: space-between; padding: 22px 2px 6px; }
.dr-logo { font-family: var(--script); font-weight: 700; font-size: 26px; color: var(--lapis); }
.dr-x { width: 42px; height: 42px; border: 0; border-radius: 14px; background: #eef3ff; color: var(--lapis); font-size: 18px; font-weight: 700; cursor: pointer; }
.dr-parent, .dr-kid, .dr-row {
    display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; border: 0; cursor: pointer;
    font: inherit; color: inherit; border-radius: 20px; padding: 10px 12px; background: #fff;
    box-shadow: 0 4px 0 #dbe5f7; transition: transform .12s, box-shadow .12s;
}
.dr-parent:active, .dr-kid:active, .dr-row:active { transform: translateY(3px); box-shadow: 0 1px 0 #dbe5f7; }
.dr-parent { color: #fff; padding: 14px; background: linear-gradient(135deg, #4a86f0, var(--lapis)); box-shadow: 0 5px 0 var(--lapis-d), 0 10px 22px rgba(30, 80, 190, .25); }
.dr-parent:active { box-shadow: 0 1px 0 var(--lapis-d); }
.dr-ppic { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 16px; background: rgba(255, 255, 255, .2); font-size: 28px; flex: none; }
.dr-t { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.dr-t b { font-size: 18px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dr-t small { font-size: 13px; opacity: .7; margin-top: 2px; }
.dr-arr { font-size: 30px; line-height: 1; opacity: .85; }
.dr-sec { margin: 12px 4px 0; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #7a86a8; }
.dr-kids { display: flex; flex-direction: column; gap: 8px; }
.dr-kid .kface { flex: none; }
.dr-kid.cur { background: #eef3ff; box-shadow: 0 4px 0 #c3d4f2, inset 0 0 0 2px var(--lapis); }
.dr-kid em { font-style: normal; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--lapis); color: #fff; font-size: 15px; font-weight: 700; flex: none; }
.dr-kid.add { background: transparent; box-shadow: none; border: 2px dashed #c3d4f2; }
.dr-kid.add .kface { background: #eef3ff; color: var(--lapis); }
.dr-note { margin: 2px 4px; font-size: 13px; color: #6b7593; }
.dr-row .ico-svg { width: 26px; height: 26px; color: var(--lapis); flex: none; }
.dr-row > span:not(.dr-sw) { flex: 1; font-size: 17px; font-weight: 600; }
.dr-sw { position: relative; width: 50px; height: 30px; border-radius: 15px; background: #d4dbea; transition: background .2s; flex: none; }
.dr-sw i { position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, .2); transition: transform .2s; }
.dr-sw.on { background: var(--leaf); }
.dr-sw.on i { transform: translateX(20px); }
.gear .ico-svg { stroke-width: 2.6; }
html[data-theme="night"] .dr-back { background: rgba(5, 10, 30, .55); }
html[data-theme="night"] .dr-panel { filter: brightness(.95); }
@media (prefers-reduced-motion: reduce) { .dr-panel, .dr-back { transition: none; } }
.dr-ppic .ico-svg { width: 32px; height: 32px; color: #fff; }
.topbar .kidchip { flex: 0 1 auto; min-width: 48px; }
@media (max-width: 480px) { .kidchip em { display: none; } .kidchip { padding-right: 12px; gap: 6px; font-size: 17px; } .topbar { gap: 6px; padding-right: 64px; } .coinbox { padding-right: 10px; } }
.kcmodal .kcface { display: flex; justify-content: center; }
.kcmodal .kcface .kface { box-shadow: 0 0 0 5px #fff, 0 0 0 8px #c3d4f2; }

/* ---------- Vazifalar: mukofot va jarima ---------- */
.toast {
    position: fixed; left: 50%; top: 18px; z-index: 90; transform: translate(-50%, -140%);
    max-width: min(92vw, 460px); padding: 12px 20px; border-radius: 20px;
    background: linear-gradient(#5fdc96, var(--leaf)); color: #fff; font-weight: 700; font-size: 18px; text-align: center;
    box-shadow: 0 6px 0 var(--leaf-d), 0 14px 30px rgba(20, 120, 60, .3); transition: transform .35s cubic-bezier(.2, .9, .3, 1.3); pointer-events: none;
}
.toast.on { transform: translate(-50%, 0); }
.todaychip .tchip {
    border: 0; font: inherit; font-weight: 700; font-size: inherit; cursor: pointer; color: var(--ink);
    background: #fff; border-radius: 999px; padding: 6px 14px; box-shadow: 0 4px 0 #c3d4f2;
}
.todaychip .tchip:active { transform: translateY(3px); box-shadow: 0 1px 0 #c3d4f2; }
.todaychip .tchip.all { background: #e9fbf1; color: #15803d; box-shadow: 0 4px 0 #a7e9c4; }
html[data-theme="night"] .todaychip .tchip { box-shadow: 0 5px 0 #0b1538; }
.mytasks, .tasknews { max-width: 460px; width: 100%; }
.mytask { display: flex; align-items: center; gap: 12px; text-align: left; padding: 10px 12px; margin: 8px 0; border-radius: 18px; background: #f4f7ff; }
.mytask.ok { background: #e9fbf1; }
.mt-i { font-size: 28px; flex: none; }
.mt-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.mt-t b { font-size: 17px; line-height: 1.25; }
.mt-t small { font-size: 13px; opacity: .65; }
.mt-bar { display: block; height: 8px; border-radius: 4px; background: #dfe7f7; overflow: hidden; }
.mt-bar i { display: block; height: 100%; border-radius: 4px; background: var(--leaf); }
.mt-c { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-size: 16px; flex: none; }
.mt-c .pos, .tn.pos b { color: #15803d; }
.mt-c .neg, .tn.neg b { color: #dc2626; }
.mt-note { font-size: 13px; opacity: .65; margin: 6px 0 12px; }
.tnhero { width: 130px; margin: 0 auto; }
.tnlist { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.tn { display: flex; align-items: center; gap: 10px; text-align: left; padding: 9px 12px; border-radius: 16px; background: #e9fbf1; }
.tn.neg { background: #fff0f2; }
.tn-i { font-size: 20px; flex: none; }
.tn-t { flex: 1; min-width: 0; font-size: 15px; display: flex; flex-direction: column; }
.tn-t small { font-size: 12px; opacity: .6; }
.tn b { font-size: 17px; flex: none; }
.tntotal { font-size: 16px; margin: 4px 0 12px; }
/* kabinet */
.tkpanel .rowset small.tkc { opacity: .6; font-weight: 600; white-space: nowrap; }
.tkpanel .rowset .tkok { color: #15803d; }
.tkpanel .rowset.dis { opacity: .45; }
.tkhint { display: block; font-size: 12.5px; opacity: .6; font-weight: 400; }
.tksub { margin: 14px 0 6px; font-weight: 700; font-size: 15px; display: flex; align-items: baseline; gap: 10px; }
.tknow { font-weight: 600; font-size: 14px; opacity: .7; }
.tkempty { opacity: .6; font-size: 14px; padding: 4px 0; }
.tkedit { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 12px; margin: 6px 0; border-radius: 16px; background: #f6f8fd; border: 1px solid #e4eaf6; }
.tkedit .tkname { flex: 1 1 220px; min-width: 0; font-weight: 600; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tkedit input.tkname { margin: 0; font-size: 15px; padding: 8px 10px; }
.tkedit select { font: inherit; font-size: 14px; padding: 5px 6px; border-radius: 10px; border: 1px solid #cfd8ea; background: #fff; }
.tkamt { display: flex; gap: 10px; font-size: 13px; }
.tkamt label { display: flex; align-items: center; gap: 4px; opacity: .85; }
.tkamt label.dis { opacity: .4; }
.wds { display: flex; gap: 3px; }
.wd { width: 30px; height: 28px; border-radius: 9px; border: 1px solid #cfd8ea; background: #fff; color: #7a86a8; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; padding: 0; }
.wd.on { background: var(--lapis); border-color: var(--lapis); color: #fff; }
.tkdel { width: 36px; height: 36px; padding: 0; min-width: 0; font-size: 15px; }
.tkadd { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.btn.sm { font-size: 14px; padding: 7px 12px; min-height: 0; border-radius: 12px; }
.tknote { font-size: 13px; opacity: .65; margin-top: 10px; line-height: 1.45; }
.mnform { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.mnform .field { flex: 1 1 220px; margin: 0; font-size: 15px; padding: 9px 12px; }
.mnform select { font: inherit; font-size: 15px; padding: 8px; border-radius: 12px; border: 1px solid #cfd8ea; background: #fff; }
.mnform .btn { font-size: 15px; padding: 9px 14px; }
.ledger { display: flex; flex-direction: column; border-radius: 14px; overflow: hidden; border: 1px solid #e4eaf6; }
.ledg { display: grid; grid-template-columns: 62px 1fr auto 104px; align-items: center; gap: 8px; padding: 7px 12px; font-size: 14px; border-top: 1px solid #eef2fa; background: #fff; }
.ledg:first-child { border-top: 0; }
.ledg .ld { opacity: .6; font-size: 13px; }
.ledg .lr { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ledg b { font-size: 15px; text-align: right; }
.ledg.pos b { color: #15803d; }
.ledg.neg b { color: #dc2626; }
.ledg.und .lr, .ledg.und b { text-decoration: line-through; opacity: .5; }
.ledg .linkbtn, .ledg small { justify-self: end; font-size: 12.5px; opacity: .75; }
@media (max-width: 560px) {
    .ledg { grid-template-columns: 52px 1fr auto; }
    .ledg .linkbtn, .ledg small { grid-column: 2 / 4; justify-self: start; margin-top: -4px; }
    .tkamt { width: 100%; }
}
.todaychip { flex-wrap: wrap; justify-content: center; }
.todaychip span { white-space: nowrap; }
.todaychip .tchip { white-space: nowrap; flex-basis: auto; }
@media (min-width: 701px) { .todaychip .tchip { order: -1; flex: 1 1 100%; max-width: 240px; } }
.mytasks .mytask, .tasknews .tnlist, .tasknews .tn { width: 100%; box-sizing: border-box; align-self: stretch; }
/* xato javob jarimasi */
.flyminus { position: fixed; z-index: 95; pointer-events: none; font-weight: 800; font-size: 26px; color: #e11d48; white-space: nowrap;
    text-shadow: 0 2px 0 #fff, 2px 0 0 #fff, -2px 0 0 #fff, 0 -2px 0 #fff, 0 6px 14px rgba(160, 20, 40, .3); }
.coinbox.lose { animation: coinlose .6s; }
@keyframes coinlose { 0%, 100% { transform: none; } 20% { transform: translateX(-5px); background: #ffe4e8; } 40% { transform: translateX(5px); background: #ffe4e8; } 60% { transform: translateX(-3px); } 80% { transform: translateX(3px); } }
.coinbox.lose b { color: #e11d48; }
.wrset { display: flex; gap: 6px; flex: none; }
.wrset select { font: inherit; font-size: 14px; padding: 5px 6px; border-radius: 10px; border: 1px solid #cfd8ea; background: #fff; }
.tkpanel .rowset .tkbad { color: #dc2626; }
.mytask.wrongrow { background: #fff4f5; }
@media (prefers-reduced-motion: reduce) { .coinbox.lose { animation: none; } }
.penrules { margin: 10px 0 4px; padding: 10px 14px; border-radius: 14px; background: #f3f6fd; border: 1px solid #e1e8f6; font-size: 14px; line-height: 1.45; }
.penrules > span { display: block; opacity: .75; font-size: 13px; margin-top: 2px; }
.tkfine { font-size: 13px; opacity: .6; align-self: center; white-space: nowrap; }

/* =====================================================================
   MAVZU: «ASAL» — iliq asal-sariq, karamel va shokolad ranglari.
   Qavariq dumaloq tugmalar, krem kartalar, sariq «lenta» sarlavhalar,
   pastki menyu va sarguzasht xaritasi. (Oldingi qatlamlar ustidan yoziladi.)
   ===================================================================== */
:root {
    --honey: #ffc93c; --honey-l: #ffe08a; --amber: #f5a623; --caramel: #d9822b;
    --cocoa: #7a3e12; --cocoa-d: #5a2c0b; --cocoa-s: #8a4b14; --edge: #b8660f;
    --cream: #fff8e7; --cream-2: #fff1d0; --sand: #f0d9a8; --sand-d: #e2b865;
    --ink: #4a2810; --lapis: #c8701a; --lapis-d: #8a4b14; --p: #c8701a; --page: #fff8e7;
    --honeybg: radial-gradient(circle at 35% 28%, var(--honey-hi) 0 14%, var(--honey-m) 42%, var(--amber) 100%);
    --honey-hi: #fff3bf; --honey-m: #ffd75e; --honey-l2: #ffe8a3;
}
body { color: var(--ink); }

/* ---------- Tugmalar: dumaloq, qavariq, asal rangli ---------- */
.ibtn, .gear {
    width: 54px; height: 54px; border-radius: 50%;
    color: var(--cocoa-d); background: var(--honeybg); border: 3px solid var(--cocoa);
    box-shadow: inset 0 -4px 0 rgba(160, 80, 0, .32), 0 5px 0 var(--cocoa-s), 0 9px 14px rgba(90, 44, 11, .22);
}
.ibtn:active, .gear:active { transform: translateY(4px); box-shadow: inset 0 -2px 0 rgba(160, 80, 0, .32), 0 1px 0 var(--cocoa-s); }
.ibtn .ico-svg { width: 52%; height: 52%; }
.ibtn.big { width: 66px; height: 66px; border-radius: 50%; }
.ibtn.back, .ibtn.i-play { color: var(--cocoa-d); background: var(--honeybg); box-shadow: inset 0 -4px 0 rgba(160, 80, 0, .32), 0 5px 0 var(--cocoa-s), 0 9px 14px rgba(90, 44, 11, .22); }
.ibtn.back:active, .ibtn.i-play:active { box-shadow: 0 1px 0 var(--cocoa-s); }
.ibtn.ok { color: #fff; background: radial-gradient(circle at 35% 28%, #b8f5cf 0 12%, #4fd88a 45%, #22a260); box-shadow: inset 0 -4px 0 rgba(0, 80, 30, .3), 0 5px 0 var(--cocoa-s); }
.ibtn.no { color: #fff; background: radial-gradient(circle at 35% 28%, #ffd0d8 0 12%, #ff6b80 45%, #d93b52); box-shadow: inset 0 -4px 0 rgba(120, 0, 20, .3), 0 5px 0 var(--cocoa-s); }
.ibtn.tog { width: 50px; height: 50px; border-radius: 50%; }
.ibtn.tog.off { color: #a77b4a; background: radial-gradient(circle at 35% 28%, #fffaf0, #f3e2bd); }
.gear .ico-svg { width: 26px; height: 26px; }

.btn {
    color: var(--cocoa-d); font-weight: 700; border: 3px solid var(--cocoa); border-radius: 999px;
    background: linear-gradient(var(--honey-l), var(--honey) 45%, var(--amber)); box-shadow: inset 0 -3px 0 rgba(160, 80, 0, .25), 0 5px 0 var(--cocoa-s);
}
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--cocoa-s); }
.btn.alt { color: var(--cocoa); background: var(--cream); border-color: var(--sand-d); box-shadow: 0 5px 0 var(--sand-d); }
.btn.alt:active { box-shadow: 0 1px 0 var(--sand-d); }
.btn.red { color: #fff; background: linear-gradient(#ff8a9b, #ff5d73 50%, #e0435a); border-color: #8f1d2c; box-shadow: 0 5px 0 #8f1d2c; }
.linkbtn { color: var(--caramel); }

/* ---------- Yuqori panel: lenta sarlavha, krem chiplar ---------- */
.topbar { padding-right: 68px; }
.ttl {
    color: var(--cocoa-d); text-shadow: none; font-size: clamp(17px, 2.3vw, 22px);
    background: linear-gradient(var(--honey-l2), var(--honey)); border: 3px solid var(--cocoa); border-radius: 999px;
    padding: 3px 20px 4px; box-shadow: inset 0 -3px 0 rgba(160, 80, 0, .2), 0 4px 0 var(--edge);
}
html[data-theme="night"] .ttl { text-shadow: none; }
.coinbox { color: var(--cocoa-d); background: var(--cream); border: 3px solid var(--cocoa); border-radius: 999px; box-shadow: 0 4px 0 var(--edge); }
.kidchip { color: var(--cocoa-d); background: var(--cream); border: 3px solid var(--cocoa); box-shadow: 0 4px 0 var(--edge); }
.kidchip.still { background: rgba(255, 248, 231, .85); box-shadow: 0 4px 0 var(--edge); }
.kface { box-shadow: 0 0 0 2px var(--cocoa); }
.hello {
    display: flex; align-items: center; gap: 10px; min-width: 0; padding: 4px 16px 4px 4px; text-align: left;
    font: inherit; color: var(--cocoa-d); background: var(--cream); border: 3px solid var(--cocoa); border-radius: 999px; box-shadow: 0 4px 0 var(--edge);
}
.hl-t { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.hl-t b { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hl-t small { font-size: 12.5px; color: var(--caramel); font-weight: 600; }
.speech { color: var(--cocoa-d); background: var(--cream); border: 3px solid var(--cocoa); box-shadow: 0 5px 0 var(--edge); }
.speech::after { border-top-color: var(--cocoa) !important; }
.todaychip span, .todaychip .tchip { color: var(--cocoa-d); background: var(--cream); border: 2.5px solid var(--cocoa); box-shadow: 0 3px 0 var(--edge); }
.todaychip .tchip.all { background: #e9fbf1; color: #15803d; border-color: #15803d; box-shadow: 0 3px 0 #15803d; }
.pickname { text-shadow: 3px 3px 0 var(--cocoa), -3px 3px 0 var(--cocoa), 3px -3px 0 var(--cocoa), -3px -3px 0 var(--cocoa), 0 4px 0 var(--cocoa), 0 9px 0 rgba(90, 44, 11, .3); }

/* ---------- Bosh sahifa: sarguzasht xaritasi ---------- */
.home2.screen { padding-bottom: 0; }
.homebody2 { flex: 1; min-height: 0; display: flex; gap: clamp(16px, 3vw, 44px); justify-content: center; align-items: stretch; }
.homebody2 .herocol { width: min(300px, 30vw); justify-content: center; padding-bottom: 96px; }
.mapcol { position: relative; flex: 0 1 520px; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.mapwrap {
    flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none;
    border: 4px solid var(--cocoa); border-bottom: 0; border-radius: 34px 34px 0 0; background: #74cc55;
    box-shadow: 0 0 0 6px rgba(255, 248, 231, .75), 0 18px 40px rgba(60, 30, 5, .25);
}
.mapwrap::-webkit-scrollbar { display: none; }
.map { position: relative; width: 100%; margin-bottom: 92px; }
.mapsvg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.mnode {
    position: absolute; z-index: 1; transform: translate(-50%, -50%); width: 60px; height: 60px; padding: 0; border-radius: 50%;
    display: grid; place-items: center; cursor: pointer; border: 4px solid var(--cocoa); font: 700 22px/1 'Fredoka', 'Nunito', sans-serif;
    background: radial-gradient(circle at 35% 28%, var(--honey-hi) 0 14%, var(--honey-m) 45%, var(--amber));
    box-shadow: inset 0 -5px 0 rgba(160, 80, 0, .28), 0 6px 0 var(--cocoa-s), 0 10px 16px rgba(60, 30, 5, .28);
    transition: transform .15s;
}
.mnode:active { transform: translate(-50%, -46%); }
.mnode.part { background: radial-gradient(circle at 35% 28%, #fff 0 18%, #ffe9b0); }
.mnode.todo { border-color: #b9853f; background: radial-gradient(circle at 35% 28%, #fff 0 20%, #fff1d0); box-shadow: inset 0 -5px 0 rgba(160, 110, 40, .14), 0 6px 0 #b9853f, 0 10px 14px rgba(60, 30, 5, .18); }
.mnode.cur { z-index: 3; width: 78px; height: 78px; font-size: 27px; background: radial-gradient(circle at 35% 28%, #fff 0 16%, var(--honey-l) 55%, var(--honey)); animation: nodepulse 1.8s ease-in-out infinite; }
.mnode.cur::after { content: ''; position: absolute; inset: -13px; border-radius: 50%; border: 4px dashed var(--cream); animation: spin 12s linear infinite; pointer-events: none; }
@keyframes nodepulse { 50% { transform: translate(-50%, -50%) scale(1.07); } }
.mn-l { text-shadow: 0 2px 0 #fff; letter-spacing: -.02em; }
.mnode.v .mn-l { color: var(--vow); } .mnode.c .mn-l { color: var(--con); } .mnode.d .mn-l { color: var(--dig); }
.mnode.todo .mn-l { opacity: .75; }
.mn-s { position: absolute; left: 50%; bottom: -13px; transform: translateX(-50%); display: flex; gap: 1px; }
.mn-s i { width: 15px; height: 15px; background: #e9d8b4; clip-path: polygon(50% 0, 63% 35%, 100% 38%, 72% 61%, 81% 100%, 50% 79%, 19% 100%, 28% 61%, 0 38%, 37% 35%); }
.mn-s i.on { background: #ffb300; filter: drop-shadow(0 1px 0 var(--cocoa)); }
.mnode.todo .mn-s { display: none; }
.mhero { position: absolute; z-index: 2; width: 60px; height: 82px; transform: translate(-50%, -70%); pointer-events: none; filter: drop-shadow(0 6px 4px rgba(40, 20, 0, .3)); animation: bob 2.4s ease-in-out infinite; }
.mhero svg { width: 100%; height: 100%; }
.mchest { position: absolute; z-index: 1; transform: translate(-50%, -50%); width: 54px; height: 48px; padding: 0; border: 0; background: none; cursor: pointer; filter: drop-shadow(0 4px 0 rgba(90, 44, 11, .3)); animation: wiggle 4s ease-in-out infinite; }
.mchest svg { width: 100%; height: 100%; }
@keyframes wiggle { 0%, 86%, 100% { transform: translate(-50%, -50%) rotate(0); } 90% { transform: translate(-50%, -50%) rotate(-8deg); } 95% { transform: translate(-50%, -50%) rotate(7deg); } }
.mapme { position: absolute; right: 14px; bottom: calc(104px + env(safe-area-inset-bottom)); z-index: 4; width: 48px; height: 48px; border-radius: 50%; font-size: 22px; border: 3px solid var(--cocoa); background: var(--cream); box-shadow: 0 4px 0 var(--edge); cursor: pointer; }
@media (max-width: 700px) {
    .homebody2 { flex-direction: column; gap: 8px; }
    .homebody2 .herocol { display: contents; }
    .homebody2 .speech, .homebody2 .herobig { display: none; }
    .homebody2 .todaychip { order: -1; width: 100%; justify-content: center; flex-wrap: nowrap; font-size: 14px; gap: 6px; }
    .homebody2 .todaychip span, .homebody2 .todaychip .tchip { padding: 4px 10px; }
    .mapcol { flex: 1; width: 100%; }
    .mapwrap { border-radius: 30px 30px 0 0; }
    .mnode { width: 56px; height: 56px; font-size: 20px; }
    .mnode.cur { width: 72px; height: 72px; font-size: 25px; }
    .hometop .hello { flex: 1 1 auto; max-width: 52vw; }
}

/* ---------- Pastki menyu ---------- */
.kidnav {
    position: fixed; z-index: 50; left: 50%; bottom: calc(12px + env(safe-area-inset-bottom)); transform: translateX(-50%);
    width: min(520px, calc(100vw - 24px)); display: flex; gap: 4px; padding: 6px;
    background: linear-gradient(var(--honey-m), var(--honey) 40%, var(--amber)); border: 3px solid var(--cocoa); border-radius: 999px;
    box-shadow: inset 0 -4px 0 rgba(160, 80, 0, .25), 0 6px 0 var(--cocoa-s), 0 16px 28px rgba(60, 30, 5, .3);
}
.kidnav[hidden] { display: none; }
.nv { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 6px 2px 5px; border: 0; border-radius: 999px; background: none; color: var(--cocoa-d); font: 600 11.5px/1.1 'Fredoka', 'Nunito', sans-serif; cursor: pointer; }
.nv .ico-svg { width: 24px; height: 24px; }
.nv.on { color: var(--honey-l); background: var(--cocoa); box-shadow: inset 0 3px 0 rgba(0, 0, 0, .28); }
.nv:not(.on):active { background: rgba(255, 255, 255, .35); }
body.hasnav .screen { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
body.hasnav .home2.screen { padding-bottom: 0; }
html[data-theme="night"] .kidnav { filter: brightness(.92); }

/* ---------- Darslar va o'yinlar: sariq kartalar ---------- */
.learn { flex: 1; min-height: 0; overflow-y: auto; width: min(780px, 100%); margin: 0 auto; display: flex; flex-direction: column; gap: 16px; padding: 4px 2px 14px; scrollbar-width: thin; }
.lbanner {
    display: flex; align-items: center; gap: 14px; padding: 12px 16px; text-align: left; font: inherit; color: var(--cocoa-d); cursor: pointer;
    border: 4px solid var(--cocoa); border-radius: 28px; background: linear-gradient(115deg, var(--cream) 0 42%, var(--honey-l));
    box-shadow: 0 7px 0 var(--edge), 0 14px 24px rgba(60, 30, 5, .18);
}
.lbanner:active { transform: translateY(5px); box-shadow: 0 2px 0 var(--edge); }
.lb-art { width: clamp(90px, 18vw, 130px); flex: none; }
.lb-art svg { width: 100%; height: auto; display: block; }
.lb-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.lb-t small { font-size: 13px; font-weight: 600; color: var(--caramel); }
.lb-t b { font-size: clamp(18px, 2.6vw, 24px); }
.lb-bar, .yc-bar, .co-bar { display: block; height: 11px; border-radius: 8px; overflow: hidden; background: #f3e2bd; border: 2.5px solid var(--cocoa); }
.lb-bar i, .yc-bar i, .co-bar i { display: block; height: 100%; background: linear-gradient(90deg, #4fd88a, #22a260); }
.lb-go { width: 54px; height: 54px; flex: none; display: grid; place-items: center; font-size: 20px; border-radius: 50%; color: var(--cocoa-d); background: var(--honeybg); border: 3px solid var(--cocoa); box-shadow: 0 4px 0 var(--cocoa-s); }
.ygrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 18px; }
.ygrid.games { width: min(640px, 100%); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ycard {
    position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 10px 14px; cursor: pointer;
    font: inherit; color: var(--cocoa-d); border: 4px solid var(--cocoa); border-radius: 28px;
    background: linear-gradient(var(--honey-m), var(--honey) 45%, var(--amber));
    box-shadow: inset 0 -6px 0 rgba(160, 80, 0, .22), inset 0 4px 0 rgba(255, 255, 255, .35), 0 7px 0 var(--cocoa-s), 0 14px 22px rgba(60, 30, 5, .22);
    transition: transform .12s, box-shadow .12s;
}
.ycard:active { transform: translateY(6px); box-shadow: inset 0 -6px 0 rgba(160, 80, 0, .22), 0 1px 0 var(--cocoa-s); }
.yc-t { font-size: clamp(16px, 2vw, 19px); font-weight: 700; padding: 1px 16px 2px; border-radius: 999px; background: var(--cream); border: 3px solid var(--cocoa); box-shadow: 0 3px 0 var(--edge); white-space: nowrap; }
.yc-art { width: 86%; aspect-ratio: 1.2; display: grid; place-items: center; border-radius: 22px; background: radial-gradient(circle at 50% 40%, #fffaf0, #fff1d0); border: 3px solid rgba(122, 62, 18, .4); }
.yc-art svg { width: 84%; height: auto; display: block; }
.yc-s { font-size: 13px; font-weight: 600; color: var(--cocoa); }
.yc-bar { width: 80%; }
.ycard.locked { filter: saturate(.35) brightness(1.03); }
.yc-lock { position: absolute; top: 8px; right: 10px; font-style: normal; font-size: 18px; }
@media (max-width: 700px) { .ygrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } .ycard { border-radius: 24px; } .lbanner { padding: 10px 12px; gap: 10px; } }

/* ---------- Natijalarim ---------- */
.progress { flex: 1; min-height: 0; overflow-y: auto; width: min(820px, 100%); margin: 0 auto; display: grid; gap: 16px; align-content: start; padding: 4px 2px 14px; }
@media (min-width: 860px) { .progress { grid-template-columns: 280px 1fr; } .progress > .pcard:last-child { grid-column: 1 / -1; } }
.pcard { background: var(--cream); color: var(--ink); border: 4px solid var(--cocoa); border-radius: 28px; padding: 16px 18px; box-shadow: 0 7px 0 var(--edge), 0 14px 24px rgba(60, 30, 5, .16); min-width: 0; }
.pcard.me { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; background: linear-gradient(var(--cream), #ffe9b0); }
.me-face { padding: 6px; border-radius: 50%; background: var(--honeybg); border: 4px solid var(--cocoa); box-shadow: 0 5px 0 var(--cocoa-s); }
.me-face .kface { box-shadow: 0 0 0 3px var(--cream); }
.me-name { font-size: 26px; color: var(--cocoa-d); }
.me-lvl { font-weight: 700; color: var(--cocoa-d); padding: 2px 14px; border-radius: 999px; background: linear-gradient(var(--honey-l2), var(--honey)); border: 3px solid var(--cocoa); }
.me-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 4px; }
.me-row span { font-size: 14px; font-weight: 600; color: var(--cocoa-d); padding: 3px 10px; border-radius: 999px; background: #fff; border: 2px solid var(--sand-d); }
.pc-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.pc-h b { font-size: 19px; color: var(--cocoa-d); }
.seg { display: inline-flex; padding: 3px; border-radius: 999px; background: #f3e2bd; border: 3px solid var(--cocoa); }
.seg button { border: 0; background: none; font: 600 14px 'Fredoka', 'Nunito', sans-serif; color: var(--cocoa); padding: 4px 14px; border-radius: 999px; cursor: pointer; }
.seg button.on { color: var(--cocoa-d); background: linear-gradient(var(--honey-l), var(--honey)); box-shadow: 0 2px 0 var(--cocoa-s); }
.pstats { display: flex; gap: 12px; margin-bottom: 14px; }
.pstats div { flex: 1; display: flex; align-items: baseline; gap: 8px; padding: 8px 14px; border-radius: 20px; background: #fff; border: 3px solid #ecd29a; }
.pstats b { font-size: clamp(30px, 5vw, 40px); color: var(--cocoa-d); line-height: 1.05; }
.pstats span { font-size: 15px; font-weight: 600; color: var(--caramel); }
.pbars { height: 180px; display: flex; align-items: flex-end; gap: 10px; padding: 0 2px; }
.pbars.m { gap: 3px; }
.pb { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 3px; }
.pb i { display: block; width: 100%; max-width: 34px; border: 3px solid var(--cocoa); border-radius: 12px 12px 6px 6px; background: linear-gradient(var(--honey-m), var(--amber)); }
.pb.b i { background: linear-gradient(#e89a45, #b8601a); }
.pbars.m .pb i { border-width: 2px; border-radius: 5px 5px 2px 2px; }
.pb.today i { box-shadow: 0 0 0 3px var(--cream), 0 0 0 6px #4fd88a; }
.pb small { min-height: 15px; font-size: 12px; font-weight: 600; color: var(--cocoa); }
.pb-v { min-height: 14px; font-size: 11.5px; font-weight: 700; color: var(--cocoa-d); }
.course { display: flex; align-items: center; gap: 12px; margin-top: 10px; padding: 10px 12px; border-radius: 22px; border: 3px solid var(--cocoa); box-shadow: 0 5px 0 rgba(90, 44, 11, .4); }
.course.c1 { background: linear-gradient(110deg, var(--honey-l2), var(--honey)); }
.course.c2 { background: linear-gradient(110deg, #e2d6ff, #a98bff); }
.course.c3 { background: linear-gradient(110deg, #ffe0ea, #ff9fbe); }
.co-art { width: 72px; flex: none; padding: 4px; border-radius: 16px; background: var(--cream); border: 2.5px solid var(--cocoa); }
.co-art svg { width: 100%; height: auto; display: block; }
.co-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.co-t b { font-size: 17px; color: var(--cocoa-d); }
.co-t small { font-size: 13px; font-weight: 600; color: var(--cocoa); }
.co-go { flex: none; font: 700 14px 'Fredoka', 'Nunito', sans-serif; color: var(--cocoa-d); padding: 7px 14px; border-radius: 999px; background: var(--cream); border: 3px solid var(--cocoa); box-shadow: 0 3px 0 var(--cocoa-s); cursor: pointer; }
.co-go:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--cocoa-s); }
@media (max-width: 420px) { .co-go { padding: 6px 10px; font-size: 13px; } .co-art { width: 58px; } }

/* ---------- Kartalar, oynalar, maydonlar: krem ---------- */
#ov { background: rgba(60, 30, 5, .42); }
.modal { color: var(--ink); background: var(--cream); border: 4px solid var(--cocoa); box-shadow: 0 10px 0 var(--edge), 0 30px 60px rgba(60, 30, 5, .35); }
.modal::before, .authcard::before, .dr-panel::before { background: repeating-linear-gradient(-55deg, var(--caramel) 0 12px, var(--honey) 12px 24px, var(--cocoa) 24px 36px, var(--cream) 36px 40px); }
.modal h2 { color: var(--cocoa-d); }
.field { color: var(--ink); background: #fffdf6; border: 3px solid #ecd29a; border-radius: 18px; }
.field:focus { border-color: var(--caramel); outline: none; box-shadow: 0 0 0 4px rgba(255, 201, 60, .35); }
.num button { background: #fffdf6; border: 2px solid #ecd29a; box-shadow: 0 4px 0 var(--sand-d); color: var(--cocoa-d); }
.panel { background: #fffdf6; border: 3px solid var(--sand); box-shadow: 0 6px 0 #e2c48a, 0 14px 24px rgba(60, 30, 5, .1); }
.parent .topbar div[style] { color: #fff; text-shadow: 0 2px 0 var(--cocoa), 2px 0 0 var(--cocoa), -2px 0 0 var(--cocoa), 0 -2px 0 var(--cocoa); }

/* Kirish oynasi */
.authcard { background: var(--cream); border: 4px solid var(--cocoa); box-shadow: 0 10px 0 var(--edge), 0 24px 40px rgba(60, 30, 5, .22); }
.authh { color: var(--cocoa-d); }
.authp, .authsub, .authnote { color: #8a6a48; }
.authsep { color: #b39370; }
.authsep::before, .authsep::after { background: #ecd29a; }
.abtn.t { color: var(--cocoa-d); border: 3px solid var(--cocoa); background: linear-gradient(var(--honey-l), var(--honey) 45%, var(--amber)); box-shadow: inset 0 -3px 0 rgba(160, 80, 0, .25), 0 6px 0 var(--cocoa-s); }
.abtn.g, .abtn.r { color: var(--cocoa); background: #fffdf6; border: 3px solid var(--sand-d); box-shadow: 0 6px 0 var(--sand-d); }
.authtitle .sline g { stroke: var(--caramel); }

/* Bola va qahramon tanlash */
.kidcard, .pickcard { background: var(--cream); border: 4px solid var(--cocoa); box-shadow: 0 8px 0 var(--edge), 0 16px 26px rgba(60, 30, 5, .18); }
.kidcard.cur { border-color: var(--caramel); box-shadow: 0 8px 0 var(--edge), 0 0 0 5px rgba(255, 201, 60, .6); }

/* Alifbo, dars va mashqlar */
.acard { border-color: var(--sand); box-shadow: 0 5px 0 var(--sand-d), 0 10px 16px rgba(60, 30, 5, .1); }
.stp { background: var(--cream); border-color: var(--sand-d); box-shadow: 0 5px 0 var(--edge); }
.stp.cur2 { border-color: var(--cocoa); background: linear-gradient(var(--honey-l2), var(--honey)); box-shadow: 0 5px 0 var(--edge), 0 0 0 5px rgba(255, 201, 60, .4); }
.stp.done { border-color: #22a260; background: #eafbf1; }
.padwrap { background: #fffdf6; box-shadow: 0 6px 0 var(--sand-d); }
.book .padwrap { box-shadow: 0 6px 0 #ecd29a; }
.opt { background: #fffdf6; border: 3px solid var(--sand); box-shadow: 0 6px 0 var(--sand-d), 0 10px 18px rgba(60, 30, 5, .1); }
.opt.right { background: #eafbf1; border-color: #22a260; box-shadow: 0 6px 0 #22a260; }
.opt.wrong { background: #ffe8ec; border-color: #e0435a; }
.tile2 { background: #fffdf6; border: 3px solid var(--sand); box-shadow: 0 6px 0 var(--sand-d); }
.tile2:active { box-shadow: 0 2px 0 var(--sand-d); }
.slot { border-color: var(--sand-d); background: #fffaf0; }
.pic, .grp, .shapebox { box-shadow: 0 6px 0 var(--sand-d); }
.alegend { color: var(--cocoa); }

/* Do'kon */
.shopR { background: var(--cream); border: 4px solid var(--cocoa); box-shadow: 0 8px 0 var(--edge), 0 18px 30px rgba(60, 30, 5, .16); }
.cat { background: #fffdf6; border: 3px solid var(--sand); box-shadow: 0 4px 0 var(--sand-d); }
.cat.on { background: var(--honeybg); border-color: var(--cocoa); box-shadow: 0 4px 0 var(--cocoa-s); }
.item { background: #fffdf6; border: 3px solid var(--sand); box-shadow: 0 5px 0 var(--sand-d); }
.price { color: var(--cocoa-d); background: linear-gradient(var(--honey-l2), var(--honey)); }

/* O'yinlar */
.memcard { background: repeating-linear-gradient(-55deg, var(--amber) 0 10px, var(--honey) 10px 20px); box-shadow: 0 6px 0 var(--cocoa-s), inset 0 0 0 3px var(--cocoa); }
.memcard.up { background: #fffdf6; box-shadow: 0 6px 0 var(--sand-d), inset 0 0 0 3px var(--sand); }
#mazeGrid { background: #f3e2bd !important; box-shadow: 0 6px 0 var(--sand-d); }

/* Yon panel */
.dr-panel { background: var(--cream); }
.dr-logo { color: var(--caramel); }
.dr-x { color: var(--cocoa); background: var(--cream-2); }
.dr-parent { color: var(--cocoa-d); background: linear-gradient(135deg, var(--honey-l), var(--amber)); border: 3px solid var(--cocoa); box-shadow: 0 5px 0 var(--cocoa-s), 0 10px 22px rgba(90, 44, 11, .2); }
.dr-parent:active { box-shadow: 0 1px 0 var(--cocoa-s); }
.dr-ppic { background: rgba(255, 255, 255, .55); }
.dr-ppic .ico-svg { color: var(--cocoa-d); }
.dr-kid, .dr-row { box-shadow: 0 4px 0 #ecd29a; }
.dr-kid.cur { background: var(--cream-2); box-shadow: 0 4px 0 var(--sand-d), inset 0 0 0 2px var(--caramel); }
.dr-kid em { background: var(--caramel); }
.dr-kid.add { border-color: var(--sand-d); }
.dr-kid.add .kface { color: var(--caramel); background: var(--cream-2); }
.dr-row .ico-svg { color: var(--caramel); }
.dr-sec { color: #a77b4a; }
.toast { color: var(--cocoa-d); background: linear-gradient(var(--honey-l), var(--honey)); border: 3px solid var(--cocoa); box-shadow: 0 5px 0 var(--cocoa-s), 0 14px 30px rgba(90, 44, 11, .3); }
.mytask { background: #fffdf6; border: 2px solid #f3e2bd; }
.mytask.ok { background: #e9fbf1; border-color: #bfe9cf; }
/* Telefon: yuqori panel siqilmasin */
@media (max-width: 700px) {
    .topbar:has(.ttl) .kidchip { display: none; }
    .ttl { padding: 3px 14px 4px; }
}
@media (max-width: 440px) { .hometop [data-a="toggleTheme"] { display: none; } }
.hl-t small { order: -1; }
/* Kirish: maydonlarda ikonka */
.authcard .field { padding-left: 46px; background: #fffdf6 no-repeat 15px center / 20px 20px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b9853f' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21a8 8 0 0 1 16 0'/%3E%3C/svg%3E"); }
.authcard .field[type="password"] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b9853f' stroke-width='2.2' stroke-linecap='round'%3E%3Crect x='5' y='10.5' width='14' height='10' rx='2.5'/%3E%3Cpath d='M8.5 10.5V8a3.5 3.5 0 0 1 7 0v2.5'/%3E%3C/svg%3E"); }
.authcard #fgCode { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b9853f' stroke-width='2.2' stroke-linecap='round'%3E%3Crect x='3' y='6' width='18' height='13' rx='3'/%3E%3Cpath d='M7 12.5h.01M12 12.5h.01M17 12.5h.01'/%3E%3C/svg%3E"); }
.hl-t small { white-space: nowrap; }
@media (max-width: 440px) {
    .topbar { gap: 6px; padding-right: 58px; }
    .topbar .ibtn, .topbar .ibtn.tog { width: 46px; height: 46px; }
    .gear { width: 46px; height: 46px; top: 12px; right: 12px; }
    .coinbox { font-size: 18px; padding: 3px 10px 3px 5px; }
    .coinbox .coin { width: 24px; height: 24px; }
    .ttl { font-size: 16px; padding: 3px 12px 4px; }
}
/* Rasmlar: hajm va tiniqlik */
.yc-art svg, .lb-art svg, .co-art svg { filter: drop-shadow(0 4px 0 rgba(90, 44, 11, .22)); }
.ycard::before { content: ''; position: absolute; left: 14px; right: 14px; top: 6px; height: 16px; border-radius: 999px; background: linear-gradient(rgba(255, 255, 255, .55), rgba(255, 255, 255, 0)); pointer-events: none; }
.mnode::before { content: ''; position: absolute; left: 18%; top: 9%; width: 44%; height: 26%; border-radius: 50%; background: rgba(255, 255, 255, .6); pointer-events: none; }
.mnode.todo::before { opacity: .7; }
.mapwrap { background: #2fa7e2; }
.kidnav::before { content: ''; position: absolute; left: 24px; right: 24px; top: 4px; height: 12px; border-radius: 999px; background: linear-gradient(rgba(255, 255, 255, .5), rgba(255, 255, 255, 0)); pointer-events: none; }
.kidnav { position: fixed; }
.nv { position: relative; z-index: 1; }

/* ---------- 3D rasmlar (Fluent Emoji 3D) ---------- */
img.e3 { display: inline-block; object-fit: contain; -webkit-user-drag: none; user-select: none; }
img.e3t { width: 1.3em; height: 1.3em; vertical-align: -.28em; }
.e3f { font-family: 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', sans-serif; }
.yc-art img.e3 { width: 66%; height: auto; filter: drop-shadow(0 6px 4px rgba(90, 44, 11, .28)); }
.ycard:hover .yc-art img.e3 { transform: scale(1.06) rotate(-3deg); transition: transform .2s; }
.lb-art img.e3 { width: 82%; height: auto; display: block; margin: 0 auto; filter: drop-shadow(0 6px 4px rgba(90, 44, 11, .25)); }
.co-art img.e3 { width: 100%; height: auto; display: block; }
.coin.e3 { object-fit: contain; filter: drop-shadow(0 2px 0 rgba(90, 44, 11, .25)); }
.mdeco { position: absolute; z-index: 0; height: auto; transform: translate(-50%, -88%); pointer-events: none; filter: drop-shadow(0 7px 3px rgba(30, 90, 20, .35)); }
.mchest img.e3 { width: 100%; height: 100%; }
.mchest { width: 52px; height: 52px; }
.ap-pic img.e3t, .pic-emo img.e3t { filter: drop-shadow(0 5px 3px rgba(60, 30, 5, .2)); }
.mt-i img.e3t, .tn-i img.e3t { width: 1.15em; height: 1.15em; }
@media (min-width: 900px) { .mapcol { flex-basis: 620px; } }

/* =====================================================================
   1.4: xarita menyu ustida tugaydi, keng ekranda o'ng ustun, fonlar
   ===================================================================== */
body.hasnav .home2 .homebody2 { padding-bottom: calc(94px + env(safe-area-inset-bottom)); }
.homebody2 .herocol { padding-bottom: 0; }
.mapwrap { border: 4px solid var(--cocoa); border-radius: 34px; }
.map { margin-bottom: 0; }
.mapme { bottom: 14px; }
.sidecol { display: none; }
@media (max-width: 700px) {
    .mapwrap { border-radius: 28px; }
    body.hasnav .home2 .homebody2 { padding-bottom: calc(86px + env(safe-area-inset-bottom)); }
}
@media (min-width: 1180px) {
    .homebody2 { gap: clamp(20px, 2.4vw, 40px); }
    .mapcol { flex: 0 1 600px; }
    .sidecol { display: flex; flex-direction: column; gap: 16px; width: clamp(300px, 22vw, 360px); flex: none; min-height: 0; overflow-y: auto; padding: 4px 4px 10px; scrollbar-width: none; justify-content: center; }
    .homebody2 .herocol { width: clamp(240px, 20vw, 300px); }
}
@media (min-width: 1180px) and (max-height: 760px) { .sidecol { justify-content: flex-start; } }
.sd-card {
    display: flex; width: 100%; padding: 14px 16px; text-align: left; font: inherit; color: var(--cocoa-d); cursor: pointer;
    background: var(--cream); border: 3px solid var(--cocoa); border-radius: 26px; box-shadow: 0 6px 0 var(--edge), 0 12px 22px rgba(60, 30, 5, .18);
    transition: transform .12s, box-shadow .12s;
}
.sd-card:active { transform: translateY(5px); box-shadow: 0 1px 0 var(--edge); }
.sd-lesson { align-items: center; gap: 12px; }
.sd-lesson .lb-t b { font-size: 19px; }
.sd-lesson .lb-t small:last-child { font-size: 12px; color: var(--cocoa); opacity: .8; }
.sd-lesson .lb-go { width: 46px; height: 46px; font-size: 17px; }
.sd-art { width: 64px; flex: none; }
.sd-art img.e3 { width: 100%; height: auto; display: block; filter: drop-shadow(0 5px 3px rgba(90, 44, 11, .25)); }
.sd-tasks { flex-direction: column; gap: 7px; }
.sd-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 2px; }
.sd-h b { font-size: 16.5px; }
.sd-h small { font-weight: 700; font-size: 13px; padding: 2px 10px; border-radius: 999px; background: #fff1d0; border: 2px solid var(--cocoa); }
.sd-h small.all { background: #e9fbf1; color: #15803d; border-color: #15803d; }
.sd-task { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 14px; background: #fff6e0; border: 2px solid rgba(122, 62, 18, .18); }
.sd-task.ok { background: #e9fbf1; border-color: rgba(21, 128, 61, .3); }
.sd-ti { width: 22px; flex: none; text-align: center; }
.sd-ti img.e3t { width: 1.15em; height: 1.15em; }
.sd-tt { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; font-size: 14.5px; }
.sd-task b { font-size: 13.5px; color: #15803d; }
.sd-task.ok .sd-tt { text-decoration: line-through; opacity: .7; }
.sd-more { font-size: 12.5px; color: var(--cocoa); opacity: .8; text-align: center; }
.sd-quick { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.sd-q {
    display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px 9px; cursor: pointer;
    font: 700 16px/1.1 'Fredoka', 'Nunito', sans-serif; color: var(--cocoa-d); border: 3px solid var(--cocoa); border-radius: 22px;
    background: linear-gradient(var(--honey-m), var(--honey) 45%, var(--amber));
    box-shadow: inset 0 -5px 0 rgba(160, 80, 0, .22), inset 0 3px 0 rgba(255, 255, 255, .35), 0 6px 0 var(--cocoa-s), 0 12px 18px rgba(60, 30, 5, .2);
    transition: transform .12s, box-shadow .12s;
}
.sd-q:active { transform: translateY(5px); box-shadow: inset 0 -5px 0 rgba(160, 80, 0, .22), 0 1px 0 var(--cocoa-s); }
.sd-qa { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 18px; background: radial-gradient(circle at 50% 40%, #fffaf0, #fff1d0); border: 2.5px solid rgba(122, 62, 18, .4); }
.sd-qa img.e3 { width: 44px; height: 44px; filter: drop-shadow(0 4px 3px rgba(90, 44, 11, .25)); }
.sd-q:hover .sd-qa img.e3, .sd-card:hover .sd-art img.e3 { transform: scale(1.07) rotate(-3deg); transition: transform .2s; }

/* ---------- Fon tanlash oynasi ---------- */
.modal.scenes { width: min(560px, 94vw); max-width: none; }
.scgrid { width: 100%; }
.scgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.sctile { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 6px 6px 8px; border: 3px solid rgba(122, 62, 18, .3); border-radius: 22px; background: #fffaf0; cursor: pointer; font: 700 15px/1.1 'Fredoka', 'Nunito', sans-serif; color: var(--cocoa-d); transition: transform .12s; }
.sctile:active { transform: scale(.96); }
.sctile.on { border-color: var(--cocoa); background: #ffe9a8; box-shadow: 0 4px 0 var(--edge); }
.sc-pv { position: relative; width: 100%; aspect-ratio: 1.45; border-radius: 16px; overflow: hidden; display: grid; place-items: center; border: 2px solid rgba(90, 44, 11, .25); }
.sc-ic img.e3 { width: 46px; height: 46px; filter: drop-shadow(0 4px 3px rgba(0, 0, 0, .25)); }
.sctile.on .sc-pv::after { content: '✓'; position: absolute; top: 5px; right: 6px; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: #22a260; color: #fff; font-size: 15px; border: 2px solid #fff; }
@media (max-width: 420px) { .scgrid { gap: 8px; } .sc-ic img.e3 { width: 36px; height: 36px; } .sctile { font-size: 13.5px; } }
.dr-scene { margin-left: auto; display: flex; align-items: center; gap: 6px; font-style: normal; font-size: 14px; font-weight: 600; opacity: .85; }
.dr-scene i { width: 22px; height: 22px; border-radius: 7px; border: 2px solid rgba(90, 44, 11, .35); }
.dr-row .dr-arr { margin-left: 4px; }

/* ---------- Fonlar: osmon, tepaliklar va yog'ayotgan narsalar ---------- */
#scene .space { display: none; }
#scene .sun, #scene .moon, #scene .skyline, #scene .trees, #scene .flw { transition: opacity .6s; }
#sfx { position: absolute; inset: 0; overflow: hidden; }
#sfx i { position: absolute; top: -40px; display: block; width: calc(14px * var(--s)); height: calc(14px * var(--s)); animation: fall var(--d) linear infinite; will-change: transform; }
@keyframes fall { 0% { transform: translate(0, 0) rotate(0); } 50% { transform: translate(var(--w), 55vh) rotate(200deg); } 100% { transform: translate(0, 112vh) rotate(400deg); } }
@media (prefers-reduced-motion: reduce) { #sfx { display: none; } }

/* Tong */
html[data-scene="tong"] #skyG .k1 { stop-color: #ff9fb0; } html[data-scene="tong"] #skyG .k2 { stop-color: #ffd2bd; } html[data-scene="tong"] #skyG .k3 { stop-color: #fff1dc; }
html[data-scene="tong"] #scene .sun { transform: translate(-1040px, 470px); }
html[data-scene="tong"] #sunG .u2, html[data-scene="tong"] #sunG .u3 { stop-color: #ffb36b; }
html[data-scene="tong"] #scene .sun circle:last-child { fill: #ffc27a; }
html[data-scene="tong"] #scene .clouds { fill: #fff3f0; }
html[data-scene="tong"] #scene .land { filter: saturate(.9) sepia(.12); }
/* Shom */
html[data-scene="shom"] #skyG .k1 { stop-color: #4b2a7a; } html[data-scene="shom"] #skyG .k2 { stop-color: #e9668a; } html[data-scene="shom"] #skyG .k3 { stop-color: #ffb36b; }
html[data-scene="shom"] #scene .sun { transform: translate(-260px, 520px); }
html[data-scene="shom"] #sunG .u1 { stop-color: #ffe0a8; } html[data-scene="shom"] #sunG .u2, html[data-scene="shom"] #sunG .u3 { stop-color: #ff7a45; }
html[data-scene="shom"] #scene .sun circle:last-child { fill: #ff8a4c; }
html[data-scene="shom"] #scene .clouds { fill: #ffc3c8; opacity: .8; }
html[data-scene="shom"] #scene .land { filter: brightness(.72) saturate(.9) hue-rotate(-12deg); }
html[data-scene="shom"] #scene .lights { display: inline; }
html[data-scene="shom"] body { background: #6b3584; }
/* Qish */
html[data-scene="qish"] #skyG .k1 { stop-color: #8fc8ee; } html[data-scene="qish"] #skyG .k2 { stop-color: #dcefff; } html[data-scene="qish"] #skyG .k3 { stop-color: #f4fbff; }
html[data-scene="qish"] #sunG .u2 { stop-color: #fff4c2; } html[data-scene="qish"] #scene .sun circle:last-child { fill: #fff0a8; }
html[data-scene="qish"] #hillFar .f1 { stop-color: #f4f9ff; } html[data-scene="qish"] #hillFar .f2 { stop-color: #e3eef9; }
html[data-scene="qish"] #hillNear .n1 { stop-color: #ffffff; } html[data-scene="qish"] #hillNear .n2 { stop-color: #e6effa; }
html[data-scene="qish"] #scene .h3 { fill: #d6e6f5; }
html[data-scene="qish"] #scene .trees { fill: #2f7d6a; }
html[data-scene="qish"] #scene .flw { opacity: 0; }
html[data-scene="qish"] #scene .skyline { filter: brightness(1.08) saturate(.7); }
html[data-scene="qish"] #sfx i { border-radius: 50%; background: #fff; box-shadow: 0 0 6px rgba(255, 255, 255, .9); opacity: .9; }
html[data-scene="qish"] body { background: #dcefff; }
/* Bahor */
html[data-scene="bahor"] #skyG .k1 { stop-color: #6fc8ff; } html[data-scene="bahor"] #skyG .k2 { stop-color: #d6f0ff; } html[data-scene="bahor"] #skyG .k3 { stop-color: #fff0f6; }
html[data-scene="bahor"] #hillFar .f1 { stop-color: #c4f1a6; } html[data-scene="bahor"] #hillFar .f2 { stop-color: #a8e48c; }
html[data-scene="bahor"] #hillNear .n1 { stop-color: #8fe07a; } html[data-scene="bahor"] #hillNear .n2 { stop-color: #62c95c; }
html[data-scene="bahor"] #scene .h3 { fill: #4fbf55; }
html[data-scene="bahor"] #scene .trees { fill: #ffb3cf; }
html[data-scene="bahor"] #sfx i { background: #ffb7d0; border-radius: 150% 0 150% 0; opacity: .9; box-shadow: inset -2px -2px 0 rgba(230, 90, 140, .35); }
/* Kuz */
html[data-scene="kuz"] #skyG .k1 { stop-color: #f2a95a; } html[data-scene="kuz"] #skyG .k2 { stop-color: #fde0b0; } html[data-scene="kuz"] #skyG .k3 { stop-color: #fff4e0; }
html[data-scene="kuz"] #sunG .u2 { stop-color: #ffc44d; }
html[data-scene="kuz"] #hillFar .f1 { stop-color: #efc47a; } html[data-scene="kuz"] #hillFar .f2 { stop-color: #e2ab5a; }
html[data-scene="kuz"] #hillNear .n1 { stop-color: #d99442; } html[data-scene="kuz"] #hillNear .n2 { stop-color: #c27a2c; }
html[data-scene="kuz"] #scene .h3 { fill: #a9622a; }
html[data-scene="kuz"] #scene .trees { fill: #e0702a; }
html[data-scene="kuz"] #scene .flw { opacity: .4; }
html[data-scene="kuz"] #sfx i:nth-child(3n) { background: #e8692c; } html[data-scene="kuz"] #sfx i:nth-child(3n+1) { background: #f2b230; } html[data-scene="kuz"] #sfx i:nth-child(3n+2) { background: #c4481f; }
html[data-scene="kuz"] #sfx i { border-radius: 0 100% 0 100%; width: calc(18px * var(--s)); height: calc(14px * var(--s)); }
html[data-scene="kuz"] body { background: #fde0b0; }
/* Koinot */
html[data-scene="koinot"] #nightG .g1 { stop-color: #12062e; } html[data-scene="koinot"] #nightG .g2 { stop-color: #33166b; } html[data-scene="koinot"] #nightG .g3 { stop-color: #5a2a8a; }
html[data-scene="koinot"] #scene .moon { display: none; }
html[data-scene="koinot"] #scene .space { display: inline; }
html[data-scene="koinot"] #scene .clouds { opacity: 0; }
html[data-scene="koinot"] #scene .skyline, html[data-scene="koinot"] #scene .trees, html[data-scene="koinot"] #scene .trunks, html[data-scene="koinot"] #scene .flw { opacity: 0; }
html[data-scene="koinot"] #scene .lights { display: none; }
html[data-scene="koinot"] #scene .land { filter: none; }
html[data-scene="koinot"] #hillFar .f1 { stop-color: #6a4bb0; } html[data-scene="koinot"] #hillFar .f2 { stop-color: #553a98; }
html[data-scene="koinot"] #hillNear .n1 { stop-color: #4a3290; } html[data-scene="koinot"] #hillNear .n2 { stop-color: #3a2578; }
html[data-scene="koinot"] #scene .h3 { fill: #2c1a5e; }
html[data-scene="koinot"] body { background: #12062e; }
html[data-scene="koinot"] #scene .st3 { animation: twinkle 5s ease-in-out infinite 2s; }
@media (min-width: 1180px) and (max-height: 840px) {
    .sidecol { gap: 12px; }
    .sd-card { padding: 10px 14px; border-radius: 22px; }
    .sd-art { width: 52px; }
    .sd-task { padding: 4px 9px; }
    .sd-quick { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
    .sd-q { font-size: 13px; padding: 7px 2px 6px; border-radius: 18px; }
    .sd-qa { width: 44px; height: 44px; border-radius: 14px; }
    .sd-qa img.e3 { width: 34px; height: 34px; }
}
@media (min-width: 1180px) { .homebody2 .herocol .tchip { display: none; } }

/* Shablonsiz yozishda xato: yozuv qizarib, o'chib ketadi */
#pad.wipe { pointer-events: none; animation: padwipe .95s ease-in forwards; }
@keyframes padwipe { 0% { opacity: 1; filter: none; } 35% { opacity: 1; filter: sepia(1) saturate(6) hue-rotate(-50deg); } 100% { opacity: 0; filter: sepia(1) saturate(6) hue-rotate(-50deg) blur(2px); transform: scale(.97); } }

/* O'yinlar: kichikroq kartalar - kompyuterda 4 tasi bir qatorda */
.ygrid.games { width: min(1000px, 100%); grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; margin: auto; }
.ygrid.games .ycard { padding: 8px 8px 10px; gap: 5px; border-radius: 24px; }
.ygrid.games .yc-t { font-size: 16px; padding: 1px 12px 2px; }
.ygrid.games .yc-art { width: 88%; aspect-ratio: 1.1; border-radius: 18px; }
.ygrid.games .yc-art { overflow: hidden; }
.ygrid.games .yc-art img.e3 { width: 62%; height: auto; max-height: 82%; object-fit: contain; }
.ygrid.games .yc-s { font-size: 12.5px; }
@media (max-width: 760px) {
    .ygrid.games { width: min(440px, 100%); grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .ygrid.games .yc-art { aspect-ratio: 1.3; }
    .ygrid.games .yc-art img.e3 { width: 50%; }
}

/* Mukofot yozuvi: +5 🪙 (xato bo'lsa kamroq va to'q sariq) */
.flyplus { position: fixed; z-index: 95; pointer-events: none; font-weight: 800; font-size: 30px; color: #16a34a; white-space: nowrap;
    text-shadow: 0 2px 0 #fff, 2px 0 0 #fff, -2px 0 0 #fff, 0 -2px 0 #fff, 0 6px 14px rgba(20, 100, 40, .3); }
.flyplus.less { color: #d97706; }

/* Darslar: o'yinlar sahifasidek ixcham kartalar - hammasi bitta ekranga sig'adi */
.learn { width: min(860px, 100%); gap: 14px; }
.learn .lbanner { padding: 8px 14px; gap: 12px; border-radius: 24px; flex: none; }
.learn .lb-art { width: clamp(52px, 8vw, 70px); }
.learn .lb-art img.e3 { width: 100%; height: auto; }
.learn .lb-t b { font-size: clamp(17px, 2.2vw, 21px); }
.learn .lb-go { width: 46px; height: 46px; font-size: 17px; }
.learn .ygrid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.learn .ycard { padding: 8px 8px 10px; gap: 5px; border-radius: 24px; min-width: 0; }
.learn .yc-t { font-size: 16px; padding: 1px 12px 2px; }
.learn .yc-art { width: 88%; aspect-ratio: 1.25; border-radius: 18px; overflow: hidden; }
.learn .yc-art img.e3 { width: 54%; height: auto; max-height: 80%; object-fit: contain; }
.learn .yc-s { font-size: 12.5px; }
.learn .yc-bar { height: 9px; }
.learn .yc-lock { font-size: 15px; top: 6px; right: 8px; }
@media (max-width: 700px) {
    .learn .ygrid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
    .learn .ycard { padding: 6px 4px 8px; border-radius: 20px; border-width: 3px; }
    .learn .yc-t { font-size: 13px; padding: 1px 8px 2px; border-width: 2.5px; }
    .learn .yc-art { width: 90%; aspect-ratio: 1.2; border-radius: 14px; }
    .learn .yc-art img.e3 { width: 58%; }
    .learn .yc-s { font-size: 11px; text-align: center; line-height: 1.15; }
}

/* Pufaklar: harflar va raqamlar tartib bilan */
.bubhead { display: flex; flex-direction: column; align-items: center; line-height: 1.1; color: var(--cocoa-d); background: var(--cream); border: 3px solid var(--cocoa); border-radius: 999px; padding: 4px 22px 5px; box-shadow: 0 4px 0 var(--edge); width: fit-content; margin: 0 auto; }
.bh-st { font-size: 12.5px; font-weight: 600; color: var(--caramel); }
.bh-t { font-size: 18px; font-weight: 700; }
.bh-t b { display: inline-block; min-width: 1.4em; margin-left: 4px; padding: 0 8px; border-radius: 10px; background: var(--honeybg); border: 2.5px solid var(--cocoa); color: var(--cocoa-d); text-align: center; }
.bubtrack { display: flex; gap: 5px; overflow-x: auto; scrollbar-width: none; padding: 4px 6px 8px; margin: 0 auto 8px; max-width: 100%; flex: none; }
.bubtrack::-webkit-scrollbar { display: none; }
.bubtrack span { flex: none; min-width: 32px; height: 32px; padding: 0 5px; display: grid; place-items: center; border-radius: 10px; font: 700 15px/1 'Fredoka', 'Nunito', sans-serif; color: rgba(90, 44, 11, .45); background: rgba(255, 248, 231, .7); border: 2px solid rgba(122, 62, 18, .25); }
.bubtrack span.ok { color: #fff; background: #22a260; border-color: #15803d; }
.bubtrack span.cur { color: var(--cocoa-d); background: var(--honeybg); border-color: var(--cocoa); transform: scale(1.15); box-shadow: 0 3px 0 var(--edge); }
.bubble2 { cursor: pointer; padding: 0; display: grid; place-items: center; touch-action: none; }
.bubble2 .bl { font: 700 40px/1 'Fredoka', 'Nunito', sans-serif; color: #5a2c0b; text-shadow: 0 2px 0 rgba(255, 255, 255, .85); pointer-events: none; user-select: none; }
.bubble2.no .bl { animation: shake .45s; color: #dc2626; }
.bubble2.gone { pointer-events: none; }
.bubble2.gone .bl, .bubble2.gone { opacity: 0; transition: opacity .25s; }
.bubble2.gone .bl { transform: scale(1.6); transition: transform .25s, opacity .25s; }
@media (max-width: 700px) { .bubhead { padding: 3px 12px 4px; } .bh-st { font-size: 10.5px; white-space: nowrap; } .bh-t { font-size: 15px; } .bubtrack span { min-width: 26px; height: 26px; font-size: 13px; border-radius: 8px; } }

/* ---------- Skaner tuzatishlari (1.5) ---------- */
@media (max-width: 700px) {
    /* Do'kon: qahramon tepada, buyumlar pastda o'zi aylanadi - menyu ostida qolmaydi */
    .shop { flex-direction: column; flex-wrap: nowrap; overflow: hidden; gap: 8px; }
    .shopL { flex: none; }
    .shopL .herobig { height: 20vh !important; }
    .shopR { flex: 1 1 auto; min-height: 0; max-height: none; overflow: auto; margin-bottom: 0; }
    /* Qahramon tanlash: ikkala karta yonma-yon, ekranga sig'adi */
    .pick { flex-wrap: nowrap; gap: 12px; }
    .pickcard { height: auto; width: calc(50vw - 26px); max-width: 220px; padding: 10px 12px; border-radius: 28px; }
    /* Dars tugmalari bitta qatorda */
    .tools { flex-wrap: nowrap; gap: 8px; }
    .tools .ibtn.big { width: min(58px, calc((100vw - 64px) / 6)); height: min(58px, calc((100vw - 64px) / 6)); }
}
@media (max-width: 700px) and (max-height: 720px) { .book .padwrap, .padwrap { width: min(84vw, 38vh); } .book .cardgrid, .cardgrid { width: min(92vw, 44vh); } .ap-pr { font-size: 32px; } .ap-pic { width: 46px; } .ap-pic .pic-emo { font-size: 28px; } .ap-syl { font-size: 16px; } .ap-letter { padding: 3px 10px; } .pg.pl { padding: 4px 8px; } }
@media (max-width: 400px) { .topbar:not(.hometop) [data-a=toggleMusic] { display: none; } }
@media (min-width: 701px) and (max-height: 650px) { .book .padwrap, .book .cardgrid { width: min(58vh, 46vw, 560px); } .ap-pr { font-size: clamp(44px, 6vw, 64px); } .ap-pic { width: clamp(60px, 8vw, 84px); } .apage { gap: 6px; } .apage .heromini { height: 70px; } }
.shapeq { font: 700 22px/1.1 'Fredoka', 'Nunito', sans-serif; color: var(--cocoa-d); background: var(--cream); border: 3px solid var(--cocoa); border-radius: 999px; padding: 4px 20px 6px; box-shadow: 0 4px 0 var(--edge); margin-bottom: 10px; }
.shapeq::first-letter { text-transform: uppercase; }
.mz-near { cursor: pointer; outline: 3px dashed rgba(245, 166, 35, .7); outline-offset: -5px; }
/* Shakllar: nomi yozilgan kartalar */
.shapebox { flex-direction: column; gap: 2px; cursor: pointer; padding: 8px 6px 6px; position: relative; }
.shapebox svg { width: 66%; height: auto; flex: 1 1 auto; min-height: 0; }
.sh-n { font: 700 clamp(13px, 1.8vw, 17px)/1.1 'Fredoka', 'Nunito', sans-serif; color: var(--cocoa-d); }
.shapebox.sample { width: clamp(120px, 20vw, 160px); background: #eef0f4; margin-bottom: 14px; }
.shapebox.sample .sh-n { color: #4b5563; }
.sh-ear { position: absolute; top: 6px; right: 8px; font-size: 18px; }
.sh-ear img.e3t { width: 22px; height: 22px; }
.shrow { gap: clamp(10px, 2vw, 18px); flex-wrap: nowrap; }
.shrow .shapebox { width: clamp(92px, 18vw, 150px); }
@media (max-width: 700px) { .shrow { gap: 8px; } .shrow .shapebox { width: calc((100vw - 110px) / 3); border-radius: 20px; } .shapebox.sample { width: 44vw; } #sc { width: calc(100vw - 24px); } }

/* Xarita jonlanishi: to'lqinlar, ko'pik, kapalak, qayiq, shar */
.mapsvg .wv { animation: mwave 3.4s ease-in-out infinite alternate; transform-box: fill-box; }
.mapsvg .wv.w2 { animation-duration: 4.2s; animation-delay: -1.3s; }
@keyframes mwave { to { transform: translateX(5px); } }
.mapsvg .foam { animation: mfoam 9s linear infinite; }
@keyframes mfoam { to { stroke-dashoffset: -260; } }
.mdeco.fly { animation: mfly 3.6s ease-in-out infinite; }
@keyframes mfly { 0%, 100% { transform: translate(-50%, -88%) rotate(-6deg); } 25% { transform: translate(-30%, -110%) rotate(8deg); } 50% { transform: translate(-60%, -125%) rotate(-4deg); } 75% { transform: translate(-75%, -100%) rotate(6deg); } }
.mdeco.bob { animation: mbob 3s ease-in-out infinite; }
@keyframes mbob { 0%, 100% { transform: translate(-50%, -88%) rotate(-4deg); } 50% { transform: translate(-50%, -78%) rotate(4deg); } }
.mdeco.float { animation: mfloat 4s ease-in-out infinite; }
@keyframes mfloat { 0%, 100% { transform: translate(-50%, -88%); } 50% { transform: translate(-50%, -105%); } }
@media (prefers-reduced-motion: reduce) { .mapsvg .wv, .mapsvg .foam, .mdeco.fly, .mdeco.bob, .mdeco.float { animation: none; } }

/* ---------- Xarita: harflar ro'yxati, kattalashtirish, tortib aylantirish ---------- */
.mapbox { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; }
.mapctl { position: absolute; right: 14px; bottom: 14px; z-index: 4; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.mapctl .mapme { position: static; }
.mz { width: 44px; height: 44px; border-radius: 50%; font: 700 24px/1 'Fredoka', 'Nunito', sans-serif; color: var(--cocoa-d); border: 3px solid var(--cocoa); background: var(--honeybg); box-shadow: 0 4px 0 var(--cocoa-s); cursor: pointer; display: grid; place-items: center; padding: 0; }
.mz:disabled { opacity: .45; cursor: default; }
.mz:not(:disabled):active { transform: translateY(3px); box-shadow: 0 1px 0 var(--cocoa-s); }
@media (pointer: fine) {
    .mapwrap { cursor: grab; scrollbar-width: thin; scrollbar-color: rgba(122, 62, 18, .55) transparent; }
    .mapwrap::-webkit-scrollbar { display: block; width: 8px; }
    .mapwrap::-webkit-scrollbar-thumb { background: rgba(122, 62, 18, .55); border-radius: 8px; }
    .mapwrap.drag { cursor: grabbing; user-select: none; }
    .mapwrap.drag .mnode { pointer-events: none; }
}
.mnode.flash { animation: nodeflash 1s ease-in-out 2; z-index: 5; }
@keyframes nodeflash { 0%, 100% { transform: translate(-50%, -50%) scale(1); box-shadow: 0 0 0 0 rgba(255, 210, 63, .9), 0 6px 0 var(--cocoa-s); } 50% { transform: translate(-50%, -50%) scale(1.3); box-shadow: 0 0 0 16px rgba(255, 210, 63, 0), 0 6px 0 var(--cocoa-s); } }
.mapstrip { display: flex; gap: 5px; overflow-x: auto; scrollbar-width: none; padding: 2px 4px 8px; flex: none; }
.mapstrip::-webkit-scrollbar { display: none; }
.mchip { flex: none; min-width: 34px; height: 34px; padding: 0 6px; border-radius: 11px; display: grid; place-items: center; cursor: pointer;
    font: 700 15px/1 'Fredoka', 'Nunito', sans-serif; color: var(--cocoa-d); background: var(--cream); border: 2.5px solid rgba(122, 62, 18, .35); box-shadow: 0 3px 0 rgba(122, 62, 18, .25); }
.mchip.d { color: #0f7a57; }
.mchip.done { background: linear-gradient(#ffe48a, #f5b62a); border-color: var(--cocoa); }
.mchip.part { background: #fff1c9; border-color: #d39a3a; }
.mchip.cur { background: var(--honeybg); border-color: var(--cocoa); box-shadow: 0 0 0 3px var(--cream), 0 0 0 6px #ffb300; }
.mchip.vis { outline: 2.5px solid #2fa7e2; outline-offset: 1px; }
.mchip:active { transform: translateY(2px); box-shadow: none; }
.sd-jump { flex-direction: column; gap: 8px; cursor: default; }
.sd-jump:active { transform: none; box-shadow: 0 6px 0 var(--edge), 0 12px 22px rgba(60, 30, 5, .18); }
.sd-chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(34px, 1fr)); gap: 6px; }
.sd-chips .mchip { min-width: 0; width: 100%; padding: 0; font-size: 14px; height: 32px; }
@media (min-width: 1180px) { .mapstrip { display: none; } }
@media (max-width: 700px) { .mz { width: 40px; height: 40px; font-size: 21px; } .mapstrip { padding-bottom: 6px; } .mchip { min-width: 30px; height: 30px; font-size: 13.5px; } }

/* O'ng ustun ixchamroq: hammasi bir ekranga sig'adi */
@media (min-width: 1180px) {
    .sidecol { gap: 12px; justify-content: flex-start; padding-top: 2px; }
    .sd-card { padding: 10px 14px; border-radius: 22px; }
    .sd-lesson { gap: 10px; }
    .sd-art { width: 50px; }
    .sd-lesson .lb-t b { font-size: 17px; }
    .sd-lesson .lb-go { width: 42px; height: 42px; font-size: 15px; }
    .sd-tasks { gap: 5px; }
    .sd-h b { font-size: 15px; }
    .sd-h small { font-size: 12px; padding: 1px 8px; }
    .sd-task { padding: 3px 9px; border-radius: 12px; }
    .sd-tt { font-size: 13.5px; }
    .sd-jump { gap: 6px; }
    .sd-chips { grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 4px; }
    .sd-chips .mchip { height: 27px; font-size: 12.5px; border-radius: 9px; border-width: 2px; box-shadow: 0 2px 0 rgba(122, 62, 18, .25); }
    .sd-chips .mchip.cur { box-shadow: 0 0 0 2px var(--cream), 0 0 0 4px #ffb300; }
}
@media (min-width: 1180px) and (max-height: 800px) {
    .sd-lesson .lb-t small:last-child { display: none; }
    .sd-chips .mchip { height: 24px; font-size: 12px; }
}
@media (min-width: 1180px) and (max-height: 660px) { .sd-tasks .sd-task:nth-of-type(n+4) { display: none; } }

/* ---------- Multfilmdek fonlar ---------- */
html[data-scene="poyga"] #scene .land, html[data-scene="poyga"] #scene .lights,
html[data-scene="muz"] #scene .land, html[data-scene="muz"] #scene .lights, html[data-scene="muz"] #scene .sun,
html[data-scene="dengiz"] #scene .land, html[data-scene="dengiz"] #scene .lights, html[data-scene="dengiz"] #scene .sun, html[data-scene="dengiz"] #scene .clouds,
html[data-scene="dino"] #scene .land, html[data-scene="dino"] #scene .lights { display: none; }
#scx * { transform-box: fill-box; }
/* Poyga: mashinalar o'ngdan chapga yuradi, bayroqlar hilpiraydi */
#scx .rcar { animation: rcar var(--d) linear infinite; transform-box: view-box; }
@keyframes rcar { from { transform: translateX(1800px); } to { transform: translateX(-200px); } }
#scx .flag { transform-origin: 0 50%; animation: flag 1.2s ease-in-out infinite alternate; }
@keyframes flag { to { transform: scaleX(.8) skewY(6deg); } }
/* Muz qasri */
html[data-scene="muz"] #skyG .k1 { stop-color: #1d4f9c; } html[data-scene="muz"] #skyG .k2 { stop-color: #6fb6ee; } html[data-scene="muz"] #skyG .k3 { stop-color: #dff3ff; }
html[data-scene="muz"] #scene .clouds { opacity: .35; }
#scx .aur { animation: aur 7s ease-in-out infinite alternate; transform-box: view-box; }
#scx .aur.a2 { animation-duration: 9s; animation-delay: -3s; }
@keyframes aur { 0% { transform: translateX(-40px); opacity: .25; } 100% { transform: translateX(40px); opacity: .55; } }
#scx .glow { animation: twinkle 3s ease-in-out infinite; }
#scx .spark path { animation: twinkle 2.4s ease-in-out infinite; }
html[data-scene="muz"] #sfx i { border-radius: 50%; background: #fff; box-shadow: 0 0 6px rgba(255, 255, 255, .9); opacity: .9; }
html[data-scene="muz"] body { background: #dcefff; }
/* Dengiz tubi: baliqlar suzadi, suv o'tlari tebranadi, pufakchalar ko'tariladi */
#scx .fish { animation: fishl var(--d) linear infinite; transform-box: view-box; }
#scx .fish.rev { animation-name: fishr; }
@keyframes fishl { from { transform: translate(1750px, 0); } 50% { transform: translate(800px, -26px); } to { transform: translate(-150px, 0); } }
@keyframes fishr { from { transform: translate(-150px, 0); } 50% { transform: translate(800px, 22px); } to { transform: translate(1750px, 0); } }
#scx .weed { transform-origin: 50% 100%; animation: weed 3.2s ease-in-out infinite alternate; }
@keyframes weed { from { transform: rotate(-6deg); } to { transform: rotate(6deg); } }
#scx .rays { animation: rays 6s ease-in-out infinite alternate; transform-box: view-box; }
@keyframes rays { from { opacity: .06; transform: translateX(-20px); } to { opacity: .16; transform: translateX(20px); } }
#sfx .bub { position: absolute; bottom: -30px; width: calc(16px * var(--s)); height: calc(16px * var(--s)); border-radius: 50%; border: 2px solid rgba(255, 255, 255, .8); background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, .9) 0 18%, rgba(255, 255, 255, .15) 20%); animation: bubup var(--d) linear infinite; }
@keyframes bubup { to { transform: translate(20px, -110vh); } }
html[data-scene="dengiz"] body { background: #0c5c98; }
/* Dinozavrlar: sekin yurishadi, vulqondan tutun chiqadi */
html[data-scene="dino"] #skyG .k1 { stop-color: #ffb86b; } html[data-scene="dino"] #skyG .k2 { stop-color: #ffe2a8; } html[data-scene="dino"] #skyG .k3 { stop-color: #fff3d6; }
html[data-scene="dino"] #scene .clouds { opacity: .6; }
#scx .dwalk { animation: dwalk var(--d) linear infinite; transform-box: view-box; }
@keyframes dwalk { 0% { transform: translate(1800px, 0); } 25% { transform: translate(1300px, -8px); } 50% { transform: translate(800px, 0); } 75% { transform: translate(300px, -8px); } 100% { transform: translate(-250px, 0); } }
#scx .smoke circle { animation: smoke 4s ease-out infinite; }
#scx .smoke circle:nth-child(2) { animation-delay: -1.3s; } #scx .smoke circle:nth-child(3) { animation-delay: -2.6s; }
@keyframes smoke { from { transform: translateY(0) scale(.6); opacity: .9; } to { transform: translateY(-160px) scale(1.6); opacity: 0; } }
html[data-scene="dino"] body { background: #8fcf5a; }
@media (prefers-reduced-motion: reduce) { #scx * { animation: none !important; } #sfx .bub { display: none; } }

/* Harflar yozma (kursiv) ko'rinishda */
.ac-wr { height: auto; min-height: 50px; justify-content: center; color: var(--ac); }
.ac-wr .sline { height: auto; max-height: 56px; max-width: 100%; }
.ap-wr.big { color: var(--ac); display: flex; justify-content: center; }
.ap-wr.big .sline { max-width: 100%; height: auto; }
.ap-wr.big .sline g, .mn-cur .sline g, .mchip .sline g { stroke: currentColor; }
.mn-cur { display: grid; place-items: center; line-height: 0; text-shadow: none; }
.mn-cur .sline { display: block; filter: drop-shadow(0 1.5px 0 #fff); }
.mnode.v .mn-cur { color: var(--vow); } .mnode.c .mn-cur { color: var(--con); } .mnode.d .mn-cur { color: var(--dig); }
.mnode.cur .mn-cur .sline { transform: scale(1.22); }
.mchip { color: var(--cocoa-d); line-height: 0; }
.mchip.d { color: #0f7a57; }
.mchip .sline { display: block; max-width: 100%; height: auto; }
@media (max-width: 700px) { .ac-wr .sline { max-height: 44px; } .ap-letter .ap-wr.big .sline { max-height: 56px; } }

/* Do'kon: kiyib ko'rish va «Sotib olish» tugmasi */
.shopL { gap: 12px; }
.buybar { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; align-items: center; }
.buybtn { font-size: 19px; padding: 12px 22px; background: linear-gradient(#4fd88a, #22a260); color: #fff; border: 3px solid #15803d; box-shadow: 0 5px 0 #15803d; text-shadow: 0 1px 0 rgba(0, 0, 0, .2); }
.buybtn:disabled { filter: grayscale(.7); opacity: .7; cursor: not-allowed; }
.bb-lack { width: 100%; text-align: center; font-weight: 700; color: #b45309; background: #fff6e0; border-radius: 12px; padding: 4px 10px; }
.bb-hint { max-width: 260px; text-align: center; font-size: 14px; font-weight: 600; color: var(--cocoa-d); background: var(--cream); border: 2.5px solid var(--cocoa); border-radius: 16px; padding: 6px 12px; box-shadow: 0 3px 0 var(--edge); }
.item.try { outline: 4px solid #22a260; outline-offset: 2px; transform: translateY(-3px); }
@media (max-width: 700px) { .buybtn { font-size: 16px; padding: 9px 14px; } .bb-hint { font-size: 12.5px; padding: 4px 10px; } .shopL { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 8px; } }

/* ---------- Labirint: sichqoncha va pishloq ---------- */
.mzscreen { align-items: center; }
.mzhud { display: flex; gap: 10px; align-items: center; justify-content: center; flex-wrap: wrap; margin: 2px 0 10px; }
.mzhud > span { display: inline-flex; align-items: center; gap: 6px; padding: 5px 14px; border-radius: 999px; font: 700 16px/1 'Fredoka', 'Nunito', sans-serif; color: var(--cocoa-d); background: var(--cream); border: 3px solid var(--cocoa); box-shadow: 0 4px 0 var(--edge); }
.mzh-t b { min-width: 3.2em; font-variant-numeric: tabular-nums; }
.mzh-c img.e3t { width: 1.2em; height: 1.2em; } .mzh-c i { opacity: .25; font-style: normal; filter: grayscale(1); }
.mzwrap { flex: 1 1 auto; min-height: 0; width: 100%; display: grid; place-items: center; }
.mzboard { position: relative; border-radius: 26px; padding: 0; background: linear-gradient(#62c26b, #3f9e4e); border: 5px solid #7a4a1e; box-shadow: inset 0 0 0 4px #9a6a32, 0 10px 0 #5a3412, 0 20px 36px rgba(30, 40, 10, .35); touch-action: none; user-select: none; }
.mzsvg { display: block; }
.mzglow { animation: mzglow 1.6s ease-in-out infinite alternate; }
@keyframes mzglow { from { opacity: .25; } to { opacity: .7; } }
.mz-cheese, .mz-trap { position: absolute; transform: translate(-50%, -50%); pointer-events: none; display: grid; place-items: center; }
.mz-cheese img.e3, .mz-trap img.e3, .mz-mouse img.e3 { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 4px 3px rgba(60, 30, 5, .35)); }
.mz-cheese { animation: mzbob 1.8s ease-in-out infinite; }
@keyframes mzbob { 50% { transform: translate(-50%, -58%); } }
.mz-trap::before { content: ''; position: absolute; inset: 12%; border-radius: 50%; background: radial-gradient(rgba(220, 38, 38, .35), rgba(220, 38, 38, 0) 70%); }
.mz-trap.snap { animation: mzsnap .4s ease-out 2; }
@keyframes mzsnap { 50% { transform: translate(-50%, -50%) scale(1.35) rotate(-8deg); } }
.mz-mouse { position: absolute; left: 0; top: 0; pointer-events: none; z-index: 2; will-change: transform; }
.mz-mouse.bump img { animation: mzbump .22s; }
@keyframes mzbump { 30% { transform: translateX(-10%) rotate(-6deg); } 70% { transform: translateX(8%) rotate(5deg); } }
.mz-mouse.caught img { filter: grayscale(.8) drop-shadow(0 2px 2px rgba(0, 0, 0, .4)); animation: mzcaught .5s ease-out forwards; }
@keyframes mzcaught { to { transform: scale(.75) rotate(25deg); } }
.mz-mouse.happy img { animation: mzhappy .5s ease-in-out 3; }
@keyframes mzhappy { 50% { transform: translateY(-25%) scale(1.15); } }
.mzpad { display: grid; grid-template-columns: repeat(3, 58px); grid-template-rows: repeat(2, 54px); gap: 6px; margin: 10px auto 4px; flex: none; }
.mzk { display: grid; place-items: center; border-radius: 18px; border: 3px solid var(--cocoa); color: var(--cocoa-d); background: var(--honeybg); box-shadow: inset 0 -4px 0 rgba(160, 80, 0, .3), 0 5px 0 var(--cocoa-s); cursor: pointer; touch-action: manipulation; }
.mzk:active { transform: translateY(4px); box-shadow: inset 0 -3px 0 rgba(160, 80, 0, .3), 0 1px 0 var(--cocoa-s); }
.mzk .ico-svg { width: 28px; height: 28px; }
.mzk.up { grid-column: 2; grid-row: 1; } .mzk.left { grid-column: 1; grid-row: 2; } .mzk.down { grid-column: 2; grid-row: 2; } .mzk.right { grid-column: 3; grid-row: 2; }
.mzend { gap: 10px; }
.mz-big img.e3 { width: 96px; height: 96px; filter: drop-shadow(0 8px 6px rgba(60, 30, 5, .3)); }
.mzend.win .mz-big { animation: mzhappy .6s ease-in-out 2; }
.mzstats { display: flex; gap: 12px; }
.mzstats > div { display: flex; flex-direction: column; align-items: center; padding: 8px 18px; border-radius: 16px; background: #fff6e0; border: 2.5px solid rgba(122, 62, 18, .35); }
.mzstats small { font-size: 12.5px; color: var(--caramel); font-weight: 600; } .mzstats b { font-size: 22px; color: var(--cocoa-d); }
.mzstars { font-size: 40px; letter-spacing: 6px; color: #e9d8b4; line-height: 1; } .mzstars .on { color: #ffb300; text-shadow: 0 2px 0 #b45309; }
.mznote { margin: 0; font-size: 14px; color: var(--cocoa); }
.mzbtn { display: inline-flex; align-items: center; gap: 8px; } .mzbtn .ico-svg { width: 22px; height: 22px; }
.mzbtn.big { font-size: 20px; padding: 12px 26px; background: linear-gradient(#4fd88a, #22a260); color: #fff; border: 3px solid #15803d; box-shadow: 0 5px 0 #15803d; }
@media (min-width: 900px) { .mzscreen .mzwrap { max-height: calc(100vh - 250px); } }
@media (max-width: 700px) { .mzpad { grid-template-columns: repeat(3, 64px); grid-template-rows: repeat(2, 58px); } .mzhud > span { font-size: 14px; padding: 4px 10px; } }

/* ---------- PUFAKLAR: rang-barang havo sharlari ---------- */
.ygrid.games.balmenu { grid-template-columns: repeat(3, minmax(0, 1fr)); width: min(720px, 100%); }
.bc-art { position: relative; overflow: hidden; }
.bc-b { position: absolute; width: 30%; aspect-ratio: 100 / 160; bottom: 4%; animation: bcbob 3.2s ease-in-out infinite; }
.bc-b svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 4px 3px rgba(90, 44, 11, .22)); }
.bc-b b { position: absolute; left: 0; right: 0; top: 18%; text-align: center; font: 700 clamp(18px, 3.6vw, 30px)/1 'Fredoka', 'Nunito', sans-serif; color: #fff; text-shadow: 0 2px 0 rgba(0, 0, 0, .25); }
.bc-b.b0 { left: 8%; bottom: 8%; transform: rotate(-8deg); }
.bc-b.b1 { left: 35%; bottom: 16%; animation-delay: -1.1s; }
.bc-b.b2 { left: 62%; bottom: 6%; transform: rotate(8deg); animation-delay: -2.2s; }
@keyframes bcbob { 50% { translate: 0 -6px; } }
@media (max-width: 700px) { .ygrid.games.balmenu { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; } .ygrid.games.balmenu .ycard { padding: 6px 4px 8px; } }

.balscreen .topbar .sp { display: flex; justify-content: center; }
.balq { display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 4px 22px; border-radius: 999px; background: var(--cream, var(--cream)); border: 3px solid var(--cocoa, #7a3e12); box-shadow: 0 4px 0 var(--edge, #c58b4a); color: var(--cocoa-d, #5a2c0b); font: 700 18px/1.1 'Fredoka', 'Nunito', sans-serif; cursor: pointer; }
.balq.bump { animation: bqbump .45s; }
@keyframes bqbump { 40% { transform: scale(1.1); } }
.bq-big { display: inline-grid; place-items: center; min-width: 1.5em; padding: 0 10px; font-size: 34px; border-radius: 14px; background: var(--honeybg, #ffe7a3); border: 2.5px solid var(--cocoa, #7a3e12); }
.bq-eq { font-size: 30px; letter-spacing: .5px; } .bq-eq i { font-style: normal; color: #e11d48; }
.bq-ear { font-size: 26px; animation: bqear 1.4s ease-in-out infinite; }
@keyframes bqear { 50% { transform: scale(1.18) rotate(-8deg); } }
.balhud { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 2px 6px 6px; flex: none; }
.balhearts { display: flex; gap: 6px; }
.balhearts.hit { animation: shake .45s; }
.bht { width: 36px; height: 34px; display: block; }
.bht svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 3px 0 rgba(127, 29, 29, .35)); }
.bht .hcrack { opacity: 0; }
.bht.off svg { filter: grayscale(1) opacity(.3); }
.bht.lose { animation: hbreak 1s ease-in forwards; }
.bht.lose .hcrack { animation: hcrack .3s .15s forwards; }
@keyframes hbreak { 0% { transform: scale(1); } 18% { transform: scale(1.45) rotate(-12deg); } 34% { transform: scale(1.35) rotate(12deg); } 50% { transform: scale(1.2) rotate(-6deg); filter: none; } 100% { transform: translateY(8px) scale(.9); filter: grayscale(1) opacity(.3); } }
@keyframes hcrack { to { opacity: 1; } }
.balstat { display: flex; gap: 8px; }
.bst { display: inline-flex; align-items: center; gap: 5px; padding: 4px 14px; border-radius: 999px; background: rgba(255, 248, 231, .92); border: 2.5px solid rgba(122, 62, 18, .35); font: 700 18px/1.2 'Fredoka', 'Nunito', sans-serif; color: var(--cocoa-d, #5a2c0b); }
.bst b { min-width: 1.3em; text-align: center; font-variant-numeric: tabular-nums; }
.bst.up { animation: bstup .5s; } .bst.down { animation: bstdown .5s; }
@keyframes bstup { 40% { transform: scale(1.2); background: #dcfce7; } }
@keyframes bstdown { 40% { transform: scale(1.15); background: #fee2e2; } }
.baltrack span.cur { transform: scale(1.4); margin: 0 7px; font-size: 18px; z-index: 1; }
.balfield { background: linear-gradient(#a5dcff, #e6f6ff 70%, #f4fbff); }
.balfield::before, .balfield::after { content: ''; position: absolute; width: 150px; height: 48px; border-radius: 999px; background: #fff; opacity: .75; box-shadow: 40px -18px 0 4px #fff, 84px 2px 0 -4px #fff; pointer-events: none; }
.balfield::before { top: 14%; left: 6%; } .balfield::after { top: 46%; right: 14%; transform: scale(.8); opacity: .55; }
.balloon { position: absolute; bottom: -180px; padding: 0; border: 0; background: none; cursor: pointer; touch-action: none; animation: brise linear forwards; z-index: 1; }
.balloon .bw { position: relative; display: block; width: 100%; height: 100%; transform-origin: 50% 0; animation: bsway var(--sw, 2.4s) ease-in-out infinite alternate; }
.balloon svg { width: 100%; height: 100%; display: block; overflow: visible; filter: drop-shadow(0 6px 5px rgba(30, 60, 90, .18)); }
.balloon .bl { position: absolute; left: 0; right: 0; top: 34.5%; transform: translateY(-50%); text-align: center; font: 700 40px/1 'Fredoka', 'Nunito', sans-serif; color: #fff; text-shadow: 0 2px 0 rgba(0, 0, 0, .28), 0 0 6px rgba(0, 0, 0, .15); pointer-events: none; user-select: none; }
.balloon.no .bw { animation: shake .4s; }
.balloon.no .bl { color: #fee2e2; }
.balloon.gone { pointer-events: none; animation-play-state: paused; }
.balloon.gone .bw { animation: bpop .28s ease-out forwards; }
@keyframes brise { to { transform: translateY(calc(-100vh - 220px)); } }
@keyframes bsway { from { transform: rotate(-5deg) translateX(-6px); } to { transform: rotate(5deg) translateX(6px); } }
@keyframes bpop { to { transform: scale(1.5); opacity: 0; } }
.balbit { position: fixed; width: 12px; height: 9px; border-radius: 3px; pointer-events: none; z-index: 60; }
.balplus { position: fixed; z-index: 61; pointer-events: none; transform: translate(-50%, -50%); font: 700 24px/1 'Fredoka', 'Nunito', sans-serif; text-shadow: 0 2px 0 #fff; animation: balplus 1.1s ease-out forwards; }
.balplus.up { color: #15803d; } .balplus.down { color: #dc2626; }
@keyframes balplus { 0% { opacity: 0; transform: translate(-50%, -30%) scale(.7); } 20% { opacity: 1; transform: translate(-50%, -80%) scale(1.15); } 100% { opacity: 0; transform: translate(-50%, -260%) scale(1); } }
.balend .be-heart { display: block; width: 96px; height: 90px; animation: hbreak 1.1s ease-in forwards; }
.balend .be-heart svg { width: 100%; height: 100%; } .balend .be-heart .hcrack { animation: hcrack .3s .2s forwards; opacity: 0; }
.balend .mzstats > div { padding: 8px 12px; }
@media (max-width: 700px) {
  .balq { min-height: 44px; padding: 3px 14px; font-size: 15px; gap: 6px; } .bq-big { font-size: 26px; } .bq-eq { font-size: 24px; }
  .bht { width: 28px; height: 26px; } .bst { padding: 3px 10px; font-size: 15px; }
}

/* ---------- Ota-ona: haftalik hisobot ---------- */
.wk-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.wk-s { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 18px; background: #f6f2ff; }
.wk-s > span { font-size: 13.5px; opacity: .75; }
.wk-s > b { font-size: 26px; line-height: 1.15; }
.wk-d { font-size: 12.5px; font-weight: 700; } .wk-d i { font-style: normal; font-weight: 400; opacity: .7; }
.wk-d.up { color: #15803d; } .wk-d.down { color: #dc2626; } .wk-d.eq { color: #6b6485; }
.wk-hardrow { display: flex; flex-wrap: wrap; gap: 8px; }
.wk-hard { display: inline-flex; flex-direction: column; align-items: center; min-width: 56px; padding: 6px 10px; border-radius: 14px; background: #fff1f2; border: 2px solid #fecdd3; }
.wk-hard b { font-size: 24px; color: #be123c; line-height: 1.1; } .wk-hard small { font-size: 12px; color: #9f1239; }
.wk-none { opacity: .7; font-size: 14.5px; }
.wk-easy { display: flex; flex-wrap: wrap; gap: 4px; }
.wk-tip { margin-top: 12px; padding: 10px 14px; border-radius: 14px; background: #fffbeb; border: 2px dashed #fcd34d; font-size: 14.5px; }
.wk-s > small { text-align: left; align-self: flex-start; }

/* ---------- Rasmli fonlar (multfilm mavzulari) ---------- */
#scimg { position: absolute; inset: 0; display: none; background-image: var(--im); background-position: var(--pos); background-size: cover; background-repeat: no-repeat; }
/* Keng ekran (kompyuter): tik rasm ikki chetda to'liq bo'yi bilan, o'rtasi xarita ostida qoladi */
@media (min-aspect-ratio: 5/4) {
  html[data-photo="p"] #scimg { background-image: var(--im), var(--im), var(--im); background-position: left center, right center, center; background-size: auto 100%; }
}
html[data-photo] #scimg { display: block; }
html[data-photo] #scene svg { display: none; }
/* Yuqori va past qismda yengil parda - tugmalar va yozuvlar o'qilsin */
html[data-photo] #scimg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(rgba(0, 0, 0, .18), rgba(0, 0, 0, 0) 22%, rgba(0, 0, 0, 0) 78%, rgba(0, 0, 0, .14)); }
html[data-scene="madagaskar"] body { background: #5ab8ec; }
html[data-scene="nemo"] body { background: #1a8fd6; }
html[data-scene="barbi"] body { background: #f6a6cf; }
html[data-scene="chipdeyl"] body { background: #3a302b; }
html[data-scene="futbol"] body { background: #3f9a3a; }
.sc-h { margin: 4px 0 10px; font-size: 17px; color: var(--cocoa-d); text-align: left; width: 100%; }
.sctile.ph .sc-pv { aspect-ratio: 1.1; }

/* ---------- Birinchi harf o'yini ---------- */
.fh { display: flex; flex-direction: column; align-items: center; gap: 14px; width: min(680px, 100%); margin: auto; }
.fh-prog { display: flex; gap: 6px; }
.fh-prog i { width: 26px; height: 10px; border-radius: 99px; background: rgba(255, 248, 231, .75); border: 2px solid rgba(122, 62, 18, .3); }
.fh-prog i.ok { background: #22a260; border-color: #15803d; } .fh-prog i.cur { background: var(--honey); border-color: var(--cocoa); }
.fh-card { position: relative; width: clamp(150px, 30vw, 220px); aspect-ratio: 1; border-radius: 32px; background: radial-gradient(circle at 50% 40%, #fffaf0, #fff1d0); border: 4px solid var(--cocoa); box-shadow: 0 7px 0 var(--edge); display: grid; place-items: center; cursor: pointer; }
.fh-pic img.e3 { width: 72%; height: auto; filter: drop-shadow(0 8px 6px rgba(90, 44, 11, .25)); animation: bcbob 3s ease-in-out infinite; }
.fh-ear { position: absolute; right: 10px; bottom: 8px; font-size: 24px; }
.fh-word { display: flex; align-items: flex-end; gap: 4px; padding: 8px 22px; border-radius: 22px; background: var(--cream); border: 3px solid rgba(122, 62, 18, .35); min-height: 74px; }
.fh-gap { display: inline-grid; place-items: center; min-width: 54px; height: 62px; padding: 0 6px; border-radius: 14px; border: 3px dashed var(--caramel, #c2740f); color: var(--caramel, #c2740f); font: 700 38px/1 'Fredoka', 'Nunito', sans-serif; }
.fh-gap.ok { border-style: solid; border-color: #22a260; background: #eafbf1; animation: bqbump .45s; }
.fh-opts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; width: 100%; }
.fh-opt { min-height: 96px; border-radius: 24px; background: #fff; border: 4px solid rgba(122, 62, 18, .35); box-shadow: 0 6px 0 rgba(122, 62, 18, .3); display: grid; place-items: center; cursor: pointer; }
.fh-opt:active { transform: translateY(4px); box-shadow: 0 2px 0 rgba(122, 62, 18, .3); }
.fh-opt.no { animation: shake .45s; border-color: #ef4444; background: #fee2e2; opacity: .55; }
.fh-opt.ok { border-color: #22a260; background: #dcfce7; box-shadow: 0 6px 0 #15803d; }
@media (max-width: 700px) { .fh-opts { grid-template-columns: repeat(2, minmax(0, 1fr)); } .fh-opt { min-height: 84px; } }
.sg-q { font: 700 20px/1.2 'Fredoka', 'Nunito', sans-serif; color: var(--cocoa-d); padding: 4px 16px; border-radius: 999px; background: rgba(255, 248, 231, .92); }
.sg-opt { display: flex; flex-direction: column; gap: 2px; } .sg-opt b { font: 700 40px/1 'Fredoka', 'Nunito', sans-serif; color: #1d4ed8; }
.sg-claps { font-size: 15px; letter-spacing: -2px; }
.sg-word { align-items: center; }
.sg-part { display: inline-block; animation: sgpop .45s both; animation-delay: calc(var(--k) * .35s); }
.sg-dash { font-style: normal; font: 700 30px/1 'Fredoka', sans-serif; color: var(--caramel, #c2740f); margin: 0 4px; }
@keyframes sgpop { 0% { transform: scale(.4); opacity: 0; } 70% { transform: scale(1.15); opacity: 1; } 100% { transform: scale(1); } }
/* O'yinlar: 6 ta karta - kompyuterda 3 tadan ikki qator */
@media (min-width: 761px) { .ygrid.games:not(.balmenu) { width: min(760px, 100%); grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.sc-pv .sc-ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ---------- Rasmli orollar xaritasi ---------- */
.map.imgmap { background: #1f9fd8; }
.misle { position: absolute; left: 0; width: 100%; object-fit: cover; pointer-events: none; user-select: none; }
.misle ~ .misle { -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 7%); mask-image: linear-gradient(to bottom, transparent 0, #000 7%); }
.mzone { position: absolute; left: 50%; transform: translate(-50%, -50%); z-index: 2; pointer-events: none; padding: 5px 18px 6px; border-radius: 12px; background: linear-gradient(#f0a14a, #c8701a); border: 3px solid #5a2c0b; box-shadow: 0 4px 0 #5a2c0b, 0 8px 14px rgba(0, 0, 0, .25); font: 700 clamp(13px, 2.4vw, 18px)/1 'Fredoka', 'Nunito', sans-serif; letter-spacing: 1px; color: var(--cream); text-shadow: 0 2px 0 #5a2c0b; white-space: nowrap; }
.imgmap .mdeco { filter: drop-shadow(0 6px 4px rgba(20, 40, 10, .35)); }
.mapwrap:has(.imgmap) { background: #1690cc; }
.map.imgmap { background: #1690cc; }
.map.imgmap::before, .map.imgmap::after { content: ''; position: absolute; top: 0; bottom: 0; width: 5%; z-index: 1; pointer-events: none; }
.map.imgmap::before { left: 0; background: linear-gradient(90deg, #1690cc, rgba(22, 144, 204, 0)); }
.map.imgmap::after { right: 0; background: linear-gradient(270deg, #1690cc, rgba(22, 144, 204, 0)); }

/* ---------- Ketma-ket o'rganish: yopiq darslar ---------- */
.mnode.lock { filter: saturate(.25) brightness(.92); }
.mnode.lock .mn-l { opacity: .5; }
.mn-lock { position: absolute; right: -6px; top: -8px; font-style: normal; font-size: 18px; filter: drop-shadow(0 2px 1px rgba(0, 0, 0, .3)); }
.acard { position: relative; }
.acard.lock { filter: saturate(.2); opacity: .7; }
.ac-lock { position: absolute; top: 6px; right: 8px; font-style: normal; font-size: 20px; }
.lockmodal .lk-row { display: flex; align-items: center; gap: 14px; }
.lk-g { display: grid; place-items: center; min-width: 120px; min-height: 76px; padding: 6px 10px; border-radius: 18px; background: #fff; border: 3px solid #22a260; }
.lk-g.off { border-color: #c9b9a0; filter: grayscale(1); opacity: .6; }
.lk-ar { font-size: 28px; }

/* ---------- O'yinlar: yorliqlar, rekord, ketma-ketlik ---------- */
.yc-badge { position: absolute; left: 50%; bottom: -10px; transform: translateX(-50%); font-style: normal; white-space: nowrap; font: 700 12.5px/1 'Fredoka', 'Nunito', sans-serif; color: #fff; background: linear-gradient(#4fd88a, #22a260); border: 2px solid #15803d; padding: 4px 10px; border-radius: 999px; box-shadow: 0 3px 0 #15803d; z-index: 2; }
.ycard { position: relative; }
.ygrid.games { row-gap: 26px; }
.balplus.streak { color: #ea580c; font-size: 22px; }
.mznote.rec { color: #b45309; font-weight: 700; font-size: 17px; animation: bqbump .6s 2; }

/* ---------- Xotira (3D aylanadigan kartalar) ---------- */
.mg { display: flex; flex-direction: column; align-items: center; gap: 12px; width: min(720px, 100%); margin: auto; }
.mg-hud { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; }
.mg-lv { font: 700 17px/1 'Fredoka', 'Nunito', sans-serif; color: #fff; background: linear-gradient(#ffb547, #f08a1c); border: 3px solid var(--cocoa); padding: 6px 14px; border-radius: 999px; box-shadow: 0 3px 0 var(--cocoa); }
.mg-grid { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: 10px; width: min(100%, calc(var(--cols) * 128px)); }
.mgc { aspect-ratio: 3 / 3.6; padding: 0; border: 0; background: none; perspective: 700px; cursor: pointer; }
.mgc .in { position: relative; display: block; width: 100%; height: 100%; transition: transform .45s cubic-bezier(.3, 1.4, .5, 1); transform-style: preserve-3d; }
.mgc.up .in { transform: rotateY(180deg); }
.mgc .b, .mgc .f { position: absolute; inset: 0; display: grid; place-items: center; border-radius: 16px; backface-visibility: hidden; -webkit-backface-visibility: hidden; border: 3px solid var(--cocoa); box-shadow: 0 5px 0 var(--cocoa-s); }
.mgc .b { background: radial-gradient(circle at 50% 45%, var(--honey-l) 0 22%, transparent 23%), repeating-linear-gradient(45deg, var(--amber) 0 10px, var(--honey) 10px 20px); }
.mgc .b i { font-style: normal; font-size: 26px; filter: drop-shadow(0 2px 0 rgba(90, 44, 11, .35)); }
.mgc .f { transform: rotateY(180deg); background: radial-gradient(circle at 50% 35%, #fff, #fff4dc); }
.mgc.ok .f { background: radial-gradient(circle at 50% 35%, #f0fff5, #c9f5da); border-color: #15803d; box-shadow: 0 5px 0 #15803d, 0 0 0 4px rgba(34, 162, 96, .25); }
.mgc.ok .in { animation: mgpop .5s; }
@keyframes mgpop { 50% { transform: rotateY(180deg) scale(1.1); } }
.mg-e img.e3 { width: 62%; height: auto; max-width: 70px; }
.mg-p { display: flex; flex-direction: column; align-items: center; gap: 2px; } .mg-p img.e3 { width: 56%; max-width: 60px; height: auto; } .mg-p small { font: 700 12px/1 'Fredoka', 'Nunito', sans-serif; color: var(--cocoa-d); }
.mg-l svg { max-width: 92%; height: auto; }

/* ---------- Shakllar (bosqichli) ---------- */
.shg { display: flex; flex-direction: column; align-items: center; gap: 14px; width: min(760px, 100%); margin: auto; }
.shg-q { display: flex; align-items: center; gap: 12px; padding: 8px 20px 8px 10px; border-radius: 999px; background: var(--cream); border: 3px solid var(--cocoa); box-shadow: 0 4px 0 var(--edge); font: 700 clamp(17px, 2.6vw, 23px)/1.1 'Fredoka', 'Nunito', sans-serif; color: var(--cocoa-d); cursor: pointer; }
.shg-sample { width: 56px; height: 56px; display: block; } .shg-sample svg { width: 100%; height: 100%; }
.shg-opts { display: grid; grid-template-columns: repeat(min(var(--n), 3), minmax(0, 1fr)); gap: 12px; width: min(100%, 520px); }
@media (min-width: 760px) { .shg-opts { grid-template-columns: repeat(min(var(--n), 4), minmax(0, 1fr)); width: min(100%, 640px); } }
.shg-o { aspect-ratio: 1; border-radius: 26px; border: 3px solid rgba(122, 62, 18, .35); background: radial-gradient(circle at 50% 35%, #fff, #fff1d6); box-shadow: 0 6px 0 rgba(122, 62, 18, .3); display: grid; place-items: center; padding: 10%; cursor: pointer; }
.shg-o svg { width: 100%; height: 100%; filter: drop-shadow(0 6px 4px rgba(60, 30, 5, .22)); transition: transform .2s; }
.shg-o:hover svg { transform: scale(1.06) rotate(-3deg); }
.shg-o:active { transform: translateY(4px); box-shadow: 0 2px 0 rgba(122, 62, 18, .3); }
.shg-o.no { animation: shake .45s; border-color: #ef4444; background: #fee2e2; }
.shg-o.ok { border-color: #22a260; background: radial-gradient(circle at 50% 35%, #f0fff5, #c9f5da); box-shadow: 0 6px 0 #15803d; }
.shg-o.ok svg { animation: shjump .6s; }
@keyframes shjump { 30% { transform: translateY(-14px) scale(1.12); } 60% { transform: translateY(0) scale(.96); } }
.fh-opts.six { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* ---------- Bosh sahifa: to'liq ekranli gorizontal xarita ---------- */
.home3.screen { padding-bottom: 0; }
.home3 .hm-strip { flex: none; margin: 0 auto 6px; max-width: 100%; }
/* xarita butun ekranni egallaydi (orqa fon ko'rinmaydi), tepadagi tugmalar va pastki menyu uning ustida turadi */
.hm-box { position: fixed; inset: 0; z-index: 1; }
.home3 .topbar, .home3 .hm-strip { position: relative; z-index: 3; }
.home3 .hm-strip { background: rgba(255, 248, 231, .82); border-radius: 999px; padding: 4px 8px; box-shadow: 0 4px 14px rgba(0, 0, 0, .15); backdrop-filter: blur(4px); }
.mapwrap.hz { position: absolute; inset: 0; overflow-x: auto; overflow-y: hidden; border-radius: 0; border: 0; background: #1690cc; scrollbar-width: none; cursor: grab; }
.mapwrap.hz::-webkit-scrollbar { display: none; }
.mapwrap.hz .map.hz { height: 100%; width: auto; max-width: none; margin: 0; zoom: 1 !important; }
.map.hz { background: #1690cc url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='90' height='46'%3E%3Cpath d='M6 16q8-7 16 0t16 0M50 36q7-6 14 0t14 0' stroke='%23bdf2ff' stroke-width='2' fill='none' stroke-linecap='round' opacity='.55'/%3E%3C/svg%3E") repeat; background-size: 90px 46px; }
.map.hz::before, .map.hz::after { display: none; }
.map.hz .misle { top: 0; height: 100%; -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 9%, #000 91%, transparent 100%); mask-image: linear-gradient(90deg, transparent 0, #000 9%, #000 91%, transparent 100%); }
.map.hz .mzone { transform: translate(-50%, 0); }
.mtint { position: absolute; inset: 0; pointer-events: none; z-index: 0; display: none; }
html[data-scene="barbi"] .mtint { display: block; background: #ffb6dc; mix-blend-mode: multiply; opacity: .5; }
html[data-scene="nemo"] .mtint, html[data-scene="dengiz"] .mtint { display: block; background: linear-gradient(#5fd0ff, #1a6fd6); mix-blend-mode: soft-light; opacity: .6; }
html[data-scene="chipdeyl"] .mtint, html[data-scene="kuz"] .mtint { display: block; background: #ffcf8a; mix-blend-mode: multiply; opacity: .45; }
html[data-scene="tun"] .mtint { display: block; background: #34407a; mix-blend-mode: multiply; opacity: .55; }
html[data-scene="koinot"] .mtint { display: block; background: #5a45c9; mix-blend-mode: multiply; opacity: .5; }
html[data-scene="qish"] .mtint, html[data-scene="muz"] .mtint { display: block; background: #e6f6ff; mix-blend-mode: screen; opacity: .35; }
.mdeco.th { z-index: 1; }
.mdeco.swim { animation: mswim 7s ease-in-out infinite alternate; }
@keyframes mswim { from { translate: -18px 0; } to { translate: 18px -6px; } }
.mshipd { z-index: 1; filter: drop-shadow(0 8px 4px rgba(0, 40, 80, .35)); }
.hm-ui { position: absolute; left: 14px; bottom: calc(100px + env(safe-area-inset-bottom)); z-index: 5; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; pointer-events: none; }
.hm-ui > * { pointer-events: auto; }
.hm-lesson { display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 8px; border-radius: 22px; background: var(--cream); border: 3px solid var(--cocoa); box-shadow: 0 5px 0 var(--edge), 0 10px 20px rgba(0, 0, 0, .2); cursor: pointer; text-align: left; max-width: min(330px, 70vw); }
.hm-l-i img.e3 { width: 44px; height: 44px; }
.hm-l-t { display: flex; flex-direction: column; min-width: 0; } .hm-l-t small { font-size: 12px; color: var(--caramel); font-weight: 700; } .hm-l-t b { font: 700 17px/1.15 'Fredoka', 'Nunito', sans-serif; color: var(--cocoa-d); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-play { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(#4fd88a, #22a260); color: #fff; border: 3px solid #15803d; font-size: 16px; flex: none; animation: nodepulse 1.8s ease-in-out infinite; }
.hm-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.hm-chips > span, .hm-chips .tchip { padding: 4px 12px; border-radius: 999px; background: rgba(255, 248, 231, .95); border: 2.5px solid rgba(122, 62, 18, .4); font: 700 14px/1.3 'Fredoka', 'Nunito', sans-serif; color: var(--cocoa-d); }
.home3 .mapctl { position: absolute; right: 14px; bottom: calc(100px + env(safe-area-inset-bottom)); z-index: 5; }
@media (max-width: 700px) { .hm-lesson { max-width: 62vw; } .hm-l-t b { font-size: 15px; } .hm-l-i img.e3 { width: 34px; height: 34px; } .hm-chips > span, .hm-chips .tchip { font-size: 12.5px; padding: 3px 9px; } }
/* Kemada suzish */
.mvoy { position: absolute; z-index: 6; transform: translate(-50%, -80%); transition: left 4.8s cubic-bezier(.45, .05, .4, 1); pointer-events: none; }
.mvoy img.e3 { width: 100%; height: auto; filter: drop-shadow(0 10px 6px rgba(0, 40, 80, .4)); animation: mbob 1.4s ease-in-out infinite; }
.mvoy-hero { position: absolute; left: 30%; bottom: 46%; width: 42%; aspect-ratio: 60 / 82; animation: mbob 1.4s ease-in-out infinite; }
.mvoy.arrive .mvoy-hero { animation: voyjump .5s ease-in-out 4; }
@keyframes voyjump { 50% { transform: translateY(-30%); } }
.mvoy-wake { position: absolute; right: 70%; bottom: 8%; width: 120%; height: 14%; border-radius: 50%; background: radial-gradient(ellipse at right, rgba(255, 255, 255, .85), rgba(255, 255, 255, 0) 70%); opacity: 0; transition: opacity .6s; }
.mvoy.go .mvoy-wake { opacity: 1; }
.voy-banner { position: fixed; left: 50%; top: 14%; transform: translate(-50%, -20px) scale(.8); opacity: 0; z-index: 70; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 28px; border-radius: 26px; background: linear-gradient(var(--cream), #ffe9b3); border: 4px solid var(--cocoa); box-shadow: 0 7px 0 var(--edge), 0 18px 40px rgba(0, 0, 0, .3); animation: voyin .6s .1s cubic-bezier(.3, 1.6, .5, 1) forwards; text-align: center; pointer-events: none; }
.voy-banner b { font: 700 clamp(20px, 3.4vw, 30px)/1.1 'Fredoka', 'Nunito', sans-serif; color: var(--cocoa-d); }
.voy-banner span { font: 600 clamp(15px, 2.2vw, 19px)/1.2 'Fredoka', 'Nunito', sans-serif; color: var(--caramel); } .voy-banner i { font-style: normal; color: #15803d; font-weight: 700; }
.voy-banner.out { animation: voyout .5s forwards; }
@keyframes voyin { to { transform: translate(-50%, 0) scale(1); opacity: 1; } }
@keyframes voyout { to { transform: translate(-50%, -30px) scale(.9); opacity: 0; } }
.voy-fx { position: fixed; inset: 0; z-index: 65; pointer-events: none; overflow: hidden; }
.voy-bal { position: absolute; bottom: -60px; animation: voybal 5.5s ease-in forwards; }
@keyframes voybal { 0% { transform: translate(0, 0); } 50% { transform: translate(var(--sw), -55vh) rotate(8deg); } 100% { transform: translate(calc(var(--sw) * -1), -115vh) rotate(-6deg); } }
.voy-fw { position: absolute; font-size: 54px; transform: translate(-50%, -50%) scale(.2); animation: voyfw 1.1s ease-out forwards; }
@keyframes voyfw { 40% { transform: translate(-50%, -50%) scale(1.4); opacity: 1; } 100% { transform: translate(-50%, -50%) scale(1.8); opacity: 0; } }
body.onhome { background: #1690cc; }
body.onhome #scene { display: none; }
body.onhome .home3 .topbar .hello, body.onhome .home3 .topbar .ibtn, body.onhome .home3 .topbar .coinbox { box-shadow: 0 4px 0 var(--edge), 0 6px 14px rgba(0, 20, 60, .25); }
@media (min-width: 1180px) { .home3 .mapstrip { display: flex; } }
html[data-scene="barbi"] .mtint { background: #ff5fae; mix-blend-mode: color; opacity: .38; }

/* ---------- Orollar haqiqiy oroldek: rasm chetlari dengizga singib ketadi ---------- */
.map.hz .misle { -webkit-mask-image: radial-gradient(ellipse 54% 52% at 50% 50%, #000 80%, transparent 100%); mask-image: radial-gradient(ellipse 54% 52% at 50% 50%, #000 80%, transparent 100%); }
.mshipd { filter: drop-shadow(0 10px 6px rgba(0, 40, 80, .4)); }
/* Chap tomonda katta qahramon */
.hm-hero { position: absolute; left: 10px; bottom: calc(196px + env(safe-area-inset-bottom)); z-index: 4; width: clamp(150px, 15vw, 220px); display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; }
.hm-hero .herobig { width: 100%; aspect-ratio: 200 / 270; height: auto; pointer-events: auto; cursor: pointer; filter: drop-shadow(0 12px 10px rgba(0, 30, 60, .35)); }
.hm-hero .speech { font-size: clamp(14px, 1.4vw, 18px); padding: 8px 14px; white-space: nowrap; }
@media (max-width: 700px) { .hm-hero { width: 96px; bottom: calc(190px + env(safe-area-inset-bottom)); } .hm-hero .speech { display: none; } }
@media (max-height: 620px) { .hm-hero { display: none; } }
/* Fonlar: narxi va xarid */
.sc-sub { margin: 0 0 12px; font-size: 14.5px; color: var(--caramel); }
.sctile.buy .sc-pv img, .sctile.buy .sc-pv .sc-ic { filter: saturate(.55) brightness(.92); }
.sc-price { position: absolute; left: 50%; bottom: 6px; transform: translateX(-50%); font-style: normal; white-space: nowrap; font: 700 13px/1 'Fredoka', 'Nunito', sans-serif; color: #fff; background: rgba(90, 44, 11, .82); padding: 4px 9px; border-radius: 999px; }
.scbuy { gap: 10px; } .scb-pv { width: 150px; aspect-ratio: 1.1; border-radius: 20px; overflow: hidden; border: 4px solid var(--cocoa); box-shadow: 0 5px 0 var(--edge); }
.scb-pv img, .scb-pv span { display: block; width: 100%; height: 100%; object-fit: cover; }
.scok .bigglyph { animation: bqbump .6s 2; }

/* ---------- Yon tomondan ko'rinadigan dunyo ---------- */
.map.sidemap { background: #8fd8ff none; }
.map.sidemap .mapsvg { position: absolute; inset: 0; width: 100%; height: 100%; }
.map.sidemap .mfar { position: absolute; left: 0; top: 0; height: 100%; will-change: transform; pointer-events: none; }
.map.sidemap .mcl { animation: none; }
.mdeco.ly-back { z-index: 0; filter: drop-shadow(0 8px 5px rgba(20, 50, 10, .3)); }
.mdeco.ly-far { opacity: .95; filter: drop-shadow(0 10px 8px rgba(20, 50, 10, .25)) saturate(.9); }
.mdeco.ly-front { z-index: 2; }
.mdeco.ly-cover { z-index: 3; opacity: .96; pointer-events: none; }
.map.sidemap .mnode { z-index: 2; }
.map.sidemap .mhero { z-index: 3; width: 74px; height: 100px; transform: translate(-50%, -92%); }
.mhero.walk { animation: herowalk .42s ease-in-out infinite; }
@keyframes herowalk { 0%, 100% { translate: 0 0; rotate: -3deg; } 50% { translate: 0 -8px; rotate: 3deg; } }
.msign { position: absolute; z-index: 1; transform: translate(-50%, -100%); display: flex; flex-direction: column; align-items: center; pointer-events: none; }
.msign .ms-b { padding: 6px 14px 7px; border-radius: 12px; background: linear-gradient(#f0a14a, #c8701a); border: 3px solid #5a2c0b; box-shadow: 0 4px 0 #5a2c0b; font: 700 clamp(13px, 1.8vw, 17px)/1 'Fredoka', 'Nunito', sans-serif; color: var(--cream); text-shadow: 0 2px 0 #5a2c0b; white-space: nowrap; letter-spacing: .5px; }
.msign i { width: 9px; height: 46px; background: linear-gradient(90deg, #c98245, #8a4b14); border: 2px solid #5a2c0b; border-top: 0; }
.map.sidemap .mchest { z-index: 2; }
/* yon dunyo: xarita pastki menyudan yuqorida tugaydi, yo'l va bekatlar to'liq ko'rinadi */
body.hasnav .home3 .hm-box { bottom: calc(88px + env(safe-area-inset-bottom)); }
.home3 .hm-ui { top: 10px; bottom: auto; }
.home3 .mapctl { top: 10px; bottom: auto; }
.map.sidemap .mhero { width: 96px; height: 130px; }
@media (max-width: 700px) { .map.sidemap .mhero { width: 80px; height: 108px; } }
/* ===== To'liq ekran xarita: hamma tugma va yozuvlar xarita ustida, shaffof ===== */
body.onhome .home3 .hm-box, body.onhome.hasnav .home3 .hm-box { inset: 0 !important; top: 0 !important; bottom: 0 !important; }
body.onhome .home3 .hm-ui, body.onhome .home3 .mapctl { top: var(--hmtop, 140px); bottom: auto; }
body.onhome .home3 .topbar { pointer-events: none; }
body.onhome .home3 .topbar > * { pointer-events: auto; }
body.onhome .home3 .topbar .hello, body.onhome .home3 .topbar .ibtn, body.onhome .home3 .topbar .coinbox, body.onhome .gear,
body.onhome .home3 .hm-lesson, body.onhome .home3 .mapme, body.onhome .home3 .hm-chips > span, body.onhome .home3 .hm-chips .tchip {
    background: color-mix(in srgb, var(--cream) 45%, transparent); border-color: rgba(255, 255, 255, .7);
    -webkit-backdrop-filter: blur(8px) saturate(1.3); backdrop-filter: blur(8px) saturate(1.3);
    box-shadow: 0 4px 14px rgba(0, 30, 60, .22), inset 0 1px 0 rgba(255, 255, 255, .6);
}
body.onhome .gear { border: 3px solid rgba(255, 255, 255, .7); }
body.onhome .home3 .hm-strip { background: color-mix(in srgb, var(--cream) 35%, transparent); border: 2px solid rgba(255, 255, 255, .55); box-shadow: 0 4px 14px rgba(0, 30, 60, .18); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
body.onhome .kidnav { background: color-mix(in srgb, var(--honey-m) 40%, transparent); border-color: rgba(255, 255, 255, .7); -webkit-backdrop-filter: blur(10px) saturate(1.4); backdrop-filter: blur(10px) saturate(1.4); box-shadow: 0 8px 24px rgba(0, 30, 60, .25), inset 0 1px 0 rgba(255, 255, 255, .6); }
body.onhome .kidnav::before { opacity: .5; }
body.onhome .kidnav .nv.on { background: color-mix(in srgb, var(--cocoa) 80%, transparent); }
body.onhome .home3 .hl-t b, body.onhome .home3 .hm-l-t b, body.onhome .home3 .coinbox b, body.onhome .home3 .hm-chips > span { text-shadow: 0 1px 0 rgba(255, 255, 255, .8); }
/* ===== Qahramon: yo'l ustida to'liq ko'rinadi, nafas oladi, ko'z qisadi, sakrab o'ynaydi ===== */
.map.sidemap .mhero { z-index: 6; animation: none; transform: translate(-50%, -97%); filter: drop-shadow(0 10px 6px rgba(30, 20, 0, .28)) drop-shadow(0 2px 1px rgba(0, 0, 0, .2)); }
.map.sidemap .mhero::after { content: ''; position: absolute; left: 18%; right: 18%; bottom: -1%; height: 7%; border-radius: 50%; background: radial-gradient(rgba(20, 20, 0, .38), rgba(20, 20, 0, 0) 70%); z-index: -1; }
.map.sidemap .mhero > svg { display: block; transform-origin: 50% 98%; animation: heroidle 2.8s ease-in-out infinite; }
.map.sidemap .mhero.walk { animation: none; }
.map.sidemap .mhero.walk > svg { animation: herostep .44s ease-in-out infinite; }
.map.sidemap .mhero.dance > svg { animation: herodance .95s cubic-bezier(.3, .6, .4, 1) infinite; }
.map.sidemap .mhero.dance::after { animation: heroshad .95s cubic-bezier(.3, .6, .4, 1) infinite; }
@keyframes heroidle { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.012, .985); } }
@keyframes herostep { 0%, 100% { transform: translateY(0) rotate(-3deg); } 25% { transform: translateY(-6%) rotate(0); } 50% { transform: translateY(0) rotate(3deg); } 75% { transform: translateY(-6%) rotate(0); } }
@keyframes herodance { 0% { transform: translateY(0) scale(1.08, .9); } 30% { transform: translateY(-34%) rotate(-10deg) scale(.95, 1.06); } 50% { transform: translateY(-40%) rotate(10deg); } 78% { transform: translateY(0) scale(1.1, .88); } 100% { transform: translateY(0) scale(1, 1); } }
@keyframes heroshad { 0%, 78%, 100% { transform: scale(1); opacity: 1; } 45% { transform: scale(.55); opacity: .45; } }
.mhero .eyes, .nx-hero .eyes { transform-box: fill-box; transform-origin: center; animation: heroblink 4.6s infinite; }
@keyframes heroblink { 0%, 93%, 100% { transform: scaleY(1); } 95.5% { transform: scaleY(.08); } }
.map.sidemap .ly-cover { z-index: 4; }

/* ===== Jonli dunyo: mashinalar, mollar, samolyot, qushlar, quyosh ===== */
.mcar { position: absolute; left: 0; z-index: 0; height: auto; pointer-events: none; transform: translate(-200px, -86%); animation: carL var(--cd, 120s) linear infinite; filter: drop-shadow(0 3px 2px rgba(0, 0, 0, .3)); }
.mcar.r { animation-name: carR; }
@keyframes carL { from { transform: translate(calc(var(--mw, 3000px) + 100px), -86%); } to { transform: translate(-160px, -86%); } }
@keyframes carR { from { transform: translate(-160px, -86%) scaleX(-1); } to { transform: translate(calc(var(--mw, 3000px) + 100px), -86%) scaleX(-1); } }
.mdeco.graze { animation: graze 11s ease-in-out infinite alternate; }
.mdeco.graze.flip { scale: -1 1; animation-duration: 14s; }
@keyframes graze { 0%, 30% { translate: -16px 0; rotate: 0deg; } 45% { rotate: 4deg; } 60%, 100% { translate: 16px 0; rotate: 0deg; } }
.amb { position: absolute; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; }
.amb-sun { position: absolute; right: 14%; top: 24%; width: 92px; height: 92px; border-radius: 50%; background: radial-gradient(circle, #fffbe0 0 30%, #ffe27a 46%, rgba(255, 226, 122, 0) 72%); box-shadow: 0 0 80px 40px rgba(255, 240, 170, .35); opacity: .9; }
html[data-scene="tun"] .amb-sun { background: radial-gradient(circle, #f8fafc 0 30%, #dbe4f5 46%, rgba(219, 228, 245, 0) 72%); box-shadow: 0 0 60px 26px rgba(220, 230, 255, .25); }
.amb-plane { position: absolute; left: 0; width: 120px; display: flex; align-items: center; animation: planeR 46s linear infinite; }
.amb-plane svg { width: 100%; height: auto; filter: drop-shadow(0 4px 3px rgba(0, 30, 70, .25)); }
.amb-trail { position: absolute; right: 88%; top: 52%; width: 46vw; height: 4px; border-radius: 4px; background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .85)); filter: blur(1px); }
.amb-plane.p1 { top: 27%; }
.amb-plane.p2 { top: 34%; width: 72px; animation-name: planeL; animation-duration: 58s; animation-delay: -24s; opacity: .85; }
.amb-plane.p2 svg, .amb-plane.p2 .amb-trail { transform: scaleX(-1); }
.amb-plane.p2 .amb-trail { right: auto; left: 88%; transform: scaleX(-1); }
@keyframes planeR { 0% { transform: translateX(-160px); } 55%, 100% { transform: translateX(calc(100vw + 50vw)); } }
@keyframes planeL { 0% { transform: translateX(calc(100vw + 50vw)); } 55%, 100% { transform: translateX(-60vw); } }
.amb-flock { position: absolute; left: 0; width: 120px; animation: flockR 34s linear infinite; }
.amb-flock.f1 { top: 40%; }
.amb-flock.f2 { top: 31%; width: 86px; animation-duration: 42s; animation-delay: -15s; }
.amb-flock.f3 { top: 46%; width: 64px; animation-name: flockL; animation-duration: 38s; animation-delay: -6s; }
.amb-w { transform-box: fill-box; transform-origin: 50% 100%; animation: wingflap .5s ease-in-out infinite alternate; }
@keyframes wingflap { from { transform: scaleY(1); } to { transform: scaleY(-.5); } }
@keyframes flockR { 0% { transform: translate(-140px, 0); } 50% { transform: translate(50vw, -18px); } 100% { transform: translate(calc(100vw + 40px), 6px); } }
@keyframes flockL { 0% { transform: translate(calc(100vw + 40px), 0) scaleX(-1); } 100% { transform: translate(-140px, -20px) scaleX(-1); } }
@media (max-width: 700px) { .amb-plane.p1 { width: 86px; top: 32%; } .amb-plane.p2 { width: 56px; top: 38%; } .amb-sun { width: 66px; height: 66px; right: 8%; } }
@media (prefers-reduced-motion: reduce) { .mcar, .amb-plane, .amb-flock, .amb-w, .mdeco.graze { animation: none; } .mcar { display: none; } }

/* ===== Keyingi dars oynasi ===== */
.nxcard { text-align: center; max-width: 420px; padding-top: 18px; }
.nx-top { display: flex; align-items: flex-end; justify-content: center; gap: 10px; }
.nx-hero { width: 120px; height: 162px; flex: none; animation: nxjump 1.2s ease-in-out infinite; transform-origin: 50% 100%; }
.nx-hero svg { width: 100%; height: 100%; }
@keyframes nxjump { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-12px) rotate(-3deg); } }
.nx-glyph { border-radius: 18px; overflow: hidden; box-shadow: 0 6px 16px rgba(60, 30, 5, .2); background: #fff; }
.nx-glyph svg { display: block; }
.nx-sub { display: block; margin-top: 10px; font: 700 14px/1 'Fredoka', 'Nunito', sans-serif; color: var(--caramel); letter-spacing: .5px; text-transform: uppercase; }
.nx-t { margin: 4px 0 14px; font: 700 clamp(22px, 4vw, 28px)/1.15 'Fredoka', 'Nunito', sans-serif; color: var(--cocoa-d); }
.nx-btns { display: flex; flex-direction: column; gap: 10px; align-items: stretch; }
.nx-btns .btn { justify-content: center; }
.nx-go { font-size: 22px; padding: 14px 20px; color: #fff; background: linear-gradient(#4fd88a, #22a260); border-color: #15803d; box-shadow: 0 5px 0 #15803d, 0 10px 22px rgba(21, 128, 61, .35); animation: nxpulse 1.6s ease-in-out infinite; }
@keyframes nxpulse { 50% { transform: scale(1.04); } }

.voy-banner { width: max-content; max-width: 92vw; }
/* ===== Realroq interfeys: shishasimon, yorug'lik aksi va chuqurlik ===== */
body.onhome .home3 .topbar .hello, body.onhome .home3 .topbar .ibtn, body.onhome .home3 .topbar .coinbox, body.onhome .gear,
body.onhome .home3 .hm-lesson, body.onhome .home3 .mapme {
    background-image: linear-gradient(180deg, rgba(255, 255, 255, .62) 0%, rgba(255, 255, 255, .18) 48%, rgba(255, 255, 255, .06) 52%, rgba(255, 255, 255, .28) 100%);
    box-shadow: 0 8px 22px rgba(0, 30, 60, .25), 0 2px 4px rgba(0, 30, 60, .15), inset 0 1px 1px rgba(255, 255, 255, .9), inset 0 -2px 6px rgba(0, 40, 80, .12);
}
body.onhome .kidnav { background-image: linear-gradient(180deg, color-mix(in srgb, var(--honey-l) 70%, transparent), color-mix(in srgb, var(--honey) 35%, transparent) 50%, color-mix(in srgb, var(--amber) 45%, transparent)); box-shadow: 0 12px 30px rgba(0, 30, 60, .3), inset 0 1px 1px rgba(255, 255, 255, .9), inset 0 -3px 8px rgba(150, 80, 0, .2); }
body.onhome .kidnav .nv.on { background: linear-gradient(var(--cocoa), var(--cocoa-d)); box-shadow: inset 0 2px 4px rgba(0, 0, 0, .4), 0 1px 0 rgba(255, 255, 255, .4); }
body.onhome .home3 .hm-strip .mchip { box-shadow: 0 3px 0 rgba(90, 44, 11, .35), inset 0 1px 0 rgba(255, 255, 255, .8); }
.voy-banner { background: linear-gradient(180deg, rgba(255, 252, 240, .94), rgba(255, 233, 179, .9)); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
/* Orollar xaritasida qahramon: sakrab o'ynash */
.map.hz:not(.sidemap) .mhero.dance { animation: none; }
.map.hz:not(.sidemap) .mhero.dance > svg { animation: herodance .95s cubic-bezier(.3, .6, .4, 1) infinite; transform-origin: 50% 98%; }
/* Orollar: dengiz butun ekranda, orollar esa harflar qatori va pastki menyu orasida (tugmalar ostida qolmaydi) */
body.onhome .mapwrap.hz { background: #1690cc url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='90' height='46'%3E%3Cpath d='M6 16q8-7 16 0t16 0M50 36q7-6 14 0t14 0' stroke='%23bdf2ff' stroke-width='2' fill='none' stroke-linecap='round' opacity='.55'/%3E%3C/svg%3E") repeat; background-size: 90px 46px; }
body.onhome .mapwrap.hz .map.hz:not(.sidemap) { height: calc(100% - var(--hmtop, 130px) - 92px - env(safe-area-inset-bottom)); margin-top: var(--hmtop, 130px); }
body.onhome:not(.hasnav) .mapwrap.hz .map.hz:not(.sidemap) { height: calc(100% - var(--hmtop, 130px) - 8px); }
/* orollar: "Bugungi dars" kartasi orolni yopmasin */
body.onhome .home3.isles .mapwrap.hz .map.hz { height: calc(100% - var(--hmtop2, 240px) - 92px - env(safe-area-inset-bottom)); margin-top: var(--hmtop2, 240px); }
@media (min-width: 1180px) {
  body.onhome .home3.isles .hm-ui { top: auto; bottom: calc(18px + env(safe-area-inset-bottom)); flex-direction: column-reverse; }
  body.onhome .home3.isles .mapwrap.hz .map.hz { height: calc(100% - var(--hmtop, 130px) - 92px - env(safe-area-inset-bottom)); margin-top: var(--hmtop, 130px); }
}
.map.imgmap:not(.hz) .mhero.dance > svg { animation: herodance .95s cubic-bezier(.3, .6, .4, 1) infinite; transform-origin: 50% 98%; }
/* ===== Vertikal orollar orasidagi o'tish yo'llari va transport ===== */
.map.imgmap:not(.hz) .misle { -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 6%, #000 93%, transparent 100%); mask-image: linear-gradient(to bottom, transparent 0, #000 6%, #000 93%, transparent 100%); }
.mlink { position: absolute; transform: translateX(-50%); z-index: 0; pointer-events: none; }
.mlink.bridge { border-left: 7px solid #7a3e12; border-right: 7px solid #7a3e12; background: repeating-linear-gradient(180deg, #c98a4a 0 14px, #a8682c 14px 17px); box-shadow: 0 0 0 3px #5a2c0b, 10px 14px 0 rgba(0, 40, 80, .25); border-radius: 6px; }
.mlink.bridge::before, .mlink.bridge::after { content: ''; position: absolute; top: 0; bottom: 0; width: 5px; background: repeating-linear-gradient(180deg, #5a2c0b 0 6px, transparent 6px 36px); }
.mlink.bridge::before { left: -14px; } .mlink.bridge::after { right: -14px; }
.mlink.bridge .pier { position: absolute; left: -10px; right: -10px; height: 16px; background: linear-gradient(#8a4b14, #5a2c0b); border-radius: 4px; box-shadow: 0 10px 0 rgba(0, 40, 80, .25); }
.pier.p1 { top: 22%; } .pier.p2 { top: 50%; } .pier.p3 { top: 78%; }
.mlink.lane { background: repeating-linear-gradient(180deg, rgba(255, 255, 255, .55) 0 18px, transparent 18px 46px); width: 6px !important; border-radius: 3px; opacity: .8; }
.mlink.cable { width: 3px; background: #334155; box-shadow: 18px 0 0 #475569; }
.mlink.cable .tower { position: absolute; left: -16px; width: 38px; height: 46px; background: linear-gradient(90deg, #64748b, #334155); clip-path: polygon(40% 0, 60% 0, 100% 100%, 0 100%); }
.tower.t1 { top: -6px; } .tower.t2 { bottom: -40px; }
.mveh { position: absolute; z-index: 3; transform: translate(-50%, -50%); pointer-events: none; }
.mveh > img.e3, .mveh > svg { position: relative; display: block; width: 100%; height: auto; filter: drop-shadow(0 8px 5px rgba(0, 30, 70, .35)); }
.v-ship > img.e3 { animation: vship 2s ease-in-out infinite; }
@keyframes vship { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-6%) rotate(3deg); } }
.v-plane > svg, .v-heli > svg { animation: vhover 2.6s ease-in-out infinite; }
.v-cable > svg { animation: vswing 3s ease-in-out infinite; transform-origin: 50% 0; }
@keyframes vhover { 50% { transform: translateY(-8px); } }
@keyframes vswing { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg); } }
.v-heli .rotor { transform-box: fill-box; transform-origin: center; animation: rotor .18s linear infinite; }
@keyframes rotor { 0% { transform: scaleX(1); } 50% { transform: scaleX(.15); } 100% { transform: scaleX(1); } }
.v-heli .trot { transform-box: fill-box; transform-origin: center; animation: rotor .2s linear infinite; }
.vshadow { position: absolute; left: 20%; right: 20%; top: 115%; height: 22%; border-radius: 50%; background: radial-gradient(rgba(0, 30, 60, .35), rgba(0, 30, 60, 0) 70%); }
.vwake { position: absolute; left: 15%; right: 15%; bottom: 100%; height: 90%; background: linear-gradient(to top, rgba(255, 255, 255, .7), rgba(255, 255, 255, 0)); border-radius: 50% 50% 0 0; opacity: 0; transition: opacity .6s; }
.v-ship.go .vwake { opacity: 1; }
.mveh-hero { position: absolute; left: 22%; bottom: 52%; width: 56%; aspect-ratio: 60 / 82; z-index: 2; }
.mveh-hero svg { width: 100%; height: 100%; }
.v-plane .mveh-hero { bottom: 30%; } .v-cable .mveh-hero { bottom: 18%; left: 24%; width: 52%; } .v-heli .mveh-hero { bottom: 34%; left: 44%; width: 40%; }
.mveh.ride { z-index: 7; }
.mveh.arrive .mveh-hero { animation: voyjump .5s ease-in-out 4; }

/* ===== Shaffof interfeys (vertikal bosh ekran) ===== */
body.glasshome .hometop .hello, body.glasshome .hometop .ibtn, body.glasshome .hometop .coinbox, body.glasshome .gear,
body.glasshome .home2 .speech, body.glasshome .home2 .todaychip span, body.glasshome .home2 .sd-card, body.glasshome .home2 .mz, body.glasshome .home2 .mapme {
    background-color: color-mix(in srgb, var(--cream) 45%, transparent); border-color: rgba(255, 255, 255, .75);
    background-image: linear-gradient(180deg, rgba(255, 255, 255, .6) 0%, rgba(255, 255, 255, .16) 48%, rgba(255, 255, 255, .05) 52%, rgba(255, 255, 255, .26) 100%);
    -webkit-backdrop-filter: blur(10px) saturate(1.35); backdrop-filter: blur(10px) saturate(1.35);
    box-shadow: 0 8px 22px rgba(0, 30, 60, .2), 0 2px 4px rgba(0, 30, 60, .12), inset 0 1px 1px rgba(255, 255, 255, .9), inset 0 -2px 6px rgba(0, 40, 80, .1);
}
body.glasshome .home2 .speech::after { opacity: .55; }
body.glasshome .home2 .mapwrap { border-color: rgba(255, 255, 255, .7); box-shadow: 0 14px 34px rgba(0, 30, 60, .28), inset 0 0 0 1px rgba(255, 255, 255, .5); }
body.glasshome .home2 .mapstrip { background: color-mix(in srgb, var(--cream) 35%, transparent); border-radius: 999px; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
body.glasshome .home2 .sd-chips .mchip, body.glasshome .home2 .mapstrip .mchip { box-shadow: 0 3px 0 rgba(90, 44, 11, .3), inset 0 1px 0 rgba(255, 255, 255, .8); }
body.glasshome .kidnav { background: color-mix(in srgb, var(--honey-m) 42%, transparent); border-color: rgba(255, 255, 255, .75); background-image: linear-gradient(180deg, color-mix(in srgb, var(--honey-l) 65%, transparent), color-mix(in srgb, var(--honey) 30%, transparent) 50%, color-mix(in srgb, var(--amber) 42%, transparent)); -webkit-backdrop-filter: blur(10px) saturate(1.4); backdrop-filter: blur(10px) saturate(1.4); box-shadow: 0 12px 30px rgba(0, 30, 60, .28), inset 0 1px 1px rgba(255, 255, 255, .9), inset 0 -3px 8px rgba(150, 80, 0, .2); }
body.glasshome .kidnav .nv.on { background: linear-gradient(var(--cocoa), var(--cocoa-d)); box-shadow: inset 0 2px 4px rgba(0, 0, 0, .4), 0 1px 0 rgba(255, 255, 255, .4); }
.v-plane > svg { rotate: 180deg; }
/* ===== Vertikal xarita fonga moslashadi ===== */
.mveh.v-th > img.e3 { animation: vhover 2.4s ease-in-out infinite; }
html[data-scene="barbi"] .map.imgmap, html[data-scene="barbi"] .mapwrap:has(.imgmap) { background: #f7a8d2; }
html[data-scene="barbi"] .map.imgmap:not(.hz) .misle { filter: saturate(1.15) brightness(1.04); }
html[data-scene="barbi"] .mlink.bridge { background: repeating-linear-gradient(180deg, #ffb3d9 0 14px, #f472b6 14px 17px); border-color: #db2777; box-shadow: 0 0 0 3px #9d174d, 10px 14px 0 rgba(120, 0, 60, .2); }
html[data-scene="barbi"] .v-bridge > img.e3 { filter: hue-rotate(-28deg) saturate(1.4) brightness(1.1) drop-shadow(0 8px 5px rgba(0, 30, 70, .35)); }
html[data-scene="barbi"] .mzone { background: linear-gradient(#ff8cc6, #e5489a); border-color: #9d174d; box-shadow: 0 4px 0 #9d174d, 0 8px 14px rgba(0, 0, 0, .25); text-shadow: 0 2px 0 #9d174d; }
html[data-scene="nemo"] .map.imgmap, html[data-scene="nemo"] .mapwrap:has(.imgmap), html[data-scene="dengiz"] .map.imgmap, html[data-scene="dengiz"] .mapwrap:has(.imgmap) { background: #0b5fa5; }
html[data-scene="nemo"] .mzone, html[data-scene="dengiz"] .mzone { background: linear-gradient(#ff9f43, #f2711c); border-color: #fff; box-shadow: 0 4px 0 #0b4f8a, 0 8px 14px rgba(0, 0, 0, .25); text-shadow: 0 2px 0 #b9500e; }
html[data-scene="madagaskar"] .mtint { display: block; background: #ffd27a; mix-blend-mode: soft-light; opacity: .55; }
html[data-scene="madagaskar"] .mzone { background: linear-gradient(#8bd65a, #4f9a2a); border-color: #2f5e18; box-shadow: 0 4px 0 #2f5e18, 0 8px 14px rgba(0, 0, 0, .25); text-shadow: 0 2px 0 #2f5e18; }
html[data-scene="chipdeyl"] .mzone, html[data-scene="kuz"] .mzone { background: linear-gradient(#e0913a, #a85a16); }
html[data-scene="futbol"] .mtint { display: block; background: linear-gradient(90deg, rgba(60, 170, 70, .9), rgba(90, 200, 90, .9)); mix-blend-mode: soft-light; opacity: .4; }
html[data-scene="futbol"] .mzone { background: linear-gradient(#ffffff, #dfe6ee); color: #1f2937; border-color: #1f2937; box-shadow: 0 4px 0 #1f2937, 0 8px 14px rgba(0, 0, 0, .25); text-shadow: none; }
html[data-scene="koinot"] .map.imgmap, html[data-scene="koinot"] .mapwrap:has(.imgmap) { background: #1a0b3d radial-gradient(circle at 20% 30%, #fff 0 1px, transparent 2px) 0 0 / 60px 60px; }
html[data-scene="koinot"] .mzone { background: linear-gradient(#7c5cff, #4b2a8a); border-color: #e9d5ff; }
html[data-scene="tun"] .map.imgmap, html[data-scene="tun"] .mapwrap:has(.imgmap) { background: #0e2346; }
html[data-scene="qish"] .map.imgmap, html[data-scene="muz"] .map.imgmap { background: #7fc3ea; }
/* kuchliroq mavzu ranglari (vertikal orollar) */
html[data-scene="nemo"] .map.imgmap:not(.hz) .mtint, html[data-scene="dengiz"] .map.imgmap:not(.hz) .mtint { display: block; background: linear-gradient(180deg, #19b3c9, #0b5fa5); mix-blend-mode: color; opacity: .42; }
html[data-scene="nemo"] .map.imgmap:not(.hz) .misle, html[data-scene="dengiz"] .map.imgmap:not(.hz) .misle { filter: saturate(1.2) brightness(.95); }
html[data-scene="madagaskar"] .map.imgmap:not(.hz) .mtint { background: linear-gradient(180deg, #ffcf5a, #f29d38); mix-blend-mode: multiply; opacity: .38; }
html[data-scene="futbol"] .map.imgmap:not(.hz) .mtint { display: block; background: repeating-linear-gradient(180deg, #2fa84f 0 70px, #49c768 70px 140px); mix-blend-mode: color; opacity: .45; }
html[data-scene="chipdeyl"] .map.imgmap:not(.hz) .mtint { background: linear-gradient(180deg, #f4b35e, #c46a1f); mix-blend-mode: multiply; opacity: .45; }
.map.imgmap:not(.hz) .mdeco.th { z-index: 2; filter: drop-shadow(0 6px 4px rgba(0, 30, 50, .35)); }
/* ===== BALON CHIZ o'yini ===== */
.carscreen { display: flex; flex-direction: column; gap: 8px; height: 100%; min-height: 0; }
.carscreen .topbar { flex: none; }
.car-hud { display: flex; align-items: center; gap: 10px; justify-content: center; min-width: 0; }
.car-lv { font: 700 18px/1 'Fredoka', 'Nunito', sans-serif; color: var(--cocoa-d); background: var(--cream); border: 3px solid var(--cocoa); border-radius: 999px; padding: 6px 12px; white-space: nowrap; }
.car-time { font: 700 18px/1 'Fredoka', 'Nunito', sans-serif; color: #fff; background: #2563eb; border-radius: 999px; padding: 7px 12px; min-width: 64px; text-align: center; font-variant-numeric: tabular-nums; }
.car-time.low { background: #dc2626; animation: nodepulse 1s ease-in-out infinite; }
.car-prog { flex: 1 1 140px; max-width: 260px; height: 14px; border-radius: 999px; background: rgba(90, 44, 11, .15); border: 2px solid var(--cocoa); overflow: hidden; }
.car-prog i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #22c55e, #84cc16); }
.carstage { position: relative; flex: 1 1 auto; min-height: 220px; border-radius: 24px; overflow: hidden; border: 4px solid var(--cocoa); box-shadow: 0 6px 0 var(--edge), 0 14px 26px rgba(0, 0, 0, .18); background: #bfeaff; }
.carstage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.car-msg { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); max-width: 90%; padding: 8px 16px; border-radius: 16px; background: rgba(255, 250, 238, .94); border: 3px solid var(--cocoa); font: 700 16px/1.25 'Fredoka', 'Nunito', sans-serif; color: var(--cocoa-d); text-align: center; opacity: 0; pointer-events: none; }
.car-msg.show { animation: carmsg 3.6s ease forwards; }
@keyframes carmsg { 0% { opacity: 0; transform: translate(-50%, -8px); } 10%, 80% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; } }
.cardraw { flex: none; display: flex; align-items: stretch; gap: 12px; padding: 10px; border-radius: 22px; background: var(--cream); border: 3px solid var(--cocoa); box-shadow: 0 5px 0 var(--edge); }
.cd-l { display: flex; flex-direction: column; justify-content: center; gap: 4px; min-width: 0; flex: 1; }
.cd-l b { font: 700 20px/1.1 'Fredoka', 'Nunito', sans-serif; color: var(--cocoa-d); }
.cd-l small { font-size: 13px; color: var(--caramel); line-height: 1.3; }
.cd-box { position: relative; flex: none; width: min(240px, 46vw); height: 150px; border-radius: 16px; background: #fff repeating-linear-gradient(0deg, transparent 0 23px, rgba(59, 130, 246, .12) 23px 24px); border: 3px dashed #c58a4a; }
.cd-box canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }
.cd-hint { position: absolute; inset: 0; display: grid; place-items: center; font: 700 17px/1 'Fredoka', 'Nunito', sans-serif; color: #c58a4a; pointer-events: none; animation: nodepulse 1.6s ease-in-out infinite; }
@media (max-width: 700px) { .cardraw { flex-direction: column; gap: 6px; padding: 8px; } .cd-l small { display: none; } .cd-box { width: 100%; height: 130px; } .car-prog { display: none; } .car-lv, .car-time { font-size: 15px; } }
.car-stars { display: flex; gap: 8px; font-size: 54px; line-height: 1; }
.car-stars span { color: #d6d3d1; } .car-stars span.on { color: #facc15; text-shadow: 0 3px 0 #b45309; }
.carlv-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; width: min(380px, 80vw); }
.carlv-b { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px; border-radius: 16px; border: 3px solid var(--cocoa); background: linear-gradient(#fff3c4, #ffd56b); color: var(--cocoa-d); cursor: pointer; font: 700 22px/1 'Fredoka', 'Nunito', sans-serif; }
.carlv-b small { font-size: 12px; color: #b45309; min-height: 12px; }
.carlv-b.cur { background: linear-gradient(#bbf7d0, #4ade80); }
.carlv-b.lock { background: #eee; border-color: #bbb; color: #999; cursor: default; }
.cd-hint[hidden] { display: none; }
.carscreen .topbar .sp.car-hud { justify-content: flex-start; overflow: hidden; }
@media (max-width: 700px) { .car-lv span { display: none; } .car-lv::before { content: '⭐ '; } .carscreen .topbar .coinbox { display: none; } .carscreen .topbar { gap: 6px; } }
.car-stars span img.e3 { width: 56px; height: 56px; }
.car-stars span:not(.on) img.e3 { filter: grayscale(1) opacity(.35); }
.carres .row .btn { min-width: 0; }

/* ===================================================================
   FONGA MOS INTERFEYS: tanlangan fon butun ilova ranglarini, tugmalarini va bezaklarini o'zgartiradi
   =================================================================== */
html[data-scene="barbi"] { --honey-hi: #fff0f7; --honey-l2: #ffd3e8; --honey-l: #ffc1df; --honey-m: #ff9dcb; --honey: #ff7ab8; --amber: #e8559b; --caramel: #d63f86; --cocoa: #9d1f5f; --cocoa-d: #7a1048; --cocoa-s: #a8336f; --edge: #c2477f; --cream: #fff2f8; --cream-2: #ffe1ef; --sand: #f9c9de; --sand-d: #ee9cc1; --ink: #6b1a43; --lapis: #d63f86; --lapis-d: #7a1048; --p: #e8559b; --page: #fff2f8; --gold: #ff7ab8; }
html[data-scene="nemo"] { --honey-hi: #e9fbff; --honey-l2: #c6f1ff; --honey-l: #9fe8ff; --honey-m: #5fd0f5; --honey: #35b8ec; --amber: #1e8fd6; --caramel: #ff7a1a; --cocoa: #0b4f8a; --cocoa-d: #083a66; --cocoa-s: #13609e; --edge: #1f6fae; --cream: #effaff; --cream-2: #d9f3ff; --sand: #ffd9a8; --sand-d: #f2b46a; --ink: #0b3a5e; --lapis: #ff7a1a; --lapis-d: #083a66; --p: #1e8fd6; --page: #effaff; --gold: #35b8ec; }
html[data-scene="dengiz"] { --honey-hi: #e9fbff; --honey-l2: #c6f1ff; --honey-l: #9fe8ff; --honey-m: #5fd0f5; --honey: #35b8ec; --amber: #1e8fd6; --caramel: #ff7a1a; --cocoa: #0b4f8a; --cocoa-d: #083a66; --cocoa-s: #13609e; --edge: #1f6fae; --cream: #effaff; --cream-2: #d9f3ff; --sand: #ffd9a8; --sand-d: #f2b46a; --ink: #0b3a5e; --lapis: #ff7a1a; --lapis-d: #083a66; --p: #1e8fd6; --page: #effaff; --gold: #35b8ec; }
html[data-scene="chipdeyl"] { --honey-hi: #fff3d6; --honey-l2: #f9dca6; --honey-l: #f6cf8a; --honey-m: #e9a955; --honey: #d98a3a; --amber: #b9662a; --caramel: #a0521b; --cocoa: #5b3417; --cocoa-d: #40230c; --cocoa-s: #6d4120; --edge: #8a5428; --cream: #fdf3e1; --cream-2: #f5e2c0; --sand: #e6c79a; --sand-d: #c99a5e; --ink: #4a2a10; --lapis: #a0521b; --lapis-d: #40230c; --p: #b9662a; --page: #fdf3e1; --gold: #d98a3a; }
html[data-scene="madagaskar"] { --honey-hi: #f3ffd9; --honey-l2: #dcf7ad; --honey-l: #c9ef8a; --honey-m: #9fdc55; --honey: #7cc53a; --amber: #4f9a25; --caramel: #e08a1e; --cocoa: #2f5a17; --cocoa-d: #1f420d; --cocoa-s: #3c6e20; --edge: #4a7f28; --cream: #f7fbe9; --cream-2: #e8f5c8; --sand: #f0dca0; --sand-d: #d6b45e; --ink: #22401a; --lapis: #e08a1e; --lapis-d: #1f420d; --p: #4f9a25; --page: #f7fbe9; --gold: #7cc53a; }
html[data-scene="futbol"] { --honey-hi: #f2fff2; --honey-l2: #d3f6d3; --honey-l: #b6f0b6; --honey-m: #6fd36f; --honey: #3fb94f; --amber: #23913a; --caramel: #1f2937; --cocoa: #14532d; --cocoa-d: #0b3a1f; --cocoa-s: #166534; --edge: #1f7a3a; --cream: #f6fff6; --cream-2: #e3f7e3; --sand: #ffffff; --sand-d: #cfd8cf; --ink: #10301c; --lapis: #1f2937; --lapis-d: #0b3a1f; --p: #23913a; --page: #f6fff6; --gold: #3fb94f; }
html[data-scene="koinot"] { --honey-hi: #f3edff; --honey-l2: #ddd0ff; --honey-l: #cdb8ff; --honey-m: #a58bff; --honey: #8a6cff; --amber: #6a4be0; --caramel: #ff6bd6; --cocoa: #2e1a6b; --cocoa-d: #1e1050; --cocoa-s: #3b2585; --edge: #4a33a0; --cream: #f6f2ff; --cream-2: #e6dcff; --sand: #d2c4ff; --sand-d: #a993f0; --ink: #24135a; --lapis: #ff6bd6; --lapis-d: #1e1050; --p: #6a4be0; --page: #f6f2ff; --gold: #8a6cff; }
html[data-scene="qish"] { --honey-hi: #ffffff; --honey-l2: #e8f6ff; --honey-l: #d8efff; --honey-m: #a9daf8; --honey: #7cc4f0; --amber: #4aa3dd; --caramel: #2f7fc0; --cocoa: #1d4f7a; --cocoa-d: #133a5c; --cocoa-s: #24608f; --edge: #3a78a8; --cream: #f7fbff; --cream-2: #e3f2ff; --sand: #cfe6f7; --sand-d: #9cc8e8; --ink: #173a5a; --lapis: #2f7fc0; --lapis-d: #133a5c; --p: #4aa3dd; --page: #f7fbff; --gold: #7cc4f0; }
html[data-scene="muz"] { --honey-hi: #ffffff; --honey-l2: #e8f6ff; --honey-l: #d8efff; --honey-m: #a9daf8; --honey: #7cc4f0; --amber: #4aa3dd; --caramel: #2f7fc0; --cocoa: #1d4f7a; --cocoa-d: #133a5c; --cocoa-s: #24608f; --edge: #3a78a8; --cream: #f7fbff; --cream-2: #e3f2ff; --sand: #cfe6f7; --sand-d: #9cc8e8; --ink: #173a5a; --lapis: #2f7fc0; --lapis-d: #133a5c; --p: #4aa3dd; --page: #f7fbff; --gold: #7cc4f0; }
html[data-scene="dino"] { --honey-hi: #fff4d6; --honey-l2: #ffe0ad; --honey-l: #ffd38a; --honey-m: #ffb35c; --honey: #f2903a; --amber: #d9661f; --caramel: #5f9e3f; --cocoa: #4a2a12; --cocoa-d: #33190a; --cocoa-s: #5c3818; --edge: #7a4a22; --cream: #fff8ea; --cream-2: #ffeccc; --sand: #e8cf9e; --sand-d: #c9a35e; --ink: #3a220e; --lapis: #5f9e3f; --lapis-d: #33190a; --p: #d9661f; --page: #fff8ea; --gold: #f2903a; }
html[data-scene="poyga"] { --honey-hi: #ffffff; --honey-l2: #ffe1de; --honey-l: #ffd0cc; --honey-m: #ff8c80; --honey: #f2554a; --amber: #c9302c; --caramel: #111827; --cocoa: #1f2937; --cocoa-d: #111827; --cocoa-s: #374151; --edge: #4b5563; --cream: #fafafa; --cream-2: #eceff3; --sand: #d6d9de; --sand-d: #a8adb5; --ink: #111827; --lapis: #111827; --lapis-d: #111827; --p: #c9302c; --page: #fafafa; --gold: #f2554a; }

/* Barbi: pushti, yaltiroq, qo'g'irchoq uslubi */
html[data-scene="barbi"] .btn, html[data-scene="barbi"] .ibtn, html[data-scene="barbi"] .gear, html[data-scene="barbi"] .coinbox, html[data-scene="barbi"] .hello { box-shadow: 0 4px 0 var(--edge), 0 0 18px rgba(255, 105, 180, .35); }
html[data-scene="barbi"] .kidnav, html[data-scene="barbi"] .ycard { background-image: radial-gradient(circle at 20% 30%, rgba(255, 255, 255, .9) 0 1.5px, transparent 2.5px), radial-gradient(circle at 70% 60%, rgba(255, 255, 255, .8) 0 1px, transparent 2px), linear-gradient(var(--honey-m), var(--honey) 45%, var(--amber)); background-size: 26px 26px, 34px 34px, auto; }
html[data-scene="barbi"] .modal.kid { border-radius: 34px; box-shadow: 0 8px 0 var(--edge), 0 0 0 6px rgba(255, 182, 217, .5), 0 24px 50px rgba(160, 20, 90, .3); }
/* Nemo / dengiz: suv, pufakchalar */
html[data-scene="nemo"] .kidnav, html[data-scene="dengiz"] .kidnav, html[data-scene="nemo"] .ycard, html[data-scene="dengiz"] .ycard { background-image: radial-gradient(circle at 18% 70%, rgba(255, 255, 255, .55) 0 3px, transparent 4px), radial-gradient(circle at 62% 30%, rgba(255, 255, 255, .45) 0 2px, transparent 3px), linear-gradient(var(--honey-m), var(--honey) 45%, var(--amber)); background-size: 40px 40px, 28px 28px, auto; }
html[data-scene="nemo"] .modal.kid, html[data-scene="dengiz"] .modal.kid { box-shadow: 0 8px 0 var(--edge), 0 0 0 6px rgba(120, 220, 255, .45), 0 24px 50px rgba(0, 60, 120, .35); }
/* Chip va Deyl: yog'och, o'rmon */
html[data-scene="chipdeyl"] .kidnav, html[data-scene="chipdeyl"] .ycard, html[data-scene="chipdeyl"] .btn:not(.alt) { background-image: repeating-linear-gradient(92deg, rgba(90, 50, 20, .0) 0 9px, rgba(90, 50, 20, .14) 9px 11px, rgba(255, 255, 255, .05) 11px 17px), linear-gradient(var(--honey-m), var(--honey) 45%, var(--amber)); }
/* Madagaskar: jungli barglari */
html[data-scene="madagaskar"] .kidnav, html[data-scene="madagaskar"] .ycard { background-image: radial-gradient(ellipse 10px 5px at 25% 40%, rgba(40, 110, 30, .35) 0 60%, transparent 62%), radial-gradient(ellipse 8px 4px at 70% 70%, rgba(255, 255, 255, .3) 0 60%, transparent 62%), linear-gradient(var(--honey-m), var(--honey) 45%, var(--amber)); background-size: 38px 30px, 30px 26px, auto; }
/* Futbol: maydon chiziqlari */
html[data-scene="futbol"] .kidnav, html[data-scene="futbol"] .ycard { background-image: repeating-linear-gradient(90deg, rgba(255, 255, 255, .0) 0 22px, rgba(255, 255, 255, .14) 22px 44px), linear-gradient(var(--honey-m), var(--honey) 45%, var(--amber)); }
/* Koinot: yulduzli */
html[data-scene="koinot"] .kidnav, html[data-scene="koinot"] .ycard { background-image: radial-gradient(circle at 30% 40%, #fff 0 1px, transparent 1.6px), radial-gradient(circle at 75% 20%, #fff 0 1px, transparent 1.6px), linear-gradient(var(--honey-m), var(--honey) 45%, var(--amber)); background-size: 24px 24px, 37px 37px, auto; }
/* oyna burchagidagi fon belgisi */
html[data-scene] .modal.kid { position: relative; }
html[data-scene="barbi"] .modal.kid::after, html[data-scene="nemo"] .modal.kid::after, html[data-scene="dengiz"] .modal.kid::after, html[data-scene="chipdeyl"] .modal.kid::after, html[data-scene="madagaskar"] .modal.kid::after, html[data-scene="futbol"] .modal.kid::after, html[data-scene="koinot"] .modal.kid::after, html[data-scene="dino"] .modal.kid::after { position: absolute; top: -18px; right: -12px; font-size: 40px; line-height: 1; transform: rotate(12deg); pointer-events: none; filter: drop-shadow(0 4px 3px rgba(0, 0, 0, .25)); }
html[data-scene="barbi"] .modal.kid::after { content: '🎀'; }
html[data-scene="nemo"] .modal.kid::after, html[data-scene="dengiz"] .modal.kid::after { content: '🐠'; }
html[data-scene="chipdeyl"] .modal.kid::after { content: '🌰'; }
html[data-scene="madagaskar"] .modal.kid::after { content: '🦁'; }
html[data-scene="futbol"] .modal.kid::after { content: '⚽'; }
html[data-scene="koinot"] .modal.kid::after { content: '🚀'; }
html[data-scene="dino"] .modal.kid::after { content: '🦖'; }
/* pastki menyudagi mavzu ikonkalari */
.nv .nv-e img.e3 { width: 26px; height: 26px; display: block; filter: drop-shadow(0 2px 1px rgba(0, 0, 0, .25)); }
.nv.on .nv-e img.e3 { transform: scale(1.12); }
/* ilova ustida suzib yuruvchi mavzu bezaklari */
#thfx { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
#thfx i { position: absolute; font-style: normal; width: calc(30px * var(--s)); opacity: .85; animation: var(--an) var(--d) linear infinite; animation-delay: var(--dl); }
#thfx i img.e3 { width: 100%; height: auto; display: block; }
@keyframes thrise { from { transform: translate(0, 110vh) rotate(0); } 50% { transform: translate(var(--w), 50vh) rotate(10deg); } to { transform: translate(0, -15vh) rotate(-8deg); } }
@keyframes thfall { from { transform: translate(0, -15vh) rotate(0); } 50% { transform: translate(var(--w), 50vh) rotate(160deg); } to { transform: translate(0, 110vh) rotate(320deg); } }
@keyframes thfloat { 0%, 100% { transform: translate(0, 0) scale(1); opacity: .2; } 50% { transform: translate(var(--w), -30px) scale(1.15); opacity: .9; } }
@keyframes thswim { from { transform: translateX(-12vw) scaleX(-1); } to { transform: translateX(112vw) scaleX(-1); } }
@media (prefers-reduced-motion: reduce) { #thfx { display: none; } }
/* ===== 3D qahramon: nafas olish, chayqalish, ko'z qisish, sakrash ===== */
.h3d { overflow: visible; }
.h3d .h3b { transform-box: view-box; transform-origin: 100px 266px; animation: h3idle 3.4s ease-in-out infinite; }
.h3d .h3lid { transform-box: fill-box; transform-origin: 50% 0; transform: scaleY(0); animation: h3blink 4.6s infinite; }
.h3d .h3lid + .h3lid { animation-delay: .02s; }
.h3d.m-cheer .h3b { animation: h3jump .9s cubic-bezier(.3, .6, .4, 1) infinite; }
.h3d.m-cheer .h3sh { transform-box: fill-box; transform-origin: center; animation: h3shad .9s cubic-bezier(.3, .6, .4, 1) infinite; }
.h3d.m-sad .h3b { animation: h3sad 2.4s ease-in-out infinite; }
@keyframes h3idle { 0%, 100% { transform: rotate(-1.2deg) scale(1, 1); } 25% { transform: rotate(0) scale(1.008, .99); } 50% { transform: rotate(1.2deg) scale(1, 1); } 75% { transform: rotate(0) scale(1.008, .99); } }
@keyframes h3blink { 0%, 92%, 100% { transform: scaleY(0); } 95% { transform: scaleY(1); } }
@keyframes h3jump { 0% { transform: translateY(0) scale(1.04, .95); } 35% { transform: translateY(-26px) scale(.97, 1.04) rotate(-3deg); } 55% { transform: translateY(-30px) rotate(3deg); } 80% { transform: translateY(0) scale(1.05, .94); } 100% { transform: translateY(0) scale(1, 1); } }
@keyframes h3shad { 0%, 80%, 100% { transform: scale(1); opacity: 1; } 45% { transform: scale(.6); opacity: .5; } }
@keyframes h3sad { 0%, 100% { transform: rotate(-3deg) translateY(2px); } 50% { transform: rotate(-1deg) translateY(3px); } }
@media (prefers-reduced-motion: reduce) { .h3d .h3b, .h3d .h3lid { animation: none; } }
/* ===== 3D qahramon harakatlari: salom (qo'l ko'ksida), qo'l silkitish, raqs, bosh irg'ash, atrofga qarash, o'ylash ===== */
.h3d .h3u, .h3d .h3f { transform-box: view-box; }
.h3d.m-salom .h3u { animation: h3salomU 3s ease-in-out both; }
.h3d.m-salom .h3f { animation: h3salomF 3s ease-in-out both; }
.h3d.m-salom .h3b { animation: h3bow 3s ease-in-out both; }
@keyframes h3salomU { 0%, 100% { transform: rotate(0); } 22%, 78% { transform: rotate(var(--su)); } }
@keyframes h3salomF { 0%, 100% { transform: rotate(0); } 26%, 76% { transform: rotate(var(--sf)); } }
@keyframes h3bow { 0%, 22%, 82%, 100% { transform: none; } 40%, 62% { transform: translateY(4px) rotate(0) scale(1.01, .975); } }
.h3d.m-wave .h3u { animation: h3waveU 2.2s ease-in-out both; }
.h3d.m-wave .h3f { animation: h3waveF .45s ease-in-out 5 alternate both; }
@keyframes h3waveU { 0%, 100% { transform: rotate(0); } 18%, 82% { transform: rotate(var(--wu)); } }
@keyframes h3waveF { from { transform: rotate(calc(var(--wf) - 22deg)); } to { transform: rotate(calc(var(--wf) + 22deg)); } }
.h3d.m-dance .h3b { animation: h3dance .55s ease-in-out 4; }
@keyframes h3dance { 0%, 100% { transform: rotate(-5deg) translateY(0); } 50% { transform: rotate(5deg) translateY(-10px); } }
.h3d.m-nod .h3b { animation: h3nod .7s ease-in-out 3; }
@keyframes h3nod { 0%, 100% { transform: none; } 50% { transform: translateY(5px) scale(1.01, .975); } }
.h3d.m-look .h3b { animation: h3look 2.2s ease-in-out both; }
@keyframes h3look { 0%, 100% { transform: none; } 25%, 40% { transform: rotate(-4deg) skewX(3deg); } 60%, 75% { transform: rotate(4deg) skewX(-3deg); } }
.h3d.m-think .h3b { animation: h3think 2.2s ease-in-out both; }
@keyframes h3think { 0%, 100% { transform: none; } 25%, 80% { transform: rotate(-5deg) translateY(2px); } }
.h3d.m-salom .h3lid, .h3d.m-nod .h3lid { animation-duration: 1.6s; }
/* gap pufakchasi */
.home2 .speech.pop { animation: speechpop .45s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes speechpop { from { transform: scale(.7); opacity: .3; } to { transform: scale(1); opacity: 1; } }
.hero-bub { position: fixed; z-index: 80; width: 200px; padding: 8px 12px; border-radius: 16px; background: var(--cream); border: 3px solid var(--cocoa); box-shadow: 0 5px 0 var(--edge), 0 10px 20px rgba(0, 0, 0, .2); font: 700 15px/1.25 'Fredoka', 'Nunito', sans-serif; color: var(--cocoa-d); text-align: center; pointer-events: none; opacity: 0; }
.hero-bub.show { animation: herobub 3.2s ease forwards; }
@keyframes herobub { 0% { opacity: 0; transform: translateY(8px) scale(.85); } 10%, 80% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(-6px); } }
#heroBig, #heroMini { cursor: pointer; }

/* ---------- Do'kon: musiqa ---------- */
.mtracks { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; padding: 4px 2px 8px; }
.mtrack { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 10px 12px; border-radius: 22px; border: 3px solid var(--sand-d, #e2c89a); background: var(--cream, #fff8ea); color: var(--cocoa, #5a3a1a); font: inherit; cursor: pointer; box-shadow: 0 6px 0 var(--sand-d, #e2c89a); transition: transform .15s; }
.mtrack:hover { transform: translateY(-2px); }
.mtrack:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--sand-d, #e2c89a); }
.mtrack .mt-e { font-size: 42px; line-height: 1.1; }
.mtrack .mt-n { font-weight: 800; font-size: 16px; text-align: center; }
.mtrack .mt-s { font-size: 13px; opacity: .8; display: flex; align-items: center; gap: 6px; }
.mtrack.on { border-color: var(--honey, #f5b72e); background: linear-gradient(180deg, var(--honey-l, #fff1c4), var(--cream, #fff8ea)); box-shadow: 0 6px 0 var(--amber, #e09a1a); }
.mtrack.on .mt-s { opacity: 1; font-weight: 700; }
.mtrack.play { border-color: #7c5cff; box-shadow: 0 6px 0 #5a3fd6; }
.mtrack.play .mt-e { animation: mtBob .6s ease-in-out infinite alternate; }
@keyframes mtBob { to { transform: translateY(-5px) rotate(6deg); } }
.mt-eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.mt-eq b { width: 3px; background: #7c5cff; border-radius: 2px; animation: mtEq .5s ease-in-out infinite alternate; }
.mt-eq b:nth-child(2) { animation-delay: .15s; } .mt-eq b:nth-child(3) { animation-delay: .3s; }
@keyframes mtEq { from { height: 3px; } to { height: 12px; } }
@media (max-width: 480px) {
    .cats { gap: 6px; flex-wrap: wrap; }
    .cat { width: 54px; height: 54px; font-size: 27px; border-radius: 18px; }
    .mtracks { grid-template-columns: 1fr 1fr; gap: 9px; }
    .mtrack { padding: 10px 6px 9px; }
    .mtrack .mt-e { font-size: 34px; }
    .mtrack .mt-n { font-size: 14px; }
    .mtrack .mt-s { font-size: 11.5px; }
}
/* Gapirganda og'iz: --mo 0 (yopiq) .. 1 (ochiq), JS ovoz balandligiga qarab beradi */
.h3d .h3m { transform-box: view-box; transform: scale(calc(.75 + var(--mo, 0) * .25), var(--mo, 0)); opacity: calc(var(--mo, 0) * 4); }
.mtrack.auto { background: linear-gradient(160deg, #fff6d8, #ffe7f1 50%, #e3f3ff); }

/* ---------- «Alifbo husnixat» uslubi: bosma harf (qalin serif) + yozma harf (husnixat) ---------- */
:root { --hx-vow: #e0342c; --hx-con: #2747a6; --hx-cw-c: #1c9cb2; --hx-cw-v: #b4473c; }
.ac-pr, .ap-pr { font-family: 'PT Serif', 'Times New Roman', Georgia, serif; font-weight: 700; color: var(--hx-con); letter-spacing: 0; white-space: nowrap; }
.acard.v .ac-pr, .apage.v .ap-pr { color: var(--hx-vow); }
.acard.d .ac-pr, .apage.d .ap-pr { color: var(--dig); }
.ac-pr { font-size: clamp(26px, 3.2vw, 32px); line-height: 1; margin-top: 6px; align-self: flex-end; margin-right: 10px; }
.ac-wr { color: var(--hx-cw-c); min-height: 46px; }
.acard.v .ac-wr { color: var(--hx-cw-v); }
.acard.d .ac-wr { color: var(--dig); }
.ac-wr .sline { max-height: 50px; }
.ac-pic { height: 30px; }
.ac-pic .pic-emo { font-size: 24px; }
.ac-pic .pic-svg { width: 28px; height: 28px; }
.ap-pr { font-size: clamp(48px, 6vw, 72px); }
.ap-letter { background: #fff; }
.ap-wr.big { color: var(--hx-cw-c); }
.apage.v .ap-wr.big { color: var(--hx-cw-v); }
.apage.d .ap-wr.big { color: var(--dig); }
@media (max-width: 700px) { .ac-pr { font-size: 24px; margin-right: 6px; } .ac-wr .sline { max-height: 40px; } }
.ac-wr .sline g, .ap-wr.big .sline g { stroke: currentColor; stroke-width: 2.4px; }
.ap-wr.big .sline g { stroke-width: 3.2px; }
.ac-pr { align-self: center; margin-right: 0; margin-top: 10px; }
/* Xaritadagi transport: 3D rasmlar (samolyot, vertolyot, osma yo'l) */
.v-plane > img.e3 { rotate: 100deg; animation: vhover 2.6s ease-in-out infinite; }
.v-heli > img.e3 { animation: vhover 2.2s ease-in-out infinite; }
.v-cable > img.e3 { animation: vswing 3s ease-in-out infinite; transform-origin: 50% 8%; }
.mveh > img.e3 { filter: drop-shadow(0 10px 8px rgba(0, 30, 70, .35)) saturate(1.08); }
.alseg { display: inline-flex; gap: 6px; }

/* Oynalarda brauzerning kulrang aylantirish chiziqlari ko'rinmasin (aylantirish ishlayveradi) */
.modal { overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; -ms-overflow-style: none; }
.modal::-webkit-scrollbar { display: none; width: 0; height: 0; }
.modal.scenes .scgrid, .modal.scenes img { max-width: 100%; }
/* Burchakdagi bezak (🐠, 🎀 ...) oyna ichida tursin - chetdan chiqib, ortiqcha chiziq hosil qilmasin */
html[data-scene] .modal.kid::after { top: 8px !important; right: 12px !important; font-size: 30px !important; }

/* Harf tuzilishi (darslikdagidek): unsurlar + ... = harf */
.ap-els { --elh: 40px; display: flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 14px; background: #fff; box-shadow: inset 0 0 0 2px #e9dfc8; color: #2747a6; }
.ap-els i { font-style: normal; font-weight: 700; color: #9aa3bd; font-size: 16px; }
.ap-els svg.el path.ln { stroke: #c9d6f3; stroke-width: 1.5; fill: none; }
.ap-els svg.el path.ink { fill: none; stroke-width: 5.5; stroke-linecap: round; stroke-linejoin: round; stroke: #f08a24; }
.ap-els svg.el.e1 path.ink { stroke: #16a34a; } .ap-els svg.el.e2 path.ink { stroke: #9333ea; } .ap-els svg.el.e3 path.ink { stroke: #0284c7; }
.ap-els .el-all { display: inline-flex; align-items: center; }
@media (max-height: 640px) { .ap-els { --elh: 30px; } }

/* ---------- So'z tuzish («Alifbe» darsligidagidek: □□-□□□ kataklar) ---------- */
.wb { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 4px 12px 12px; overflow-y: auto; }
.wb-modes { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 6px; padding: 5px; border-radius: 999px; background: rgba(255, 250, 238, .92); border: 3px solid var(--cocoa); }
.wb-modes button { border: 0; background: transparent; padding: 8px 14px; border-radius: 999px; font: 700 15px/1 'Fredoka', 'Nunito', sans-serif; color: var(--cocoa-d); cursor: pointer; }
.wb-modes button.on { background: var(--honey); color: #fff; box-shadow: 0 3px 0 var(--amber); }
#wc { gap: 16px; width: min(760px, 100%); padding: 14px 10px 18px; border-radius: 28px; background: rgba(255, 252, 244, .94); border: 4px solid var(--cocoa); box-shadow: 0 8px 0 var(--edge); }
.wb-top { display: flex; align-items: center; gap: 16px; }
.wb-pic { width: clamp(110px, 16vw, 150px); aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; background: #fff; box-shadow: 0 6px 0 #e6dcc3, inset 0 0 0 4px #f3ead5; }
.wb-pic img.e3 { width: 72%; height: 72%; object-fit: contain; filter: drop-shadow(0 5px 4px rgba(90, 44, 11, .22)); }
.wb-pic svg { width: 66%; height: 66%; }
.wb-boxes { display: flex; align-items: center; flex-wrap: wrap; justify-content: center; gap: 6px; }
.wb-grp { display: inline-flex; gap: 0; }
.wb-box { width: clamp(44px, 7vw, 62px); aspect-ratio: 1; display: grid; place-items: center; margin-left: -3px; border: 3px solid #2f6fd0; background: #fff; font: 700 clamp(28px, 4.6vw, 40px)/1 'Fredoka', 'Nunito', sans-serif; color: #1d3f86; }
.wb-grp .wb-box:first-child { margin-left: 0; }
.wb-box.v { border-color: #e0342c; color: #b4231c; }
.wb-box.next { background: #fff3c4; box-shadow: inset 0 0 0 3px #f5b400; animation: nodepulse 1.2s ease-in-out infinite; }
.wb-box.fill { background: #f1f7ff; }
.wb-box.v.fill { background: #fff1f0; }
.wb-box.syl { width: auto; min-width: clamp(84px, 14vw, 120px); padding: 0 12px; aspect-ratio: auto; height: clamp(54px, 8vw, 70px); border-radius: 14px; margin: 0; border-color: var(--cocoa-s); }
.wb-dash { font-style: normal; font: 700 30px/1 'Fredoka', sans-serif; color: #2f6fd0; padding: 0 2px; }
.wb-tiles { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.wb-tile { min-width: clamp(56px, 9vw, 76px); height: clamp(56px, 9vw, 76px); padding: 0 10px; border: 0; border-radius: 18px; background: #fff; box-shadow: 0 6px 0 rgba(90, 44, 11, .2), inset 0 0 0 3px #e9dcc0; font: 700 clamp(30px, 5vw, 42px)/1 'Fredoka', 'Nunito', sans-serif; color: var(--cocoa-d); cursor: pointer; }
.wb-tile.syl { min-width: clamp(84px, 14vw, 120px); font-size: clamp(26px, 4.2vw, 34px); }
.wb-tile:active { transform: translateY(4px); box-shadow: 0 2px 0 rgba(90, 44, 11, .2), inset 0 0 0 3px #e9dcc0; }
.wb-tile.used { opacity: .25; pointer-events: none; }
.wb-tile.wrong { animation: shake .4s; background: #fecaca; }
.wb-done { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.wb-syl { font: 700 26px/1 'Fredoka', sans-serif; color: #2f6fd0; letter-spacing: .04em; }
.wb-hint { margin: 0; font: 600 14px/1.3 'Nunito', sans-serif; color: var(--cocoa-s); text-align: center; }
@media (max-width: 520px) { .wb-modes button { padding: 7px 10px; font-size: 13px; } }
