/* Davra Books — O'yinlar: Tarix atlasi (atlas.js). Umumiy panel va tugmalar — globe.css (gl-*). */
.at-stage { height: clamp(460px, 74vh, 760px); border-color: rgba(251, 191, 36, .28); box-shadow: 0 24px 60px -30px rgba(180, 83, 9, .55);
    background: radial-gradient(ellipse at 50% 40%, #1c2a44 0%, #0e1628 60%, #070b16 100%); }
.at-stage .gl-card { max-width: min(420px, calc(100% - 1.5rem)); }
.at-period { display: block; margin-top: .1rem; font-size: .78rem; color: #fde68a; }
.at-era-info { margin: .35rem 0 0; font-size: .82rem; line-height: 1.4; color: #e2e8f0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.at-stats { display: block; margin-top: .4rem; font-size: .7rem; font-weight: 700; color: #5eead4; }
.at-repeat { color: #fbbf24; }

/* Ma'lumot kartasi */
.at-info { position: absolute; right: .75rem; top: .75rem; z-index: 4; width: min(300px, calc(100% - 1.5rem)); padding: .8rem .9rem .9rem; border-radius: 16px; animation: gl-in .3s ease backwards; }
.at-info-close { position: absolute; right: .5rem; top: .4rem; width: 28px; height: 28px; border-radius: 8px; color: #cbd5e1; }
.at-info-close:hover { background: rgba(148, 163, 184, .18); }
.at-info-name { margin: 0 1.6rem .3rem 0; font-weight: 800; font-size: 1.05rem; color: #fde68a; }
.at-info-row { margin: .15rem 0; font-size: .84rem; color: #e2e8f0; }
.at-info-row b { color: #94a3b8; font-weight: 700; }
.at-info-text { margin: .45rem 0 0; font-size: .84rem; line-height: 1.45; color: #f1f5f9; }
.at-say { margin-top: .55rem; display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .7rem; border-radius: 999px; font-size: .78rem; font-weight: 700; color: #052e16; background: #5eead4; }

/* O'rganish paneli: asboblar va vaqt shkalasi */
.at-learnbar { position: absolute; left: .6rem; right: .6rem; bottom: .5rem; z-index: 3; display: grid; grid-template-columns: minmax(0, 1fr); gap: .35rem; }
.at-tools { display: flex; flex-wrap: wrap; justify-content: center; gap: .35rem; }
.at-tools .gl-pill { min-height: 36px; padding: .25rem .65rem; font-size: .8rem; }
.at-tools .gl-pill.is-on, .gl-bar .gl-pill.is-on { border-color: rgba(94, 234, 212, .7); color: #5eead4; }
.at-compare select { max-width: 9.5rem; background: transparent; color: #f8fafc; border: 0; font-size: .82rem; }
.at-compare select option { color: #0f172a; }
.at-start { margin-top: 0; padding: .5rem 1rem; }
.at-split { width: 100%; accent-color: #fde68a; }
.at-timeline { padding: .3rem .55rem .25rem; border-radius: 12px; }
.at-timeline input[type="range"] { width: 100%; accent-color: #fbbf24; }
.at-ticks { position: relative; display: flex; gap: .25rem; overflow-x: auto; scrollbar-width: none; padding-top: .2rem; }
.at-ticks::-webkit-scrollbar { display: none; }
.at-ticks button { flex: 1 0 auto; min-width: 72px; display: grid; gap: .05rem; padding: .25rem .35rem; border-radius: 9px; text-align: center; color: #94a3b8; font-size: .66rem; line-height: 1.15; }
.at-ticks button b { font-family: ui-monospace, monospace; font-size: .7rem; color: #cbd5e1; }
.at-ticks button.is-on { background: rgba(251, 191, 36, .16); color: #fde68a; }
.at-ticks button.is-on b { color: #fbbf24; }
.at-source { margin: 0; text-align: center; font-size: .62rem; color: rgba(203, 213, 225, .55); }

/* Davrni aniqlash variantlari */
.at-options { position: absolute; left: 50%; bottom: 4.6rem; z-index: 3; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .45rem; width: min(520px, calc(100% - 1.5rem)); transform: translateX(-50%); }
.at-option { justify-content: center; min-height: 46px; white-space: normal; text-align: center; }
.at-option.is-ok { border-color: #4ade80; background: rgba(22, 163, 74, .35); }
.at-option.is-bad { border-color: #f87171; opacity: .6; }

/* Moslashtirish va tartiblash paneli */
.at-panel { position: absolute; inset: 6.2rem .6rem 4.3rem; z-index: 3; display: grid; align-content: center; gap: .7rem; overflow-y: auto; padding: .7rem; border-radius: 16px; background: rgba(5, 10, 24, .78); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.at-match { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.at-col { display: grid; gap: .45rem; align-content: start; }
.at-chip { display: grid; gap: .15rem; padding: .55rem .7rem; border-radius: 12px; text-align: left; font-size: .84rem; color: #f8fafc; background: rgba(15, 23, 42, .85); border: 1.5px solid rgba(148, 163, 184, .3); transition: border-color .2s, background-color .2s; }
.at-chip small { color: #fde68a; font-size: .74rem; }
.at-chip.is-sel { border-color: #fde047; box-shadow: 0 0 0 3px rgba(253, 224, 71, .25); }
.at-chip.is-set { border-color: rgba(94, 234, 212, .6); }
.at-chip.is-right.is-used { opacity: .55; }
.at-chip.is-ok { border-color: #4ade80; background: rgba(22, 163, 74, .3); }
.at-chip.is-bad { border-color: #f87171; background: rgba(220, 38, 38, .25); }
.at-cards { display: grid; gap: .45rem; }
.at-card { display: flex; align-items: center; gap: .6rem; padding: .55rem .7rem; border-radius: 12px; text-align: left; color: #f8fafc; background: rgba(15, 23, 42, .88);
    border: 1.5px solid rgba(148, 163, 184, .3); touch-action: none; cursor: grab; user-select: none; transition: border-color .2s, box-shadow .2s; }
.at-card i { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; font-style: normal; font: 700 .72rem ui-monospace, monospace; background: rgba(251, 191, 36, .2); color: #fbbf24; }
.at-card b { flex: 1; font-size: .86rem; font-weight: 600; }
.at-card small { font-family: ui-monospace, monospace; color: #fde68a; }
.at-card.is-picked { border-color: #fde047; box-shadow: 0 0 0 3px rgba(253, 224, 71, .25); }
.at-card.is-locked { border-color: rgba(167, 139, 250, .8); cursor: default; }
.at-card.is-ok { border-color: #4ade80; }
.at-card.is-bad { border-color: #f87171; }
.at-panel .gl-next:disabled { opacity: .45; cursor: not-allowed; }

@media (max-width: 639px) {
    .at-stage { height: clamp(520px, calc(100svh - 170px), 760px); }
    .at-era-info { display: none; }
    .at-info { top: auto; bottom: 9.5rem; right: .5rem; left: .5rem; width: auto; }
    .at-ticks button { min-width: 60px; }
    .at-tools .gl-pill { font-size: .74rem; padding: .25rem .5rem; max-width: 100%; }
    .at-compare select { max-width: 5.5rem; }
    .at-learnbar { left: .4rem; right: .4rem; }
    .at-stage .gl-zoom { top: 40%; bottom: auto; }
    .at-panel { inset: 7.2rem .4rem 4rem; }
    .at-match { gap: .4rem; }
    .at-chip { font-size: .78rem; padding: .45rem .55rem; }
    .at-options { bottom: 4.1rem; }
}
@media (prefers-reduced-motion: reduce) { .at-info { animation: none; } }
