:root {
  --bg: #f2efec;
  --surface: #f7f4f1;
  --card: #f5f2ef;
  --ink: #1e2128;
  --muted: #515761;
  --accent: #c28f7a;
  --line: #e4ddd6;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Manrope", sans-serif;
  background: var(--bg);
  color: var(--ink);
}

.site-wrap {
  width: min(100%, 1200px);
  margin-inline: auto;
  min-height: 100vh;
}

.view {
  display: none;
}

.view.is-active {
  display: block;
}

.topbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.7rem;
  padding: 0.8rem 1rem;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.icon-btn {
  width: 2.55rem;
  height: 2.55rem;
  border: 0;
  border-radius: 999px;
  background: #f8f5f2;
  color: var(--ink);
  font-size: 1.45rem;
  display: grid;
  place-items: center;
}

.brand {
  text-decoration: none;
  color: inherit;
  text-align: center;
  line-height: 1;
}

.brand-main {
  display: block;
  font-family: "Playfair Display", serif;
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 700;
}

.brand-sub {
  display: block;
  margin-top: -0.2rem;
  font-family: "Great Vibes", cursive;
  font-size: clamp(2rem, 3.3vw, 3rem);
  color: #b18f81;
}

.drawer {
  position: fixed;
  z-index: 12;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(86vw, 360px);
  transform: translateX(-102%);
  transition: transform 240ms ease;
  background: #fff;
  padding: 1rem;
  box-shadow: 26px 0 34px rgba(0, 0, 0, 0.18);
}

.drawer.is-open {
  transform: translateX(0);
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer-head p {
  margin: 0;
  font-size: 0.88rem;
  color: #7d828d;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.drawer-nav {
  margin-top: 1rem;
  display: grid;
  gap: 0.5rem;
}

.drawer-nav a {
  text-decoration: none;
  color: #242830;
  font-size: 1.4rem;
  font-weight: 700;
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 11;
  opacity: 0;
  pointer-events: none;
  background: rgba(20, 22, 27, 0.42);
  transition: opacity 200ms ease;
}

.overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.hero {
  display: grid;
  grid-template-columns: 1fr;
  background: var(--surface);
}

.hero-copy {
  padding: 1.2rem 1rem;
}

.hero-copy h1 {
  margin: 0;
  font-family: "Playfair Display", serif;
  font-weight: 700;
  font-size: clamp(2.1rem, 7vw, 4.1rem);
  text-transform: uppercase;
  line-height: 1.05;
}

.hero-copy p {
  margin: 0.9rem 0 0;
  font-size: clamp(1.05rem, 2.8vw, 1.85rem);
  color: #454c57;
  max-width: 20ch;
}

.cta {
  display: inline-block;
  margin-top: 1.05rem;
  text-decoration: none;
  color: #fff;
  background: var(--accent);
  border-radius: 14px;
  padding: 0.8rem 1.2rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.dots {
  display: flex;
  gap: 0.55rem;
  margin-top: 1.1rem;
}

.dots span {
  width: 0.66rem;
  height: 0.66rem;
  border-radius: 999px;
  background: #cacaca;
}

.dots span.is-active {
  background: var(--accent);
}

.hero-visual {
  position: relative;
  min-height: 310px;
  overflow: hidden;
  padding: 1rem 1rem 1.2rem;
}

.stack {
  position: absolute;
  width: min(76vw, 420px);
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 18px 26px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(250, 250, 250, 0.62);
}

.stack.back {
  right: 4.9rem;
  top: 2.35rem;
  transform: rotate(-8deg);
  filter: saturate(0.86) brightness(0.99);
  opacity: 0.87;
}

.stack.middle {
  right: 2.3rem;
  top: 1.65rem;
  transform: rotate(5deg);
  filter: saturate(0.86) brightness(0.99);
  opacity: 0.89;
}

.stack.front {
  right: 0.9rem;
  top: 1.1rem;
}

.templates {
  padding: 1.55rem 1rem 2rem;
}

.templates h2 {
  margin: 0;
  text-align: center;
  font-family: "Playfair Display", serif;
  text-transform: uppercase;
  font-size: clamp(2rem, 5.3vw, 3.8rem);
}

.section-decor {
  margin: 0.3rem 0 1rem;
  text-align: center;
  color: #c09585;
  letter-spacing: 0.24em;
  font-size: 1.2rem;
}

.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.9rem;
}

.template-card {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  min-height: 310px;
  cursor: pointer;
}

.template-card.selected {
  border-color: #b78674;
  box-shadow: 0 0 0 2px rgba(194, 143, 122, 0.35);
}

.template-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-copy {
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
  gap: 0.8rem;
  padding: 0.8rem;
}

.card-copy h3 {
  margin: 0;
  font-size: clamp(1.45rem, 3.8vw, 2.4rem);
  line-height: 1.25;
  font-weight: 500;
}

.price {
  margin: 0;
  color: #b18371;
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 500;
}

.info-section {
  padding: 1.35rem 1rem 1.7rem;
  background:
    radial-gradient(circle at 90% 10%, rgba(255, 255, 255, 0.82), rgba(247, 243, 239, 0) 34%),
    #f7f3ef;
  border-top: 1px solid #e6ddd6;
}

.info-section h2 {
  margin: 0;
  text-align: center;
  font-family: "Playfair Display", serif;
  font-size: clamp(2rem, 6vw, 3.2rem);
}

.guide-window,
.about-window,
.contacts-window {
  margin-top: 0.78rem;
  border: 1px solid #e3dad2;
  background: #fbf9f7;
  border-radius: 20px;
  box-shadow: 0 10px 20px rgba(46, 34, 26, 0.06);
  padding: 0.75rem;
}

.guide-window {
  display: grid;
  gap: 0.62rem;
}

.guide-row {
  display: grid;
  gap: 0.62rem;
  border: 1px solid #e6ddd6;
  border-radius: 16px;
  background: #fff;
  padding: 0.62rem;
}

.guide-copy {
  position: relative;
  padding-left: 2.2rem;
}

.guide-num {
  position: absolute;
  left: 0;
  top: 0;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 999px;
  background: #cd9886;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.9rem;
  font-weight: 700;
}

.guide-copy h3 {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.2;
}

.guide-copy p {
  margin: 0.26rem 0 0;
  font-size: 0.94rem;
  line-height: 1.34;
  color: #4d535e;
}

.guide-visual {
  border: 1px solid #e4dad2;
  border-radius: 14px;
  background: #fcfbf9;
  padding: 0.48rem;
}

.guide-visual.visual-pages {
  overflow: hidden;
}

.mini-pages-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 62px;
  gap: 0.38rem;
  overflow-x: auto;
  padding-bottom: 0.2rem;
  scrollbar-color: #b89788 #f2ece7;
  scrollbar-width: thin;
}

