#storyEditor {
  position: fixed;
  background: #222324;
  height: 100%;
  width: 100%;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1111;
}
.storyEditor_body {
  display: flex;
  justify-content: center;
  align-items: center;
  max-width: 532px;
  max-height: 100%;
  overflow: hidden;
  box-shadow: 0 0 12px rgba(0,0,0,0.7);
  width: 100%;
  height: 100%;
  flex-direction: column;
  margin: 0 auto;
  position: relative;
}
.EditorActions__leftActions--gWzwJ {
  position: absolute;
  top: 0;
  margin-top: 10px;
  display: flex;
  gap: 5px;
  z-index: 3;
  flex-direction: column;
}
.EditorActions__leftActions--gWzwJ {
  right: 0;
  margin-right: 10px;
}
.storyClickable__realClickable {
  cursor: pointer;
  isolation: isolate;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  font-size: 12px;
  line-height: 14px;
  padding: 8px;
  border: 0;
  -webkit-box-flex: 1;
  -ms-flex-positive: 1;
  flex-grow: 1;
  -ms-flex-preferred-size: 0;
  flex-basis: 0;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  width: 100%;
  margin: 0;
  text-decoration: none;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  position: relative;
  border-radius: 48px;
  background-color: rgba(0,0,0,0.6);
  color: #e1e3e6;
}
.storyClickable__realClickable:hover {
  opacity: 0.8;
}
.storyToolButton__directionRow {
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
  -ms-flex-direction: row;
  flex-direction: row;
  -webkit-box-pack: start;
  -ms-flex-pack: start;
  justify-content: flex-start;
}
button.storyClickable__realClickable {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
}
button:disabled {
    opacity: 0.5;
    pointer-events: none;
}
.storyButton__OK {
  border-radius: 48px;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  max-width: 44px;
  min-height: 44px;
  min-width: 40px;
  border: 0;
  margin: 0;
  padding: 0;
  -webkit-transition: background-color .15s ease-out,color .15s ease-out;
  transition: background-color .15s ease-out,color .15s ease-out;
  display: flex;
  cursor: pointer;
  isolation: isolate;
  min-width: auto;
  position: absolute;
  right: 10px;
  background-color: #fff;
  width: 44px;
  height: 44px;
  color: #19191a;
  bottom: 12px;
  justify-content: center;
  align-items: center;
}








.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.modal-content_st {
  padding: 0;
  border-radius: 16px;
  max-width: 364px;
  width: 100%;
  background: rgba(255, 255, 255, 0.33);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  --vkui--elevation3: 0px 0px 2px 0px rgba(0, 0, 0, 0.30), 0px 4px 16px 0px rgba(0, 0, 0, 0.30);
  box-shadow: var(--vkui--elevation3);
}
#modalTitle {
  margin: 0;
  font-size: 20px;
  font-weight: 500;
}
.modalTitle {
  padding: 16px;
  border-bottom: 1px solid #9b9393;
  color: #fff;
}
.storFormItem__top {
  padding-bottom: 6px;
  padding-top: 2px;
  -webkit-box-align: end;
  -ms-flex-align: end;
  align-items: flex-end;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  color: #dfdfdf;
}

