:root {
  --bg: linear-gradient(145deg, #fdf6ff, #efe8ff 30%, #e8eeff 60%, #edfff5);
  --primary: #7c4dff;
  --accent: #e040fb;
  --text: #333;
  --muted: #888;
  --card-bg: rgba(255, 255, 255, 0.95);
  --border: rgba(124, 77, 255, 0.2);
}
* { box-sizing: border-box; margin: 0; padding: 0 }
body { font-family: -apple-system, system-ui, 'Nunito', sans-serif;
       background: var(--bg); min-height: 100vh; color: var(--text); line-height: 1.5 }

.gate {
  display: grid; place-items: center; min-height: 100vh; padding: 2rem;
}
.gate-card {
  background: var(--card-bg); border-radius: 18px; padding: 36px 32px;
  box-shadow: 0 8px 32px rgba(0,0,0,.08); max-width: 380px; width: 100%;
  border: 1.5px solid var(--border);
}
.gate-card h1 {
  font-size: 28px; text-align: center; margin-bottom: 6px;
  background: linear-gradient(135deg, var(--accent), var(--primary));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.gate-card .sub { text-align: center; color: var(--muted); font-size: 13px; margin-bottom: 24px; }
.gate-card input {
  width: 100%; padding: 12px 16px; border: 2px solid var(--border);
  border-radius: 12px; font-size: 15px; font-family: inherit; margin-bottom: 12px;
}
.gate-card input:focus { outline: none; border-color: var(--primary); }
.gate-card button {
  width: 100%; padding: 12px 16px; border: none; border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--primary));
  color: #fff; font-size: 15px; font-weight: 700; font-family: inherit; cursor: pointer;
}
.gate-card button:hover { filter: brightness(1.05) }
.gate-card .err {
  color: #c2185b; font-size: 13px; min-height: 18px; text-align: center; margin-top: 8px;
}

.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 200;
  display: none; align-items: center; justify-content: center;
}
.modal-backdrop.visible { display: flex; }
.modal {
  background: #fff; border-radius: 14px; padding: 24px;
  width: 90%; max-width: 480px; max-height: 90vh; overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
}
.modal h2 { font-size: 18px; margin-bottom: 16px; color: var(--primary); }
.modal label { display: block; font-size: 11px; color: #666; margin-bottom: 4px; margin-top: 10px; font-weight: 700; }
.modal input, .modal textarea {
  width: 100%; padding: 8px 12px; border: 1.5px solid var(--border); border-radius: 8px;
  font-family: inherit; font-size: 14px;
}
.modal textarea { min-height: 60px; resize: vertical; }
.modal .actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 20px; flex-wrap: wrap; }
.modal button {
  padding: 8px 16px; border-radius: 8px; border: 1.5px solid var(--border);
  background: #fff; cursor: pointer; font-family: inherit; font-size: 13px; font-weight: 700;
}
.modal button.primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.modal button.danger { background: #c62828; color: #fff; border-color: #c62828; }

.admin-bar { display: none; padding: 8px 18px; background: #fff9c4; border-bottom: 1px solid #f9a825; font-size: 12px; align-items: center; gap: 12px; }
body.is-admin .admin-bar { display: flex; }
.admin-bar button, .admin-bar a {
  padding: 4px 10px; border-radius: 99px; border: 1.5px solid #f9a825; background: #fff;
  cursor: pointer; font-family: inherit; font-size: 12px; color: #5d4037; text-decoration: none;
}
.admin-bar button:hover, .admin-bar a:hover { background: #fffde7; }
