/* ============================================================
   Рассадка — свадебная типографика люкс
   айвори + золото + глубокий шалфей · Cormorant Garamond
   ============================================================ */

:root {
  --ivory: #f7f2e7;
  --ivory-deep: #efe7d6;
  --paper: #fffdf6;
  --ink: #2e2a22;
  --ink-soft: #5f584a;
  --sage: #5c6b52;
  --sage-deep: #3f4c38;
  --gold: #b08d3e;
  --gold-soft: #d3b878;
  --line: rgba(94, 84, 60, .28);
  --line-soft: rgba(94, 84, 60, .14);
  --terra: #c07a56;
  --font-display: 'Cormorant Garamond', 'Times New Roman', serif;
  --font-ui: 'Golos Text', 'Segoe UI', sans-serif;
  --shadow-sheet: 0 2px 6px rgba(60, 50, 30, .08), 0 24px 60px -18px rgba(60, 50, 30, .28);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background-color: var(--ivory);
  background-image:
    radial-gradient(90rem 40rem at 110% -10%, rgba(176, 141, 62, .07), transparent 60%),
    radial-gradient(70rem 42rem at -20% 30%, rgba(92, 107, 82, .06), transparent 55%),
    repeating-linear-gradient(45deg, rgba(120, 104, 66, .016) 0 2px, transparent 2px 5px);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--sage-deep); text-decoration-color: rgba(176, 141, 62, .5); text-underline-offset: 3px; }
a:hover { color: var(--gold); }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); }

/* ---------- шапка ---------- */

.site-header {
  border-bottom: 1px solid var(--line-soft);
  background: rgba(247, 242, 231, .85);
  backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 40;
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 64px;
}
.wordmark {
  font-family: var(--font-display);
  font-size: 1.45rem; font-weight: 600; letter-spacing: .04em;
  color: var(--ink); text-decoration: none; white-space: nowrap;
}
.wordmark em { font-style: italic; color: var(--gold); font-weight: 500; }
.site-nav { display: flex; gap: clamp(.8rem, 2.5vw, 2rem); flex-wrap: wrap; }
.site-nav a {
  font-size: .82rem; letter-spacing: .14em; text-transform: uppercase;
  text-decoration: none; color: var(--ink-soft); padding: .35rem 0;
  border-bottom: 1px solid transparent;
}
.site-nav a:hover { color: var(--gold); }
.site-nav a[aria-current="page"] { color: var(--sage-deep); border-bottom-color: var(--gold); }

/* ---------- герой ---------- */

.hero { padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(2rem, 4vw, 3rem); text-align: center; }
.hero .eyebrow, .eyebrow {
  display: inline-block;
  font-size: .78rem; letter-spacing: .32em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 1.2rem;
}
.eyebrow::before, .eyebrow::after { content: '—'; color: var(--gold-soft); margin: 0 .8em; }
h1 {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 5.2vw, 3.7rem);
  font-weight: 500; line-height: 1.12; letter-spacing: .01em;
  max-width: 21ch; margin: 0 auto;
}
h1 em { font-style: italic; color: var(--sage-deep); }
.hero-sub {
  max-width: 56ch; margin: 1.4rem auto 0;
  color: var(--ink-soft); font-size: 1.05rem;
}

