/* Ofisbop — Taqdimot muharriri uslublari. Copyright (c) 2026 "VIJDON" MChJ. Barcha huquqlar himoyalangan. */
.workspace { flex: 1; display: flex; min-height: 0; }

/* Slayd eskizlari paneli */
.thumbs {
  width: 200px; flex: none; overflow-y: auto; overflow-x: hidden; background: var(--ribbon);
  border-right: 1px solid var(--border); padding: 10px 8px 40px; outline: none;
}
.thumb { display: flex; gap: 6px; align-items: flex-start; margin-bottom: 10px; cursor: pointer; position: relative; }
.thumb .tn { width: 18px; text-align: right; font-size: 11px; color: var(--muted); padding-top: 2px; flex: none; }
.thumb .tbox {
  flex: 1; position: relative; overflow: hidden; background: #fff; border: 2px solid transparent; border-radius: 4px;
  box-shadow: 0 0 0 1px var(--border);
}
.thumb:hover .tbox { box-shadow: 0 0 0 1px #b9c0ca; }
.thumb.active .tbox { border-color: var(--accent); box-shadow: none; }
.thumbs:focus .thumb.active .tbox { box-shadow: 0 0 0 2px var(--accent-soft); }
.thumb .tbox .slide { position: absolute; left: 0; top: 0; transform-origin: 0 0; pointer-events: none; }
.thumb.drop-before::before, .thumb.drop-after::after {
  content: ""; position: absolute; left: 20px; right: 0; height: 3px; background: var(--accent); border-radius: 2px;
}
.thumb.drop-before::before { top: -7px; }
.thumb.drop-after::after { bottom: -7px; }
.thumb.dragging { opacity: .4; }
.thumbs-add {
  display: block; width: calc(100% - 24px); margin: 4px 0 0 24px; height: 30px; border: 1px dashed #b9c0ca; background: transparent;
  border-radius: 4px; color: var(--muted); cursor: pointer;
}
.thumbs-add:hover { border-color: var(--accent); color: var(--accent-dark); background: var(--accent-soft); }

/* Asosiy ustun: kanvas + eslatmalar */
.main-col { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.canvas-area { flex: 1; overflow: auto; background: var(--bg); position: relative; display: flex; min-height: 0; }
.stage-wrap { position: relative; margin: auto; flex: none; }
.stage { position: absolute; left: 0; top: 0; transform-origin: 0 0; box-shadow: 0 1px 4px rgba(0, 0, 0, .25); }
.sel-layer { position: absolute; left: 0; top: 0; transform-origin: 0 0; pointer-events: none; }
.notes-split { height: 5px; flex: none; cursor: ns-resize; background: var(--border); }
.notes-split:hover { background: var(--accent); }
.notes { height: 110px; flex: none; background: var(--panel); display: flex; }
.notes textarea {
  flex: 1; border: 0; resize: none; padding: 10px 16px; font: 14px/1.5 "Segoe UI", system-ui, sans-serif; outline: none; background: transparent; color: var(--text);
}
body.no-notes .notes, body.no-notes .notes-split { display: none; }

/* Slayd (kanvas, eskiz, namoyish va chop etish uchun umumiy) */
.slide { position: relative; overflow: hidden; background: #fff; }
.slide .deco { position: absolute; pointer-events: none; }
.slide .el { position: absolute; box-sizing: border-box; }
.slide .el .txt {
  position: absolute; inset: 0; padding: 4.8px 9.6px; display: flex; flex-direction: column; justify-content: flex-start;
  outline: none; word-wrap: break-word; overflow-wrap: break-word; white-space: pre-wrap; cursor: inherit;
  counter-reset: n;
}
.slide .el .txt[data-va="m"] { justify-content: center; }
.slide .el .txt[data-va="b"] { justify-content: flex-end; }
.slide .el .txt p { margin: 0; line-height: 1.2; min-height: 1em; position: relative; }
.slide .el .txt p[data-list] { padding-left: 36px; }
.slide .el .txt p[data-list]::before { content: attr(data-m); position: absolute; left: 0; top: 0; color: var(--bc, inherit); font-size: var(--bs, inherit); }
.slide .el .txt p[data-lvl="1"] { margin-left: 48px; }
.slide .el .txt p[data-lvl="2"] { margin-left: 96px; }
.slide .el .txt p[data-lvl="3"] { margin-left: 144px; }
.slide .el .txt p[data-lvl="4"] { margin-left: 192px; }
.slide .el .txt p[data-lvl="5"] { margin-left: 240px; }
.slide .el .txt p[data-lvl="6"] { margin-left: 288px; }
.slide .el .txt p[data-lvl="7"] { margin-left: 336px; }
.slide .el .txt p[data-lvl="8"] { margin-left: 384px; }
.slide .el .txt .lnk { color: #0563c1; text-decoration: underline; }
.slide .el .txt.vert { writing-mode: vertical-rl; }
.slide .el .txt.vert270 { writing-mode: vertical-rl; transform: rotate(180deg); }
.slide .el .imgc { position: absolute; inset: 0; overflow: hidden; }
.slide .el.chart svg { position: absolute; left: 0; top: 0; overflow: visible; }
.slide .el.media { background: #111; }
.slide .el.media.audio { background: transparent; }
.slide .el.media video, .slide .el.media audio { position: absolute; inset: 0; width: 100%; height: 100%; }
.slide .el.media audio { top: auto; height: 40px; min-width: 220px; }
.slide .el .mbadge { position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; transform: translate(-50%, -50%); pointer-events: none; }
.slide .el.media.audio .mbadge { width: 100%; height: 100%; max-width: 96px; max-height: 96px; }
.slide .el .mbadge svg { width: 100%; height: 100%; display: block; }
.show .el.media.audio .mbadge { pointer-events: none; }
.show .has-link, .show .lnk { cursor: pointer; }
.slide .el .txt.editing { cursor: text; user-select: text; }
.slide .el .txt.ph-empty::after {
  content: attr(data-ph); position: absolute; left: 9.6px; right: 9.6px; color: rgba(128, 128, 128, .75); pointer-events: none;
}
.slide .el .txt.ph-empty.ph-list::after { left: 45.6px; }
.slide .el .txt.ph-empty[data-va="b"]::after { bottom: 4.8px; }
.slide .el .txt.ph-empty:not([data-va="b"])::after { top: 4.8px; }
.slide .el .txt.ph-empty[data-va="m"]::after { top: 50%; transform: translateY(-50%); }
.slide .el.ph-box { outline: 1px dashed rgba(128, 128, 128, .6); }
.slide.static .el.ph-box { outline: 0; }
.slide.static .el .txt.ph-empty::after { content: none; }
.slide .el svg.shp { position: absolute; left: 0; top: 0; overflow: visible; }
.slide .el img { position: absolute; left: 0; top: 0; width: 100%; height: 100%; display: block; user-select: none; -webkit-user-drag: none; }
.slide .el table { width: 100%; height: 100%; border-collapse: collapse; table-layout: fixed; }
.slide .el td { padding: 4.8px 9.6px; vertical-align: middle; line-height: 1.2; outline: none; white-space: pre-wrap; overflow: hidden; word-wrap: break-word; }
.slide .el td.editing { cursor: text; }
.slide .el td:focus { box-shadow: inset 0 0 0 2px rgba(217, 119, 6, .6); }
.stage .el { cursor: move; }
.stage .el.editing-el { cursor: default; }

/* Tanlov ramkasi va tutqichlar */
.sel-box { position: absolute; border: 1px solid var(--accent); pointer-events: none; }
.sel-box.editing { border-style: dashed; }
.sel-box .hd {
  position: absolute; width: calc(10px / var(--z, 1)); height: calc(10px / var(--z, 1)); background: #fff;
  border: calc(1.5px / var(--z, 1)) solid var(--accent); border-radius: 50%; pointer-events: auto;
  transform: translate(-50%, -50%);
}
.sel-box .hd[data-h="nw"], .sel-box .hd[data-h="se"] { cursor: nwse-resize; }
.sel-box .hd[data-h="ne"], .sel-box .hd[data-h="sw"] { cursor: nesw-resize; }
.sel-box .hd[data-h="n"], .sel-box .hd[data-h="s"] { cursor: ns-resize; }
.sel-box .hd[data-h="e"], .sel-box .hd[data-h="w"] { cursor: ew-resize; }
.sel-box { border-width: calc(1px / var(--z, 1)); }
.snap-guide { position: absolute; background: #e11d48; pointer-events: none; }
/* Telefon: shakllar kutubxonasi va oynalar ekranga moslashadi, tugmalar barmoq uchun kattaroq */
.m-ui .shape-lib { width: auto; max-height: none; }
.m-ui .shape-lib .sl-cat { font-size: 13px; padding: 10px 4px 4px; }
.m-ui .shape-lib .sl-grid { grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: 4px; }
.m-ui .shape-lib .sl-btn { width: auto; height: 46px; border-radius: 10px; padding: 6px; }
.m-ui .shape-lib .sl-btn svg { width: 30px; height: 30px; margin: auto; }
.m-ui .chart-dlg, .m-ui .img-dlg { width: auto; max-width: 100%; }
.m-ui .chart-top { flex-direction: column; align-items: stretch; }
.m-ui .chart-form { min-width: 0; }
.m-ui .chart-preview { min-height: 180px; overflow: hidden; }
.m-ui .chart-preview svg { max-width: 100%; height: auto; }
.m-ui .chart-grid input { font-size: 16px; min-height: 40px; width: 84px; }
/* Namoyish: barmoq uchun kattaroq asboblar, pastda oʻrtada */
.t-coarse .show .sh-tools { left: 8px; right: 8px; width: fit-content; margin: 0 auto; bottom: calc(10px + env(safe-area-inset-bottom)); gap: 1px; padding: 3px; flex-wrap: wrap; justify-content: center; }
.t-coarse .show .sh-btn { width: 40px; height: 44px; padding: 10px 8px; }
.t-coarse .show .pen-c { width: 28px; height: 28px; }
.t-coarse .show .counter { bottom: calc(68px + env(safe-area-inset-bottom)); } /* asboblar paneli ustida */
/* Maʼruzachi oynasi telefonda: ustun — slayd, keyingisi va eslatmalar ostma-ost */
.m-ui .show .mr-head { flex-wrap: wrap; gap: 6px; padding: calc(8px + env(safe-area-inset-top)) 10px 8px; }
.m-ui .show .mr-time { font-size: 22px; min-width: 0; }
.m-ui .show .mr-clock { font-size: 15px; }
.m-ui .show .mr-btn { min-height: 40px; padding: 6px 12px; }
.m-ui .show .mr-body { flex-direction: column; gap: 8px; padding: 8px; overflow: auto; }
.m-ui .show .mr-main { flex: none; aspect-ratio: 16 / 9; }
.m-ui .show .mr-side { min-width: 0; flex: 1; }
.m-ui .show .mr-next { width: 50%; }
.m-ui .show .mr-notes { font-size: 17px; min-height: 120px; }
/* Saralagich telefonda: ikki ustun, bosilsa slayd ochiladi */
.m-ui .sorter { padding: 10px 10px 30px; }
.m-ui .sg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.m-ui .sg { zoom: .7; }
.m-ui .sg-n { font-size: 16px; }
.m-ui .tsec { font-size: 14px; padding: 8px 10px; }
/* Animatsiyalar roʻyxati telefonda pastdan chiqadigan varaq */
.m-ui .anim-pane { position: fixed; left: 0; right: 0; bottom: 0; width: auto; height: 55%; z-index: 60; border: 0; border-radius: 18px 18px 0 0; box-shadow: 0 -8px 30px rgba(0, 0, 0, .22); padding-bottom: env(safe-area-inset-bottom); animation: m-up .18s ease-out; }
.m-ui .anim-pane .ap-head .btn { width: 44px; height: 44px; }
/* Ekranda kichik element: oʻrtadagi tutqichlar yashiriladi, burish tutqichi uzoqroqda (renderSel → .tiny) */
.t-coarse .sel-box.tiny .hd:not([data-h="se"]):not([data-h="nw"]):not(.rot) { display: none; }
.t-coarse .sel-box.tiny .hd.rot { margin-top: calc(-14px / var(--z, 1)); }
.t-coarse .sel-box.tiny .hd.rot::before { height: calc(30px / var(--z, 1)); }
/* Sensorli ekran: tutqichni barmoq bilan ushlash oson boʻlsin (atrofida koʻrinmas kattaroq joy);
   ikki barmoq harakatini brauzer emas, dastur bajaradi (touch.js) */
.t-coarse .sel-box .hd::after { content: ""; position: absolute; inset: calc(-14px / var(--z, 1)); border-radius: 50%; }
.t-coarse .canvas-area, .t-coarse #canvasArea { touch-action: pan-x pan-y; }

/* Mavzular galereyasi */
.theme-gallery { gap: 6px !important; align-items: stretch !important; }
.theme-item {
  width: 104px; height: 62px; border: 1px solid var(--border); border-radius: 4px; cursor: pointer; position: relative; overflow: hidden; padding: 0;
  background: #fff;
}
.theme-item:hover { outline: 2px solid var(--accent-soft); }
.theme-item.on { outline: 2px solid var(--accent); }
.theme-item .slide { position: absolute; left: 0; top: 0; transform-origin: 0 0; pointer-events: none; }
.theme-item .tname {
  position: absolute; left: 0; right: 0; bottom: 0; font-size: 10px; background: rgba(0, 0, 0, .45); color: #fff; padding: 1px 4px; text-align: left;
}

/* Mavzu konstruktori */
.td-dlg { display: flex; gap: 18px; width: min(780px, 88vw); flex-wrap: wrap; }
.td-l { flex: 1; min-width: 300px; display: flex; flex-direction: column; gap: 6px; }
.td-l h4 { margin: 8px 0 2px; font-size: 13px; }
.td-r { width: 360px; }
.td-prev { position: relative; width: 360px; overflow: hidden; border: 1px solid var(--border); border-radius: 4px; }
.td-prev .slide { position: absolute; left: 0; top: 0; }
.td-row { display: flex; gap: 10px; align-items: center; }
.td-row > span { width: 80px; font-size: 13px; }
.td-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; }
.td-c { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }
.td-c input[type=color] { width: 34px; height: 26px; border: 1px solid var(--border); border-radius: 4px; padding: 0; background: none; }
.theme-gallery { max-width: 580px; overflow: hidden; flex-wrap: nowrap !important; position: relative; padding-right: 24px !important; }
.theme-more { position: absolute; right: 0; top: 0; bottom: 0; width: 20px; border: 1px solid var(--border); background: var(--panel); border-radius: 4px; cursor: pointer; padding: 0; margin-left: 2px; }
.theme-more:hover { border-color: var(--accent); }
.theme-grid { display: grid; grid-template-columns: repeat(4, 104px); gap: 8px; padding: 6px 8px; }
.theme-item { flex: none; }

/* Maket menyusi */
.layout-grid { display: grid; grid-template-columns: repeat(3, 116px); gap: 8px; padding: 8px; }
.layout-card { cursor: pointer; text-align: center; font-size: 11px; color: var(--muted); }
.layout-card .lpic { width: 116px; height: 66px; border: 1px solid var(--border); border-radius: 3px; position: relative; overflow: hidden; background: #fff; }
.layout-card:hover .lpic { outline: 2px solid var(--accent); }
.layout-card .lpic i { position: absolute; background: #d7dbe2; border-radius: 1px; }
.layout-card .lpic i.t { background: #9aa3af; }
.table-grid { display: grid; grid-template-columns: repeat(10, 16px); gap: 2px; padding: 8px; }
.table-grid span { width: 16px; height: 16px; border: 1px solid var(--border); background: #fff; }
.table-grid span.on { background: var(--accent-soft); border-color: var(--accent); }
.table-lbl { padding: 0 8px 6px; font-size: 12px; color: var(--muted); }
.size-inputs .grow span { width: 70px; font-size: 12px; }
.size-inputs .inp { width: 70px; }

/* Namoyish */
.show {
  position: fixed; inset: 0; z-index: 5000; background: #000; display: flex; align-items: center; justify-content: center; cursor: none;
}
.show.cursor { cursor: default; }
.show .layer { position: absolute; left: 0; top: 0; transform-origin: 0 0; transition: opacity .45s ease; }
.show .layer.out { opacity: 0; }
.show .blank { position: absolute; inset: 0; background: #000; z-index: 3; display: none; }
.show.black .blank { display: block; }
.show .counter {
  position: absolute; right: 16px; bottom: 12px; z-index: 4; color: #fff; font: 13px "Segoe UI", sans-serif; background: rgba(0, 0, 0, .45);
  padding: 3px 10px; border-radius: 12px; opacity: 0; transition: opacity .3s;
}
.show.cursor .counter { opacity: 1; }
.show .end { color: #bbb; font: 18px "Segoe UI", sans-serif; position: absolute; z-index: 2; }

/* Chop etish / PDF: har slayd alohida yotiq sahifada */
.print-area { display: none; }
@media print {
  body > *:not(.print-area) { display: none !important; }
  .print-area { display: block !important; }
  .print-area .pslide { page-break-after: always; break-after: page; overflow: hidden; position: relative; }
  .print-area .pslide:last-child, .print-area .ppage:last-child { page-break-after: auto; break-after: auto; }
  .print-area .ppage { page-break-after: always; break-after: page; overflow: hidden; position: relative; background: #fff; }
  body { display: block; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Eslatmali sahifalar va tarqatma (A4) */
.print-area .pp-slide { position: absolute; overflow: hidden; outline: 1px solid #9aa3af; }
.print-area .pp-slide .slide { position: absolute; left: 0; top: 0; }
.print-area .pp-notes { position: absolute; font: 14pt/1.45 "Segoe UI", Calibri, sans-serif; color: #111; white-space: pre-wrap; overflow: hidden; }
.print-area .pp-head { position: absolute; left: 50px; right: 50px; top: 22px; font: 10pt "Segoe UI", sans-serif; color: #6b7280; }
.print-area .pp-foot { position: absolute; left: 0; right: 0; bottom: 20px; text-align: center; font: 10pt "Segoe UI", sans-serif; color: #6b7280; }
.print-area .pp-lines { position: absolute; background: repeating-linear-gradient(to bottom, transparent 0, transparent 27px, #c7ccd4 27px, #c7ccd4 28px); }

/* Telefonda: slaydlar eskizi pastda gorizontal tasma bo'lib turadi */
@media screen and (max-width: 760px), screen and (max-height: 500px) and (pointer: coarse) {
  .workspace { flex-direction: column-reverse; }
  /* Ustun yoʻnalishida min-height: 0 boʻlmasa, kattalashtirilgan slayd .main-col ni ekrandan choʻzib yuboradi: sahna surilmaydi,
     eskizlar tasmasi va asboblar ekrandan chiqib ketadi */
  .main-col { min-height: 0; }
  .thumbs { width: auto; height: 96px; display: flex; gap: 8px; overflow-x: auto; overflow-y: hidden; padding: 8px; border-right: 0; border-top: 1px solid var(--border); }
  .thumbs .thumb { width: 132px; flex: none; margin-bottom: 0; }
  .thumbs .thumbs-add { flex: none; width: 110px; margin: 0; }
  .notes { height: 64px; }
}

/* ---- Taqdimot pro: tanlov, burish, ramka bilan tanlash ---- */
.sel-sub { position: absolute; border: calc(1px / var(--z, 1)) dashed var(--accent); pointer-events: none; opacity: .8; }
.sel-box.multi { border-style: dashed; }
.sel-box.locked { border-color: #9aa3af; }
.sel-box .hd.rot {
  left: 50% !important; top: calc(-26px / var(--z, 1)) !important; cursor: grab; background: var(--accent);
  border-color: #fff;
}
.sel-box .hd.rot::before { content: ""; position: absolute; left: 50%; top: 100%; width: calc(1px / var(--z, 1)); height: calc(16px / var(--z, 1)); background: var(--accent); transform: translateX(-50%); pointer-events: none; }
.rot-tip { position: absolute; transform: translate(-50%, -100%) scale(calc(1 / var(--z, 1))); transform-origin: 50% 100%; background: #111827; color: #fff; font: 12px "Segoe UI", sans-serif; padding: 2px 6px; border-radius: 4px; pointer-events: none; white-space: nowrap; }
.marquee { position: absolute; border: calc(1px / var(--z, 1)) solid var(--accent); background: rgba(217, 119, 6, .08); pointer-events: none; }
.slide .el td.cell-sel { box-shadow: inset 0 0 0 9999px rgba(217, 119, 6, .22); }
.btn.caret-only { padding: 0 1px; min-width: 12px; margin-left: -4px; }

/* Shakllar kutubxonasi */
.shape-lib { width: 312px; max-height: 70vh; overflow-y: auto; padding: 4px 6px 8px; }
.shape-lib .sl-cat { font-size: 11px; color: var(--muted); padding: 6px 2px 3px; }
.shape-lib .sl-grid { display: grid; grid-template-columns: repeat(10, 28px); gap: 2px; }
.shape-lib .sl-btn { width: 28px; height: 28px; border: 1px solid transparent; background: transparent; border-radius: 4px; padding: 2px; cursor: pointer; color: var(--text); }
.shape-lib .sl-btn:hover { border-color: var(--accent); background: var(--accent-soft); }
.shape-lib .sl-btn svg { width: 22px; height: 22px; display: block; }

/* Diagramma oynasi */
.chart-dlg { width: min(760px, 86vw); }
.chart-top { display: flex; gap: 14px; align-items: flex-start; }
.chart-form { display: grid; grid-template-columns: auto 1fr; gap: 6px 8px; align-items: center; min-width: 250px; }
.chart-form label { font-size: 12px; color: var(--muted); }
.chart-form label.chk { grid-column: 1 / 3; color: var(--text); }
.chart-preview { flex: 1; min-height: 240px; border: 1px solid var(--border); border-radius: 4px; background: #fff; display: flex; align-items: center; justify-content: center; }
.chart-grid-wrap { max-height: 34vh; overflow: auto; border: 1px solid var(--border); border-radius: 4px; margin-top: 6px; }
.chart-grid { border-collapse: collapse; }
.chart-grid td { padding: 0; border: 1px solid var(--border); }
.chart-grid input { width: 92px; border: 0; padding: 4px 6px; font: inherit; background: transparent; color: var(--text); }
.chart-grid input.hd { font-weight: 600; background: var(--ribbon); }
.chart-tools { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.chart-dlg .hint, .modal .hint { font-size: 12px; color: var(--muted); margin: 8px 0 0; }

/* Rasm oynasi */
.img-dlg { width: min(420px, 86vw); }
.img-dlg h4 { margin: 10px 0 4px; font-size: 13px; }
.img-dlg .srow { display: grid; grid-template-columns: 110px 1fr 44px; align-items: center; gap: 8px; font-size: 13px; }
.img-dlg .srow .val { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.img-dlg .chk { display: block; margin-top: 6px; }
.img-dlg-btns { margin-top: 10px; }

/* ---- Namoyish: ijrochi, qalam, lazer, asboblar paneli ---- */
.show .sh-stage { position: absolute; inset: 0; overflow: hidden; }
.show .sh-stage .layer { position: absolute; }
.show .blank { z-index: 6; }
.show.white .blank { display: block; background: #fff; }
.show .ink { position: absolute; left: 0; top: 0; z-index: 5; pointer-events: none; }
.show.pen-on .sh-stage { cursor: crosshair; }
.show .laser { position: absolute; z-index: 7; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: #ff1f3d; box-shadow: 0 0 8px 3px rgba(255, 31, 61, .65); pointer-events: none; display: none; }
.show.laser-on, .show.laser-on .sh-stage { cursor: none; }
.show .end { z-index: 4; inset: 0; display: flex; align-items: center; justify-content: center; background: #000; }
.show .goto { position: absolute; z-index: 8; left: 50%; top: 40%; transform: translate(-50%, -50%); background: rgba(0, 0, 0, .75); color: #fff; font: 600 40px "Segoe UI", sans-serif; padding: 10px 24px; border-radius: 10px; display: none; }
.show .sh-tools { position: absolute; left: 16px; bottom: 14px; z-index: 9; display: flex; gap: 4px; align-items: center; opacity: 0; transition: opacity .3s; background: rgba(20, 20, 24, .55); padding: 4px; border-radius: 10px; }
.show.cursor .sh-tools, .show .sh-tools:hover, .show.pen-on .sh-tools { opacity: 1; }
.show .sh-btn { width: 34px; height: 34px; border: 0; border-radius: 8px; background: transparent; color: #fff; cursor: pointer; padding: 6px; }
.show .sh-btn:hover { background: rgba(255, 255, 255, .16); }
.show .sh-btn.on { background: rgba(255, 255, 255, .28); }
.show .sh-btn svg { width: 22px; height: 22px; display: block; }
.show .pen-cols { display: none; gap: 3px; padding: 0 4px; }
.show.pen-on .pen-cols { display: inline-flex; }
.show .pen-c { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .6); cursor: pointer; padding: 0; }
.show .pen-c.on { border-color: #fff; box-shadow: 0 0 0 2px rgba(255, 255, 255, .5); }
.show .sh-grid { position: absolute; inset: 0; z-index: 20; background: rgba(10, 10, 12, .92); overflow: auto; padding: 28px; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; align-content: start; }
.show .sh-gi { background: transparent; border: 2px solid transparent; border-radius: 6px; padding: 0; cursor: pointer; color: #ddd; position: relative; }
.show .sh-gi.on { border-color: #f59e0b; }
.show .sh-gi.hid { opacity: .5; }
.show .sh-gi .tbox { position: relative; overflow: hidden; width: 150px; }
.show .sh-gi .tbox .slide { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.show .sh-gi span { position: absolute; left: 4px; top: 2px; background: rgba(0, 0, 0, .6); color: #fff; font: 12px "Segoe UI", sans-serif; padding: 0 6px; border-radius: 6px; }

/* Maʼruzachi oynasi */
.show.presenter { background: #17181c; cursor: default; display: block; }
.show .mr { position: absolute; inset: 0; display: flex; flex-direction: column; color: #e5e7eb; font: 14px "Segoe UI", system-ui, sans-serif; }
.show .mr-head { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: #0f1013; border-bottom: 1px solid #2a2c33; }
.show .mr-time { font: 600 28px "Segoe UI", sans-serif; font-variant-numeric: tabular-nums; min-width: 140px; }
.show .mr-time.paused { color: #f59e0b; }
.show .mr-clock { font-size: 18px; color: #9ca3af; font-variant-numeric: tabular-nums; }
.show .mr-num { color: #cbd5e1; margin: 0 8px; }
.show .mr-head .sp { flex: 1; }
.show .mr-btn { background: #2a2c33; color: #e5e7eb; border: 1px solid #3a3d46; border-radius: 6px; padding: 6px 12px; cursor: pointer; font: inherit; }
.show .mr-btn:hover { background: #343741; }
.show .mr-btn.stopbtn { background: #b91c1c; border-color: #b91c1c; color: #fff; }
.show .mr-btn.sm { padding: 1px 8px; margin-left: 4px; }
.show .mr-body { flex: 1; display: flex; min-height: 0; gap: 14px; padding: 14px; }
.show .mr-main { flex: 1.7; position: relative; min-width: 0; background: #000; border-radius: 6px; overflow: hidden; }
.show .mr-main .sh-stage { position: absolute; inset: 0; }
.show .mr-main .sh-tools { opacity: 1; }
.show .mr-side { flex: 1; display: flex; flex-direction: column; min-width: 240px; gap: 6px; }
.show .mr-lbl { color: #9ca3af; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; display: flex; align-items: center; }
.show .mr-next { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: 6px; overflow: hidden; flex: none; color: #9ca3af; display: flex; align-items: center; justify-content: center; }
.show .mr-next .layer { position: absolute; }
.show .mr-notes { flex: 1; overflow: auto; background: #0f1013; border: 1px solid #2a2c33; border-radius: 6px; padding: 12px 14px; font-size: 20px; line-height: 1.5; white-space: pre-wrap; }
body.audience .titlebar, body.audience .tabs, body.audience .ribbon, body.audience .workspace, body.audience .statusbar { visibility: hidden; }

/* Muharrir: oʻtish/animatsiya koʻrib chiqish, tartib raqamlari, roʻyxat paneli */
.preview-ov { position: absolute; inset: 0; z-index: 30; background: #000; overflow: hidden; cursor: pointer; }
.preview-ov .layer { position: absolute; }
.anim-layer { position: absolute; left: 0; top: 0; transform-origin: 0 0; pointer-events: none; z-index: 1; }
.an-badge { position: absolute; display: flex; gap: 2px; transform: translate(-100%, 0) scale(calc(1 / var(--z, 1))); transform-origin: 100% 0; }
.an-badge span { min-width: 16px; height: 16px; padding: 0 3px; border-radius: 3px; font: 600 11px/16px "Segoe UI", sans-serif; text-align: center; color: #fff; background: #16a34a; }
.an-badge span.c-emph { background: #ca8a04; }
.an-badge span.c-out { background: #dc2626; }
.anim-pane { width: 280px; flex: none; background: var(--panel); border-left: 1px solid var(--border); display: flex; flex-direction: column; min-height: 0; }
.anim-pane[hidden] { display: none; }
.ap-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.ap-list { flex: 1; overflow-y: auto; padding: 4px 0; }
.ap-empty { padding: 14px; color: var(--muted); font-size: 13px; }
.ap-row { display: flex; align-items: center; gap: 6px; padding: 5px 8px; cursor: pointer; font-size: 13px; border-left: 3px solid transparent; }
.ap-row:hover { background: var(--ribbon); }
.ap-row.on { background: var(--accent-soft); border-left-color: var(--accent); }
.ap-n { width: 16px; text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.ap-st { width: 12px; color: var(--muted); }
.ap-dot { width: 9px; height: 9px; border-radius: 50%; background: #16a34a; flex: none; }
.ap-row.c-emph .ap-dot { background: #ca8a04; }
.ap-row.c-out .ap-dot { background: #dc2626; }
.ap-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-fx { color: var(--muted); font-size: 12px; white-space: nowrap; }
.ap-b { border: 0; background: transparent; cursor: pointer; color: var(--muted); padding: 0 3px; font-size: 12px; }
.ap-b:hover { color: var(--text); }
.ap-foot { padding: 8px; border-top: 1px solid var(--border); }
.tr-gallery, .an-gallery { gap: 2px !important; }
.tr-item, .an-item { flex-direction: column; height: 58px !important; min-width: 58px; font-size: 11px; padding: 4px 4px 2px !important; gap: 2px; }
.tr-item svg, .an-item svg { width: 26px !important; height: 26px !important; }
.an-item.c-in svg { color: #16a34a; }
.an-item.c-emph svg { color: #ca8a04; }
.an-item.c-out svg { color: #dc2626; }
.thumb.hid .tbox { opacity: .45; }
.thumb.sel .tbox { box-shadow: 0 0 0 2px var(--accent); }
.tsec { margin: 4px 0 6px; padding: 3px 6px; font-size: 12px; color: var(--text); background: var(--accent-soft); border-radius: 4px; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tsec span { color: var(--muted); }
.tsec:hover { outline: 1px solid var(--accent); }
/* Slaydlar saralagichi */
.sorter { display: none; flex: 1; overflow: auto; background: var(--bg); padding: 16px 20px 40px; outline: none; }
body.sorter-on .sorter { display: block; }
body.sorter-on .workspace > .thumbs, body.sorter-on .workspace > .main-col, body.sorter-on .workspace > .anim-pane { display: none; }
.sorter .tsec { font-size: 13px; margin: 10px 0 8px; display: inline-block; padding: 4px 10px; }
.sg-grid { display: grid; grid-template-columns: repeat(auto-fill, 228px); gap: 16px; }
.sg { position: relative; cursor: pointer; }
.sg .tbox { position: relative; overflow: hidden; background: #fff; border: 2px solid transparent; border-radius: 4px; box-shadow: 0 0 0 1px var(--border); }
.sg .tbox .slide { position: absolute; left: 0; top: 0; transform-origin: 0 0; pointer-events: none; }
.sg.active .tbox { border-color: var(--accent); }
.sg.sel .tbox { box-shadow: 0 0 0 3px var(--accent-soft), 0 0 0 1px var(--accent); }
.sg.hid .tbox { opacity: .45; }
.sg-n { display: flex; gap: 8px; font-size: 12px; color: var(--muted); padding: 3px 2px; }
.sg-n i { font-style: normal; color: var(--accent); }
.sg.drop-before::before, .sg.drop-after::after { content: ""; position: absolute; top: 0; bottom: 18px; width: 3px; background: var(--accent); border-radius: 2px; }
.sg.drop-before::before { left: -10px; }
.sg.drop-after::after { right: -10px; }
.sg.dragging { opacity: .4; }
/* Namuna (master) rejimi, kolontitul */
body.master-mode .canvas-area { box-shadow: inset 0 0 0 3px var(--accent); }
.stage .el.mst, .stage .el.ftr { pointer-events: none; }
.ftr-dlg { width: min(420px, 86vw); display: flex; flex-direction: column; gap: 8px; }
.ftr-dlg .ftr-row { display: flex; gap: 8px; padding-left: 22px; }
.ftr-dlg .ftr-row .inp { flex: 1; }
.ftr-dlg > .inp { margin-left: 22px; width: calc(100% - 22px) !important; }
.thumb.hid .tn { text-decoration: line-through; }
.thumb .tn .tfx { display: block; font-style: normal; font-size: 10px; color: var(--accent); }
