/*
 * Холст поста. Всё здесь — в пикселях настоящей картинки (1080 × 1350 для
 * поста, 1080 × 1920 для сторис): превью уменьшает холст через transform,
 * а выгрузка снимает его в натуральную величину. Поэтому никаких rem/vw.
 *
 * Две темы:
 *   t-light  — аккаунт @kezzo, «тёплая бумага» как на лендинге;
 *   t-dark   — личный блог основателя, та же палитра в тёмном;
 *   t-accent — оранжевый слайд для ритма сетки (призыв, цена).
 */

.canvas {
  --bg: #faf8f5;
  --surface: #ffffff;
  --soft: #f1ede7;
  --ink: #1d1a17;
  --muted: #6f675f;
  --line: #e7e1d9;
  --accent: #ff5c1f;
  --accent-text: #d9480f;
  --on-accent: #ffffff;
  --logo-filter: brightness(0);

  position: relative;
  box-sizing: border-box;
  width: 1080px;
  height: 1350px;
  padding: 84px 88px 80px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: "Manrope", system-ui, sans-serif;
  font-size: 36px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}
.canvas * { box-sizing: border-box; }
.canvas.story { height: 1920px; padding: 150px 88px 170px; }

.canvas.t-dark {
  --bg: #131110;
  --surface: #1c1a18;
  --soft: #2a2623;
  --ink: #f3efe9;
  --muted: #a39a90;
  --line: #2e2a26;
  --accent: #ff7a45;
  --accent-text: #ff7a45;
  --on-accent: #131110;
  --logo-filter: none;
}
.canvas.t-accent {
  --bg: #ff5c1f;
  --surface: #ffffff;
  --soft: rgb(255 255 255 / 0.18);
  --ink: #1d1a17;
  --muted: rgb(29 26 23 / 0.72);
  --line: rgb(29 26 23 / 0.18);
  --accent: #1d1a17;
  --accent-text: #1d1a17;
  --on-accent: #ff5c1f;
}

/* Сетка бумаги — едва заметная, чтобы фон не был пластиковым. */
.canvas.t-light::before,
.canvas.t-dark::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 90px 90px;
  background-position: -1px -1px;
  opacity: 0.35;
}
.canvas > * { position: relative; }

/* ---------- Шапка и подвал ---------- */

.c-head, .c-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  font-size: 26px;
  font-weight: 600;
  color: var(--muted);
  flex: none;
}
.c-brand { display: flex; align-items: center; gap: 14px; color: var(--ink); }
.c-brand img { width: 52px; height: 52px; filter: var(--logo-filter); }
.c-brand b { font-family: "Unbounded", sans-serif; font-weight: 600; font-size: 30px; letter-spacing: -0.01em; }
.c-avatar {
  width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent); color: var(--on-accent);
  font-family: "Unbounded", sans-serif; font-size: 24px; font-weight: 600;
}
.c-who { display: flex; flex-direction: column; line-height: 1.15; }
.c-who small { font-size: 22px; font-weight: 500; color: var(--muted); }
.c-pager { font-variant-numeric: tabular-nums; letter-spacing: 0.06em; }
.c-swipe { display: flex; align-items: center; gap: 12px; color: var(--ink); }
.c-swipe i {
  width: 64px; height: 64px; border-radius: 50%;
  display: grid; place-items: center; font-style: normal;
  border: 2px solid var(--ink); font-size: 30px;
}

.c-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 0;
  padding: 40px 0;
}

/* ---------- Типографика ---------- */