.mini-page {
  border: 1px solid #ddcfc7;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  aspect-ratio: 210 / 297;
}

.mini-page.is-active {
  box-shadow: 0 0 0 2px rgba(191, 138, 118, 0.5);
}

.mini-page img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mini-toolbar {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  gap: 0.34rem;
  overflow-x: auto;
}

.mini-toolbar span {
  white-space: nowrap;
  font-size: 0.86rem;
  border: 1px solid #e1d6ce;
  border-radius: 999px;
  padding: 0.28rem 0.54rem;
  background: #fff;
  color: #2f3540;
}

.mini-duo-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.42rem;
}

.mini-duo-actions button {
  border: 1px solid #ddd2ca;
  border-radius: 12px;
  min-height: 2.5rem;
  background: #fff;
  color: #2a2f38;
  font-size: 0.88rem;
  font-weight: 600;
}

.mini-edit-compare {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.35rem;
}

.mini-edit-card {
  position: relative;
  border: 1px solid #e1d6cf;
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 210 / 297;
  background: #fff;
}

.mini-edit-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mini-edit-box {
  position: absolute;
  left: 24%;
  top: 44%;
  width: 42%;
  height: 28%;
  border: 2px dashed #2894ff;
  border-radius: 7px;
}

.mini-edit-box.shifted {
  left: 32%;
  top: 50%;
}

.mini-arrow {
  color: #9e7c6c;
  font-size: 1.08rem;
  font-weight: 700;
}

.mini-send-flow {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.45rem;
}

.mini-send-btn {
  border: 0;
  border-radius: 999px;
  min-height: 2.1rem;
  padding: 0 0.86rem;
  background: #bf8a76;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
}

.mini-send-modal {
  border: 1px solid #e1d6cf;
  border-radius: 12px;
  background: #fff;
  padding: 0.45rem 0.52rem;
}

.mini-send-modal p {
  margin: 0;
  color: #2d3340;
  font-family: "Playfair Display", serif;
  font-size: 0.86rem;
  line-height: 1.2;
}

.mini-send-modal-actions {
  margin-top: 0.34rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.32rem;
}

.mini-send-modal-actions span {
  border: 1px solid #e1d7d0;
  border-radius: 999px;
  min-height: 1.6rem;
  display: grid;
  place-items: center;
  font-size: 0.82rem;
  color: #5f6672;
}

.mini-send-modal-actions span:first-child {
  background: #bf8a76;
  border-color: #bf8a76;
  color: #fff;
}

.about-window {
  background:
    radial-gradient(circle at 16% 8%, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0) 36%),
    linear-gradient(145deg, #fbf8f5, #f5efea);
  padding: 0.95rem;
}

.about-top {
  display: grid;
  gap: 0.75rem;
}

.about-story {
  padding: 0.2rem;
}

.about-title {
  margin: 0;
  color: #ba8975;
  font-family: "Playfair Display", serif;
  font-size: clamp(1.8rem, 6.8vw, 2.5rem);
  line-height: 1.05;
}

.about-story p {
  margin: 0.52rem 0 0;
  font-size: 1rem;
  line-height: 1.38;
  color: #2d323b;
}

.about-story p:not(.about-sign):not(.about-title) {
  border-bottom: 1px dashed #e0cec4;
  padding-bottom: 0.42rem;
}

.about-sign {
  margin-top: 0.72rem;
  color: #b08a79;
  font-family: "Great Vibes", cursive;
  font-size: clamp(2rem, 7.5vw, 3rem);
  line-height: 1;
  border-bottom: 0 !important;
}

.about-collage {
  position: relative;
  min-height: 260px;
}

.polaroid {
  position: absolute;
  margin: 0;
  width: 48%;
  background: #fff;
  border-radius: 6px;
  border: 1px solid #dfd3cb;
  padding: 0.46rem 0.46rem 1.05rem;
  box-shadow: 0 12px 18px rgba(52, 36, 24, 0.12);
}

.polaroid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 5;
  border-radius: 2px;
}

.polaroid.one {
  top: 0;
  left: 16%;
  transform: rotate(-9deg);
}

.polaroid.two {
  top: 8%;
  right: 3%;
  transform: rotate(8deg);
}

.polaroid.three {
  bottom: 0;
  left: 8%;
  transform: rotate(-3deg);
}

.about-bottom {
  margin-top: 0.78rem;
  background: #fff;
  border: 1px solid #e3d8d1;
  border-radius: 16px;
  padding: 0.75rem 0.7rem;
}

.about-bottom h3 {
  margin: 0;
  text-align: center;
  font-family: "Playfair Display", serif;
  font-size: 1.32rem;
}

.about-features {
  margin-top: 0.66rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
}

.about-features article {
  border: 1px solid #e6ddd6;
  border-radius: 12px;
  background: #fcfaf8;
  text-align: center;
  padding: 0.55rem 0.4rem;
}

.about-features span {
  display: grid;
  place-items: center;
  margin: 0 auto 0.4rem;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 999px;
  background: #f4ece6;
  color: #be8f7b;
  font-size: 1.34rem;
}

.about-features p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.3;
  color: #2f3540;
  font-weight: 600;
}

.contacts-window {
  background:
    radial-gradient(circle at 8% 12%, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0) 33%),
    linear-gradient(160deg, #f7f2ee, #f4ece6);
  padding: 0.95rem;
}

.contacts-subtitle {
  margin: 0;
  text-align: center;
  color: #b48270;
  font-family: "Great Vibes", cursive;
  font-size: clamp(2rem, 7.5vw, 3rem);
  line-height: 1;
}

.contacts-stack {
  margin-top: 0.72rem;
  display: grid;
  gap: 0.58rem;
}

.contacts-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  align-items: center;
  background: #fff;
  border: 1px solid #e2d7cf;
  border-radius: 16px;
  padding: 0.6rem 0.72rem;
}

.contacts-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.contacts-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.contacts-card > div:last-child {
  padding-left: 0.7rem;
  border-left: 1px dashed #ddcbc2;
}

.contacts-card h3 {
  margin: 0;
  font-size: 1.06rem;
  color: #252a33;
}

.contacts-card a {
  display: block;
  margin-top: 0.22rem;
  color: #b88571;
  text-decoration: underline;
  text-underline-offset: 0.16rem;
  word-break: break-word;
  font-size: 0.97rem;
}

