#rec2245338521 {
  display: none !important;
}

    #rec2261407371 { 
  display: none !important;
}
  
    #photoBookApp {
      width: 100%;
      height: 100vh;
      background: #f5f5f5;
      font-family: Arial, sans-serif;
      display: grid;
      grid-template-columns: 280px 1fr 220px;
      overflow: hidden;
    }

    .left-panel {
      background: #fff;
      border-right: 1px solid #ddd;
      padding: 16px;
      overflow-y: auto;
    }

    .center-panel {
      position: relative;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      overflow: hidden;
    }
    
    

    .right-panel {
      background: #fff;
      border-left: 1px solid #ddd;
      padding: 14px;
      overflow-y: auto;
    }

.top-actions {
  position: absolute;

  top: 15px;
  left: 15px;
  right: 15px;

  display: flex;
  justify-content: space-between;
  align-items: flex-start;

  z-index: 20;
}

.text-toolbar {
  display:flex;
  gap:10px;
  align-items:center;
}

.export-toolbar {
  display:flex;
  gap:10px;
  align-items:center;
}

    .save-btn {
      background: #FF5181;
      color: #fff;
      border: none;
      padding: 11px 18px;
      border-radius: 10px;
      font-size: 15px;
      cursor: pointer;
    }

    .templates-title {
      font-size: 16px;
      font-weight: 600;
      margin-bottom: 14px;
    }

    .templates-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 10px;
    }

    .template-card {
      height: 120px;
      background: #fafafa;
      border: 2px solid #e5e5e5;
      border-radius: 4px;
      position: relative;
      cursor: pointer;
    }

    .template-card.active {
      border-color: #FFA0BA;
    }

.template-slot-preview {
  position: absolute;
  background: #d6d6d6;
  border: 0.5px solid rgba(120,120,120,.35);
  box-sizing: border-box;
}

    .book-spread {
      display: flex;
      background: #fff;
      border: 1px solid #ddd;
      box-shadow: 0 6px 20px rgba(0,0,0,.06);
    }

    .page {
      width: 360px;
      height: 406px;
      background: #fff;
      position: relative;
      overflow: hidden;
      border: 2px solid transparent;
      cursor: pointer;
    }

    .page.active {
      border-color: #FFA0BA;
    }

    .page-slot {
      position: absolute;
      overflow: hidden;
      background: #d8d8d8;
      border: 1px dashed #aaa;
    }

    .page-slot img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      user-select: none;
      cursor: grab;
      transform-origin: center center;
    }

    .add-photo {
      position: absolute;
      top: 50%;
      left: 50%;
      width: 52px;
      height: 52px;
      transform: translate(-50%, -50%);
      border-radius: 50%;
      background: rgba(255,255,255,.9);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 34px;
      cursor: pointer;
      color: #222;
    }
    
    .page-slot img {
  touch-action: none;
  -webkit-user-drag: none;
}

.history-btn {
  width: 38px;
  height: 38px;

  padding: 0;

  display: flex;
  align-items: center;
  justify-content: center;
}

