/* Smiles v1.2 — toza, barqaror (oq fon, faqat tepaga-pastga scroll) */
.checkbox-optimize { max-width: 25% !important; box-sizing: border-box !important; }
.modal_bottom::before, #attachments_upload::before { content: none !important; display: none !important; }
.modal_bottom > .modal-grabber { width: 36px; height: 4px; background: #d1d5db; border-radius: 4px; margin: 8px auto 4px; display: block; }
.modal-bottom-container { max-height: 40vh !important; height: auto !important; overflow-y: auto !important; }

:root {
  --smiles-h: 48vh;
  --sm-bg: #fff; --sm-bg2: #f2f3f5; --sm-line: #ebebef;
  --sm-text: #1c1c1e; --sm-muted: #8e8e93; --sm-blue: #3478f6; --sm-peach: #fde6d6;
}
body.smiles-tall { --smiles-h: 80vh; }
@supports (height: 1dvh) {
  :root { --smiles-h: 48dvh; }
  body.smiles-tall { --smiles-h: 80dvh; }
}

/* ===== Panel ===== */
#smiles.smiles-show {
  position: fixed; left: 0; right: 0; bottom: 0; top: auto;
  width: 100%; max-width: 100%;
  height: var(--smiles-h); min-height: 260px; max-height: 92vh;
  margin: 0; box-sizing: border-box;
  display: flex; flex-direction: column;
  background: var(--sm-bg); color: var(--sm-text);
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -6px 28px rgba(0,0,0,.14);
  z-index: 10050; overflow: hidden;
  touch-action: pan-y; overscroll-behavior: contain;
  transform: translateY(105%); visibility: hidden;
  transition: transform .24s ease, height .22s ease, visibility 0s .24s;
}
#smiles.smiles-open { transform: none; visibility: visible; transition: transform .24s ease, height .22s ease, visibility 0s; }

/* Sahifa tarkibi panel ostida qolmasin */
body.smiles-panel-open:not(.page-chat):not(.smiles-chat) { padding-bottom: var(--smiles-h) !important; }
body.smiles-panel-open:not(.page-chat):not(.smiles-chat) .panel-bottom-comments {
  position: fixed !important; left: 0 !important; right: 0 !important; bottom: var(--smiles-h) !important;
  width: 100% !important; margin: 0 !important; z-index: 10060 !important;
  background: #fff !important; padding: 6px 8px !important; box-sizing: border-box !important;
}
body.page-chat.smiles-panel-open, body.smiles-chat.smiles-panel-open { padding-bottom: 0 !important; }
body.smiles-panel-open .chat-form-top, body.smiles-panel-open #chat-write-box, body.smiles-panel-open .chat-write-box,
body.page-chat .panel-bottom-comments, body.smiles-chat .panel-bottom-comments {
  position: static !important; bottom: auto !important; z-index: auto !important; box-shadow: none !important; transform: none !important;
}
.chat-panels-bottom #smiles { position: fixed !important; margin: 0 !important; }

