:root {
  --bg: #050509;
  --bg2: #070712;
  --panel: rgba(255,255,255,.055);
  --panel2: rgba(255,255,255,.085);
  --text: #f5f7ff;
  --muted: rgba(245,247,255,.72);
  --soft: rgba(245,247,255,.55);
  --line: rgba(255,255,255,.14);
  --accent: #9fd7ff;
  --accent2: #d7b7ff;
  --danger: #ff6b8a;
  --radius: 26px;
  --shadow: 0 30px 90px rgba(0,0,0,.38);
}

* { box-sizing: border-box; }

img { max-width: 100%; height: auto; }

html, body { min-height: 100%; }

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top, rgba(159,215,255,.20), transparent 34rem),
    radial-gradient(circle at 85% 10%, rgba(215,183,255,.16), transparent 28rem),
    linear-gradient(180deg, var(--bg2) 0%, #030306 100%);
}

a { color: inherit; text-decoration: none; }

.qm-wrap {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.qm-narrow {
  width: min(560px, calc(100% - 32px));
  margin: 0 auto;
}

.qm-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 26px 0;
}

.qm-logo {
  font-weight: 850;
  letter-spacing: -.035em;
  font-size: 1.08rem;
}

.qm-navlinks {
  display: flex;
  gap: 12px;
  align-items: center;
  color: var(--muted);
  font-size: .95rem;
}

.qm-logo,
.qm-navlinks > *,
.qm-btn {
  white-space: nowrap;
}

.qm-navlinks a:hover { color: var(--text); }

.qm-center {
  min-height: calc(100vh - 96px);
  display: grid;
  place-items: center;
  padding: 28px 0 56px;
}

.qm-card {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 28px;
}

.qm-card.soft {
  background: var(--panel2);
}

h1 {
  margin: 0 0 12px;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1;
  letter-spacing: -.055em;
}

h2 {
  margin: 0 0 10px;
  font-size: 1.18rem;
  letter-spacing: -.025em;
}

p {
  color: var(--muted);
  line-height: 1.6;
}

.qm-small {
  color: var(--soft);
  font-size: .92rem;
  line-height: 1.5;
}

.qm-kicker {
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.045);
  color: var(--muted);
  font-size: .9rem;
  margin-bottom: 16px;
}

.qm-btn,
button.qm-btn,
a.qm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.075);
  color: var(--text);
  font: inherit;
  font-size: .95rem;
  line-height: 1;
  font-weight: 750;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease, filter .18s ease;
}

.qm-btn:hover {
  background: rgba(255,255,255,.11);
  border-color: rgba(255,255,255,.22);
}

.qm-btn.primary {
  border: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #050509;
}

.qm-btn.primary:hover {
  filter: brightness(1.07);
}

.qm-btn.secondary {
  border-color: var(--line);
  background: rgba(255,255,255,.075);
  color: var(--text);
}

.qm-btn.quiet {
  padding-inline: 12px;
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}

.qm-btn.quiet:hover {
  border-color: transparent;
  background: rgba(255,255,255,.055);
  color: var(--text);
}

.qm-btn.danger {
  border: 0;
  background: rgba(255,107,138,.18);
  color: var(--text);
}

.qm-btn.danger:hover {
  background: rgba(255,107,138,.26);
}

.qm-btn:disabled,
button:disabled {
  opacity: .6;
  cursor: not-allowed;
  filter: none;
}

.qm-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 18px;
}

label {
  display: block;
  margin: 14px 0 7px;
  color: var(--muted);
  font-size: .92rem;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,.055);
  color: var(--text);
  padding: 13px 14px;
  outline: none;
  font: inherit;
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(159,215,255,.72);
  box-shadow: 0 0 0 4px rgba(159,215,255,.11);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(159,215,255,.8);
  outline-offset: 3px;
}

.qm-msg {
  display: none;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.055);
  color: var(--muted);
  white-space: pre-wrap;
}

.qm-msg.ok { border-color: rgba(80,220,150,.55); }
.qm-msg.err { border-color: rgba(255,107,138,.7); }

.qm-footer {
  border-top: 1px solid var(--line);
  padding: 24px 0;
  color: var(--soft);
  font-size: .92rem;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.qm-footer a { color: var(--muted); }
.qm-footer a:hover { color: var(--text); }

@media (max-width: 720px) {
  .qm-nav {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
    padding: 20px 0;
  }

  .qm-logo {
    align-self: flex-start;
  }

  .qm-navlinks {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    font-size: .88rem;
  }

  .qm-navlinks > * {
    min-width: 0;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    text-align: center;
  }

  .qm-navlinks > :last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .qm-card { padding: 22px; border-radius: 22px; }
}
