@font-face {
  font-family: "Pangolin";
  src: url("/static/fonts/Pangolin-Regular.ttf") format("truetype");
  font-display: swap;
}

:root {
  --ink: #1d1b2c;
  --paper: #fffaf3;
  --paper-2: #f6efff;
  --card: #ffffff;
  --muted: #6c6880;
  --accent: #ff5c8a;
  --accent-2: #7b5cff;
  --line: #1d1b2c;
  --ok: #1f9d6b;
  --warn: #c2410c;
  --radius: 18px;
  --shadow: 4px 4px 0 var(--line);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
img { max-width: 100%; display: block; }
a { color: var(--accent-2); }
h1, h2, h3, .logo, .btn, .step-n, .package-price { font-family: "Pangolin", "Comic Sans MS", cursive; font-weight: 400; }
h1 { font-size: clamp(2rem, 7vw, 3.4rem); line-height: 1.1; margin: .3em 0; }
h2 { font-size: 2rem; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 640px; }
.center { text-align: center; }
.muted { color: var(--muted); }

/* top bar */
.topbar { position: sticky; top: 0; z-index: 10; background: var(--paper); border-bottom: 2px solid var(--line); }
.topbar-in { display: flex; align-items: center; gap: 12px; min-height: 56px; flex-wrap: wrap; }
.logo { font-size: 1.5rem; color: var(--ink); text-decoration: none; margin-right: auto; }
.nav { display: none; gap: 18px; }
.nav a { color: var(--ink); text-decoration: none; }
.langs a { color: var(--muted); text-decoration: none; font-weight: 700; padding: 2px 6px; border-radius: 8px; }
.langs a.on { color: #fff; background: var(--ink); }
@media (min-width: 760px) { .nav { display: flex; } }

/* buttons */
.btn {
  display: inline-block; padding: 10px 22px; font-size: 1.2rem; color: #fff; background: var(--accent);
  border: 2px solid var(--line); border-radius: 999px; box-shadow: var(--shadow); text-decoration: none; cursor: pointer;
  transition: transform .08s, box-shadow .08s;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--line); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--line); }
.btn.big { font-size: 1.35rem; padding: 12px 28px; width: 100%; text-align: center; }
.linkbtn { background: none; border: 0; color: var(--accent-2); cursor: pointer; font: inherit; text-decoration: underline; }
.inline-form { display: inline; }

