:root {
  --bg: #f0f2f5;
  --card: #fff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --blue: #2563eb;
  --blue-d: #1d4ed8;
  --ok: #059669;
  --err: #dc2626;
  --warn: #d97706;
  --radius: 16px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--ink); line-height: 1.45; }
body.hpt-has-sticky { min-height: 100dvh; padding-bottom: calc(88px + var(--safe-b)); }
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: #0f172a; color: #e2e8f0;
  padding: .85rem 1rem; display: flex; align-items: center; gap: .75rem;
}
.topbar a { color: #fff; text-decoration: none; font-weight: 700; font-size: .95rem; }
.topbar .back { opacity: .85; font-size: .85rem; }
.shell { max-width: 480px; margin: 0 auto; padding: 1rem; }
.card {
  background: var(--card); border-radius: var(--radius);
  padding: 1.15rem; border: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(15,23,42,.04);
}
h1 { margin: 0 0 .35rem; font-size: 1.35rem; letter-spacing: -.02em; }
.lead { margin: 0 0 1rem; color: var(--muted); font-size: .9rem; }
.banner {
  border-radius: 12px; padding: .75rem .85rem; font-size: .88rem; margin-bottom: 1rem;
}
.banner.warn { background: #fffbeb; border: 1px solid #fcd34d; color: #92400e; }
.banner.ok { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; }
.banner.err { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
label.field { display: block; font-size: .78rem; font-weight: 650; color: #334155; margin: .85rem 0 .3rem; }
input[type=text], input[type=email], input[type=tel], select, textarea {
  width: 100%; padding: .7rem .8rem; border: 1px solid #cbd5e1; border-radius: 12px;
  font: inherit; background: #fff; appearance: none;
}
textarea { min-height: 120px; resize: vertical; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: .65rem; }
@media (max-width: 380px) { .row2 { grid-template-columns: 1fr; } }
.media-grid { display: grid; gap: .65rem; margin-top: .5rem; }
.media-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .35rem;
  min-height: 88px; border: 1.5px dashed #94a3b8; border-radius: 14px; background: #f8fafc;
  color: #334155; font-size: .82rem; font-weight: 600; cursor: pointer; text-align: center; padding: .6rem;
}
.media-btn input { display: none; }
.media-btn span.icon { font-size: 1.4rem; }
.media-btn.has-file { border-style: solid; border-color: #93c5fd; background: #eff6ff; }
.media-hint { font-size: .75rem; color: var(--muted); margin-top: .25rem; }
.preview {
  margin-top: .5rem; border-radius: 12px; overflow: hidden; background: #0f172a; max-height: 180px;
  display: none; align-items: center; justify-content: center;
}
.preview.show { display: flex; }
.preview img, .preview video { max-width: 100%; max-height: 180px; display: block; }
.preview audio { width: 100%; margin: .5rem; }
.check { display: flex; gap: .5rem; align-items: flex-start; margin-top: .9rem; font-size: .85rem; color: #334155; }
.check input { margin-top: .2rem; }
.sticky-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  background: rgba(255,255,255,.92); backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  padding: .75rem 1rem calc(.75rem + var(--safe-b));
}
.sticky-bar .inner { max-width: 480px; margin: 0 auto; }
.btn-primary {
  width: 100%; border: 0; border-radius: 14px; padding: .9rem 1rem;
  background: var(--blue); color: #fff; font-weight: 700; font-size: 1rem; cursor: pointer;
}
.btn-primary:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary.loading { position: relative; }
.status-line { font-size: .8rem; color: var(--muted); text-align: center; margin-top: .4rem; min-height: 1.1em; }
.success-panel { text-align: center; padding: 1.5rem .5rem; }
.success-panel .big { font-size: 2.2rem; margin-bottom: .5rem; }
.chip { display: inline-block; font-size: .72rem; font-weight: 700; background: #eff6ff; color: #1d4ed8; padding: .15rem .5rem; border-radius: 999px; }
.foot-links { text-align: center; margin-top: 1rem; font-size: .85rem; color: var(--muted); }
.foot-links a { color: var(--blue); }

.hpt-auth-wrap{max-width:32rem;margin:1rem auto 1.25rem;padding:0 1rem}
.hpt-auth-wrap .card{background:#fff;border:1px solid #e2e8f0;border-radius:16px;padding:1.25rem 1.2rem 1.4rem;box-shadow:0 10px 28px rgba(15,23,42,.06)}
.hpt-auth-wrap h1{margin:.2rem 0 .35rem;font-size:1.35rem}
.hpt-auth-wrap .lead{color:#64748b;font-size:.92rem}
.hpt-auth-wrap label{display:block;font-size:.8rem;font-weight:650;margin:.7rem 0 .25rem}
.hpt-auth-wrap input,.hpt-auth-wrap textarea,.hpt-auth-wrap select{width:100%;font-size:16px;padding:.6rem .7rem;border:1px solid #cbd5e1;border-radius:10px}
.hpt-auth-wrap .btn, .hpt-auth-wrap button.btn{display:inline-flex;align-items:center;justify-content:center;min-height:44px;width:100%;border:0;border-radius:12px;background:#1e3a5f;color:#fff;font-weight:700;margin-top:.6rem;cursor:pointer}
.hpt-auth-wrap .chip{display:inline-block;font-size:.7rem;font-weight:700;background:#eff6ff;color:#1d4ed8;border-radius:999px;padding:.15rem .55rem}
.hpt-auth-wrap .banner.warn{background:#fffbeb;border:1px solid #fde68a;color:#92400e;border-radius:12px;padding:.7rem .8rem;margin:.75rem 0}
.hpt-auth-wrap .meta{font-size:.88rem;margin-top:.75rem}