/* Katta/kichik tugma (tutqich) */
.sm-grabber { flex: none; display: block; width: 100%; height: 18px; border: 0; background: none; padding: 0; cursor: pointer; }
.sm-grabber i { display: block; width: 36px; height: 4px; margin: 7px auto 0; border-radius: 4px; background: #c8c8cc; }

/* ===== Paketlar qatori (faqat shu qator chapga-o'ngga suriladi) ===== */
.sm-packs {
  position: relative; flex: none; display: flex; align-items: center; gap: 2px;
  padding: 2px 8px 6px; min-height: 48px;
  overflow-x: auto; overflow-y: hidden; white-space: nowrap; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  border-bottom: 1px solid var(--sm-line);
}
.sm-packs::-webkit-scrollbar { display: none; }
#smiles_packs_list { display: inline-flex; align-items: center; gap: 2px; }
.sm-pk {
  position: relative; flex: 0 0 auto; width: 42px; height: 42px; padding: 0; border: 0; border-radius: 50%;
  background: transparent; color: #636366; display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; text-decoration: none !important;
}
.sm-pk img { width: 28px; height: 28px; object-fit: contain; border-radius: 6px; pointer-events: none; }
.sm-pk.active { background: #ececf0; color: #1c1c1e; }
.sm-pk:active { opacity: .7; }
.smiles-pack-price {
  position: absolute; right: -2px; bottom: -2px; background: var(--sm-blue); color: #fff;
  font-size: 9px; font-weight: 700; line-height: 1; padding: 2px 4px; border-radius: 6px; pointer-events: none;
}

/* ===== Qidiruv ===== */
.sm-search { flex: none; max-height: 0; opacity: 0; overflow: hidden; padding: 0 12px; pointer-events: none; transition: max-height .2s, opacity .18s, padding .2s; }
.sm-search.sm-open { max-height: 56px; opacity: 1; padding: 6px 12px 8px; pointer-events: auto; }
.sm-search input {
  width: 100%; box-sizing: border-box; border: 0 !important; outline: 0 !important; border-radius: 12px !important;
  background: var(--sm-bg2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%238e8e93' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85zm-5.242.656a5 5 0 1 1 0-10 5 5 0 0 1 0 10z'/%3E%3C/svg%3E") no-repeat 12px center !important;
  color: var(--sm-text) !important; padding: 10px 12px 10px 36px !important; font-size: 15px !important;
}

/* ===== Kontent: faqat tepaga-pastga ===== */
#smiles_up {
  position: relative; flex: 1 1 auto; min-height: 0; background: #fff;
  overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; touch-action: pan-y;
  -webkit-overflow-scrolling: touch; padding: 0 0 8px; transition: opacity .15s;
}
#smiles_up.sm-busy { opacity: .55; }
.sm-sec { display: block; }
.sm-title {
  position: sticky; top: 0; z-index: 3; display: flex; align-items: center; justify-content: space-between;
  min-height: 30px; padding: 6px 12px; box-sizing: border-box;
  font-size: 13px; font-weight: 600; color: #6b6b70; white-space: nowrap;
  background: rgba(255,255,255,.96); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.sm-title .sm-t { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.sm-title .smiles-cnt { flex: none; margin-left: 6px; font-size: 11px; font-weight: 500; opacity: .45; }
.smiles-clear-recent { flex: none; min-width: 28px; min-height: 28px; padding: 4px 8px; border: 0; border-radius: 8px; background: transparent; color: var(--sm-muted); font-size: 18px; line-height: 1; cursor: pointer; }
.smiles-clear-recent:active { background: #e8e8ed; color: #ff3b30; }
.smiles-empty { display: block; padding: 24px 16px; text-align: center; color: var(--sm-muted); font-size: 14px; }

/* ===== Setkalar ===== */
.sm-grid { display: grid; gap: 2px; padding: 2px 6px 8px; box-sizing: border-box; }
.sm-st { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.sm-gf { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sm-em { grid-template-columns: repeat(8, minmax(0, 1fr)); }
.sm-grid > .smile {
  display: flex; align-items: center; justify-content: center; min-width: 0; aspect-ratio: 1;
  cursor: pointer; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; transition: transform .08s;
}
.sm-grid > .smile:active { transform: scale(.92); }
.sm-st img, .sm-gf img { width: 100%; height: 100%; max-width: 84px; max-height: 84px; object-fit: contain; pointer-events: none; }
.sm-gf img { max-width: none; max-height: none; border-radius: 10px; }
.sm-em > .smile { aspect-ratio: auto; padding: 6px 0; }
.sm-em img { width: auto; height: auto; max-width: 28px; max-height: 28px; }
.smile-locked, .sm-locked > .smile { opacity: .4; cursor: default; }

/* Pulli paket */
.smiles-paid-box { margin: 8px 12px; padding: 14px; text-align: center; background: linear-gradient(180deg, #f0f5ff, #f7f8fa); border: 1px solid #d6e2ff; border-radius: 14px; }
.smiles-paid-price { margin-bottom: 10px; font-size: 14px; color: var(--sm-text); }
.smiles-paid-note { margin-top: 8px; font-size: 12px; color: var(--sm-muted); }
.smiles-buy-btn { display: inline-flex; align-items: center; gap: 6px; padding: 10px 18px; background: var(--sm-blue); color: #fff !important; border-radius: 12px; font-size: 14px; font-weight: 700; text-decoration: none !important; }

/* ===== Pastki panel (ustiga chiqmaydi, oqim ichida) ===== */
.sm-nav {
  position: relative; flex: none; display: flex; align-items: center; justify-content: center;
  padding: 6px 10px calc(8px + env(safe-area-inset-bottom, 0px)); background: #fff; border-top: 1px solid var(--sm-line);
}
.sm-pill { display: inline-flex; align-items: center; }
.sm-nav-btn { padding: 8px 9px; min-height: 34px; border: 0; border-radius: 20px; background: transparent; color: #555; font-size: 13px; font-weight: 600; white-space: nowrap; cursor: pointer; }
.sm-nav-btn.active { background: var(--sm-peach); color: var(--sm-text); }
.sm-side { position: absolute; top: 50%; margin-top: -19px; width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 50%; background: transparent; color: #666; text-decoration: none !important; cursor: pointer; }
.sm-set { left: 8px; }
.sm-kb { right: 8px; display: none; color: var(--sm-blue); user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.sm-side:active { opacity: .6; }

/* ===== Tozalash oynasi ===== */
.smiles-sheet-bg { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 10070; display: flex; align-items: flex-end; justify-content: center; }
.smiles-sheet { width: 100%; max-width: 480px; background: #fff; border-radius: 14px 14px 0 0; padding: 8px 0 calc(12px + env(safe-area-inset-bottom, 0px)); animation: smSheet .22s ease; }
@keyframes smSheet { from { transform: translateY(40%); opacity: .5; } to { transform: none; opacity: 1; } }
.smiles-sheet button { display: block; width: 100%; padding: 14px 16px; border: 0; background: transparent; color: var(--sm-text); font-size: 16px; cursor: pointer; }
.smiles-sheet button.danger { color: #ff3b30; font-weight: 600; }
.smiles-sheet button + button { border-top: 1px solid var(--sm-line); }

/* ===== Himoya qatlami: eski v43 CSS yoki sayt umumiy qoidalari bilan to'qnashmasligi uchun ===== */
body #smiles.smiles-show {
  position: fixed !important; left: 0 !important; right: 0 !important; bottom: 0 !important; top: auto !important;
  display: flex !important; flex-direction: column !important;
  height: var(--smiles-h) !important; min-height: 260px !important; max-height: 92vh !important;
  width: 100% !important; max-width: 100% !important; overflow: hidden !important; background: #fff !important;
  transform: translateY(105%) !important; visibility: hidden !important;
}
body #smiles.smiles-show.smiles-open { transform: none !important; visibility: visible !important; opacity: 1 !important; pointer-events: auto !important; }
#smiles .sm-packs { display: flex !important; flex-wrap: nowrap !important; align-items: center !important; }
#smiles .sm-pk { width: 42px !important; height: 42px !important; min-width: 42px !important; padding: 0 !important; margin: 0 !important; border: 0 !important; border-radius: 50% !important; background: transparent !important; box-shadow: none !important; line-height: 1 !important; display: inline-flex !important; align-items: center !important; justify-content: center !important; }
#smiles .sm-pk.active { background: #ececf0 !important; }
#smiles .sm-pk > svg, #smiles .sm-pk > i, #smiles .sm-pk > span:not(.smiles-pack-price) { width: auto; max-width: 22px; max-height: 22px; font-size: 18px; line-height: 1; }
#smiles .sm-pk > img { width: 28px !important; height: 28px !important; max-width: 28px !important; max-height: 28px !important; object-fit: contain !important; }
#smiles #smiles_up { flex: 1 1 auto !important; min-height: 0 !important; overflow-x: hidden !important; overflow-y: auto !important; }
#smiles .sm-grid { display: grid !important; width: 100% !important; box-sizing: border-box !important; }
#smiles .sm-st { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; }
#smiles .sm-gf { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 8px !important; padding: 4px 10px 10px !important; }
#smiles .sm-em { grid-template-columns: repeat(8, minmax(0, 1fr)) !important; }
#smiles .sm-grid > .smile { display: flex !important; width: auto !important; max-width: none !important; min-width: 0 !important; margin: 0 !important; padding: 0 !important; float: none !important; }
#smiles .sm-st img { width: 100% !important; height: 100% !important; max-width: 84px !important; max-height: 84px !important; object-fit: contain !important; }
#smiles .sm-gf > .smile { aspect-ratio: 3 / 2 !important; }
#smiles .sm-gf img { width: 100% !important; height: 100% !important; max-width: none !important; max-height: none !important; object-fit: cover !important; border-radius: 12px; }
#smiles .sm-em > .smile { padding: 6px 0 !important; }
#smiles .sm-em img { width: auto !important; height: auto !important; max-width: 28px !important; max-height: 28px !important; }
#smiles .sm-nav { display: flex !important; }
#smiles .sm-nav-btn { padding: 8px 9px !important; border: 0 !important; background: transparent !important; box-shadow: none !important; }
#smiles .sm-nav-btn.active { background: #fde6d6 !important; color: #1c1c1e !important; }

/* ===== v45: native emoji, tablar, takliflar, sozlamalar ===== */
#smiles .sm-e { display: flex; align-items: center; justify-content: center; padding: 5px 0; font-size: clamp(21px, 5.8vw, 26px); line-height: 1.2; cursor: pointer; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; transition: transform .08s; font-family: "Apple Color Emoji","Segoe UI Emoji","Noto Color Emoji",sans-serif; }
#smiles .sm-e:active { transform: scale(1.3); }
#smiles .sm-nat > .sm-e { min-width: 0; }
#smiles .sm-sub { position: static; min-height: 22px; padding: 8px 12px 2px; font-size: 12px; font-weight: 500; color: #9a9aa0; background: none; backdrop-filter: none; }
#smiles .sm-big { position: static; padding: 12px 12px 2px; font-size: 14px; font-weight: 700; color: #3a3a3c; background: none; backdrop-filter: none; }
@keyframes smA0 { 50% { transform: scale(1.18); } } @keyframes smA1 { 0%,100% { transform: rotate(-12deg); } 50% { transform: rotate(12deg); } }
@keyframes smA2 { 50% { transform: translateY(-5px); } } @keyframes smA3 { to { transform: rotate(360deg); } }
.sm-an0 { animation: smA0 1s infinite; } .sm-an1 { animation: smA1 1.2s infinite; } .sm-an2 { animation: smA2 .9s infinite; } .sm-an3 { animation: smA3 3s linear infinite; }
#smiles_native { display: inline-flex; align-items: center; gap: 2px; }
#smiles .sm-pk.sm-red svg { fill: #e53935; stroke: none; }

/* Pastki o'ng: kattalashtirish + o'chirish (OK kabi) */
#smiles .sm-set, #smiles .sm-kb { display: none; }
#smiles[data-mode="stickers"] .sm-set { display: inline-flex; }
#smiles[data-mode="emoji"] .sm-kb { display: inline-flex; }
.sm-right { position: absolute; right: 6px; top: 50%; margin-top: -19px; display: flex; }
.sm-right .sm-btn { width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 50%; background: transparent; color: #666; cursor: pointer; padding: 0; -webkit-tap-highlight-color: transparent; }
.sm-right .sm-kb { color: #5f6368; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.sm-right .sm-btn:active { opacity: .55; }
#smiles_expand svg { transition: transform .2s; } body.smiles-tall #smiles_expand { color: #e8590c; } body.smiles-tall #smiles_expand svg { transform: rotate(180deg); }
#smiles .sm-side { width: 38px; height: 38px; }

/* Emoji uchun o'xshash stikerlar (input tepasida, chat ustida) */
.smiles-suggest { position: fixed; left: 0; right: 0; bottom: 120px; display: none; gap: 8px; padding: 4px 10px 6px; overflow-x: auto; overflow-y: hidden; z-index: 10040; pointer-events: none; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.smiles-suggest::-webkit-scrollbar { display: none; }
.smiles-suggest.on { display: flex; }
.smiles-suggest .smile { pointer-events: auto; flex: 0 0 auto; width: 84px; height: 84px; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.smiles-suggest img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 1px 3px rgba(0,0,0,.25)); pointer-events: none; }

/* Stikerlar sozlamalari (OK kabi) */
.sm-set-bg { position: fixed; inset: 0; z-index: 10080; background: #f6f1ee; display: flex; flex-direction: column; transform: translateY(100%); transition: transform .25s; overflow: hidden; }
.sm-set-bg.in { transform: none; }
.sm-set-hd { flex: none; display: flex; align-items: center; padding: 12px 8px; background: #fff; font-weight: 600; font-size: 17px; position: relative; justify-content: center; }
.sm-set-hd .sm-set-x { position: absolute; left: 8px; top: 6px; width: 40px; height: 40px; border: 0; background: none; font-size: 20px; color: #444; cursor: pointer; }
.sm-set-bd { flex: 1; overflow-y: auto; overflow-x: hidden; padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px)); }
.sm-set-row, .sm-prow { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: #fff; border-bottom: 1px solid #f0ebe8; font-size: 15px; box-sizing: border-box; }
.sm-set-row > span { flex: 1; } .sm-set-row b { color: #999; font-size: 22px; font-weight: 400; }
.sm-tap { cursor: pointer; margin-top: 12px; } .sm-set-sec { margin: 18px 16px 6px; font-size: 16px; font-weight: 700; }
.sm-prow img { width: 38px; height: 38px; object-fit: contain; flex: none; } .sm-prow .sm-pt { flex: 1; min-width: 0; } .sm-prow .sm-pt b { display: block; font-weight: 500; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .sm-prow small { color: #888; font-size: 12px; }
.sm-handle { color: #999; font-size: 26px; padding: 2px 6px; touch-action: none; cursor: grab; user-select: none; }
.sm-prow.drag { box-shadow: 0 4px 16px rgba(0,0,0,.25); position: relative; z-index: 2; opacity: .95; }
.sm-sw { position: relative; width: 46px; height: 28px; flex: none; } .sm-sw input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; z-index: 2; }
.sm-sw i { position: absolute; inset: 0; background: #d9d9de; border-radius: 14px; transition: .2s; } .sm-sw i::after { content: ""; position: absolute; left: 2px; top: 2px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.35); transition: .2s; }
.sm-sw input:checked + i { background: #ee8208; } .sm-sw input:checked + i::after { left: 20px; }

/* ===== v47 ===== */
/* Pastki tablar: chapga siqilgan, o'ng tomonda ^ va ⌫ uchun joy */
#smiles .sm-nav { display: grid !important; grid-template-columns: 44px minmax(0, 1fr) 84px; align-items: center; padding-left: 4px !important; padding-right: 6px !important; }
#smiles .sm-nav .sm-side { position: static !important; margin: 0 !important; }
#smiles .sm-set { display: inline-flex !important; visibility: hidden; }
#smiles[data-mode="stickers"] .sm-set { visibility: visible; }
#smiles .sm-pill { justify-self: center; max-width: 100%; overflow: hidden; }
#smiles .sm-nav-btn { padding: 8px 7px !important; font-size: 13px !important; }
#smiles .sm-right { position: static !important; margin: 0 !important; justify-self: end; }

/* Stikerlar sozlamalari: uzun modal (pastdan chiqadi) */
.sm-set-bg { background: rgba(0,0,0,.42) !important; display: block !important; transform: none !important; opacity: 0; transition: opacity .2s !important; overflow: hidden; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.sm-set-bg.in { opacity: 1; }
.sm-set-sheet { position: absolute; left: 0; right: 0; bottom: 0; height: 90%; max-height: 92vh; display: flex; flex-direction: column; background: #f6f1ee; border-radius: 18px 18px 0 0; overflow: hidden; transform: translateY(100%); transition: transform .26s ease; box-shadow: 0 -8px 30px rgba(0,0,0,.2); }
.sm-set-bg.in .sm-set-sheet { transform: none; }
.sm-set-hd { border-radius: 18px 18px 0 0; }
.sm-set-bd { -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.sm-prow { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; cursor: pointer; }
.sm-handle { display: flex; align-items: center; justify-content: center; width: 52px; height: 44px; margin: -6px -10px -6px 0; padding: 0 !important; font-size: 26px; touch-action: none; }
.sm-del { flex: none; width: 34px; height: 34px; border: 0; border-radius: 50%; background: #fdecea; color: #e53935; font-size: 20px; line-height: 1; cursor: pointer; padding: 0; }
.sm-add { flex: none; border: 0; border-radius: 10px; background: #ee8208; color: #fff; font-size: 14px; font-weight: 600; padding: 9px 14px; cursor: pointer; }
.sm-prow.drag { background: #fff8f2; transform: scale(1.015); }

/* O'xshash stikerlar: modal tepasida, qancha bo'lsa shuncha, o'ngga-chapga scroll, X bilan yopiladi */
.smiles-suggest { display: none !important; left: 0 !important; right: 0 !important; padding: 6px 0 !important; gap: 0 !important; overflow: visible !important; pointer-events: auto !important; background: rgba(255,255,255,.94) !important; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 -3px 12px rgba(0,0,0,.08); }
.smiles-suggest.on { display: block !important; }
.smiles-suggest .sg-in { display: flex; gap: 8px; overflow-x: auto; overflow-y: hidden; padding: 2px 46px 2px 10px; -webkit-overflow-scrolling: touch; scrollbar-width: none; touch-action: pan-x; overscroll-behavior-x: contain; }
.smiles-suggest .sg-in::-webkit-scrollbar { display: none; }
.smiles-suggest .smile { flex: 0 0 auto !important; width: 84px !important; height: 84px !important; }
.smiles-suggest .smile img { width: 100% !important; height: 100% !important; max-width: 84px !important; max-height: 84px !important; object-fit: contain !important; }
.smiles-suggest .sg-x { position: absolute; right: 8px; top: 8px; width: 30px; height: 30px; border: 0; border-radius: 50%; background: rgba(0,0,0,.12); color: #444; font-size: 20px; line-height: 1; padding: 0; cursor: pointer; z-index: 2; }

/* ===== v49 ===== */
.sm-set-sheet { height: 62% !important; transition: transform .26s ease, height .2s ease !important; }
.sm-set-grip { flex: none; height: 22px; display: flex; align-items: center; justify-content: center; cursor: grab; touch-action: none; background: #fff; border-radius: 18px 18px 0 0; }
.sm-set-grip i { width: 40px; height: 4px; border-radius: 4px; background: #c8c8cc; }
.sm-set-hd { border-radius: 0 !important; touch-action: none; padding-top: 2px !important; }
#smiles .sm-kb { display: inline-flex !important; }
.sm-suggest { display: none; flex: none; position: relative; background: #fff; border-bottom: 1px solid #ebebef; }
.sm-suggest.on { display: block; }
#smiles .sm-suggest .sg-in { display: flex; gap: 6px; overflow-x: auto; overflow-y: hidden; padding: 4px 44px 4px 8px; -webkit-overflow-scrolling: touch; scrollbar-width: none; touch-action: pan-x; overscroll-behavior-x: contain; }
#smiles .sm-suggest .sg-in::-webkit-scrollbar { display: none; }
#smiles .sm-suggest .smile { flex: 0 0 auto !important; width: 76px !important; height: 76px !important; display: flex !important; align-items: center; justify-content: center; cursor: pointer; }
#smiles .sm-suggest .smile img { width: 100% !important; height: 100% !important; max-width: 76px !important; max-height: 76px !important; object-fit: contain !important; pointer-events: none; }
#smiles .sm-suggest .sg-x { position: absolute; right: 6px; top: 6px; width: 28px; height: 28px; border: 0; border-radius: 50%; background: rgba(0,0,0,.1); color: #444; font-size: 19px; line-height: 1; padding: 0; cursor: pointer; }
#smiles[data-ver]::after { content: attr(data-ver); position: absolute; right: 14px; top: 3px; font-size: 9px; color: #c0c0c6; pointer-events: none; }

/* ===== v1.2 ===== */
.sm-set-hd { padding-left: 52px !important; padding-right: 52px !important; }
.sm-set-hd .sm-set-x { left: auto !important; right: 6px !important; top: 0 !important; }
#smiles .sm-set { display: inline-flex !important; visibility: visible !important; }
#smiles .sm-e { min-height: 40px; }
#smiles .sm-e img { width: 30px; height: 30px; display: block; pointer-events: none; object-fit: contain; -webkit-touch-callout: none; }
#smiles .sm-ani img { width: 34px; height: 34px; }
#smiles .sm-gifa { aspect-ratio: 1; }
/* Telegram kabi to'plam oynasi (xabardagi stikerni bosganda) */
.sm-pm { height: 74% !important; }
.sm-pm-hd { display: flex; align-items: center; gap: 10px; padding: 6px 12px 10px 14px; background: #fff; }
.sm-pm-hd img { width: 42px; height: 42px; object-fit: contain; flex: none; }
.sm-pm-t { flex: 1; min-width: 0; } .sm-pm-t b { display: block; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .sm-pm-t small { color: #888; font-size: 12px; }
.sm-pm-btn { flex: none; border: 0; border-radius: 10px; background: #eceff4; color: #333; font-weight: 600; font-size: 14px; padding: 9px 13px; cursor: pointer; }
.sm-pm-btn.add { background: #ee8208; color: #fff; }
.sm-pm-hd .sm-set-x { position: static !important; flex: none; width: 34px !important; height: 34px !important; border: 0; background: none; font-size: 18px; color: #555; cursor: pointer; }
.sm-pm-bd { background: #fff; padding: 6px 8px 24px; }
#sm_pack_modal .sm-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
#sm_pack_modal .sm-grid > .smile { display: flex; align-items: center; justify-content: center; aspect-ratio: 1; cursor: pointer; }
#sm_pack_modal .smile img { width: 100%; height: 100%; max-width: 84px; max-height: 84px; object-fit: contain; }
#sm_pack_modal .smile-locked { opacity: .4; }

/* ===== v1.3 ===== */
/* stikerlar 5 ustun, emojilar 8 ustun */
#smiles .sm-e { min-height: 46px; }
#smiles .sm-e img { width: 36px !important; height: 36px !important; max-width: 36px !important; max-height: 36px !important; }
#smiles .sm-ani img { width: 40px !important; height: 40px !important; max-width: 40px !important; max-height: 40px !important; }
/* pastki tablar: kontent pastga aylantirilganda pastga yo'qoladi, ozgina tepaga qaytarilsa chiqadi */
#smiles .sm-nav { max-height: 96px; overflow: hidden; transition: max-height .22s ease, opacity .18s ease, padding .22s ease; }
#smiles.sm-nav-off .sm-nav { max-height: 0 !important; opacity: 0; padding-top: 0 !important; padding-bottom: 0 !important; border-top-width: 0 !important; pointer-events: none; }
