:root {
  --bg: #06070c;
  --ink: #f4efe6;
  --muted: #9aa0ad;
  --line: rgba(244, 239, 230, 0.12);
  --amber: #f0b429;
  --violet: #9b59b6;
  --teal: #3dd6c6;
  --font-d: "Outfit", sans-serif;
  --font-b: "Instrument Sans", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  min-height: 100vh;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--font-b);
}
a { color: inherit; text-decoration: none; }
.hidden { display: none !important; }

.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background:
    radial-gradient(circle at 15% 20%, rgba(155, 89, 182, 0.2), transparent 30%),
    radial-gradient(circle at 85% 15%, rgba(240, 180, 41, 0.12), transparent 28%),
    linear-gradient(180deg, #0a0c14, #06070c 60%);
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  animation: float 12s ease-in-out infinite;
}
.orb.a { width: 40vw; height: 40vw; left: -10%; top: 10%; background: rgba(155, 89, 182, 0.22); }
.orb.b { width: 34vw; height: 34vw; right: -8%; bottom: 0; background: rgba(240, 180, 41, 0.14); animation-delay: -4s; }
.grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(circle at center, black 20%, transparent 75%);
}

.top {
  max-width: 980px;
  margin: 0 auto;
  padding: 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-d); font-weight: 700; }
.mark {
  width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center;
  color: #140f08; background: linear-gradient(135deg, var(--amber), #ff7a3d);
}
.top-actions { display: flex; gap: 10px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; cursor: pointer; border-radius: 999px; padding: 11px 16px;
  font-weight: 600; font-family: var(--font-b);
  transition: transform .25s ease, box-shadow .25s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn.main {
  background: linear-gradient(135deg, var(--amber), #ff7a3d);
  color: #140f08;
  box-shadow: 0 14px 34px rgba(240, 180, 41, 0.25);
}
.btn.soft {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
  color: var(--ink);
}

.wrap { max-width: 980px; margin: 0 auto; padding: 10px 22px 70px; }

.gate, .panel, .picker {
  border: 1px solid rgba(155, 89, 182, 0.28);
  border-radius: 30px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(18,16,30,.94), rgba(8,10,16,.92));
  box-shadow: 0 30px 80px rgba(0,0,0,.35);
  animation: rise .8s cubic-bezier(.22,1,.36,1) both;
}

.picker {
  padding: 36px 26px;
  text-align: center;
}
.picker-grid {
  display: grid;
  gap: 12px;
  margin-top: 22px;
  text-align: left;
}
.pick-card {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.04);
  color: var(--ink);
  border-radius: 18px;
  padding: 16px;
  cursor: pointer;
  text-align: left;
  transition: transform .2s ease, border-color .2s ease;
}
.pick-card:hover {
  transform: translateY(-2px);
  border-color: rgba(155,89,182,.45);
}
.pick-card strong {
  display: block;
  font-family: var(--font-d);
  font-size: 1.15rem;
  margin-bottom: 4px;
}
.pick-card span { color: var(--muted); font-size: .88rem; }

.gate { padding: 54px 28px; text-align: center; }
.chip {
  color: var(--violet);
  letter-spacing: .16em;
  text-transform: uppercase;
  font-size: .76rem;
  font-weight: 700;
}
.gate h1, .hero h1 {
  font-family: var(--font-d);
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  margin: 12px 0;
}
.lead, .sub { color: var(--muted); line-height: 1.7; max-width: 34rem; margin: 0 auto 22px; }

.hero {
  padding: 28px 26px 20px;
  background:
    radial-gradient(circle at 10% 20%, rgba(155,89,182,.28), transparent 35%),
    radial-gradient(circle at 90% 0%, rgba(240,180,41,.14), transparent 30%);
  border-bottom: 1px solid var(--line);
}
.sub { margin: 0 0 14px; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; }
.badge {
  padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line);
  font-size: .76rem; letter-spacing: .06em; text-transform: uppercase;
  background: rgba(255,255,255,.04);
}
.badge.on { color: var(--amber); border-color: rgba(240,180,41,.4); background: rgba(240,180,41,.1); }
.badge.danger { color: #ff9b74; border-color: rgba(255,122,61,.4); background: rgba(255,122,61,.1); }

.body { padding: 22px 26px 28px; display: grid; gap: 18px; }
.row {
  display: grid;
  grid-template-columns: 1.3fr .7fr;
  gap: 14px;
  align-items: end;
}
label { display: grid; gap: 8px; color: var(--muted); font-size: .88rem; }
input[type="text"] {
  width: 100%; border: 1px solid var(--line); background: rgba(255,255,255,.04);
  color: var(--ink); border-radius: 14px; padding: 12px 14px; outline: none;
}
input[type="text"]:focus { border-color: rgba(155,89,182,.5); }
.switches { display: flex; flex-wrap: wrap; gap: 10px; }
.switch {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 14px; border-radius: 999px; border: 1px solid var(--line);
  background: rgba(255,255,255,.03); color: var(--ink); cursor: pointer;
}
.switch input { accent-color: var(--amber); }

.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.box {
  border: 1px solid var(--line); border-radius: 20px; padding: 14px;
  background: rgba(255,255,255,.02);
}
.box h3 { font-family: var(--font-d); margin-bottom: 12px; }
.box h3 span { color: var(--muted); font-weight: 500; font-size: .8rem; }
.chips { display: grid; gap: 8px; min-height: 48px; margin-bottom: 12px; }
.chip-user {
  display: flex; align-items: center; gap: 10px;
  padding: 8px; border-radius: 16px; border: 1px solid var(--line);
  background: rgba(255,255,255,.04);
  animation: rise .45s ease both;
}
.chip-user img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; }
.chip-user strong { display: block; font-family: var(--font-d); font-size: .92rem; }
.chip-user em { display: block; font-style: normal; color: var(--muted); font-size: .74rem; }
.chip-user button {
  margin-left: auto; width: 28px; height: 28px; border: 0; border-radius: 50%;
  background: rgba(255,100,100,.12); color: #ff8f8f; cursor: pointer;
}
.adder { display: flex; gap: 8px; align-items: flex-start; }
.member-search-box { position: relative; flex: 1; }
.member-search-box input { width: 100%; }
.member-suggest {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 40;
  display: grid; gap: 4px; padding: 8px; border-radius: 14px;
  border: 1px solid rgba(155, 89, 182, 0.35);
  background: rgba(10, 12, 18, 0.98);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  max-height: 240px; overflow: auto;
}
.member-suggest-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  border: 0; border-radius: 12px; padding: 8px;
  background: transparent; color: var(--ink); cursor: pointer; text-align: left;
}
.member-suggest-item:hover { background: rgba(155, 89, 182, 0.16); }
.member-suggest-item img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.member-suggest-item strong { display: block; font-size: .9rem; }
.member-suggest-item em { display: block; font-style: normal; color: var(--muted); font-size: .75rem; }
.member-suggest-empty { padding: 10px; color: var(--muted); font-size: .85rem; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.msg { min-height: 1.3em; color: var(--teal); }
.msg.error { color: #ff8585; }

@keyframes float {
  0%,100% { transform: translate(0,0) scale(1); }
  50% { transform: translate(3%,-4%) scale(1.05); }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 820px) {
  .row, .cols { grid-template-columns: 1fr; }
}
