:root {
  --ink: #13273a;
  --muted: #607284;
  --line: #d7e1ea;
  --accent: #2388f2;
  --accent-strong: #116ed3;
  --accent-soft: #eaf4ff;
  --paper: #ffffff;
  --shadow: 0 18px 48px rgba(20, 39, 58, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top center, rgba(35, 136, 242, 0.08), transparent 22%),
    #eef3f8;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
}

a {
  color: var(--accent);
  text-decoration: none;
}

.screen-toolbar {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--line);
  background: rgba(238, 243, 248, 0.92);
  backdrop-filter: blur(14px);
}

.toolbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: min(1100px, calc(100% - 24px));
  min-height: 72px;
  margin: 0 auto;
  gap: 12px;
}

.toolbar-back,
.toolbar-print {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  font-weight: 700;
}

.toolbar-back {
  background: white;
  border: 1px solid var(--line);
}

.toolbar-print {
  border: 0;
  color: white;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  cursor: pointer;
}

.sheet-stack {
  width: min(1100px, calc(100% - 24px));
  margin: 28px auto 40px;
}

.sheet {
  width: 210mm;
  min-height: 297mm;
  margin: 0 auto 24px;
  padding: 18mm;
  background:
    radial-gradient(circle at top right, rgba(35, 136, 242, 0.06), transparent 20%),
    var(--paper);
  box-shadow: var(--shadow);
}

.sheet-header,
.sheet-footer,
.block-title,
.price-item {
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

.sheet-header {
  align-items: start;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.sheet-brand,
.print-footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 16px;
}

.print-logo {
  width: 78px;
  height: 78px;
  object-fit: contain;
  filter: drop-shadow(0 0 20px rgba(35, 136, 242, 0.18));
}

.print-footer-logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
  filter: drop-shadow(0 0 16px rgba(35, 136, 242, 0.16));
}

.kicker {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  line-height: 1.1;
}

h1 {
  max-width: 14ch;
  font-size: 2.4rem;
}

h2 {
  font-size: 1.35rem;
}

.sheet-meta {
  min-width: 220px;
  text-align: right;
}

.sheet-meta p,
.subtitle,
.note-title,
.price-item span,
.sheet-footer p {
  margin: 0;
}

.sheet-meta p,
.subtitle,
ul,
.price-item p,
.price-item span,
.sheet-footer p {
  color: var(--muted);
  line-height: 1.55;
  font-size: 0.98rem;
}

.block {
  margin-top: 22px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.block-title span {
  white-space: nowrap;
  color: var(--accent);
  font-size: 1.08rem;
  font-weight: 800;
}

.subtitle {
  margin-top: 6px;
  font-weight: 700;
}

ul {
  margin: 14px 0 0;
  padding-left: 20px;
}

li + li {
  margin-top: 6px;
}

.note-card {
  margin-top: 16px;
  padding: 16px 18px;
  border-radius: 18px;
  background: var(--accent-soft);
  border: 1px solid rgba(35, 136, 242, 0.12);
}

.note-title {
  color: var(--ink);
  font-weight: 800;
}

.price-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.price-item {
  align-items: center;
  padding: 16px 18px;
  border-radius: 18px;
  background: linear-gradient(180deg, #f9fcff 0%, #f1f8ff 100%);
  border: 1px solid var(--line);
}

.price-item p {
  color: var(--ink);
  font-weight: 700;
}

.price-item strong {
  color: var(--accent);
  font-size: 1.02rem;
  white-space: nowrap;
}

.price-item.accent {
  background: var(--accent-soft);
}

.price-item.accent span {
  margin-left: auto;
}

.sheet-footer {
  align-items: end;
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.footer-brand {
  color: var(--ink);
  font-weight: 800;
}

.footer-right {
  text-align: right;
}

.page-break-before {
  break-before: page;
}

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

@media (max-width: 900px) {
  .sheet {
    width: 100%;
    min-height: auto;
    padding: 24px;
  }

  .sheet-header,
  .sheet-footer,
  .block-title,
  .price-item,
  .toolbar-inner {
    flex-direction: column;
    align-items: start;
  }

  .sheet-meta,
  .footer-right {
    text-align: left;
  }

  .toolbar-back,
  .toolbar-print {
    width: 100%;
  }

  .sheet-brand,
  .print-footer-brand {
    align-items: flex-start;
  }

  .page-break-before {
    break-before: auto;
  }
}

@media (max-width: 640px) {
  .sheet-stack {
    width: min(100% - 16px, 1100px);
    margin: 16px auto 28px;
  }

  .sheet {
    padding: 18px;
    border-radius: 20px;
  }

  .toolbar-inner {
    width: min(100% - 16px, 1100px);
    padding: 12px 0;
  }

  .print-logo {
    width: 58px;
    height: 58px;
  }

  .print-footer-logo {
    width: 44px;
    height: 44px;
  }

  h1 {
    max-width: none;
    font-size: 1.9rem;
  }

  h2 {
    font-size: 1.18rem;
  }

  .block {
    padding: 16px;
    border-radius: 18px;
  }

  .price-item {
    padding: 14px;
  }
}

@media (max-width: 430px) {
  .sheet-stack {
    width: min(100% - 12px, 1100px);
    margin: 12px auto 22px;
  }

  .toolbar-inner {
    width: min(100% - 12px, 1100px);
    gap: 10px;
    padding: 10px 0;
  }

  .toolbar-back,
  .toolbar-print {
    min-height: 42px;
    padding: 0 14px;
    font-size: 0.93rem;
  }

  .sheet {
    padding: 14px;
    border-radius: 16px;
  }

  .sheet-brand,
  .print-footer-brand {
    gap: 12px;
  }

  .print-logo {
    width: 48px;
    height: 48px;
  }

  .print-footer-logo {
    width: 38px;
    height: 38px;
  }

  .kicker {
    font-size: 0.74rem;
    margin-bottom: 8px;
  }

  h1 {
    font-size: 1.65rem;
    line-height: 1.06;
  }

  h2 {
    font-size: 1.06rem;
  }

  .sheet-meta p,
  .subtitle,
  ul,
  .price-item p,
  .price-item span,
  .sheet-footer p {
    font-size: 0.9rem;
    line-height: 1.5;
  }

  .block {
    margin-top: 16px;
    padding: 14px;
    border-radius: 16px;
  }

  .block-title span,
  .price-item strong {
    font-size: 0.95rem;
  }

  .price-item {
    padding: 12px;
    border-radius: 14px;
  }
}

@media print {
  body {
    background: white;
  }

  .screen-toolbar {
    display: none;
  }

  .sheet-stack {
    width: auto;
    margin: 0;
  }

  .sheet {
    width: auto;
    min-height: auto;
    margin: 0;
    padding: 0;
    box-shadow: none;
  }
}