.tw1ngo-storys_hz .StSelectionControl__host {
  --vkui--size_base_padding_horizontal--regular: 16px;
  margin-bottom: 0;
  margin-left: calc(-1*var(--vkui--size_base_padding_horizontal--regular));
  margin-right: calc(-1*var(--vkui--size_base_padding_horizontal--regular));
  margin-top: 0;
}
.StTappable__stateLayer {
  border-radius: inherit;
  z-index: 0;
  -webkit-transition: background-color .15s ease-out;
  transition: background-color .15s ease-out;
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  overflow: hidden;
}
.tw1ngo-storys_hz label {
  min-height: 40px;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  -webkit-box-pack: start;
  -ms-flex-pack: start;
  justify-content: flex-start;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  isolation: isolate;
  position: relative;
  border-radius: 8px;
  cursor: pointer;
  padding-left: var(--vkui--size_base_padding_horizontal--regular);
  padding-right: var(--vkui--size_base_padding_horizontal--regular);
}
.tw1ngo-storys_hz label:hover {
  background: rgba(0,0,0,0.1);
}
.StSelectionControlLabel__host {
  color: #fff;
  margin-bottom: 8px;
  margin-left: 12px;
  margin-top: 8px;
  word-break: break-word;
  -webkit-box-flex: 1;
  -ms-flex-positive: 1;
  flex-grow: 1;
  min-width: 0;
}
.StSelectionControlLab {
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
  -ms-flex-direction: row;
  flex-direction: row;
  -webkit-box-align: start;
  -ms-flex-align: start;
  align-items: flex-start;
  width: 100%;
  display: flex;
  -webkit-box-pack: start;
  -ms-flex-pack: start;
  justify-content: flex-start;
  max-width: 100%;
}
.StSelectionControlLab button {
  background-color: #f2f3f5;
  -webkit-box-flex: 1;
  -ms-flex-positive: 1;
  flex-grow: 1;
  -ms-flex-preferred-size: 0;
  flex-basis: 0;
  width: 100%;
  display: block;
  border-radius: 8px;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  max-width: 100%;
  border: 0;
  margin: 0;
  padding: 0;
  -webkit-transition: background-color .15s ease-out,color .15s ease-out;
  transition: background-color .15s ease-out,color .15s ease-out;
  position: relative;
  cursor: pointer;
  min-height: 36px;
  font-size: 15px;
  color: #000;
}
.StSelectionControlLab button:active {
  background-color: #f2f3f5;
  box-shadow: 0 4px 10px rgba(0,0,0,.08) inset;
  transform: scale(.99);
}

#storyThumbnails {
  display: flex;
  margin-right: auto;
  position: absolute;
  left: 10px;
  bottom: 8px;
  gap: 4px;
}
.storyThumbnail {
  object-fit: cover;
  border: 2px solid transparent;
  cursor: pointer;
  position: relative;
  width: 32px;
  height: 44px;
  border-radius: 9px;
  padding: 2px;
  overflow: hidden;
}
.storyThumbnail.active {
  border-color: #fff;
}
.thumb-inner {
  width: 100%;
  height: 100%;
}
.storyThumbnail .removeBtn {
  position: absolute;
  top: -5px;
  right: -5px;
  background: red;
  color: white;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  text-align: center;
  line-height: 16px;
  font-size: 12px;
  cursor: pointer;
}

.thumbnail-wrapper {
  position: relative;
}
.delete-thumbnail-btn {
  position: absolute;
  top: -50px;
  right: -2px;
  background: rgba(0,0,0,0.7);
  color: #fff;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  width: 44px;
  height: 44px;
}
.delete-thumbnail-btn:hover {
  background: rgba(0,0,0,0.6); 
}
.uploadTrigger {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.35);
  margin: 2px 0 0 4px;
  color: #fff;
  padding: 0;
  box-shadow: 0 0 8px rgba(0,0,0,0.3);
}
#previewImage {
  max-height: 100%;
  display: block;
  pointer-events: none;
  width: 100%;
  object-fit: contain;
  height: 100%;
  z-index: 2;
  position: absolute;
  top: 0; left: 0;
}
#previewVideo {
  pointer-events: auto;
  position: relative;
  top: 50%;
  left: 50%;
  transform: translate(-50%,-50%);
  background-color: transparent;
  object-fit: cover;
  width: 100%;
  height: 100%;
  max-height: 100%;
  z-index: 2;
}
#soundToggleBtn  {
  position: absolute;
  z-index: 2;
  bottom: 66px;
}

#istoriya_pusta {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  top: 0;
  z-index: 9;
  display: none;
}
.storyEditorPreviewWrapper {
  position: relative;
  width: 100%;
  height: 100%;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  background: #000;
}
#storyNEWoverlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%; 
  height: 100%;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 0;
  opacity: 1;
  transition: background-image 0.3s ease, opacity 0.3s ease;
}
#storyCanvas {
  width: 100%;
  height: 100%;
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
}