.contacts-thanks {
  margin: 0.8rem 0 0;
  text-align: center;
  color: #b28c7c;
  font-family: "Great Vibes", cursive;
  font-size: clamp(2rem, 7.7vw, 3rem);
  line-height: 1;
}

.view-static {
  padding: 0.6rem 1rem 1.5rem;
}

.static-topline {
  margin-top: 0.35rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.7rem;
}

.static-back-btn {
  width: 2.55rem;
  height: 2.55rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #171c25;
  font-size: 1.85rem;
}

.static-spacer {
  width: 2.55rem;
  height: 2.55rem;
}

.static-image-page {
  margin-top: 0.7rem;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid #e8dfd8;
  background: #fbf8f5;
  box-shadow: 0 10px 24px rgba(38, 27, 20, 0.08);
}

.static-image-page img {
  display: block;
  width: 100%;
  height: auto;
}

.contacts-page {
  margin-top: 0.7rem;
  border-radius: 18px;
  border: 1px solid #e6ddd6;
  background:
    radial-gradient(circle at 8% 12%, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0) 33%),
    linear-gradient(160deg, #f7f2ee, #f4ece6);
  box-shadow: 0 10px 24px rgba(38, 27, 20, 0.08);
  padding: 0.95rem;
}

.contacts-page h2 {
  margin: 0;
  text-align: center;
  font-family: "Playfair Display", serif;
  font-size: clamp(2rem, 6vw, 3rem);
}

.view-detail {
  padding: 0.6rem 1rem 1.6rem;
}

.detail-topline {
  margin-top: 0.35rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.7rem;
}

.detail-back-btn,
.detail-fav-btn {
  width: 2.55rem;
  height: 2.55rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #171c25;
  font-size: 1.85rem;
}

.detail-brand .brand-main {
  font-size: clamp(1.8rem, 6vw, 2.8rem);
}

.detail-brand .brand-sub {
  font-size: clamp(1.7rem, 5vw, 2.5rem);
}

.detail-preview-card {
  margin-top: 0.7rem;
  border-radius: 16px;
  overflow: hidden;
  background: #eee6df;
  border: 1px solid #e8dfd8;
}

.detail-preview-card img {
  width: 100%;
  display: block;
  aspect-ratio: 4 / 3.45;
  object-fit: cover;
}

.detail-thumbs {
  margin-top: 0.75rem;
  display: flex;
  gap: 0.65rem;
}

.detail-thumb-btn {
  width: 92px;
  height: 92px;
  border: 1px solid #d8d1ca;
  border-radius: 18px;
  padding: 0;
  overflow: hidden;
  background: #f8f4ef;
}

.detail-thumb-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.46;
}

.detail-thumb-btn.is-active {
  border: 2px solid #21242a;
}

.detail-thumb-btn.is-active img {
  opacity: 1;
}

.detail-label {
  margin: 0.9rem 0 0;
  display: inline-block;
  padding: 0.25rem 0.9rem;
  background: #ebdfd7;
  border-radius: 999px;
  color: #bf8f7a;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.detail-title-row {
  margin-top: 0.65rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.55rem;
  align-items: end;
}

.detail-title-row h3 {
  margin: 0;
  font-size: clamp(2.2rem, 7vw, 4rem);
  line-height: 0.95;
  font-family: "Playfair Display", serif;
  text-transform: uppercase;
}

.detail-title-row p {
  margin: 0;
  font-size: clamp(1.3rem, 4.4vw, 2.4rem);
}

.detail-price {
  color: #b88571;
  font-family: "Playfair Display", serif;
  font-size: clamp(2.1rem, 7vw, 4rem);
}

.detail-description {
  margin: 0.9rem 0 0;
  color: #252a33;
  font-size: clamp(1.1rem, 3.6vw, 1.75rem);
  line-height: 1.4;
}

.detail-pages-caption {
  margin: 1rem 0 0.62rem;
  font-size: clamp(1.48rem, 4.8vw, 2.2rem);
  font-weight: 500;
}

.detail-pages-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
}

.pages-btn {
  min-height: 3.5rem;
  border-radius: 18px;
  border: 1px solid #d7cec6;
  background: transparent;
  color: #222831;
  font-size: clamp(1.7rem, 4.2vw, 2.4rem);
}

.pages-btn.is-active {
  background: #bf8a76;
  color: #fff;
  border-color: transparent;
}

.detail-create-btn {
  width: 100%;
  margin-top: 0.9rem;
  min-height: 5.25rem;
  border: 0;
  border-radius: 18px;
  background: #bf8a76;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: clamp(1.7rem, 4.8vw, 2.4rem);
  font-weight: 700;
}

.detail-info-grid {
  margin-top: 0.9rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}

.detail-info-card {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.9rem;
  background: #ece7e3;
  border-radius: 20px;
  padding: 0.85rem 1rem;
}

.detail-info-card.wide {
  grid-column: 1 / -1;
}

.detail-info-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  background: #efe2d9;
  display: grid;
  place-items: center;
  font-size: 1.45rem;
  color: #be907c;
}

.detail-info-card p {
  margin: 0;
  font-size: clamp(1.1rem, 3.1vw, 1.7rem);
  color: #9b928b;
}

.detail-info-card strong {
  display: block;
  margin-top: 0.2rem;
  font-size: clamp(1.55rem, 4.6vw, 2.1rem);
}

.view-editor {
  padding: 0.8rem 1rem 1.6rem;
}

.editor-topline {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.65rem;
}

.editor-top-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.editor-back-btn {
  width: 2.55rem;
  height: 2.55rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #171c25;
  font-size: 1.85rem;
}

.editor-send-btn {
  min-height: 2.75rem;
  border: 0;
  border-radius: 16px;
  background: #bf8a76;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 1.12rem;
  font-weight: 700;
  padding: 0 1rem;
}

.editor-save-template-btn {
  min-height: 2.75rem;
  border: 1px solid #d7c8be;
  border-radius: 16px;
  background: #fff;
  color: #6b574c;
  letter-spacing: 0.01em;
  font-size: 0.96rem;
  font-weight: 700;
  padding: 0 0.85rem;
  white-space: nowrap;
}

.editor-save-template-btn[hidden] {
  display: none !important;
}

.editor-stage-card {
  margin-top: 0.9rem;
  background: #ece8e5;
  border-radius: 0;
  padding: 1rem 1rem 0.85rem;
}

.editor-page-sheet {
  width: min(calc(100% - 1.4rem), 470px);
  margin-inline: auto;
  border-radius: 0;
  background: #fff;
  border: 1px solid #ded6ce;
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  aspect-ratio: 210 / 297;
  position: relative;
  touch-action: pan-y pinch-zoom;
  user-select: none;
}

