:root {
  --aq-primary: #029688;
  --aq-primary-dark: #05655f;
  --aq-primary-light: #e0f7f5;
  --aq-text: #17332f;
  --aq-muted: #5b736f;
  --aq-card: #ffffff;
  --aq-bg: #eef7f6;
  --aq-radius: 20px;
  --aq-touch: 52px;
}

html {
  font-size: 16px;
}

body.aq-body {
  margin: 0;
  min-height: 100vh;
  background: var(--aq-bg);
  color: var(--aq-text);
  font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.aq-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.aq-header {
  background: linear-gradient(180deg, var(--aq-primary) 0%, var(--aq-primary-dark) 100%);
  color: #fff;
}

.aq-header-inner {
  max-width: 560px;
  margin: 0 auto;
  padding: 16px 20px;
}

.aq-brand {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.aq-main {
  flex: 1;
  display: flex;
  justify-content: center;
  padding: 24px 16px 32px;
}

.aq-card {
  width: 100%;
  max-width: 560px;
  background: var(--aq-card);
  border-radius: var(--aq-radius);
  box-shadow: 0 10px 30px rgba(5, 101, 95, 0.08);
  padding: 28px 22px 32px;
}

.aq-footer {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 16px;
  color: var(--aq-muted);
  font-size: 0.9rem;
}

.aq-eyebrow {
  margin: 0;
  color: var(--aq-primary-dark);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.8rem;
}

.aq-title {
  margin: 8px 0 0;
  font-size: 1.7rem;
  line-height: 1.25;
  color: var(--aq-primary-dark);
}

.aq-tagline {
  margin: 6px 0 20px;
  color: var(--aq-muted);
  font-size: 1.05rem;
}

.aq-lead {
  font-size: 1.05rem;
  line-height: 1.5;
  margin: 0 0 12px;
}

.aq-help {
  color: var(--aq-muted);
  margin: 0;
}

.aq-hero {
  display: flex;
  justify-content: center;
  margin: 8px 0 20px;
}

.aq-hero-svg {
  width: 180px;
  max-width: 100%;
  height: auto;
}

.aq-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--aq-touch);
  width: 100%;
  border: 0;
  border-radius: 14px;
  font-size: 1.05rem;
  font-weight: 600;
  text-decoration: none;
  margin-top: 20px;
}

.aq-btn-primary {
  background: var(--aq-primary);
  color: #fff;
}

.aq-btn-primary:focus,
.aq-btn:focus-visible {
  outline: 3px solid #7ad8cf;
  outline-offset: 2px;
}

.aq-btn:disabled {
  opacity: 0.7;
}

input,
select,
textarea,
button {
  min-height: var(--aq-touch);
  font-size: 16px;
}

code {
  background: var(--aq-primary-light);
  color: var(--aq-primary-dark);
  padding: 2px 6px;
  border-radius: 6px;
}

.aq-header-inner {
  display: flex;
  align-items: center;
  gap: 12px;
}

.aq-back {
  color: #fff;
  text-decoration: none;
  font-size: 2rem;
  line-height: 1;
  padding: 0 6px;
}

.aq-center { text-align: center; }
.aq-chc { color: var(--aq-muted); margin: 0 0 8px; }
.aq-step { color: var(--aq-muted); margin: 0 0 8px; font-size: 0.9rem; }
.aq-form { margin-top: 12px; }
.aq-label { display: block; margin: 14px 0 6px; font-weight: 600; }
.aq-input {
  width: 100%;
  border: 1px solid #cde7e3;
  border-radius: 12px;
  padding: 12px 14px;
  background: #fff;
}
.aq-textarea { min-height: 90px; resize: vertical; }
.aq-error { color: #b42318; font-size: 0.9rem; display: block; margin-top: 6px; }
.aq-inline { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.aq-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.aq-pill {
  flex: 1;
  min-height: var(--aq-touch);
  border: 1px solid #cde7e3;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  cursor: pointer;
}
.aq-pill input { position: absolute; opacity: 0; }
.aq-pill:has(input:checked) {
  background: var(--aq-primary-light);
  border-color: var(--aq-primary);
  color: var(--aq-primary-dark);
}
.aq-member-list { display: flex; flex-direction: column; gap: 10px; margin: 16px 0; }
.aq-member-card {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid #cde7e3;
  border-radius: 16px;
  padding: 12px;
  cursor: pointer;
}
.aq-member-card input { accent-color: var(--aq-primary); }
.aq-member-card:has(input:checked) {
  border-color: var(--aq-primary);
  background: var(--aq-primary-light);
}
.aq-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #5b6fe8;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}
.aq-avatar-lg { width: 72px; height: 72px; font-size: 1.4rem; margin-bottom: 8px; }
.aq-member-copy { display: flex; flex-direction: column; }
.aq-member-copy small { color: var(--aq-muted); }
.aq-link-btn {
  display: block;
  text-align: center;
  min-height: var(--aq-touch);
  line-height: var(--aq-touch);
  color: var(--aq-primary-dark);
  font-weight: 700;
  text-decoration: none;
}
.aq-review { text-align: center; }
.aq-dl { text-align: left; margin: 20px 0 0; }
.aq-dl dt { color: var(--aq-muted); font-size: 0.85rem; margin-top: 10px; }
.aq-dl dd { margin: 0; font-weight: 600; }
.aq-btn-secondary {
  background: #fff;
  color: var(--aq-primary-dark);
  border: 1px solid var(--aq-primary);
}
.aq-dept-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 12px 0 8px;
}
.aq-dept-card {
  min-height: 88px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  text-align: center;
  padding: 12px;
  cursor: pointer;
  color: #fff;
}
.aq-dept-card input { display: none; }
.aq-dept-card:has(input:checked) { outline: 3px solid var(--aq-primary-dark); }
.aq-dept-blue { background: #4c7dff; }
.aq-dept-orange { background: #f08a3a; }
.aq-dept-pink { background: #e56aa3; }
.aq-dept-purple { background: #9b6fe8; }
.aq-dept-teal { background: var(--aq-primary); }
.aq-wait { text-align: center; padding: 24px 0; }
.aq-spinner {
  width: 56px;
  height: 56px;
  margin: 12px auto 20px;
  border: 5px solid var(--aq-primary-light);
  border-top-color: var(--aq-primary);
  border-radius: 50%;
  animation: aq-spin 0.8s linear infinite;
}
@keyframes aq-spin { to { transform: rotate(360deg); } }
.aq-token-card {
  background: linear-gradient(180deg, #f6b24a 0%, #ef8d2a 100%);
  border-radius: 20px;
  padding: 28px 16px;
  margin: 12px 0 18px;
  text-align: center;
}
.aq-token {
  font-size: 3.4rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #fff;
  line-height: 1;
}
.aq-banner {
  background: var(--aq-primary-light);
  color: var(--aq-primary-dark);
  border-radius: 12px;
  padding: 10px 12px;
  font-weight: 600;
}
.aq-unavailable { text-align: center; }

@media print {
  .aq-header, .aq-footer, .aq-btn, .aq-back { display: none !important; }
  .aq-card { box-shadow: none; }
}

@media (max-width: 575px) {
  .aq-card {
    box-shadow: none;
    padding: 16px 12px 24px;
  }

  .aq-main {
    padding-top: 12px;
  }
}