.eyebrow {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin-bottom: 36px;
}
.title {
  font-family: "Unbounded", sans-serif;
  font-weight: 600;
  font-size: 88px;
  line-height: 1.04;
  letter-spacing: -0.025em;
  margin: 0;
  text-wrap: balance;
  overflow-wrap: normal;
}
.title.xl { font-size: 112px; line-height: 1.0; }
.title.sm { font-size: 68px; }
.sub {
  margin-top: 40px;
  font-size: 38px;
  line-height: 1.38;
  font-weight: 500;
  color: var(--muted);
  max-width: 860px;
  text-wrap: pretty;
}
.hl { color: var(--accent); }
.t-accent .hl { color: #ffffff; }
.mark {
  background: var(--accent);
  color: var(--on-accent);
  padding: 0 0.18em;
  border-radius: 0.14em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.body p { margin: 0 0 28px; font-size: 38px; line-height: 1.45; text-wrap: pretty; }
.body p:last-child { margin-bottom: 0; }
.body p.muted { color: var(--muted); }

/* ---------- Список ---------- */

.list { margin-top: 48px; display: flex; flex-direction: column; }
.list-item {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 28px;
  padding: 30px 0;
  border-top: 2px solid var(--line);
}
.list-item:last-child { border-bottom: 2px solid var(--line); }
.list-num {
  font-family: "Unbounded", sans-serif;
  font-size: 30px; font-weight: 600;
  color: var(--accent-text);
  padding-top: 6px;
}
.list-t { font-size: 42px; font-weight: 800; line-height: 1.2; letter-spacing: -0.01em; }
.list-d { font-size: 31px; line-height: 1.4; color: var(--muted); margin-top: 8px; }

/* ---------- Большое число ---------- */

.big {
  font-family: "Unbounded", sans-serif;
  font-weight: 700;
  font-size: 290px;
  line-height: 0.9;
  letter-spacing: -0.05em;
  color: var(--accent);
  margin: 20px 0 40px -8px;
}
.big small { font-size: 0.4em; letter-spacing: -0.02em; }

/* ---------- Карточки-интерфейсы ---------- */

.ui {
  margin-top: 52px;
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: 44px;
  padding: 40px;
  box-shadow: 0 30px 60px -30px rgb(29 26 23 / 0.25);
}
.t-dark .ui { box-shadow: none; }

/* Переписка */
.chat-head {
  display: flex; align-items: center; gap: 20px;
  padding-bottom: 28px; margin-bottom: 28px;
  border-bottom: 2px solid var(--line);
}
.chat-ava {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--soft); display: grid; place-items: center;
  font-weight: 800; font-size: 30px; color: var(--muted);
}
.chat-name { font-size: 32px; font-weight: 800; line-height: 1.1; }
.chat-status { font-size: 24px; color: var(--muted); }
.chat { display: flex; flex-direction: column; gap: 18px; }
.bubble {
  max-width: 78%;
  padding: 22px 28px 18px;
  border-radius: 34px;
  font-size: 30px;
  line-height: 1.35;
}
.bubble time { display: block; text-align: right; font-size: 20px; opacity: 0.6; margin-top: 6px; }
.bubble.in { align-self: flex-start; background: var(--soft); border-bottom-left-radius: 10px; }
.bubble.out { align-self: flex-end; background: var(--ink); color: var(--bg); border-bottom-right-radius: 10px; }
.bubble.bot { align-self: flex-start; background: #e7f8ec; color: #14532d; border-bottom-left-radius: 10px; }
.t-dark .bubble.bot { background: #163322; color: #bff0cf; }
.chat-gap {
  align-self: center; font-size: 22px; font-weight: 700;
  color: var(--muted); letter-spacing: 0.1em; text-transform: uppercase;
  padding: 6px 0;
}

/* Запись */
.bk-step { font-size: 22px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin: 0 0 16px; }
.bk-step + * { margin-bottom: 34px; }
.bk-service {
  display: flex; justify-content: space-between; align-items: center;
  padding: 24px 28px; border-radius: 26px;
  border: 3px solid var(--accent); font-size: 32px; font-weight: 700;
}
.bk-service span { color: var(--muted); font-weight: 600; }
.bk-masters { display: flex; gap: 16px; }
.bk-master {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 24px 12px 12px; border-radius: 999px;
  border: 2px solid var(--line); font-size: 28px; font-weight: 700;
}
.bk-master i {
  width: 52px; height: 52px; border-radius: 50%; font-style: normal;
  background: var(--soft); display: grid; place-items: center; font-size: 24px;
}
.bk-master.on { border-color: var(--ink); background: var(--ink); color: var(--bg); }
.bk-master.on i { background: var(--accent); color: #fff; }
.bk-times { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.bk-time {
  text-align: center; padding: 18px 0; border-radius: 20px;
  border: 2px solid var(--line); font-size: 29px; font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.bk-time.off { color: var(--muted); opacity: 0.45; text-decoration: line-through; }
.bk-time.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.bk-btn {
  margin-top: 8px; text-align: center; padding: 28px; border-radius: 999px;
  background: var(--ink); color: var(--bg); font-size: 32px; font-weight: 800;
}

/* Цены */
.rows { margin-top: 52px; }
.row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 30px 0; border-top: 2px solid var(--line);
  font-size: 40px; font-weight: 600;
}
.row:last-child { border-bottom: 2px solid var(--line); }
.row b { font-family: "Unbounded", sans-serif; font-weight: 600; font-size: 50px; letter-spacing: -0.02em; }
.row small { display: block; font-size: 26px; color: var(--muted); font-weight: 500; }
.note { margin-top: 36px; font-size: 28px; color: var(--muted); font-weight: 600; }

/* Плитки */
.tiles { margin-top: 52px; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.tile {
  background: var(--surface); border: 2px solid var(--line);
  border-radius: 34px; padding: 32px 32px 30px; min-height: 196px;
}
.tile-n { font-family: "Unbounded", sans-serif; font-size: 22px; font-weight: 600; color: var(--accent-text); }
.tile-t { font-size: 36px; font-weight: 800; line-height: 1.15; margin-top: 14px; letter-spacing: -0.01em; }
.tile-d { font-size: 26px; line-height: 1.35; color: var(--muted); margin-top: 8px; }

/* Призыв */
.cta-link {
  margin-top: 56px;
  align-self: flex-start;
  display: flex; align-items: center; gap: 24px;
  padding: 30px 30px 30px 48px;
  border-radius: 999px;
  background: var(--ink); color: var(--bg);
  font-family: "Unbounded", sans-serif; font-size: 44px; font-weight: 600;
}
.cta-link i {
  width: 76px; height: 76px; border-radius: 50%; font-style: normal;
  background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 36px;
}
.t-accent .cta-link i { background: #fff; color: var(--ink); }

/* Цитата */
.q-mark { font-family: "Unbounded", sans-serif; font-size: 220px; line-height: 0.6; color: var(--accent); height: 110px; }
.quote {
  font-family: "Unbounded", sans-serif; font-weight: 500;
  font-size: 64px; line-height: 1.18; letter-spacing: -0.02em;
  text-wrap: balance;
}
.q-by { margin-top: 48px; font-size: 30px; font-weight: 700; color: var(--muted); }

/* Чек-лист */
.log { margin-top: 48px; display: flex; flex-direction: column; gap: 22px; }
.log-item { display: flex; gap: 24px; align-items: flex-start; font-size: 36px; font-weight: 600; line-height: 1.3; }
.log-item i {
  flex: none; width: 50px; height: 50px; border-radius: 50%; margin-top: 2px;
  background: var(--accent); color: var(--on-accent);
  display: grid; place-items: center; font-style: normal; font-size: 28px; font-weight: 800;
}
.log-item.todo i { background: transparent; border: 3px solid var(--line); color: transparent; }
.log-item.todo { color: var(--muted); }

/* Цифры */
.stats { margin-top: 52px; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.stat { border: 2px solid var(--line); border-radius: 34px; padding: 34px; background: var(--surface); }
.stat b { display: block; font-family: "Unbounded", sans-serif; font-weight: 600; font-size: 80px; line-height: 1; letter-spacing: -0.03em; color: var(--accent); }
.stat span { display: block; margin-top: 16px; font-size: 28px; font-weight: 600; color: var(--muted); line-height: 1.3; }

/* Сторис: крупнее воздух */
.story .title { font-size: 104px; }
.story .title.xl { font-size: 132px; }
.story .sub { font-size: 44px; }

/* Правка текста прямо на холсте */
.canvas.editing [data-edit] { outline: 3px dashed rgb(255 92 31 / 0.55); outline-offset: 6px; border-radius: 6px; cursor: text; }
.canvas [data-edit]:focus { outline: 3px solid #ff5c1f; }

/* В видео листать пальцем нечего — стрелку «листай» прячем. */
.canvas.reel .c-swipe { visibility: hidden; }