.editor-element {
  position: absolute;
  border: 1px dashed transparent;
  border-radius: 0;
  min-width: 28px;
  min-height: 26px;
  touch-action: none;
}

.editor-element.type-text {
  overflow: hidden;
}

.editor-element.is-selected {
  border-color: #218fff;
  border-style: solid;
  box-shadow: 0 0 0 1px rgba(33, 143, 255, 0.35);
}

.editor-element-content {
  width: 100%;
  height: 100%;
}

.editor-element-content.text {
  display: block;
  white-space: pre-line;
  line-height: 1.15;
  color: #1d2027;
  padding: 0.16rem 0.2rem;
  pointer-events: none;
  word-break: break-word;
  overflow-wrap: anywhere;
  overflow: hidden;
}

.editor-element-content.image {
  border-radius: 0;
  overflow: hidden;
  background: #f3ede7;
}

.editor-element-content.image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.editor-image-empty {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  text-align: center;
  color: #6a707a;
  font-size: 1.2rem;
  gap: 0.1rem;
  padding: 0.4rem;
}

.editor-image-empty span {
  font-size: 0.76rem;
}

.editor-resize-handle {
  position: absolute;
  width: 16px;
  height: 16px;
  border: 1px solid #218fff;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 0 0 1px #fff;
  opacity: 0;
  pointer-events: none;
  z-index: 30;
}

.editor-resize-handle.is-nw {
  left: -8px;
  top: -8px;
  cursor: nwse-resize;
}

.editor-resize-handle.is-n {
  left: 50%;
  top: -8px;
  transform: translateX(-50%);
  width: 10px;
  height: 18px;
  border-radius: 999px;
  cursor: ns-resize;
}

.editor-resize-handle.is-ne {
  right: -8px;
  top: -8px;
  cursor: nesw-resize;
}

.editor-resize-handle.is-e {
  right: -8px;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 18px;
  border-radius: 999px;
  cursor: ew-resize;
}

.editor-resize-handle.is-se {
  right: -8px;
  bottom: -8px;
  cursor: nwse-resize;
}

.editor-resize-handle.is-s {
  left: 50%;
  bottom: -8px;
  transform: translateX(-50%);
  width: 10px;
  height: 18px;
  border-radius: 999px;
  cursor: ns-resize;
}

.editor-resize-handle.is-sw {
  left: -8px;
  bottom: -8px;
  cursor: nesw-resize;
}

.editor-resize-handle.is-w {
  left: -8px;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 18px;
  border-radius: 999px;
  cursor: ew-resize;
}

.editor-element.is-selected .editor-resize-handle {
  opacity: 1;
  pointer-events: auto;
}

.editor-snap-guide {
  position: absolute;
  background: rgba(255, 58, 151, 0.88);
  pointer-events: none;
  z-index: 23000;
}

.editor-snap-guide.is-vertical {
  top: 0;
  bottom: 0;
  width: 1px;
  transform: translateX(-0.5px);
}

.editor-snap-guide.is-horizontal {
  left: 0;
  right: 0;
  height: 1px;
  transform: translateY(-0.5px);
}

.editor-resize-handle::before {
  content: none;
}

.editor-page-caption {
  margin: 0.8rem 0 0;
  text-align: center;
  color: #555a63;
  font-size: 1.1rem;
}

.editor-actions-row {
  margin-top: 0.85rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.editor-context-bar {
  margin-top: 0.7rem;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.55rem;
  align-items: center;
}

.editor-context-menu-btn {
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  border: 0;
  background: #1687ee;
  color: #fff;
  font-size: 1.55rem;
  box-shadow: 0 8px 18px rgba(22, 135, 238, 0.3);
}

.editor-context-actions {
  border: 1px solid #ddd4cc;
  border-radius: 18px;
  background: #fff;
  min-height: 3rem;
  overflow-x: auto;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  gap: 0.2rem;
  align-items: center;
  padding: 0.34rem;
}

.editor-context-empty {
  color: #7a818a;
  font-size: 0.95rem;
  padding: 0 0.6rem;
  white-space: nowrap;
}

.editor-context-btn {
  border: 0;
  border-radius: 12px;
  min-height: 2.25rem;
  padding: 0 0.72rem;
  background: transparent;
  color: #2b3038;
  font-size: 1rem;
  white-space: nowrap;
}

.editor-context-btn:hover {
  background: #f3efeb;
}

.editor-context-btn.is-active {
  background: #f6ece7;
  box-shadow: inset 0 0 0 1px rgba(191, 138, 118, 0.42);
}

.editor-context-btn.icon-accent {
  color: #bf8a76;
}

.editor-tool-panel {
  margin-top: 0.55rem;
  border: 1px solid #ddd4cc;
  border-radius: 18px;
  background: #fff;
  padding: 0.65rem;
  display: none;
}

.editor-tool-panel.is-open {
  display: block;
}

.editor-tool-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.55rem;
}

.editor-tool-panel-head p {
  margin: 0;
  font-size: 0.96rem;
  font-weight: 700;
  color: #2a2f38;
}

.editor-tool-panel-head button {
  border: 0;
  width: 1.95rem;
  height: 1.95rem;
  border-radius: 999px;
  background: #f3efeb;
  color: #2c3138;
}

.editor-tool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
}

.editor-tool-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
  margin-top: 0.5rem;
}

.editor-tool-chip {
  border: 1px solid #d8cec7;
  border-radius: 12px;
  min-height: 2.25rem;
  background: #f9f7f5;
  color: #2a2f37;
  padding: 0 0.55rem;
  font-size: 0.93rem;
}

.editor-tool-chip.font {
  text-align: left;
}

.editor-tool-chip.is-active {
  border-color: #bf8a76;
  box-shadow: 0 0 0 1px rgba(191, 138, 118, 0.3);
  background: #fff;
}

.editor-color-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.5rem;
  touch-action: none;
}

.editor-color-swatch {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  border: 2px solid transparent;
  touch-action: none;
}

.editor-color-swatch.is-active {
  border-color: #bf8a76;
  box-shadow: 0 0 0 1px rgba(191, 138, 118, 0.3);
}

.editor-tool-field {
  display: grid;
  gap: 0.2rem;
  margin-top: 0.55rem;
  color: #4a505a;
  font-size: 0.9rem;
}

.editor-tool-field input[type="range"] {
  width: 100%;
  accent-color: #bf8a76;
  touch-action: pan-x;
}

.editor-tool-field input[type="color"] {
  width: 100%;
  border: 1px solid #d7cec6;
  border-radius: 10px;
  min-height: 2.3rem;
  background: #fff;
}

