/* «Kun chizigʻi» — /schedule. Faqat shu sahifada yuklanadi. */
.kc {
  --sch-blue: #0A3D8F; --sch-blue-dark: #072C69;
  --sch-coral: #FF5A36; --sch-yellow: #FFC145;
  --sch-bg: #EEF3FA; --sch-surface: #FFFFFF;
  --sch-border: #CDD8E8; --sch-border-2: #E1E8F2;
  --sch-text: #0F1E33; --sch-muted: #4A5B73;
  --sch-done-bg: #F2F5FA; --sch-done: #586A82;
  --sch-free: #1DB97C; --sch-busy: #D3DCE8; --sch-free-ink: #0B7A4F;
  --t-11: #2563EB; --t-11-ink: #1D4ED8;   /* Maʼruza */
  --t-13: #0B8A5F; --t-13-ink: #08704D;   /* Amaliy */
  --t-14: #D97706; --t-14-ink: #A85A04;   /* Seminar */
  --t-12: #7C3AED; --t-12-ink: #6D28D9;   /* Laboratoriya */
  --t-x: #64748B; --t-x-ink: #475569;
  --f-head: 'Unbounded', 'IBM Plex Sans', system-ui, sans-serif;
  --f-text: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --shadow: 0 12px 32px rgba(10, 61, 143, .10);
  --r-card: 22px; --r-btn: 12px;
  --kc-top: 64px;
  background: var(--sch-bg); color: var(--sch-text);
  font-family: var(--f-text); font-size: 16px; line-height: 1.45;
  padding-bottom: 48px; overflow-x: clip;
}
.kc *, .kc *::before, .kc *::after { box-sizing: border-box; }
.kc p, .kc h1, .kc h2, .kc h3, .kc ul { margin: 0; }
.kc .kc-l__subj { font-family: var(--f-text); letter-spacing: normal; text-transform: none; color: inherit; }
.kc ul { padding: 0; list-style: none; }
.kc button { font: inherit; color: inherit; cursor: pointer; }
.kc :focus-visible { outline: 3px solid var(--sch-coral); outline-offset: 2px; }
.kc [hidden] { display: none !important; }
.kc-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.kc-wrap { width: 100%; max-width: 1320px; margin: 0 auto; padding: 0 24px; }
.kc-m { display: none; }
.kc-mono, .kc-time, .kc-pair__time, .kc-l__time, .kc-wk__time { font-family: var(--f-mono); font-variant-numeric: tabular-nums; font-feature-settings: 'tnum'; }

/* ---------- 1. Sarlavha ---------- */
.kc-head { background: var(--sch-blue); color: #fff; padding: 40px 0 96px; }
.kc-head__in { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; align-items: center; }
.kc-kicker { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--sch-yellow); font-size: 13px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; }
.kc-langs { display: none; gap: 4px; letter-spacing: 0; }
.kc-langs a { color: #fff; text-decoration: none; font-size: 13px; font-weight: 700; min-width: 44px; min-height: 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; border: 1px solid rgba(255,255,255,.3); }
.kc-langs a[aria-current] { background: #fff; color: var(--sch-blue); }
.kc-today { font-family: var(--f-head); font-weight: 800; font-size: clamp(30px, 3.4vw, 50px); line-height: 1.1; margin-top: 10px !important; letter-spacing: -.01em; }
.kc-sub { margin-top: 10px !important; font-size: 17px; color: rgba(255,255,255,.88); }
.kc-clock { display: flex; align-items: center; gap: 28px; background: var(--sch-blue-dark); border-radius: 24px; padding: 22px 28px; }
.kc-clock__time { display: flex; flex-direction: column; }
.kc-time { font-weight: 800; font-size: clamp(40px, 4.4vw, 64px); line-height: 1; letter-spacing: -.02em; white-space: nowrap; }
.kc-time small { font-size: .55em; color: var(--sch-yellow); margin-left: 2px; }
.kc-clock__tz { font-size: 13px; color: rgba(255,255,255,.8); margin-top: 6px; }
.kc-clock__pair { border-left: 1px solid rgba(255,255,255,.22); padding-left: 28px; min-width: 240px; }
.kc-pair__label { font-weight: 700; font-size: 16px; display: flex; align-items: center; gap: 10px; }
.kc-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--sch-coral); box-shadow: 0 0 0 4px rgba(255,90,54,.35); flex: none; animation: kc-pulse 2s infinite; }
.kc-dot--off { background: rgba(255,255,255,.55); box-shadow: none; animation: none; }
@keyframes kc-pulse { 50% { box-shadow: 0 0 0 7px rgba(255,90,54,.12); } }
.kc-pair__time { color: var(--sch-yellow); font-weight: 800; font-size: 18px; margin-top: 6px !important; }
.kc-progress { height: 6px; border-radius: 999px; background: rgba(255,255,255,.18); overflow: hidden; margin-top: 10px; }
.kc-progress i { display: block; height: 100%; width: var(--p, 0%); background: var(--sch-yellow); border-radius: inherit; transition: width .6s linear; }
.kc-pair__left { font-size: 14px; color: rgba(255,255,255,.88); margin-top: 8px !important; }

