body.sheet-lock { overflow:hidden; }
.sheet {
  position: fixed;
  display: none;
  z-index: 10000;
  left: 0;
  right: 0;
  bottom: 0;
  top: 0;
}
.sheet--visible{ display:block; }
.sheet__backdrop {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  background-color: rgba(0,0,0,.4);
  opacity:0;
  transition:opacity .26s cubic-bezier(.2,.8,.2,1);

  will-change:opacity;
}
.sheet--dragging .sheet__backdrop{ transition:none; }
.sheet--open .sheet__backdrop{ opacity:1; }

/* blur = дорого на Android → отключаем классом */
.sheet--no-blur .sheet__backdrop{
  -webkit-backdrop-filter:none;
  backdrop-filter:none;
}

/* сама панель: translate3d включает GPU-композитинг */
.sheet__panel{
  position:absolute; left:0; right:0; bottom:0;
  background:#fff;
  border-radius:16px 16px 0 0;
  box-shadow:0 -10px 30px rgba(2,6,23,.22);
  transform:translate3d(0,100%,0);
  padding:8px 12px 12px;
  width:calc(100% - 40px);
  max-width:532px;
  margin:0 auto;
  touch-action:pan-y;
  will-change:transform;
}
.sheet--animating .sheet__panel{
  transition:transform .26s cubic-bezier(.2,.8,.2,1);
}
.sheet--dragging .sheet__panel{ transition:none; }
.sheet--open .sheet__panel{ transform:translate3d(0,0,0); }

/* более лёгкая тень для слабых устройств */
.sheet--lite .sheet__panel{ box-shadow:0 -6px 18px rgba(2,6,23,.18); }