.editor-tool-note {
  margin: 0.1rem 0 0.55rem;
  color: #646b74;
  font-size: 0.84rem;
  line-height: 1.35;
}

.editor-tool-note strong {
  color: #bf8a76;
}

.editor-tool-row-2 {
  grid-template-columns: 1fr;
}

.editor-decor-grid {
  margin-top: 0.55rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.45rem;
}

.editor-decor-item {
  border: 1px solid #d8cec7;
  border-radius: 12px;
  background: #fbf9f7;
  min-height: 5.9rem;
  padding: 0.35rem;
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 0.28rem;
  text-align: center;
}

.editor-decor-item img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
}

.editor-decor-item span {
  font-size: 0.68rem;
  color: #5e656f;
  line-height: 1.2;
}

.editor-action-btn {
  border: 1px solid #ddd4cc;
  border-radius: 18px;
  min-height: 72px;
  background: #f5f2ef;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.6rem;
  padding: 0 0.9rem;
  text-align: left;
  font-size: 1.05rem;
}

.editor-action-btn span:first-child {
  font-size: 1.75rem;
}

.editor-history-row {
  margin-top: 0.6rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}

.editor-history-btn {
  min-height: 2.85rem;
  border: 1px solid #ddd4cc;
  border-radius: 14px;
  background: #fff;
  color: #2c3139;
  font-size: 0.98rem;
  font-weight: 700;
}

.editor-history-btn:disabled {
  opacity: 0.45;
}

.editor-history-btn.danger {
  grid-column: 1 / -1;
  color: #8f3f3a;
  border-color: #e6c5c1;
  background: #fdf7f6;
}

.editor-text-modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: end center;
  background: rgba(18, 21, 26, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
  z-index: 2147483644;
  padding: 0.7rem;
  isolation: isolate;
}

.editor-text-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.editor-text-modal-card {
  width: min(100%, 760px);
  background: #fff;
  border: 1px solid #ddd4cc;
  border-radius: 18px;
  box-shadow: 0 18px 26px rgba(0, 0, 0, 0.22);
  padding: 0.8rem;
  position: relative;
  z-index: 1;
}

.editor-text-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.editor-text-modal-head p {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #2a2f38;
}

.editor-text-modal-head button {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  border: 0;
  background: #f2ede8;
  color: #2b3038;
  font-size: 1rem;
}

#editor-text-input {
  margin-top: 0.65rem;
  width: 100%;
  border-radius: 12px;
  border: 1px solid #d8cfc8;
  background: #fbf9f7;
  padding: 0.75rem;
  font-family: "Manrope", sans-serif;
  font-size: 1rem;
  color: #20252e;
  resize: vertical;
  min-height: 150px;
}

.editor-text-modal-actions {
  margin-top: 0.65rem;
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.editor-text-modal-actions button {
  border: 0;
  border-radius: 12px;
  min-height: 2.45rem;
  padding: 0 0.9rem;
  font-size: 0.95rem;
  font-weight: 700;
}

.editor-text-modal-actions .ghost {
  background: #f1ece8;
  color: #3b414a;
}

.editor-text-modal-actions .solid {
  background: #bf8a76;
  color: #fff;
}

.editor-send-modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(18, 21, 26, 0.38);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
  z-index: 2147483645;
  padding: 1rem;
  isolation: isolate;
}

.editor-send-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.admin-auth-modal {
  position: fixed;
  inset: 0;
  z-index: 43;
  display: grid;
  place-items: center;
  background: rgba(20, 22, 27, 0.46);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
  padding: 1rem;
}

.admin-auth-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.admin-auth-card {
  width: min(100%, 460px);
  background: #fbfaf8;
  border: 1px solid #e5ddd6;
  border-radius: 20px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.24);
  padding: 1rem;
}

.admin-auth-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.4rem;
}

.admin-auth-head p {
  margin: 0;
  font-family: "Playfair Display", serif;
  font-size: 1.55rem;
  font-weight: 700;
}

.admin-auth-head button {
  width: 2.2rem;
  height: 2.2rem;
  border: 0;
  background: #f2ece7;
  border-radius: 999px;
  font-size: 1.05rem;
}

.admin-auth-hint {
  margin: 0.7rem 0 0;
  color: #5a616b;
  font-size: 0.95rem;
  line-height: 1.45;
}

#admin-auth-password {
  width: 100%;
  margin-top: 0.8rem;
  min-height: 3rem;
  border: 1px solid #ddd4cc;
  border-radius: 12px;
  background: #fff;
  padding: 0 0.8rem;
  font-size: 1rem;
}

.admin-auth-status {
  min-height: 1.4rem;
  margin: 0.55rem 0 0;
  color: #6b574c;
  font-size: 0.92rem;
}

.admin-auth-status.error {
  color: #b13e3e;
}

.admin-auth-status.success {
  color: #2a8a49;
}

.admin-auth-actions {
  margin-top: 0.7rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}

.admin-auth-actions button {
  min-height: 2.8rem;
  border-radius: 12px;
  font-weight: 700;
}

.admin-auth-actions .ghost {
  border: 1px solid #d9d0c8;
  background: #fff;
  color: #6f7782;
}

.admin-auth-actions .solid {
  border: 0;
  background: #bf8a76;
  color: #fff;
}

.editor-send-card {
  width: min(100%, 560px);
  border-radius: 28px;
  border: 1px solid #ddd4cc;
  background: #fff;
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.22);
  padding: 1.4rem 1.2rem 1.15rem;
  text-align: center;
  position: relative;
  z-index: 1;
}

.editor-send-title {
  margin: 0;
  color: #212733;
  font-size: clamp(1.42rem, 4.9vw, 2.2rem);
  line-height: 1.2;
  font-family: "Playfair Display", serif;
  font-weight: 700;
}

.editor-send-meta {
  margin: 0.5rem 0 0;
  color: #646b74;
  font-size: 1rem;
}

.editor-send-divider {
  margin: 0.95rem 0 1.05rem;
  color: #bf8a76;
  font-size: 1.12rem;
  letter-spacing: 0.08em;
}

.editor-send-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.editor-send-actions button {
  border: 1px solid #ddd4cc;
  border-radius: 14px;
  min-height: 3.05rem;
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.editor-send-actions .yes {
  background: #bf8a76;
  color: #fff;
  border-color: #bf8a76;
}

.editor-send-actions .no {
  background: #f7f4f1;
  color: #6f7680;
}

.editor-success-modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(18, 21, 26, 0.38);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
  z-index: 2147483646;
  padding: 1rem;
  isolation: isolate;
}

