/* Alisa — public site and the admin's base. Light first, dark by system setting. */

@font-face { font-family: "Onest"; src: url("/static/fonts/onest-cyrillic-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Onest"; src: url("/static/fonts/onest-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
/* Only the dram sign (and Armenian, should Alisa write any) comes from here. */
@font-face { font-family: "Noto Sans Armenian"; src: url("/static/fonts/noto-sans-armenian-armenian-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0308, U+0530-058F, U+2010, U+2024, U+25CC, U+FB13-FB17; }

:root {
  color-scheme: light;
  --bg: #faf7f2;
  --surface: #ffffff;
  --surface-2: #f3eee7;
  --ink: #1f1a17;
  --ink-2: #4a433d;
  --muted: #7a7169;
  --line: rgba(31, 26, 23, 0.09);
  --line-2: rgba(31, 26, 23, 0.16);
  --accent: #e8643a;
  --accent-hover: #d6552c;
  --accent-ink: #ffffff;
  --accent-soft: #fde9df;
  --accent-text: #c2471f;
  --green: #2c7a50; --green-soft: #e1f1e7;
  --amber: #9a6512; --amber-soft: #fbefd9;
  --blue: #2f5ea8; --blue-soft: #e3ebf8;
  --violet: #6b45b0; --violet-soft: #eee6fa;
  --sand: #7a6a55; --sand-soft: #efe8dd;
  --track: #efe8df;
  --shadow: 0 1px 2px rgba(31, 26, 23, 0.04), 0 8px 24px -12px rgba(31, 26, 23, 0.12);
  --shadow-lg: 0 24px 64px -24px rgba(31, 26, 23, 0.35);
  --r: 20px;
  --r-sm: 12px;
  --font: "Onest", "Noto Sans Armenian", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Onest", "Noto Sans Armenian", system-ui, sans-serif;
  --display-weight: 650;
  --display-tracking: -0.035em;
  --wrap: 1160px;
  --gutter: clamp(16px, 4vw, 32px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #151311;
    --surface: #1e1b19;
    --surface-2: #26221f;
    --ink: #f4efe9;
    --ink-2: #d4ccc4;
    --muted: #a39a91;
    --line: rgba(255, 255, 255, 0.08);
    --line-2: rgba(255, 255, 255, 0.16);
    --accent: #f0764d;
    --accent-hover: #f58a65;
    --accent-ink: #1b0f0a;
    --accent-soft: rgba(240, 118, 77, 0.15);
    --accent-text: #f79574;
    --green: #6fcf97; --green-soft: rgba(111, 207, 151, 0.13);
    --amber: #e8b45c; --amber-soft: rgba(232, 180, 92, 0.13);
    --blue: #8ab4f0; --blue-soft: rgba(138, 180, 240, 0.13);
    --violet: #b99af0; --violet-soft: rgba(185, 154, 240, 0.14);
    --sand: #cbb89c; --sand-soft: rgba(203, 184, 156, 0.13);
    --track: #2e2925;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px -12px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 24px 64px -24px rgba(0, 0, 0, 0.7);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 650; letter-spacing: -0.02em; line-height: 1.15; }
p { margin: 0; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.muted { color: var(--muted); }
.noscript { padding: 40px; text-align: center; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- buttons, chips ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px;
  border: 1px solid transparent; border-radius: 999px;
  background: var(--surface-2); color: var(--ink);
  font-weight: 560; font-size: 15px; text-decoration: none; white-space: nowrap;
  cursor: pointer; transition: background .15s, border-color .15s, transform .1s, color .15s;
}
.btn:active { transform: scale(.98); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent-hover); }
.btn.ghost { background: transparent; border-color: var(--line-2); }
.btn.ghost:hover { border-color: var(--ink); }
.btn.small { min-height: 36px; padding: 0 14px; font-size: 14px; }
.btn.block { width: 100%; }
.btn.link { background: none; padding: 0; min-height: 0; color: var(--accent-text); border-radius: 4px; }
.btn[disabled] { opacity: .5; pointer-events: none; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 26px; padding: 0 10px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600; letter-spacing: .01em; white-space: nowrap;
  background: var(--surface-2); color: var(--ink-2);
}
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; }
.chip.plain::before { display: none; }
.chip.help { background: var(--accent-soft); color: var(--accent-text); }
.chip.treatment { background: var(--amber-soft); color: var(--amber); }
.chip.street { background: var(--sand-soft); color: var(--sand); }
.chip.foster { background: var(--violet-soft); color: var(--violet); }
.chip.home { background: var(--blue-soft); color: var(--blue); }
.chip.adopted, .chip.done { background: var(--green-soft); color: var(--green); }
.chip.demo { background: var(--ink); color: var(--bg); }
.chip.demo::before { display: none; }

/* ---------- header ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(1.6) blur(14px); backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .2s;
}
.top.scrolled { border-bottom-color: var(--line); }
.top .wrap { display: flex; align-items: center; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; }
.brand svg { width: 30px; height: 30px; flex: none; }
.brand b { font-family: var(--display); font-weight: var(--display-weight); letter-spacing: var(--display-tracking); font-size: 21px; }
.brand span { color: var(--muted); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top nav { display: flex; gap: 4px; margin-left: auto; }
.top nav a { padding: 8px 12px; border-radius: 999px; text-decoration: none; color: var(--ink-2); font-size: 15px; font-weight: 500; }
.top nav a:hover { background: var(--surface-2); color: var(--ink); }
.top .btn { margin-left: 8px; }
@media (max-width: 820px) { .top nav, .brand span { display: none; } .top .btn { margin-left: auto; } }

.notice { background: var(--ink); color: var(--bg); font-size: 14px; }
.notice .wrap { padding-top: 10px; padding-bottom: 10px; display: flex; gap: 10px; align-items: center; }
.notice svg { width: 18px; height: 18px; flex: none; color: var(--accent); }

/* ---------- hero ---------- */
.hero { padding: clamp(28px, 6vw, 72px) 0 clamp(36px, 6vw, 80px); }
.hero .wrap { display: grid; gap: clamp(28px, 5vw, 64px); grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); align-items: center; }
.hero h1 {
  font-family: var(--display); font-weight: var(--display-weight); letter-spacing: var(--display-tracking);
  font-size: clamp(36px, 5.6vw, 66px); line-height: 1.02; text-wrap: balance;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lead { margin-top: 22px; font-size: clamp(16px, 1.6vw, 18.5px); color: var(--ink-2); max-width: 36em; text-wrap: pretty; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.hero .actions .btn { min-height: 50px; padding: 0 26px; font-size: 16px; }
.stats { display: flex; flex-wrap: wrap; gap: 14px 28px; margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--line); }
.stat b { display: block; font-family: var(--display); font-weight: var(--display-weight); letter-spacing: -0.02em; font-size: clamp(22px, 2.4vw, 28px); line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: 14px; }
.collage { position: relative; display: grid; grid-template-columns: 1.35fr 1fr; grid-template-rows: 1fr 1fr; gap: 12px; aspect-ratio: 1 / 0.92; }
.collage a, .collage div { position: relative; border-radius: var(--r); overflow: hidden; background: var(--surface-2); }
.collage a:first-child, .collage div:first-child { grid-row: span 2; }
.collage img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.collage a:hover img { transform: scale(1.03); }
.collage .tag { position: absolute; left: 10px; bottom: 10px; padding: 5px 11px; border-radius: 999px; background: rgba(20, 16, 14, .55); color: #fff; font-size: 13px; font-weight: 600; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.collage .portrait { grid-row: span 2; grid-column: span 2; }
.collage .placeholder { display: grid; place-items: center; color: var(--accent); }
.collage .placeholder svg { width: 38%; opacity: .9; }
@media (max-width: 820px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .collage { order: -1; aspect-ratio: 1 / 0.7; gap: 8px; }
}

/* ---------- sections ---------- */
.section { padding: clamp(40px, 6vw, 72px) 0; }
.section + .section { border-top: 1px solid var(--line); }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px 24px; margin-bottom: 26px; }
.section-head h2 { font-family: var(--display); font-weight: var(--display-weight); letter-spacing: var(--display-tracking); font-size: clamp(26px, 3.4vw, 38px); }
.section-head p { color: var(--muted); max-width: 34em; margin-top: 6px; }
.filters { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--gutter)); padding: 2px var(--gutter); }
.filters::-webkit-scrollbar { display: none; }
.filters button { flex: none; height: 38px; padding: 0 15px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; font-size: 14.5px; font-weight: 520; cursor: pointer; color: var(--ink-2); }
.filters button:hover { border-color: var(--ink); color: var(--ink); }
.filters button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.filters small { margin-left: 4px; opacity: .6; font-size: 12.5px; }
.empty { padding: 48px 24px; text-align: center; color: var(--muted); border: 1px dashed var(--line-2); border-radius: var(--r); }

/* ---------- animal cards ---------- */
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.card {
  display: flex; flex-direction: column; min-width: 0;
  background: var(--surface); border-radius: var(--r); overflow: hidden;
  box-shadow: var(--shadow); border: 1px solid var(--line);
  transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow), 0 18px 40px -22px rgba(31, 26, 23, .35); }
.card-photo { position: relative; display: block; aspect-ratio: 4 / 3; background: var(--surface-2); overflow: hidden; }
.card-photo img { width: 100%; height: 100%; object-fit: cover; }
.card-photo .chip { position: absolute; top: 12px; left: 12px; box-shadow: 0 2px 10px rgba(0, 0, 0, .12); }
.card-photo .chip.help, .card-photo .chip.treatment, .card-photo .chip.street, .card-photo .chip.foster, .card-photo .chip.home, .card-photo .chip.adopted { background: var(--surface); }
.card-photo .chip.demo { left: auto; right: 12px; }
.card-photo .nophoto { position: absolute; inset: 0; display: grid; place-items: center; color: var(--line-2); }
.card-photo .nophoto svg { width: 30%; }
.card-body { display: flex; flex-direction: column; gap: 12px; padding: 16px 18px 18px; flex: 1; }
.card-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.card-title h3 { font-size: 21px; }
.card-title h3 a { text-decoration: none; }
.card-title span { color: var(--muted); font-size: 14px; white-space: nowrap; }
.card .summary { color: var(--ink-2); font-size: 15px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card .needs { display: grid; gap: 12px; margin-top: auto; padding-top: 4px; }
.card .more { font-size: 13.5px; color: var(--muted); }
.card-actions { display: flex; gap: 8px; }
.card-actions .btn { flex: 1; }

/* progress */
.need { display: grid; gap: 7px; }
.need-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 14.5px; }
.need-row .title { font-weight: 560; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.need-row .sum { color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.need-row .sum b { color: var(--ink); font-weight: 620; }
.bar { height: 8px; border-radius: 999px; background: var(--track); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--accent); transition: width .8s cubic-bezier(.2, .8, .2, 1); }
.need.done .bar i { background: var(--green); }
.need .note { font-size: 13.5px; color: var(--muted); }

/* general needs */
.needs-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.need-card { display: grid; gap: 14px; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.need-card h3 { font-size: 18px; }
.need-card p { color: var(--ink-2); font-size: 15px; }
.need-card .btn { justify-self: start; }

/* ---------- donations feed ---------- */
.feed { display: grid; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 6px; }
.gift { display: grid; grid-template-columns: 40px 1fr auto; gap: 4px 14px; align-items: center; padding: 12px; border-radius: 14px; }
.gift + .gift { border-top: 1px solid var(--line); border-radius: 0; }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 650; font-size: 16px; background: var(--accent-soft); color: var(--accent-text); grid-row: span 2; align-self: start; }
.avatar.a1 { background: var(--blue-soft); color: var(--blue); }
.avatar.a2 { background: var(--green-soft); color: var(--green); }
.avatar.a3 { background: var(--violet-soft); color: var(--violet); }
.avatar.a4 { background: var(--amber-soft); color: var(--amber); }
.gift .who { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gift .amt { font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.gift .for { color: var(--muted); font-size: 14px; min-width: 0; }
.gift .for a { color: var(--ink-2); text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.gift .when { color: var(--muted); font-size: 13px; white-space: nowrap; text-align: right; }
.gift .msg { grid-column: 2 / -1; font-size: 14.5px; color: var(--ink-2); background: var(--surface-2); padding: 8px 12px; border-radius: 4px 14px 14px 14px; justify-self: start; margin-top: 4px; }
.feed-more { display: flex; justify-content: center; padding: 10px; }
.two-col { display: grid; gap: clamp(28px, 5vw, 56px); grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }

/* ---------- posts ---------- */
.posts { display: grid; gap: 14px; }
.post { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 18px 20px; display: grid; gap: 12px; }
.post-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 14px; color: var(--muted); }
.post-head a.chip { text-decoration: none; }
.post-text { white-space: pre-line; color: var(--ink-2); }
.post-photos { display: grid; gap: 6px; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
.post-photos button { padding: 0; border: 0; border-radius: 10px; overflow: hidden; aspect-ratio: 1; cursor: zoom-in; background: var(--surface-2); }
.post-photos img { width: 100%; height: 100%; object-fit: cover; }
.spent { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--green); }
.spent svg { width: 16px; height: 16px; }

/* ---------- how to help ---------- */
.methods { display: grid; gap: 12px; }
.method { display: grid; gap: 10px; padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.method-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.method-head b { font-size: 16px; font-weight: 620; }
.method-head span { color: var(--muted); font-size: 13.5px; text-align: right; }
.copy-row { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 14px; background: var(--surface-2); border-radius: 12px; }
.copy-row code { flex: 1; min-width: 0; font: 600 17px/1.3 var(--font); letter-spacing: .04em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.copy-row .btn { min-height: 36px; padding: 0 12px; font-size: 13.5px; background: var(--surface); }
.copy-row .btn.ok { color: var(--green); }
@media (max-width: 600px) {
  .copy-row code { font-size: 16px; letter-spacing: .02em; }
  .copy-row .btn { width: 40px; padding: 0; flex: none; }
  .copy-row .btn .label { display: none; }
}
dialog .method { padding: 14px 16px; box-shadow: none; }
@media (max-width: 600px) { .method-head { flex-direction: column; gap: 2px; } .method-head span { text-align: left; } }
dialog .method-head { flex-direction: column; gap: 2px; }
dialog .method-head span { text-align: left; }
.method .holder { font-size: 14px; color: var(--ink-2); }
.ways { padding: 20px; border-radius: var(--r); background: var(--accent-soft); color: var(--ink); display: grid; gap: 14px; }
.ways p { color: var(--ink-2); }
.contacts { display: flex; flex-wrap: wrap; gap: 8px; }
.contacts a { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; font-size: 14.5px; font-weight: 520; }
.contacts a:hover { border-color: var(--ink); }
.contacts svg { width: 18px; height: 18px; }

/* ---------- animal page ---------- */
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 500; padding: 6px 0; }
.back:hover { color: var(--ink); }
.back svg { width: 18px; height: 18px; }
.pet { padding: 12px 0 40px; }
.pet-top { display: grid; gap: clamp(24px, 4vw, 48px); grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); margin-top: 12px; align-items: start; }
@media (max-width: 860px) { .pet-top { grid-template-columns: 1fr; } }
.gallery { display: grid; gap: 10px; }
.gallery .main { position: relative; aspect-ratio: 4 / 3; border-radius: var(--r); overflow: hidden; background: var(--surface-2); }
.gallery .main img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.gallery .strip { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.gallery .strip button { flex: none; width: 76px; height: 76px; border-radius: 12px; overflow: hidden; padding: 0; border: 2px solid transparent; cursor: pointer; background: var(--surface-2); }
.gallery .strip button[aria-current="true"] { border-color: var(--accent); }
.gallery .strip img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 860px) {
  .gallery { margin: 0 calc(-1 * var(--gutter)); }
  .gallery .main { border-radius: 0; }
  .gallery .strip { padding: 0 var(--gutter); }
}
.pet-info { display: grid; gap: 16px; position: sticky; top: 84px; }
.pet-info h1 { font-family: var(--display); font-weight: var(--display-weight); letter-spacing: var(--display-tracking); font-size: clamp(34px, 4.6vw, 52px); line-height: 1.02; }
.pet-info .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; color: var(--muted); }
.pet-info .summary { font-size: 17.5px; color: var(--ink-2); }
.panel { display: grid; gap: 16px; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.panel h2, .panel h3 { font-size: 16px; font-weight: 620; letter-spacing: 0; }
.panel .need { padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.panel .need:last-of-type { border-bottom: 0; padding-bottom: 0; }
.need .help-btn { justify-self: start; margin-top: 4px; }
.raised-total { display: flex; justify-content: space-between; color: var(--muted); font-size: 14px; }
.raised-total b { color: var(--ink); }
.pet-body { display: grid; gap: clamp(32px, 5vw, 56px); grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); margin-top: clamp(36px, 5vw, 56px); }
@media (max-width: 860px) { .pet-body { grid-template-columns: 1fr; } .pet-info { position: static; } }
.pet-body h2 { font-family: var(--display); font-weight: var(--display-weight); letter-spacing: var(--display-tracking); font-size: 26px; margin-bottom: 16px; }
.story { display: grid; gap: 14px; font-size: 17px; color: var(--ink-2); }
.story p { text-wrap: pretty; }

/* ---------- dialogs ---------- */
dialog {
  border: 0; padding: 0; color: var(--ink); background: var(--surface);
  width: min(560px, calc(100vw - 24px)); max-height: min(88vh, 900px);
  border-radius: 24px; box-shadow: var(--shadow-lg);
}
dialog::backdrop { background: rgba(20, 16, 14, .45); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
dialog[open] { animation: rise .25s cubic-bezier(.2, .8, .2, 1); }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
.dlg { display: flex; flex-direction: column; max-height: inherit; }
.dlg-head { display: flex; align-items: center; gap: 12px; padding: 18px 20px 12px; }
.dlg-head h2 { font-size: 21px; flex: 1; }
.x { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--surface-2); display: grid; place-items: center; cursor: pointer; flex: none; }
.x svg { width: 18px; height: 18px; }
.dlg-body { overflow-y: auto; padding: 4px 20px 24px; display: grid; gap: 22px; overscroll-behavior: contain; }
.step { display: grid; gap: 12px; }
.step-title { display: flex; align-items: center; gap: 10px; font-weight: 620; }
.step-title i { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--bg); font-style: normal; font-size: 13px; flex: none; }
.step > p { color: var(--muted); font-size: 14.5px; }
.thanks { text-align: center; padding: 24px 8px 8px; display: grid; gap: 10px; justify-items: center; }
.thanks svg { width: 64px; height: 64px; color: var(--accent); }
.thanks h3 { font-size: 22px; }
.thanks p { color: var(--ink-2); max-width: 28em; }
@media (max-width: 600px) {
  dialog { width: 100vw; max-width: 100vw; max-height: 92vh; margin: auto 0 0; border-radius: 24px 24px 0 0; }
  dialog[open] { animation: sheet .3s cubic-bezier(.2, .8, .2, 1); }
  .dlg-body { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
}
@keyframes sheet { from { transform: translateY(40%); opacity: .4; } }
dialog.lightbox { width: auto; max-width: 96vw; max-height: 92vh; background: transparent; box-shadow: none; overflow: visible; border-radius: 0; margin: auto; }
dialog.lightbox img { max-width: 96vw; max-height: 88vh; border-radius: 12px; object-fit: contain; }
dialog.lightbox .x { position: fixed; top: 14px; right: 14px; background: rgba(255, 255, 255, .9); color: #111; }
dialog.lightbox::backdrop { background: rgba(10, 8, 7, .88); }

/* forms */
.field { display: grid; gap: 6px; }
.field > span { font-size: 13.5px; font-weight: 560; color: var(--ink-2); }
.field small { color: var(--muted); font-size: 12.5px; }
.input, select.input, textarea.input {
  width: 100%; min-height: 46px; padding: 10px 14px;
  border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface);
  font-size: 16px; transition: border-color .15s, box-shadow .15s;
}
textarea.input { min-height: 88px; resize: vertical; line-height: 1.45; }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
select.input { appearance: none; padding-right: 38px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237a7169' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 18px; }
.row { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; }
.row.amount { grid-template-columns: 1fr 110px; }
.check { display: flex; gap: 10px; align-items: center; font-size: 15px; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); }
.form-error { color: #c62828; font-size: 14px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.target { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 16px; background: var(--surface-2); }
.target img, .target .ph { width: 52px; height: 52px; border-radius: 12px; object-fit: cover; flex: none; background: var(--accent-soft); display: grid; place-items: center; color: var(--accent); }
.target .ph svg { width: 26px; }
.target div { min-width: 0; flex: 1; }
.target b { display: block; }
.target small { color: var(--muted); font-size: 13.5px; }

/* ---------- footer ---------- */
.foot { padding: 40px 0 calc(48px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); color: var(--muted); font-size: 14.5px; }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; }
.foot .brand b { font-size: 18px; color: var(--ink); }
.foot .brand svg { width: 24px; height: 24px; }

.toast { position: fixed; left: 50%; bottom: 24px; z-index: 100; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; padding: 11px 18px; border-radius: 999px; background: var(--ink); color: var(--bg); font-size: 14.5px; font-weight: 520; transition: .25s; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