.history-btn svg {
  width: 18px;
  height: 18px;

  fill: none;
  stroke: white;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.text-box {
  touch-action: none;
}

    .page-numbers {
      display: flex;
      gap: 330px;
      margin-top: 16px;
      justify-content: center;
    }

    .page-number {
      width: 42px;
      height: 42px;
      border-radius: 6px;
      background: #fff;
      border: 1px solid #ccc;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 14px;
    }

    .page-number.active {
      background: #FF5181;
      color: #fff;
      border-color: #FF5181;
    }

    .thumb-spread {
      display: flex;
      gap: 4px;
      margin-bottom: 14px;
      cursor: pointer;
      justify-content: center;
    }

    .thumb-page {
      width: 78px;
      height: 104px;
      background: #eee;
      border: 1px solid #ddd;
      position: relative;
      overflow: hidden;
    }

    .thumb-page.active {
      border: 2px solid #FF5181;
    }

    .thumb-slot {
      position: absolute;
      background: #cfcfcf;
    }

    .thumb-label {
      text-align: center;
      font-size: 12px;
      color: #555;
      margin-top: -8px;
      margin-bottom: 12px;
    }
    
    .mobile-bottom-menu,
.mobile-more-panel {
  display: none;
}

.client-input {
  width: 100%;
  height: 48px;
  margin-bottom: 10px;
  border: none;
  border-radius: 16px;
  background: #f5f5f5;
  padding: 0 14px;
  font-size: 16px;
  box-sizing: border-box;
}

  .export-toolbar .save-btn:not(:last-child) {
    background: #f1f1f1;
    color: #222;
  }

  .export-toolbar .history-btn svg {
    stroke: #555;
  }
  
  .selected-cover-box{
  margin-bottom:16px;
  padding:12px;
  background:#f5f5f5;
  border-radius:16px;
}

.selected-cover-title{
  font-size:13px;
  color:#777;
  margin-bottom:8px;
}

.selected-cover-box img{
  width:100%;
  border-radius:12px;
  display:block;
}

.selected-cover-name{
  margin-top:8px;
  font-size:14px;
  font-weight:600;
  color:#222;
}

.cover-photo-slot{
  position:absolute;
  background:linear-gradient(#f8f8f8, #999);
  display:flex;
  align-items:center;
  justify-content:center;
  color:#777;
  font-size:28px;
  z-index:300;
  cursor:pointer;
}

.templates-switch{
  display:flex;
  gap:6px;
  margin-bottom:14px;
}

.templates-tab{
  flex:1;
  height:38px;
  border:none;
  border-radius:12px;
  background:#f1f1f1;
  color:#222;
  font-size:14px;
  cursor:pointer;
}

.templates-tab.active{
  background:#FF5181;
  color:#fff;
}


#coverEditorWrap{
  position:absolute;
  inset:0;
  display:none;
  align-items:center;
  justify-content:center;
  padding-top:70px;
  box-sizing:border-box;
}

#coverCanvas{
  width:815px;
  height:483px;
  position:relative;
  overflow:hidden;
  box-shadow:0 8px 24px rgba(0,0,0,.08);
}

.cover-safe-zone{
  position:absolute;
  left:29.5px;
  width:756px;
  top:31.5px;
  height:420px;
  border:1px solid #ff5a6f;
  box-sizing:border-box;
  pointer-events:none;
  z-index:500;
}

.cover-spine-zone{
  position:absolute;
  left:396.5px;
  width:21.7px;
  top:31.5px;
  height:420px;
  border-left:1px solid #ff5a6f;
  border-right:1px solid #ff5a6f;
  box-sizing:border-box;
  pointer-events:none;
  z-index:501;
}



.templates-grid.cover-mode{
  grid-template-columns: 1fr;
}

.templates-grid.cover-mode .template-card{
  width:190px !important;
  height:111px !important;
}



.cover-sidebar-item{
  width:100%;
  margin-bottom:22px;
  cursor:pointer;
}

.cover-sidebar-preview{
  display:flex;
  width:100%;
  aspect-ratio: 2 / 1.35;
  border:2px solid transparent;
  overflow:hidden;
  box-sizing:border-box;
}

.cover-sidebar-item.active .cover-sidebar-preview{
  border-color:#FF5181;
}

.cover-sidebar-half{
  width:50%;
  height:100%;
  position:relative;
}

.cover-sidebar-front{
  background:#cfcfcf;
}

.cover-sidebar-labels{
  display:flex;
  width:100%;
  margin-top:6px;
  font-size:12px;
  color:#666;
}

.cover-sidebar-labels span{
  width:50%;
  text-align:center;
}

.cover-sidebar-preview-real{
  width:190px;
  height:119px;
  position:relative;
  overflow:hidden;
  border:2px solid #FF5181;
  box-sizing:border-box;
  background:#f5c4d3;
}


.cover-template-card{

  width:190px !important;
  height:111px !important;

  aspect-ratio:auto !important;

  min-height:auto !important;

  position:relative;

  overflow:hidden;

  background:#f5c4d3;

  border:2px solid #e5e5e5;

  border-radius:12px;

  box-sizing:border-box;
}