.text-full-editor {
  position: absolute;
  top: 0; left: 0;
  width: 100%; 
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: none;
  z-index: 1000;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.text-full-editor.active {
  display: flex;
}
.text-editor-top  {
  position: absolute;
  top: 5px;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: all;
}
.text-editor-center {
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}
.text-input-area {
  min-height: auto;  
  font-size: 32px;
  padding: 6px 8px;
  outline: none; 
  border: none;
  background: transparent; 
  color: white;
  max-width: 90%;
  border-radius: 10px;
}
.text-layer {
  position: absolute;
  display: inline-block;
  white-space: pre-wrap;
  cursor: move;
  padding: 6px 8px;
  border-radius: 10px;
}
.text-input-area:empty:before {
  content: attr(data-placeholder);
  color: rgba(255, 255, 255, 0.5);
  pointer-events: none;
  display: block;
}

.text-editor-colors div, .text-editor-fonts div {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  margin: 0px 4px;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid white;
  display: flex;
  align-items: center;
  justify-content: center;
}
.story-canvas-layer {
  position: absolute; width: 100%; height: 100%; z-index: 2;
}
.delete-bin  {
  position: absolute;
  bottom: 64px;
  left: 50%;
  z-index: 1111;
  transform: translateX(-50%);
  user-select: none;
  pointer-events: none;
  background-color: rgb(255, 255, 255);
  min-width: auto;
  transition: background-color 0.15s ease-out, color 0.15s ease-out;
  display: none;
  cursor: pointer;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 10px;
  padding-left: 0px;
  padding-right: 0px;
  color: rgb(255, 92, 92);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  justify-content: center;
  align-items: center;
}
.delete-bin::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  border: 2px dashed rgb(255, 92, 92); /* тот самый красный пунктир */
  pointer-events: none;
}
#centerGuide {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  transform: translateX(-1px);
  z-index: 9999;
  pointer-events: none;
  display: none;
  background-image: repeating-linear-gradient(
    to bottom,
    rgba(0, 165, 255, 0.6),
    rgba(0, 165, 255, 0.6) 8px,
    transparent 8px,
    transparent 16px
  );
}
.draggable-text {
  position: absolute; cursor: move; padding: 4px 10px; border-radius: 6px; user-select: none;
}
.OverlayTextEditing__fontSize--r5rmN {
  position: absolute;
  width: 100px;
  top: 0;
  left: 5%;
  transform: translate(-50%,50%);
  pointer-events: all;
  height: 220px;
  transition: 0.2s;
}
.vkitStoriesSlider__root--UWGsy {
  display: flex;
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  justify-content: center;
}
.vkitStoriesSlider__track--fDBIa {
  width: 100%;
  height: 100%;
  background-color: #454647;
  border-radius: 5px;
}
.vkitStoriesSlider__rootVertical--CeQTm .vkitStoriesSlider__track--fDBIa {
  width: 17px;
  height: 100%;
  -webkit-clip-path: polygon(50% 100%,0 0,100%0);
  clip-path: polygon(50% 100%,0 0,100%0);
}
.vkitStoriesSlider__pointerWrapper--ELeCm {
  background-color: #fff;
  border: 0.5px solid rgba(255,255,255,0.12);
  border-radius: 50%;
  box-shadow: var(--vkui--elevation3);
  box-sizing: border-box;
  height: 24px;
  width: 24px;
  position: absolute;
  transition: background-color 0.2s ease-out;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  z-index: 1;
  will-change: top,left;
}
.vkitStoriesSlider__pointer--VCLCu {
  border: 0;
  direction: ltr;
  height: 100%;
  margin: -1px;
  padding: 0;
  position: absolute;
  width: 100%;
  clip: rect(0,0,0,0);
  overflow: hidden;
  white-space: nowrap;
}
#storyCanvasLayer {
  touch-action: none;
}
button.editStory__realClickable {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
}
.editStory__realClickable {
  cursor: pointer;
}
.editStory__real {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  min-width: 48px;
  min-height: 48px;
  border-radius: 50%;
}
.editStory__real:hover {
  background: rgba(255,255,255,0.10);
}
.editStory__real:active {
  background: rgba(255,255,255,0.15);
}
#textEditorOkBtn {
  position: absolute;
  top: 7px;
  right: 6px;
  pointer-events: all;
}
.font-chooser {
  display: flex;
  overflow-x: auto;
  gap: 10px;
  padding: 10px;
  justify-content: center;
  flex-wrap: nowrap;
}
.font-chooser div {
  background: rgba(255,255,255,0.2);
  width: 44px;
  height: 44px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 12px;
  cursor: pointer;
  color: #fff;
  font-size: 20px;
  font-weight: 400;
}
#textEditorCloseBtn {
  position: absolute;
  top: 6px;
  left: 6px;
  color: #fff;
}