.editor-success-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.editor-success-card {
  width: min(100%, 560px);
  border-radius: 28px;
  border: 1px solid #ddd4cc;
  background: #fff;
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.22);
  padding: 1.25rem 1.2rem 1.15rem;
  text-align: center;
  position: relative;
  z-index: 1;
}

.editor-success-check {
  width: 4.4rem;
  height: 4.4rem;
  margin: 0 auto 0.6rem;
  border-radius: 999px;
  border: 2px solid #cda394;
  color: #bf8a76;
  display: grid;
  place-items: center;
  font-size: 2rem;
  font-weight: 700;
}

.editor-success-title {
  margin: 0;
  color: #212733;
  font-size: clamp(2rem, 6vw, 3rem);
  font-family: "Playfair Display", serif;
  line-height: 1.05;
}

.editor-success-text {
  margin: 0.55rem 0 0;
  color: #2d323b;
  font-size: 1.22rem;
  line-height: 1.35;
}

.editor-success-divider {
  margin: 0.85rem 0 0.8rem;
  color: #bf8a76;
  font-size: 1.12rem;
  letter-spacing: 0.08em;
}

.editor-success-contacts p {
  margin: 0.2rem 0;
  color: #2a2f38;
  font-size: 1.15rem;
}

.editor-success-contacts a {
  color: #bf8a76;
  text-decoration: underline;
}

.editor-success-ok {
  margin-top: 0.85rem;
  border: 1px solid #bf8a76;
  border-radius: 14px;
  min-height: 3.05rem;
  min-width: 10rem;
  background: #bf8a76;
  color: #fff;
  font-size: 1.5rem;
  font-weight: 700;
}

.editor-preview-modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(18, 21, 26, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
  z-index: 2147483646;
  padding: 1rem;
  isolation: isolate;
}

.editor-preview-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.editor-preview-card {
  width: min(100%, 760px);
  border: 1px solid #ddd4cc;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.25);
  padding: 0.8rem;
}

.editor-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.editor-preview-head p {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #2a2f38;
}

.editor-preview-head button {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  border: 0;
  background: #f2ede8;
  color: #2b3038;
}

.editor-preview-stage {
  margin-top: 0.6rem;
  border: 1px solid #ddd4cc;
  border-radius: 14px;
  background: #f4efea;
  padding: 0.55rem;
}

#editor-preview-image {
  width: 100%;
  aspect-ratio: 210 / 297;
  object-fit: contain;
  border-radius: 0;
  background: #fff;
  border: 1px solid #e5ddd6;
}

#editor-preview-image.is-loading {
  opacity: 0.45;
}

.editor-preview-nav {
  margin-top: 0.55rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.5rem;
}

.editor-preview-nav button {
  border: 1px solid #d7cec6;
  border-radius: 10px;
  min-width: 2.6rem;
  min-height: 2.35rem;
  background: #fff;
  color: #2b313a;
  font-size: 1.15rem;
  font-weight: 700;
}

.editor-preview-nav button:disabled {
  opacity: 0.45;
}

.editor-preview-nav p {
  margin: 0;
  text-align: center;
  color: #4f5660;
  font-size: 0.94rem;
  font-weight: 700;
}

.editor-pages-track {
  margin-top: 0.9rem;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 108px;
  gap: 0.6rem;
  overflow-x: auto;
  padding-bottom: 0.2rem;
}

.editor-track-item {
  border: 2px solid transparent;
  background: #efebe7;
  border-radius: 0;
  padding: 0.32rem;
}

.editor-track-item.is-active {
  border-color: #bf8a76;
}

.editor-track-thumb {
  aspect-ratio: 210 / 297;
  height: auto;
  border-radius: 0;
  background: #f8f6f4;
  border: 1px solid #ddd4cc;
  overflow: hidden;
  position: relative;
}

.editor-track-preview {
  position: absolute;
  inset: 0;
  background: #fff;
  overflow: hidden;
}

.editor-track-preview-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.editor-track-preview-el {
  position: absolute;
  overflow: hidden;
}

.editor-track-preview-el.type-text {
  padding: 1px 2px;
  word-break: break-word;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.editor-track-preview-el.type-image {
  border-radius: 4px;
  background: #f2ece7;
}

.editor-track-preview-el.type-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.editor-track-preview-el.type-image.empty {
  border: 1px solid #e3d8cf;
  background:
    linear-gradient(135deg, rgba(191, 138, 118, 0.12), rgba(191, 138, 118, 0.05));
}

.editor-track-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.editor-track-thumb span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #666d76;
  font-size: 1rem;
  text-align: center;
  padding: 0.4rem;
}

.editor-track-label {
  margin: 0.35rem 0 0;
  text-align: center;
  color: #2c3139;
  font-size: 1.05rem;
}

.editor-track-item-add {
  border-style: dashed;
  border-color: #d8cec6;
  background: #f8f5f2;
}

.editor-track-thumb-add {
  display: grid;
  place-items: center;
  font-size: 2.1rem;
  color: #bf8a76;
  font-weight: 500;
  background: #fcfaf8;
}