.cover-template-card.active{
  border-color:#FF5181;
}



    
    .export-page {
  width: 1800px !important;
  height: 2030px !important;
  background: #fff;
  position: relative;
  overflow: hidden;
  border: none !important;
  flex: 0 0 1800px;
}

.export-page .page-slot {
  border: none !important;
}

.export-page .add-photo {
  display: none !important;
}

.text-box {
  position:absolute;
  min-width:120px;
  min-height:30px;
  cursor:move;
  font-size:22px;
  color:black;
  font-family:Arial;
  z-index:50;
  user-select:none;
  white-space:nowrap;
  will-change: transform;
}
.text-box.selected {
  box-shadow: 0 0 0 2px #FF5181;
  border-radius: 6px;
}
.delete-selected-btn {
  display: none;
}

.messenger-modal {

  position: fixed;
  inset: 0;

  background: rgba(0,0,0,.35);

  z-index: 99999;

  display: none;

  align-items: center;
  justify-content: center;
}

.messenger-modal.open {
  display: flex;
}

.messenger-box {

  position: relative;

  width: min(
    420px,
    calc(100vw - 30px)
  );

  background: white;

  border-radius: 24px;

  padding: 20px;

  box-sizing: border-box;
}

.messenger-close-icon {

  position: absolute;

  top: 14px;
  right: 14px;

  width: 34px;
  height: 34px;

  border: none;

  background: transparent;

  color: #999;

  font-size: 20px;

  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;
}

.messenger-close-icon:hover {
  color: #222;
}



.messenger-title {

  font-size: 22px;
  font-weight: 600;

  margin-bottom: 8px;

  text-align: center;
}

.messenger-subtitle {

  font-size: 15px;

  color: #666;

  text-align: center;

  margin-bottom: 14px;
}

.messenger-copy-btn,
.messenger-close-btn {

  width: 100%;

  height: 48px;

  border: none;

  border-radius: 16px;

  cursor: pointer;
}

.messenger-copy-btn {

  width: 100%;

  height: 48px;

  border: none;

  border-radius: 16px;

  cursor: pointer;

  background: #FF5181;

  color: white;

  margin-bottom: 12px;

  font-size: 15px;

  font-weight: 600;
}

.messenger-close-btn {

  background: #e9e9e9;
}

.messenger-buttons {

  display: flex;

  gap: 8px;

  margin-bottom: 12px;
}

.messenger-buttons a {

  flex: 1;

  height: 46px;

  background: #f5f5f5;

  border-radius: 16px;

  display: flex;

  align-items: center;
  justify-content: center;

  text-decoration: none;

  color: #222;
}

.messenger-email-btn {

  width: 100%;

  height: 48px;

  margin-bottom: 12px;

  border-radius: 16px;

  background: #f5f5f5;

  color: #222;

  text-decoration: none;

  display: flex;

  align-items: center;
  justify-content: center;

  font-size: 17px;

  font-weight: 500;
}

.cover-color-btn {
  height: 38px;
  padding: 0 16px;
  border-radius: 10px;
  background: #f1f1f1;
  color: #222;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  white-space: nowrap;
}

.cover-color-btn input {
  width: 28px;
  height: 28px;
  border: none;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.desktop-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}





.add-book-btn{
  width:100%;
  height:78px;
  margin:20px 0 34px;
  padding:0 18px;

  display:flex;
  align-items:center;
  gap:14px;

  background:#f7f7f7;
  border-radius:22px;
  box-sizing:border-box;
  text-decoration:none;
  overflow:hidden;
}

.add-book-btn img{
  width:48px;
  height:48px;
  border-radius:10px;
  object-fit:cover;
  background:#fff;
}

.add-book-info{
  flex:1;
  text-align:left;
  min-width:0;
}

.add-book-info span{
  display:block;
  font-size:18px;
  line-height:1.15;
  font-weight:700;
  color:#111;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.add-book-info strong{
  display:block;
  margin-top:5px;
  font-size:18px;
  font-weight:800;
  color:#ff477b;
}

.add-book-plus{
  width:42px;
  height:42px;
  border-radius:50%;
  background:#ff477b;
  color:#fff;

  display:flex;
  align-items:center;
  justify-content:center;

  font-size:28px;
  line-height:1;
  font-weight:700;
  flex-shrink:0;
}