#storyCanvasLayer {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: auto;
}









.delete-thumbnail-btn {
  transform-origin: bottom;
  animation: 0.1s ease-in forwards storys__anim-fade-in;
}
@keyframes storys__anim-fade-in {
  0% {
    opacity: 0;
    transform: scale(0.8);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}
.color-scroll-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  overflow: visible;
  width: 100%;
  max-width: 100%;
  padding: 4px 0;
  height: 44px;
}

.scroll-container {
  display: flex;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
  scrollbar-width: none;
  flex-grow: 1;
  overflow-x: auto;
  overflow-y: visible;
  align-items: center;
  height: 44px;
}

.scroll-container::-webkit-scrollbar {
  display: none;
}

.scroll-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 40px;
  color: #333;
  cursor: pointer;
  user-select: none;
  display: none; 
  z-index: 10;
  background: rgba(255 255 255 / 0.8);
  border-radius: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: background-color 0.3s ease;
  border-radius: 24px;
  width: 40px;
  height: 40px;
}

.scroll-arrow:hover {
  background: rgba(255 255 255 / 1);
}

.scroll-arrow.left {
  left: -10px;
}

.scroll-arrow.right {
  right: -10px;
}
.text-editor-bottom {
  position: absolute;
  left: 16px;
  bottom: 8px;
  right: 16px;
  pointer-events: all;
}
.scroll-container .selected {
  outline: 2px solid #fff;
  outline-offset: 2px;
}
.scroll-container {
  transition: transform 0.15s ease;
}
.container_filterus {
  position: absolute;
  left: 0;
  right: 0;
  pointer-events: all;
  bottom: 0;
  z-index: 11;
}
.filter-scroll-wrapper {
  position: relative;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  user-select: none;
}
.scroll-container {
  transition: transform 0.15s ease;
  display: flex;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
  scrollbar-width: none;
  flex-grow: 1;
  overflow-x: auto;
  overflow-y: visible;
}
.filter-slider {
  gap: 8px;
  padding: 22px 10px 10px;
  user-select: none;
  margin: 0 auto;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
}
#filterPanel {
  display: flex;
  scrollbar-width: none;
  -ms-overflow-style: none;
  flex-wrap: nowrap;
  scroll-behavior: smooth;
  flex-grow: 1;
  min-width: 0;
  touch-action: pan-x;
  flex-grow: 1;
  overflow-x: auto;
  overflow-y: visible;
  height: 100%;
}
.filter-item {
  flex: 0 0 auto;
  width: 70px;
  cursor: pointer;
  text-align: center;
  font-size: 12px;
  color: #fff;
  transition: border-color 0.3s ease;
  height: 94px;
  display: flex;
  flex-direction: column;
  align-items: center;
  user-select: none;
  border-radius: 8px;
  padding: 2px;
}
.filter-item img {
  width: 68px;
  height: 68px;
  border-radius: 8px;
  object-fit: cover;
  display: block;
  margin: 0px 0 2px 0;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  pointer-events: none;
  user-select: none;
  padding: 2px;
}
.filter-item span {
  margin-top: 0;
  font-size: 12px;
  color: #fff;
  text-align: center;
  white-space: nowrap;
  user-select: none;
  text-overflow: ellipsis;
  overflow: hidden;
  max-width: 65px;
}
.filter-item.active {
  background: rgba(255,255,255,0.3);
}
#stickersPanel {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 234px;
  display: none;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 2000;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  scrollbar-width: none;
  justify-content: center;
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  text-align: center;
  padding: 16px 10px;
  justify-items: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.sticker-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 88px;
  height: 88px;
  margin-bottom: 4px;
  position: relative;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 12px;
}
.sticker-thumb {
  width: 72px;
  height: 72px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  border-radius: 12px;
  transition: background 0.2s;
  padding: 8px;
}
.sticker-thumb:hover {
  background: rgba(0, 0, 0, 0.2);
}
.knopki44 {
  position: absolute;
  width: 44px;
  height: 44px;
  cursor: pointer;
  z-index: 3;
}
.StSelectionControlLab button:hover {
  background: rgba(255,255,255,0.8);
}
#storyEmptyPlaceholder {
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  background-position: 100%;
  background-repeat: no-repeat;
  background-size: cover;
  background-image: url(/stories/files/ico/backgr_stories.jpg);
}
#storyEmptyPlaceholder div{
  font-size: 17px;
  font-weight: 500;
  color: #fff;
}
.newFileNofile {
  margin-top: 16px;
  padding: 8px 16px;
  background-color: #fff;
  color: #19191a;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  min-height: 32px;
  box-sizing: border-box;
  max-width: 100%;
  min-width: 80px;
  transition: background-color .15s ease-out,color .15s ease-out;
  display: inline-block;
  font-size: 15px;
}
.newFileNofile:hover {
  background: rgba(255,255,255,0.8);
}