.sheet__handle{ width:42px;height:5px;border-radius:999px;background:#e6e9ee;margin:6px auto 8px; }
.sheet__list{ display:flex; flex-direction:column; gap:6px; margin:8px 0; }
a.sheet__item, .sheet__item{
  display:flex; align-items:center; gap:10px; padding:12px; border-radius:12px;
  background:#f7f4f2; text-decoration:none; color:#232324;
}
a.sheet__item:hover{ background:#eef2f6; }
.sheet__item--danger{ color:#d93025; }
.sheet__item--danger:hover{ background:#fff3f1; }

.sheet__cancel{
  width:100%; margin-top:6px; padding:12px; border-radius:12px;
  background:#f2f3f5; cursor:pointer;
}

/* без выделения при тяге */
.sheet__panel{ -webkit-user-select:none; user-select:none; }
.sheet__panel input, .sheet__panel textarea{ -webkit-user-select:text; user-select:text; }

/* свой контент в шторке */
.sheet--custom .sheet__cancel{ display:none; }
.sheet--custom .sheet__list{ display:block; margin:0; }
.sheet--custom .sheet__panel{ box-sizing:border-box; max-height:92vh; max-height:calc(100dvh - 16px); overflow-y:auto; overscroll-behavior:contain; padding:8px 0 calc(8px + env(safe-area-inset-bottom,0px)); }
[data-theme="dark"] .sheet--custom .sheet__panel{ background:var(--fon_korob,#19191a); }
@media (max-width:600px){
  .sheet--custom .sheet__panel{ width:calc(100% - 16px); }
}
[data-theme="dark"] .sheet--custom .sheet__handle{ background:#3a3b3d; }

.sheet--reactions .sheet__panel {
  display: flex;
  flex-direction: column;
  height: 70vh;
  height: 70dvh;
  overflow: hidden;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.sheet--reactions .sheet__list,
.rx-view,
.rx-view .rx-list,
.rx-body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
}
.sheet--reactions .sheet__handle {
  display: block !important;
  flex: none;
  touch-action: none;
}
.sheet--reactions .sheet__handle::after {
  content: "";
  display: block;
  height: 22px;
  transform: translateY(-8px);
}
.rx-view, .rx-list {
  --rx-text: #14191f;
  --rx-muted: #637182;
  --rx-soft: #f0f2f5;
  --rx-line: #e7ebef;
  color: var(--rx-text);
  font-family: -apple-system, system-ui, "Helvetica Neue", Roboto, sans-serif;
}
[data-theme="dark"] .rx-view, [data-theme="dark"] .rx-list {
  --rx-text: #edf0f3;
  --rx-muted: #a4afbd;
  --rx-soft: #2b2d31;
  --rx-line: #303236;
}
.rx-head {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  height: 48px;
  padding: 0 16px;
  touch-action: none;
}
.rx-head h2 {
  margin: 0;
  padding: 0;
  font-size: 20px;
  font-weight: 500;
}
.rx-close {
  display: none;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--rx-soft);
  color: var(--rx-text);
  cursor: pointer;
}
.rx-tabs {
  flex: none;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  margin: 0 16px;
  padding: 4px 0 9px;
  border-bottom: 1px solid var(--rx-line);
}
.rx-tabs a {
  display: flex;
  flex: none;
  align-items: center;
  gap: 5px;
  min-height: 34px;
  padding: 0 8px;
  border-radius: 8px;
  color: var(--rx-muted);
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
}
.rx-tabs:not(.rx-tabs--pending) a[aria-current="true"],
.rx-tabs a[data-rx-pending],
.rx-tabs a:hover {
  background: var(--rx-soft);
  color: var(--rx-text);
}
.rx-tabs a:focus-visible,
.rx-person:focus-visible {
  outline-offset: -2px;
}
.rx-tabs img { display: block; }
.rx-view .rx-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  touch-action: pan-y;
}
.rx-scroll { padding: 5px 8px 8px; }
a.rx-person, .rx-placeholder {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 0 8px;
}
a.rx-person {
  border-radius: 10px;
  color: var(--rx-text);
  text-decoration: none;
}
a.rx-person:hover { background: var(--rx-soft); }
.rx-avatar {
  display: block;
  flex: none;
  position: relative;
  width: 42px;
  height: 42px;
}
.rx-avatar-photo {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}
.rx-avatar-reaction {
  position: absolute;
  right: -2px;
  bottom: -1px;
}
.rx-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rx-status, .rx-more, .rx-error {
  margin: 0;
  padding: 14px 12px;
  color: var(--rx-muted);
  text-align: center;
}
.rx-error {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}
.rx-error button, .rx-more a {
  display: inline-block;
  background: var(--rx-soft);
  border: 0;
  border-radius: 8px;
  padding: 7px 12px;
  color: var(--rx-text);
  cursor: pointer;
  text-decoration: none;
}
.rx-opening {
  display: grid;
  flex: 1;
  place-items: center;
}
.rx-spinner {
  display: block;
  box-sizing: border-box;
  width: 18px;
  height: 18px;
  border: 2px solid var(--rx-line);
  border-top-color: #2688eb;
  border-radius: 50%;
  animation: rx-spin .72s linear infinite;
}
.rx-more--loading {
  display: grid;
  place-items: center;
}
.rx-more--loading > * { grid-area: 1 / 1; }
.rx-more--loading a {
  opacity: 0;
  pointer-events: none;
}
.rx-scroll--loading > :not(.rx-skeleton) { display: none; }
.rx-skeleton { animation: rx-pulse 1.25s ease-in-out infinite alternate; }
.rx-skeleton > .rx-spinner { margin: 12px auto; }
.rx-placeholder::before, .rx-placeholder::after {
  content: "";
  display: block;
  background: var(--rx-soft);
}
.rx-placeholder::before {
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
}
.rx-placeholder::after {
  width: min(144px, 52%);
  height: 12px;
  border-radius: 6px;
}
.rx-placeholder:nth-child(3n + 2)::after { width: min(112px, 44%); }
.rx-placeholder:nth-child(3n)::after { width: min(166px, 62%); }
@keyframes rx-spin { to { transform: rotate(360deg); } }
@keyframes rx-pulse { to { opacity: .5; } }
.rx-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
@media (min-width: 768px) and (pointer: fine) {
  :is(.sheet--reactions, .sheet--status-x) .sheet__panel {
    --sheet-hidden-transform: translateY(12px) scale(.98);
    inset: 0;
    width: min(440px, calc(100% - 32px));
    height: min(600px, calc(100vh - 48px));
    height: min(600px, calc(100dvh - 48px));
    margin: auto;
    padding: 0;
    border-radius: 14px;
    opacity: 0;
    transform: var(--sheet-hidden-transform);
  }
  :is(.sheet--reactions, .sheet--status-x).sheet--animating .sheet__panel {
    transition: transform .26s cubic-bezier(.2,.8,.2,1), opacity .26s ease;
  }
  :is(.sheet--reactions, .sheet--status-x).sheet--open .sheet__panel {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  :is(.sheet--reactions, .sheet--status-x) .sheet__handle { display: none !important; }
  .rx-close {
    display: grid;
    transform: translateY(2px);
  }
}
@media (prefers-reduced-motion: reduce) {
  :is(.sheet--reactions, .sheet--status-x).sheet--animating .sheet__panel { transition: none; }
  .rx-spinner, .rx-skeleton { animation: none; }
}

/* ожидание загрузки */
.sheet--wait .sheet__backdrop::after{
  content:''; position:absolute; left:50%; bottom:48px; width:30px; height:30px; margin-left:-15px;
  border-radius:50%; border:3px solid rgba(255,255,255,.35); border-top-color:#fff;
  opacity:0; animation:sheetSpin .8s linear infinite, sheetFade .2s .25s forwards;
}
@keyframes sheetSpin{ to{ transform:rotate(360deg); } }
@keyframes sheetFade{ to{ opacity:1; } }

/* предпочитаем «без анимаций» — просто прыжок */
@media (prefers-reduced-motion: reduce){
  .sheet__backdrop{ transition:none; }
  .sheet--animating .sheet__panel{ transition:none; }
}
.sheet__item--danger, .sheet__item--danger a, a.sheet__item--danger {
  color: #d93025;
}






.modalka {
  position: fixed;
  z-index: 11000;
  display: none;
  align-items: center;
  justify-content: center;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
}
.modal--visible {
  display: flex;
}
.modal__backdrop {
  position: absolute;
  background-color: rgba(0,0,0,.4);
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
}
.modal__dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 380px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.08), 0px 4px 16px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}
.modal__body {
  padding: 16px;
  color: #232324;
}
.modal__title {
  font-weight: 700;
  margin: 4px 0 8px;
  font-size: 16px;
}
.ui-muted {
  color: #818c99;
  margin: 16px 0;
}
.modal__actions {
  display: flex;
  gap: 8px;
  width: 100%;
}
.modal__actions .btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 10px;
  background: #f2f3f5;
  cursor: pointer;
  font: inherit;
  text-decoration: none;
  color: #232324 !important;
  width: 100%;
  align-items: center;
  justify-content: center;
  border: 0;
}
.modal__actions .btn:hover {
  background: #eef1f4;
}
.modal__actions .btn--danger {
  background: #FFEDED;
  color: #ff3347 !important;
}


/* подтверждение в шторке */
.sh-cf { padding: 4px 8px 6px; color: #000; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
.sh-cf, .sh-cf * { box-sizing: border-box; }
.sh-cf__t { font-size: 18px; font-weight: 600; text-align: center; padding: 2px 8px 6px; }
.sh-cf__s { font-size: 14px; line-height: 18px; color: #818c99; text-align: center; padding: 0 16px 14px; }
.sh-cf__btns { display: flex; gap: 8px; padding: 6px 8px 4px; }
.sh-cf__btn { flex: 1; height: 44px; border: 0; border-radius: 12px; background: rgba(128,140,153,.12); color: inherit; font: inherit; font-size: 16px; font-weight: 500; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.sh-cf__btn.is-main { background: #2688eb; color: #fff; }
.sh-cf__btn.is-danger { background: #ff3347; color: #fff; }
.sh-cf__btn:active { opacity: .8; }
.sh-cf__btn[disabled] { opacity: .6; }
[data-theme="dark"] .sh-cf { color: #e1e3e6; }
[data-theme="dark"] .sh-cf__btn { background: rgba(255,255,255,.08); }
[data-theme="dark"] .sh-cf__btn.is-main { background: #71aaeb; color: #19191a; }
[data-theme="dark"] .sh-cf__btn.is-danger { background: #e64646; color: #fff; }

[data-status-x-id] { cursor: pointer; }
[data-status-x-id][aria-busy="true"] { cursor: progress; opacity: .55; }
[data-status-x-id]:focus-visible { outline: 2px solid #2688eb; outline-offset: 2px; border-radius: 4px; }
.sheet--status-x .sheet__handle { touch-action: none; }
.sheet--status-x {
  --sx-text: #151a23;
  --sx-muted: #667282;
  --sx-chip: #edf3fa;
  --sx-glow: rgba(103, 170, 238, .28);
  --sx-lilac: rgba(160, 135, 230, .20);
}
[data-theme="dark"] .sheet--status-x {
  --sx-text: #eff2f6;
  --sx-muted: #a6b2c1;
  --sx-chip: #282f3b;
  --sx-glow: rgba(65, 121, 184, .28);
  --sx-lilac: rgba(117, 88, 179, .22);
}
.sheet--status-x.sheet--custom .sheet__panel {
  background-image: radial-gradient(ellipse 54% 125px at 25% 2px, var(--sx-glow), transparent 100%),
                    radial-gradient(ellipse 60% 125px at 82% -6px, var(--sx-lilac), transparent 100%);
}
.sx-peek {
  position: relative;
  padding: 18px 22px 20px;
  text-align: center;
  color: var(--sx-text);
  font-family: -apple-system, system-ui, "Helvetica Neue", Roboto, sans-serif;
}
.sx-peek-close {
  position: absolute;
  top: 10px;
  right: 12px;
  display: none;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--sx-muted);
  cursor: pointer;
}
.sx-peek-close:hover, .sx-peek-close:focus-visible { background: var(--sx-chip); }
.sx-peek-art { display: grid; place-items: center; min-height: 78px; }
.sx-peek-art img { display: block; width: 62px; height: 62px; object-fit: contain; image-rendering: auto; }
.sx-peek h2 { margin: 6px 0; color: inherit; font-size: 21px; font-weight: 650; overflow-wrap: anywhere; }
.sx-peek p { margin: 0; color: var(--sx-muted); font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.sx-peek-note { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; margin-top: 14px; color: var(--sx-muted); font-size: 13px; }
.sx-peek-premium { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 20px; background: var(--sx-chip); font-weight: 600; }
.sx-peek-msg { margin-top: 12px; color: #d64c52; font-size: 13px; }
.sx-peek-actions { display: grid; gap: 8px; margin-top: 20px; }
.sx-peek-actions > * { display: grid; place-items: center; min-height: 40px; padding: 6px 12px; box-sizing: border-box; border: 0; border-radius: 10px; font: inherit; font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer; }
.sx-peek-main { background: #2277cf; color: #fff !important; }
.sx-peek-alt { background: var(--sx-chip); color: #2277cf !important; }
[data-theme="dark"] .sx-peek-alt { color: #8dbcff !important; }
.sx-peek-actions > :disabled { opacity: .65; cursor: default; }

@media (min-width: 768px) and (pointer: fine) {
  .sheet--status-x .sheet__panel { height: fit-content; max-height: calc(100dvh - 48px); }
  .sx-peek { padding: 23px 24px 24px; }
  .sx-peek-close { display: grid; }
}