/* ---------- 2. Guruh tanlash ---------- */
.kc-body { position: relative; margin-top: -56px; }
.kc-stale { background: #FFF4E5; border: 1px solid #F2C38B; color: #7A4100; border-radius: 14px; padding: 10px 16px; margin-bottom: 12px; font-weight: 600; }
.kc-mine, .kc-views-slot, .kc-sheet-bar, .kc-sheet-bg { display: none; }
.kc-picker { background: var(--sch-surface); border-radius: 24px; box-shadow: var(--shadow); padding: 24px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 28px; }
.kc-steps { display: flex; flex-wrap: wrap; gap: 20px 32px; margin-bottom: 18px; }
.kc-step__h { font-size: 13px; font-weight: 700; color: var(--sch-muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 8px !important; }
.kc-step__h b { color: var(--sch-blue); }
.kc-step__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.kc-step__top .kc-step__h { margin: 0 !important; }
.kc-seg { display: flex; flex-wrap: wrap; gap: 8px; }
.kc-chip-btn { min-height: 44px; padding: 0 16px; border-radius: var(--r-btn); border: 1.5px solid var(--sch-border); background: #fff; font-weight: 600; font-size: 15px; transition: background .15s, border-color .15s; }
.kc-chip-btn:hover { border-color: var(--sch-blue); }
.kc-chip-btn[aria-checked="true"] { background: var(--sch-blue); border-color: var(--sch-blue); color: #fff; }
.kc-chip-btn:disabled { opacity: .45; cursor: not-allowed; }
.kc-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 8px; }
.kc-groups .kc-chip-btn { padding: 0 10px; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kc-search { position: relative; display: block; width: min(260px, 100%); }
.kc-search svg { position: absolute; left: 12px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--sch-muted); }
.kc-search input { width: 100%; min-height: 44px; border-radius: var(--r-btn); border: 1.5px solid var(--sch-border); padding: 0 12px 0 38px; font: inherit; font-size: 15px; background: #fff; color: var(--sch-text); }
.kc-search input:focus { border-color: var(--sch-blue); outline: none; box-shadow: 0 0 0 3px rgba(10,61,143,.18); }
.kc-empty-note { grid-column: 1 / -1; color: var(--sch-muted); padding: 8px 0; }
.kc-picker__side { display: flex; flex-direction: column; align-items: flex-end; gap: 16px; }
.kc-views { display: inline-flex; gap: 4px; background: var(--sch-done-bg); border-radius: 16px; padding: 4px; }
.kc-views button { min-height: 44px; padding: 0 16px; border: 0; border-radius: 12px; background: transparent; font-weight: 700; font-size: 15px; white-space: nowrap; color: var(--sch-muted); }
.kc-views button:hover { color: var(--sch-text); }
.kc-views button[aria-selected="true"] { background: var(--sch-coral); color: var(--sch-text); }
.kc-saved { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.kc-saved__label { font-size: 13px; font-weight: 700; color: var(--sch-muted); margin-right: 4px; }
.kc-saved__list { display: flex; flex-wrap: wrap; gap: 6px; }
.kc-pill { min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--sch-border); background: #fff; font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.kc-pill::before { content: '★'; color: #C98A00; }
.kc-pill:hover { border-color: var(--sch-blue); }

/* ---------- 3. Panel va kun chizigʻi ---------- */
.kc-panel { margin-top: 28px; outline: none; }
.kc-ph { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin-bottom: 14px; }
.kc-ph__t { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.kc-h2 { font-family: var(--f-head); font-weight: 700; font-size: 24px; line-height: 1.2; }
.kc-h3 { font-family: var(--f-head); font-weight: 700; font-size: 18px; line-height: 1.25; }
.kc-star { width: 44px; height: 44px; border-radius: 12px; border: 1.5px solid var(--sch-border); background: #fff; font-size: 20px; line-height: 1; color: var(--sch-muted); }
.kc-star[aria-pressed="true"] { color: #C98A00; border-color: #F0C35A; background: #FFF8E6; }
.kc-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--sch-muted); }
.kc-legend span { display: inline-flex; align-items: center; gap: 6px; }
.kc-legend i { width: 12px; height: 12px; border-radius: 4px; background: var(--c); }
.kc-days { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin-bottom: 14px; padding: 2px; }
.kc-days::-webkit-scrollbar { display: none; }
.kc-days button { min-height: 44px; min-width: 64px; padding: 4px 12px; border-radius: var(--r-btn); border: 1.5px solid var(--sch-border); background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; font-weight: 700; font-size: 14px; flex: none; }
.kc-days button small { font-weight: 500; font-size: 12px; color: var(--sch-muted); }
.kc-days button[aria-pressed="true"] { background: var(--sch-blue); border-color: var(--sch-blue); color: #fff; }
.kc-days button[aria-pressed="true"] small { color: rgba(255,255,255,.85); }
.kc-days button.is-today:not([aria-pressed="true"]) { border-color: var(--sch-coral); }
.kc-line { background: var(--sch-surface); border-radius: 24px; box-shadow: var(--shadow); padding: 16px; display: grid; grid-template-columns: repeat(var(--n, 6), minmax(186px, 1fr)); gap: 12px; overflow-x: auto; overscroll-behavior-x: contain; }
.kc-col { display: flex; flex-direction: column; gap: 10px; min-width: 0; }

/* Dars kartochkasi */
.kc-l { --c: var(--t-x); --ink: var(--t-x-ink); position: relative; display: flex; flex-direction: column; gap: 8px; min-height: 200px; height: 100%; padding: 14px 16px 16px; border-radius: 20px; background: #fff; border: 2px solid var(--sch-border-2); border-top: 8px solid var(--c); }
.kc-l[data-t="11"] { --c: var(--t-11); --ink: var(--t-11-ink); }
.kc-l[data-t="12"] { --c: var(--t-12); --ink: var(--t-12-ink); }
.kc-l[data-t="13"] { --c: var(--t-13); --ink: var(--t-13-ink); }
.kc-l[data-t="14"] { --c: var(--t-14); --ink: var(--t-14-ink); }
.kc-l__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; font-weight: 700; color: var(--sch-muted); }
.kc-badge { font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; background: var(--sch-done-bg); color: var(--sch-muted); white-space: nowrap; }
.kc-l__time { font-weight: 800; font-size: 22px; line-height: 1.15; letter-spacing: -.04em; }
.kc-l__time span { white-space: nowrap; }
.kc-l__time em { display: none; }
.kc-type { align-self: flex-start; font-size: 12.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px; color: var(--ink); background: color-mix(in srgb, var(--c) 12%, #fff); }
.kc-l__subj { font-size: 16px; font-weight: 700; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.kc-l__meta { font-size: 14px; color: var(--sch-muted); display: flex; flex-direction: column; gap: 2px; margin-top: auto; }
.kc-l__meta span { display: flex; gap: 6px; align-items: baseline; min-width: 0; }
.kc-l__meta b { font-weight: 700; color: var(--sch-text); }
.kc-l__meta svg { width: 14px; height: 14px; flex: none; align-self: center; opacity: .8; }
.kc-note { font-size: 13px; font-weight: 700; color: #9A2E12; background: #FFE6DF; border-radius: 10px; padding: 4px 8px; }
.kc-l .kc-progress { background: rgba(255,255,255,.2); margin-top: 4px; }
/* Hozir */
.kc-l.is-now { background: var(--sch-blue); border-color: var(--sch-blue); color: #fff; box-shadow: 0 0 0 3px var(--sch-coral), var(--shadow); }
.kc-l.is-now .kc-l__top, .kc-l.is-now .kc-l__meta { color: rgba(255,255,255,.88); }
.kc-l.is-now .kc-l__meta b { color: #fff; }
.kc-l.is-now .kc-l__time { color: var(--sch-yellow); }
.kc-l.is-now .kc-badge { background: var(--sch-coral); color: var(--sch-text); }
.kc-l.is-now .kc-type { background: rgba(255,255,255,.16); color: #fff; }
.kc-l.is-now .kc-note { background: rgba(255,255,255,.95); }
/* Tugagan */
.kc-l.is-done { background: var(--sch-done-bg); border-color: var(--sch-border-2); border-top-color: var(--sch-border); color: var(--sch-done); }
.kc-l.is-done .kc-l__meta, .kc-l.is-done .kc-l__meta b, .kc-l.is-done .kc-l__top { color: var(--sch-done); }
.kc-l.is-done .kc-type { background: #E3E9F2; color: var(--sch-done); }
/* Dars yoʻq / bekor */
.kc-l.is-empty { background: transparent; border: 2px dashed var(--sch-border); align-items: flex-start; color: var(--sch-muted); min-height: 120px; }
.kc-l.is-empty .kc-l__time { color: var(--sch-muted); font-size: 18px; }
.kc-l.is-cancel .kc-l__subj { text-decoration: line-through; text-decoration-thickness: 2px; }
.kc-l.is-cancel .kc-badge { background: var(--sch-coral); color: var(--sch-text); }
.kc-l.is-cancel { border-top-color: var(--sch-coral); }

.kc-empty { background: #fff; border-radius: 24px; padding: 36px 24px; text-align: center; color: var(--sch-muted); box-shadow: var(--shadow); font-size: 17px; }
.kc-empty b { display: block; font-family: var(--f-head); color: var(--sch-text); font-size: 20px; margin-bottom: 6px; }

/* Hafta */
.kc-week { background: #fff; border-radius: 24px; box-shadow: var(--shadow); padding: 12px; display: grid; grid-template-columns: 96px repeat(var(--d, 5), minmax(150px, 1fr)); gap: 8px; overflow-x: auto; }
.kc-wk__h { font-weight: 800; font-size: 14px; padding: 8px 10px; border-radius: 12px; background: var(--sch-done-bg); text-align: center; }
.kc-wk__h.is-today { background: var(--sch-blue); color: #fff; }
.kc-wk__p { padding: 8px 6px; display: flex; flex-direction: column; justify-content: center; }
.kc-wk__p b { font-size: 13px; color: var(--sch-muted); }
.kc-wk__time { font-weight: 800; font-size: 17px; line-height: 1.15; }
.kc-wk__time small { display: block; font-size: 13px; color: var(--sch-muted); }
.kc-wk__c { display: flex; flex-direction: column; gap: 6px; }
.kc-wk__c .kc-l { min-height: 0; padding: 10px 12px; gap: 4px; border-radius: 14px; border-top-width: 5px; }
.kc-wk__c .kc-l__subj { font-size: 14px; }
.kc-wk__c .kc-l__meta { font-size: 13px; }
.kc-wk__c .kc-l.is-empty { min-height: 64px; border-width: 1.5px; }
.kc-week-m { display: none; }

/* ---------- 4. Pastki qator ---------- */
.kc-bottom { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 24px; }
.kc-bottom[hidden] { display: none; }
.kc-card { background: #fff; border-radius: 24px; box-shadow: var(--shadow); padding: 22px 24px; }
.kc-card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.kc-freebox { flex: 1 1 560px; min-width: 0; }
.kc-changes { flex: 1 1 340px; background: var(--sch-coral); color: var(--sch-text); border-radius: 24px; padding: 22px 24px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.kc-ch-list { display: flex; flex-direction: column; gap: 8px; }
.kc-ch-list li { background: rgba(255,255,255,.9); border-radius: 14px; padding: 10px 14px; font-size: 14.5px; line-height: 1.35; }
.kc-ch-list li.is-mine { box-shadow: inset 4px 0 0 var(--sch-blue); }
.kc-ch-list li b { font-weight: 800; }
.kc-ch-list .kc-ch-empty { background: rgba(255,255,255,.55); font-weight: 600; }
.kc-tg { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; min-height: 44px; padding: 0 16px; border-radius: 12px; background: var(--sch-text); color: #fff; font-weight: 700; text-decoration: none; margin-top: auto; }
.kc-tg svg { width: 18px; height: 18px; }
.kc-link { border: 0; background: none; padding: 0 4px; min-height: 44px; color: var(--sch-blue); font-weight: 700; font-size: 15px; text-decoration: underline; text-underline-offset: 3px; display: inline-flex; align-items: center; }
.kc-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; margin-top: 16px; color: var(--sch-muted); font-size: 14px; }
.kc-updated { margin-left: auto; }

/* Xonalar polosasi */
.kc-rooms { display: flex; flex-direction: column; gap: 4px; }
.kc-room { display: grid; grid-template-columns: 84px minmax(0, 1fr) 132px; align-items: center; gap: 14px; padding: 8px 4px; border-radius: 12px; }
.kc-room + .kc-room { border-top: 1px solid var(--sch-border-2); }
.kc-room__n { font-family: var(--f-head); font-weight: 700; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kc-room__n small { display: block; font-family: var(--f-text); font-weight: 500; font-size: 12px; color: var(--sch-muted); }
.kc-room__s { font-size: 14px; font-weight: 700; text-align: right; color: var(--sch-muted); }
.kc-room__s.is-free { color: var(--sch-free-ink); }
.kc-bar { position: relative; display: flex; gap: 3px; height: 22px; }
.kc-bar button { flex: 1 1 0; border: 0; padding: 0; border-radius: 6px; background: var(--sch-busy); min-width: 0; }
.kc-bar button.is-free { background: var(--sch-free); }
.kc-bar button:hover, .kc-bar button:focus-visible { filter: brightness(.92); }
.kc-bar__now { position: absolute; top: -5px; bottom: -5px; width: 3px; margin-left: -1.5px; background: var(--sch-coral); border-radius: 2px; pointer-events: none; }
.kc-bar__now::before { content: ''; position: absolute; top: -4px; left: 50%; width: 9px; height: 9px; margin-left: -4.5px; border-radius: 50%; background: var(--sch-coral); }
.kc-rooms-head { display: grid; grid-template-columns: 84px minmax(0, 1fr) 132px; gap: 14px; padding: 0 4px 6px; font-size: 12px; color: var(--sch-muted); font-family: var(--f-mono); }
.kc-rooms-head div { display: flex; justify-content: space-between; }
.kc-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin-bottom: 14px; }
.kc-filters label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 700; color: var(--sch-muted); }
.kc-filters select { min-height: 44px; border-radius: var(--r-btn); border: 1.5px solid var(--sch-border); background: #fff; padding: 0 12px; font: inherit; font-size: 15px; color: var(--sch-text); min-width: 130px; }
.kc-toggle { min-height: 44px; display: inline-flex; flex-direction: row !important; align-items: center; gap: 8px !important; padding: 0 12px; border: 1.5px solid var(--sch-border); border-radius: var(--r-btn); background: #fff; color: var(--sch-text) !important; font-size: 15px !important; }
.kc-toggle input { width: 18px; height: 18px; accent-color: var(--sch-blue); }
.kc-tip { position: fixed; z-index: 1200; background: var(--sch-text); color: #fff; font-size: 13px; padding: 6px 10px; border-radius: 8px; pointer-events: none; max-width: 260px; }

/* Imtihonlar */
.kc-exams { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.kc-exams .kc-l { min-height: 0; border-top-color: var(--sch-coral); }

/* ---------- Planshet 640–1023 ---------- */
@media (max-width: 1023px) {
  .kc-head__in { grid-template-columns: 1fr; gap: 20px; }
  .kc-clock { justify-self: start; }
  .kc-picker { grid-template-columns: 1fr; }
  .kc-picker__side { align-items: flex-start; }
  .kc-line { grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: visible; }
  .kc-l { min-height: 0; }
  .kc-bottom { flex-direction: column; }
  .kc-freebox, .kc-changes { flex: none; }
}

/* ---------- Mobil < 640 ---------- */
@media (max-width: 639px) {
  .kc-wrap { padding: 0 16px; }
  .kc-d { display: none; }
  .kc-m { display: inline; }
  .kc-head { padding: 14px 0 60px; }
  .kc-head__in { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "date time" "pair pair"; gap: 14px 12px; align-items: end; }
  .kc-head__date { grid-area: date; min-width: 0; }
  .kc-langs { display: inline-flex; }
  .kc-kicker { position: absolute; left: 16px; right: 16px; top: 14px; }
  .kc-head__in { position: relative; padding-top: 44px; }
  .kc-today { font-size: 24px; margin-top: 0 !important; }
  .kc-sub { font-size: 14px; margin-top: 4px !important; }
  .kc-clock { display: contents; }
  .kc-clock__time { grid-area: time; align-items: flex-end; }
  .kc-time { font-size: 40px; }
  .kc-time small { font-size: 22px; }
  .kc-clock__tz { font-size: 12px; margin-top: 2px; }
  .kc-clock__pair { grid-area: pair; border: 0; background: var(--sch-blue-dark); border-radius: 18px; padding: 14px 16px; min-width: 0; }
  .kc-pair__time { font-size: 17px; }
  .kc-body { margin-top: -44px; }
  .kc-mine { display: block; background: #fff; border-radius: 22px; box-shadow: var(--shadow); padding: 16px; }
  .kc-mine__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  .kc-mine__txt { min-width: 0; }
  .kc-mine__label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--sch-muted); }
  .kc-mine__name { font-family: var(--f-head); font-weight: 800; font-size: 22px; line-height: 1.2; margin-top: 2px !important; overflow-wrap: anywhere; }
  .kc-mine__meta { font-size: 14px; color: var(--sch-muted); }
  .kc-btn { min-height: 44px; padding: 0 16px; border-radius: var(--r-btn); border: 0; background: var(--sch-blue); color: #fff !important; font-weight: 700; flex: none; }
  .kc-mine .kc-saved { margin-top: 12px; }
  .kc-views-slot { display: block; position: sticky; top: var(--kc-top); z-index: 20; background: var(--sch-bg); margin: 12px -16px 0; padding: 8px 16px; }
  .kc-views-slot .kc-views { display: flex; width: 100%; overflow-x: auto; scrollbar-width: none; }
  .kc-views-slot .kc-views::-webkit-scrollbar { display: none; }
  .kc-views-slot .kc-views button { flex: 1 0 auto; }
  /* Bottom sheet */
  .kc-picker { position: fixed; z-index: 1101; left: 0; right: 0; bottom: 0; max-height: 86vh; max-height: 86dvh; overflow-y: auto; overscroll-behavior: contain; border-radius: 24px 24px 0 0; padding: 8px 16px calc(20px + env(safe-area-inset-bottom)); transform: translateY(105%); visibility: hidden; transition: transform .28s ease, visibility 0s .28s; }
  .kc-picker.is-open { transform: none; visibility: visible; transition: transform .28s ease; }
  .kc-picker::before { content: ''; display: block; width: 44px; height: 5px; border-radius: 3px; background: var(--sch-border); margin: 4px auto 8px; }
  .kc-picker__side { display: none; }
  .kc-sheet-bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; position: sticky; top: -8px; background: #fff; padding: 6px 0; z-index: 1; }
  .kc-picker__h { font-family: var(--f-head); font-size: 18px; }
  .kc-icon-btn { width: 44px; height: 44px; border-radius: 12px; border: 1.5px solid var(--sch-border); background: #fff; font-size: 26px; line-height: 1; }
  .kc-sheet-bg { position: fixed; inset: 0; z-index: 1100; background: rgba(15,30,51,.5); }
  .kc-sheet-bg:not([hidden]) { display: block; }
  .kc-steps { flex-direction: column; gap: 14px; }
  .kc-search { width: 100%; }
  .kc-groups { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
  .kc-panel { margin-top: 12px; scroll-margin-top: calc(var(--kc-top) + 70px); }
  .kc-ph { margin-bottom: 10px; }
  .kc-h2 { font-size: 19px; }
  .kc-legend { display: none; }
  /* Vertikal darslar */
  .kc-line { display: flex; flex-direction: column; padding: 0; background: none; box-shadow: none; gap: 10px; }
  .kc-l { display: grid; grid-template-columns: 74px minmax(0, 1fr); grid-template-areas: "time top" "time type" "time subj" "time meta" "time note" "time bar"; column-gap: 12px; row-gap: 5px; align-content: start; min-height: 0; padding: 14px 14px 14px 12px; border-top-width: 2px; border-left: 6px solid var(--c); border-top-color: var(--sch-border-2); scroll-margin-top: calc(var(--kc-top) + 76px); }
  .kc-l.is-now { border-left-color: var(--sch-coral); }
  .kc-l.is-done { border-left-color: var(--sch-border); }
  .kc-l.is-empty { border-left-width: 2px; padding-top: 10px; padding-bottom: 10px; grid-template-areas: "time top" "time note"; }
  .kc-l.is-empty .kc-l__time { font-size: 18px; }
  .kc-l.is-empty > p:last-child { grid-column: 2; align-self: center; }
  .kc-views button { padding: 0 12px; }
  .kc-l__top { grid-area: top; }
  .kc-l__time { grid-area: time; display: flex; flex-direction: column; font-size: 22px; }
  .kc-l__time .kc-dash { display: none; }
  .kc-l__time span + span { font-size: 14px; opacity: .85; }
  .kc-l__time em { display: block; font-style: normal; font-family: var(--f-text); font-size: 12px; font-weight: 700; margin-top: 6px; opacity: .8; }
  .kc-l__top .kc-pn { display: none; }
  .kc-type { grid-area: type; }
  .kc-l__subj { grid-area: subj; }
  .kc-l__meta { grid-area: meta; }
  .kc-note { grid-area: note; }
  .kc-l .kc-progress { grid-area: bar; }
  .kc-week { display: none; }
  .kc-week-m { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -16px; padding: 0 16px 8px; scrollbar-width: none; }
  .kc-week-m::-webkit-scrollbar { display: none; }
  .kc-week-m > section { flex: 0 0 88%; scroll-snap-align: start; }
  .kc-week-m h3 { font-family: var(--f-head); font-size: 16px; margin-bottom: 8px; }
  .kc-week-m h3.is-today { color: var(--sch-blue); }
  .kc-room, .kc-rooms-head { grid-template-columns: 64px minmax(0, 1fr) 96px; gap: 10px; }
  .kc-room__n { font-size: 15px; }
  .kc-room__s { font-size: 13px; }
  .kc-card, .kc-changes { padding: 18px 16px; border-radius: 20px; }
  .kc-filters label { flex: 1 1 40%; }
  .kc-filters select { min-width: 0; width: 100%; }
  .kc-updated { margin-left: 0; }
}
@media (max-width: 359px) {
  .kc-time { font-size: 34px; }
  .kc-time small { font-size: 18px; }
  .kc-l { grid-template-columns: 64px minmax(0, 1fr); }
  .kc-l__time { font-size: 19px; }
}
/* Katta ekranlar */
@media (min-width: 1920px) {
  .kc-wrap { max-width: 1600px; }
}
/* Mobil landshaft: sarlavha ixcham */
@media (max-height: 500px) and (orientation: landscape) {
  .kc-head { padding-top: 16px; padding-bottom: 72px; }
  .kc-today { font-size: 26px; }
}

/* ---------- TV rejimi ---------- */
html.kc-tv, html.kc-tv body { background: var(--sch-blue) !important; cursor: none; }
html.kc-tv .sh, html.kc-tv .site-footer, html.kc-tv #site-header, html.kc-tv .t2-topbar, html.kc-tv .t2-header, html.kc-tv .t2-sub, html.kc-tv .t2-footer, html.kc-tv .t2-bbar, html.kc-tv .t2-fab, html.kc-tv .t2-progress { display: none !important; }
.kc--tv { min-height: 100vh; background: var(--sch-blue); padding-bottom: 24px; }
.kc--tv .kc-head { padding: 24px 0 16px; }
.kc--tv .kc-wrap { max-width: none; padding: 0 2.5vw; }
.kc--tv .kc-langs, .kc--tv .kc-mine, .kc--tv .kc-picker, .kc--tv .kc-views-slot, .kc--tv .kc-bottom, .kc--tv .kc-stale { display: none !important; }
.kc--tv .kc-body { margin-top: 0; }
.kc--tv .kc-today { font-size: clamp(30px, 3vw, 64px); }
.kc--tv .kc-time { font-size: clamp(56px, 6vw, 140px); }
.kc--tv .kc-tools { color: rgba(255,255,255,.7); }
.kc--tv .kc-tools .kc-link { color: #fff; cursor: pointer; }
.kc-tvgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(clamp(260px, 22vw, 520px), 1fr)); gap: clamp(10px, 1vw, 20px); }
.kc-tvc { background: #fff; border-radius: 20px; padding: clamp(12px, 1vw, 22px); display: flex; flex-direction: column; gap: 8px; }
.kc-tvc h3 { font-family: var(--f-head); font-size: clamp(18px, 1.4vw, 32px); }
.kc-tvc .kc-l { min-height: 0; padding: 10px 12px; border-radius: 14px; border-top-width: 5px; }
.kc-tvc .kc-l__time { font-size: clamp(18px, 1.3vw, 30px); }
.kc-tvc .kc-l__subj { font-size: clamp(14px, 1vw, 22px); -webkit-line-clamp: 1; }
.kc-tvc .kc-l__meta { font-size: clamp(13px, .85vw, 18px); }
.kc-tv-page { color: #fff; text-align: right; margin-top: 10px; font-family: var(--f-mono); }

/* ---------- Animatsiyalarni kamaytirish ---------- */
@media (prefers-reduced-motion: reduce) {
  .kc *, .kc *::before, .kc *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Chop etish: Hafta, A4 landshaft ---------- */
@media print {
  @page { size: A4 landscape; margin: 10mm; }
  html, body { background: #fff !important; zoom: 1 !important; }
  .sh, .site-footer, #site-header, .t2-topbar, .t2-header, .t2-sub, .t2-footer, .t2-bbar, .t2-fab, .kc-picker, .kc-mine, .kc-views-slot, .kc-bottom, .kc-tools, .kc-clock, .kc-langs, .kc-days, .kc-star, .kc-legend, .kc-stale, [class*="skynet"], .scroll-top { display: none !important; }
  .kc { background: #fff; padding: 0; font-size: 11px; }
  .kc-head { background: #fff; color: #000; padding: 0 0 6px; }
  .kc-kicker { color: #000; position: static; }
  .kc-today { font-size: 18px; }
  .kc-sub { color: #000; }
  .kc-body { margin-top: 0; }
  .kc-wrap { max-width: none; padding: 0; }
  .kc-week { display: grid !important; box-shadow: none; padding: 0; overflow: visible; grid-template-columns: 64px repeat(var(--d, 5), minmax(0, 1fr)); gap: 4px; }
  .kc-week-m { display: none !important; }
  .kc-l, .kc-wk__c .kc-l { box-shadow: none !important; break-inside: avoid; background: #fff !important; color: #000 !important; border-color: #999 !important; }
  .kc-l .kc-progress { display: none; }
}

/* Hafta (desktop): vaqt qator boshida — kartochkada takrorlanmaydi */
@media (min-width: 640px) {
  .kc-wk__c .kc-l__time, .kc-wk__c .kc-pn { display: none; }
  .kc-wk__c .kc-l__top { justify-content: flex-end; }
  .kc-wk__c .kc-l__top:empty, .kc-wk__c .kc-l.is-empty .kc-l__top { display: none; }
  .kc-wk__c .kc-l.is-empty { min-height: 44px; justify-content: center; font-size: 13px; }
}

/* Qidiruvda topilgan oʻqituvchi */
.kc-groups .kc-chip-btn--t { grid-column: span 2; display: inline-flex; align-items: center; gap: 8px; justify-content: flex-start; text-align: left; }
.kc-groups .kc-chip-btn--t svg { width: 16px; height: 16px; flex: none; }

/* Guruh | Oʻqituvchi almashtirgichi */
.kc-mode { display: inline-flex; gap: 4px; padding: 4px; border-radius: 14px; background: var(--sch-done-bg); margin-bottom: 18px; }
.kc-mode button { min-height: 44px; padding: 0 18px; border: 0; border-radius: 11px; background: transparent; font-weight: 700; font-size: 15px; color: var(--sch-muted); display: inline-flex; align-items: center; gap: 8px; }
.kc-mode button svg { width: 18px; height: 18px; }
.kc-mode button[aria-pressed="true"] { background: var(--sch-blue); color: #fff; }
.kc-groups--t { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); max-height: 360px; overflow-y: auto; padding: 2px; }
.kc-groups--t .kc-chip-btn--t { grid-column: auto; }
@media (max-width: 639px) { .kc-mode { display: flex; } .kc-mode button { flex: 1; justify-content: center; } .kc-groups--t { grid-template-columns: 1fr; max-height: none; } }