@media(max-width: 768px) {

  .desktop-toolbar {
    display: none;
  }
  
  #fontSizeInputMobile,
#fontSelectMobile,
#textColorSelectMobile {
  font-size: 16px;
}

 #photoBookApp {
  height: auto;
  min-height: 65vh;
  grid-template-columns: 1fr;
  overflow: visible;
}


.center-panel {
  height: auto;
  min-height: 0;
  padding: 72px 8px 20px;
  justify-content: flex-start;
  align-items: center;
  overflow: visible;
}

.book-spread {
  margin-top: 0px;
  flex-shrink: 0;
}

.page-numbers {
  margin-top: 8px;
  margin-bottom: 12px;
  flex-shrink: 0;
}

.top-actions {
  position: fixed !important;

  top: 75px !important;
  left: 12px !important;
  right: 12px !important;

  z-index: 9999 !important;

  pointer-events: none;

  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.export-toolbar {
  pointer-events: auto;

  width: 100% !important;

  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;

  gap: 8px !important;
}

/* кнопка "Сформировать макет" уходит вправо */
.export-toolbar button:last-child {
  margin-left: auto !important;
}

.export-toolbar button:first-child {
  display: none;
}

.export-toolbar .save-btn {
  flex: 0 0 auto;
  height: 44px;
  padding: 0 20px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 500;
  margin-left: 0;
}

.export-toolbar .history-btn {

  width: 44px;
  height: 44px;

  flex: 0 0 44px;

  padding: 0;

  border-radius: 12px;

  background: #dedede;
}

.export-toolbar .history-btn svg {

  width: 22px;
  height: 22px;

  stroke: #ababab;
}

.mobile-bottom-menu {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 74px;
  z-index: 130;
  display: flex;
  background: #fff;
  border-top: 1px solid #ddd;
}

.mobile-nav-btn {
  flex: 1;
  border: none;
  background: transparent;
  color: #222;
  font-size: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.mobile-nav-icon {
  font-size: 24px;
  line-height: 1;
}

.mobile-nav-btn.active {
  color: #FF5181;
}

.mobile-more-panel {
    
  position: fixed;
  left: 0;
  right: 0;
  bottom: 74px;

  z-index: 140;

  display: none;
  flex-direction: column;
  gap: 14px;

  padding: 18px;

  background: #fff;

  border-top: 1px solid #ddd;

  box-sizing: border-box;
  
  box-shadow:
    0 -8px 24px rgba(0,0,0,.08);
}

.mobile-more-panel.open {
  display: flex;
  
}


.mobile-more-row {
  display: flex;
  align-items: center;
  gap: 8px;

  width: 100%;
}

.mobile-color-icon-btn {
  width: 74px;
  height: 46px;

  border-radius: 14px;
  background: #f1f1f1;

  display: flex;
  align-items: center;
  justify-content: center;

  flex-shrink: 0;
}

.mobile-color-icon-btn input {
  width: 42px;
  height: 42px;

  border: none;
  padding: 0;
  background: transparent;

  cursor: pointer;
}

.mobile-cover-color-btn {
  justify-content: space-between;
  cursor: pointer;
}

.mobile-cover-color-btn input {
  width: 46px;
  height: 46px;

  border: none;
  border-radius: 14px;
  padding: 0;

  background: transparent;
  cursor: pointer;

  flex-shrink: 0;
}


.mobile-more-icon-btn {

  width: 46px;
  height: 46px;

  border: none;
  border-radius: 14px;

  background: #f1f1f1;

  color: #222;

  font-size: 22px;
  font-weight: 600;

  flex-shrink: 0;
}

.mobile-more-row select,
.mobile-more-row input {

  height: 46px;

  border: none;
  border-radius: 14px;

  background: #f1f1f1;

  color: #222;

  font-size: 16px;
  -webkit-text-size-adjust: 100%;

  padding: 0 8px;

  min-width: 0;
}


.mobile-more-row select {
  flex: 1;
  max-width: 110px;
}


.mobile-more-row input {
  width: 46px;
  text-align: center;
}




.mobile-more-action {

  width: 100%;

  min-width: 0;

  height: 52px;

  border: none;
  border-radius: 16px;

  background: #f1f1f1;

  color: #222;

  font-size: clamp(14px, 3.5vw, 18px);

  font-weight: 500;

  text-align: left;

  padding: 0 16px;

  display: flex;
  align-items: center;

  overflow: hidden;

  white-space: nowrap;

  text-overflow: ellipsis;

  box-sizing: border-box;
}

  .left-panel {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: 84px;
    height: 125px;
    z-index: 110;
    display: none;
    padding: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,.16);
  }

  .left-panel.open {
    display: block;
  }

  .templates-title {
    display: none;
  }
  
  .templates-switch {
  display: none !important;
}

  .templates-grid {
    display: flex;
    gap: 10px;
    width: max-content;
  }

  .template-card {
    width: 82px;
    height: 105px;
    flex: 0 0 auto;
  }

  .right-panel {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: 76px;
    height: 80px;
    z-index: 110;
    display: none;
    gap: 10px;
    padding: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,.16);
  }

  .right-panel.open {
    display: flex;
  }

  .thumb-spread {
    flex: 0 0 auto;
    margin-bottom: 0;
  }
  
  .thumb-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 0 0 auto;
}