/* появление героя */
.reveal { opacity: 0; transform: translateY(18px); animation: reveal .9s cubic-bezier(.2, .7, .2, 1) forwards; }
.reveal:nth-child(2) { animation-delay: .12s; }
.reveal:nth-child(3) { animation-delay: .24s; }
.reveal:nth-child(4) { animation-delay: .36s; }
@keyframes reveal { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .reveal { animation: none; opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* ---------- инструмент ---------- */

.tool { padding: clamp(1.5rem, 3vw, 3rem) 0 clamp(3rem, 5vw, 4.5rem); }
.tool-grid {
  display: grid; grid-template-columns: minmax(340px, 430px) 1fr;
  gap: clamp(1.5rem, 3.5vw, 3.5rem); align-items: start;
}

.panel {
  background: var(--paper);
  border: 1px solid var(--line-soft);
  box-shadow: 0 1px 3px rgba(60, 50, 30, .05), 0 16px 40px -20px rgba(60, 50, 30, .18);
  padding: clamp(1.4rem, 3vw, 2.2rem);
  position: relative;
}
.panel::before {
  content: ''; position: absolute; inset: 8px;
  border: 1px solid rgba(176, 141, 62, .22); pointer-events: none;
}
.panel > * { position: relative; }

.field { margin-bottom: 1.3rem; }
.field label {
  display: block; font-size: .74rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--ink-soft); margin-bottom: .45rem;
}
.field input[type="text"], .field textarea {
  width: 100%; font: inherit; color: var(--ink);
  background: transparent; border: 1px solid var(--line);
  padding: .65rem .8rem; border-radius: 0; outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.field input[type="text"]:focus, .field textarea:focus {
  border-color: var(--gold); box-shadow: 0 0 0 3px rgba(176, 141, 62, .14);
}
.field textarea { min-height: 200px; resize: vertical; line-height: 1.6; font-size: .95rem; }
.field .hint { font-size: .8rem; color: var(--ink-soft); margin-top: .4rem; }
.field .hint b { color: var(--sage-deep); font-weight: 600; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* выбор стиля */
.style-picker { display: grid; grid-template-columns: repeat(3, 1fr); gap: .55rem; }
.style-chip { position: relative; cursor: pointer; }
.style-chip input { position: absolute; opacity: 0; }
.style-chip span {
  display: flex; flex-direction: column; align-items: center; gap: .35rem;
  border: 1px solid var(--line-soft); padding: .6rem .3rem .5rem;
  font-size: .78rem; color: var(--ink-soft); text-align: center;
  transition: border-color .2s, background .2s;
}
.style-chip i {
  width: 26px; height: 26px; border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, .1); font-style: normal;
}
.style-chip .sw-classic { background: linear-gradient(135deg, #fffcf4 45%, #b9a15f 45% 55%, #fffcf4 55%); }
.style-chip .sw-rustic  { background: linear-gradient(135deg, #e8d5ae 45%, #8a6b44 45% 55%, #dcc294 55%); }
.style-chip .sw-boho    { background: linear-gradient(135deg, #f6ecdf 45%, #c07a56 45% 55%, #f0dcc6 55%); }
.style-chip .sw-minimal { background: linear-gradient(135deg, #ffffff 45%, #191919 45% 55%, #f2f2f2 55%); }
.style-chip .sw-botanic { background: linear-gradient(135deg, #f5f8f1 45%, #6f8465 45% 55%, #e7eede 55%); }
.style-chip .sw-neo     { background: linear-gradient(135deg, #fffdf5 45%, #b08d3e 45% 55%, #3f4c38 55%); }
.style-chip input:checked + span { border-color: var(--gold); background: rgba(176, 141, 62, .07); color: var(--ink); }
.style-chip input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }

/* кнопки */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font-family: var(--font-ui); font-size: .8rem; font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase; text-decoration: none;
  padding: .85rem 1.5rem; border: 1px solid transparent; cursor: pointer;
  transition: background .2s, color .2s, border-color .2s; border-radius: 0;
}
.btn-primary { background: var(--sage-deep); color: var(--ivory); }
.btn-primary:hover { background: var(--gold); color: #fff; }
.btn-ghost { background: transparent; color: var(--sage-deep); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn-block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }
.btn-link {
  background: none; border: none; cursor: pointer; font: inherit; font-size: .85rem;
  color: var(--sage-deep); text-decoration: underline;
  text-decoration-color: rgba(176, 141, 62, .5); text-underline-offset: 3px; padding: 0;
}
.btn-link:hover { color: var(--gold); }

/* ---------- превью листа ---------- */

.preview-col { position: sticky; top: 84px; }
.preview-note {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  margin-bottom: .7rem; font-size: .8rem; color: var(--ink-soft);
}
.preview-note .badge {
  font-size: .7rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--gold); border: 1px solid rgba(176, 141, 62, .4); padding: .15rem .6rem;
}
.sheet-holder {
  container-type: inline-size;
  box-shadow: var(--shadow-sheet);
  background: #fff;
}
.sheet-holder + .sheet-holder { margin-top: 1.5rem; }

/* действия после генерации */
.after-gen { margin-top: 1.4rem; }
.share-out {
  display: none; margin-top: .8rem; padding: .7rem .9rem; font-size: .8rem;
  border: 1px dashed var(--line); color: var(--ink-soft);
  word-break: break-all; background: rgba(255, 253, 246, .8);
}
.share-out.visible { display: block; }

/* CPA */
.cpa {
  display: none; margin-top: 1.6rem; padding: 1.2rem 1.4rem;
  border: 1px solid rgba(176, 141, 62, .4);
  background: linear-gradient(135deg, rgba(176, 141, 62, .08), rgba(92, 107, 82, .06));
}
.cpa.visible { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; justify-content: space-between; }
.cpa p { font-size: .92rem; max-width: 46ch; }
.cpa p b { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; }
.cpa .btn { flex-shrink: 0; }

/* ============================================================
   ЛИСТ ПЛАНА — база (типографика в cqw: масштабируется и на
   экране, и в печати, и в мини-превью галереи)
   ============================================================ */

.plan-sheet {
  position: relative; width: 100%; aspect-ratio: 190 / 277;
  overflow: hidden; font-size: 2.25cqw;
  background: var(--paper); color: #34302a;
  display: flex; flex-direction: column;
  padding: 5em 4em 4em;
}
.plan-sheet.dense { font-size: 1.85cqw; }
.plan-sheet.denser { font-size: 1.55cqw; }

.plan-head { text-align: center; }
.plan-pre {
  font-size: .78em; letter-spacing: .4em; text-transform: uppercase;
  color: inherit; opacity: .75;
}
.plan-title {
  font-family: var(--font-display); font-size: 3.1em; font-weight: 500;
  line-height: 1.1; margin-top: .25em;
}
.plan-date { font-family: var(--font-display); font-style: italic; font-size: 1.25em; margin-top: .4em; opacity: .85; }
.plan-ornament { display: none; text-align: center; }

.plan-tables { columns: 2; column-gap: 2.6em; margin-top: 2.4em; flex: 1; }
.plan-tables.cols-3 { columns: 3; column-gap: 2em; }
.plan-table { break-inside: avoid; text-align: center; margin-bottom: 1.7em; }
.pt-name { font-size: 1.05em; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.pt-note { font-family: var(--font-display); font-style: italic; font-size: .95em; opacity: .75; margin-top: .1em; }
.pt-guests { list-style: none; margin-top: .5em; line-height: 1.55; font-size: .92em; }

.plan-mark {
  position: absolute; bottom: 1.1em; right: 1.5em;
  font-size: .58em; letter-spacing: .1em; opacity: .45;
}
.plan-empty {
  margin: auto; text-align: center; font-family: var(--font-display);
  font-style: italic; font-size: 1.4em; opacity: .55; padding: 2em;
}

/* ---------- 1. классика-сериф ---------- */
.st-classic { font-family: var(--font-display); background: #fffcf4; color: #3a3427; }
.st-classic::before { content: ''; position: absolute; inset: 1.5em; border: 1px solid #b9a15f; pointer-events: none; }
.st-classic::after  { content: ''; position: absolute; inset: 2em; border: 1px solid rgba(185, 161, 95, .45); pointer-events: none; }
.st-classic .plan-pre { color: #a08636; }
.st-classic .plan-title { font-weight: 500; }
.st-classic .plan-head::after {
  content: ''; display: block; width: 7em; height: 1px;
  background: #b9a15f; margin: 1.3em auto 0;
}
.st-classic .pt-name { font-weight: 600; font-size: 1.15em; letter-spacing: .16em; color: #a08636; }
.st-classic .pt-guests { font-size: 1.02em; }

/* ---------- 2. рустик-крафт ---------- */
.st-rustic {
  color: #52402b;
  background:
    repeating-linear-gradient(2deg, rgba(120, 90, 50, .045) 0 2px, transparent 2px 5px),
    radial-gradient(120% 95% at 30% 15%, #eedcb8, #ddc396 65%, #d0b380);
}
.st-rustic::before {
  content: ''; position: absolute; inset: 1.4em;
  border: 1px dashed rgba(122, 92, 55, .75); pointer-events: none;
}
.st-rustic .plan-pre { letter-spacing: .5em; opacity: .65; }
.st-rustic .plan-title { font-family: 'Amatic SC', var(--font-display); font-weight: 700; font-size: 4.2em; letter-spacing: .04em; }
.st-rustic .plan-date { font-family: var(--font-display); }
.st-rustic .plan-ornament { display: block; margin-top: .5em; font-size: .9em; letter-spacing: .6em; opacity: .6; }
.st-rustic .plan-ornament::before { content: '— ❋ —'; }
.st-rustic .pt-name { font-family: 'Amatic SC', var(--font-display); font-weight: 700; font-size: 1.9em; letter-spacing: .06em; text-transform: none; }
.st-rustic .pt-guests { font-family: var(--font-ui); font-size: .88em; }

/* ---------- 3. бохо ---------- */
.st-boho { background: #f6ecdf; color: #6d4c3a; }
.st-boho::before {
  content: ''; position: absolute; inset: 1.5em;
  border: 1px solid #cf9a72; border-radius: 14em 14em 0 0; pointer-events: none;
}
.st-boho { padding-top: 6.2em; }
.st-boho .plan-pre { color: #c07a56; letter-spacing: .45em; }
.st-boho .plan-title { font-family: 'Caveat', cursive; font-weight: 600; font-size: 3.7em; color: #a3542f; }
.st-boho .plan-date { color: #8a6a52; }
.st-boho .plan-ornament { display: block; margin-top: .4em; color: #c07a56; letter-spacing: .9em; font-size: 1.1em; }
.st-boho .plan-ornament::before { content: '· · ·'; }
.st-boho .pt-name { font-family: 'Caveat', cursive; font-weight: 600; font-size: 1.8em; color: #a3542f; text-transform: none; letter-spacing: .02em; }
.st-boho .pt-guests { font-family: var(--font-display); font-size: 1.05em; }

/* ---------- 4. минимализм ---------- */
.st-minimal { background: #ffffff; color: #191919; font-family: var(--font-ui); padding: 4.4em 3.8em; }
.st-minimal .plan-head { text-align: left; border-bottom: 1px solid #191919; padding-bottom: 1.6em; }
.st-minimal .plan-pre { letter-spacing: .3em; font-size: .7em; opacity: .55; }
.st-minimal .plan-title { font-family: var(--font-ui); font-weight: 600; font-size: 2.5em; letter-spacing: -.015em; }
.st-minimal .plan-date { font-family: var(--font-ui); font-style: normal; font-size: .95em; opacity: .6; margin-top: .3em; }
.st-minimal .plan-table { text-align: left; border-top: 1px solid #e4e4e4; padding-top: .8em; }
.st-minimal .pt-name { font-size: .82em; letter-spacing: .22em; }
.st-minimal .pt-note { font-family: var(--font-ui); font-style: normal; font-size: .8em; opacity: .55; }
.st-minimal .pt-guests { font-size: .9em; line-height: 1.6; }
.st-minimal .plan-tables { margin-top: 2em; }

/* ---------- 5. ботаника ---------- */
.st-botanic { background: #f5f8f1; color: #41503a; font-family: var(--font-display); }
.st-botanic::before {
  content: ''; position: absolute; inset: 1.6em;
  border: 1px solid #9db08c; pointer-events: none;
}
.st-botanic .plan-pre { color: #6f8465; }
.st-botanic .plan-title { font-weight: 500; }
.st-botanic .plan-date { color: #5c6b52; }
.st-botanic .plan-ornament { display: flex; justify-content: center; gap: .5em; margin-top: 1em; height: 1.4em; }
.st-botanic .plan-ornament::before, .st-botanic .plan-ornament::after {
  content: ''; width: 2.2em; height: 1.15em; background: #7f9471;
  border-radius: 0 100% 0 100%;
}
.st-botanic .plan-ornament::before { transform: rotate(-24deg); border-radius: 100% 0 100% 0; opacity: .8; }
.st-botanic .plan-ornament::after { transform: rotate(24deg); }
.st-botanic .pt-name { color: #55684a; font-size: 1.1em; letter-spacing: .18em; font-weight: 600; }
.st-botanic .pt-guests { font-size: 1.02em; }
.st-botanic .plan-mark { color: #55684a; }

/* ---------- 6. неоклассика с золотом ---------- */
.st-neo { background: #fffdf5; color: #33302a; font-family: 'Playfair Display', var(--font-display); }
.st-neo::before {
  content: ''; position: absolute; inset: 1.2em;
  border: 2px solid #b08d3e; pointer-events: none;
}
.st-neo::after {
  content: ''; position: absolute; inset: 1.75em;
  border: 1px solid #d9c188; pointer-events: none;
}
.st-neo .plan-pre { color: #b08d3e; letter-spacing: .5em; }
.st-neo .plan-title { font-family: inherit; font-weight: 600; }
.st-neo .plan-ornament { display: block; margin-top: .8em; color: #b08d3e; font-size: .8em; }
.st-neo .plan-ornament::before { content: '◆'; }
.st-neo .pt-name { color: #a3822f; font-size: .95em; letter-spacing: .26em; }
.st-neo .pt-guests { font-size: .95em; }

/* ============================================================
   КАРТОЧКИ ГОСТЕЙ — 8 шт/лист А4, линии реза
   ============================================================ */

.cards-sheet {
  position: relative; width: 100%; aspect-ratio: 190 / 277;
  font-size: 2.25cqw; background: #fff; padding: 1.2em;
  display: flex; flex-direction: column;
}
.cards-grid {
  flex: 1; display: grid;
  grid-template-columns: 1fr 1fr; grid-template-rows: repeat(4, 1fr);
  border-top: 1px dashed #b6ad9c; border-left: 1px dashed #b6ad9c;
}
.place-card {
  border-right: 1px dashed #b6ad9c; border-bottom: 1px dashed #b6ad9c;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .45em; padding: 1em; text-align: center; overflow: hidden; position: relative;
}
.pc-pre { font-size: .58em; letter-spacing: .34em; text-transform: uppercase; opacity: .6; }
.pc-name { font-family: var(--font-display); font-size: 1.55em; font-weight: 500; line-height: 1.15; }
.pc-table { font-size: .72em; letter-spacing: .2em; text-transform: uppercase; margin-top: .2em; }
.pc-rule { width: 3.4em; height: 1px; background: currentColor; opacity: .4; }

/* скины карточек */
.cards-sheet::before, .cards-sheet::after { content: none !important; }
.cards-sheet.st-classic { background: #fffcf4; color: #3a3427; }
.cards-sheet.st-classic .pc-name { color: #3a3427; }
.cards-sheet.st-classic .pc-table { color: #a08636; }
.cards-sheet.st-rustic { background: #e9d7b2; color: #52402b; }
.cards-sheet.st-rustic .pc-name { font-family: 'Amatic SC', cursive; font-weight: 700; font-size: 2.2em; }
.cards-sheet.st-rustic .cards-grid, .cards-sheet.st-rustic .place-card { border-color: #a98d62; }
.cards-sheet.st-boho { background: #f6ecdf; color: #6d4c3a; }
.cards-sheet.st-boho .pc-name { font-family: 'Caveat', cursive; font-weight: 600; font-size: 2em; color: #a3542f; }
.cards-sheet.st-boho .pc-table { color: #c07a56; }
.cards-sheet.st-minimal { background: #fff; color: #191919; }
.cards-sheet.st-minimal .pc-name { font-family: var(--font-ui); font-weight: 600; font-size: 1.3em; }
.cards-sheet.st-botanic { background: #f5f8f1; color: #41503a; }
.cards-sheet.st-botanic .pc-table { color: #55684a; }
.cards-sheet.st-botanic .cards-grid, .cards-sheet.st-botanic .place-card { border-color: #9db08c; }
.cards-sheet.st-neo { background: #fffdf5; color: #33302a; }
.cards-sheet.st-neo .pc-name { font-family: 'Playfair Display', serif; }
.cards-sheet.st-neo .pc-table { color: #a3822f; }

/* ============================================================
   Контентные секции
   ============================================================ */

.section { padding: clamp(2.5rem, 5vw, 4.5rem) 0; }
.section-alt { background: rgba(255, 253, 246, .7); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.section h2 {
  font-family: var(--font-display); font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  font-weight: 500; line-height: 1.2; text-align: center; max-width: 26ch; margin: 0 auto 1.2rem;
}
.section h2 em { font-style: italic; color: var(--gold); }
.section .lead { text-align: center; max-width: 62ch; margin: 0 auto 2.2rem; color: var(--ink-soft); }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-top: 2.5rem; }
.step { text-align: center; padding: 0 1rem; }
.step .num {
  font-family: var(--font-display); font-style: italic; font-size: 2.6rem;
  color: var(--gold); line-height: 1;
}
.step h3 { font-family: var(--font-display); font-size: 1.35rem; font-weight: 600; margin: .6rem 0 .4rem; }
.step p { font-size: .92rem; color: var(--ink-soft); }

.prose { max-width: 72ch; margin: 0 auto; }
.prose p { margin-bottom: 1.1rem; }
.prose h2 { text-align: left; margin: 2.4rem 0 1rem; max-width: none; }
.prose h3 { font-family: var(--font-display); font-size: 1.4rem; font-weight: 600; margin: 1.8rem 0 .6rem; }
.prose ul, .prose ol { margin: 0 0 1.1rem 1.4rem; }
.prose li { margin-bottom: .45rem; }
.prose li::marker { color: var(--gold); }
.prose blockquote {
  border-left: 2px solid var(--gold); padding: .3rem 0 .3rem 1.2rem;
  font-family: var(--font-display); font-style: italic; font-size: 1.15rem;
  color: var(--ink-soft); margin: 1.4rem 0;
}

/* FAQ */
.faq { max-width: 760px; margin: 0 auto; }
.faq details {
  border-bottom: 1px solid var(--line-soft); padding: .3rem 0;
}
.faq details:first-of-type { border-top: 1px solid var(--line-soft); }
.faq summary {
  cursor: pointer; list-style: none; display: flex; justify-content: space-between;
  align-items: baseline; gap: 1rem; padding: .9rem 0;
  font-family: var(--font-display); font-size: 1.2rem; font-weight: 600;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--gold); font-size: 1.3rem; font-weight: 400; flex-shrink: 0; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .faq-a { padding: 0 0 1.1rem; color: var(--ink-soft); font-size: .95rem; max-width: 64ch; }

/* галерея шаблонов */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: clamp(1.4rem, 3vw, 2.4rem); margin-top: 2.5rem; }
.gallery-item { text-align: center; }
.gallery-item .mini {
  container-type: inline-size; box-shadow: var(--shadow-sheet);
  transition: transform .35s cubic-bezier(.2, .7, .2, 1);
}
.gallery-item:hover .mini { transform: translateY(-6px); }
.gallery-item h3 { font-family: var(--font-display); font-size: 1.45rem; font-weight: 600; margin: 1.1rem 0 .15rem; }
.gallery-item .style-desc { font-size: .88rem; color: var(--ink-soft); max-width: 40ch; margin: 0 auto .8rem; }

/* мини-стили в статье */
.style-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 1.4rem 0; }
.style-strip img { box-shadow: var(--shadow-sheet); }
.style-strip figcaption { font-size: .8rem; text-align: center; color: var(--ink-soft); margin-top: .5rem; }

/* перелинковка */
.crosslinks { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin-top: 2rem; }
.crosslink {
  display: block; padding: 1.2rem 1.4rem; border: 1px solid var(--line-soft);
  background: var(--paper); text-decoration: none; transition: border-color .2s, transform .2s;
}
.crosslink:hover { border-color: var(--gold); transform: translateY(-2px); }
.crosslink b { font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; display: block; color: var(--ink); }
.crosslink span { font-size: .85rem; color: var(--ink-soft); }

/* подвал */
.site-footer { border-top: 1px solid var(--line-soft); padding: 2.5rem 0 3rem; margin-top: 2rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 1.5rem; justify-content: space-between; align-items: baseline; }
.site-footer p { font-size: .82rem; color: var(--ink-soft); max-width: 52ch; }
.site-footer nav { display: flex; gap: 1.2rem; flex-wrap: wrap; }
.site-footer nav a { font-size: .82rem; }

/* ---------- адаптив ---------- */

@media (max-width: 960px) {
  .tool-grid { grid-template-columns: 1fr; }
  .preview-col { position: static; }
  .steps { grid-template-columns: 1fr; gap: 2rem; }
  .style-strip { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 700px) {
  /* шапка: колонкой, компактная, не липнет — экран дорог */
  .site-header { position: static; }
  .site-header .wrap {
    flex-direction: column; align-items: center; gap: .15rem;
    min-height: 0; padding-top: .85rem; padding-bottom: .7rem;
  }
  .wordmark { font-size: 1.35rem; }
  .site-nav { justify-content: center; gap: .3rem 1.15rem; }
  .site-nav a { font-size: .72rem; letter-spacing: .08em; padding: .35rem .1rem; }

  /* герой: плотнее, чтобы инструмент был виден на первом экране */
  .hero { padding: 1.7rem 0 1.1rem; }
  .hero .eyebrow, .eyebrow { font-size: .62rem; letter-spacing: .14em; margin-bottom: .9rem; }
  .eyebrow::before, .eyebrow::after { content: none; }
  h1 { font-size: clamp(1.7rem, 7.4vw, 2.2rem); overflow-wrap: break-word; }
  h2, h3 { overflow-wrap: break-word; }
  .hero-sub { font-size: .95rem; margin-top: 1rem; }

  /* формы: 16px против iOS-зума, тап-таргеты ≥48px */
  .field input[type="text"], .field textarea { font-size: 16px; }
  .field textarea { min-height: 160px; }
  .btn { min-height: 48px; }
  .btn-link { min-height: 44px; display: inline-flex; align-items: center; }
  .after-gen .btn-row .btn { width: 100%; }
  .panel { padding: 1.25rem 1rem 1.4rem; }
  .tool { padding-top: 1.1rem; }

  /* CPA-блок: кнопка на всю ширину */
  .cpa.visible { flex-direction: column; align-items: stretch; }
  .cpa .btn { width: 100%; }

  /* мини-превью в статье: та же тройка, но компактнее */
  .style-strip { gap: .6rem; }
  .style-strip figcaption { font-size: .74rem; margin-top: .35rem; }

  /* подвал по центру */
  .site-footer .wrap { justify-content: center; text-align: center; }
  .site-footer nav { justify-content: center; }
}

@media (max-width: 560px) {
  .style-picker { grid-template-columns: repeat(2, 1fr); }
  .style-chip span { padding: .7rem .3rem .6rem; min-height: 44px; justify-content: center; }
  .field-row { grid-template-columns: 1fr; }
  .plan-sheet { font-size: 2.4cqw; }
}

/* ============================================================
   ПЕЧАТЬ — главный продукт
   ============================================================ */

.print-area { display: none; }

@page { size: A4; margin: 10mm; }

@media print {
  body { background: #fff !important; font-size: 12pt; }
  .no-print, .site-header, .site-footer, .cpa, .preview-note, .after-gen { display: none !important; }

  /* обёртки не должны добавлять высоту: иначе появляется пустая страница */
  .wrap { padding: 0; max-width: none; }
  .section, .section-alt, .tool { padding: 0; background: none; border: none; }
  .tool-grid { display: block; }
  .preview-col { position: static; }

  /* лист плана: точный размер печатной области A4 */
  .print-target .sheet-holder,
  .print-target.sheet-holder {
    box-shadow: none; width: 190mm; margin: 0 auto;
  }
  .print-target .plan-sheet, .print-target .cards-sheet {
    width: 190mm; height: 277mm; aspect-ratio: auto;
  }
  .sheet-holder + .sheet-holder { margin-top: 0; }
  .cards-sheet, .plan-sheet { page-break-after: always; break-after: page; }
  .sheet-holder:last-child .cards-sheet,
  #sheetHolder .plan-sheet { page-break-after: auto; break-after: auto; }

  /* обычный режим: печатаем превью-план */
  body:not(.mode-poster) .print-area { display: none !important; }

  /* постер 2×2: печатаем 4 квадранта, превью скрываем */
  body.mode-poster .print-target { display: none !important; }
  body.mode-poster .print-area { display: block; }
  .poster-page {
    width: 190mm; height: 277mm; overflow: hidden;
    page-break-after: always; break-after: page;
  }
  .poster-clip { container-type: inline-size; width: 190mm; height: 277mm; overflow: hidden; }
  .poster-clip .plan-sheet { width: 190mm; height: 277mm; aspect-ratio: auto; transform: scale(2); page-break-after: avoid; break-after: avoid; }
  .poster-clip.q-tl .plan-sheet { transform-origin: 0 0; }
  .poster-clip.q-tr .plan-sheet { transform-origin: 100% 0; }
  .poster-clip.q-bl .plan-sheet { transform-origin: 0 100%; }
  .poster-clip.q-br .plan-sheet { transform-origin: 100% 100%; }

  /* ч/б-надёжность: тонкие линии остаются видимыми */
  .plan-sheet, .cards-sheet { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
