/* O'quvchi kabineti — bolalar uchun: yorqin, katta tugmalar, yumaloq shakllar. Admin panel uslubidan alohida. */
:root {
  --ink: #23264a; --ink-2: #5b5f86; --line: #e6e3f5;
  --bg: #f6f3ff; --card: #ffffff;
  --brand: #4c9c1d; --brand-dk: #387a12; --brand-2: #eaf6df; --brand-ink: #33700f; --violet: #7c5cff; --violet-2: #efeaff;
  --sun: #ffb800; --sun-2: #fff4d1;
  --mint: #19b37b; --mint-2: #dcf7ec;
  --coral: #ff5d73; --coral-2: #ffe3e7;
  --sky: #2f9bff; --sky-2: #ddefff;
  --radius: 22px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.portal {
  margin: 0; min-height: 100vh; color: var(--ink);
  font: 17px/1.45 ui-rounded, "SF Pro Rounded", "Nunito", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  background:
    radial-gradient(900px 500px at 110% -10%, #ffe9f6 0, transparent 60%),
    radial-gradient(700px 500px at -10% 10%, #e3f2ff 0, transparent 55%),
    var(--bg);
}
button, input { font: inherit; color: inherit; }
img { max-width: 100%; }
.boot { text-align: center; padding: 40vh 0 0; color: var(--ink-2); }
.muted { color: var(--ink-2); }
.k-wrap { max-width: 640px; margin: 0 auto; padding: 14px 16px calc(96px + env(safe-area-inset-bottom)); display: grid; gap: 14px; }

/* kartalar va tugmalar */
.k-card { background: var(--card); border-radius: var(--radius); padding: 18px; box-shadow: 0 6px 0 rgba(76, 156, 29, .08), 0 10px 30px rgba(35, 38, 74, .06); }
.k-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 12px 22px; border: 0;
  border-radius: 16px; background: var(--brand); color: #fff; font-weight: 800; font-size: 17px; cursor: pointer;
  box-shadow: 0 5px 0 var(--brand-dk); transition: transform .08s, box-shadow .08s; text-decoration: none; }
.k-btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--brand-dk); }
.k-btn.ghost { background: var(--brand-2); color: var(--brand-ink); box-shadow: 0 5px 0 #cfe8bb; }
.k-btn.sun { background: var(--sun); color: #4a3500; box-shadow: 0 5px 0 #d99c00; }
.k-btn.mint { background: var(--mint); box-shadow: 0 5px 0 #11895d; }
.k-btn.small { min-height: 40px; padding: 8px 14px; font-size: 15px; border-radius: 12px; }
.k-btn[disabled] { opacity: .55; pointer-events: none; }
.k-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; font-weight: 800; font-size: 15px; white-space: nowrap; }
.k-chip.coin { background: var(--sun-2); color: #7a5600; }
.k-chip.violet { background: var(--brand-2); color: var(--brand-ink); }
.k-chip.mint { background: var(--mint-2); color: #0d7a52; }
.k-chip.gray { background: #f0eff6; color: var(--ink-2); }
.k-icon-btn { width: 44px; height: 44px; border-radius: 14px; border: 0; background: var(--card); font-size: 20px; cursor: pointer;
  box-shadow: 0 3px 0 var(--line); display: grid; place-items: center; }

/* kirish */
.k-login { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.k-login .k-card { width: min(400px, 100%); display: grid; gap: 14px; text-align: center; padding: 26px 22px; }
.k-login h1 { margin: 0; font-size: 26px; }
.k-field { display: grid; gap: 6px; text-align: left; font-weight: 700; }
.k-field input { width: 100%; min-height: 54px; padding: 12px 16px; border: 2px solid var(--line); border-radius: 16px; background: #fbfaff; font-size: 18px; outline: none; }
.k-field input:focus { border-color: var(--brand); background: #fff; }
.k-pass { position: relative; } .k-pass button { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: 0; background: none; font-size: 22px; cursor: pointer; }
.k-error { margin: 0; padding: 10px 14px; border-radius: 14px; background: var(--coral-2); color: #b3203a; font-weight: 700; }
.k-hint { font-size: 14px; color: var(--ink-2); margin: 0; }
.k-lang { justify-self: center; }

/* tepa qism */
.k-top { display: flex; align-items: center; gap: 12px; }
.k-avatar { width: 52px; height: 52px; border-radius: 18px; display: grid; place-items: center; font-weight: 900; font-size: 22px; color: #fff;
  background: linear-gradient(135deg, #4c9c1d, #2fa58a); flex: none; }
.k-hello { flex: 1; min-width: 0; }
.k-hello b { display: block; font-size: 20px; line-height: 1.15; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.k-hello span { font-size: 14px; color: var(--ink-2); }

/* pastki menyu */
.k-tabs { position: fixed; left: 50%; bottom: calc(10px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 5;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; width: min(460px, calc(100% - 24px));
  padding: 8px; border-radius: 24px; background: var(--card); box-shadow: 0 10px 30px rgba(35, 38, 74, .16); }
.k-tabs a { display: grid; justify-items: center; gap: 2px; padding: 8px 4px; border-radius: 16px; color: var(--ink-2); text-decoration: none; font-weight: 800; font-size: 13px; }
.k-tabs a i { font-style: normal; font-size: 26px; line-height: 1; }
.k-tabs a.on { background: var(--brand-2); color: var(--brand-ink); }

/* bosh sahifa */
.k-coins { text-align: center; background: linear-gradient(150deg, #ffcf3f, #ff9f1c); color: #4a2c00; position: relative; overflow: hidden; }
.k-coins .lbl { font-weight: 800; opacity: .8; }
.k-big { font-size: 46px; font-weight: 900; line-height: 1.1; margin: 4px 0; }
.k-goal { margin-top: 10px; text-align: left; background: rgba(255, 255, 255, .55); border-radius: 16px; padding: 10px 12px; font-weight: 700; font-size: 15px; }
.k-bar { height: 14px; border-radius: 99px; background: rgba(255, 255, 255, .7); overflow: hidden; margin-top: 8px; }
.k-bar span { display: block; height: 100%; width: 0; border-radius: 99px; background: var(--mint); transition: width .6s ease; }
.k-card .k-bar { background: #f0eef9; }
.k-cta { display: flex; align-items: center; gap: 14px; background: linear-gradient(135deg, #4c9c1d, #7cc23a); color: #fff; }
.k-cta .e { font-size: 44px; } .k-cta b { display: block; font-size: 19px; } .k-cta .k-btn { margin-left: auto; background: #fff; color: var(--brand-ink); box-shadow: 0 5px 0 #cfe8bb; }
.k-h2 { margin: 4px 4px 0; font-size: 20px; font-weight: 900; }
.k-feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.k-feed li { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 2px dashed var(--line); }
.k-feed li:last-child { border-bottom: 0; }
.k-feed .e { width: 40px; height: 40px; border-radius: 14px; display: grid; place-items: center; font-size: 22px; background: var(--violet-2); flex: none; }
.k-feed .t { flex: 1; min-width: 0; font-weight: 700; }
.k-feed .t small { display: block; color: var(--ink-2); font-weight: 600; }
.k-plus { font-weight: 900; color: var(--mint); white-space: nowrap; } .k-minus { font-weight: 900; color: var(--coral); white-space: nowrap; }
.k-empty { text-align: center; padding: 26px 10px; color: var(--ink-2); font-weight: 700; }
.k-empty .e { font-size: 48px; display: block; }

/* testlar yo'li */
.k-path { display: grid; gap: 12px; }
.k-step { display: flex; align-items: center; gap: 14px; }
.k-num { width: 58px; height: 58px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: 22px; font-weight: 900; color: #fff;
  background: var(--brand); box-shadow: 0 5px 0 var(--brand-dk); }
.k-step.done .k-num { background: var(--mint); box-shadow: 0 5px 0 #11895d; }
.k-step.locked .k-num { background: #cfcde0; box-shadow: 0 5px 0 #b3b1c7; }
.k-step.open .k-num { animation: k-pulse 1.8s ease-in-out infinite; }
.k-step .k-card { flex: 1; min-width: 0; padding: 14px 16px; display: grid; gap: 8px; }
.k-step.locked .k-card { background: #f7f6fc; box-shadow: none; }
.k-step .ttl { font-weight: 900; font-size: 18px; line-height: 1.25; }
.k-step .meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.k-stars { font-size: 20px; letter-spacing: 2px; }
.k-rule { text-align: center; font-weight: 700; color: #7a5600; background: var(--sun-2); border-radius: 16px; padding: 10px 14px; }

/* test */
.k-quiz { min-height: 100vh; }
.k-quiz .k-wrap { padding-bottom: 30px; }
.k-qtop { display: flex; align-items: center; gap: 10px; }
.k-qtop .ttl { flex: 1; min-width: 0; font-weight: 900; line-height: 1.2; }
.k-qtop .ttl small { display: block; color: var(--ink-2); font-weight: 700; }
.k-timer { font-variant-numeric: tabular-nums; font-weight: 900; font-size: 18px; padding: 8px 12px; border-radius: 14px; background: var(--sky-2); color: #0d5fae; white-space: nowrap; }
.k-timer.low { background: var(--coral-2); color: #b3203a; animation: k-pulse 1s ease-in-out infinite; }
.k-dots { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.k-dots i { width: 14px; height: 14px; border-radius: 50%; background: #dcd8f0; }
.k-dots i.ok { background: var(--mint); } .k-dots i.cur { background: var(--brand); transform: scale(1.25); }
.k-q { text-align: center; padding: 22px 18px; }
.k-q .n { font-weight: 800; color: var(--brand-ink); }
.k-q h2 { font-size: 23px; line-height: 1.35; margin: 8px 0 0; }
.k-opts { display: grid; gap: 12px; }
.k-opt { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 64px; padding: 12px 16px; border: 0; border-radius: 20px; text-align: left;
  font-size: 18px; font-weight: 800; color: #fff; cursor: pointer; transition: transform .08s, box-shadow .08s; }
.k-opt b { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(255, 255, 255, .25); flex: none; }
.k-opt:active { transform: translateY(4px); }
.k-opt.c0 { background: var(--brand); box-shadow: 0 5px 0 var(--brand-dk); } .k-opt.c1 { background: var(--sky); box-shadow: 0 5px 0 #1474cf; }
.k-opt.c2 { background: #ff8a3d; box-shadow: 0 5px 0 #d9661c; } .k-opt.c3 { background: var(--violet); box-shadow: 0 5px 0 #5a3ee0; }
.k-opt.c4 { background: #e85bc4; box-shadow: 0 5px 0 #b8379a; } .k-opt.c5 { background: #5c6bff; box-shadow: 0 5px 0 #3b48d6; }
.k-opt.wrong { animation: k-shake .4s; opacity: .45; }
.k-fb { text-align: center; font-weight: 900; font-size: 19px; padding: 12px; border-radius: 18px; }
.k-fb.ok { background: var(--mint-2); color: #0d7a52; animation: k-pop .35s; }
.k-fb.bad { background: var(--coral-2); color: #b3203a; animation: k-pop .35s; }

/* natija */
.k-done { text-align: center; padding: 30px 20px; display: grid; gap: 10px; justify-items: center; position: relative; overflow: hidden; }
.k-done h1 { margin: 0; font-size: 32px; }
.k-done .k-stars { font-size: 44px; }
.k-earn { font-size: 40px; font-weight: 900; color: #7a5600; background: var(--sun-2); border-radius: 22px; padding: 8px 22px; }
.k-confetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 20; }
.k-confetti i { position: absolute; top: -20px; width: 10px; height: 16px; border-radius: 3px; animation: k-fall linear forwards; }

/* do'kon */
.k-shop { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.k-item { padding: 0; overflow: hidden; display: grid; }
.k-item .img { aspect-ratio: 1; display: grid; place-items: center; font-size: 56px; background: linear-gradient(135deg, var(--brand-2), var(--sky-2)); }
.k-item .img img { width: 100%; height: 100%; object-fit: cover; }
.k-item .body { padding: 12px; display: grid; gap: 6px; }
.k-item .name { font-weight: 900; line-height: 1.2; }
.k-item .desc { font-size: 13px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.k-item.can { outline: 3px solid var(--mint); }

/* xabarlar */
.toasts { position: fixed; left: 50%; top: 14px; transform: translateX(-50%); z-index: 30; display: grid; gap: 8px; width: min(420px, calc(100% - 24px)); }
.toast { background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 16px; font-weight: 700; }
.toast.error { background: var(--coral); }

@keyframes k-pulse { 50% { transform: scale(1.07); } }
@keyframes k-shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
@keyframes k-pop { 0% { transform: scale(.85); } 60% { transform: scale(1.05); } 100% { transform: scale(1); } }
@keyframes k-wave { 0%, 60%, 100% { transform: rotate(0); } 20% { transform: rotate(-10deg); } 40% { transform: rotate(10deg); } }
@keyframes k-fall { to { transform: translateY(110vh) rotate(720deg); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media (min-width: 560px) { .k-shop { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.k-item .body > .k-chip { justify-self: start; max-width: 100%; }

/* ===== telefon: tor ekranlar va teginish ===== */
/* Grid elementlari uzun matn (ism) tufayli kengayib ketmasin. */
.k-wrap { grid-template-columns: minmax(0, 1fr); }
.k-wrap > *, .k-wrap-inner > * { min-width: 0; }
.k-wrap-inner { display: grid; gap: 14px; }
body.portal { min-height: 100dvh; -webkit-tap-highlight-color: transparent; overscroll-behavior-y: none; }
.k-login, .k-quiz { min-height: 100dvh; }
button, a, .k-opt { touch-action: manipulation; }
.k-top { gap: 10px; }
.k-hello b { font-size: 19px; }
.k-feed .t { overflow-wrap: anywhere; }
.k-step .ttl, .k-item .name, .k-q h2 { overflow-wrap: anywhere; }
.k-rule { font-size: 15px; }
@media (max-width: 420px) {
  .k-wrap { padding: 10px 12px calc(92px + env(safe-area-inset-bottom)); gap: 12px; }
  .k-card { padding: 14px; border-radius: 20px; }
  .k-avatar { width: 44px; height: 44px; border-radius: 15px; font-size: 19px; }
  .k-icon-btn { width: 40px; height: 40px; border-radius: 13px; font-size: 18px; }
  .k-hello b { font-size: 17px; } .k-hello span { font-size: 13px; }
  .k-chip { padding: 5px 10px; font-size: 14px; }
  .k-big { font-size: 40px; }
  .k-cta { flex-wrap: wrap; gap: 10px; } .k-cta .e { font-size: 36px; } .k-cta b { font-size: 17px; }
  .k-cta .k-btn { margin-left: 0; width: 100%; }
  .k-num { width: 46px; height: 46px; font-size: 19px; }
  .k-step { gap: 10px; }
  .k-step .ttl { font-size: 17px; }
  .k-step .k-btn { width: 100%; }
  .k-shop { gap: 10px; }
  .k-item .img { aspect-ratio: 4 / 3; font-size: 44px; }
  .k-item .body { padding: 10px; }
  .k-q { padding: 18px 14px; } .k-q h2 { font-size: 20px; }
  .k-opt { min-height: 58px; font-size: 17px; padding: 10px 12px; gap: 10px; }
  .k-opt b { width: 34px; height: 34px; }
  .k-qtop .ttl { font-size: 15px; }
  .k-timer { font-size: 16px; padding: 7px 10px; }
  .k-tabs { width: calc(100% - 16px); bottom: calc(8px + env(safe-area-inset-bottom)); padding: 6px; }
  .k-tabs a i { font-size: 24px; }
  .k-done h1 { font-size: 26px; } .k-done .k-stars { font-size: 38px; } .k-earn { font-size: 34px; }
}
/* Telefon yon holatda: tab bar pastda joy egallamasin */
@media (max-height: 480px) and (orientation: landscape) {
  .k-tabs { position: static; transform: none; margin: 0 auto 12px; }
  .k-wrap { padding-bottom: 16px; }
}

/* tepa: ism ikki qatorgacha, coin — ism ostida */
.k-hello b { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.k-hello > span { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.k-hello .k-chip { padding: 3px 10px; font-size: 14px; }
.k-card.k-item { padding: 0; }
.k-hello b { overflow-wrap: anywhere; }
.k-item { align-content: start; }

/* ===== belgilar (SVG) ===== */
.k-ic { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; fill: none; stroke: currentColor; stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }
.k-ic.fill { fill: currentColor; stroke: none; }
.k-coin { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; }
.k-icon-btn .k-ic { width: 22px; height: 22px; }
.k-lang-btn { font-weight: 900; font-size: 14px; color: var(--brand-ink); letter-spacing: .02em; }
.k-logo { width: 140px; height: auto; justify-self: center; display: block; margin: 0 auto 2px; }
.k-pass button { color: var(--ink-2); display: grid; place-items: center; width: 40px; height: 40px; }
.k-pass button.on { color: var(--brand-ink); }
.k-pass button .k-ic { width: 22px; height: 22px; }
.k-tabs a .k-ic { width: 26px; height: 26px; stroke-width: 2.2; }
.k-tabs a.on .k-ic { stroke-width: 2.5; }
.k-chip .k-ic { width: 16px; height: 16px; } .k-chip .k-coin { width: 18px; height: 18px; }
.k-btn .k-ic { width: 20px; height: 20px; }
.k-big { display: flex; align-items: center; justify-content: center; gap: 10px; }
.k-big .k-coin { width: 44px; height: 44px; }
.k-coins .k-coin-bg { position: absolute; right: -26px; bottom: -30px; width: 130px; height: 130px; opacity: .25; transform: rotate(-15deg); }
.k-coins > *:not(.k-coin-bg) { position: relative; }
.k-goal { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 6px 8px; }
.k-goal .k-bar { grid-column: 1 / -1; margin-top: 2px; }
.k-goal > .k-ic { width: 20px; height: 20px; color: #b36b00; }
.k-cta .e { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; background: rgba(255, 255, 255, .2); font-size: inherit; flex: none; }
.k-cta .e .k-ic { width: 32px; height: 32px; }
.k-feed .e .k-ic { width: 22px; height: 22px; }
.k-feed .e.sun { background: var(--sun-2); color: #b36b00; } .k-feed .e.sky { background: var(--sky-2); color: #1474cf; }
.k-feed .e.pink { background: #fde3f4; color: #c23a9c; } .k-feed .e.gray { background: #f0eff6; color: var(--ink-2); }
.k-empty .e { width: 64px; height: 64px; margin: 0 auto 8px; border-radius: 20px; display: grid; place-items: center; background: var(--brand-2); color: var(--brand-ink); }
.k-empty .e .k-ic { width: 34px; height: 34px; }
.k-rule { display: flex; align-items: center; justify-content: center; gap: 8px; }
.k-rule .k-ic, .k-rule .k-coin { width: 20px; height: 20px; }
.k-num .k-ic { width: 26px; height: 26px; stroke-width: 2.8; }
.k-step .muted .k-ic { width: 16px; height: 16px; }
.k-stars { display: inline-flex; gap: 2px; letter-spacing: 0; }
.k-stars .k-ic { width: 22px; height: 22px; }
.k-stars .on { color: #ffb800; } .k-stars .off { color: #dedbec; }
.k-stars.big .k-ic { width: 44px; height: 44px; }
.k-timer { display: inline-flex; align-items: center; gap: 6px; }
.k-timer .k-ic { width: 18px; height: 18px; }
.k-q .n .k-ic { width: 16px; height: 16px; }
.k-fb { display: flex; align-items: center; justify-content: center; gap: 8px; }
.k-fb .k-ic { width: 22px; height: 22px; flex: none; }
.k-medal { width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center; color: #fff;
  background: linear-gradient(145deg, #ffcf3f, #ff9f1c); box-shadow: 0 6px 0 #d98200; animation: k-pop .5s; }
.k-medal .k-ic { width: 54px; height: 54px; stroke-width: 2; }
.k-earn { display: inline-flex; align-items: center; gap: 10px; }
.k-earn .k-coin { width: 40px; height: 40px; }
.k-item .img .k-ic { width: 56px; height: 56px; color: var(--brand); stroke-width: 1.8; }
@media (max-width: 420px) {
  .k-big .k-coin { width: 38px; height: 38px; }
  .k-logo { width: 120px; }
  .k-tabs a .k-ic { width: 24px; height: 24px; }
}

/* ===== til almashganda balandlik «sakramasin» ===== */
/* Tugma, yorliq va chiplar har ikki tilda bitta qatorda (uzun ruscha matn qisqaradi). */
.k-btn, .k-chip, .k-tabs a, .k-timer { white-space: nowrap; }
.k-btn > span, .k-chip > span { overflow: hidden; text-overflow: ellipsis; }
.k-btn { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.k-tabs a { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.k-lang-btn { width: 44px; flex: none; }
.k-hello b { -webkit-line-clamp: 1; }
/* sarlavha va izohlar: ikki tilda ham bir xil joy */
.k-h2 { min-height: 1.45em; }
.k-rule { min-height: 52px; }
.k-goal > span { min-height: 2.9em; display: flex; align-items: center; }
.k-cta > div { min-height: 3em; }
.k-skeleton { min-height: 60vh; border-radius: var(--radius); background: linear-gradient(90deg, #efecfa 0, #f8f6ff 50%, #efecfa 100%); background-size: 200% 100%; animation: k-shimmer 1.2s linear infinite; }
@keyframes k-shimmer { to { background-position: -200% 0; } }
/* scrollbar paydo bo'lib/yo'qolganda kenglik o'zgarmasin */
html { scrollbar-gutter: stable; }
.k-step .k-card > .muted { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* til almashganda qatorlar soni o'zgarmasin (o'lchov bo'yicha) */
.k-feed .t small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.k-step .ttl { min-height: 2.5em; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.k-rule { min-height: 66px; }
.k-step .meta .k-stars { flex-basis: 100%; }
.k-step .meta { row-gap: 8px; }
/* chiplar qatori: doim bitta qator, uzun matn qisqaradi */
.k-row { display: flex; gap: 6px; min-width: 0; flex-basis: 100%; flex-wrap: nowrap; }
.k-row .k-chip { min-width: 0; overflow: hidden; }
.k-row .k-chip > span { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.k-row .k-chip.fix { flex: none; }
.k-cta b { min-height: 2.5em; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.k-qtop .ttl, .k-qtop .ttl small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.k-cta > div { min-width: 0; } .k-cta .sub { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* kirish: karta tepadan joylashadi (o'rtada tursa, balandlik o'zgarganda butun karta siljiydi);
   ko'p qatorli matnlarga qurilma shriftidan qat'i nazar doim 2 qator joy */
.k-login { place-items: start center; padding-top: max(20px, 9vh); }
.k-login h1, .k-login .k-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.k-login .k-hint { line-height: 1.4; }
.k-login .k-help { height: 2.8em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.k-goal > span, .k-rule { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.k-rule { min-height: 0; height: calc(2.9em + 20px); line-height: 1.45; }
.k-goal > span { min-height: 0; height: 2.9em; line-height: 1.45; }
.k-fb { min-height: calc(2.9em + 24px); line-height: 1.45; }
.k-opt { min-height: 72px; }
.k-q h2 { min-height: 2.7em; }
/* coin tarixi: sabab — bitta qator */
.k-feed .t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* «yangi testlar»: doim bir xil tuzilish — tepada belgi+matn, pastda butun kenglikdagi tugma */
.k-cta { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 12px 14px; }
.k-cta .k-btn { grid-column: 1 / -1; margin-left: 0; width: 100%; }
/* sovg'a rasmi: qat'iy balandlik (nisbat bo'yicha hisob tillarga qarab 2–3px o'zgarardi) */
.k-item .img, .k-item .img { aspect-ratio: auto; height: 150px; }
@media (max-width: 420px) { .k-item .img { aspect-ratio: auto; height: 112px; } }

/* === tuzatishlar (telefon skrinshotlari bo'yicha) === */
/* sovg'a rasmi qutidan chiqmasin */
.k-item .img { position: relative; overflow: hidden; }
.k-item .img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* qoida va maqsad yozuvi: 2 qatorlik joy, matn o'rtada (tepaga yopishmasin) */
.k-rule { display: flex; align-items: center; justify-content: center; gap: 8px; height: auto; min-height: calc(2.9em + 20px); }
.k-rule .txt, .k-goal .txt { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.45; }
.k-goal > span.txt { height: auto; min-height: 2.9em; display: flex; align-items: center; }
.k-goal > span.txt > span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* mavzu nomi — bitta qator (to'liq nomi bosilganda ko'rinadi) */
.k-step .ttl { min-height: 0; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.k-fb { width: 100%; }
.k-cta b { min-height: 0; -webkit-line-clamp: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
