/* Ofisbop — telefon interfeysi uslublari. Copyright (c) 2026 "VIJDON" MChJ. Barcha huquqlar himoyalangan. */
/* Faqat <html class="m-ui"> bo'lganda (tor ekran) ishlaydi — mobile.js belgilaydi. */
.m-bar, .m-tools, .m-home, .m-fab, .m-scrim, .m-onb, .m-tip { display: none; }

.m-ui body { -webkit-tap-highlight-color: transparent; }
.m-ui .titlebar, .m-ui .tabs, .m-ui .ribbon, .m-ui .ribbon-wrap, .m-ui .statusbar { display: none !important; }

/* ---------- Yuqori panel ---------- */
/* Kompyuterdagi kabi: oq panel, tepada mahsulot rangidagi ingichka chiziq */
.m-ui .m-bar {
  display: flex; align-items: center; gap: 0; flex: none; background: var(--chrome, #fff); color: var(--text);
  min-height: 56px; padding: env(safe-area-inset-top) 2px 0; border-top: 3px solid var(--accent); border-bottom: 1px solid var(--border); z-index: 5;
}
.m-ib {
  flex: none; width: 48px; height: 48px; border: 0; background: none; color: inherit; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0;
}
.m-ib:active { background: var(--pressed); }
.m-ib svg { width: 22px; height: 22px; }
.m-title { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; padding: 0 2px; }
.m-ui .m-title .docname {
  width: 100% !important; min-width: 0; max-width: none; background: transparent; border: 0; border-radius: 6px; color: var(--text);
  font-size: 17px; font-weight: 600; padding: 2px 6px; text-overflow: ellipsis; outline: none; box-shadow: none;
}
.m-ui .m-title .docname:focus { background: var(--hover); }
.m-ui .m-title .status { display: flex !important; align-items: center; gap: 5px; font-size: 11.5px; color: var(--muted); padding: 0 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-ui .m-title .status:empty { display: none !important; }
/* PDF ko'ruvchining yuqori paneli ham shu uslubda */
.m-ui .theme-pdf .titlebar { border-bottom: 1px solid var(--border); }

/* ---------- Pastki asboblar paneli ---------- */
.m-ui .m-tools {
  display: block; flex: none; background: #fff; border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -2px 12px rgba(15, 23, 42, .07); z-index: 5;
}
.m-cats, .m-row { display: flex; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.m-cats::-webkit-scrollbar, .m-row::-webkit-scrollbar { display: none; }
.m-cats { gap: 4px; padding: 6px 8px 2px; }
.m-cat {
  flex: none; height: 32px; padding: 0 13px; border: 0; border-radius: 16px; background: none; color: var(--muted);
  font-size: 13.5px; font-weight: 600; white-space: nowrap; cursor: pointer;
}
.m-cat.on { background: var(--accent-soft); color: var(--accent-dark); }
.m-row { gap: 2px; padding: 4px 6px 6px; }
.m-tool {
  flex: none; min-width: 60px; height: 56px; padding: 0 6px; border: 0; border-radius: 12px; background: none; color: var(--text);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; cursor: pointer;
  font-size: 11px; line-height: 1.1; white-space: nowrap;
}
.m-tool svg { width: 23px; height: 23px; }
.m-tool .g { font-size: 20px; line-height: 23px; height: 23px; font-family: Georgia, "Times New Roman", serif; }
.m-tool .g sup { font-size: 11px; }
.m-tool .swatch { display: none; }
.m-tool:active { background: var(--pressed); }
.m-tool.on { background: var(--accent-soft); color: var(--accent-dark); }
.m-tool.wide { flex-direction: row; gap: 8px; min-width: 150px; height: 50px; margin: 3px 4px; font-size: 15px; font-weight: 600; background: var(--accent-soft); color: var(--accent-dark); }
/* Klaviatura ochiq bo'lsa — joyni tejash */
.m-ui.m-kb .m-cats { padding-top: 3px; }
.m-ui.m-kb .m-cat { height: 28px; }
.m-ui.m-kb .m-tool { height: 48px; }
.m-ui.m-kb .m-tool span { display: none; }
.m-ui.m-kb .m-tool.wide span { display: inline; }
.m-ui.m-kb .m-tip { display: none; }

/* ---------- Menyular — pastdan chiqadigan varaq ---------- */
.m-ui .menu {
  position: fixed !important; left: 0 !important; right: 0 !important; top: auto !important; bottom: 0 !important;
  width: auto !important; max-width: none !important; min-width: 0 !important; max-height: 72vh; overflow-y: auto;
  border: 0; border-radius: 20px 20px 0 0; padding: 8px 8px calc(12px + env(safe-area-inset-bottom));
  box-shadow: 0 -8px 30px rgba(0, 0, 0, .22); animation: m-up .18s ease-out;
}
.m-ui .menu::before { content: ""; display: block; width: 40px; height: 4px; border-radius: 2px; background: #cbd2da; margin: 2px auto 8px; }
.m-ui .menu .mi { min-height: 50px; font-size: 16px; padding: 10px 14px; border-radius: 12px; gap: 14px; }
.m-ui .menu .mi svg { width: 22px; height: 22px; }
.m-ui .menu .mi:active { background: var(--accent-soft); }
.m-ui .menu .kbd { display: none; }
.m-ui .menu .mh { font-size: 13px; padding: 6px 14px 6px; font-weight: 600; }
.m-ui .menu .sep { margin: 6px 8px; }
.m-ui .menu input, .m-ui .menu select { font-size: 16px; min-height: 40px; }
.m-ui .palette { grid-template-columns: repeat(10, 1fr); gap: 7px; padding: 8px 10px; }
.m-ui .palette span { width: auto; height: auto; aspect-ratio: 1; border-radius: 50%; }
.m-ui .m-scrim { display: block; position: fixed; inset: 0; background: rgba(15, 23, 42, .38); z-index: 999; animation: m-fade .18s; }
@keyframes m-up { from { transform: translateY(40px); opacity: .3; } }
@keyframes m-fade { from { opacity: 0; } }

/* Oynalar (modal) — pastdan */
.m-ui .modal-back { align-items: flex-end; }
.m-ui .modal { width: 100vw !important; max-width: none; min-width: 0; border-radius: 20px 20px 0 0; max-height: 90vh; padding-bottom: env(safe-area-inset-bottom); animation: m-up .18s ease-out; }
.m-ui .modal h3 { font-size: 18px; padding: 18px 18px 8px; }
.m-ui .modal .mbody { font-size: 15px; overflow: auto; }
.m-ui .modal .inp, .m-ui .modal select, .m-ui .modal input { font-size: 16px; min-height: 42px; }
.m-ui .modal .mfoot { gap: 8px; padding: 10px 14px 14px; }
.m-ui .modal .mfoot .pbtn { flex: 1; min-height: 46px; font-size: 15.5px; border-radius: 12px; }

/* "Fayl" oynasi — butun ekran ro'yxat */
.m-ui .backstage { inset: 0 !important; flex-direction: column; }
.m-ui .backstage .bs-side { width: auto; flex: 1; overflow-y: auto; padding: calc(10px + env(safe-area-inset-top)) 0 calc(12px + env(safe-area-inset-bottom)); }
.m-ui .backstage .bs-side button { min-height: 54px; font-size: 16.5px; padding: 12px 22px; gap: 14px; }
.m-ui .backstage .bs-main { display: none; }

/* Qidiruv paneli */
.m-ui .findbar { top: calc(62px + env(safe-area-inset-top)); left: 8px; right: 8px; width: auto; border-radius: 14px; }
.m-ui .findbar .inp { font-size: 16px; min-height: 40px; }

/* Birinchi marta maslahat */
.m-ui .m-tip {
  display: block; position: fixed; left: 12px; right: 12px; bottom: 110px; z-index: 60; background: #1f2937; color: #fff;
  border-radius: 16px; padding: 14px 16px 12px; font-size: 14.5px; line-height: 1.5; box-shadow: 0 10px 30px rgba(0, 0, 0, .3); animation: m-up .25s ease-out;
}
.m-tip button { display: block; margin: 10px 0 0 auto; background: #fff; color: #1f2937; border: 0; border-radius: 10px; padding: 8px 18px; font-weight: 700; font-size: 14.5px; }

/* ---------- Hujjat ---------- */
.m-ui .doc-area { padding: 8px 0 24px; }
.m-ui .page { font-size: 16px; }
.m-ui .img-tools { left: 8px !important; right: 8px; bottom: 150px; top: auto !important; justify-content: center; }
.m-ui .img-tools .btn { min-width: 40px; height: 38px; }

/* ---------- Jadval ---------- */
.m-ui .fbar { padding: 5px 6px; gap: 6px; }
.m-ui #nameBox { width: 62px; font-size: 14px; height: 34px; }
.m-ui #fxInput { font-size: 16px; height: 34px; }
.m-ui .sheetbar { height: 40px; }
.m-ui .sheetbar .btn { width: 40px; height: 36px; }
.m-ui .sheet-tab { font-size: 14px; padding: 0 16px; }

/* ---------- Taqdimot ---------- */
.m-ui .notes, .m-ui #notesSplit { display: none !important; }
.m-ui .sel-box .hd { width: calc(18px / var(--z, 1)); height: calc(18px / var(--z, 1)); border-width: calc(2px / var(--z, 1)); }
.stage .el, .sel-box .hd { touch-action: none; }
/* Eskiz 150 px kenglikda chiziladi (slides.js TW) — telefonda ham shu o'lcham, raqamsiz */
.m-ui .thumbs { height: 106px; padding: 8px; gap: 10px; scrollbar-width: none; }
.m-ui .thumbs::-webkit-scrollbar { display: none; }
.m-ui .thumbs .thumb { width: 154px; gap: 0; }
.m-ui .thumbs .thumb .tn { display: none; }

/* ---------- Bosh sahifa ---------- */
.m-ui body.page-home { display: flex; flex-direction: column; background: #f4f5f9; overflow: visible; height: auto; min-height: 100%; }
/* Bosh sahifani butun oyna (html) aylantiradi — body aylantirish konteyneri boʻlmasin. Avval body "overflow-y: auto" edi:
   telefonda html overflow-x: hidden (common.css) boʻlgani uchun u body'dan oynaga oʻtmay, body alohida, lekin balandligi "auto" —
   hech qachon surilmaydigan konteyner boʻlib qolardi, uning "overscroll-behavior: none"i esa barmoq harakatini oynaga oʻtkazmasdi:
   bosh sahifa faqat pastki ⊕ tugmasidan surilardi (tools/android-qa/touch-scroll.js). */
.m-ui .page-home > .hero, .m-ui .page-home > .drop-hint { display: none !important; }
.m-ui .page-home > .m-home { order: 0; }
.m-ui .page-home > #driveWrap { order: 1; }
.m-ui .page-home > .wrap { order: 2; }
.m-ui .page-home > .home-top { order: 3; }
.m-ui .page-home > .m-foot { order: 4; }
/* Kompyuterdagi bosh sahifa bilan bir xil: ingichka brend paneli, ostida oq maydonda katta tugmalar */
.m-ui .m-home {
  display: block; color: var(--text); padding: 0 16px 18px; background: #fff; border-bottom: 1px solid var(--border);
}
.m-home-bar {
  display: flex; align-items: center; gap: 10px; min-height: 56px; margin: 0 -16px; padding: env(safe-area-inset-top) 10px 0 16px; color: #fff;
  background: linear-gradient(120deg, #5b4ff0 0%, #3f5fd6 50%, #0e9384 100%);
}
.m-home-bar .ic { width: 34px; height: 34px; }
.m-home-bar .wm { height: 23px; }
.m-home-bar .sp { flex: 1; }
.m-home-bar .m-ib:active { background: rgba(255, 255, 255, .22); }
.m-home h1 { font-size: 24px; line-height: 1.22; margin: 18px 0 4px; font-weight: 700; letter-spacing: -.3px; }
.m-home p { margin: 0 0 14px; font-size: 15px; color: var(--muted); }
.m-home .m-promise { margin: 12px 0 0; font-size: 12.5px; color: var(--muted); text-align: center; }
.m-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.m-tile {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 4px 12px; border: 1px solid var(--border); border-radius: 16px;
  background: #fff; color: var(--text); cursor: pointer; box-shadow: 0 1px 3px rgba(15, 23, 42, .06); border-bottom: 3px solid var(--c); font: inherit;
}
.m-tile:active { transform: scale(.97); }
.m-tile img { width: 50px; height: 50px; }
.m-tile b { font-size: 15.5px; }
.m-tile small { font-size: 11.5px; font-weight: 700; color: var(--c); background: var(--cs); padding: 2px 9px; border-radius: 999px; }
.m-tile.t-doc { --c: #4338ca; --cs: #eef2ff; }
.m-tile.t-sheet { --c: #0f766e; --cs: #e6f6f4; }
.m-tile.t-slides { --c: #d97706; --cs: #fef3e2; }
.m-tile.t-pdf { --c: #b91c1c; --cs: #fdecec; }
/* Toʻrtta katta tugma bir qatorda (360 dp ekranda ham sigʻadi) */
.m-tiles .m-tile { padding: 14px 2px 10px; gap: 5px; border-radius: 14px; min-width: 0; }
.m-tiles .m-tile img { width: 42px; height: 42px; }
.m-tiles .m-tile b { font-size: 13.5px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-tiles .m-tile small { font-size: 11px; padding: 2px 7px; }
.m-open {
  margin-top: 12px; width: 100%; display: flex; align-items: center; gap: 12px; text-align: left; cursor: pointer; font: inherit;
  background: #fafbfc; border: 1px dashed #b8bfc9; color: var(--text); border-radius: 16px; padding: 12px 14px; font-size: 15.5px; font-weight: 600;
}
.m-open:active { background: var(--pressed); }
.m-open small { color: var(--muted); }
.m-open svg { width: 26px; height: 26px; flex: none; }
.m-open small { display: block; font-weight: 400; font-size: 12.5px; opacity: .85; margin-top: 1px; }
.m-ui .page-home .wrap { padding: 0 16px; max-width: none; margin: 0; width: 100%; }
.m-ui .page-home .section-h { margin: 22px 0 10px; }
.m-ui .page-home .section-h h2 { font-size: 18px; font-weight: 700; }
.m-ui .page-home .section-h h2[data-m] { font-size: 0; }
.m-ui .page-home .section-h h2[data-m]::after { content: attr(data-m); font-size: 18px; }
.m-ui .page-home .recent-box { background: none; border: 0; padding: 0; }
.m-ui .page-home .recent-box .recent-list { display: flex; flex-direction: column; }
.m-ui .page-home .recent-box .empty { padding: 4px 0; }
.m-ui .page-home .section-h .inp { width: 46%; font-size: 15px; height: 36px; }
.m-ui .page-home .recent-list { gap: 8px; max-width: none; }
.m-ui .page-home .recent-item { background: #fff; border-radius: 14px; padding: 12px 10px 12px 14px; gap: 12px; box-shadow: 0 1px 3px rgba(15, 23, 42, .07); min-height: 60px; }
.m-ui .page-home .recent-item svg { width: 30px; height: 30px; }
.m-ui .page-home .recent-item .ri-name { font-size: 15.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-ui .page-home .recent-item > div { min-width: 0; flex: 1; }
.m-ui .page-home .recent-item .ri-date { font-size: 12.5px; }
.m-ui .page-home .recent-item .ri-del { opacity: .55; width: 40px; height: 40px; }
.m-ui .page-home .home-top { background: none; border: 0; padding: 0 0 8px; }
.m-ui .page-home .cards { display: flex; overflow-x: auto; gap: 12px; padding-bottom: 8px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.m-ui .page-home .cards::-webkit-scrollbar { display: none; }
.m-ui .page-home .card { flex: 0 0 120px; scroll-snap-align: start; }
.m-ui .page-home .card .thumb { height: 156px; border-radius: 12px; }
.m-ui .page-home .foot { padding: 20px 16px calc(100px + env(safe-area-inset-bottom)); font-size: 12.5px; }
.m-ui .page-home .card .cap { font-size: 13.5px; }
.m-ui .m-fab {
  display: flex; align-items: center; justify-content: center; position: fixed; right: 18px; bottom: calc(22px + env(safe-area-inset-bottom));
  width: 60px; height: 60px; border: 0; border-radius: 20px; color: #fff; cursor: pointer; z-index: 50;
  background: linear-gradient(135deg, #5b4ff0, #0e9384); box-shadow: 0 8px 22px rgba(63, 59, 184, .45);
}
.m-fab svg { width: 30px; height: 30px; }
.m-fab:active { transform: scale(.94); }

/* Birinchi ochilishdagi tanishtiruv */
.m-ui .m-onb {
  display: flex; flex-direction: column; position: fixed; inset: 0; z-index: 3000; background: #fff; color: var(--text);
  padding: calc(12px + env(safe-area-inset-top)) 24px calc(22px + env(safe-area-inset-bottom));
}
.m-onb .skip { align-self: flex-end; background: none; border: 0; color: var(--muted); font-size: 15px; padding: 10px 6px; cursor: pointer; }
.m-onb .slides { flex: 1; overflow: hidden; display: flex; }
.m-onb .track { display: flex; width: 100%; transition: transform .32s ease; }
.m-onb .sl { flex: 0 0 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 0 4px; }
.m-onb .art { height: 150px; display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 26px; }
.m-onb .art img { width: 76px; height: 76px; filter: drop-shadow(0 6px 12px rgba(15, 23, 42, .18)); }
.m-onb .art .big { font-size: 92px; line-height: 1; }
.m-onb .art .big.ico svg { width: 96px; height: 96px; color: var(--m-accent, #4f46e5); }
.m-onb h2 { font-size: 25px; line-height: 1.25; margin: 0 0 12px; }
.m-onb p { font-size: 16.5px; line-height: 1.55; color: #475569; margin: 0; max-width: 340px; }
.m-onb .dots { display: flex; justify-content: center; gap: 8px; margin: 18px 0 20px; }
.m-onb .dots i { width: 8px; height: 8px; border-radius: 4px; background: #d0d5dd; transition: width .2s, background .2s; }
.m-onb .dots i.on { width: 26px; background: #5b4ff0; }
.m-onb .next { height: 54px; border: 0; border-radius: 16px; color: #fff; font-size: 17px; font-weight: 700; cursor: pointer; background: linear-gradient(135deg, #5b4ff0, #0e9384); }

/* Klaviatura ochilganda muharrir sahifasi ko'rinadigan qism balandligida (mobile.js --vvh) */
.m-ui body:not(.page-home) { height: var(--vvh, 100%); }

/* ---------- Barmoq bilan boshqarish (touch.js) ---------- */
/* Masshtab koʻrsatkichi */
.t-zoom {
  position: fixed; left: 50%; top: calc(76px + env(safe-area-inset-top)); transform: translateX(-50%) scale(.9); z-index: 2000; pointer-events: none;
  background: rgba(17, 24, 39, .82); color: #fff; font: 600 15px/1 system-ui, sans-serif; padding: 8px 14px; border-radius: 999px; opacity: 0; transition: opacity .2s, transform .2s;
}
.t-zoom.on { opacity: 1; transform: translateX(-50%) scale(1); }
/* Brauzerning oʻz masshtabi va "rezina" sakrashi oʻchiq — masshtabni ilova oʻzi boshqaradi */
.m-ui body { overscroll-behavior: none; }
.m-ui .grid-wrap, .m-ui .doc-area, .m-ui .canvas-area, .m-ui .pdf-area { overscroll-behavior: contain; touch-action: pan-x pan-y; }
.m-ui button, .m-ui .sheet-tab, .m-ui .mi { touch-action: manipulation; }

/* Jadval: tanlov tutqichlari (chap-yuqori, oʻng-pastki) — koʻrinishi kichik, bosish maydoni 44 px */
.t-handle { position: absolute; display: none; width: 44px; height: 44px; margin: -22px 0 0 -22px; z-index: 7; touch-action: none; }
.t-handle::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 14px; height: 14px; margin: -9px 0 0 -9px; border-radius: 50%;
  background: #fff; border: 2px solid var(--accent); box-shadow: 0 1px 4px rgba(0, 0, 0, .3);
}
.t-handle.fill::after { border-radius: 3px; background: var(--accent); border-color: #fff; width: 16px; height: 16px; margin: -10px 0 0 -10px; }
.t-handle.drag { pointer-events: none; }
.t-handle.drag::after { transform: scale(1.35); }
/* Telefonda katak oʻlchamini oʻzgartirish chizigʻi kengroq (barmoq uchun) */
.m-ui .grid th .rz-c { width: 18px; right: -9px; }
.m-ui .grid th .rz-r { height: 14px; bottom: -7px; }
.m-ui .fill-handle { display: none !important; }

/* Jadval: katakka yozish paneli (klaviatura ustida) */
.m-entry { display: none; }
.m-ui.s-editing .m-entry { display: flex; align-items: center; gap: 3px; padding: 5px 4px; }
.m-entry .syms { flex: 1; min-width: 0; display: flex; gap: 3px; overflow-x: auto; scrollbar-width: none; }
.m-entry .syms::-webkit-scrollbar { display: none; }
.m-ui.s-editing .m-tools .m-cats, .m-ui.s-editing .m-tools .m-row { display: none; }
.m-ek {
  flex: none; min-width: 40px; height: 44px; padding: 0 6px; border: 0; border-radius: 10px; background: #f1f3f6; color: var(--text);
  font: 600 18px/1 system-ui, sans-serif; display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.m-ek svg { width: 22px; height: 22px; }
.m-ek:active { background: var(--pressed); }
.m-ek.kb { font-size: 14px; min-width: 52px; background: var(--accent-soft); color: var(--accent-dark); }
.m-ek.ok { background: var(--accent); color: #fff; }

/* ---------- Planshet (sensorli ekran, kompyuter lentasi bilan) — bosish maydonlari kattaroq ---------- */
.t-coarse:not(.m-ui) .tabs button { height: 40px; padding: 0 16px; font-size: 14px; }
.t-coarse:not(.m-ui) .btn { min-width: 38px; height: 36px; }
.t-coarse:not(.m-ui) .btn svg { width: 19px; height: 19px; }
.t-coarse:not(.m-ui) .btn.big { height: 76px; min-width: 64px; font-size: 12.5px; }
.t-coarse:not(.m-ui) select.sel, .t-coarse:not(.m-ui) input.inp { min-height: 36px; font-size: 15px; }
.t-coarse:not(.m-ui) .menu .mi { min-height: 44px; font-size: 15px; }
.t-coarse:not(.m-ui) .sheetbar { height: 40px; }
.t-coarse:not(.m-ui) .sheet-tab { padding: 0 18px; font-size: 14px; }
.t-coarse:not(.m-ui) .statusbar .btn { height: 32px; min-width: 32px; }
.t-coarse:not(.m-ui) .grid th .rz-c { width: 16px; right: -8px; }
.t-coarse:not(.m-ui) .grid th .rz-r { height: 12px; bottom: -6px; }
/* Bu joylardan boshlangan harakat sahifani surmaydi — touchstart ishlovchisi passiv qolishi uchun (sheet.js) */
/* Ustun/qator chegarasi barmoq bilan faqat tanlangan sarlavhada (hsel) suriladi: telefonda qator raqamlari ustunining deyarli yarmi
   chegara chiziqlaridan iborat, ular hammasi "touch-action: none" boʻlsa, qator raqamlari ustidan jadvalni surib boʻlmasdi (sheet.js). */
.t-coarse .grid th.hsel .rz-c, .t-coarse .grid th.hsel .rz-r, .t-coarse .chart-box.active, .m-ui .grid th.hsel .rz-c, .m-ui .grid th.hsel .rz-r, .m-ui .chart-box.active { touch-action: none; }
.t-coarse .fill-handle { display: none !important; } /* oʻrnida — tanlov doirachalari va "Sudrab toʻldirish" */
.t-coarse .grid-wrap, .t-coarse .doc-area, .t-coarse .canvas-area, .t-coarse .pdf-area { touch-action: pan-x pan-y; overscroll-behavior: contain; }
/* Jadval: roʻyxatdan tanlash tugmasi (▼) barmoq uchun kattaroq va tanlov doirachasi ustida */
.m-ui .dv-btn, .t-coarse .dv-btn { width: 32px; height: 32px; line-height: 30px; font-size: 13px; margin-top: -14px; z-index: 8; border-radius: 6px; }
.m-ui .dv-tip { max-width: calc(100vw - 80px); font-size: 13.5px; }
/* Jadval: diagramma tugmalari va burchagi, formula takliflari — barmoq uchun */
.m-ui .chart-box .ch-bar button, .t-coarse .chart-box .ch-bar button { font-size: 13.5px; padding: 8px 12px; border-radius: 8px; }
.m-ui .chart-box .ch-rz, .t-coarse .chart-box .ch-rz { width: 22px; height: 22px; right: -11px; bottom: -11px; border-radius: 50%; border: 2px solid #fff; }
.m-ui .fx-ac { min-width: 0; max-width: calc(100vw - 16px); max-height: 38vh; overflow-y: auto; }
.m-ui .fx-ac .ac-it { padding: 10px 12px; font-size: 15px; }
.m-ui .fx-hint { max-width: calc(100vw - 16px); font-size: 13.5px; }
/* Xabarlar (toast) muharrirda pastki panel ustida — tugmalarni yopmaydi (mobile.js --m-tools-h) */
.m-ui body:not(.page-home) .toast { bottom: calc(var(--m-tools-h, 0px) + 12px); width: max-content; max-width: calc(100% - 24px); box-sizing: border-box; font-size: 14px; line-height: 1.4; }

/* ---------- Koʻrish rejimi (mobile.js setView): tahrirlash paneli yopiq, mazmun butun ekranda ---------- */
.m-edit-fab, .m-done { display: none; }
.m-ui.m-editing .m-done { display: inline-flex; color: var(--accent-dark); }
.m-ui.m-view :is(.m-tools, .m-bar .m-hide-view, .pdf-mbar, .fbar, body.theme-slides .thumbs) { display: none !important; }
.m-ui.m-view .m-edit-fab {
  display: flex; align-items: center; gap: 8px; position: fixed; right: 16px; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 41;
  min-width: 52px; height: 52px; padding: 0 20px 0 16px; border: 0; border-radius: 26px; background: var(--accent); color: #fff;
  font: 600 15px/1 "Segoe UI", Roboto, sans-serif; box-shadow: 0 4px 14px rgba(0, 0, 0, .25); cursor: pointer; touch-action: manipulation;
}
.m-ui.m-view .m-edit-fab svg { width: 22px; height: 22px; }
.m-ui.m-view .m-edit-fab:active { transform: scale(.96); }
.m-ui.m-kb .m-edit-fab, .m-ui body:has(> .menu, > .modal-back, > .m-tip, > .show, > .backstage) .m-edit-fab { display: none !important; }
/* Koʻrish rejimida xabarlar pastki chetda (pastki panel yoʻq) */
.m-ui.m-view body:not(.page-home) .toast { bottom: calc(82px + env(safe-area-inset-bottom)); }
/* Sahifa/slayd koʻrsatkichi "3 / 12" (Taqdimot, PDF — koʻrish rejimida doim koʻrinadi) */
.m-view-pill { display: none; }
.m-ui.m-view .m-view-pill {
  display: block; position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(28px + env(safe-area-inset-bottom)); z-index: 40;
  background: rgba(17, 24, 39, .78); color: #fff; border-radius: 999px; padding: 6px 14px; font: 600 13px/1 "Segoe UI", Roboto, sans-serif;
  font-variant-numeric: tabular-nums; pointer-events: none;
}
.m-ui.m-view #pagePill { opacity: 1; bottom: calc(28px + env(safe-area-inset-bottom)); }
.m-ui.m-view #pagePill:empty { display: none; }
/* Koʻrish rejimida slayd elementi ustidan ham surish mumkin (elementlar sudralmaydi), forma maydonlari va diagrammalar tahrirlanmaydi */
.m-ui.m-view .stage .el { touch-action: pan-x pan-y; cursor: default; }
.m-ui.m-view .grid .chart-box.active { touch-action: pan-x pan-y; }
.m-ui.m-view .annotationLayer :is(input, textarea, select, button) { pointer-events: none; }
/* Jadval: pastda varaq yorliqlari — ✎ va xabarlar ulardan yuqorida */
.m-ui.m-view body.theme-sheet .m-edit-fab { bottom: calc(52px + env(safe-area-inset-bottom)); }
.m-ui.m-view body.theme-sheet .toast { bottom: calc(116px + env(safe-area-inset-bottom)); }
/* Telefon: katta ikonkalar — chiziq biroz qalinroq (common.css → svg.ico) */
.m-ui svg.ico { --sw: 1.75px; }