@media (max-width: 640px) {
  .topbar {
    padding: 0.65rem 0.75rem;
    gap: 0.55rem;
  }

  .icon-btn {
    width: 2.3rem;
    height: 2.3rem;
    font-size: 1.26rem;
  }

  .brand-main {
    font-size: clamp(1.72rem, 8.5vw, 2.35rem);
  }

  .brand-sub {
    margin-top: -0.12rem;
    font-size: clamp(1.62rem, 8vw, 2.1rem);
  }

  .hero-copy {
    padding: 0.9rem 0.75rem;
  }

  .hero-copy h1 {
    font-size: clamp(1.68rem, 8.8vw, 2.25rem);
  }

  .hero-copy p {
    margin-top: 0.72rem;
    font-size: 0.98rem;
    line-height: 1.35;
  }

  .cta {
    margin-top: 0.82rem;
    border-radius: 10px;
    padding: 0.65rem 0.98rem;
    font-size: 0.9rem;
  }

  .templates {
    padding: 1.1rem 0.75rem 1.5rem;
  }

  .info-section {
    padding: 1rem 0.75rem 1.2rem;
  }

  .info-section h2 {
    font-size: clamp(1.64rem, 8.3vw, 2.12rem);
  }

  .how-item,
  .contact-item {
    border-radius: 12px;
    padding: 0.7rem 0.75rem;
  }

  .how-item h3,
  .contact-item h3 {
    font-size: 0.98rem;
  }

  .how-item p,
  .contact-item a {
    font-size: 0.9rem;
  }

  .about-card {
    border-radius: 12px;
    padding: 0.78rem 0.75rem;
  }

  .about-lead {
    font-size: clamp(1.26rem, 6.6vw, 1.68rem);
  }

  .about-card p,
  .about-list {
    font-size: 0.9rem;
  }

  .templates h2 {
    font-size: clamp(1.68rem, 8.2vw, 2.2rem);
  }

  .section-decor {
    margin: 0.2rem 0 0.75rem;
    font-size: 0.96rem;
  }

  .guide-window,
  .about-window,
  .contacts-window {
    padding: 0.62rem;
    border-radius: 16px;
  }

  .guide-row {
    padding: 0.56rem;
    border-radius: 12px;
  }

  .guide-copy {
    padding-left: 1.9rem;
  }

  .guide-num {
    width: 1.45rem;
    height: 1.45rem;
    font-size: 0.78rem;
  }

  .guide-copy h3 {
    font-size: 0.98rem;
  }

  .guide-copy p {
    margin-top: 0.22rem;
    font-size: 0.88rem;
    line-height: 1.3;
  }

  .mini-pages-track {
    grid-auto-columns: 56px;
  }

  .mini-toolbar span {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
  }

  .mini-duo-actions button {
    min-height: 2.25rem;
    font-size: 0.82rem;
  }

  .mini-send-flow {
    grid-template-columns: 1fr;
  }

  .about-window {
    padding: 0.75rem;
  }

  .about-top {
    gap: 0.6rem;
  }

  .about-title {
    font-size: clamp(1.45rem, 7vw, 2.15rem);
  }

  .about-story p {
    font-size: 0.9rem;
    line-height: 1.32;
  }

  .about-collage {
    min-height: 220px;
  }

  .polaroid {
    width: 50%;
    padding: 0.4rem 0.4rem 0.85rem;
  }

  .about-bottom {
    margin-top: 0.62rem;
    border-radius: 12px;
    padding: 0.62rem 0.58rem;
  }

  .about-bottom h3 {
    font-size: 1.1rem;
  }

  .about-features {
    margin-top: 0.5rem;
    gap: 0.4rem;
  }

  .about-features article {
    border-radius: 10px;
    padding: 0.45rem 0.35rem;
  }

  .about-features span {
    width: 2.25rem;
    height: 2.25rem;
    margin-bottom: 0.28rem;
    font-size: 1.08rem;
  }

  .about-features p {
    font-size: 0.8rem;
    line-height: 1.2;
  }

  .contacts-window {
    padding: 0.75rem;
  }

  .contacts-subtitle {
    font-size: clamp(1.75rem, 7.2vw, 2.45rem);
  }

  .contacts-stack {
    margin-top: 0.55rem;
    gap: 0.45rem;
  }

  .contacts-card {
    border-radius: 12px;
    gap: 0.58rem;
    padding: 0.52rem 0.54rem;
  }

  .contacts-icon {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1.15rem;
  }

  .contacts-card > div:last-child {
    padding-left: 0.52rem;
  }

  .contacts-card h3 {
    font-size: 0.95rem;
  }

  .contacts-card a {
    margin-top: 0.16rem;
    font-size: 0.85rem;
    line-height: 1.28;
  }

  .contacts-thanks {
    margin-top: 0.62rem;
    font-size: clamp(1.78rem, 7.2vw, 2.45rem);
  }

  .card-copy h3 {
    font-size: clamp(1.14rem, 5.8vw, 1.5rem);
  }

  .price {
    font-size: clamp(1.45rem, 7vw, 1.88rem);
  }

  .view-detail {
    padding: 0.45rem 0.75rem 1.2rem;
  }

  .view-static {
    padding: 0.45rem 0.75rem 1.2rem;
  }

  .static-topline {
    gap: 0.5rem;
  }

  .static-back-btn,
  .static-spacer {
    width: 2.2rem;
    height: 2.2rem;
  }

  .static-back-btn {
    font-size: 1.55rem;
  }

  .static-image-page,
  .contacts-page {
    margin-top: 0.62rem;
    border-radius: 14px;
  }

  .contacts-page {
    padding: 0.72rem;
  }

  .contacts-page h2 {
    font-size: clamp(1.62rem, 8.2vw, 2.22rem);
  }

  .detail-topline {
    gap: 0.5rem;
  }

  .detail-back-btn,
  .detail-fav-btn {
    width: 2.2rem;
    height: 2.2rem;
    font-size: 1.55rem;
  }

  .detail-brand .brand-main {
    font-size: clamp(1.55rem, 8.2vw, 2.1rem);
  }

  .detail-brand .brand-sub {
    font-size: clamp(1.42rem, 7.4vw, 1.9rem);
  }

  .detail-thumb-btn {
    width: 78px;
    height: 78px;
    border-radius: 12px;
  }

  .detail-label {
    margin-top: 0.7rem;
    padding: 0.2rem 0.72rem;
    font-size: 0.88rem;
  }

  .detail-title-row h3 {
    font-size: clamp(1.75rem, 9vw, 2.45rem);
  }

  .detail-title-row p,
  .detail-price {
    font-size: clamp(1.45rem, 7.2vw, 2rem);
  }

  .detail-description {
    font-size: 1rem;
    line-height: 1.34;
  }

  .detail-pages-caption {
    font-size: 1.14rem;
    margin: 0.85rem 0 0.52rem;
  }

  .detail-pages-grid {
    gap: 0.5rem;
  }

  .pages-btn {
    min-height: 2.8rem;
    border-radius: 12px;
    font-size: 1.1rem;
  }

  .detail-create-btn {
    min-height: 3.85rem;
    border-radius: 12px;
    font-size: 1.05rem;
  }

  .detail-info-grid {
    gap: 0.5rem;
  }

  .detail-info-card {
    gap: 0.62rem;
    border-radius: 12px;
    padding: 0.7rem 0.8rem;
  }

  .detail-info-icon {
    width: 2.4rem;
    height: 2.4rem;
    font-size: 1.2rem;
  }

  .detail-info-card p {
    font-size: 0.92rem;
  }

  .detail-info-card strong {
    margin-top: 0.14rem;
    font-size: 0.95rem;
    line-height: 1.22;
  }

  .view-editor {
    padding: 0.6rem 0.75rem 1.25rem;
  }

  .editor-send-btn {
    min-height: 2.45rem;
    border-radius: 12px;
    padding: 0 0.82rem;
    font-size: 1rem;
  }

  .editor-save-template-btn {
    min-height: 2.45rem;
    border-radius: 12px;
    font-size: 0.84rem;
    padding: 0 0.65rem;
  }

  .editor-stage-card {
    margin-top: 0.7rem;
    padding: 0.75rem 0.8rem 0.7rem;
  }

  .editor-page-caption {
    margin-top: 0.65rem;
    font-size: 0.95rem;
  }

  .editor-actions-row {
    margin-top: 0.65rem;
    gap: 0.45rem;
  }

  .editor-action-btn {
    min-height: 60px;
    border-radius: 12px;
    gap: 0.44rem;
    padding: 0 0.65rem;
    font-size: 0.94rem;
  }

  .editor-action-btn span:first-child {
    font-size: 1.45rem;
  }

  .editor-history-row {
    margin-top: 0.45rem;
    gap: 0.45rem;
  }

  .editor-history-btn {
    min-height: 2.5rem;
    border-radius: 10px;
    font-size: 0.88rem;
  }

  .editor-context-menu-btn {
    width: 2.65rem;
    height: 2.65rem;
    font-size: 1.35rem;
  }

  .editor-context-actions {
    border-radius: 12px;
    min-height: 2.65rem;
    padding: 0.24rem;
  }

  .editor-context-empty {
    font-size: 0.88rem;
  }

  .editor-context-btn {
    min-height: 2rem;
    border-radius: 8px;
    padding: 0 0.55rem;
    font-size: 0.9rem;
  }

  .editor-decor-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.4rem;
  }

  .editor-decor-item {
    min-height: 5.2rem;
    padding: 0.3rem;
  }

  .editor-preview-card {
    padding: 0.65rem;
    border-radius: 18px;
  }

  .editor-preview-head p {
    font-size: 0.95rem;
  }

  .editor-preview-nav button {
    min-height: 2.15rem;
  }

  .editor-pages-track {
    margin-top: 0.7rem;
    grid-auto-columns: 92px;
    gap: 0.45rem;
  }

  .editor-track-item {
    padding: 0.22rem;
  }

  .editor-track-label {
    font-size: 0.92rem;
  }
}