.photo-item-select:active { opacity: 0.7; transform: scale(0.98); }
body.modal-open { overflow: hidden; }

/* Основной контейнер-подложка */
.storyi_modal_overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 3000;
}

/* Контентная часть: от верха до низа */
.storyi_modal_content {
    background: var(--vk-background, #fff);
    width: 100%;
    max-width: 881px;
    margin: 0 auto;
    height: 100%; /* Растягиваем на всю высоту */
    display: flex;
    flex-direction: column; /* Чтобы шапка была сверху, а контент снизу */
    position: relative;
    font-family: sans-serif;
}

.storyi_header {
  padding: 12px 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: inherit;
  flex-shrink: 0;
  z-index: 10;
}
.storyi_scroll_area {
    flex-grow: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0;
}

.storyi_grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3px;
}

.storyi_photo_item {
    background-size: cover;
    background-position: center;
    aspect-ratio: 1/1;
    cursor: pointer;
    background-color: #f0f2l5;
}

/* Индикатор подгрузки внизу */
#storyi_load_more_trigger {
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #888;
}
.storyi_photo_item:active {
    transform: scale(0.98);
    opacity: 0.8;
}
.storyi_close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  position: absolute;
  right: 8px;
  cursor: pointer;
}
.storyi_header b {
  font-size: 15px;
  text-transform: uppercase;
  font-weight: 600;
  font-family: -apple-system, system-ui, sans-serif;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  left: 50%;
  transform: translate(-50%,0);
}
@media (min-width: 882px) {
    .storyi_modal_content {
        min-height: auto;
        overflow: hidden;
    }
}
.storyi_modal_content {
    display: flex;
    flex-direction: column;
    height: 100%; /* На весь экран */
}

.btn--showmore {
  background: #f0f2f5;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  color: #5181b8;
  cursor: pointer;
  font-weight: 500;
  margin: 8px 0;
}
.btn--showmore:hover {
    background: #ebedf0;
}

.storyi_check_badge {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 22px;
    height: 22px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.3);
    display: none; /* По умолчанию скрыты */
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    z-index: 2;
}

/* Когда фото выбрано */
.storyi_photo_item.storyi_photo_selected .storyi_check_badge {
    background: #2688eb;
    display: flex;
}


.storyi_btn_mode {
    color: #2688eb;
    font-weight: 500;
    cursor: pointer;
    font-size: 15px;
    padding: 5px 10px;
    background: #f2f3f5;
    border-radius: 8px;
}

.storyi_bottom_panel {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.99);
  padding: 10px 15px;
  display: flex;
  gap: 10px;
  z-index: 20;
  border-radius: 14px 14px 0 0;
  border-top: 1px solid rgba(0,0,0,.12);
  box-shadow: 0 0px 8px 0 rgba(9, 9, 9, 0.3);
  justify-content: space-between;
  align-items: center;
  box-sizing: border-box;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s;
  transform: translateY(100%);
  opacity: 0;
  pointer-events: none;
}

.storyi_selected_preview_list {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.storyi_mini_preview {
    width: 38px;
    height: 46px;
    border-radius: 6px;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
    position: relative;
    border: 1px solid rgba(0,0,0,0.1);
    animation: storyi_pop 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes storyi_pop {
    0% { transform: scale(0.4); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}
.storyi_bottom_panel.show {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
    
}
.storyi_scroll_area.has-panel {
    padding-bottom: 110px !important;
}
#storyi_send_btn:active {
    transform: scale(0.9);
}

.storyi_mini_preview {
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.05);
}