/* hero */
.hero { padding: 32px 0 40px; background:
  radial-gradient(circle at 85% 20%, #ffd6e4 0 22%, transparent 23%),
  radial-gradient(circle at 10% 90%, #e2d9ff 0 18%, transparent 19%), var(--paper); overflow: hidden; }
.hero-in { display: grid; gap: 28px; }
.kicker { display: inline-block; margin: 0; padding: 4px 12px; background: var(--ink); color: #fff; border-radius: 999px; font-weight: 700; font-size: .85rem; }
.lead { font-size: 1.1rem; max-width: 34em; }
.hero-cta { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.price-chip { font-weight: 700; padding: 6px 12px; border: 2px dashed var(--line); border-radius: 12px; background: #fff; }
.hero-strip { display: flex; gap: 10px; justify-content: center; }
.hero-strip img { width: 31%; max-width: 170px; border: 3px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); background: #fff; }
.tilt-1 { transform: rotate(-4deg) translateY(10px); }
.tilt-2 { transform: rotate(2deg); }
.tilt-3 { transform: rotate(5deg) translateY(16px); }
@media (min-width: 860px) {
  .hero { padding: 64px 0 72px; }
  .hero-in { grid-template-columns: 1.15fr 1fr; align-items: center; }
}

/* sections */
.section { padding: 48px 0; }
.section.alt { background: var(--paper-2); border-top: 2px solid var(--line); border-bottom: 2px solid var(--line); }
.bubble-h {
  position: relative; display: inline-block; margin: 0 0 20px; padding: 6px 20px; background: #fff;
  border: 2px solid var(--line); border-radius: 26px; box-shadow: var(--shadow);
}
.bubble-h::after {
  content: ""; position: absolute; left: 28px; bottom: -14px; width: 18px; height: 18px; background: #fff;
  border-right: 2px solid var(--line); border-bottom: 2px solid var(--line); transform: skewX(-25deg) rotate(45deg);
}

.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.step { background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.step h3 { margin: 6px 0; font-size: 1.4rem; }
.step p { margin: 0; color: var(--muted); }
.step-n { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--accent-2); color: #fff; font-size: 1.4rem; border: 2px solid var(--line); }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); } }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
.panel { margin: 0; background: #fff; border: 2px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); }
.panel img { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; border-bottom: 2px solid var(--line); }
.panel figcaption { padding: 8px 12px; font-size: .9rem; }
.panel figcaption span { color: var(--muted); }

.packages { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.package { background: #fff; border: 2px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.package h3 { margin: 0; font-size: 1.5rem; }
.package-price { font-size: 2.6rem; color: var(--accent); margin: 6px 0; }
.package ul { padding-left: 1.2em; }

/* forms */
.form { display: grid; gap: 12px; }
.form label { display: grid; gap: 4px; font-weight: 700; }
.form fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 6px; }
.form legend { font-weight: 700; padding: 0; margin-bottom: 4px; }
.form label.inline, .seg label { display: inline-flex; gap: 6px; align-items: center; font-weight: 400; }
.seg { display: flex; gap: 18px; }
input, select, textarea {
  font: inherit; width: 100%; padding: 10px 12px; border: 2px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink);
}
input[type=radio], input[type=checkbox] { width: auto; }
input:focus, select:focus, textarea:focus { outline: 3px solid #c9bbff; outline-offset: 1px; }
.form label.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: .92rem; }
.form label.check input { margin-top: 4px; }
.row2 { display: grid; gap: 12px; }
@media (min-width: 560px) { .row2 { grid-template-columns: 1fr 1fr; } }
.err { color: var(--warn); margin: -6px 0 0; font-size: .9rem; font-weight: 700; }
.alert { padding: 10px 14px; border: 2px solid var(--warn); border-radius: 12px; background: #fff3ec; margin-bottom: 14px; }
.alert.ok { border-color: var(--ok); background: #ecfdf5; }
.note { padding: 12px 14px; border: 2px dashed var(--line); border-radius: 12px; background: #fff; }

.faq { background: #fff; border: 2px solid var(--line); border-radius: 14px; margin-bottom: 10px; padding: 12px 16px; }
.faq summary { cursor: pointer; font-weight: 700; }
.faq p { margin: 8px 0 0; color: var(--muted); }

/* order page */
.card { background: #fff; border: 2px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.order-card h1 { font-size: 2.2rem; }
.sum { font-size: 1.3rem; }
.linkbox { font-family: ui-monospace, monospace; font-size: .85rem; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; border: 2px solid var(--line); font-size: .85rem; font-family: system-ui, sans-serif; vertical-align: middle; }
.st-new { background: #fff7cc; }
.st-paid { background: #dbeafe; }
.st-in_work { background: #ede9fe; }
.st-done { background: #d1fae5; }
.st-cancelled { background: #e5e7eb; }

.prose h2 { font-size: 1.4rem; margin-top: 1.4em; }

/* footer */
.footer { padding: 28px 0; border-top: 2px solid var(--line); background: var(--ink); color: #eee; }
.footer a { color: #ffd6e4; }
.footer-in { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; }
.footer-links { display: flex; gap: 16px; flex-wrap: wrap; }
.todo { color: #fbbf24; }

/* admin */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.filters a { padding: 4px 10px; border: 2px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--ink); background: #fff; }
.filters a.on { background: var(--ink); color: #fff; }
.table-scroll { overflow-x: auto; }
.admin-table { border-collapse: collapse; width: 100%; background: #fff; font-size: .92rem; }
.admin-table th, .admin-table td { border: 1px solid #ddd; padding: 6px 8px; text-align: left; white-space: nowrap; }
.admin-grid { display: grid; gap: 18px; }
@media (min-width: 860px) { .admin-grid { grid-template-columns: 1.4fr 1fr; } }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 12px; margin: 0; }
.kv dt { font-weight: 700; }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.idea { white-space: pre-wrap; }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.photos figure { margin: 0; }
.photos img { width: 100%; aspect-ratio: 1; object-fit: cover; border: 2px solid var(--line); border-radius: 12px; }
.photos figcaption { font-size: .8rem; overflow-wrap: anywhere; }
.heic { aspect-ratio: 1; display: grid; place-items: center; border: 2px dashed var(--line); border-radius: 12px; text-align: center; padding: 8px; }

/* demo: photo → hero, full strip reader */
.sub-h { margin: 28px 0 12px; font-size: 1.2rem; }
.small { font-size: .85rem; }
.ba-grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .ba-grid { grid-template-columns: repeat(3, 1fr); } }
.ba { margin: 0; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 6px;
  background: #fff; border: 2px solid var(--line); border-radius: 14px; padding: 8px; box-shadow: var(--shadow); }
.ba img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 10px; }
.ba-arrow { font-size: 1.4rem; font-weight: 700; }
.ba figcaption { grid-column: 1 / -1; text-align: center; font-size: .9rem; }
.reader { max-width: 560px; height: 75vh; overflow-y: auto; margin: 12px auto; border: 3px solid var(--line);
  border-radius: 14px; box-shadow: var(--shadow); background: #fff; -webkit-overflow-scrolling: touch; }
.reader img { display: block; width: 100%; height: auto; }
.reader-links { text-align: center; display: flex; gap: 14px; justify-content: center; align-items: center; flex-wrap: wrap; }
.package { position: relative; }
.package.featured { border-width: 3px; transform: translateY(-4px); }
.package > .badge { position: absolute; top: -12px; right: 12px; background: var(--accent, #ff5a5f); color: #fff;
  font-size: .75rem; padding: 3px 10px; border-radius: 999px; font-weight: 700; }
.old { color: var(--muted); font-size: .7em; font-weight: 400; }
.accent { color: var(--accent, #ff5a5f); margin: 0 0 8px; }

/* аккаунт */
.account-nav { display: flex; gap: 10px; align-items: center; }
.account-nav a { color: var(--ink); font-weight: 700; }
.seller { margin-top: 6px; font-size: .9rem; color: #ccc; }
.temp-pass { font-family: ui-monospace, monospace; font-size: 1.3rem; user-select: all; }
