/* Dark, like the app: black background, glass cards, rounded chips. */
:root {
  color-scheme: dark;
  --bg: #000;
  --card: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.1);
  --text: #fff;
  --muted: rgba(235, 235, 245, 0.6);
  --tint: #0a84ff;
  --danger: #ff453a;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.4;
}

main {
  max-width: 560px;
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top) + 24px) 16px calc(env(safe-area-inset-bottom) + 120px);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

h1 { font-size: 32px; font-weight: 700; letter-spacing: -0.02em; margin: 0; }
h2 { font-size: 17px; font-weight: 600; margin: 0; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; padding: 0 4px; }

header { display: flex; flex-direction: column; gap: 4px; padding: 0 4px; }

section { display: flex; flex-direction: column; gap: 10px; }
.section-head { display: flex; align-items: center; justify-content: space-between; min-height: 32px; padding: 0 4px; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 24px;
  overflow: hidden;
}
.divider { height: 1px; background: var(--border); margin-left: 16px; }
.row { display: flex; align-items: center; }

input, textarea {
  width: 100%;
  background: transparent;
  border: 0;
  outline: 0;
  color: var(--text);
  font: inherit;
  font-size: 17px;
  padding: 16px;
}
textarea { resize: vertical; min-height: 80px; }
/* Hidden without type="password", so the browser doesn't offer to keep someone else's passwords. */
.secret { -webkit-text-security: disc; }

input::placeholder, textarea::placeholder { color: var(--muted); }

button { font: inherit; color: inherit; cursor: pointer; border: 0; }
button:active { opacity: 0.7; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border);
  font-size: 15px;
  font-weight: 500;
}
.chip.selected { background: rgba(10, 132, 255, 0.15); border-color: rgba(10, 132, 255, 0.5); color: var(--tint); }

.icon-button {
  flex: none;
  width: 40px;
  height: 40px;
  margin-right: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.service-card { margin-top: 10px; }
.service-title { display: flex; align-items: center; gap: 8px; padding: 14px 16px 0; font-weight: 600; }

.list-item { display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; }
.list-item + .list-item { border-top: 1px solid var(--border); }

.footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 12px 16px calc(env(safe-area-inset-bottom) + 12px);
  background: linear-gradient(to top, #000 60%, transparent);
}
.primary {
  display: block;
  width: 100%;
  max-width: 528px;
  margin: 0 auto;
  height: 54px;
  border-radius: 999px;
  background: #fff;
  color: #000;
  font-size: 17px;
  font-weight: 600;
}
.primary:disabled { opacity: 0.4; }

.center {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
}
.badge-icon { font-size: 44px; }

.spinner {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.toast {
  position: fixed;
  left: 50%;
  top: calc(env(safe-area-inset-top) + 16px);
  transform: translateX(-50%);
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(40, 40, 42, 0.95);
  border: 1px solid var(--border);
  font-size: 15px;
  font-weight: 500;
  z-index: 10;
}
.toast.error { color: var(--danger); }