@media (min-width: 920px) {
  .hero {
    grid-template-columns: 0.95fr 1.2fr;
    min-height: 520px;
  }

  .hero-copy {
    padding: 2.1rem 2.1rem 1.2rem;
  }

  .hero-copy h1 {
    font-size: clamp(2.6rem, 4.4vw, 4.6rem);
  }

  .hero-copy p {
    font-size: clamp(1.2rem, 1.5vw, 1.75rem);
  }

  .hero-visual {
    min-height: 520px;
    padding: 1.3rem 1.6rem;
  }

  .stack {
    width: min(30vw, 370px);
  }

  .stack.back {
    right: 10.2rem;
    top: 3.1rem;
  }

  .stack.middle {
    right: 5.6rem;
    top: 2.5rem;
  }

  .stack.front {
    right: 1.6rem;
    top: 1.75rem;
  }

  .templates {
    padding: 2rem 1.4rem 2.4rem;
  }

  .info-section {
    max-width: 980px;
    margin-inline: auto;
    padding: 1.8rem 1.4rem 2rem;
  }

  .guide-window,
  .about-window,
  .contacts-window {
    padding: 1rem;
    border-radius: 24px;
  }

  .guide-window {
    gap: 0.8rem;
  }

  .guide-row {
    grid-template-columns: minmax(220px, 1.1fr) 2fr;
    align-items: center;
    gap: 0.78rem;
    padding: 0.85rem;
  }

  .guide-copy p {
    font-size: 0.95rem;
    line-height: 1.36;
  }

  .guide-visual {
    padding: 0.62rem;
  }

  .mini-pages-track {
    grid-auto-columns: 76px;
    gap: 0.5rem;
  }

  .mini-toolbar span {
    font-size: 0.9rem;
  }

  .mini-duo-actions button {
    font-size: 0.92rem;
    min-height: 2.8rem;
  }

  .mini-send-modal p {
    font-size: 0.95rem;
  }

  .about-window {
    padding: 1.15rem;
  }

  .about-top {
    grid-template-columns: 1.05fr 1fr;
    align-items: start;
    gap: 1rem;
  }

  .about-story {
    padding: 0.28rem 0.34rem;
  }

  .about-story p {
    font-size: 1.05rem;
  }

  .about-collage {
    min-height: 360px;
  }

  .about-bottom {
    margin-top: 1rem;
    padding: 0.95rem 0.92rem;
  }

  .about-bottom h3 {
    font-size: 1.75rem;
  }

  .about-features {
    margin-top: 0.82rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.62rem;
  }

  .about-features article {
    padding: 0.7rem 0.45rem;
  }

  .about-features span {
    width: 3.1rem;
    height: 3.1rem;
    font-size: 1.52rem;
  }

  .about-features p {
    font-size: 0.96rem;
  }

  .contacts-window {
    padding: 1.15rem;
  }

  .contacts-subtitle {
    font-size: clamp(2.5rem, 4.8vw, 3.4rem);
  }

  .contacts-stack {
    margin-top: 0.95rem;
    grid-template-columns: 1fr 1fr;
    gap: 0.72rem;
  }

  .contacts-card {
    min-height: 108px;
    padding: 0.72rem 0.8rem;
  }

  .contacts-icon {
    width: 3.35rem;
    height: 3.35rem;
    font-size: 1.52rem;
  }

  .contacts-card h3 {
    font-size: 1.2rem;
  }

  .contacts-card a {
    font-size: 1.03rem;
  }

  .how-list {
    grid-template-columns: 1fr 1fr;
  }

  .about-card {
    padding: 1.2rem 1.3rem;
  }

  .contact-list {
    grid-template-columns: 1fr 1fr;
  }

  .cards {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }

  .template-card {
    min-height: 430px;
  }

  .view-detail {
    max-width: 860px;
    margin-inline: auto;
    padding: 1rem 1rem 2rem;
  }

  .view-static {
    max-width: 980px;
    margin-inline: auto;
    padding: 1rem 1.2rem 2rem;
  }

  .static-image-page,
  .contacts-page {
    margin-top: 0.92rem;
  }

  .contacts-page {
    padding: 1.25rem;
  }

  .contacts-page h2 {
    font-size: clamp(2.6rem, 4.2vw, 4.1rem);
  }

  .view-editor {
    max-width: 860px;
    margin-inline: auto;
    padding: 1rem 1rem 2rem;
  }

  .detail-thumb-btn {
    width: 118px;
    height: 118px;
  }
}

@media (hover: hover) and (pointer: fine) {
  .template-card {
    transition: transform 180ms ease, box-shadow 180ms ease;
  }

  .template-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 24px rgba(0, 0, 0, 0.1);
  }
}