.thumb-label {
  display: block;
  font-size: 10px;
  color: #777;
  text-align: center;
  margin: 4px 0 0;
  min-width: 90px;
}

  .thumb-page {
    width: 42px;
    height: 54px;
  }

  .book-spread {
    max-width: 100%;
  }

  .page {
    width: calc((100vw - 24px) / 2);
    height: calc(((100vw - 24px) / 2) * 1.127);
  }

  .page-numbers {
    gap: calc(100vw - 110px);
    margin-top: 10px;
  }

  .page-number {
    width: 34px;
    height: 34px;
    font-size: 12px;
  }

  .add-photo {
    width: 38px;
    height: 38px;
    font-size: 26px;
  }
  

#selectedCoverBox {
  display: none !important;
}

.cover-sidebar-labels {
  font-size: 6px;
  margin-top: 4px;
}

.cover-sidebar-labels span {
  width: 46px;
  text-align: center;
}

.right-panel {
  position: fixed;
  left: 10px;
  right: 10px;
  bottom: 76px;

  height: 76px !important;
  z-index: 110;

  display: none;
  gap: 10px;

  padding: 10px 12px !important;

  overflow-x: auto !important;
  overflow-y: hidden !important;

  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,.16);

  -webkit-overflow-scrolling: touch;
}

.thumb-spread {
  flex: 0 0 auto;
}

.thumb-page {
  width: 42px !important;
  height: 58px !important;
}

.thumb-label {
  font-size: 10px;
  margin-top: 4px;
}

.right-panel.open {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: flex-start !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
  white-space: nowrap;
}

#coverSidebar,
#pagesSidebar {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: flex-start !important;
  gap: 10px !important;
  width: max-content !important;
  min-width: max-content !important;
  flex: 0 0 auto !important;
}

.cover-sidebar-item,
.thumb-item,
.thumb-spread {
  flex: 0 0 auto !important;
}

.cover-sidebar-preview-real {
  width: 92px !important;
  height: 58px !important;

  overflow: hidden !important;

  position: relative;
}

.cover-sidebar-preview-real > * {
  width: 815px !important;
  height: 483px !important;

  transform: scale(0.111);
  transform-origin: top left;
}

.center-panel.cover-mode {
  min-height: 420px !important;
  height: 420px !important;

  justify-content: flex-start !important;

  overflow: visible !important;
}

#coverEditorWrap {
  position: relative !important;
  inset: auto !important;

  width: 100% !important;
  height: 330px !important;

  display: none;
  box-sizing: border-box !important;

  overflow: visible !important;
}

#coverCanvas {
  position: absolute !important;

  left: 50% !important;
  top: 0px !important;

  width: 815px !important;
  height: 483px !important;

  transform: translateX(-50%) scale(0.46) !important;
  transform-origin: top center !important;

  max-width: none !important;
  overflow: hidden !important;

  margin-left: 0 !important;
}

}