:root {
  --brand: #D8533F;
  --brand-hover: #BF4330;
  --bg: #F7F5F3;
  --surface: #FFFFFF;
  --ink: #1C1917;
  --muted: #78716C;
  --border: #E7E2DD;
  --bad: #B91C1C;
  --bad-bg: #FEF2F2;
  --radius: 14px;
}
*, *::before, *::after { box-sizing: border-box; }
body.pub {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.45;
  padding-bottom: calc(32px + env(safe-area-inset-bottom));
}
body.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.pub-head { text-align: center; padding: 24px 16px 14px; }
.pub-head img { width: 64px; height: 64px; border-radius: 16px; object-fit: cover; margin-bottom: 8px; border: 1px solid var(--border); }
.pub-head h1 { margin: 0; font-size: 1.4rem; letter-spacing: -0.02em; }
.pub-head p { margin: 4px 0 0; color: var(--muted); font-size: 0.92rem; }
.pub-main { max-width: 560px; margin: 0 auto; padding: 0 16px; }
.pub-main.auth-box { width: 100%; max-width: 400px; padding: 0; }
.pub-form { display: grid; gap: 14px; }
.pub-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; display: grid; gap: 12px; box-shadow: 0 2px 10px rgba(28, 25, 23, 0.03); }
.pub-card h2 { margin: 0; font-size: 1.05rem; }
.pub-card h3 { margin: 8px 0 2px; font-size: 0.84rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
label { display: grid; gap: 5px; font-size: 0.85rem; font-weight: 600; color: var(--muted); }
.pub-check { display: flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 500; cursor: pointer; }
.pub-check input { width: 18px; height: 18px; accent-color: var(--brand); }
input[type="text"], input[type="email"], input[type="password"], input[type="tel"], input[type="date"], select, textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: #FCFBF9; color: var(--ink); font: inherit; font-size: 16px;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); background: #fff; box-shadow: 0 0 0 3px rgba(216, 83, 63, 0.14); }
.phone-group { display: flex; gap: 8px; align-items: stretch; }
.phone-group .phone-cc { width: 108px; flex: 0 0 108px; padding-left: 8px; padding-right: 6px; font-weight: 600; }
.phone-group .phone-mask { flex: 1 1 auto; font-variant-numeric: tabular-nums; }
.pub-prod { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid #F3EFEA; }
.pub-prod:last-of-type { border-bottom: 0; }
.pub-pname { display: flex; flex-direction: column; }
.pub-pname span { font-size: 0.86rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.pub-step { display: inline-flex; align-items: center; gap: 4px; }
.pub-step button { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--border); background: #FAF8F6; font-size: 1.1rem; font-weight: 700; cursor: pointer; }
.pub-step input { width: 46px; min-height: 36px; text-align: center; padding: 4px; font-weight: 700; border: 1px solid var(--border); border-radius: 10px; }
.pub-radio { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pub-radio label { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; color: var(--ink); cursor: pointer; }
.pub-radio input { accent-color: var(--brand); }
.pub-bar { position: sticky; bottom: calc(12px + env(safe-area-inset-bottom)); background: var(--ink); color: #fff; padding: 12px 14px; border-radius: var(--radius); display: flex; align-items: center; justify-content: space-between; gap: 12px; box-shadow: 0 8px 24px rgba(28, 25, 23, 0.22); }
.pub-bar span { display: block; font-size: 0.74rem; opacity: .8; }
.pub-bar b { font-size: 1.2rem; font-variant-numeric: tabular-nums; }
.pub-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 20px; border-radius: 10px; border: 0; background: var(--brand); color: #fff; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; }
.pub-btn:hover { background: var(--brand-hover); }
.pub-btn.full { width: 100%; }
.pub-btn.ghost { background: #F5F2EF; color: var(--ink); }
.pub-err { background: var(--bad-bg); border: 1px solid #FECACA; color: var(--bad); padding: 12px 14px; border-radius: 10px; margin-bottom: 12px; font-size: 0.88rem; font-weight: 600; }
.pub-promo { background: #FFF7EE; border: 1px solid #F5C2B8; border-left: 4px solid var(--brand); color: var(--ink); padding: 11px 14px; border-radius: 10px; margin-bottom: 12px; font-size: 0.88rem; font-weight: 600; }
.pub-sum { list-style: none; padding: 0; margin: 0; }
.pub-sum li { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #F3EFEA; font-variant-numeric: tabular-nums; }
.pub-sum li.tot { font-weight: 700; border-bottom: 0; }
.hint { font-size: 0.82rem; color: var(--muted); margin: 0; }
.hint.center { text-align: center; }
.hint a { color: var(--brand); font-weight: 600; }
.hide { display: none !important; }
.hp { position: absolute; left: -9999px; }
